@useinsider/guido 2.0.0-beta.18d5b06 → 2.0.0-beta.1acfbd1
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/AmpErrorModal.vue.js +3 -3
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +1 -1
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +7 -6
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +9 -4
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +9 -9
- package/dist/components/organisms/header/EditorActions.vue.js +5 -4
- package/dist/components/organisms/header/LeftSlot.vue.js +7 -7
- package/dist/components/organisms/header/LeftSlot.vue2.js +3 -3
- package/dist/composables/useActionsApi.js +33 -30
- package/dist/config/migrator/index.js +9 -8
- package/dist/config/migrator/itemsBlockMigrator.js +334 -0
- package/dist/extensions/Blocks/Items/block.js +36 -40
- package/dist/extensions/Blocks/Items/controls/button/link.js +22 -29
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +66 -46
- package/dist/extensions/Blocks/Items/controls/image/link.js +23 -30
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +19 -17
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +31 -29
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +44 -38
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +21 -19
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +29 -27
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +93 -0
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +146 -131
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +43 -45
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +4 -5
- package/dist/extensions/Blocks/Items/extension.js +11 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +58 -49
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +48 -59
- package/dist/extensions/Blocks/Items/settingsPanel.js +27 -26
- package/dist/extensions/Blocks/Items/store/items-block.js +11 -7
- package/dist/extensions/Blocks/Items/template.js +389 -141
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +176 -0
- package/dist/extensions/Blocks/Recommendation/control.js +1 -1
- package/dist/extensions/Blocks/common-control.js +26 -27
- package/dist/extensions/Blocks/controlFactories.js +55 -45
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +364 -285
- package/dist/package.json.js +1 -1
- package/dist/src/composables/useActionsApi.d.ts +1 -0
- package/dist/src/config/migrator/itemsBlockMigrator.d.ts +6 -0
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +9 -0
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +18 -0
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -4
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +24 -26
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +1 -2
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +22 -1
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +76 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +9 -10
- package/dist/static/styles/components/wide-panel.css.js +1 -1
- package/dist/utils/pairProductVariables.js +61 -58
- package/dist/utils/templatePreparation.js +17 -17
- package/package.json +3 -3
- package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
- package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -76
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
- package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
- package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
- package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
|
@@ -8,15 +8,15 @@ var n = function() {
|
|
|
8
8
|
}, "primary-action": t.handleFixInCodeEditor } }, [r("div", { staticClass: "d-f f-d-c" }, [r("div", { staticClass: "mb-3" }, [r("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [e._v(" " + e._s(t.errorCountText) + " ")])]), r("div", { staticClass: "d-f f-d-c g-13 error-list" }, e._l(t.previewStore.ampErrors, function(o, s) {
|
|
9
9
|
return r(t.InOnPageMessage, { key: s, attrs: { icon: "filled-error-box", size: "small", type: "alert", text: o } });
|
|
10
10
|
}), 1)])]);
|
|
11
|
-
}, l = [],
|
|
11
|
+
}, l = [], d = /* @__PURE__ */ a(
|
|
12
12
|
i,
|
|
13
13
|
n,
|
|
14
14
|
l,
|
|
15
15
|
!1,
|
|
16
16
|
null,
|
|
17
|
-
"
|
|
17
|
+
"c3fd5d4b"
|
|
18
18
|
);
|
|
19
|
-
const _ =
|
|
19
|
+
const _ = d.exports;
|
|
20
20
|
export {
|
|
21
21
|
_ as default
|
|
22
22
|
};
|
|
@@ -25,7 +25,7 @@ const O = /* @__PURE__ */ m({
|
|
|
25
25
|
}, s = o(
|
|
26
26
|
"email-editor.amp-validation-description",
|
|
27
27
|
{ academyLink: M.AMP_FOR_EMAILS }
|
|
28
|
-
), p = d(() => `${o("products.errors")}(${i.ampErrors.length})`);
|
|
28
|
+
), p = d(() => `${o("products.errors")} (${i.ampErrors.length})`);
|
|
29
29
|
return { __sfc: !0, emit: e, trans: o, closePreviewMode: r, openCodeEditor: t, previewStore: i, footerButtonOptions: n, handleFixInCodeEditor: a, ampValidationDescription: s, errorCountText: p, WpModal: l, InOnPageMessage: E };
|
|
30
30
|
}
|
|
31
31
|
});
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import o from "./AmpToggle.vue2.js";
|
|
2
|
+
/* empty css */
|
|
2
3
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
4
|
+
var i = function() {
|
|
4
5
|
var r = this, t = r._self._c, e = r._self._setupProxy;
|
|
5
6
|
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "with-icon": "", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__amp-error-button", "left-icon": "filled-amp", type: "danger", "label-text": e.trans("email-editor.check-amp-errors", { count: e.previewStore.ampErrors.length }) }, on: { click: function(m) {
|
|
6
7
|
return e.previewStore.openErrorModal();
|
|
7
8
|
} } }) : r._e()], 1)]);
|
|
8
|
-
},
|
|
9
|
+
}, a = [], s = /* @__PURE__ */ n(
|
|
9
10
|
o,
|
|
10
|
-
a,
|
|
11
11
|
i,
|
|
12
|
+
a,
|
|
12
13
|
!1,
|
|
13
14
|
null,
|
|
14
|
-
|
|
15
|
+
"22226124"
|
|
15
16
|
);
|
|
16
|
-
const
|
|
17
|
+
const d = s.exports;
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
d as default
|
|
19
20
|
};
|
|
@@ -3,16 +3,21 @@ import r from "./DesktopPreview.vue2.js";
|
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var a = function() {
|
|
5
5
|
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "desktop-preview-wrapper" }, [e("p", { staticClass: "f-s-1 f-w-600 l-h-1 t-t-u t-c-53 mb-6 l-s-5" }, [s._v(" " + s._s(t.trans("email-editor.desktop-preview")) + " ")]), e("div", { ref: "containerRef", staticClass: "desktop-preview d-f f-d-c o-h s-1" }, [e(t.DesktopBrowserHeader), e("div", { staticClass: "desktop-preview__content d-f f-g-1 o-h b-c-5 min-h-0" }, [e("div", { staticClass: "f-g-1 h-1 o-h b-c-4 min-w-0" }, [t.isContainerReady ? e("iframe", { staticClass: "desktop-preview__iframe d-b w-1 h-1 b-c-4 bor-s-n", attrs: { sandbox:
|
|
6
|
+
return e("div", { staticClass: "desktop-preview-wrapper" }, [e("p", { staticClass: "f-s-1 f-w-600 l-h-1 t-t-u t-c-53 mb-6 l-s-5" }, [s._v(" " + s._s(t.trans("email-editor.desktop-preview")) + " ")]), e("div", { ref: "containerRef", staticClass: "desktop-preview d-f f-d-c o-h s-1" }, [e(t.DesktopBrowserHeader), e("div", { staticClass: "desktop-preview__content d-f f-g-1 o-h b-c-5 min-h-0" }, [e("div", { staticClass: "f-g-1 h-1 o-h b-c-4 min-w-0" }, [t.isContainerReady ? e("iframe", { staticClass: "desktop-preview__iframe d-b w-1 h-1 b-c-4 bor-s-n", attrs: { sandbox: `
|
|
7
|
+
allow-same-origin
|
|
8
|
+
allow-popups
|
|
9
|
+
allow-forms
|
|
10
|
+
allow-scripts
|
|
11
|
+
allow-popups-to-escape-sandbox`, srcdoc: t.previewStore.previewHtml } }) : s._e()])])], 1)]);
|
|
7
12
|
}, i = [], p = /* @__PURE__ */ o(
|
|
8
13
|
r,
|
|
9
14
|
a,
|
|
10
15
|
i,
|
|
11
16
|
!1,
|
|
12
17
|
null,
|
|
13
|
-
"
|
|
18
|
+
"988f8da6"
|
|
14
19
|
);
|
|
15
|
-
const
|
|
20
|
+
const _ = p.exports;
|
|
16
21
|
export {
|
|
17
|
-
|
|
22
|
+
_ as default
|
|
18
23
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import e from "./ContentView.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var o = function() {
|
|
5
|
+
var t = this, s = t._self._c, a = t._self._setupProxy;
|
|
6
6
|
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) {
|
|
7
|
-
return
|
|
8
|
-
} } }, [s(
|
|
9
|
-
},
|
|
7
|
+
return t.$emit("back-to-inbox");
|
|
8
|
+
} } }, [s(a.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" }, [t._v(t._s(a.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(a.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(a.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("div", { staticClass: "iframe-wrapper f-g-1 o-h" }, [s("iframe", { ref: "iframeRef", staticClass: "iframe-scaled d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts allow-popups-to-escape-sandbox", srcdoc: a.previewStore.previewHtml }, on: { load: a.onLoad } })])]);
|
|
9
|
+
}, i = [], r = /* @__PURE__ */ n(
|
|
10
10
|
e,
|
|
11
|
+
o,
|
|
11
12
|
i,
|
|
12
|
-
r,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"e0424e99"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const d = r.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
d as default
|
|
20
20
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import l from "./EditorActions.vue2.js";
|
|
2
|
+
/* empty css */
|
|
2
3
|
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
4
|
var d = function() {
|
|
4
5
|
var s, i, n, a;
|
|
5
6
|
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
6
|
-
return o("div", { staticClass: "d-f" }, [t.isVersionHistoryButtonVisible ? o(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : e._e(), o(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = (s = t.config) == null ? void 0 : s.features) != null && i.saveAsTemplate ? o(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : e._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.testMessage ? o(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.testEmailClick } }) : e._e(), t.editorStore.isPreviewModeOpen ? e._e() : o(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(_) {
|
|
7
|
+
return o("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? o(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : e._e(), o(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = (s = t.config) == null ? void 0 : s.features) != null && i.saveAsTemplate ? o(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : e._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.testMessage ? o(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.testEmailClick } }) : e._e(), t.editorStore.isPreviewModeOpen ? e._e() : o(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(_) {
|
|
7
8
|
return t.handleSave(!1);
|
|
8
9
|
} } })], 1);
|
|
9
10
|
}, u = [], p = /* @__PURE__ */ r(
|
|
@@ -12,9 +13,9 @@ var d = function() {
|
|
|
12
13
|
u,
|
|
13
14
|
!1,
|
|
14
15
|
null,
|
|
15
|
-
|
|
16
|
+
"17dd4d8b"
|
|
16
17
|
);
|
|
17
|
-
const
|
|
18
|
+
const v = p.exports;
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
v as default
|
|
20
21
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import n from "./LeftSlot.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var r = function() {
|
|
5
|
-
var e = this,
|
|
6
|
-
return
|
|
7
|
-
},
|
|
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, { attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "ghost", type: "secondary", "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } })], 1);
|
|
7
|
+
}, a = [], i = /* @__PURE__ */ s(
|
|
8
8
|
n,
|
|
9
9
|
r,
|
|
10
|
-
|
|
10
|
+
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"c722b9f4"
|
|
14
14
|
);
|
|
15
|
-
const d =
|
|
15
|
+
const d = i.exports;
|
|
16
16
|
export {
|
|
17
17
|
d as default
|
|
18
18
|
};
|
|
@@ -6,7 +6,7 @@ import { useTranslations as d } from "../../../composables/useTranslations.js";
|
|
|
6
6
|
import { useVersionHistoryApi as k } from "../../../composables/useVersionHistoryApi.js";
|
|
7
7
|
import { useEditorStore as b } from "../../../stores/editor.js";
|
|
8
8
|
import { InButtonV2 as B } from "@useinsider/design-system-vue";
|
|
9
|
-
const
|
|
9
|
+
const O = /* @__PURE__ */ u({
|
|
10
10
|
__name: "LeftSlot",
|
|
11
11
|
setup(_) {
|
|
12
12
|
const e = b(), r = p(), { closeVersionHistory: i } = k(), { closePreviewMode: n } = l(), o = d(), { config: t } = f(), c = m(() => {
|
|
@@ -22,10 +22,10 @@ const P = /* @__PURE__ */ u({
|
|
|
22
22
|
n();
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
r();
|
|
25
|
+
e.loadingStatus = !0, r();
|
|
26
26
|
}, InButtonV2: B };
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
O as default
|
|
31
31
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useToaster as w } from "./useToaster.js";
|
|
2
|
-
const
|
|
3
|
-
const { handleError: l } = w(),
|
|
4
|
-
const
|
|
2
|
+
const v = () => {
|
|
3
|
+
const { handleError: l } = w(), r = (t = {}) => new Promise((e, a) => {
|
|
4
|
+
const o = { ...{
|
|
5
5
|
minimize: !0,
|
|
6
6
|
utmEntity: {
|
|
7
7
|
utmSource: "",
|
|
@@ -20,29 +20,29 @@ const S = () => {
|
|
|
20
20
|
forceAmp: !1,
|
|
21
21
|
resetDataSavedFlag: !1,
|
|
22
22
|
disableLineHeightsReplace: !0
|
|
23
|
-
}, ...t },
|
|
24
|
-
callback: (
|
|
25
|
-
|
|
23
|
+
}, ...t }, s = {
|
|
24
|
+
callback: (n, p, d, c, u) => {
|
|
25
|
+
n ? a(n) : e({
|
|
26
26
|
html: p,
|
|
27
27
|
ampHtml: d,
|
|
28
28
|
ampErrors: c,
|
|
29
29
|
displayConditions: u
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
|
-
...
|
|
32
|
+
...o
|
|
33
33
|
};
|
|
34
|
-
window.StripoEditorApi.actionsApi.compileEmail(
|
|
34
|
+
window.StripoEditorApi.actionsApi.compileEmail(s);
|
|
35
35
|
});
|
|
36
36
|
return {
|
|
37
|
-
getCompiledEmail:
|
|
37
|
+
getCompiledEmail: r,
|
|
38
38
|
getTemplateData: () => new Promise((t) => {
|
|
39
|
-
const e = ({ html:
|
|
40
|
-
html:
|
|
41
|
-
css:
|
|
42
|
-
width:
|
|
43
|
-
height:
|
|
44
|
-
utmParams:
|
|
45
|
-
syncModulesIds:
|
|
39
|
+
const e = ({ html: a, css: i, width: o, height: m, utmParams: s, syncModulesIds: n }) => t({
|
|
40
|
+
html: a,
|
|
41
|
+
css: i,
|
|
42
|
+
width: o,
|
|
43
|
+
height: m,
|
|
44
|
+
utmParams: s,
|
|
45
|
+
syncModulesIds: n
|
|
46
46
|
});
|
|
47
47
|
window.StripoEditorApi.actionsApi.getTemplateData(e);
|
|
48
48
|
}),
|
|
@@ -53,15 +53,15 @@ const S = () => {
|
|
|
53
53
|
try {
|
|
54
54
|
const {
|
|
55
55
|
html: e,
|
|
56
|
-
displayConditions:
|
|
57
|
-
ampHtml:
|
|
58
|
-
ampErrors:
|
|
59
|
-
} = await
|
|
56
|
+
displayConditions: a,
|
|
57
|
+
ampHtml: i = "",
|
|
58
|
+
ampErrors: o = []
|
|
59
|
+
} = await r({ minimize: !1, resetDataSavedFlag: !1, ...t });
|
|
60
60
|
return {
|
|
61
61
|
html: e,
|
|
62
|
-
ampHtml:
|
|
63
|
-
ampErrors:
|
|
64
|
-
displayConditions:
|
|
62
|
+
ampHtml: i,
|
|
63
|
+
ampErrors: o,
|
|
64
|
+
displayConditions: a
|
|
65
65
|
};
|
|
66
66
|
} catch (e) {
|
|
67
67
|
return l(e, "Error loading preview"), {
|
|
@@ -73,24 +73,27 @@ const S = () => {
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
updateTimerInClonedTemplate: () => new Promise((t) => {
|
|
76
|
-
var e,
|
|
77
|
-
if (typeof ((
|
|
76
|
+
var e, a;
|
|
77
|
+
if (typeof ((a = (e = window.StripoEditorApi) == null ? void 0 : e.actionsApi) == null ? void 0 : a.updateTimerInClonedTemplate) != "function") {
|
|
78
78
|
t(null);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
try {
|
|
82
|
-
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((
|
|
83
|
-
|
|
82
|
+
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((i, o) => {
|
|
83
|
+
i ? (l(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
|
|
84
84
|
});
|
|
85
|
-
} catch (
|
|
86
|
-
l(
|
|
85
|
+
} catch (i) {
|
|
86
|
+
l(i, "Failed to call updateTimerInClonedTemplate"), t(null);
|
|
87
87
|
}
|
|
88
88
|
}),
|
|
89
89
|
updateHtmlAndCss: (t, e) => {
|
|
90
90
|
window.StripoEditorApi.actionsApi.updateHtmlAndCss(t, e);
|
|
91
|
+
},
|
|
92
|
+
editorSave: () => {
|
|
93
|
+
window.StripoEditorApi.actionsApi.save();
|
|
91
94
|
}
|
|
92
95
|
};
|
|
93
96
|
};
|
|
94
97
|
export {
|
|
95
|
-
|
|
98
|
+
v as useActionsApi
|
|
96
99
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { migrateCheckbox as
|
|
1
|
+
import { migrateCheckbox as t } from "./checkboxMigrator.js";
|
|
2
2
|
import { migrateCouponBlock as o } from "./couponBlockMigrator.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { migrateItemsBlock as i } from "./itemsBlockMigrator.js";
|
|
4
|
+
import { migrateRadioButton as e } from "./radioButtonMigrator.js";
|
|
5
|
+
import { migrateRecommendation as a } from "./recommendationMigrator.js";
|
|
6
|
+
import { migrateUnsubscribe as g } from "./unsubscribeMigrator.js";
|
|
7
|
+
const u = async (r) => {
|
|
8
|
+
let m = r;
|
|
9
|
+
return m = t(m), m = e(m), m = await g(m), m = o(m), m = a(m), m = i(m), m;
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
u as migrate
|
|
12
13
|
};
|