@useinsider/guido 3.1.1-beta.57fcdc6 → 3.1.1-beta.58e1771
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/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +1 -1
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +17 -16
- package/dist/extensions/Blocks/Recommendation/block.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +27 -11
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +185 -172
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +95 -93
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +75 -73
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +7 -5
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +30 -29
- package/dist/extensions/Blocks/Recommendation/templates/index.js +7 -7
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +3 -1
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +20 -20
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +57 -50
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +6 -6
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +16 -17
- package/dist/guido.css +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +20 -3
- package/package.json +1 -1
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as u, ref as a, computed as p, watch as _ } from "vue";
|
|
2
|
+
import { useActionsApi as f } from "../../../../composables/useActionsApi.js";
|
|
3
|
+
import { useTranslations as v } from "../../../../composables/useTranslations.js";
|
|
4
|
+
import { usePreviewStore as d } from "../../../../stores/preview.js";
|
|
5
|
+
import { InTooltipV2 as h, InProgress as g } from "@useinsider/design-system-vue";
|
|
6
|
+
const B = /* @__PURE__ */ u({
|
|
6
7
|
__name: "EmailSizeIndicator",
|
|
7
8
|
setup(w) {
|
|
8
|
-
const
|
|
9
|
+
const o = d(), { getCompiledEmail: s } = f(), t = 102, e = a(0), r = a({
|
|
9
10
|
type: "success",
|
|
10
11
|
value: 0
|
|
11
|
-
}),
|
|
12
|
-
const
|
|
13
|
-
e.value = Math.round(
|
|
14
|
-
type: e.value <
|
|
15
|
-
value: Math.min(e.value,
|
|
12
|
+
}), i = p(() => `~${e.value} KB`), n = async () => {
|
|
13
|
+
const { html: c } = await s({ minimize: !0, resetDataSavedFlag: !1 }), l = new TextEncoder().encode(c).byteLength;
|
|
14
|
+
e.value = Math.round(l / 1024), r.value = {
|
|
15
|
+
type: e.value < t ? "success" : "warning",
|
|
16
|
+
value: Math.min(e.value, t)
|
|
16
17
|
};
|
|
17
|
-
},
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
}, { immediate: !0 }), { __sfc: !0, previewStore:
|
|
18
|
+
}, m = v();
|
|
19
|
+
return _(() => o.previewHtml, () => {
|
|
20
|
+
n();
|
|
21
|
+
}, { immediate: !0 }), { __sfc: !0, previewStore: o, getCompiledEmail: s, MAX_EMAIL_SIZE_IN_KB: t, htmlKB: e, progress: r, htmlSize: i, calculateProgress: n, trans: m, InProgress: g, InTooltipV2: h };
|
|
21
22
|
}
|
|
22
23
|
});
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
B as default
|
|
25
26
|
};
|
|
@@ -169,7 +169,7 @@ class q extends b {
|
|
|
169
169
|
if (e && e.includes(a))
|
|
170
170
|
return t;
|
|
171
171
|
}
|
|
172
|
-
return "querySelector" in t ? t.querySelector(`.${a}`) : null;
|
|
172
|
+
return "querySelector" in t ? t.querySelector(`.${a}`) ?? null : null;
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
175
|
* Migrate configuration from legacy format
|
|
@@ -1,26 +1,42 @@
|
|
|
1
|
-
const T = ".recommendation-block-v2", c = ".ins-recommendation-product-container", o = ".ins-recommendation-desktop-container",
|
|
1
|
+
const T = ".recommendation-block-v2", c = ".ins-recommendation-product-container", o = ".ins-recommendation-desktop-container", n = ".ins-recommendation-mobile-container", t = ".ins-recommendation-mobile-row", r = {
|
|
2
2
|
CURRENCY: "currency",
|
|
3
3
|
SYMBOL: "currency-symbol",
|
|
4
4
|
ALIGNMENT: "currency-alignment",
|
|
5
5
|
THOUSAND_SEPARATOR: "currency-thousand-separator",
|
|
6
6
|
DECIMAL_SEPARATOR: "currency-decimal-separator",
|
|
7
7
|
DECIMAL_COUNT: "currency-decimal-count"
|
|
8
|
-
},
|
|
8
|
+
}, R = "productImage", _ = "productName", e = "productPrice", O = "productOldPrice", s = "productOmnibusPrice", i = "productOmnibusDiscount", E = "productButton", A = "customAttr:", C = "data-custom-attributes", u = "product-attr", m = /* @__PURE__ */ new Set([
|
|
9
|
+
"name",
|
|
10
|
+
// productName
|
|
11
|
+
"price",
|
|
12
|
+
// productPrice
|
|
13
|
+
"original_price",
|
|
14
|
+
// productOldPrice
|
|
15
|
+
"image_url",
|
|
16
|
+
// productImage
|
|
17
|
+
"url",
|
|
18
|
+
// productButton
|
|
19
|
+
"omnibus_price",
|
|
20
|
+
// productOmnibusPrice
|
|
21
|
+
"omnibus_discount"
|
|
22
|
+
// productOmnibusDiscount
|
|
23
|
+
]);
|
|
9
24
|
export {
|
|
10
25
|
A as ATTR_CUSTOM_PREFIX,
|
|
11
|
-
|
|
26
|
+
C as ATTR_DATA_CUSTOM_ATTRIBUTES,
|
|
12
27
|
u as ATTR_PRODUCT_ATTR,
|
|
13
28
|
E as ATTR_PRODUCT_BUTTON,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
29
|
+
R as ATTR_PRODUCT_IMAGE,
|
|
30
|
+
_ as ATTR_PRODUCT_NAME,
|
|
31
|
+
O as ATTR_PRODUCT_OLD_PRICE,
|
|
32
|
+
i as ATTR_PRODUCT_OMNIBUS_DISCOUNT,
|
|
18
33
|
s as ATTR_PRODUCT_OMNIBUS_PRICE,
|
|
19
|
-
|
|
34
|
+
e as ATTR_PRODUCT_PRICE,
|
|
20
35
|
T as BLOCK_ROOT_SELECTOR,
|
|
36
|
+
m as BUILT_IN_DEFAULT_ATTRIBUTES,
|
|
21
37
|
c as CONTAINER_SELECTOR,
|
|
22
|
-
|
|
38
|
+
r as CURRENCY_ATTR,
|
|
23
39
|
o as DESKTOP_CONTAINER_SELECTOR,
|
|
24
|
-
|
|
25
|
-
|
|
40
|
+
n as MOBILE_CONTAINER_SELECTOR,
|
|
41
|
+
t as MOBILE_ROW_SELECTOR
|
|
26
42
|
};
|