@useinsider/guido 3.18.0-beta.19e1253 → 3.18.0-beta.206bb3f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +15 -13
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -15
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +41 -43
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +27 -0
- package/dist/components/organisms/header/EditorActions.vue.js +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +34 -50
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +43 -0
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +28 -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 +7 -6
- package/dist/components/organisms/header/RightSlot.vue2.js +17 -15
- 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 +24 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +18 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +81 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -34
- package/dist/composables/useAccessibilityApi.js +31 -0
- package/dist/composables/useCustomInterfaceAppearance.js +31 -28
- package/dist/config/i18n/en/labels.json.js +28 -4
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/enums/extensions/recommendationBlock.js +11 -12
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +20 -19
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +70 -98
- package/dist/guido.css +1 -1
- package/dist/node_modules/@vueuse/core/index.js +102 -0
- package/dist/node_modules/@vueuse/shared/index.js +40 -28
- package/dist/package.json.js +1 -1
- package/dist/sprite.svg +6 -0
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
- 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/composables/useAccessibilityApi.d.ts +15 -0
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -18
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/src/stores/editor.d.ts +76 -0
- package/dist/src/stores/onboarding.d.ts +377 -0
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +10 -0
- package/dist/static/styles/components/accessibility.css.js +140 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +4 -1
- package/dist/static/styles/variables.css.js +1 -0
- package/dist/stores/editor.js +4 -1
- package/dist/stores/onboarding.js +16 -11
- package/dist/utils/timeUtil.js +7 -17
- package/package.json +2 -2
- 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 → AutoSaveStatus.vue.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
2
|
-
import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as
|
|
1
|
+
import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
|
|
2
|
+
import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as h, boolean as o, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as y, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const p = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -68,22 +68,22 @@ const p = {
|
|
|
68
68
|
value: t()
|
|
69
69
|
})
|
|
70
70
|
)
|
|
71
|
-
}),
|
|
71
|
+
}), f = I(() => g({
|
|
72
72
|
text: e(t()),
|
|
73
73
|
// eslint-disable-next-line camelcase -- backend field name
|
|
74
74
|
tag_text: e(t()),
|
|
75
75
|
value: e(t()),
|
|
76
|
-
children: e(c(
|
|
76
|
+
children: e(c(f)),
|
|
77
77
|
// eslint-disable-next-line camelcase -- backend field name
|
|
78
|
-
select_items: e(c(
|
|
78
|
+
select_items: e(c(f))
|
|
79
79
|
})), N = k(
|
|
80
80
|
t(),
|
|
81
|
-
R(c(
|
|
81
|
+
R(c(f), [])
|
|
82
82
|
), P = g({
|
|
83
83
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
84
84
|
id: e(n()),
|
|
85
85
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
86
|
-
decimalCount: e(
|
|
86
|
+
decimalCount: e(y([t(), n()])),
|
|
87
87
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
88
88
|
productIds: e(c(r())),
|
|
89
89
|
/** Whether the block requested live products at send time */
|
|
@@ -117,7 +117,7 @@ const p = {
|
|
|
117
117
|
/** Block type marker used by some legacy variants */
|
|
118
118
|
blockType: e(t()),
|
|
119
119
|
/** Size variant marker (legacy data may use string or number) */
|
|
120
|
-
size: e(
|
|
120
|
+
size: e(y([t(), n()])),
|
|
121
121
|
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
122
122
|
verticalResponsiveness: e(o()),
|
|
123
123
|
/** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
|
|
@@ -189,9 +189,9 @@ const p = {
|
|
|
189
189
|
/** Email header settings */
|
|
190
190
|
emailHeader: e(D, { senderName: "", subject: "" }),
|
|
191
191
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
192
|
-
savedModulesFolderName: e(t(),
|
|
192
|
+
savedModulesFolderName: e(t(), S.SAVED_MODULES),
|
|
193
193
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
194
|
-
defaultModulesFolderName: e(t(),
|
|
194
|
+
defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
|
|
195
195
|
}), F = a({
|
|
196
196
|
/** Whether to show the header bar */
|
|
197
197
|
showHeader: e(o(), !0),
|
|
@@ -216,6 +216,8 @@ const p = {
|
|
|
216
216
|
liquidSyntax: e(o(), !1),
|
|
217
217
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
218
218
|
autosave: e(o(), !1),
|
|
219
|
+
/** Enable the Stripo Accessibility Checker control in the editor toolbar. */
|
|
220
|
+
accessibilityTesting: e(o(), !1),
|
|
219
221
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
220
222
|
allowlistEnabled: e(o(), !1),
|
|
221
223
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
@@ -288,7 +290,7 @@ const p = {
|
|
|
288
290
|
...d.entries,
|
|
289
291
|
type: u("custom"),
|
|
290
292
|
/** Custom processor function */
|
|
291
|
-
processor:
|
|
293
|
+
processor: h(
|
|
292
294
|
(s) => typeof s == "function",
|
|
293
295
|
"processor must be a function"
|
|
294
296
|
)
|
|
@@ -308,7 +310,7 @@ const p = {
|
|
|
308
310
|
* Return false to cancel the save operation.
|
|
309
311
|
*/
|
|
310
312
|
externalValidation: e(
|
|
311
|
-
|
|
313
|
+
h(
|
|
312
314
|
(s) => typeof s == "function",
|
|
313
315
|
"externalValidation must be a function"
|
|
314
316
|
)
|
|
@@ -344,7 +346,7 @@ export {
|
|
|
344
346
|
G as CustomRuleSchema,
|
|
345
347
|
B as DefaultBlockTypeSchema,
|
|
346
348
|
N as DynamicContentListSchema,
|
|
347
|
-
|
|
349
|
+
f as DynamicContentNodeSchema,
|
|
348
350
|
E as DynamicContentSchema,
|
|
349
351
|
O as EditorSchema,
|
|
350
352
|
D as EmailHeaderSchema,
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./AssignStrategyDrawer.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
var
|
|
6
|
-
var e = this,
|
|
7
|
-
return t.store.assignStrategyDrawerStatus ?
|
|
8
|
-
return [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
s,
|
|
14
|
-
a,
|
|
4
|
+
import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
|
+
var o = function() {
|
|
6
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
7
|
+
return t.store.assignStrategyDrawerStatus ? s(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
|
|
8
|
+
return [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "info-box-position": "bottom right", "create-button-visible": !1, loading: t.store.strategiesLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { select: t.onSelect } })], 1)];
|
|
9
|
+
}, proxy: !0 }], null, !1, 2542767044) }) : e._e();
|
|
10
|
+
}, n = [], i = /* @__PURE__ */ a(
|
|
11
|
+
r,
|
|
12
|
+
o,
|
|
15
13
|
n,
|
|
16
14
|
!1,
|
|
17
15
|
null,
|
|
18
|
-
"
|
|
16
|
+
"2580a7d9"
|
|
19
17
|
);
|
|
20
|
-
const
|
|
18
|
+
const y = i.exports;
|
|
21
19
|
export {
|
|
22
|
-
|
|
20
|
+
y as default
|
|
23
21
|
};
|
|
@@ -1,50 +1,48 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, defineAsyncComponent as y, ref as u, computed as l, watch as O } from "vue";
|
|
2
2
|
import "@useinsider/design-system-organisms/style";
|
|
3
3
|
import { useToaster as x } from "../../../../composables/useToaster.js";
|
|
4
4
|
import { useTranslations as A } from "../../../../composables/useTranslations.js";
|
|
5
5
|
import { DOTTED_DATE_LOCALE as E } from "../../../../enums/date.js";
|
|
6
6
|
import { URLS as h } from "../../../../enums/extensions/recommendationBlock.js";
|
|
7
|
-
import { ToasterTypeOptions as
|
|
8
|
-
import { useRecommendationExtensionStore as
|
|
7
|
+
import { ToasterTypeOptions as m } from "../../../../enums/toaster.js";
|
|
8
|
+
import { useRecommendationExtensionStore as C } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
9
9
|
import B from "./StrategyInfoBoxContent.vue.js";
|
|
10
|
-
import { formatShortDate as
|
|
11
|
-
import { asText as
|
|
12
|
-
import { escapeHtml as
|
|
13
|
-
import { InSkeleton as
|
|
14
|
-
const
|
|
10
|
+
import { formatShortDate as I } from "../../../../utils/dateUtil.js";
|
|
11
|
+
import { asText as f } from "../../../../utils/genericUtil.js";
|
|
12
|
+
import { escapeHtml as N } from "../../../../utils/htmlEscape.js";
|
|
13
|
+
import { InSkeleton as b } from "@useinsider/design-system-vue";
|
|
14
|
+
const W = /* @__PURE__ */ v({
|
|
15
15
|
__name: "AssignStrategyDrawer",
|
|
16
16
|
setup(k) {
|
|
17
17
|
const c = () => import("@useinsider/design-system-organisms"), g = (t, r) => ({
|
|
18
|
-
render: (
|
|
19
|
-
}),
|
|
18
|
+
render: (a) => a(b, { props: { sizing: { width: t, height: r } } })
|
|
19
|
+
}), S = y({
|
|
20
20
|
loader: async () => (await c()).OrgStrategyDetailModal,
|
|
21
21
|
loadingComponent: g(480, 240),
|
|
22
22
|
delay: 0
|
|
23
|
-
}),
|
|
23
|
+
}), T = y({
|
|
24
24
|
loader: async () => (await c()).OrgStrategyDropdown,
|
|
25
25
|
loadingComponent: g(240, 42),
|
|
26
26
|
delay: 0
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
S(() => e.assignStrategyDrawerStatus, (t) => {
|
|
27
|
+
}), o = A(), e = C(), { showToaster: s } = x(), n = u(null), i = u(!1), _ = l(() => e.assignStrategyDrawerStatus ? o("email-editor.assign-strategy-description", { url: h.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
|
|
28
|
+
O(() => e.assignStrategyDrawerStatus, (t) => {
|
|
31
29
|
if (!t)
|
|
32
30
|
return;
|
|
33
31
|
const { strategyId: r } = e.recommendationConfigs;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
type:
|
|
37
|
-
message:
|
|
32
|
+
n.value = r || null, i.value = !1, e.fetchStrategies().catch(() => {
|
|
33
|
+
s({
|
|
34
|
+
type: m.Error,
|
|
35
|
+
message: o("discovery-strategy.error-description")
|
|
38
36
|
});
|
|
39
37
|
});
|
|
40
|
-
})
|
|
38
|
+
});
|
|
41
39
|
const p = (t) => {
|
|
42
|
-
const r =
|
|
40
|
+
const r = f(t.updated_at || t.created_at);
|
|
43
41
|
if (!r)
|
|
44
42
|
return "";
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
},
|
|
43
|
+
const a = I(r, E);
|
|
44
|
+
return o("recommendation-strategy.last-updated-on", { value: a });
|
|
45
|
+
}, D = l(() => e.strategies.map((t) => ({
|
|
48
46
|
text: t.name,
|
|
49
47
|
value: t.strategy_id,
|
|
50
48
|
infoBoxProps: {
|
|
@@ -52,57 +50,57 @@ const X = /* @__PURE__ */ O({
|
|
|
52
50
|
theme: "light",
|
|
53
51
|
variant: "information",
|
|
54
52
|
className: "assign-strategy-info-box",
|
|
55
|
-
titleText:
|
|
53
|
+
titleText: N(f(t.name)),
|
|
56
54
|
descriptionStatus: !0,
|
|
57
55
|
descriptionText: p(t),
|
|
58
56
|
slot: B,
|
|
59
57
|
slotProps: { strategy: t }
|
|
60
58
|
}
|
|
61
|
-
}))),
|
|
62
|
-
const t = e.strategies.find((r) => String(r.strategy_id) === String(
|
|
59
|
+
}))), d = l(() => {
|
|
60
|
+
const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
|
|
63
61
|
return t ? { ...t, fallback_config: null } : null;
|
|
64
|
-
}),
|
|
62
|
+
}), w = l(() => ({
|
|
65
63
|
primaryButton: {
|
|
66
64
|
styling: "solid",
|
|
67
65
|
type: "primary",
|
|
68
|
-
labelText:
|
|
66
|
+
labelText: o("products.assign-btn")
|
|
69
67
|
},
|
|
70
68
|
cancelOrBackButton: {
|
|
71
69
|
styling: "ghost",
|
|
72
70
|
type: "secondary",
|
|
73
|
-
labelText:
|
|
71
|
+
labelText: o("products.cancel")
|
|
74
72
|
}
|
|
75
73
|
}));
|
|
76
|
-
return { __sfc: !0, loadOrganisms: c, skeleton: g, OrgStrategyDetailModal:
|
|
74
|
+
return { __sfc: !0, loadOrganisms: c, skeleton: g, OrgStrategyDetailModal: S, OrgStrategyDropdown: T, trans: o, store: e, showToaster: s, selectedStrategyId: n, showSelectionError: i, drawerDescription: _, lastUpdatedText: p, strategyOptions: D, selectedStrategy: d, footerButtonGroupOptions: w, closeDrawer: () => {
|
|
77
75
|
e.closeAssignStrategyDrawer();
|
|
78
76
|
}, assignStrategy: async () => {
|
|
79
|
-
const t =
|
|
77
|
+
const t = d.value;
|
|
80
78
|
if (!t) {
|
|
81
|
-
|
|
79
|
+
i.value = !0;
|
|
82
80
|
return;
|
|
83
81
|
}
|
|
84
82
|
let r = "";
|
|
85
83
|
try {
|
|
86
84
|
r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
|
|
87
|
-
} catch (
|
|
88
|
-
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed",
|
|
85
|
+
} catch (a) {
|
|
86
|
+
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", a);
|
|
89
87
|
}
|
|
90
88
|
if (!r) {
|
|
91
|
-
|
|
92
|
-
type:
|
|
93
|
-
message:
|
|
89
|
+
s({
|
|
90
|
+
type: m.Error,
|
|
91
|
+
message: o("email-editor.strategy-assign-failed", { strategyName: t.name })
|
|
94
92
|
});
|
|
95
93
|
return;
|
|
96
94
|
}
|
|
97
|
-
e.assignStrategy(t),
|
|
98
|
-
type:
|
|
99
|
-
message:
|
|
95
|
+
e.assignStrategy(t), s({
|
|
96
|
+
type: m.Success,
|
|
97
|
+
message: o("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
100
98
|
}), e.closeAssignStrategyDrawer();
|
|
101
99
|
}, onSelect: (t) => {
|
|
102
|
-
|
|
100
|
+
n.value = t.value, i.value = !1;
|
|
103
101
|
} };
|
|
104
102
|
}
|
|
105
103
|
});
|
|
106
104
|
export {
|
|
107
|
-
|
|
105
|
+
W as default
|
|
108
106
|
};
|
|
@@ -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,27 @@
|
|
|
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
|
+
// Stripped like the other two: copy that emits {boldEnd} before {boldStart} leaves a
|
|
16
|
+
// stray marker in this slice, which is exactly the leak the guard above prevents.
|
|
17
|
+
before: s(e.slice(0, r)),
|
|
18
|
+
word: s(e.slice(r + t.length, d)),
|
|
19
|
+
after: s(e.slice(d + o.length))
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
return { __sfc: !0, isFeatureEnabled: u, autosaveStore: a, trans: n, BOLD_START: t, BOLD_END: o, stripMarkers: s, savedLabel: _, AUTOSAVE_STATUS: m, InLoading: D };
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
j as default
|
|
27
|
+
};
|
|
@@ -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
|
+
"55bd627b"
|
|
19
19
|
);
|
|
20
|
-
const
|
|
20
|
+
const p = c.exports;
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
p as default
|
|
23
23
|
};
|
|
@@ -1,66 +1,50 @@
|
|
|
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
|
-
|
|
17
|
-
const ut = /* @__PURE__ */ O({
|
|
1
|
+
import { defineComponent as C, ref as g } from "vue";
|
|
2
|
+
import { useActionsApi as y } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as T } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useTestEmailClick as M } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useHtmlCompiler as h } from "../../../composables/useHtmlCompiler.js";
|
|
6
|
+
import { useSave as x } from "../../../composables/useSave.js";
|
|
7
|
+
import { useTranslations as A } from "../../../composables/useTranslations.js";
|
|
8
|
+
import { useLiquidValidator as V } from "../../../composables/validators/useLiquidValidator.js";
|
|
9
|
+
import { useEditorStore as q } from "../../../stores/editor.js";
|
|
10
|
+
import { useTemplateStore as w } from "../../../stores/template.js";
|
|
11
|
+
import { getTooltipOptions as H } from "../../../utils/tooltipUtils.js";
|
|
12
|
+
import { InButtonV2 as k } from "@useinsider/design-system-vue";
|
|
13
|
+
import { storeToRefs as F } from "pinia";
|
|
14
|
+
import L from "./EditorActionsMenu.vue.js";
|
|
15
|
+
import R from "./MigrationConfirmModal.vue.js";
|
|
16
|
+
const Z = /* @__PURE__ */ C({
|
|
18
17
|
__name: "EditorActions",
|
|
19
|
-
setup(
|
|
20
|
-
const { config:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
c();
|
|
26
|
-
}, w = async () => {
|
|
27
|
-
i.value = !0, await m(), i.value = !1;
|
|
28
|
-
}, _ = () => {
|
|
29
|
-
e.isSaveAsTemplateDrawerOpen = !0;
|
|
30
|
-
}, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
|
|
31
|
-
() => {
|
|
32
|
-
var t, o;
|
|
33
|
-
return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
|
|
34
|
-
}
|
|
35
|
-
), V = async (t) => {
|
|
36
|
-
r.value = !0, t || (e.loadingStatus = !0);
|
|
37
|
-
const o = await u(t);
|
|
38
|
-
return r.value = !1, !t && !o && (e.loadingStatus = !1), o;
|
|
39
|
-
}, E = (t) => {
|
|
18
|
+
setup(b, { expose: v }) {
|
|
19
|
+
const { config: S, isFeatureEnabled: a } = T(), { save: r } = x(), { getCompiledEmail: s } = y(), { compileHtml: n } = h(), { validateLiquidSyntax: m } = V(), e = q(), l = w(), { hasMigrations: f } = F(l), E = A(), i = g(!1), u = g(), c = M(), p = async (t) => {
|
|
20
|
+
i.value = !0, t || (e.loadingStatus = !0);
|
|
21
|
+
const o = await r(t);
|
|
22
|
+
return i.value = !1, !t && !o && (e.loadingStatus = !1), o;
|
|
23
|
+
}, d = (t) => {
|
|
40
24
|
var o;
|
|
41
|
-
if (!t &&
|
|
42
|
-
(o =
|
|
25
|
+
if (!t && f.value) {
|
|
26
|
+
(o = u.value) == null || o.open();
|
|
43
27
|
return;
|
|
44
28
|
}
|
|
45
|
-
return
|
|
46
|
-
},
|
|
47
|
-
if (
|
|
29
|
+
return p(t);
|
|
30
|
+
}, _ = async () => {
|
|
31
|
+
if (a("liquidSyntax")) {
|
|
48
32
|
e.loadingStatus = !0;
|
|
49
33
|
try {
|
|
50
|
-
const { html: t } = await
|
|
51
|
-
if (!await
|
|
34
|
+
const { html: t } = await s({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = n(t);
|
|
35
|
+
if (!await m(o))
|
|
52
36
|
return;
|
|
53
37
|
} finally {
|
|
54
38
|
e.loadingStatus = !1;
|
|
55
39
|
}
|
|
56
40
|
}
|
|
57
|
-
|
|
41
|
+
c();
|
|
58
42
|
};
|
|
59
|
-
return
|
|
60
|
-
handleSave:
|
|
61
|
-
}), { __sfc: !0, config:
|
|
43
|
+
return v({
|
|
44
|
+
handleSave: d
|
|
45
|
+
}), { __sfc: !0, config: S, isFeatureEnabled: a, save: r, getCompiledEmail: s, compileHtml: n, validateLiquidSyntax: m, editorStore: e, templateStore: l, hasMigrations: f, trans: E, isSaving: i, migrationModalRef: u, testEmailClick: c, executeSave: p, handleSave: d, handleTestEmail: _, getTooltipOptions: H, InButtonV2: k, EditorActionsMenu: L, MigrationConfirmModal: R };
|
|
62
46
|
}
|
|
63
47
|
});
|
|
64
48
|
export {
|
|
65
|
-
|
|
49
|
+
Z as default
|
|
66
50
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import i from "./EditorActionsMenu.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var o = function() {
|
|
5
|
+
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
+
return e("div", { ref: "root", staticClass: "editor-actions-menu p-r" }, [e(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.isOpen, "tooltip-options": t.getTooltipOptions("guido__kebab-button"), "tooltip-text": t.trans("email-editor.more-actions") }, on: { click: function(l) {
|
|
7
|
+
t.isOpen = !t.isOpen;
|
|
8
|
+
} } }), t.isOpen ? e("div", { staticClass: "editor-actions-menu__panel p-a" }, [t.isAutosaveVisible ? [e("p", { staticClass: "editor-actions-menu__section f-s-1 t-c-53" }, [s._v(" " + s._s(t.trans("email-editor.preferences")) + " ")]), e("div", { staticClass: "editor-actions-menu__row editor-actions-menu__row_static d-f a-i-c j-c-s-b" }, [e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("email-editor.auto-save")))]), e(t.InToggle, { attrs: { id: "guido__kebab-autosave-toggle", name: "guido-kebab-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggleAutosave } })], 1), e("div", { staticClass: "editor-actions-menu__divider" })] : s._e(), e("p", { staticClass: "editor-actions-menu__section f-s-1 t-c-53" }, [s._v(" " + s._s(t.trans("email-editor.actions")) + " ")]), t.isVersionHistoryVisible ? e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-version-history", type: "button", disabled: t.editorStore.isVersionHistoryButtonDisabled }, on: { click: t.handleVersionHistory } }, [e(t.InIcons, { staticClass: "mr-2 editor-actions-menu__icon", attrs: { name: "line-architect-version-history", size: "24" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("newsletter.version-history")))])], 1) : s._e(), t.isAccessibilityVisible ? e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-accessibility", type: "button", disabled: t.editorStore.loadingStatus }, on: { click: t.handleAccessibility } }, [e(t.InIcons, { staticClass: "mr-2 editor-actions-menu__icon", attrs: { name: "line-accessibility", size: "24" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("email-editor.accessibility-test")))])], 1) : s._e(), t.isSaveAsVisible ? e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-save-as", type: "button", disabled: t.editorStore.isSaveAsButtonDisabled }, on: { click: t.handleSaveAs } }, [e(t.InIcons, { staticClass: "mr-2 editor-actions-menu__icon", attrs: { name: "line-newsletter-save-as-template", size: "24" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("newsletter.save-templates")))])], 1) : s._e(), e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-export", type: "button", disabled: t.isExporting || t.editorStore.isExportButtonDisabled }, on: { click: t.handleExport } }, [e(t.InIcons, { staticClass: "mr-2 editor-actions-menu__icon", attrs: { name: "line-export", size: "24" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("email-editor.export-html")))])], 1)], 2) : s._e()], 1);
|
|
9
|
+
}, n = [], r = /* @__PURE__ */ a(
|
|
10
|
+
i,
|
|
11
|
+
o,
|
|
12
|
+
n,
|
|
13
|
+
!1,
|
|
14
|
+
null,
|
|
15
|
+
"398fffb4"
|
|
16
|
+
);
|
|
17
|
+
const b = r.exports;
|
|
18
|
+
export {
|
|
19
|
+
b as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as E, ref as c, computed as i } from "vue";
|
|
2
|
+
import { useAccessibilityApi as x } from "../../../composables/useAccessibilityApi.js";
|
|
3
|
+
import { useConfig as h } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useExport as w } from "../../../composables/useExport.js";
|
|
5
|
+
import { useTranslations as I } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useVersionHistoryApi as M } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
+
import { useAutosaveStore as B } from "../../../stores/autosave.js";
|
|
8
|
+
import { useEditorStore as C } from "../../../stores/editor.js";
|
|
9
|
+
import { getTooltipOptions as P } from "../../../utils/tooltipUtils.js";
|
|
10
|
+
import { InToggle as k, InIcons as D, InButtonV2 as F } from "@useinsider/design-system-vue";
|
|
11
|
+
import { onClickOutside as j } from "../../../node_modules/@vueuse/core/index.js";
|
|
12
|
+
const Y = /* @__PURE__ */ E({
|
|
13
|
+
__name: "EditorActionsMenu",
|
|
14
|
+
setup(q) {
|
|
15
|
+
const { config: n, isFeatureEnabled: r } = h(), { exportHtml: l } = w(), { openVersionHistory: p, closeVersionHistory: u } = M(), { toggleAccessibilityTestingMode: m } = x(), s = C(), f = B(), A = I(), v = c(!1), a = c(!1), d = c(null), y = i(() => r("autosave")), g = i(
|
|
16
|
+
() => {
|
|
17
|
+
var e, t;
|
|
18
|
+
return !!((t = (e = n.value) == null ? void 0 : e.features) != null && t.versionHistory) && !s.isPreviewModeOpen;
|
|
19
|
+
}
|
|
20
|
+
), V = i(
|
|
21
|
+
() => r("accessibilityTesting") && !s.isPreviewModeOpen
|
|
22
|
+
), b = i(() => {
|
|
23
|
+
var e, t;
|
|
24
|
+
return !!((t = (e = n.value) == null ? void 0 : e.features) != null && t.saveAsTemplate);
|
|
25
|
+
}), o = () => {
|
|
26
|
+
v.value = !1;
|
|
27
|
+
}, H = () => {
|
|
28
|
+
s.isVersionHistoryOpen ? u() : p(), o();
|
|
29
|
+
}, O = () => {
|
|
30
|
+
m(), o();
|
|
31
|
+
}, _ = () => {
|
|
32
|
+
s.isSaveAsTemplateDrawerOpen = !0, o();
|
|
33
|
+
}, S = async () => {
|
|
34
|
+
a.value = !0, await l(), a.value = !1, o();
|
|
35
|
+
}, T = (e) => {
|
|
36
|
+
f.isOn = e;
|
|
37
|
+
};
|
|
38
|
+
return j(d, o), { __sfc: !0, config: n, isFeatureEnabled: r, exportHtml: l, openVersionHistory: p, closeVersionHistory: u, toggleAccessibilityTestingMode: m, editorStore: s, autosaveStore: f, trans: A, isOpen: v, isExporting: a, root: d, isAutosaveVisible: y, isVersionHistoryVisible: g, isAccessibilityVisible: V, isSaveAsVisible: b, close: o, handleVersionHistory: H, handleAccessibility: O, handleSaveAs: _, handleExport: S, toggleAutosave: T, getTooltipOptions: P, InButtonV2: F, InIcons: D, InToggle: k };
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
Y as default
|
|
43
|
+
};
|
|
@@ -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
|
+
"2f127fb6"
|
|
14
14
|
);
|
|
15
15
|
const f = r.exports;
|
|
16
16
|
export {
|