deeke-script-app 1.7.2 → 1.7.3

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.
@@ -4,7 +4,12 @@
4
4
  "description": "DeekeScript Android 项目配置文件,用于动态渲染页面",
5
5
  "type": "object",
6
6
  "required": ["name", "versionCode", "versionName", "icon", "host", "switchSetting", "groups", "bottomMenus", "settingLists", "apis"],
7
+ "additionalProperties": false,
7
8
  "properties": {
9
+ "$schema": {
10
+ "type": "string",
11
+ "description": "JSON Schema 引用路径"
12
+ },
8
13
  "name": {
9
14
  "type": "string",
10
15
  "description": "App安装成功之后,在手机上的名称"
@@ -43,6 +48,7 @@
43
48
  "type": "object",
44
49
  "description": "功能开关设置",
45
50
  "required": ["alipay"],
51
+ "additionalProperties": false,
46
52
  "properties": {
47
53
  "alipay": {
48
54
  "type": "boolean",
@@ -56,6 +62,7 @@
56
62
  "items": {
57
63
  "type": "object",
58
64
  "required": ["title", "methods"],
65
+ "additionalProperties": false,
59
66
  "properties": {
60
67
  "title": {
61
68
  "type": "string",
@@ -87,6 +94,7 @@
87
94
  "items": {
88
95
  "type": "object",
89
96
  "required": ["title", "icon", "type"],
97
+ "additionalProperties": false,
90
98
  "properties": {
91
99
  "title": {
92
100
  "type": "string",
@@ -114,6 +122,7 @@
114
122
  "items": {
115
123
  "type": "object",
116
124
  "required": ["title", "icon", "type"],
125
+ "additionalProperties": false,
117
126
  "properties": {
118
127
  "title": {
119
128
  "type": "string",
@@ -161,6 +170,7 @@
161
170
  "items": {
162
171
  "type": "object",
163
172
  "required": ["type", "url"],
173
+ "additionalProperties": false,
164
174
  "properties": {
165
175
  "type": {
166
176
  "type": "string",
@@ -179,6 +189,7 @@
179
189
  "method": {
180
190
  "type": "object",
181
191
  "required": ["title", "icon"],
192
+ "additionalProperties": false,
182
193
  "properties": {
183
194
  "title": {
184
195
  "type": "string",
@@ -220,6 +231,7 @@
220
231
  "activity": {
221
232
  "type": "object",
222
233
  "description": "活动配置",
234
+ "additionalProperties": false,
223
235
  "properties": {
224
236
  "notice": {
225
237
  "type": "string",
@@ -238,6 +250,7 @@
238
250
  "description": "活动功能组",
239
251
  "items": {
240
252
  "type": "object",
253
+ "additionalProperties": false,
241
254
  "properties": {
242
255
  "title": {
243
256
  "type": "string"
@@ -261,6 +274,7 @@
261
274
  "settingPage": {
262
275
  "type": "object",
263
276
  "required": ["params"],
277
+ "additionalProperties": false,
264
278
  "properties": {
265
279
  "params": {
266
280
  "type": "array",
@@ -272,217 +286,392 @@
272
286
  }
273
287
  },
274
288
  "param": {
275
- "type": "object",
276
- "required": ["type"],
277
- "properties": {
278
- "type": {
279
- "type": "string",
280
- "description": "参数类型",
281
- "enum": [
282
- "text",
283
- "number",
284
- "numberRange",
285
- "textArea",
286
- "switch",
287
- "radio",
288
- "checkbox",
289
- "checkboxGroup",
290
- "select",
291
- "date",
292
- "time",
293
- "datetime",
294
- "color",
295
- "file",
296
- "image",
297
- "notice"
298
- ]
299
- },
300
- "label": {
301
- "type": "string",
302
- "description": "标签文本"
303
- },
304
- "name": {
305
- "type": "string",
306
- "description": "参数名称(用于存储和获取值)"
307
- },
308
- "value": {
309
- "description": "默认值(类型根据type而定)"
310
- },
311
- "hint": {
312
- "type": "string",
313
- "description": "提示文本"
314
- },
315
- "notice": {
316
- "type": "string",
317
- "description": "通知文本"
318
- },
319
- "title": {
320
- "type": "string",
321
- "description": "标题(用于notice类型)"
322
- },
323
- "min": {
324
- "type": "number",
325
- "description": "最小值(用于numberRange类型)"
326
- },
327
- "max": {
328
- "type": "number",
329
- "description": "最大值(用于numberRange类型)"
330
- },
331
- "step": {
332
- "type": "number",
333
- "description": "步长(用于numberRange类型)"
334
- },
335
- "options": {
336
- "type": "array",
337
- "description": "选项列表(用于radio、select类型)",
338
- "items": {
339
- "type": "object",
340
- "properties": {
341
- "label": {
342
- "type": "string"
343
- },
344
- "value": {
345
- "type": "string"
346
- }
289
+ "oneOf": [
290
+ {
291
+ "type": "object",
292
+ "required": ["type", "title"],
293
+ "additionalProperties": false,
294
+ "properties": {
295
+ "type": {
296
+ "type": "string",
297
+ "const": "notice"
298
+ },
299
+ "title": {
300
+ "type": "string",
301
+ "description": "标题"
302
+ },
303
+ "hidden": {
304
+ "type": "boolean",
305
+ "description": "是否隐藏",
306
+ "default": false
307
+ },
308
+ "textColor": {
309
+ "type": "string",
310
+ "description": "文本颜色",
311
+ "pattern": "^#[0-9A-Fa-f]{6}$"
312
+ },
313
+ "textSize": {
314
+ "type": "number",
315
+ "description": "文本大小"
347
316
  }
348
317
  }
349
318
  },
350
- "dataFrom": {
351
- "type": "string",
352
- "description": "数据来源(如:role)"
353
- },
354
- "children": {
355
- "type": "array",
356
- "description": "子选项(用于checkboxGroup类型)",
357
- "items": {
358
- "type": "string"
359
- }
360
- },
361
- "values": {
362
- "type": "array",
363
- "description": "值列表(用于checkboxGroup类型)",
364
- "items": {
365
- "type": "string"
319
+ {
320
+ "type": "object",
321
+ "required": ["type", "label", "name", "min", "max", "value"],
322
+ "additionalProperties": false,
323
+ "properties": {
324
+ "type": {
325
+ "type": "string",
326
+ "const": "numberRange"
327
+ },
328
+ "label": {
329
+ "type": "string",
330
+ "description": "标签文本"
331
+ },
332
+ "name": {
333
+ "type": "string",
334
+ "description": "参数名称(用于存储和获取值)"
335
+ },
336
+ "min": {
337
+ "type": "number",
338
+ "description": "最小值"
339
+ },
340
+ "max": {
341
+ "type": "number",
342
+ "description": "最大值"
343
+ },
344
+ "value": {
345
+ "type": "number",
346
+ "description": "默认值"
347
+ },
348
+ "step": {
349
+ "type": "number",
350
+ "description": "步长"
351
+ },
352
+ "hidden": {
353
+ "type": "boolean",
354
+ "description": "是否隐藏",
355
+ "default": false
356
+ }
366
357
  }
367
358
  },
368
- "columnCount": {
369
- "type": "number",
370
- "description": "列数(用于checkboxGroup类型)"
371
- },
372
- "lines": {
373
- "type": "number",
374
- "description": "行数(用于textArea类型)"
375
- },
376
- "textColor": {
377
- "type": "string",
378
- "description": "文本颜色(用于notice类型)",
379
- "pattern": "^#[0-9A-Fa-f]{6}$"
380
- },
381
- "textSize": {
382
- "type": "number",
383
- "description": "文本大小(用于notice类型)"
384
- },
385
- "hidden": {
386
- "type": "boolean",
387
- "description": "是否隐藏",
388
- "default": false
389
- }
390
- },
391
- "allOf": [
392
359
  {
393
- "if": {
394
- "properties": {
395
- "type": {
396
- "const": "numberRange"
397
- }
360
+ "type": "object",
361
+ "required": ["type", "label", "name"],
362
+ "additionalProperties": false,
363
+ "properties": {
364
+ "type": {
365
+ "type": "string",
366
+ "const": "textArea"
367
+ },
368
+ "label": {
369
+ "type": "string",
370
+ "description": "标签文本"
371
+ },
372
+ "name": {
373
+ "type": "string",
374
+ "description": "参数名称(用于存储和获取值)"
375
+ },
376
+ "value": {
377
+ "type": "string",
378
+ "description": "默认值"
379
+ },
380
+ "hint": {
381
+ "type": "string",
382
+ "description": "提示文本"
383
+ },
384
+ "notice": {
385
+ "type": "string",
386
+ "description": "通知文本"
387
+ },
388
+ "lines": {
389
+ "type": "number",
390
+ "description": "行数"
391
+ },
392
+ "hidden": {
393
+ "type": "boolean",
394
+ "description": "是否隐藏",
395
+ "default": false
398
396
  }
399
- },
400
- "then": {
401
- "required": ["label", "name", "min", "max", "value"]
402
397
  }
403
398
  },
404
399
  {
405
- "if": {
406
- "properties": {
407
- "type": {
408
- "const": "textArea"
400
+ "type": "object",
401
+ "required": ["type", "label", "name", "children", "values"],
402
+ "additionalProperties": false,
403
+ "properties": {
404
+ "type": {
405
+ "type": "string",
406
+ "const": "checkboxGroup"
407
+ },
408
+ "label": {
409
+ "type": "string",
410
+ "description": "标签文本"
411
+ },
412
+ "name": {
413
+ "type": "string",
414
+ "description": "参数名称(用于存储和获取值)"
415
+ },
416
+ "children": {
417
+ "type": "array",
418
+ "description": "子选项",
419
+ "items": {
420
+ "type": "string"
409
421
  }
422
+ },
423
+ "values": {
424
+ "type": "array",
425
+ "description": "值列表",
426
+ "items": {
427
+ "type": "string"
428
+ }
429
+ },
430
+ "columnCount": {
431
+ "type": "number",
432
+ "description": "列数"
433
+ },
434
+ "hidden": {
435
+ "type": "boolean",
436
+ "description": "是否隐藏",
437
+ "default": false
410
438
  }
411
- },
412
- "then": {
413
- "required": ["label", "name"]
414
439
  }
415
440
  },
416
441
  {
417
- "if": {
418
- "properties": {
419
- "type": {
420
- "const": "checkboxGroup"
421
- }
442
+ "type": "object",
443
+ "required": ["type", "label", "name"],
444
+ "additionalProperties": false,
445
+ "properties": {
446
+ "type": {
447
+ "type": "string",
448
+ "const": "number"
449
+ },
450
+ "label": {
451
+ "type": "string",
452
+ "description": "标签文本"
453
+ },
454
+ "name": {
455
+ "type": "string",
456
+ "description": "参数名称(用于存储和获取值)"
457
+ },
458
+ "value": {
459
+ "type": "number",
460
+ "description": "默认值(数字类型)"
461
+ },
462
+ "hint": {
463
+ "type": "string",
464
+ "description": "提示文本"
465
+ },
466
+ "notice": {
467
+ "type": "string",
468
+ "description": "通知文本"
469
+ },
470
+ "hidden": {
471
+ "type": "boolean",
472
+ "description": "是否隐藏",
473
+ "default": false
422
474
  }
423
- },
424
- "then": {
425
- "required": ["label", "name", "children", "values"]
426
475
  }
427
476
  },
428
477
  {
429
- "if": {
430
- "properties": {
431
- "type": {
432
- "const": "switch"
433
- }
478
+ "type": "object",
479
+ "required": ["type", "label", "name"],
480
+ "additionalProperties": false,
481
+ "properties": {
482
+ "type": {
483
+ "type": "string",
484
+ "const": "digit"
485
+ },
486
+ "label": {
487
+ "type": "string",
488
+ "description": "标签文本"
489
+ },
490
+ "name": {
491
+ "type": "string",
492
+ "description": "参数名称(用于存储和获取值)"
493
+ },
494
+ "value": {
495
+ "type": "integer",
496
+ "description": "默认值(整数类型)"
497
+ },
498
+ "hint": {
499
+ "type": "string",
500
+ "description": "提示文本"
501
+ },
502
+ "notice": {
503
+ "type": "string",
504
+ "description": "通知文本"
505
+ },
506
+ "hidden": {
507
+ "type": "boolean",
508
+ "description": "是否隐藏",
509
+ "default": false
434
510
  }
435
- },
436
- "then": {
437
- "required": ["label", "name"]
438
511
  }
439
512
  },
440
513
  {
441
- "if": {
442
- "properties": {
443
- "type": {
444
- "const": "radio"
445
- }
514
+ "type": "object",
515
+ "required": ["type", "label", "name", "min", "max", "value"],
516
+ "additionalProperties": false,
517
+ "properties": {
518
+ "type": {
519
+ "type": "string",
520
+ "const": "digitRange"
521
+ },
522
+ "label": {
523
+ "type": "string",
524
+ "description": "标签文本"
525
+ },
526
+ "name": {
527
+ "type": "string",
528
+ "description": "参数名称(用于存储和获取值)"
529
+ },
530
+ "min": {
531
+ "type": "integer",
532
+ "description": "最小值(整数)"
533
+ },
534
+ "max": {
535
+ "type": "integer",
536
+ "description": "最大值(整数)"
537
+ },
538
+ "value": {
539
+ "type": "integer",
540
+ "description": "默认值(整数)"
541
+ },
542
+ "step": {
543
+ "type": "integer",
544
+ "description": "步长(整数)"
545
+ },
546
+ "hidden": {
547
+ "type": "boolean",
548
+ "description": "是否隐藏",
549
+ "default": false
446
550
  }
447
- },
448
- "then": {
449
- "required": ["label", "name"]
450
551
  }
451
552
  },
452
553
  {
453
- "if": {
454
- "properties": {
455
- "type": {
456
- "const": "text"
457
- }
554
+ "type": "object",
555
+ "required": ["type", "label", "name"],
556
+ "additionalProperties": false,
557
+ "properties": {
558
+ "type": {
559
+ "type": "string",
560
+ "const": "switch"
561
+ },
562
+ "label": {
563
+ "type": "string",
564
+ "description": "标签文本"
565
+ },
566
+ "name": {
567
+ "type": "string",
568
+ "description": "参数名称(用于存储和获取值)"
569
+ },
570
+ "value": {
571
+ "type": "boolean",
572
+ "description": "默认值(布尔类型)"
573
+ },
574
+ "hint": {
575
+ "type": "string",
576
+ "description": "提示文本"
577
+ },
578
+ "notice": {
579
+ "type": "string",
580
+ "description": "通知文本"
581
+ },
582
+ "hidden": {
583
+ "type": "boolean",
584
+ "description": "是否隐藏",
585
+ "default": false
458
586
  }
459
- },
460
- "then": {
461
- "required": ["label", "name"]
462
587
  }
463
588
  },
464
589
  {
465
- "if": {
466
- "properties": {
467
- "type": {
468
- "const": "number"
469
- }
590
+ "type": "object",
591
+ "required": ["type", "label", "name"],
592
+ "additionalProperties": false,
593
+ "properties": {
594
+ "type": {
595
+ "type": "string",
596
+ "const": "text"
597
+ },
598
+ "label": {
599
+ "type": "string",
600
+ "description": "标签文本"
601
+ },
602
+ "name": {
603
+ "type": "string",
604
+ "description": "参数名称(用于存储和获取值)"
605
+ },
606
+ "value": {
607
+ "type": "string",
608
+ "description": "默认值"
609
+ },
610
+ "hint": {
611
+ "type": "string",
612
+ "description": "提示文本"
613
+ },
614
+ "notice": {
615
+ "type": "string",
616
+ "description": "通知文本"
617
+ },
618
+ "lines": {
619
+ "type": "number",
620
+ "description": "行数(用于多行文本)"
621
+ },
622
+ "hidden": {
623
+ "type": "boolean",
624
+ "description": "是否隐藏",
625
+ "default": false
470
626
  }
471
- },
472
- "then": {
473
- "required": ["label", "name"]
474
627
  }
475
628
  },
476
629
  {
477
- "if": {
478
- "properties": {
479
- "type": {
480
- "const": "notice"
630
+ "type": "object",
631
+ "required": ["type", "label", "name"],
632
+ "additionalProperties": false,
633
+ "properties": {
634
+ "type": {
635
+ "type": "string",
636
+ "enum": ["radio", "select"]
637
+ },
638
+ "label": {
639
+ "type": "string",
640
+ "description": "标签文本"
641
+ },
642
+ "name": {
643
+ "type": "string",
644
+ "description": "参数名称(用于存储和获取值)"
645
+ },
646
+ "value": {
647
+ "type": "string",
648
+ "description": "默认值"
649
+ },
650
+ "options": {
651
+ "type": "array",
652
+ "description": "选项列表",
653
+ "items": {
654
+ "type": "object",
655
+ "additionalProperties": false,
656
+ "properties": {
657
+ "label": {
658
+ "type": "string"
659
+ },
660
+ "value": {
661
+ "type": "string"
662
+ }
663
+ }
481
664
  }
665
+ },
666
+ "dataFrom": {
667
+ "type": "string",
668
+ "description": "数据来源(如:role)"
669
+ },
670
+ "hidden": {
671
+ "type": "boolean",
672
+ "description": "是否隐藏",
673
+ "default": false
482
674
  }
483
- },
484
- "then": {
485
- "required": ["title"]
486
675
  }
487
676
  }
488
677
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deeke-script-app",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "DeekeScript应用",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
package/test.json CHANGED
@@ -1,8 +1,6 @@
1
1
  {
2
2
  "$schema": "./deekeScript.schema.json",
3
3
  "name": "test",
4
- "version": "1.0.0",
5
- "description": "test",
6
4
  "versionCode": "100",
7
5
  "versionName": "名称",
8
6
  "debug": true,
@@ -27,6 +25,74 @@
27
25
  "label": "标题",
28
26
  "name": "title",
29
27
  "type": "number"
28
+ },
29
+ {
30
+ "type": "notice",
31
+ "title": "提示"
32
+ },
33
+ {
34
+ "type": "switch",
35
+ "label": "标题",
36
+ "name": "title",
37
+ "value": true
38
+ },
39
+ {
40
+ "type": "number",
41
+ "label": "标题",
42
+ "name": "title",
43
+ "value": 3223
44
+ },
45
+ {
46
+ "type": "digit",
47
+ "label": "标题",
48
+ "name": "title",
49
+ "value": 32
50
+ },
51
+ {
52
+ "type": "numberRange",
53
+ "label": "标题",
54
+ "name": "title",
55
+ "value": 32,
56
+ "min": 0,
57
+ "max": 100,
58
+ "step": 1
59
+ },
60
+ {
61
+ "type": "textArea",
62
+ "label": "标题",
63
+ "name": "title",
64
+ "value": "32",
65
+ "lines": 3
66
+ },
67
+ {
68
+ "type": "checkboxGroup",
69
+ "label": "标题",
70
+ "name": "title",
71
+ "children": ["1", "2", "3"],
72
+ "values": ["1", "2", "3"]
73
+ },
74
+ {
75
+ "type": "digitRange",
76
+ "label": "标题",
77
+ "name": "title",
78
+ "value": 32,
79
+ "min": 0,
80
+ "max": 100,
81
+ "step": 1
82
+ },
83
+ {
84
+ "type": "radio",
85
+ "label": "标题",
86
+ "name": "title",
87
+ "value": "1",
88
+ "dataFrom": "role",
89
+ "options": []
90
+ },
91
+ {
92
+ "type": "text",
93
+ "label": "标题",
94
+ "name": "title",
95
+ "value": "32"
30
96
  }
31
97
  ]
32
98
  }