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