@gem-sdk/components 2.0.0-staging.133 → 2.0.0-staging.135
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 +2 -0
- package/dist/cjs/helpers.js +2 -2
- package/dist/cjs/icon-list-v2/components/IconList.liquid.js +6 -2
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.liquid.js +2 -0
- package/dist/cjs/product/components/ProductButton.js +1 -1
- package/dist/cjs/product/components/ProductButton.liquid.js +19 -2
- package/dist/cjs/text/components/Text.liquid.js +5 -8
- package/dist/cjs/third-party/components/StellarDeliveryDatePickup.js +33 -0
- package/dist/cjs/third-party/components/StellarDeliveryDatePickup.liquid.js +21 -0
- package/dist/cjs/third-party/configs/StellarDeliveryDatePickup.js +12 -0
- package/dist/cjs/third-party/next.js +5 -0
- package/dist/cjs/third-party/setting/StellarDeliveryDatePickup.js +127 -0
- package/dist/cjs/third-party/setting/index.js +2 -0
- package/dist/esm/builder.js +2 -0
- package/dist/esm/helpers.js +2 -2
- package/dist/esm/icon-list-v2/components/IconList.liquid.js +6 -2
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.liquid.js +1 -0
- package/dist/esm/product/components/ProductButton.js +1 -1
- package/dist/esm/product/components/ProductButton.liquid.js +19 -2
- package/dist/esm/text/components/Text.liquid.js +5 -8
- package/dist/esm/third-party/components/StellarDeliveryDatePickup.js +29 -0
- package/dist/esm/third-party/components/StellarDeliveryDatePickup.liquid.js +17 -0
- package/dist/esm/third-party/configs/StellarDeliveryDatePickup.js +8 -0
- package/dist/esm/third-party/next.js +5 -0
- package/dist/esm/third-party/setting/StellarDeliveryDatePickup.js +123 -0
- package/dist/esm/third-party/setting/index.js +202 -200
- package/dist/types/index.d.ts +21 -2
- package/package.json +1 -1
package/dist/cjs/builder.js
CHANGED
|
@@ -111,6 +111,7 @@ var TrustreviewsProductReviews = require('./third-party/components/TrustreviewsP
|
|
|
111
111
|
var MyappgurusProductReviews = require('./third-party/components/MyappgurusProductReviews.js');
|
|
112
112
|
var HulkProductOptions = require('./third-party/components/HulkProductOptions.js');
|
|
113
113
|
var TrustshopProductReviews = require('./third-party/components/TrustshopProductReviews.js');
|
|
114
|
+
var StellarDeliveryDatePickup = require('./third-party/components/StellarDeliveryDatePickup.js');
|
|
114
115
|
var CartLineVariant = require('./cart/components/CartLineVariant.js');
|
|
115
116
|
var Cart = require('./cart/components/Cart.js');
|
|
116
117
|
var CartList = require('./cart/components/CartList.js');
|
|
@@ -247,6 +248,7 @@ var PostPurchaseLink = require('./post-purchase/link/components/PostPurchaseLink
|
|
|
247
248
|
var Text$1 = require('./post-purchase/text/Text.js');
|
|
248
249
|
|
|
249
250
|
var builder = {
|
|
251
|
+
StellarDeliveryDatePickup: StellarDeliveryDatePickup.default,
|
|
250
252
|
TrustshopProductReviews: TrustshopProductReviews.default,
|
|
251
253
|
HulkProductOptions: HulkProductOptions.default,
|
|
252
254
|
MyappgurusProductReviews: MyappgurusProductReviews.default,
|
package/dist/cjs/helpers.js
CHANGED
|
@@ -101,7 +101,7 @@ const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
|
|
|
101
101
|
shouldRenderLink
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
|
-
const replaceLinkData = (text)=>{
|
|
104
|
+
const replaceLinkData = (text, isTranslate)=>{
|
|
105
105
|
const regex = /<a\s[^>]*>.*?<\/a>/;
|
|
106
106
|
if (text && regex.test(text)) {
|
|
107
107
|
const regex = // eslint-disable-next-line regexp/no-super-linear-backtracking, regexp/no-unused-capturing-group
|
|
@@ -112,7 +112,7 @@ const replaceLinkData = (text)=>{
|
|
|
112
112
|
const href = match[1];
|
|
113
113
|
const { urlData } = getInsertLinkData('', {
|
|
114
114
|
link: href,
|
|
115
|
-
isTranslate
|
|
115
|
+
isTranslate
|
|
116
116
|
});
|
|
117
117
|
newText = newText.replace(match[0], match[0].replace(/(href=['"])([^'"]*)(['"])/i, `$1${urlData.href}$3`));
|
|
118
118
|
}
|
|
@@ -45,13 +45,17 @@ const IconListV2 = ({ builderProps, style, setting, styles, advanced, pageContex
|
|
|
45
45
|
}}">
|
|
46
46
|
${valueMap?.map((node, key)=>{
|
|
47
47
|
let value = helpers.replaceLinkData(childItem?.[key]);
|
|
48
|
-
|
|
48
|
+
let textVal = helpers.getDynamicSourceLocales({
|
|
49
49
|
val: value,
|
|
50
50
|
uid: builderProps?.uid,
|
|
51
51
|
settingId: `childItem_${key}`,
|
|
52
52
|
pageContext,
|
|
53
|
-
translate
|
|
53
|
+
translate,
|
|
54
|
+
isLiquid: true
|
|
54
55
|
});
|
|
56
|
+
if (!pageContext?.isPreviewing) {
|
|
57
|
+
textVal = `{{ ${textVal} | replace: '$locationOrigin', locationOrigin }}`;
|
|
58
|
+
}
|
|
55
59
|
return core.template`
|
|
56
60
|
<div
|
|
57
61
|
class="gp-icon-list-wrapper gp-flex gp-child-item-${builderProps?.uid}"
|
package/dist/cjs/index.js
CHANGED
|
@@ -206,6 +206,7 @@ var TrustreviewsProductReviews = require('./third-party/components/TrustreviewsP
|
|
|
206
206
|
var MyappgurusProductReviews = require('./third-party/components/MyappgurusProductReviews.js');
|
|
207
207
|
var HulkProductOptions = require('./third-party/components/HulkProductOptions.js');
|
|
208
208
|
var TrustshopProductReviews = require('./third-party/components/TrustshopProductReviews.js');
|
|
209
|
+
var StellarDeliveryDatePickup = require('./third-party/components/StellarDeliveryDatePickup.js');
|
|
209
210
|
var index$x = require('./third-party-instant/setting/index.js');
|
|
210
211
|
var InstantJudgemeReviews = require('./third-party-instant/components/InstantJudgemeReviews.js');
|
|
211
212
|
var InstantLooxReviews = require('./third-party-instant/components/InstantLooxReviews.js');
|
|
@@ -514,6 +515,7 @@ exports.TrustreviewsProductReviews = TrustreviewsProductReviews.default;
|
|
|
514
515
|
exports.MyappgurusProductReviews = MyappgurusProductReviews.default;
|
|
515
516
|
exports.HulkProductOptions = HulkProductOptions.default;
|
|
516
517
|
exports.TrustshopProductReviews = TrustshopProductReviews.default;
|
|
518
|
+
exports.StellarDeliveryDatePickup = StellarDeliveryDatePickup.default;
|
|
517
519
|
exports.thirdPartyInstantSetting = index$x.default;
|
|
518
520
|
exports.InstantJudgemeReviews = InstantJudgemeReviews.default;
|
|
519
521
|
exports.InstantLooxReviews = InstantLooxReviews.default;
|
package/dist/cjs/index.liquid.js
CHANGED
|
@@ -162,6 +162,7 @@ var TrustreviewsProductReviews_liquid = require('./third-party/components/Trustr
|
|
|
162
162
|
var MyappgurusProductReviews_liquid = require('./third-party/components/MyappgurusProductReviews.liquid.js');
|
|
163
163
|
var HulkProductOptions_liquid = require('./third-party/components/HulkProductOptions.liquid.js');
|
|
164
164
|
var TrustshopProductReviews_liquid = require('./third-party/components/TrustshopProductReviews.liquid.js');
|
|
165
|
+
var StellarDeliveryDatePickup_liquid = require('./third-party/components/StellarDeliveryDatePickup.liquid.js');
|
|
165
166
|
var ImageComparison_liquid = require('./image-comparison/components/ImageComparison.liquid.js');
|
|
166
167
|
var ThirdPartySlot_liquid = require('./third-party-slot/components/ThirdPartySlot.liquid.js');
|
|
167
168
|
var ShopPayInstallments_liquid = require('./shop-pay-installment/components/ShopPayInstallments.liquid.js');
|
|
@@ -346,6 +347,7 @@ exports.TrustreviewsProductReviews = TrustreviewsProductReviews_liquid.default;
|
|
|
346
347
|
exports.MyappgurusProductReviews = MyappgurusProductReviews_liquid.default;
|
|
347
348
|
exports.HulkProductOptions = HulkProductOptions_liquid.default;
|
|
348
349
|
exports.TrustshopProductReviews = TrustshopProductReviews_liquid.default;
|
|
350
|
+
exports.StellarDeliveryDatePickup = StellarDeliveryDatePickup_liquid.default;
|
|
349
351
|
exports.ImageComparison = ImageComparison_liquid.default;
|
|
350
352
|
exports.ThirdPartySlot = ThirdPartySlot_liquid.default;
|
|
351
353
|
exports.ShopPayInstallments = ShopPayInstallments_liquid.default;
|
|
@@ -219,7 +219,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
|
|
|
219
219
|
]);
|
|
220
220
|
const isInStock = core.useCurrentVariantInStock();
|
|
221
221
|
const isDisable = !isInStock || createCartLoading || addToCartLoading;
|
|
222
|
-
const label = !isInStock ? setting?.outOfStockLabel : setting?.label;
|
|
222
|
+
const label = !isInStock ? !currentVariant ? 'Unavailable' : setting?.outOfStockLabel : setting?.label;
|
|
223
223
|
if (!isInStock && isCustomOutOfStock) {
|
|
224
224
|
buttonStyles.backgroundColor = {
|
|
225
225
|
normal: oosBackground
|
|
@@ -188,6 +188,22 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
|
|
|
188
188
|
pageContext,
|
|
189
189
|
translate: setting?.translate
|
|
190
190
|
});
|
|
191
|
+
const labelUnavailableTranslate = helpers.getDynamicSourceLocales({
|
|
192
|
+
val: 'Unavailable',
|
|
193
|
+
uid: builderProps?.uid,
|
|
194
|
+
settingId: 'unavailableLabel',
|
|
195
|
+
isLiquid: true,
|
|
196
|
+
pageContext,
|
|
197
|
+
translate: setting?.translate ? 'unavailableLabel' : undefined
|
|
198
|
+
});
|
|
199
|
+
const labelOutOfStockTranslate = helpers.getDynamicSourceLocales({
|
|
200
|
+
val: setting?.outOfStockLabel,
|
|
201
|
+
uid: builderProps?.uid,
|
|
202
|
+
settingId: 'outOfStockLabel',
|
|
203
|
+
isLiquid: true,
|
|
204
|
+
pageContext,
|
|
205
|
+
translate: setting?.translate ? 'outOfStockLabel' : undefined
|
|
206
|
+
});
|
|
191
207
|
return core.template /* liquid */ `
|
|
192
208
|
{%- liquid
|
|
193
209
|
assign inventory_quantity = variant.inventory_quantity | default: 0
|
|
@@ -195,6 +211,8 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
|
|
|
195
211
|
<gp-product-button
|
|
196
212
|
class="gp-product-button"
|
|
197
213
|
gp-data-wrapper="true"
|
|
214
|
+
label-out-of-Stock="${pageContext?.isPreviewing ? labelOutOfStockTranslate : `{{${labelOutOfStockTranslate}}}`}"
|
|
215
|
+
label-unavailable="${pageContext?.isPreviewing ? labelUnavailableTranslate : `{{${labelUnavailableTranslate}}}`}"
|
|
198
216
|
gp-data='${JSON.stringify({
|
|
199
217
|
setting: {
|
|
200
218
|
actionEffect: setting?.actionEffect,
|
|
@@ -272,8 +290,7 @@ const ProductButton = ({ setting, builderProps, builderAttrs, style, styles, adv
|
|
|
272
290
|
'gp-data-hidden': `{% if variant.available %}true{% endif %}`
|
|
273
291
|
},
|
|
274
292
|
setting: {
|
|
275
|
-
label:
|
|
276
|
-
translate: setting?.translate ? 'outOfStockLabel' : undefined,
|
|
293
|
+
label: labelOutOfStockTranslate,
|
|
277
294
|
htmlType: 'button',
|
|
278
295
|
iconAlign: iconAlign,
|
|
279
296
|
iconSvg: iconSvg,
|
|
@@ -18,14 +18,11 @@ const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, cl
|
|
|
18
18
|
return classList;
|
|
19
19
|
};
|
|
20
20
|
let displayText = '';
|
|
21
|
-
const
|
|
21
|
+
const isViewliveHeadingOrTextComponent = [
|
|
22
22
|
'Heading',
|
|
23
23
|
'Text'
|
|
24
|
-
].includes(builderProps?.builderData?.tag ?? '');
|
|
25
|
-
|
|
26
|
-
if (isHeadingOrTextComponent) {
|
|
27
|
-
renderText = helpers.replaceLinkData(text?.toString());
|
|
28
|
-
}
|
|
24
|
+
].includes(builderProps?.builderData?.tag ?? '') && !pageContext?.isPreviewing;
|
|
25
|
+
const renderText = helpers.replaceLinkData(text?.toString(), isViewliveHeadingOrTextComponent);
|
|
29
26
|
if (isForceValue) {
|
|
30
27
|
displayText = renderText;
|
|
31
28
|
} else if (setting?.translate) {
|
|
@@ -36,9 +33,9 @@ const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, cl
|
|
|
36
33
|
pageContext,
|
|
37
34
|
isCapitalize: styles?.typo?.attrs?.transform === 'capitalize',
|
|
38
35
|
translate: setting.translate,
|
|
39
|
-
isLiquid:
|
|
36
|
+
isLiquid: isViewliveHeadingOrTextComponent
|
|
40
37
|
});
|
|
41
|
-
if (
|
|
38
|
+
if (isViewliveHeadingOrTextComponent) {
|
|
42
39
|
displayText = `{{ ${displayText} | replace: '$locationOrigin', locationOrigin }}`;
|
|
43
40
|
}
|
|
44
41
|
} else {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var core = require('@gem-sdk/core');
|
|
8
|
+
var ThirdPartyPreview = require('./ThirdPartyPreview.js');
|
|
9
|
+
var StellarDeliveryDatePickup$1 = require('../configs/StellarDeliveryDatePickup.js');
|
|
10
|
+
|
|
11
|
+
const StellarDeliveryDatePickupContent = ()=>{
|
|
12
|
+
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
13
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
14
|
+
className: "gp-p-2",
|
|
15
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(ThirdPartyPreview.default, {
|
|
16
|
+
setting: {
|
|
17
|
+
label: 'Stellar Delivery Date & Pickup',
|
|
18
|
+
iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${StellarDeliveryDatePickup$1.default.logoUrl}">`
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const StellarDeliveryDatePickup = ({ setting })=>{
|
|
25
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
26
|
+
style: {
|
|
27
|
+
...core.makeStyleResponsive('ta', setting?.align)
|
|
28
|
+
},
|
|
29
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(StellarDeliveryDatePickupContent, {})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.default = StellarDeliveryDatePickup;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@gem-sdk/core');
|
|
6
|
+
|
|
7
|
+
const StellarDeliveryDatePickup = ({ setting, advanced })=>{
|
|
8
|
+
const { align } = setting ?? {};
|
|
9
|
+
return core.template`
|
|
10
|
+
<div
|
|
11
|
+
class="${advanced?.cssClass}"
|
|
12
|
+
style="${{
|
|
13
|
+
...core.makeStyleResponsive('ta', align)
|
|
14
|
+
}}"
|
|
15
|
+
>
|
|
16
|
+
<div class="gp-integration-stellar-delivery__position" ></div>
|
|
17
|
+
</div>
|
|
18
|
+
`;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.default = StellarDeliveryDatePickup;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var AppConfig = {
|
|
6
|
+
id: 'stellar-delivery-date-pickup',
|
|
7
|
+
label: 'Stellar Delivery Date & Pickup',
|
|
8
|
+
logoUrl: 'https://cdn.shopify.com/app-store/listing_images/568eee7424b5f70382db5178dd815f6a/icon/CMTw3rn0lu8CEAE=.jpg',
|
|
9
|
+
tag: 'StellarDeliveryDatePickup'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.default = AppConfig;
|
|
@@ -8,6 +8,10 @@ require('react/jsx-runtime');
|
|
|
8
8
|
require('react');
|
|
9
9
|
require('@gem-sdk/core');
|
|
10
10
|
|
|
11
|
+
const StellarDeliveryDatePickup = dynamic(()=>Promise.resolve().then(function () { return require('./components/StellarDeliveryDatePickup.js'); }), {
|
|
12
|
+
ssr: false,
|
|
13
|
+
loading: Loading.default
|
|
14
|
+
});
|
|
11
15
|
const TrustshopProductReviews = dynamic(()=>Promise.resolve().then(function () { return require('./components/TrustshopProductReviews.js'); }), {
|
|
12
16
|
ssr: false,
|
|
13
17
|
loading: Loading.default
|
|
@@ -409,6 +413,7 @@ const Selleasy = dynamic(()=>Promise.resolve().then(function () { return require
|
|
|
409
413
|
loading: Loading.default
|
|
410
414
|
});
|
|
411
415
|
var thirdParty = {
|
|
416
|
+
StellarDeliveryDatePickup,
|
|
412
417
|
TrustshopProductReviews,
|
|
413
418
|
HulkProductOptions,
|
|
414
419
|
MyappgurusProductReviews,
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var StellarDeliveryDatePickup = require('../configs/StellarDeliveryDatePickup.js');
|
|
6
|
+
|
|
7
|
+
const config = {
|
|
8
|
+
tag: StellarDeliveryDatePickup.default.tag,
|
|
9
|
+
label: StellarDeliveryDatePickup.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/568eee7424b5f70382db5178dd815f6a/icon/CMTw3rn0lu8CEAE=.jpg">',
|
|
11
|
+
editorConfigs: {
|
|
12
|
+
placeholder: {
|
|
13
|
+
flowPage: 'GP_PRODUCT'
|
|
14
|
+
},
|
|
15
|
+
component: {
|
|
16
|
+
isThirdParty: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
presets: [
|
|
20
|
+
{
|
|
21
|
+
id: StellarDeliveryDatePickup.default.id,
|
|
22
|
+
name: {
|
|
23
|
+
en: StellarDeliveryDatePickup.default.label
|
|
24
|
+
},
|
|
25
|
+
hideTextContent: true,
|
|
26
|
+
icon: {
|
|
27
|
+
desktop: `<div class="w-full flex flex-col items-center">
|
|
28
|
+
<img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/568eee7424b5f70382db5178dd815f6a/icon/CMTw3rn0lu8CEAE=.jpg">
|
|
29
|
+
<span class="preset-item-title">Stellar Delivery Date & Pickup</span>
|
|
30
|
+
</div>`
|
|
31
|
+
},
|
|
32
|
+
components: [
|
|
33
|
+
{
|
|
34
|
+
tag: StellarDeliveryDatePickup.default.tag
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
settings: [
|
|
40
|
+
{
|
|
41
|
+
id: 'setting',
|
|
42
|
+
controls: [
|
|
43
|
+
{
|
|
44
|
+
id: 'install',
|
|
45
|
+
type: 'open-link',
|
|
46
|
+
target: '_blank',
|
|
47
|
+
linkType: 'install',
|
|
48
|
+
href: 'https://apps.shopify.com/order-delivery-date-by-identixweb?utm_source=gempages',
|
|
49
|
+
appName: StellarDeliveryDatePickup.default.label
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'guideId',
|
|
53
|
+
type: 'group'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'openApp',
|
|
57
|
+
type: 'open-link',
|
|
58
|
+
target: '_blank',
|
|
59
|
+
linkType: 'openApp',
|
|
60
|
+
href: 'https://admin.shopify.com/?redirect=/apps/order-delivery-date-by-identixweb',
|
|
61
|
+
appName: StellarDeliveryDatePickup.default.label
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'align',
|
|
65
|
+
label: 'Alignment',
|
|
66
|
+
type: 'segment',
|
|
67
|
+
options: [
|
|
68
|
+
{
|
|
69
|
+
label: 'Left',
|
|
70
|
+
value: 'left',
|
|
71
|
+
type: 'align'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: 'Center',
|
|
75
|
+
value: 'center',
|
|
76
|
+
type: 'align'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: 'Right',
|
|
80
|
+
value: 'right',
|
|
81
|
+
type: 'align'
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
devices: {
|
|
85
|
+
desktop: {
|
|
86
|
+
default: 'left'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
ui: [
|
|
94
|
+
{
|
|
95
|
+
type: 'control',
|
|
96
|
+
setting: {
|
|
97
|
+
id: 'install'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: 'control',
|
|
102
|
+
info: {
|
|
103
|
+
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>'
|
|
104
|
+
},
|
|
105
|
+
setting: {
|
|
106
|
+
id: 'guideId'
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
type: 'control',
|
|
111
|
+
setting: {
|
|
112
|
+
id: 'openApp'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: 'control',
|
|
117
|
+
label: {
|
|
118
|
+
en: 'Align'
|
|
119
|
+
},
|
|
120
|
+
setting: {
|
|
121
|
+
id: 'align'
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
exports.default = config;
|
|
@@ -102,8 +102,10 @@ var TrustreviewsProductReviews = require('./TrustreviewsProductReviews.js');
|
|
|
102
102
|
var MyappgurusProductReviews = require('./MyappgurusProductReviews.js');
|
|
103
103
|
var HulkProductOptions = require('./HulkProductOptions.js');
|
|
104
104
|
var TrustshopProductReviews = require('./TrustshopProductReviews.js');
|
|
105
|
+
var StellarDeliveryDatePickup = require('./StellarDeliveryDatePickup.js');
|
|
105
106
|
|
|
106
107
|
var thirdPartySetting = {
|
|
108
|
+
StellarDeliveryDatePickup: StellarDeliveryDatePickup.default,
|
|
107
109
|
TrustshopProductReviews: TrustshopProductReviews.default,
|
|
108
110
|
HulkProductOptions: HulkProductOptions.default,
|
|
109
111
|
MyappgurusProductReviews: MyappgurusProductReviews.default,
|
package/dist/esm/builder.js
CHANGED
|
@@ -107,6 +107,7 @@ import TrustreviewsProductReviews from './third-party/components/TrustreviewsPro
|
|
|
107
107
|
import MyappgurusProductReviews from './third-party/components/MyappgurusProductReviews.js';
|
|
108
108
|
import HulkProductOptions from './third-party/components/HulkProductOptions.js';
|
|
109
109
|
import TrustshopProductReviews from './third-party/components/TrustshopProductReviews.js';
|
|
110
|
+
import StellarDeliveryDatePickup from './third-party/components/StellarDeliveryDatePickup.js';
|
|
110
111
|
import CartLineVariant from './cart/components/CartLineVariant.js';
|
|
111
112
|
import Cart from './cart/components/Cart.js';
|
|
112
113
|
import CartList from './cart/components/CartList.js';
|
|
@@ -243,6 +244,7 @@ import Link$1 from './post-purchase/link/components/PostPurchaseLink.js';
|
|
|
243
244
|
import Text$1 from './post-purchase/text/Text.js';
|
|
244
245
|
|
|
245
246
|
var builder = {
|
|
247
|
+
StellarDeliveryDatePickup,
|
|
246
248
|
TrustshopProductReviews,
|
|
247
249
|
HulkProductOptions,
|
|
248
250
|
MyappgurusProductReviews,
|
package/dist/esm/helpers.js
CHANGED
|
@@ -99,7 +99,7 @@ const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
|
|
|
99
99
|
shouldRenderLink
|
|
100
100
|
};
|
|
101
101
|
};
|
|
102
|
-
const replaceLinkData = (text)=>{
|
|
102
|
+
const replaceLinkData = (text, isTranslate)=>{
|
|
103
103
|
const regex = /<a\s[^>]*>.*?<\/a>/;
|
|
104
104
|
if (text && regex.test(text)) {
|
|
105
105
|
const regex = // eslint-disable-next-line regexp/no-super-linear-backtracking, regexp/no-unused-capturing-group
|
|
@@ -110,7 +110,7 @@ const replaceLinkData = (text)=>{
|
|
|
110
110
|
const href = match[1];
|
|
111
111
|
const { urlData } = getInsertLinkData('', {
|
|
112
112
|
link: href,
|
|
113
|
-
isTranslate
|
|
113
|
+
isTranslate
|
|
114
114
|
});
|
|
115
115
|
newText = newText.replace(match[0], match[0].replace(/(href=['"])([^'"]*)(['"])/i, `$1${urlData.href}$3`));
|
|
116
116
|
}
|
|
@@ -41,13 +41,17 @@ const IconListV2 = ({ builderProps, style, setting, styles, advanced, pageContex
|
|
|
41
41
|
}}">
|
|
42
42
|
${valueMap?.map((node, key)=>{
|
|
43
43
|
let value = replaceLinkData(childItem?.[key]);
|
|
44
|
-
|
|
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
|
+
if (!pageContext?.isPreviewing) {
|
|
53
|
+
textVal = `{{ ${textVal} | replace: '$locationOrigin', locationOrigin }}`;
|
|
54
|
+
}
|
|
51
55
|
return template`
|
|
52
56
|
<div
|
|
53
57
|
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';
|
package/dist/esm/index.liquid.js
CHANGED
|
@@ -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:
|
|
272
|
-
translate: setting?.translate ? 'outOfStockLabel' : undefined,
|
|
289
|
+
label: labelOutOfStockTranslate,
|
|
273
290
|
htmlType: 'button',
|
|
274
291
|
iconAlign: iconAlign,
|
|
275
292
|
iconSvg: iconSvg,
|
|
@@ -14,14 +14,11 @@ const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, cl
|
|
|
14
14
|
return classList;
|
|
15
15
|
};
|
|
16
16
|
let displayText = '';
|
|
17
|
-
const
|
|
17
|
+
const isViewliveHeadingOrTextComponent = [
|
|
18
18
|
'Heading',
|
|
19
19
|
'Text'
|
|
20
|
-
].includes(builderProps?.builderData?.tag ?? '');
|
|
21
|
-
|
|
22
|
-
if (isHeadingOrTextComponent) {
|
|
23
|
-
renderText = replaceLinkData(text?.toString());
|
|
24
|
-
}
|
|
20
|
+
].includes(builderProps?.builderData?.tag ?? '') && !pageContext?.isPreviewing;
|
|
21
|
+
const renderText = replaceLinkData(text?.toString(), isViewliveHeadingOrTextComponent);
|
|
25
22
|
if (isForceValue) {
|
|
26
23
|
displayText = renderText;
|
|
27
24
|
} else if (setting?.translate) {
|
|
@@ -32,9 +29,9 @@ const Text = ({ styles, builderAttrs, style, setting, advanced, builderProps, cl
|
|
|
32
29
|
pageContext,
|
|
33
30
|
isCapitalize: styles?.typo?.attrs?.transform === 'capitalize',
|
|
34
31
|
translate: setting.translate,
|
|
35
|
-
isLiquid:
|
|
32
|
+
isLiquid: isViewliveHeadingOrTextComponent
|
|
36
33
|
});
|
|
37
|
-
if (
|
|
34
|
+
if (isViewliveHeadingOrTextComponent) {
|
|
38
35
|
displayText = `{{ ${displayText} | replace: '$locationOrigin', locationOrigin }}`;
|
|
39
36
|
}
|
|
40
37
|
} else {
|
|
@@ -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,
|