@nasl/types 0.1.7 → 0.1.8-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.ui.ast.d.ts +325 -188
- package/nasl.ui.ast.schema.json +222 -85
- package/nasl.ui.options.d.ts +25 -1
- package/package.json +1 -1
package/nasl.ui.ast.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
2
|
/* eslint-disable @typescript-eslint/adjacent-overload-signatures */
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* 设置器基类
|
|
6
8
|
*/
|
|
7
|
-
export type BaseSetter = InputSetter | SwitchSetter | EnumSelectSetter | CapsulesSetter | NumberInputSetter | IconSetter | ImageSetter | PropertySelectSetter;
|
|
9
|
+
export type BaseSetter = InputSetter | SwitchSetter | EnumSelectSetter | CapsulesSetter | NumberInputSetter | IconSetter | ImageSetter | PropertySelectSetter | PropertyTransformSetter;
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* 输入框设置器
|
|
@@ -40,6 +42,41 @@ export interface EnumSelectSetter {
|
|
|
40
42
|
multiple: boolean;
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
/**
|
|
46
|
+
* 设置器枚举选项
|
|
47
|
+
*/
|
|
48
|
+
export interface SetterOption {
|
|
49
|
+
concept: 'SetterOption';
|
|
50
|
+
/**
|
|
51
|
+
* 选项值
|
|
52
|
+
*/
|
|
53
|
+
value: string;
|
|
54
|
+
/**
|
|
55
|
+
* 选项标题
|
|
56
|
+
*/
|
|
57
|
+
title: string;
|
|
58
|
+
/**
|
|
59
|
+
* 选项图标
|
|
60
|
+
*/
|
|
61
|
+
icon?: string;
|
|
62
|
+
/**
|
|
63
|
+
* 选项工具提示
|
|
64
|
+
*/
|
|
65
|
+
tooltip?: string;
|
|
66
|
+
/**
|
|
67
|
+
* 是否显隐
|
|
68
|
+
*
|
|
69
|
+
* 用 TS 写表达式,在 IDE 中直接 eval
|
|
70
|
+
*/
|
|
71
|
+
tsIf?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 是否禁用
|
|
74
|
+
*
|
|
75
|
+
* 用 TS 写表达式,在 IDE 中直接 eval
|
|
76
|
+
*/
|
|
77
|
+
tsDisabledIf?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
43
80
|
/**
|
|
44
81
|
* 胶囊设置器
|
|
45
82
|
*/
|
|
@@ -91,6 +128,14 @@ export interface IconSetter {
|
|
|
91
128
|
* 图标标题
|
|
92
129
|
*/
|
|
93
130
|
title?: string;
|
|
131
|
+
/**
|
|
132
|
+
* 使用自定义 iconfont 库
|
|
133
|
+
*/
|
|
134
|
+
customIconFont?: string;
|
|
135
|
+
/**
|
|
136
|
+
* 隐藏上传图标功能
|
|
137
|
+
*/
|
|
138
|
+
hideUploadIcon?: boolean;
|
|
94
139
|
}
|
|
95
140
|
|
|
96
141
|
/**
|
|
@@ -109,6 +154,14 @@ export interface PropertySelectSetter {
|
|
|
109
154
|
|
|
110
155
|
}
|
|
111
156
|
|
|
157
|
+
/**
|
|
158
|
+
* 属性选择设置器
|
|
159
|
+
*/
|
|
160
|
+
export interface PropertyTransformSetter {
|
|
161
|
+
concept: 'PropertyTransformSetter';
|
|
162
|
+
|
|
163
|
+
}
|
|
164
|
+
|
|
112
165
|
/**
|
|
113
166
|
* 页面组件
|
|
114
167
|
*/
|
|
@@ -177,7 +230,7 @@ export interface ViewComponentDeclaration {
|
|
|
177
230
|
/**
|
|
178
231
|
* 国际化配置列表
|
|
179
232
|
*/
|
|
180
|
-
i18nMap?:
|
|
233
|
+
i18nMap?: Partial<Record<string, Map<string, string>>>;
|
|
181
234
|
}
|
|
182
235
|
|
|
183
236
|
/**
|
|
@@ -221,6 +274,14 @@ export interface PropDeclaration {
|
|
|
221
274
|
* 仅在属性类型为 string(不包括字符串枚举)的情况下,且 sync 为 falsy 时可配置
|
|
222
275
|
*/
|
|
223
276
|
implicitToString?: boolean;
|
|
277
|
+
/**
|
|
278
|
+
* 不允许该组件在逻辑中设置
|
|
279
|
+
*/
|
|
280
|
+
unsettable: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* 该属性是否为数据源
|
|
283
|
+
*/
|
|
284
|
+
isDataSource: boolean;
|
|
224
285
|
/**
|
|
225
286
|
* 工具提示链接
|
|
226
287
|
*/
|
|
@@ -279,6 +340,100 @@ export interface PropDeclaration {
|
|
|
279
340
|
tsOnChange?: string;
|
|
280
341
|
}
|
|
281
342
|
|
|
343
|
+
/**
|
|
344
|
+
* 默认值
|
|
345
|
+
*/
|
|
346
|
+
export interface DefaultValue {
|
|
347
|
+
concept: 'DefaultValue';
|
|
348
|
+
/**
|
|
349
|
+
* 根表达式
|
|
350
|
+
*/
|
|
351
|
+
expression?: LogicItem;
|
|
352
|
+
/**
|
|
353
|
+
* 草稿态
|
|
354
|
+
*/
|
|
355
|
+
playground: Array<LogicItem>;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* 逻辑项
|
|
360
|
+
*/
|
|
361
|
+
export type LogicItem = NullLiteral | BooleanLiteral | StringLiteral | NumericLiteral | NewList;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* 类型标注
|
|
365
|
+
*/
|
|
366
|
+
export interface TypeAnnotation {
|
|
367
|
+
concept: 'TypeAnnotation';
|
|
368
|
+
/**
|
|
369
|
+
* 类型种类
|
|
370
|
+
*/
|
|
371
|
+
typeKind: 'primitive' | 'reference' | 'generic' | 'typeParam' | 'function' | 'union' | 'anonymousStructure';
|
|
372
|
+
/**
|
|
373
|
+
* 类型命名空间
|
|
374
|
+
*/
|
|
375
|
+
typeNamespace?: string;
|
|
376
|
+
/**
|
|
377
|
+
* 类型名称
|
|
378
|
+
*/
|
|
379
|
+
typeName?: string;
|
|
380
|
+
/**
|
|
381
|
+
* 类型参数
|
|
382
|
+
*/
|
|
383
|
+
typeArguments?: Array<TypeAnnotation>;
|
|
384
|
+
/**
|
|
385
|
+
* 返回类型
|
|
386
|
+
*/
|
|
387
|
+
returnType?: Array<TypeAnnotation>;
|
|
388
|
+
/**
|
|
389
|
+
* 是否是推断出来的
|
|
390
|
+
*/
|
|
391
|
+
inferred?: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* 匿名数据结构属性
|
|
394
|
+
*/
|
|
395
|
+
properties?: Array<StructureProperty>;
|
|
396
|
+
/**
|
|
397
|
+
* 规则对象
|
|
398
|
+
*/
|
|
399
|
+
ruleMap?: Partial<Record<string, number>>;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* 数据结构属性
|
|
404
|
+
*/
|
|
405
|
+
export interface StructureProperty {
|
|
406
|
+
concept: 'StructureProperty';
|
|
407
|
+
/**
|
|
408
|
+
* 数据结构属性名称
|
|
409
|
+
*/
|
|
410
|
+
name: string;
|
|
411
|
+
/**
|
|
412
|
+
* 数据结构属性标题
|
|
413
|
+
*/
|
|
414
|
+
label?: string;
|
|
415
|
+
/**
|
|
416
|
+
* 数据结构属性描述
|
|
417
|
+
*/
|
|
418
|
+
description?: string;
|
|
419
|
+
/**
|
|
420
|
+
* 类型
|
|
421
|
+
*/
|
|
422
|
+
typeAnnotation?: TypeAnnotation;
|
|
423
|
+
/**
|
|
424
|
+
* 默认值
|
|
425
|
+
*
|
|
426
|
+
* defaultValue结构体
|
|
427
|
+
*/
|
|
428
|
+
defaultValue?: DefaultValue;
|
|
429
|
+
/**
|
|
430
|
+
* 数据结构字段 JSON 的序列化别名
|
|
431
|
+
*
|
|
432
|
+
* JSON 字符串别名
|
|
433
|
+
*/
|
|
434
|
+
jsonName?: string;
|
|
435
|
+
}
|
|
436
|
+
|
|
282
437
|
/**
|
|
283
438
|
* 组件事件
|
|
284
439
|
*/
|
|
@@ -342,179 +497,145 @@ export interface SlotDeclaration {
|
|
|
342
497
|
}
|
|
343
498
|
|
|
344
499
|
/**
|
|
345
|
-
*
|
|
500
|
+
* 输入参数
|
|
346
501
|
*/
|
|
347
|
-
export interface
|
|
348
|
-
concept: '
|
|
502
|
+
export interface Param {
|
|
503
|
+
concept: 'Param';
|
|
349
504
|
/**
|
|
350
|
-
*
|
|
505
|
+
* 输入参数名称
|
|
351
506
|
*/
|
|
352
507
|
name: string;
|
|
353
508
|
/**
|
|
354
|
-
*
|
|
355
|
-
*/
|
|
356
|
-
title: string;
|
|
357
|
-
/**
|
|
358
|
-
* 逻辑描述
|
|
509
|
+
* 输入参数描述
|
|
359
510
|
*/
|
|
360
|
-
description
|
|
511
|
+
description?: string;
|
|
361
512
|
/**
|
|
362
|
-
*
|
|
513
|
+
* 是否为展开参数
|
|
363
514
|
*/
|
|
364
|
-
|
|
515
|
+
spread?: boolean;
|
|
365
516
|
/**
|
|
366
|
-
*
|
|
517
|
+
* 类型
|
|
367
518
|
*/
|
|
368
|
-
|
|
519
|
+
typeAnnotation?: TypeAnnotation;
|
|
369
520
|
/**
|
|
370
|
-
*
|
|
521
|
+
* 默认值
|
|
371
522
|
*/
|
|
372
|
-
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* 空字面量
|
|
377
|
-
*/
|
|
378
|
-
export interface NullLiteral {
|
|
379
|
-
concept: 'NullLiteral';
|
|
380
|
-
|
|
523
|
+
defaultValue?: DefaultValue;
|
|
381
524
|
}
|
|
382
525
|
|
|
383
526
|
/**
|
|
384
|
-
*
|
|
527
|
+
* 页面组件的代码块
|
|
385
528
|
*/
|
|
386
|
-
export interface
|
|
387
|
-
concept: '
|
|
529
|
+
export interface ViewBlock {
|
|
530
|
+
concept: 'ViewBlock';
|
|
388
531
|
/**
|
|
389
|
-
*
|
|
532
|
+
* 标题
|
|
390
533
|
*/
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* 字符串字面量
|
|
396
|
-
*/
|
|
397
|
-
export interface StringLiteral {
|
|
398
|
-
concept: 'StringLiteral';
|
|
534
|
+
title: string;
|
|
399
535
|
/**
|
|
400
|
-
*
|
|
536
|
+
* 代码
|
|
401
537
|
*/
|
|
402
|
-
|
|
538
|
+
code: string;
|
|
403
539
|
/**
|
|
404
|
-
*
|
|
540
|
+
* 描述
|
|
405
541
|
*/
|
|
406
|
-
|
|
542
|
+
description?: string;
|
|
407
543
|
}
|
|
408
544
|
|
|
409
545
|
/**
|
|
410
|
-
*
|
|
546
|
+
* 带截图的代码块
|
|
411
547
|
*/
|
|
412
|
-
export interface
|
|
413
|
-
concept: '
|
|
548
|
+
export interface ViewBlockWithImage {
|
|
549
|
+
concept: 'ViewBlockWithImage';
|
|
414
550
|
/**
|
|
415
|
-
*
|
|
551
|
+
* 标题
|
|
416
552
|
*/
|
|
417
|
-
|
|
553
|
+
title: string;
|
|
418
554
|
/**
|
|
419
|
-
*
|
|
555
|
+
* 代码
|
|
420
556
|
*/
|
|
421
|
-
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* 列表构造器
|
|
426
|
-
*/
|
|
427
|
-
export interface NewList {
|
|
428
|
-
concept: 'NewList';
|
|
557
|
+
code: string;
|
|
429
558
|
/**
|
|
430
|
-
*
|
|
559
|
+
* 描述
|
|
431
560
|
*/
|
|
432
|
-
|
|
561
|
+
description?: string;
|
|
433
562
|
/**
|
|
434
|
-
*
|
|
563
|
+
* 截图
|
|
435
564
|
*/
|
|
436
|
-
|
|
565
|
+
screenshot: string;
|
|
566
|
+
/**
|
|
567
|
+
* 手绘
|
|
568
|
+
*/
|
|
569
|
+
drawing: string;
|
|
437
570
|
}
|
|
438
571
|
|
|
439
572
|
/**
|
|
440
|
-
*
|
|
573
|
+
* 逻辑声明
|
|
441
574
|
*/
|
|
442
|
-
export interface
|
|
443
|
-
concept: '
|
|
575
|
+
export interface LogicDeclaration {
|
|
576
|
+
concept: 'LogicDeclaration';
|
|
444
577
|
/**
|
|
445
|
-
*
|
|
578
|
+
* 逻辑名称
|
|
446
579
|
*/
|
|
447
|
-
|
|
580
|
+
name: string;
|
|
448
581
|
/**
|
|
449
|
-
*
|
|
582
|
+
* 逻辑标题
|
|
450
583
|
*/
|
|
451
584
|
title: string;
|
|
452
585
|
/**
|
|
453
|
-
*
|
|
586
|
+
* 逻辑描述
|
|
454
587
|
*/
|
|
455
|
-
|
|
588
|
+
description: string;
|
|
456
589
|
/**
|
|
457
|
-
*
|
|
590
|
+
* 类型参数列表
|
|
458
591
|
*/
|
|
459
|
-
|
|
592
|
+
typeParams?: Array<TypeParam>;
|
|
460
593
|
/**
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
* 用 TS 写表达式,在 IDE 中直接 eval
|
|
594
|
+
* 输入参数列表
|
|
464
595
|
*/
|
|
465
|
-
|
|
596
|
+
params: Array<Param>;
|
|
466
597
|
/**
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
* 用 TS 写表达式,在 IDE 中直接 eval
|
|
598
|
+
* 输出参数列表
|
|
470
599
|
*/
|
|
471
|
-
|
|
600
|
+
returns: Array<Return>;
|
|
472
601
|
}
|
|
473
602
|
|
|
474
603
|
/**
|
|
475
|
-
*
|
|
604
|
+
* 类型参数
|
|
476
605
|
*/
|
|
477
|
-
export interface
|
|
478
|
-
concept: '
|
|
479
|
-
/**
|
|
480
|
-
* 标题
|
|
481
|
-
*/
|
|
482
|
-
title: string;
|
|
483
|
-
/**
|
|
484
|
-
* 代码
|
|
485
|
-
*/
|
|
486
|
-
code: string;
|
|
487
|
-
/**
|
|
488
|
-
* 描述
|
|
489
|
-
*/
|
|
490
|
-
description?: string;
|
|
606
|
+
export interface TypeParam {
|
|
607
|
+
concept: 'TypeParam';
|
|
491
608
|
/**
|
|
492
|
-
*
|
|
609
|
+
* 类型名称
|
|
493
610
|
*/
|
|
494
|
-
|
|
611
|
+
name: string;
|
|
495
612
|
/**
|
|
496
|
-
*
|
|
613
|
+
* 展示名称
|
|
497
614
|
*/
|
|
498
|
-
|
|
615
|
+
displayName?: string;
|
|
499
616
|
}
|
|
500
617
|
|
|
501
618
|
/**
|
|
502
|
-
*
|
|
619
|
+
* 输出参数
|
|
503
620
|
*/
|
|
504
|
-
export interface
|
|
505
|
-
concept: '
|
|
621
|
+
export interface Return {
|
|
622
|
+
concept: 'Return';
|
|
506
623
|
/**
|
|
507
|
-
*
|
|
624
|
+
* 输出参数名称
|
|
508
625
|
*/
|
|
509
|
-
|
|
626
|
+
name: string;
|
|
510
627
|
/**
|
|
511
|
-
*
|
|
628
|
+
* 输出参数描述
|
|
512
629
|
*/
|
|
513
|
-
|
|
630
|
+
description?: string;
|
|
514
631
|
/**
|
|
515
|
-
*
|
|
632
|
+
* 类型
|
|
516
633
|
*/
|
|
517
|
-
|
|
634
|
+
typeAnnotation?: TypeAnnotation;
|
|
635
|
+
/**
|
|
636
|
+
* 默认值
|
|
637
|
+
*/
|
|
638
|
+
defaultValue?: DefaultValue;
|
|
518
639
|
}
|
|
519
640
|
|
|
520
641
|
/**
|
|
@@ -529,162 +650,178 @@ export interface ThemeVariable {
|
|
|
529
650
|
}
|
|
530
651
|
|
|
531
652
|
/**
|
|
532
|
-
*
|
|
653
|
+
* 空字面量
|
|
533
654
|
*/
|
|
534
|
-
export interface
|
|
535
|
-
concept: '
|
|
655
|
+
export interface NullLiteral {
|
|
656
|
+
concept: 'NullLiteral';
|
|
536
657
|
/**
|
|
537
|
-
*
|
|
658
|
+
* 逻辑项标题
|
|
538
659
|
*/
|
|
539
|
-
|
|
660
|
+
label?: string;
|
|
540
661
|
/**
|
|
541
|
-
*
|
|
662
|
+
* 逻辑项描述
|
|
542
663
|
*/
|
|
543
|
-
|
|
664
|
+
description?: string;
|
|
665
|
+
/**
|
|
666
|
+
* 是否折叠
|
|
667
|
+
*/
|
|
668
|
+
folded?: boolean;
|
|
669
|
+
/**
|
|
670
|
+
* offsetX
|
|
671
|
+
*/
|
|
672
|
+
offsetX?: number;
|
|
673
|
+
/**
|
|
674
|
+
* offsetY
|
|
675
|
+
*/
|
|
676
|
+
offsetY?: number;
|
|
677
|
+
/**
|
|
678
|
+
* 类型标注
|
|
679
|
+
*/
|
|
680
|
+
typeAnnotation?: TypeAnnotation;
|
|
544
681
|
}
|
|
545
682
|
|
|
546
683
|
/**
|
|
547
|
-
*
|
|
548
|
-
*/
|
|
549
|
-
export type LogicItem = NullLiteral | BooleanLiteral | StringLiteral | NumericLiteral | NewList;
|
|
550
|
-
|
|
551
|
-
/**
|
|
552
|
-
* 输入参数
|
|
684
|
+
* 布尔型字面量
|
|
553
685
|
*/
|
|
554
|
-
export interface
|
|
555
|
-
concept: '
|
|
686
|
+
export interface BooleanLiteral {
|
|
687
|
+
concept: 'BooleanLiteral';
|
|
556
688
|
/**
|
|
557
|
-
*
|
|
689
|
+
* 逻辑项标题
|
|
558
690
|
*/
|
|
559
|
-
|
|
691
|
+
label?: string;
|
|
560
692
|
/**
|
|
561
|
-
*
|
|
693
|
+
* 逻辑项描述
|
|
562
694
|
*/
|
|
563
695
|
description?: string;
|
|
564
696
|
/**
|
|
565
|
-
*
|
|
697
|
+
* 是否折叠
|
|
566
698
|
*/
|
|
567
|
-
|
|
699
|
+
folded?: boolean;
|
|
568
700
|
/**
|
|
569
|
-
*
|
|
701
|
+
* offsetX
|
|
702
|
+
*/
|
|
703
|
+
offsetX?: number;
|
|
704
|
+
/**
|
|
705
|
+
* offsetY
|
|
706
|
+
*/
|
|
707
|
+
offsetY?: number;
|
|
708
|
+
/**
|
|
709
|
+
* 类型标注
|
|
570
710
|
*/
|
|
571
711
|
typeAnnotation?: TypeAnnotation;
|
|
572
712
|
/**
|
|
573
|
-
*
|
|
713
|
+
* 字面量的值
|
|
574
714
|
*/
|
|
575
|
-
|
|
715
|
+
value: string;
|
|
576
716
|
}
|
|
577
717
|
|
|
578
718
|
/**
|
|
579
|
-
*
|
|
719
|
+
* 字符串字面量
|
|
580
720
|
*/
|
|
581
|
-
export interface
|
|
582
|
-
concept: '
|
|
721
|
+
export interface StringLiteral {
|
|
722
|
+
concept: 'StringLiteral';
|
|
583
723
|
/**
|
|
584
|
-
*
|
|
724
|
+
* 逻辑项标题
|
|
585
725
|
*/
|
|
586
|
-
|
|
726
|
+
label?: string;
|
|
587
727
|
/**
|
|
588
|
-
*
|
|
728
|
+
* 逻辑项描述
|
|
589
729
|
*/
|
|
590
|
-
|
|
730
|
+
description?: string;
|
|
591
731
|
/**
|
|
592
|
-
*
|
|
732
|
+
* 是否折叠
|
|
593
733
|
*/
|
|
594
|
-
|
|
734
|
+
folded?: boolean;
|
|
595
735
|
/**
|
|
596
|
-
*
|
|
736
|
+
* offsetX
|
|
597
737
|
*/
|
|
598
|
-
|
|
738
|
+
offsetX?: number;
|
|
599
739
|
/**
|
|
600
|
-
*
|
|
740
|
+
* offsetY
|
|
601
741
|
*/
|
|
602
|
-
|
|
742
|
+
offsetY?: number;
|
|
603
743
|
/**
|
|
604
|
-
*
|
|
744
|
+
* 类型标注
|
|
605
745
|
*/
|
|
606
|
-
|
|
746
|
+
typeAnnotation?: TypeAnnotation;
|
|
607
747
|
/**
|
|
608
|
-
*
|
|
748
|
+
* 字面量的值
|
|
609
749
|
*/
|
|
610
|
-
|
|
750
|
+
value: string;
|
|
611
751
|
/**
|
|
612
|
-
*
|
|
752
|
+
* 国际化键
|
|
613
753
|
*/
|
|
614
|
-
|
|
754
|
+
i18nKey?: string;
|
|
615
755
|
}
|
|
616
756
|
|
|
617
757
|
/**
|
|
618
|
-
*
|
|
758
|
+
* 数字字面量
|
|
619
759
|
*/
|
|
620
|
-
export interface
|
|
621
|
-
concept: '
|
|
622
|
-
/**
|
|
623
|
-
* 数据结构属性名称
|
|
624
|
-
*/
|
|
625
|
-
name: string;
|
|
760
|
+
export interface NumericLiteral {
|
|
761
|
+
concept: 'NumericLiteral';
|
|
626
762
|
/**
|
|
627
|
-
*
|
|
763
|
+
* 逻辑项标题
|
|
628
764
|
*/
|
|
629
765
|
label?: string;
|
|
630
766
|
/**
|
|
631
|
-
*
|
|
767
|
+
* 逻辑项描述
|
|
632
768
|
*/
|
|
633
769
|
description?: string;
|
|
634
770
|
/**
|
|
635
|
-
*
|
|
771
|
+
* 是否折叠
|
|
636
772
|
*/
|
|
637
|
-
|
|
773
|
+
folded?: boolean;
|
|
638
774
|
/**
|
|
639
|
-
*
|
|
640
|
-
*
|
|
641
|
-
* defaultValue结构体
|
|
775
|
+
* offsetX
|
|
642
776
|
*/
|
|
643
|
-
|
|
777
|
+
offsetX?: number;
|
|
644
778
|
/**
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
* JSON 字符串别名
|
|
779
|
+
* offsetY
|
|
648
780
|
*/
|
|
649
|
-
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* 类型参数
|
|
654
|
-
*/
|
|
655
|
-
export interface TypeParam {
|
|
656
|
-
concept: 'TypeParam';
|
|
781
|
+
offsetY?: number;
|
|
657
782
|
/**
|
|
658
|
-
*
|
|
783
|
+
* 类型标注
|
|
659
784
|
*/
|
|
660
|
-
|
|
785
|
+
typeAnnotation?: TypeAnnotation;
|
|
661
786
|
/**
|
|
662
|
-
*
|
|
787
|
+
* 字面量的值
|
|
663
788
|
*/
|
|
664
|
-
|
|
789
|
+
value: string;
|
|
665
790
|
}
|
|
666
791
|
|
|
667
792
|
/**
|
|
668
|
-
*
|
|
793
|
+
* 列表构造器
|
|
669
794
|
*/
|
|
670
|
-
export interface
|
|
671
|
-
concept: '
|
|
795
|
+
export interface NewList {
|
|
796
|
+
concept: 'NewList';
|
|
672
797
|
/**
|
|
673
|
-
*
|
|
798
|
+
* 逻辑项标题
|
|
674
799
|
*/
|
|
675
|
-
|
|
800
|
+
label?: string;
|
|
676
801
|
/**
|
|
677
|
-
*
|
|
802
|
+
* 逻辑项描述
|
|
678
803
|
*/
|
|
679
|
-
description
|
|
804
|
+
description?: string;
|
|
680
805
|
/**
|
|
681
|
-
*
|
|
806
|
+
* 是否折叠
|
|
807
|
+
*/
|
|
808
|
+
folded?: boolean;
|
|
809
|
+
/**
|
|
810
|
+
* offsetX
|
|
811
|
+
*/
|
|
812
|
+
offsetX?: number;
|
|
813
|
+
/**
|
|
814
|
+
* offsetY
|
|
815
|
+
*/
|
|
816
|
+
offsetY?: number;
|
|
817
|
+
/**
|
|
818
|
+
* 类型标注
|
|
682
819
|
*/
|
|
683
820
|
typeAnnotation?: TypeAnnotation;
|
|
684
821
|
/**
|
|
685
|
-
*
|
|
822
|
+
* 成员表达式
|
|
686
823
|
*/
|
|
687
|
-
|
|
824
|
+
items: Array<LogicItem>;
|
|
688
825
|
}
|
|
689
826
|
|
|
690
827
|
export type UILib = Array<ViewComponentDeclaration>;
|
package/nasl.ui.ast.schema.json
CHANGED
|
@@ -101,15 +101,18 @@
|
|
|
101
101
|
},
|
|
102
102
|
"i18nMap": {
|
|
103
103
|
"type": "object",
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
"additionalProperties": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"properties": {
|
|
107
|
+
"size": {
|
|
108
|
+
"type": "number"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": [
|
|
112
|
+
"size"
|
|
113
|
+
],
|
|
114
|
+
"additionalProperties": false
|
|
108
115
|
},
|
|
109
|
-
"required": [
|
|
110
|
-
"size"
|
|
111
|
-
],
|
|
112
|
-
"additionalProperties": false,
|
|
113
116
|
"description": "国际化配置列表"
|
|
114
117
|
}
|
|
115
118
|
},
|
|
@@ -180,6 +183,14 @@
|
|
|
180
183
|
"type": "boolean",
|
|
181
184
|
"description": "是否将任意类型隐式转换成String\n\n仅在属性类型为 string(不包括字符串枚举)的情况下,且 sync 为 falsy 时可配置"
|
|
182
185
|
},
|
|
186
|
+
"unsettable": {
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"description": "不允许该组件在逻辑中设置"
|
|
189
|
+
},
|
|
190
|
+
"isDataSource": {
|
|
191
|
+
"type": "boolean",
|
|
192
|
+
"description": "该属性是否为数据源"
|
|
193
|
+
},
|
|
183
194
|
"tooltipLink": {
|
|
184
195
|
"type": "string",
|
|
185
196
|
"description": "工具提示链接"
|
|
@@ -244,6 +255,8 @@
|
|
|
244
255
|
"group",
|
|
245
256
|
"tsType",
|
|
246
257
|
"sync",
|
|
258
|
+
"unsettable",
|
|
259
|
+
"isDataSource",
|
|
247
260
|
"bindHide",
|
|
248
261
|
"bindOpen",
|
|
249
262
|
"tabKind",
|
|
@@ -278,6 +291,9 @@
|
|
|
278
291
|
},
|
|
279
292
|
{
|
|
280
293
|
"$ref": "#/definitions/PropertySelectSetter"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"$ref": "#/definitions/PropertyTransformSetter"
|
|
281
297
|
}
|
|
282
298
|
],
|
|
283
299
|
"description": "设置器基类"
|
|
@@ -452,6 +468,14 @@
|
|
|
452
468
|
"title": {
|
|
453
469
|
"type": "string",
|
|
454
470
|
"description": "图标标题"
|
|
471
|
+
},
|
|
472
|
+
"customIconFont": {
|
|
473
|
+
"type": "string",
|
|
474
|
+
"description": "使用自定义 iconfont 库"
|
|
475
|
+
},
|
|
476
|
+
"hideUploadIcon": {
|
|
477
|
+
"type": "boolean",
|
|
478
|
+
"description": "隐藏上传图标功能"
|
|
455
479
|
}
|
|
456
480
|
},
|
|
457
481
|
"required": [
|
|
@@ -488,6 +512,20 @@
|
|
|
488
512
|
"additionalProperties": false,
|
|
489
513
|
"description": "属性选择设置器"
|
|
490
514
|
},
|
|
515
|
+
"PropertyTransformSetter": {
|
|
516
|
+
"type": "object",
|
|
517
|
+
"properties": {
|
|
518
|
+
"concept": {
|
|
519
|
+
"type": "string",
|
|
520
|
+
"const": "PropertyTransformSetter"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
"required": [
|
|
524
|
+
"concept"
|
|
525
|
+
],
|
|
526
|
+
"additionalProperties": false,
|
|
527
|
+
"description": "属性选择设置器"
|
|
528
|
+
},
|
|
491
529
|
"DefaultValue": {
|
|
492
530
|
"type": "object",
|
|
493
531
|
"properties": {
|
|
@@ -509,7 +547,6 @@
|
|
|
509
547
|
},
|
|
510
548
|
"required": [
|
|
511
549
|
"concept",
|
|
512
|
-
"expression",
|
|
513
550
|
"playground"
|
|
514
551
|
],
|
|
515
552
|
"additionalProperties": false,
|
|
@@ -533,7 +570,7 @@
|
|
|
533
570
|
"$ref": "#/definitions/NewList"
|
|
534
571
|
}
|
|
535
572
|
],
|
|
536
|
-
"description": "
|
|
573
|
+
"description": "逻辑项"
|
|
537
574
|
},
|
|
538
575
|
"NullLiteral": {
|
|
539
576
|
"type": "object",
|
|
@@ -541,79 +578,37 @@
|
|
|
541
578
|
"concept": {
|
|
542
579
|
"type": "string",
|
|
543
580
|
"const": "NullLiteral"
|
|
544
|
-
}
|
|
545
|
-
},
|
|
546
|
-
"required": [
|
|
547
|
-
"concept"
|
|
548
|
-
],
|
|
549
|
-
"additionalProperties": false,
|
|
550
|
-
"description": "空字面量"
|
|
551
|
-
},
|
|
552
|
-
"BooleanLiteral": {
|
|
553
|
-
"type": "object",
|
|
554
|
-
"properties": {
|
|
555
|
-
"concept": {
|
|
556
|
-
"type": "string",
|
|
557
|
-
"const": "BooleanLiteral"
|
|
558
581
|
},
|
|
559
|
-
"
|
|
560
|
-
"type": "string",
|
|
561
|
-
"description": "字面量的值"
|
|
562
|
-
}
|
|
563
|
-
},
|
|
564
|
-
"required": [
|
|
565
|
-
"concept",
|
|
566
|
-
"value"
|
|
567
|
-
],
|
|
568
|
-
"additionalProperties": false,
|
|
569
|
-
"description": "布尔型字面量"
|
|
570
|
-
},
|
|
571
|
-
"StringLiteral": {
|
|
572
|
-
"type": "object",
|
|
573
|
-
"properties": {
|
|
574
|
-
"concept": {
|
|
582
|
+
"label": {
|
|
575
583
|
"type": "string",
|
|
576
|
-
"
|
|
584
|
+
"description": "逻辑项标题"
|
|
577
585
|
},
|
|
578
|
-
"
|
|
586
|
+
"description": {
|
|
579
587
|
"type": "string",
|
|
580
|
-
"description": "
|
|
588
|
+
"description": "逻辑项描述"
|
|
581
589
|
},
|
|
582
|
-
"
|
|
583
|
-
"type": "
|
|
584
|
-
"description": "
|
|
585
|
-
}
|
|
586
|
-
},
|
|
587
|
-
"required": [
|
|
588
|
-
"concept",
|
|
589
|
-
"value"
|
|
590
|
-
],
|
|
591
|
-
"additionalProperties": false,
|
|
592
|
-
"description": "字符串字面量"
|
|
593
|
-
},
|
|
594
|
-
"NumericLiteral": {
|
|
595
|
-
"type": "object",
|
|
596
|
-
"properties": {
|
|
597
|
-
"concept": {
|
|
598
|
-
"type": "string",
|
|
599
|
-
"const": "NumericLiteral"
|
|
590
|
+
"folded": {
|
|
591
|
+
"type": "boolean",
|
|
592
|
+
"description": "是否折叠"
|
|
600
593
|
},
|
|
601
|
-
"
|
|
602
|
-
"type": "
|
|
603
|
-
"description": "
|
|
594
|
+
"offsetX": {
|
|
595
|
+
"type": "number",
|
|
596
|
+
"description": "offsetX"
|
|
597
|
+
},
|
|
598
|
+
"offsetY": {
|
|
599
|
+
"type": "number",
|
|
600
|
+
"description": "offsetY"
|
|
604
601
|
},
|
|
605
602
|
"typeAnnotation": {
|
|
606
603
|
"$ref": "#/definitions/TypeAnnotation",
|
|
607
|
-
"description": "
|
|
604
|
+
"description": "类型标注"
|
|
608
605
|
}
|
|
609
606
|
},
|
|
610
607
|
"required": [
|
|
611
|
-
"concept"
|
|
612
|
-
"value",
|
|
613
|
-
"typeAnnotation"
|
|
608
|
+
"concept"
|
|
614
609
|
],
|
|
615
610
|
"additionalProperties": false,
|
|
616
|
-
"description": "
|
|
611
|
+
"description": "空字面量"
|
|
617
612
|
},
|
|
618
613
|
"TypeAnnotation": {
|
|
619
614
|
"type": "object",
|
|
@@ -670,25 +665,15 @@
|
|
|
670
665
|
},
|
|
671
666
|
"ruleMap": {
|
|
672
667
|
"type": "object",
|
|
673
|
-
"
|
|
674
|
-
"
|
|
675
|
-
"type": "number"
|
|
676
|
-
}
|
|
668
|
+
"additionalProperties": {
|
|
669
|
+
"type": "number"
|
|
677
670
|
},
|
|
678
|
-
"required": [
|
|
679
|
-
"size"
|
|
680
|
-
],
|
|
681
|
-
"additionalProperties": false,
|
|
682
671
|
"description": "规则对象"
|
|
683
672
|
}
|
|
684
673
|
},
|
|
685
674
|
"required": [
|
|
686
675
|
"concept",
|
|
687
|
-
"typeKind"
|
|
688
|
-
"typeNamespace",
|
|
689
|
-
"typeName",
|
|
690
|
-
"inferred",
|
|
691
|
-
"ruleMap"
|
|
676
|
+
"typeKind"
|
|
692
677
|
],
|
|
693
678
|
"additionalProperties": false,
|
|
694
679
|
"description": "类型标注"
|
|
@@ -732,6 +717,139 @@
|
|
|
732
717
|
"additionalProperties": false,
|
|
733
718
|
"description": "数据结构属性"
|
|
734
719
|
},
|
|
720
|
+
"BooleanLiteral": {
|
|
721
|
+
"type": "object",
|
|
722
|
+
"properties": {
|
|
723
|
+
"concept": {
|
|
724
|
+
"type": "string",
|
|
725
|
+
"const": "BooleanLiteral"
|
|
726
|
+
},
|
|
727
|
+
"label": {
|
|
728
|
+
"type": "string",
|
|
729
|
+
"description": "逻辑项标题"
|
|
730
|
+
},
|
|
731
|
+
"description": {
|
|
732
|
+
"type": "string",
|
|
733
|
+
"description": "逻辑项描述"
|
|
734
|
+
},
|
|
735
|
+
"folded": {
|
|
736
|
+
"type": "boolean",
|
|
737
|
+
"description": "是否折叠"
|
|
738
|
+
},
|
|
739
|
+
"offsetX": {
|
|
740
|
+
"type": "number",
|
|
741
|
+
"description": "offsetX"
|
|
742
|
+
},
|
|
743
|
+
"offsetY": {
|
|
744
|
+
"type": "number",
|
|
745
|
+
"description": "offsetY"
|
|
746
|
+
},
|
|
747
|
+
"typeAnnotation": {
|
|
748
|
+
"$ref": "#/definitions/TypeAnnotation",
|
|
749
|
+
"description": "类型标注"
|
|
750
|
+
},
|
|
751
|
+
"value": {
|
|
752
|
+
"type": "string",
|
|
753
|
+
"description": "字面量的值"
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
"required": [
|
|
757
|
+
"concept",
|
|
758
|
+
"value"
|
|
759
|
+
],
|
|
760
|
+
"additionalProperties": false,
|
|
761
|
+
"description": "布尔型字面量"
|
|
762
|
+
},
|
|
763
|
+
"StringLiteral": {
|
|
764
|
+
"type": "object",
|
|
765
|
+
"properties": {
|
|
766
|
+
"concept": {
|
|
767
|
+
"type": "string",
|
|
768
|
+
"const": "StringLiteral"
|
|
769
|
+
},
|
|
770
|
+
"label": {
|
|
771
|
+
"type": "string",
|
|
772
|
+
"description": "逻辑项标题"
|
|
773
|
+
},
|
|
774
|
+
"description": {
|
|
775
|
+
"type": "string",
|
|
776
|
+
"description": "逻辑项描述"
|
|
777
|
+
},
|
|
778
|
+
"folded": {
|
|
779
|
+
"type": "boolean",
|
|
780
|
+
"description": "是否折叠"
|
|
781
|
+
},
|
|
782
|
+
"offsetX": {
|
|
783
|
+
"type": "number",
|
|
784
|
+
"description": "offsetX"
|
|
785
|
+
},
|
|
786
|
+
"offsetY": {
|
|
787
|
+
"type": "number",
|
|
788
|
+
"description": "offsetY"
|
|
789
|
+
},
|
|
790
|
+
"typeAnnotation": {
|
|
791
|
+
"$ref": "#/definitions/TypeAnnotation",
|
|
792
|
+
"description": "类型标注"
|
|
793
|
+
},
|
|
794
|
+
"value": {
|
|
795
|
+
"type": "string",
|
|
796
|
+
"description": "字面量的值"
|
|
797
|
+
},
|
|
798
|
+
"i18nKey": {
|
|
799
|
+
"type": "string",
|
|
800
|
+
"description": "国际化键"
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"required": [
|
|
804
|
+
"concept",
|
|
805
|
+
"value"
|
|
806
|
+
],
|
|
807
|
+
"additionalProperties": false,
|
|
808
|
+
"description": "字符串字面量"
|
|
809
|
+
},
|
|
810
|
+
"NumericLiteral": {
|
|
811
|
+
"type": "object",
|
|
812
|
+
"properties": {
|
|
813
|
+
"concept": {
|
|
814
|
+
"type": "string",
|
|
815
|
+
"const": "NumericLiteral"
|
|
816
|
+
},
|
|
817
|
+
"label": {
|
|
818
|
+
"type": "string",
|
|
819
|
+
"description": "逻辑项标题"
|
|
820
|
+
},
|
|
821
|
+
"description": {
|
|
822
|
+
"type": "string",
|
|
823
|
+
"description": "逻辑项描述"
|
|
824
|
+
},
|
|
825
|
+
"folded": {
|
|
826
|
+
"type": "boolean",
|
|
827
|
+
"description": "是否折叠"
|
|
828
|
+
},
|
|
829
|
+
"offsetX": {
|
|
830
|
+
"type": "number",
|
|
831
|
+
"description": "offsetX"
|
|
832
|
+
},
|
|
833
|
+
"offsetY": {
|
|
834
|
+
"type": "number",
|
|
835
|
+
"description": "offsetY"
|
|
836
|
+
},
|
|
837
|
+
"typeAnnotation": {
|
|
838
|
+
"$ref": "#/definitions/TypeAnnotation",
|
|
839
|
+
"description": "类型标注"
|
|
840
|
+
},
|
|
841
|
+
"value": {
|
|
842
|
+
"type": "string",
|
|
843
|
+
"description": "字面量的值"
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"required": [
|
|
847
|
+
"concept",
|
|
848
|
+
"value"
|
|
849
|
+
],
|
|
850
|
+
"additionalProperties": false,
|
|
851
|
+
"description": "数字字面量"
|
|
852
|
+
},
|
|
735
853
|
"NewList": {
|
|
736
854
|
"type": "object",
|
|
737
855
|
"properties": {
|
|
@@ -739,9 +857,29 @@
|
|
|
739
857
|
"type": "string",
|
|
740
858
|
"const": "NewList"
|
|
741
859
|
},
|
|
860
|
+
"label": {
|
|
861
|
+
"type": "string",
|
|
862
|
+
"description": "逻辑项标题"
|
|
863
|
+
},
|
|
864
|
+
"description": {
|
|
865
|
+
"type": "string",
|
|
866
|
+
"description": "逻辑项描述"
|
|
867
|
+
},
|
|
868
|
+
"folded": {
|
|
869
|
+
"type": "boolean",
|
|
870
|
+
"description": "是否折叠"
|
|
871
|
+
},
|
|
872
|
+
"offsetX": {
|
|
873
|
+
"type": "number",
|
|
874
|
+
"description": "offsetX"
|
|
875
|
+
},
|
|
876
|
+
"offsetY": {
|
|
877
|
+
"type": "number",
|
|
878
|
+
"description": "offsetY"
|
|
879
|
+
},
|
|
742
880
|
"typeAnnotation": {
|
|
743
881
|
"$ref": "#/definitions/TypeAnnotation",
|
|
744
|
-
"description": "
|
|
882
|
+
"description": "类型标注"
|
|
745
883
|
},
|
|
746
884
|
"items": {
|
|
747
885
|
"type": "array",
|
|
@@ -1018,8 +1156,7 @@
|
|
|
1018
1156
|
},
|
|
1019
1157
|
"required": [
|
|
1020
1158
|
"concept",
|
|
1021
|
-
"name"
|
|
1022
|
-
"description"
|
|
1159
|
+
"name"
|
|
1023
1160
|
],
|
|
1024
1161
|
"additionalProperties": false,
|
|
1025
1162
|
"description": "输出参数"
|
package/nasl.ui.options.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare namespace nasl.ui {
|
|
|
4
4
|
/**
|
|
5
5
|
* 设置器基类
|
|
6
6
|
*/
|
|
7
|
-
export type BaseSetter<T extends object, K extends keyof T> = InputSetter | SwitchSetter | EnumSelectSetter<T, K> | CapsulesSetter<T, K> | NumberInputSetter | IconSetter | ImageSetter | PropertySelectSetter;
|
|
7
|
+
export type BaseSetter<T extends object, K extends keyof T> = InputSetter | SwitchSetter | EnumSelectSetter<T, K> | CapsulesSetter<T, K> | NumberInputSetter | IconSetter | ImageSetter | PropertySelectSetter | PropertyTransformSetter;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* 输入框设置器
|
|
@@ -91,6 +91,14 @@ declare namespace nasl.ui {
|
|
|
91
91
|
* 图标标题
|
|
92
92
|
*/
|
|
93
93
|
title?: string;
|
|
94
|
+
/**
|
|
95
|
+
* 使用自定义 iconfont 库
|
|
96
|
+
*/
|
|
97
|
+
customIconFont?: string;
|
|
98
|
+
/**
|
|
99
|
+
* 隐藏上传图标功能
|
|
100
|
+
*/
|
|
101
|
+
hideUploadIcon?: boolean;
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
/**
|
|
@@ -109,6 +117,14 @@ declare namespace nasl.ui {
|
|
|
109
117
|
|
|
110
118
|
}
|
|
111
119
|
|
|
120
|
+
/**
|
|
121
|
+
* 属性选择设置器
|
|
122
|
+
*/
|
|
123
|
+
export interface PropertyTransformSetter {
|
|
124
|
+
concept: 'PropertyTransformSetter';
|
|
125
|
+
|
|
126
|
+
}
|
|
127
|
+
|
|
112
128
|
/**
|
|
113
129
|
* 页面组件
|
|
114
130
|
*/
|
|
@@ -163,6 +179,14 @@ declare namespace nasl.ui {
|
|
|
163
179
|
* 组件属性描述
|
|
164
180
|
*/
|
|
165
181
|
description?: string;
|
|
182
|
+
/**
|
|
183
|
+
* 不允许该组件在逻辑中设置
|
|
184
|
+
*/
|
|
185
|
+
unsettable: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* 该属性是否为数据源
|
|
188
|
+
*/
|
|
189
|
+
isDataSource: boolean;
|
|
166
190
|
/**
|
|
167
191
|
* 工具提示链接
|
|
168
192
|
*/
|