yy-forms 1.0.36 → 1.0.38

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/dist/index.esm.js CHANGED
@@ -1936,6 +1936,90 @@ var defaultCommonSettings = {
1936
1936
  }
1937
1937
  }
1938
1938
  };
1939
+ var USdefaultCommonSettings = {
1940
+ "$id": {
1941
+ "title": "ID",
1942
+ "description": "Field Name / English",
1943
+ "type": "string",
1944
+ "widget": "idInput",
1945
+ "require": true,
1946
+ "rules": [{
1947
+ "pattern": "^#/.+$",
1948
+ "message": "ID is required"
1949
+ }]
1950
+ },
1951
+ "title": {
1952
+ "title": "Title",
1953
+ "type": "string",
1954
+ "widget": "htmlInput"
1955
+ },
1956
+ "displayType": {
1957
+ "title": "Title Display Mode",
1958
+ "type": "string",
1959
+ "enum": ["row", "column"],
1960
+ "enumNames": ["Same Line", "Separate Line"],
1961
+ "widget": "radio"
1962
+ },
1963
+ "description": {
1964
+ "title": "Description",
1965
+ "type": "string"
1966
+ },
1967
+ "default": {
1968
+ "title": "Default Value",
1969
+ "type": "string"
1970
+ },
1971
+ "required": {
1972
+ "title": "Required",
1973
+ "type": "boolean"
1974
+ },
1975
+ "placeholder": {
1976
+ "title": "Placeholder",
1977
+ "type": "string"
1978
+ },
1979
+ "bind": {
1980
+ "title": "Bind",
1981
+ "type": "string"
1982
+ },
1983
+ "min": {
1984
+ "title": "Minimum Value",
1985
+ "type": "number"
1986
+ },
1987
+ "max": {
1988
+ "title": "Maximum Value",
1989
+ "type": "number"
1990
+ },
1991
+ "disabled": {
1992
+ "title": "Disabled",
1993
+ "type": "boolean"
1994
+ },
1995
+ "readOnly": {
1996
+ "title": "Read Only",
1997
+ "type": "boolean"
1998
+ },
1999
+ "hidden": {
2000
+ "title": "Hidden",
2001
+ "type": "boolean"
2002
+ },
2003
+ "readOnlyWidget": {
2004
+ "title": "Read Only Widget",
2005
+ "type": "string"
2006
+ },
2007
+ "width": {
2008
+ "title": "Element Width",
2009
+ "type": "string",
2010
+ "widget": "percentSlider"
2011
+ },
2012
+ "labelWidth": {
2013
+ "title": "Label Width",
2014
+ "description": "Default: 120",
2015
+ "type": "number",
2016
+ "widget": "slider",
2017
+ "max": 400,
2018
+ "props": {
2019
+ "hideNumber": true
2020
+ }
2021
+ }
2022
+ };
1939
2023
 
1940
2024
  // widget 用于指定 schema 右侧配置对应的 setting
1941
2025
  var elements = [{
@@ -2305,6 +2389,373 @@ var elements = [{
2305
2389
  }
2306
2390
  }
2307
2391
  }];
