@lcap/nasl 3.5.0-beta.3 → 3.5.0-beta.5
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/out/breakpoint/store/core.js +1 -1
- package/out/breakpoint/store/core.js.map +1 -1
- package/out/common/BaseNode.d.ts +7 -0
- package/out/common/BaseNode.js +15 -2
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +1 -0
- package/out/concepts/AnonymousFunction__.js +34 -16
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +1 -0
- package/out/concepts/Argument__.js +28 -8
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignment__.js +5 -7
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/BatchAssignment__.js +5 -3
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.d.ts +1 -0
- package/out/concepts/BinaryExpression__.js +30 -13
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.js +11 -3
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.js +3 -3
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.js +2 -2
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +1 -0
- package/out/concepts/BooleanLiteral__.js +6 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/BusinessComponent__.d.ts +4 -2
- package/out/concepts/BusinessComponent__.js +128 -89
- package/out/concepts/BusinessComponent__.js.map +1 -1
- package/out/concepts/CallConnector__.d.ts +1 -0
- package/out/concepts/CallConnector__.js +6 -0
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallEvent__.d.ts +4 -0
- package/out/concepts/CallEvent__.js +19 -2
- package/out/concepts/CallEvent__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +1 -0
- package/out/concepts/CallFunction__.js +62 -8
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.js +31 -22
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.js +49 -38
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +2 -0
- package/out/concepts/CallQueryComponent__.js +94 -8
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/DefaultValue__.d.ts +1 -0
- package/out/concepts/DefaultValue__.js +7 -1
- package/out/concepts/DefaultValue__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +1 -1
- package/out/concepts/Destination__.js +34 -22
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +1 -0
- package/out/concepts/EntityProperty__.js +26 -2
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +1 -0
- package/out/concepts/Entity__.js +25 -0
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +1 -0
- package/out/concepts/EnumItem__.js +12 -0
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.d.ts +1 -0
- package/out/concepts/Enum__.js +16 -2
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.d.ts +4 -0
- package/out/concepts/Event__.js +12 -0
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +10 -16
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendType__.js +1 -0
- package/out/concepts/FrontendType__.js.map +1 -1
- package/out/concepts/Identifier__.d.ts +2 -0
- package/out/concepts/Identifier__.js +21 -0
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/JSBlock__.js +1 -1
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +6 -0
- package/out/concepts/LogicItem__.js +11 -1
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.js +24 -23
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.js +5 -5
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.js +1 -1
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.d.ts +1 -0
- package/out/concepts/MemberExpression__.js +13 -3
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/NewComposite__.js +3 -3
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.js +4 -4
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +1 -1
- package/out/concepts/NewMap__.js +6 -5
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/NullLiteral__.d.ts +2 -0
- package/out/concepts/NullLiteral__.js +12 -0
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.d.ts +1 -0
- package/out/concepts/NumericLiteral__.js +7 -1
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.js +4 -2
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/Param__.d.ts +1 -0
- package/out/concepts/Param__.js +41 -0
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +9 -1
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.d.ts +2 -0
- package/out/concepts/QueryAggregateExpression__.js +16 -0
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.d.ts +2 -0
- package/out/concepts/QueryFieldExpression__.js +33 -0
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +2 -0
- package/out/concepts/QueryFromExpression__.js +27 -0
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.d.ts +2 -0
- package/out/concepts/QueryGroupByExpression__.js +13 -1
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +2 -0
- package/out/concepts/QueryJoinExpression__.js +37 -0
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.d.ts +2 -0
- package/out/concepts/QueryLimitExpression__.js +16 -0
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.d.ts +2 -0
- package/out/concepts/QueryOrderByExpression__.js +22 -0
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.d.ts +3 -0
- package/out/concepts/QuerySelectExpression__.js +41 -0
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/SelectMembers__.d.ts +1 -0
- package/out/concepts/SelectMembers__.js +7 -0
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.js +4 -2
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/StringInterpolation__.d.ts +1 -0
- package/out/concepts/StringInterpolation__.js +20 -2
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +1 -0
- package/out/concepts/StringLiteral__.js +21 -1
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +1 -0
- package/out/concepts/StructureProperty__.js +19 -0
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +1 -0
- package/out/concepts/Structure__.js +22 -7
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.js +1 -1
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +1 -0
- package/out/concepts/TypeAnnotation__.js +42 -1
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +2 -1
- package/out/concepts/TypeParam__.js +7 -1
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/Unparsed__.js +1 -1
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/ValidationRule__.js +2 -1
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +1 -0
- package/out/concepts/ViewElement__.js +72 -59
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +2 -1
- package/out/concepts/View__.js +6 -19
- package/out/concepts/View__.js.map +1 -1
- package/out/generator/genBundleFiles.d.ts +1 -0
- package/out/generator/genBundleFiles.js +4 -1
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/natural/genNaturalTS.d.ts +4 -1
- package/out/natural/genNaturalTS.js +38 -1
- package/out/natural/genNaturalTS.js.map +1 -1
- package/out/natural/transformTSCode.js +52 -41
- package/out/natural/transformTSCode.js.map +1 -1
- package/out/server/formatTsUtils.js +10 -9
- package/out/server/formatTsUtils.js.map +1 -1
- package/out/server/getFunctions.js +3 -3
- package/out/server/getFunctions.js.map +1 -1
- package/out/server/getProcesses.js +3 -3
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/naslServer.js +52 -17
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +8 -0
- package/out/server/translator.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genGetBlock.js +2 -1
- package/out/templator/genGetBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +2 -1
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/utils.js +3 -3
- package/out/templator/utils.js.map +1 -1
- package/out/translator/types.d.ts +2 -0
- package/out/translator/utils.d.ts +2 -1
- package/out/translator/utils.js +44 -7
- package/out/translator/utils.js.map +1 -1
- package/out/utils/string.js +2 -2
- package/out/utils/string.js.map +1 -1
- package/out/utils/time-slicing/performance.js +3 -3
- package/out/utils/time-slicing/performance.js.map +1 -1
- package/package.json +2 -2
- package/src/breakpoint/store/core.ts +1 -1
- package/src/common/BaseNode.ts +17 -3
- package/src/concepts/AnonymousFunction__.ts +24 -9
- package/src/concepts/Argument__.ts +28 -6
- package/src/concepts/Assignment__.ts +5 -7
- package/src/concepts/BatchAssignment__.ts +6 -3
- package/src/concepts/BinaryExpression__.ts +30 -13
- package/src/concepts/BindAttribute__.ts +10 -3
- package/src/concepts/BindDirective__.ts +3 -3
- package/src/concepts/BindEvent__.ts +2 -2
- package/src/concepts/BooleanLiteral__.ts +5 -0
- package/src/concepts/BusinessComponent__.ts +144 -100
- package/src/concepts/CallConnector__.ts +5 -0
- package/src/concepts/CallEvent__.ts +20 -3
- package/src/concepts/CallFunction__.ts +54 -8
- package/src/concepts/CallInterface__.ts +31 -24
- package/src/concepts/CallLogic__.ts +48 -37
- package/src/concepts/CallQueryComponent__.ts +101 -8
- package/src/concepts/DefaultValue__.ts +6 -1
- package/src/concepts/Destination__.ts +32 -22
- package/src/concepts/EntityProperty__.ts +30 -2
- package/src/concepts/Entity__.ts +29 -0
- package/src/concepts/EnumItem__.ts +17 -0
- package/src/concepts/Enum__.ts +19 -2
- package/src/concepts/Event__.ts +13 -0
- package/src/concepts/ForEachStatement__.ts +10 -20
- package/src/concepts/FrontendType__.ts +1 -0
- package/src/concepts/Identifier__.ts +19 -0
- package/src/concepts/JSBlock__.ts +1 -1
- package/src/concepts/LogicItem__.ts +13 -1
- package/src/concepts/Logic__.ts +24 -24
- package/src/concepts/MatchCase__.ts +5 -5
- package/src/concepts/Match__.ts +1 -1
- package/src/concepts/MemberExpression__.ts +12 -3
- package/src/concepts/NewComposite__.ts +7 -9
- package/src/concepts/NewList__.ts +4 -4
- package/src/concepts/NewMap__.ts +6 -5
- package/src/concepts/NullLiteral__.ts +10 -0
- package/src/concepts/NumericLiteral__.ts +6 -1
- package/src/concepts/OqlQueryComponent__.ts +4 -2
- package/src/concepts/Param__.ts +39 -0
- package/src/concepts/ProcessElement__.ts +8 -1
- package/src/concepts/QueryAggregateExpression__.ts +15 -0
- package/src/concepts/QueryFieldExpression__.ts +34 -0
- package/src/concepts/QueryFromExpression__.ts +29 -0
- package/src/concepts/QueryGroupByExpression__.ts +11 -1
- package/src/concepts/QueryJoinExpression__.ts +39 -0
- package/src/concepts/QueryLimitExpression__.ts +14 -0
- package/src/concepts/QueryOrderByExpression__.ts +23 -0
- package/src/concepts/QuerySelectExpression__.ts +55 -0
- package/src/concepts/SelectMembers__.ts +7 -0
- package/src/concepts/SqlQueryComponent__.ts +4 -2
- package/src/concepts/StringInterpolation__.ts +18 -2
- package/src/concepts/StringLiteral__.ts +20 -1
- package/src/concepts/StructureProperty__.ts +22 -0
- package/src/concepts/Structure__.ts +24 -7
- package/src/concepts/SwitchCase__.ts +1 -1
- package/src/concepts/TypeAnnotation__.ts +37 -1
- package/src/concepts/TypeParam__.ts +6 -1
- package/src/concepts/Unparsed__.ts +1 -1
- package/src/concepts/ValidationRule__.ts +6 -1
- package/src/concepts/ViewElement__.ts +74 -58
- package/src/concepts/View__.ts +6 -19
- package/src/generator/genBundleFiles.ts +6 -1
- package/src/natural/genNaturalTS.ts +41 -0
- package/src/natural/transformTSCode.ts +50 -42
- package/src/server/formatTsUtils.ts +16 -11
- package/src/server/getFunctions.ts +3 -3
- package/src/server/getProcesses.ts +3 -3
- package/src/server/naslServer.ts +56 -18
- package/src/server/translator.ts +7 -0
- package/src/templator/genCurdEditMultipleKeyBlock.ts +1 -1
- package/src/templator/genGetBlock.ts +2 -1
- package/src/templator/genUpdateBlock.ts +2 -1
- package/src/templator/utils.ts +3 -3
- package/src/translator/types.ts +4 -0
- package/src/translator/utils.ts +73 -34
- package/src/utils/string.ts +2 -2
- package/src/utils/time-slicing/performance.ts +3 -3
- package/test/concepts/call-interface/__snapshots__/getQuickInfoOffset.spec.ts.snap +3 -3
- package/test/concepts/call-interface/__snapshots__/toEmbeddedTS.spec.ts.snap +3 -3
- package/test/concepts/view-element/__snapshots__/toEmbeddedTS.spec.ts.snap +199 -0
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +127 -6
- package/test/concepts/view-element/fixtures/table-data-source-calllogic-with-server-validation.json +2074 -0
- package/test/concepts/view-element/toVue.spec.ts +0 -1
- package/ts-worker/package.json +1 -1
- package/ts-worker/src/index.js +1 -0
|
@@ -308,6 +308,7 @@ function genLoadLogic(getLogic: Logic, nameGroup: NameGroup) {
|
|
|
308
308
|
// 生成修改区块
|
|
309
309
|
export function genUpdateBlock(entity: Entity, oldNode: ViewElement) {
|
|
310
310
|
const likeComponent = oldNode?.likeComponent;
|
|
311
|
+
const isBusinessComponent = likeComponent.concept === 'BusinessComponent';
|
|
311
312
|
const dataSource = entity.parentNode as DataSource;
|
|
312
313
|
const module = dataSource.app;
|
|
313
314
|
const { ns } = entity;
|
|
@@ -357,7 +358,7 @@ export function genUpdateBlock(entity: Entity, oldNode: ViewElement) {
|
|
|
357
358
|
{
|
|
358
359
|
"viewParams": [
|
|
359
360
|
{
|
|
360
|
-
"concept": "Param",
|
|
361
|
+
"concept": "${isBusinessComponent ? 'ParamWithGroup' : 'Param'}",
|
|
361
362
|
"name": "${nameGroup.viewParamId}",
|
|
362
363
|
"typeAnnotation": ${JSON.stringify(NaslCoreTypeAnnotation.Long)}
|
|
363
364
|
}
|
package/src/templator/utils.ts
CHANGED
|
@@ -137,11 +137,11 @@ export function genUniqueQueryNameGroup(
|
|
|
137
137
|
suffix: string = ''
|
|
138
138
|
) {
|
|
139
139
|
const result: NameGroup = {};
|
|
140
|
-
result.viewLogicLoad = view
|
|
141
|
-
result.logic = scope
|
|
140
|
+
result.viewLogicLoad = view?.getLogicUniqueName?.(`load${defaultInView ? '' : capFirstLetter(componentName)}${suffix ? capFirstLetter(suffix) : ''}`);
|
|
141
|
+
result.logic = scope?.getLogicUniqueName?.(
|
|
142
142
|
`load${capFirstLetter(view.name)}${componentName ? capFirstLetter(componentName) : ''}${suffix ? capFirstLetter(suffix) : ''}`
|
|
143
143
|
);
|
|
144
|
-
result.structure = scope
|
|
144
|
+
result.structure = scope?.getStructureUniqueName?.(utils.firstUpperCase(`${result.logic}Structure`));
|
|
145
145
|
return result;
|
|
146
146
|
}
|
|
147
147
|
|
package/src/translator/types.ts
CHANGED
package/src/translator/utils.ts
CHANGED
|
@@ -31,6 +31,8 @@ export function createCompilerState(startCode: string = '', options?: Partial<Tr
|
|
|
31
31
|
export function shiftPosition(pos: Position, code: string = ''): Position {
|
|
32
32
|
const res = { ...pos};
|
|
33
33
|
if (code) {
|
|
34
|
+
if (typeof code !== 'string')
|
|
35
|
+
console.log(code);
|
|
34
36
|
const arr = code.split('\n');
|
|
35
37
|
res.offset += code.length;
|
|
36
38
|
res.line += arr.length - 1;
|
|
@@ -61,7 +63,7 @@ export function isSameRange(rangeA: Range, rangeB : Range) {
|
|
|
61
63
|
/**
|
|
62
64
|
* 翻译方法修饰器
|
|
63
65
|
*
|
|
64
|
-
*
|
|
66
|
+
* 只为 toNaturalTS 用
|
|
65
67
|
* @description 旧的翻译方法修饰器,现在用`withSourceMapGenerator`
|
|
66
68
|
*/
|
|
67
69
|
export function withSourceMap() {
|
|
@@ -72,6 +74,7 @@ export function withSourceMap() {
|
|
|
72
74
|
descriptor.value = function (this: BaseNode, state?: TranslatorState, ...args: any[]) {
|
|
73
75
|
// 重新生成ts代码就先把类型清除掉
|
|
74
76
|
// 注意排查错误的时候,调用了这个方法,就会把节点上缓存的__TypeAnnotation清除
|
|
77
|
+
|
|
75
78
|
try {
|
|
76
79
|
this.__isCorrectTypeAnnotation = false;
|
|
77
80
|
} catch (err) {}
|
|
@@ -79,43 +82,45 @@ export function withSourceMap() {
|
|
|
79
82
|
// 没有状态不生成 SourceMap
|
|
80
83
|
return oldMethod.call(this, state, ...args);
|
|
81
84
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
85
|
+
|
|
86
|
+
// state = Object.freeze(Object.assign({
|
|
87
|
+
// position: { line: 0, character: 0, offset: 0 },
|
|
88
|
+
// tabSize: 0,
|
|
89
|
+
// }, state));
|
|
90
|
+
|
|
91
|
+
let before: string = '';
|
|
92
|
+
if (!state.inline) {
|
|
93
|
+
before = indent((state?.tabSize || 0));
|
|
94
|
+
state = shiftState(state, before);
|
|
95
|
+
} else {
|
|
96
|
+
// state = shiftState(state, before, {
|
|
97
|
+
// inline: undefined,
|
|
98
|
+
// });
|
|
99
|
+
}
|
|
96
100
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
101
|
+
if (isNatural && state.focusedNodePath) {
|
|
102
|
+
const needAddComment = this.nodePath === state.focusedNodePath;
|
|
103
|
+
// if (!needAddComment) {
|
|
104
|
+
// const parts = state.focusedNodePath.split('.');
|
|
105
|
+
// const lastPart = parts.pop();
|
|
106
|
+
// }
|
|
107
|
+
if (needAddComment) {
|
|
108
|
+
const beforeComment = `// 当前位置\n${before}`;
|
|
109
|
+
before += beforeComment;
|
|
110
|
+
state = shiftState(state, beforeComment);
|
|
108
111
|
}
|
|
112
|
+
}
|
|
109
113
|
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
// 调用真实方法, 可能有剩余参数
|
|
115
|
+
// ${(this as any).tsKeyword || '__IDENTIFIER__'}:
|
|
116
|
+
const code = target && this.nodePath === state.blankNodePath ? (this.concept === 'Argument' && args[1] ? `__BLANK__` : '__BLANK__') : oldMethod.call(this, state, ...args);
|
|
112
117
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
state.sourceMap?.set(this, {
|
|
119
|
+
start: state.position,
|
|
120
|
+
end: shiftPosition(state.position, code),
|
|
121
|
+
});
|
|
117
122
|
|
|
118
|
-
|
|
123
|
+
return before + code;
|
|
119
124
|
};
|
|
120
125
|
|
|
121
126
|
return descriptor;
|
|
@@ -160,8 +165,19 @@ export function withSourceMapGenerator(target: any, key: string, descriptor: Pro
|
|
|
160
165
|
const code = yield* oldMethod.call(this, state, ...args);
|
|
161
166
|
yield;
|
|
162
167
|
|
|
168
|
+
const start = {
|
|
169
|
+
...state.position
|
|
170
|
+
};
|
|
171
|
+
if (this.concept === 'BusinessComponent') {
|
|
172
|
+
const lines: string[] = code.split('\n');
|
|
173
|
+
const lineOffset = lines.findIndex((item) => item.startsWith('export class '));
|
|
174
|
+
if (lineOffset) {
|
|
175
|
+
start.line = start.line + lineOffset + 1;
|
|
176
|
+
start.offset = 13;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
163
179
|
state.sourceMap?.set(this, {
|
|
164
|
-
start
|
|
180
|
+
start,
|
|
165
181
|
end: shiftPosition(state.position, code),
|
|
166
182
|
});
|
|
167
183
|
|
|
@@ -222,3 +238,26 @@ export function transfromUnionTypeAnnotation(expTypeAnnotation: TypeAnnotation,
|
|
|
222
238
|
})
|
|
223
239
|
}
|
|
224
240
|
}
|
|
241
|
+
|
|
242
|
+
export function createDecoratorCode<T>(state: TranslatorState, node: T, properties: Array<keyof T>) {
|
|
243
|
+
let code = '@(';
|
|
244
|
+
|
|
245
|
+
for (const prop of properties) {
|
|
246
|
+
const value = node[prop] as any;
|
|
247
|
+
if (value === undefined || value === null) continue;
|
|
248
|
+
|
|
249
|
+
if (properties.length > 1) code += `\n${indent(state.tabSize + 1)}`;
|
|
250
|
+
if (value === true)
|
|
251
|
+
code += `${String(prop)}`;
|
|
252
|
+
else
|
|
253
|
+
code += `${String(prop)} = ${JSON.stringify(value)}`;
|
|
254
|
+
|
|
255
|
+
if (properties.length > 1) code += `,`;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (code === '@(') return '';
|
|
259
|
+
if (properties.length > 1) code += `\n${indent(state.tabSize)}`;
|
|
260
|
+
|
|
261
|
+
code += `)\n${indent(state.tabSize)}`;
|
|
262
|
+
return code;
|
|
263
|
+
}
|
package/src/utils/string.ts
CHANGED
|
@@ -69,11 +69,11 @@ export function unique(
|
|
|
69
69
|
}
|
|
70
70
|
if (Array.isArray(set))
|
|
71
71
|
// return set.includes(_key);
|
|
72
|
-
return set.some((s) => s
|
|
72
|
+
return set.some((s) => s?.toLowerCase?.() === lkey);
|
|
73
73
|
|
|
74
74
|
// return set[_key];
|
|
75
75
|
const keys = Object.keys(set);
|
|
76
|
-
return keys.some((k) => k
|
|
76
|
+
return keys.some((k) => k?.toLowerCase?.() === lkey);
|
|
77
77
|
};
|
|
78
78
|
} else {
|
|
79
79
|
has = (_key: string) => {
|
|
@@ -28,16 +28,16 @@ export class Performance {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
mark(name: string) {
|
|
31
|
-
return performance
|
|
31
|
+
return performance?.mark?.(this.getPerformanceId(name));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
measure(name: string, startMark: string, endMark: string) {
|
|
35
|
-
return performance
|
|
35
|
+
return performance?.measure?.(this.getPerformanceId(name), this.getPerformanceId(startMark), this.getPerformanceId(endMark));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
clearByNames(...names: string[]) {
|
|
39
39
|
for (const name of names) {
|
|
40
|
-
const entry = performance
|
|
40
|
+
const entry = performance?.getEntriesByName?.(this.getPerformanceId(name))[0];
|
|
41
41
|
|
|
42
42
|
if (entry) {
|
|
43
43
|
this.clearEntry(entry);
|
|
@@ -33,7 +33,7 @@ Object {
|
|
|
33
33
|
|
|
34
34
|
exports[`call-interface:getQuickInfoOffset with-body-no-argument 1`] = `
|
|
35
35
|
Object {
|
|
36
|
-
"code": "apis.a123456.interfaces.with_body({param1:
|
|
36
|
+
"code": "apis.a123456.interfaces.with_body({param1:undefined});
|
|
37
37
|
",
|
|
38
38
|
"line": 1,
|
|
39
39
|
"offset": 25,
|
|
@@ -60,7 +60,7 @@ Object {
|
|
|
60
60
|
|
|
61
61
|
exports[`call-interface:getQuickInfoOffset with-headers-no-argument 1`] = `
|
|
62
62
|
Object {
|
|
63
|
-
"code": "apis.a123456.interfaces.with_headers({param1:__IDENTIFIER__, param2:
|
|
63
|
+
"code": "apis.a123456.interfaces.with_headers({param1:__IDENTIFIER__, param2:undefined});
|
|
64
64
|
",
|
|
65
65
|
"line": 1,
|
|
66
66
|
"offset": 25,
|
|
@@ -78,7 +78,7 @@ Object {
|
|
|
78
78
|
|
|
79
79
|
exports[`call-interface:getQuickInfoOffset with-query-no-argument 1`] = `
|
|
80
80
|
Object {
|
|
81
|
-
"code": "apis.a123456.interfaces.with_query({param1:__IDENTIFIER__, param2:
|
|
81
|
+
"code": "apis.a123456.interfaces.with_query({param1:__IDENTIFIER__, param2:undefined});
|
|
82
82
|
",
|
|
83
83
|
"line": 1,
|
|
84
84
|
"offset": 25,
|
|
@@ -28,7 +28,7 @@ exports[`call-interface:toEmbeddedTS with-body-complex-argument 1`] = `
|
|
|
28
28
|
`;
|
|
29
29
|
|
|
30
30
|
exports[`call-interface:toEmbeddedTS with-body-no-argument 1`] = `
|
|
31
|
-
"apis.a123456.interfaces.with_body({ param1:
|
|
31
|
+
"apis.a123456.interfaces.with_body({ param1: undefined });
|
|
32
32
|
"
|
|
33
33
|
`;
|
|
34
34
|
|
|
@@ -50,7 +50,7 @@ exports[`call-interface:toEmbeddedTS with-headers 1`] = `
|
|
|
50
50
|
exports[`call-interface:toEmbeddedTS with-headers-no-argument 1`] = `
|
|
51
51
|
"apis.a123456.interfaces.with_headers({
|
|
52
52
|
param1: __IDENTIFIER__,
|
|
53
|
-
param2:
|
|
53
|
+
param2: undefined,
|
|
54
54
|
});
|
|
55
55
|
"
|
|
56
56
|
`;
|
|
@@ -65,7 +65,7 @@ exports[`call-interface:toEmbeddedTS with-query 1`] = `
|
|
|
65
65
|
exports[`call-interface:toEmbeddedTS with-query-no-argument 1`] = `
|
|
66
66
|
"apis.a123456.interfaces.with_query({
|
|
67
67
|
param1: __IDENTIFIER__,
|
|
68
|
-
param2:
|
|
68
|
+
param2: undefined,
|
|
69
69
|
});
|
|
70
70
|
"
|
|
71
71
|
`;
|
|
@@ -116,6 +116,205 @@ exports[`view-element:toEmbeddedTS default-not-found 1`] = `
|
|
|
116
116
|
"
|
|
117
117
|
`;
|
|
118
118
|
|
|
119
|
+
exports[`view-element:toEmbeddedTS table-data-source-calllogic-with-server-validation 1`] = `
|
|
120
|
+
"new nasl.ui.uLinearLayout({
|
|
121
|
+
name: __elements.uLinearLayout1,
|
|
122
|
+
bindAttr: () => [() => {}, () => {}],
|
|
123
|
+
slotDefault: () => {
|
|
124
|
+
return [
|
|
125
|
+
new nasl.ui.uLinearLayout({
|
|
126
|
+
name: __elements.linear_layout_1,
|
|
127
|
+
bindAttr: () => [() => {}],
|
|
128
|
+
slotDefault: () => {
|
|
129
|
+
type datasourceNametableView_1 = nasl.ui.GetItemTypeFromDataSource<
|
|
130
|
+
typeof app.logics.loadTestTableView_1
|
|
131
|
+
>;
|
|
132
|
+
|
|
133
|
+
return [
|
|
134
|
+
new nasl.ui.uTableView<datasourceNametableView_1>({
|
|
135
|
+
name: __elements.tableView_1,
|
|
136
|
+
bindAttr: () => [
|
|
137
|
+
() => {
|
|
138
|
+
(() => {
|
|
139
|
+
const wrapper = nasl.util.callLogicWithChecker(
|
|
140
|
+
app.logics.loadTestTableView_1,
|
|
141
|
+
(page, size, sort, order, filter) => {
|
|
142
|
+
() => {};
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
return wrapper(
|
|
146
|
+
__elements_completionProperty[\\"tableView_1\\"].pageNumber,
|
|
147
|
+
__elements_completionProperty[\\"tableView_1\\"].pageSize,
|
|
148
|
+
__elements_completionProperty[\\"tableView_1\\"].sorting
|
|
149
|
+
.field,
|
|
150
|
+
__elements_completionProperty[\\"tableView_1\\"].sorting
|
|
151
|
+
.order,
|
|
152
|
+
filter
|
|
153
|
+
);
|
|
154
|
+
})();
|
|
155
|
+
},
|
|
156
|
+
() => {},
|
|
157
|
+
() => {},
|
|
158
|
+
() => {},
|
|
159
|
+
() => {},
|
|
160
|
+
() => {},
|
|
161
|
+
() => {},
|
|
162
|
+
],
|
|
163
|
+
slotDefault: () => {
|
|
164
|
+
return [
|
|
165
|
+
new nasl.ui.uTableViewColumn({
|
|
166
|
+
name: __elements.table_view_column_1,
|
|
167
|
+
bindAttr: () => [() => {}, () => {}],
|
|
168
|
+
slotExpander: (current) => {
|
|
169
|
+
return [
|
|
170
|
+
new nasl.ui.uTableViewExpander({
|
|
171
|
+
name: __elements.table_view_expander_1,
|
|
172
|
+
bindAttr: () => [
|
|
173
|
+
() => {
|
|
174
|
+
current.item;
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
slotDefault: () => {
|
|
178
|
+
return [];
|
|
179
|
+
},
|
|
180
|
+
}),
|
|
181
|
+
];
|
|
182
|
+
},
|
|
183
|
+
slotCell: (current) => {
|
|
184
|
+
return [];
|
|
185
|
+
},
|
|
186
|
+
slotTitle: () => {
|
|
187
|
+
return [
|
|
188
|
+
new nasl.ui.uText({
|
|
189
|
+
name: __elements.text_9,
|
|
190
|
+
bindAttr: () => [() => {}],
|
|
191
|
+
slotDefault: () => {
|
|
192
|
+
return [];
|
|
193
|
+
},
|
|
194
|
+
}),
|
|
195
|
+
];
|
|
196
|
+
},
|
|
197
|
+
}),
|
|
198
|
+
|
|
199
|
+
new nasl.ui.uTableViewColumn({
|
|
200
|
+
name: __elements.table_view_column_2,
|
|
201
|
+
bindAttr: () => [() => {}],
|
|
202
|
+
slotExpander: (current) => {
|
|
203
|
+
return [
|
|
204
|
+
new nasl.ui.uTableViewExpander({
|
|
205
|
+
name: __elements.table_view_expander_2,
|
|
206
|
+
bindAttr: () => [
|
|
207
|
+
() => {
|
|
208
|
+
current.item;
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
slotDefault: () => {
|
|
212
|
+
return [];
|
|
213
|
+
},
|
|
214
|
+
}),
|
|
215
|
+
];
|
|
216
|
+
},
|
|
217
|
+
slotCell: (current) => {
|
|
218
|
+
return [
|
|
219
|
+
new nasl.ui.uLinearLayout({
|
|
220
|
+
name: __elements.linear_layout_4,
|
|
221
|
+
bindAttr: () => [() => {}],
|
|
222
|
+
slotDefault: () => {
|
|
223
|
+
return [
|
|
224
|
+
new nasl.ui.uText({
|
|
225
|
+
name: __elements.text_10,
|
|
226
|
+
bindAttr: () => [
|
|
227
|
+
() => {
|
|
228
|
+
current.item.entity1.createdTime;
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
slotDefault: () => {
|
|
232
|
+
return [];
|
|
233
|
+
},
|
|
234
|
+
}),
|
|
235
|
+
];
|
|
236
|
+
},
|
|
237
|
+
}),
|
|
238
|
+
];
|
|
239
|
+
},
|
|
240
|
+
slotTitle: () => {
|
|
241
|
+
return [
|
|
242
|
+
new nasl.ui.uText({
|
|
243
|
+
name: __elements.text_11,
|
|
244
|
+
bindAttr: () => [() => {}],
|
|
245
|
+
slotDefault: () => {
|
|
246
|
+
return [];
|
|
247
|
+
},
|
|
248
|
+
}),
|
|
249
|
+
];
|
|
250
|
+
},
|
|
251
|
+
}),
|
|
252
|
+
|
|
253
|
+
new nasl.ui.uTableViewColumn({
|
|
254
|
+
name: __elements.table_view_column_3,
|
|
255
|
+
bindAttr: () => [() => {}],
|
|
256
|
+
slotExpander: (current) => {
|
|
257
|
+
return [
|
|
258
|
+
new nasl.ui.uTableViewExpander({
|
|
259
|
+
name: __elements.table_view_expander_3,
|
|
260
|
+
bindAttr: () => [
|
|
261
|
+
() => {
|
|
262
|
+
current.item;
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
slotDefault: () => {
|
|
266
|
+
return [];
|
|
267
|
+
},
|
|
268
|
+
}),
|
|
269
|
+
];
|
|
270
|
+
},
|
|
271
|
+
slotCell: (current) => {
|
|
272
|
+
return [
|
|
273
|
+
new nasl.ui.uLinearLayout({
|
|
274
|
+
name: __elements.linear_layout_5,
|
|
275
|
+
bindAttr: () => [() => {}],
|
|
276
|
+
slotDefault: () => {
|
|
277
|
+
return [
|
|
278
|
+
new nasl.ui.uText({
|
|
279
|
+
name: __elements.text_12,
|
|
280
|
+
bindAttr: () => [
|
|
281
|
+
() => {
|
|
282
|
+
current.item.entity1.updatedTime;
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
slotDefault: () => {
|
|
286
|
+
return [];
|
|
287
|
+
},
|
|
288
|
+
}),
|
|
289
|
+
];
|
|
290
|
+
},
|
|
291
|
+
}),
|
|
292
|
+
];
|
|
293
|
+
},
|
|
294
|
+
slotTitle: () => {
|
|
295
|
+
return [
|
|
296
|
+
new nasl.ui.uText({
|
|
297
|
+
name: __elements.text_13,
|
|
298
|
+
bindAttr: () => [() => {}],
|
|
299
|
+
slotDefault: () => {
|
|
300
|
+
return [];
|
|
301
|
+
},
|
|
302
|
+
}),
|
|
303
|
+
];
|
|
304
|
+
},
|
|
305
|
+
}),
|
|
306
|
+
];
|
|
307
|
+
},
|
|
308
|
+
}),
|
|
309
|
+
];
|
|
310
|
+
},
|
|
311
|
+
}),
|
|
312
|
+
];
|
|
313
|
+
},
|
|
314
|
+
});
|
|
315
|
+
"
|
|
316
|
+
`;
|
|
317
|
+
|
|
119
318
|
exports[`view-element:toEmbeddedTS with-role-auth 1`] = `
|
|
120
319
|
"new nasl.ui.uLinearLayout({
|
|
121
320
|
name: __elements.uLinearLayout1,
|
|
@@ -4,14 +4,14 @@ exports[`view-element:toVue default-login 1`] = `
|
|
|
4
4
|
"<template>
|
|
5
5
|
<u-linear-layout
|
|
6
6
|
:ref=\\"\`uLinearLayout1\`\\"
|
|
7
|
+
:alignment=\\"\`center\`\\"
|
|
8
|
+
:justify=\\"\`center\`\\"
|
|
9
|
+
:type=\\"\`flex\`\\"
|
|
7
10
|
style=\\"
|
|
8
11
|
background: url('/assets/login-bg-1.jpg') no-repeat;
|
|
9
12
|
background-size: cover;
|
|
10
13
|
height: 100vh;
|
|
11
14
|
\\"
|
|
12
|
-
:alignment=\\"\`center\`\\"
|
|
13
|
-
:justify=\\"\`center\`\\"
|
|
14
|
-
:type=\\"\`flex\`\\"
|
|
15
15
|
>
|
|
16
16
|
<u-linear-layout
|
|
17
17
|
:ref=\\"\`uLinearLayout2\`\\"
|
|
@@ -49,10 +49,10 @@ exports[`view-element:toVue default-not-found 1`] = `
|
|
|
49
49
|
"<template>
|
|
50
50
|
<u-linear-layout
|
|
51
51
|
:ref=\\"\`uLinearLayout1\`\\"
|
|
52
|
-
style=\\"height: 100vh\\"
|
|
53
52
|
:justify=\\"\`center\`\\"
|
|
54
53
|
:type=\\"\`flex\`\\"
|
|
55
54
|
:alignment=\\"\`center\`\\"
|
|
55
|
+
style=\\"height: 100vh\\"
|
|
56
56
|
>
|
|
57
57
|
<u-linear-layout
|
|
58
58
|
:ref=\\"\`uLinearLayout2\`\\"
|
|
@@ -88,14 +88,135 @@ exports[`view-element:toVue default-not-found 1`] = `
|
|
|
88
88
|
"
|
|
89
89
|
`;
|
|
90
90
|
|
|
91
|
-
exports[`view-element:toVue with-
|
|
91
|
+
exports[`view-element:toVue table-data-source-calllogic-with-server-validation 1`] = `
|
|
92
92
|
"<template>
|
|
93
93
|
<u-linear-layout
|
|
94
94
|
:ref=\\"\`uLinearLayout1\`\\"
|
|
95
|
+
:type=\\"\`root\`\\"
|
|
96
|
+
:gap=\\"\`none\`\\"
|
|
95
97
|
style=\\"height: 100%; --custom-start: auto; min-height: 200px\\"
|
|
98
|
+
>
|
|
99
|
+
<u-linear-layout
|
|
100
|
+
:ref=\\"\`linear_layout_1\`\\"
|
|
101
|
+
:direction=\\"\`vertical\`\\"
|
|
102
|
+
style=\\"--custom-start: auto\\"
|
|
103
|
+
>
|
|
104
|
+
<u-table-view
|
|
105
|
+
:ref=\\"\`tableView_1\`\\"
|
|
106
|
+
:data-source=\\"__tableView_1_dataSourceLoad\\"
|
|
107
|
+
:data-schema=\\"\`LoadTestTableView_1Structure\`\\"
|
|
108
|
+
:value-field=\\"\`entity1.id\`\\"
|
|
109
|
+
:pagination=\\"true\\"
|
|
110
|
+
:show-sizer=\\"true\\"
|
|
111
|
+
:page-size=\\"20\\"
|
|
112
|
+
:page-number=\\"1\\"
|
|
113
|
+
key=\\"tableView_1\\"
|
|
114
|
+
>
|
|
115
|
+
<u-table-view-column
|
|
116
|
+
:ref=\\"\`table_view_column_1\`\\"
|
|
117
|
+
:type=\\"\`index\`\\"
|
|
118
|
+
:width=\\"\`60\`\\"
|
|
119
|
+
>
|
|
120
|
+
<template #expander=\\"current\\" :ref=\\"\`template_9\`\\">
|
|
121
|
+
<u-table-view-expander
|
|
122
|
+
:ref=\\"\`table_view_expander_1_\${
|
|
123
|
+
(current || {}).__nodeKey || (current || {}).index
|
|
124
|
+
}\`\\"
|
|
125
|
+
:item=\\"(current || {}).item\\"
|
|
126
|
+
></u-table-view-expander>
|
|
127
|
+
</template>
|
|
128
|
+
<template #cell=\\"current\\" :ref=\\"\`template_10\`\\"></template>
|
|
129
|
+
<template #title :ref=\\"\`template_11\`\\">
|
|
130
|
+
<u-text :ref=\\"\`text_9\`\\" :text=\\"\`序号\`\\"></u-text>
|
|
131
|
+
</template>
|
|
132
|
+
</u-table-view-column>
|
|
133
|
+
<u-table-view-column
|
|
134
|
+
:ref=\\"\`table_view_column_2\`\\"
|
|
135
|
+
:field=\\"\`entity1.createdTime\`\\"
|
|
136
|
+
>
|
|
137
|
+
<template #expander=\\"current\\" :ref=\\"\`template_12\`\\">
|
|
138
|
+
<u-table-view-expander
|
|
139
|
+
:ref=\\"\`table_view_expander_2_\${
|
|
140
|
+
(current || {}).__nodeKey || (current || {}).index
|
|
141
|
+
}\`\\"
|
|
142
|
+
:item=\\"(current || {}).item\\"
|
|
143
|
+
></u-table-view-expander>
|
|
144
|
+
</template>
|
|
145
|
+
<template #cell=\\"current\\" :ref=\\"\`template_13\`\\">
|
|
146
|
+
<u-linear-layout
|
|
147
|
+
:ref=\\"\`linear_layout_4_\${
|
|
148
|
+
(current || {}).__nodeKey || (current || {}).index
|
|
149
|
+
}\`\\"
|
|
150
|
+
:gap=\\"\`small\`\\"
|
|
151
|
+
>
|
|
152
|
+
<u-text
|
|
153
|
+
:ref=\\"\`text_10_\${
|
|
154
|
+
(current || {}).__nodeKey || (current || {}).index
|
|
155
|
+
}\`\\"
|
|
156
|
+
:text=\\"
|
|
157
|
+
$utils['ToString'](
|
|
158
|
+
'undefined',
|
|
159
|
+
(((current || {}).item || {}).entity1 || {}).createdTime
|
|
160
|
+
)
|
|
161
|
+
\\"
|
|
162
|
+
></u-text>
|
|
163
|
+
</u-linear-layout>
|
|
164
|
+
</template>
|
|
165
|
+
<template #title :ref=\\"\`template_14\`\\">
|
|
166
|
+
<u-text :ref=\\"\`text_11\`\\" :text=\\"\`创建时间\`\\"></u-text>
|
|
167
|
+
</template>
|
|
168
|
+
</u-table-view-column>
|
|
169
|
+
<u-table-view-column
|
|
170
|
+
:ref=\\"\`table_view_column_3\`\\"
|
|
171
|
+
:field=\\"\`entity1.updatedTime\`\\"
|
|
172
|
+
>
|
|
173
|
+
<template #expander=\\"current\\" :ref=\\"\`template_15\`\\">
|
|
174
|
+
<u-table-view-expander
|
|
175
|
+
:ref=\\"\`table_view_expander_3_\${
|
|
176
|
+
(current || {}).__nodeKey || (current || {}).index
|
|
177
|
+
}\`\\"
|
|
178
|
+
:item=\\"(current || {}).item\\"
|
|
179
|
+
></u-table-view-expander>
|
|
180
|
+
</template>
|
|
181
|
+
<template #cell=\\"current\\" :ref=\\"\`template_16\`\\">
|
|
182
|
+
<u-linear-layout
|
|
183
|
+
:ref=\\"\`linear_layout_5_\${
|
|
184
|
+
(current || {}).__nodeKey || (current || {}).index
|
|
185
|
+
}\`\\"
|
|
186
|
+
:gap=\\"\`small\`\\"
|
|
187
|
+
>
|
|
188
|
+
<u-text
|
|
189
|
+
:ref=\\"\`text_12_\${
|
|
190
|
+
(current || {}).__nodeKey || (current || {}).index
|
|
191
|
+
}\`\\"
|
|
192
|
+
:text=\\"
|
|
193
|
+
$utils['ToString'](
|
|
194
|
+
'undefined',
|
|
195
|
+
(((current || {}).item || {}).entity1 || {}).updatedTime
|
|
196
|
+
)
|
|
197
|
+
\\"
|
|
198
|
+
></u-text>
|
|
199
|
+
</u-linear-layout>
|
|
200
|
+
</template>
|
|
201
|
+
<template #title :ref=\\"\`template_17\`\\">
|
|
202
|
+
<u-text :ref=\\"\`text_13\`\\" :text=\\"\`更新时间\`\\"></u-text>
|
|
203
|
+
</template>
|
|
204
|
+
</u-table-view-column>
|
|
205
|
+
</u-table-view>
|
|
206
|
+
</u-linear-layout>
|
|
207
|
+
</u-linear-layout>
|
|
208
|
+
</template>
|
|
209
|
+
"
|
|
210
|
+
`;
|
|
211
|
+
|
|
212
|
+
exports[`view-element:toVue with-role-auth 1`] = `
|
|
213
|
+
"<template>
|
|
214
|
+
<u-linear-layout
|
|
215
|
+
:ref=\\"\`uLinearLayout1\`\\"
|
|
96
216
|
:type=\\"\`root\`\\"
|
|
97
217
|
:gap=\\"\`none\`\\"
|
|
98
218
|
v-if=\\"$auth.has('/pc/test_2/uLinearLayout1')\\"
|
|
219
|
+
style=\\"height: 100%; --custom-start: auto; min-height: 200px\\"
|
|
99
220
|
>
|
|
100
221
|
<u-router-view :ref=\\"\`router_view1\`\\"></u-router-view>
|
|
101
222
|
</u-linear-layout>
|
|
@@ -107,9 +228,9 @@ exports[`view-element:toVue with-table 1`] = `
|
|
|
107
228
|
"<template>
|
|
108
229
|
<u-linear-layout
|
|
109
230
|
:ref=\\"\`uLinearLayout1\`\\"
|
|
110
|
-
style=\\"height: 100%; --custom-start: auto; min-height: 200px\\"
|
|
111
231
|
:type=\\"\`root\`\\"
|
|
112
232
|
:gap=\\"\`none\`\\"
|
|
233
|
+
style=\\"height: 100%; --custom-start: auto; min-height: 200px\\"
|
|
113
234
|
>
|
|
114
235
|
<u-linear-layout :ref=\\"\`linear_layout1\`\\" :direction=\\"\`vertical\`\\">
|
|
115
236
|
<u-linear-layout :ref=\\"\`linear_layout2\`\\" :justify=\\"\`space-between\`\\">
|