yy-forms 1.0.45 → 1.0.47

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 (59) hide show
  1. package/dist/index.esm.js +24 -0
  2. package/dist/index.js +24 -0
  3. package/package.json +2 -1
  4. package/.fatherrc.js +0 -37
  5. package/CHANGELOG.md +0 -254
  6. package/es/Provider.js +0 -248
  7. package/es/index.d.ts +0 -145
  8. package/es/index.js +0 -44
  9. package/es/settings/index.js +0 -975
  10. package/es/styles/atom.less +0 -1134
  11. package/es/styles/index.less +0 -358
  12. package/es/transformer/form-render.js +0 -75
  13. package/es/utils/context.js +0 -3
  14. package/es/utils/hooks.js +0 -48
  15. package/es/utils/index.js +0 -706
  16. package/es/utils/mapping.js +0 -31
  17. package/es/utils/serialize.js +0 -276
  18. package/es/widgets/htmlInput.js +0 -20
  19. package/es/widgets/idInput.js +0 -23
  20. package/es/widgets/index.js +0 -5
  21. package/es/widgets/jsonInput.js +0 -24
  22. package/es/widgets/list.js +0 -24
  23. package/es/widgets/percentSlider.js +0 -89
  24. package/src/Provider.jsx +0 -239
  25. package/src/components/Canvas/core/RenderChildren.jsx +0 -18
  26. package/src/components/Canvas/core/RenderField.jsx +0 -131
  27. package/src/components/Canvas/core/Wrapper.jsx +0 -298
  28. package/src/components/Canvas/core/Wrapper.less +0 -57
  29. package/src/components/Canvas/core/index.jsx +0 -171
  30. package/src/components/Canvas/index.jsx +0 -178
  31. package/src/components/Settings/GlobalSettings.jsx +0 -50
  32. package/src/components/Settings/ItemSettings.jsx +0 -155
  33. package/src/components/Settings/index.jsx +0 -75
  34. package/src/components/Settings/index.less +0 -25
  35. package/src/components/Sidebar/Element.jsx +0 -80
  36. package/src/components/Sidebar/Element.less +0 -18
  37. package/src/components/Sidebar/index.jsx +0 -47
  38. package/src/components/Sidebar/index.less +0 -23
  39. package/src/i18next/index.ts +0 -14
  40. package/src/i18next/locales/enUS.json +0 -51
  41. package/src/i18next/locales/resources.ts +0 -7
  42. package/src/i18next/locales/zhCN.json +0 -3
  43. package/src/index.d.ts +0 -145
  44. package/src/index.js +0 -45
  45. package/src/settings/index.js +0 -2030
  46. package/src/styles/atom.less +0 -1134
  47. package/src/styles/index.less +0 -358
  48. package/src/transformer/form-render.js +0 -65
  49. package/src/utils/context.js +0 -4
  50. package/src/utils/hooks.js +0 -35
  51. package/src/utils/index.js +0 -678
  52. package/src/utils/mapping.js +0 -29
  53. package/src/utils/serialize.js +0 -368
  54. package/src/widgets/htmlInput.jsx +0 -24
  55. package/src/widgets/idInput.jsx +0 -27
  56. package/src/widgets/index.js +0 -6
  57. package/src/widgets/jsonInput.jsx +0 -29
  58. package/src/widgets/list.jsx +0 -28
  59. package/src/widgets/percentSlider.jsx +0 -74
