@useinsider/guido 3.20.1-beta.8dc88d5 → 3.20.1-beta.92564e2
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 +1 -0
- package/dist/@types/config/schemas.js +38 -37
- package/dist/@types/display-condition.js +25 -0
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +85 -90
- package/dist/components/organisms/AutoSaveController.vue2.js +9 -19
- package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +20 -0
- package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +30 -0
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +30 -0
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +71 -0
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +34 -0
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +57 -0
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +17 -0
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
- package/dist/components/organisms/header/EditorActions.vue.js +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +72 -57
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +17 -9
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +23 -28
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +7 -8
- package/dist/components/organisms/header/RightSlot.vue.js +8 -9
- package/dist/components/organisms/header/RightSlot.vue2.js +18 -13
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +38 -56
- package/dist/composables/useBlocksConfig.js +32 -24
- package/dist/composables/useCustomInterfaceAppearance.js +41 -42
- package/dist/composables/useDisplayConditions.js +102 -0
- package/dist/composables/useLegacyStrategyConversion.js +16 -16
- package/dist/composables/useStripo.js +4 -3
- package/dist/config/i18n/en/labels.json.js +4 -36
- package/dist/config/i18n/en/tooltips.json.js +1 -2
- package/dist/enums/academy.js +1 -0
- package/dist/enums/display-condition.js +12 -0
- package/dist/extensions/Blocks/Items/block.js +43 -42
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +296 -223
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +219 -205
- package/dist/extensions/Blocks/Recommendation/utils/blockRefresh.js +19 -0
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +51 -36
- package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +31 -35
- package/dist/extensions/DisplayConditions/bridge.js +17 -0
- package/dist/extensions/DisplayConditions/constants.js +17 -0
- package/dist/extensions/DisplayConditions/control.js +178 -0
- package/dist/extensions/DisplayConditions/display-conditions.css.js +201 -0
- package/dist/extensions/DisplayConditions/extension.js +28 -0
- package/dist/extensions/DisplayConditions/iconsRegistry.js +20 -0
- package/dist/extensions/DisplayConditions/library.js +27 -0
- package/dist/extensions/DisplayConditions/settingsPanel.js +17 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +272 -192
- package/dist/node_modules/valibot/dist/index.js +297 -261
- package/dist/package.json.js +1 -1
- package/dist/services/displayConditionApi.js +39 -0
- package/dist/sprite.svg +0 -10
- package/dist/src/@types/config/schemas.d.ts +4 -2
- package/dist/src/@types/display-condition.d.ts +59 -0
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +1 -19
- package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +43 -0
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +19 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +19 -1
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +2 -2
- package/dist/src/composables/useDisplayConditions.d.ts +16 -0
- package/dist/src/enums/academy.d.ts +1 -0
- package/dist/src/enums/display-condition.d.ts +15 -0
- package/dist/src/extensions/Blocks/Checkbox/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +8 -0
- package/dist/src/extensions/Blocks/Items/controls/index.d.ts +40 -0
- package/dist/src/extensions/Blocks/RadioButton/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +18 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +8 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/blockRefresh.d.ts +17 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/nodeConfigWriter.d.ts +7 -0
- package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/controlFactories.d.ts +22 -0
- package/dist/src/extensions/DisplayConditions/bridge.d.ts +6 -0
- package/dist/src/extensions/DisplayConditions/constants.d.ts +14 -0
- package/dist/src/extensions/DisplayConditions/control.d.ts +23 -0
- package/dist/src/extensions/DisplayConditions/extension.d.ts +2 -0
- package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/DisplayConditions/library.d.ts +8 -0
- package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +5 -0
- package/dist/src/mock/api/display-conditions.d.ts +2 -0
- package/dist/src/services/displayConditionApi.d.ts +8 -0
- package/dist/src/stores/autosave.d.ts +1 -73
- package/dist/src/stores/config.d.ts +166 -20
- package/dist/src/stores/display-condition.d.ts +81 -0
- package/dist/src/stores/editor.d.ts +0 -109
- package/dist/src/stores/onboarding.d.ts +21 -952
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/displayCondition.d.ts +10 -0
- package/dist/src/utils/protectTableText.d.ts +2 -0
- package/dist/src/utils/timeUtil.d.ts +0 -5
- package/dist/static/styles/components/button.css.js +5 -0
- package/dist/static/styles/variables.css.js +0 -2
- package/dist/stores/autosave.js +7 -12
- package/dist/stores/config.js +7 -0
- package/dist/stores/display-condition.js +28 -0
- package/dist/stores/editor.js +4 -7
- package/dist/stores/onboarding.js +21 -43
- package/dist/utils/displayCondition.js +26 -0
- package/dist/utils/pairProductVariables.js +15 -14
- package/dist/utils/protectTableText.js +22 -0
- package/dist/utils/timeUtil.js +17 -6
- package/package.json +3 -3
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -25
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -98
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -22
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -19
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -90
- package/dist/composables/useAccessibilityApi.js +0 -45
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useAccessibilityApi.d.ts +0 -13
- package/dist/static/styles/components/accessibility.css.js +0 -234
- /package/dist/src/components/organisms/{header/AutoSaveStatus.vue.d.ts → display-conditions/DisplayConditionCreateDrawer.vue.d.ts} +0 -0
- /package/dist/src/components/organisms/{header/EditorActionsMenu.vue.d.ts → display-conditions/DisplayConditionSelectDrawer.vue.d.ts} +0 -0
- /package/dist/src/components/organisms/{header/accessibility/AccessibilityToolbar.vue.d.ts → display-conditions/DisplayConditionsHost.vue.d.ts} +0 -0
- /package/dist/src/components/organisms/header/{accessibility/ColorVisionSelect.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as s, computed as u } from "vue";
|
|
2
|
+
import { InCodeSnippet as i } from "@useinsider/design-system-vue";
|
|
3
|
+
const m = /* @__PURE__ */ s({
|
|
4
|
+
__name: "CodeEditorField",
|
|
5
|
+
props: {
|
|
6
|
+
id: null,
|
|
7
|
+
label: null,
|
|
8
|
+
value: null,
|
|
9
|
+
placeholder: { default: "" },
|
|
10
|
+
error: { default: "" },
|
|
11
|
+
disabled: { type: Boolean, default: !1 }
|
|
12
|
+
},
|
|
13
|
+
emits: ["input"],
|
|
14
|
+
setup(t, { expose: n, emit: d }) {
|
|
15
|
+
const l = t;
|
|
16
|
+
let e = null;
|
|
17
|
+
const a = u(() => ({
|
|
18
|
+
mode: "liquid",
|
|
19
|
+
lint: !1,
|
|
20
|
+
foldGutter: !1,
|
|
21
|
+
placeholder: l.placeholder
|
|
22
|
+
})), r = (p) => {
|
|
23
|
+
e = p;
|
|
24
|
+
}, o = () => (e == null ? void 0 : e.state.doc.toString()) ?? l.value;
|
|
25
|
+
return n({ read: o }), { __sfc: !0, props: l, emit: d, view: e, options: a, onReady: r, read: o, InCodeSnippet: i };
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
m as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import a from "./DisplayConditionCreateDrawer.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var i = this, t = i._self._c, e = i._self._setupProxy;
|
|
6
|
+
return t(e.WpDrawer, { attrs: { id: "guido__display-condition-create-drawer", "description-status": "", "class-name": "guido-display-condition-create-drawer", size: "large", "close-on-outside-click": !1, "description-text": e.descriptionText, "footer-button-group-options": e.footerButtonGroupOptions, status: e.store.isCreateOpen, "title-text": e.trans(`${e.KEY}.create-title`) }, on: { cancelOrBackButtonEvent: e.close, onCloseEvent: e.close, primaryButtonEvent: function(o) {
|
|
7
|
+
return e.submit("inline");
|
|
8
|
+
}, secondaryButtonEvent: function(o) {
|
|
9
|
+
return e.submit("save");
|
|
10
|
+
} } }, [t("div", { staticClass: "guido-display-condition-create" }, [t(e.InBasicTextInput, { staticClass: "mb-4 w-1", attrs: { id: "guido__display-condition-name-input", name: "displayConditionName", "character-counter-status": !1, "disabled-status": e.isSaving, "label-text": e.trans(`${e.KEY}.condition-name`), "max-character-length": e.DISPLAY_CONDITION_LIMITS.NAME_MAX, "placeholder-text": e.trans(`${e.KEY}.condition-name-placeholder`), "state-message": e.errors.name || "", states: e.errors.name ? "error" : "default", "tooltip-status": !1, value: e.draft.name }, on: { input: function(o) {
|
|
11
|
+
return e.updateField("name", o);
|
|
12
|
+
} } }), t(e.InBasicTextInput, { staticClass: "mb-4 w-1", attrs: { id: "guido__display-condition-description-input", name: "displayConditionDescription", "character-counter-status": !1, "disabled-status": e.isSaving, "label-text": e.descriptionLabel, "max-character-length": e.DISPLAY_CONDITION_LIMITS.DESCRIPTION_MAX, "placeholder-text": e.trans(`${e.KEY}.condition-description-placeholder`), "state-message": e.errors.description || "", states: e.errors.description ? "error" : "default", "tooltip-status": !1, value: e.draft.description }, on: { input: function(o) {
|
|
13
|
+
return e.updateField("description", o);
|
|
14
|
+
} } }), t("div", { staticClass: "guido-display-condition-create__separator" }), t("p", { staticClass: "guido-display-condition-create__method-title" }, [i._v(" " + i._s(e.trans(`${e.KEY}.select-method`)) + " ")]), t("div", { staticClass: "guido-display-condition-create__methods" }, [t(e.InRadioButton, { attrs: { id: "guido__display-condition-method-logic-builder", disable: "", disabled: "", name: "displayConditionMethod", selected: "codeOnly", value: "logicBuilder", label: e.trans(`${e.KEY}.logic-builder`) } }), t(e.InRadioButton, { attrs: { id: "guido__display-condition-method-code-only", name: "displayConditionMethod", selected: "codeOnly", value: "codeOnly", label: e.trans(`${e.KEY}.code-only`) } })], 1), t(e.CodeEditorField, { ref: "codeBeforeRef", staticClass: "mb-3", attrs: { id: "guido__display-condition-code-before", disabled: e.isSaving, error: e.errors.codeBefore, label: e.trans(`${e.KEY}.code-before`), placeholder: e.trans(`${e.KEY}.code-placeholder`), value: e.draft.codeBefore }, on: { input: function(o) {
|
|
15
|
+
return e.updateField("codeBefore", o);
|
|
16
|
+
} } }), t(e.CodeEditorField, { ref: "codeAfterRef", attrs: { id: "guido__display-condition-code-after", disabled: e.isSaving, error: e.errors.codeAfter, label: e.trans(`${e.KEY}.code-after`), placeholder: e.trans(`${e.KEY}.code-placeholder`), value: e.draft.codeAfter }, on: { input: function(o) {
|
|
17
|
+
return e.updateField("codeAfter", o);
|
|
18
|
+
} } })], 1)]);
|
|
19
|
+
}, s = [], d = /* @__PURE__ */ r(
|
|
20
|
+
a,
|
|
21
|
+
n,
|
|
22
|
+
s,
|
|
23
|
+
!1,
|
|
24
|
+
null,
|
|
25
|
+
"a4b2ccb9"
|
|
26
|
+
);
|
|
27
|
+
const f = d.exports;
|
|
28
|
+
export {
|
|
29
|
+
f as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { defineComponent as D, reactive as $, ref as s, watch as C, computed as u } from "vue";
|
|
2
|
+
import O from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import { useDisplayConditions as T } from "../../../composables/useDisplayConditions.js";
|
|
4
|
+
import { useTranslations as L } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ACADEMY_LINKS as x } from "../../../enums/academy.js";
|
|
6
|
+
import { DISPLAY_CONDITION_LIMITS as h } from "../../../enums/display-condition.js";
|
|
7
|
+
import { useDisplayConditionStore as k } from "../../../stores/display-condition.js";
|
|
8
|
+
import { InRadioButton as N, InBasicTextInput as w } from "@useinsider/design-system-vue";
|
|
9
|
+
import E from "./CodeEditorField.vue.js";
|
|
10
|
+
const J = /* @__PURE__ */ D({
|
|
11
|
+
__name: "DisplayConditionCreateDrawer",
|
|
12
|
+
setup(Y) {
|
|
13
|
+
const r = "email-editor.display-conditions", i = L(), c = k(), { validate: p, notifyInvalid: l, createInline: f, createAndSave: m, cancel: y } = T(), d = () => ({ name: "", description: "", codeBefore: "", codeAfter: "" }), e = $(d()), o = s({}), a = s(!1), v = s(), _ = s();
|
|
14
|
+
C(() => c.isCreateOpen, (n) => {
|
|
15
|
+
if (!n)
|
|
16
|
+
return;
|
|
17
|
+
const { editing: t } = c;
|
|
18
|
+
Object.assign(e, t ? {
|
|
19
|
+
name: t.name,
|
|
20
|
+
description: t.description,
|
|
21
|
+
codeBefore: t.beforeScript,
|
|
22
|
+
codeAfter: t.afterScript
|
|
23
|
+
} : d()), o.value = {}, a.value = !1;
|
|
24
|
+
}, { immediate: !0 });
|
|
25
|
+
const g = u(() => i(`${r}.create-description`, {
|
|
26
|
+
academyLink: `<a href="${x.EMAIL_DISPLAY_CONDITIONS}" class="guido-display-condition-academy" target="_blank">${i(`${r}.academy`)}</a>`
|
|
27
|
+
})), S = u(() => ({
|
|
28
|
+
cancelOrBackButton: {
|
|
29
|
+
styling: "ghost",
|
|
30
|
+
type: "secondary",
|
|
31
|
+
labelText: i(`${r}.cancel`),
|
|
32
|
+
disabledStatus: a.value
|
|
33
|
+
},
|
|
34
|
+
secondaryButton: {
|
|
35
|
+
styling: "solid",
|
|
36
|
+
type: "subtle-primary",
|
|
37
|
+
labelText: i(`${r}.create-and-save`),
|
|
38
|
+
loadingStatus: a.value
|
|
39
|
+
},
|
|
40
|
+
primaryButton: {
|
|
41
|
+
styling: "solid",
|
|
42
|
+
type: "primary",
|
|
43
|
+
labelText: i(`${r}.create`),
|
|
44
|
+
disabledStatus: a.value
|
|
45
|
+
}
|
|
46
|
+
})), B = (n, t) => {
|
|
47
|
+
t !== e[n] && (e[n] = t, o.value[n] && (o.value = { ...o.value, [n]: void 0 }));
|
|
48
|
+
}, A = u(() => `${i(`${r}.condition-description`)} <span class="guido-display-condition-create__optional">(${i(`${r}.optional`)})</span>`);
|
|
49
|
+
return { __sfc: !0, KEY: r, trans: i, store: c, validate: p, notifyInvalid: l, createInline: f, createAndSave: m, cancel: y, emptyDraft: d, draft: e, errors: o, isSaving: a, codeBeforeRef: v, codeAfterRef: _, descriptionText: g, footerButtonGroupOptions: S, updateField: B, descriptionLabel: A, submit: async (n) => {
|
|
50
|
+
var I, b;
|
|
51
|
+
if (a.value)
|
|
52
|
+
return;
|
|
53
|
+
if (e.codeBefore = ((I = v.value) == null ? void 0 : I.read()) ?? e.codeBefore, e.codeAfter = ((b = _.value) == null ? void 0 : b.read()) ?? e.codeAfter, o.value = p(e), Object.keys(o.value).length) {
|
|
54
|
+
l();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (n === "inline") {
|
|
58
|
+
f({ ...e });
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
a.value = !0;
|
|
62
|
+
const t = await m({ ...e });
|
|
63
|
+
a.value = !1, o.value = t ?? {}, Object.keys(o.value).length && l();
|
|
64
|
+
}, close: () => {
|
|
65
|
+
a.value || y();
|
|
66
|
+
}, WpDrawer: O, DISPLAY_CONDITION_LIMITS: h, InBasicTextInput: w, InRadioButton: N, CodeEditorField: E };
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
export {
|
|
70
|
+
J as default
|
|
71
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import a from "./DisplayConditionSelectDrawer.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var d = function() {
|
|
5
|
+
var s = this, i = s._self._c, t = s._self._setupProxy;
|
|
6
|
+
return i("div", { staticClass: "guido-display-condition-select-root" }, [i(t.WpDrawer, { attrs: { id: "guido__display-condition-select-drawer", "description-status": "", "class-name": "guido-display-condition-select-drawer", size: "large", "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, status: t.store.isSelectOpen, "title-text": t.trans(`${t.KEY}.select-title`) }, on: { cancelOrBackButtonEvent: t.cancel, onCloseEvent: t.cancel } }, [i("div", { staticClass: "guido-display-condition-select" }, [t.store.listStatus === "loaded" && t.store.list.length ? i(t.InBasicTextInput, { staticClass: "mb-4 w-1", attrs: { id: "guido__display-condition-search-input", name: "displayConditionSearch", "character-counter-status": !1, "label-status": !1, "placeholder-text": t.trans(`${t.KEY}.search`), "tooltip-status": !1, value: t.search }, on: { input: function(e) {
|
|
7
|
+
t.search = e;
|
|
8
|
+
} } }) : s._e(), t.store.listStatus === "loading" || t.store.listStatus === "idle" ? i("div", { staticClass: "guido-display-condition-select__list", attrs: { "data-testid": "display-condition-loading" } }, s._l(t.SKELETON_HEIGHTS, function(e, n) {
|
|
9
|
+
return i(t.InSkeleton, { key: n, attrs: { sizing: { width: 856, height: e } } });
|
|
10
|
+
}), 1) : t.store.listStatus === "error" ? i(t.InNoData, { attrs: { id: "guido__display-condition-error", "button-status": "", icon: "no-data", "button-text": t.trans(`${t.KEY}.retry`), description: t.trans(`${t.KEY}.error-load`), title: t.trans(`${t.KEY}.error-load-title`) }, on: { click: t.loadList } }) : t.store.list.length ? t.filteredList.length ? i("ul", { staticClass: "guido-display-condition-select__list" }, s._l(t.filteredList, function(e) {
|
|
11
|
+
return i("li", { key: e.id, staticClass: "guido-display-condition-card", attrs: { "data-condition-id": e.id } }, [i("div", { staticClass: "guido-display-condition-card__header" }, [i("div", { staticClass: "guido-display-condition-card__text" }, [i("p", { staticClass: "guido-display-condition-card__name" }, [s._v(" " + s._s(e.name) + " ")]), e.description ? i("p", { staticClass: "guido-display-condition-card__description" }, [s._v(" " + s._s(e.description) + " ")]) : s._e()]), i("div", { staticClass: "guido-display-condition-card__actions" }, [i("div", { staticClass: "guido-display-condition-card__split" }, [i(t.InButtonV2, { attrs: { id: `guido__display-condition-select-${e.id}`, type: "subtle-primary", "label-text": t.trans(`${t.KEY}.select`) }, on: { click: function(n) {
|
|
12
|
+
return t.select(e);
|
|
13
|
+
} } }), i(t.InButtonV2, { attrs: { id: `guido__display-condition-menu-${e.id}`, "left-icon": "filled-dropdown-down", type: "subtle-primary", "label-text-status": !1 }, on: { click: function(n) {
|
|
14
|
+
return t.toggleMenu(e);
|
|
15
|
+
} } }), t.menuId === e.id ? i("div", { staticClass: "guido-display-condition-card__menu" }, [i("button", { staticClass: "guido-display-condition-card__menu-item", attrs: { id: `guido__display-condition-delete-${e.id}`, type: "button" }, on: { click: function(n) {
|
|
16
|
+
return t.requestDelete(e);
|
|
17
|
+
} } }, [s._v(" " + s._s(t.trans(`${t.KEY}.delete`)) + " ")])]) : s._e()], 1), i("span", { staticClass: "guido-display-condition-card__divider" }), i("button", { staticClass: "guido-display-condition-card__expand", attrs: { id: `guido__display-condition-expand-${e.id}`, type: "button", "aria-expanded": t.expandedId === e.id ? "true" : "false", "aria-label": t.trans(`${t.KEY}.preview`) }, on: { click: function(n) {
|
|
18
|
+
return t.toggleExpanded(e);
|
|
19
|
+
} } }, [i(t.InIcons, { attrs: { name: t.expandedId === e.id ? "filled-dropdown-up" : "filled-dropdown-down" } })], 1)])]), t.expandedId === e.id ? i("pre", { staticClass: "guido-display-condition-card__code" }, [s._v(s._s(t.codeOf(e)))]) : s._e()]);
|
|
20
|
+
}), 0) : i(t.InNoData, { attrs: { id: "guido__display-condition-no-result", icon: "no-data", title: t.trans(`${t.KEY}.no-result`) } }) : i(t.InNoData, { attrs: { id: "guido__display-condition-empty", "button-status": "", icon: "no-personalization", "button-text": t.trans(`${t.KEY}.create-new`), description: t.trans(`${t.KEY}.empty-description`), title: t.trans(`${t.KEY}.empty-title`) }, on: { click: function(e) {
|
|
21
|
+
return t.store.openCreate();
|
|
22
|
+
} } })], 1)]), t.store.pendingDelete ? i("div", { staticClass: "guido-display-condition-select__delete-modal" }, [i(t.WpModal, { attrs: { id: "guido__display-condition-delete-modal", size: "X-small", state: "danger", "close-on-outside-click": !1, "footer-button-options": t.deleteModalButtons, title: t.trans(`${t.KEY}.delete-confirm-title`) }, on: { close: t.closeDeleteModal, "primary-action": t.confirmDelete } }, [i("p", { staticClass: "guido-display-condition-select__delete-text" }, [s._v(" " + s._s(t.trans(`${t.KEY}.delete-confirm-description`, { name: t.store.pendingDelete.name })) + " ")])])], 1) : s._e()], 1);
|
|
23
|
+
}, l = [], c = /* @__PURE__ */ o(
|
|
24
|
+
a,
|
|
25
|
+
d,
|
|
26
|
+
l,
|
|
27
|
+
!1,
|
|
28
|
+
null,
|
|
29
|
+
"10ac7a13"
|
|
30
|
+
);
|
|
31
|
+
const y = c.exports;
|
|
32
|
+
export {
|
|
33
|
+
y as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineComponent as _, ref as i, watch as S, computed as c } from "vue";
|
|
2
|
+
import B from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import L from "../../wrappers/WpModal.vue.js";
|
|
4
|
+
import { useDisplayConditions as x } from "../../../composables/useDisplayConditions.js";
|
|
5
|
+
import { useTranslations as O } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { ACADEMY_LINKS as T } from "../../../enums/academy.js";
|
|
7
|
+
import { useDisplayConditionStore as $ } from "../../../stores/display-condition.js";
|
|
8
|
+
import { InSkeleton as C, InNoData as E, InIcons as M, InButtonV2 as b, InBasicTextInput as k } from "@useinsider/design-system-vue";
|
|
9
|
+
const J = /* @__PURE__ */ _({
|
|
10
|
+
__name: "DisplayConditionSelectDrawer",
|
|
11
|
+
setup(h) {
|
|
12
|
+
const o = "email-editor.display-conditions", m = [40, 76, 76, 76], l = O(), t = $(), { loadList: d, select: f, deleteSaved: u, cancel: g } = x(), r = i(""), s = i(null), a = i(null), n = i(!1);
|
|
13
|
+
S(() => t.isSelectOpen, (e) => {
|
|
14
|
+
e && (r.value = "", s.value = null, a.value = null, d());
|
|
15
|
+
}, { immediate: !0 });
|
|
16
|
+
const D = c(() => {
|
|
17
|
+
const e = r.value.trim().toLocaleLowerCase();
|
|
18
|
+
return e ? t.list.filter((p) => `${p.name} ${p.description}`.toLocaleLowerCase().includes(e)) : t.list;
|
|
19
|
+
}), v = c(() => l(`${o}.select-description`, {
|
|
20
|
+
academyLink: `<a href="${T.EMAIL_DISPLAY_CONDITIONS}" class="guido-display-condition-academy" target="_blank">${l(`${o}.academy`)}</a>`
|
|
21
|
+
})), y = c(() => ({
|
|
22
|
+
cancelOrBackButton: {
|
|
23
|
+
styling: "ghost",
|
|
24
|
+
type: "secondary",
|
|
25
|
+
labelText: l(`${o}.back`),
|
|
26
|
+
leftIcon: "line-arrow-left"
|
|
27
|
+
}
|
|
28
|
+
})), I = c(() => ({
|
|
29
|
+
cancelOrBackButton: {
|
|
30
|
+
type: "secondary",
|
|
31
|
+
styling: "ghost",
|
|
32
|
+
labelText: l(`${o}.cancel`),
|
|
33
|
+
disabledStatus: n.value
|
|
34
|
+
},
|
|
35
|
+
primaryButton: {
|
|
36
|
+
type: "danger",
|
|
37
|
+
labelText: l(`${o}.delete`),
|
|
38
|
+
loadingStatus: n.value
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
return { __sfc: !0, KEY: o, SKELETON_HEIGHTS: m, trans: l, store: t, loadList: d, select: f, deleteSaved: u, cancel: g, search: r, expandedId: s, menuId: a, isDeleting: n, filteredList: D, descriptionText: v, footerButtonGroupOptions: y, deleteModalButtons: I, toggleExpanded: (e) => {
|
|
42
|
+
s.value = s.value === e.id ? null : e.id;
|
|
43
|
+
}, toggleMenu: (e) => {
|
|
44
|
+
a.value = a.value === e.id ? null : e.id;
|
|
45
|
+
}, requestDelete: (e) => {
|
|
46
|
+
a.value = null, t.pendingDelete = e;
|
|
47
|
+
}, confirmDelete: async () => {
|
|
48
|
+
!t.pendingDelete || n.value || (n.value = !0, await u(t.pendingDelete), n.value = !1);
|
|
49
|
+
}, closeDeleteModal: () => {
|
|
50
|
+
n.value || (t.pendingDelete = null);
|
|
51
|
+
}, codeOf: (e) => [e.codeBefore, e.codeAfter].filter(Boolean).join(`
|
|
52
|
+
`), WpDrawer: B, WpModal: L, InBasicTextInput: k, InButtonV2: b, InIcons: M, InNoData: E, InSkeleton: C };
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
J as default
|
|
57
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import e from "./DisplayConditionsHost.vue2.js";
|
|
2
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var r = function() {
|
|
4
|
+
var s = this, o = s._self._c, t = s._self._setupProxy;
|
|
5
|
+
return o("div", { staticClass: "guido-display-conditions-host" }, [o(t.DisplayConditionCreateDrawer), o(t.DisplayConditionSelectDrawer)], 1);
|
|
6
|
+
}, i = [], a = /* @__PURE__ */ n(
|
|
7
|
+
e,
|
|
8
|
+
r,
|
|
9
|
+
i,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const p = a.exports;
|
|
15
|
+
export {
|
|
16
|
+
p as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as i, onMounted as s, onBeforeUnmount as m } from "vue";
|
|
2
|
+
import { useDisplayConditions as p } from "../../../composables/useDisplayConditions.js";
|
|
3
|
+
import { DisplayConditionEvent as n } from "../../../enums/display-condition.js";
|
|
4
|
+
import { useDisplayConditionStore as a } from "../../../stores/display-condition.js";
|
|
5
|
+
import d from "./DisplayConditionCreateDrawer.vue.js";
|
|
6
|
+
import f from "./DisplayConditionSelectDrawer.vue.js";
|
|
7
|
+
const E = /* @__PURE__ */ i({
|
|
8
|
+
__name: "DisplayConditionsHost",
|
|
9
|
+
setup(l) {
|
|
10
|
+
const o = a(), { handleOpen: t } = p(), e = (r) => {
|
|
11
|
+
t(r.detail);
|
|
12
|
+
};
|
|
13
|
+
return s(() => {
|
|
14
|
+
o.$reset(), document.addEventListener(n.OPEN, e);
|
|
15
|
+
}), m(() => {
|
|
16
|
+
document.removeEventListener(n.OPEN, e), o.$reset();
|
|
17
|
+
}), { __sfc: !0, store: o, handleOpen: t, onOpen: e, DisplayConditionCreateDrawer: d, DisplayConditionSelectDrawer: f };
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
E as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import o from "./AutoSaveToggle.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var e = this, a = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return t.isFeatureEnabled("autosave") ? a("div", { staticClass: "d-f a-i-c mr-3 auto-save-toggle", on: { mouseenter: function(s) {
|
|
7
|
+
t.isHovered = !0;
|
|
8
|
+
}, mouseleave: function(s) {
|
|
9
|
+
t.isHovered = !1;
|
|
10
|
+
} } }, [a(t.InToggle, { attrs: { id: "guido__autosave-toggle", name: "guido-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggle } }), a("span", { staticClass: "ml-2 auto-save-toggle__label t-c-55" }, [e._v(" " + e._s(t.trans("email-editor.auto-save")) + " ")]), t.autosaveStore.status === t.AUTOSAVE_STATUS.SAVING ? a("span", { staticClass: "ml-2 d-f a-i-c f-s-1" }, [a(t.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), a("span", { staticClass: "ml-1 t-c-53" }, [e._v(" " + e._s(t.trans("newsletter.saving")) + " ")])], 1) : t.lastSavedLabel ? a("span", { staticClass: "ml-2 f-s-1 t-c-53" }, [e._v(" " + e._s(t.lastSavedLabel) + " ")]) : e._e(), t.isHovered ? a(t.InInfoBox, { staticClass: "auto-save-toggle__info-box", attrs: { id: "guido__autosave-info-box", size: "small", variant: "information", "description-text": t.trans("email-editor.auto-save-description"), "title-text": t.trans("email-editor.auto-save-title") } }) : e._e()], 1) : e._e();
|
|
11
|
+
}, l = [], r = /* @__PURE__ */ i(
|
|
12
|
+
o,
|
|
13
|
+
n,
|
|
14
|
+
l,
|
|
15
|
+
!1,
|
|
16
|
+
null,
|
|
17
|
+
"2c964af4"
|
|
18
|
+
);
|
|
19
|
+
const d = r.exports;
|
|
20
|
+
export {
|
|
21
|
+
d as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as i, ref as f, computed as u } from "vue";
|
|
2
|
+
import { useConfig as l } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useTranslations as p } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { useAutosaveStore as c, AUTOSAVE_STATUS as t } from "../../../stores/autosave.js";
|
|
5
|
+
import { useEditorStore as S } from "../../../stores/editor.js";
|
|
6
|
+
import { formatLocalTime as d } from "../../../utils/timeUtil.js";
|
|
7
|
+
import { InToggle as g, InLoading as _, InInfoBox as A } from "@useinsider/design-system-vue";
|
|
8
|
+
const U = /* @__PURE__ */ i({
|
|
9
|
+
__name: "AutoSaveToggle",
|
|
10
|
+
setup(v) {
|
|
11
|
+
const { isFeatureEnabled: e } = l(), r = S(), o = c(), s = p(), n = f(!1), a = u(() => o.status !== t.SAVED || !o.lastSavedAt ? "" : d(o.lastSavedAt));
|
|
12
|
+
return { __sfc: !0, isFeatureEnabled: e, editorStore: r, autosaveStore: o, trans: s, isHovered: n, lastSavedLabel: a, toggle: (m) => {
|
|
13
|
+
o.isOn = m;
|
|
14
|
+
}, AUTOSAVE_STATUS: t, InInfoBox: A, InLoading: _, InToggle: g };
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
U as default
|
|
19
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l from "./EditorActions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
return e("div", { staticClass: "d-f
|
|
3
|
+
import d from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var u = function() {
|
|
5
|
+
var s, i, n, a;
|
|
6
|
+
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
7
|
+
return e("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? 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 } }) : o._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 = (s = t.config) == null ? void 0 : s.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 } }) : o._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.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 } }) : o._e(), t.editorStore.isPreviewModeOpen ? o._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "label-text": t.saveLabel, "loading-status": t.isSaving }, on: { click: function(r) {
|
|
8
8
|
return t.handleSave(!1);
|
|
9
|
-
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(
|
|
9
|
+
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
|
|
10
10
|
return t.executeSave(!1);
|
|
11
11
|
} } })], 1);
|
|
12
|
-
},
|
|
13
|
-
a,
|
|
14
|
-
d,
|
|
12
|
+
}, c = [], p = /* @__PURE__ */ d(
|
|
15
13
|
l,
|
|
14
|
+
u,
|
|
15
|
+
c,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"2cccbd44"
|
|
19
19
|
);
|
|
20
|
-
const
|
|
20
|
+
const v = p.exports;
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
v as default
|
|
23
23
|
};
|
|
@@ -1,68 +1,83 @@
|
|
|
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
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
const
|
|
1
|
+
import { defineComponent as I, computed as c, ref as u } from "vue";
|
|
2
|
+
import { useActionsApi as P } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as W } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useExport as j } from "../../../composables/useExport.js";
|
|
5
|
+
import { useTestEmailClick as G } from "../../../composables/useGuidoActions.js";
|
|
6
|
+
import { useHtmlCompiler as J } from "../../../composables/useHtmlCompiler.js";
|
|
7
|
+
import { useSave as K } from "../../../composables/useSave.js";
|
|
8
|
+
import { useSaveValidation as N } from "../../../composables/useSaveValidation.js";
|
|
9
|
+
import { useSaveValidationRollout as Q } from "../../../composables/useSaveValidationRollout.js";
|
|
10
|
+
import { useToaster as U } from "../../../composables/useToaster.js";
|
|
11
|
+
import { useTranslations as X } from "../../../composables/useTranslations.js";
|
|
12
|
+
import { useVersionHistoryApi as Y } from "../../../composables/useVersionHistoryApi.js";
|
|
13
|
+
import { useLiquidValidator as Z } from "../../../composables/validators/useLiquidValidator.js";
|
|
14
|
+
import { ToasterTypeOptions as $ } from "../../../enums/toaster.js";
|
|
15
|
+
import { useConfigStore as tt } from "../../../stores/config.js";
|
|
16
|
+
import { useEditorStore as ot } from "../../../stores/editor.js";
|
|
17
|
+
import { useSaveValidationStore as et } from "../../../stores/save-validation.js";
|
|
18
|
+
import { useTemplateStore as rt } from "../../../stores/template.js";
|
|
19
|
+
import { getTooltipOptions as it } from "../../../utils/tooltipUtils.js";
|
|
20
|
+
import { InButtonV2 as st } from "@useinsider/design-system-vue";
|
|
21
|
+
import { storeToRefs as at } from "pinia";
|
|
22
|
+
import nt from "./MigrationConfirmModal.vue.js";
|
|
23
|
+
const bt = /* @__PURE__ */ I({
|
|
24
24
|
__name: "EditorActions",
|
|
25
|
-
setup(
|
|
26
|
-
const { config:
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
setup(lt, { expose: k }) {
|
|
26
|
+
const { config: p, isFeatureEnabled: f } = W(), { exportHtml: d } = j(), { save: v } = K(), { validateCurrentTemplate: y } = N(), { isEnabled: i } = Q(), { showToaster: S, handleError: s } = U(), { openVersionHistory: g, closeVersionHistory: h } = Y(), { getCompiledEmail: T } = P(), { compileHtml: w } = J(), { validateLiquidSyntax: E } = Z(), V = tt(), o = ot(), H = et(), x = rt(), { hasMigrations: C } = at(x), r = X(), F = c(() => i.value && V.allowSaveWithErrors ? r("email-editor.save-and-continue") : "Save"), a = u(!1), n = u(!1), _ = u(), l = G(), q = () => {
|
|
27
|
+
if (o.isVersionHistoryOpen) {
|
|
28
|
+
h();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
g();
|
|
32
|
+
}, B = async () => {
|
|
33
|
+
a.value = !0, await d(), a.value = !1;
|
|
34
|
+
}, L = () => {
|
|
35
|
+
o.isSaveAsTemplateDrawerOpen = !0;
|
|
36
|
+
}, R = c(() => o.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), D = c(
|
|
37
|
+
() => {
|
|
38
|
+
var t, e;
|
|
39
|
+
return ((e = (t = p.value) == null ? void 0 : t.features) == null ? void 0 : e.versionHistory) && !o.isPreviewModeOpen;
|
|
40
|
+
}
|
|
41
|
+
), A = async (t) => {
|
|
42
|
+
n.value = !0, t || (o.loadingStatus = !0);
|
|
43
|
+
let e;
|
|
29
44
|
try {
|
|
30
|
-
|
|
31
|
-
} catch (
|
|
32
|
-
s(
|
|
45
|
+
e = await v(t);
|
|
46
|
+
} catch (b) {
|
|
47
|
+
s(b, "Failed to save template");
|
|
33
48
|
} finally {
|
|
34
|
-
n.value = !1, !t && !
|
|
49
|
+
n.value = !1, !t && !e && (o.loadingStatus = !1);
|
|
35
50
|
}
|
|
36
|
-
return
|
|
37
|
-
},
|
|
38
|
-
var
|
|
39
|
-
if (!t &&
|
|
40
|
-
(
|
|
51
|
+
return e;
|
|
52
|
+
}, O = (t) => {
|
|
53
|
+
var e;
|
|
54
|
+
if (!t && C.value) {
|
|
55
|
+
(e = _.value) == null || e.open();
|
|
41
56
|
return;
|
|
42
57
|
}
|
|
43
|
-
return
|
|
58
|
+
return A(t);
|
|
44
59
|
}, m = async () => {
|
|
45
|
-
|
|
60
|
+
o.loadingStatus = !0;
|
|
46
61
|
try {
|
|
47
|
-
return await
|
|
62
|
+
return await y();
|
|
48
63
|
} catch (t) {
|
|
49
64
|
return console.warn("Test-path validation failed; sending without the drawer.", t), [];
|
|
50
65
|
} finally {
|
|
51
|
-
|
|
66
|
+
o.loadingStatus = !1;
|
|
52
67
|
}
|
|
53
|
-
},
|
|
68
|
+
}, M = async () => {
|
|
54
69
|
const t = await m();
|
|
55
|
-
t.length &&
|
|
56
|
-
},
|
|
70
|
+
t.length && H.open(t, "test");
|
|
71
|
+
}, z = async () => {
|
|
57
72
|
if (i.value) {
|
|
58
73
|
if ((await m()).length) {
|
|
59
|
-
|
|
60
|
-
type:
|
|
61
|
-
message:
|
|
74
|
+
S({
|
|
75
|
+
type: $.Error,
|
|
76
|
+
message: r("email-editor.validation-errors-found"),
|
|
62
77
|
actionButton: {
|
|
63
|
-
text:
|
|
78
|
+
text: r("email-editor.check-errors"),
|
|
64
79
|
onClick: () => {
|
|
65
|
-
|
|
80
|
+
M();
|
|
66
81
|
}
|
|
67
82
|
},
|
|
68
83
|
autoHide: !1
|
|
@@ -72,26 +87,26 @@ const Vt = /* @__PURE__ */ F({
|
|
|
72
87
|
l();
|
|
73
88
|
return;
|
|
74
89
|
}
|
|
75
|
-
if (
|
|
76
|
-
|
|
90
|
+
if (f("liquidSyntax")) {
|
|
91
|
+
o.loadingStatus = !0;
|
|
77
92
|
try {
|
|
78
|
-
const { html: t } = await
|
|
79
|
-
if (!await
|
|
93
|
+
const { html: t } = await T({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: e } = w(t);
|
|
94
|
+
if (!await E(e))
|
|
80
95
|
return;
|
|
81
96
|
} catch (t) {
|
|
82
97
|
s(t, "Failed to prepare test email");
|
|
83
98
|
return;
|
|
84
99
|
} finally {
|
|
85
|
-
|
|
100
|
+
o.loadingStatus = !1;
|
|
86
101
|
}
|
|
87
102
|
}
|
|
88
103
|
l();
|
|
89
104
|
};
|
|
90
|
-
return
|
|
91
|
-
handleSave:
|
|
92
|
-
}), { __sfc: !0, config:
|
|
105
|
+
return k({
|
|
106
|
+
handleSave: O
|
|
107
|
+
}), { __sfc: !0, config: p, isFeatureEnabled: f, exportHtml: d, save: v, validateCurrentTemplate: y, isEnabled: i, showToaster: S, handleError: s, openVersionHistory: g, closeVersionHistory: h, getCompiledEmail: T, compileHtml: w, validateLiquidSyntax: E, configStore: V, editorStore: o, saveValidationStore: H, templateStore: x, hasMigrations: C, trans: r, saveLabel: F, isExporting: a, isSaving: n, migrationModalRef: _, testEmailClick: l, handleVersionHistory: q, handleExport: B, handleSaveAs: L, versionHistoryTooltipText: R, isVersionHistoryButtonVisible: D, executeSave: A, handleSave: O, collectTestErrors: m, openTestErrors: M, handleTestEmail: z, getTooltipOptions: it, InButtonV2: st, MigrationConfirmModal: nt };
|
|
93
108
|
}
|
|
94
109
|
});
|
|
95
110
|
export {
|
|
96
|
-
|
|
111
|
+
bt as default
|
|
97
112
|
};
|
|
@@ -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)], 1)]);
|
|
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, { ref: "rightSlotRef" })], 1)]);
|
|
7
|
+
}, d = [], i = /* @__PURE__ */ a(
|
|
8
8
|
o,
|
|
9
9
|
s,
|
|
10
|
-
|
|
10
|
+
d,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"d11dd577"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const c = i.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
c as default
|
|
18
18
|
};
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { InContainer as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as n, ref as m } from "vue";
|
|
2
|
+
import { InContainer as a } from "@useinsider/design-system-vue";
|
|
3
|
+
import f from "./LeftSlot.vue.js";
|
|
4
|
+
import p from "./MiddleSlot.vue.js";
|
|
5
|
+
import i from "./RightSlot.vue.js";
|
|
6
|
+
const c = /* @__PURE__ */ n({
|
|
7
7
|
__name: "HeaderWrapper",
|
|
8
|
-
setup(
|
|
9
|
-
|
|
8
|
+
setup(l, { expose: r }) {
|
|
9
|
+
const e = m(null);
|
|
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 };
|
|
10
18
|
}
|
|
11
19
|
});
|
|
12
20
|
export {
|
|
13
|
-
|
|
21
|
+
c as default
|
|
14
22
|
};
|