@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
package/src/concepts/View__.ts
CHANGED
|
@@ -54,19 +54,20 @@ import * as utils from '../utils';
|
|
|
54
54
|
import { createUUID } from '../utils/create';
|
|
55
55
|
import * as types from './utils/types';
|
|
56
56
|
import * as asserts from './utils/asserts';
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
import StaticString from './StaticString__';
|
|
59
59
|
import ViewElement from './ViewElement__';
|
|
60
60
|
import Param from './Param__';
|
|
61
61
|
import Variable from './Variable__';
|
|
62
62
|
import Logic from './Logic__';
|
|
63
63
|
import BindEvent from './BindEvent__';
|
|
64
|
+
import Annotatable from './Annotatable__';
|
|
64
65
|
|
|
65
66
|
/**
|
|
66
67
|
* 页面
|
|
67
68
|
*/
|
|
68
69
|
@concept('页面')
|
|
69
|
-
export class View extends
|
|
70
|
+
export class View extends Annotatable {
|
|
70
71
|
/** 类名 */
|
|
71
72
|
static readonly ConceptName: string = 'View';
|
|
72
73
|
/**
|
|
@@ -75,7 +76,7 @@ export class View extends BaseNode {
|
|
|
75
76
|
*/
|
|
76
77
|
static isAbstract: boolean = false;
|
|
77
78
|
/** 继承链 */
|
|
78
|
-
static readonly inheritanceChain: string[] = ['BaseNode'];
|
|
79
|
+
static readonly inheritanceChain: string[] = ['Annotatable', 'BaseNode'];
|
|
79
80
|
|
|
80
81
|
/**
|
|
81
82
|
* 产品概念
|
|
@@ -1528,10 +1529,7 @@ export class View extends BaseNode {
|
|
|
1528
1529
|
cb?: Function;
|
|
1529
1530
|
}) {
|
|
1530
1531
|
const ViewElement = getConceptConstructor('ViewElement');
|
|
1531
|
-
|
|
1532
|
-
const Param = getConceptConstructor('Param');
|
|
1533
|
-
const Variable = getConceptConstructor('Variable');
|
|
1534
|
-
const BindEvent = getConceptConstructor('BindEvent');
|
|
1532
|
+
|
|
1535
1533
|
let template = utils.sliceTagContent(code, 'template');
|
|
1536
1534
|
if (slotTarget) {
|
|
1537
1535
|
template = `<template #${slotTarget}>${template}</template>`;
|
|
@@ -1570,9 +1568,20 @@ export class View extends BaseNode {
|
|
|
1570
1568
|
}
|
|
1571
1569
|
}
|
|
1572
1570
|
}
|
|
1571
|
+
this.mergeDefinitions(code);
|
|
1572
|
+
|
|
1573
|
+
return node;
|
|
1574
|
+
}
|
|
1573
1575
|
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
+
mergeDefinitions(code: string) {
|
|
1577
|
+
const Logic = getConceptConstructor('Logic');
|
|
1578
|
+
const Param = getConceptConstructor('Param');
|
|
1579
|
+
const Variable = getConceptConstructor('Variable');
|
|
1580
|
+
const BindEvent = getConceptConstructor('BindEvent');
|
|
1581
|
+
const definitionStr = utils.sliceTagContent(code, 'definition') || '{}';
|
|
1582
|
+
const definition: any = JSON.parse(definitionStr);
|
|
1583
|
+
// 服务端逻辑
|
|
1584
|
+
if (Array.isArray(definition.logics)) {
|
|
1576
1585
|
definition.logics.forEach((logicOption: any) => {
|
|
1577
1586
|
const logic = Logic.from(
|
|
1578
1587
|
{
|
|
@@ -1650,7 +1659,6 @@ export class View extends BaseNode {
|
|
|
1650
1659
|
}
|
|
1651
1660
|
});
|
|
1652
1661
|
}
|
|
1653
|
-
return node;
|
|
1654
1662
|
}
|
|
1655
1663
|
|
|
1656
1664
|
onChange($event?: EventPayload): void {
|
|
@@ -1739,23 +1747,18 @@ export class View extends BaseNode {
|
|
|
1739
1747
|
const allComponentList: Array<ViewElement & { currentIndex: number }> = [];
|
|
1740
1748
|
this.elementsAttrs(this.elements, componentList, allComponentList, -1);
|
|
1741
1749
|
|
|
1742
|
-
const
|
|
1743
|
-
this.frontend?.i18nInfo?.enabled && this.crumb?.value && this.crumb?.i18nKey ? this.crumb.i18nKey : undefined;
|
|
1750
|
+
const routeMeta = this.getRouteMeta();
|
|
1744
1751
|
|
|
1745
1752
|
const definition = {
|
|
1746
1753
|
params: this.params,
|
|
1747
1754
|
variables: this.variables,
|
|
1748
1755
|
logics: this.logics,
|
|
1749
1756
|
events: this.bindEvents,
|
|
1750
|
-
title: this.title,
|
|
1751
|
-
crumb: this.crumb?.value,
|
|
1752
|
-
crumbI18n,
|
|
1753
|
-
first: this.children.find((child) => child.isIndex)?.name,
|
|
1754
|
-
auth: this.auth ? 'loginAuth' : undefined,
|
|
1755
1757
|
viewBindEvents: this.getViewBindEvents(),
|
|
1756
1758
|
viewExpressions: this.getViewExpressions(),
|
|
1757
1759
|
elements: componentList,
|
|
1758
1760
|
elementsAll: allComponentList,
|
|
1761
|
+
...routeMeta,
|
|
1759
1762
|
};
|
|
1760
1763
|
let code = '';
|
|
1761
1764
|
let mixin = '';
|
|
@@ -1785,8 +1788,7 @@ export class View extends BaseNode {
|
|
|
1785
1788
|
};\n`;
|
|
1786
1789
|
code += keyboardEventMixinCode;
|
|
1787
1790
|
const processDetailFrom: ViewElement = this.getViewProcessForm(),
|
|
1788
|
-
hasProcessDetailFrom = !!processDetailFrom,
|
|
1789
|
-
processV2 = this.getDestinationProcessV2();
|
|
1791
|
+
hasProcessDetailFrom = !!processDetailFrom, processV2 = this.getDestinationProcessV2();
|
|
1790
1792
|
if (hasProcessDetailFrom) {
|
|
1791
1793
|
const processDetailFromMixinCode = `const processDetailFromMixin = {
|
|
1792
1794
|
data() {
|
|
@@ -1862,6 +1864,7 @@ export class View extends BaseNode {
|
|
|
1862
1864
|
|
|
1863
1865
|
const container = document.getElementById('dynamicRenderContainer')
|
|
1864
1866
|
if (!container) return
|
|
1867
|
+
const vmRoot = this
|
|
1865
1868
|
const _self = this
|
|
1866
1869
|
const vm = new Vue({
|
|
1867
1870
|
template: templateProcessDetailFrom,
|
|
@@ -1869,6 +1872,15 @@ export class View extends BaseNode {
|
|
|
1869
1872
|
return {
|
|
1870
1873
|
processDetailFormData: _self.processDetailFormData
|
|
1871
1874
|
}
|
|
1875
|
+
},
|
|
1876
|
+
methods:{
|
|
1877
|
+
// 将vmRoot的方法名包含handleDataSourceLoad的方法挂载到当前vm实例上
|
|
1878
|
+
...Object.keys(vmRoot).reduce((acc, cur) => {
|
|
1879
|
+
if (cur.includes('handleDataSourceLoad')) {
|
|
1880
|
+
acc[cur] = vmRoot[cur]
|
|
1881
|
+
}
|
|
1882
|
+
return acc
|
|
1883
|
+
}, {}),
|
|
1872
1884
|
}
|
|
1873
1885
|
}).$mount()
|
|
1874
1886
|
var parentElement = container.parentNode
|
|
@@ -2062,7 +2074,6 @@ export class View extends BaseNode {
|
|
|
2062
2074
|
}
|
|
2063
2075
|
|
|
2064
2076
|
getDestinationProcessV2Element() {
|
|
2065
|
-
console.log('getDestinationProcessV2Element: ');
|
|
2066
2077
|
const processV2 = this.app?.processV2s || [];
|
|
2067
2078
|
let res: ProcessElementV2;
|
|
2068
2079
|
const isM = (this.frontend as Frontend)?.type === 'h5';
|
|
@@ -2687,7 +2698,7 @@ export class View extends BaseNode {
|
|
|
2687
2698
|
}
|
|
2688
2699
|
|
|
2689
2700
|
findElementByTag(tag: string): ViewElement {
|
|
2690
|
-
return this.elements[0]?.
|
|
2701
|
+
return this.elements[0]?.findElementByTag(tag);
|
|
2691
2702
|
}
|
|
2692
2703
|
|
|
2693
2704
|
findElementByAttr(name: string, value: string): ViewElement {
|
|
@@ -2910,7 +2921,7 @@ export class View extends BaseNode {
|
|
|
2910
2921
|
]);
|
|
2911
2922
|
utils.traverse(
|
|
2912
2923
|
({ node }) => {
|
|
2913
|
-
if (node
|
|
2924
|
+
if (node?.isProcessForm?.()) {
|
|
2914
2925
|
res = node;
|
|
2915
2926
|
}
|
|
2916
2927
|
},
|
|
@@ -2944,6 +2955,15 @@ export class View extends BaseNode {
|
|
|
2944
2955
|
);
|
|
2945
2956
|
return res;
|
|
2946
2957
|
}
|
|
2958
|
+
getRouteMeta() {
|
|
2959
|
+
return {
|
|
2960
|
+
title: this.title,
|
|
2961
|
+
crumb: this.crumb?.value,
|
|
2962
|
+
crumbI18n: this.frontend?.i18nInfo?.enabled && this.crumb?.i18nKey ? this.crumb?.i18nKey : undefined,
|
|
2963
|
+
first: this.children.find((child) => child.isIndex)?.name,
|
|
2964
|
+
auth: this.auth ? 'loginAuth' : undefined,
|
|
2965
|
+
};
|
|
2966
|
+
}
|
|
2947
2967
|
|
|
2948
2968
|
//================================================================================
|
|
2949
2969
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
@@ -3446,6 +3466,99 @@ export const ComponentCompletionPropertyMap: Record<string, any> = {
|
|
|
3446
3466
|
label: '数据',
|
|
3447
3467
|
},
|
|
3448
3468
|
},
|
|
3469
|
+
// react-pc
|
|
3470
|
+
Table: {
|
|
3471
|
+
current: {
|
|
3472
|
+
prop: 'pageNumber',
|
|
3473
|
+
label: '当前页数',
|
|
3474
|
+
},
|
|
3475
|
+
pageSize: {
|
|
3476
|
+
prop: 'pageSize',
|
|
3477
|
+
label: '分页大小',
|
|
3478
|
+
},
|
|
3479
|
+
sorter: {
|
|
3480
|
+
prop: 'sorting',
|
|
3481
|
+
label: '排序属性',
|
|
3482
|
+
},
|
|
3483
|
+
data: {
|
|
3484
|
+
prop: 'dataSource',
|
|
3485
|
+
state: 'currentData',
|
|
3486
|
+
label: '数据',
|
|
3487
|
+
},
|
|
3488
|
+
},
|
|
3489
|
+
List: {
|
|
3490
|
+
current: {
|
|
3491
|
+
prop: 'pageNumber',
|
|
3492
|
+
state: 'paging?.number',
|
|
3493
|
+
label: '当前页数',
|
|
3494
|
+
},
|
|
3495
|
+
pageSize: {
|
|
3496
|
+
prop: 'pageSize',
|
|
3497
|
+
state: 'paging?.size',
|
|
3498
|
+
label: '分页大小',
|
|
3499
|
+
},
|
|
3500
|
+
filterText: {
|
|
3501
|
+
prop: 'filterText',
|
|
3502
|
+
state: 'filterText',
|
|
3503
|
+
label: '过滤文本',
|
|
3504
|
+
},
|
|
3505
|
+
},
|
|
3506
|
+
Radios: {
|
|
3507
|
+
value: {
|
|
3508
|
+
prop: 'value',
|
|
3509
|
+
state: 'value',
|
|
3510
|
+
label: '选中值',
|
|
3511
|
+
},
|
|
3512
|
+
data: {
|
|
3513
|
+
prop: 'dataSource',
|
|
3514
|
+
state: 'currentDataSource?.data',
|
|
3515
|
+
label: '数据',
|
|
3516
|
+
},
|
|
3517
|
+
},
|
|
3518
|
+
CheckboxGroup: {
|
|
3519
|
+
value: {
|
|
3520
|
+
prop: 'value',
|
|
3521
|
+
label: '选中值',
|
|
3522
|
+
},
|
|
3523
|
+
data: {
|
|
3524
|
+
prop: 'dataSource',
|
|
3525
|
+
label: '数据',
|
|
3526
|
+
},
|
|
3527
|
+
},
|
|
3528
|
+
Select: {
|
|
3529
|
+
value: {
|
|
3530
|
+
prop: 'value',
|
|
3531
|
+
label: '选中值',
|
|
3532
|
+
},
|
|
3533
|
+
data: {
|
|
3534
|
+
prop: 'dataSource',
|
|
3535
|
+
label: '数据',
|
|
3536
|
+
},
|
|
3537
|
+
opened: {
|
|
3538
|
+
prop: 'opened',
|
|
3539
|
+
label: '弹出状态',
|
|
3540
|
+
},
|
|
3541
|
+
},
|
|
3542
|
+
Cascader: {
|
|
3543
|
+
value: {
|
|
3544
|
+
prop: 'value',
|
|
3545
|
+
label: '选中值',
|
|
3546
|
+
},
|
|
3547
|
+
data: {
|
|
3548
|
+
prop: 'dataSource',
|
|
3549
|
+
label: '数据',
|
|
3550
|
+
},
|
|
3551
|
+
},
|
|
3552
|
+
Tree: {
|
|
3553
|
+
value: {
|
|
3554
|
+
prop: 'value',
|
|
3555
|
+
label: '选中值',
|
|
3556
|
+
},
|
|
3557
|
+
data: {
|
|
3558
|
+
prop: 'dataSource',
|
|
3559
|
+
label: '数据',
|
|
3560
|
+
},
|
|
3561
|
+
},
|
|
3449
3562
|
};
|
|
3450
3563
|
|
|
3451
3564
|
export const FrontendTypeComponentNamePerfixMap: Record<string, string> = {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import Namespace from '../../Namespace__';
|
|
2
2
|
import type Structure from '../../Structure__';
|
|
3
3
|
import type TypeAnnotation from '../../TypeAnnotation__';
|
|
4
|
+
import type Enum from '../../Enum__';
|
|
4
5
|
import { reference2TypeAnnotationList } from './reference2TypeAnnotationList';
|
|
5
6
|
import { getConceptConstructor } from '../../../decorators';
|
|
6
7
|
|
|
7
8
|
export const processV2Structures: Structure[] = [];
|
|
9
|
+
export const processV2Enums: Enum[] = [];
|
|
8
10
|
export const processV2TypeList: Array<TypeAnnotation> = [];
|
|
9
11
|
|
|
10
12
|
const processV2Namespace = new Namespace({
|
|
@@ -27,6 +29,9 @@ export function initialize() {
|
|
|
27
29
|
const ProcessComponent = getConceptConstructor('ProcessComponent');
|
|
28
30
|
const Attribute = getConceptConstructor('Attribute');
|
|
29
31
|
const UseComponent = getConceptConstructor('UseComponent');
|
|
32
|
+
const Enum = getConceptConstructor('Enum');
|
|
33
|
+
const EnumItem = getConceptConstructor('EnumItem');
|
|
34
|
+
const StaticString = getConceptConstructor('StaticString');
|
|
30
35
|
|
|
31
36
|
processV2Structures.push(
|
|
32
37
|
new Structure({
|
|
@@ -37,7 +42,7 @@ export function initialize() {
|
|
|
37
42
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
38
43
|
}),
|
|
39
44
|
new StructureProperty({
|
|
40
|
-
name: '
|
|
45
|
+
name: 'currNodeParticipants',
|
|
41
46
|
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
42
47
|
typeArguments: [TypeAnnotation.createPrimitive('String')],
|
|
43
48
|
}),
|
|
@@ -627,7 +632,7 @@ export function initialize() {
|
|
|
627
632
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
628
633
|
}),
|
|
629
634
|
new Param({
|
|
630
|
-
name: '
|
|
635
|
+
name: 'comment',
|
|
631
636
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
632
637
|
}),
|
|
633
638
|
],
|
|
@@ -649,7 +654,7 @@ export function initialize() {
|
|
|
649
654
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
650
655
|
}),
|
|
651
656
|
new Param({
|
|
652
|
-
name: '
|
|
657
|
+
name: 'comment',
|
|
653
658
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
654
659
|
}),
|
|
655
660
|
],
|
|
@@ -800,6 +805,21 @@ export function initialize() {
|
|
|
800
805
|
],
|
|
801
806
|
returns: [],
|
|
802
807
|
}),
|
|
808
|
+
new Logic({
|
|
809
|
+
name: 'addSignTask',
|
|
810
|
+
description: '加签',
|
|
811
|
+
params: [
|
|
812
|
+
new Param({
|
|
813
|
+
name: 'taskId',
|
|
814
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
815
|
+
}),
|
|
816
|
+
new Param({
|
|
817
|
+
name: 'userForAddSign',
|
|
818
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
819
|
+
}),
|
|
820
|
+
],
|
|
821
|
+
returns: [],
|
|
822
|
+
}),
|
|
803
823
|
new Logic({
|
|
804
824
|
name: 'terminateProcess',
|
|
805
825
|
description: '终止',
|
|
@@ -931,6 +951,39 @@ export function initialize() {
|
|
|
931
951
|
}),
|
|
932
952
|
];
|
|
933
953
|
|
|
954
|
+
// 新增枚举
|
|
955
|
+
const enums = [
|
|
956
|
+
Enum.from(
|
|
957
|
+
{
|
|
958
|
+
name: 'ProcInstStatusEnum',
|
|
959
|
+
label: '流程实例当前状态',
|
|
960
|
+
description: '流程实例当前状态',
|
|
961
|
+
valueType: {
|
|
962
|
+
concept: 'TypeAnnotation',
|
|
963
|
+
typeKind: 'primitive',
|
|
964
|
+
typeNamespace: 'nasl.core',
|
|
965
|
+
typeName: 'String',
|
|
966
|
+
},
|
|
967
|
+
enumItems: [
|
|
968
|
+
new EnumItem({
|
|
969
|
+
label: new StaticString({ value: '审批结束' }),
|
|
970
|
+
value: 'Approved',
|
|
971
|
+
}),
|
|
972
|
+
new EnumItem({
|
|
973
|
+
label: new StaticString({ value: '审批中' }),
|
|
974
|
+
value: 'Approving',
|
|
975
|
+
}),
|
|
976
|
+
],
|
|
977
|
+
},
|
|
978
|
+
processV2Namespace,
|
|
979
|
+
'enums'
|
|
980
|
+
),
|
|
981
|
+
];
|
|
982
|
+
processV2Enums.push(...enums);
|
|
983
|
+
processV2TypeList.push(...reference2TypeAnnotationList(processV2Enums, 'nasl.processV2.enums'));
|
|
984
|
+
|
|
934
985
|
logics.forEach((logic) => processV2Namespace.addLogic(logic));
|
|
935
986
|
processComponents.forEach((item) => processV2Namespace.addProcessComponent(item));
|
|
987
|
+
|
|
988
|
+
processV2Structures.forEach((structure) => structure.parentNode = processV2Namespace);
|
|
936
989
|
}
|
|
@@ -20,7 +20,7 @@ export { configurationEnums, configurationTypeList } from '../stdlib/nasl.config
|
|
|
20
20
|
export { authStructures, authTypeList } from '../stdlib/nasl.auth';
|
|
21
21
|
export { httpStructures, httpTypeList } from '../stdlib/nasl.http';
|
|
22
22
|
export { processStructures, processTypeList } from '../stdlib/nasl.process';
|
|
23
|
-
export { processV2Structures, processV2TypeList } from '../stdlib/nasl.processV2';
|
|
23
|
+
export { processV2Structures, processV2Enums, processV2TypeList } from '../stdlib/nasl.processV2';
|
|
24
24
|
export { uiStructures, uiTypeList } from '../stdlib/nasl.ui';
|
|
25
25
|
export { interfaceTypeList } from '../stdlib/nasl.interface';
|
|
26
26
|
export { interfaceStructures } from '../stdlib/nasl.interface';
|
package/src/concepts/index__.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export * from './Annotation__';
|
|
2
|
+
export * from './AnnotationProperty__';
|
|
3
|
+
export * from './Annotatable__';
|
|
4
|
+
export * from './ApplyAnnotation__';
|
|
1
5
|
export * from './App__';
|
|
2
6
|
export * from './Module__';
|
|
3
7
|
export * from './Namespace__';
|
|
@@ -58,6 +62,7 @@ export * from './BackendVariable__';
|
|
|
58
62
|
export * from './FrontendVariable__';
|
|
59
63
|
export * from './Constant__';
|
|
60
64
|
export * from './LogicItem__';
|
|
65
|
+
export * from './SubLogic__';
|
|
61
66
|
export * from './Function__';
|
|
62
67
|
export * from './AnonymousFunction__';
|
|
63
68
|
export * from './ImportedInterface__';
|
|
@@ -161,6 +166,10 @@ export * from './FieldPermissionV2__';
|
|
|
161
166
|
export * from './ProcessElementV2__';
|
|
162
167
|
export * from './OperatePermissionV2__';
|
|
163
168
|
export * from './AssigneeV2__';
|
|
169
|
+
export * from './DepartmentV2__';
|
|
170
|
+
export * from './ManagerV2__';
|
|
171
|
+
export * from './DirectManagerV2__';
|
|
172
|
+
export * from './DepartmentManagerV2__';
|
|
164
173
|
export * from './FlowConditionV2__';
|
|
165
174
|
export * from './ApprovalPolicyV2__';
|
|
166
175
|
export * from './SequentialPolicyV2__';
|