@lcap/nasl 3.9.0-beta.2 → 3.9.0-beta.20

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 (231) hide show
  1. package/out/automate/engine/utils.d.ts +0 -5
  2. package/out/automate/engine/utils.d.ts.map +1 -1
  3. package/out/automate/engine/utils.js +1 -123
  4. package/out/automate/engine/utils.js.map +1 -1
  5. package/out/automate/upgrader/2.18.js +1 -1
  6. package/out/automate/upgrader/2.18.js.map +1 -1
  7. package/out/common/Command.js +1 -1
  8. package/out/common/Command.js.map +1 -1
  9. package/out/common/Messager.d.ts.map +1 -1
  10. package/out/common/Messager.js +15 -5
  11. package/out/common/Messager.js.map +1 -1
  12. package/out/config.d.ts +2 -0
  13. package/out/config.d.ts.map +1 -1
  14. package/out/config.js +5 -2
  15. package/out/config.js.map +1 -1
  16. package/out/generator/annotation/full.d.ts +6 -0
  17. package/out/generator/annotation/full.d.ts.map +1 -0
  18. package/out/generator/annotation/full.js +28 -0
  19. package/out/generator/annotation/full.js.map +1 -0
  20. package/out/generator/annotation/incremental.d.ts +7 -0
  21. package/out/generator/annotation/incremental.d.ts.map +1 -0
  22. package/out/generator/annotation/incremental.js +145 -0
  23. package/out/generator/annotation/incremental.js.map +1 -0
  24. package/out/generator/annotation/index.d.ts +5 -0
  25. package/out/generator/annotation/index.d.ts.map +1 -0
  26. package/out/generator/annotation/index.js +21 -0
  27. package/out/generator/annotation/index.js.map +1 -0
  28. package/out/generator/annotation/types.d.ts +14 -0
  29. package/out/generator/annotation/types.d.ts.map +1 -0
  30. package/out/generator/annotation/types.js +3 -0
  31. package/out/generator/annotation/types.js.map +1 -0
  32. package/out/generator/annotation/utils.d.ts +14 -0
  33. package/out/generator/annotation/utils.d.ts.map +1 -0
  34. package/out/generator/annotation/utils.js +51 -0
  35. package/out/generator/annotation/utils.js.map +1 -0
  36. package/out/generator/compileComponent.d.ts.map +1 -1
  37. package/out/generator/compileComponent.js +2 -0
  38. package/out/generator/compileComponent.js.map +1 -1
  39. package/out/generator/genBundleFiles.d.ts +5 -2
  40. package/out/generator/genBundleFiles.d.ts.map +1 -1
  41. package/out/generator/genBundleFiles.js +42 -31
  42. package/out/generator/genBundleFiles.js.map +1 -1
  43. package/out/generator/index.d.ts +2 -0
  44. package/out/generator/index.d.ts.map +1 -1
  45. package/out/generator/index.js +2 -0
  46. package/out/generator/index.js.map +1 -1
  47. package/out/generator/permission.d.ts.map +1 -1
  48. package/out/generator/permission.js +25 -5
  49. package/out/generator/permission.js.map +1 -1
  50. package/out/generator/release-body/body.d.ts +3 -1
  51. package/out/generator/release-body/body.d.ts.map +1 -1
  52. package/out/generator/release-body/body.js +40 -28
  53. package/out/generator/release-body/body.js.map +1 -1
  54. package/out/generator/release-body/data.d.ts +1 -0
  55. package/out/generator/release-body/data.d.ts.map +1 -1
  56. package/out/generator/release-body/data.js +10 -2
  57. package/out/generator/release-body/data.js.map +1 -1
  58. package/out/generator/release-body/internal.d.ts.map +1 -1
  59. package/out/generator/release-body/utils.d.ts +4 -3
  60. package/out/generator/release-body/utils.d.ts.map +1 -1
  61. package/out/generator/release-body/utils.js +60 -10
  62. package/out/generator/release-body/utils.js.map +1 -1
  63. package/out/generator/ui-library-declaration/basic.d.ts +7 -0
  64. package/out/generator/ui-library-declaration/basic.d.ts.map +1 -0
  65. package/out/generator/ui-library-declaration/basic.js +114 -0
  66. package/out/generator/ui-library-declaration/basic.js.map +1 -0
  67. package/out/generator/ui-library-declaration/custom.d.ts +11 -0
  68. package/out/generator/ui-library-declaration/custom.d.ts.map +1 -0
  69. package/out/generator/ui-library-declaration/custom.js +149 -0
  70. package/out/generator/ui-library-declaration/custom.js.map +1 -0
  71. package/out/generator/ui-library-declaration/dependency.d.ts +8 -0
  72. package/out/generator/ui-library-declaration/dependency.d.ts.map +1 -0
  73. package/out/generator/ui-library-declaration/dependency.js +169 -0
  74. package/out/generator/ui-library-declaration/dependency.js.map +1 -0
  75. package/out/generator/ui-library-declaration/format.d.ts +30 -0
  76. package/out/generator/ui-library-declaration/format.d.ts.map +1 -0
  77. package/out/generator/ui-library-declaration/format.js +382 -0
  78. package/out/generator/ui-library-declaration/format.js.map +1 -0
  79. package/out/generator/ui-library-declaration/index.d.ts +3 -0
  80. package/out/generator/ui-library-declaration/index.d.ts.map +1 -0
  81. package/out/generator/ui-library-declaration/index.js +19 -0
  82. package/out/generator/ui-library-declaration/index.js.map +1 -0
  83. package/out/generator/ui-library-declaration/manifest.d.ts +5 -0
  84. package/out/generator/ui-library-declaration/manifest.d.ts.map +1 -0
  85. package/out/generator/ui-library-declaration/manifest.js +27 -0
  86. package/out/generator/ui-library-declaration/manifest.js.map +1 -0
  87. package/out/generator/ui-library-declaration/material.d.ts +6 -0
  88. package/out/generator/ui-library-declaration/material.d.ts.map +1 -0
  89. package/out/generator/ui-library-declaration/material.js +90 -0
  90. package/out/generator/ui-library-declaration/material.js.map +1 -0
  91. package/out/generator/ui-library-declaration/types.d.ts +458 -0
  92. package/out/generator/ui-library-declaration/types.d.ts.map +1 -0
  93. package/out/generator/ui-library-declaration/types.js +3 -0
  94. package/out/generator/ui-library-declaration/types.js.map +1 -0
  95. package/out/generator/ui-library-declaration/utils.d.ts +3 -0
  96. package/out/generator/ui-library-declaration/utils.d.ts.map +1 -0
  97. package/out/generator/ui-library-declaration/utils.js +20 -0
  98. package/out/generator/ui-library-declaration/utils.js.map +1 -0
  99. package/out/manager/diagnostic.d.ts +2 -0
  100. package/out/manager/diagnostic.d.ts.map +1 -1
  101. package/out/manager/diagnostic.js +9 -0
  102. package/out/manager/diagnostic.js.map +1 -1
  103. package/out/natural/genNaturalTS.d.ts +45 -10
  104. package/out/natural/genNaturalTS.d.ts.map +1 -1
  105. package/out/natural/genNaturalTS.js +57 -33
  106. package/out/natural/genNaturalTS.js.map +1 -1
  107. package/out/natural/getContext/getUILib.d.ts.map +1 -1
  108. package/out/natural/getContext/getUILib.js +7 -3
  109. package/out/natural/getContext/getUILib.js.map +1 -1
  110. package/out/natural/getContext/index.d.ts +20 -7
  111. package/out/natural/getContext/index.d.ts.map +1 -1
  112. package/out/natural/getContext/index.js +150 -22
  113. package/out/natural/getContext/index.js.map +1 -1
  114. package/out/natural/getContext/naslStdlibMap.js +8 -8
  115. package/out/natural/getContext/naslStdlibMap.js.map +1 -1
  116. package/out/natural/tools.d.ts +21 -0
  117. package/out/natural/tools.d.ts.map +1 -1
  118. package/out/natural/tools.js +143 -2
  119. package/out/natural/tools.js.map +1 -1
  120. package/out/natural/transformTS2UI.d.ts.map +1 -1
  121. package/out/natural/transformTS2UI.js +378 -307
  122. package/out/natural/transformTS2UI.js.map +1 -1
  123. package/out/natural/transformTSCode.d.ts +3 -5
  124. package/out/natural/transformTSCode.d.ts.map +1 -1
  125. package/out/natural/transformTSCode.js +30 -1089
  126. package/out/natural/transformTSCode.js.map +1 -1
  127. package/out/natural/transforms/registerTransform.d.ts +8 -0
  128. package/out/natural/transforms/registerTransform.d.ts.map +1 -0
  129. package/out/natural/transforms/registerTransform.js +24 -0
  130. package/out/natural/transforms/registerTransform.js.map +1 -0
  131. package/out/natural/transforms/transform2LogicItem.d.ts +25 -0
  132. package/out/natural/transforms/transform2LogicItem.d.ts.map +1 -0
  133. package/out/natural/transforms/transform2LogicItem.js +1262 -0
  134. package/out/natural/transforms/transform2LogicItem.js.map +1 -0
  135. package/out/natural/transforms/transform2TypeAnnotation.d.ts +3 -0
  136. package/out/natural/transforms/transform2TypeAnnotation.d.ts.map +1 -0
  137. package/out/natural/transforms/transform2TypeAnnotation.js +86 -0
  138. package/out/natural/transforms/transform2TypeAnnotation.js.map +1 -0
  139. package/out/natural/transforms/utils.d.ts +9 -0
  140. package/out/natural/transforms/utils.d.ts.map +1 -0
  141. package/out/natural/transforms/utils.js +59 -0
  142. package/out/natural/transforms/utils.js.map +1 -0
  143. package/out/server/extendBaseNode.d.ts.map +1 -1
  144. package/out/server/extendBaseNode.js +3 -6
  145. package/out/server/extendBaseNode.js.map +1 -1
  146. package/out/server/index.d.ts +1 -2
  147. package/out/server/index.d.ts.map +1 -1
  148. package/out/server/index.js +2 -2
  149. package/out/server/index.js.map +1 -1
  150. package/out/server/naslServer.d.ts +10 -3
  151. package/out/server/naslServer.d.ts.map +1 -1
  152. package/out/server/naslServer.js +221 -126
  153. package/out/server/naslServer.js.map +1 -1
  154. package/out/server/translator.d.ts +1 -1
  155. package/out/server/translator.d.ts.map +1 -1
  156. package/out/server/translator.js +89 -53
  157. package/out/server/translator.js.map +1 -1
  158. package/out/service/storage/init.d.ts +1 -25
  159. package/out/service/storage/init.d.ts.map +1 -1
  160. package/out/service/storage/init.js +19 -36
  161. package/out/service/storage/init.js.map +1 -1
  162. package/out/service/storage/types.d.ts +41 -0
  163. package/out/service/storage/types.d.ts.map +1 -0
  164. package/out/service/storage/types.js +10 -0
  165. package/out/service/storage/types.js.map +1 -0
  166. package/out/service/storage/utils.d.ts +15 -0
  167. package/out/service/storage/utils.d.ts.map +1 -0
  168. package/out/service/storage/utils.js +68 -0
  169. package/out/service/storage/utils.js.map +1 -0
  170. package/out/templator/block2nasl/jsx2nasl/index.d.ts +6 -0
  171. package/out/templator/block2nasl/jsx2nasl/index.d.ts.map +1 -0
  172. package/out/templator/block2nasl/jsx2nasl/index.js +15 -0
  173. package/out/templator/block2nasl/jsx2nasl/index.js.map +1 -0
  174. package/out/templator/block2nasl/jsx2nasl/transform-expression2nasl.d.ts +4 -0
  175. package/out/templator/block2nasl/jsx2nasl/transform-expression2nasl.d.ts.map +1 -0
  176. package/out/templator/block2nasl/jsx2nasl/transform-expression2nasl.js +213 -0
  177. package/out/templator/block2nasl/jsx2nasl/transform-expression2nasl.js.map +1 -0
  178. package/out/templator/block2nasl/jsx2nasl/transform-func2nasl.d.ts +15 -0
  179. package/out/templator/block2nasl/jsx2nasl/transform-func2nasl.d.ts.map +1 -0
  180. package/out/templator/block2nasl/jsx2nasl/transform-func2nasl.js +201 -0
  181. package/out/templator/block2nasl/jsx2nasl/transform-func2nasl.js.map +1 -0
  182. package/out/templator/block2nasl/jsx2nasl/transform-tstype2nasl.d.ts +5 -0
  183. package/out/templator/block2nasl/jsx2nasl/transform-tstype2nasl.d.ts.map +1 -0
  184. package/out/templator/block2nasl/jsx2nasl/transform-tstype2nasl.js +186 -0
  185. package/out/templator/block2nasl/jsx2nasl/transform-tstype2nasl.js.map +1 -0
  186. package/out/templator/block2nasl/jsx2nasl/transform-tsx2nasl.d.ts +29 -0
  187. package/out/templator/block2nasl/jsx2nasl/transform-tsx2nasl.d.ts.map +1 -0
  188. package/out/templator/block2nasl/jsx2nasl/transform-tsx2nasl.js +336 -0
  189. package/out/templator/block2nasl/jsx2nasl/transform-tsx2nasl.js.map +1 -0
  190. package/out/templator/block2nasl/jsx2nasl/utils.d.ts +3 -0
  191. package/out/templator/block2nasl/jsx2nasl/utils.d.ts.map +1 -0
  192. package/out/templator/block2nasl/jsx2nasl/utils.js +26 -0
  193. package/out/templator/block2nasl/jsx2nasl/utils.js.map +1 -0
  194. package/out/templator/block2nasl/transformBlock2Nasl.d.ts +11 -0
  195. package/out/templator/block2nasl/transformBlock2Nasl.d.ts.map +1 -0
  196. package/out/templator/block2nasl/transformBlock2Nasl.js +122 -0
  197. package/out/templator/block2nasl/transformBlock2Nasl.js.map +1 -0
  198. package/out/templator/block2nasl/viewMergeBlock.d.ts +17 -0
  199. package/out/templator/block2nasl/viewMergeBlock.d.ts.map +1 -0
  200. package/out/templator/block2nasl/viewMergeBlock.js +185 -0
  201. package/out/templator/block2nasl/viewMergeBlock.js.map +1 -0
  202. package/out/templator/utils.js +1 -1
  203. package/out/templator/utils.js.map +1 -1
  204. package/out/utils/node.d.ts.map +1 -1
  205. package/out/utils/node.js +0 -4
  206. package/out/utils/node.js.map +1 -1
  207. package/out/utils/uiPathId.d.ts +2 -0
  208. package/out/utils/uiPathId.d.ts.map +1 -0
  209. package/out/utils/uiPathId.js +34 -0
  210. package/out/utils/uiPathId.js.map +1 -0
  211. package/package.json +13 -25
  212. package/sandbox/stdlib/nasl.processV2.ts +19 -0
  213. package/sandbox/stdlib/nasl.ui.components.pc.ts +16 -0
  214. package/sandbox/stdlib/nasl.ui.definition.ts +41 -1
  215. package/sandbox/stdlib/nasl.ui.ts +24 -8
  216. package/sandbox/stdlib/nasl.util.ts +6 -15
  217. package/sandbox-natural/stdlib/nasl.core.d.ts +54 -0
  218. package/sandbox-natural/stdlib/nasl.oql.d.ts +22 -0
  219. package/sandbox-natural/stdlib/nasl.ui.d.ts +78 -0
  220. package/sandbox-natural/stdlib/nasl.ui.h5.d.ts +1684 -1643
  221. package/sandbox-natural/stdlib/nasl.ui.h5.json +15746 -15045
  222. package/sandbox-natural/stdlib/nasl.ui.pc.d.ts +5341 -5154
  223. package/sandbox-natural/stdlib/nasl.ui.pc.json +31176 -30681
  224. package/sandbox-natural/stdlib/{nasl.util.ts → nasl.util.d.ts} +50 -45
  225. package/ts-worker/bundle.js +2 -2
  226. package/ts-worker/lib/Messager.js +8 -1
  227. package/ts-worker/lib/tsserver.js +6 -6
  228. package/sandbox-natural/stdlib/nasl.core.ts +0 -36
  229. package/sandbox-natural/stdlib/nasl.oql.ts +0 -14
  230. package/sandbox-natural/stdlib/nasl.ui.pre.d.ts +0 -90
  231. package/sandbox-natural/stdlib/nasl.ui.ts +0 -63
