forked from apitable/apitable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Submit a pull request for this project. <!-- If you have an Issue that related to this Pull Request, you can copy this Issue's description --> # Why? <!-- > Related to which issue? > Why we need this pull request? > What is the user story for this pull request? --> # What? <!-- > Can you describe this feature in detail? > Who can benefit from it? --> # How? <!-- > Do you have a simple description of how this pull request is implemented? --> --------- Co-authored-by: Caedman Ziwen Lan <[email protected]> Co-authored-by: Harry Yep <[email protected]> Co-authored-by: Zoe <[email protected]> Co-authored-by: Zoe <[email protected]> Co-authored-by: Kilian <[email protected]> Co-authored-by: Aria <[email protected]> Co-authored-by: ziqiang <[email protected]> Co-authored-by: Shawn Deng <[email protected]> Co-authored-by: Chambers <[email protected]> Co-authored-by: William Chan <[email protected]> Co-authored-by: wangkailang <[email protected]> Co-authored-by: Jeremy Yin <[email protected]> Co-authored-by: quppenge <[email protected]> Co-authored-by: QuppZhang <[email protected]> Co-authored-by: XuKecheng <[email protected]> Co-authored-by: xukecheng <[email protected]> Co-authored-by: Michael Xiaoliang Chan <[email protected]> Co-authored-by: yechen <[email protected]> Co-authored-by: Chalme Cheng Peng <[email protected]> Co-authored-by: XuKecheng <[email protected]> Co-authored-by: Evie Wanmei Huang <[email protected]>
- Loading branch information
1 parent
bc14c31
commit 6579041
Showing
495 changed files
with
10,205 additions
and
9,970 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 1.8.0 | ||
current_version = 1.9.0 | ||
commit = False | ||
tag = False | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.8.0 | ||
1.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,108 changes: 563 additions & 545 deletions
1,108
backend-server/application/src/main/resources/sysconfig/strings.json
Large diffs are not rendered by default.
Oops, something went wrong.
70 changes: 70 additions & 0 deletions
70
...application/src/test/java/com/apitable/template/service/impl/TemplateServiceImplTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package com.apitable.template.service.impl; | ||
|
||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import com.apitable.AbstractIntegrationTest; | ||
import com.apitable.mock.bean.MockUserSpace; | ||
import com.apitable.shared.context.LoginContext; | ||
import com.apitable.template.ro.CreateTemplateRo; | ||
import com.apitable.template.vo.TemplateDirectoryVo; | ||
import com.apitable.workspace.enums.NodeType; | ||
import com.apitable.workspace.ro.NodeEmbedPageRo; | ||
import com.apitable.workspace.ro.NodeOpRo; | ||
import com.apitable.workspace.ro.NodeRelRo; | ||
import com.apitable.workspace.vo.NodeShareTree; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class TemplateServiceImplTest extends AbstractIntegrationTest { | ||
|
||
@Test | ||
void testCreateTplWithCustomPageInFolder() { | ||
MockUserSpace userSpace = createSingleUserAndSpace(); | ||
String rootNodeId = iNodeService.getRootNodeIdBySpaceId(userSpace.getSpaceId()); | ||
String folderId = iNodeService.createNode(userSpace.getUserId(), userSpace.getSpaceId(), | ||
NodeOpRo.builder().parentId(rootNodeId).type( | ||
NodeType.FOLDER.getNodeType()).build()); | ||
// create custom page | ||
NodeRelRo nodeRelRo = new NodeRelRo(); | ||
nodeRelRo.setEmbedPage(new NodeEmbedPageRo("https://www.baidu.con", "any")); | ||
iNodeService.createNode(userSpace.getUserId(), userSpace.getSpaceId(), | ||
NodeOpRo.builder().parentId(folderId).type(NodeType.CUSTOM_PAGE.getNodeType()) | ||
.extra(nodeRelRo).build()); | ||
CreateTemplateRo createTemplateRo = new CreateTemplateRo(); | ||
createTemplateRo.setNodeId(folderId); | ||
createTemplateRo.setData(true); | ||
createTemplateRo.setName("new folder"); | ||
String templateId = iTemplateService.create(userSpace.getUserId(), userSpace.getSpaceId(), | ||
createTemplateRo); | ||
String lang = LoginContext.me().getLocaleStrWithUnderLine(); | ||
TemplateDirectoryVo vo = | ||
iTemplateService.getDirectoryVo("tpcprivate", templateId, true, lang); | ||
NodeShareTree nodeShareTree = vo.getNodeTree(); | ||
assertThat(nodeShareTree.getChildrenNodes()).isNotEmpty(); | ||
assertThat(nodeShareTree.getChildrenNodes().get(0).getExtra()).isNotEmpty(); | ||
} | ||
|
||
@Test | ||
void testCreateTplWithCustomPageInFolderWithoutExtra() { | ||
MockUserSpace userSpace = createSingleUserAndSpace(); | ||
String rootNodeId = iNodeService.getRootNodeIdBySpaceId(userSpace.getSpaceId()); | ||
String folderId = iNodeService.createNode(userSpace.getUserId(), userSpace.getSpaceId(), | ||
NodeOpRo.builder().parentId(rootNodeId).type( | ||
NodeType.FOLDER.getNodeType()).build()); | ||
|
||
iNodeService.createNode(userSpace.getUserId(), userSpace.getSpaceId(), | ||
NodeOpRo.builder().parentId(folderId).type(NodeType.CUSTOM_PAGE.getNodeType()).build()); | ||
CreateTemplateRo createTemplateRo = new CreateTemplateRo(); | ||
createTemplateRo.setNodeId(folderId); | ||
createTemplateRo.setData(true); | ||
createTemplateRo.setName("new folder"); | ||
String templateId = iTemplateService.create(userSpace.getUserId(), userSpace.getSpaceId(), | ||
createTemplateRo); | ||
String lang = LoginContext.me().getLocaleStrWithUnderLine(); | ||
TemplateDirectoryVo vo = | ||
iTemplateService.getDirectoryVo("tpcprivate", templateId, true, lang); | ||
NodeShareTree nodeShareTree = vo.getNodeTree(); | ||
assertThat(nodeShareTree.getChildrenNodes()).isNotEmpty(); | ||
assertThat(nodeShareTree.getChildrenNodes().get(0).getExtra()).isNull(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.8.0 | ||
1.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"extends": [ | ||
"../../.eslintrc" | ||
], | ||
"plugins": ["import"], | ||
// "parserOptions": { | ||
// "project": "./tsconfig.json" | ||
// }, | ||
"rules": { | ||
"import/no-duplicates": [ | ||
"warn", | ||
{ | ||
"considerQueryString": true | ||
} | ||
], | ||
"import/order": [ | ||
"warn", | ||
{ | ||
"groups": [ | ||
"builtin", | ||
"external", | ||
"internal", | ||
"parent", | ||
"sibling", | ||
"index" | ||
], | ||
"pathGroups": [ | ||
{ | ||
"pattern": "@apitable/**", | ||
"group": "external", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "pc/**", | ||
"group": "internal", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "static/**", | ||
"group": "internal", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "enterprise/**", | ||
"group": "sibling", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "./*.less", | ||
"group": "index", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "./*.module.less", | ||
"group": "index", | ||
"position": "after" | ||
} | ||
], | ||
"pathGroupsExcludedImportTypes": [ | ||
"builtin" | ||
], | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
], | ||
"comma-spacing": [ | ||
"warn", | ||
{ | ||
"before": false, | ||
"after": true | ||
} | ||
], | ||
"react/display-name": 0, | ||
"react/no-find-dom-node": 0, | ||
"react/no-unknown-property": 1, | ||
"no-restricted-imports": [ | ||
"error", | ||
{ | ||
"paths": [ | ||
{ | ||
"name": "@apitable/components", | ||
"importNames": [ | ||
"Select" | ||
], | ||
"message": "Please use tooltip DropdownSelect from '@apitable/components instead ." | ||
}, | ||
{ | ||
"name": "pc/components/common/tooltip", | ||
"importNames": [ | ||
"Tooltip" | ||
], | ||
"message": "Please use tooltip FloatUiTooltip from '@apitable/components instead ." | ||
}, | ||
{ | ||
"name": "pc/components/common", | ||
"importNames": [ | ||
"Tooltip" | ||
], | ||
"message": "Please use tooltip FloatUiTooltip from '@apitable/components instead ." | ||
}, | ||
{ | ||
"name": "react-custom-scrollbars", | ||
"importNames": [ | ||
"Scrollbars" | ||
], | ||
"message": "Please use ScrollBar from pc/components/scroll_bar instead." | ||
} | ||
] | ||
} | ||
], | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"argsIgnorePattern": "^_" | ||
} | ||
] | ||
// "@typescript-eslint/no-misused-promises": 1, | ||
// "@typescript-eslint/no-floating-promises": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
dist | ||
.DS_Store | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# The current package will be released to npm, | ||
# and only d.ts will be kept in npm without source code, | ||
# and all unnecessary sensitive information will be discharged in | ||
.yarn | ||
src | ||
dist/**/*.d.ts.map | ||
tsconfig*.json | ||
docs/ | ||
READ.dev.md | ||
setup.ts | ||
styleguide/ | ||
styleguide.config.js | ||
typings.json | ||
typings/ | ||
.storybook | ||
.env | ||
.gitignore | ||
jest.config.js | ||
sonar-project.properties | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# APITable Components | ||
|
||
A Design System with React、styled-components and Typescript. | ||
|
||
## Install | ||
|
||
```bash | ||
yarn add @apitable/components | ||
``` | ||
|
||
## Usage | ||
|
||
```javascript | ||
import { Select } from '@apitable/components'; | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@apitable/ai", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"author": "APITable Ltd. <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** @type {import("prettier").Config} */ | ||
module.exports = { | ||
bracketSpacing: true, | ||
printWidth: 150, | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'all', | ||
useTabs: false, | ||
}; |
Oops, something went wrong.