@gem-sdk/components 2.0.0-dev.393 → 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.
- package/dist/cjs/builder.js +4 -4
- package/dist/cjs/index.js +30 -30
- package/dist/cjs/index.liquid.js +4 -4
- package/dist/cjs/product/components/ProductBundle/common/styles.js +22 -6
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +2 -1
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +1 -1
- package/dist/cjs/product/components/ProductBundle/setting/ProductBundleDiscount.js +47 -415
- package/dist/cjs/product/components/ProductBundle/setting/uiV1.js +404 -0
- package/dist/cjs/product/components/ProductBundle/setting/uiV2.js +728 -0
- package/dist/cjs/product/components/ProductDiscountTag/common/getClasses.js +38 -0
- package/dist/cjs/product/components/ProductDiscountTag/common/getStyle.js +42 -0
- package/dist/cjs/product/components/ProductDiscountTag/hooks/useGpDiscountTag.js +108 -0
- package/dist/cjs/product/components/ProductDiscountTag/index.js +110 -0
- package/dist/cjs/product/components/ProductDiscountTag/index.liquid.js +91 -0
- package/dist/cjs/product/index.js +4 -4
- package/dist/cjs/product/next.js +1 -1
- package/dist/cjs/product/setting/ProductTag.js +7 -299
- package/dist/cjs/product/setting/product-discount-tag/configs/settings.js +191 -0
- package/dist/cjs/product/setting/product-discount-tag/configs/uiV2.js +190 -0
- package/dist/esm/builder.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.liquid.js +1 -1
- package/dist/esm/product/components/ProductBundle/common/styles.js +23 -7
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +2 -1
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +1 -1
- package/dist/esm/product/components/ProductBundle/setting/ProductBundleDiscount.js +47 -415
- package/dist/esm/product/components/ProductBundle/setting/uiV1.js +400 -0
- package/dist/esm/product/components/ProductBundle/setting/uiV2.js +724 -0
- package/dist/esm/product/components/ProductDiscountTag/common/getClasses.js +33 -0
- package/dist/esm/product/components/ProductDiscountTag/common/getStyle.js +38 -0
- package/dist/esm/product/components/ProductDiscountTag/hooks/useGpDiscountTag.js +106 -0
- package/dist/esm/product/components/ProductDiscountTag/index.js +106 -0
- package/dist/esm/product/components/ProductDiscountTag/index.liquid.js +87 -0
- package/dist/esm/product/next.js +1 -1
- package/dist/esm/product/setting/ProductTag.js +7 -299
- package/dist/esm/product/setting/product-discount-tag/configs/settings.js +189 -0
- package/dist/esm/product/setting/product-discount-tag/configs/uiV2.js +188 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cjs/product/components/ProductTag/ProductTag.js +0 -200
- package/dist/cjs/product/components/ProductTag/ProductTag.liquid.js +0 -107
- package/dist/esm/product/components/ProductTag/ProductTag.js +0 -196
- package/dist/esm/product/components/ProductTag/ProductTag.liquid.js +0 -103
|
@@ -8,6 +8,8 @@ var verticalThree = require('../../../setting/constant/bundle-layout/verticalThr
|
|
|
8
8
|
var horizontalThree = require('../../../setting/constant/bundle-layout/horizontalThree.js');
|
|
9
9
|
var horizontalTwo = require('../../../setting/constant/bundle-layout/horizontalTwo.js');
|
|
10
10
|
var horizontalOne = require('../../../setting/constant/bundle-layout/horizontalOne.js');
|
|
11
|
+
var uiV2 = require('./uiV2.js');
|
|
12
|
+
var uiV1 = require('./uiV1.js');
|
|
11
13
|
|
|
12
14
|
const config = {
|
|
13
15
|
tag: 'ProductBundleDiscount',
|
|
@@ -172,12 +174,42 @@ const config = {
|
|
|
172
174
|
showValue: true
|
|
173
175
|
}
|
|
174
176
|
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: 'iconItemColor',
|
|
180
|
+
type: 'color-picker-v2',
|
|
181
|
+
label: 'Icon',
|
|
182
|
+
default: 'line-2'
|
|
175
183
|
}
|
|
176
184
|
]
|
|
177
185
|
},
|
|
178
186
|
{
|
|
179
187
|
id: 'style',
|
|
180
188
|
controls: [
|
|
189
|
+
{
|
|
190
|
+
id: 'itemSpacing',
|
|
191
|
+
type: 'dropdown:input',
|
|
192
|
+
hideUnit: false,
|
|
193
|
+
inputType: 'number',
|
|
194
|
+
default: '12px',
|
|
195
|
+
displayOptions: [
|
|
196
|
+
{
|
|
197
|
+
label: 'Small',
|
|
198
|
+
value: '8px',
|
|
199
|
+
showValue: true
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
label: 'Medium',
|
|
203
|
+
value: '16px',
|
|
204
|
+
showValue: true
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
label: 'Large',
|
|
208
|
+
value: '24px',
|
|
209
|
+
showValue: true
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
181
213
|
{
|
|
182
214
|
id: 'size',
|
|
183
215
|
type: 'size-setting',
|
|
@@ -191,7 +223,7 @@ const config = {
|
|
|
191
223
|
bottom: '24px',
|
|
192
224
|
right: '16px'
|
|
193
225
|
},
|
|
194
|
-
gap: '12px',
|
|
226
|
+
// gap: '12px',
|
|
195
227
|
width: '100%'
|
|
196
228
|
}
|
|
197
229
|
}
|
|
@@ -203,19 +235,15 @@ const config = {
|
|
|
203
235
|
'full'
|
|
204
236
|
]
|
|
205
237
|
},
|
|
206
|
-
gap: {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
medium: '16px',
|
|
216
|
-
large: '24px'
|
|
217
|
-
}
|
|
218
|
-
},
|
|
238
|
+
// gap: {
|
|
239
|
+
// name: 'Item gap',
|
|
240
|
+
// displayOptions: ['small', 'medium', 'large'],
|
|
241
|
+
// sizeConfig: {
|
|
242
|
+
// small: '8px',
|
|
243
|
+
// medium: '16px',
|
|
244
|
+
// large: '24px',
|
|
245
|
+
// },
|
|
246
|
+
// },
|
|
219
247
|
padding: {
|
|
220
248
|
name: 'Padding',
|
|
221
249
|
paddingConfig: {
|
|
@@ -279,7 +307,7 @@ const config = {
|
|
|
279
307
|
},
|
|
280
308
|
{
|
|
281
309
|
id: 'iconColor',
|
|
282
|
-
type: '
|
|
310
|
+
type: 'color-picker-v2',
|
|
283
311
|
label: 'Icon',
|
|
284
312
|
default: {
|
|
285
313
|
normal: '#B4B4B4',
|
|
@@ -293,7 +321,7 @@ const config = {
|
|
|
293
321
|
},
|
|
294
322
|
{
|
|
295
323
|
id: 'backgroundColor',
|
|
296
|
-
type: '
|
|
324
|
+
type: 'color-picker-v2',
|
|
297
325
|
label: 'Background',
|
|
298
326
|
default: {
|
|
299
327
|
normal: '#FFFFFF',
|
|
@@ -322,7 +350,7 @@ const config = {
|
|
|
322
350
|
},
|
|
323
351
|
{
|
|
324
352
|
id: 'boxShadowBundle',
|
|
325
|
-
type: '
|
|
353
|
+
type: 'shadow-v2',
|
|
326
354
|
hideOnState: {
|
|
327
355
|
normal: true,
|
|
328
356
|
hover: true,
|
|
@@ -387,404 +415,8 @@ const config = {
|
|
|
387
415
|
]
|
|
388
416
|
}
|
|
389
417
|
],
|
|
390
|
-
ui:
|
|
391
|
-
|
|
392
|
-
type: 'group',
|
|
393
|
-
label: {
|
|
394
|
-
en: 'Item management'
|
|
395
|
-
},
|
|
396
|
-
controls: [
|
|
397
|
-
{
|
|
398
|
-
type: 'control',
|
|
399
|
-
layout: 'vertical',
|
|
400
|
-
setting: {
|
|
401
|
-
id: 'childItem'
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
]
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
type: 'control',
|
|
408
|
-
label: {
|
|
409
|
-
en: 'Use product compare-at price'
|
|
410
|
-
},
|
|
411
|
-
setting: {
|
|
412
|
-
id: 'useProductCompareAtPrice'
|
|
413
|
-
}
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
type: 'control',
|
|
417
|
-
label: {
|
|
418
|
-
en: 'Hide no-discount items'
|
|
419
|
-
},
|
|
420
|
-
setting: {
|
|
421
|
-
id: 'hideNoDiscountItem'
|
|
422
|
-
}
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
type: 'group',
|
|
426
|
-
label: {
|
|
427
|
-
en: ''
|
|
428
|
-
},
|
|
429
|
-
controls: [
|
|
430
|
-
{
|
|
431
|
-
type: 'control',
|
|
432
|
-
label: {
|
|
433
|
-
en: 'Pre-selected item'
|
|
434
|
-
},
|
|
435
|
-
setting: {
|
|
436
|
-
id: 'hasPreSelectItem'
|
|
437
|
-
},
|
|
438
|
-
options: {
|
|
439
|
-
label: 'large',
|
|
440
|
-
styleControl: {
|
|
441
|
-
width: 'auto'
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
type: 'control',
|
|
447
|
-
condition: 'hasPreSelectItem == true',
|
|
448
|
-
layout: 'vertical',
|
|
449
|
-
setting: {
|
|
450
|
-
id: 'selectItemDefault'
|
|
451
|
-
},
|
|
452
|
-
options: {
|
|
453
|
-
styleControl: {
|
|
454
|
-
'max-width': '100%'
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
]
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
type: 'group',
|
|
462
|
-
controls: [
|
|
463
|
-
{
|
|
464
|
-
type: 'control',
|
|
465
|
-
label: {
|
|
466
|
-
en: 'Icon'
|
|
467
|
-
},
|
|
468
|
-
options: {
|
|
469
|
-
label: 'large'
|
|
470
|
-
},
|
|
471
|
-
setting: {
|
|
472
|
-
id: 'enableIcon'
|
|
473
|
-
}
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
type: 'control',
|
|
477
|
-
condition: 'enableIcon == true && layout == "vertical-layout"',
|
|
478
|
-
label: {
|
|
479
|
-
en: 'Icon position'
|
|
480
|
-
},
|
|
481
|
-
setting: {
|
|
482
|
-
id: 'iconPosition'
|
|
483
|
-
}
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
type: 'control',
|
|
487
|
-
condition: 'enableIcon == true && layout == "horizontal-layout"',
|
|
488
|
-
label: {
|
|
489
|
-
en: 'Icon position'
|
|
490
|
-
},
|
|
491
|
-
setting: {
|
|
492
|
-
id: 'iconHorizontalPosition'
|
|
493
|
-
}
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
type: 'control',
|
|
497
|
-
condition: 'enableIcon == true',
|
|
498
|
-
label: {
|
|
499
|
-
en: 'Icon size'
|
|
500
|
-
},
|
|
501
|
-
setting: {
|
|
502
|
-
id: 'iconSize'
|
|
503
|
-
}
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
type: 'control',
|
|
507
|
-
condition: 'enableIcon == true',
|
|
508
|
-
label: {
|
|
509
|
-
en: 'Icon spacing'
|
|
510
|
-
},
|
|
511
|
-
setting: {
|
|
512
|
-
id: 'iconSpacing'
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
]
|
|
516
|
-
},
|
|
517
|
-
{
|
|
518
|
-
label: {
|
|
519
|
-
en: 'Size'
|
|
520
|
-
},
|
|
521
|
-
type: 'group',
|
|
522
|
-
controls: [
|
|
523
|
-
{
|
|
524
|
-
type: 'control',
|
|
525
|
-
setting: {
|
|
526
|
-
id: 'size'
|
|
527
|
-
},
|
|
528
|
-
options: {
|
|
529
|
-
noGap: true
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
]
|
|
533
|
-
},
|
|
534
|
-
{
|
|
535
|
-
type: 'group',
|
|
536
|
-
label: {
|
|
537
|
-
en: 'Item states'
|
|
538
|
-
},
|
|
539
|
-
options: {
|
|
540
|
-
labelSpacing: 'small'
|
|
541
|
-
},
|
|
542
|
-
controls: [
|
|
543
|
-
{
|
|
544
|
-
type: 'tab',
|
|
545
|
-
controls: [
|
|
546
|
-
{
|
|
547
|
-
type: 'group',
|
|
548
|
-
label: {
|
|
549
|
-
en: 'Default'
|
|
550
|
-
},
|
|
551
|
-
controls: [
|
|
552
|
-
{
|
|
553
|
-
type: 'control',
|
|
554
|
-
label: {
|
|
555
|
-
en: 'Icon'
|
|
556
|
-
},
|
|
557
|
-
setting: {
|
|
558
|
-
id: 'iconColor',
|
|
559
|
-
state: 'normal'
|
|
560
|
-
}
|
|
561
|
-
},
|
|
562
|
-
{
|
|
563
|
-
type: 'control',
|
|
564
|
-
label: {
|
|
565
|
-
en: 'Background'
|
|
566
|
-
},
|
|
567
|
-
setting: {
|
|
568
|
-
id: 'backgroundColor',
|
|
569
|
-
state: 'normal'
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
type: 'control',
|
|
574
|
-
options: {
|
|
575
|
-
labelPosition: 'start'
|
|
576
|
-
},
|
|
577
|
-
label: {
|
|
578
|
-
en: 'Border'
|
|
579
|
-
},
|
|
580
|
-
setting: {
|
|
581
|
-
id: 'borderBundle',
|
|
582
|
-
state: 'normal'
|
|
583
|
-
}
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
type: 'control',
|
|
587
|
-
label: {
|
|
588
|
-
en: 'Corner'
|
|
589
|
-
},
|
|
590
|
-
setting: {
|
|
591
|
-
id: 'roundedBundle',
|
|
592
|
-
state: 'normal'
|
|
593
|
-
}
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
type: 'control',
|
|
597
|
-
label: {
|
|
598
|
-
en: 'Shadow'
|
|
599
|
-
},
|
|
600
|
-
setting: {
|
|
601
|
-
id: 'hasBoxShadowBundle',
|
|
602
|
-
state: 'normal'
|
|
603
|
-
}
|
|
604
|
-
},
|
|
605
|
-
{
|
|
606
|
-
type: 'group',
|
|
607
|
-
condition: 'hasBoxShadowBundle.normal == true',
|
|
608
|
-
controls: [
|
|
609
|
-
{
|
|
610
|
-
type: 'control',
|
|
611
|
-
layout: 'vertical',
|
|
612
|
-
setting: {
|
|
613
|
-
id: 'boxShadowBundle',
|
|
614
|
-
state: 'normal'
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
]
|
|
618
|
-
}
|
|
619
|
-
]
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
type: 'group',
|
|
623
|
-
label: {
|
|
624
|
-
en: 'Hover'
|
|
625
|
-
},
|
|
626
|
-
controls: [
|
|
627
|
-
{
|
|
628
|
-
type: 'control',
|
|
629
|
-
label: {
|
|
630
|
-
en: 'Icon'
|
|
631
|
-
},
|
|
632
|
-
setting: {
|
|
633
|
-
id: 'iconColor',
|
|
634
|
-
state: 'hover'
|
|
635
|
-
}
|
|
636
|
-
},
|
|
637
|
-
{
|
|
638
|
-
type: 'control',
|
|
639
|
-
label: {
|
|
640
|
-
en: 'Background'
|
|
641
|
-
},
|
|
642
|
-
setting: {
|
|
643
|
-
id: 'backgroundColor',
|
|
644
|
-
state: 'hover'
|
|
645
|
-
}
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
type: 'control',
|
|
649
|
-
options: {
|
|
650
|
-
labelPosition: 'start'
|
|
651
|
-
},
|
|
652
|
-
label: {
|
|
653
|
-
en: 'Border'
|
|
654
|
-
},
|
|
655
|
-
setting: {
|
|
656
|
-
id: 'borderBundle',
|
|
657
|
-
state: 'hover'
|
|
658
|
-
}
|
|
659
|
-
},
|
|
660
|
-
{
|
|
661
|
-
type: 'control',
|
|
662
|
-
label: {
|
|
663
|
-
en: 'Corner'
|
|
664
|
-
},
|
|
665
|
-
setting: {
|
|
666
|
-
id: 'roundedBundle',
|
|
667
|
-
state: 'hover'
|
|
668
|
-
}
|
|
669
|
-
},
|
|
670
|
-
{
|
|
671
|
-
type: 'control',
|
|
672
|
-
label: {
|
|
673
|
-
en: 'Shadow'
|
|
674
|
-
},
|
|
675
|
-
setting: {
|
|
676
|
-
id: 'hasBoxShadowBundle',
|
|
677
|
-
state: 'hover'
|
|
678
|
-
}
|
|
679
|
-
},
|
|
680
|
-
{
|
|
681
|
-
type: 'group',
|
|
682
|
-
condition: 'hasBoxShadowBundle.hover == true',
|
|
683
|
-
controls: [
|
|
684
|
-
{
|
|
685
|
-
type: 'control',
|
|
686
|
-
setting: {
|
|
687
|
-
id: 'boxShadowBundle',
|
|
688
|
-
state: 'hover'
|
|
689
|
-
},
|
|
690
|
-
layout: 'vertical'
|
|
691
|
-
}
|
|
692
|
-
]
|
|
693
|
-
}
|
|
694
|
-
]
|
|
695
|
-
},
|
|
696
|
-
{
|
|
697
|
-
type: 'group',
|
|
698
|
-
label: {
|
|
699
|
-
en: 'Active'
|
|
700
|
-
},
|
|
701
|
-
controls: [
|
|
702
|
-
{
|
|
703
|
-
type: 'control',
|
|
704
|
-
label: {
|
|
705
|
-
en: 'Icon'
|
|
706
|
-
},
|
|
707
|
-
setting: {
|
|
708
|
-
id: 'iconColor',
|
|
709
|
-
state: 'active'
|
|
710
|
-
}
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
type: 'control',
|
|
714
|
-
label: {
|
|
715
|
-
en: 'Background'
|
|
716
|
-
},
|
|
717
|
-
setting: {
|
|
718
|
-
id: 'backgroundColor',
|
|
719
|
-
state: 'active'
|
|
720
|
-
}
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
type: 'control',
|
|
724
|
-
options: {
|
|
725
|
-
labelPosition: 'start'
|
|
726
|
-
},
|
|
727
|
-
label: {
|
|
728
|
-
en: 'Border'
|
|
729
|
-
},
|
|
730
|
-
setting: {
|
|
731
|
-
id: 'borderBundle',
|
|
732
|
-
state: 'active'
|
|
733
|
-
}
|
|
734
|
-
},
|
|
735
|
-
{
|
|
736
|
-
type: 'control',
|
|
737
|
-
label: {
|
|
738
|
-
en: 'Corner'
|
|
739
|
-
},
|
|
740
|
-
setting: {
|
|
741
|
-
id: 'roundedBundle',
|
|
742
|
-
state: 'active'
|
|
743
|
-
}
|
|
744
|
-
},
|
|
745
|
-
{
|
|
746
|
-
type: 'control',
|
|
747
|
-
label: {
|
|
748
|
-
en: 'Shadow'
|
|
749
|
-
},
|
|
750
|
-
setting: {
|
|
751
|
-
id: 'hasBoxShadowBundle',
|
|
752
|
-
state: 'active'
|
|
753
|
-
}
|
|
754
|
-
},
|
|
755
|
-
{
|
|
756
|
-
type: 'group',
|
|
757
|
-
condition: 'hasBoxShadowBundle.active == true',
|
|
758
|
-
controls: [
|
|
759
|
-
{
|
|
760
|
-
type: 'control',
|
|
761
|
-
setting: {
|
|
762
|
-
id: 'boxShadowBundle',
|
|
763
|
-
state: 'active'
|
|
764
|
-
},
|
|
765
|
-
layout: 'vertical'
|
|
766
|
-
}
|
|
767
|
-
]
|
|
768
|
-
}
|
|
769
|
-
]
|
|
770
|
-
}
|
|
771
|
-
]
|
|
772
|
-
}
|
|
773
|
-
]
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
type: 'control',
|
|
777
|
-
label: {
|
|
778
|
-
en: 'Align'
|
|
779
|
-
},
|
|
780
|
-
options: {
|
|
781
|
-
label: 'large'
|
|
782
|
-
},
|
|
783
|
-
setting: {
|
|
784
|
-
id: 'align'
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
],
|
|
418
|
+
ui: uiV1.default,
|
|
419
|
+
uiV2: uiV2.default,
|
|
788
420
|
editorConfigs: {
|
|
789
421
|
placeholder: {
|
|
790
422
|
flowTag: [
|