@gem-sdk/components 2.0.0-staging.132 → 2.0.0-staging.134

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 (32) hide show
  1. package/dist/cjs/builder.js +2 -0
  2. package/dist/cjs/carousel/components/CarouselItem.js +13 -7
  3. package/dist/cjs/carousel/components/CarouselItem.liquid.js +13 -6
  4. package/dist/cjs/carousel/setting/Carousel.js +34 -0
  5. package/dist/cjs/icon-list-v2/components/IconList.liquid.js +4 -2
  6. package/dist/cjs/index.js +2 -0
  7. package/dist/cjs/index.liquid.js +2 -0
  8. package/dist/cjs/product/components/ProductButton.js +1 -1
  9. package/dist/cjs/product/components/ProductButton.liquid.js +19 -2
  10. package/dist/cjs/third-party/components/StellarDeliveryDatePickup.js +33 -0
  11. package/dist/cjs/third-party/components/StellarDeliveryDatePickup.liquid.js +21 -0
  12. package/dist/cjs/third-party/configs/StellarDeliveryDatePickup.js +12 -0
  13. package/dist/cjs/third-party/next.js +5 -0
  14. package/dist/cjs/third-party/setting/StellarDeliveryDatePickup.js +127 -0
  15. package/dist/cjs/third-party/setting/index.js +2 -0
  16. package/dist/esm/builder.js +2 -0
  17. package/dist/esm/carousel/components/CarouselItem.js +14 -8
  18. package/dist/esm/carousel/components/CarouselItem.liquid.js +14 -7
  19. package/dist/esm/carousel/setting/Carousel.js +34 -0
  20. package/dist/esm/icon-list-v2/components/IconList.liquid.js +4 -2
  21. package/dist/esm/index.js +1 -0
  22. package/dist/esm/index.liquid.js +1 -0
  23. package/dist/esm/product/components/ProductButton.js +1 -1
  24. package/dist/esm/product/components/ProductButton.liquid.js +19 -2
  25. package/dist/esm/third-party/components/StellarDeliveryDatePickup.js +29 -0
  26. package/dist/esm/third-party/components/StellarDeliveryDatePickup.liquid.js +17 -0
  27. package/dist/esm/third-party/configs/StellarDeliveryDatePickup.js +8 -0
  28. package/dist/esm/third-party/next.js +5 -0
  29. package/dist/esm/third-party/setting/StellarDeliveryDatePickup.js +123 -0
  30. package/dist/esm/third-party/setting/index.js +202 -200
  31. package/dist/types/index.d.ts +21 -1
  32. package/package.json +1 -1
@@ -41,13 +41,15 @@ const IconListV2 = ({ builderProps, style, setting, styles, advanced, pageContex
41
41
  }}">
