@lcap/nasl 3.7.3-beta.1 → 3.8.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mocharc.js +0 -1
- package/out/automate/engine/utils.js +6 -1
- package/out/automate/engine/utils.js.map +1 -1
- package/out/bak/translator.js +37 -0
- package/out/bak/translator.js.map +1 -1
- package/out/breakpoint/shared/utils.d.ts +1 -0
- package/out/breakpoint/shared/utils.js +1 -1
- package/out/breakpoint/shared/utils.js.map +1 -1
- package/out/common/BaseNode.d.ts +11 -0
- package/out/common/BaseNode.js +101 -5
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/Annotatable__.d.ts +109 -0
- package/out/concepts/Annotatable__.js +161 -0
- package/out/concepts/Annotatable__.js.map +1 -0
- package/out/concepts/AnnotationProperty__.d.ts +48 -0
- package/out/concepts/AnnotationProperty__.js +74 -0
- package/out/concepts/AnnotationProperty__.js.map +1 -0
- package/out/concepts/Annotation__.d.ts +128 -0
- package/out/concepts/Annotation__.js +248 -0
- package/out/concepts/Annotation__.js.map +1 -0
- package/out/concepts/App__.d.ts +14 -26
- package/out/concepts/App__.js +50 -20
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/ApplyAnnotation__.d.ts +87 -0
- package/out/concepts/ApplyAnnotation__.js +140 -0
- package/out/concepts/ApplyAnnotation__.js.map +1 -0
- package/out/concepts/Argument__.d.ts +19 -0
- package/out/concepts/Argument__.js +126 -0
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/AssigneeV2__.d.ts +169 -0
- package/out/concepts/AssigneeV2__.js +176 -1
- package/out/concepts/AssigneeV2__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.js +1 -1
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/AuthLogic__.js +1 -1
- package/out/concepts/AuthLogic__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +1 -0
- package/out/concepts/BooleanLiteral__.js +9 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/BusinessLogic__.js +1 -1
- package/out/concepts/BusinessLogic__.js.map +1 -1
- package/out/concepts/CallFunction__.js +1 -1
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +15 -0
- package/out/concepts/CallLogic__.js +149 -17
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/ConnectorLogic__.js +1 -1
- package/out/concepts/ConnectorLogic__.js.map +1 -1
- package/out/concepts/DatabaseTypeAnnotation__.d.ts +0 -2
- package/out/concepts/DatabaseTypeAnnotation__.js +0 -20
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
- package/out/concepts/DepartmentManagerV2__.d.ts +29 -0
- package/out/concepts/DepartmentManagerV2__.js +56 -0
- package/out/concepts/DepartmentManagerV2__.js.map +1 -0
- package/out/concepts/DepartmentV2__.d.ts +33 -0
- package/out/concepts/DepartmentV2__.js +63 -0
- package/out/concepts/DepartmentV2__.js.map +1 -0
- package/out/concepts/DirectManagerV2__.d.ts +25 -0
- package/out/concepts/DirectManagerV2__.js +53 -0
- package/out/concepts/DirectManagerV2__.js.map +1 -0
- package/out/concepts/End__.js +9 -1
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityProperty__.js +0 -2
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +2 -2
- package/out/concepts/Entity__.js +4 -7
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +1 -12
- package/out/concepts/EnumItem__.js +17 -49
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/EnumSelectSetter__.d.ts +4 -0
- package/out/concepts/EnumSelectSetter__.js +7 -0
- package/out/concepts/EnumSelectSetter__.js.map +1 -1
- package/out/concepts/Enum__.js +1 -4
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +1 -1
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.d.ts +52 -48
- package/out/concepts/FrontendLibrary__.js +45 -36
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/FrontendType__.d.ts +4 -0
- package/out/concepts/FrontendType__.js +7 -0
- package/out/concepts/FrontendType__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +2 -0
- package/out/concepts/Frontend__.js +21 -2
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/HistoryProcessV2__.js +4 -1
- package/out/concepts/HistoryProcessV2__.js.map +1 -1
- package/out/concepts/I18nInfo__.d.ts +0 -1
- package/out/concepts/I18nInfo__.js +0 -7
- package/out/concepts/I18nInfo__.js.map +1 -1
- package/out/concepts/Identifier__.d.ts +2 -0
- package/out/concepts/Identifier__.js +31 -0
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js +2 -2
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/Interface__.js +1 -4
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +1 -1
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +16 -1
- package/out/concepts/Logic__.js +133 -15
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/ManagerV2__.d.ts +34 -0
- package/out/concepts/ManagerV2__.js +61 -0
- package/out/concepts/ManagerV2__.js.map +1 -0
- package/out/concepts/MatchCase__.d.ts +2 -2
- package/out/concepts/MatchCase__.js +7 -7
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +1 -0
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/Module__.d.ts +88 -0
- package/out/concepts/Module__.js +85 -0
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/OperatePermissionV2__.d.ts +1 -1
- package/out/concepts/OperatePermissionV2__.js.map +1 -1
- package/out/concepts/Param__.d.ts +4 -0
- package/out/concepts/Param__.js +13 -21
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessElementV2__.d.ts +6 -1
- package/out/concepts/ProcessElementV2__.js +20 -0
- package/out/concepts/ProcessElementV2__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +7 -0
- package/out/concepts/ProcessElement__.js +47 -0
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessV2__.d.ts +1 -34
- package/out/concepts/ProcessV2__.js +3 -70
- package/out/concepts/ProcessV2__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.js +2 -2
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +2 -2
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/StaticString__.d.ts +0 -4
- package/out/concepts/StaticString__.js +0 -11
- package/out/concepts/StaticString__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +1 -0
- package/out/concepts/StructureProperty__.js +14 -5
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +4 -0
- package/out/concepts/Structure__.js +6 -9
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SubLogic__.d.ts +418 -0
- package/out/concepts/SubLogic__.js +992 -0
- package/out/concepts/SubLogic__.js.map +1 -0
- package/out/concepts/Theme__.d.ts +9 -0
- package/out/concepts/Theme__.js +10 -0
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.d.ts +0 -1
- package/out/concepts/Transactional__.js +0 -7
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.js +18 -0
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +1 -0
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +6 -1
- package/out/concepts/ValidationRule__.js +6 -1
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +8 -2
- package/out/concepts/ViewElement__.js +213 -32
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +10 -2
- package/out/concepts/View__.js +129 -17
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.processV2.d.ts +2 -0
- package/out/concepts/basics/stdlib/nasl.processV2.js +50 -4
- package/out/concepts/basics/stdlib/nasl.processV2.js.map +1 -1
- package/out/concepts/basics/types/index.d.ts +1 -1
- package/out/concepts/basics/types/index.js +2 -1
- package/out/concepts/basics/types/index.js.map +1 -1
- package/out/concepts/index__.d.ts +9 -0
- package/out/concepts/index__.js +9 -0
- package/out/concepts/index__.js.map +1 -1
- package/out/concepts/utils/asserts.d.ts +409 -0
- package/out/concepts/utils/asserts.js +564 -14
- package/out/concepts/utils/asserts.js.map +1 -1
- package/out/concepts/utils/types.d.ts +33 -2
- package/out/generator/genBundleFiles.d.ts +13 -9
- package/out/generator/genBundleFiles.js +383 -63
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.js +2 -0
- package/out/generator/genMetaData.js.map +1 -1
- package/out/generator/release-body/body.js +1 -0
- package/out/generator/release-body/body.js.map +1 -1
- package/out/generator/release-body/utils.d.ts +15 -7
- package/out/generator/release-body/utils.js +50 -7
- package/out/generator/release-body/utils.js.map +1 -1
- package/out/natural/genNaturalTS.js +2 -4
- package/out/natural/genNaturalTS.js.map +1 -1
- package/out/natural/getContext/index.js +0 -2
- package/out/natural/getContext/index.js.map +1 -1
- package/out/natural/transformTS2UI.js.map +1 -1
- package/out/natural/transformTSCode.d.ts +1 -1
- package/out/natural/transformTSCode.js.map +1 -1
- package/out/server/extendBaseNode.js +9 -0
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/getLogics.js +10 -6
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +6 -0
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcessesV2.d.ts +3 -2
- package/out/server/getProcessesV2.js +15 -6
- package/out/server/getProcessesV2.js.map +1 -1
- package/out/server/naslServer.d.ts +5 -1
- package/out/server/naslServer.js +120 -30
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +4 -0
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.d.ts +2 -1
- package/out/service/storage/init.js +28 -71
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.d.ts +6 -2
- package/out/templator/genCreateBlock.js +25 -8
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.d.ts +22 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js +60 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.d.ts +13 -3
- package/out/templator/genCurdMultipleKeyBlock.js +29 -23
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genGetBlock.d.ts +1 -1
- package/out/templator/genGetBlock.js +3 -2
- package/out/templator/genGetBlock.js.map +1 -1
- package/out/templator/genListViewBlock.d.ts +1 -1
- package/out/templator/genListViewBlock.js +3 -2
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genSelectBlock.d.ts +1 -1
- package/out/templator/genSelectBlock.js +3 -2
- package/out/templator/genSelectBlock.js.map +1 -1
- package/out/templator/genTableBlock.d.ts +9 -4
- package/out/templator/genTableBlock.js +31 -17
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.d.ts +2 -2
- package/out/templator/genUpdateBlock.js +11 -11
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/translator/types.d.ts +0 -4
- package/out/translator/utils.d.ts +0 -1
- package/out/translator/utils.js +1 -6
- package/out/translator/utils.js.map +1 -1
- package/out/utils/delay/index.d.ts +0 -0
- package/out/utils/delay/index.js +1 -0
- package/out/utils/delay/index.js.map +1 -0
- package/out/utils/env.d.ts +0 -4
- package/out/utils/env.js +3 -6
- package/out/utils/env.js.map +1 -1
- package/out/utils/index.d.ts +3 -2
- package/out/utils/index.js +18 -14
- package/out/utils/index.js.map +1 -1
- package/out/utils/time-slicing/controller.js.map +1 -1
- package/out/utils/types.d.ts +0 -17
- package/package.json +27 -20
- package/sandbox/stdlib/extension.component.ts +29 -0
- package/sandbox/stdlib/nasl.process.ts +17 -0
- package/sandbox/stdlib/nasl.processV2.ts +10 -5
- package/sandbox/stdlib/nasl.util.ts +3 -1
- package/src/automate/engine/utils.js +7 -2
- package/src/bak/translator.js +42 -1
- package/src/breakpoint/shared/utils.ts +2 -1
- package/src/common/BaseNode.ts +117 -5
- package/src/concepts/Annotatable__.ts +263 -0
- package/src/concepts/AnnotationProperty__.ts +102 -0
- package/src/concepts/Annotation__.ts +344 -0
- package/src/concepts/App__.ts +917 -26
- package/src/concepts/ApplyAnnotation__.ts +198 -0
- package/src/concepts/Argument__.ts +145 -1
- package/src/concepts/AssigneeV2__.ts +387 -1
- package/src/concepts/AuthLogicForCallInterface__.ts +1 -1
- package/src/concepts/AuthLogic__.ts +1 -1
- package/src/concepts/BooleanLiteral__.ts +9 -1
- package/src/concepts/BusinessLogic__.ts +1 -1
- package/src/concepts/CallFunction__.ts +1 -1
- package/src/concepts/CallLogic__.ts +153 -16
- package/src/concepts/ConnectorLogic__.ts +1 -1
- package/src/concepts/DatabaseTypeAnnotation__.ts +0 -11
- package/src/concepts/DepartmentManagerV2__.ts +70 -0
- package/src/concepts/DepartmentV2__.ts +75 -0
- package/src/concepts/DirectManagerV2__.ts +65 -0
- package/src/concepts/End__.ts +10 -1
- package/src/concepts/EntityProperty__.ts +0 -5
- package/src/concepts/Entity__.ts +5 -9
- package/src/concepts/EnumItem__.ts +16 -65
- package/src/concepts/EnumSelectSetter__.ts +6 -0
- package/src/concepts/Enum__.ts +1 -6
- package/src/concepts/ForEachStatement__.ts +1 -1
- package/src/concepts/FrontendLibrary__.ts +88 -80
- package/src/concepts/FrontendType__.ts +6 -0
- package/src/concepts/Frontend__.ts +26 -3
- package/src/concepts/HistoryProcessV2__.ts +5 -0
- package/src/concepts/I18nInfo__.ts +0 -5
- package/src/concepts/Identifier__.ts +32 -0
- package/src/concepts/IfStatement__.ts +2 -2
- package/src/concepts/Interface__.ts +1 -6
- package/src/concepts/LogicItem__.ts +1 -0
- package/src/concepts/Logic__.ts +140 -17
- package/src/concepts/ManagerV2__.ts +78 -0
- package/src/concepts/MatchCase__.ts +9 -8
- package/src/concepts/MemberExpression__.ts +1 -0
- package/src/concepts/Module__.ts +194 -0
- package/src/concepts/OperatePermissionV2__.ts +1 -1
- package/src/concepts/Param__.ts +17 -20
- package/src/concepts/ProcessElementV2__.ts +23 -0
- package/src/concepts/ProcessElement__.ts +18 -0
- package/src/concepts/ProcessV2__.ts +4 -70
- package/src/concepts/QueryFromExpression__.ts +2 -2
- package/src/concepts/QueryJoinExpression__.ts +2 -2
- package/src/concepts/StaticString__.ts +0 -13
- package/src/concepts/StructureProperty__.ts +16 -7
- package/src/concepts/Structure__.ts +10 -11
- package/src/concepts/SubLogic__.ts +1516 -0
- package/src/concepts/Theme__.ts +9 -0
- package/src/concepts/Transactional__.ts +0 -5
- package/src/concepts/TriggerLauncher__.ts +1 -1
- package/src/concepts/TypeAnnotation__.ts +17 -0
- package/src/concepts/TypeParam__.ts +3 -0
- package/src/concepts/ValidationRule__.ts +6 -1
- package/src/concepts/ViewElement__.ts +224 -34
- package/src/concepts/View__.ts +135 -22
- package/src/concepts/basics/stdlib/nasl.processV2.ts +56 -3
- package/src/concepts/basics/types/index.ts +1 -1
- package/src/concepts/index__.ts +9 -0
- package/src/concepts/utils/asserts.ts +595 -0
- package/src/concepts/utils/types.ts +53 -0
- package/src/generator/genBundleFiles.ts +408 -68
- package/src/generator/genMetaData.ts +3 -0
- package/src/generator/release-body/body.ts +1 -0
- package/src/generator/release-body/utils.ts +159 -55
- package/src/natural/genNaturalTS.ts +3 -5
- package/src/natural/getContext/index.ts +0 -2
- package/src/natural/transformTS2UI.ts +5 -2
- package/src/natural/transformTSCode.ts +2 -2
- package/src/server/extendBaseNode.ts +11 -2
- package/src/server/getLogics.ts +9 -7
- package/src/server/getMemberIdentifier.ts +7 -0
- package/src/server/getProcessesV2.ts +16 -6
- package/src/server/naslServer.ts +133 -30
- package/src/server/translator.ts +4 -0
- package/src/service/storage/init.ts +52 -97
- package/src/templator/genCreateBlock.ts +35 -14
- package/src/templator/genCurdEditMultipleKeyBlock.ts +65 -1
- package/src/templator/genCurdMultipleKeyBlock.ts +42 -23
- package/src/templator/genGetBlock.ts +4 -3
- package/src/templator/genListViewBlock.ts +3 -3
- package/src/templator/genSelectBlock.ts +4 -2
- package/src/templator/genTableBlock.ts +32 -17
- package/src/templator/genUpdateBlock.ts +21 -18
- package/src/translator/types.ts +0 -4
- package/src/translator/utils.ts +0 -6
- package/src/utils/delay/index.ts +0 -0
- package/src/utils/env.ts +4 -5
- package/src/utils/index.ts +16 -4
- package/src/utils/time-slicing/controller.ts +1 -0
- package/src/utils/types.ts +0 -20
- package/test/concepts/validation-rule/__snapshots__/toEmbeddedTS.spec.ts.snap +2 -1
- package/ts-worker/bundle.js +1 -1
- package/ts-worker/src/index.js +1 -0
- package/out/utils/language-cache/constant.d.ts +0 -18
- package/out/utils/language-cache/constant.js +0 -35
- package/out/utils/language-cache/constant.js.map +0 -1
- package/out/utils/language-cache/index.d.ts +0 -2
- package/out/utils/language-cache/index.js +0 -19
- package/out/utils/language-cache/index.js.map +0 -1
- package/out/utils/language-cache/nasl.d.ts +0 -10
- package/out/utils/language-cache/nasl.js +0 -98
- package/out/utils/language-cache/nasl.js.map +0 -1
- package/out/utils/language-cache/types.d.ts +0 -44
- package/out/utils/language-cache/types.js +0 -4
- package/out/utils/language-cache/types.js.map +0 -1
- package/src/utils/language-cache/constant.ts +0 -37
- package/src/utils/language-cache/index.ts +0 -2
- package/src/utils/language-cache/nasl.ts +0 -83
- package/src/utils/language-cache/types.ts +0 -48
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
TranslatorGenerator,
|
|
10
10
|
} from '../translator';
|
|
11
11
|
import { syncMemberExpression } from '../server/getProcesses';
|
|
12
|
+
import { invokeCommand } from '../common';
|
|
12
13
|
|
|
13
14
|
import {
|
|
14
15
|
getFlowAfterElements,
|
|
@@ -1220,6 +1221,10 @@ export class ProcessElementV2 extends BaseNode {
|
|
|
1220
1221
|
get processV2() {
|
|
1221
1222
|
return this.getAncestor('ProcessV2') as ProcessV2;
|
|
1222
1223
|
}
|
|
1224
|
+
|
|
1225
|
+
get isFormProcess() {
|
|
1226
|
+
return this.processV2?.isFormProcess
|
|
1227
|
+
}
|
|
1223
1228
|
// 属于流程自动任务
|
|
1224
1229
|
get isAutoTask() {
|
|
1225
1230
|
return ['ServiceTask'].includes(this.type);
|
|
@@ -1523,6 +1528,24 @@ export class ProcessElementV2 extends BaseNode {
|
|
|
1523
1528
|
return code;
|
|
1524
1529
|
}
|
|
1525
1530
|
|
|
1531
|
+
get subLogic() {
|
|
1532
|
+
// 只有自动任务需要, 其他的UI展示上均在其下面的 Logic 中
|
|
1533
|
+
if (this.type === 'ServiceTask') {
|
|
1534
|
+
const subLogics = this.findNaslNodeByBFS((node: BaseNode) => {
|
|
1535
|
+
if (asserts.isSubLogic(node)) {
|
|
1536
|
+
return true;
|
|
1537
|
+
}
|
|
1538
|
+
});
|
|
1539
|
+
return subLogics;
|
|
1540
|
+
}
|
|
1541
|
+
return [];
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
genActionListener($event: EventPayload): void {
|
|
1545
|
+
super.genActionListener($event);
|
|
1546
|
+
invokeCommand('logic.update', this);
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1526
1549
|
//================================================================================
|
|
1527
1550
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
1528
1551
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
isFromStartNode,
|
|
17
17
|
getFlowBeforeElements,
|
|
18
18
|
} from '../server/getProcesses';
|
|
19
|
+
import { invokeCommand } from '../common';
|
|
19
20
|
import type Namespace from './Namespace__';
|
|
20
21
|
import type View from './View__';
|
|
21
22
|
import Process from './Process__';
|
|
@@ -1722,6 +1723,23 @@ export class ProcessElement extends BaseNode {
|
|
|
1722
1723
|
// });
|
|
1723
1724
|
// this.app.emit('collect:end');
|
|
1724
1725
|
// }
|
|
1726
|
+
get subLogic() {
|
|
1727
|
+
// 只有自动任务需要, 其他的UI展示上均在其下面的 Logic 中
|
|
1728
|
+
if (this.type === 'ServiceTask') {
|
|
1729
|
+
const subLogics = this.findNaslNodeByBFS((node: BaseNode) => {
|
|
1730
|
+
if (asserts.isSubLogic(node)) {
|
|
1731
|
+
return true;
|
|
1732
|
+
}
|
|
1733
|
+
});
|
|
1734
|
+
return subLogics;
|
|
1735
|
+
}
|
|
1736
|
+
return [];
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
genActionListener($event: EventPayload): void {
|
|
1740
|
+
super.genActionListener($event);
|
|
1741
|
+
invokeCommand('logic.update', this);
|
|
1742
|
+
}
|
|
1725
1743
|
//================================================================================
|
|
1726
1744
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
1727
1745
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -739,6 +739,10 @@ export class ProcessV2 extends BaseNode {
|
|
|
739
739
|
return entity;
|
|
740
740
|
}
|
|
741
741
|
|
|
742
|
+
get isFormProcess() {
|
|
743
|
+
return !!this.composedBy?.length
|
|
744
|
+
}
|
|
745
|
+
|
|
742
746
|
onChange($event?: EventPayload): void {
|
|
743
747
|
this.emit('change', $event);
|
|
744
748
|
}
|
|
@@ -1006,65 +1010,6 @@ export class ProcessV2 extends BaseNode {
|
|
|
1006
1010
|
},
|
|
1007
1011
|
],
|
|
1008
1012
|
},
|
|
1009
|
-
{
|
|
1010
|
-
concept: 'ProcessElementV2',
|
|
1011
|
-
name: 'ApprovalTask',
|
|
1012
|
-
type: 'ApprovalTask',
|
|
1013
|
-
title: '审批任务',
|
|
1014
|
-
taskTitle: '审批任务',
|
|
1015
|
-
bindAttrs: [
|
|
1016
|
-
{
|
|
1017
|
-
concept: 'BindAttribute',
|
|
1018
|
-
name: 'assigneeV2',
|
|
1019
|
-
assigneeV2: {
|
|
1020
|
-
concept: 'AssigneeV2',
|
|
1021
|
-
},
|
|
1022
|
-
},
|
|
1023
|
-
],
|
|
1024
|
-
operatePermissions: [
|
|
1025
|
-
{
|
|
1026
|
-
concept: 'OperatePermissionV2',
|
|
1027
|
-
name: 'approve',
|
|
1028
|
-
operationEnabled: true,
|
|
1029
|
-
displayText: '同意',
|
|
1030
|
-
commentRequired: true,
|
|
1031
|
-
},
|
|
1032
|
-
{
|
|
1033
|
-
concept: 'OperatePermissionV2',
|
|
1034
|
-
name: 'reject',
|
|
1035
|
-
operationEnabled: true,
|
|
1036
|
-
displayText: '拒绝',
|
|
1037
|
-
commentRequired: true,
|
|
1038
|
-
},
|
|
1039
|
-
{
|
|
1040
|
-
concept: 'OperatePermissionV2',
|
|
1041
|
-
name: 'reassign',
|
|
1042
|
-
operationEnabled: true,
|
|
1043
|
-
displayText: '转派',
|
|
1044
|
-
commentRequired: false,
|
|
1045
|
-
},
|
|
1046
|
-
{
|
|
1047
|
-
concept: 'OperatePermissionV2',
|
|
1048
|
-
name: 'revert',
|
|
1049
|
-
operationEnabled: true,
|
|
1050
|
-
displayText: '回退',
|
|
1051
|
-
commentRequired: false,
|
|
1052
|
-
},
|
|
1053
|
-
{
|
|
1054
|
-
concept: 'OperatePermissionV2',
|
|
1055
|
-
name: 'withdraw',
|
|
1056
|
-
operationEnabled: true,
|
|
1057
|
-
displayText: '撤回',
|
|
1058
|
-
commentRequired: false,
|
|
1059
|
-
},
|
|
1060
|
-
],
|
|
1061
|
-
approvalPolicy: { concept: 'OrSignPolicyV2' },
|
|
1062
|
-
bounds: {
|
|
1063
|
-
concept: 'Rect',
|
|
1064
|
-
x: 0,
|
|
1065
|
-
y: 150,
|
|
1066
|
-
},
|
|
1067
|
-
},
|
|
1068
1013
|
{
|
|
1069
1014
|
concept: 'ProcessElementV2',
|
|
1070
1015
|
name: 'End',
|
|
@@ -1082,17 +1027,6 @@ export class ProcessV2 extends BaseNode {
|
|
|
1082
1027
|
name: 'SequenceFlow',
|
|
1083
1028
|
type: 'SequenceFlow',
|
|
1084
1029
|
sourceRef: 'Start',
|
|
1085
|
-
targetRef: 'ApprovalTask',
|
|
1086
|
-
waypoints: [
|
|
1087
|
-
{ x: 0, y: 1 },
|
|
1088
|
-
{ x: 0, y: -1 },
|
|
1089
|
-
],
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
concept: 'ProcessElementV2',
|
|
1093
|
-
name: 'SequenceFlow1',
|
|
1094
|
-
type: 'SequenceFlow',
|
|
1095
|
-
sourceRef: 'ApprovalTask',
|
|
1096
1030
|
targetRef: 'End',
|
|
1097
1031
|
waypoints: [
|
|
1098
1032
|
{ x: 0, y: 1 },
|
|
@@ -262,12 +262,12 @@ export class QueryFromExpression extends LogicItem {
|
|
|
262
262
|
|
|
263
263
|
@withSourceMap()
|
|
264
264
|
toNaturalTS(state = createCompilerState()): string {
|
|
265
|
-
const simpleEntityKey = this.
|
|
265
|
+
const simpleEntityKey = this.entityName + 'Entity';
|
|
266
266
|
let code = `FROM(${simpleEntityKey}, ${this.asName || this.entityName} => $`;
|
|
267
267
|
|
|
268
268
|
if (this.joinParts.length) {
|
|
269
269
|
this.joinParts.forEach((joinPart) => {
|
|
270
|
-
code +=
|
|
270
|
+
code += '\n';
|
|
271
271
|
code += joinPart.toNaturalTS(state);
|
|
272
272
|
});
|
|
273
273
|
}
|
|
@@ -466,7 +466,7 @@ export class QueryJoinExpression extends LogicItem {
|
|
|
466
466
|
|
|
467
467
|
@withSourceMap()
|
|
468
468
|
toNaturalTS(state = createCompilerState()): string {
|
|
469
|
-
const simpleEntityKey = this.
|
|
469
|
+
const simpleEntityKey = this.entityName + 'Entity';
|
|
470
470
|
let code = `.${this.joinType}_JOIN(${simpleEntityKey}, ${this.asName || this.entityName} => ON(() => `;
|
|
471
471
|
this.onExpressions.forEach((on) => {
|
|
472
472
|
code += on.toNaturalTS(shiftState(state, code, { inline: true }));
|
|
@@ -475,7 +475,7 @@ export class QueryJoinExpression extends LogicItem {
|
|
|
475
475
|
|
|
476
476
|
if (this.joinParts.length) {
|
|
477
477
|
this.joinParts.forEach((joinPart) => {
|
|
478
|
-
code +=
|
|
478
|
+
code += '\n';
|
|
479
479
|
code += joinPart.toNaturalTS(state);
|
|
480
480
|
});
|
|
481
481
|
}
|
|
@@ -65,19 +65,6 @@ export class StaticString extends BaseNode {
|
|
|
65
65
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
66
66
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
67
67
|
//================================================================================
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* 设置字符串的值
|
|
71
|
-
*/
|
|
72
|
-
setValue(value: string) {
|
|
73
|
-
const object = {
|
|
74
|
-
value,
|
|
75
|
-
};
|
|
76
|
-
this.update({
|
|
77
|
-
...object,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
68
|
/**
|
|
82
69
|
* 祖先 View
|
|
83
70
|
*/
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
TranslatorGenerator,
|
|
10
10
|
indent,
|
|
11
11
|
createDecoratorCode,
|
|
12
|
-
createDescriptionComment,
|
|
13
12
|
} from '../translator';
|
|
13
|
+
import type Namespace from './Namespace__';
|
|
14
14
|
|
|
15
15
|
interface defaultCode {
|
|
16
16
|
code?: string;
|
|
@@ -203,11 +203,7 @@ export class StructureProperty extends BaseNode {
|
|
|
203
203
|
|
|
204
204
|
@withSourceMap()
|
|
205
205
|
toNaturalTS(state = createCompilerState()): string {
|
|
206
|
-
let code =
|
|
207
|
-
if (state.descriptionComment)
|
|
208
|
-
code += createDescriptionComment(state, this, ['label', 'description']);
|
|
209
|
-
|
|
210
|
-
code += this.name;
|
|
206
|
+
let code = this.name;
|
|
211
207
|
if (this.typeAnnotation) {
|
|
212
208
|
code += ': ';
|
|
213
209
|
code += this.typeAnnotation.toNaturalTS(shiftState(state, code, { inline: true }));
|
|
@@ -268,6 +264,19 @@ export class StructureProperty extends BaseNode {
|
|
|
268
264
|
...object,
|
|
269
265
|
});
|
|
270
266
|
}
|
|
267
|
+
|
|
268
|
+
getNamespace() {
|
|
269
|
+
if (this.parentNode && (this.parentNode as Namespace).getNamespace) {
|
|
270
|
+
const parentNamespace = (this.parentNode as Namespace).getNamespace();
|
|
271
|
+
const parentName = this.parentNode.name;
|
|
272
|
+
const arr = [parentNamespace];
|
|
273
|
+
if (this.parentNode.concept !== 'App' && parentName) {
|
|
274
|
+
arr.push(parentName);
|
|
275
|
+
}
|
|
276
|
+
return `${arr.join('.')}.structures`;
|
|
277
|
+
}
|
|
278
|
+
throw new Error('无法获取命名空间,请设置 parentNode!');
|
|
279
|
+
}
|
|
271
280
|
|
|
272
281
|
public static getDefaultOptions() {
|
|
273
282
|
return {
|
|
@@ -291,7 +300,7 @@ export class StructureProperty extends BaseNode {
|
|
|
291
300
|
* 是否可编辑
|
|
292
301
|
* */
|
|
293
302
|
get readonly() {
|
|
294
|
-
return !!this.module || this.isConnector;
|
|
303
|
+
return !!this.module || (this.parentNode as Structure).origin === 'CallQueryComponent' || this.isConnector;
|
|
295
304
|
}
|
|
296
305
|
|
|
297
306
|
//================================================================================
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
withGenerator,
|
|
11
11
|
TranslatorGenerator,
|
|
12
12
|
createDecoratorCode,
|
|
13
|
-
createDescriptionComment,
|
|
14
13
|
} from '../translator';
|
|
15
14
|
import type Namespace from './Namespace__';
|
|
16
15
|
import { CUSTOM_CONNECTOR_EDITABLE_SUFFIX } from './basics/constants';
|
|
@@ -52,12 +51,19 @@ export class Structure extends BaseNode {
|
|
|
52
51
|
@property('concept')
|
|
53
52
|
// @ts-ignore
|
|
54
53
|
readonly concept!: 'Structure';
|
|
54
|
+
|
|
55
55
|
/**
|
|
56
56
|
* 数据结构名称
|
|
57
57
|
*/
|
|
58
58
|
@property()
|
|
59
59
|
name: string = '';
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* 数据结构来源
|
|
63
|
+
*/
|
|
64
|
+
@property()
|
|
65
|
+
origin: 'CallQueryComponent';
|
|
66
|
+
|
|
61
67
|
/**
|
|
62
68
|
* 数据结构描述
|
|
63
69
|
*/
|
|
@@ -517,7 +523,7 @@ export class Structure extends BaseNode {
|
|
|
517
523
|
* 是否可编辑
|
|
518
524
|
* */
|
|
519
525
|
get readonly() {
|
|
520
|
-
return !!this.module || this.isConnector;
|
|
526
|
+
return !!this.module || this.origin === 'CallQueryComponent' || this.isConnector;
|
|
521
527
|
}
|
|
522
528
|
|
|
523
529
|
/* 删除空数据模块 */
|
|
@@ -555,10 +561,7 @@ export class Structure extends BaseNode {
|
|
|
555
561
|
|
|
556
562
|
@withSourceMap()
|
|
557
563
|
toNaturalTS(state = createCompilerState()): string {
|
|
558
|
-
let code =
|
|
559
|
-
if (state.descriptionComment)
|
|
560
|
-
code += createDescriptionComment(state, this, ['description']);
|
|
561
|
-
code = `class ${this.name}`;
|
|
564
|
+
let code = `class ${this.name}`;
|
|
562
565
|
|
|
563
566
|
if (this.typeParams?.length) {
|
|
564
567
|
code += `<${this.typeParams
|
|
@@ -566,11 +569,7 @@ export class Structure extends BaseNode {
|
|
|
566
569
|
.join(', ')}>`;
|
|
567
570
|
}
|
|
568
571
|
|
|
569
|
-
code += ` {`;
|
|
570
|
-
if (state.descriptionComment && this.description)
|
|
571
|
-
code += `/* ${this.description} */`;
|
|
572
|
-
code += '\n';
|
|
573
|
-
|
|
572
|
+
code += ` {\n`;
|
|
574
573
|
// code += `${indent(state.tabSize + 1)}__name: '${this.getNamespace()}.${this.name}';\n`;
|
|
575
574
|
this.properties.forEach((property) => {
|
|
576
575
|
code += indent(state.tabSize + 1);
|