@useinsider/guido 1.0.3-beta.cc03cd5 → 1.0.3-beta.cc614d6
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 +141 -3
- package/dist/components/Guido.vue.js +11 -9
- package/dist/components/Guido.vue2.js +70 -66
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +28 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +38 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +37 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +20 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +44 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +27 -0
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +16 -15
- package/dist/components/organisms/header/RightSlot.vue.js +11 -11
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +9 -9
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +30 -17
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -10
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +19 -18
- package/dist/composables/useBlocksConfig.js +49 -0
- package/dist/composables/useStripo.js +39 -48
- package/dist/config/migrator/index.js +7 -6
- package/dist/config/migrator/recommendationMigrator.js +293 -0
- package/dist/enums/date.js +6 -0
- package/dist/enums/defaults.js +15 -8
- package/dist/enums/extensions/recommendationBlock.js +80 -0
- package/dist/enums/onboarding.js +2 -1
- package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
- package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
- package/dist/extensions/Blocks/RadioButton/template.js +6 -6
- package/dist/extensions/Blocks/Recommendation/block.js +30 -0
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +103 -0
- package/dist/extensions/Blocks/Recommendation/constants.js +5 -0
- package/dist/extensions/Blocks/Recommendation/control.js +306 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +45 -0
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +51 -0
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +19 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +117 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +160 -0
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +152 -0
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +180 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +28 -0
- package/dist/extensions/Blocks/common-control.js +184 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +25 -19
- package/dist/extensions/DynamicContent/dynamic-content.js +128 -33
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +311 -93
- package/dist/package.json.js +1 -1
- package/dist/services/recommendationApi.js +43 -0
- package/dist/services/stripoApi.js +1 -1
- package/dist/src/@types/generic.d.ts +43 -4
- package/dist/src/components/Guido.vue.d.ts +3 -2
- package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +19 -0
- package/dist/src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +2 -0
- package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +2 -0
- package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +16 -0
- package/dist/src/components/organisms/onboarding/NewVersionPopup.vue.d.ts +3 -1
- package/dist/src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +3 -1
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useBlocksConfig.d.ts +11 -0
- package/dist/src/config/migrator/recommendationMigrator.d.ts +1 -0
- package/dist/src/enums/date.d.ts +4 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +16 -0
- package/dist/src/enums/onboarding.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +28 -0
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +51 -0
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +555 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/migrationTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +44 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +7 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +87 -0
- package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +9 -2
- package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +52 -2
- package/dist/src/mock/api/recommendation.d.ts +2 -0
- package/dist/src/services/recommendationApi.d.ts +6 -0
- package/dist/src/stores/config.d.ts +8 -1
- package/dist/src/stores/dynamic-content.d.ts +2 -2
- package/dist/src/stores/editor.d.ts +21 -0
- package/dist/src/utils/dateUtil.d.ts +21 -0
- package/dist/src/utils/genericUtil.d.ts +2 -0
- package/dist/static/styles/components/narrow-panel.css.js +10 -0
- package/dist/static/styles/customEditorStyle.css.js +5 -0
- package/dist/stores/dynamic-content.js +1 -1
- package/dist/stores/editor.js +2 -1
- package/dist/utils/dateUtil.js +24 -3
- package/dist/utils/genericUtil.js +23 -11
- package/package.json +4 -4
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as s, ref as n } from "vue";
|
|
2
|
+
import { InSegments as p } from "@useinsider/design-system-vue";
|
|
3
|
+
const l = /* @__PURE__ */ s({
|
|
4
|
+
__name: "LogicAdapter",
|
|
5
|
+
props: {
|
|
6
|
+
logic: null
|
|
7
|
+
},
|
|
8
|
+
emits: ["change"],
|
|
9
|
+
setup(r, { emit: e }) {
|
|
10
|
+
const t = r, a = n([
|
|
11
|
+
{
|
|
12
|
+
text: "and",
|
|
13
|
+
value: "*"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
text: "or",
|
|
17
|
+
value: "|"
|
|
18
|
+
}
|
|
19
|
+
]), o = n(t.logic || "*");
|
|
20
|
+
return { __sfc: !0, logicAdapterList: a, emit: e, props: t, selectedLogicAdapter: o, changeLogicAdapter: (c) => {
|
|
21
|
+
o.value = c, e("change", c);
|
|
22
|
+
}, InSegments: p };
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
l as default
|
|
27
|
+
};
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as c, computed as a } from "vue";
|
|
2
|
+
import { useConfig as m } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useBack as u } from "../../../composables/useGuidoActions.js";
|
|
4
|
+
import { usePreviewMode as f } from "../../../composables/usePreviewMode.js";
|
|
4
5
|
import { useTranslations as p } from "../../../composables/useTranslations.js";
|
|
5
|
-
import { useVersionHistoryApi as
|
|
6
|
-
import { useEditorStore as
|
|
7
|
-
import { InButtonV2 as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
6
|
+
import { useVersionHistoryApi as d } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
+
import { useEditorStore as l } from "../../../stores/editor.js";
|
|
8
|
+
import { InButtonV2 as k } from "@useinsider/design-system-vue";
|
|
9
|
+
import B from "./version-history/RestoreButton.vue.js";
|
|
10
|
+
const P = /* @__PURE__ */ c({
|
|
10
11
|
__name: "LeftSlot",
|
|
11
|
-
setup(
|
|
12
|
-
const o =
|
|
13
|
-
return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory:
|
|
12
|
+
setup(b) {
|
|
13
|
+
const o = l(), r = u(), { closeVersionHistory: i } = d(), { closePreviewMode: n } = f(), e = p(), { config: t } = m(), s = a(() => o.isVersionHistoryOpen || o.isPreviewModeOpen ? e("email-editor.back-to-editor") : t.backButtonLabel ? t.backButtonLabel : e("email-editor.back-to-design"));
|
|
14
|
+
return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: e, config: t, backButtonLabel: s, handleBackClick: () => {
|
|
14
15
|
if (o.isVersionHistoryOpen) {
|
|
15
|
-
|
|
16
|
+
i();
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
18
19
|
if (o.isPreviewModeOpen) {
|
|
19
|
-
|
|
20
|
+
n();
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
23
|
r();
|
|
23
|
-
}, InButtonV2:
|
|
24
|
+
}, InButtonV2: k, RestoreButton: B };
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
P as default
|
|
28
29
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return e("div", { staticClass: "d-f" }, [(
|
|
1
|
+
import a from "./RightSlot.vue2.js";
|
|
2
|
+
import l from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var r = function() {
|
|
4
|
+
var o, i, n;
|
|
5
|
+
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "d-f" }, [(o = t.config.features) != null && o.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : s._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : s._e(), (n = t.config.features) != null && n.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }) : s._e(), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(_) {
|
|
7
7
|
return t.handleSave(!1);
|
|
8
8
|
} } })], 1);
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
l,
|
|
9
|
+
}, u = [], d = /* @__PURE__ */ l(
|
|
10
|
+
a,
|
|
12
11
|
r,
|
|
12
|
+
u,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
15
|
null
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const f = d.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
f as default
|
|
20
20
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from "./NewVersionPopup.vue2.js";
|
|
2
2
|
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
4
|
-
var e = this,
|
|
5
|
-
return o.isVisible ?
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
r,
|
|
3
|
+
var i = function() {
|
|
4
|
+
var e = this, s = e._self._c, o = e._self._setupProxy;
|
|
5
|
+
return o.isVisible ? s(o.WpModal, { attrs: { id: "guido__new-version-popup", size: "medium", "close-on-outside-click": !1, "footer-button-options": o.footerButtonOptions, title: o.popupTitle }, on: { close: o.handleClose, "primary-action": o.handleDiscoverNow, "secondary-action": o.handleRemindLater } }, [s("div", { staticClass: "d-f f-d-c" }, [s("img", { staticClass: "w-1 h-1 d-b p-e-n mb-5", attrs: { src: o.onboardingImageSvg } }), s("p", { staticClass: "f-s-2 f-w-400", domProps: { innerHTML: e._s(o.popupDescription) } })])]) : e._e();
|
|
6
|
+
}, r = [], a = /* @__PURE__ */ n(
|
|
7
|
+
t,
|
|
9
8
|
i,
|
|
9
|
+
r,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const _ = a.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
_ as default
|
|
17
17
|
};
|
|
@@ -1,30 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as g, ref as b, computed as o } from "vue";
|
|
2
|
+
import v from "../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useConfig as D } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useTranslations as h } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ACADEMY_LINK as l } from "../../../enums/onboarding.js";
|
|
6
|
+
import y from "../../../static/assets/onboarding-img.svg.js";
|
|
7
|
+
import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
|
|
8
|
+
import { isAfterDate as C, formatShortDate as L } from "../../../utils/dateUtil.js";
|
|
9
|
+
const I = /* @__PURE__ */ g({
|
|
7
10
|
__name: "NewVersionPopup",
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
emits: ["onboarding-finished"],
|
|
12
|
+
setup(w, { emit: a }) {
|
|
13
|
+
const e = h(), t = _(), s = b(!0), { config: p } = D(), i = o(() => p.migrationDate), n = o(() => C(i.value || 0)), d = o(() => L(
|
|
14
|
+
i.value
|
|
15
|
+
)), m = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), c = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-description", {
|
|
16
|
+
sunsetDate: d.value,
|
|
17
|
+
academyLink: l
|
|
18
|
+
}) : e("email-editor.onboarding-description", {
|
|
19
|
+
academyLink: l
|
|
20
|
+
})), u = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), f = o(() => ({
|
|
10
21
|
primaryButton: {
|
|
11
22
|
type: "primary",
|
|
12
|
-
labelText:
|
|
23
|
+
labelText: e("left-menu.discover-now")
|
|
13
24
|
},
|
|
14
25
|
secondaryButton: {
|
|
15
26
|
type: "subtle-primary",
|
|
16
|
-
labelText:
|
|
27
|
+
labelText: u.value
|
|
17
28
|
}
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
})), r = () => {
|
|
30
|
+
s.value = !1, a("onboarding-finished");
|
|
31
|
+
};
|
|
32
|
+
return { __sfc: !0, emit: a, trans: e, onboardingStore: t, isVisible: s, config: p, migrationDate: i, isAfterMigrationDate: n, formattedSunsetDate: d, popupTitle: m, popupDescription: c, secondaryButtonLabel: u, footerButtonOptions: f, closePopup: r, handleDiscoverNow: () => {
|
|
33
|
+
t.onDiscoverNowClicked(), r();
|
|
21
34
|
}, handleRemindLater: () => {
|
|
22
|
-
|
|
35
|
+
t.onRemindMeLater(), r();
|
|
23
36
|
}, handleClose: () => {
|
|
24
|
-
|
|
25
|
-
}, WpModal:
|
|
37
|
+
t.onNewVersionPopupClose(), r();
|
|
38
|
+
}, WpModal: v, onboardingImageSvg: y };
|
|
26
39
|
}
|
|
27
40
|
});
|
|
28
41
|
export {
|
|
29
|
-
|
|
42
|
+
I as default
|
|
30
43
|
};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import t from "./OnboardingWrapper.vue2.js";
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var s = function() {
|
|
4
|
-
var n = this, e = n._self._c,
|
|
5
|
-
return e("div", n._l(
|
|
6
|
-
return e(
|
|
4
|
+
var n = this, e = n._self._c, r = n._self._setupProxy;
|
|
5
|
+
return e("div", n._l(r.visibleOnboardings, function(o) {
|
|
6
|
+
return e(o.component, { key: o.type, tag: "component", on: { "onboarding-finished": function(p) {
|
|
7
|
+
return r.emit("onboarding-finished");
|
|
8
|
+
} } });
|
|
7
9
|
}), 1);
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
+
}, _ = [], a = /* @__PURE__ */ i(
|
|
11
|
+
t,
|
|
10
12
|
s,
|
|
11
|
-
|
|
13
|
+
_,
|
|
12
14
|
!1,
|
|
13
15
|
null,
|
|
14
16
|
null
|
|
15
17
|
);
|
|
16
|
-
const
|
|
18
|
+
const d = a.exports;
|
|
17
19
|
export {
|
|
18
|
-
|
|
20
|
+
d as default
|
|
19
21
|
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePartner as
|
|
3
|
-
import { useEditorStore as
|
|
4
|
-
import { useOnboardingStore as
|
|
5
|
-
import { usePreviewStore as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
|
|
2
|
+
import { usePartner as u } from "../../../composables/usePartner.js";
|
|
3
|
+
import { useEditorStore as v } from "../../../stores/editor.js";
|
|
4
|
+
import { useOnboardingStore as l } from "../../../stores/onboarding.js";
|
|
5
|
+
import { usePreviewStore as y } from "../../../stores/preview.js";
|
|
6
|
+
import S from "./AMPOnboarding.vue.js";
|
|
7
|
+
import h from "./GenericOnboarding.vue.js";
|
|
8
8
|
import w from "./NewVersionPopup.vue.js";
|
|
9
9
|
import P from "./TextBlockOnboarding.vue.js";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import _ from "./VersionHistoryOnboarding.vue.js";
|
|
11
|
+
const F = /* @__PURE__ */ b({
|
|
12
12
|
__name: "OnboardingWrapper",
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
emits: ["onboarding-finished"],
|
|
14
|
+
setup(A, { emit: f }) {
|
|
15
|
+
const o = l(), r = v(), s = y(), { isTestPartner: a } = u(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
|
|
15
16
|
{ type: "newVersionPopup", component: w },
|
|
16
|
-
{ type: "genericOnboarding", component:
|
|
17
|
+
{ type: "genericOnboarding", component: h },
|
|
17
18
|
{ type: "textBlockOnboarding", component: P },
|
|
18
|
-
{ type: "versionHistoryOnboarding", component:
|
|
19
|
-
{ type: "ampOnboarding", component:
|
|
20
|
-
], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n),
|
|
21
|
-
return
|
|
19
|
+
{ type: "versionHistoryOnboarding", component: _ },
|
|
20
|
+
{ type: "ampOnboarding", component: S }
|
|
21
|
+
], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
|
|
22
|
+
return O(async () => {
|
|
22
23
|
await o.fetchUserModalState();
|
|
23
24
|
}), t(
|
|
24
25
|
() => r.isVersionHistoryOpen,
|
|
@@ -35,9 +36,9 @@ const E = /* @__PURE__ */ g({
|
|
|
35
36
|
(n) => {
|
|
36
37
|
!n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
|
|
37
38
|
}
|
|
38
|
-
), { __sfc: !0, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings:
|
|
39
|
+
), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
+
F as default
|
|
43
44
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
"amp-accordion": "ampAccordionEnabled",
|
|
3
|
+
"amp-carousel": "ampCarouselEnabled",
|
|
4
|
+
"amp-form-controls": "ampFormControlsEnabled",
|
|
5
|
+
"banner-block": "bannerEnabled",
|
|
6
|
+
"button-block": "buttonEnabled",
|
|
7
|
+
"html-block": "htmlEnabled",
|
|
8
|
+
"image-block": "imageEnabled",
|
|
9
|
+
"menu-block": "menuEnabled",
|
|
10
|
+
"social-block": "socialNetEnabled",
|
|
11
|
+
"spacer-block": "spacerEnabled",
|
|
12
|
+
"text-block": "textEnabled",
|
|
13
|
+
"timer-block": "timerEnabled",
|
|
14
|
+
"video-block": "videoEnabled"
|
|
15
|
+
}, c = {
|
|
16
|
+
"dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
|
|
17
|
+
"checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
|
|
18
|
+
"radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
|
|
19
|
+
"recommendation-block": () => import("../extensions/Blocks/Recommendation/extension.js"),
|
|
20
|
+
"unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
|
|
21
|
+
"coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
|
|
22
|
+
"items-block": null
|
|
23
|
+
// TODO: Add ItemsBlock extension when available
|
|
24
|
+
}, a = (n) => {
|
|
25
|
+
if (!n || !n.length)
|
|
26
|
+
return {};
|
|
27
|
+
const o = {};
|
|
28
|
+
return n.forEach((e) => {
|
|
29
|
+
const t = l[e];
|
|
30
|
+
t && (o[t] = !1);
|
|
31
|
+
}), o;
|
|
32
|
+
}, r = async (n) => !n || !n.length ? [] : (await Promise.all(
|
|
33
|
+
n.map(async (e) => {
|
|
34
|
+
const t = c[e];
|
|
35
|
+
return t ? (await t()).default : null;
|
|
36
|
+
})
|
|
37
|
+
)).filter((e) => e !== null), s = () => ({
|
|
38
|
+
getStripoBlocksConfig: async () => {
|
|
39
|
+
var e;
|
|
40
|
+
const o = (e = window.GuidoConfig) == null ? void 0 : e.blocks;
|
|
41
|
+
return {
|
|
42
|
+
baseBlocks: a(o == null ? void 0 : o.excludeDefaults),
|
|
43
|
+
extensions: await r(o == null ? void 0 : o.includeCustoms)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
s as useBlocksConfig
|
|
49
|
+
};
|
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useStripoApi as k } from "../services/stripoApi.js";
|
|
12
|
-
import B from "../static/styles/customEditorStyle.css.js";
|
|
13
|
-
import { useEditorStore as F } from "../stores/editor.js";
|
|
14
|
-
import { dynamicContentToMergeTags as x } from "../utils/genericUtil.js";
|
|
1
|
+
import { useActionsApi as y } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as E } from "./useBlocksConfig.js";
|
|
3
|
+
import { useCustomInterfaceAppearance as w } from "./useCustomInterfaceAppearance.js";
|
|
4
|
+
import { useStripoEventHandler as h } from "./useStripoEventHandler.js";
|
|
5
|
+
import { useToaster as b } from "./useToaster.js";
|
|
6
|
+
import { displayConditions as k } from "../enums/displayConditions.js";
|
|
7
|
+
import { useStripoApi as B } from "../services/stripoApi.js";
|
|
8
|
+
import V from "../static/styles/customEditorStyle.css.js";
|
|
9
|
+
import { useEditorStore as _ } from "../stores/editor.js";
|
|
10
|
+
import { dynamicContentToMergeTags as F } from "../utils/genericUtil.js";
|
|
15
11
|
import A from "../package.json.js";
|
|
16
|
-
const
|
|
17
|
-
const { handleError:
|
|
18
|
-
const t =
|
|
12
|
+
const L = (d) => {
|
|
13
|
+
const { handleError: u } = b(), { getToken: p, getCustomFonts: m } = B(), { handleEvent: g } = h(), { getStripoBlocksConfig: f } = E(), S = async (r, i = []) => {
|
|
14
|
+
const t = _(), { html: n, css: l, forceRecreate: a } = r, { baseBlocks: e, extensions: c } = await f();
|
|
19
15
|
window.UIEditor.initEditor(
|
|
20
16
|
document.querySelector("#guido-editor"),
|
|
21
17
|
{
|
|
22
|
-
metadata:
|
|
18
|
+
metadata: d,
|
|
23
19
|
html: n,
|
|
24
|
-
css:
|
|
25
|
-
forceRecreate:
|
|
20
|
+
css: l,
|
|
21
|
+
forceRecreate: a,
|
|
26
22
|
locale: "en",
|
|
27
23
|
undoButtonSelector: "#guido__undo-button",
|
|
28
24
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -32,13 +28,14 @@ const N = (a) => {
|
|
|
32
28
|
customAppearanceMergetags: !0,
|
|
33
29
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
34
30
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
35
|
-
customViewStyles:
|
|
31
|
+
customViewStyles: V,
|
|
36
32
|
conditionsEnabled: !0,
|
|
37
33
|
customConditionsEnabled: !0,
|
|
38
|
-
conditionCategories:
|
|
34
|
+
conditionCategories: k,
|
|
39
35
|
enableXSSSecurity: !0,
|
|
40
36
|
messageSettingsEnabled: !1,
|
|
41
37
|
selectBlockAfterDropFromSettingsPanel: !0,
|
|
38
|
+
...e ? { baseBlocks: e } : {},
|
|
42
39
|
editorFonts: {
|
|
43
40
|
showDefaultStandardFonts: !0,
|
|
44
41
|
showDefaultNotStandardFonts: !0,
|
|
@@ -46,25 +43,25 @@ const N = (a) => {
|
|
|
46
43
|
},
|
|
47
44
|
mergeTags: [
|
|
48
45
|
{
|
|
49
|
-
entries:
|
|
46
|
+
entries: F(d.preselectedDynamicContentList)
|
|
50
47
|
}
|
|
51
48
|
],
|
|
52
49
|
async onTokenRefreshRequest(o) {
|
|
53
50
|
try {
|
|
54
|
-
const
|
|
55
|
-
o(
|
|
56
|
-
} catch (
|
|
57
|
-
|
|
51
|
+
const s = await p();
|
|
52
|
+
o(s);
|
|
53
|
+
} catch (s) {
|
|
54
|
+
u(s, "Failed to refresh token");
|
|
58
55
|
}
|
|
59
56
|
},
|
|
60
57
|
onTemplateLoaded() {
|
|
61
58
|
try {
|
|
62
|
-
const { importCss: o } =
|
|
63
|
-
o(),
|
|
59
|
+
const { importCss: o } = w(), { activateCustomViewStyles: s } = y();
|
|
60
|
+
o(), s(), d.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
|
|
64
61
|
t.hasChanges = !1;
|
|
65
62
|
}, 1e3);
|
|
66
63
|
} catch (o) {
|
|
67
|
-
|
|
64
|
+
u(o, "Failed to load custom interface appearance");
|
|
68
65
|
}
|
|
69
66
|
},
|
|
70
67
|
onCodeEditorVisibilityChanged(o) {
|
|
@@ -79,41 +76,35 @@ const N = (a) => {
|
|
|
79
76
|
onDataChanged() {
|
|
80
77
|
t.hasChanges = !0;
|
|
81
78
|
},
|
|
82
|
-
onEvent:
|
|
79
|
+
onEvent: g,
|
|
83
80
|
ignoreClickOutsideSelectors: [
|
|
84
81
|
"#guido-dynamic-content-modal",
|
|
85
82
|
".in-on-board-wrapper",
|
|
86
83
|
".in-drawer__container"
|
|
87
84
|
],
|
|
88
|
-
extensions:
|
|
89
|
-
_,
|
|
90
|
-
h,
|
|
91
|
-
b,
|
|
92
|
-
V,
|
|
93
|
-
w
|
|
94
|
-
]
|
|
85
|
+
extensions: c
|
|
95
86
|
}
|
|
96
87
|
);
|
|
97
|
-
},
|
|
98
|
-
var
|
|
88
|
+
}, C = (r) => new Promise((i, t) => {
|
|
89
|
+
var c;
|
|
99
90
|
if (document.getElementById("UiEditorScript")) {
|
|
100
91
|
r(), i();
|
|
101
92
|
return;
|
|
102
93
|
}
|
|
103
|
-
const n = A.guido,
|
|
104
|
-
|
|
94
|
+
const n = A.guido, a = `https://email-static.useinsider.com/guido/${(c = n == null ? void 0 : n.stripo) == null ? void 0 : c.version}/UIEditor.js`, e = document.createElement("script");
|
|
95
|
+
e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
|
|
105
96
|
r(), i();
|
|
106
|
-
},
|
|
107
|
-
t(new Error(`Failed to load Stripo UIEditor script from S3: ${
|
|
108
|
-
}, document.body.appendChild(
|
|
97
|
+
}, e.onerror = () => {
|
|
98
|
+
t(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
99
|
+
}, document.body.appendChild(e);
|
|
109
100
|
});
|
|
110
101
|
return { initPlugin: async (r) => {
|
|
111
|
-
await
|
|
102
|
+
await C(async () => {
|
|
112
103
|
const i = await m();
|
|
113
|
-
|
|
104
|
+
await S(r, i);
|
|
114
105
|
});
|
|
115
106
|
} };
|
|
116
107
|
};
|
|
117
108
|
export {
|
|
118
|
-
|
|
109
|
+
L as useStripo
|
|
119
110
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { migrateCheckbox as
|
|
2
|
-
import { migrateCouponBlock as
|
|
1
|
+
import { migrateCheckbox as m } from "./checkboxMigrator.js";
|
|
2
|
+
import { migrateCouponBlock as o } from "./couponBlockMigrator.js";
|
|
3
3
|
import { migrateRadioButton as i } from "./radioButtonMigrator.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { migrateRecommendation as e } from "./recommendationMigrator.js";
|
|
5
|
+
import { migrateUnsubscribe as a } from "./unsubscribeMigrator.js";
|
|
6
|
+
const s = async (t) => {
|
|
6
7
|
let r = t;
|
|
7
|
-
return r =
|
|
8
|
+
return r = m(r), r = i(r), r = await a(r), r = o(r), r = e(r), r;
|
|
8
9
|
};
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
s as migrate
|
|
11
12
|
};
|