@@ -142,11 +142,19 @@ class Messager {
142
142
  return;
143
143
  this.onDataReceived(e.data);
144
144
  }
145
+ count = 0;
145
146
  /**
146
147
  * 内置处理接收的数据
147
148
  * @override
148
149
  */
149
150
  onDataReceived(data) {
151
+ this.count++;
152
+ if (this.count === 5) {
153
+ this.count = 0;
154
+ // console.log(this.count);
155
+ // 预留时间做 minor gc,减少峰值内存占用
156
+ (async () => await new Promise(resolve => setTimeout(resolve, 30)))();
157
+ }
150
158
  if (data.protocol !== this.options.protocol)
151
159
  return;
152
160
  if (data.type === 'response') {
@@ -168,7 +176,6 @@ class Messager {
168
176
  } else {
169
177
  res = func;
170
178
  }
171
-
172
179
  if (data.type === 'request') {
173
180
  return Promise.resolve(res)
174
181
  .then((result) => {
@@ -177024,7 +177024,7 @@ var ts;
177024
177024
  const fileInfoMap = {};
177025
177025
  const fileScriptInfoMap = {};
177026
177026
  const filePositionMap = {};
177027
- console.time('方案2标注耗时:');
177027
+ // console.time('方案2标注耗时:');
177028
177028
 
177029
177029
  function getType(typeChecker, symbol, node) {
177030
177030
  try {
@@ -177129,14 +177129,14 @@ var ts;
177129
177129
  return count !== 0;
177130
177130
  });
177131
177131
  }
177132
- console.timeEnd('方案2标注耗时:');
177132
+ // console.timeEnd('方案2标注耗时:');
177133
177133
  return resultMap;
177134
177134
  };
177135
177135
  Session.prototype.getTypeBatchWorker = function (args, simplifiedResult) {
177136
177136
  const fileInfoMap = {};
177137
177137
  const fileScriptInfoMap = {};
177138
177138
  const sourceFileMap = {};
177139
- console.time('方案1标注耗时:')
177139
+ // console.time('方案1标注耗时:')
177140
177140
  const list = args.map((arg) => {
177141
177141
  const { line, offset } = arg;
177142
177142
  var _a = fileInfoMap[arg.file];
@@ -177198,17 +177198,17 @@ var ts;
177198
177198
  return item;
177199
177199
  }
177200
177200
  });
177201
- console.timeEnd('方案1标注耗时:')
177201
+ // console.timeEnd('方案1标注耗时:')
177202
177202
  return list;
177203
177203
  };
177204
177204
  Session.prototype.getQuickInfoFullWorker = function (args, simplifiedResult) {
177205
- console.time('原方案标注耗时:')
177205
+ // console.time('原方案标注耗时:')
177206
177206
  const list = args.map((arg) => {
177207
177207
  var _a = this.getFileAndProject(arg), file = _a.file, project = _a.project;
177208
177208
  var scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);
177209
177209
  return project.getLanguageService().getQuickInfoFast(file, this.getPosition(arg, scriptInfo));
177210
177210
  });
177211
- console.timeEnd('原方案标注耗时:')
177211
+ // console.timeEnd('原方案标注耗时:')
177212
177212
  return list;
177213
177213
  };
177214
177214
  Session.prototype.getQuickInfoInFileWorker = function (args, simplifiedResult) {
@@ -1,36 +0,0 @@
1
- type Any = any;
2
- type Long = number;
3
- type Integer = number;
4
- type Decimal = number;
5
- // type Boolean = boolean;
6
- // type String = string;
7
- // type Date = globalThis.Date;
8
-
9
- class Time {
10
- accept: 'Time';
11
- }
12
- class DateTime {
13
- accept: 'DateTime';
14
- }
15
- type List<T> = Array<T>;
16
-
17
- interface Entity<T> {
18
- get(id: Integer): T; // 只能获取一条 Entity 数据,返回一个 Entity 对象
19
- create(entity: T): T;
20
- update(entity: T): T;
21
- delete(id: Integer): void;
22
- createOrUpdate(body: T): T;
23
- batchCreate(list: List<T>): List<T>;
24
- batchUpdate(list: List<T>): List<T>;
25
- batchDelete(list: List<Integer>): void;
26
- }
27
- declare function EntityRelation(property: any): any;
28
- declare const createEntity: <T>() => Entity<T>;
29
-
30
- declare function ForEach<T>(list: List<T>, start: Integer, end: Integer, fn: (item: T, index: Integer) => void): void;
31
-
32
- declare function plus(left: Decimal, right: Decimal): Decimal;
33
- declare function minus(left: Decimal, right: Decimal): Decimal;
34
- declare function multiply(left: Decimal, right: Decimal): Decimal;
35
- declare function divide(left: Decimal, right: Decimal): Decimal;
36
- declare function remainder(left: Decimal, right: Decimal): Decimal;
@@ -1,14 +0,0 @@
1
- declare namespace nasl.oql {
2
- /**
3
- * 数据查询:当前为服务端逻辑时可使用此方法
4
- * @param sql 数据查询需要的 SQL
5
- * @returns 返回类型中的 T 为 sql 根据 SQL 中 select 的字段推导
6
- *
7
- * 所有变量格式为:${variable},不能用''包裹,不能用函数处理。
8
- * 优先使用数据库的查询和数据操纵能力,例如 JOIN、SUM、GROUP_BY 等
9
- * @example `SELECT * FROM Student WHERE id = ${id}`
10
- * @example `SELECT OrderProduct.*, Product.price as price FROM OrderProduct JOIN Product WHERE orderId = ${id}`
11
- * @example `SELECT SUM(OrderProduct.amount * Product.price) as total FROM OrderProduct JOIN Product WHERE orderId = ${orderId}`
12
- */
13
- export function query<T>(sql: string): List<T>;
14
- }
@@ -1,90 +0,0 @@
1
- declare namespace nasl.ui {
2
- export class ViewComponent { }
3
-
4
- export class ViewComponentOptions {
5
- @Prop({
6
- title: '显示条件',
7
- description: '是否展示组件',
8
- })
9
- _if: nasl.core.Boolean;
10
-
11
- @Prop({
12
- title: '工具提示',
13
- description: '在鼠标悬停时显示的文字',
14
- })
15
- _tooltip: nasl.core.String;
16
-
17
- @Prop({
18
- title: '样式',
19
- description: '任意组件的样式,使用 inline CSS',
20
- })
21
- _staticStyle: nasl.core.String;
22
-
23
- @Prop({
24
- title: '动态文本颜色',
25
- description: '动态调整文本颜色,CSS 的 color 值',
26
- })
27
- _color: nasl.color.String;
28
-
29
- @Prop({
30
- title: '动态背景颜色',
31
- description: '动态调整背景颜色,CSS 的 background-color 值',
32
- })
33
- _backgroundColor: nasl.color.String;
34
-
35
- @Prop({
36
- title: '动态背景图片',
37
- description: '动态调整背景图片,CSS 的 background-image 值',
38
- })
39
- _backgroundImage: nasl.color.String;
40
- }
41
-
42
- export interface MouseEvent {
43
- altKey: nasl.core.Boolean;
44
- button: nasl.core.Integer;
45
- clientX: nasl.core.Integer;
46
- clientY: nasl.core.Integer;
47
- ctrlKey: nasl.core.Boolean;
48
- metaKey: nasl.core.Boolean;
49
- movementX: nasl.core.Integer;
50
- movementY: nasl.core.Integer;
51
- offsetX: nasl.core.Integer;
52
- offsetY: nasl.core.Integer;
53
- pageX: nasl.core.Integer;
54
- pageY: nasl.core.Integer;
55
- screenX: nasl.core.Integer;
56
- screenY: nasl.core.Integer;
57
- which: nasl.core.Integer;
58
- }
59
-
60
- export interface FocusEvent {
61
- cancelBubble: nasl.core.Boolean;
62
- detail: nasl.core.String;
63
- layerX: nasl.core.Integer;
64
- layerY: nasl.core.Integer;
65
- pageX: nasl.core.Integer;
66
- pageY: nasl.core.Integer;
67
- which: nasl.core.Integer;
68
- }
69
-
70
- export interface ValidateResult {
71
- rawValue: nasl.core.String;
72
- value: nasl.core.String;
73
- trigger: nasl.core.String;
74
- muted: nasl.core.String;
75
- valid: nasl.core.Boolean;
76
- touched: nasl.core.Boolean;
77
- dirty: nasl.core.Boolean;
78
- firstError: nasl.core.String;
79
- triggerValid: nasl.core.Boolean;
80
- }
81
-
82
- export function showMessage(text: Any): void;
83
-
84
- /**
85
- * 跳转到指定页面
86
- * @example nasl.ui.destination('pageType.some_view.sub1_view', param1, param2);
87
- * pageType 为 namespace,如 pc 或者 m,必填
88
- */
89
- export function destination(path: String, ...args: Any[]): void;
90
- }
@@ -1,63 +0,0 @@
1
- declare namespace nasl.ui {
2
- export interface MouseEvent { }
3
-
4
- export interface ValidateResult { valid: Boolean; }
5
-
6
- export class Button {
7
- constructor(options?: {
8
- color?: 'default' | 'primary',
9
- text?: String,
10
- onClick?: () => any,
11
- });
12
- }
13
-
14
- export class Form {
15
- constructor(options?: {});
16
-
17
- validate(): ValidateResult;
18
- }
19
-
20
- export class Modal {
21
- constructor(options?: {});
22
-
23
- open(): void;
24
- close(): void;
25
- }
26
-
27
- export class TableView {
28
- constructor(options?: {});
29
-
30
- reload(): void;
31
- }
32
-
33
- export class Select {
34
- constructor(options?: {});
35
-
36
- reload(): void;
37
- }
38
-
39
- export class InfoList {
40
- constructor(options?: {});
41
- }
42
-
43
- export class Collapse {
44
- constructor(options?: {});
45
- }
46
-
47
- export class Input {
48
- constructor(options?: {});
49
- }
50
-
51
- export class NumberInput {
52
- constructor(options?: {});
53
- }
54
-
55
- export function showMessage(text: Any): void;
56
-
57
- /**
58
- * 跳转到指定页面
59
- * @example nasl.ui.destination('pageType.some_view.sub1_view', param1, param2);
60
- * pageType 为 namespace,如 pc 或者 m,必填
61
- */
62
- export function destination(path: String, ...args: Any[]): void;
63
- }