@gem-sdk/components 2.0.0-dev.253 → 2.0.0-dev.254

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,641 @@
1
+ const SettingUIV2 = [
2
+ {
3
+ label: {
4
+ en: 'Layout'
5
+ },
6
+ controls: [
7
+ {
8
+ type: 'control',
9
+ setting: {
10
+ id: 'fileUploadLayout'
11
+ },
12
+ layout: 'vertical'
13
+ },
14
+ {
15
+ type: 'control',
16
+ label: {
17
+ en: 'Arrange content'
18
+ },
19
+ setting: {
20
+ id: 'arrangeContent'
21
+ }
22
+ },
23
+ {
24
+ type: 'control',
25
+ label: {
26
+ en: 'Icon position'
27
+ },
28
+ setting: {
29
+ id: 'positionVertical'
30
+ },
31
+ conditionDisplay: "fileUploadLayout === 'vertical'"
32
+ },
33
+ {
34
+ type: 'control',
35
+ label: {
36
+ en: 'Icon position'
37
+ },
38
+ setting: {
39
+ id: 'positionHorizontal'
40
+ },
41
+ conditionDisplay: "fileUploadLayout !== 'vertical'"
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ label: {
47
+ en: 'Upload setting'
48
+ },
49
+ controls: [
50
+ {
51
+ type: 'control',
52
+ label: {
53
+ en: 'Required'
54
+ },
55
+ setting: {
56
+ id: 'isRequired'
57
+ }
58
+ },
59
+ {
60
+ type: 'control',
61
+ label: {
62
+ en: 'Click image to preview'
63
+ },
64
+ setting: {
65
+ id: 'isShowPreviewImage'
66
+ }
67
+ },
68
+ {
69
+ type: 'control',
70
+ label: {
71
+ en: 'Number of files'
72
+ },
73
+ setting: {
74
+ id: 'numberOfFiles'
75
+ }
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ controls: [
81
+ {
82
+ type: 'control',
83
+ label: {
84
+ en: 'Icon'
85
+ },
86
+ setting: {
87
+ id: 'iconVisible'
88
+ }
89
+ },
90
+ {
91
+ type: 'control',
92
+ label: {
93
+ en: 'Choose icon'
94
+ },
95
+ setting: {
96
+ id: 'iconSvg'
97
+ },
98
+ conditionDisplay: 'iconVisible === true'
99
+ },
100
+ {
101
+ type: 'control',
102
+ label: {
103
+ en: 'Size'
104
+ },
105
+ setting: {
106
+ id: 'iconSize'
107
+ },
108
+ conditionDisplay: 'iconVisible === true'
109
+ },
110
+ {
111
+ type: 'control',
112
+ label: {
113
+ en: 'Position'
114
+ },
115
+ setting: {
116
+ id: 'iconAlignVertical'
117
+ },
118
+ conditionDisplay: 'iconVisible === true && fileUploadLayout === "vertical"'
119
+ },
120
+ {
121
+ type: 'control',
122
+ label: {
123
+ en: 'Position'
124
+ },
125
+ setting: {
126
+ id: 'iconAlignHorizontal'
127
+ },
128
+ conditionDisplay: 'iconVisible === true && fileUploadLayout === "horizontal"'
129
+ }
130
+ ]
131
+ },
132
+ {
133
+ label: {
134
+ en: 'Size'
135
+ },
136
+ controls: [
137
+ {
138
+ id: 'Width',
139
+ label: {
140
+ en: 'Width'
141
+ },
142
+ controlConfig: {
143
+ id: 'width',
144
+ type: 'dropdown:input',
145
+ label: 'Width',
146
+ inputType: 'number',
147
+ units: [
148
+ 'px',
149
+ '%'
150
+ ],
151
+ hideUnit: false,
152
+ linkWithSetting: {
153
+ name: 'size',
154
+ field: 'width'
155
+ },
156
+ displayOptions: [
157
+ {
158
+ label: 'Fit content',
159
+ value: 'Auto',
160
+ showValue: true
161
+ },
162
+ {
163
+ label: 'Full',
164
+ value: '100%',
165
+ showValue: true
166
+ },
167
+ {
168
+ label: 'Small',
169
+ value: '100px',
170
+ showValue: true
171
+ },
172
+ {
173
+ label: 'Medium',
174
+ value: '200px',
175
+ showValue: true
176
+ },
177
+ {
178
+ label: 'Large',
179
+ value: '300px',
180
+ showValue: true
181
+ }
182
+ ]
183
+ },
184
+ layout: 'horizontal'
185
+ },
186
+ {
187
+ id: 'Height',
188
+ label: {
189
+ en: 'Height'
190
+ },
191
+ controlConfig: {
192
+ id: 'height',
193
+ type: 'dropdown:input',
194
+ label: 'height',
195
+ inputType: 'number',
196
+ units: [
197
+ 'px'
198
+ ],
199
+ hideUnit: false,
200
+ linkWithSetting: {
201
+ name: 'size',
202
+ field: 'height'
203
+ },
204
+ displayOptions: [
205
+ {
206
+ label: 'Fit content',
207
+ value: 'Auto',
208
+ showValue: true
209
+ },
210
+ {
211
+ label: 'Small',
212
+ value: '100px',
213
+ showValue: true
214
+ },
215
+ {
216
+ label: 'Medium',
217
+ value: '200px',
218
+ showValue: true
219
+ },
220
+ {
221
+ label: 'Large',
222
+ value: '300px',
223
+ showValue: true
224
+ }
225
+ ]
226
+ },
227
+ layout: 'horizontal'
228
+ },
229
+ {
230
+ label: {
231
+ en: 'Padding'
232
+ },
233
+ controlConfig: {
234
+ id: 'padding',
235
+ type: 'padding-v2',
236
+ linkWithSetting: {
237
+ name: 'paddingSize',
238
+ field: 'padding'
239
+ },
240
+ compoDefaultValue: {
241
+ desktop: {
242
+ default: {
243
+ type: 'custom',
244
+ top: '12px',
245
+ bottom: '12px',
246
+ left: '32px',
247
+ right: '32px'
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ label: {
257
+ en: 'Background'
258
+ },
259
+ controls: [
260
+ {
261
+ label: {
262
+ en: 'Color'
263
+ },
264
+ setting: {
265
+ id: 'backgroundColor',
266
+ state: 'normal'
267
+ }
268
+ }
269
+ ]
270
+ },
271
+ {
272
+ label: {
273
+ en: 'Shape'
274
+ },
275
+ controls: [
276
+ {
277
+ label: {
278
+ en: 'Border'
279
+ },
280
+ setting: {
281
+ id: 'borderBtn',
282
+ state: 'normal'
283
+ }
284
+ },
285
+ {
286
+ label: {
287
+ en: 'Corner'
288
+ },
289
+ setting: {
290
+ id: 'roundedBtn',
291
+ state: 'normal'
292
+ }
293
+ },
294
+ {
295
+ label: {
296
+ en: 'Shadow'
297
+ },
298
+ setting: {
299
+ id: 'boxShadowBtn',
300
+ state: 'normal'
301
+ },
302
+ controlConfig: {
303
+ id: 'boxShadowBtn',
304
+ type: 'shadow-v2'
305
+ }
306
+ }
307
+ ]
308
+ },
309
+ // {
310
+ // label: {
311
+ // en: 'States',
312
+ // },
313
+ // controls: [
314
+ // {
315
+ // type: 'tab',
316
+ // controls: [
317
+ // {
318
+ // type: 'toggleGroup',
319
+ // label: {
320
+ // en: 'Normal',
321
+ // },
322
+ // controls: [
323
+ // {
324
+ // type: 'control',
325
+ // label: {
326
+ // en: 'Background color',
327
+ // },
328
+ // setting: {
329
+ // id: 'backgroundColor',
330
+ // state: 'normal',
331
+ // },
332
+ // },
333
+ // {
334
+ // type: 'control',
335
+ // label: {
336
+ // en: 'Text color',
337
+ // },
338
+ // setting: {
339
+ // id: 'textColor',
340
+ // state: 'normal',
341
+ // },
342
+ // },
343
+ // {
344
+ // type: 'control',
345
+ // // options: {
346
+ // // labelPosition: 'start',
347
+ // // },
348
+ // label: {
349
+ // en: 'Border',
350
+ // },
351
+ // setting: {
352
+ // id: 'borderBtn',
353
+ // state: 'normal',
354
+ // },
355
+ // },
356
+ // {
357
+ // type: 'control',
358
+ // label: {
359
+ // en: 'Corner',
360
+ // },
361
+ // setting: {
362
+ // id: 'roundedBtn',
363
+ // state: 'normal',
364
+ // },
365
+ // },
366
+ // {
367
+ // type: 'control',
368
+ // label: {
369
+ // en: 'Shadow',
370
+ // },
371
+ // setting: {
372
+ // id: 'hasBoxShadowBtn',
373
+ // state: 'normal',
374
+ // },
375
+ // },
376
+ // {
377
+ // type: 'control',
378
+ // label: {
379
+ // en: '',
380
+ // },
381
+ // conditionDisplay: 'hasBoxShadowBtn.normal == true',
382
+ // layout: 'vertical',
383
+ // setting: {
384
+ // id: 'boxShadowBtn',
385
+ // state: 'normal',
386
+ // },
387
+ // },
388
+ // ],
389
+ // },
390
+ // {
391
+ // type: 'toggleGroup',
392
+ // label: {
393
+ // en: 'Hover',
394
+ // },
395
+ // controls: [
396
+ // {
397
+ // type: 'control',
398
+ // label: {
399
+ // en: 'Background color',
400
+ // },
401
+ // setting: {
402
+ // id: 'backgroundColor',
403
+ // state: 'hover',
404
+ // },
405
+ // },
406
+ // {
407
+ // type: 'control',
408
+ // label: {
409
+ // en: 'Text color',
410
+ // },
411
+ // setting: {
412
+ // id: 'textColor',
413
+ // state: 'hover',
414
+ // },
415
+ // },
416
+ // {
417
+ // type: 'control',
418
+ // // options: {
419
+ // // labelPosition: 'start',
420
+ // // },
421
+ // label: {
422
+ // en: 'Border',
423
+ // },
424
+ // setting: {
425
+ // id: 'borderBtn',
426
+ // state: 'hover',
427
+ // },
428
+ // },
429
+ // {
430
+ // type: 'control',
431
+ // label: {
432
+ // en: 'Corner',
433
+ // },
434
+ // setting: {
435
+ // id: 'roundedBtn',
436
+ // state: 'hover',
437
+ // },
438
+ // },
439
+ // {
440
+ // type: 'control',
441
+ // label: {
442
+ // en: 'Shadow',
443
+ // },
444
+ // setting: {
445
+ // id: 'hasBoxShadowBtn',
446
+ // state: 'hover',
447
+ // },
448
+ // },
449
+ // {
450
+ // type: 'control',
451
+ // label: {
452
+ // en: '',
453
+ // },
454
+ // layout: 'vertical',
455
+ // conditionDisplay: 'hasBoxShadowBtn.hover == true',
456
+ // setting: {
457
+ // id: 'boxShadowBtn',
458
+ // state: 'hover',
459
+ // },
460
+ // },
461
+ // ],
462
+ // },
463
+ // ],
464
+ // },
465
+ // ],
466
+ // },
467
+ {
468
+ label: {
469
+ en: 'Text style'
470
+ },
471
+ controls: [
472
+ {
473
+ type: 'combo',
474
+ label: {
475
+ en: 'Content'
476
+ },
477
+ iconName: 'polaris-text-block',
478
+ getValueFromSettingID: 'textContent',
479
+ isHideClear: true,
480
+ popoverLabel: {
481
+ en: 'Content'
482
+ },
483
+ controls: [
484
+ {
485
+ label: {
486
+ en: 'Content'
487
+ },
488
+ options: {
489
+ fullWidth: true
490
+ },
491
+ layout: 'vertical',
492
+ setting: {
493
+ id: 'textContent'
494
+ }
495
+ }
496
+ ]
497
+ },
498
+ {
499
+ type: 'control',
500
+ setting: {
501
+ id: 'typo'
502
+ },
503
+ options: {
504
+ updateFields: [
505
+ {
506
+ field: 'attrs.textAlign',
507
+ settingId: 'textAlign'
508
+ }
509
+ ]
510
+ },
511
+ layout: 'vertical',
512
+ controlChangeTrigger: {
513
+ settings: [
514
+ {
515
+ action: {
516
+ controlId: 'textAlign',
517
+ valueFromField: 'attrs.textAlign',
518
+ groupType: 'style',
519
+ controlType: 'style'
520
+ }
521
+ }
522
+ ],
523
+ options: {
524
+ noRecordHistory: true
525
+ }
526
+ }
527
+ }
528
+ ]
529
+ },
530
+ {
531
+ label: {
532
+ en: 'Hover effect'
533
+ },
534
+ controls: [
535
+ {
536
+ label: {
537
+ en: 'Background'
538
+ },
539
+ setting: {
540
+ id: 'backgroundColor',
541
+ state: 'hover'
542
+ }
543
+ },
544
+ {
545
+ label: {
546
+ en: 'Text color'
547
+ },
548
+ setting: {
549
+ id: 'textColor',
550
+ state: 'hover'
551
+ },
552
+ compoDefaultValue: {
553
+ desktop: {
554
+ default: {
555
+ normal: '#121212'
556
+ }
557
+ }
558
+ }
559
+ },
560
+ {
561
+ label: {
562
+ en: 'Border'
563
+ },
564
+ setting: {
565
+ id: 'borderBtn',
566
+ state: 'hover'
567
+ }
568
+ },
569
+ {
570
+ label: {
571
+ en: 'Corner'
572
+ },
573
+ setting: {
574
+ id: 'roundedBtnV2',
575
+ state: 'hover'
576
+ }
577
+ },
578
+ {
579
+ label: {
580
+ en: 'Shadow'
581
+ },
582
+ setting: {
583
+ id: 'boxShadowBtnV2',
584
+ state: 'hover'
585
+ },
586
+ controlConfig: {
587
+ id: 'boxShadowBtn',
588
+ type: 'shadow-v2'
589
+ }
590
+ }
591
+ ]
592
+ },
593
+ {
594
+ label: {
595
+ en: 'Spacing'
596
+ },
597
+ controls: [
598
+ {
599
+ type: 'control',
600
+ label: {
601
+ en: 'Icon & text'
602
+ },
603
+ setting: {
604
+ id: 'spacing'
605
+ }
606
+ }
607
+ ]
608
+ },
609
+ // {
610
+ // controls: [
611
+ // {
612
+ // label: {
613
+ // en: 'Text align',
614
+ // },
615
+ // type: 'control',
616
+ // setting: {
617
+ // id: 'textAlign',
618
+ // },
619
+ // options: {
620
+ // fullWidth: true,
621
+ // },
622
+ // },
623
+ // ],
624
+ // },
625
+ {
626
+ conditionDisplay: `size.width !== '100%'`,
627
+ controls: [
628
+ {
629
+ label: {
630
+ en: 'Align'
631
+ },
632
+ type: 'control',
633
+ setting: {
634
+ id: 'align'
635
+ }
636
+ }
637
+ ]
638
+ }
639
+ ];
640
+
641
+ export { SettingUIV2 };