@useinsider/guido 2.0.0-beta.462e902 → 2.0.0-beta.522e9d9
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/PreviewContainer.vue.js +3 -3
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +8 -8
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +17 -13
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +7 -8
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -12
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +10 -14
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +18 -22
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +3 -3
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +11 -10
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +11 -10
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +15 -14
- package/dist/components/organisms/header/LeftSlot.vue.js +11 -11
- package/dist/components/organisms/header/LeftSlot.vue2.js +11 -12
- package/dist/components/organisms/header/MiddleSlot.vue.js +5 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -13
- package/dist/components/organisms/header/RightSlot.vue.js +12 -12
- package/dist/components/organisms/header/RightSlot.vue2.js +27 -21
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +15 -15
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +20 -19
- package/dist/enums/academy.js +8 -0
- package/dist/enums/onboarding.js +1 -2
- package/dist/enums/unsubscribe.js +20 -21
- 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/common-control.js +7 -6
- 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 +57 -52
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/enums/academy.d.ts +12 -0
- package/dist/src/enums/onboarding.d.ts +0 -1
- package/dist/src/enums/unsubscribe.d.ts +0 -1
- 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/common-control.d.ts +1 -1
- package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
- package/dist/static/assets/desktop/desktop-mockup-center.svg.js +4 -0
- package/dist/static/assets/desktop/desktop-mockup-left.svg.js +4 -0
- package/dist/static/assets/desktop/desktop-mockup-right.svg.js +4 -0
- package/dist/static/assets/mobile/email-mockup.svg.js +4 -0
- package/dist/static/assets/mobile/inbox-mockup.svg.js +4 -0
- package/package.json +1 -1
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
- package/dist/static/assets/inbox-mockup.svg.js +0 -4
- package/dist/static/assets/phone-mockup.svg.js +0 -4
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as _, ref as c, computed as f } from "vue";
|
|
2
2
|
import { useConfig as h } from "../../../composables/useConfig.js";
|
|
3
|
-
import { useExport as
|
|
3
|
+
import { useExport as w } from "../../../composables/useExport.js";
|
|
4
4
|
import { useTestEmailClick as x } from "../../../composables/useGuidoActions.js";
|
|
5
5
|
import { useSave as E } from "../../../composables/useSave.js";
|
|
6
6
|
import { useTranslations as T } from "../../../composables/useTranslations.js";
|
|
7
|
-
import { useVersionHistoryApi as
|
|
7
|
+
import { useVersionHistoryApi as O } from "../../../composables/useVersionHistoryApi.js";
|
|
8
8
|
import { useEditorStore as C } from "../../../stores/editor.js";
|
|
9
|
-
import { getTooltipOptions as
|
|
10
|
-
import { InButtonV2 as
|
|
11
|
-
|
|
9
|
+
import { getTooltipOptions as A } from "../../../utils/tooltipUtils.js";
|
|
10
|
+
import { InButtonV2 as B } from "@useinsider/design-system-vue";
|
|
11
|
+
import k from "./version-history/RestoreButton.vue.js";
|
|
12
|
+
const K = /* @__PURE__ */ _({
|
|
12
13
|
__name: "RightSlot",
|
|
13
|
-
setup(
|
|
14
|
-
const { config:
|
|
14
|
+
setup(R, { expose: v }) {
|
|
15
|
+
const { config: n } = h(), { exportHtml: a } = w(), { save: l } = E(), { openVersionHistory: p, closeVersionHistory: m } = O(), o = C(), s = T(), r = c(!1), i = c(!1), d = x(), y = () => {
|
|
15
16
|
if (o.isVersionHistoryOpen) {
|
|
16
|
-
|
|
17
|
+
m();
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
},
|
|
20
|
+
p();
|
|
21
|
+
}, H = async () => {
|
|
22
|
+
r.value = !0, await a(), r.value = !1;
|
|
23
|
+
}, S = () => {
|
|
23
24
|
o.isSaveAsTemplateDrawerOpen = !0;
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
}, V = f(() => o.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), g = f(
|
|
26
|
+
() => {
|
|
27
|
+
var t, e;
|
|
28
|
+
return ((e = (t = n.value) == null ? void 0 : t.features) == null ? void 0 : e.versionHistory) && !o.isPreviewModeOpen;
|
|
29
|
+
}
|
|
30
|
+
), u = async (t) => {
|
|
31
|
+
i.value = !0, o.loadingStatus = !0;
|
|
32
|
+
const e = await l(t);
|
|
33
|
+
return i.value = !1, t && (o.loadingStatus = !1), e;
|
|
28
34
|
};
|
|
29
|
-
return
|
|
30
|
-
handleSave:
|
|
31
|
-
}), { __sfc: !0, config:
|
|
35
|
+
return v({
|
|
36
|
+
handleSave: u
|
|
37
|
+
}), { __sfc: !0, config: n, exportHtml: a, save: l, openVersionHistory: p, closeVersionHistory: m, editorStore: o, trans: s, isExporting: r, isSaving: i, testEmailClick: d, handleVersionHistory: y, handleExport: H, handleSaveAs: S, versionHistoryTooltipText: V, isVersionHistoryButtonVisible: g, handleSave: u, getTooltipOptions: A, InButtonV2: B, RestoreButton: k };
|
|
32
38
|
}
|
|
33
39
|
});
|
|
34
40
|
export {
|
|
35
|
-
|
|
41
|
+
K as default
|
|
36
42
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { defineComponent as v, ref as D, computed as o } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { useOnboardingStore as
|
|
8
|
-
import { isAfterDate as w, formatShortDate as
|
|
9
|
-
const
|
|
2
|
+
import _ from "../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useConfig as h } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useTranslations as y } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ACADEMY_LINKS as c } from "../../../enums/academy.js";
|
|
6
|
+
import L from "../../../static/assets/onboarding-img.svg.js";
|
|
7
|
+
import { useOnboardingStore as C } from "../../../stores/onboarding.js";
|
|
8
|
+
import { isAfterDate as w, formatShortDate as A } from "../../../utils/dateUtil.js";
|
|
9
|
+
const V = /* @__PURE__ */ v({
|
|
10
10
|
__name: "NewVersionPopup",
|
|
11
11
|
emits: ["onboarding-finished"],
|
|
12
|
-
setup(
|
|
13
|
-
const e =
|
|
12
|
+
setup(I, { emit: a }) {
|
|
13
|
+
const e = y(), t = C(), s = D(!0), { config: p } = h(), i = o(() => {
|
|
14
14
|
var l, m;
|
|
15
15
|
return (m = (l = p.value) == null ? void 0 : l.editor) == null ? void 0 : m.migrationDate;
|
|
16
|
-
}), n = o(() => w(i.value || 0)), d = o(() =>
|
|
16
|
+
}), n = o(() => w(i.value || 0)), d = o(() => A(
|
|
17
17
|
i.value || 0
|
|
18
18
|
)), f = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), g = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-description", {
|
|
19
19
|
sunsetDate: d.value,
|
|
20
|
-
academyLink: c
|
|
20
|
+
academyLink: c.EMAIL_EDITOR
|
|
21
21
|
}) : e("email-editor.onboarding-description", {
|
|
22
|
-
academyLink: c
|
|
22
|
+
academyLink: c.EMAIL_EDITOR
|
|
23
23
|
})), u = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), b = o(() => ({
|
|
24
24
|
primaryButton: {
|
|
25
25
|
type: "primary",
|
|
@@ -38,9 +38,9 @@ const E = /* @__PURE__ */ v({
|
|
|
38
38
|
t.onRemindMeLater(), r();
|
|
39
39
|
}, handleClose: () => {
|
|
40
40
|
t.onNewVersionPopupClose(), r();
|
|
41
|
-
}, WpModal:
|
|
41
|
+
}, WpModal: _, onboardingImageSvg: L };
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
V as default
|
|
46
46
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as h, ref as b, computed as g, watch as _ } from "vue";
|
|
2
|
+
import v from "../../wrappers/WpDrawer.vue.js";
|
|
3
3
|
import { useToaster as U } from "../../../composables/useToaster.js";
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useTranslations as N } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ACADEMY_LINKS as w } from "../../../enums/academy.js";
|
|
6
|
+
import { ToasterTypeOptions as R } from "../../../enums/toaster.js";
|
|
7
|
+
import { PAGE_TYPES as l, getTypeTranslations as D, UNSUBSCRIBE_PAGES_LINK as I } from "../../../enums/unsubscribe.js";
|
|
8
|
+
import { useUnsubscribeStore as P } from "../../../stores/unsubscribe.js";
|
|
8
9
|
import { InSegments as G } from "@useinsider/design-system-vue";
|
|
9
|
-
const
|
|
10
|
+
const V = /* @__PURE__ */ h({
|
|
10
11
|
__name: "UnsubscribeTypeSelection",
|
|
11
|
-
setup(
|
|
12
|
-
const e =
|
|
12
|
+
setup(L) {
|
|
13
|
+
const e = N(), { showToaster: f } = U(), t = P(), n = b(!1), i = b(!0), o = b(l.GLOBAL_UNSUBSCRIBE), S = e(
|
|
13
14
|
"unsubscription-preference.select-unsubscribe-page-description",
|
|
14
|
-
{ action: `<a href="${
|
|
15
|
-
), T =
|
|
15
|
+
{ action: `<a href="${w.GLOBAL_UNSUBSCRIBE}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
|
|
16
|
+
), T = g(() => [
|
|
16
17
|
{
|
|
17
18
|
description: e("unsubscription-preference.type-global-unsubscribe-description"),
|
|
18
19
|
icon: "line-contact-global-unsub-page",
|
|
@@ -30,7 +31,7 @@ const K = /* @__PURE__ */ v({
|
|
|
30
31
|
disable: t.isSubscriptionPreferencesCenterDisabled,
|
|
31
32
|
tooltipText: t.isSubscriptionPreferencesCenterDisabled ? e("unsubscription-preference.pref-center-added") : ""
|
|
32
33
|
}
|
|
33
|
-
]), y =
|
|
34
|
+
]), y = g(() => ({
|
|
34
35
|
primaryButton: {
|
|
35
36
|
styling: "solid",
|
|
36
37
|
type: "primary",
|
|
@@ -56,13 +57,13 @@ const K = /* @__PURE__ */ v({
|
|
|
56
57
|
}, 500);
|
|
57
58
|
}, E = (s) => {
|
|
58
59
|
o.value = s;
|
|
59
|
-
},
|
|
60
|
+
}, m = () => {
|
|
60
61
|
const s = t.hasTemplatesByCollectionType, r = [];
|
|
61
62
|
if (Object.entries(s).forEach(([c, p]) => {
|
|
62
63
|
p || r.push(Number(c));
|
|
63
64
|
}), r.length === 0)
|
|
64
65
|
return !0;
|
|
65
|
-
const
|
|
66
|
+
const B = D(), a = r.map((c) => B[c]);
|
|
66
67
|
let u = "";
|
|
67
68
|
if (r.length === 1)
|
|
68
69
|
u = e("unsubscription-preference.create-page-to-continue", {
|
|
@@ -81,17 +82,17 @@ const K = /* @__PURE__ */ v({
|
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
84
|
return f({
|
|
84
|
-
type:
|
|
85
|
+
type: R.Warning,
|
|
85
86
|
message: u,
|
|
86
87
|
actionButton: {
|
|
87
88
|
text: "Go to Unsubscribe Pages",
|
|
88
89
|
onClick: () => {
|
|
89
|
-
window.location.href =
|
|
90
|
+
window.location.href = I;
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
}), !1;
|
|
93
94
|
}, C = async () => {
|
|
94
|
-
if (n.value = !0, await t.fetchTemplates(), t.setCollection(o.value), !
|
|
95
|
+
if (n.value = !0, await t.fetchTemplates(), t.setCollection(o.value), !m()) {
|
|
95
96
|
n.value = !1, d();
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
@@ -99,9 +100,9 @@ const K = /* @__PURE__ */ v({
|
|
|
99
100
|
};
|
|
100
101
|
return _(() => t.typeSelectionDrawerStatus, (s) => {
|
|
101
102
|
s && (i.value = !0, o.value = l.GLOBAL_UNSUBSCRIBE, t.isGlobalUnsubscribeDisabled && (o.value = t.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), i.value = !1);
|
|
102
|
-
}), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates:
|
|
103
|
+
}), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates: m, selectCollection: C, WpDrawer: v, InSegments: G };
|
|
103
104
|
}
|
|
104
105
|
});
|
|
105
106
|
export {
|
|
106
|
-
|
|
107
|
+
V as default
|
|
107
108
|
};
|
package/dist/enums/onboarding.js
CHANGED
|
@@ -2,9 +2,8 @@ const e = [
|
|
|
2
2
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-0.ng-star-inserted",
|
|
3
3
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-1.ng-star-inserted",
|
|
4
4
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-2.ng-star-inserted"
|
|
5
|
-
], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]', o = ".in-ribbons-wrapper"
|
|
5
|
+
], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]', o = ".in-ribbons-wrapper";
|
|
6
6
|
export {
|
|
7
|
-
a as ACADEMY_LINK,
|
|
8
7
|
n as CARD_COMPOSITION_TAB_SELECTOR,
|
|
9
8
|
o as RIBBON_SELECTOR,
|
|
10
9
|
e as SERVICE_HOVER_SELECTORS,
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { useTranslations as
|
|
1
|
+
import { useTranslations as e } from "../composables/useTranslations.js";
|
|
2
2
|
import { getEnvironmentPrefix as R } from "../utils/environmentUtil.js";
|
|
3
|
-
const
|
|
3
|
+
const I = {
|
|
4
4
|
UNSUBSCRIBE_LINK_TYPE: 1,
|
|
5
5
|
PREFERENCES_LINK_TYPE: 3
|
|
6
|
-
},
|
|
6
|
+
}, r = {
|
|
7
7
|
UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
|
|
8
8
|
DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
|
|
9
9
|
GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
|
|
10
10
|
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
|
|
11
|
-
}, s = R(),
|
|
11
|
+
}, s = R(), _ = {
|
|
12
12
|
UNSUBSCRIBE_URL: `https://mail.${s}.com/user/v1/unsub`,
|
|
13
13
|
PREFERENCES_URL: `https://mail.${s}.com/user/v1/prefs`
|
|
14
|
-
},
|
|
14
|
+
}, i = "iid", B = {
|
|
15
15
|
name: "Global Unsubscribe",
|
|
16
16
|
sendGridId: "G"
|
|
17
|
-
},
|
|
17
|
+
}, C = "/email/unsubscribe-pages", E = {
|
|
18
18
|
GLOBAL_UNSUBSCRIBE: 1,
|
|
19
19
|
GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
|
|
20
20
|
SUBSCRIPTION_PREFERENCE_CENTER: 3,
|
|
21
21
|
SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
|
|
22
22
|
RESUBSCRIBE: 5
|
|
23
|
-
},
|
|
23
|
+
}, t = {
|
|
24
24
|
[E.GLOBAL_UNSUBSCRIBE]: [
|
|
25
25
|
E.GLOBAL_UNSUBSCRIBE,
|
|
26
26
|
E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
|
|
@@ -31,29 +31,28 @@ const N = {
|
|
|
31
31
|
E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
|
|
32
32
|
]
|
|
33
33
|
}, U = () => {
|
|
34
|
-
const
|
|
34
|
+
const n = e();
|
|
35
35
|
return {
|
|
36
|
-
[E.GLOBAL_UNSUBSCRIBE]:
|
|
37
|
-
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]:
|
|
38
|
-
[E.RESUBSCRIBE]:
|
|
39
|
-
[E.SUBSCRIPTION_PREFERENCE_CENTER]:
|
|
40
|
-
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]:
|
|
36
|
+
[E.GLOBAL_UNSUBSCRIBE]: n("unsubscription-preference.type-global-unsubscribe"),
|
|
37
|
+
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: n("unsubscription-preference.type-global-unsubscription-confirmation"),
|
|
38
|
+
[E.RESUBSCRIBE]: n("unsubscription-preference.type-resubscribe"),
|
|
39
|
+
[E.SUBSCRIPTION_PREFERENCE_CENTER]: n("unsubscription-preference.type-subscription-preferences-center"),
|
|
40
|
+
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: n("unsubscription-preference.type-subscription-preferences-confirmation")
|
|
41
41
|
};
|
|
42
|
-
},
|
|
42
|
+
}, c = {
|
|
43
43
|
default: "{{ins-unsubscribe-link}}",
|
|
44
44
|
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
45
45
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
46
46
|
};
|
|
47
47
|
export {
|
|
48
|
-
t as ACADEMY_LINK,
|
|
49
48
|
B as DEFAULT_UNSUBSCRIBE_GROUP,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
i as INSIDER_ID,
|
|
50
|
+
r as LINK_REGEXES,
|
|
51
|
+
I as LINK_TYPES,
|
|
52
|
+
c as MERGE_TAGS,
|
|
54
53
|
E as PAGE_TYPES,
|
|
55
|
-
|
|
54
|
+
t as TYPE_COLLECTIONS,
|
|
56
55
|
C as UNSUBSCRIBE_PAGES_LINK,
|
|
57
|
-
|
|
56
|
+
_ as URLS,
|
|
58
57
|
U as getTypeTranslations
|
|
59
58
|
};
|
|
@@ -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
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var c = Object.defineProperty;
|
|
2
2
|
var I = (a, r, e) => r in a ? c(a, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[r] = e;
|
|
3
|
-
var
|
|
3
|
+
var l = (a, r, e) => I(a, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { Control as O, UIElementType as t, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
5
|
class _ extends O {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
l(this, "currentNode");
|
|
9
|
+
l(this, "lastBlockInstanceId", null);
|
|
10
10
|
}
|
|
11
11
|
getContainer() {
|
|
12
12
|
var e;
|
|
@@ -52,9 +52,10 @@ class _ extends O {
|
|
|
52
52
|
const T = o !== this.lastBlockInstanceId;
|
|
53
53
|
return T ? (this.currentNode && e(this.currentNode), n(), this.lastBlockInstanceId = o) : n(), T;
|
|
54
54
|
}
|
|
55
|
-
_GuLabel({ text: e, name: n = "" }) {
|
|
55
|
+
_GuLabel({ text: e, name: n = "", position: E = "top" }) {
|
|
56
56
|
return `
|
|
57
57
|
<${t.LABEL}
|
|
58
|
+
style="${E === "top" ? "margin-bottom: 8px;" : ""}"
|
|
58
59
|
${$.LABEL.text}="${e}"
|
|
59
60
|
${$.LABEL.name}="${n || `${e} Label`}">
|
|
60
61
|
</${t.LABEL}>
|
|
@@ -169,9 +170,9 @@ class _ extends O {
|
|
|
169
170
|
_GuOrderable(e, n) {
|
|
170
171
|
let E = "";
|
|
171
172
|
n.forEach((T) => {
|
|
172
|
-
const
|
|
173
|
+
const u = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
|
|
173
174
|
E += `
|
|
174
|
-
<${t.ORDERABLE_ITEM} ${
|
|
175
|
+
<${t.ORDERABLE_ITEM} ${u}="${T.key}">
|
|
175
176
|
${T.content}
|
|
176
177
|
</${t.ORDERABLE_ITEM}>
|
|
177
178
|
`;
|