@nasl/types 0.1.6 → 0.1.7-beta

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/nasl.core.d.ts CHANGED
@@ -4,20 +4,7 @@ declare namespace nasl.core {
4
4
  export type Integer = number;
5
5
  export type Decimal = number;
6
6
  export type String = string;
7
-
8
- export class Binary {
9
- accept: 'Binary';
10
- }
11
-
12
- export class Date {
13
- accept: 'Date';
14
- }
15
-
16
- export class Time {
17
- accept: 'Time';
18
- }
19
-
20
- export class DateTime {
21
- accept: 'DateTime';
22
- }
7
+ export type Date = string;
8
+ export type Time = string;
9
+ export type DateTime = string;
23
10
  }
package/nasl.ui.ast.d.ts CHANGED
@@ -94,6 +94,7 @@ export interface ViewComponentDeclaration {
94
94
  children: Array<ViewComponentDeclaration>;
95
95
  blocks: Array<ViewBlockWithImage>;
96
96
  themeVariables: Array<ThemeVariable>;
97
+ i18nMap: Map<string, Map<string, string>>;
97
98
  }
98
99
 
99
100
  /**
@@ -114,6 +115,7 @@ export interface PropDeclaration {
114
115
  bindOpen: boolean;
115
116
  tabKind: 'property' | 'style';
116
117
  setter: BaseSetter;
118
+ layout: 'block' | 'inline';
117
119
  defaultValue?: DefaultValue;
118
120
  tsDesignerValue?: string;
119
121
  tsIf?: string;
@@ -181,7 +183,7 @@ export interface BooleanLiteral {
181
183
  export interface StringLiteral {
182
184
  concept: 'StringLiteral';
183
185
  value: string;
184
- i18nKey: string;
186
+ i18nKey?: string;
185
187
  }
186
188
 
187
189
  /**
@@ -198,7 +200,7 @@ export interface NumericLiteral {
198
200
  */
199
201
  export interface NewList {
200
202
  concept: 'NewList';
201
- typeAnnotation: TypeAnnotation;
203
+ typeAnnotation?: TypeAnnotation;
202
204
  items: Array<LogicItem>;
203
205
  }
204
206
 
@@ -266,7 +268,8 @@ export interface Param {
266
268
  concept: 'Param';
267
269
  name: string;
268
270
  description?: string;
269
- typeAnnotation: TypeAnnotation;
271
+ spread?: boolean;
272
+ typeAnnotation?: TypeAnnotation;
270
273
  defaultValue?: DefaultValue;
271
274
  }
272
275
 