2392
+ var USelements = [{
2393
+ "text": "Input Field",
2394
+ "name": "input",
2395
+ "schema": {
2396
+ "title": "Input Field",
2397
+ "type": "string"
2398
+ },
2399
+ "setting": {
2400
+ "props": {
2401
+ "title": "Options",
2402
+ "type": "object",
2403
+ "labelWidth": 80,
2404
+ "properties": {
2405
+ "allowClear": {
2406
+ "title": "Show Clear Button",
2407
+ "description": "The 'X' icon appears only after content is entered",
2408
+ "type": "boolean"
2409
+ },
2410
+ "addonBefore": {
2411
+ "title": "Prefix Add-on",
2412
+ "type": "string"
2413
+ },
2414
+ "addonAfter": {
2415
+ "title": "Suffix Add-on",
2416
+ "type": "string"
2417
+ },
2418
+ "prefix": {
2419
+ "title": "Prefix",
2420
+ "type": "string"
2421
+ },
2422
+ "suffix": {
2423
+ "title": "Suffix",
2424
+ "type": "string"
2425
+ }
2426
+ }
2427
+ },
2428
+ "minLength": {
2429
+ "title": "Minimum Characters",
2430
+ "type": "number"
2431
+ },
2432
+ "maxLength": {
2433
+ "title": "Maximum Characters",
2434
+ "type": "number"
2435
+ },
2436
+ "pattern": {
2437
+ "title": "Validation Pattern",
2438
+ "type": "string",
2439
+ "props": {
2440
+ "placeholder": "Enter regular expression"
2441
+ }
2442
+ }
2443
+ }
2444
+ }, {
2445
+ "text": "Text Area",
2446
+ "name": "textarea",
2447
+ "schema": {
2448
+ "title": "Text Area",
2449
+ "type": "string",
2450
+ "format": "textarea"
2451
+ },
2452
+ "setting": {
2453
+ "props": {
2454
+ "title": "Options",
2455
+ "type": "object",
2456
+ "labelWidth": 80,
2457
+ "properties": {
2458
+ "autoSize": {
2459
+ "title": "Auto Resize",
2460
+ "type": "boolean"
2461
+ },
2462
+ "rows": {
2463
+ "title": "Fixed Rows",
2464
+ "type": "number"
2465
+ }
2466
+ }
2467
+ },
2468
+ "minLength": {
2469
+ "title": "Minimum Characters",
2470
+ "type": "number"
2471
+ },
2472
+ "maxLength": {
2473
+ "title": "Maximum Characters",
2474
+ "type": "number"
2475
+ },
2476
+ "pattern": {
2477
+ "title": "Validation Pattern",
2478
+ "type": "string",
2479
+ "props": {
2480
+ "placeholder": "Enter regular expression"
2481
+ }
2482
+ }
2483
+ }
2484
+ }, {
2485
+ "text": "Date Picker",
2486
+ "name": "date",
2487
+ "schema": {
2488
+ "title": "Date Picker",
2489
+ "type": "string",
2490
+ "format": "date"
2491
+ },
2492
+ "setting": {
2493
+ "format": {
2494
+ "title": "Format",
2495
+ "type": "string",
2496
+ "enum": ["dateTime", "date", "time"],
2497
+ "enumNames": ["Date & Time", "Date", "Time"]
2498
+ }
2499
+ }
2500
+ }, {
2501
+ "text": "Time Picker",
2502
+ "name": "time",
2503
+ "show": false,
2504
+ "schema": {
2505
+ "title": "Time Picker",
2506
+ "type": "string",
2507
+ "format": "time"
2508
+ },
2509
+ "setting": {
2510
+ "format": {
2511
+ "title": "Format",
2512
+ "type": "string",
2513
+ "enum": ["dateTime", "date", "time"],
2514
+ "enumNames": ["Date & Time", "Date", "Time"]
2515
+ }
2516
+ }
2517
+ }, {
2518
+ "text": "Number Input",
2519
+ "name": "number",
2520
+ "schema": {
2521
+ "title": "Number Input",
2522
+ "type": "number"
2523
+ },
2524
+ "setting": {
2525
+ "default": {
2526
+ "title": "Default Value",
2527
+ "type": "number"
2528
+ }
2529
+ }
2530
+ }, {
2531
+ "text": "Checkbox",
2532
+ "name": "checkbox",
2533
+ "schema": {
2534
+ "title": "Checkbox",
2535
+ "type": "boolean",
2536
+ "widget": "checkbox"
2537
+ },
2538
+ "setting": {
2539
+ "default": {
2540
+ "title": "Checked by Default",
2541
+ "type": "boolean"
2542
+ }
2543
+ }
2544
+ }, {
2545
+ "text": "Switch",
2546
+ "name": "switch",
2547
+ "schema": {
2548
+ "title": "Switch",
2549
+ "type": "boolean",
2550
+ "widget": "switch"
2551
+ },
2552
+ "setting": {
2553
+ "default": {
2554
+ "title": "On by Default",
2555
+ "type": "boolean"
2556
+ }
2557
+ }
2558
+ }, {
2559
+ "text": "Dropdown Select",
2560
+ "name": "select",
2561
+ "schema": {
2562
+ "title": "Single Select",
2563
+ "type": "string",
2564
+ "enum": ["a", "b", "c"],
2565
+ "enumNames": ["Morning", "Noon", "Evening"],
2566
+ "widget": "select"
2567
+ },
2568
+ "setting": {
2569
+ "enumList": {
2570
+ "title": "Options",
2571
+ "type": "array",
2572
+ "widget": "simpleList",
2573
+ "className": "frg-options-list",
2574
+ "items": {
2575
+ "type": "object",
2576
+ "properties": {
2577
+ "value": {
2578
+ "title": "",
2579
+ "type": "string",
2580
+ "className": "frg-options-input",
2581
+ "props": {},
2582
+ "placeholder": "Value"
2583
+ },
2584
+ "label": {
2585
+ "title": "",
2586
+ "type": "string",
2587
+ "className": "frg-options-input",
2588
+ "props": {},
2589
+ "placeholder": "Label"
2590
+ }
2591
+ }
2592
+ },
2593
+ "props": {
2594
+ "hideMove": true,
2595
+ "hideCopy": true
2596
+ }
2597
+ }
2598
+ }
2599
+ }, {
2600
+ "text": "Radio Buttons",
2601
+ "name": "radio",
2602
+ "schema": {
2603
+ "title": "Radio Buttons",
2604
+ "type": "string",
2605
+ "enum": ["a", "b", "c"],
2606
+ "enumNames": ["Morning", "Noon", "Evening"],
2607
+ "widget": "radio"
2608
+ },
2609
+ "setting": {
2610
+ "enumList": {
2611
+ "title": "Options",
2612
+ "type": "array",
2613
+ "widget": "simpleList",
2614
+ "className": "frg-options-list",
2615
+ "items": {
2616
+ "type": "object",
2617
+ "properties": {
2618
+ "value": {
2619
+ "title": "",
2620
+ "type": "string",
2621
+ "className": "frg-options-input",
2622
+ "props": {},
2623
+ "placeholder": "Value"
2624
+ },
2625
+ "label": {
2626
+ "title": "",
2627
+ "type": "string",
2628
+ "className": "frg-options-input",
2629
+ "props": {},
2630
+ "placeholder": "Label"
2631
+ }
2632
+ }
2633
+ },
2634
+ "props": {
2635
+ "hideMove": true,
2636
+ "hideCopy": true
2637
+ }
2638
+ }
2639
+ }
2640
+ }, {
2641
+ "text": "Multi-Select Dropdown",
2642
+ "name": "multiSelect",
2643
+ "schema": {
2644
+ "title": "Multi-Select",
2645
+ "description": "Dropdown multi-select",
2646
+ "type": "array",
2647
+ "items": {
2648
+ "type": "string"
2649
+ },
2650
+ "enum": ["A", "B", "C", "D"],
2651
+ "enumNames": ["Hangzhou", "Wuhan", "Huzhou", "Guiyang"],
2652
+ "widget": "multiSelect"
2653
+ },
2654
+ "setting": {
2655
+ "default": {
2656
+ "title": "Default Value",
2657
+ "type": "array",
2658
+ "widget": "jsonInput"
2659
+ },
2660
+ "enumList": {
2661
+ "title": "Options",
2662
+ "type": "array",
2663
+ "widget": "simpleList",
2664
+ "className": "frg-options-list",
2665
+ "items": {
2666
+ "type": "object",
2667
+ "properties": {
2668
+ "value": {
2669
+ "title": "",
2670
+ "type": "string",
2671
+ "className": "frg-options-input",
2672
+ "props": {},
2673
+ "placeholder": "Value"
2674
+ },
2675
+ "label": {
2676
+ "title": "",
2677
+ "type": "string",
2678
+ "className": "frg-options-input",
2679
+ "props": {},
2680
+ "placeholder": "Label"
2681
+ }
2682
+ }
2683
+ },
2684
+ "props": {
2685
+ "hideMove": true,
2686
+ "hideCopy": true
2687
+ }
2688
+ }
2689
+ }
2690
+ }, {
2691
+ "text": "Checkboxes",
2692
+ "name": "checkboxes",
2693
+ "schema": {
2694
+ "title": "Checkboxes",
2695
+ "type": "array",
2696
+ "widget": "checkboxes",
2697
+ "items": {
2698
+ "type": "string"
2699
+ },
2700
+ "enum": ["A", "B", "C", "D"],
2701
+ "enumNames": ["Hangzhou", "Wuhan", "Huzhou", "Guiyang"]
2702
+ },
2703
+ "setting": {
2704
+ "default": {
2705
+ "title": "Default Value",
2706
+ "type": "array",
2707
+ "widget": "jsonInput"
2708
+ },
2709
+ "enumList": {
2710
+ "title": "Options",
2711
+ "type": "array",
2712
+ "widget": "simpleList",
2713
+ "className": "frg-options-list",
2714
+ "items": {
2715
+ "type": "object",
2716
+ "properties": {
2717
+ "value": {
2718
+ "title": "",
2719
+ "type": "string",
2720
+ "className": "frg-options-input",
2721
+ "props": {},
2722
+ "placeholder": "Value"
2723
+ },
2724
+ "label": {
2725
+ "title": "",
2726
+ "type": "string",
2727
+ "className": "frg-options-input",
2728
+ "props": {},
2729
+ "placeholder": "Label"
2730
+ }
2731
+ }
2732
+ },
2733
+ "props": {
2734
+ "hideMove": true,
2735
+ "hideCopy": true
2736
+ }
2737
+ }
2738
+ }
2739
+ }, {
2740
+ "text": "HTML",
2741
+ "name": "html",
2742
+ "schema": {
2743
+ "title": "HTML",
2744
+ "type": "string",
2745
+ "widget": "html"
2746
+ },
2747
+ "setting": {
2748
+ "props": {
2749
+ "type": "object",
2750
+ "properties": {
2751
+ "value": {
2752
+ "title": "Display Content",
2753
+ "type": "string"
2754
+ }
2755
+ }
2756
+ }
2757
+ }
2758
+ }];
2308
2759
  var advancedElements = [{
2309
2760
  text: '日期范围',
2310
2761
  name: 'dateRange',
@@ -2357,6 +2808,58 @@ var advancedElements = [{
2357
2808
  },
2358
2809
  setting: {}
2359
2810
  }];
2811
+ var USadvancedElements = [{
2812
+ "text": "Date Range Picker",
2813
+ "name": "dateRange",
2814
+ "schema": {
2815
+ "title": "Date Range",
2816
+ "type": "range",
2817
+ "format": "dateTime",
2818
+ "props": {
2819
+ "placeholder": ["Start Date", "End Date"]
2820
+ }
2821
+ },
2822
+ "setting": {
2823
+ "format": {
2824
+ "title": "Format",
2825
+ "type": "string",
2826
+ "enum": ["dateTime", "date"],
2827
+ "enumNames": ["DateTime", "Date"]
2828
+ }
2829
+ }
2830
+ }, {
2831
+ "text": "Slider",
2832
+ "name": "slider",
2833
+ "schema": {
2834
+ "title": "Slider",
2835
+ "type": "number",
2836
+ "widget": "slider"
2837
+ },
2838
+ "setting": {
2839
+ "default": {
2840
+ "title": "Default",
2841
+ "type": "number"
2842
+ }
2843
+ }
2844
+ }, {
2845
+ "text": "Image",
2846
+ "name": "image",
2847
+ "schema": {
2848
+ "title": "Image",
2849
+ "type": "string",
2850
+ "format": "image"
2851
+ },
2852
+ "setting": {}
2853
+ }, {
2854
+ "text": "Color Selector",
2855
+ "name": "color",
2856
+ "schema": {
2857
+ "title": "Color Selector",
2858
+ "type": "string",
2859
+ "format": "color"
2860
+ },
2861
+ "setting": {}
2862
+ }];
2360
2863
  var layouts = [{
2361
2864
  text: '对象',
2362
2865
  name: 'object',
@@ -2715,6 +3218,348 @@ var layouts = [{
2715
3218
  }
2716
3219
  }
2717
3220
  }];
3221
+ var USlayouts = [{
3222
+ "text": "Object",
3223
+ "name": "object",
3224
+ "schema": {
3225
+ "title": "Object",
3226
+ "type": "object",
3227
+ "properties": {}
3228
+ },
3229
+ "setting": {
3230
+ "theme": {
3231
+ "title": "Theme",
3232
+ "type": "string",
3233
+ "enum": ["collapse", "collapse:pure", "collapse:ghost", "card", "tile", "flex"],
3234
+ "enumNames": ["Default", "No Border", "Ghost", "Card", "Tile", "Flex"],
3235
+ "default": "collapse",
3236
+ "widget": "radio"
3237
+ },
3238
+ "props": {
3239
+ "title": "Flex Layout",
3240
+ "hidden": "{{'flex' !== formData.theme}}",
3241
+ "type": "object",
3242
+ "theme": "tile",
3243
+ "properties": {
3244
+ "style": {
3245
+ "title": "Layout Style",
3246
+ "type": "object",
3247
+ "theme": "flex",
3248
+ "props": {
3249
+ "style": {
3250
+ "flexDirection": "column"
3251
+ }
3252
+ },
3253
+ "properties": {
3254
+ "height": {
3255
+ "title": "Height",
3256
+ "description": "height",
3257
+ "type": "string",
3258
+ "widget": "input"
3259
+ },
3260
+ "flexDirection": {
3261
+ "title": "Layout Direction",
3262
+ "description": "flex-direction",
3263
+ "type": "string",
3264
+ "enum": ["row", "row-reverse", "column", "column-reverse"],
3265
+ "enumNames": ["Horizontal", "Horizontal Reverse", "Vertical", "Vertical Reverse"],
3266
+ "widget": "select"
3267
+ },
3268
+ "flexWrap": {
3269
+ "title": "Wrap Mode",
3270
+ "description": "flex-wrap",
3271
+ "type": "string",
3272
+ "enum": ["wrap", "nowrap", "wrap-reverse"],
3273
+ "enumNames": ["Wrap", "No Wrap", "Wrap Reverse"],
3274
+ "widget": "select"
3275
+ },
3276
+ "justifyContent": {
3277
+ "title": "Justify Content",
3278
+ "description": "justify-content",
3279
+ "type": "string",
3280
+ "enum": ["flex-start", "flex-end", "center", "space-between", "space-around"],
3281
+ "enumNames": ["Start", "End", "Center", "Space Between", "Space Around"],
3282
+ "widget": "select"
3283
+ },
3284
+ "alignItems": {
3285
+ "title": "Align Items",
3286
+ "description": "align-items",
3287
+ "type": "string",
3288
+ "enum": ["flex-start", "flex-end", "center", "baseline", "stretch"],
3289
+ "enumNames": ["Start", "End", "Center", "Baseline", "Stretch"],
3290
+ "widget": "select"
3291
+ },
3292
+ "alignContent": {
3293
+ "title": "Align Content",
3294
+ "description": "align-content",
3295
+ "type": "string",
3296
+ "enum": ["flex-start", "flex-end", "center", "space-between", "space-around", "stretch"],
3297
+ "enumNames": ["Start", "End", "Center", "Space Between", "Space Around", "Stretch"],
3298
+ "widget": "select"
3299
+ }
3300
+ }
3301
+ }
3302
+ }
3303
+ },
3304
+ "style": {
3305
+ "title": "Element Style",
3306
+ "type": "object",
3307
+ "properties": {
3308
+ "background": {
3309
+ "title": "Background",
3310
+ "description": "background",
3311
+ "type": "string",
3312
+ "widget": "color"
3313
+ },
3314
+ "margin": {
3315
+ "title": "Margin",
3316
+ "description": "margin",
3317
+ "type": "string",
3318
+ "widget": "input"
3319
+ },
3320
+ "padding": {
3321
+ "title": "Padding",
3322
+ "description": "padding",
3323
+ "type": "string",
3324
+ "widget": "input"
3325
+ },
3326
+ "borderWidth": {
3327
+ "title": "Border Width",
3328
+ "description": "border-width",
3329
+ "type": "string",
3330
+ "widget": "input"
3331
+ },
3332
+ "borderStyle": {
3333
+ "title": "Border Style",
3334
+ "description": "border-style",
3335
+ "type": "string",
3336
+ "widget": "input"
3337
+ },
3338
+ "borderColor": {
3339
+ "title": "Border Color",
3340
+ "description": "border-color",
3341
+ "type": "string",
3342
+ "widget": "color"
3343
+ },
3344
+ "borderRadius": {
3345
+ "title": "Border Radius",
3346
+ "description": "border-radius",
3347
+ "type": "string",
3348
+ "widget": "input"
3349
+ },
3350
+ "flex": {
3351
+ "title": "Flex",
3352
+ "description": "flex",
3353
+ "type": "string",
3354
+ "widget": "input"
3355
+ },
3356
+ "order": {
3357
+ "title": "Order",
3358
+ "description": "order",
3359
+ "type": "string",
3360
+ "widget": "input"
3361
+ },
3362
+ "alignSelf": {
3363
+ "title": "Align Self",
3364
+ "description": "align-self",
3365
+ "type": "string",
3366
+ "widget": "input"
3367
+ }
3368
+ }
3369
+ }
3370
+ }
3371
+ }, {
3372
+ "text": "Regular List",
3373
+ "name": "list",
3374
+ "schema": {
3375
+ "title": "Array",
3376
+ "type": "array",
3377
+ "items": {
3378
+ "type": "object",
3379
+ "properties": {}
3380
+ }
3381
+ },
3382
+ "setting": {
3383
+ "default": {
3384
+ "title": "Default Value",
3385
+ "type": "array",
3386
+ "widget": "jsonInput"
3387
+ },
3388
+ "items": {
3389
+ "type": "object",
3390
+ "hidden": "{{true}}"
3391
+ },
3392
+ "min": {
3393
+ "title": "Minimum Length",
3394
+ "type": "number"
3395
+ },
3396
+ "max": {
3397
+ "title": "Maximum Length",
3398
+ "type": "number"
3399
+ },
3400
+ "props": {
3401
+ "title": "Options",
3402
+ "type": "object",
3403
+ "properties": {
3404
+ "hideDelete": {
3405
+ "title": "Hide Delete Button",
3406
+ "type": "string"
3407
+ },
3408
+ "hideAdd": {
3409
+ "title": "Hide Add/Copy Button",
3410
+ "type": "string"
3411
+ }
3412
+ }
3413
+ }
3414
+ }
3415
+ }, {
3416
+ "text": "Simple List",
3417
+ "name": "simpleList",
3418
+ "schema": {
3419
+ "title": "Array",
3420
+ "type": "array",
3421
+ "widget": "simpleList",
3422
+ "items": {
3423
+ "type": "object",
3424
+ "properties": {}
3425
+ }
3426
+ },
3427
+ "setting": {
3428
+ "default": {
3429
+ "title": "Default Value",
3430
+ "type": "array",
3431
+ "widget": "jsonInput"
3432
+ },
3433
+ "items": {
3434
+ "type": "object",
3435
+ "hidden": "{{true}}"
3436
+ },
3437
+ "min": {
3438
+ "title": "Minimum Length",
3439
+ "type": "number"
3440
+ },
3441
+ "max": {
3442
+ "title": "Maximum Length",
3443
+ "type": "number"
3444
+ },
3445
+ "props": {
3446
+ "title": "Options",
3447
+ "type": "object",
3448
+ "properties": {
3449
+ "hideTitle": {
3450
+ "title": "Hide Title",
3451
+ "type": "boolean"
3452
+ },
3453
+ "hideDelete": {
3454
+ "title": "Hide Delete Button",
3455
+ "type": "string"
3456
+ },
3457
+ "hideAdd": {
3458
+ "title": "Hide Add/Copy Button",
3459
+ "type": "string"
3460
+ }
3461
+ }
3462
+ }
3463
+ }
3464
+ }, {
3465
+ "text": "Table List",
3466
+ "name": "list2",
3467
+ "schema": {
3468
+ "title": "Array",
3469
+ "type": "array",
3470
+ "widget": "list2",
3471
+ "items": {
3472
+ "type": "object",
3473
+ "properties": {}
3474
+ }
3475
+ },
3476
+ "setting": {
3477
+ "default": {
3478
+ "title": "Default Value",
3479
+ "type": "array",
3480
+ "widget": "jsonInput"
3481
+ },
3482
+ "items": {
3483
+ "type": "object",
3484
+ "hidden": "{{true}}"
3485
+ },
3486
+ "min": {
3487
+ "title": "Minimum Length",
3488
+ "type": "number"
3489
+ },
3490
+ "max": {
3491
+ "title": "Maximum Length",
3492
+ "type": "number"
3493
+ },
3494
+ "props": {
3495
+ "title": "Options",
3496
+ "type": "object",
3497
+ "properties": {
3498
+ "hideDelete": {
3499
+ "title": "Hide Delete Button",
3500
+ "type": "string"
3501
+ },
3502
+ "hideAdd": {
3503
+ "title": "Hide Add/Copy Button",
3504
+ "type": "string"
3505
+ },
3506
+ "hideCopy": {
3507
+ "title": "Hide Copy Button",
3508
+ "type": "string"
3509
+ },
3510
+ "hideMove": {
3511
+ "title": "Hide Move Buttons",
3512
+ "type": "string"
3513
+ }
3514
+ }
3515
+ }
3516
+ }
3517
+ }, {
3518
+ "text": "Complex Table List",
3519
+ "name": "drawerList",
3520
+ "schema": {
3521
+ "title": "Array",
3522
+ "type": "array",
3523
+ "widget": "drawerList",
3524
+ "items": {
3525
+ "type": "object",
3526
+ "properties": {}
3527
+ }
3528
+ },
3529
+ "setting": {
3530
+ "default": {
3531
+ "title": "Default Value",
3532
+ "type": "array",
3533
+ "widget": "jsonInput"
3534
+ },
3535
+ "items": {
3536
+ "type": "object",
3537
+ "hidden": "{{true}}"
3538
+ },
3539
+ "min": {
3540
+ "title": "Minimum Length",
3541
+ "type": "number"
3542
+ },
3543
+ "max": {
3544
+ "title": "Maximum Length",
3545
+ "type": "number"
3546
+ },
3547
+ "props": {
3548
+ "title": "Options",
3549
+ "type": "object",
3550
+ "properties": {
3551
+ "hideDelete": {
3552
+ "title": "Hide Delete Button",
3553
+ "type": "string"
3554
+ },
3555
+ "hideAdd": {
3556
+ "title": "Hide Add/Copy Button",
3557
+ "type": "string"
3558
+ }
3559
+ }
3560
+ }
3561
+ }
3562
+ }];
2718
3563
  var defaultSettings = [{
2719
3564
  title: '基础组件',
2720
3565
  widgets: elements,
@@ -3003,6 +3848,8 @@ var frgWidgets = /*#__PURE__*/Object.freeze({
3003
3848
 
3004
3849
  function ItemSettings(_ref) {
3005
3850
  var widgets = _ref.widgets;
3851
+ var _useTranslation = useTranslation(),
3852
+ i18n = _useTranslation.i18n;
3006
3853
  var setGlobal = useGlobal();
3007
3854
  var form = useForm();
3008
3855
  var isReady = useRef(false);
@@ -3062,12 +3909,15 @@ function ItemSettings(_ref) {
3062
3909
  isReady.current = false;
3063
3910
  var item = flatten[selected];
3064
3911
  if (!item || selected === '#') return;
3912
+ var elementsInfo = i18n.language === 'cn' ? USelements : elements;
3913
+ var advancedElementsInfo = i18n.language === 'cn' ? advancedElements : USadvancedElements;
3914
+ var layoutsInfo = i18n.language === 'cn' ? layouts : USlayouts;
3065
3915
  // 算 widgetList
3066
3916
  var _settings = Array.isArray(settings) ? [].concat(_toConsumableArray(settings), [{
3067
- widgets: [].concat(_toConsumableArray(elements), _toConsumableArray(advancedElements), _toConsumableArray(layouts))
3917
+ widgets: [].concat(_toConsumableArray(elementsInfo), _toConsumableArray(advancedElementsInfo), _toConsumableArray(layoutsInfo))
3068
3918
  }]) // TODO: 不是最优解
3069
3919
  : defaultSettings;
3070
- var _commonSettings = isObject(commonSettings) ? commonSettings : defaultCommonSettings;
3920
+ var _commonSettings = isObject(commonSettings) ? commonSettings : i18n.language === 'cn' ? defaultCommonSettings : USdefaultCommonSettings;
3071
3921
  var widgetList = getWidgetList(_settings, _commonSettings);
3072
3922
  var widgetName = getWidgetName(item.schema, globalMapping);
3073
3923
  var element = widgetList.find(function (e) {
@@ -3091,7 +3941,7 @@ function ItemSettings(_ref) {
3091
3941
  isReady.current = true;
3092
3942
  console.error(error);
3093
3943
  }
3094
- }, [selected]);
3944
+ }, [selected, i18n.language]);
3095
3945
  useEffect(function () {
3096
3946
  validation && onItemErrorChange(form === null || form === void 0 ? void 0 : form.errorFields);
3097
3947
  }, [validation, form === null || form === void 0 ? void 0 : form.errorFields]);