diff --git a/package.json b/package.json
index 02585e563..6a650c49b 100644
--- a/package.json
+++ b/package.json
@@ -52,7 +52,7 @@
"yarn": "^1.22.17",
"rimraf": "^3.0.2",
"@types/react-router": "5.1.18",
- "build-plugin-component": "^1.12.0",
+ "@alilc/build-plugin-lce": "^0.0.3",
"babel-jest": "^26.5.2",
"@alilc/lowcode-test-mate": "^1.0.1"
},
diff --git a/packages/designer/build.json b/packages/designer/build.json
index bd5cf18dd..3e9260055 100644
--- a/packages/designer/build.json
+++ b/packages/designer/build.json
@@ -1,5 +1,5 @@
{
"plugins": [
- "build-plugin-component"
+ "@alilc/build-plugin-lce"
]
}
diff --git a/packages/designer/build.test.json b/packages/designer/build.test.json
index 45f0dbdfd..10d18109b 100644
--- a/packages/designer/build.test.json
+++ b/packages/designer/build.test.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"@alilc/lowcode-test-mate/plugin/index.ts"
],
"babelPlugins": [
diff --git a/packages/designer/package.json b/packages/designer/package.json
index 614465b67..4e4630069 100644
--- a/packages/designer/package.json
+++ b/packages/designer/package.json
@@ -9,7 +9,7 @@
"es"
],
"scripts": {
- "build": "build-scripts build --skip-demo",
+ "build": "build-scripts build",
"test": "build-scripts test --config build.test.json",
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
},
diff --git a/packages/editor-core/build.json b/packages/editor-core/build.json
index 40b17de79..c1ebc2c86 100644
--- a/packages/editor-core/build.json
+++ b/packages/editor-core/build.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"build-plugin-fusion",
"./build.plugin.js"
]
diff --git a/packages/editor-core/package.json b/packages/editor-core/package.json
index 52ebaff9b..9b352aad9 100644
--- a/packages/editor-core/package.json
+++ b/packages/editor-core/package.json
@@ -10,7 +10,7 @@
"es"
],
"scripts": {
- "build": "build-scripts build --skip-demo"
+ "build": "build-scripts build"
},
"dependencies": {
"@alifd/next": "^1.19.16",
diff --git a/packages/editor-skeleton/build.json b/packages/editor-skeleton/build.json
index 77627cdf9..d0aec1038 100644
--- a/packages/editor-skeleton/build.json
+++ b/packages/editor-skeleton/build.json
@@ -1,9 +1,9 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"build-plugin-fusion",
["build-plugin-moment-locales", {
"locales": ["zh-cn"]
}]
]
-}
\ No newline at end of file
+}
diff --git a/packages/editor-skeleton/build.test.json b/packages/editor-skeleton/build.test.json
index 45f0dbdfd..10d18109b 100644
--- a/packages/editor-skeleton/build.test.json
+++ b/packages/editor-skeleton/build.test.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"@alilc/lowcode-test-mate/plugin/index.ts"
],
"babelPlugins": [
diff --git a/packages/editor-skeleton/package.json b/packages/editor-skeleton/package.json
index 27b852036..cd146d363 100644
--- a/packages/editor-skeleton/package.json
+++ b/packages/editor-skeleton/package.json
@@ -11,7 +11,7 @@
],
"scripts": {
"test": "build-scripts test --config build.test.json",
- "build": "build-scripts build --skip-demo"
+ "build": "build-scripts build"
},
"keywords": [
"lowcode",
diff --git a/packages/engine/build.json b/packages/engine/build.json
index e8c3e583d..405f2c005 100644
--- a/packages/engine/build.json
+++ b/packages/engine/build.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
[
"build-plugin-fusion",
{
diff --git a/packages/engine/build.test.json b/packages/engine/build.test.json
index a43d8eff9..9596d43e7 100644
--- a/packages/engine/build.test.json
+++ b/packages/engine/build.test.json
@@ -1,7 +1,7 @@
{
"plugins": [
[
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
{
"filename": "editor-preset-vision",
"library": "LowcodeEditor",
diff --git a/packages/engine/package.json b/packages/engine/package.json
index 133972194..ef2a63b07 100644
--- a/packages/engine/package.json
+++ b/packages/engine/package.json
@@ -12,7 +12,7 @@
"scripts": {
"start": "build-scripts start",
"version:update": "node ./scripts/version.js",
- "build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --skip-demo",
+ "build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build",
"build:umd": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --config build.umd.json",
"test": "build-scripts test --config build.test.json --jest-passWithNoTests"
},
diff --git a/packages/plugin-designer/build.json b/packages/plugin-designer/build.json
index bd5cf18dd..3e9260055 100644
--- a/packages/plugin-designer/build.json
+++ b/packages/plugin-designer/build.json
@@ -1,5 +1,5 @@
{
"plugins": [
- "build-plugin-component"
+ "@alilc/build-plugin-lce"
]
}
diff --git a/packages/plugin-designer/package.json b/packages/plugin-designer/package.json
index dcb0c1e4a..f01d90485 100644
--- a/packages/plugin-designer/package.json
+++ b/packages/plugin-designer/package.json
@@ -10,7 +10,7 @@
"module": "es/index.js",
"stylePath": "style.js",
"scripts": {
- "build": "build-scripts build --skip-demo"
+ "build": "build-scripts build"
},
"keywords": [
"lowcode",
diff --git a/packages/plugin-outline-pane/build.json b/packages/plugin-outline-pane/build.json
index e791d5b6b..d0aec1038 100644
--- a/packages/plugin-outline-pane/build.json
+++ b/packages/plugin-outline-pane/build.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"build-plugin-fusion",
["build-plugin-moment-locales", {
"locales": ["zh-cn"]
diff --git a/packages/plugin-outline-pane/package.json b/packages/plugin-outline-pane/package.json
index 4643518a4..b63b5db6f 100644
--- a/packages/plugin-outline-pane/package.json
+++ b/packages/plugin-outline-pane/package.json
@@ -9,7 +9,7 @@
"main": "lib/index.js",
"module": "es/index.js",
"scripts": {
- "build": "build-scripts build --skip-demo"
+ "build": "build-scripts build"
},
"dependencies": {
"@alifd/next": "^1.19.16",
diff --git a/packages/plugin-outline-pane/src/controllers/tree-node.ts b/packages/plugin-outline-pane/src/controllers/tree-node.ts
index 2a6bc0aca..af82904ee 100644
--- a/packages/plugin-outline-pane/src/controllers/tree-node.ts
+++ b/packages/plugin-outline-pane/src/controllers/tree-node.ts
@@ -35,6 +35,8 @@ enum EVENT_NAMES {
titleLabelChanged = 'titleLabelChanged',
expandableChanged = 'expandableChanged',
+
+ conditionChanged = 'conditionChanged',
}
export default class TreeNode {
@@ -152,6 +154,10 @@ export default class TreeNode {
return this.node.slots.map((node) => this.tree.getTreeNode(node));
}
+ get condition(): boolean {
+ return this.node.hasCondition() && !this.node.conditionGroup;
+ }
+
get children(): TreeNode[] | null {
return this.node.children?.map((node) => this.tree.getTreeNode(node)) || null;
}
@@ -203,6 +209,15 @@ export default class TreeNode {
this.event.off(EVENT_NAMES.titleLabelChanged, fn);
};
}
+
+ onConditionChanged(fn: (treeNode: TreeNode) => void): IPublicTypeDisposable {
+ this.event.on(EVENT_NAMES.conditionChanged, fn);
+
+ return () => {
+ this.event.off(EVENT_NAMES.conditionChanged, fn);
+ };
+ }
+
onExpandableChanged(fn: (expandable: boolean) => void): IPublicTypeDisposable {
this.event.on(EVENT_NAMES.expandableChanged, fn);
return () => {
@@ -221,6 +236,10 @@ export default class TreeNode {
this.event.emit(EVENT_NAMES.titleLabelChanged, this.title);
}
+ notifyConditionChanged(): void {
+ this.event.emit(EVENT_NAMES.conditionChanged, this.condition);
+ }
+
setHidden(flag: boolean) {
if (this.node.conditionGroup) {
return;
diff --git a/packages/plugin-outline-pane/src/controllers/tree.ts b/packages/plugin-outline-pane/src/controllers/tree.ts
index 94cab7879..7b9ad0593 100644
--- a/packages/plugin-outline-pane/src/controllers/tree.ts
+++ b/packages/plugin-outline-pane/src/controllers/tree.ts
@@ -35,6 +35,9 @@ export class Tree {
if (key === '___title___') {
const treeNode = this.getTreeNodeById(node.id);
treeNode?.notifyTitleLabelChanged();
+ } else if (key === '___condition___') {
+ const treeNode = this.getTreeNodeById(node.id);
+ treeNode?.notifyConditionChanged();
}
});
}
diff --git a/packages/plugin-outline-pane/src/views/tree-title.tsx b/packages/plugin-outline-pane/src/views/tree-title.tsx
index 96a3dfa7b..923213238 100644
--- a/packages/plugin-outline-pane/src/views/tree-title.tsx
+++ b/packages/plugin-outline-pane/src/views/tree-title.tsx
@@ -27,6 +27,7 @@ export default class TreeTitle extends PureComponent<{
state: {
editing: boolean;
title: string;
+ condition?: boolean;
} = {
editing: false,
title: '',
@@ -80,12 +81,18 @@ export default class TreeTitle extends PureComponent<{
this.setState({
editing: false,
title: treeNode.titleLabel,
+ condition: treeNode.condition,
});
treeNode.onTitleLabelChanged(() => {
this.setState({
title: treeNode.titleLabel,
});
});
+ treeNode.onConditionChanged(() => {
+ this.setState({
+ condition: treeNode.condition,
+ });
+ });
}
render() {
@@ -188,7 +195,7 @@ export default class TreeTitle extends PureComponent<{
{intlNode('Loop')}
)}
- {node.hasCondition() && !node.conditionGroup && (
+ {this.state.condition && (
{/* todo: click todo something */}
diff --git a/packages/rax-simulator-renderer/build.json b/packages/rax-simulator-renderer/build.json
index b95a17aaf..e7ae1dcf7 100644
--- a/packages/rax-simulator-renderer/build.json
+++ b/packages/rax-simulator-renderer/build.json
@@ -1,3 +1,3 @@
{
- "plugins": ["build-plugin-component", "./build.plugin.js"]
+ "plugins": ["@alilc/build-plugin-lce", "./build.plugin.js"]
}
diff --git a/packages/rax-simulator-renderer/package.json b/packages/rax-simulator-renderer/package.json
index ca2d08b6f..35a74fe2c 100644
--- a/packages/rax-simulator-renderer/package.json
+++ b/packages/rax-simulator-renderer/package.json
@@ -9,7 +9,7 @@
"dist"
],
"scripts": {
- "build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --skip-demo",
+ "build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build",
"build:umd": "build-scripts build --config build.umd.json"
},
"dependencies": {
diff --git a/packages/react-renderer/build.json b/packages/react-renderer/build.json
index e791d5b6b..d0aec1038 100644
--- a/packages/react-renderer/build.json
+++ b/packages/react-renderer/build.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"build-plugin-fusion",
["build-plugin-moment-locales", {
"locales": ["zh-cn"]
diff --git a/packages/react-renderer/build.test.json b/packages/react-renderer/build.test.json
index dcdc891e9..9cc30d746 100644
--- a/packages/react-renderer/build.test.json
+++ b/packages/react-renderer/build.test.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"@alilc/lowcode-test-mate/plugin/index.ts"
]
}
diff --git a/packages/react-renderer/package.json b/packages/react-renderer/package.json
index 88971db52..a381e7d5c 100644
--- a/packages/react-renderer/package.json
+++ b/packages/react-renderer/package.json
@@ -12,7 +12,7 @@
"scripts": {
"test": "build-scripts test --config build.test.json",
"start": "build-scripts start",
- "build": "build-scripts build --skip-demo",
+ "build": "build-scripts build",
"build:umd": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --config build.umd.json"
},
"keywords": [
diff --git a/packages/react-simulator-renderer/build.json b/packages/react-simulator-renderer/build.json
index b95a17aaf..e7ae1dcf7 100644
--- a/packages/react-simulator-renderer/build.json
+++ b/packages/react-simulator-renderer/build.json
@@ -1,3 +1,3 @@
{
- "plugins": ["build-plugin-component", "./build.plugin.js"]
+ "plugins": ["@alilc/build-plugin-lce", "./build.plugin.js"]
}
diff --git a/packages/react-simulator-renderer/build.test.json b/packages/react-simulator-renderer/build.test.json
index dcdc891e9..9cc30d746 100644
--- a/packages/react-simulator-renderer/build.test.json
+++ b/packages/react-simulator-renderer/build.test.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"@alilc/lowcode-test-mate/plugin/index.ts"
]
}
diff --git a/packages/react-simulator-renderer/package.json b/packages/react-simulator-renderer/package.json
index 519497868..8a78beaab 100644
--- a/packages/react-simulator-renderer/package.json
+++ b/packages/react-simulator-renderer/package.json
@@ -12,7 +12,7 @@
],
"scripts": {
"test": "build-scripts test --config build.test.json",
- "build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --skip-demo",
+ "build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build",
"build:umd": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --config build.umd.json",
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
},
diff --git a/packages/renderer-core/build.json b/packages/renderer-core/build.json
index a8e42f154..9140815c5 100644
--- a/packages/renderer-core/build.json
+++ b/packages/renderer-core/build.json
@@ -1,7 +1,7 @@
{
"plugins": [
[
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
{
"babelPlugins": ["@babel/plugin-transform-typescript"]
}
diff --git a/packages/renderer-core/build.test.json b/packages/renderer-core/build.test.json
index dcdc891e9..9cc30d746 100644
--- a/packages/renderer-core/build.test.json
+++ b/packages/renderer-core/build.test.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"@alilc/lowcode-test-mate/plugin/index.ts"
]
}
diff --git a/packages/renderer-core/package.json b/packages/renderer-core/package.json
index f02697b67..1ce778aca 100644
--- a/packages/renderer-core/package.json
+++ b/packages/renderer-core/package.json
@@ -10,7 +10,7 @@
"es"
],
"scripts": {
- "build": "build-scripts build --skip-demo",
+ "build": "build-scripts build",
"test": "build-scripts test --config build.test.json",
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
},
diff --git a/packages/shell/build.json b/packages/shell/build.json
index bd5cf18dd..3e9260055 100644
--- a/packages/shell/build.json
+++ b/packages/shell/build.json
@@ -1,5 +1,5 @@
{
"plugins": [
- "build-plugin-component"
+ "@alilc/build-plugin-lce"
]
}
diff --git a/packages/shell/build.test.json b/packages/shell/build.test.json
index dcdc891e9..9cc30d746 100644
--- a/packages/shell/build.test.json
+++ b/packages/shell/build.test.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"@alilc/lowcode-test-mate/plugin/index.ts"
]
}
diff --git a/packages/shell/package.json b/packages/shell/package.json
index 001cb7e2f..be84820c1 100644
--- a/packages/shell/package.json
+++ b/packages/shell/package.json
@@ -9,9 +9,7 @@
"es"
],
"scripts": {
- "build": "build-scripts build --skip-demo",
- "test": "build-scripts test --config build.test.json",
- "test:cov": "build-scripts test --config build.test.json --jest-coverage"
+ "build": "build-scripts build"
},
"license": "MIT",
"dependencies": {
diff --git a/packages/types/build.json b/packages/types/build.json
index bd5cf18dd..3e9260055 100644
--- a/packages/types/build.json
+++ b/packages/types/build.json
@@ -1,5 +1,5 @@
{
"plugins": [
- "build-plugin-component"
+ "@alilc/build-plugin-lce"
]
}
diff --git a/packages/types/package.json b/packages/types/package.json
index 07299c5aa..6dea37241 100644
--- a/packages/types/package.json
+++ b/packages/types/package.json
@@ -9,7 +9,7 @@
"main": "lib/index.js",
"module": "es/index.js",
"scripts": {
- "build": "build-scripts build --skip-demo"
+ "build": "build-scripts build"
},
"dependencies": {
"@alilc/lowcode-datasource-types": "^1.0.0",
diff --git a/packages/utils/build.json b/packages/utils/build.json
index bd5cf18dd..3e9260055 100644
--- a/packages/utils/build.json
+++ b/packages/utils/build.json
@@ -1,5 +1,5 @@
{
"plugins": [
- "build-plugin-component"
+ "@alilc/build-plugin-lce"
]
}
diff --git a/packages/utils/build.test.json b/packages/utils/build.test.json
index dcdc891e9..9cc30d746 100644
--- a/packages/utils/build.test.json
+++ b/packages/utils/build.test.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"@alilc/lowcode-test-mate/plugin/index.ts"
]
}
diff --git a/packages/utils/package.json b/packages/utils/package.json
index bddaef3b5..f8a050936 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -10,7 +10,7 @@
"module": "es/index.js",
"scripts": {
"test": "build-scripts test --config build.test.json",
- "build": "build-scripts build --skip-demo"
+ "build": "build-scripts build"
},
"dependencies": {
"@alifd/next": "^1.19.16",
diff --git a/packages/workspace/build.json b/packages/workspace/build.json
index bd5cf18dd..3e9260055 100644
--- a/packages/workspace/build.json
+++ b/packages/workspace/build.json
@@ -1,5 +1,5 @@
{
"plugins": [
- "build-plugin-component"
+ "@alilc/build-plugin-lce"
]
}
diff --git a/packages/workspace/build.test.json b/packages/workspace/build.test.json
index dcdc891e9..9cc30d746 100644
--- a/packages/workspace/build.test.json
+++ b/packages/workspace/build.test.json
@@ -1,6 +1,6 @@
{
"plugins": [
- "build-plugin-component",
+ "@alilc/build-plugin-lce",
"@alilc/lowcode-test-mate/plugin/index.ts"
]
}
diff --git a/packages/workspace/package.json b/packages/workspace/package.json
index 9305ad500..a040547e1 100644
--- a/packages/workspace/package.json
+++ b/packages/workspace/package.json
@@ -9,7 +9,7 @@
"es"
],
"scripts": {
- "build": "build-scripts build --skip-demo",
+ "build": "build-scripts build",
"test": "build-scripts test --config build.test.json",
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
},