@swell/apps-sdk 1.0.178 → 1.0.180
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/index.cjs +20 -17
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +16 -15
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +18 -16
- package/dist/index.mjs.map +2 -2
- package/dist/src/easyblocks/index.d.ts +1 -1
- package/dist/src/easyblocks/utils.d.ts +1 -0
- package/dist/src/liquid/filters/image_url.d.ts +1 -0
- package/dist/src/liquid/filters/shopify/img_url.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3252,7 +3252,7 @@ function getSectionSettingsFromProps(props, sectionSchema) {
|
|
|
3252
3252
|
(block) => block.type === blockType
|
|
3253
3253
|
);
|
|
3254
3254
|
return {
|
|
3255
|
-
id,
|
|
3255
|
+
id: toBlockId(id),
|
|
3256
3256
|
type: blockType,
|
|
3257
3257
|
disabled: isDisabled,
|
|
3258
3258
|
settings: blockSchema?.fields?.reduce(
|
|
@@ -3281,6 +3281,12 @@ function toSchemaFieldId(fieldId) {
|
|
|
3281
3281
|
}
|
|
3282
3282
|
return fieldId.replace(/·/g, ".");
|
|
3283
3283
|
}
|
|
3284
|
+
function toBlockId(id) {
|
|
3285
|
+
if (!id) {
|
|
3286
|
+
return id;
|
|
3287
|
+
}
|
|
3288
|
+
return id.replace(/\./g, "_");
|
|
3289
|
+
}
|
|
3284
3290
|
|
|
3285
3291
|
// src/utils/md5.ts
|
|
3286
3292
|
function md5(inputString) {
|
|
@@ -13011,7 +13017,7 @@ function ShopifyCustomer(instance, account) {
|
|
|
13011
13017
|
accepts_marketing: defer(() => account.email_optin),
|
|
13012
13018
|
addresses: deferWith(
|
|
13013
13019
|
account.addresses,
|
|
13014
|
-
(addresses) => addresses
|
|
13020
|
+
(addresses) => (addresses?.results || []).map(
|
|
13015
13021
|
(address) => ShopifyAddress(instance, address)
|
|
13016
13022
|
)
|
|
13017
13023
|
),
|
|
@@ -13047,7 +13053,9 @@ function ShopifyCustomer(instance, account) {
|
|
|
13047
13053
|
name: defer(() => account.name),
|
|
13048
13054
|
orders: deferWith(
|
|
13049
13055
|
account.orders,
|
|
13050
|
-
(orders) => orders
|
|
13056
|
+
(orders) => (orders?.results || []).map(
|
|
13057
|
+
(order) => ShopifyOrder(instance, order)
|
|
13058
|
+
)
|
|
13051
13059
|
),
|
|
13052
13060
|
orders_count: defer(() => account.order_count),
|
|
13053
13061
|
payment_methods: [],
|
|
@@ -16241,18 +16249,11 @@ function bind58(_liquidSwell) {
|
|
|
16241
16249
|
}
|
|
16242
16250
|
|
|
16243
16251
|
// src/liquid/filters/shopify/img_url.ts
|
|
16244
|
-
function bind59(
|
|
16245
|
-
return function filterImgUrl(input, ...params) {
|
|
16246
|
-
|
|
16247
|
-
|
|
16248
|
-
|
|
16249
|
-
if (input.url) {
|
|
16250
|
-
url = input.url;
|
|
16251
|
-
} else {
|
|
16252
|
-
return "";
|
|
16253
|
-
}
|
|
16254
|
-
} else {
|
|
16255
|
-
url = String(input);
|
|
16252
|
+
function bind59(liquidSwell) {
|
|
16253
|
+
return async function filterImgUrl(input, ...params) {
|
|
16254
|
+
const url = await getImageUrlFromInput(input, liquidSwell);
|
|
16255
|
+
if (typeof url !== "string" || url === "") {
|
|
16256
|
+
return "";
|
|
16256
16257
|
}
|
|
16257
16258
|
const query = [];
|
|
16258
16259
|
params.forEach((param) => {
|
|
@@ -20051,6 +20052,7 @@ export {
|
|
|
20051
20052
|
scopeCustomCSS,
|
|
20052
20053
|
stringifyQueryParams,
|
|
20053
20054
|
systemFonts,
|
|
20054
|
-
toBase64
|
|
20055
|
+
toBase64,
|
|
20056
|
+
toBlockId
|
|
20055
20057
|
};
|
|
20056
20058
|
//# sourceMappingURL=index.mjs.map
|