@swell/apps-sdk 1.0.179 → 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 +16 -15
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +12 -13
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +14 -14
- 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) {
|
|
@@ -16243,18 +16249,11 @@ function bind58(_liquidSwell) {
|
|
|
16243
16249
|
}
|
|
16244
16250
|
|
|
16245
16251
|
// src/liquid/filters/shopify/img_url.ts
|
|
16246
|
-
function bind59(
|
|
16247
|
-
return function filterImgUrl(input, ...params) {
|
|
16248
|
-
|
|
16249
|
-
|
|
16250
|
-
|
|
16251
|
-
if (input.url) {
|
|
16252
|
-
url = input.url;
|
|
16253
|
-
} else {
|
|
16254
|
-
return "";
|
|
16255
|
-
}
|
|
16256
|
-
} else {
|
|
16257
|
-
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 "";
|
|
16258
16257
|
}
|
|
16259
16258
|
const query = [];
|
|
16260
16259
|
params.forEach((param) => {
|
|
@@ -20053,6 +20052,7 @@ export {
|
|
|
20053
20052
|
scopeCustomCSS,
|
|
20054
20053
|
stringifyQueryParams,
|
|
20055
20054
|
systemFonts,
|
|
20056
|
-
toBase64
|
|
20055
|
+
toBase64,
|
|
20056
|
+
toBlockId
|
|
20057
20057
|
};
|
|
20058
20058
|
//# sourceMappingURL=index.mjs.map
|