@useinsider/guido 3.18.2-beta.9be830c → 3.18.2-beta.a5a0a11
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 +13 -15
- package/dist/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +30 -30
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -10
- 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 +74 -57
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +23 -37
- 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 +52 -36
- 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 +5 -5
- 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 -54
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
- package/dist/composables/useCustomInterfaceAppearance.js +52 -45
- package/dist/composables/useHtmlValidator.js +87 -82
- package/dist/composables/useRecommendation.js +40 -35
- package/dist/composables/useStripo.js +30 -30
- package/dist/composables/useToaster.js +14 -20
- package/dist/config/i18n/en/labels.json.js +4 -36
- package/dist/config/i18n/en/tooltips.json.js +1 -2
- package/dist/enums/extensions/recommendationBlock.js +38 -31
- 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 +40 -35
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +84 -52
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +260 -140
- 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/node_modules/@vueuse/shared/index.js +28 -40
- package/dist/sprite.svg +0 -6
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +3 -1
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
- 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 +9 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +86 -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/stores/config.d.ts +0 -18
- package/dist/src/stores/editor.d.ts +0 -107
- package/dist/src/stores/onboarding.d.ts +21 -195
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +0 -10
- package/dist/static/styles/components/recommendation-strategy.css.js +34 -4
- package/dist/static/styles/components/skeleton.css.js +23 -0
- package/dist/static/styles/variables.css.js +0 -2
- package/dist/stores/editor.js +4 -13
- package/dist/stores/onboarding.js +50 -66
- package/dist/utils/templatePreparation.js +55 -55
- package/dist/utils/timeUtil.js +17 -7
- package/package.json +5 -5
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -27
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -48
- 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 -24
- 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 -82
- package/dist/composables/useAccessibilityApi.js +0 -35
- package/dist/node_modules/@vueuse/core/index.js +0 -102
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +0 -2
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useAccessibilityApi.d.ts +0 -15
- package/dist/static/styles/components/accessibility.css.js +0 -282
- /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
- /package/dist/src/components/organisms/{header/EditorActionsMenu.vue.d.ts → onboarding/RecommendationStrategyOnboarding.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 f } 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 y, 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 h, 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
|
+
}), S = 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(S)),
|
|
77
77
|
// eslint-disable-next-line camelcase -- backend field name
|
|
78
|
-
select_items: e(c(
|
|
78
|
+
select_items: e(c(S))
|
|
79
79
|
})), N = k(
|
|
80
80
|
t(),
|
|
81
|
-
R(c(
|
|
81
|
+
R(c(S), [])
|
|
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(h([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(h([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(), f.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(), f.DEFAULT_MODULES)
|
|
195
195
|
}), F = a({
|
|
196
196
|
/** Whether to show the header bar */
|
|
197
197
|
showHeader: e(o(), !0),
|
|
@@ -216,8 +216,6 @@ 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),
|
|
221
219
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
222
220
|
allowlistEnabled: e(o(), !1),
|
|
223
221
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
@@ -290,7 +288,7 @@ const p = {
|
|
|
290
288
|
...d.entries,
|
|
291
289
|
type: u("custom"),
|
|
292
290
|
/** Custom processor function */
|
|
293
|
-
processor:
|
|
291
|
+
processor: y(
|
|
294
292
|
(s) => typeof s == "function",
|
|
295
293
|
"processor must be a function"
|
|
296
294
|
)
|
|
@@ -310,7 +308,7 @@ const p = {
|
|
|
310
308
|
* Return false to cancel the save operation.
|
|
311
309
|
*/
|
|
312
310
|
externalValidation: e(
|
|
313
|
-
|
|
311
|
+
y(
|
|
314
312
|
(s) => typeof s == "function",
|
|
315
313
|
"externalValidation must be a function"
|
|
316
314
|
)
|
|
@@ -346,7 +344,7 @@ export {
|
|
|
346
344
|
G as CustomRuleSchema,
|
|
347
345
|
B as DefaultBlockTypeSchema,
|
|
348
346
|
N as DynamicContentListSchema,
|
|
349
|
-
|
|
347
|
+
S as DynamicContentNodeSchema,
|
|
350
348
|
E as DynamicContentSchema,
|
|
351
349
|
O as EditorSchema,
|
|
352
350
|
D as EmailHeaderSchema,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
|
-
var
|
|
6
|
-
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper
|
|
5
|
+
var a = this, r = a._self._c, e = a._self._setupProxy;
|
|
6
|
+
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
9
|
}, s = [], n = /* @__PURE__ */ i(
|
|
10
|
-
|
|
10
|
+
o,
|
|
11
11
|
t,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"cc5ee925"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const v = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
v as default
|
|
20
20
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ne, defineAsyncComponent as l, ref as O, computed as u, watch as
|
|
1
|
+
import { defineComponent as ne, defineAsyncComponent as l, ref as O, computed as u, watch as x, onMounted as re, onUnmounted as se } from "vue";
|
|
2
2
|
import { useCortexBlueprintBridge as ae } from "../composables/useCortexBlueprintBridge.js";
|
|
3
3
|
import { useEditorLock as ie } from "../composables/useEditorLock.js";
|
|
4
4
|
import { provideGuidoActions as ce } from "../composables/useGuidoActions.js";
|
|
@@ -6,10 +6,10 @@ import { useGuidoStateBridge as de } from "../composables/useGuidoStateBridge.js
|
|
|
6
6
|
import { usePartner as me } from "../composables/usePartner.js";
|
|
7
7
|
import { useStripo as le } from "../composables/useStripo.js";
|
|
8
8
|
import { useTimerClone as ue } from "../composables/useTimerClone.js";
|
|
9
|
-
import { migrate as
|
|
10
|
-
import { ModuleFolderDefaults as
|
|
9
|
+
import { migrate as W } from "../config/migrator/index.js";
|
|
10
|
+
import { ModuleFolderDefaults as G } from "../enums/defaults.js";
|
|
11
11
|
import { RIBBON_SELECTOR as pe } from "../enums/onboarding.js";
|
|
12
|
-
import { useRecommendationExtensionStore as
|
|
12
|
+
import { useRecommendationExtensionStore as h } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
13
|
import fe from "./organisms/AutoSaveController.vue.js";
|
|
14
14
|
import ye from "./organisms/base/Toaster.vue.js";
|
|
15
15
|
import ge from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
@@ -41,12 +41,12 @@ const et = /* @__PURE__ */ ne({
|
|
|
41
41
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
42
42
|
), J = l(
|
|
43
43
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
44
|
-
),
|
|
44
|
+
), E = O(), p = O(), f = Ce(), w = Te(), o = we();
|
|
45
45
|
a.ready && o.init(a.config);
|
|
46
|
-
const c = H(), Q = De(), m = u(() => c.hasChanges), { isTestPartner: X } = me(),
|
|
46
|
+
const c = H(), Q = De(), m = u(() => c.hasChanges), { isTestPartner: X } = me(), C = () => {
|
|
47
47
|
var t;
|
|
48
|
-
return (t =
|
|
49
|
-
},
|
|
48
|
+
return (t = E.value) == null ? void 0 : t.handleSave(!0);
|
|
49
|
+
}, D = (t) => {
|
|
50
50
|
c.loadingStatus = t;
|
|
51
51
|
};
|
|
52
52
|
ae(), de();
|
|
@@ -57,16 +57,16 @@ const et = /* @__PURE__ */ ne({
|
|
|
57
57
|
userId: o.userId,
|
|
58
58
|
username: o.username,
|
|
59
59
|
partnerName: o.partnerName,
|
|
60
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
61
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
60
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
|
|
61
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
|
|
62
62
|
};
|
|
63
|
-
}, { initPlugin:
|
|
63
|
+
}, { initPlugin: k, preloadRuntime: T } = le(), { runExclusive: F, beginMount: R, isCurrentMount: I } = ie();
|
|
64
64
|
let g = 0;
|
|
65
|
-
const { getDefaultTemplate: M } = Ee(), { cloneTimersOnSave:
|
|
65
|
+
const { getDefaultTemplate: M } = Ee(), { cloneTimersOnSave: L, hasTimerBlocks: B } = ue(), Y = u(() => {
|
|
66
66
|
var t;
|
|
67
67
|
return !((t = o.ui) != null && t.showHeader);
|
|
68
68
|
}), Z = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ee = u(
|
|
69
|
-
() => !!
|
|
69
|
+
() => !!h().recommendationConfigs.strategyId
|
|
70
70
|
);
|
|
71
71
|
ce({
|
|
72
72
|
onBack: () => {
|
|
@@ -83,12 +83,12 @@ const et = /* @__PURE__ */ ne({
|
|
|
83
83
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
const
|
|
86
|
+
const A = (t) => {
|
|
87
87
|
console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
88
|
-
},
|
|
88
|
+
}, P = () => {
|
|
89
89
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
x(() => m.value, () => {
|
|
92
92
|
r("on-change", m.value);
|
|
93
93
|
});
|
|
94
94
|
const v = (t) => {
|
|
@@ -105,40 +105,40 @@ const et = /* @__PURE__ */ ne({
|
|
|
105
105
|
try {
|
|
106
106
|
o.initialized || o.init(a.config), c.templateId = o.templateId;
|
|
107
107
|
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", U = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
108
|
-
|
|
108
|
+
w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
109
109
|
const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, N = o.isFeatureEnabled("linkTrackingIds");
|
|
110
110
|
let n = {
|
|
111
|
-
html: s && await
|
|
111
|
+
html: s && await W(s, _),
|
|
112
112
|
css: d
|
|
113
113
|
};
|
|
114
|
-
n.html || (n = await M(), n.html = await
|
|
114
|
+
n.html || (n = await M(), n.html = await W(n.html, _));
|
|
115
115
|
const te = N ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
116
|
-
|
|
116
|
+
B(n.html) && (n.html = await L(n.html)), N && (c.trackIdSessionFloor = Math.max(te, $(n.html)));
|
|
117
117
|
const oe = {
|
|
118
118
|
preselectedDynamicContentList: U,
|
|
119
119
|
onReady: () => {
|
|
120
120
|
console.debug("guido:ready"), r("ready");
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
|
-
g =
|
|
123
|
+
g = R(), await k(n, y(), oe), f.selectedDynamicContentList = U;
|
|
124
124
|
} catch (e) {
|
|
125
125
|
console.error("Failed to initialize Stripo editor:", e);
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
128
|
return re(async () => {
|
|
129
129
|
var e;
|
|
130
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
130
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), H().$reset(), ke().$reset(), S();
|
|
131
131
|
const t = (e = p.value) == null ? void 0 : e.parentElement;
|
|
132
|
-
if (t && (i = new ResizeObserver(S), i.observe(t)),
|
|
132
|
+
if (t && (i = new ResizeObserver(S), i.observe(t)), T(), a.ready)
|
|
133
133
|
await b();
|
|
134
134
|
else {
|
|
135
|
-
const s =
|
|
135
|
+
const s = x(() => a.ready, (d) => {
|
|
136
136
|
d && (s(), b());
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
document.addEventListener("dynamic-content:open", v);
|
|
140
140
|
}), se(() => {
|
|
141
|
-
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v),
|
|
141
|
+
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), h().disposeStrategyPageReturn(), F(async () => {
|
|
142
142
|
if (I(g))
|
|
143
143
|
try {
|
|
144
144
|
window.UIEditor.removeEditor();
|
|
@@ -148,13 +148,13 @@ const et = /* @__PURE__ */ ne({
|
|
|
148
148
|
}), o.reset();
|
|
149
149
|
}), q({
|
|
150
150
|
dynamicContent: {
|
|
151
|
-
insert:
|
|
152
|
-
close:
|
|
151
|
+
insert: A,
|
|
152
|
+
close: P
|
|
153
153
|
},
|
|
154
154
|
hasChanges: m,
|
|
155
|
-
saveSilent:
|
|
156
|
-
setLoading:
|
|
157
|
-
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J,
|
|
155
|
+
saveSilent: C,
|
|
156
|
+
setLoading: D
|
|
157
|
+
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: a, configStore: o, editorStore: c, previewStore: Q, hasChanges: m, isTestPartner: X, saveSilent: C, setLoading: D, emit: r, buildMetadata: y, initPlugin: k, preloadRuntime: T, runExclusive: F, beginMount: R, isCurrentMount: I, mountGeneration: g, getDefaultTemplate: M, cloneTimersOnSave: L, hasTimerBlocks: B, noHeader: Y, isRrsEnabled: Z, hasAssignedStrategy: ee, insertDynamicContent: A, closeDynamicContent: P, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: fe, Toaster: ye, FilterSelectionDrawer: ge, HeaderWrapper: ve, LoadingWrapper: Se, SaveAsTemplateDrawer: be, UnsubscribeWrapper: he };
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
160
|
export {
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAutoSave as
|
|
3
|
-
import { useSave as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
import { useAutoSave as r } from "../../composables/useAutoSave.js";
|
|
3
|
+
import { useSave as s } from "../../composables/useSave.js";
|
|
4
|
+
const f = /* @__PURE__ */ t({
|
|
5
5
|
__name: "AutoSaveController",
|
|
6
|
-
setup(
|
|
7
|
-
const { save: e } =
|
|
8
|
-
return
|
|
9
|
-
saveSilent: () => e(!0)
|
|
10
|
-
}), { __sfc: !0, save: e, backgroundSave: o };
|
|
6
|
+
setup(a) {
|
|
7
|
+
const { save: e } = s(), o = () => e(!1, !0);
|
|
8
|
+
return r(o), { __sfc: !0, save: e, backgroundSave: o };
|
|
11
9
|
}
|
|
12
10
|
});
|
|
13
11
|
export {
|
|
14
|
-
|
|
12
|
+
f as default
|
|
15
13
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { defineComponent as c, ref as i, computed as u, onBeforeUnmount as m } from "vue";
|
|
2
|
+
import { useToaster as f } from "../../../composables/useToaster.js";
|
|
3
|
+
import { useToasterStore as p } from "../../../stores/toaster.js";
|
|
4
|
+
import { InToasts as l } from "@useinsider/design-system-vue";
|
|
5
|
+
const x = /* @__PURE__ */ c({
|
|
5
6
|
__name: "Toaster",
|
|
6
|
-
setup(
|
|
7
|
-
const t =
|
|
8
|
-
t.actionButton && t.actionButton.onClick(),
|
|
7
|
+
setup(_) {
|
|
8
|
+
const t = p(), { hideToaster: o } = f(), e = i(null), s = u(() => t.actionButton ? [{ text: t.actionButton.text }] : []), a = () => {
|
|
9
|
+
t.actionButton && t.actionButton.onClick(), o();
|
|
9
10
|
};
|
|
10
|
-
return
|
|
11
|
-
var
|
|
12
|
-
t.$reset(), (
|
|
13
|
-
}), { __sfc: !0, store: t,
|
|
11
|
+
return m(() => {
|
|
12
|
+
var n, r;
|
|
13
|
+
o(), t.$reset(), (r = (n = e.value) == null ? void 0 : n.$el) == null || r.remove();
|
|
14
|
+
}), { __sfc: !0, store: t, hideToaster: o, toastRef: e, actionButtonsConfig: s, handleActionClick: a, InToasts: l };
|
|
14
15
|
}
|
|
15
16
|
});
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
x as default
|
|
18
19
|
};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s 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
|
-
|
|
4
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
|
+
var a = function() {
|
|
6
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
7
|
+
return t.store.assignStrategyDrawerStatus ? r(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 [r("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [r(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", 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: { create: function(l) {
|
|
9
|
+
return t.store.openStrategyCreation();
|
|
10
|
+
}, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
|
|
11
|
+
}, proxy: !0 }], null, !1, 1517791821) }) : e._e();
|
|
12
|
+
}, n = [], i = /* @__PURE__ */ o(
|
|
13
|
+
s,
|
|
14
|
+
a,
|
|
13
15
|
n,
|
|
14
16
|
!1,
|
|
15
17
|
null,
|
|
16
|
-
"
|
|
18
|
+
"7f9442a6"
|
|
17
19
|
);
|
|
18
20
|
const y = i.exports;
|
|
19
21
|
export {
|
|
@@ -1,48 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, defineAsyncComponent as S, ref as T, computed as l, watch as h } from "vue";
|
|
2
2
|
import "@useinsider/design-system-organisms/style";
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { DOTTED_DATE_LOCALE as
|
|
6
|
-
import { URLS as
|
|
7
|
-
import { ToasterTypeOptions as
|
|
8
|
-
import { useRecommendationExtensionStore as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
3
|
+
import { useToaster as C } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as b } from "../../../../composables/useTranslations.js";
|
|
5
|
+
import { DOTTED_DATE_LOCALE as B } from "../../../../enums/date.js";
|
|
6
|
+
import { URLS as k } from "../../../../enums/extensions/recommendationBlock.js";
|
|
7
|
+
import { ToasterTypeOptions as d } from "../../../../enums/toaster.js";
|
|
8
|
+
import { useRecommendationExtensionStore as R } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
9
|
+
import { commitStrategyChange as _ } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
|
|
10
|
+
import N from "./StrategyInfoBoxContent.vue.js";
|
|
11
|
+
import { formatShortDate as P } from "../../../../utils/dateUtil.js";
|
|
12
|
+
import { asText as v } from "../../../../utils/genericUtil.js";
|
|
13
|
+
import { escapeHtml as U } from "../../../../utils/htmlEscape.js";
|
|
14
|
+
import { InSkeleton as L } from "@useinsider/design-system-vue";
|
|
15
|
+
const rt = /* @__PURE__ */ A({
|
|
15
16
|
__name: "AssignStrategyDrawer",
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
render: (
|
|
19
|
-
}),
|
|
20
|
-
loader: async () => (await
|
|
21
|
-
loadingComponent:
|
|
17
|
+
setup(M) {
|
|
18
|
+
const g = () => import("@useinsider/design-system-organisms"), u = (t, r) => ({
|
|
19
|
+
render: (o) => o(L, { props: { sizing: { width: t, height: r } } })
|
|
20
|
+
}), w = S({
|
|
21
|
+
loader: async () => (await g()).OrgStrategyDetailModal,
|
|
22
|
+
loadingComponent: u(480, 240),
|
|
22
23
|
delay: 0
|
|
23
|
-
}),
|
|
24
|
-
loader: async () => (await
|
|
25
|
-
|
|
26
|
-
|
|
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) => {
|
|
24
|
+
}), D = S({
|
|
25
|
+
loader: async () => (await g()).OrgStrategyDropdown
|
|
26
|
+
}), n = "guido-edit-strategy-", a = b(), e = R(), { showToaster: i } = C(), s = T(null), c = T(!1), I = l(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: k.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
|
|
27
|
+
h(() => e.assignStrategyDrawerStatus, (t) => {
|
|
29
28
|
if (!t)
|
|
30
29
|
return;
|
|
31
30
|
const { strategyId: r } = e.recommendationConfigs;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type:
|
|
35
|
-
message:
|
|
31
|
+
s.value = r || null, c.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
|
|
32
|
+
i({
|
|
33
|
+
type: d.Error,
|
|
34
|
+
message: a("discovery-strategy.error-description")
|
|
36
35
|
});
|
|
37
36
|
});
|
|
38
37
|
});
|
|
39
|
-
const
|
|
40
|
-
const r =
|
|
38
|
+
const y = (t) => {
|
|
39
|
+
const r = v(t.updated_at || t.created_at);
|
|
41
40
|
if (!r)
|
|
42
41
|
return "";
|
|
43
|
-
const
|
|
44
|
-
return
|
|
45
|
-
},
|
|
42
|
+
const o = P(r, B);
|
|
43
|
+
return a("recommendation-strategy.last-updated-on", { value: o });
|
|
44
|
+
}, x = l(() => e.strategies.map((t) => ({
|
|
46
45
|
text: t.name,
|
|
47
46
|
value: t.strategy_id,
|
|
48
47
|
infoBoxProps: {
|
|
@@ -50,57 +49,75 @@ const W = /* @__PURE__ */ v({
|
|
|
50
49
|
theme: "light",
|
|
51
50
|
variant: "information",
|
|
52
51
|
className: "assign-strategy-info-box",
|
|
53
|
-
titleText:
|
|
52
|
+
titleText: U(v(t.name)),
|
|
54
53
|
descriptionStatus: !0,
|
|
55
|
-
descriptionText:
|
|
56
|
-
slot:
|
|
57
|
-
slotProps: { strategy: t }
|
|
54
|
+
descriptionText: y(t),
|
|
55
|
+
slot: N,
|
|
56
|
+
slotProps: { strategy: t },
|
|
57
|
+
// The info box drops the option's value/text, so the id is the only channel
|
|
58
|
+
// that can carry the strategy back to the click handler.
|
|
59
|
+
buttonOptions: [{
|
|
60
|
+
id: `${n}${t.strategy_id}`,
|
|
61
|
+
text: a("eureka.edit-strategy"),
|
|
62
|
+
type: "text",
|
|
63
|
+
// Resolved from Guido's own public/sprite.svg by InIcons; an unknown name would
|
|
64
|
+
// silently render blank space instead of failing.
|
|
65
|
+
icon: "line-open-website"
|
|
66
|
+
}]
|
|
58
67
|
}
|
|
59
|
-
}))),
|
|
60
|
-
|
|
68
|
+
}))), E = (t) => {
|
|
69
|
+
var f;
|
|
70
|
+
const r = (f = t == null ? void 0 : t.id) != null && f.startsWith(n) ? t.id.slice(n.length) : "";
|
|
71
|
+
if (!r)
|
|
72
|
+
return;
|
|
73
|
+
const o = e.currentRecommendationId, m = e.recommendationConfigs.strategyId === r;
|
|
74
|
+
e.openStrategyEdit(r) && (String(s.value ?? "") === r && (s.value = null), m && (e.removeStrategy(), o !== null && _(o, "Removed recommendation strategy")));
|
|
75
|
+
}, p = l(() => {
|
|
76
|
+
const t = e.strategies.find((r) => String(r.strategy_id) === String(s.value ?? ""));
|
|
61
77
|
return t ? { ...t, fallback_config: null } : null;
|
|
62
|
-
}),
|
|
78
|
+
}), O = l(() => ({
|
|
63
79
|
primaryButton: {
|
|
64
80
|
styling: "solid",
|
|
65
81
|
type: "primary",
|
|
66
|
-
labelText:
|
|
82
|
+
labelText: a("products.assign-btn")
|
|
67
83
|
},
|
|
68
84
|
cancelOrBackButton: {
|
|
69
85
|
styling: "ghost",
|
|
70
86
|
type: "secondary",
|
|
71
|
-
labelText:
|
|
87
|
+
labelText: a("products.cancel")
|
|
72
88
|
}
|
|
73
89
|
}));
|
|
74
|
-
return { __sfc: !0, loadOrganisms:
|
|
90
|
+
return { __sfc: !0, loadOrganisms: g, skeleton: u, OrgStrategyDetailModal: w, OrgStrategyDropdown: D, EDIT_BUTTON_ID_PREFIX: n, trans: a, store: e, showToaster: i, selectedStrategyId: s, showSelectionError: c, drawerDescription: I, lastUpdatedText: y, strategyOptions: x, onInfoBoxButtonClick: E, selectedStrategy: p, footerButtonGroupOptions: O, closeDrawer: () => {
|
|
75
91
|
e.closeAssignStrategyDrawer();
|
|
76
92
|
}, assignStrategy: async () => {
|
|
77
|
-
const t =
|
|
93
|
+
const t = p.value;
|
|
78
94
|
if (!t) {
|
|
79
|
-
|
|
95
|
+
c.value = !0;
|
|
80
96
|
return;
|
|
81
97
|
}
|
|
82
98
|
let r = "";
|
|
83
99
|
try {
|
|
84
100
|
r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
|
|
85
|
-
} catch (
|
|
86
|
-
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed",
|
|
101
|
+
} catch (m) {
|
|
102
|
+
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", m);
|
|
87
103
|
}
|
|
88
104
|
if (!r) {
|
|
89
|
-
|
|
90
|
-
type:
|
|
91
|
-
message:
|
|
105
|
+
i({
|
|
106
|
+
type: d.Error,
|
|
107
|
+
message: a("email-editor.strategy-assign-failed", { strategyName: t.name })
|
|
92
108
|
});
|
|
93
109
|
return;
|
|
94
110
|
}
|
|
95
|
-
e.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
111
|
+
const o = e.currentRecommendationId;
|
|
112
|
+
e.assignStrategy(t), i({
|
|
113
|
+
type: d.Success,
|
|
114
|
+
message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
115
|
+
}), e.closeAssignStrategyDrawer(), o !== null && await _(o, "Assigned recommendation strategy");
|
|
99
116
|
}, onSelect: (t) => {
|
|
100
|
-
|
|
117
|
+
s.value = t.value, c.value = !1;
|
|
101
118
|
} };
|
|
102
119
|
}
|
|
103
120
|
});
|
|
104
121
|
export {
|
|
105
|
-
|
|
122
|
+
rt as default
|
|
106
123
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
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 d, computed as a } from "vue";
|
|
2
|
+
import g 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__ */ d({
|
|
10
10
|
__name: "RemoveStrategyModal",
|
|
11
|
-
setup(
|
|
12
|
-
const t =
|
|
11
|
+
setup(v) {
|
|
12
|
+
const t = y(), e = f(), { showToaster: n } = l(), i = a(() => ({
|
|
13
13
|
cancelOrBackButton: {
|
|
14
14
|
type: "secondary",
|
|
15
15
|
labelText: t("products.cancel"),
|
|
@@ -19,39 +19,25 @@ const P = /* @__PURE__ */ u({
|
|
|
19
19
|
type: "danger",
|
|
20
20
|
labelText: t("discovery-strategy.remove")
|
|
21
21
|
}
|
|
22
|
-
})), m =
|
|
22
|
+
})), m = a(() => {
|
|
23
23
|
var o;
|
|
24
|
-
const { strategyId:
|
|
25
|
-
return ((o = e.assignedStrategy) == null ? void 0 : o.name) || `#${
|
|
26
|
-
}),
|
|
24
|
+
const { strategyId: s } = e.recommendationConfigs;
|
|
25
|
+
return ((o = e.assignedStrategy) == null ? void 0 : o.name) || `#${s}`;
|
|
26
|
+
}), r = "__STRATEGY_NAME__", p = a(() => t("email-editor.remove-strategy-confirm-message", { strategyName: r }).split(r)), c = () => {
|
|
27
27
|
e.closeRemoveStrategyModal();
|
|
28
28
|
};
|
|
29
|
-
return { __sfc: !0, trans: t, store: e, showToaster:
|
|
30
|
-
const
|
|
31
|
-
e.removeStrategy(), c()
|
|
32
|
-
|
|
33
|
-
if (a({
|
|
34
|
-
type: v.Success,
|
|
29
|
+
return { __sfc: !0, trans: t, store: e, showToaster: n, footerButtonOptions: i, strategyName: m, NAME_TOKEN: r, messageParts: p, close: c, handleConfirm: async () => {
|
|
30
|
+
const s = m.value, o = e.currentRecommendationId;
|
|
31
|
+
e.removeStrategy(), c(), n({
|
|
32
|
+
type: u.Success,
|
|
35
33
|
// The toast renders through a sanitizing v-html, so the name is escaped first.
|
|
36
34
|
message: t("email-editor.strategy-removed-success", {
|
|
37
|
-
strategyName: `<b>${
|
|
35
|
+
strategyName: `<b>${T(s)}</b>`
|
|
38
36
|
})
|
|
39
|
-
}), o !== null)
|
|
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
|
+
}), o !== null && await _(o, "Removed recommendation strategy");
|
|
38
|
+
}, WpModal: g };
|
|
53
39
|
}
|
|
54
40
|
});
|
|
55
41
|
export {
|
|
56
|
-
|
|
42
|
+
B as default
|
|
57
43
|
};
|