@useinsider/guido 3.19.0-beta.4b9be3a → 3.19.0-beta.575d19c
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 +21 -3
- package/dist/@types/config/schemas.js +76 -67
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +94 -91
- package/dist/components/organisms/AutoSaveController.vue2.js +18 -8
- package/dist/components/organisms/base/Toaster.vue2.js +13 -12
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +78 -57
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +28 -42
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
- package/dist/components/organisms/header/EditorActions.vue.js +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +35 -53
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -0
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +32 -23
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
- package/dist/components/organisms/header/RightSlot.vue.js +9 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +56 -34
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
- package/dist/composables/useAccessibilityApi.js +45 -0
- package/dist/composables/useActionsApi.js +44 -43
- package/dist/composables/useCodeEditorApi.js +23 -9
- package/dist/composables/useCortexBlueprintBridge.js +54 -120
- package/dist/composables/useCustomInterfaceAppearance.js +67 -52
- package/dist/composables/useEmailTemplateApplier.js +51 -96
- package/dist/composables/useHtmlValidator.js +87 -82
- package/dist/composables/useLegacyStrategyConversion.js +61 -0
- package/dist/composables/useRecommendation.js +40 -35
- package/dist/composables/useStripo.js +30 -30
- package/dist/composables/useToaster.js +14 -20
- package/dist/composables/useTranslations.js +3 -2
- package/dist/composables/useVersionHistoryApi.js +33 -24
- package/dist/config/i18n/en/labels.json.js +36 -4
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/enums/extensions/recommendationBlock.js +49 -33
- package/dist/extensions/Blocks/Recommendation/block.js +61 -42
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +100 -94
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +130 -55
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +273 -92
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +42 -0
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
- package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +46 -37
- package/dist/sprite.svg +6 -0
- package/dist/src/@types/config/schemas.d.ts +18 -0
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +3 -1
- package/dist/src/components/organisms/header/AutoSaveStatus.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +6 -0
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +3 -4
- package/dist/src/composables/useEmailTemplateApplier.d.ts +5 -26
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +7 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +162 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +32 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
- package/dist/src/services/recommendationApi.d.ts +2 -1
- package/dist/src/stores/config.d.ts +342 -0
- package/dist/src/stores/editor.d.ts +109 -0
- package/dist/src/stores/guido-email-editor.d.ts +10 -32
- package/dist/src/stores/onboarding.d.ts +1865 -136
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/stripoEditorApi.d.ts +4 -0
- package/dist/src/utils/timeUtil.d.ts +5 -0
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
- package/dist/static/assets/icons/line-info.svg.js +5 -0
- package/dist/static/styles/components/accessibility.css.js +234 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +104 -9
- package/dist/static/styles/components/skeleton.css.js +23 -0
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/stores/config.js +74 -60
- package/dist/stores/editor.js +7 -4
- package/dist/stores/guido-email-editor.js +1 -3
- package/dist/stores/onboarding.js +79 -47
- package/dist/stores/unsubscribe.js +3 -3
- package/dist/utils/stripoEditorApi.js +11 -0
- package/dist/utils/templatePreparation.js +55 -55
- package/dist/utils/timeUtil.js +6 -17
- package/package.json +1 -1
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
- /package/dist/src/components/organisms/{header/AutoSaveToggle.vue.d.ts → extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts} +0 -0
|
@@ -1,57 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { ToasterTypeOptions as
|
|
6
|
-
import { useRecommendationExtensionStore as
|
|
7
|
-
import {
|
|
8
|
-
import { escapeHtml as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as p, computed as a } from "vue";
|
|
2
|
+
import d from "../../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useToaster as l } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as y } from "../../../../composables/useTranslations.js";
|
|
5
|
+
import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
|
|
6
|
+
import { useRecommendationExtensionStore as f } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
7
|
+
import { commitStrategyChange as _ } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
|
|
8
|
+
import { escapeHtml as T } from "../../../../utils/htmlEscape.js";
|
|
9
|
+
const B = /* @__PURE__ */ p({
|
|
10
10
|
__name: "RemoveStrategyModal",
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
11
|
+
setup(v) {
|
|
12
|
+
const e = y(), t = f(), { showToaster: n } = l(), i = a(() => ({
|
|
13
13
|
cancelOrBackButton: {
|
|
14
14
|
type: "secondary",
|
|
15
|
-
labelText:
|
|
15
|
+
labelText: e("products.cancel"),
|
|
16
16
|
styling: "ghost"
|
|
17
17
|
},
|
|
18
18
|
primaryButton: {
|
|
19
19
|
type: "danger",
|
|
20
|
-
labelText:
|
|
20
|
+
labelText: e("discovery-strategy.remove")
|
|
21
21
|
}
|
|
22
|
-
})), m =
|
|
23
|
-
var
|
|
24
|
-
const { strategyId:
|
|
25
|
-
return ((
|
|
26
|
-
}),
|
|
27
|
-
|
|
22
|
+
})), m = a(() => {
|
|
23
|
+
var s;
|
|
24
|
+
const { strategyId: o } = t.recommendationConfigs;
|
|
25
|
+
return o ? ((s = t.assignedStrategy) == null ? void 0 : s.name) || `#${o}` : e("ds-steps.legacy-strategy");
|
|
26
|
+
}), r = "__STRATEGY_NAME__", g = a(() => e("email-editor.remove-strategy-confirm-message", { strategyName: r }).split(r)), c = () => {
|
|
27
|
+
t.closeRemoveStrategyModal();
|
|
28
28
|
};
|
|
29
|
-
return { __sfc: !0, trans:
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (a({
|
|
34
|
-
type: v.Success,
|
|
29
|
+
return { __sfc: !0, trans: e, store: t, showToaster: n, footerButtonOptions: i, strategyName: m, NAME_TOKEN: r, messageParts: g, close: c, handleConfirm: async () => {
|
|
30
|
+
const o = m.value, s = t.currentRecommendationId;
|
|
31
|
+
t.removeStrategy(), c(), n({
|
|
32
|
+
type: u.Success,
|
|
35
33
|
// The toast renders through a sanitizing v-html, so the name is escaped first.
|
|
36
|
-
message:
|
|
37
|
-
strategyName: `<b>${
|
|
34
|
+
message: e("email-editor.strategy-removed-success", {
|
|
35
|
+
strategyName: `<b>${T(o)}</b>`
|
|
38
36
|
})
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
await e.fetchRecommendationProducts();
|
|
42
|
-
} catch (p) {
|
|
43
|
-
console.error("[RemoveStrategyModal] product refetch failed", p);
|
|
44
|
-
}
|
|
45
|
-
h(
|
|
46
|
-
o,
|
|
47
|
-
{ strategyId: l, size: g },
|
|
48
|
-
e.recommendationProducts,
|
|
49
|
-
"Removed recommendation strategy"
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
}, WpModal: y };
|
|
37
|
+
}), s !== null && await _(s, "Removed recommendation strategy");
|
|
38
|
+
}, WpModal: d };
|
|
53
39
|
}
|
|
54
40
|
});
|
|
55
41
|
export {
|
|
56
|
-
|
|
42
|
+
B as default
|
|
57
43
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import t from "./AutoSaveStatus.vue2.js";
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var _ = function() {
|
|
4
|
+
var s = this, e = s._self._c, a = s._self._setupProxy;
|
|
5
|
+
return a.isFeatureEnabled("autosave") ? e("div", { staticClass: "d-f a-i-c auto-save-status" }, [a.autosaveStore.status === a.AUTOSAVE_STATUS.SAVING ? e("span", { staticClass: "d-f a-i-c f-s-1" }, [e(a.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), e("span", { staticClass: "ml-1 t-c-53" }, [s._v(s._s(a.trans("newsletter.saving")))])], 1) : a.savedLabel ? e("span", { staticClass: "f-s-1 t-c-53" }, [s._v(s._s(a.savedLabel.before)), a.savedLabel.word ? e("span", { staticClass: "f-w-600" }, [s._v(s._s(a.savedLabel.word))]) : s._e(), s._v(s._s(a.savedLabel.after))]) : s._e()]) : s._e();
|
|
6
|
+
}, n = [], o = /* @__PURE__ */ r(
|
|
7
|
+
t,
|
|
8
|
+
_,
|
|
9
|
+
n,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const v = o.exports;
|
|
15
|
+
export {
|
|
16
|
+
v as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as p, computed as S } from "vue";
|
|
2
|
+
import { useConfig as A } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useTranslations as T } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { useAutosaveStore as v, AUTOSAVE_STATUS as m } from "../../../stores/autosave.js";
|
|
5
|
+
import { autoSaveTimestamp as b } from "../../../utils/timeUtil.js";
|
|
6
|
+
import { InLoading as D } from "@useinsider/design-system-vue";
|
|
7
|
+
const j = /* @__PURE__ */ p({
|
|
8
|
+
__name: "AutoSaveStatus",
|
|
9
|
+
setup(O) {
|
|
10
|
+
const { isFeatureEnabled: u } = A(), a = v(), n = T(), t = "__BOLD_START__", o = "__BOLD_END__", s = (i) => i.split(t).join("").split(o).join(""), _ = S(() => {
|
|
11
|
+
if (a.status !== m.SAVED || !a.lastSavedAt)
|
|
12
|
+
return null;
|
|
13
|
+
const { isToday: i, time: c, date: f } = b(a.lastSavedAt), l = { boldStart: t, boldEnd: o }, e = i ? n("email-editor.autosaved-at-today", { ...l, time: c }) : n("email-editor.autosaved-at-date", { ...l, date: f }), r = e.indexOf(t), d = e.indexOf(o, r + t.length);
|
|
14
|
+
return r === -1 || d === -1 ? { before: s(e), word: "", after: "" } : {
|
|
15
|
+
before: s(e.slice(0, r)),
|
|
16
|
+
word: s(e.slice(r + t.length, d)),
|
|
17
|
+
after: s(e.slice(d + o.length))
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
return { __sfc: !0, isFeatureEnabled: u, autosaveStore: a, trans: n, BOLD_START: t, BOLD_END: o, stripMarkers: s, savedLabel: _, AUTOSAVE_STATUS: m, InLoading: D };
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
j as default
|
|
25
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./EditorActions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
return e("div", { staticClass: "d-f editor-actions" }, [t.
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var d = function() {
|
|
5
|
+
var o, s;
|
|
6
|
+
var i = this, e = i._self._c, t = i._self._setupProxy;
|
|
7
|
+
return e("div", { staticClass: "d-f a-i-c editor-actions" }, [t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), (s = (o = t.config) == null ? void 0 : o.features) != null && s.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", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : i._e(), e(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), t.editorStore.isPreviewModeOpen ? i._e() : e(t.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(n) {
|
|
8
8
|
return t.handleSave(!1);
|
|
9
|
-
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(
|
|
9
|
+
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(n) {
|
|
10
10
|
return t.executeSave(!1);
|
|
11
11
|
} } })], 1);
|
|
12
|
-
},
|
|
12
|
+
}, l = [], c = /* @__PURE__ */ a(
|
|
13
|
+
r,
|
|
14
|
+
d,
|
|
13
15
|
l,
|
|
14
|
-
u,
|
|
15
|
-
p,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"e1dde802"
|
|
19
19
|
);
|
|
20
|
-
const
|
|
20
|
+
const p = c.exports;
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
p as default
|
|
23
23
|
};
|
|
@@ -1,64 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActionsApi as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
const ft = /* @__PURE__ */ q({
|
|
1
|
+
import { defineComponent as C, ref as S } from "vue";
|
|
2
|
+
import { useActionsApi as T } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as M } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useTestEmailClick as x } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useHtmlCompiler as A } from "../../../composables/useHtmlCompiler.js";
|
|
6
|
+
import { useSave as F } from "../../../composables/useSave.js";
|
|
7
|
+
import { useToaster as V } from "../../../composables/useToaster.js";
|
|
8
|
+
import { useTranslations as q } from "../../../composables/useTranslations.js";
|
|
9
|
+
import { useLiquidValidator as w } from "../../../composables/validators/useLiquidValidator.js";
|
|
10
|
+
import { useEditorStore as H } from "../../../stores/editor.js";
|
|
11
|
+
import { useTemplateStore as k } from "../../../stores/template.js";
|
|
12
|
+
import { getTooltipOptions as L } from "../../../utils/tooltipUtils.js";
|
|
13
|
+
import { InButtonV2 as R } from "@useinsider/design-system-vue";
|
|
14
|
+
import { storeToRefs as b } from "pinia";
|
|
15
|
+
import z from "./EditorActionsMenu.vue.js";
|
|
16
|
+
import B from "./MigrationConfirmModal.vue.js";
|
|
17
|
+
const ot = /* @__PURE__ */ C({
|
|
19
18
|
__name: "EditorActions",
|
|
20
|
-
setup(
|
|
21
|
-
const { config:
|
|
22
|
-
if (e.isVersionHistoryOpen) {
|
|
23
|
-
d();
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
f();
|
|
27
|
-
}, C = async () => {
|
|
28
|
-
i.value = !0, await p(), i.value = !1;
|
|
29
|
-
}, A = () => {
|
|
30
|
-
e.isSaveAsTemplateDrawerOpen = !0;
|
|
31
|
-
}, M = w(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), O = w(
|
|
32
|
-
() => {
|
|
33
|
-
var t, o;
|
|
34
|
-
return ((o = (t = m.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
|
|
35
|
-
}
|
|
36
|
-
), E = async (t) => {
|
|
19
|
+
setup(D, { expose: E }) {
|
|
20
|
+
const { config: y, isFeatureEnabled: i } = M(), { save: s } = F(), { getCompiledEmail: n } = T(), { compileHtml: m } = A(), { validateLiquidSyntax: l } = w(), { handleError: r } = V(), e = H(), f = k(), { hasMigrations: u } = b(f), _ = q(), a = S(!1), c = S(), p = x(), d = async (t) => {
|
|
37
21
|
a.value = !0, t || (e.loadingStatus = !0);
|
|
38
22
|
let o;
|
|
39
23
|
try {
|
|
40
|
-
o = await
|
|
41
|
-
} catch (
|
|
42
|
-
|
|
43
|
-
throw n;
|
|
44
|
-
r(n, "Failed to save template");
|
|
24
|
+
o = await s(t);
|
|
25
|
+
} catch (v) {
|
|
26
|
+
r(v, "Failed to save template");
|
|
45
27
|
} finally {
|
|
46
28
|
a.value = !1, !t && !o && (e.loadingStatus = !1);
|
|
47
29
|
}
|
|
48
30
|
return o;
|
|
49
|
-
},
|
|
31
|
+
}, g = (t) => {
|
|
50
32
|
var o;
|
|
51
|
-
if (!t &&
|
|
52
|
-
(o =
|
|
33
|
+
if (!t && u.value) {
|
|
34
|
+
(o = c.value) == null || o.open();
|
|
53
35
|
return;
|
|
54
36
|
}
|
|
55
|
-
return
|
|
56
|
-
},
|
|
57
|
-
if (
|
|
37
|
+
return d(t);
|
|
38
|
+
}, h = async () => {
|
|
39
|
+
if (i("liquidSyntax")) {
|
|
58
40
|
e.loadingStatus = !0;
|
|
59
41
|
try {
|
|
60
|
-
const { html: t } = await
|
|
61
|
-
if (!await
|
|
42
|
+
const { html: t } = await n({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = m(t);
|
|
43
|
+
if (!await l(o))
|
|
62
44
|
return;
|
|
63
45
|
} catch (t) {
|
|
64
46
|
r(t, "Failed to prepare test email");
|
|
@@ -67,13 +49,13 @@ const ft = /* @__PURE__ */ q({
|
|
|
67
49
|
e.loadingStatus = !1;
|
|
68
50
|
}
|
|
69
51
|
}
|
|
70
|
-
|
|
52
|
+
p();
|
|
71
53
|
};
|
|
72
|
-
return
|
|
73
|
-
handleSave:
|
|
74
|
-
}), { __sfc: !0, config:
|
|
54
|
+
return E({
|
|
55
|
+
handleSave: g
|
|
56
|
+
}), { __sfc: !0, config: y, isFeatureEnabled: i, save: s, getCompiledEmail: n, compileHtml: m, validateLiquidSyntax: l, handleError: r, editorStore: e, templateStore: f, hasMigrations: u, trans: _, isSaving: a, migrationModalRef: c, testEmailClick: p, executeSave: d, handleSave: g, handleTestEmail: h, getTooltipOptions: L, InButtonV2: R, EditorActionsMenu: z, MigrationConfirmModal: B };
|
|
75
57
|
}
|
|
76
58
|
});
|
|
77
59
|
export {
|
|
78
|
-
|
|
60
|
+
ot as default
|
|
79
61
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import i from "./EditorActionsMenu.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return o("div", { staticClass: "editor-actions-menu p-r" }, [o(t.InButtonV2, { attrs: { id: "guido__kebab-button", "data-testid": "Editor Actions Menu", "left-icon": "line-more-vertical", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.isPanelOpen, "tooltip-options": t.getTooltipOptions("guido__kebab-button"), "tooltip-text": t.trans("email-editor.more-actions") }, on: { click: function(d) {
|
|
7
|
+
t.isOpen = !t.isOpen;
|
|
8
|
+
} } }), o(t.InDropdownMenu, { staticClass: "editor-actions-menu__dropdown", attrs: { id: "guido__kebab-menu", "box-width": "basedOnLongestItem", "static-position": "bottom right", "dynamic-position": !1, "max-height": 400, options: t.options, "select-all-option-status": !1, status: t.isPanelOpen }, on: { clickOutside: t.close, optionClick: t.handleOptionClick } })], 1);
|
|
9
|
+
}, a = [], r = /* @__PURE__ */ s(
|
|
10
|
+
i,
|
|
11
|
+
n,
|
|
12
|
+
a,
|
|
13
|
+
!1,
|
|
14
|
+
null,
|
|
15
|
+
"d0e6b57a"
|
|
16
|
+
);
|
|
17
|
+
const _ = r.exports;
|
|
18
|
+
export {
|
|
19
|
+
_ as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { defineComponent as D, ref as C, computed as i, watch as L } from "vue";
|
|
2
|
+
import { useAccessibilityApi as R } from "../../../composables/useAccessibilityApi.js";
|
|
3
|
+
import { useConfig as Y } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useExport as F } from "../../../composables/useExport.js";
|
|
5
|
+
import { useTranslations as N } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useVersionHistoryApi as U } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
+
import { useAutosaveStore as X } from "../../../stores/autosave.js";
|
|
8
|
+
import { useEditorStore as j } from "../../../stores/editor.js";
|
|
9
|
+
import { useOnboardingStore as q } from "../../../stores/onboarding.js";
|
|
10
|
+
import { getTooltipOptions as z } from "../../../utils/tooltipUtils.js";
|
|
11
|
+
import { InToggle as G, InDropdownMenu as J, InButtonV2 as K } from "@useinsider/design-system-vue";
|
|
12
|
+
const ce = /* @__PURE__ */ D({
|
|
13
|
+
__name: "EditorActionsMenu",
|
|
14
|
+
setup(Q) {
|
|
15
|
+
const c = "guido__kebab-autosave", u = "guido__kebab-version-history", d = "guido__kebab-accessibility", p = "guido__kebab-save-as", v = "guido__kebab-export", { config: m, isFeatureEnabled: b } = Y(), { exportHtml: y } = F(), { openVersionHistory: A, closeVersionHistory: S } = U(), { toggleAccessibilityTestingMode: _ } = R(), e = j(), a = X(), f = q(), o = N(), g = C(!1), M = i(() => g.value || f.isEditorActionsMenuPinned), r = C(!1), O = i(() => b("autosave")), x = i(
|
|
16
|
+
() => {
|
|
17
|
+
var t, s;
|
|
18
|
+
return !!((s = (t = m.value) == null ? void 0 : t.features) != null && s.versionHistory) && !e.isPreviewModeOpen;
|
|
19
|
+
}
|
|
20
|
+
), h = i(
|
|
21
|
+
() => b("accessibilityTesting") && !e.isPreviewModeOpen
|
|
22
|
+
), V = i(() => {
|
|
23
|
+
var t, s;
|
|
24
|
+
return !!((s = (t = m.value) == null ? void 0 : t.features) != null && s.saveAsTemplate);
|
|
25
|
+
}), E = i(() => O.value ? [
|
|
26
|
+
{ categoryText: o("email-editor.preferences") },
|
|
27
|
+
{
|
|
28
|
+
text: o("email-editor.auto-save"),
|
|
29
|
+
value: c,
|
|
30
|
+
disable: e.loadingStatus,
|
|
31
|
+
rightSlotComponent: G,
|
|
32
|
+
rightSlotProps: {
|
|
33
|
+
id: "guido__kebab-autosave-toggle",
|
|
34
|
+
name: "guido-kebab-autosave-toggle",
|
|
35
|
+
class: "p-e-n",
|
|
36
|
+
checked: a.isOn,
|
|
37
|
+
disable: e.loadingStatus
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{ divider: "solid" }
|
|
41
|
+
] : []), T = i(() => [
|
|
42
|
+
{ categoryText: o("email-editor.actions") },
|
|
43
|
+
...x.value ? [{
|
|
44
|
+
text: o("newsletter.version-history"),
|
|
45
|
+
value: u,
|
|
46
|
+
iconLeft: "line-architect-version-history",
|
|
47
|
+
disable: e.isVersionHistoryButtonDisabled
|
|
48
|
+
}] : [],
|
|
49
|
+
...h.value ? [{
|
|
50
|
+
text: o("email-editor.accessibility-test"),
|
|
51
|
+
value: d,
|
|
52
|
+
iconLeft: "line-accessibility",
|
|
53
|
+
disable: e.loadingStatus
|
|
54
|
+
}] : [],
|
|
55
|
+
...V.value ? [{
|
|
56
|
+
text: o("newsletter.save-templates"),
|
|
57
|
+
value: p,
|
|
58
|
+
iconLeft: "line-newsletter-save-as-template",
|
|
59
|
+
disable: e.isSaveAsButtonDisabled
|
|
60
|
+
}] : [],
|
|
61
|
+
{
|
|
62
|
+
text: o("email-editor.export-html"),
|
|
63
|
+
value: v,
|
|
64
|
+
iconLeft: "line-export",
|
|
65
|
+
disable: r.value || e.isExportButtonDisabled
|
|
66
|
+
}
|
|
67
|
+
]), P = i(() => [...E.value, ...T.value]), n = () => {
|
|
68
|
+
g.value = !1;
|
|
69
|
+
};
|
|
70
|
+
L(() => f.isEditorActionsMenuPinned, (t) => {
|
|
71
|
+
t || n();
|
|
72
|
+
});
|
|
73
|
+
const k = () => {
|
|
74
|
+
a.isOn = !a.isOn;
|
|
75
|
+
}, w = () => {
|
|
76
|
+
e.isVersionHistoryOpen ? S() : A(), n();
|
|
77
|
+
}, H = () => {
|
|
78
|
+
_(), n();
|
|
79
|
+
}, I = () => {
|
|
80
|
+
e.isSaveAsTemplateDrawerOpen = !0, n();
|
|
81
|
+
}, B = async () => {
|
|
82
|
+
r.value = !0, await y(), r.value = !1, n();
|
|
83
|
+
}, l = {
|
|
84
|
+
[c]: k,
|
|
85
|
+
[u]: w,
|
|
86
|
+
[d]: H,
|
|
87
|
+
[p]: I,
|
|
88
|
+
[v]: B
|
|
89
|
+
};
|
|
90
|
+
return { __sfc: !0, AUTOSAVE: c, VERSION_HISTORY: u, ACCESSIBILITY: d, SAVE_AS: p, EXPORT: v, config: m, isFeatureEnabled: b, exportHtml: y, openVersionHistory: A, closeVersionHistory: S, toggleAccessibilityTestingMode: _, editorStore: e, autosaveStore: a, onboardingStore: f, trans: o, isOpen: g, isPanelOpen: M, isExporting: r, isAutosaveVisible: O, isVersionHistoryVisible: x, isAccessibilityVisible: h, isSaveAsVisible: V, preferenceOptions: E, actionOptions: T, options: P, close: n, toggleAutosave: k, handleVersionHistory: w, handleAccessibility: H, handleSaveAs: I, handleExport: B, optionHandlers: l, handleOptionClick: ({ value: t }) => {
|
|
91
|
+
var s;
|
|
92
|
+
return (s = l[t]) == null ? void 0 : s.call(l);
|
|
93
|
+
}, getTooltipOptions: z, InButtonV2: K, InDropdownMenu: J };
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
export {
|
|
97
|
+
ce as default
|
|
98
|
+
};
|
|
@@ -3,16 +3,16 @@ import o from "./HeaderWrapper.vue2.js";
|
|
|
3
3
|
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
5
|
var t = this, r = t._self._c, e = t._self._setupProxy;
|
|
6
|
-
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0", "data-testid": "guido-header" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot
|
|
7
|
-
},
|
|
6
|
+
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0", "data-testid": "guido-header" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot)], 1)]);
|
|
7
|
+
}, n = [], d = /* @__PURE__ */ a(
|
|
8
8
|
o,
|
|
9
9
|
s,
|
|
10
|
-
|
|
10
|
+
n,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"3c713746"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = d.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { InContainer as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as o } from "vue";
|
|
2
|
+
import { InContainer as r } from "@useinsider/design-system-vue";
|
|
3
|
+
import t from "./LeftSlot.vue.js";
|
|
4
|
+
import e from "./MiddleSlot.vue.js";
|
|
5
|
+
import m from "./RightSlot.vue.js";
|
|
6
|
+
const s = /* @__PURE__ */ o({
|
|
7
7
|
__name: "HeaderWrapper",
|
|
8
|
-
setup(
|
|
9
|
-
|
|
10
|
-
return r({
|
|
11
|
-
// Stryker disable next-line OptionalChaining: RightSlot is always rendered (no
|
|
12
|
-
// v-if), so rightSlotRef.value is never null and `?.` cannot short-circuit.
|
|
13
|
-
handleSave: (t) => {
|
|
14
|
-
var o;
|
|
15
|
-
return (o = e.value) == null ? void 0 : o.handleSave(t);
|
|
16
|
-
}
|
|
17
|
-
}), { __sfc: !0, rightSlotRef: e, InContainer: a, LeftSlot: f, MiddleSlot: p, RightSlot: i };
|
|
8
|
+
setup(p) {
|
|
9
|
+
return { __sfc: !0, InContainer: r, LeftSlot: t, MiddleSlot: e, RightSlot: m };
|
|
18
10
|
}
|
|
19
11
|
});
|
|
20
12
|
export {
|
|
21
|
-
|
|
13
|
+
s as default
|
|
22
14
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import o from "./LeftSlot.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
5
|
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
6
6
|
return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "ghost", type: "secondary", "disabled-status": t.isBackButtonDisabled, "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } })], 1);
|
|
7
|
-
}, i = [], r = /* @__PURE__ */
|
|
7
|
+
}, i = [], r = /* @__PURE__ */ n(
|
|
8
8
|
o,
|
|
9
|
-
|
|
9
|
+
a,
|
|
10
10
|
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"15610de9"
|
|
14
14
|
);
|
|
15
15
|
const f = r.exports;
|
|
16
16
|
export {
|
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent as p, computed as d, ref as b } from "vue";
|
|
2
|
+
import { useAccessibilityApi as k } from "../../../composables/useAccessibilityApi.js";
|
|
3
|
+
import { useConfig as B } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useBack as y } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { usePreviewMode as v } from "../../../composables/usePreviewMode.js";
|
|
6
|
+
import { useTranslations as A } from "../../../composables/useTranslations.js";
|
|
6
7
|
import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import { InButtonV2 as
|
|
9
|
-
import { useDebounceFn as
|
|
10
|
-
const
|
|
8
|
+
import { useEditorStore as g } from "../../../stores/editor.js";
|
|
9
|
+
import { InButtonV2 as O } from "@useinsider/design-system-vue";
|
|
10
|
+
import { useDebounceFn as M } from "../../../node_modules/@vueuse/shared/index.js";
|
|
11
|
+
const F = /* @__PURE__ */ p({
|
|
11
12
|
__name: "LeftSlot",
|
|
12
|
-
setup(
|
|
13
|
-
const e =
|
|
14
|
-
var
|
|
15
|
-
return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (
|
|
16
|
-
}),
|
|
13
|
+
setup(V) {
|
|
14
|
+
const e = g(), s = y(), { closeVersionHistory: r } = _(), { closePreviewMode: n } = v(), { closeAccessibilityTestingMode: c } = k(), o = A(), { config: t } = B(), m = d(() => {
|
|
15
|
+
var l, f;
|
|
16
|
+
return e.isVersionHistoryOpen || e.isPreviewModeOpen || e.isAccessibilityTestingOpen ? o("email-editor.back-to-editor") : (f = (l = t.value) == null ? void 0 : l.ui) != null && f.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
|
|
17
|
+
}), i = b(!1), a = () => {
|
|
17
18
|
if (e.isVersionHistoryOpen) {
|
|
18
|
-
|
|
19
|
+
r();
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
21
22
|
if (e.isPreviewModeOpen) {
|
|
22
|
-
|
|
23
|
+
n();
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
if (e.isAccessibilityTestingOpen) {
|
|
27
|
+
c();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
s();
|
|
31
|
+
}, u = M(() => {
|
|
32
|
+
try {
|
|
33
|
+
a();
|
|
34
|
+
} finally {
|
|
35
|
+
i.value = !1;
|
|
36
|
+
}
|
|
28
37
|
}, 500);
|
|
29
|
-
return { __sfc: !0, editorStore: e, handleBack:
|
|
30
|
-
|
|
31
|
-
}, InButtonV2:
|
|
38
|
+
return { __sfc: !0, editorStore: e, handleBack: s, closeVersionHistory: r, closePreviewMode: n, closeAccessibilityTestingMode: c, trans: o, config: t, backButtonLabel: m, isBackButtonDisabled: i, executeBackAction: a, debouncedBackAction: u, handleBackClick: () => {
|
|
39
|
+
i.value = !0, u();
|
|
40
|
+
}, InButtonV2: O };
|
|
32
41
|
}
|
|
33
42
|
});
|
|
34
43
|
export {
|
|
35
|
-
|
|
44
|
+
F as default
|
|
36
45
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import r from "./MiddleSlot.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var t = function() {
|
|
4
|
-
var o = this,
|
|
5
|
-
return
|
|
4
|
+
var o = this, i = o._self._c, e = o._self._setupProxy;
|
|
5
|
+
return i("div", { staticClass: "d-f a-i-c" }, [e.editorStore.isVersionHistoryOpen ? i("div", { staticClass: "d-f" }, [i(e.VersionHistory), i(e.VersionHistoryViewOptions)], 1) : e.editorStore.isPreviewModeOpen ? i("div", { staticClass: "d-f" }, [i(e.EmailSizeIndicator), i(e.AmpToggle)], 1) : e.editorStore.isAccessibilityTestingOpen ? i(e.AccessibilityToolbar) : o._e(), i(e.EditorToolbar, { directives: [{ name: "show", rawName: "v-show", value: e.editorStore.isEditorToolbarVisible, expression: "editorStore.isEditorToolbarVisible" }] })], 1);
|
|
6
6
|
}, a = [], n = /* @__PURE__ */ s(
|
|
7
7
|
r,
|
|
8
8
|
t,
|
|
@@ -11,7 +11,7 @@ var t = function() {
|
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const _ = n.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
_ as default
|
|
17
17
|
};
|
|
@@ -2,15 +2,16 @@ import { defineComponent as o } from "vue";
|
|
|
2
2
|
import r from "../email-preview/amp/AmpToggle.vue.js";
|
|
3
3
|
import t from "../email-preview/desktop-preview/EmailSizeIndicator.vue.js";
|
|
4
4
|
import { useEditorStore as i } from "../../../stores/editor.js";
|
|
5
|
-
import e from "./
|
|
6
|
-
import m from "./
|
|
7
|
-
import p from "./version-history/
|
|
8
|
-
|
|
5
|
+
import e from "./accessibility/AccessibilityToolbar.vue.js";
|
|
6
|
+
import m from "./EditorToolbar.vue.js";
|
|
7
|
+
import p from "./version-history/VersionHistory.vue.js";
|
|
8
|
+
import s from "./version-history/ViewOptions.vue.js";
|
|
9
|
+
const y = /* @__PURE__ */ o({
|
|
9
10
|
__name: "MiddleSlot",
|
|
10
|
-
setup(
|
|
11
|
-
return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t,
|
|
11
|
+
setup(f) {
|
|
12
|
+
return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t, AccessibilityToolbar: e, EditorToolbar: m, VersionHistory: p, VersionHistoryViewOptions: s };
|
|
12
13
|
}
|
|
13
14
|
});
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
y as default
|
|
16
17
|
};
|