@@ -1,2030 +0,0 @@
1
- // 只需写配置,方便可扩展
2
- export const baseCommonSettings = {
3
- type: {
4
- title: '类型',
5
- type: 'string',
6
- hidden: '{{true}}',
7
- },
8
- widget: {
9
- title: '组件',
10
- type: 'string',
11
- hidden: '{{true}}',
12
- },
13
- format: {
14
- title: '格式',
15
- type: 'string',
16
- hidden: '{{true}}',
17
- },
18
- };
19
-
20
- export const defaultCommonSettings = {
21
- $id: {
22
- title: 'ID',
23
- description: '字段名称/英文',
24
- type: 'string',
25
- widget: 'idInput',
26
- require: true,
27
- rules: [
28
- {
29
- pattern: '^#/.+$',
30
- message: 'ID 必填',
31
- },
32
- ],
33
- },
34
- title: {
35
- title: '标题',
36
- type: 'string',
37
- widget: 'htmlInput',
38
- },
39
- displayType: {
40
- title: '标题展示模式',
41
- type: 'string',
42
- enum: ['row', 'column'],
43
- enumNames: ['同行', '单独一行'],
44
- widget: 'radio',
45
- },
46
- description: {
47
- title: '说明',
48
- type: 'string',
49
- },
50
- default: {
51
- title: '默认值',
52
- type: 'string',
53
- },
54
- required: {
55
- title: '必填',
56
- type: 'boolean',
57
- },
58
- placeholder: {
59
- title: '占位符',
60
- type: 'string',
61
- },
62
- bind: {
63
- title: 'Bind',
64
- type: 'string',
65
- },
66
- min: {
67
- title: '最小值',
68
- type: 'number',
69
- },
70
- max: {
71
- title: '最大值',
72
- type: 'number',
73
- },
74
- disabled: {
75
- title: '禁用',
76
- type: 'boolean',
77
- },
78
- readOnly: {
79
- title: '只读',
80
- type: 'boolean',
81
- },
82
- hidden: {
83
- title: '隐藏',
84
- type: 'boolean',
85
- },
86
- readOnlyWidget: {
87
- title: '只读组件',
88
- type: 'string',
89
- },
90
- width: {
91
- title: '元素宽度',
92
- type: 'string',
93
- widget: 'percentSlider',
94
- },
95
- labelWidth: {
96
- title: '标签宽度',
97
- description: '默认值120',
98
- type: 'number',
99
- widget: 'slider',
100
- max: 400,
101
- props: {
102
- hideNumber: true,
103
- },
104
- },
105
- };
106
-
107
- export const USdefaultCommonSettings = {
108
- "$id": {
109
- "title": "ID",
110
- "description": "Field Name / English",
111
- "type": "string",
112
- "widget": "idInput",
113
- "require": true,
114
- "rules": [
115
- {
116
- "pattern": "^#/.+$",
117
- "message": "ID is required"
118
- }
119
- ]
120
- },
121
- "title": {
122
- "title": "Title",
123
- "type": "string",
124
- "widget": "htmlInput"
125
- },
126
- "displayType": {
127
- "title": "Title Display Mode",
128
- "type": "string",
129
- "enum": ["row", "column"],
130
- "enumNames": ["Same Line", "Separate Line"],
131
- "widget": "radio"
132
- },
133
- "description": {
134
- "title": "Description",
135
- "type": "string"
136
- },
137
- "default": {
138
- "title": "Default Value",
139
- "type": "string"
140
- },
141
- "required": {
142
- "title": "Required",
143
- "type": "boolean"
144
- },
145
- "placeholder": {
146
- "title": "Placeholder",
147
- "type": "string"
148
- },
149
- "bind": {
150
- "title": "Bind",
151
- "type": "string"
152
- },
153
- "min": {
154
- "title": "Minimum Value",
155
- "type": "number"
156
- },
157
- "max": {
158
- "title": "Maximum Value",
159
- "type": "number"
160
- },
161
- "disabled": {
162
- "title": "Disabled",
163
- "type": "boolean"
164
- },
165
- "readOnly": {
166
- "title": "Read Only",
167
- "type": "boolean"
168
- },
169
- "hidden": {
170
- "title": "Hidden",
171
- "type": "boolean"
172
- },
173
- "readOnlyWidget": {
174
- "title": "Read Only Widget",
175
- "type": "string"
176
- },
177
- "width": {
178
- "title": "Element Width",
179
- "type": "string",
180
- "widget": "percentSlider"
181
- },
182
- "labelWidth": {
183
- "title": "Label Width",
184
- "description": "Default: 120",
185
- "type": "number",
186
- "widget": "slider",
187
- "max": 400,
188
- "props": {
189
- "hideNumber": true
190
- }
191
- }
192
- }
193
-
194
- // widget 用于指定 schema 右侧配置对应的 setting
195
- export const elements = [
196
- {
197
- text: '输入框',
198
- name: 'input',
199
- schema: {
200
- title: '输入框',
201
- type: 'string',
202
- },
203
- setting: {
204
- props: {
205
- title: '选项',
206
- type: 'object',
207
- labelWidth: 80,
208
- properties: {
209
- allowClear: {
210
- title: '是否带清除按钮',
211
- description: '填写内容后才会出现x哦',
212
- type: 'boolean',
213
- },
214
- addonBefore: {
215
- title: '前tab',
216
- type: 'string',
217
- },
218
- addonAfter: {
219
- title: '后tab',
220
- type: 'string',
221
- },
222
- prefix: {
223
- title: '前缀',
224
- type: 'string',
225
- },
226
- suffix: {
227
- title: '后缀',
228
- type: 'string',
229
- },
230
- },
231
- },
232
- minLength: {
233
- title: '最短字数',
234
- type: 'number',
235
- },
236
- maxLength: {
237
- title: '最长字数',
238
- type: 'number',
239
- },
240
- pattern: {
241
- title: '校验正则表达式',
242
- type: 'string',
243
- props: {
244
- placeholder: '填写正则表达式',
245
- },
246
- },
247
- },
248
- },
249
- {
250
- text: '大输入框',
251
- name: 'textarea',
252
- schema: {
253
- title: '编辑框',
254
- type: 'string',
255
- format: 'textarea',
256
- },
257
- setting: {
258
- props: {
259
- title: '选项',
260
- type: 'object',
261
- labelWidth: 80,
262
- properties: {
263
- autoSize: {
264
- title: '高度自动',
265
- type: 'boolean',
266
- },
267
- rows: {
268
- title: '指定高度',
269
- type: 'number',
270
- },
271
- },
272
- },
273
- minLength: {
274
- title: '最短字数',
275
- type: 'number',
276
- },
277
- maxLength: {
278
- title: '最长字数',
279
- type: 'number',
280
- },
281
- pattern: {
282
- title: '校验正则表达式',
283
- type: 'string',
284
- props: {
285
- placeholder: '填写正则表达式',
286
- },
287
- },
288
- },
289
- },
290
- {
291
- text: '日期选择',
292
- name: 'date',
293
- schema: {
294
- title: '日期选择',
295
- type: 'string',
296
- format: 'date',
297
- },
298
- setting: {
299
- format: {
300
- title: '格式',
301
- type: 'string',
302
- enum: ['dateTime', 'date', 'time'],
303
- enumNames: ['日期时间', '日期', '时间'],
304
- },
305
- },
306
- },
307
- {
308
- text: '时间选择',
309
- name: 'time',
310
- show: false,
311
- schema: {
312
- title: '时间选择',
313
- type: 'string',
314
- format: 'time',
315
- },
316
- setting: {
317
- format: {
318
- title: '格式',
319
- type: 'string',
320
- enum: ['dateTime', 'date', 'time'],
321
- enumNames: ['日期时间', '日期', '时间'],
322
- },
323
- },
324
- },
325
- {
326
- text: '数字输入框',
327
- name: 'number',
328
- schema: {
329
- title: '数字输入框',
330
- type: 'number',
331
- },
332
- setting: {
333
- default: {
334
- title: '默认值',
335
- type: 'number',
336
- },
337
- },
338
- },
339
- {
340
- text: '是否选择',
341
- name: 'checkbox',
342
- schema: {
343
- title: '是否选择',
344
- type: 'boolean',
345
- widget: 'checkbox',
346
- },
347
- setting: {
348
- default: {
349
- title: '是否默认勾选',
350
- type: 'boolean',
351
- },
352
- },
353
- },
354
- {
355
- text: '是否switch',
356
- name: 'switch',
357
- schema: {
358
- title: '是否选择',
359
- type: 'boolean',
360
- widget: 'switch',
361
- },
362
- setting: {
363
- default: {
364
- title: '是否默认开启',
365
- type: 'boolean',
366
- },
367
- },
368
- },
369
- {
370
- text: '下拉单选',
371
- name: 'select',
372
- schema: {
373
- title: '单选',
374
- type: 'string',
375
- enum: ['a', 'b', 'c'],
376
- enumNames: ['早', '中', '晚'],
377
- widget: 'select',
378
- },
379
- setting: {
380
- enumList: {
381
- title: '选项',
382
- type: 'array',
383
- widget: 'simpleList',
384
- className: 'frg-options-list',
385
- items: {
386
- type: 'object',
387
- properties: {
388
- value: {
389
- title: '',
390
- type: 'string',
391
- className: 'frg-options-input',
392
- props: {},
393
- placeholder: '字段',
394
- },
395
- label: {
396
- title: '',
397
- type: 'string',
398
- className: 'frg-options-input',
399
- props: {},
400
- placeholder: '名称',
401
- },
402
- },
403
- },
404
- props: {
405
- hideMove: true,
406
- hideCopy: true,
407
- },
408
- },
409
- },
410
- },
411
- {
412
- text: '点击单选',
413
- name: 'radio',
414
- schema: {
415
- title: '单选',
416
- type: 'string',
417
- enum: ['a', 'b', 'c'],
418
- enumNames: ['早', '中', '晚'],
419
- widget: 'radio',
420
- },
421
- setting: {
422
- enumList: {
423
- title: '选项',
424
- type: 'array',
425
- widget: 'simpleList',
426
- className: 'frg-options-list',
427
- items: {
428
- type: 'object',
429
- properties: {
430
- value: {
431
- title: '',
432
- type: 'string',
433
- className: 'frg-options-input',
434
- props: {},
435
- placeholder: '字段',
436
- },
437
- label: {
438
- title: '',
439
- type: 'string',
440
- className: 'frg-options-input',
441
- props: {},
442
- placeholder: '名称',
443
- },
444
- },
445
- },
446
- props: {
447
- hideMove: true,
448
- hideCopy: true,
449
- },
450
- },
451
- },
452
- },
453
- {
454
- text: '下拉多选',
455
- name: 'multiSelect',
456
- schema: {
457
- title: '多选',
458
- description: '下拉多选',
459
- type: 'array',
460
- items: {
461
- type: 'string',
462
- },
463
- enum: ['A', 'B', 'C', 'D'],
464
- enumNames: ['杭州', '武汉', '湖州', '贵阳'],
465
- widget: 'multiSelect',
466
- },
467
- setting: {
468
- default: {
469
- title: '默认值',
470
- type: 'array',
471
- widget: 'jsonInput',
472
- },
473
- enumList: {
474
- title: '选项',
475
- type: 'array',
476
- widget: 'simpleList',
477
- className: 'frg-options-list',
478
- items: {
479
- type: 'object',
480
- properties: {
481
- value: {
482
- title: '',
483
- type: 'string',
484
- className: 'frg-options-input',
485
- props: {},
486
- placeholder: '字段',
487
- },
488
- label: {
489
- title: '',
490
- type: 'string',
491
- className: 'frg-options-input',
492
- props: {},
493
- placeholder: '名称',
494
- },
495
- },
496
- },
497
- props: {
498
- hideMove: true,
499
- hideCopy: true,
500
- },
501
- },
502
- },
503
- },
504
- {
505
- text: '点击多选',
506
- name: 'checkboxes',
507
- schema: {
508
- title: '多选',
509
- type: 'array',
510
- widget: 'checkboxes',
511
- items: {
512
- type: 'string',
513
- },
514
- enum: ['A', 'B', 'C', 'D'],
515
- enumNames: ['杭州', '武汉', '湖州', '贵阳'],
516
- },
517
- setting: {
518
- default: {
519
- title: '默认值',
520
- type: 'array',
521
- widget: 'jsonInput',
522
- },
523
- enumList: {
524
- title: '选项',
525
- type: 'array',
526
- widget: 'simpleList',
527
- className: 'frg-options-list',
528
- items: {
529
- type: 'object',
530
- properties: {
531
- value: {
532
- title: '',
533
- type: 'string',
534
- className: 'frg-options-input',
535
- props: {},
536
- placeholder: '字段',
537
- },
538
- label: {
539
- title: '',
540
- type: 'string',
541
- className: 'frg-options-input',
542
- props: {},
543
- placeholder: '名称',
544
- },
545
- },
546
- },
547
- props: {
548
- hideMove: true,
549
- hideCopy: true,
550
- },
551
- },
552
- },
553
- },
554
- {
555
- text: 'HTML',
556
- name: 'html',
557
- schema: {
558
- title: 'HTML',
559
- type: 'string',
560
- widget: 'html',
561
- },
562
- setting: {
563
- props: {
564
- type: 'object',
565
- properties: {
566
- value: {
567
- title: '展示内容',
568
- type: 'string',
569
- },
570
- },
571
- },
572
- },
573
- },
574
- ];
575
-
576
- export const USelements = [
577
- {
578
- "text": "Input Field",
579
- "name": "input",
580
- "schema": {
581
- "title": "Input Field",
582
- "type": "string"
583
- },
584
- "setting": {
585
- "props": {
586
- "title": "Options",
587
- "type": "object",
588
- "labelWidth": 80,
589
- "properties": {
590
- "allowClear": {
591
- "title": "Show Clear Button",
592
- "description": "The 'X' icon appears only after content is entered",
593
- "type": "boolean"
594
- },
595
- "addonBefore": {
596
- "title": "Prefix Add-on",
597
- "type": "string"
598
- },
599
- "addonAfter": {
600
- "title": "Suffix Add-on",
601
- "type": "string"
602
- },
603
- "prefix": {
604
- "title": "Prefix",
605
- "type": "string"
606
- },
607
- "suffix": {
608
- "title": "Suffix",
609
- "type": "string"
610
- }
611
- }
612
- },
613
- "minLength": {
614
- "title": "Minimum Characters",
615
- "type": "number"
616
- },
617
- "maxLength": {
618
- "title": "Maximum Characters",
619
- "type": "number"
620
- },
621
- "pattern": {
622
- "title": "Validation Pattern",
623
- "type": "string",
624
- "props": {
625
- "placeholder": "Enter regular expression"
626
- }
627
- }
628
- }
629
- },
630
- {
631
- "text": "Text Area",
632
- "name": "textarea",
633
- "schema": {
634
- "title": "Text Area",
635
- "type": "string",
636
- "format": "textarea"
637
- },
638
- "setting": {
639
- "props": {
640
- "title": "Options",
641
- "type": "object",
642
- "labelWidth": 80,
643
- "properties": {
644
- "autoSize": {
645
- "title": "Auto Resize",
646
- "type": "boolean"
647
- },
648
- "rows": {
649
- "title": "Fixed Rows",
650
- "type": "number"
651
- }
652
- }
653
- },
654
- "minLength": {
655
- "title": "Minimum Characters",
656
- "type": "number"
657
- },
658
- "maxLength": {
659
- "title": "Maximum Characters",
660
- "type": "number"
661
- },
662
- "pattern": {
663
- "title": "Validation Pattern",
664
- "type": "string",
665
- "props": {
666
- "placeholder": "Enter regular expression"
667
- }
668
- }
669
- }
670
- },
671
- {
672
- "text": "Date Picker",
673
- "name": "date",
674
- "schema": {
675
- "title": "Date Picker",
676
- "type": "string",
677
- "format": "date"
678
- },
679
- "setting": {
680
- "format": {
681
- "title": "Format",
682
- "type": "string",
683
- "enum": ["dateTime", "date", "time"],
684
- "enumNames": ["Date & Time", "Date", "Time"]
685
- }
686
- }
687
- },
688
- {
689
- "text": "Time Picker",
690
- "name": "time",
691
- "show": false,
692
- "schema": {
693
- "title": "Time Picker",
694
- "type": "string",
695
- "format": "time"
696
- },
697
- "setting": {
698
- "format": {
699
- "title": "Format",
700
- "type": "string",
701
- "enum": ["dateTime", "date", "time"],
702
- "enumNames": ["Date & Time", "Date", "Time"]
703
- }
704
- }
705
- },
706
- {
707
- "text": "Number Input",
708
- "name": "number",
709
- "schema": {
710
- "title": "Number Input",
711
- "type": "number"
712
- },
713
- "setting": {
714
- "default": {
715
- "title": "Default Value",
716
- "type": "number"
717
- }
718
- }
719
- },
720
- {
721
- "text": "Checkbox",
722
- "name": "checkbox",
723
- "schema": {
724
- "title": "Checkbox",
725
- "type": "boolean",
726
- "widget": "checkbox"
727
- },
728
- "setting": {
729
- "default": {
730
- "title": "Checked by Default",
731
- "type": "boolean"
732
- }
733
- }
734
- },
735
- {
736
- "text": "Switch",
737
- "name": "switch",
738
- "schema": {
739
- "title": "Switch",
740
- "type": "boolean",
741
- "widget": "switch"
742
- },
743
- "setting": {
744
- "default": {
745
- "title": "On by Default",
746
- "type": "boolean"
747
- }
748
- }
749
- },
750
- {
751
- "text": "Select",
752
- "name": "select",
753
- "schema": {
754
- "title": "Single Select",
755
- "type": "string",
756
- "enum": ["a", "b", "c"],
757
- "enumNames": ["tiktok", "youtube", "facebook"],
758
- "widget": "select"
759
- },
760
- "setting": {
761
- "enumList": {
762
- "title": "Options",
763
- "type": "array",
764
- "widget": "simpleList",
765
- "className": "frg-options-list",
766
- "items": {
767
- "type": "object",
768
- "properties": {
769
- "value": {
770
- "title": "",
771
- "type": "string",
772
- "className": "frg-options-input",
773
- "props": {},
774
- "placeholder": "Value"
775
- },
776
- "label": {
777
- "title": "",
778
- "type": "string",
779
- "className": "frg-options-input",
780
- "props": {},
781
- "placeholder": "Label"
782
- }
783
- }
784
- },
785
- "props": {
786
- "hideMove": true,
787
- "hideCopy": true
788
- }
789
- }
790
- }
791
- },
792
- {
793
- "text": "Radio Buttons",
794
- "name": "radio",
795
- "schema": {
796
- "title": "Radio Buttons",
797
- "type": "string",
798
- "enum": ["a", "b", "c"],
799
- "enumNames": ["tiktok", "youtube", "facebook"],
800
- "widget": "radio"
801
- },
802
- "setting": {
803
- "enumList": {
804
- "title": "Options",
805
- "type": "array",
806
- "widget": "simpleList",
807
- "className": "frg-options-list",
808
- "items": {
809
- "type": "object",
810
- "properties": {
811
- "value": {
812
- "title": "",
813
- "type": "string",
814
- "className": "frg-options-input",
815
- "props": {},
816
- "placeholder": "Value"
817
- },
818
- "label": {
819
- "title": "",
820
- "type": "string",
821
- "className": "frg-options-input",
822
- "props": {},
823
- "placeholder": "Label"
824
- }
825
- }
826
- },
827
- "props": {
828
- "hideMove": true,
829
- "hideCopy": true
830
- }
831
- }
832
- }
833
- },
834
- {
835
- "text": "Multi Select",
836
- "name": "multiSelect",
837
- "schema": {
838
- "title": "Multi-Select",
839
- "description": "Dropdown multi-select",
840
- "type": "array",
841
- "items": {
842
- "type": "string"
843
- },
844
- "enum": ["A", "B", "C", "D"],
845
- "enumNames": ["Acupressure", "Long Gliding Strokes", "Passive Stretching"],
846
- "widget": "multiSelect"
847
- },
848
- "setting": {
849
- "default": {
850
- "title": "Default Value",
851
- "type": "array",
852
- "widget": "jsonInput"
853
- },
854
- "enumList": {
855
- "title": "Options",
856
- "type": "array",
857
- "widget": "simpleList",
858
- "className": "frg-options-list",
859
- "items": {
860
- "type": "object",
861
- "properties": {
862
- "value": {
863
- "title": "",
864
- "type": "string",
865
- "className": "frg-options-input",
866
- "props": {},
867
- "placeholder": "Value"
868
- },
869
- "label": {
870
- "title": "",
871
- "type": "string",
872
- "className": "frg-options-input",
873
- "props": {},
874
- "placeholder": "Label"
875
- }
876
- }
877
- },
878
- "props": {
879
- "hideMove": true,
880
- "hideCopy": true
881
- }
882
- }
883
- }
884
- },
885
- {
886
- "text": "Checkboxes",
887
- "name": "checkboxes",
888
- "schema": {
889
- "title": "Checkboxes",
890
- "type": "array",
891
- "widget": "checkboxes",
892
- "items": {
893
- "type": "string"
894
- },
895
- "enum": ["A", "B", "C", "D"],
896
- "enumNames": ["Acupressure", "Long Gliding Strokes", "Passive Stretching"]
897
- },
898
- "setting": {
899
- "default": {
900
- "title": "Default Value",
901
- "type": "array",
902
- "widget": "jsonInput"
903
- },
904
- "enumList": {
905
- "title": "Options",
906
- "type": "array",
907
- "widget": "simpleList",
908
- "className": "frg-options-list",
909
- "items": {
910
- "type": "object",
911
- "properties": {
912
- "value": {
913
- "title": "",
914
- "type": "string",
915
- "className": "frg-options-input",
916
- "props": {},
917
- "placeholder": "Value"
918
- },
919
- "label": {
920
- "title": "",
921
- "type": "string",
922
- "className": "frg-options-input",
923
- "props": {},
924
- "placeholder": "Label"
925
- }
926
- }
927
- },
928
- "props": {
929
- "hideMove": true,
930
- "hideCopy": true
931
- }
932
- }
933
- }
934
- },
935
- {
936
- "text": "HTML",
937
- "name": "html",
938
- "schema": {
939
- "title": "HTML",
940
- "type": "string",
941
- "widget": "html"
942
- },
943
- "setting": {
944
- "props": {
945
- "type": "object",
946
- "properties": {
947
- "value": {
948
- "title": "Display Content",
949
- "type": "string"
950
- }
951
- }
952
- }
953
- }
954
- }
955
- ]
956
-
957
- export const advancedElements = [
958
- {
959
- text: '日期范围',
960
- name: 'dateRange',
961
- schema: {
962
- title: '日期范围',
963
- type: 'range',
964
- format: 'dateTime',
965
- props: {
966
- placeholder: ['开始时间', '结束时间'],
967
- },
968
- },
969
- setting: {
970
- format: {
971
- title: '类型',
972
- type: 'string',
973
- enum: ['dateTime', 'date'],
974
- enumNames: ['日期时间', '日期'],
975
- },
976
- },
977
- },
978
- {
979
- text: '数字(slider)',
980
- name: 'slider',
981
- schema: {
982
- title: '带滑动条',
983
- type: 'number',
984
- widget: 'slider',
985
- },
986
- setting: {
987
- default: {
988
- title: '默认值',
989
- type: 'number',
990
- },
991
- },
992
- },
993
- {
994
- text: '图片展示',
995
- name: 'image',
996
- schema: {
997
- title: '图片展示',
998
- type: 'string',
999
- format: 'image',
1000
- },
1001
- setting: {},
1002
- },
1003
- {
1004
- text: '颜色选择',
1005
- name: 'color',
1006
- schema: {
1007
- title: '颜色选择',
1008
- type: 'string',
1009
- format: 'color',
1010
- },
1011
- setting: {},
1012
- },
1013
- ];
1014
-
1015
- export const USadvancedElements = [
1016
- {
1017
- "text": "DateRange",
1018
- "name": "dateRange",
1019
- "schema": {
1020
- "title": "Date Range",
1021
- "type": "range",
1022
- "format": "dateTime",
1023
- "props": {
1024
- "placeholder": ["Start Date", "End Date"]
1025
- }
1026
- },
1027
- "setting": {
1028
- "format": {
1029
- "title": "Format",
1030
- "type": "string",
1031
- "enum": ["dateTime", "date"],
1032
- "enumNames": ["DateTime", "Date"]
1033
- }
1034
- }
1035
- },
1036
- {
1037
- "text": "Slider",
1038
- "name": "slider",
1039
- "schema": {
1040
- "title": "Slider",
1041
- "type": "number",
1042
- "widget": "slider"
1043
- },
1044
- "setting": {
1045
- "default": {
1046
- "title": "Default",
1047
- "type": "number"
1048
- }
1049
- }
1050
- },
1051
- {
1052
- "text": "Image",
1053
- "name": "image",
1054
- "schema": {
1055
- "title": "Image",
1056
- "type": "string",
1057
- "format": "image"
1058
- },
1059
- "setting": {}
1060
- },
1061
- {
1062
- "text": "ColorPicker",
1063
- "name": "color",
1064
- "schema": {
1065
- "title": "Color Selector",
1066
- "type": "string",
1067
- "format": "color"
1068
- },
1069
- "setting": {}
1070
- }
1071
- ]
1072
-
1073
- export const layouts = [
1074
- {
1075
- text: '对象',
1076
- name: 'object',
1077
- schema: {
1078
- title: '对象',
1079
- type: 'object',
1080
- properties: {},
1081
- },
1082
- setting: {
1083
- theme: {
1084
- title: '主题',
1085
- type: 'string',
1086
- enum: [
1087
- 'collapse',
1088
- 'collapse:pure',
1089
- 'collapse:ghost',
1090
- 'card',
1091
- 'tile',
1092
- 'flex',
1093
- ],
1094
- enumNames: ['默认', '无框', '幽灵', '卡片', '平铺', '弹性'],
1095
- default: 'collapse',
1096
- widget: 'radio',
1097
- },
1098
- props: {
1099
- title: '弹性布局',
1100
- hidden: '{{"flex" !== formData.theme}}',
1101
- type: 'object',
1102
- theme: 'tile',
1103
- properties: {
1104
- style: {
1105
- title: '布局样式',
1106
- type: 'object',
1107
- theme: 'flex',
1108
- props: {
1109
- style: {
1110
- flexDirection: 'column',
1111
- },
1112
- },
1113
- properties: {
1114
- height: {
1115
- title: '高度',
1116
- description: 'height',
1117
- type: 'string',
1118
- widget: 'input',
1119
- },
1120
- flexDirection: {
1121
- title: '布局方向',
1122
- description: 'flex-direction',
1123
- type: 'string',
1124
- enum: ['row', 'row-reverse', 'column', 'column-reverse'],
1125
- enumNames: ['横向', '横向反转', '纵向', '纵向反转'],
1126
- widget: 'select',
1127
- },
1128
- flexWrap: {
1129
- title: '换行方式',
1130
- description: 'flex-wrap',
1131
- type: 'string',
1132
- enum: ['wrap', 'nowrap', 'wrap-reverse'],
1133
- enumNames: ['换行', '不换行', '反向换行'],
1134
- widget: 'select',
1135
- },
1136
- justifyContent: {
1137
- title: '对齐方式',
1138
- description: 'justify-content',
1139
- type: 'string',
1140
- enum: [
1141
- 'flex-start',
1142
- 'flex-end',
1143
- 'center',
1144
- 'space-between',
1145
- 'space-around',
1146
- ],
1147
- enumNames: [
1148
- '起点对齐',
1149
- '终点对齐',
1150
- '居中对齐',
1151
- '两端对齐',
1152
- '相同间距',
1153
- ],
1154
- widget: 'select',
1155
- },
1156
- alignItems: {
1157
- title: '轴对齐方式',
1158
- description: 'align-items',
1159
- type: 'string',
1160
- enum: [
1161
- 'flex-start',
1162
- 'flex-end',
1163
- 'center',
1164
- 'baseline',
1165
- 'stretch',
1166
- ],
1167
- enumNames: [
1168
- '起点对齐',
1169
- '终点对齐',
1170
- '居中对齐',
1171
- '基线对齐',
1172
- '拉伸铺满',
1173
- ],
1174
- widget: 'select',
1175
- },
1176
- alignContent: {
1177
- title: '多轴线对齐',
1178
- description: 'align-content',
1179
- type: 'string',
1180
- enum: [
1181
- 'flex-start',
1182
- 'flex-end',
1183
- 'center',
1184
- 'space-between',
1185
- 'space-around',
1186
- 'stretch',
1187
- ],
1188
- enumNames: [
1189
- '起点对齐',
1190
- '终点对齐',
1191
- '居中对齐',
1192
- '两端对齐',
1193
- '相同间距',
1194
- '拉伸铺满',
1195
- ],
1196
- widget: 'select',
1197
- },
1198
- },
1199
- },
1200
- },
1201
- },
1202
- style: {
1203
- title: '元素样式',
1204
- type: 'object',
1205
- properties: {
1206
- background: {
1207
- title: '背景',
1208
- description: 'background',
1209
- type: 'string',
1210
- widget: 'color',
1211
- },
1212
- margin: {
1213
- title: '外边距',
1214
- description: 'margin',
1215
- type: 'string',
1216
- widget: 'input',
1217
- },
1218
- padding: {
1219
- title: '内边距',
1220
- description: 'padding',
1221
- type: 'string',
1222
- widget: 'input',
1223
- },
1224
- borderWidth: {
1225
- title: '边框宽',
1226
- description: 'border-width',
1227
- type: 'string',
1228
- widget: 'input',
1229
- },
1230
- borderStyle: {
1231
- title: '边框样式',
1232
- description: 'border-style',
1233
- type: 'string',
1234
- widget: 'input',
1235
- },
1236
- borderColor: {
1237
- title: '边框颜色',
1238
- description: 'border-color',
1239
- type: 'string',
1240
- widget: 'color',
1241
- },
1242
- borderRadius: {
1243
- title: '圆角',
1244
- description: 'border-radius',
1245
- type: 'string',
1246
- widget: 'input',
1247
- },
1248
- flex: {
1249
- title: '弹性伸缩',
1250
- description: 'flex',
1251
- type: 'string',
1252
- widget: 'input',
1253
- },
1254
- order: {
1255
- title: '排列顺序',
1256
- description: 'order',
1257
- type: 'string',
1258
- widget: 'input',
1259
- },
1260
- alignSelf: {
1261
- title: '自身对齐',
1262
- description: 'align-self',
1263
- type: 'string',
1264
- widget: 'input',
1265
- },
1266
- },
1267
- },
1268
- },
1269
- },
1270
- {
1271
- text: '常规列表',
1272
- name: 'list',
1273
- schema: {
1274
- title: '数组',
1275
- type: 'array',
1276
- items: {
1277
- type: 'object',
1278
- properties: {},
1279
- },
1280
- },
1281
- setting: {
1282
- default: {
1283
- title: '默认值',
1284
- type: 'array',
1285
- widget: 'jsonInput',
1286
- },
1287
- items: {
1288
- type: 'object',
1289
- hidden: '{{true}}',
1290
- },
1291
- min: {
1292
- title: '最小长度',
1293
- type: 'number',
1294
- },
1295
- max: {
1296
- title: '最大长度',
1297
- type: 'number',
1298
- },
1299
- props: {
1300
- title: '选项',
1301
- type: 'object',
1302
- properties: {
1303
- // foldable: {
1304
- // title: '是否可折叠',
1305
- // type: 'boolean',
1306
- // },
1307
- hideDelete: {
1308
- title: '隐藏删除按钮',
1309
- type: 'string',
1310
- },
1311
- hideAdd: {
1312
- title: '隐藏新增/复制按钮',
1313
- type: 'string',
1314
- },
1315
- },
1316
- },
1317
- },
1318
- },
1319
- {
1320
- text: '简单列表',
1321
- name: 'simpleList',
1322
- schema: {
1323
- title: '数组',
1324
- type: 'array',
1325
- widget: 'simpleList',
1326
- items: {
1327
- type: 'object',
1328
- properties: {},
1329
- },
1330
- },
1331
- setting: {
1332
- default: {
1333
- title: '默认值',
1334
- type: 'array',
1335
- widget: 'jsonInput',
1336
- },
1337
- items: {
1338
- type: 'object',
1339
- hidden: '{{true}}',
1340
- },
1341
- min: {
1342
- title: '最小长度',
1343
- type: 'number',
1344
- },
1345
- max: {
1346
- title: '最大长度',
1347
- type: 'number',
1348
- },
1349
- props: {
1350
- title: '选项',
1351
- type: 'object',
1352
- properties: {
1353
- // foldable: {
1354
- // title: '是否可折叠',
1355
- // type: 'boolean',
1356
- // },
1357
- hideTitle: {
1358
- title: '隐藏标题',
1359
- type: 'boolean',
1360
- },
1361
- hideDelete: {
1362
- title: '隐藏删除按钮',
1363
- type: 'string',
1364
- },
1365
- hideAdd: {
1366
- title: '隐藏新增/复制按钮',
1367
- type: 'string',
1368
- },
1369
- },
1370
- },
1371
- },
1372
- },
1373
- {
1374
- text: '表格列表',
1375
- name: 'list2',
1376
- schema: {
1377
- title: '数组',
1378
- type: 'array',
1379
- widget: 'list2',
1380
- items: {
1381
- type: 'object',
1382
- properties: {},
1383
- },
1384
- },
1385
- setting: {
1386
- default: {
1387
- title: '默认值',
1388
- type: 'array',
1389
- widget: 'jsonInput',
1390
- },
1391
- items: {
1392
- type: 'object',
1393
- hidden: '{{true}}',
1394
- },
1395
- min: {
1396
- title: '最小长度',
1397
- type: 'number',
1398
- },
1399
- max: {
1400
- title: '最大长度',
1401
- type: 'number',
1402
- },
1403
- props: {
1404
- title: '选项',
1405
- type: 'object',
1406
- properties: {
1407
- // foldable: {
1408
- // title: '是否可折叠',
1409
- // type: 'boolean',
1410
- // },
1411
- hideDelete: {
1412
- title: '隐藏删除按钮',
1413
- type: 'string',
1414
- },
1415
- hideAdd: {
1416
- title: '隐藏新增/复制按钮',
1417
- type: 'string',
1418
- },
1419
- hideCopy: {
1420
- title: '隐藏复制按钮',
1421
- type: 'string',
1422
- },
1423
- hideMove: {
1424
- title: '隐藏上下移动按钮',
1425
- type: 'string',
1426
- },
1427
- },
1428
- },
1429
- },
1430
- },
1431
- {
1432
- text: '复杂表格列表',
1433
- name: 'drawerList',
1434
- schema: {
1435
- title: '数组',
1436
- type: 'array',
1437
- widget: 'drawerList',
1438
- items: {
1439
- type: 'object',
1440
- properties: {},
1441
- },
1442
- },
1443
- setting: {
1444
- default: {
1445
- title: '默认值',
1446
- type: 'array',
1447
- widget: 'jsonInput',
1448
- },
1449
- items: {
1450
- type: 'object',
1451
- hidden: '{{true}}',
1452
- },
1453
- min: {
1454
- title: '最小长度',
1455
- type: 'number',
1456
- },
1457
- max: {
1458
- title: '最大长度',
1459
- type: 'number',
1460
- },
1461
- props: {
1462
- title: '选项',
1463
- type: 'object',
1464
- properties: {
1465
- // foldable: {
1466
- // title: '是否可折叠',
1467
- // type: 'boolean',
1468
- // },
1469
- hideDelete: {
1470
- title: '隐藏删除按钮',
1471
- type: 'string',
1472
- },
1473
- hideAdd: {
1474
- title: '隐藏新增/复制按钮',
1475
- type: 'string',
1476
- },
1477
- },
1478
- },
1479
- },
1480
- },
1481
- ];
1482
- export const USlayouts = [
1483
- {
1484
- "text": "Object",
1485
- "name": "object",
1486
- "schema": {
1487
- "title": "Object",
1488
- "type": "object",
1489
- "properties": {}
1490
- },
1491
- "setting": {
1492
- "theme": {
1493
- "title": "Theme",
1494
- "type": "string",
1495
- "enum": [
1496
- "collapse",
1497
- "collapse:pure",
1498
- "collapse:ghost",
1499
- "card",
1500
- "tile",
1501
- "flex"
1502
- ],
1503
- "enumNames": ["Default", "No Border", "Ghost", "Card", "Tile", "Flex"],
1504
- "default": "collapse",
1505
- "widget": "radio"
1506
- },
1507
- "props": {
1508
- "title": "Flex Layout",
1509
- "hidden": "{{'flex' !== formData.theme}}",
1510
- "type": "object",
1511
- "theme": "tile",
1512
- "properties": {
1513
- "style": {
1514
- "title": "Layout Style",
1515
- "type": "object",
1516
- "theme": "flex",
1517
- "props": {
1518
- "style": {
1519
- "flexDirection": "column"
1520
- }
1521
- },
1522
- "properties": {
1523
- "height": {
1524
- "title": "Height",
1525
- "description": "height",
1526
- "type": "string",
1527
- "widget": "input"
1528
- },
1529
- "flexDirection": {
1530
- "title": "Layout Direction",
1531
- "description": "flex-direction",
1532
- "type": "string",
1533
- "enum": ["row", "row-reverse", "column", "column-reverse"],
1534
- "enumNames": ["Horizontal", "Horizontal Reverse", "Vertical", "Vertical Reverse"],
1535
- "widget": "select"
1536
- },
1537
- "flexWrap": {
1538
- "title": "Wrap Mode",
1539
- "description": "flex-wrap",
1540
- "type": "string",
1541
- "enum": ["wrap", "nowrap", "wrap-reverse"],
1542
- "enumNames": ["Wrap", "No Wrap", "Wrap Reverse"],
1543
- "widget": "select"
1544
- },
1545
- "justifyContent": {
1546
- "title": "Justify Content",
1547
- "description": "justify-content",
1548
- "type": "string",
1549
- "enum": [
1550
- "flex-start",
1551
- "flex-end",
1552
- "center",
1553
- "space-between",
1554
- "space-around"
1555
- ],
1556
- "enumNames": [
1557
- "Start",
1558
- "End",
1559
- "Center",
1560
- "Space Between",
1561
- "Space Around"
1562
- ],
1563
- "widget": "select"
1564
- },
1565
- "alignItems": {
1566
- "title": "Align Items",
1567
- "description": "align-items",
1568
- "type": "string",
1569
- "enum": [
1570
- "flex-start",
1571
- "flex-end",
1572
- "center",
1573
- "baseline",
1574
- "stretch"
1575
- ],
1576
- "enumNames": [
1577
- "Start",
1578
- "End",
1579
- "Center",
1580
- "Baseline",
1581
- "Stretch"
1582
- ],
1583
- "widget": "select"
1584
- },
1585
- "alignContent": {
1586
- "title": "Align Content",
1587
- "description": "align-content",
1588
- "type": "string",
1589
- "enum": [
1590
- "flex-start",
1591
- "flex-end",
1592
- "center",
1593
- "space-between",
1594
- "space-around",
1595
- "stretch"
1596
- ],
1597
- "enumNames": [
1598
- "Start",
1599
- "End",
1600
- "Center",
1601
- "Space Between",
1602
- "Space Around",
1603
- "Stretch"
1604
- ],
1605
- "widget": "select"
1606
- }
1607
- }
1608
- }
1609
- }
1610
- },
1611
- "style": {
1612
- "title": "Element Style",
1613
- "type": "object",
1614
- "properties": {
1615
- "background": {
1616
- "title": "Background",
1617
- "description": "background",
1618
- "type": "string",
1619
- "widget": "color"
1620
- },
1621
- "margin": {
1622
- "title": "Margin",
1623
- "description": "margin",
1624
- "type": "string",
1625
- "widget": "input"
1626
- },
1627
- "padding": {
1628
- "title": "Padding",
1629
- "description": "padding",
1630
- "type": "string",
1631
- "widget": "input"
1632
- },
1633
- "borderWidth": {
1634
- "title": "Border Width",
1635
- "description": "border-width",
1636
- "type": "string",
1637
- "widget": "input"
1638
- },
1639
- "borderStyle": {
1640
- "title": "Border Style",
1641
- "description": "border-style",
1642
- "type": "string",
1643
- "widget": "input"
1644
- },
1645
- "borderColor": {
1646
- "title": "Border Color",
1647
- "description": "border-color",
1648
- "type": "string",
1649
- "widget": "color"
1650
- },
1651
- "borderRadius": {
1652
- "title": "Border Radius",
1653
- "description": "border-radius",
1654
- "type": "string",
1655
- "widget": "input"
1656
- },
1657
- "flex": {
1658
- "title": "Flex",
1659
- "description": "flex",
1660
- "type": "string",
1661
- "widget": "input"
1662
- },
1663
- "order": {
1664
- "title": "Order",
1665
- "description": "order",
1666
- "type": "string",
1667
- "widget": "input"
1668
- },
1669
- "alignSelf": {
1670
- "title": "Align Self",
1671
- "description": "align-self",
1672
- "type": "string",
1673
- "widget": "input"
1674
- }
1675
- }
1676
- }
1677
- }
1678
- },
1679
- {
1680
- "text": "Regular List",
1681
- "name": "list",
1682
- "schema": {
1683
- "title": "Array",
1684
- "type": "array",
1685
- "items": {
1686
- "type": "object",
1687
- "properties": {}
1688
- }
1689
- },
1690
- "setting": {
1691
- "default": {
1692
- "title": "Default Value",
1693
- "type": "array",
1694
- "widget": "jsonInput"
1695
- },
1696
- "items": {
1697
- "type": "object",
1698
- "hidden": "{{true}}"
1699
- },
1700
- "min": {
1701
- "title": "Minimum Length",
1702
- "type": "number"
1703
- },
1704
- "max": {
1705
- "title": "Maximum Length",
1706
- "type": "number"
1707
- },
1708
- "props": {
1709
- "title": "Options",
1710
- "type": "object",
1711
- "properties": {
1712
- "hideDelete": {
1713
- "title": "Hide Delete Button",
1714
- "type": "string"
1715
- },
1716
- "hideAdd": {
1717
- "title": "Hide Add/Copy Button",
1718
- "type": "string"
1719
- }
1720
- }
1721
- }
1722
- }
1723
- },
1724
- {
1725
- "text": "Simple List",
1726
- "name": "simpleList",
1727
- "schema": {
1728
- "title": "Array",
1729
- "type": "array",
1730
- "widget": "simpleList",
1731
- "items": {
1732
- "type": "object",
1733
- "properties": {}
1734
- }
1735
- },
1736
- "setting": {
1737
- "default": {
1738
- "title": "Default Value",
1739
- "type": "array",
1740
- "widget": "jsonInput"
1741
- },
1742
- "items": {
1743
- "type": "object",
1744
- "hidden": "{{true}}"
1745
- },
1746
- "min": {
1747
- "title": "Minimum Length",
1748
- "type": "number"
1749
- },
1750
- "max": {
1751
- "title": "Maximum Length",
1752
- "type": "number"
1753
- },
1754
- "props": {
1755
- "title": "Options",
1756
- "type": "object",
1757
- "properties": {
1758
- "hideTitle": {
1759
- "title": "Hide Title",
1760
- "type": "boolean"
1761
- },
1762
- "hideDelete": {
1763
- "title": "Hide Delete Button",
1764
- "type": "string"
1765
- },
1766
- "hideAdd": {
1767
- "title": "Hide Add/Copy Button",
1768
- "type": "string"
1769
- }
1770
- }
1771
- }
1772
- }
1773
- },
1774
- {
1775
- "text": "Table List",
1776
- "name": "list2",
1777
- "schema": {
1778
- "title": "Array",
1779
- "type": "array",
1780
- "widget": "list2",
1781
- "items": {
1782
- "type": "object",
1783
- "properties": {}
1784
- }
1785
- },
1786
- "setting": {
1787
- "default": {
1788
- "title": "Default Value",
1789
- "type": "array",
1790
- "widget": "jsonInput"
1791
- },
1792
- "items": {
1793
- "type": "object",
1794
- "hidden": "{{true}}"
1795
- },
1796
- "min": {
1797
- "title": "Minimum Length",
1798
- "type": "number"
1799
- },
1800
- "max": {
1801
- "title": "Maximum Length",
1802
- "type": "number"
1803
- },
1804
- "props": {
1805
- "title": "Options",
1806
- "type": "object",
1807
- "properties": {
1808
- "hideDelete": {
1809
- "title": "Hide Delete Button",
1810
- "type": "string"
1811
- },
1812
- "hideAdd": {
1813
- "title": "Hide Add/Copy Button",
1814
- "type": "string"
1815
- },
1816
- "hideCopy": {
1817
- "title": "Hide Copy Button",
1818
- "type": "string"
1819
- },
1820
- "hideMove": {
1821
- "title": "Hide Move Buttons",
1822
- "type": "string"
1823
- }
1824
- }
1825
- }
1826
- }
1827
- },
1828
- {
1829
- "text": "Complex Table List",
1830
- "name": "drawerList",
1831
- "schema": {
1832
- "title": "Array",
1833
- "type": "array",
1834
- "widget": "drawerList",
1835
- "items": {
1836
- "type": "object",
1837
- "properties": {}
1838
- }
1839
- },
1840
- "setting": {
1841
- "default": {
1842
- "title": "Default Value",
1843
- "type": "array",
1844
- "widget": "jsonInput"
1845
- },
1846
- "items": {
1847
- "type": "object",
1848
- "hidden": "{{true}}"
1849
- },
1850
- "min": {
1851
- "title": "Minimum Length",
1852
- "type": "number"
1853
- },
1854
- "max": {
1855
- "title": "Maximum Length",
1856
- "type": "number"
1857
- },
1858
- "props": {
1859
- "title": "Options",
1860
- "type": "object",
1861
- "properties": {
1862
- "hideDelete": {
1863
- "title": "Hide Delete Button",
1864
- "type": "string"
1865
- },
1866
- "hideAdd": {
1867
- "title": "Hide Add/Copy Button",
1868
- "type": "string"
1869
- }
1870
- }
1871
- }
1872
- }
1873
- }
1874
- ]
1875
-
1876
- const saves = [
1877
- {
1878
- text: '复杂结构样例',
1879
- name: 'something',
1880
- schema: {
1881
- title: '对象',
1882
- description: '这是一个对象类型',
1883
- type: 'object',
1884
- properties: {
1885
- inputName: {
1886
- title: '简单输入框',
1887
- type: 'string',
1888
- },
1889
- selectName: {
1890
- title: '单选',
1891
- type: 'string',
1892
- enum: ['a', 'b', 'c'],
1893
- enumNames: ['早', '中', '晚'],
1894
- },
1895
- dateName: {
1896
- title: '时间选择',
1897
- type: 'string',
1898
- format: 'date',
1899
- },
1900
- listName: {
1901
- title: '对象数组',
1902
- description: '对象数组嵌套功能',
1903
- type: 'array',
1904
- items: {
1905
- type: 'object',
1906
- properties: {
1907
- rangeName: {
1908
- title: '日期/时间范围',
1909
- type: 'range',
1910
- format: 'date',
1911
- props: {
1912
- placeholder: ['开始日期', '结束日期'],
1913
- },
1914
- },
1915
- },
1916
- },
1917
- },
1918
- },
1919
- },
1920
- },
1921
- ];
1922
-
1923
- export const defaultSettings = [
1924
- {
1925
- title: '基础组件',
1926
- widgets: elements,
1927
- show: true,
1928
- useCommon: true, // TODO: 是否将common
1929
- },
1930
- {
1931
- title: '高级组件',
1932
- widgets: advancedElements,
1933
- },
1934
- // {
1935
- // title: '布局组件',
1936
- // widgets: layouts,
1937
- // },
1938
- // {
1939
- // title: '模板',
1940
- // widgets: saves,
1941
- // },
1942
- ];
1943
-
1944
- export const USdefaultSettings = [
1945
- {
1946
- "title": "Basic",
1947
- "widgets": USelements,
1948
- "show": true,
1949
- "useCommon": true, // TODO: Should include common components?
1950
- },
1951
- {
1952
- "title": "Advanced",
1953
- "widgets": USadvancedElements,
1954
- },
1955
- // {
1956
- // "title": "Layout Components",
1957
- // "widgets": layouts,
1958
- // },
1959
- // {
1960
- // "title": "Templates",
1961
- // "widgets": saves,
1962
- // },
1963
- ]
1964
-
1965
-
1966
- export const defaultGlobalSettings = {
1967
- type: 'object',
1968
- properties: {
1969
- column: {
1970
- title: '整体布局',
1971
- type: 'number',
1972
- enum: [1, 2, 3],
1973
- enumNames: ['一行一列', '一行二列', '一行三列'],
1974
- props: {
1975
- placeholder: '默认一行一列',
1976
- },
1977
- },
1978
- labelWidth: {
1979
- title: '标签宽度',
1980
- type: 'number',
1981
- widget: 'slider',
1982
- max: 300,
1983
- default: 120,
1984
- props: {
1985
- hideNumber: true,
1986
- },
1987
- },
1988
- displayType: {
1989
- title: '标签展示模式',
1990
- type: 'string',
1991
- default: 'row',
1992
- enum: ['row', 'column'],
1993
- enumNames: ['同行', '单独一行'],
1994
- widget: 'radio',
1995
- },
1996
- },
1997
- };
1998
-
1999
- export const USdefaultGlobalSettings = {
2000
- "type": "object",
2001
- "properties": {
2002
- "column": {
2003
- "title": "Grid Layout",
2004
- "type": "number",
2005
- "enum": [1, 2, 3],
2006
- "enumNames": ["Single Column", "Two Columns", "Three Columns"],
2007
- "props": {
2008
- "placeholder": "Single Column by default"
2009
- }
2010
- },
2011
- "labelWidth": {
2012
- "title": "Label Width",
2013
- "type": "number",
2014
- "widget": "slider",
2015
- "max": 300,
2016
- "default": 120,
2017
- "props": {
2018
- "hideNumber": true
2019
- }
2020
- },
2021
- "displayType": {
2022
- "title": "Label Position",
2023
- "type": "string",
2024
- "default": "row",
2025
- "enum": ["row", "column"],
2026
- "enumNames": ["Inline", "Above Field"],
2027
- "widget": "radio"
2028
- }
2029
- }
2030
- }