@gem-sdk/components 2.0.0-dev.353 → 2.0.0-dev.356
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/article/components/ArticleAuthor.liquid.js +27 -0
- package/dist/cjs/article/components/ArticleCategory.liquid.js +27 -0
- package/dist/cjs/article/components/ArticleContent.liquid.js +42 -0
- package/dist/cjs/article/components/ArticleDate.liquid.js +35 -0
- package/dist/cjs/article/components/ArticleExcerpt.liquid.js +26 -0
- package/dist/cjs/article/components/ArticleImage.liquid.js +67 -0
- package/dist/cjs/article/components/ArticlePagination.liquid.js +17 -0
- package/dist/cjs/article/components/ArticleReadMore.liquid.js +58 -0
- package/dist/cjs/article/components/ArticleTag.liquid.js +27 -0
- package/dist/cjs/article/components/ArticleTitle.liquid.js +46 -0
- package/dist/cjs/builder.js +1 -1
- package/dist/cjs/button/components/Button.js +5 -3
- package/dist/cjs/button/components/Button.liquid.js +7 -3
- package/dist/cjs/button/components/common/attributes.js +1 -2
- package/dist/cjs/button/components/common/helpers.js +2 -2
- package/dist/cjs/button/components/common/styles.js +29 -1
- package/dist/cjs/button/setting/configs/settings.js +24 -4
- package/dist/cjs/button/setting/configs/uiV2.js +46 -8
- package/dist/cjs/form/setting/newsletter/configs/settings.js +2 -2
- package/dist/cjs/form/setting/newsletter/configs/uiV2.js +0 -44
- package/dist/cjs/image/setting/configs/uiV2.js +5 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.liquid.js +20 -0
- package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/setting.js +4 -3
- package/dist/cjs/post-purchase/image/common/getClasses.js +1 -4
- package/dist/cjs/post-purchase/product/common/getClasses.js +4 -5
- package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselPostPurchase.js +3 -2
- package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +2 -1
- package/dist/cjs/post-purchase/product/components/product-offer/common/attrs.js +14 -0
- package/dist/cjs/post-purchase/product/components/product-offer/common/classes.js +29 -0
- package/dist/cjs/post-purchase/product/components/product-offer/common/styles.js +27 -0
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +53 -0
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +45 -0
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +57 -0
- package/dist/cjs/post-purchase/product/hooks/product-image/useListCarousel.js +6 -2
- package/dist/cjs/post-purchase/product/index.js +2 -2
- package/dist/cjs/post-purchase/product/next.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-image/setting-v2.js +5 -5
- package/dist/cjs/post-purchase/product/settings/product-image/uiV2.js +2 -1
- package/dist/cjs/post-purchase/product/settings/{ProductOffer.js → product-offer/index.js} +23 -143
- package/dist/cjs/post-purchase/product/settings/product-offer/ui/uiV1.js +140 -0
- package/dist/cjs/post-purchase/product/settings/product-offer/ui/uiV2.js +141 -0
- package/dist/cjs/post-purchase/utils/constants.js +6 -0
- package/dist/cjs/product/components/ProductViewMore/ProductViewMore.js +17 -18
- package/dist/cjs/product/components/ProductViewMore/ProductViewMore.liquid.js +14 -21
- package/dist/cjs/product/components/ProductViewMore/common/data.js +26 -0
- package/dist/cjs/product/components/ProductViewMore/common/styles.js +12 -0
- package/dist/cjs/product/setting/dynamic-checkout/configs/settings.js +9 -5
- package/dist/cjs/product/setting/dynamic-checkout/configs/uiV2.js +10 -10
- package/dist/cjs/product/setting/product-button/configs/settings.js +1 -0
- package/dist/cjs/product/setting/product-button/configs/uiV2.js +1 -1
- package/dist/cjs/product/setting/product-view-more/configs/settings.js +17 -16
- package/dist/cjs/product/setting/product-view-more/configs/uiV2.js +45 -45
- package/dist/esm/article/components/ArticleAuthor.liquid.js +23 -0
- package/dist/esm/article/components/ArticleCategory.liquid.js +23 -0
- package/dist/esm/article/components/ArticleContent.liquid.js +38 -0
- package/dist/esm/article/components/ArticleDate.liquid.js +31 -0
- package/dist/esm/article/components/ArticleExcerpt.liquid.js +22 -0
- package/dist/esm/article/components/ArticleImage.liquid.js +63 -0
- package/dist/esm/article/components/ArticlePagination.liquid.js +13 -0
- package/dist/esm/article/components/ArticleReadMore.liquid.js +54 -0
- package/dist/esm/article/components/ArticleTag.liquid.js +23 -0
- package/dist/esm/article/components/ArticleTitle.liquid.js +42 -0
- package/dist/esm/builder.js +1 -1
- package/dist/esm/button/components/Button.js +5 -3
- package/dist/esm/button/components/Button.liquid.js +7 -3
- package/dist/esm/button/components/common/attributes.js +1 -2
- package/dist/esm/button/components/common/helpers.js +2 -2
- package/dist/esm/button/components/common/styles.js +29 -3
- package/dist/esm/button/setting/configs/settings.js +24 -4
- package/dist/esm/button/setting/configs/uiV2.js +46 -8
- package/dist/esm/form/setting/newsletter/configs/settings.js +2 -2
- package/dist/esm/form/setting/newsletter/configs/uiV2.js +0 -44
- package/dist/esm/image/setting/configs/uiV2.js +5 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.liquid.js +10 -0
- package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/setting.js +4 -3
- package/dist/esm/post-purchase/image/common/getClasses.js +1 -4
- package/dist/esm/post-purchase/product/common/getClasses.js +4 -5
- package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselPostPurchase.js +3 -2
- package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +2 -1
- package/dist/esm/post-purchase/product/components/product-offer/common/attrs.js +12 -0
- package/dist/esm/post-purchase/product/components/product-offer/common/classes.js +25 -0
- package/dist/esm/post-purchase/product/components/product-offer/common/styles.js +24 -0
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +49 -0
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +43 -0
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +55 -0
- package/dist/esm/post-purchase/product/hooks/product-image/useListCarousel.js +6 -2
- package/dist/esm/post-purchase/product/index.js +1 -1
- package/dist/esm/post-purchase/product/next.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-image/setting-v2.js +5 -5
- package/dist/esm/post-purchase/product/settings/product-image/uiV2.js +2 -1
- package/dist/esm/post-purchase/product/settings/{ProductOffer.js → product-offer/index.js} +23 -143
- package/dist/esm/post-purchase/product/settings/product-offer/ui/uiV1.js +138 -0
- package/dist/esm/post-purchase/product/settings/product-offer/ui/uiV2.js +139 -0
- package/dist/esm/post-purchase/utils/constants.js +6 -1
- package/dist/esm/product/components/ProductViewMore/ProductViewMore.js +17 -18
- package/dist/esm/product/components/ProductViewMore/ProductViewMore.liquid.js +14 -21
- package/dist/esm/product/components/ProductViewMore/common/data.js +23 -0
- package/dist/esm/product/components/ProductViewMore/common/styles.js +10 -0
- package/dist/esm/product/setting/dynamic-checkout/configs/settings.js +9 -5
- package/dist/esm/product/setting/dynamic-checkout/configs/uiV2.js +10 -10
- package/dist/esm/product/setting/product-button/configs/settings.js +1 -0
- package/dist/esm/product/setting/product-button/configs/uiV2.js +1 -1
- package/dist/esm/product/setting/product-view-more/configs/settings.js +17 -16
- package/dist/esm/product/setting/product-view-more/configs/uiV2.js +45 -45
- package/dist/types/index.d.ts +82 -18
- package/package.json +2 -2
- package/dist/cjs/post-purchase/product/components/ProductOffer.js +0 -138
- package/dist/esm/post-purchase/product/components/ProductOffer.js +0 -133
|
@@ -34,25 +34,25 @@ const SettingV2 = [
|
|
|
34
34
|
itemSpacing: 'large',
|
|
35
35
|
options: [
|
|
36
36
|
{
|
|
37
|
-
label: '
|
|
37
|
+
label: 'Featured top',
|
|
38
38
|
value: 'bottom-center',
|
|
39
39
|
type: 'p-image-layout',
|
|
40
40
|
iconName: 'gp-product-image-layout-bottom'
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
label: '
|
|
43
|
+
label: 'Featured left',
|
|
44
44
|
value: 'left',
|
|
45
45
|
type: 'p-image-layout',
|
|
46
46
|
iconName: 'gp-product-image-layout-left'
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
label: '
|
|
49
|
+
label: 'Featured right',
|
|
50
50
|
value: 'right',
|
|
51
51
|
type: 'p-image-layout',
|
|
52
52
|
iconName: 'gp-product-image-layout-right'
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
label: 'Featured
|
|
55
|
+
label: 'Featured only',
|
|
56
56
|
value: 'only-feature',
|
|
57
57
|
type: 'p-image-layout',
|
|
58
58
|
iconName: 'gp-product-image-layout-featured-only'
|
|
@@ -351,7 +351,7 @@ const SettingV2 = [
|
|
|
351
351
|
label: 'Spacing',
|
|
352
352
|
id: 'ilSpacing',
|
|
353
353
|
options: constants.postPurchaseSpacing,
|
|
354
|
-
default: '
|
|
354
|
+
default: 'xtight'
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
id: 'ilItemPerSlide',
|
|
@@ -170,7 +170,7 @@ const SettingUIV2 = [
|
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
label: {
|
|
173
|
-
en: '
|
|
173
|
+
en: 'Item spacing'
|
|
174
174
|
},
|
|
175
175
|
controls: [
|
|
176
176
|
{
|
|
@@ -234,6 +234,7 @@ const SettingUIV2 = [
|
|
|
234
234
|
fullWidth: true,
|
|
235
235
|
disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
|
|
236
236
|
},
|
|
237
|
+
conditionDisplay: "['bottom-center', 'left', 'right', 'only-feature'].includes(layoutType)",
|
|
237
238
|
conditionEnable: '!(parseInt(ftWidth) >= 100 && ftWidth?.includes("%"))'
|
|
238
239
|
}
|
|
239
240
|
]
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var productOfferDefault = require('
|
|
6
|
-
var constants = require('
|
|
7
|
-
var productOffer1Col = require('
|
|
8
|
-
var productOffer2Col = require('
|
|
5
|
+
var productOfferDefault = require('../presets-config/product-presets/product-offer-default.js');
|
|
6
|
+
var constants = require('../../../utils/constants.js');
|
|
7
|
+
var productOffer1Col = require('../presets-config/product-presets/product-offer-1-col.js');
|
|
8
|
+
var productOffer2Col = require('../presets-config/product-presets/product-offer-2-col.js');
|
|
9
|
+
var uiV1 = require('./ui/uiV1.js');
|
|
10
|
+
var uiV2 = require('./ui/uiV2.js');
|
|
9
11
|
|
|
10
12
|
const config = {
|
|
11
13
|
tag: 'PostPurchaseProductOffer',
|
|
@@ -349,14 +351,26 @@ const config = {
|
|
|
349
351
|
},
|
|
350
352
|
{
|
|
351
353
|
id: 'productOfferWidth',
|
|
352
|
-
type: 'input
|
|
354
|
+
type: 'dropdown:input',
|
|
353
355
|
label: 'Width',
|
|
354
|
-
placeholder: 'Global style',
|
|
355
|
-
min: 0,
|
|
356
356
|
units: [
|
|
357
357
|
'px',
|
|
358
358
|
'%'
|
|
359
359
|
],
|
|
360
|
+
hideUnit: false,
|
|
361
|
+
inputType: 'number',
|
|
362
|
+
displayOptions: [
|
|
363
|
+
{
|
|
364
|
+
label: 'Full',
|
|
365
|
+
value: '100%',
|
|
366
|
+
showValue: true
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
label: 'Default',
|
|
370
|
+
value: '1200px',
|
|
371
|
+
showValue: true
|
|
372
|
+
}
|
|
373
|
+
],
|
|
360
374
|
devices: {
|
|
361
375
|
desktop: {
|
|
362
376
|
default: '100%'
|
|
@@ -374,142 +388,8 @@ const config = {
|
|
|
374
388
|
]
|
|
375
389
|
}
|
|
376
390
|
],
|
|
377
|
-
ui:
|
|
378
|
-
|
|
379
|
-
type: 'control',
|
|
380
|
-
label: {
|
|
381
|
-
en: 'Product source'
|
|
382
|
-
},
|
|
383
|
-
setting: {
|
|
384
|
-
id: 'productSetting'
|
|
385
|
-
},
|
|
386
|
-
layout: 'vertical'
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
type: 'group',
|
|
390
|
-
label: {
|
|
391
|
-
en: 'Product offers'
|
|
392
|
-
},
|
|
393
|
-
controls: [
|
|
394
|
-
{
|
|
395
|
-
type: 'control',
|
|
396
|
-
label: {
|
|
397
|
-
en: 'Quantity'
|
|
398
|
-
},
|
|
399
|
-
setting: {
|
|
400
|
-
id: 'dynamicOfferQuantity'
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
],
|
|
404
|
-
condition: 'false'
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
type: 'control',
|
|
408
|
-
label: {
|
|
409
|
-
en: ''
|
|
410
|
-
},
|
|
411
|
-
setting: {
|
|
412
|
-
id: 'discountAndShippingFee'
|
|
413
|
-
},
|
|
414
|
-
layout: 'vertical'
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
type: 'group',
|
|
418
|
-
label: {
|
|
419
|
-
en: 'Layout'
|
|
420
|
-
},
|
|
421
|
-
condition: `(productSetting?.productIds?.length || 0) > 1`,
|
|
422
|
-
controls: [
|
|
423
|
-
{
|
|
424
|
-
type: 'control',
|
|
425
|
-
label: {
|
|
426
|
-
en: 'Choose layout'
|
|
427
|
-
},
|
|
428
|
-
setting: {
|
|
429
|
-
id: 'productOfferLayout'
|
|
430
|
-
},
|
|
431
|
-
layout: 'vertical',
|
|
432
|
-
condition: `(productSetting?.productIds?.length || 0) > 1`
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
type: 'control',
|
|
436
|
-
label: {
|
|
437
|
-
en: 'Row gap'
|
|
438
|
-
},
|
|
439
|
-
setting: {
|
|
440
|
-
id: 'productOfferVerticalGutter'
|
|
441
|
-
}
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
type: 'control',
|
|
445
|
-
label: {
|
|
446
|
-
en: 'Column gap'
|
|
447
|
-
},
|
|
448
|
-
setting: {
|
|
449
|
-
id: 'productOfferColumnGap'
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
]
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
type: 'group',
|
|
456
|
-
label: {
|
|
457
|
-
en: 'Product Layout'
|
|
458
|
-
},
|
|
459
|
-
controls: [
|
|
460
|
-
{
|
|
461
|
-
type: 'control',
|
|
462
|
-
label: {
|
|
463
|
-
en: ''
|
|
464
|
-
},
|
|
465
|
-
setting: {
|
|
466
|
-
id: 'layout'
|
|
467
|
-
},
|
|
468
|
-
layout: 'vertical'
|
|
469
|
-
},
|
|
470
|
-
{
|
|
471
|
-
type: 'control',
|
|
472
|
-
label: {
|
|
473
|
-
en: 'Column gap'
|
|
474
|
-
},
|
|
475
|
-
setting: {
|
|
476
|
-
id: 'columnGap'
|
|
477
|
-
},
|
|
478
|
-
condition: `!!layout.cols && layout.cols.length > 1`
|
|
479
|
-
}
|
|
480
|
-
]
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
type: 'group',
|
|
484
|
-
label: {
|
|
485
|
-
en: 'Size'
|
|
486
|
-
},
|
|
487
|
-
controls: [
|
|
488
|
-
{
|
|
489
|
-
type: 'control',
|
|
490
|
-
label: {
|
|
491
|
-
en: 'Width'
|
|
492
|
-
},
|
|
493
|
-
setting: {
|
|
494
|
-
id: 'productOfferWidth'
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
]
|
|
498
|
-
},
|
|
499
|
-
{
|
|
500
|
-
type: 'control',
|
|
501
|
-
label: {
|
|
502
|
-
en: 'Align'
|
|
503
|
-
},
|
|
504
|
-
setting: {
|
|
505
|
-
id: 'inlineAlignment'
|
|
506
|
-
},
|
|
507
|
-
condition: `productOfferWidth !== '100%'`,
|
|
508
|
-
options: {
|
|
509
|
-
label: 'large'
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
],
|
|
391
|
+
ui: uiV1.ProductOfferSettingUIV1,
|
|
392
|
+
uiV2: uiV2.ProductOfferSettingUIV2,
|
|
513
393
|
presets: [
|
|
514
394
|
productOfferDefault.postPurchaseProductOfferDefault,
|
|
515
395
|
productOffer2Col.postPurchaseProduct2Col,
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const ProductOfferSettingUIV1 = [
|
|
4
|
+
{
|
|
5
|
+
type: 'control',
|
|
6
|
+
label: {
|
|
7
|
+
en: 'Product source'
|
|
8
|
+
},
|
|
9
|
+
setting: {
|
|
10
|
+
id: 'productSetting'
|
|
11
|
+
},
|
|
12
|
+
layout: 'vertical'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: 'group',
|
|
16
|
+
label: {
|
|
17
|
+
en: 'Product offers'
|
|
18
|
+
},
|
|
19
|
+
controls: [
|
|
20
|
+
{
|
|
21
|
+
type: 'control',
|
|
22
|
+
label: {
|
|
23
|
+
en: 'Quantity'
|
|
24
|
+
},
|
|
25
|
+
setting: {
|
|
26
|
+
id: 'dynamicOfferQuantity'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
condition: 'false'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'control',
|
|
34
|
+
label: {
|
|
35
|
+
en: ''
|
|
36
|
+
},
|
|
37
|
+
setting: {
|
|
38
|
+
id: 'discountAndShippingFee'
|
|
39
|
+
},
|
|
40
|
+
layout: 'vertical'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'group',
|
|
44
|
+
label: {
|
|
45
|
+
en: 'Layout'
|
|
46
|
+
},
|
|
47
|
+
condition: `(productSetting?.productIds?.length || 0) > 1`,
|
|
48
|
+
controls: [
|
|
49
|
+
{
|
|
50
|
+
type: 'control',
|
|
51
|
+
label: {
|
|
52
|
+
en: 'Choose layout'
|
|
53
|
+
},
|
|
54
|
+
setting: {
|
|
55
|
+
id: 'productOfferLayout'
|
|
56
|
+
},
|
|
57
|
+
layout: 'vertical',
|
|
58
|
+
condition: `(productSetting?.productIds?.length || 0) > 1`
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'control',
|
|
62
|
+
label: {
|
|
63
|
+
en: 'Row gap'
|
|
64
|
+
},
|
|
65
|
+
setting: {
|
|
66
|
+
id: 'productOfferVerticalGutter'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: 'control',
|
|
71
|
+
label: {
|
|
72
|
+
en: 'Column gap'
|
|
73
|
+
},
|
|
74
|
+
setting: {
|
|
75
|
+
id: 'productOfferColumnGap'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'group',
|
|
82
|
+
label: {
|
|
83
|
+
en: 'Product Layout'
|
|
84
|
+
},
|
|
85
|
+
controls: [
|
|
86
|
+
{
|
|
87
|
+
type: 'control',
|
|
88
|
+
label: {
|
|
89
|
+
en: ''
|
|
90
|
+
},
|
|
91
|
+
setting: {
|
|
92
|
+
id: 'layout'
|
|
93
|
+
},
|
|
94
|
+
layout: 'vertical'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: 'control',
|
|
98
|
+
label: {
|
|
99
|
+
en: 'Column gap'
|
|
100
|
+
},
|
|
101
|
+
setting: {
|
|
102
|
+
id: 'columnGap'
|
|
103
|
+
},
|
|
104
|
+
condition: `!!layout.cols && layout.cols.length > 1`
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'group',
|
|
110
|
+
label: {
|
|
111
|
+
en: 'Size'
|
|
112
|
+
},
|
|
113
|
+
controls: [
|
|
114
|
+
{
|
|
115
|
+
type: 'control',
|
|
116
|
+
label: {
|
|
117
|
+
en: 'Width'
|
|
118
|
+
},
|
|
119
|
+
setting: {
|
|
120
|
+
id: 'productOfferWidth'
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: 'control',
|
|
127
|
+
label: {
|
|
128
|
+
en: 'Align'
|
|
129
|
+
},
|
|
130
|
+
setting: {
|
|
131
|
+
id: 'inlineAlignment'
|
|
132
|
+
},
|
|
133
|
+
condition: `productOfferWidth !== '100%'`,
|
|
134
|
+
options: {
|
|
135
|
+
label: 'large'
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
exports.ProductOfferSettingUIV1 = ProductOfferSettingUIV1;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const ProductOfferSettingUIV2 = [
|
|
4
|
+
{
|
|
5
|
+
label: {
|
|
6
|
+
en: 'Layout'
|
|
7
|
+
},
|
|
8
|
+
controls: [
|
|
9
|
+
{
|
|
10
|
+
type: 'control',
|
|
11
|
+
label: {
|
|
12
|
+
en: ''
|
|
13
|
+
},
|
|
14
|
+
setting: {
|
|
15
|
+
id: 'layout'
|
|
16
|
+
},
|
|
17
|
+
layout: 'vertical'
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: {
|
|
23
|
+
en: 'Product source'
|
|
24
|
+
},
|
|
25
|
+
controls: [
|
|
26
|
+
{
|
|
27
|
+
setting: {
|
|
28
|
+
id: 'productSetting'
|
|
29
|
+
},
|
|
30
|
+
layout: 'vertical'
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: {
|
|
36
|
+
en: 'Column spacing'
|
|
37
|
+
},
|
|
38
|
+
controls: [
|
|
39
|
+
{
|
|
40
|
+
type: 'control',
|
|
41
|
+
label: {
|
|
42
|
+
en: 'Gap'
|
|
43
|
+
},
|
|
44
|
+
setting: {
|
|
45
|
+
id: 'columnGap'
|
|
46
|
+
},
|
|
47
|
+
conditionDisplay: '(productSetting?.productIds?.length || 0) === 1'
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: {
|
|
53
|
+
en: 'Display'
|
|
54
|
+
},
|
|
55
|
+
controls: [
|
|
56
|
+
{
|
|
57
|
+
type: 'control',
|
|
58
|
+
label: {
|
|
59
|
+
en: 'Layout'
|
|
60
|
+
},
|
|
61
|
+
setting: {
|
|
62
|
+
id: 'productOfferLayout'
|
|
63
|
+
},
|
|
64
|
+
conditionDisplay: `(productSetting?.productIds?.length || 0) > 1`
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: 'control',
|
|
68
|
+
label: {
|
|
69
|
+
en: 'Quantity'
|
|
70
|
+
},
|
|
71
|
+
setting: {
|
|
72
|
+
id: 'dynamicOfferQuantity'
|
|
73
|
+
},
|
|
74
|
+
conditionDisplay: `(productSetting?.productIds?.length || 0) == 0`
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'control',
|
|
78
|
+
label: {
|
|
79
|
+
en: 'Row gap'
|
|
80
|
+
},
|
|
81
|
+
setting: {
|
|
82
|
+
id: 'productOfferVerticalGutter'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'control',
|
|
87
|
+
label: {
|
|
88
|
+
en: 'Column gap'
|
|
89
|
+
},
|
|
90
|
+
setting: {
|
|
91
|
+
id: 'productOfferColumnGap'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
controls: [
|
|
98
|
+
{
|
|
99
|
+
type: 'control',
|
|
100
|
+
label: {
|
|
101
|
+
en: ''
|
|
102
|
+
},
|
|
103
|
+
setting: {
|
|
104
|
+
id: 'discountAndShippingFee'
|
|
105
|
+
},
|
|
106
|
+
layout: 'vertical'
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
label: {
|
|
112
|
+
en: 'Size'
|
|
113
|
+
},
|
|
114
|
+
controls: [
|
|
115
|
+
{
|
|
116
|
+
type: 'control',
|
|
117
|
+
label: {
|
|
118
|
+
en: 'Width'
|
|
119
|
+
},
|
|
120
|
+
setting: {
|
|
121
|
+
id: 'productOfferWidth'
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
controls: [
|
|
128
|
+
{
|
|
129
|
+
label: {
|
|
130
|
+
en: 'Align'
|
|
131
|
+
},
|
|
132
|
+
setting: {
|
|
133
|
+
id: 'inlineAlignment'
|
|
134
|
+
},
|
|
135
|
+
conditionDisplay: `productOfferWidth !== '100%'`
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
];
|
|
140
|
+
|
|
141
|
+
exports.ProductOfferSettingUIV2 = ProductOfferSettingUIV2;
|
|
@@ -54,6 +54,12 @@ const postPurchaseViewSpacing = [
|
|
|
54
54
|
value: 'extraLoose'
|
|
55
55
|
}
|
|
56
56
|
];
|
|
57
|
+
const DEVICES = [
|
|
58
|
+
'desktop',
|
|
59
|
+
'tablet',
|
|
60
|
+
'mobile'
|
|
61
|
+
];
|
|
57
62
|
|
|
63
|
+
exports.DEVICES = DEVICES;
|
|
58
64
|
exports.postPurchaseSpacing = postPurchaseSpacing;
|
|
59
65
|
exports.postPurchaseViewSpacing = postPurchaseViewSpacing;
|
|
@@ -4,26 +4,25 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var styles = require('./common/styles.js');
|
|
8
|
+
var data = require('./common/data.js');
|
|
7
9
|
var Button = require('../../../button/components/Button.js');
|
|
8
10
|
|
|
9
|
-
const ProductViewMore = ({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
style: style,
|
|
25
|
-
styles: buttonStyles,
|
|
26
|
-
children: children
|
|
11
|
+
const ProductViewMore = ({ style, styles: styles$1, setting, advanced, builderProps, builderAttrs, children })=>{
|
|
12
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
13
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(Button.default, {
|
|
14
|
+
styles: styles$1,
|
|
15
|
+
advanced: advanced,
|
|
16
|
+
builderProps: builderProps,
|
|
17
|
+
builderAttrs: builderAttrs,
|
|
18
|
+
setting: {
|
|
19
|
+
...data.getButtonSettings(setting)
|
|
20
|
+
},
|
|
21
|
+
style: {
|
|
22
|
+
...styles.getButtonStyle(style, styles$1)
|
|
23
|
+
},
|
|
24
|
+
children: children
|
|
25
|
+
})
|
|
27
26
|
});
|
|
28
27
|
};
|
|
29
28
|
|
|
@@ -2,39 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var system = require('@gem-sdk/system');
|
|
6
|
+
var styles = require('./common/styles.js');
|
|
7
7
|
var helpers = require('../../../helpers.js');
|
|
8
|
+
var Button_liquid = require('../../../button/components/Button.liquid.js');
|
|
9
|
+
var core = require('@gem-sdk/core');
|
|
10
|
+
var data = require('./common/data.js');
|
|
8
11
|
|
|
9
|
-
const ProductViewMore = ({
|
|
10
|
-
const { ...buttonStyles } = styles ?? {};
|
|
11
|
-
const { label, iconSvg, iconAlign, iconVisible, translate } = setting ?? {};
|
|
12
|
+
const ProductViewMore = ({ style, styles: styles$1, setting, advanced, builderProps, builderAttrs, pageContext })=>{
|
|
12
13
|
return core.template`
|
|
13
14
|
<gp-product-view-more>
|
|
14
15
|
${Button_liquid.default({
|
|
15
|
-
|
|
16
|
+
styles: styles$1,
|
|
17
|
+
advanced: advanced,
|
|
16
18
|
builderProps: builderProps,
|
|
17
19
|
builderAttrs: builderAttrs,
|
|
18
20
|
setting: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
btnLink: {
|
|
22
|
-
link: '{{ product.url }}',
|
|
23
|
-
target: setting?.target === 'new-tab' ? '_blank' : '_self'
|
|
24
|
-
},
|
|
25
|
-
iconSvg: iconSvg,
|
|
26
|
-
iconVisible: iconVisible,
|
|
27
|
-
translate
|
|
21
|
+
...data.getButtonSettings(setting),
|
|
22
|
+
...data.getButtonLiquidSettings(setting)
|
|
28
23
|
},
|
|
29
24
|
style: {
|
|
30
|
-
...style,
|
|
31
|
-
...core.makeStyleResponsive('ta', styles?.align)
|
|
25
|
+
...styles.getButtonStyle(style, styles$1)
|
|
32
26
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
pageContext
|
|
27
|
+
pageContext,
|
|
28
|
+
className: 'btn-view-more'
|
|
36
29
|
})}
|
|
37
|
-
|
|
30
|
+
${system.If(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-view-more.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-product-view-more.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
38
31
|
</gp-product-view-more>
|
|
39
32
|
`;
|
|
40
33
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const getButtonSettings = (setting)=>{
|
|
4
|
+
const { label, iconSvg, iconAlign, iconVisible, shouldClearSpace } = setting ?? {};
|
|
5
|
+
return {
|
|
6
|
+
label,
|
|
7
|
+
iconSvg,
|
|
8
|
+
iconAlign,
|
|
9
|
+
iconVisible,
|
|
10
|
+
shouldClearSpace,
|
|
11
|
+
htmlType: 'submit'
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const getButtonLiquidSettings = (setting)=>{
|
|
15
|
+
const { translate, redirectNewTab } = setting ?? {};
|
|
16
|
+
return {
|
|
17
|
+
translate,
|
|
18
|
+
btnLink: {
|
|
19
|
+
link: '{{ product.url }}',
|
|
20
|
+
target: redirectNewTab ? '_blank' : '_self'
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.getButtonLiquidSettings = getButtonLiquidSettings;
|
|
26
|
+
exports.getButtonSettings = getButtonSettings;
|