@useinsider/guido 2.0.0-beta.faa7c5d → 2.0.0-beta.fb0f99d
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/amp/AmpToggle.vue.js +2 -2
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +2 -2
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue.js +12 -12
- package/dist/components/organisms/header/LeftSlot.vue2.js +6 -6
- package/dist/config/migrator/index.js +8 -9
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/extensions/Blocks/Items/block.js +40 -39
- package/dist/extensions/Blocks/Items/controls/button/link.js +29 -22
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +59 -70
- package/dist/extensions/Blocks/Items/controls/image/link.js +30 -23
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +17 -19
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +29 -31
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +36 -36
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +19 -21
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +27 -29
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +143 -152
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +45 -43
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +3 -4
- package/dist/extensions/Blocks/Items/extension.js +6 -7
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +49 -58
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +59 -48
- package/dist/extensions/Blocks/Items/settingsPanel.js +26 -27
- package/dist/extensions/Blocks/Items/store/items-block.js +7 -11
- package/dist/extensions/Blocks/Items/template.js +129 -366
- package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +17 -0
- package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +28 -0
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +76 -0
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +46 -0
- package/dist/extensions/Blocks/Recommendation/block.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +12 -0
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +11 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +80 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +232 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +104 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +86 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +134 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +54 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +134 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +124 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +60 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +114 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +76 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +204 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +40 -43
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +5 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +128 -72
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +29 -26
- package/dist/extensions/Blocks/Recommendation/templates/horizontal/elementRenderer.js +157 -0
- package/dist/extensions/Blocks/Recommendation/templates/horizontal/template.js +72 -0
- package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +173 -0
- package/dist/extensions/Blocks/Recommendation/templates/vertical/elementRenderer.js +186 -0
- package/dist/extensions/Blocks/Recommendation/templates/vertical/migration.js +251 -0
- package/dist/extensions/Blocks/Recommendation/templates/vertical/template.js +62 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +36 -0
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +46 -0
- package/dist/extensions/Blocks/common-control.js +28 -28
- package/dist/extensions/Blocks/controlFactories.js +130 -106
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +116 -125
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -9
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +4 -0
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +26 -24
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/template.d.ts +1 -22
- package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +23 -0
- package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +32 -0
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +50 -0
- package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +19 -11
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +12 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +27 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +31 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +24 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +17 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +22 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +43 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +40 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +81 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +72 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +17 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/elementRenderer.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/migration.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/template.d.ts +18 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +39 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +45 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/vertical/elementRenderer.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → vertical/migration.d.ts} +11 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/vertical/template.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +77 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +11 -10
- package/dist/static/styles/components/wide-panel.css.js +0 -4
- package/dist/static/styles/customEditorStyle.css.js +38 -2
- package/dist/utils/pairProductVariables.js +58 -61
- package/package.json +1 -1
- package/dist/config/migrator/itemsBlockMigrator.js +0 -342
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +0 -93
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +0 -184
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -103
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -5
- package/dist/extensions/Blocks/Recommendation/control.js +0 -306
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -160
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -152
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -180
- package/dist/src/config/migrator/itemsBlockMigrator.d.ts +0 -6
- package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +0 -18
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +0 -73
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -28
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -44
|
@@ -3,7 +3,7 @@ import o from "./AmpToggle.vue2.js";
|
|
|
3
3
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
5
|
var r = this, t = r._self._c, e = r._self._setupProxy;
|
|
6
|
-
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-
|
|
6
|
+
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-3 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(l) {
|
|
7
7
|
return e.previewStore.openErrorModal();
|
|
8
8
|
} } }) : r._e()], 1)]);
|
|
9
9
|
}, a = [], i = /* @__PURE__ */ n(
|
|
@@ -12,7 +12,7 @@ var s = function() {
|
|
|
12
12
|
a,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"5196584c"
|
|
16
16
|
);
|
|
17
17
|
const d = i.exports;
|
|
18
18
|
export {
|
|
@@ -7,14 +7,14 @@ var s = function() {
|
|
|
7
7
|
return [t(e.EmailHeaderInfo)];
|
|
8
8
|
}, proxy: !0 }, { key: "headerRightSlot", fn: function() {
|
|
9
9
|
return [t(e.EmailSizeIndicator)];
|
|
10
|
-
}, proxy: !0 }]) }, [e.isContainerReady ? t("iframe", { staticClass: "email-iframe w-1 bor-w-0", style: { height: e.iframeHeight }, attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts
|
|
10
|
+
}, proxy: !0 }]) }, [e.isContainerReady ? t("iframe", { staticClass: "email-iframe w-1 bor-w-0", style: { height: e.iframeHeight }, attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: e.previewStore.previewHtml } }) : r._e()])], 1);
|
|
11
11
|
}, i = [], n = /* @__PURE__ */ a(
|
|
12
12
|
o,
|
|
13
13
|
s,
|
|
14
14
|
i,
|
|
15
15
|
!1,
|
|
16
16
|
null,
|
|
17
|
-
"
|
|
17
|
+
"2dd60b0c"
|
|
18
18
|
);
|
|
19
19
|
const d = n.exports;
|
|
20
20
|
export {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import n from "./ContentView.vue2.js";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
3
|
+
var c = function() {
|
|
4
4
|
var a = this, s = a._self._c, t = a._self._setupProxy;
|
|
5
5
|
return s("div", { staticClass: "w-1 h-1 b-c-4 d-f f-d-c" }, [s("div", { staticClass: "d-f j-c-s-b a-i-c p-2 h-6-s" }, [s("div", { staticClass: "d-f a-i-c cur-p", on: { click: function(l) {
|
|
6
6
|
return a.$emit("back-to-inbox");
|
|
7
|
-
} } }, [s(t.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [a._v(a._s(t.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(t.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(t.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("iframe", { ref: "iframeRef", staticClass: "f-g-1 w-1 d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts
|
|
8
|
-
},
|
|
7
|
+
} } }, [s(t.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [a._v(a._s(t.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(t.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(t.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("iframe", { ref: "iframeRef", staticClass: "f-g-1 w-1 d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: t.previewStore.previewHtml }, on: { load: t.onLoad } })]);
|
|
8
|
+
}, i = [], o = /* @__PURE__ */ e(
|
|
9
9
|
n,
|
|
10
|
-
o,
|
|
11
10
|
c,
|
|
11
|
+
i,
|
|
12
12
|
!1,
|
|
13
13
|
null,
|
|
14
14
|
null
|
|
15
15
|
);
|
|
16
|
-
const d =
|
|
16
|
+
const d = o.exports;
|
|
17
17
|
export {
|
|
18
18
|
d as default
|
|
19
19
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from "./LeftSlot.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var e = this,
|
|
6
|
-
return
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return o("div", { staticClass: "d-f a-i-c" }, [o(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "text", type: "secondary", "label-text": t.backButtonLabel }, on: { click: t.handleBackClick } }), t.editorStore.isVersionHistoryOpen ? o(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
|
|
7
|
+
}, a = [], i = /* @__PURE__ */ r(
|
|
8
|
+
s,
|
|
9
|
+
n,
|
|
10
|
+
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"06e6f7a7"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const p = i.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
p as default
|
|
18
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as u, computed as m } from "vue";
|
|
2
2
|
import { useConfig as f } from "../../../composables/useConfig.js";
|
|
3
3
|
import { useBack as p } from "../../../composables/useGuidoActions.js";
|
|
4
4
|
import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
|
|
@@ -7,14 +7,14 @@ import { useVersionHistoryApi as k } from "../../../composables/useVersionHistor
|
|
|
7
7
|
import { useEditorStore as B } from "../../../stores/editor.js";
|
|
8
8
|
import { InButtonV2 as b } from "@useinsider/design-system-vue";
|
|
9
9
|
import _ from "./version-history/RestoreButton.vue.js";
|
|
10
|
-
const
|
|
10
|
+
const h = /* @__PURE__ */ u({
|
|
11
11
|
__name: "LeftSlot",
|
|
12
12
|
setup(v) {
|
|
13
|
-
const o = B(), r = p(), { closeVersionHistory: i } = k(), { closePreviewMode: n } = l(), e = d(), { config: t } = f(),
|
|
13
|
+
const o = B(), r = p(), { closeVersionHistory: i } = k(), { closePreviewMode: n } = l(), e = d(), { config: t } = f(), c = m(() => {
|
|
14
14
|
var s, a;
|
|
15
15
|
return o.isVersionHistoryOpen || o.isPreviewModeOpen ? e("email-editor.back-to-editor") : (a = (s = t.value) == null ? void 0 : s.ui) != null && a.backButtonLabel ? t.value.ui.backButtonLabel : e("email-editor.back-to-design");
|
|
16
16
|
});
|
|
17
|
-
return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: e, config: t, backButtonLabel:
|
|
17
|
+
return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: e, config: t, backButtonLabel: c, handleBackClick: () => {
|
|
18
18
|
if (o.isVersionHistoryOpen) {
|
|
19
19
|
i();
|
|
20
20
|
return;
|
|
@@ -23,10 +23,10 @@ const S = /* @__PURE__ */ c({
|
|
|
23
23
|
n();
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
r();
|
|
27
27
|
}, InButtonV2: b, RestoreButton: _ };
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
h as default
|
|
32
32
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { migrateCheckbox as
|
|
1
|
+
import { migrateCheckbox as m } from "./checkboxMigrator.js";
|
|
2
2
|
import { migrateCouponBlock as o } from "./couponBlockMigrator.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return m = t(m), m = e(m), m = await g(m), m = o(m), m = a(m), m = i(m), m;
|
|
3
|
+
import { migrateRadioButton as i } from "./radioButtonMigrator.js";
|
|
4
|
+
import { migrateRecommendation as e } from "./recommendationMigrator.js";
|
|
5
|
+
import { migrateUnsubscribe as a } from "./unsubscribeMigrator.js";
|
|
6
|
+
const s = async (t) => {
|
|
7
|
+
let r = t;
|
|
8
|
+
return r = m(r), r = i(r), r = await a(r), r = o(r), r = e(r), r;
|
|
10
9
|
};
|
|
11
10
|
export {
|
|
12
|
-
|
|
11
|
+
s as migrate
|
|
13
12
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var h = Object.defineProperty;
|
|
2
2
|
var T = (A, e, t) => e in A ? h(A, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : A[e] = t;
|
|
3
3
|
var m = (A, e, t) => T(A, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import P, { prepareProductRows as S } from "../../extensions/Blocks/Recommendation/templates/
|
|
5
|
-
import { getDefaultProducts as q } from "../../extensions/Blocks/Recommendation/templates/
|
|
4
|
+
import P, { prepareProductRows as S } from "../../extensions/Blocks/Recommendation/templates/vertical/migration.js";
|
|
5
|
+
import { getDefaultProducts as q } from "../../extensions/Blocks/Recommendation/templates/utils.js";
|
|
6
6
|
class w {
|
|
7
7
|
constructor() {
|
|
8
8
|
m(this, "parser");
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { useOnboardingStore as
|
|
2
|
-
import { Block as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useItemsBlockStore as
|
|
6
|
-
import { getDefaultTemplate as
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
9
|
-
class
|
|
1
|
+
import { useOnboardingStore as y } from "../../../stores/onboarding.js";
|
|
2
|
+
import { Block as R, BlockCompositionType as L, ModificationDescription as a } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
3
|
+
import { configAttributes as t } from "./enums/productEnums.js";
|
|
4
|
+
import { DefaultConfigValues as e, SETTINGS_ENUMS as l } from "./enums/settingsEnums.js";
|
|
5
|
+
import { useItemsBlockStore as S } from "./store/items-block.js";
|
|
6
|
+
import { getDefaultTemplate as V } from "./template.js";
|
|
7
|
+
import { syncCurrencySymbolFromAttributes as B, syncCurrencyLocationFromAttributes as U, syncFormattedPriceFromAttributes as k } from "./utils/syncAttributesFromConfigBlock.js";
|
|
8
|
+
const M = "items-block";
|
|
9
|
+
class x extends R {
|
|
10
10
|
getId() {
|
|
11
|
-
return
|
|
11
|
+
return M;
|
|
12
12
|
}
|
|
13
13
|
getIcon() {
|
|
14
14
|
return "items-icon";
|
|
15
15
|
}
|
|
16
16
|
getBlockCompositionType() {
|
|
17
|
-
return
|
|
17
|
+
return L.CONTAINER;
|
|
18
18
|
}
|
|
19
19
|
getName() {
|
|
20
20
|
return this.api.translate("Items");
|
|
@@ -23,44 +23,45 @@ class O extends u {
|
|
|
23
23
|
return this.api.translate("Items lets you display personalized products based on user behavior.");
|
|
24
24
|
}
|
|
25
25
|
getTemplate() {
|
|
26
|
-
return
|
|
27
|
-
orientation:
|
|
28
|
-
itemsType:
|
|
26
|
+
return V({
|
|
27
|
+
orientation: l.ORIENTATION.HORIZONTAL,
|
|
28
|
+
itemsType: l.ITEMS_TYPE.CART_ITEMS,
|
|
29
29
|
itemId: "{{Abandoned Cart Item (1) Url}}",
|
|
30
|
-
currencySymbol:
|
|
31
|
-
currencyLocation:
|
|
32
|
-
formattedPrice:
|
|
30
|
+
currencySymbol: e.productPriceCurrencySymbolControlValue,
|
|
31
|
+
currencyLocation: e.productPriceCurrencyLocationControlValue,
|
|
32
|
+
formattedPrice: e.productPriceFormattedControlValue === "1"
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
allowInnerBlocksDND() {
|
|
36
36
|
return !1;
|
|
37
37
|
}
|
|
38
|
-
onCreated(
|
|
39
|
-
const
|
|
40
|
-
if (!
|
|
38
|
+
onCreated(r) {
|
|
39
|
+
const n = r.querySelector("esd-config-block");
|
|
40
|
+
if (!n)
|
|
41
41
|
return;
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
const o = n, s = o.getAttribute("data-initialized") || "0", u = o.getAttribute(t.BLOCK_INSTANCE_ID), c = () => String(Date.now() + Math.floor(Math.random() * 1e3));
|
|
43
|
+
if (Number(s)) {
|
|
44
|
+
if (!u) {
|
|
45
|
+
const i = c();
|
|
46
|
+
this.api.getDocumentModifier().modifyHtml(o).setAttribute(t.BLOCK_INSTANCE_ID, i).apply(new a("Assign block instance ID to legacy block"));
|
|
47
|
+
}
|
|
48
|
+
} else {
|
|
49
|
+
const i = e.itemsType, I = e.cartItemsSelectControlValue, d = e.cardOrientationControlValue, m = e.productNameTrimmingControlValue, C = e.productPriceHideDiscountControlValue, b = e.productPriceFormattedControlValue, T = e.productPriceCurrencySymbolControlValue, A = e.productPriceCurrencyLocationControlValue, E = e.productButtonLinkControlValue, O = e.productImageLinkControlValue, _ = e.productImageVisible, p = e.productNameVisible, N = e.productQuantityVisible, f = e.productPriceVisible, g = e.productOriginalPriceVisible, D = e.productButtonVisible, P = c();
|
|
50
|
+
this.api.getDocumentModifier().modifyHtml(o).setAttribute("data-source", i).setAttribute(t.TYPE, i).setAttribute(t.ITEMS_INDEX_SELECT_CONTROL_VALUE, I).setAttribute(t.ORIENTATION, d).setAttribute(t.PRODUCT_NAME_TRIMMING, m).setAttribute(t.PRODUCT_PRICE_HIDE_DISCOUNT, C).setAttribute(t.PRODUCT_PRICE_FORMATTED, b).setAttribute(t.PRODUCT_PRICE_CURRENCY_SYMBOL, T).setAttribute(t.PRODUCT_PRICE_CURRENCY_LOCATION, A).setAttribute(t.PRODUCT_BUTTON_LINK, E).setAttribute(t.PRODUCT_IMAGE_LINK, O).setAttribute(t.BLOCK_INSTANCE_ID, P).setAttribute("data-initialized", "1").setAttribute(t.NAME_CONTROL_ENABLED, e.productNameControlEnabled).setAttribute(
|
|
51
|
+
t.QUANTITY_CONTROL_ENABLED,
|
|
52
|
+
e.productQuantityControlEnabled
|
|
53
|
+
).setAttribute(t.PRICE_CONTROL_OPENED, e.productPriceControlOpened).setAttribute(t.PRODUCT_IMAGE_VISIBLE, _).setAttribute(t.PRODUCT_NAME_VISIBLE, p).setAttribute(t.PRODUCT_QUANTITY_VISIBLE, N).setAttribute(t.PRODUCT_PRICE_VISIBLE, f).setAttribute(t.PRODUCT_ORIGINAL_PRICE_VISIBLE, g).setAttribute(t.PRODUCT_BUTTON_VISIBLE, D).apply(new a("Initialize config block attributes with defaults")), y().startOnboarding("itemsOnboarding");
|
|
48
54
|
}
|
|
49
|
-
const s = `[esd-extension-block-id="${f.IMAGE}"] img`;
|
|
50
|
-
this.api.getDocumentModifier().modifyHtml(i.querySelector(s)).setStyle("object-fit", "contain").apply(new n("Updated image object-fit"));
|
|
51
55
|
}
|
|
52
|
-
onSelect(
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
), e.
|
|
57
|
-
|
|
58
|
-
), e.setFormattedPrice(
|
|
59
|
-
t.priceFormatted ?? o.productPriceFormattedControlValue === "1"
|
|
60
|
-
));
|
|
56
|
+
onSelect(r) {
|
|
57
|
+
const n = r.querySelector("esd-config-block"), o = S();
|
|
58
|
+
if (!n)
|
|
59
|
+
return;
|
|
60
|
+
const s = n, u = s.getAttribute(t.TYPE) || e.itemsType, c = s.getAttribute(t.ITEMS_INDEX_SELECT_CONTROL_VALUE) || e.cartItemsSelectControlValue, i = s.getAttribute(t.ORIENTATION) || e.cardOrientationControlValue;
|
|
61
|
+
o.setItemsType(u), o.setItemIds(c), o.setOrientation(i), B(r), U(r), k(r);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
M as BLOCK_ID,
|
|
66
|
+
x as ItemsBlock
|
|
66
67
|
};
|
|
@@ -1,52 +1,59 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var a = (o, e, t) => e in o ? r(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var s = (o, e, t) => a(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { CommonControl as u } from "../../../common-control.js";
|
|
5
5
|
import { ItemsBlockControlId as d } from "../../enums/controlEnums.js";
|
|
6
|
-
import { useItemsBlockStore as
|
|
7
|
-
import {
|
|
8
|
-
|
|
6
|
+
import { useItemsBlockStore as l } from "../../store/items-block.js";
|
|
7
|
+
import { syncButtonLinkFromAttributes as h } from "../../utils/syncAttributesFromConfigBlock.js";
|
|
8
|
+
import { updateConfigBlockAttributes as m } from "../../utils/updateAttributes.js";
|
|
9
|
+
const i = d.BUTTON_LINK, n = {
|
|
9
10
|
LINK: "link"
|
|
10
11
|
};
|
|
11
|
-
class
|
|
12
|
+
class C extends u {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
14
|
-
|
|
15
|
+
s(this, "store", l());
|
|
15
16
|
}
|
|
16
17
|
getId() {
|
|
17
|
-
return
|
|
18
|
+
return i;
|
|
18
19
|
}
|
|
19
20
|
getTemplate() {
|
|
20
21
|
return `
|
|
21
|
-
<div class="
|
|
22
|
+
<div class="${i}">
|
|
22
23
|
${this._getLink()}
|
|
23
24
|
</div>
|
|
24
25
|
`;
|
|
25
26
|
}
|
|
26
27
|
onRender() {
|
|
27
28
|
this.api.updateValues({
|
|
28
|
-
[
|
|
29
|
-
});
|
|
29
|
+
[n.LINK]: this.store.buttonLink
|
|
30
|
+
}), this._listenToFormUpdates();
|
|
30
31
|
}
|
|
31
|
-
onTemplateNodeUpdated(
|
|
32
|
-
super.onTemplateNodeUpdated(
|
|
33
|
-
() =>
|
|
34
|
-
const o = L(this.currentNode);
|
|
35
|
-
o != null && o.buttonLink && this.store.setButtonLink(o.buttonLink);
|
|
36
|
-
},
|
|
32
|
+
onTemplateNodeUpdated(t) {
|
|
33
|
+
super.onTemplateNodeUpdated(t), this.handleBlockInstanceChange(
|
|
34
|
+
() => h(this.currentNode),
|
|
37
35
|
() => {
|
|
38
36
|
this.api.updateValues({
|
|
39
|
-
[
|
|
37
|
+
[n.LINK]: this.store.buttonLink
|
|
40
38
|
});
|
|
41
39
|
}
|
|
42
40
|
);
|
|
43
41
|
}
|
|
42
|
+
_listenToFormUpdates() {
|
|
43
|
+
this.api.onValueChanged(
|
|
44
|
+
n.LINK,
|
|
45
|
+
(t) => this._onLinkChange(t)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
_onLinkChange(t) {
|
|
49
|
+
console.debug("Button link changed to: ", t), this.store.setButtonLink(t), m(this.currentNode, this.api);
|
|
50
|
+
}
|
|
44
51
|
_getLink() {
|
|
45
52
|
return `
|
|
46
53
|
${this._GuOneColumn([
|
|
47
54
|
this._GuLabel({ text: "Link" }),
|
|
48
55
|
this._GuTextInput({
|
|
49
|
-
name:
|
|
56
|
+
name: n.LINK,
|
|
50
57
|
placeholder: "Enter Link",
|
|
51
58
|
className: "es-100",
|
|
52
59
|
disabled: !0
|
|
@@ -56,6 +63,6 @@ class N extends u {
|
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
C as ButtonLinkControl,
|
|
67
|
+
i as CONTROL_BLOCK_ID
|
|
61
68
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var I = (a, n, t) => n in a ? c(a, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[n] = t;
|
|
3
|
+
var _ = (a, n, t) => I(a, typeof n != "symbol" ? n + "" : n, t);
|
|
4
4
|
import { ModificationDescription as l } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
-
import { CommonControl as
|
|
5
|
+
import { CommonControl as R } from "../../common-control.js";
|
|
6
6
|
import { ItemsBlockId as s } from "../enums/controlEnums.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
7
|
+
import { configAttributes as C } from "../enums/productEnums.js";
|
|
8
|
+
import { SETTINGS_ENUMS as u } from "../enums/settingsEnums.js";
|
|
9
|
+
import { useItemsBlockStore as O } from "../store/items-block.js";
|
|
10
|
+
import { getConfigBlock as P, attributeToBoolean as U } from "../utils/configBlockUtils.js";
|
|
11
|
+
const h = "ui-elements-items-card-composition-block", i = {
|
|
11
12
|
PRODUCT_IMAGE: "image",
|
|
12
13
|
PRODUCT_NAME: "name",
|
|
13
14
|
PRODUCT_QUANTITY: "quantity",
|
|
@@ -15,11 +16,11 @@ const b = "ui-elements-items-card-composition-block", i = {
|
|
|
15
16
|
PRODUCT_ORIGINAL_PRICE: "originalPrice",
|
|
16
17
|
PRODUCT_BUTTON: "button"
|
|
17
18
|
};
|
|
18
|
-
class
|
|
19
|
+
class g extends R {
|
|
19
20
|
constructor() {
|
|
20
21
|
super(...arguments);
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
_(this, "store", O());
|
|
23
|
+
_(this, "visibilityState", {
|
|
23
24
|
[i.PRODUCT_IMAGE]: !0,
|
|
24
25
|
[i.PRODUCT_NAME]: !0,
|
|
25
26
|
[i.PRODUCT_QUANTITY]: !0,
|
|
@@ -29,7 +30,7 @@ class S extends I {
|
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
getId() {
|
|
32
|
-
return
|
|
33
|
+
return h;
|
|
33
34
|
}
|
|
34
35
|
getTemplate() {
|
|
35
36
|
return `
|
|
@@ -82,20 +83,20 @@ class S extends I {
|
|
|
82
83
|
});
|
|
83
84
|
}
|
|
84
85
|
_syncVisibilityFromAttributes() {
|
|
85
|
-
const t =
|
|
86
|
+
const t = P(this.currentNode);
|
|
86
87
|
if (!t)
|
|
87
88
|
return;
|
|
88
89
|
const e = {
|
|
89
|
-
[i.PRODUCT_IMAGE]: "
|
|
90
|
-
[i.PRODUCT_NAME]: "
|
|
91
|
-
[i.PRODUCT_QUANTITY]: "
|
|
92
|
-
[i.PRODUCT_PRICE]: "
|
|
93
|
-
[i.PRODUCT_ORIGINAL_PRICE]: "
|
|
94
|
-
[i.PRODUCT_BUTTON]: "
|
|
90
|
+
[i.PRODUCT_IMAGE]: "PRODUCT_IMAGE_VISIBLE",
|
|
91
|
+
[i.PRODUCT_NAME]: "PRODUCT_NAME_VISIBLE",
|
|
92
|
+
[i.PRODUCT_QUANTITY]: "PRODUCT_QUANTITY_VISIBLE",
|
|
93
|
+
[i.PRODUCT_PRICE]: "PRODUCT_PRICE_VISIBLE",
|
|
94
|
+
[i.PRODUCT_ORIGINAL_PRICE]: "PRODUCT_ORIGINAL_PRICE_VISIBLE",
|
|
95
|
+
[i.PRODUCT_BUTTON]: "PRODUCT_BUTTON_VISIBLE"
|
|
95
96
|
};
|
|
96
|
-
Object.entries(e).forEach(([o,
|
|
97
|
-
const
|
|
98
|
-
this.visibilityState[o] =
|
|
97
|
+
Object.entries(e).forEach(([o, r]) => {
|
|
98
|
+
const T = t.getAttribute(C[r]);
|
|
99
|
+
this.visibilityState[o] = U(T, !0);
|
|
99
100
|
});
|
|
100
101
|
}
|
|
101
102
|
/**
|
|
@@ -104,10 +105,11 @@ class S extends I {
|
|
|
104
105
|
* and mark it as '0'
|
|
105
106
|
*/
|
|
106
107
|
_handleBrowsedItemsQuantity() {
|
|
107
|
-
|
|
108
|
+
var r;
|
|
109
|
+
const t = this.store.itemsType !== u.ITEMS_TYPE.BROWSED_ITEMS, e = (r = this.currentNode) == null ? void 0 : r.querySelector("esd-config-block");
|
|
108
110
|
if (!e)
|
|
109
111
|
return;
|
|
110
|
-
const o = e.
|
|
112
|
+
const o = e.getAttribute(C.PRODUCT_QUANTITY_VISIBLE) === "1";
|
|
111
113
|
this.visibilityState[i.PRODUCT_QUANTITY] = t && o, this.api.setVisibility(`${i.PRODUCT_QUANTITY}Container`, t), this._updateVisibilityAttribute(i.PRODUCT_QUANTITY, t && o);
|
|
112
114
|
}
|
|
113
115
|
_applyVisibilityStyles() {
|
|
@@ -121,31 +123,41 @@ class S extends I {
|
|
|
121
123
|
};
|
|
122
124
|
Object.entries(t).forEach(([e, o]) => {
|
|
123
125
|
var d;
|
|
124
|
-
const
|
|
125
|
-
if (!
|
|
126
|
+
const r = (d = this.currentNode) == null ? void 0 : d.querySelector(`[esd-extension-block-id="${o}"]`);
|
|
127
|
+
if (!r)
|
|
126
128
|
return;
|
|
127
|
-
const
|
|
128
|
-
this.api.getDocumentModifier().modifyHtml(
|
|
129
|
-
})
|
|
129
|
+
const T = this.visibilityState[e];
|
|
130
|
+
this.api.getDocumentModifier().modifyHtml(r).setStyle("display", T ? "table-cell" : "none").apply(new l(`Applied ${e} visibility from attributes`));
|
|
131
|
+
});
|
|
130
132
|
}
|
|
131
133
|
_updateVisibilityAttribute(t, e) {
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
[i.
|
|
137
|
-
[i.
|
|
138
|
-
[i.
|
|
134
|
+
const o = P(this.currentNode);
|
|
135
|
+
if (!o)
|
|
136
|
+
return;
|
|
137
|
+
const T = {
|
|
138
|
+
[i.PRODUCT_IMAGE]: "PRODUCT_IMAGE_VISIBLE",
|
|
139
|
+
[i.PRODUCT_NAME]: "PRODUCT_NAME_VISIBLE",
|
|
140
|
+
[i.PRODUCT_QUANTITY]: "PRODUCT_QUANTITY_VISIBLE",
|
|
141
|
+
[i.PRODUCT_PRICE]: "PRODUCT_PRICE_VISIBLE",
|
|
142
|
+
[i.PRODUCT_ORIGINAL_PRICE]: "PRODUCT_ORIGINAL_PRICE_VISIBLE",
|
|
143
|
+
[i.PRODUCT_BUTTON]: "PRODUCT_BUTTON_VISIBLE"
|
|
139
144
|
}[t];
|
|
140
|
-
|
|
141
|
-
[n]: e
|
|
142
|
-
});
|
|
145
|
+
T && this.api.getDocumentModifier().modifyHtml(o).setAttribute(C[T], e ? "1" : "0").apply(new l(`Updated ${t} visibility attribute`));
|
|
143
146
|
}
|
|
144
147
|
_listenToFormUpdates() {
|
|
145
|
-
this.api.onValueChanged(i.PRODUCT_IMAGE, (t) =>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
this.api.onValueChanged(i.PRODUCT_IMAGE, (t) => {
|
|
149
|
+
this._onProductImageChange(t);
|
|
150
|
+
}), this.api.onValueChanged(i.PRODUCT_NAME, (t) => {
|
|
151
|
+
this._onProductNameChange(t);
|
|
152
|
+
}), this.api.onValueChanged(i.PRODUCT_QUANTITY, (t) => {
|
|
153
|
+
this._onProductQuantityChange(t);
|
|
154
|
+
}), this.api.onValueChanged(i.PRODUCT_PRICE, (t) => {
|
|
155
|
+
this._onProductPriceChange(t);
|
|
156
|
+
}), this.api.onValueChanged(i.PRODUCT_ORIGINAL_PRICE, (t) => {
|
|
157
|
+
this._onProductOriginalPriceChange(t);
|
|
158
|
+
}), this.api.onValueChanged(i.PRODUCT_BUTTON, (t) => {
|
|
159
|
+
this._onProductButtonChange(t);
|
|
160
|
+
});
|
|
149
161
|
}
|
|
150
162
|
_onProductImageChange(t) {
|
|
151
163
|
var o;
|
|
@@ -167,7 +179,7 @@ class S extends I {
|
|
|
167
179
|
_onProductPriceChange(t) {
|
|
168
180
|
var o;
|
|
169
181
|
const e = (o = this.currentNode) == null ? void 0 : o.querySelector(`[esd-extension-block-id="${s.PRICE}"]`);
|
|
170
|
-
e && (this.visibilityState[i.PRODUCT_PRICE] = t, this.api.getDocumentModifier().modifyHtml(e).setStyle("display", t ? "table-cell" : "none").apply(new l(`Product price visibility changed to ${t ? "visible" : "hidden"}`)), this._updateVisibilityAttribute(i.PRODUCT_PRICE, t)
|
|
182
|
+
e && (this.visibilityState[i.PRODUCT_PRICE] = t, this.api.getDocumentModifier().modifyHtml(e).setStyle("display", t ? "table-cell" : "none").apply(new l(`Product price visibility changed to ${t ? "visible" : "hidden"}`)), this._updateVisibilityAttribute(i.PRODUCT_PRICE, t));
|
|
171
183
|
}
|
|
172
184
|
_onProductOriginalPriceChange(t) {
|
|
173
185
|
var o;
|
|
@@ -176,30 +188,7 @@ class S extends I {
|
|
|
176
188
|
);
|
|
177
189
|
e && (this.visibilityState[i.PRODUCT_ORIGINAL_PRICE] = t, this.api.getDocumentModifier().modifyHtml(e).setStyle("display", t ? "table-cell" : "none").apply(new l(
|
|
178
190
|
`Product original price visibility changed to ${t ? "visible" : "hidden"}`
|
|
179
|
-
)), this._updateVisibilityAttribute(i.PRODUCT_ORIGINAL_PRICE, t)
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Updates both price cell widths in vertical layout based on priceOrientation and visibility.
|
|
183
|
-
* - When priceOrientation is 'vertical': both cells are 100% (stacked layout)
|
|
184
|
-
* - When priceOrientation is 'horizontal':
|
|
185
|
-
* - When original price is hidden, price cell expands to 100%
|
|
186
|
-
* - When price is hidden, original price cell expands to 100%
|
|
187
|
-
* - When both are visible, they share 50% each
|
|
188
|
-
*/
|
|
189
|
-
_updatePriceCellWidthsForVerticalLayout() {
|
|
190
|
-
var u, _;
|
|
191
|
-
if (!(this.store.orientation === h.ORIENTATION.VERTICAL))
|
|
192
|
-
return;
|
|
193
|
-
const e = (u = this.currentNode) == null ? void 0 : u.querySelector(".product-price-class"), o = (_ = this.currentNode) == null ? void 0 : _.querySelector(".product-original-price-class"), n = this.store.priceOrientation === "vertical", c = this.visibilityState[i.PRODUCT_PRICE], d = this.visibilityState[i.PRODUCT_ORIGINAL_PRICE], T = this.api.getDocumentModifier();
|
|
194
|
-
if (e) {
|
|
195
|
-
const C = n || !d ? "100%" : "50%";
|
|
196
|
-
T.modifyHtml(e).setStyle("width", C);
|
|
197
|
-
}
|
|
198
|
-
if (o) {
|
|
199
|
-
const C = n || !c ? "100%" : "50%";
|
|
200
|
-
T.modifyHtml(o).setStyle("width", C);
|
|
201
|
-
}
|
|
202
|
-
T.apply(new l("Updated price cell widths for vertical layout"));
|
|
191
|
+
)), this._updateVisibilityAttribute(i.PRODUCT_ORIGINAL_PRICE, t));
|
|
203
192
|
}
|
|
204
193
|
_onProductButtonChange(t) {
|
|
205
194
|
var o;
|
|
@@ -208,6 +197,6 @@ class S extends I {
|
|
|
208
197
|
}
|
|
209
198
|
}
|
|
210
199
|
export {
|
|
211
|
-
|
|
212
|
-
|
|
200
|
+
h as COMPOSITION_CONTROL_BLOCK_ID,
|
|
201
|
+
g as ItemsBlockCardCompositionControl
|
|
213
202
|
};
|