42
42
  ${valueMap?.map((node, key)=>{
43
43
  let value = replaceLinkData(childItem?.[key]);
44
- const textVal = getDynamicSourceLocales({
44
+ let textVal = getDynamicSourceLocales({
45
45
  val: value,
46
46
  uid: builderProps?.uid,
47
47
  settingId: `childItem_${key}`,
48
48
  pageContext,
49
- translate
49
+ translate,
50
+ isLiquid: true
50
51
  });
52
+ textVal = `{{ ${textVal} | replace: '$locationOrigin', locationOrigin }}`;
51
53
  return template`
52
54
  <div
53
55
  class="gp-icon-list-wrapper gp-flex gp-child-item-${builderProps?.uid}"
package/dist/esm/index.js CHANGED
@@ -204,6 +204,7 @@ export { default as TrustreviewsProductReviews } from './third-party/components/
204
204
  export { default as MyappgurusProductReviews } from './third-party/components/MyappgurusProductReviews.js';
205
205
  export { default as HulkProductOptions } from './third-party/components/HulkProductOptions.js';
206
206
  export { default as TrustshopProductReviews } from './third-party/components/TrustshopProductReviews.js';
207
+ export { default as StellarDeliveryDatePickup } from './third-party/components/StellarDeliveryDatePickup.js';
207
208
  export { default as thirdPartyInstantSetting } from './third-party-instant/setting/index.js';
208
209
  export { default as InstantJudgemeReviews } from './third-party-instant/components/InstantJudgemeReviews.js';
209
210
  export { default as InstantLooxReviews } from './third-party-instant/components/InstantLooxReviews.js';
@@ -160,6 +160,7 @@ export { default as TrustreviewsProductReviews } from './third-party/components/
160
160
  export { default as MyappgurusProductReviews } from './third-party/components/MyappgurusProductReviews.liquid.js';
161
161
  export { default as HulkProductOptions } from './third-party/components/HulkProductOptions.liquid.js';
162
162
  export { default as TrustshopProductReviews } from './third-party/components/TrustshopProductReviews.liquid.js';
163
+ export { default as StellarDeliveryDatePickup } from './third-party/components/StellarDeliveryDatePickup.liquid.js';
163
164
  export { default as ImageComparison } from './image-comparison/components/ImageComparison.liquid.js';
164
165
  export { default as ThirdPartySlot } from './third-party-slot/components/ThirdPartySlot.liquid.js';
165
166
  export { default as ShopPayInstallments } from './shop-pay-installment/components/ShopPayInstallments.liquid.js';
@@ -215,7 +215,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
215
215
  ]);
216
216
  const isInStock = useCurrentVariantInStock();
217
217
  const isDisable = !isInStock || createCartLoading || addToCartLoading;
218
- const label = !isInStock ? setting?.outOfStockLabel : setting?.label;
218
+ const label = !isInStock ? !currentVariant ? 'Unavailable' : setting?.outOfStockLabel : setting?.label;
219
219
  if (!isInStock && isCustomOutOfStock) {
220
220
  buttonStyles.backgroundColor = {
221
221
  normal: oosBackground
@@ -184,6 +184,22 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
184
184
  pageContext,
185
185
  translate: setting?.translate
186
186
  });
187
+ const labelUnavailableTranslate = getDynamicSourceLocales({
188
+ val: 'Unavailable',
189
+ uid: builderProps?.uid,
190
+ settingId: 'unavailableLabel',
191
+ isLiquid: true,
192
+ pageContext,
193
+ translate: setting?.translate ? 'unavailableLabel' : undefined
194
+ });
195
+ const labelOutOfStockTranslate = getDynamicSourceLocales({
196
+ val: setting?.outOfStockLabel,
197
+ uid: builderProps?.uid,
198
+ settingId: 'outOfStockLabel',
199
+ isLiquid: true,
200
+ pageContext,
201
+ translate: setting?.translate ? 'outOfStockLabel' : undefined
202
+ });
187
203
  return template /* liquid */ `
188
204
  {%- liquid
189
205
  assign inventory_quantity = variant.inventory_quantity | default: 0
@@ -191,6 +207,8 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
191
207
  <gp-product-button
192
208
  class="gp-product-button"
193
209
  gp-data-wrapper="true"
210
+ label-out-of-Stock="${pageContext?.isPreviewing ? labelOutOfStockTranslate : `{{${labelOutOfStockTranslate}}}`}"
211
+ label-unavailable="${pageContext?.isPreviewing ? labelUnavailableTranslate : `{{${labelUnavailableTranslate}}}`}"
194
212
  gp-data='${JSON.stringify({
195
213
  setting: {
196
214
  actionEffect: setting?.actionEffect,
@@ -268,8 +286,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
268
286
  'gp-data-hidden': `{% if variant.available %}true{% endif %}`
269
287
  },
270
288
  setting: {
271
- label: setting?.outOfStockLabel,
272
- translate: setting?.translate ? 'outOfStockLabel' : undefined,
289
+ label: labelOutOfStockTranslate,
273
290
  htmlType: 'button',
274
291
  iconAlign: iconAlign,
275
292
  iconSvg: iconSvg,
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
3
+ import { makeStyleResponsive } from '@gem-sdk/core';
4
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
5
+ import AppConfig from '../configs/StellarDeliveryDatePickup.js';
6
+
7
+ const StellarDeliveryDatePickupContent = ()=>{
8
+ return /*#__PURE__*/ jsx(Fragment, {
9
+ children: /*#__PURE__*/ jsx("div", {
10
+ className: "gp-p-2",
11
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
12
+ setting: {
13
+ label: 'Stellar Delivery Date & Pickup',
14
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
15
+ }
16
+ })
17
+ })
18
+ });
19
+ };
20
+ const StellarDeliveryDatePickup = ({ setting })=>{
21
+ return /*#__PURE__*/ jsx("div", {
22
+ style: {
23
+ ...makeStyleResponsive('ta', setting?.align)
24
+ },
25
+ children: /*#__PURE__*/ jsx(StellarDeliveryDatePickupContent, {})
26
+ });
27
+ };
28
+
29
+ export { StellarDeliveryDatePickup as default };
@@ -0,0 +1,17 @@
1
+ import { template, makeStyleResponsive } from '@gem-sdk/core';
2
+
3
+ const StellarDeliveryDatePickup = ({ setting, advanced })=>{
4
+ const { align } = setting ?? {};
5
+ return template`
6
+ <div
7
+ class="${advanced?.cssClass}"
8
+ style="${{
9
+ ...makeStyleResponsive('ta', align)
10
+ }}"
11
+ >
12
+ <div class="gp-integration-stellar-delivery__position" ></div>
13
+ </div>
14
+ `;
15
+ };
16
+
17
+ export { StellarDeliveryDatePickup as default };
@@ -0,0 +1,8 @@
1
+ var AppConfig = {
2
+ id: 'stellar-delivery-date-pickup',
3
+ label: 'Stellar Delivery Date & Pickup',
4
+ logoUrl: 'https://cdn.shopify.com/app-store/listing_images/568eee7424b5f70382db5178dd815f6a/icon/CMTw3rn0lu8CEAE=.jpg',
5
+ tag: 'StellarDeliveryDatePickup'
6
+ };
7
+
8
+ export { AppConfig as default };
@@ -4,6 +4,10 @@ import 'react/jsx-runtime';
4
4
  import 'react';
5
5
  import '@gem-sdk/core';
6
6
 
7
+ const StellarDeliveryDatePickup = dynamic(()=>import('./components/StellarDeliveryDatePickup.js'), {
8
+ ssr: false,
9
+ loading: Loading
10
+ });
7
11
  const TrustshopProductReviews = dynamic(()=>import('./components/TrustshopProductReviews.js'), {
8
12
  ssr: false,
9
13
  loading: Loading
@@ -405,6 +409,7 @@ const Selleasy = dynamic(()=>import('./components/Selleasy.js'), {
405
409
  loading: Loading
406
410
  });
407
411
  var thirdParty = {
412
+ StellarDeliveryDatePickup,
408
413
  TrustshopProductReviews,
409
414
  HulkProductOptions,
410
415
  MyappgurusProductReviews,
@@ -0,0 +1,123 @@
1
+ import AppConfig from '../configs/StellarDeliveryDatePickup.js';
2
+
3
+ const config = {
4
+ tag: AppConfig.tag,
5
+ label: AppConfig.label,
6
+ icon: '<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/568eee7424b5f70382db5178dd815f6a/icon/CMTw3rn0lu8CEAE=.jpg">',
7
+ editorConfigs: {
8
+ placeholder: {
9
+ flowPage: 'GP_PRODUCT'
10
+ },
11
+ component: {
12
+ isThirdParty: true
13
+ }
14
+ },
15
+ presets: [
16
+ {
17
+ id: AppConfig.id,
18
+ name: {
19
+ en: AppConfig.label
20
+ },
21
+ hideTextContent: true,
22
+ icon: {
23
+ desktop: `<div class="w-full flex flex-col items-center">
24
+ <img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/568eee7424b5f70382db5178dd815f6a/icon/CMTw3rn0lu8CEAE=.jpg">
25
+ <span class="preset-item-title">Stellar Delivery Date & Pickup</span>
26
+ </div>`
27
+ },
28
+ components: [
29
+ {
30
+ tag: AppConfig.tag
31
+ }
32
+ ]
33
+ }
34
+ ],
35
+ settings: [
36
+ {
37
+ id: 'setting',
38
+ controls: [
39
+ {
40
+ id: 'install',
41
+ type: 'open-link',
42
+ target: '_blank',
43
+ linkType: 'install',
44
+ href: 'https://apps.shopify.com/order-delivery-date-by-identixweb?utm_source=gempages',
45
+ appName: AppConfig.label
46
+ },
47
+ {
48
+ id: 'guideId',
49
+ type: 'group'
50
+ },
51
+ {
52
+ id: 'openApp',
53
+ type: 'open-link',
54
+ target: '_blank',
55
+ linkType: 'openApp',
56
+ href: 'https://admin.shopify.com/?redirect=/apps/order-delivery-date-by-identixweb',
57
+ appName: AppConfig.label
58
+ },
59
+ {
60
+ id: 'align',
61
+ label: 'Alignment',
62
+ type: 'segment',
63
+ options: [
64
+ {
65
+ label: 'Left',
66
+ value: 'left',
67
+ type: 'align'
68
+ },
69
+ {
70
+ label: 'Center',
71
+ value: 'center',
72
+ type: 'align'
73
+ },
74
+ {
75
+ label: 'Right',
76
+ value: 'right',
77
+ type: 'align'
78
+ }
79
+ ],
80
+ devices: {
81
+ desktop: {
82
+ default: 'left'
83
+ }
84
+ }
85
+ }
86
+ ]
87
+ }
88
+ ],
89
+ ui: [
90
+ {
91
+ type: 'control',
92
+ setting: {
93
+ id: 'install'
94
+ }
95
+ },
96
+ {
97
+ type: 'control',
98
+ info: {
99
+ en: '<span>To make this element work, copy the class <strong>.gp-integration-stellar-delivery__position</strong> and paste it into the Selector input field in the Run Wizard settings. For more details, check the instructions on<a style="text-decoration: none; color: #8AA4FF" href="https://www.identixweb.com/helpdesk/order-delivery-date/general-settings/setup-wizard/" target="_blank"> how to set up the Run Wizard.</a></span>'
100
+ },
101
+ setting: {
102
+ id: 'guideId'
103
+ }
104
+ },
105
+ {
106
+ type: 'control',
107
+ setting: {
108
+ id: 'openApp'
109
+ }
110
+ },
111
+ {
112
+ type: 'control',
113
+ label: {
114
+ en: 'Align'
115
+ },
116
+ setting: {
117
+ id: 'align'
118
+ }
119
+ }
120
+ ]
121
+ };
122
+
123
+ export { config as default };