@lcap/nasl-concepts 4.3.0-beta.1 → 4.3.0-beta.10

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.
Files changed (155) hide show
  1. package/out/common/BaseNode.d.ts +3 -1
  2. package/out/common/BaseNode.d.ts.map +1 -1
  3. package/out/common/BaseNode.js +10 -14
  4. package/out/common/BaseNode.js.map +1 -1
  5. package/out/concepts/AbstractValidation__.d.ts +43 -0
  6. package/out/concepts/AbstractValidation__.d.ts.map +1 -0
  7. package/out/concepts/AbstractValidation__.js +91 -0
  8. package/out/concepts/AbstractValidation__.js.map +1 -0
  9. package/out/concepts/BindAttribute__.d.ts +46 -46
  10. package/out/concepts/BindAttribute__.d.ts.map +1 -1
  11. package/out/concepts/BindAttribute__.js +42 -39
  12. package/out/concepts/BindAttribute__.js.map +1 -1
  13. package/out/concepts/BindEvent__.d.ts.map +1 -1
  14. package/out/concepts/BindEvent__.js +6 -1
  15. package/out/concepts/BindEvent__.js.map +1 -1
  16. package/out/concepts/BindStyle__.d.ts +1 -1
  17. package/out/concepts/BindStyle__.d.ts.map +1 -1
  18. package/out/concepts/BusinessComponent__.d.ts +3 -2
  19. package/out/concepts/BusinessComponent__.d.ts.map +1 -1
  20. package/out/concepts/BusinessComponent__.js +11 -0
  21. package/out/concepts/BusinessComponent__.js.map +1 -1
  22. package/out/concepts/CallConnector__.d.ts.map +1 -1
  23. package/out/concepts/CallConnector__.js +4 -2
  24. package/out/concepts/CallConnector__.js.map +1 -1
  25. package/out/concepts/CallFunction__.d.ts.map +1 -1
  26. package/out/concepts/CallFunction__.js +10 -0
  27. package/out/concepts/CallFunction__.js.map +1 -1
  28. package/out/concepts/CallLogic__.d.ts.map +1 -1
  29. package/out/concepts/CallLogic__.js +10 -0
  30. package/out/concepts/CallLogic__.js.map +1 -1
  31. package/out/concepts/ConnectorLogic__.d.ts +1 -0
  32. package/out/concepts/ConnectorLogic__.d.ts.map +1 -1
  33. package/out/concepts/ConnectorLogic__.js +6 -0
  34. package/out/concepts/ConnectorLogic__.js.map +1 -1
  35. package/out/concepts/DataSource__.d.ts.map +1 -1
  36. package/out/concepts/DataSource__.js +10 -2
  37. package/out/concepts/DataSource__.js.map +1 -1
  38. package/out/concepts/Directory__.d.ts +1 -0
  39. package/out/concepts/Directory__.d.ts.map +1 -1
  40. package/out/concepts/Directory__.js +9 -1
  41. package/out/concepts/Directory__.js.map +1 -1
  42. package/out/concepts/FrontendType__.d.ts +92 -0
  43. package/out/concepts/FrontendType__.d.ts.map +1 -1
  44. package/out/concepts/FrontendType__.js +127 -13
  45. package/out/concepts/FrontendType__.js.map +1 -1
  46. package/out/concepts/JSBlock__.d.ts.map +1 -1
  47. package/out/concepts/JSBlock__.js +12 -0
  48. package/out/concepts/JSBlock__.js.map +1 -1
  49. package/out/concepts/LogicDeclaration__.d.ts +8 -0
  50. package/out/concepts/LogicDeclaration__.d.ts.map +1 -1
  51. package/out/concepts/LogicDeclaration__.js +14 -0
  52. package/out/concepts/LogicDeclaration__.js.map +1 -1
  53. package/out/concepts/LogicItem__.d.ts +1 -1
  54. package/out/concepts/LogicItem__.d.ts.map +1 -1
  55. package/out/concepts/LogicItem__.js.map +1 -1
  56. package/out/concepts/Logic__.d.ts +10 -1
  57. package/out/concepts/Logic__.d.ts.map +1 -1
  58. package/out/concepts/Logic__.js +28 -8
  59. package/out/concepts/Logic__.js.map +1 -1
  60. package/out/concepts/Match__.d.ts.map +1 -1
  61. package/out/concepts/Match__.js +10 -0
  62. package/out/concepts/Match__.js.map +1 -1
  63. package/out/concepts/McpInterface__.js +2 -2
  64. package/out/concepts/McpInterface__.js.map +1 -1
  65. package/out/concepts/MetadataType__.d.ts +46 -46
  66. package/out/concepts/MetadataType__.d.ts.map +1 -1
  67. package/out/concepts/MetadataType__.js +36 -35
  68. package/out/concepts/MetadataType__.js.map +1 -1
  69. package/out/concepts/NewComposite__.d.ts +1 -1
  70. package/out/concepts/NewComposite__.d.ts.map +1 -1
  71. package/out/concepts/NewComposite__.js +10 -0
  72. package/out/concepts/NewComposite__.js.map +1 -1
  73. package/out/concepts/NewList__.d.ts.map +1 -1
  74. package/out/concepts/NewList__.js +10 -0
  75. package/out/concepts/NewList__.js.map +1 -1
  76. package/out/concepts/NewMap__.d.ts.map +1 -1
  77. package/out/concepts/NewMap__.js +10 -0
  78. package/out/concepts/NewMap__.js.map +1 -1
  79. package/out/concepts/NewRegex__.d.ts +56 -0
  80. package/out/concepts/NewRegex__.d.ts.map +1 -0
  81. package/out/concepts/NewRegex__.js +148 -0
  82. package/out/concepts/NewRegex__.js.map +1 -0
  83. package/out/concepts/NewStructure__.d.ts.map +1 -1
  84. package/out/concepts/NewStructure__.js +10 -0
  85. package/out/concepts/NewStructure__.js.map +1 -1
  86. package/out/concepts/ReferredDefinition__.d.ts +6 -1
  87. package/out/concepts/ReferredDefinition__.d.ts.map +1 -1
  88. package/out/concepts/ReferredDefinition__.js +41 -1
  89. package/out/concepts/ReferredDefinition__.js.map +1 -1
  90. package/out/concepts/SubLogic__.d.ts.map +1 -1
  91. package/out/concepts/SubLogic__.js +4 -1
  92. package/out/concepts/SubLogic__.js.map +1 -1
  93. package/out/concepts/TypeAnnotation__.d.ts +10 -1
  94. package/out/concepts/TypeAnnotation__.d.ts.map +1 -1
  95. package/out/concepts/TypeAnnotation__.js +14 -0
  96. package/out/concepts/TypeAnnotation__.js.map +1 -1
  97. package/out/concepts/ValidationLogic__.d.ts +44 -0
  98. package/out/concepts/ValidationLogic__.d.ts.map +1 -0
  99. package/out/concepts/ValidationLogic__.js +159 -0
  100. package/out/concepts/ValidationLogic__.js.map +1 -0
  101. package/out/concepts/ValidationRule__.d.ts +2 -10
  102. package/out/concepts/ValidationRule__.d.ts.map +1 -1
  103. package/out/concepts/ValidationRule__.js +3 -22
  104. package/out/concepts/ValidationRule__.js.map +1 -1
  105. package/out/concepts/Variable__.d.ts +1 -0
  106. package/out/concepts/Variable__.d.ts.map +1 -1
  107. package/out/concepts/Variable__.js +7 -0
  108. package/out/concepts/Variable__.js.map +1 -1
  109. package/out/concepts/ViewElement__.d.ts.map +1 -1
  110. package/out/concepts/ViewElement__.js +33 -16
  111. package/out/concepts/ViewElement__.js.map +1 -1
  112. package/out/concepts/View__.d.ts +97 -2
  113. package/out/concepts/View__.d.ts.map +1 -1
  114. package/out/concepts/View__.js +213 -47
  115. package/out/concepts/View__.js.map +1 -1
  116. package/out/concepts/basics/stdlib/nasl.error.d.ts.map +1 -1
  117. package/out/concepts/basics/stdlib/nasl.error.js +25 -0
  118. package/out/concepts/basics/stdlib/nasl.error.js.map +1 -1
  119. package/out/concepts/basics/stdlib/nasl.util.d.ts.map +1 -1
  120. package/out/concepts/basics/stdlib/nasl.util.js +45 -2
  121. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  122. package/out/concepts/index__.d.ts +3 -0
  123. package/out/concepts/index__.d.ts.map +1 -1
  124. package/out/concepts/index__.js +3 -0
  125. package/out/concepts/index__.js.map +1 -1
  126. package/out/concepts/utils/asserts.d.ts +128 -0
  127. package/out/concepts/utils/asserts.d.ts.map +1 -1
  128. package/out/concepts/utils/asserts.js +189 -15
  129. package/out/concepts/utils/asserts.js.map +1 -1
  130. package/out/concepts/utils/types.d.ts +13 -2
  131. package/out/concepts/utils/types.d.ts.map +1 -1
  132. package/out/semantics/semanticData.d.ts.map +1 -1
  133. package/out/semantics/semanticData.js +10 -4
  134. package/out/semantics/semanticData.js.map +1 -1
  135. package/out/service/engine.js +3 -3
  136. package/out/service/engine.js.map +1 -1
  137. package/out/service/formatTsUtils.d.ts +1 -1
  138. package/out/service/formatTsUtils.d.ts.map +1 -1
  139. package/out/service/getExtensionModules.d.ts.map +1 -1
  140. package/out/service/getExtensionModules.js +2 -1
  141. package/out/service/getExtensionModules.js.map +1 -1
  142. package/out/service/getLogics.d.ts +2 -2
  143. package/out/service/getLogics.d.ts.map +1 -1
  144. package/out/service/getLogics.js +132 -4
  145. package/out/service/getLogics.js.map +1 -1
  146. package/out/service/getMemberIdentifier.d.ts.map +1 -1
  147. package/out/service/getMemberIdentifier.js +63 -19
  148. package/out/service/getMemberIdentifier.js.map +1 -1
  149. package/out/service/node-concept-predicate.d.ts.map +1 -1
  150. package/out/service/node-concept-predicate.js +1 -1
  151. package/out/service/node-concept-predicate.js.map +1 -1
  152. package/out/utils/bak-translator/composition.d.ts.map +1 -1
  153. package/out/utils/bak-translator/composition.js +3 -1
  154. package/out/utils/bak-translator/composition.js.map +1 -1
  155. package/package.json +4 -5
