@gem-sdk/components 2.0.2 → 2.0.4

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.
Files changed (30) hide show
  1. package/dist/cjs/banner/components/hero-banner/index.liquid.js +1 -0
  2. package/dist/cjs/builder.js +2 -0
  3. package/dist/cjs/dialog/components/Dialog.js +4 -20
  4. package/dist/cjs/dialog/components/Dialog.liquid.js +4 -20
  5. package/dist/cjs/dialog/helpers/common.js +30 -0
  6. package/dist/cjs/index.js +2 -0
  7. package/dist/cjs/index.liquid.js +2 -0
  8. package/dist/cjs/product/components/ProductBundleDiscountItem.liquid.js +3 -3
  9. package/dist/cjs/third-party/components/PowrContactFormBuilder.js +32 -0
  10. package/dist/cjs/third-party/components/PowrContactFormBuilder.liquid.js +12 -0
  11. package/dist/cjs/third-party/configs/PowrContactFormBuilder.js +12 -0
  12. package/dist/cjs/third-party/next.js +5 -0
  13. package/dist/cjs/third-party/setting/PowrContactFormBuilder.js +142 -0
  14. package/dist/cjs/third-party/setting/index.js +2 -0
  15. package/dist/esm/banner/components/hero-banner/index.liquid.js +1 -0
  16. package/dist/esm/builder.js +2 -0
  17. package/dist/esm/dialog/components/Dialog.js +6 -22
  18. package/dist/esm/dialog/components/Dialog.liquid.js +6 -22
  19. package/dist/esm/dialog/helpers/common.js +27 -1
  20. package/dist/esm/index.js +1 -0
  21. package/dist/esm/index.liquid.js +1 -0
  22. package/dist/esm/product/components/ProductBundleDiscountItem.liquid.js +3 -3
  23. package/dist/esm/third-party/components/PowrContactFormBuilder.js +28 -0
  24. package/dist/esm/third-party/components/PowrContactFormBuilder.liquid.js +8 -0
  25. package/dist/esm/third-party/configs/PowrContactFormBuilder.js +8 -0
  26. package/dist/esm/third-party/next.js +5 -0
  27. package/dist/esm/third-party/setting/PowrContactFormBuilder.js +138 -0
  28. package/dist/esm/third-party/setting/index.js +184 -182
  29. package/dist/types/index.d.ts +18 -1
  30. package/package.json +2 -2
@@ -197,6 +197,7 @@ const HeroBanner = ({ builderAttrs, builderProps, setting, styles, style, childr
197
197
  }}"
198
198
  >
