@nasl/types 0.1.7 → 0.1.8-beta.1
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 +220 -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": "工具提示链接"
|
|
@@ -278,6 +289,9 @@
|
|
|
278
289
|
},
|
|
279
290
|
{
|
|
280
291
|
"$ref": "#/definitions/PropertySelectSetter"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"$ref": "#/definitions/PropertyTransformSetter"
|
|
281
295
|
}
|
|
282
296
|
],
|
|
283
297
|
"description": "设置器基类"
|
|
@@ -452,6 +466,14 @@
|
|
|
452
466
|
"title": {
|
|
453
467
|
"type": "string",
|
|
454
468
|
"description": "图标标题"
|
|
469
|
+
},
|
|
470
|
+
"customIconFont": {
|
|
471
|
+
"type": "string",
|
|
472
|
+
"description": "使用自定义 iconfont 库"
|
|
473
|
+
},
|
|
474
|
+
"hideUploadIcon": {
|
|
475
|
+
"type": "boolean",
|
|
476
|
+
"description": "隐藏上传图标功能"
|
|
455
477
|
}
|
|
456
478
|
},
|
|
457
479
|
"required": [
|
|
@@ -488,6 +510,20 @@
|
|
|
488
510
|
"additionalProperties": false,
|
|
489
511
|
"description": "属性选择设置器"
|
|
490
512
|
},
|
|
513
|
+
"PropertyTransformSetter": {
|
|
514
|
+
"type": "object",
|
|
515
|
+
"properties": {
|
|
516
|
+
"concept": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"const": "PropertyTransformSetter"
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"required": [
|
|
522
|
+
"concept"
|
|
523
|
+
],
|
|
524
|
+
"additionalProperties": false,
|
|
525
|
+
"description": "属性选择设置器"
|
|
526
|
+
},
|
|
491
527
|
"DefaultValue": {
|
|
492
528
|
"type": "object",
|
|
493
529
|
"properties": {
|
|
@@ -509,7 +545,6 @@
|
|
|
509
545
|
},
|
|
510
546
|
"required": [
|
|
511
547
|
"concept",
|
|
512
|
-
"expression",
|
|
513
548
|
"playground"
|
|
514
549
|
],
|
|
515
550
|
"additionalProperties": false,
|
|
@@ -533,7 +568,7 @@
|
|
|
533
568
|
"$ref": "#/definitions/NewList"
|
|
534
569
|
}
|
|
535
570
|
],
|
|
536
|
-
"description": "
|
|
571
|
+
"description": "逻辑项"
|
|
537
572
|
},
|
|
538
573
|
"NullLiteral": {
|
|
539
574
|
"type": "object",
|
|
@@ -541,79 +576,37 @@
|
|
|
541
576
|
"concept": {
|
|
542
577
|
"type": "string",
|
|
543
578
|
"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
579
|
},
|
|
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": {
|
|
580
|
+
"label": {
|
|
575
581
|
"type": "string",
|
|
576
|
-
"
|
|
582
|
+
"description": "逻辑项标题"
|
|
577
583
|
},
|
|
578
|
-
"
|
|
584
|
+
"description": {
|
|
579
585
|
"type": "string",
|
|
580
|
-
"description": "
|
|
586
|
+
"description": "逻辑项描述"
|
|
581
587
|
},
|
|
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"
|
|
588
|
+
"folded": {
|
|
589
|
+
"type": "boolean",
|
|
590
|
+
"description": "是否折叠"
|
|
600
591
|
},
|
|
601
|
-
"
|
|
602
|
-
"type": "
|
|
603
|
-
"description": "
|
|
592
|
+
"offsetX": {
|
|
593
|
+
"type": "number",
|
|
594
|
+
"description": "offsetX"
|
|
595
|
+
},
|
|
596
|
+
"offsetY": {
|
|
597
|
+
"type": "number",
|
|
598
|
+
"description": "offsetY"
|
|
604
599
|
},
|
|
605
600
|
"typeAnnotation": {
|
|
606
601
|
"$ref": "#/definitions/TypeAnnotation",
|
|
607
|
-
"description": "
|
|
602
|
+
"description": "类型标注"
|
|
608
603
|
}
|
|
609
604
|
},
|
|
610
605
|
"required": [
|
|
611
|
-
"concept"
|
|
612
|
-
"value",
|
|
613
|
-
"typeAnnotation"
|
|
606
|
+
"concept"
|
|
614
607
|
],
|
|
615
608
|
"additionalProperties": false,
|
|
616
|
-
"description": "
|
|
609
|
+
"description": "空字面量"
|
|
617
610
|
},
|
|
618
611
|
"TypeAnnotation": {
|
|
619
612
|
"type": "object",
|
|
@@ -670,25 +663,15 @@
|
|
|
670
663
|
},
|
|
671
664
|
"ruleMap": {
|
|
672
665
|
"type": "object",
|
|
673
|
-
"
|
|
674
|
-
"
|
|
675
|
-
"type": "number"
|
|
676
|
-
}
|
|
666
|
+
"additionalProperties": {
|
|
667
|
+
"type": "number"
|
|
677
668
|
},
|
|
678
|
-
"required": [
|
|
679
|
-
"size"
|
|
680
|
-
],
|
|
681
|
-
"additionalProperties": false,
|
|
682
669
|
"description": "规则对象"
|
|
683
670
|
}
|
|
684
671
|
},
|
|
685
672
|
"required": [
|
|
686
673
|
"concept",
|
|
687
|
-
"typeKind"
|
|
688
|
-
"typeNamespace",
|
|
689
|
-
"typeName",
|
|
690
|
-
"inferred",
|
|
691
|
-
"ruleMap"
|
|
674
|
+
"typeKind"
|
|
692
675
|
],
|
|
693
676
|
"additionalProperties": false,
|
|
694
677
|
"description": "类型标注"
|
|
@@ -732,6 +715,139 @@
|
|
|
732
715
|
"additionalProperties": false,
|
|
733
716
|
"description": "数据结构属性"
|
|
734
717
|
},
|
|
718
|
+
"BooleanLiteral": {
|
|
719
|
+
"type": "object",
|
|
720
|
+
"properties": {
|
|
721
|
+
"concept": {
|
|
722
|
+
"type": "string",
|
|
723
|
+
"const": "BooleanLiteral"
|
|
724
|
+
},
|
|
725
|
+
"label": {
|
|
726
|
+
"type": "string",
|
|
727
|
+
"description": "逻辑项标题"
|
|
728
|
+
},
|
|
729
|
+
"description": {
|
|
730
|
+
"type": "string",
|
|
731
|
+
"description": "逻辑项描述"
|
|
732
|
+
},
|
|
733
|
+
"folded": {
|
|
734
|
+
"type": "boolean",
|
|
735
|
+
"description": "是否折叠"
|
|
736
|
+
},
|
|
737
|
+
"offsetX": {
|
|
738
|
+
"type": "number",
|
|
739
|
+
"description": "offsetX"
|
|
740
|
+
},
|
|
741
|
+
"offsetY": {
|
|
742
|
+
"type": "number",
|
|
743
|
+
"description": "offsetY"
|
|
744
|
+
},
|
|
745
|
+
"typeAnnotation": {
|
|
746
|
+
"$ref": "#/definitions/TypeAnnotation",
|
|
747
|
+
"description": "类型标注"
|
|
748
|
+
},
|
|
749
|
+
"value": {
|
|
750
|
+
"type": "string",
|
|
751
|
+
"description": "字面量的值"
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
"required": [
|
|
755
|
+
"concept",
|
|
756
|
+
"value"
|
|
757
|
+
],
|
|
758
|
+
"additionalProperties": false,
|
|
759
|
+
"description": "布尔型字面量"
|
|
760
|
+
},
|
|
761
|
+
"StringLiteral": {
|
|
762
|
+
"type": "object",
|
|
763
|
+
"properties": {
|
|
764
|
+
"concept": {
|
|
765
|
+
"type": "string",
|
|
766
|
+
"const": "StringLiteral"
|
|
767
|
+
},
|
|
768
|
+
"label": {
|
|
769
|
+
"type": "string",
|
|
770
|
+
"description": "逻辑项标题"
|
|
771
|
+
},
|
|
772
|
+
"description": {
|
|
773
|
+
"type": "string",
|
|
774
|
+
"description": "逻辑项描述"
|
|
775
|
+
},
|
|
776
|
+
"folded": {
|
|
777
|
+
"type": "boolean",
|
|
778
|
+
"description": "是否折叠"
|
|
779
|
+
},
|
|
780
|
+
"offsetX": {
|
|
781
|
+
"type": "number",
|
|
782
|
+
"description": "offsetX"
|
|
783
|
+
},
|
|
784
|
+
"offsetY": {
|
|
785
|
+
"type": "number",
|
|
786
|
+
"description": "offsetY"
|
|
787
|
+
},
|
|
788
|
+
"typeAnnotation": {
|
|
789
|
+
"$ref": "#/definitions/TypeAnnotation",
|
|
790
|
+
"description": "类型标注"
|
|
791
|
+
},
|
|
792
|
+
"value": {
|
|
793
|
+
"type": "string",
|
|
794
|
+
"description": "字面量的值"
|
|
795
|
+
},
|
|
796
|
+
"i18nKey": {
|
|
797
|
+
"type": "string",
|
|
798
|
+
"description": "国际化键"
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
"required": [
|
|
802
|
+
"concept",
|
|
803
|
+
"value"
|
|
804
|
+
],
|
|
805
|
+
"additionalProperties": false,
|
|
806
|
+
"description": "字符串字面量"
|
|
807
|
+
},
|
|
808
|
+
"NumericLiteral": {
|
|
809
|
+
"type": "object",
|
|
810
|
+
"properties": {
|
|
811
|
+
"concept": {
|
|
812
|
+
"type": "string",
|
|
813
|
+
"const": "NumericLiteral"
|
|
814
|
+
},
|
|
815
|
+
"label": {
|
|
816
|
+
"type": "string",
|
|
817
|
+
"description": "逻辑项标题"
|
|
818
|
+
},
|
|
819
|
+
"description": {
|
|
820
|
+
"type": "string",
|
|
821
|
+
"description": "逻辑项描述"
|
|
822
|
+
},
|
|
823
|
+
"folded": {
|
|
824
|
+
"type": "boolean",
|
|
825
|
+
"description": "是否折叠"
|
|
826
|
+
},
|
|
827
|
+
"offsetX": {
|
|
828
|
+
"type": "number",
|
|
829
|
+
"description": "offsetX"
|
|
830
|
+
},
|
|
831
|
+
"offsetY": {
|
|
832
|
+
"type": "number",
|
|
833
|
+
"description": "offsetY"
|
|
834
|
+
},
|
|
835
|
+
"typeAnnotation": {
|
|
836
|
+
"$ref": "#/definitions/TypeAnnotation",
|
|
837
|
+
"description": "类型标注"
|
|
838
|
+
},
|
|
839
|
+
"value": {
|
|
840
|
+
"type": "string",
|
|
841
|
+
"description": "字面量的值"
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
"required": [
|
|
845
|
+
"concept",
|
|
846
|
+
"value"
|
|
847
|
+
],
|
|
848
|
+
"additionalProperties": false,
|
|
849
|
+
"description": "数字字面量"
|
|
850
|
+
},
|
|
735
851
|
"NewList": {
|
|
736
852
|
"type": "object",
|
|
737
853
|
"properties": {
|
|
@@ -739,9 +855,29 @@
|
|
|
739
855
|
"type": "string",
|
|
740
856
|
"const": "NewList"
|
|
741
857
|
},
|
|
858
|
+
"label": {
|
|
859
|
+
"type": "string",
|
|
860
|
+
"description": "逻辑项标题"
|
|
861
|
+
},
|
|
862
|
+
"description": {
|
|
863
|
+
"type": "string",
|
|
864
|
+
"description": "逻辑项描述"
|
|
865
|
+
},
|
|
866
|
+
"folded": {
|
|
867
|
+
"type": "boolean",
|
|
868
|
+
"description": "是否折叠"
|
|
869
|
+
},
|
|
870
|
+
"offsetX": {
|
|
871
|
+
"type": "number",
|
|
872
|
+
"description": "offsetX"
|
|
873
|
+
},
|
|
874
|
+
"offsetY": {
|
|
875
|
+
"type": "number",
|
|
876
|
+
"description": "offsetY"
|
|
877
|
+
},
|
|
742
878
|
"typeAnnotation": {
|
|
743
879
|
"$ref": "#/definitions/TypeAnnotation",
|
|
744
|
-
"description": "
|
|
880
|
+
"description": "类型标注"
|
|
745
881
|
},
|
|
746
882
|
"items": {
|
|
747
883
|
"type": "array",
|
|
@@ -1018,8 +1154,7 @@
|
|
|
1018
1154
|
},
|
|
1019
1155
|
"required": [
|
|
1020
1156
|
"concept",
|
|
1021
|
-
"name"
|
|
1022
|
-
"description"
|
|
1157
|
+
"name"
|
|
1023
1158
|
],
|
|
1024
1159
|
"additionalProperties": false,
|
|
1025
1160
|
"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
|
*/
|