@useinsider/guido 2.0.0-beta.2d132c0 → 2.0.0-beta.435da98
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/@types/config/schemas.js +6 -4
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +57 -59
- package/dist/components/organisms/base/Toaster.vue.js +6 -6
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +6 -6
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
- package/dist/composables/useStripo.js +51 -50
- package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
- package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
- package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +153 -69
- package/dist/extensions/Blocks/Recommendation/constants.js +9 -1
- package/dist/extensions/Blocks/Recommendation/control.js +74 -59
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +68 -0
- package/dist/extensions/Blocks/Recommendation/controls/index.js +245 -0
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +74 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +188 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +16 -42
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +117 -72
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +85 -64
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +54 -17
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +74 -45
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +25 -0
- package/dist/extensions/Blocks/controlFactories.js +122 -111
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +14 -14
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +50 -3
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +32 -0
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +5 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +592 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacingControl.d.ts +60 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +15 -7
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +19 -0
- package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
- package/dist/src/stores/config.d.ts +17 -0
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/static/styles/components/wide-panel.css.js +0 -4
- package/dist/static/styles/customEditorStyle.css.js +13 -0
- package/package.json +1 -1
- 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/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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { object as o, number as p, optional as e, string as t, pipe as m, picklist as n, boolean as c, array as a, minLength as u, literal as r, custom as
|
|
1
|
+
import { object as o, number as p, optional as e, string as t, pipe as m, picklist as n, boolean as c, array as a, minLength as u, literal as r, custom as b, variant as S } from "../../node_modules/valibot/dist/index.js";
|
|
2
2
|
const i = {
|
|
3
3
|
/** Promotional/marketing emails */
|
|
4
4
|
PROMOTIONAL: 1,
|
|
@@ -103,7 +103,9 @@ const i = {
|
|
|
103
103
|
/** Enable display conditions */
|
|
104
104
|
displayConditions: e(c(), !0),
|
|
105
105
|
/** Enable unsubscribe block */
|
|
106
|
-
unsubscribe: e(c(), !0)
|
|
106
|
+
unsubscribe: e(c(), !0),
|
|
107
|
+
/** Disable modules panel in the editor */
|
|
108
|
+
modulesDisabled: e(c(), !1)
|
|
107
109
|
}), f = n([
|
|
108
110
|
"amp-accordion",
|
|
109
111
|
"amp-carousel",
|
|
@@ -171,8 +173,8 @@ const i = {
|
|
|
171
173
|
...l.entries,
|
|
172
174
|
type: r("custom"),
|
|
173
175
|
/** Custom processor function */
|
|
174
|
-
processor:
|
|
175
|
-
(
|
|
176
|
+
processor: b(
|
|
177
|
+
(d) => typeof d == "function",
|
|
176
178
|
"processor must be a function"
|
|
177
179
|
)
|
|
178
180
|
}), B = S("type", [
|
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { useTimerClone as
|
|
6
|
-
import { migrate as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useStripoApi as
|
|
14
|
-
import { useConfigStore as
|
|
15
|
-
import { useDynamicContentStore as
|
|
16
|
-
import { useEditorStore as
|
|
17
|
-
import { usePreviewStore as
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
const Pe = /* @__PURE__ */ q({
|
|
1
|
+
import { defineComponent as x, defineAsyncComponent as P, ref as B, computed as U, watch as N, onMounted as z, onUnmounted as K } from "vue";
|
|
2
|
+
import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as j } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as q } from "../composables/useStripo.js";
|
|
5
|
+
import { useTimerClone as J } from "../composables/useTimerClone.js";
|
|
6
|
+
import { migrate as W } from "../config/migrator/index.js";
|
|
7
|
+
import Q from "./organisms/base/Toaster.vue.js";
|
|
8
|
+
import V from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
9
|
+
import X from "./organisms/header/HeaderWrapper.vue.js";
|
|
10
|
+
import Y from "./organisms/LoadingWrapper.vue.js";
|
|
11
|
+
import Z from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
12
|
+
import $ from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
13
|
+
import { useStripoApi as ee } from "../services/stripoApi.js";
|
|
14
|
+
import { useConfigStore as oe } from "../stores/config.js";
|
|
15
|
+
import { useDynamicContentStore as te } from "../stores/dynamic-content.js";
|
|
16
|
+
import { useEditorStore as ne } from "../stores/editor.js";
|
|
17
|
+
import { usePreviewStore as re } from "../stores/preview.js";
|
|
18
|
+
import { useUnsubscribeStore as ce } from "../stores/unsubscribe.js";
|
|
19
|
+
const Ee = /* @__PURE__ */ x({
|
|
21
20
|
__name: "Guido",
|
|
22
21
|
props: {
|
|
23
22
|
config: null
|
|
24
23
|
},
|
|
25
24
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
25
|
+
setup(_, { expose: I, emit: t }) {
|
|
26
|
+
const l = _, L = P(
|
|
28
27
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
29
|
-
),
|
|
28
|
+
), A = P(
|
|
30
29
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
31
|
-
), p =
|
|
32
|
-
n.init(
|
|
33
|
-
const
|
|
30
|
+
), p = B(), s = te(), u = ce(), n = oe();
|
|
31
|
+
n.init(l.config);
|
|
32
|
+
const i = ne(), F = re(), r = U(() => i.hasChanges), { isTestPartner: G } = j(), v = () => {
|
|
34
33
|
var e;
|
|
35
34
|
return (e = p.value) == null ? void 0 : e.handleSave(!0);
|
|
36
|
-
}, { templateId:
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
emailId:
|
|
40
|
-
userId:
|
|
41
|
-
username:
|
|
42
|
-
partnerName:
|
|
43
|
-
productType:
|
|
44
|
-
preselectedDynamicContentList:
|
|
35
|
+
}, { templateId: a, userId: y, partnerName: h, productType: f, username: b, template: o } = n, c = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [];
|
|
36
|
+
i.templateId = a;
|
|
37
|
+
const { initPlugin: S } = q({
|
|
38
|
+
emailId: a,
|
|
39
|
+
userId: y,
|
|
40
|
+
username: b,
|
|
41
|
+
partnerName: h,
|
|
42
|
+
productType: f,
|
|
43
|
+
preselectedDynamicContentList: m,
|
|
45
44
|
onReady: () => {
|
|
46
45
|
console.debug("guido:ready"), t("ready");
|
|
47
46
|
}
|
|
48
|
-
}), { getDefaultTemplate:
|
|
47
|
+
}), { getDefaultTemplate: w } = ee(), { cloneTimersOnSave: C, hasTimerBlocks: D } = J(), H = U(() => {
|
|
49
48
|
var e;
|
|
50
49
|
return !((e = n.ui) != null && e.showHeader);
|
|
51
50
|
});
|
|
52
|
-
|
|
51
|
+
M({
|
|
53
52
|
onBack: () => {
|
|
54
53
|
console.debug("guido:back"), t("back");
|
|
55
54
|
},
|
|
@@ -63,52 +62,51 @@ const Pe = /* @__PURE__ */ q({
|
|
|
63
62
|
console.debug("guido:test-email:click"), t("test-email:click");
|
|
64
63
|
}
|
|
65
64
|
});
|
|
66
|
-
const
|
|
67
|
-
console.debug("dynamic-content:close", e),
|
|
68
|
-
},
|
|
65
|
+
const E = (e) => {
|
|
66
|
+
console.debug("dynamic-content:close", e), s.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
67
|
+
}, k = () => {
|
|
69
68
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
70
69
|
};
|
|
71
|
-
|
|
70
|
+
N(() => r.value, () => {
|
|
72
71
|
t("on-change", r.value);
|
|
73
72
|
});
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
console.debug("dynamic-content:open",
|
|
73
|
+
const d = (e) => {
|
|
74
|
+
const T = e, { attribute: O, position: R } = T.detail;
|
|
75
|
+
console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, R);
|
|
77
76
|
};
|
|
78
|
-
return
|
|
77
|
+
return z(async () => {
|
|
79
78
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
80
79
|
try {
|
|
81
|
-
|
|
80
|
+
u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
82
81
|
let e = {
|
|
83
|
-
html:
|
|
84
|
-
css:
|
|
82
|
+
html: c && await W(c),
|
|
83
|
+
css: g,
|
|
85
84
|
forceRecreate: !0
|
|
86
85
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
87
86
|
};
|
|
88
|
-
e.html || (e = await
|
|
87
|
+
e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e), s.selectedDynamicContentList = m;
|
|
89
88
|
} catch (e) {
|
|
90
89
|
console.error("Failed to initialize Stripo editor:", e);
|
|
91
90
|
}
|
|
92
|
-
document.addEventListener("dynamic-content:open",
|
|
93
|
-
}),
|
|
94
|
-
|
|
95
|
-
c.value && (f.hideToaster(), (e = document.querySelector("#guido__toaster")) == null || e.remove()), c.value = !1, document.removeEventListener("dynamic-content:open", l);
|
|
91
|
+
document.addEventListener("dynamic-content:open", d);
|
|
92
|
+
}), K(() => {
|
|
93
|
+
document.removeEventListener("dynamic-content:open", d);
|
|
96
94
|
try {
|
|
97
95
|
window.UIEditor.removeEditor();
|
|
98
96
|
} catch {
|
|
99
97
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
100
98
|
}
|
|
101
99
|
n.reset();
|
|
102
|
-
}),
|
|
100
|
+
}), I({
|
|
103
101
|
dynamicContent: {
|
|
104
|
-
insert:
|
|
105
|
-
close:
|
|
102
|
+
insert: E,
|
|
103
|
+
close: k
|
|
106
104
|
},
|
|
107
105
|
hasChanges: r,
|
|
108
|
-
saveSilent:
|
|
109
|
-
}), { __sfc: !0, PreviewContainer:
|
|
106
|
+
saveSilent: v
|
|
107
|
+
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore: s, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: F, hasChanges: r, isTestPartner: G, saveSilent: v, templateId: a, userId: y, partnerName: h, productType: f, username: b, templateConfig: o, html: c, css: g, preselectedDynamicContentList: m, emit: t, initPlugin: S, getDefaultTemplate: w, cloneTimersOnSave: C, hasTimerBlocks: D, noHeader: H, insertDynamicContent: E, closeDynamicContent: k, handleDynamicContentOpen: d, Toaster: Q, FilterSelectionDrawer: V, HeaderWrapper: X, LoadingWrapper: Y, SaveAsTemplateDrawer: Z, UnsubscribeWrapper: $ };
|
|
110
108
|
}
|
|
111
109
|
});
|
|
112
110
|
export {
|
|
113
|
-
|
|
111
|
+
Ee as default
|
|
114
112
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./Toaster.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var r = function() {
|
|
4
|
-
var o = this,
|
|
5
|
-
return
|
|
4
|
+
var o = this, n = o._self._c, t = o._self._setupProxy;
|
|
5
|
+
return n(t.InToasts, { attrs: { "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
|
|
6
6
|
}, a = [], _ = /* @__PURE__ */ s(
|
|
7
|
-
|
|
7
|
+
e,
|
|
8
8
|
r,
|
|
9
9
|
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const l = _.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
l as default
|
|
17
17
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import i from "./EmailSizeIndicator.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var o = function() {
|
|
5
5
|
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.
|
|
7
|
-
}, a = [], n = /* @__PURE__ */
|
|
6
|
+
return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: t.trans("email-editor.preview-design-size-tooltip") } })], 1);
|
|
7
|
+
}, a = [], n = /* @__PURE__ */ r(
|
|
8
8
|
i,
|
|
9
|
-
|
|
9
|
+
o,
|
|
10
10
|
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"c2adc57d"
|
|
14
14
|
);
|
|
15
15
|
const m = n.exports;
|
|
16
16
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as c, ref as n, computed as l, watch as u } from "vue";
|
|
2
2
|
import { useTranslations as p } from "../../../../composables/useTranslations.js";
|
|
3
3
|
import { usePreviewStore as _ } from "../../../../stores/preview.js";
|
|
4
|
-
import {
|
|
4
|
+
import { InTooltip as v, InProgress as f } from "@useinsider/design-system-vue";
|
|
5
5
|
const S = /* @__PURE__ */ c({
|
|
6
6
|
__name: "EmailSizeIndicator",
|
|
7
7
|
setup(w) {
|
|
@@ -17,7 +17,7 @@ const S = /* @__PURE__ */ c({
|
|
|
17
17
|
}, i = p();
|
|
18
18
|
return u(() => t.previewHtml, () => {
|
|
19
19
|
r();
|
|
20
|
-
}, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f,
|
|
20
|
+
}, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltip: v };
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
export {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import { useStripoEventHandler as
|
|
6
|
-
import { useToaster as
|
|
7
|
-
import { displayConditions as
|
|
8
|
-
import { useStripoApi as
|
|
9
|
-
import
|
|
10
|
-
import { useEditorStore as
|
|
11
|
-
import { dynamicContentToMergeTags as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
const { features:
|
|
15
|
-
var
|
|
16
|
-
const
|
|
1
|
+
import { useActionsApi as T } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as V } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as _ } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as B } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useStripoEventHandler as v } from "./useStripoEventHandler.js";
|
|
6
|
+
import { useToaster as A } from "./useToaster.js";
|
|
7
|
+
import { displayConditions as F } from "../enums/displayConditions.js";
|
|
8
|
+
import { useStripoApi as D } from "../services/stripoApi.js";
|
|
9
|
+
import I from "../static/styles/customEditorStyle.css.js";
|
|
10
|
+
import { useEditorStore as M } from "../stores/editor.js";
|
|
11
|
+
import { dynamicContentToMergeTags as U } from "../utils/genericUtil.js";
|
|
12
|
+
import P from "../package.json.js";
|
|
13
|
+
const K = (c) => {
|
|
14
|
+
const { features: l } = _(), { handleError: u } = A(), { getToken: y, getCustomFonts: S } = D(), { handleEvent: C } = v(), { getStripoBlocksConfig: E } = V(), h = async (i, n = []) => {
|
|
15
|
+
var g, f;
|
|
16
|
+
const o = M(), { html: r, css: p, forceRecreate: a } = i, { baseBlocks: t, extensions: d } = await E(), m = ((g = l.value) == null ? void 0 : g.displayConditions) ?? !0, b = ((f = l.value) == null ? void 0 : f.modulesDisabled) ?? !1;
|
|
17
17
|
window.UIEditor.initEditor(
|
|
18
18
|
document.querySelector("#guido-editor"),
|
|
19
19
|
{
|
|
20
20
|
metadata: c,
|
|
21
|
-
html:
|
|
22
|
-
css:
|
|
21
|
+
html: r,
|
|
22
|
+
css: p,
|
|
23
23
|
forceRecreate: a,
|
|
24
24
|
locale: "en",
|
|
25
25
|
undoButtonSelector: "#guido__undo-button",
|
|
@@ -30,11 +30,12 @@ const N = (c) => {
|
|
|
30
30
|
customAppearanceMergetags: !0,
|
|
31
31
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
32
32
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
33
|
-
customViewStyles:
|
|
34
|
-
conditionsEnabled:
|
|
35
|
-
customConditionsEnabled:
|
|
36
|
-
conditionCategories:
|
|
33
|
+
customViewStyles: I,
|
|
34
|
+
conditionsEnabled: m,
|
|
35
|
+
customConditionsEnabled: m,
|
|
36
|
+
conditionCategories: F,
|
|
37
37
|
enableXSSSecurity: !0,
|
|
38
|
+
modulesDisabled: b,
|
|
38
39
|
messageSettingsEnabled: !0,
|
|
39
40
|
displayGmailAnnotations: !0,
|
|
40
41
|
displayHiddenPreheader: !1,
|
|
@@ -45,44 +46,44 @@ const N = (c) => {
|
|
|
45
46
|
editorFonts: {
|
|
46
47
|
showDefaultStandardFonts: !0,
|
|
47
48
|
showDefaultNotStandardFonts: !0,
|
|
48
|
-
customFonts:
|
|
49
|
+
customFonts: n
|
|
49
50
|
},
|
|
50
51
|
mergeTags: [
|
|
51
52
|
{
|
|
52
|
-
entries:
|
|
53
|
+
entries: U(c.preselectedDynamicContentList)
|
|
53
54
|
}
|
|
54
55
|
],
|
|
55
|
-
async onTokenRefreshRequest(
|
|
56
|
+
async onTokenRefreshRequest(e) {
|
|
56
57
|
try {
|
|
57
|
-
const s = await
|
|
58
|
-
|
|
58
|
+
const s = await y();
|
|
59
|
+
e(s);
|
|
59
60
|
} catch (s) {
|
|
60
|
-
|
|
61
|
+
u(s, "Failed to refresh token");
|
|
61
62
|
}
|
|
62
63
|
},
|
|
63
64
|
onTemplateLoaded() {
|
|
64
65
|
try {
|
|
65
|
-
const { importCss:
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
const { importCss: e } = B(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: k } = T();
|
|
67
|
+
e(), s(), k(), c.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
|
|
68
|
+
o.hasChanges = !1;
|
|
68
69
|
}, 1e3);
|
|
69
|
-
} catch (
|
|
70
|
-
|
|
70
|
+
} catch (e) {
|
|
71
|
+
u(e, "Failed to load custom interface appearance");
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
|
-
onCodeEditorVisibilityChanged(
|
|
74
|
-
|
|
74
|
+
onCodeEditorVisibilityChanged(e) {
|
|
75
|
+
o.isCodeEditorOpen = e;
|
|
75
76
|
},
|
|
76
|
-
onEditorVisualModeChanged(
|
|
77
|
-
|
|
77
|
+
onEditorVisualModeChanged(e) {
|
|
78
|
+
o.editorVisualMode = e.toLowerCase();
|
|
78
79
|
},
|
|
79
|
-
onVersionHistoryVisibilityChanged(
|
|
80
|
-
|
|
80
|
+
onVersionHistoryVisibilityChanged(e) {
|
|
81
|
+
o.isVersionHistoryOpen = e;
|
|
81
82
|
},
|
|
82
83
|
onDataChanged() {
|
|
83
|
-
|
|
84
|
+
o.hasChanges = !0;
|
|
84
85
|
},
|
|
85
|
-
onEvent:
|
|
86
|
+
onEvent: C,
|
|
86
87
|
ignoreClickOutsideSelectors: [
|
|
87
88
|
"#guido-dynamic-content-modal",
|
|
88
89
|
".in-on-board-wrapper",
|
|
@@ -91,26 +92,26 @@ const N = (c) => {
|
|
|
91
92
|
extensions: d
|
|
92
93
|
}
|
|
93
94
|
);
|
|
94
|
-
},
|
|
95
|
+
}, w = (i) => new Promise((n, o) => {
|
|
95
96
|
var d;
|
|
96
97
|
if (document.getElementById("UiEditorScript")) {
|
|
97
|
-
i(),
|
|
98
|
+
i(), n();
|
|
98
99
|
return;
|
|
99
100
|
}
|
|
100
|
-
const
|
|
101
|
+
const r = P.guido, a = `https://email-static.useinsider.com/guido/${(d = r == null ? void 0 : r.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
|
|
101
102
|
t.id = "UiEditorScript", t.type = "module", t.src = a, t.onload = () => {
|
|
102
|
-
i(),
|
|
103
|
+
i(), n();
|
|
103
104
|
}, t.onerror = () => {
|
|
104
|
-
|
|
105
|
+
o(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
105
106
|
}, document.body.appendChild(t);
|
|
106
107
|
});
|
|
107
108
|
return { initPlugin: async (i) => {
|
|
108
|
-
await
|
|
109
|
-
const
|
|
110
|
-
await
|
|
109
|
+
await w(async () => {
|
|
110
|
+
const n = await S();
|
|
111
|
+
await h(i, n);
|
|
111
112
|
});
|
|
112
113
|
} };
|
|
113
114
|
};
|
|
114
115
|
export {
|
|
115
|
-
|
|
116
|
+
K as useStripo
|
|
116
117
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var t = /* @__PURE__ */ ((c) => (c.TEXT_ALIGN = "coupon-block-text-align-control", c.TEXT_COLOR = "coupon-block-text-color-control", c.TEXT_SIZE = "coupon-block-text-size-control", c.TEXT_STYLE = "coupon-block-text-style-control", c.TEXT_FONT_FAMILY = "coupon-block-text-font-family-control", c.TEXT_BACKGROUND = "coupon-block-text-background-control", c.TEXT_PADDINGS = "coupon-block-text-paddings-control", c.TEXT_LINE_SPACING = "coupon-block-text-line-spacing-control", c))(t || {});
|
|
2
|
+
export {
|
|
3
|
+
t as CouponControlId
|
|
4
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createTextAlignControl as t, createTextColorControl as e, createTextSizeControl as n, createTextStyleControl as r, createTextFontFamilyControl as T, createTextBackgroundColorControl as l, createPaddingsControl as C, createTextLineSpacingControl as c } from "../../controlFactories.js";
|
|
2
|
+
import { CouponControlId as o } from "../constants.js";
|
|
3
|
+
const i = t(
|
|
4
|
+
o.TEXT_ALIGN
|
|
5
|
+
), E = e(
|
|
6
|
+
o.TEXT_COLOR
|
|
7
|
+
), s = n(
|
|
8
|
+
o.TEXT_SIZE
|
|
9
|
+
), S = r(
|
|
10
|
+
o.TEXT_STYLE
|
|
11
|
+
), _ = T(
|
|
12
|
+
o.TEXT_FONT_FAMILY
|
|
13
|
+
), g = l(
|
|
14
|
+
o.TEXT_BACKGROUND
|
|
15
|
+
), X = C(
|
|
16
|
+
o.TEXT_PADDINGS
|
|
17
|
+
), d = c(
|
|
18
|
+
o.TEXT_LINE_SPACING
|
|
19
|
+
);
|
|
20
|
+
export {
|
|
21
|
+
i as TextAlignControl,
|
|
22
|
+
g as TextBackgroundControl,
|
|
23
|
+
E as TextColorControl,
|
|
24
|
+
_ as TextFontFamilyControl,
|
|
25
|
+
d as TextLineSpacingControl,
|
|
26
|
+
X as TextPaddingsControl,
|
|
27
|
+
s as TextSizeControl,
|
|
28
|
+
S as TextStyleControl
|
|
29
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
2
|
import { CouponBlock as t } from "./block.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { TextAlignControl as n, TextColorControl as r, TextSizeControl as l, TextStyleControl as d, TextFontFamilyControl as e, TextBackgroundControl as i, TextPaddingsControl as C, TextLineSpacingControl as a } from "./controls/index.js";
|
|
4
|
+
import { CouponIconsRegistry as s } from "./iconsRegistry.js";
|
|
5
|
+
import { CouponBlockSettings as m } from "./settingsPanel.js";
|
|
6
|
+
const u = new o().addBlock(t).withSettingsPanelRegistry(m).addControl(n).addControl(r).addControl(l).addControl(d).addControl(e).addControl(i).addControl(C).addControl(a).withIconsRegistry(s).build();
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
u as default
|
|
8
9
|
};
|
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import { SettingsPanelRegistry as
|
|
2
|
-
import { COUPON_BLOCK_ID as
|
|
3
|
-
|
|
1
|
+
import { SettingsPanelRegistry as n, SettingsPanelTab as o, SettingsTab as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { COUPON_BLOCK_ID as E } from "./block.js";
|
|
3
|
+
import { CouponControlId as T } from "./constants.js";
|
|
4
|
+
class i extends n {
|
|
4
5
|
registerBlockControls(e) {
|
|
5
|
-
e[
|
|
6
|
+
e[E] = [
|
|
6
7
|
new o(
|
|
7
|
-
|
|
8
|
+
t.SETTINGS,
|
|
8
9
|
[
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
T.TEXT_STYLE,
|
|
11
|
+
T.TEXT_ALIGN,
|
|
12
|
+
T.TEXT_PADDINGS
|
|
13
|
+
]
|
|
14
|
+
),
|
|
15
|
+
new o(
|
|
16
|
+
t.STYLES,
|
|
17
|
+
[
|
|
18
|
+
T.TEXT_BACKGROUND,
|
|
19
|
+
T.TEXT_FONT_FAMILY,
|
|
20
|
+
T.TEXT_LINE_SPACING,
|
|
21
|
+
T.TEXT_SIZE,
|
|
22
|
+
T.TEXT_COLOR
|
|
17
23
|
]
|
|
18
24
|
)
|
|
19
25
|
];
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
28
|
export {
|
|
23
|
-
|
|
29
|
+
i as CouponBlockSettings
|
|
24
30
|
};
|
|
@@ -1,18 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
esd-extension-block-id="
|
|
1
|
+
import { BlockType as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { COUPON_BLOCK_ID as e } from "./block.js";
|
|
3
|
+
const t = `
|
|
4
|
+
<${o.BLOCK_TEXT}
|
|
5
|
+
class="coupon-block ins-coupon-code coupon-block-v2 es-p10"
|
|
6
|
+
align="center"
|
|
7
|
+
esd-extension-block-id="${e}">
|
|
8
|
+
<p
|
|
9
|
+
path="1"
|
|
10
|
+
contenteditable="false"
|
|
11
|
+
style="font-size: 16px; color: #333333;">
|
|
12
|
+
<strong path="1,0">{@COUPON_CODE}</strong>
|
|
13
|
+
</p>
|
|
14
|
+
</${o.BLOCK_TEXT}>
|
|
15
|
+
`, l = `
|
|
16
|
+
<td
|
|
17
|
+
class="coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block"
|
|
18
|
+
esd-extension-block-id="${e}"
|
|
8
19
|
>
|
|
9
20
|
<p class="ins-title" contenteditable="false">{@COUPON_CODE}</p>
|
|
10
21
|
</td>
|
|
11
22
|
`;
|
|
12
|
-
function
|
|
13
|
-
return
|
|
23
|
+
function s() {
|
|
24
|
+
return t;
|
|
14
25
|
}
|
|
15
26
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
27
|
+
l as default,
|
|
28
|
+
s as getDefaultTemplate
|
|
18
29
|
};
|