@gem-sdk/components 2.0.0-dev.394 → 2.0.0-dev.395

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.
@@ -0,0 +1,724 @@
1
+ const ControlUIV2 = [
2
+ {
3
+ label: {
4
+ en: 'Bundle management'
5
+ },
6
+ controls: [
7
+ {
8
+ type: 'control',
9
+ layout: 'vertical',
10
+ setting: {
11
+ id: 'childItem'
12
+ }
13
+ }
14
+ ]
15
+ },
16
+ {
17
+ controls: [
18
+ {
19
+ label: {
20
+ en: 'Use product compare-at price'
21
+ },
22
+ setting: {
23
+ id: 'useProductCompareAtPrice'
24
+ }
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ controls: [
30
+ {
31
+ label: {
32
+ en: 'Hide no-discount items'
33
+ },
34
+ setting: {
35
+ id: 'hideNoDiscountItem'
36
+ }
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ label: {
42
+ en: 'Item gap'
43
+ },
44
+ controls: [
45
+ {
46
+ label: {
47
+ en: 'Gap'
48
+ },
49
+ setting: {
50
+ id: 'itemSpacing'
51
+ }
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ controls: [
57
+ {
58
+ type: 'control',
59
+ label: {
60
+ en: 'Radio icon'
61
+ },
62
+ setting: {
63
+ id: 'enableIcon'
64
+ },
65
+ options: {
66
+ labelVariant: 'primary',
67
+ toggleStyle: 'switch'
68
+ }
69
+ },
70
+ {
71
+ conditionDisplay: 'enableIcon == true && layout == "vertical-layout"',
72
+ label: {
73
+ en: 'Position'
74
+ },
75
+ setting: {
76
+ id: 'iconPosition'
77
+ }
78
+ },
79
+ {
80
+ type: 'control',
81
+ conditionDisplay: 'enableIcon == true && layout == "horizontal-layout"',
82
+ label: {
83
+ en: 'Position'
84
+ },
85
+ setting: {
86
+ id: 'iconHorizontalPosition'
87
+ }
88
+ },
89
+ {
90
+ type: 'control',
91
+ label: {
92
+ en: 'Color'
93
+ },
94
+ setting: {
95
+ id: 'iconItemColor'
96
+ }
97
+ },
98
+ {
99
+ type: 'control',
100
+ conditionDisplay: 'enableIcon == true',
101
+ label: {
102
+ en: 'Size'
103
+ },
104
+ setting: {
105
+ id: 'iconSize'
106
+ }
107
+ },
108
+ {
109
+ type: 'control',
110
+ conditionDisplay: 'enableIcon == true',
111
+ label: {
112
+ en: 'Gap'
113
+ },
114
+ setting: {
115
+ id: 'iconSpacing'
116
+ }
117
+ }
118
+ ]
119
+ },
120
+ // {
121
+ // label: {
122
+ // en: 'Size',
123
+ // },
124
+ // controls: [
125
+ // {
126
+ // type: 'control',
127
+ // setting: {
128
+ // id: 'size',
129
+ // },
130
+ // },
131
+ // ],
132
+ // },
133
+ {
134
+ label: {
135
+ en: 'Item states'
136
+ },
137
+ controls: [
138
+ {
139
+ type: 'tab',
140
+ controls: [
141
+ {
142
+ type: 'group',
143
+ label: {
144
+ en: 'Default'
145
+ },
146
+ controls: [
147
+ {
148
+ type: 'control',
149
+ label: {
150
+ en: 'Icon'
151
+ },
152
+ setting: {
153
+ id: 'iconColor',
154
+ state: 'normal'
155
+ }
156
+ },
157
+ {
158
+ type: 'control',
159
+ label: {
160
+ en: 'Background'
161
+ },
162
+ setting: {
163
+ id: 'backgroundColor',
164
+ state: 'normal'
165
+ }
166
+ },
167
+ {
168
+ type: 'control',
169
+ label: {
170
+ en: 'Border'
171
+ },
172
+ setting: {
173
+ id: 'borderBundle',
174
+ state: 'normal'
175
+ }
176
+ },
177
+ {
178
+ type: 'control',
179
+ label: {
180
+ en: 'Corner'
181
+ },
182
+ setting: {
183
+ id: 'roundedBundle',
184
+ state: 'normal'
185
+ }
186
+ },
187
+ {
188
+ type: 'control',
189
+ label: {
190
+ en: 'Shadow'
191
+ },
192
+ setting: {
193
+ id: 'hasBoxShadowBundle',
194
+ state: 'normal'
195
+ }
196
+ },
197
+ {
198
+ type: 'group',
199
+ conditionDisplay: 'hasBoxShadowBundle.normal == true',
200
+ controls: [
201
+ {
202
+ type: 'control',
203
+ layout: 'vertical',
204
+ setting: {
205
+ id: 'boxShadowBundle',
206
+ state: 'normal'
207
+ }
208
+ }
209
+ ]
210
+ }
211
+ ]
212
+ },
213
+ {
214
+ type: 'group',
215
+ label: {
216
+ en: 'Hover'
217
+ },
218
+ controls: [
219
+ {
220
+ type: 'control',
221
+ label: {
222
+ en: 'Icon'
223
+ },
224
+ setting: {
225
+ id: 'iconColor',
226
+ state: 'hover'
227
+ }
228
+ },
229
+ {
230
+ type: 'control',
231
+ label: {
232
+ en: 'Background'
233
+ },
234
+ setting: {
235
+ id: 'backgroundColor',
236
+ state: 'hover'
237
+ }
238
+ },
239
+ {
240
+ type: 'control',
241
+ label: {
242
+ en: 'Border'
243
+ },
244
+ setting: {
245
+ id: 'borderBundle',
246
+ state: 'hover'
247
+ }
248
+ },
249
+ {
250
+ type: 'control',
251
+ label: {
252
+ en: 'Corner'
253
+ },
254
+ setting: {
255
+ id: 'roundedBundle',
256
+ state: 'hover'
257
+ }
258
+ },
259
+ {
260
+ type: 'control',
261
+ label: {
262
+ en: 'Shadow'
263
+ },
264
+ setting: {
265
+ id: 'hasBoxShadowBundle',
266
+ state: 'hover'
267
+ }
268
+ },
269
+ {
270
+ type: 'group',
271
+ conditionDisplay: 'hasBoxShadowBundle.hover == true',
272
+ controls: [
273
+ {
274
+ type: 'control',
275
+ setting: {
276
+ id: 'boxShadowBundle',
277
+ state: 'hover'
278
+ },
279
+ layout: 'vertical'
280
+ }
281
+ ]
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ type: 'group',
287
+ label: {
288
+ en: 'Active'
289
+ },
290
+ controls: [
291
+ {
292
+ type: 'control',
293
+ label: {
294
+ en: 'Icon'
295
+ },
296
+ setting: {
297
+ id: 'iconColor',
298
+ state: 'active'
299
+ }
300
+ },
301
+ {
302
+ type: 'control',
303
+ label: {
304
+ en: 'Background'
305
+ },
306
+ setting: {
307
+ id: 'backgroundColor',
308
+ state: 'active'
309
+ }
310
+ },
311
+ {
312
+ type: 'control',
313
+ label: {
314
+ en: 'Border'
315
+ },
316
+ setting: {
317
+ id: 'borderBundle',
318
+ state: 'active'
319
+ }
320
+ },
321
+ {
322
+ type: 'control',
323
+ label: {
324
+ en: 'Corner'
325
+ },
326
+ setting: {
327
+ id: 'roundedBundle',
328
+ state: 'active'
329
+ }
330
+ },
331
+ {
332
+ type: 'control',
333
+ label: {
334
+ en: 'Shadow'
335
+ },
336
+ setting: {
337
+ id: 'hasBoxShadowBundle',
338
+ state: 'active'
339
+ }
340
+ },
341
+ {
342
+ type: 'group',
343
+ conditionDisplay: 'hasBoxShadowBundle.active == true',
344
+ controls: [
345
+ {
346
+ type: 'control',
347
+ setting: {
348
+ id: 'boxShadowBundle',
349
+ state: 'active'
350
+ },
351
+ layout: 'vertical'
352
+ }
353
+ ]
354
+ }
355
+ ]
356
+ }
357
+ ]
358
+ }
359
+ ]
360
+ },
361
+ {
362
+ label: {
363
+ en: 'Item style'
364
+ },
365
+ controls: [
366
+ {
367
+ label: {
368
+ en: 'Background'
369
+ },
370
+ setting: {
371
+ id: 'backgroundColor',
372
+ state: 'normal'
373
+ }
374
+ },
375
+ {
376
+ label: {
377
+ en: 'Border'
378
+ },
379
+ setting: {
380
+ id: 'borderBundle',
381
+ state: 'normal'
382
+ }
383
+ },
384
+ {
385
+ label: {
386
+ en: 'Corner'
387
+ },
388
+ setting: {
389
+ id: 'roundedBundle',
390
+ state: 'normal'
391
+ }
392
+ },
393
+ {
394
+ label: {
395
+ en: 'Shadow'
396
+ },
397
+ setting: {
398
+ id: 'boxShadowBundle',
399
+ state: 'normal'
400
+ },
401
+ controlConfig: {
402
+ id: 'boxShadowBundle',
403
+ type: 'shadow-v2'
404
+ }
405
+ }
406
+ ]
407
+ },
408
+ {
409
+ label: {
410
+ en: 'Hover effect'
411
+ },
412
+ controls: [
413
+ {
414
+ label: {
415
+ en: 'Background'
416
+ },
417
+ setting: {
418
+ id: 'backgroundColor',
419
+ state: 'hover'
420
+ }
421
+ },
422
+ {
423
+ label: {
424
+ en: 'Icon color'
425
+ },
426
+ setting: {
427
+ id: 'iconColor',
428
+ state: 'hover'
429
+ }
430
+ },
431
+ {
432
+ label: {
433
+ en: 'Border'
434
+ },
435
+ setting: {
436
+ id: 'borderBundle',
437
+ state: 'hover'
438
+ }
439
+ },
440
+ {
441
+ label: {
442
+ en: 'Corner'
443
+ },
444
+ setting: {
445
+ id: 'roundedBundle',
446
+ state: 'hover'
447
+ }
448
+ },
449
+ {
450
+ label: {
451
+ en: 'Shadow'
452
+ },
453
+ setting: {
454
+ id: 'boxShadowBundle',
455
+ state: 'hover'
456
+ },
457
+ controlConfig: {
458
+ id: 'boxShadowBundle',
459
+ type: 'shadow-v2'
460
+ }
461
+ }
462
+ ]
463
+ },
464
+ {
465
+ label: {
466
+ en: 'Active state'
467
+ },
468
+ controls: [
469
+ {
470
+ label: {
471
+ en: 'Background'
472
+ },
473
+ setting: {
474
+ id: 'backgroundColor',
475
+ state: 'active'
476
+ }
477
+ },
478
+ {
479
+ label: {
480
+ en: 'Icon color'
481
+ },
482
+ setting: {
483
+ id: 'iconColor',
484
+ state: 'active'
485
+ }
486
+ },
487
+ {
488
+ label: {
489
+ en: 'Border'
490
+ },
491
+ setting: {
492
+ id: 'borderBundle',
493
+ state: 'active'
494
+ }
495
+ },
496
+ {
497
+ label: {
498
+ en: 'Corner'
499
+ },
500
+ setting: {
501
+ id: 'roundedBundle',
502
+ state: 'active'
503
+ }
504
+ },
505
+ {
506
+ label: {
507
+ en: 'Shadow'
508
+ },
509
+ setting: {
510
+ id: 'boxShadowBundle',
511
+ state: 'active'
512
+ },
513
+ controlConfig: {
514
+ id: 'boxShadowBundle',
515
+ type: 'shadow-v2'
516
+ }
517
+ }
518
+ ]
519
+ },
520
+ {
521
+ label: {
522
+ en: 'Size'
523
+ },
524
+ controls: [
525
+ {
526
+ id: 'Width',
527
+ label: {
528
+ en: 'Width'
529
+ },
530
+ controlConfig: {
531
+ id: 'width',
532
+ type: 'dropdown:input',
533
+ label: 'Width',
534
+ inputType: 'number',
535
+ units: [
536
+ 'px',
537
+ '%'
538
+ ],
539
+ hideUnit: false,
540
+ linkWithSetting: {
541
+ name: 'size',
542
+ field: 'width'
543
+ },
544
+ displayOptions: [
545
+ {
546
+ label: 'Fit content',
547
+ value: 'Auto',
548
+ showValue: true
549
+ },
550
+ {
551
+ label: 'Full',
552
+ value: '100%',
553
+ showValue: true
554
+ },
555
+ {
556
+ label: 'Small',
557
+ value: '100px',
558
+ showValue: true
559
+ },
560
+ {
561
+ label: 'Medium',
562
+ value: '200px',
563
+ showValue: true
564
+ },
565
+ {
566
+ label: 'Large',
567
+ value: '300px',
568
+ showValue: true
569
+ }
570
+ ]
571
+ },
572
+ layout: 'horizontal'
573
+ },
574
+ {
575
+ label: {
576
+ en: 'Padding'
577
+ },
578
+ controlConfig: {
579
+ id: 'padding',
580
+ type: 'padding-v2',
581
+ linkWithSetting: {
582
+ name: 'size',
583
+ field: 'padding'
584
+ },
585
+ compoDefaultValue: {
586
+ desktop: {
587
+ default: {
588
+ type: 'custom',
589
+ top: '12px',
590
+ bottom: '12px',
591
+ left: '32px',
592
+ right: '32px'
593
+ }
594
+ }
595
+ }
596
+ }
597
+ }
598
+ ]
599
+ },
600
+ {
601
+ label: {
602
+ en: 'Shape',
603
+ cn: '形状',
604
+ es: 'Forma'
605
+ },
606
+ conditionDisplay: 'pageType != "POST_PURCHASE"',
607
+ controls: [
608
+ {
609
+ label: {
610
+ en: 'Border',
611
+ cn: '边界',
612
+ es: 'Borde'
613
+ },
614
+ setting: {
615
+ id: 'border',
616
+ state: 'normal'
617
+ }
618
+ },
619
+ {
620
+ label: {
621
+ en: 'Corner',
622
+ cn: '角落',
623
+ es: 'Esquina'
624
+ },
625
+ setting: {
626
+ id: 'rounded',
627
+ state: 'normal'
628
+ }
629
+ },
630
+ {
631
+ label: {
632
+ en: 'Shadow',
633
+ cn: '阴影',
634
+ es: 'Sombra'
635
+ },
636
+ setting: {
637
+ id: 'boxShadow',
638
+ state: 'normal'
639
+ },
640
+ options: {
641
+ updateFields: [
642
+ {
643
+ field: 'enable',
644
+ settingId: 'advanced.hasBoxShadow',
645
+ state: 'normal'
646
+ }
647
+ ]
648
+ },
649
+ controlChangeTrigger: {
650
+ settings: [
651
+ {
652
+ condition: `boxShadow.normal.enable === true`,
653
+ source: [
654
+ 'boxShadow',
655
+ 'hasBoxShadow'
656
+ ],
657
+ action: {
658
+ controlId: 'hasBoxShadow',
659
+ groupType: 'advanced',
660
+ controlType: 'advanced',
661
+ state: 'normal',
662
+ newValue: true
663
+ }
664
+ },
665
+ {
666
+ condition: `boxShadow.normal.enable === false`,
667
+ source: [
668
+ 'boxShadow',
669
+ 'hasBoxShadow'
670
+ ],
671
+ action: {
672
+ controlId: 'hasBoxShadow',
673
+ groupType: 'advanced',
674
+ controlType: 'advanced',
675
+ state: 'normal',
676
+ newValue: false
677
+ }
678
+ }
679
+ ],
680
+ options: {
681
+ noRecordHistory: true
682
+ }
683
+ }
684
+ }
685
+ ]
686
+ },
687
+ {
688
+ controls: [
689
+ {
690
+ type: 'control',
691
+ label: {
692
+ en: 'Display condition'
693
+ },
694
+ options: {
695
+ labelVariant: 'primary',
696
+ toggleStyle: 'switch'
697
+ }
698
+ },
699
+ {
700
+ layout: 'vertical',
701
+ setting: {
702
+ id: 'selectItemDefault'
703
+ }
704
+ }
705
+ ]
706
+ },
707
+ {
708
+ controls: [
709
+ {
710
+ label: {
711
+ en: 'Align'
712
+ },
713
+ setting: {
714
+ id: 'align'
715
+ },
716
+ options: {
717
+ labelVariant: 'primary'
718
+ }
719
+ }
720
+ ]
721
+ }
722
+ ];
723
+
724
+ export { ControlUIV2 as default };