199
199
  ${AdaptiveImage_liquid.default({
200
+ priority: setting?.preload,
200
201
  pictureClass: 'gp-w-full',
201
202
  srcSet: srcSet,
202
203
  className: `adaptive-hero-banner`,
@@ -101,6 +101,7 @@ var Releasit = require('./third-party/components/Releasit.js');
101
101
  var KingProductOptions = require('./third-party/components/KingProductOptions.js');
102
102
  var BirdChime = require('./third-party/components/BirdChime.js');
103
103
  var DiscountyBulkDiscountSales = require('./third-party/components/DiscountyBulkDiscountSales.js');
104
+ var PowrContactFormBuilder = require('./third-party/components/PowrContactFormBuilder.js');
104
105
  var CartLineVariant = require('./cart/components/CartLineVariant.js');
105
106
  var Cart = require('./cart/components/Cart.js');
106
107
  var CartList = require('./cart/components/CartList.js');
@@ -235,6 +236,7 @@ var PostPurchaseCountdownTimer = require('./post-purchase/countdown-timer/compon
235
236
  var Text$1 = require('./post-purchase/text/Text.js');
236
237
 
237
238
  var builder = {
239
+ PowrContactFormBuilder: PowrContactFormBuilder.default,
238
240
  DiscountyBulkDiscountSales: DiscountyBulkDiscountSales.default,
239
241
  GloboProductOptionsVariant: GloboProductOptionsVariant.default,
240
242
  TeeinblueProductPersonalizer: TeeinblueProductPersonalizer.default,
@@ -238,20 +238,6 @@ const Dialog = ({ setting, children, builderProps, builderAttrs, style })=>{
238
238
  triggerTime
239
239
  ]);
240
240
  const w = core.makeWidth(width, fullScreen);
241
- const heightStyle = {
242
- ...fullScreen?.desktop ? core.makeStyle({
243
- h: '100%'
244
- }) : !height?.desktop ? core.makeStyle({
245
- minh: '300px'
246
- }) : core.makeStyle({
247
- h: height.desktop
248
- }),
249
- '--h-tablet': common.getPropertyByDevice(fullScreen, 'tablet') ? '100%' : common.getPropertyByDevice(height, 'tablet') ?? '300px',
250
- '--h-mobile': common.getPropertyByDevice(fullScreen, 'mobile') ? '100%' : common.getPropertyByDevice(height, 'mobile') ?? '300px',
251
- '--maxh': common.getPropertyByDevice(fullScreen, 'desktop') ? '100%' : '',
252
- '--maxh-tablet': common.getPropertyByDevice(fullScreen, 'tablet') ? '100%' : '',
253
- '--maxh-mobile': common.getPropertyByDevice(fullScreen, 'mobile') ? '100%' : ''
254
- };
255
241
  const displayStyle = React.useMemo(()=>{
256
242
  return Object.keys(style ?? {}).filter((key)=>[
257
243
  '--d',
@@ -378,7 +364,7 @@ const Dialog = ({ setting, children, builderProps, builderAttrs, style })=>{
378
364
  ...displayStyle,
379
365
  ...borderStyle,
380
366
  ...core.makeStyleResponsive('w', w),
381
- ...heightStyle
367
+ ...common.heightStyle(fullScreen, height)
382
368
  },
383
369
  children: [
384
370
  /*#__PURE__*/ jsxRuntime.jsx("button", {
@@ -419,7 +405,8 @@ const Dialog = ({ setting, children, builderProps, builderAttrs, style })=>{
419
405
  /*#__PURE__*/ jsxRuntime.jsx("div", {
420
406
  style: {
421
407
  ...innerStyle,
422
- ...heightStyle,
408
+ ...common.removeHeightPercentForContent(common.heightStyle(fullScreen, height)),
409
+ ...common.inheritStyleBody,
423
410
  ...core.getStyleBackgroundByDevice(background, {
424
411
  ignoreBackgroundImage: true,
425
412
  ignoreBackgroundImageProperties: true,
@@ -427,10 +414,7 @@ const Dialog = ({ setting, children, builderProps, builderAttrs, style })=>{
427
414
  })
428
415
  },
429
416
  "aria-label": "Dialog body",
430
- className: core.cls('gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden', {
431
- 'gp-max-h-screen': position !== 'center',
432
- 'gp-max-h-[calc(100vh_-_192px)]': position === 'center' && !fullScreen?.desktop
433
- }),
417
+ className: common.bodyDialogClass,
434
418
  children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : core.filterToolbarPreview(children)
435
419
  }),
436
420
  core.filterToolbarPreview(children, true)
@@ -20,20 +20,6 @@ const Dialog = ({ setting, children, builderProps, style, advanced })=>{
20
20
  const { btnBg, btnColor, btnSize, iconSize, closeButtonPosition, btnRounded } = setting ?? {};
21
21
  const { isOverlay, overlayColor, overlayOpacity, mobileTrigger, mobileTriggerTime } = setting ?? {};
22
22
  const w = core.makeWidth(width, fullScreen);
23
- const heightStyle = {
24
- ...fullScreen?.desktop ? core.makeStyle({
25
- h: '100%'
26
- }) : !height?.desktop ? core.makeStyle({
27
- minh: '300px'
28
- }) : core.makeStyle({
29
- h: height.desktop
30
- }),
31
- '--h-tablet': common.getPropertyByDevice(fullScreen, 'tablet') ? '100%' : common.getPropertyByDevice(height, 'tablet') ?? '300px',
32
- '--h-mobile': common.getPropertyByDevice(fullScreen, 'mobile') ? '100%' : common.getPropertyByDevice(height, 'mobile') ?? '300px',
33
- '--maxh': common.getPropertyByDevice(fullScreen, 'desktop') ? '100%' : '',
34
- '--maxh-tablet': common.getPropertyByDevice(fullScreen, 'tablet') ? '100%' : '',
35
- '--maxh-mobile': common.getPropertyByDevice(fullScreen, 'mobile') ? '100%' : ''
36
- };
37
23
  const displayStyle = Object.keys(style ?? {}).filter((key)=>[
38
24
  '--d',
39
25
  '--d-mobile',
@@ -131,7 +117,7 @@ const Dialog = ({ setting, children, builderProps, style, advanced })=>{
131
117
  ...wrapperStyle,
132
118
  ...borderStyle,
133
119
  ...core.makeStyleResponsive('w', w),
134
- ...heightStyle
120
+ ...common.heightStyle(fullScreen, height)
135
121
  }}"
136
122
  >
137
123
  <button
@@ -173,7 +159,8 @@ const Dialog = ({ setting, children, builderProps, style, advanced })=>{
173
159
  <div
174
160
  style="${{
175
161
  ...innerStyle,
176
- ...heightStyle,
162
+ ...common.removeHeightPercentForContent(common.heightStyle(fullScreen, height)),
163
+ ...common.inheritStyleBody,
177
164
  ...core.getStyleBackgroundByDevice(background, {
178
165
  ignoreBackgroundImage: true,
179
166
  ignoreBackgroundImageProperties: true,
@@ -181,10 +168,7 @@ const Dialog = ({ setting, children, builderProps, style, advanced })=>{
181
168
  })
182
169
  }}"
183
170
  aria-label="Dialog body"
184
- class="${core.cls('gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden', {
185
- 'gp-max-h-screen': position !== 'center',
186
- 'gp-max-h-[calc(100vh_-_192px)]': position === 'center' && !fullScreen?.desktop
187
- })}">
171
+ class="${common.bodyDialogClass}">
188
172
  <div>
189
173
  ${children ?? ''}
190
174
  </div>
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var core = require('@gem-sdk/core');
4
+
3
5
  const isShowModal = (startDate, numberOfDay = 0)=>{
4
6
  const start = startDate ? new Date(Number(startDate)) : new Date();
5
7
  const c = Date.now() - start.getTime();
@@ -19,7 +21,35 @@ const getPropertyByDevice = (property, device)=>{
19
21
  if (device === 'mobile') return property?.mobile ?? property?.tablet ?? property?.desktop;
20
22
  return property?.desktop;
21
23
  };
24
+ const heightStyle = (fullScreen, height)=>({
25
+ ...fullScreen?.desktop ? core.makeStyle({
26
+ h: '100%'
27
+ }) : !height?.desktop ? core.makeStyle({
28
+ minh: '300px'
29
+ }) : core.makeStyle({
30
+ h: height.desktop
31
+ }),
32
+ '--h-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : getPropertyByDevice(height, 'tablet') ?? '300px',
33
+ '--h-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : getPropertyByDevice(height, 'mobile') ?? '300px',
34
+ '--maxh': getPropertyByDevice(fullScreen, 'desktop') ? '100%' : '',
35
+ '--maxh-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : '',
36
+ '--maxh-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : ''
37
+ });
38
+ const removeHeightPercentForContent = (heightStyle)=>({
39
+ ...heightStyle,
40
+ '--h': heightStyle['--h']?.includes('%') ? '100%' : heightStyle['--h'],
41
+ '--h-tablet': heightStyle['--h-tablet']?.includes('%') ? '100%' : heightStyle['--h-tablet'],
42
+ '--h-mobile': heightStyle['--h-mobile']?.includes('%') ? '100%' : heightStyle['--h-mobile']
43
+ });
44
+ const inheritStyleBody = {
45
+ 'border-radius': 'inherit'
46
+ };
47
+ const bodyDialogClass = 'gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen';
22
48
 
49
+ exports.bodyDialogClass = bodyDialogClass;
23
50
  exports.getPropertyByDevice = getPropertyByDevice;
51
+ exports.heightStyle = heightStyle;
52
+ exports.inheritStyleBody = inheritStyleBody;
24
53
  exports.isMobile = isMobile;
25
54
  exports.isShowModal = isShowModal;
55
+ exports.removeHeightPercentForContent = removeHeightPercentForContent;
package/dist/cjs/index.js CHANGED
@@ -197,6 +197,7 @@ var WishlistKing = require('./third-party/components/WishlistKing.js');
197
197
  var TeeinblueProductPersonalizer = require('./third-party/components/TeeinblueProductPersonalizer.js');
198
198
  var GloboProductOptionsVariant = require('./third-party/components/GloboProductOptionsVariant.js');
199
199
  var DiscountyBulkDiscountSales = require('./third-party/components/DiscountyBulkDiscountSales.js');
200
+ var PowrContactFormBuilder = require('./third-party/components/PowrContactFormBuilder.js');
200
201
  var index$x = require('./third-party-instant/setting/index.js');
201
202
  var InstantJudgemeReviews = require('./third-party-instant/components/InstantJudgemeReviews.js');
202
203
  var InstantLooxReviews = require('./third-party-instant/components/InstantLooxReviews.js');
@@ -488,6 +489,7 @@ exports.WishlistKing = WishlistKing.default;
488
489
  exports.TeeinblueProductPersonalizer = TeeinblueProductPersonalizer.default;
489
490
  exports.GloboProductOptionsVariant = GloboProductOptionsVariant.default;
490
491
  exports.DiscountyBulkDiscountSales = DiscountyBulkDiscountSales.default;
492
+ exports.PowrContactFormBuilder = PowrContactFormBuilder.default;
491
493
  exports.thirdPartyInstantSetting = index$x.default;
492
494
  exports.InstantJudgemeReviews = InstantJudgemeReviews.default;
493
495
  exports.InstantLooxReviews = InstantLooxReviews.default;
@@ -152,6 +152,7 @@ var WishlistKing_liquid = require('./third-party/components/WishlistKing.liquid.
152
152
  var TeeinblueProductPersonalizer_liquid = require('./third-party/components/TeeinblueProductPersonalizer.liquid.js');
153
153
  var GloboProductOptionsVariant_liquid = require('./third-party/components/GloboProductOptionsVariant.liquid.js');
154
154
  var DiscountyBulkDiscountSales_liquid = require('./third-party/components/DiscountyBulkDiscountSales.liquid.js');
155
+ var PowrContactFormBuilder_liquid = require('./third-party/components/PowrContactFormBuilder.liquid.js');
155
156
  var ImageComparison_liquid = require('./image-comparison/components/ImageComparison.liquid.js');
156
157
  var ThirdPartySlot_liquid = require('./third-party-slot/components/ThirdPartySlot.liquid.js');
157
158
  var Sticky_liquid = require('./sticky/components/Sticky.liquid.js');
@@ -326,6 +327,7 @@ exports.WishlistKing = WishlistKing_liquid.default;
326
327
  exports.TeeinblueProductPersonalizer = TeeinblueProductPersonalizer_liquid.default;
327
328
  exports.GloboProductOptionsVariant = GloboProductOptionsVariant_liquid.default;
328
329
  exports.DiscountyBulkDiscountSales = DiscountyBulkDiscountSales_liquid.default;
330
+ exports.PowrContactFormBuilder = PowrContactFormBuilder_liquid.default;
329
331
  exports.ImageComparison = ImageComparison_liquid.default;
330
332
  exports.ThirdPartySlot = ThirdPartySlot_liquid.default;
331
333
  exports.Sticky = Sticky_liquid.default;
@@ -48,9 +48,9 @@ const ProductBundleDiscountItem = ({ children, parentSetting, parentStyles, inde
48
48
  return selected === i;
49
49
  };
50
50
  return core.template`
51
- <div
51
+ <gp-product-bundle-discount-item
52
52
  ${bundleItem}
53
- class="product-bundle-item cursor-pointer"
53
+ class="product-bundle-item cursor-pointer gp-block"
54
54
  style="${{
55
55
  ...sizeSettings.padding,
56
56
  ...core.makeStyleState('bg', parentStyles?.backgroundColor),
@@ -96,7 +96,7 @@ const ProductBundleDiscountItem = ({ children, parentSetting, parentStyles, inde
96
96
  ${children}
97
97
  </div>
98
98
  </div>
99
- </div>
99
+ </gp-product-bundle-discount-item>
100
100
  `;
101
101
  };
102
102
 
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var core = require('@gem-sdk/core');
7
+ var ThirdPartyPreview = require('./ThirdPartyPreview.js');
8
+ var PowrContactFormBuilder$1 = require('../configs/PowrContactFormBuilder.js');
9
+
10
+ const PowrContactFormBuilderContent = ()=>{
11
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
12
+ children: /*#__PURE__*/ jsxRuntime.jsx("div", {
13
+ className: "gp-p-2",
14
+ children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
15
+ setting: {
16
+ label: 'POWR Contact Form Builder',
17
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${PowrContactFormBuilder$1.default.logoUrl}">`
18
+ }
19
+ })
20
+ })
21
+ });
22
+ };
23
+ const PowrContactFormBuilder = ({ setting })=>{
24
+ return /*#__PURE__*/ jsxRuntime.jsx("div", {
25
+ style: {
26
+ ...core.makeStyleResponsive('ta', setting?.align)
27
+ },
28
+ children: /*#__PURE__*/ jsxRuntime.jsx(PowrContactFormBuilderContent, {})
29
+ });
30
+ };
31
+
32
+ exports.default = PowrContactFormBuilder;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var thirdParty = require('../helpers/thirdParty.js');
6
+
7
+ const PowrContactFormBuilder = ({ setting, advanced })=>{
8
+ const { align, appBlockId } = setting ?? {};
9
+ return thirdParty.getLiquidForAppBlock(appBlockId, align, advanced?.cssClass);
10
+ };
11
+
12
+ exports.default = PowrContactFormBuilder;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var AppConfig = {
6
+ id: 'powr-contact-form-builder',
7
+ label: 'POWR Contact Form Builder',
8
+ logoUrl: 'https://cdn.shopify.com/app-store/listing_images/82d46df63104389a2579e189676678c9/icon/CIn72oKZr_UCEAE=.png',
9
+ tag: 'PowrContactFormBuilder'
10
+ };
11
+
12
+ exports.default = AppConfig;
@@ -6,6 +6,10 @@ var dynamic = require('next/dynamic');
6
6
  var Loading = require('../common/components/Loading.js');
7
7
  require('react/jsx-runtime');
8
8
 
9
+ const PowrContactFormBuilder = dynamic(()=>Promise.resolve().then(function () { return require('./components/PowrContactFormBuilder.js'); }), {
10
+ ssr: false,
11
+ loading: Loading.default
12
+ });
9
13
  const DiscountyBulkDiscountSales = dynamic(()=>Promise.resolve().then(function () { return require('./components/DiscountyBulkDiscountSales.js'); }), {
10
14
  ssr: false,
11
15
  loading: Loading.default
@@ -371,6 +375,7 @@ const Selleasy = dynamic(()=>Promise.resolve().then(function () { return require
371
375
  loading: Loading.default
372
376
  });
373
377
  var thirdParty = {
378
+ PowrContactFormBuilder,
374
379
  DiscountyBulkDiscountSales,
375
380
  GloboProductOptionsVariant,
376
381
  TeeinblueProductPersonalizer,
@@ -0,0 +1,142 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var PowrContactFormBuilder = require('../configs/PowrContactFormBuilder.js');
6
+
7
+ const config = {
8
+ tag: PowrContactFormBuilder.default.tag,
9
+ label: PowrContactFormBuilder.default.label,
10
+ icon: '<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/82d46df63104389a2579e189676678c9/icon/CIn72oKZr_UCEAE=.png">',
11
+ editorConfigs: {
12
+ component: {
13
+ isThirdParty: true
14
+ }
15
+ },
16
+ presets: [
17
+ {
18
+ id: PowrContactFormBuilder.default.id,
19
+ name: {
20
+ en: PowrContactFormBuilder.default.label
21
+ },
22
+ hideTextContent: true,
23
+ icon: {
24
+ desktop: `<div class="w-full flex flex-col items-center">
25
+ <img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/82d46df63104389a2579e189676678c9/icon/CIn72oKZr_UCEAE=.png">
26
+ <span class="preset-item-title">POWR Contact Form Builder</span>
27
+ </div>`
28
+ },
29
+ components: [
30
+ {
31
+ tag: PowrContactFormBuilder.default.tag
32
+ }
33
+ ]
34
+ }
35
+ ],
36
+ settings: [
37
+ {
38
+ id: 'setting',
39
+ controls: [
40
+ {
41
+ id: 'appBlockId',
42
+ type: 'input',
43
+ default: ''
44
+ },
45
+ {
46
+ id: 'widgetType',
47
+ label: 'Choose widget',
48
+ type: 'select',
49
+ options: [
50
+ {
51
+ label: 'App Block',
52
+ value: 'app-block'
53
+ }
54
+ ],
55
+ default: 'app-block'
56
+ },
57
+ {
58
+ id: 'appId',
59
+ type: 'input',
60
+ default: ''
61
+ },
62
+ {
63
+ id: 'install',
64
+ type: 'open-link',
65
+ target: '_blank',
66
+ linkType: 'install',
67
+ href: 'https://apps.shopify.com/powr-form-builder?show_store_picker=1?utm_source=gempages',
68
+ appName: PowrContactFormBuilder.default.label
69
+ },
70
+ {
71
+ id: 'openApp',
72
+ type: 'open-link',
73
+ target: '_blank',
74
+ linkType: 'openApp',
75
+ href: 'https://admin.shopify.com/?redirect=/apps/powr-form-builder',
76
+ appName: PowrContactFormBuilder.default.label
77
+ },
78
+ {
79
+ id: 'align',
80
+ label: 'Alignment',
81
+ type: 'segment',
82
+ options: [
83
+ {
84
+ label: 'Left',
85
+ value: 'left',
86
+ type: 'align'
87
+ },
88
+ {
89
+ label: 'Center',
90
+ value: 'center',
91
+ type: 'align'
92
+ },
93
+ {
94
+ label: 'Right',
95
+ value: 'right',
96
+ type: 'align'
97
+ }
98
+ ],
99
+ devices: {
100
+ desktop: {
101
+ default: 'left'
102
+ }
103
+ }
104
+ }
105
+ ]
106
+ }
107
+ ],
108
+ ui: [
109
+ {
110
+ type: 'control',
111
+ setting: {
112
+ id: 'install'
113
+ }
114
+ },
115
+ {
116
+ type: 'control',
117
+ setting: {
118
+ id: 'appId'
119
+ },
120
+ label: {
121
+ en: 'App ID'
122
+ }
123
+ },
124
+ {
125
+ type: 'control',
126
+ setting: {
127
+ id: 'openApp'
128
+ }
129
+ },
130
+ {
131
+ type: 'control',
132
+ label: {
133
+ en: 'Align'
134
+ },
135
+ setting: {
136
+ id: 'align'
137
+ }
138
+ }
139
+ ]
140
+ };
141
+
142
+ exports.default = config;
@@ -93,8 +93,10 @@ var WishlistKing = require('./WishlistKing.js');
93
93
  var TeeinblueProductPersonalizer = require('./TeeinblueProductPersonalizer.js');
94
94
  var GloboProductOptionsVariant = require('./GloboProductOptionsVariant.js');
95
95
  var DiscountyBulkDiscountSales = require('./DiscountyBulkDiscountSales.js');
96
+ var PowrContactFormBuilder = require('./PowrContactFormBuilder.js');
96
97
 
97
98
  var index = {
99
+ PowrContactFormBuilder: PowrContactFormBuilder.default,
98
100
  DiscountyBulkDiscountSales: DiscountyBulkDiscountSales.default,
99
101
  GloboProductOptionsVariant: GloboProductOptionsVariant.default,
100
102
  TeeinblueProductPersonalizer: TeeinblueProductPersonalizer.default,
@@ -193,6 +193,7 @@ const HeroBanner = ({ builderAttrs, builderProps, setting, styles, style, childr
193
193
  }}"
194
194
  >
195
195
  ${AdaptiveImage({
196
+ priority: setting?.preload,
196
197
  pictureClass: 'gp-w-full',
197
198
  srcSet: srcSet,
198
199
  className: `adaptive-hero-banner`,
@@ -97,6 +97,7 @@ import Releasit from './third-party/components/Releasit.js';
97
97
  import KingProductOptions from './third-party/components/KingProductOptions.js';
98
98
  import BirdChime from './third-party/components/BirdChime.js';
99
99
  import DiscountyBulkDiscountSales from './third-party/components/DiscountyBulkDiscountSales.js';
100
+ import PowrContactFormBuilder from './third-party/components/PowrContactFormBuilder.js';
100
101
  import CartLineVariant from './cart/components/CartLineVariant.js';
101
102
  import Cart from './cart/components/Cart.js';
102
103
  import CartList from './cart/components/CartList.js';
@@ -231,6 +232,7 @@ import PostPurchaseCountdownTimer from './post-purchase/countdown-timer/componen
231
232
  import Text$1 from './post-purchase/text/Text.js';
232
233
 
233
234
  var builder = {
235
+ PowrContactFormBuilder,
234
236
  DiscountyBulkDiscountSales,
235
237
  GloboProductOptionsVariant,
236
238
  TeeinblueProductPersonalizer,
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useModalStore, useEditorMode, useInteraction, globalEvent, makeWidth, makeStyle, cls, getGlobalColorResponsiveStyle, makeStyleResponsive, composeRadius, getStyleBackgroundByDevice, isEmptyChildren, filterToolbarPreview } from '@gem-sdk/core';
2
+ import { useModalStore, useEditorMode, useInteraction, globalEvent, makeWidth, cls, makeStyle, getGlobalColorResponsiveStyle, makeStyleResponsive, composeRadius, getStyleBackgroundByDevice, isEmptyChildren, filterToolbarPreview } from '@gem-sdk/core';
3
3
  import { useMemo, useRef, useState, useCallback, useEffect } from 'react';
4
- import { isShowModal, isMobile, getPropertyByDevice } from '../helpers/common.js';
4
+ import { isShowModal, isMobile, heightStyle, removeHeightPercentForContent, inheritStyleBody, bodyDialogClass } from '../helpers/common.js';
5
5
  import { useScrollPercentage } from '../hooks/use-scroll-percentage.js';
6
6
  import ChildrenDroppable from '../../grid/components/ChildrenDroppable.js';
7
7
  import { ELEMENT_Z_INDEX } from '../../common/const.js';
@@ -234,20 +234,6 @@ const Dialog = ({ setting, children, builderProps, builderAttrs, style })=>{
234
234
  triggerTime
235
235
  ]);
236
236
  const w = makeWidth(width, fullScreen);
237
- const heightStyle = {
238
- ...fullScreen?.desktop ? makeStyle({
239
- h: '100%'
240
- }) : !height?.desktop ? makeStyle({
241
- minh: '300px'
242
- }) : makeStyle({
243
- h: height.desktop
244
- }),
245
- '--h-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : getPropertyByDevice(height, 'tablet') ?? '300px',
246
- '--h-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : getPropertyByDevice(height, 'mobile') ?? '300px',
247
- '--maxh': getPropertyByDevice(fullScreen, 'desktop') ? '100%' : '',
248
- '--maxh-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : '',
249
- '--maxh-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : ''
250
- };
251
237
  const displayStyle = useMemo(()=>{
252
238
  return Object.keys(style ?? {}).filter((key)=>[
253
239
  '--d',
@@ -374,7 +360,7 @@ const Dialog = ({ setting, children, builderProps, builderAttrs, style })=>{
374
360
  ...displayStyle,
375
361
  ...borderStyle,
376
362
  ...makeStyleResponsive('w', w),
377
- ...heightStyle
363
+ ...heightStyle(fullScreen, height)
378
364
  },
379
365
  children: [
380
366
  /*#__PURE__*/ jsx("button", {
@@ -415,7 +401,8 @@ const Dialog = ({ setting, children, builderProps, builderAttrs, style })=>{
415
401
  /*#__PURE__*/ jsx("div", {
416
402
  style: {
417
403
  ...innerStyle,
418
- ...heightStyle,
404
+ ...removeHeightPercentForContent(heightStyle(fullScreen, height)),
405
+ ...inheritStyleBody,
419
406
  ...getStyleBackgroundByDevice(background, {
420
407
  ignoreBackgroundImage: true,
421
408
  ignoreBackgroundImageProperties: true,
@@ -423,10 +410,7 @@ const Dialog = ({ setting, children, builderProps, builderAttrs, style })=>{
423
410
  })
424
411
  },
425
412
  "aria-label": "Dialog body",
426
- className: cls('gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden', {
427
- 'gp-max-h-screen': position !== 'center',
428
- 'gp-max-h-[calc(100vh_-_192px)]': position === 'center' && !fullScreen?.desktop
429
- }),
413
+ className: bodyDialogClass,
430
414
  children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : filterToolbarPreview(children)
431
415
  }),
432
416
  filterToolbarPreview(children, true)
@@ -1,6 +1,6 @@
1
- import { makeWidth, makeStyle, template, cls, RenderIf, getGlobalColorResponsiveStyle, makeStyleResponsive, composeRadius, getStyleBackgroundByDevice, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
1
+ import { makeWidth, template, cls, RenderIf, makeStyle, getGlobalColorResponsiveStyle, makeStyleResponsive, composeRadius, getStyleBackgroundByDevice, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
2
2
  import { isTransparentColor } from '../../helpers.js';
3
- import { getPropertyByDevice } from '../helpers/common.js';
3
+ import { heightStyle, removeHeightPercentForContent, inheritStyleBody, bodyDialogClass } from '../helpers/common.js';
4
4
  import 'react/jsx-runtime';
5
5
  import { ELEMENT_Z_INDEX } from '../../common/const.js';
6
6
 
@@ -16,20 +16,6 @@ const Dialog = ({ setting, children, builderProps, style, advanced })=>{
16
16
  const { btnBg, btnColor, btnSize, iconSize, closeButtonPosition, btnRounded } = setting ?? {};
17
17
  const { isOverlay, overlayColor, overlayOpacity, mobileTrigger, mobileTriggerTime } = setting ?? {};
18
18
  const w = makeWidth(width, fullScreen);
19
- const heightStyle = {
20
- ...fullScreen?.desktop ? makeStyle({
21
- h: '100%'
22
- }) : !height?.desktop ? makeStyle({
23
- minh: '300px'
24
- }) : makeStyle({
25
- h: height.desktop
26
- }),
27
- '--h-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : getPropertyByDevice(height, 'tablet') ?? '300px',
28
- '--h-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : getPropertyByDevice(height, 'mobile') ?? '300px',
29
- '--maxh': getPropertyByDevice(fullScreen, 'desktop') ? '100%' : '',
30
- '--maxh-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : '',
31
- '--maxh-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : ''
32
- };
33
19
  const displayStyle = Object.keys(style ?? {}).filter((key)=>[
34
20
  '--d',
35
21
  '--d-mobile',
@@ -127,7 +113,7 @@ const Dialog = ({ setting, children, builderProps, style, advanced })=>{
127
113
  ...wrapperStyle,
128
114
  ...borderStyle,
129
115
  ...makeStyleResponsive('w', w),
130
- ...heightStyle
116
+ ...heightStyle(fullScreen, height)
131
117
  }}"
132
118
  >
133
119
  <button
@@ -169,7 +155,8 @@ const Dialog = ({ setting, children, builderProps, style, advanced })=>{
169
155
  <div
170
156
  style="${{
171
157
  ...innerStyle,
172
- ...heightStyle,
158
+ ...removeHeightPercentForContent(heightStyle(fullScreen, height)),
159
+ ...inheritStyleBody,
173
160
  ...getStyleBackgroundByDevice(background, {
174
161
  ignoreBackgroundImage: true,
175
162
  ignoreBackgroundImageProperties: true,
@@ -177,10 +164,7 @@ const Dialog = ({ setting, children, builderProps, style, advanced })=>{
177
164
  })
178
165
  }}"
179
166
  aria-label="Dialog body"
180
- class="${cls('gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden', {
181
- 'gp-max-h-screen': position !== 'center',
182
- 'gp-max-h-[calc(100vh_-_192px)]': position === 'center' && !fullScreen?.desktop
183
- })}">
167
+ class="${bodyDialogClass}">
184
168
  <div>
185
169
  ${children ?? ''}
186
170
  </div>
@@ -1,3 +1,5 @@
1
+ import { makeStyle } from '@gem-sdk/core';
2
+
1
3
  const isShowModal = (startDate, numberOfDay = 0)=>{
2
4
  const start = startDate ? new Date(Number(startDate)) : new Date();
3
5
  const c = Date.now() - start.getTime();
@@ -17,5 +19,29 @@ const getPropertyByDevice = (property, device)=>{
17
19
  if (device === 'mobile') return property?.mobile ?? property?.tablet ?? property?.desktop;
18
20
  return property?.desktop;
19
21
  };
22
+ const heightStyle = (fullScreen, height)=>({
23
+ ...fullScreen?.desktop ? makeStyle({
24
+ h: '100%'
25
+ }) : !height?.desktop ? makeStyle({
26
+ minh: '300px'
27
+ }) : makeStyle({
28
+ h: height.desktop
29
+ }),
30
+ '--h-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : getPropertyByDevice(height, 'tablet') ?? '300px',
31
+ '--h-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : getPropertyByDevice(height, 'mobile') ?? '300px',
32
+ '--maxh': getPropertyByDevice(fullScreen, 'desktop') ? '100%' : '',
33
+ '--maxh-tablet': getPropertyByDevice(fullScreen, 'tablet') ? '100%' : '',
34
+ '--maxh-mobile': getPropertyByDevice(fullScreen, 'mobile') ? '100%' : ''
35
+ });
36
+ const removeHeightPercentForContent = (heightStyle)=>({
37
+ ...heightStyle,
38
+ '--h': heightStyle['--h']?.includes('%') ? '100%' : heightStyle['--h'],
39
+ '--h-tablet': heightStyle['--h-tablet']?.includes('%') ? '100%' : heightStyle['--h-tablet'],
40
+ '--h-mobile': heightStyle['--h-mobile']?.includes('%') ? '100%' : heightStyle['--h-mobile']
41
+ });
42
+ const inheritStyleBody = {
43
+ 'border-radius': 'inherit'
44
+ };
45
+ const bodyDialogClass = 'gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen';
20
46
 
21
- export { getPropertyByDevice, isMobile, isShowModal };
47
+ export { bodyDialogClass, getPropertyByDevice, heightStyle, inheritStyleBody, isMobile, isShowModal, removeHeightPercentForContent };