@useinsider/guido 3.1.1-beta.d3c42de → 3.1.1-beta.d5a8f39
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/README.md +0 -1
- package/dist/@types/config/schemas.js +7 -9
- package/dist/components/organisms/header/RightSlot.vue.js +10 -10
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -16
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +2 -2
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +2 -2
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +5 -5
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +33 -41
- package/dist/composables/useHtmlCompiler.js +16 -18
- package/dist/composables/useSave.js +17 -23
- package/dist/composables/useStripo.js +32 -32
- package/dist/extensions/Blocks/CouponBlock/template.js +13 -24
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +13 -11
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/@types/generic.d.ts +0 -1
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/enums/onboarding.d.ts +1 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +0 -2
- package/dist/src/stores/config.d.ts +0 -18
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/tooltipUtils.js +4 -5
- package/package.json +2 -2
- package/dist/composables/validators/useLiquidValidator.js +0 -36
- package/dist/config/compiler/liquidCompilerRules.js +0 -15
- package/dist/src/composables/validators/useLiquidValidator.d.ts +0 -3
- package/dist/src/config/compiler/liquidCompilerRules.d.ts +0 -2
package/README.md
CHANGED
|
@@ -143,7 +143,6 @@ const config: GuidoConfigInput = {
|
|
|
143
143
|
displayConditions?: boolean, // Default: true
|
|
144
144
|
unsubscribe?: boolean, // Default: true
|
|
145
145
|
modulesDisabled?: boolean, // Default: false - Disable modules panel
|
|
146
|
-
liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
|
|
147
146
|
},
|
|
148
147
|
|
|
149
148
|
// Optional: Callbacks
|
|
@@ -121,9 +121,7 @@ const m = {
|
|
|
121
121
|
/** Enable unsubscribe block */
|
|
122
122
|
unsubscribe: e(a(), !0),
|
|
123
123
|
/** Disable modules panel in the editor */
|
|
124
|
-
modulesDisabled: e(a(), !1)
|
|
125
|
-
/** Enable Liquid template syntax */
|
|
126
|
-
liquidSyntax: e(a(), !1)
|
|
124
|
+
modulesDisabled: e(a(), !1)
|
|
127
125
|
}), g = n([
|
|
128
126
|
"amp-accordion",
|
|
129
127
|
"amp-carousel",
|
|
@@ -195,14 +193,14 @@ const m = {
|
|
|
195
193
|
(i) => typeof i == "function",
|
|
196
194
|
"processor must be a function"
|
|
197
195
|
)
|
|
198
|
-
}),
|
|
196
|
+
}), U = k("type", [
|
|
199
197
|
M,
|
|
200
198
|
N,
|
|
201
199
|
D,
|
|
202
200
|
v
|
|
203
|
-
]),
|
|
201
|
+
]), x = o({
|
|
204
202
|
/** Custom compiler rules to apply */
|
|
205
|
-
customRules: e(c(
|
|
203
|
+
customRules: e(c(U), []),
|
|
206
204
|
/** Skip default compiler rules */
|
|
207
205
|
ignoreDefaultRules: e(a(), !1)
|
|
208
206
|
}), B = o({
|
|
@@ -234,15 +232,15 @@ const m = {
|
|
|
234
232
|
/** Block configuration */
|
|
235
233
|
blocks: e(L, {}),
|
|
236
234
|
/** Compiler configuration */
|
|
237
|
-
compiler: e(
|
|
235
|
+
compiler: e(x, {}),
|
|
238
236
|
/** Callbacks and event handlers */
|
|
239
237
|
callbacks: e(B, {})
|
|
240
238
|
});
|
|
241
239
|
export {
|
|
242
240
|
L as BlocksSchema,
|
|
243
241
|
B as CallbacksSchema,
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
U as CompilerRuleSchema,
|
|
243
|
+
x as CompilerSchema,
|
|
246
244
|
O as CustomBlockTypeSchema,
|
|
247
245
|
v as CustomRuleSchema,
|
|
248
246
|
g as DefaultBlockTypeSchema,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
return
|
|
6
|
-
},
|
|
7
|
-
i,
|
|
1
|
+
import o from "./RightSlot.vue2.js";
|
|
2
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var n = function() {
|
|
4
|
+
var r = this, t = r._self._c, e = r._self._setupProxy;
|
|
5
|
+
return t("div", { staticClass: "d-f" }, [e.editorStore.isVersionHistoryOpen ? t(e.RestoreButton) : t(e.EditorActions, { ref: "editorActionsRef" })], 1);
|
|
6
|
+
}, i = [], _ = /* @__PURE__ */ s(
|
|
8
7
|
o,
|
|
9
|
-
|
|
8
|
+
n,
|
|
9
|
+
i,
|
|
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,22 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import _ from "./EditorActions.vue.js";
|
|
7
|
-
import S from "./version-history/RestoreButton.vue.js";
|
|
8
|
-
const x = /* @__PURE__ */ a({
|
|
1
|
+
import { defineComponent as i, ref as s } from "vue";
|
|
2
|
+
import { useEditorStore as m } from "../../../stores/editor.js";
|
|
3
|
+
import f from "./EditorActions.vue.js";
|
|
4
|
+
import a from "./version-history/RestoreButton.vue.js";
|
|
5
|
+
const l = /* @__PURE__ */ i({
|
|
9
6
|
__name: "RightSlot",
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
handleSave: (
|
|
14
|
-
var
|
|
15
|
-
return (
|
|
7
|
+
setup(p, { expose: e }) {
|
|
8
|
+
const r = m(), o = s(null);
|
|
9
|
+
return e({
|
|
10
|
+
handleSave: (n) => {
|
|
11
|
+
var t;
|
|
12
|
+
return (t = o.value) == null ? void 0 : t.handleSave(n);
|
|
16
13
|
}
|
|
17
|
-
}), { __sfc: !0,
|
|
14
|
+
}), { __sfc: !0, editorStore: r, editorActionsRef: o, EditorActions: f, RestoreButton: a };
|
|
18
15
|
}
|
|
19
16
|
});
|
|
20
17
|
export {
|
|
21
|
-
|
|
18
|
+
l as default
|
|
22
19
|
};
|
|
@@ -5,11 +5,11 @@ import { InOnboard as b } from "@useinsider/design-system-vue";
|
|
|
5
5
|
const O = /* @__PURE__ */ p({
|
|
6
6
|
__name: "AMPOnboarding",
|
|
7
7
|
setup(l) {
|
|
8
|
-
const i = g(), o = u(), r = e(() => `${window.innerWidth / 2 -
|
|
8
|
+
const i = g(), o = u(), r = e(() => `${window.innerWidth / 2 - 130}px`), a = e(() => [
|
|
9
9
|
{
|
|
10
10
|
classes: "guido-amp-onboarding",
|
|
11
11
|
left: r.value,
|
|
12
|
-
top: "
|
|
12
|
+
top: "68px",
|
|
13
13
|
position: "Top Center",
|
|
14
14
|
title: i("email-editor.onboarding-amp-title"),
|
|
15
15
|
description: i("email-editor.onboarding-amp-description"),
|
|
@@ -6,7 +6,7 @@ import { InOnboard as f } from "@useinsider/design-system-vue";
|
|
|
6
6
|
const S = /* @__PURE__ */ l({
|
|
7
7
|
__name: "GenericOnboarding",
|
|
8
8
|
setup(B) {
|
|
9
|
-
const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 -
|
|
9
|
+
const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 - 118}px`), c = () => {
|
|
10
10
|
const t = document.querySelector("ui-editor");
|
|
11
11
|
t != null && t.shadowRoot && m.forEach((n) => {
|
|
12
12
|
var d;
|
|
@@ -52,7 +52,7 @@ const S = /* @__PURE__ */ l({
|
|
|
52
52
|
{
|
|
53
53
|
classes: "guido-onboarding-preview",
|
|
54
54
|
left: r.value,
|
|
55
|
-
top: "
|
|
55
|
+
top: "68px",
|
|
56
56
|
position: "Top Center",
|
|
57
57
|
title: e("email-editor.onboarding-preview-title"),
|
|
58
58
|
description: e("email-editor.onboarding-preview-description"),
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import c from "./TextBlockOnboarding.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import d from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var g = function() {
|
|
5
5
|
var e, n, r, i, a, s;
|
|
6
|
-
var t = this,
|
|
7
|
-
return o.isVisible ?
|
|
6
|
+
var t = this, l = t._self._c, o = t._self._setupProxy;
|
|
7
|
+
return o.isVisible ? l(o.InOnboard, { key: "guido__text-block-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__text-block-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : r.left, "pages-config": o.onboardingStore.onboardings.textBlockOnboarding.config, "pointer-position": (i = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : i.position, "right-position": (a = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : a.right, "top-position": (s = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: function(u) {
|
|
8
8
|
return o.onboardingStore.close("textBlockOnboarding");
|
|
9
9
|
}, nextButtonClick: o.handleNext } }) : t._e();
|
|
10
10
|
}, b = [], p = /* @__PURE__ */ d(
|
|
11
|
-
|
|
11
|
+
c,
|
|
12
12
|
g,
|
|
13
13
|
b,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"b200491a"
|
|
17
17
|
);
|
|
18
18
|
const f = p.exports;
|
|
19
19
|
export {
|
|
@@ -1,74 +1,66 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as g, computed as r, watch as u } from "vue";
|
|
2
|
+
import { useTranslations as x } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { RIBBON_SELECTOR as b } from "../../../enums/onboarding.js";
|
|
4
|
+
import { useOnboardingStore as p } from "../../../stores/onboarding.js";
|
|
5
|
+
import { InOnboard as k } from "@useinsider/design-system-vue";
|
|
6
|
+
const h = /* @__PURE__ */ g({
|
|
6
7
|
__name: "TextBlockOnboarding",
|
|
7
|
-
setup(
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
top: `${r}px`,
|
|
13
|
-
position: r + d + g > n ? "Right Bottom" : "Right Top"
|
|
14
|
-
},
|
|
15
|
-
dynamic: {
|
|
16
|
-
top: `${s}px`,
|
|
17
|
-
position: s + d + g > n ? "Right Bottom" : "Right Top"
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}), c = a(() => [
|
|
8
|
+
setup(m) {
|
|
9
|
+
const n = x(), o = p(), c = r(() => {
|
|
10
|
+
const t = document.querySelector(b);
|
|
11
|
+
return (t == null ? void 0 : t.offsetHeight) ?? 0;
|
|
12
|
+
}), i = (t) => `${t + c.value}px`, a = r(() => [
|
|
21
13
|
{
|
|
22
14
|
classes: "guido-text-block-onboarding-settings",
|
|
23
15
|
right: "426px",
|
|
24
|
-
top:
|
|
25
|
-
position:
|
|
26
|
-
title:
|
|
27
|
-
description:
|
|
16
|
+
top: i(90),
|
|
17
|
+
position: "Right Top",
|
|
18
|
+
title: n("email-editor.onboarding-text-block-title"),
|
|
19
|
+
description: n("email-editor.onboarding-text-block-description"),
|
|
28
20
|
imageSource: "",
|
|
29
21
|
backButtonClick: () => {
|
|
30
22
|
},
|
|
31
23
|
nextButtonType: "text",
|
|
32
|
-
nextButtonText:
|
|
24
|
+
nextButtonText: n("products.next"),
|
|
33
25
|
nextButtonClick: () => {
|
|
34
26
|
o.next("textBlockOnboarding");
|
|
35
27
|
}
|
|
36
28
|
},
|
|
37
29
|
{
|
|
38
30
|
classes: "guido-text-block-onboarding-dynamic",
|
|
39
|
-
right: "
|
|
40
|
-
top:
|
|
41
|
-
position:
|
|
42
|
-
title:
|
|
43
|
-
description:
|
|
31
|
+
right: "409px",
|
|
32
|
+
top: i(607),
|
|
33
|
+
position: "Right Top",
|
|
34
|
+
title: n("email-editor.onboarding-dynamic-content-title"),
|
|
35
|
+
description: n("email-editor.onboarding-dynamic-content-description"),
|
|
44
36
|
imageSource: "",
|
|
45
37
|
backButtonType: "text",
|
|
46
|
-
backButtonText:
|
|
38
|
+
backButtonText: n("ds-steps.back"),
|
|
47
39
|
backButtonClick: () => {
|
|
48
40
|
o.previous("textBlockOnboarding");
|
|
49
41
|
},
|
|
50
42
|
nextButtonType: "text",
|
|
51
|
-
nextButtonText:
|
|
43
|
+
nextButtonText: n("action-builder.ok"),
|
|
52
44
|
nextButtonClick: () => {
|
|
53
45
|
o.close("textBlockOnboarding");
|
|
54
46
|
}
|
|
55
47
|
}
|
|
56
|
-
]),
|
|
57
|
-
var t,
|
|
58
|
-
(
|
|
59
|
-
},
|
|
60
|
-
var t,
|
|
61
|
-
(
|
|
48
|
+
]), s = r(() => o.onboardings.textBlockOnboarding.config.length > 0 && o.onboardings.textBlockOnboarding.isActive), d = () => {
|
|
49
|
+
var t, e;
|
|
50
|
+
(e = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
|
|
51
|
+
}, l = () => {
|
|
52
|
+
var t, e;
|
|
53
|
+
(e = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
|
|
62
54
|
};
|
|
63
|
-
return
|
|
55
|
+
return u(
|
|
64
56
|
() => o.isActive("textBlockOnboarding"),
|
|
65
57
|
(t) => {
|
|
66
|
-
t && o.setConfig("textBlockOnboarding",
|
|
58
|
+
t && o.setConfig("textBlockOnboarding", a.value);
|
|
67
59
|
},
|
|
68
60
|
{ immediate: !0 }
|
|
69
|
-
), { __sfc: !0, trans:
|
|
61
|
+
), { __sfc: !0, trans: n, onboardingStore: o, ribbonOffset: c, getTopPosition: i, onboardingCardsConfig: a, isVisible: s, handleNext: d, handleBack: l, InOnboard: k };
|
|
70
62
|
}
|
|
71
63
|
});
|
|
72
64
|
export {
|
|
73
|
-
|
|
65
|
+
h as default
|
|
74
66
|
};
|
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import { defaultHtmlCompilerRules as
|
|
2
|
-
import { itemsCompilerRules as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { socialCompilerRules as b } from "../config/compiler/socialCompilerRules.js";
|
|
1
|
+
import { defaultHtmlCompilerRules as n } from "../config/compiler/htmlCompilerRules.js";
|
|
2
|
+
import { itemsCompilerRules as a } from "../config/compiler/itemsCompilerRules.js";
|
|
3
|
+
import { outlookCompilerRules as f } from "../config/compiler/outlookCompilerRules.js";
|
|
4
|
+
import { recommendationCompilerRules as R } from "../config/compiler/recommendationCompilerRules.js";
|
|
5
|
+
import { socialCompilerRules as C } from "../config/compiler/socialCompilerRules.js";
|
|
7
6
|
import { unsubscribeCompilerRules as g } from "../config/compiler/unsubscribeCompilerRules.js";
|
|
8
7
|
import { createHtmlCompiler as H } from "../utils/htmlCompiler.js";
|
|
9
|
-
import { useConfig as
|
|
10
|
-
const
|
|
8
|
+
import { useConfig as b } from "./useConfig.js";
|
|
9
|
+
const q = () => {
|
|
11
10
|
var l, m, r;
|
|
12
|
-
const { compiler: e,
|
|
13
|
-
...!!((m = e.value) != null && m.ignoreDefaultRules) ? [] :
|
|
14
|
-
...
|
|
11
|
+
const { compiler: e, partner: t } = b(), i = ((l = e.value) == null ? void 0 : l.customRules) || [], s = [
|
|
12
|
+
...!!((m = e.value) != null && m.ignoreDefaultRules) ? [] : n,
|
|
13
|
+
...R,
|
|
15
14
|
...g,
|
|
15
|
+
...a,
|
|
16
16
|
...f,
|
|
17
17
|
...C,
|
|
18
|
-
...
|
|
19
|
-
...t("liquidSyntax") ? R : [],
|
|
20
|
-
...s.map((o, a) => ({
|
|
18
|
+
...i.map((o, c) => ({
|
|
21
19
|
...o,
|
|
22
|
-
priority: o.priority + 1e3 +
|
|
20
|
+
priority: o.priority + 1e3 + c
|
|
23
21
|
// Ensure additional rules run after default rules
|
|
24
22
|
}))
|
|
25
|
-
], p = H(
|
|
26
|
-
return { compileHtml: (o) => p.compile(o, void 0,
|
|
23
|
+
], p = H(s), u = (r = t.value) == null ? void 0 : r.fallbackFont;
|
|
24
|
+
return { compileHtml: (o) => p.compile(o, void 0, u) };
|
|
27
25
|
};
|
|
28
26
|
export {
|
|
29
|
-
|
|
27
|
+
q as useHtmlCompiler
|
|
30
28
|
};
|
|
@@ -1,29 +1,23 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useSaveStart as
|
|
4
|
-
import { useSyncModuleExtractor as
|
|
5
|
-
import { useStripoApi as
|
|
6
|
-
import { useTemplatePreparation as
|
|
7
|
-
import { useHtmlValidator as
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var i;
|
|
1
|
+
import { useActionsApi as d } from "./useActionsApi.js";
|
|
2
|
+
import { useConfig as f } from "./useConfig.js";
|
|
3
|
+
import { useSaveStart as v, useSaveComplete as S } from "./useGuidoActions.js";
|
|
4
|
+
import { useSyncModuleExtractor as x } from "./useSyncModuleExtractor.js";
|
|
5
|
+
import { useStripoApi as V } from "../services/stripoApi.js";
|
|
6
|
+
import { useTemplatePreparation as y } from "../utils/templatePreparation.js";
|
|
7
|
+
import { useHtmlValidator as w } from "./useHtmlValidator.js";
|
|
8
|
+
const k = () => {
|
|
9
|
+
const o = v(), s = S(), { validateHtml: i } = w(), { callbacks: a } = f(), { extractSyncModuleData: r } = x(), { setSyncModuleUnsubscriptionPages: n } = V(), { editorSave: l } = d();
|
|
10
|
+
return { save: async (c = !1) => {
|
|
11
|
+
var e;
|
|
13
12
|
o();
|
|
14
|
-
const { prepareTemplateDetails:
|
|
15
|
-
if (
|
|
16
|
-
if (!await n(t.compiledHtml))
|
|
17
|
-
return;
|
|
18
|
-
} else if (!await r(t.compiledHtml, t.dynamicContentList, !0))
|
|
13
|
+
const { prepareTemplateDetails: m } = y(), t = await m();
|
|
14
|
+
if (!await i(t.compiledHtml, t.dynamicContentList, !0) || (e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t))
|
|
19
15
|
return;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
c();
|
|
23
|
-
const { unsubscribePayload: f, stripoModules: v } = d(t.rawHtml);
|
|
24
|
-
return await u(f), t.modules = v, m || s(t), t;
|
|
16
|
+
l();
|
|
17
|
+
const { unsubscribePayload: u, stripoModules: p } = r(t.rawHtml);
|
|
18
|
+
return await n(u), t.modules = p, c || s(t), t;
|
|
25
19
|
} };
|
|
26
20
|
};
|
|
27
21
|
export {
|
|
28
|
-
|
|
22
|
+
k as useSave
|
|
29
23
|
};
|
|
@@ -1,42 +1,42 @@
|
|
|
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 { localePatch as
|
|
8
|
-
import { displayConditions as
|
|
9
|
-
import { useStripoApi as
|
|
10
|
-
import
|
|
1
|
+
import { useActionsApi as A } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as F } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as D } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as I } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useStripoEventHandler as P } from "./useStripoEventHandler.js";
|
|
6
|
+
import { useToaster as U } from "./useToaster.js";
|
|
7
|
+
import { localePatch as R } from "../config/i18n/index.js";
|
|
8
|
+
import { displayConditions as H } from "../enums/displayConditions.js";
|
|
9
|
+
import { useStripoApi as O } from "../services/stripoApi.js";
|
|
10
|
+
import q from "../static/styles/customEditorStyle.css.js";
|
|
11
11
|
import { useEditorStore as S } from "../stores/editor.js";
|
|
12
|
-
import { dynamicContentToMergeTags as
|
|
13
|
-
import
|
|
14
|
-
const
|
|
15
|
-
const { features: l, template: E
|
|
12
|
+
import { dynamicContentToMergeTags as x } from "../utils/genericUtil.js";
|
|
13
|
+
import L from "../package.json.js";
|
|
14
|
+
const oe = (C, c) => {
|
|
15
|
+
const { features: l, template: E } = D(), { handleError: u } = U(), { getToken: h, getCustomFonts: w, getSyncModulesStatus: b } = O(), { handleEvent: k } = P(), { getStripoBlocksConfig: T } = F(), V = async (i, n = [], r = !1) => {
|
|
16
16
|
var f, g, y;
|
|
17
|
-
const e = S(), { html: m, css: a } = i, { baseBlocks: o, extensions: d } = await
|
|
17
|
+
const e = S(), { html: m, css: a } = i, { baseBlocks: o, extensions: d } = await T(), p = ((f = l.value) == null ? void 0 : f.displayConditions) ?? !0, B = ((g = l.value) == null ? void 0 : g.modulesDisabled) ?? !1, v = ((y = E.value) == null ? void 0 : y.forceRecreate) ?? !1;
|
|
18
18
|
window.UIEditor.initEditor(
|
|
19
19
|
document.querySelector("#guido-editor"),
|
|
20
20
|
{
|
|
21
21
|
metadata: C,
|
|
22
22
|
html: m,
|
|
23
23
|
css: a,
|
|
24
|
-
forceRecreate:
|
|
24
|
+
forceRecreate: v,
|
|
25
25
|
locale: "en",
|
|
26
26
|
undoButtonSelector: "#guido__undo-button",
|
|
27
27
|
redoButtonSelector: "#guido__redo-button",
|
|
28
28
|
mobileViewButtonSelector: ".guido__view-option-selection-mobile",
|
|
29
29
|
desktopViewButtonSelector: ".guido__view-option-selection-desktop",
|
|
30
30
|
codeEditorButtonSelector: "#guido__code-button",
|
|
31
|
-
customAppearanceMergetags: !
|
|
31
|
+
customAppearanceMergetags: !0,
|
|
32
32
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
33
33
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
34
|
-
customViewStyles:
|
|
34
|
+
customViewStyles: q,
|
|
35
35
|
conditionsEnabled: p,
|
|
36
36
|
customConditionsEnabled: p,
|
|
37
|
-
conditionCategories:
|
|
37
|
+
conditionCategories: H,
|
|
38
38
|
enableXSSSecurity: !0,
|
|
39
|
-
modulesDisabled:
|
|
39
|
+
modulesDisabled: B,
|
|
40
40
|
syncModulesEnabled: r,
|
|
41
41
|
messageSettingsEnabled: !0,
|
|
42
42
|
displayGmailAnnotations: !0,
|
|
@@ -52,12 +52,12 @@ const ie = (C, c) => {
|
|
|
52
52
|
},
|
|
53
53
|
mergeTags: [
|
|
54
54
|
{
|
|
55
|
-
entries:
|
|
55
|
+
entries: x(c.preselectedDynamicContentList)
|
|
56
56
|
}
|
|
57
57
|
],
|
|
58
58
|
async onTokenRefreshRequest(t) {
|
|
59
59
|
try {
|
|
60
|
-
const s = await
|
|
60
|
+
const s = await h();
|
|
61
61
|
t(s);
|
|
62
62
|
} catch (s) {
|
|
63
63
|
u(s, "Failed to refresh token");
|
|
@@ -65,8 +65,8 @@ const ie = (C, c) => {
|
|
|
65
65
|
},
|
|
66
66
|
onTemplateLoaded() {
|
|
67
67
|
try {
|
|
68
|
-
const { importCss: t } =
|
|
69
|
-
t(), s(),
|
|
68
|
+
const { importCss: t } = I(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: M } = A();
|
|
69
|
+
t(), s(), M(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
|
|
70
70
|
e.hasChanges = !1;
|
|
71
71
|
}, 1e3);
|
|
72
72
|
} catch (t) {
|
|
@@ -85,23 +85,23 @@ const ie = (C, c) => {
|
|
|
85
85
|
onDataChanged() {
|
|
86
86
|
e.hasChanges = !0;
|
|
87
87
|
},
|
|
88
|
-
onEvent:
|
|
88
|
+
onEvent: k,
|
|
89
89
|
ignoreClickOutsideSelectors: [
|
|
90
90
|
"#guido-dynamic-content-modal",
|
|
91
91
|
".in-on-board-wrapper",
|
|
92
92
|
".in-drawer__container"
|
|
93
93
|
],
|
|
94
94
|
extensions: d,
|
|
95
|
-
localePatch:
|
|
95
|
+
localePatch: R
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
|
-
},
|
|
98
|
+
}, _ = (i) => new Promise((n, r) => {
|
|
99
99
|
var d;
|
|
100
100
|
if (document.getElementById("UiEditorScript")) {
|
|
101
101
|
i(), n();
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
|
-
const e =
|
|
104
|
+
const e = L.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, o = document.createElement("script");
|
|
105
105
|
o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
|
|
106
106
|
i(), n();
|
|
107
107
|
}, o.onerror = () => {
|
|
@@ -109,15 +109,15 @@ const ie = (C, c) => {
|
|
|
109
109
|
}, document.body.appendChild(o);
|
|
110
110
|
});
|
|
111
111
|
return { initPlugin: async (i) => {
|
|
112
|
-
await
|
|
112
|
+
await _(async () => {
|
|
113
113
|
const n = S(), [r, e] = await Promise.all([
|
|
114
114
|
w(),
|
|
115
|
-
|
|
115
|
+
b()
|
|
116
116
|
]);
|
|
117
|
-
n.syncModulesEnabled = e, await
|
|
117
|
+
n.syncModulesEnabled = e, await V(i, r, e);
|
|
118
118
|
});
|
|
119
119
|
} };
|
|
120
120
|
};
|
|
121
121
|
export {
|
|
122
|
-
|
|
122
|
+
oe as useStripo
|
|
123
123
|
};
|
|
@@ -1,40 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function l() {
|
|
6
|
-
const { isFeatureEnabled: o } = n();
|
|
7
|
-
return o("liquidSyntax") ? s : c;
|
|
8
|
-
}
|
|
9
|
-
function i(o) {
|
|
10
|
-
return `
|
|
11
|
-
<${e.BLOCK_TEXT}
|
|
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}
|
|
12
5
|
class="coupon-block ins-coupon-code coupon-block-v2 es-p10"
|
|
13
6
|
align="center"
|
|
14
|
-
esd-extension-block-id="${
|
|
7
|
+
esd-extension-block-id="${e}">
|
|
15
8
|
<p
|
|
16
9
|
path="1"
|
|
17
10
|
contenteditable="false"
|
|
18
11
|
style="font-size: 16px; color: #333333;">
|
|
19
|
-
<strong path="1,0"
|
|
12
|
+
<strong path="1,0">{@COUPON_CODE}</strong>
|
|
20
13
|
</p>
|
|
21
|
-
</${
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
const u = `
|
|
14
|
+
</${o.BLOCK_TEXT}>
|
|
15
|
+
`, l = `
|
|
25
16
|
<td
|
|
26
17
|
class="coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block"
|
|
27
|
-
esd-extension-block-id="${
|
|
18
|
+
esd-extension-block-id="${e}"
|
|
28
19
|
>
|
|
29
20
|
<p class="ins-title" contenteditable="false">{@COUPON_CODE}</p>
|
|
30
21
|
</td>
|
|
31
22
|
`;
|
|
32
|
-
function
|
|
33
|
-
return
|
|
23
|
+
function s() {
|
|
24
|
+
return t;
|
|
34
25
|
}
|
|
35
26
|
export {
|
|
36
|
-
|
|
37
|
-
s as
|
|
38
|
-
u as default,
|
|
39
|
-
d as getDefaultTemplate
|
|
27
|
+
l as default,
|
|
28
|
+
s as getDefaultTemplate
|
|
40
29
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-acff76a8]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-a26d7792]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-a26d7792]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-a26d7792]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-
|
|
1
|
+
.gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-acff76a8]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-a26d7792]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-a26d7792]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-a26d7792]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-1cddafa8] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-b200491a] .vueperslides__bullets{pointer-events:none!important}[data-v-b200491a] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import { useHttp as c } from "../composables/useHttp.js";
|
|
2
|
-
import { URLS as
|
|
2
|
+
import { URLS as i } from "../enums/extensions/recommendationBlock.js";
|
|
3
3
|
const f = () => {
|
|
4
|
-
const { get:
|
|
4
|
+
const { get: r } = c(), a = "6KcLM9TwheVB1mgK";
|
|
5
5
|
return {
|
|
6
6
|
fetchRecommendationCreateData: async () => {
|
|
7
7
|
try {
|
|
8
|
-
return (await
|
|
8
|
+
return (await r("/newsletter/recommendations/create-data")).data;
|
|
9
9
|
} catch (e) {
|
|
10
10
|
throw console.error("fetchUserModalState error:", e), e;
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
fetchRecommendationFilters: async () => {
|
|
14
14
|
try {
|
|
15
|
-
const { data: e } = await
|
|
15
|
+
const { data: e } = await r("/stripo/email-recommendation-attributes");
|
|
16
16
|
return e;
|
|
17
17
|
} catch (e) {
|
|
18
18
|
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
fetchRecommendationProducts: async (e,
|
|
21
|
+
fetchRecommendationProducts: async (e, s) => {
|
|
22
22
|
var n;
|
|
23
23
|
try {
|
|
24
|
-
const t = decodeURIComponent(new URLSearchParams(Object.entries(
|
|
24
|
+
const t = decodeURIComponent(new URLSearchParams(Object.entries(s)).toString());
|
|
25
25
|
console.debug("🏁 Recommendation API Query:", t);
|
|
26
|
-
const { get:
|
|
27
|
-
headers: {
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
const { get: m } = c({
|
|
27
|
+
headers: {
|
|
28
|
+
"X-CLIENT-ID": a
|
|
29
|
+
}
|
|
30
|
+
}), o = await m(
|
|
31
|
+
`${i.RECOMMENDATION_API_URL}/v2/${e}?${t}`
|
|
30
32
|
);
|
|
31
|
-
return ((n =
|
|
33
|
+
return ((n = o == null ? void 0 : o.data) == null ? void 0 : n.data) ?? [];
|
|
32
34
|
} catch (t) {
|
|
33
35
|
throw console.error("fetchRecommendationProducts error:", t), t;
|
|
34
36
|
}
|
|
@@ -176,8 +176,6 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
176
176
|
readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
177
177
|
/** Disable modules panel in the editor */
|
|
178
178
|
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
179
|
-
/** Enable Liquid template syntax */
|
|
180
|
-
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
181
179
|
}, undefined>;
|
|
182
180
|
/**
|
|
183
181
|
* Default block types available in Stripo
|
|
@@ -499,8 +497,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
499
497
|
readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
500
498
|
/** Disable modules panel in the editor */
|
|
501
499
|
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
502
|
-
/** Enable Liquid template syntax */
|
|
503
|
-
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
504
500
|
}, undefined>, {}>;
|
|
505
501
|
/** Block configuration */
|
|
506
502
|
readonly blocks: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -61,7 +61,6 @@ export declare const useConfig: () => {
|
|
|
61
61
|
displayConditions: boolean;
|
|
62
62
|
unsubscribe: boolean;
|
|
63
63
|
modulesDisabled: boolean;
|
|
64
|
-
liquidSyntax: boolean;
|
|
65
64
|
};
|
|
66
65
|
blocks: {
|
|
67
66
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -158,7 +157,6 @@ export declare const useConfig: () => {
|
|
|
158
157
|
displayConditions: boolean;
|
|
159
158
|
unsubscribe: boolean;
|
|
160
159
|
modulesDisabled: boolean;
|
|
161
|
-
liquidSyntax: boolean;
|
|
162
160
|
} | null>;
|
|
163
161
|
blocks: import("vue").ComputedRef<{
|
|
164
162
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -3,3 +3,4 @@ export declare const UI_EDITOR_SELECTOR = "ui-editor";
|
|
|
3
3
|
export declare const CARD_COMPOSITION_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Card Composition\"]";
|
|
4
4
|
export declare const SETTINGS_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Settings\"]";
|
|
5
5
|
export declare const RIBBON_SELECTOR = ".in-ribbons-wrapper";
|
|
6
|
+
export declare const DYNAMIC_CONTENT_BUTTON_SELECTOR = "#guido__btn-add-dynamic-content";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export declare const COUPON_PLACEHOLDER_DEFAULT = "{@COUPON_CODE}";
|
|
2
|
-
export declare const COUPON_PLACEHOLDER_LIQUID = "{{ins_coupon_code}}";
|
|
3
1
|
declare const migrationTemplate = "\n <td\n class=\"coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block\"\n esd-extension-block-id=\"coupon-block\"\n >\n <p class=\"ins-title\" contenteditable=\"false\">{@COUPON_CODE}</p>\n </td>\n";
|
|
4
2
|
export declare function getDefaultTemplate(): string;
|
|
5
3
|
export default migrationTemplate;
|
|
@@ -66,7 +66,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
66
66
|
displayConditions: boolean;
|
|
67
67
|
unsubscribe: boolean;
|
|
68
68
|
modulesDisabled: boolean;
|
|
69
|
-
liquidSyntax: boolean;
|
|
70
69
|
};
|
|
71
70
|
blocks: {
|
|
72
71
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -169,7 +168,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
169
168
|
displayConditions: boolean;
|
|
170
169
|
unsubscribe: boolean;
|
|
171
170
|
modulesDisabled: boolean;
|
|
172
|
-
liquidSyntax: boolean;
|
|
173
171
|
};
|
|
174
172
|
blocks: {
|
|
175
173
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -272,7 +270,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
272
270
|
displayConditions: boolean;
|
|
273
271
|
unsubscribe: boolean;
|
|
274
272
|
modulesDisabled: boolean;
|
|
275
|
-
liquidSyntax: boolean;
|
|
276
273
|
};
|
|
277
274
|
blocks: {
|
|
278
275
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -375,7 +372,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
375
372
|
displayConditions: boolean;
|
|
376
373
|
unsubscribe: boolean;
|
|
377
374
|
modulesDisabled: boolean;
|
|
378
|
-
liquidSyntax: boolean;
|
|
379
375
|
};
|
|
380
376
|
blocks: {
|
|
381
377
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -478,7 +474,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
478
474
|
displayConditions: boolean;
|
|
479
475
|
unsubscribe: boolean;
|
|
480
476
|
modulesDisabled: boolean;
|
|
481
|
-
liquidSyntax: boolean;
|
|
482
477
|
};
|
|
483
478
|
blocks: {
|
|
484
479
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -581,7 +576,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
581
576
|
displayConditions: boolean;
|
|
582
577
|
unsubscribe: boolean;
|
|
583
578
|
modulesDisabled: boolean;
|
|
584
|
-
liquidSyntax: boolean;
|
|
585
579
|
};
|
|
586
580
|
blocks: {
|
|
587
581
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -684,7 +678,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
684
678
|
displayConditions: boolean;
|
|
685
679
|
unsubscribe: boolean;
|
|
686
680
|
modulesDisabled: boolean;
|
|
687
|
-
liquidSyntax: boolean;
|
|
688
681
|
};
|
|
689
682
|
blocks: {
|
|
690
683
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -787,7 +780,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
787
780
|
displayConditions: boolean;
|
|
788
781
|
unsubscribe: boolean;
|
|
789
782
|
modulesDisabled: boolean;
|
|
790
|
-
liquidSyntax: boolean;
|
|
791
783
|
};
|
|
792
784
|
blocks: {
|
|
793
785
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -890,7 +882,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
890
882
|
displayConditions: boolean;
|
|
891
883
|
unsubscribe: boolean;
|
|
892
884
|
modulesDisabled: boolean;
|
|
893
|
-
liquidSyntax: boolean;
|
|
894
885
|
};
|
|
895
886
|
blocks: {
|
|
896
887
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -993,7 +984,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
993
984
|
displayConditions: boolean;
|
|
994
985
|
unsubscribe: boolean;
|
|
995
986
|
modulesDisabled: boolean;
|
|
996
|
-
liquidSyntax: boolean;
|
|
997
987
|
};
|
|
998
988
|
blocks: {
|
|
999
989
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1096,7 +1086,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1096
1086
|
displayConditions: boolean;
|
|
1097
1087
|
unsubscribe: boolean;
|
|
1098
1088
|
modulesDisabled: boolean;
|
|
1099
|
-
liquidSyntax: boolean;
|
|
1100
1089
|
};
|
|
1101
1090
|
blocks: {
|
|
1102
1091
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1199,7 +1188,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1199
1188
|
displayConditions: boolean;
|
|
1200
1189
|
unsubscribe: boolean;
|
|
1201
1190
|
modulesDisabled: boolean;
|
|
1202
|
-
liquidSyntax: boolean;
|
|
1203
1191
|
};
|
|
1204
1192
|
blocks: {
|
|
1205
1193
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1302,7 +1290,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1302
1290
|
displayConditions: boolean;
|
|
1303
1291
|
unsubscribe: boolean;
|
|
1304
1292
|
modulesDisabled: boolean;
|
|
1305
|
-
liquidSyntax: boolean;
|
|
1306
1293
|
};
|
|
1307
1294
|
blocks: {
|
|
1308
1295
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1405,7 +1392,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1405
1392
|
displayConditions: boolean;
|
|
1406
1393
|
unsubscribe: boolean;
|
|
1407
1394
|
modulesDisabled: boolean;
|
|
1408
|
-
liquidSyntax: boolean;
|
|
1409
1395
|
};
|
|
1410
1396
|
blocks: {
|
|
1411
1397
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1508,7 +1494,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1508
1494
|
displayConditions: boolean;
|
|
1509
1495
|
unsubscribe: boolean;
|
|
1510
1496
|
modulesDisabled: boolean;
|
|
1511
|
-
liquidSyntax: boolean;
|
|
1512
1497
|
};
|
|
1513
1498
|
blocks: {
|
|
1514
1499
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1611,7 +1596,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1611
1596
|
displayConditions: boolean;
|
|
1612
1597
|
unsubscribe: boolean;
|
|
1613
1598
|
modulesDisabled: boolean;
|
|
1614
|
-
liquidSyntax: boolean;
|
|
1615
1599
|
};
|
|
1616
1600
|
blocks: {
|
|
1617
1601
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1714,7 +1698,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1714
1698
|
displayConditions: boolean;
|
|
1715
1699
|
unsubscribe: boolean;
|
|
1716
1700
|
modulesDisabled: boolean;
|
|
1717
|
-
liquidSyntax: boolean;
|
|
1718
1701
|
};
|
|
1719
1702
|
blocks: {
|
|
1720
1703
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1817,7 +1800,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1817
1800
|
displayConditions: boolean;
|
|
1818
1801
|
unsubscribe: boolean;
|
|
1819
1802
|
modulesDisabled: boolean;
|
|
1820
|
-
liquidSyntax: boolean;
|
|
1821
1803
|
};
|
|
1822
1804
|
blocks: {
|
|
1823
1805
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1392,6 +1392,10 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"guidoO
|
|
|
1392
1392
|
close(type: OnboardingType): Promise<void>;
|
|
1393
1393
|
next(type: OnboardingType): void;
|
|
1394
1394
|
previous(type: OnboardingType): void;
|
|
1395
|
+
updateCardPosition(type: OnboardingType, cardIndex: number, position: {
|
|
1396
|
+
top: string;
|
|
1397
|
+
position: string;
|
|
1398
|
+
}): void;
|
|
1395
1399
|
setConfig(type: OnboardingType, config: OnboardingCardConfig[]): void;
|
|
1396
1400
|
onDiscoverNowClicked(): Promise<void>;
|
|
1397
1401
|
onRemindMeLater(): void;
|
|
@@ -71,6 +71,10 @@ const t = () => ({
|
|
|
71
71
|
previous(n) {
|
|
72
72
|
this.onboardings[n].cardIndex > 0 && this.onboardings[n].cardIndex--;
|
|
73
73
|
},
|
|
74
|
+
updateCardPosition(n, i, o) {
|
|
75
|
+
const s = this.onboardings[n].config[i];
|
|
76
|
+
s && (s.top = o.top, s.position = o.position);
|
|
77
|
+
},
|
|
74
78
|
setConfig(n, i) {
|
|
75
79
|
this.onboardings[n].config = i ?? [], this.onboardings[n].cardIndex >= this.onboardings[n].config.length && (this.onboardings[n].cardIndex = 0);
|
|
76
80
|
},
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
id:
|
|
1
|
+
const o = (i, t = {}) => ({
|
|
2
|
+
id: i,
|
|
3
3
|
dynamicPosition: t.dynamicPosition ?? !1,
|
|
4
4
|
staticPosition: t.staticPosition ?? "bottom center",
|
|
5
5
|
iconStatus: t.iconStatus ?? !1,
|
|
6
|
-
offset: t.offset
|
|
7
|
-
preventXss: t.preventXss
|
|
6
|
+
offset: t.offset
|
|
8
7
|
});
|
|
9
8
|
export {
|
|
10
|
-
|
|
9
|
+
o as getTooltipOptions
|
|
11
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.1.1-beta.
|
|
3
|
+
"version": "3.1.1-beta.d5a8f39",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"license": "ISC",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@stripoinc/ui-editor-extensions": "3.5.0",
|
|
36
|
-
"@useinsider/design-system-vue": "0.
|
|
36
|
+
"@useinsider/design-system-vue": "1.1.0-beta.73ec2fa",
|
|
37
37
|
"@vueuse/core": "11.3.0",
|
|
38
38
|
"lodash-es": "4.17.21",
|
|
39
39
|
"pinia": "2.3.1",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ToasterTypeOptions as i } from "../../enums/toaster.js";
|
|
2
|
-
import { base64EncodeWithSpecialChars as d } from "../../utils/base64.js";
|
|
3
|
-
import { useHttp as u } from "../useHttp.js";
|
|
4
|
-
import { useToaster as m } from "../useToaster.js";
|
|
5
|
-
import { useTranslations as p } from "../useTranslations.js";
|
|
6
|
-
const x = () => {
|
|
7
|
-
const { post: o } = u(), { showToaster: a } = m(), r = p();
|
|
8
|
-
return { validateLiquidSyntax: async (n) => {
|
|
9
|
-
var s;
|
|
10
|
-
const e = await o("/newsletter/contents/validate-syntax", [{
|
|
11
|
-
identifier: "default",
|
|
12
|
-
syntax: "liquid",
|
|
13
|
-
contents: {
|
|
14
|
-
subject: null,
|
|
15
|
-
preheader: null,
|
|
16
|
-
html: d(n),
|
|
17
|
-
ampHtml: null
|
|
18
|
-
}
|
|
19
|
-
}]);
|
|
20
|
-
if (!Array.isArray(e.data)) {
|
|
21
|
-
const l = e.data;
|
|
22
|
-
return a({
|
|
23
|
-
type: i.Alert,
|
|
24
|
-
message: l.message ?? r("journey-builder.liquid-validation-failed")
|
|
25
|
-
}), !1;
|
|
26
|
-
}
|
|
27
|
-
const [t] = e.data;
|
|
28
|
-
return t != null && t.success ? !0 : (a({
|
|
29
|
-
type: i.Alert,
|
|
30
|
-
message: ((s = t == null ? void 0 : t.errors) == null ? void 0 : s.html) ?? r("journey-builder.liquid-validation-failed")
|
|
31
|
-
}), !1);
|
|
32
|
-
} };
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
x as useLiquidValidator
|
|
36
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { COUPON_PLACEHOLDER_LIQUID as e, COUPON_PLACEHOLDER_DEFAULT as i } from "../../extensions/Blocks/CouponBlock/template.js";
|
|
2
|
-
const o = [
|
|
3
|
-
{
|
|
4
|
-
id: "liquid-coupon-code",
|
|
5
|
-
description: "Replace legacy coupon placeholder with liquid syntax",
|
|
6
|
-
type: "replace",
|
|
7
|
-
search: i,
|
|
8
|
-
replacement: e,
|
|
9
|
-
replaceAll: !0,
|
|
10
|
-
priority: 50
|
|
11
|
-
}
|
|
12
|
-
];
|
|
13
|
-
export {
|
|
14
|
-
o as liquidCompilerRules
|
|
15
|
-
};
|