@@ -44,6 +44,7 @@ const removedViewElementCache = {};
44
44
  const store_1 = require("../store");
45
45
  const semanticData_1 = require("../semantics/semanticData");
46
46
  const decorators_1 = require("../decorators");
47
+ const decorators_2 = require("../decorators");
47
48
  const utils = __importStar(require("../utils"));
48
49
  const asserts = __importStar(require("./utils/asserts"));
49
50
  const Annotatable__1 = __importDefault(require("./Annotatable__"));
@@ -99,6 +100,10 @@ let View = class View extends Annotatable__1.default {
99
100
  * 页面列表
100
101
  */
101
102
  this.children = [];
103
+ /**
104
+ * 文件夹列表
105
+ */
106
+ this.directories = [];
102
107
  this.existingViewElement = new Set();
103
108
  /**
104
109
  * 获取当前页面下所有elements上bindEvents下的logic
@@ -186,7 +191,7 @@ let View = class View extends Annotatable__1.default {
186
191
  _insertViewElementAt(options, index) {
187
192
  const viewElementOptions = {};
188
193
  const relationOptions = { parentNode: this, parentKey: 'elements' };
189
- const ViewElement = (0, decorators_1.getConceptConstructor)('ViewElement');
194
+ const ViewElement = (0, decorators_2.getConceptConstructor)('ViewElement');
190
195
  let viewElement;
191
196
  if (!options) {
192
197
  viewElement = ViewElement.from({
@@ -243,7 +248,7 @@ let View = class View extends Annotatable__1.default {
243
248
  _insertParamAt(options, index) {
244
249
  const paramOptions = {};
245
250
  const relationOptions = { parentNode: this, parentKey: 'params' };
246
- const Param = (0, decorators_1.getConceptConstructor)('Param');
251
+ const Param = (0, decorators_2.getConceptConstructor)('Param');
247
252
  let param;
248
253
  if (!options) {
249
254
  param = Param.from({
@@ -300,7 +305,7 @@ let View = class View extends Annotatable__1.default {
300
305
  _insertVariableAt(options, index) {
301
306
  const variableOptions = {};
302
307
  const relationOptions = { parentNode: this, parentKey: 'variables' };
303
- const Variable = (0, decorators_1.getConceptConstructor)('Variable');
308
+ const Variable = (0, decorators_2.getConceptConstructor)('Variable');
304
309
  let variable;
305
310
  if (!options) {
306
311
  variable = Variable.from({
@@ -357,7 +362,7 @@ let View = class View extends Annotatable__1.default {
357
362
  _insertLogicAt(options, index) {
358
363
  const logicOptions = {};
359
364
  const relationOptions = { parentNode: this, parentKey: 'logics' };
360
- const Logic = (0, decorators_1.getConceptConstructor)('Logic');
365
+ const Logic = (0, decorators_2.getConceptConstructor)('Logic');
361
366
  let logic;
362
367
  if (!options) {
363
368
  logic = Logic.from({
@@ -418,7 +423,7 @@ let View = class View extends Annotatable__1.default {
418
423
  _insertBindEventAt(options, index) {
419
424
  const bindEventOptions = {};
420
425
  const relationOptions = { parentNode: this, parentKey: 'bindEvents' };
421
- const BindEvent = (0, decorators_1.getConceptConstructor)('BindEvent');
426
+ const BindEvent = (0, decorators_2.getConceptConstructor)('BindEvent');
422
427
  let bindEvent;
423
428
  if (!options) {
424
429
  bindEvent = BindEvent.from({
@@ -479,7 +484,7 @@ let View = class View extends Annotatable__1.default {
479
484
  _insertViewAt(options, index) {
480
485
  const viewOptions = {};
481
486
  const relationOptions = { parentNode: this, parentKey: 'children' };
482
- const View = (0, decorators_1.getConceptConstructor)('View');
487
+ const View = (0, decorators_2.getConceptConstructor)('View');
483
488
  let view;
484
489
  if (!options) {
485
490
  view = View.from({
@@ -530,6 +535,67 @@ let View = class View extends Annotatable__1.default {
530
535
  });
531
536
  return node;
532
537
  }
538
+ getDirectoryExistingNames(excludedList = []) {
539
+ const excludedSet = new Set(excludedList);
540
+ return (this.directories || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
541
+ }
542
+ getDirectoryUniqueName(name = 'newfolder1') {
543
+ return utils.unique(name, this.getDirectoryExistingNames(), undefined, true);
544
+ }
545
+ _insertDirectoryAt(options, index) {
546
+ const directoryOptions = {};
547
+ const relationOptions = { parentNode: this, parentKey: 'directories' };
548
+ const Directory = (0, decorators_2.getConceptConstructor)('Directory');
549
+ let directory;
550
+ if (!options) {
551
+ directory = Directory.from({
552
+ ...directoryOptions,
553
+ name: this.getDirectoryUniqueName(),
554
+ }, this, 'directories');
555
+ }
556
+ else if (typeof options === 'string') {
557
+ directory = Directory.from({
558
+ ...directoryOptions,
559
+ name: options,
560
+ }, this, 'directories');
561
+ }
562
+ else if (asserts.isDirectory(options)) {
563
+ options.ensureDelete(); // 同一实例不支持多处存在
564
+ directory = options;
565
+ Object.assign(directory, relationOptions);
566
+ }
567
+ else {
568
+ directory = Directory.from({
569
+ ...directoryOptions,
570
+ ...options,
571
+ }, this, 'directories');
572
+ }
573
+ this.directories.splice(index, 0, directory);
574
+ return directory;
575
+ }
576
+ insertDirectoryAt(options, index) {
577
+ const node = this._insertDirectoryAt(options, index);
578
+ node.create({
579
+ index,
580
+ parentNode: this,
581
+ parentKey: 'directories',
582
+ });
583
+ return node;
584
+ }
585
+ _addDirectory(options) {
586
+ const index = 0;
587
+ return this._insertDirectoryAt(options, index);
588
+ }
589
+ addDirectory(options) {
590
+ const node = this._addDirectory(options);
591
+ const index = this.directories.indexOf(node);
592
+ node.create({
593
+ index,
594
+ parentNode: this,
595
+ parentKey: 'directories',
596
+ });
597
+ return node;
598
+ }
533
599
  removeViewElement(options) {
534
600
  let viewElement;
535
601
  if (typeof options === 'string') {
@@ -608,6 +674,19 @@ let View = class View extends Annotatable__1.default {
608
674
  }
609
675
  return view.delete();
610
676
  }
677
+ removeDirectory(options) {
678
+ let directory;
679
+ if (typeof options === 'string') {
680
+ directory = this.directories.find((item) => item.name === options);
681
+ if (!directory) {
682
+ throw new Error('找不到文件夹 ' + options);
683
+ }
684
+ }
685
+ else {
686
+ directory = options;
687
+ }
688
+ return directory.delete();
689
+ }
611
690
  //================================================================================
612
691
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
613
692
  // 自动生成的代码已结束。下面可以手动编写。
@@ -757,7 +836,7 @@ let View = class View extends Annotatable__1.default {
757
836
  }
758
837
  static { this.TAG_NAME_PREFIX_REG = /^([lieu]|van)[-_]/; }
759
838
  mergeBlock({ code, nodePath, position, slotTarget, cb, }) {
760
- const ViewElement = (0, decorators_1.getConceptConstructor)('ViewElement');
839
+ const ViewElement = (0, decorators_2.getConceptConstructor)('ViewElement');
761
840
  let template = utils.sliceTagContent(code, 'template');
762
841
  if (slotTarget) {
763
842
  template = `<template #${slotTarget}>${template}</template>`;
@@ -818,10 +897,10 @@ let View = class View extends Annotatable__1.default {
818
897
  return node;
819
898
  }
820
899
  mergeDefinitions(code) {
821
- const Logic = (0, decorators_1.getConceptConstructor)('Logic');
822
- const Param = (0, decorators_1.getConceptConstructor)('Param');
823
- const Variable = (0, decorators_1.getConceptConstructor)('Variable');
824
- const BindEvent = (0, decorators_1.getConceptConstructor)('BindEvent');
900
+ const Logic = (0, decorators_2.getConceptConstructor)('Logic');
901
+ const Param = (0, decorators_2.getConceptConstructor)('Param');
902
+ const Variable = (0, decorators_2.getConceptConstructor)('Variable');
903
+ const BindEvent = (0, decorators_2.getConceptConstructor)('BindEvent');
825
904
  const definitionStr = utils.sliceTagContent(code, 'definition') || '{}';
826
905
  const definition = JSON.parse(definitionStr);
827
906
  // 服务端逻辑
@@ -887,10 +966,10 @@ let View = class View extends Annotatable__1.default {
887
966
  });
888
967
  }
889
968
  mergeDefinitions2(code) {
890
- const Logic = (0, decorators_1.getConceptConstructor)('Logic');
891
- const Param = (0, decorators_1.getConceptConstructor)('Param');
892
- const Variable = (0, decorators_1.getConceptConstructor)('Variable');
893
- const BindEvent = (0, decorators_1.getConceptConstructor)('BindEvent');
969
+ const Logic = (0, decorators_2.getConceptConstructor)('Logic');
970
+ const Param = (0, decorators_2.getConceptConstructor)('Param');
971
+ const Variable = (0, decorators_2.getConceptConstructor)('Variable');
972
+ const BindEvent = (0, decorators_2.getConceptConstructor)('BindEvent');
894
973
  const definitionStr = utils.sliceTagContent(code, 'definition') || '{}';
895
974
  const definition = JSON.parse(definitionStr);
896
975
  // 服务端逻辑
@@ -952,7 +1031,7 @@ let View = class View extends Annotatable__1.default {
952
1031
  onChange($event) {
953
1032
  this.emit('change', $event);
954
1033
  }
955
- getLogicExistingNames(excludedList = []) {
1034
+ getLogicExistingNodes(excludedList = []) {
956
1035
  const excludedSet = new Set(excludedList);
957
1036
  const varList = [];
958
1037
  if (Array.isArray(this.params)) {
@@ -972,9 +1051,12 @@ let View = class View extends Annotatable__1.default {
972
1051
  }
973
1052
  });
974
1053
  }
975
- return varList.filter((item) => !excludedSet.has(item) && !excludedSet.has(item?.__v_raw)).map((item) => item.name);
1054
+ return varList.filter((item) => !excludedSet.has(item) && !excludedSet.has(item?.__v_raw));
976
1055
  }
977
- getVarExistingNames(excludedList = []) {
1056
+ getLogicExistingNames(excludedList = []) {
1057
+ return this.getLogicExistingNodes(excludedList).map((item) => item.name);
1058
+ }
1059
+ getVarExistingNodes(excludedList = []) {
978
1060
  const excludedSet = new Set(excludedList);
979
1061
  const varList = [];
980
1062
  if (Array.isArray(this.params)) {
@@ -1024,7 +1106,10 @@ let View = class View extends Annotatable__1.default {
1024
1106
  break;
1025
1107
  }
1026
1108
  });
1027
- return varList.filter((item) => !excludedSet.has(item) && !excludedSet.has(item?.__v_raw)).map((item) => item.name);
1109
+ return varList.filter((item) => !excludedSet.has(item) && !excludedSet.has(item?.__v_raw));
1110
+ }
1111
+ getVarExistingNames(excludedList = []) {
1112
+ return this.getVarExistingNodes(excludedList).map((item) => item.name);
1028
1113
  }
1029
1114
  getRoutePath() {
1030
1115
  const arr = [this.name];
@@ -1139,16 +1224,20 @@ let View = class View extends Annotatable__1.default {
1139
1224
  // cssRules收集结束
1140
1225
  const processDetailFrom = this.getViewProcessForm(), processV2 = this.getDestinationProcessV2, hasProcessDetailFrom = !!processDetailFrom && !!processV2;
1141
1226
  if (hasProcessDetailFrom) {
1227
+ const processPrefixValue = processDetailFrom.getBindAttribute('processPrefix')?.value;
1228
+ const processDatas = [`${processV2.name} : {
1229
+ data: {},
1230
+ }`];
1231
+ if (processPrefixValue && processPrefixValue !== processV2.name) {
1232
+ processDatas.push(`${processPrefixValue} : {
1233
+ data: {},
1234
+ }`);
1235
+ }
1142
1236
  const processDetailFromMixinCode = `const processDetailFromMixin = {
1143
1237
  data() {
1144
1238
  return {
1145
1239
  processDetailFormData: {},
1146
- ${processV2.name} : {
1147
- data: {},
1148
- },
1149
- ${processDetailFrom.getBindAttribute('processPrefix')?.value} : {
1150
- data: {},
1151
- },
1240
+ ${processDatas.join(',\n')},
1152
1241
  formTemplate: "", // 表单模版
1153
1242
  formVM: null, // 表单实例
1154
1243
  needReplaced: false, // 是否需要替换模版
@@ -2251,6 +2340,10 @@ let View = class View extends Annotatable__1.default {
2251
2340
  bindExpressions.push(node);
2252
2341
  }
2253
2342
  }
2343
+ // 处理ValidationLogic
2344
+ if (node?.concept === 'ValidationLogic') {
2345
+ bindExpressions.push(node);
2346
+ }
2254
2347
  });
2255
2348
  });
2256
2349
  return bindExpressions;
@@ -2656,101 +2749,171 @@ let View = class View extends Annotatable__1.default {
2656
2749
  this.existingSubLogic.add(uniqueName);
2657
2750
  return uniqueName;
2658
2751
  }
2752
+ getLogicVariableTree() {
2753
+ const inLogicDirectory = (this.directories || []).reduce((acc, item) => {
2754
+ return [
2755
+ ...acc,
2756
+ ...item.definitions
2757
+ .filter((definition) => definition.referredConcept === 'Logic')
2758
+ .map((definition) => definition.completeName),
2759
+ item._referredConcept === 'Logic' ? item._definition : undefined
2760
+ ];
2761
+ }, []);
2762
+ const inVariableDirectory = (this.directories || []).reduce((acc, item) => {
2763
+ return [
2764
+ ...acc,
2765
+ ...item.definitions
2766
+ .filter((definition) => definition.referredConcept === 'Variable')
2767
+ .map((definition) => definition.completeName),
2768
+ item._referredConcept === 'Variable' ? item._definition : undefined
2769
+ ];
2770
+ }, []);
2771
+ const variables = this.variables.filter((variable) => !inVariableDirectory.includes(variable.name));
2772
+ const logics = this.logics.filter((logic) => !inLogicDirectory.includes(logic.name));
2773
+ const directories = (this.directories || []).map((directory) => {
2774
+ const variables = [
2775
+ directory._referredConcept === 'Variable' ? directory._definition : undefined,
2776
+ ...directory.definitions
2777
+ .filter((definition) => definition.referredConcept === 'Variable')
2778
+ .map((definition) => definition.completeName)
2779
+ ]
2780
+ .filter((completeName) => !!completeName)
2781
+ .map((completeName) => this.variables.find((variable) => variable.name === completeName))
2782
+ .filter((item) => asserts.isVariable(item));
2783
+ const logics = [
2784
+ directory._referredConcept === 'Logic' ? directory._definition : undefined,
2785
+ ...directory.definitions
2786
+ .filter((definition) => definition.referredConcept === 'Logic')
2787
+ .map((definition) => definition.completeName)
2788
+ ]
2789
+ .filter((completeName) => !!completeName)
2790
+ .map((completeName) => this.logics.find((logic) => logic.name === completeName))
2791
+ .filter((item) => asserts.isLogic(item));
2792
+ Object.defineProperty(directory, '_variables', {
2793
+ get() {
2794
+ return variables;
2795
+ },
2796
+ configurable: true,
2797
+ enumerable: true,
2798
+ });
2799
+ Object.defineProperty(directory, '_logics', {
2800
+ get() {
2801
+ return logics;
2802
+ },
2803
+ configurable: true,
2804
+ enumerable: true,
2805
+ });
2806
+ directory._viewMoreChildrenFields = ['_variables', '_logics'];
2807
+ return directory;
2808
+ });
2809
+ return {
2810
+ variables,
2811
+ logics,
2812
+ directories,
2813
+ };
2814
+ }
2659
2815
  };
2660
2816
  exports.View = View;
2661
2817
  __decorate([
2662
- (0, decorators_1.property)()
2818
+ (0, decorators_2.property)()
2663
2819
  // @ts-ignore
2664
2820
  ], View.prototype, "concept", void 0);
2665
2821
  __decorate([
2666
- (0, decorators_1.property)()
2822
+ (0, decorators_2.property)()
2667
2823
  ], View.prototype, "pageTemplateId", void 0);
2668
2824
  __decorate([
2669
- (0, decorators_1.property)()
2825
+ (0, decorators_2.property)()
2670
2826
  ], View.prototype, "name", void 0);
2671
2827
  __decorate([
2672
- (0, decorators_1.property)()
2828
+ (0, decorators_2.property)()
2673
2829
  ], View.prototype, "uuid", void 0);
2674
2830
  __decorate([
2675
- (0, decorators_1.property)()
2831
+ (0, decorators_2.property)()
2676
2832
  ], View.prototype, "title", void 0);
2677
2833
  __decorate([
2678
- (0, decorators_1.property)({
2834
+ (0, decorators_2.property)({
2679
2835
  objectRef: 'StaticString',
2680
2836
  })
2681
2837
  ], View.prototype, "crumb", void 0);
2682
2838
  __decorate([
2683
- (0, decorators_1.property)()
2839
+ (0, decorators_2.property)()
2684
2840
  ], View.prototype, "auth", void 0);
2685
2841
  __decorate([
2686
- (0, decorators_1.property)()
2842
+ (0, decorators_2.property)()
2687
2843
  ], View.prototype, "authDescription", void 0);
2688
2844
  __decorate([
2689
- (0, decorators_1.property)()
2845
+ (0, decorators_2.property)()
2690
2846
  ], View.prototype, "isIndex", void 0);
2691
2847
  __decorate([
2692
- (0, decorators_1.property)()
2848
+ (0, decorators_2.property)()
2693
2849
  ], View.prototype, "template", void 0);
2694
2850
  __decorate([
2695
- (0, decorators_1.property)()
2851
+ (0, decorators_2.property)()
2696
2852
  ], View.prototype, "script", void 0);
2697
2853
  __decorate([
2698
- (0, decorators_1.property)()
2854
+ (0, decorators_2.property)()
2699
2855
  ], View.prototype, "style", void 0);
2700
2856
  __decorate([
2701
- (0, decorators_1.property)()
2857
+ (0, decorators_2.property)()
2702
2858
  ], View.prototype, "storeCode", void 0);
2703
2859
  __decorate([
2704
- (0, decorators_1.property)()
2860
+ (0, decorators_2.property)()
2705
2861
  ], View.prototype, "compScriptCode", void 0);
2706
2862
  __decorate([
2707
- (0, decorators_1.property)({
2863
+ (0, decorators_2.property)({
2708
2864
  objectRef: 'ViewElement',
2709
2865
  isArray: true,
2710
2866
  defaultValue: [],
2711
2867
  })
2712
2868
  ], View.prototype, "elements", void 0);
2713
2869
  __decorate([
2714
- (0, decorators_1.property)({
2870
+ (0, decorators_2.property)({
2715
2871
  objectRef: 'Param',
2716
2872
  isArray: true,
2717
2873
  defaultValue: [],
2718
2874
  })
2719
2875
  ], View.prototype, "params", void 0);
2720
2876
  __decorate([
2721
- (0, decorators_1.property)({
2877
+ (0, decorators_2.property)({
2722
2878
  objectRef: 'Variable',
2723
2879
  isArray: true,
2724
2880
  defaultValue: [],
2725
2881
  })
2726
2882
  ], View.prototype, "variables", void 0);
2727
2883
  __decorate([
2728
- (0, decorators_1.property)({
2884
+ (0, decorators_2.property)({
2729
2885
  objectRef: 'Logic',
2730
2886
  isArray: true,
2731
2887
  defaultValue: [],
2732
2888
  })
2733
2889
  ], View.prototype, "logics", void 0);
2734
2890
  __decorate([
2735
- (0, decorators_1.property)({
2891
+ (0, decorators_2.property)({
2736
2892
  objectRef: 'BindEvent',
2737
2893
  isArray: true,
2738
2894
  defaultValue: [],
2739
2895
  })
2740
2896
  ], View.prototype, "bindEvents", void 0);
2741
2897
  __decorate([
2742
- (0, decorators_1.property)({
2898
+ (0, decorators_2.property)({
2743
2899
  isArray: true,
2744
2900
  defaultValue: [],
2745
2901
  })
2746
2902
  ], View.prototype, "bindRoles", void 0);
2747
2903
  __decorate([
2748
- (0, decorators_1.property)({
2904
+ (0, decorators_2.property)({
2749
2905
  objectRef: 'View',
2750
2906
  isArray: true,
2751
2907
  defaultValue: [],
2752
2908
  })
2753
2909
  ], View.prototype, "children", void 0);
2910
+ __decorate([
2911
+ (0, decorators_2.property)({
2912
+ objectRef: 'Directory',
2913
+ isArray: true,
2914
+ defaultValue: [],
2915
+ })
2916
+ ], View.prototype, "directories", void 0);
2754
2917
  __decorate([
2755
2918
  nasl_translator_1.withSourceMapGenerator
2756
2919
  ], View.prototype, "toEmbeddedTS", null);
@@ -2760,8 +2923,11 @@ __decorate([
2760
2923
  __decorate([
2761
2924
  (0, nasl_translator_1.withSourceMap)()
2762
2925
  ], View.prototype, "toTextualNASL", null);
2926
+ __decorate([
2927
+ (0, decorators_1.whiteProperty)()
2928
+ ], View.prototype, "_virtualNode", void 0);
2763
2929
  exports.View = View = View_1 = __decorate([
2764
- (0, decorators_1.concept)('页面')
2930
+ (0, decorators_2.concept)('页面')
2765
2931
  ], View);
2766
2932
  exports.default = View;
2767
2933
  exports.FrontendTypeComponentNamePerfixMap = {