@@ -291,11 +294,11 @@ export interface TypeAnnotation {
291
294
  export interface StructureProperty {
292
295
  concept: 'StructureProperty';
293
296
  name: string;
294
- label: string;
295
- description: string;
296
- typeAnnotation: TypeAnnotation;
297
- defaultValue: DefaultValue;
298
- jsonName: string;
297
+ label?: string;
298
+ description?: string;
299
+ typeAnnotation?: TypeAnnotation;
300
+ defaultValue?: DefaultValue;
301
+ jsonName?: string;
299
302
  }
300
303
 
301
304
  /**
@@ -313,7 +316,7 @@ export interface Return {
313
316
  concept: 'Return';
314
317
  name: string;
315
318
  description: string;
316
- typeAnnotation: TypeAnnotation;
319
+ typeAnnotation?: TypeAnnotation;
317
320
  defaultValue?: DefaultValue;
318
321
  }
319
322
 
@@ -83,6 +83,18 @@
83
83
  "items": {
84
84
  "$ref": "#/definitions/ThemeVariable"
85
85
  }
86
+ },
87
+ "i18nMap": {
88
+ "type": "object",
89
+ "properties": {
90
+ "size": {
91
+ "type": "number"
92
+ }
93
+ },
94
+ "required": [
95
+ "size"
96
+ ],
97
+ "additionalProperties": false
86
98
  }
87
99
  },
88
100
  "required": [
@@ -99,7 +111,8 @@
99
111
  "methods",
100
112
  "children",
101
113
  "blocks",
102
- "themeVariables"
114
+ "themeVariables",
115
+ "i18nMap"
103
116
  ],
104
117
  "additionalProperties": false,
105
118
  "description": "页面组件"
@@ -163,6 +176,13 @@
163
176
  "setter": {
164
177
  "$ref": "#/definitions/BaseSetter"
165
178
  },
179
+ "layout": {
180
+ "type": "string",
181
+ "enum": [
182
+ "block",
183
+ "inline"
184
+ ]
185
+ },
166
186
  "defaultValue": {
167
187
  "$ref": "#/definitions/DefaultValue"
168
188
  },
@@ -189,7 +209,8 @@
189
209
  "bindHide",
190
210
  "bindOpen",
191
211
  "tabKind",
192
- "setter"
212
+ "setter",
213
+ "layout"
193
214
  ],
194
215
  "additionalProperties": false,
195
216
  "description": "组件属性"
@@ -497,8 +518,7 @@
497
518
  },
498
519
  "required": [
499
520
  "concept",
500
- "value",
501
- "i18nKey"
521
+ "value"
502
522
  ],
503
523
  "additionalProperties": false,
504
524
  "description": "字符串字面量"
@@ -623,12 +643,7 @@
623
643
  },
624
644
  "required": [
625
645
  "concept",
626
- "name",
627
- "label",
628
- "description",
629
- "typeAnnotation",
630
- "defaultValue",
631
- "jsonName"
646
+ "name"
632
647
  ],
633
648
  "additionalProperties": false,
634
649
  "description": "数据结构属性"
@@ -652,7 +667,6 @@
652
667
  },
653
668
  "required": [
654
669
  "concept",
655
- "typeAnnotation",
656
670
  "items"
657
671
  ],
658
672
  "additionalProperties": false,
@@ -746,6 +760,9 @@
746
760
  "description": {
747
761
  "type": "string"
748
762
  },
763
+ "spread": {
764
+ "type": "boolean"
765
+ },
749
766
  "typeAnnotation": {
750
767
  "$ref": "#/definitions/TypeAnnotation"
751
768
  },
@@ -755,8 +772,7 @@
755
772
  },
756
773
  "required": [
757
774
  "concept",
758
- "name",
759
- "typeAnnotation"
775
+ "name"
760
776
  ],
761
777
  "additionalProperties": false,
762
778
  "description": "输入参数"
@@ -881,8 +897,7 @@
881
897
  "required": [
882
898
  "concept",
883
899
  "name",
884
- "description",
885
- "typeAnnotation"
900
+ "description"
886
901
  ],
887
902
  "additionalProperties": false,
888
903
  "description": "输出参数"
@@ -84,6 +84,7 @@ declare namespace nasl.ui {
84
84
  icon?: string;
85
85
  description?: string;
86
86
  typeParams?: string;
87
+ i18nMap: Map<string, Map<string, string>>;
87
88
  }
88
89
 
89
90
  /**
@@ -101,6 +102,7 @@ declare namespace nasl.ui {
101
102
  bindOpen?: boolean;
102
103
  tabKind?: 'property' | 'style';
103
104
  setter?: BaseSetter<T, K>;
105
+ layout?: 'block' | 'inline';
104
106
  designerValue?: any;
105
107
  if?: (target: T) => boolean;
106
108
  disabledIf?: (target: T) => boolean;
@@ -138,6 +140,7 @@ declare namespace nasl.ui {
138
140
  */
139
141
  export interface ParamOpts {
140
142
  description?: string;
143
+ spread?: boolean;
141
144
  title: string;
142
145
  group?: string;
143
146
  }
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@nasl/types",
3
- "version": "0.1.6",
3
+ "version": "0.1.7-beta",
4
4
  "description": "NASL types for TypeScript Declaration",
5
5
  "main": "index.d.ts",
6
6
  "scripts": {
7
- "build": "node ../../out/bin/genUIOptionsForTS.js && node ../../out/bin/genUIAstForTS.js"
7
+ "build": "node ../../out/bin/genUIOptionsForTS.js && node ../../out/bin/genUIAstForTS.js",
8
+ "release:alpha": "npm run build && npm publish --tag alpha --access public --no-git-checks",
9
+ "release:beta": "npm run build && npm publish --tag beta --access public --no-git-checks",
10
+ "release": "npm run build && npm publish --tag latest --access public"
8
11
  },
9
12
  "author": "Forrest <rainforest92@126.com>",
10
13
  "license": "MIT",