@useinsider/guido 3.17.0-beta.3e9d6e7 → 3.17.0-beta.562c5b1
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/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +50 -50
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -10
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +43 -41
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.js +19 -0
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue2.js +13 -0
- package/dist/composables/useCustomInterfaceAppearance.js +50 -39
- package/dist/composables/useRecommendation.js +31 -30
- package/dist/config/migrator/recommendation/settingsMapper.js +19 -17
- package/dist/enums/academy.js +2 -1
- package/dist/enums/extensions/recommendationBlock.js +25 -24
- package/dist/extensions/Blocks/Recommendation/block.js +26 -21
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +32 -32
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +96 -95
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +147 -153
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +41 -31
- package/dist/extensions/Blocks/Recommendation/services/configService.js +35 -35
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +111 -113
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +46 -50
- package/dist/src/components/organisms/extensions/recommendation/{StrategyInfoBox.vue.d.ts → StrategyInfoBoxContent.vue.d.ts} +4 -11
- package/dist/src/enums/academy.d.ts +1 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +7 -6
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +13 -9
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +1 -8
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +14 -18
- package/dist/src/mock/api/recommendation-strategies.d.ts +0 -41
- package/dist/src/services/recommendationApi.d.ts +1 -1
- package/dist/src/utils/strategyInfoBox.d.ts +35 -0
- package/dist/static/assets/icons/line-change.svg.js +5 -0
- package/dist/static/assets/icons/line-delete.svg.js +5 -0
- package/dist/static/assets/icons/line-plus.svg.js +5 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +36 -19
- package/dist/utils/dateUtil.js +24 -18
- package/dist/utils/strategyInfoBox.js +68 -0
- package/package.json +2 -2
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +0 -20
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +0 -55
- package/dist/node_modules/@useinsider/design-system-organisms/dist/index-Dc9AygoZ.js +0 -526
- package/dist/node_modules/@useinsider/design-system-organisms/dist/index.js +0 -9345
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InAccordion.js +0 -174
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBasicTextInput.js +0 -381
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBox.js +0 -236
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBulkActions.js +0 -70
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButton.js +0 -350
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButtonV2.js +0 -371
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCheckBox.js +0 -152
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InChips.js +0 -141
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCustomDropDown.js +0 -1047
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDataTableV2.js +0 -96050
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDatePicker.js +0 -2042
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDrawer.js +0 -166
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDropDown.js +0 -1098
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InIcons.js +0 -55
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InInfoBox.js +0 -265
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLinks.js +0 -184
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLoading.js +0 -50
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InModals.js +0 -453
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InNoData.js +0 -145
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InOnPageMessage.js +0 -176
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InProgress.js +0 -266
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InRadioButton.js +0 -114
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSegments.js +0 -200
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSelect.js +0 -451
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSkeleton.js +0 -49
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InStatusText.js +0 -119
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTabs.js +0 -4309
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTagsText.js +0 -129
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTextInput.js +0 -503
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToasts.js +0 -253
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToggle.js +0 -107
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltip.js +0 -134
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltipV2.js +0 -464
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_commonjsHelpers.BItOPCY9.js +0 -28
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_plugin-vue2_normalizer.WQT2Fc8L.js +0 -23
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/clickOutside.qP9M0QCm.js +0 -29
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/helpers.CgHNyjAJ.js +0 -109
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/index.Bw_06igr.js +0 -2339
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/localLocalesMixin.DYMhydo2.js +0 -16
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/useLocalLocales.Ckuhy7d-.js +0 -17
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/vue-property-decorator.BtlM7Epa.js +0 -188
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import a from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
5
|
var o = this, r = o._self._c, e = o._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) : o._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.
|
|
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) : o._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 ? r(e.AssignStrategyDrawer) : o._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
}, n = [], s = /* @__PURE__ */
|
|
10
|
-
|
|
9
|
+
}, n = [], s = /* @__PURE__ */ a(
|
|
10
|
+
i,
|
|
11
11
|
t,
|
|
12
12
|
n,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"b13f0cfc"
|
|
16
16
|
);
|
|
17
17
|
const l = s.exports;
|
|
18
18
|
export {
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { provideGuidoActions as
|
|
4
|
-
import { useGuidoStateBridge as
|
|
5
|
-
import { usePartner as
|
|
6
|
-
import { useStripo as
|
|
7
|
-
import { useTimerClone as
|
|
1
|
+
import { defineComponent as Q, defineAsyncComponent as g, ref as U, computed as S, watch as _, onMounted as X, onUnmounted as Y } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as Z } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { provideGuidoActions as ee } from "../composables/useGuidoActions.js";
|
|
4
|
+
import { useGuidoStateBridge as te } from "../composables/useGuidoStateBridge.js";
|
|
5
|
+
import { usePartner as oe } from "../composables/usePartner.js";
|
|
6
|
+
import { useStripo as ne } from "../composables/useStripo.js";
|
|
7
|
+
import { useTimerClone as re } from "../composables/useTimerClone.js";
|
|
8
8
|
import { migrate as A } from "../config/migrator/index.js";
|
|
9
9
|
import { ModuleFolderDefaults as N } from "../enums/defaults.js";
|
|
10
|
-
import { RIBBON_SELECTOR as
|
|
11
|
-
import { useRecommendationExtensionStore as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { useStripoApi as
|
|
20
|
-
import { useConfigStore as
|
|
21
|
-
import { useDynamicContentStore as
|
|
10
|
+
import { RIBBON_SELECTOR as se } from "../enums/onboarding.js";
|
|
11
|
+
import { useRecommendationExtensionStore as ae } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
12
|
+
import ie from "./organisms/AutoSaveController.vue.js";
|
|
13
|
+
import ce from "./organisms/base/Toaster.vue.js";
|
|
14
|
+
import de from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
15
|
+
import me from "./organisms/header/HeaderWrapper.vue.js";
|
|
16
|
+
import le from "./organisms/LoadingWrapper.vue.js";
|
|
17
|
+
import ue from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
18
|
+
import pe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
19
|
+
import { useStripoApi as fe } from "../services/stripoApi.js";
|
|
20
|
+
import { useConfigStore as ye } from "../stores/config.js";
|
|
21
|
+
import { useDynamicContentStore as ve } from "../stores/dynamic-content.js";
|
|
22
22
|
import { useEditorStore as O } from "../stores/editor.js";
|
|
23
|
-
import { usePreviewStore as
|
|
24
|
-
import { useTemplateStore as
|
|
25
|
-
import { useUnsubscribeStore as
|
|
23
|
+
import { usePreviewStore as ge } from "../stores/preview.js";
|
|
24
|
+
import { useTemplateStore as Se } from "../stores/template.js";
|
|
25
|
+
import { useUnsubscribeStore as be } from "../stores/unsubscribe.js";
|
|
26
26
|
import { readTrackFloor as P } from "../utils/linkTrackingIds.js";
|
|
27
|
-
const
|
|
27
|
+
const Ke = /* @__PURE__ */ Q({
|
|
28
28
|
__name: "Guido",
|
|
29
29
|
props: {
|
|
30
30
|
config: null,
|
|
@@ -38,15 +38,15 @@ const qe = /* @__PURE__ */ J({
|
|
|
38
38
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
39
39
|
), $ = g(
|
|
40
40
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
41
|
-
),
|
|
41
|
+
), b = U(), l = U(), u = ve(), h = be(), o = ye();
|
|
42
42
|
a.ready && o.init(a.config);
|
|
43
|
-
const c = O(), z =
|
|
43
|
+
const c = O(), z = ge(), m = S(() => c.hasChanges), { isTestPartner: q } = oe(), E = () => {
|
|
44
44
|
var t;
|
|
45
|
-
return (t =
|
|
46
|
-
},
|
|
45
|
+
return (t = b.value) == null ? void 0 : t.handleSave(!0);
|
|
46
|
+
}, w = (t) => {
|
|
47
47
|
c.loadingStatus = t;
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
Z(), te();
|
|
50
50
|
const p = () => {
|
|
51
51
|
var t, e;
|
|
52
52
|
return {
|
|
@@ -57,11 +57,11 @@ const qe = /* @__PURE__ */ J({
|
|
|
57
57
|
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
|
|
58
58
|
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
|
|
59
59
|
};
|
|
60
|
-
}, { initPlugin:
|
|
60
|
+
}, { initPlugin: D, preloadRuntime: C } = ne(), { getDefaultTemplate: k } = fe(), { cloneTimersOnSave: T, hasTimerBlocks: F } = re(), K = S(() => {
|
|
61
61
|
var t;
|
|
62
62
|
return !((t = o.ui) != null && t.showHeader);
|
|
63
|
-
});
|
|
64
|
-
|
|
63
|
+
}), V = S(() => o.isFeatureEnabled("reusableRecommendationStrategy"));
|
|
64
|
+
ee({
|
|
65
65
|
onBack: () => {
|
|
66
66
|
console.debug("guido:back"), r("back");
|
|
67
67
|
},
|
|
@@ -76,9 +76,9 @@ const qe = /* @__PURE__ */ J({
|
|
|
76
76
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
|
-
const
|
|
79
|
+
const I = (t) => {
|
|
80
80
|
console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
81
|
-
},
|
|
81
|
+
}, R = () => {
|
|
82
82
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
83
83
|
};
|
|
84
84
|
_(() => m.value, () => {
|
|
@@ -91,7 +91,7 @@ const qe = /* @__PURE__ */ J({
|
|
|
91
91
|
let i = null;
|
|
92
92
|
const y = () => {
|
|
93
93
|
var e;
|
|
94
|
-
const t = document.querySelector(
|
|
94
|
+
const t = document.querySelector(se);
|
|
95
95
|
(e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
96
96
|
}, v = async () => {
|
|
97
97
|
var t;
|
|
@@ -99,30 +99,30 @@ const qe = /* @__PURE__ */ J({
|
|
|
99
99
|
o.initialized || o.init(a.config), c.templateId = o.templateId;
|
|
100
100
|
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", L = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
101
101
|
h.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
102
|
-
const M = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {},
|
|
102
|
+
const M = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, B = o.isFeatureEnabled("linkTrackingIds");
|
|
103
103
|
let n = {
|
|
104
104
|
html: s && await A(s, M),
|
|
105
105
|
css: d
|
|
106
106
|
};
|
|
107
|
-
n.html || (n = await
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
const
|
|
107
|
+
n.html || (n = await k(), n.html = await A(n.html, M));
|
|
108
|
+
const j = B ? P(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
109
|
+
F(n.html) && (n.html = await T(n.html)), B && (c.trackIdSessionFloor = Math.max(j, P(n.html)));
|
|
110
|
+
const J = {
|
|
111
111
|
preselectedDynamicContentList: L,
|
|
112
112
|
onReady: () => {
|
|
113
113
|
console.debug("guido:ready"), r("ready");
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
|
-
await
|
|
116
|
+
await D(n, p(), J), u.selectedDynamicContentList = L;
|
|
117
117
|
} catch (e) {
|
|
118
118
|
console.error("Failed to initialize Stripo editor:", e);
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
|
-
return
|
|
121
|
+
return X(async () => {
|
|
122
122
|
var e;
|
|
123
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
123
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ae().$reset(), O().$reset(), Se().$reset(), y();
|
|
124
124
|
const t = (e = l.value) == null ? void 0 : e.parentElement;
|
|
125
|
-
if (t && (i = new ResizeObserver(y), i.observe(t)),
|
|
125
|
+
if (t && (i = new ResizeObserver(y), i.observe(t)), C(), a.ready)
|
|
126
126
|
await v();
|
|
127
127
|
else {
|
|
128
128
|
const s = _(() => a.ready, (d) => {
|
|
@@ -130,7 +130,7 @@ const qe = /* @__PURE__ */ J({
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
document.addEventListener("dynamic-content:open", f);
|
|
133
|
-
}),
|
|
133
|
+
}), Y(() => {
|
|
134
134
|
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", f);
|
|
135
135
|
try {
|
|
136
136
|
window.UIEditor.removeEditor();
|
|
@@ -140,15 +140,15 @@ const qe = /* @__PURE__ */ J({
|
|
|
140
140
|
o.reset();
|
|
141
141
|
}), x({
|
|
142
142
|
dynamicContent: {
|
|
143
|
-
insert:
|
|
144
|
-
close:
|
|
143
|
+
insert: I,
|
|
144
|
+
close: R
|
|
145
145
|
},
|
|
146
146
|
hasChanges: m,
|
|
147
|
-
saveSilent:
|
|
148
|
-
setLoading:
|
|
149
|
-
}), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, AssignStrategyDrawer: $, headerWrapperRef:
|
|
147
|
+
saveSilent: E,
|
|
148
|
+
setLoading: w
|
|
149
|
+
}), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, AssignStrategyDrawer: $, headerWrapperRef: b, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: h, props: a, configStore: o, editorStore: c, previewStore: z, hasChanges: m, isTestPartner: q, saveSilent: E, setLoading: w, emit: r, buildMetadata: p, initPlugin: D, preloadRuntime: C, getDefaultTemplate: k, cloneTimersOnSave: T, hasTimerBlocks: F, noHeader: K, isRrsEnabled: V, insertDynamicContent: I, closeDynamicContent: R, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: ie, Toaster: ce, FilterSelectionDrawer: de, HeaderWrapper: me, LoadingWrapper: le, SaveAsTemplateDrawer: ue, UnsubscribeWrapper: pe };
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
export {
|
|
153
|
-
|
|
153
|
+
Ke as default
|
|
154
154
|
};
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./AssignStrategyDrawer.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
3
|
+
/* empty css */
|
|
4
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
|
+
var a = 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, "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, 5799417) }) : e._e();
|
|
10
|
+
}, n = [], i = /* @__PURE__ */ o(
|
|
11
|
+
r,
|
|
8
12
|
a,
|
|
9
13
|
n,
|
|
10
|
-
o,
|
|
11
14
|
!1,
|
|
12
15
|
null,
|
|
13
|
-
"
|
|
16
|
+
"110d75e5"
|
|
14
17
|
);
|
|
15
|
-
const
|
|
18
|
+
const y = i.exports;
|
|
16
19
|
export {
|
|
17
|
-
|
|
20
|
+
y as default
|
|
18
21
|
};
|
|
@@ -1,67 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { ToasterTypeOptions as
|
|
7
|
-
import { useRecommendationExtensionStore as
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
const $ = /* @__PURE__ */ v({
|
|
1
|
+
import { defineComponent as f, defineAsyncComponent as g, ref as l, computed as a, watch as w } from "vue";
|
|
2
|
+
import "@useinsider/design-system-organisms/style";
|
|
3
|
+
import { useToaster as _ } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as D } from "../../../../composables/useTranslations.js";
|
|
5
|
+
import { URLS as v } from "../../../../enums/extensions/recommendationBlock.js";
|
|
6
|
+
import { ToasterTypeOptions as p } from "../../../../enums/toaster.js";
|
|
7
|
+
import { useRecommendationExtensionStore as T } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
8
|
+
import O from "./StrategyInfoBoxContent.vue.js";
|
|
9
|
+
import { buildStrategyInfoBoxProps as x } from "../../../../utils/strategyInfoBox.js";
|
|
10
|
+
const L = /* @__PURE__ */ f({
|
|
12
11
|
__name: "AssignStrategyDrawer",
|
|
13
12
|
setup(A) {
|
|
14
|
-
const
|
|
15
|
-
|
|
13
|
+
const m = g(
|
|
14
|
+
async () => (await import("@useinsider/design-system-organisms")).OrgStrategyDetailModal
|
|
15
|
+
), y = g(
|
|
16
|
+
async () => (await import("@useinsider/design-system-organisms")).OrgStrategyDropdown
|
|
17
|
+
), r = D(), e = T(), { showToaster: n } = _(), s = l(null), o = l(!1), u = a(() => e.assignStrategyDrawerStatus ? r("email-editor.assign-strategy-description", { url: v.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
|
|
18
|
+
w(() => e.assignStrategyDrawerStatus, (t) => {
|
|
16
19
|
if (!t)
|
|
17
20
|
return;
|
|
18
21
|
const { strategyId: i } = e.recommendationConfigs;
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
s.value = i || null, o.value = !1, e.fetchStrategies().catch(() => {
|
|
23
|
+
n({
|
|
24
|
+
type: p.Error,
|
|
25
|
+
message: r("discovery-strategy.error-description")
|
|
26
|
+
});
|
|
21
27
|
});
|
|
22
28
|
});
|
|
23
|
-
const
|
|
29
|
+
const d = a(() => e.strategies.map((t) => ({
|
|
24
30
|
text: t.name,
|
|
25
31
|
value: t.strategy_id,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
slot: O,
|
|
32
|
-
slotProps: { strategy: t }
|
|
33
|
-
}
|
|
34
|
-
}))), y = o(() => [{ value: r.value }]), n = o(() => {
|
|
35
|
-
const t = e.strategies.find((i) => String(i.strategy_id) === String(r.value ?? ""));
|
|
32
|
+
// `slot` lives here, not in the util: the design system renders it with
|
|
33
|
+
// `<component :is>` inside its own info box, and a util must not import one.
|
|
34
|
+
infoBoxProps: { ...x(t, r), slot: O }
|
|
35
|
+
}))), c = a(() => {
|
|
36
|
+
const t = e.strategies.find((i) => String(i.strategy_id) === String(s.value ?? ""));
|
|
36
37
|
return t ? { ...t, fallback_config: null } : null;
|
|
37
|
-
}),
|
|
38
|
+
}), S = a(() => ({
|
|
38
39
|
primaryButton: {
|
|
39
40
|
styling: "solid",
|
|
40
41
|
type: "primary",
|
|
41
|
-
labelText:
|
|
42
|
-
loadingStatus: a.value,
|
|
43
|
-
disabledStatus: !n.value
|
|
42
|
+
labelText: r("products.assign-btn")
|
|
44
43
|
},
|
|
45
44
|
cancelOrBackButton: {
|
|
46
45
|
styling: "ghost",
|
|
47
46
|
type: "secondary",
|
|
48
|
-
labelText:
|
|
49
|
-
disabledStatus: a.value
|
|
47
|
+
labelText: r("products.cancel")
|
|
50
48
|
}
|
|
51
49
|
}));
|
|
52
|
-
return { __sfc: !0,
|
|
50
|
+
return { __sfc: !0, OrgStrategyDetailModal: m, OrgStrategyDropdown: y, trans: r, store: e, showToaster: n, selectedStrategyId: s, showSelectionError: o, drawerDescription: u, strategyOptions: d, selectedStrategy: c, footerButtonGroupOptions: S, closeDrawer: () => {
|
|
53
51
|
e.closeAssignStrategyDrawer();
|
|
54
52
|
}, assignStrategy: () => {
|
|
55
|
-
const t =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
53
|
+
const t = c.value;
|
|
54
|
+
if (!t) {
|
|
55
|
+
o.value = !0;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
e.assignStrategy(t), n({
|
|
59
|
+
type: p.Success,
|
|
60
|
+
message: r("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
61
|
+
}), e.closeAssignStrategyDrawer();
|
|
60
62
|
}, onSelect: (t) => {
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
+
s.value = t.value, o.value = !1;
|
|
64
|
+
} };
|
|
63
65
|
}
|
|
64
66
|
});
|
|
65
67
|
export {
|
|
66
|
-
|
|
68
|
+
L as default
|
|
67
69
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import a from "./StrategyInfoBoxContent.vue2.js";
|
|
2
|
+
import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var _ = function() {
|
|
4
|
+
var t = this, s = t._self._c;
|
|
5
|
+
return t._self._setupProxy, s("div", { staticClass: "d-f f-d-c mt-3" }, t._l(t.details, function(n, e) {
|
|
6
|
+
return s("div", { key: n.title, staticClass: "d-f f-d-c", class: { "mt-2": e > 0 } }, [s("span", { staticClass: "f-s-1 f-w-600 l-h-1 t-c-52 mb-12" }, [t._v(t._s(n.title))]), s("span", { staticClass: "f-s-1 l-h-6 t-c-55 w-b-b-w" }, [t._v(t._s(n.value))])]);
|
|
7
|
+
}), 0);
|
|
8
|
+
}, c = [], f = /* @__PURE__ */ r(
|
|
9
|
+
a,
|
|
10
|
+
_,
|
|
11
|
+
c,
|
|
12
|
+
!1,
|
|
13
|
+
null,
|
|
14
|
+
null
|
|
15
|
+
);
|
|
16
|
+
const m = f.exports;
|
|
17
|
+
export {
|
|
18
|
+
m as default
|
|
19
|
+
};
|
|
@@ -1,56 +1,67 @@
|
|
|
1
|
-
import S from "../static/
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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 w from "../static/styles/components/
|
|
17
|
-
import y from "../static/styles/components/
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import S from "../static/assets/icons/line-change.svg.js";
|
|
2
|
+
import i from "../static/assets/icons/line-delete.svg.js";
|
|
3
|
+
import n from "../static/assets/icons/line-plus.svg.js";
|
|
4
|
+
import p from "../static/styles/base.css.js";
|
|
5
|
+
import s from "../static/styles/components/alert-message.css.js";
|
|
6
|
+
import C from "../static/styles/components/amp-block.css.js";
|
|
7
|
+
import a from "../static/styles/components/base-input.css.js";
|
|
8
|
+
import f from "../static/styles/components/button-group.css.js";
|
|
9
|
+
import c from "../static/styles/components/button.css.js";
|
|
10
|
+
import u from "../static/styles/components/combobox.css.js";
|
|
11
|
+
import l from "../static/styles/components/counter.css.js";
|
|
12
|
+
import d from "../static/styles/components/dropdown-menu.css.js";
|
|
13
|
+
import h from "../static/styles/components/loader.css.js";
|
|
14
|
+
import g from "../static/styles/components/narrow-panel.css.js";
|
|
15
|
+
import I from "../static/styles/components/popup.css.js";
|
|
16
|
+
import w from "../static/styles/components/recommendation-strategy.css.js";
|
|
17
|
+
import y from "../static/styles/components/switcher.css.js";
|
|
18
|
+
import b from "../static/styles/components/tabs.css.js";
|
|
19
|
+
import B from "../static/styles/components/tools.css.js";
|
|
20
|
+
import $ from "../static/styles/components/version-history.css.js";
|
|
21
|
+
import P from "../static/styles/components/wide-panel.css.js";
|
|
22
|
+
import x from "../static/styles/variables.css.js";
|
|
23
|
+
function r(t, o) {
|
|
24
|
+
return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
|
|
25
|
+
}
|
|
26
|
+
const A = `:host {
|
|
27
|
+
${r("line-change", S)}
|
|
28
|
+
${r("line-delete", i)}
|
|
29
|
+
${r("line-plus", n)}
|
|
30
|
+
}`, R = [
|
|
31
|
+
x,
|
|
24
32
|
// Must be on top
|
|
25
|
-
|
|
26
|
-
e,
|
|
27
|
-
i,
|
|
33
|
+
A,
|
|
28
34
|
p,
|
|
29
|
-
|
|
30
|
-
C,
|
|
35
|
+
// Must be on top
|
|
31
36
|
s,
|
|
32
|
-
|
|
37
|
+
C,
|
|
33
38
|
a,
|
|
34
|
-
|
|
39
|
+
f,
|
|
35
40
|
c,
|
|
41
|
+
u,
|
|
36
42
|
l,
|
|
43
|
+
d,
|
|
37
44
|
h,
|
|
38
|
-
|
|
45
|
+
g,
|
|
46
|
+
I,
|
|
39
47
|
y,
|
|
48
|
+
b,
|
|
40
49
|
B,
|
|
41
|
-
|
|
50
|
+
$,
|
|
51
|
+
P,
|
|
52
|
+
w
|
|
42
53
|
// Last: overrides button.css / wide-panel.css defaults
|
|
43
54
|
].join(`
|
|
44
55
|
|
|
45
|
-
`),
|
|
56
|
+
`), Y = () => ({ importCss: () => {
|
|
46
57
|
const o = new CSSStyleSheet();
|
|
47
|
-
o.replaceSync(
|
|
48
|
-
const
|
|
49
|
-
if (!
|
|
58
|
+
o.replaceSync(R);
|
|
59
|
+
const e = document.querySelector("ui-editor");
|
|
60
|
+
if (!e)
|
|
50
61
|
return;
|
|
51
|
-
const
|
|
52
|
-
|
|
62
|
+
const m = e.shadowRoot;
|
|
63
|
+
m && (m.adoptedStyleSheets = [o]);
|
|
53
64
|
} });
|
|
54
65
|
export {
|
|
55
|
-
|
|
66
|
+
Y as useCustomInterfaceAppearance
|
|
56
67
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { useConfig as I } from "./useConfig.js";
|
|
2
|
+
import { getRecommendationFeedSourceMaps as C, URLS as R } from "../enums/extensions/recommendationBlock.js";
|
|
3
|
+
import { MinDeviceViewport as b, DefaultPadding as h } from "../enums/recommendation.js";
|
|
4
|
+
import { useRecommendationExtensionStore as f } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
5
|
+
import { generateCompleteFilterQuery as x } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
|
|
6
|
+
import { getPartnerRecommendationParams as P } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
|
|
7
|
+
import { sanitizeProductIds as S } from "../extensions/Blocks/Recommendation/utils/productIds.js";
|
|
8
|
+
import { useConfigStore as T } from "../stores/config.js";
|
|
9
|
+
const L = () => ({
|
|
9
10
|
calculateCardWidth: ({
|
|
10
|
-
mobileLeftPadding:
|
|
11
|
+
mobileLeftPadding: i,
|
|
11
12
|
mobileRightPadding: c,
|
|
12
13
|
cardsInRow: s,
|
|
13
14
|
unresponsive: o
|
|
14
15
|
}) => {
|
|
15
|
-
const n = o ? s : 1,
|
|
16
|
-
return (
|
|
16
|
+
const n = o ? s : 1, d = i + c + (n - 1) * h;
|
|
17
|
+
return (b - d) / n;
|
|
17
18
|
},
|
|
18
|
-
getRecommendationCampaignData: (
|
|
19
|
-
const c =
|
|
19
|
+
getRecommendationCampaignData: (i) => {
|
|
20
|
+
const c = f(), s = Number(i), o = c.blockStates[s];
|
|
20
21
|
if (!o)
|
|
21
22
|
return {
|
|
22
23
|
textTrimming: !1,
|
|
@@ -30,10 +31,10 @@ const B = () => ({
|
|
|
30
31
|
discountBeforeTextValue: "",
|
|
31
32
|
discountAfterTextValue: ""
|
|
32
33
|
};
|
|
33
|
-
const { recommendationConfigs: n } = o,
|
|
34
|
+
const { recommendationConfigs: n } = o, d = n.orientation === "grid" ? "vertical" : "horizontal";
|
|
34
35
|
return {
|
|
35
36
|
textTrimming: n.textTrimming,
|
|
36
|
-
orientation:
|
|
37
|
+
orientation: d,
|
|
37
38
|
mobileLeftPadding: 0,
|
|
38
39
|
mobileRightPadding: 0,
|
|
39
40
|
cardsInRow: n.cardsInRow,
|
|
@@ -44,17 +45,17 @@ const B = () => ({
|
|
|
44
45
|
discountAfterTextValue: ""
|
|
45
46
|
};
|
|
46
47
|
},
|
|
47
|
-
buildCampaignUrl: (
|
|
48
|
-
var
|
|
49
|
-
const s =
|
|
48
|
+
buildCampaignUrl: (i, c) => {
|
|
49
|
+
var l;
|
|
50
|
+
const s = f(), o = T(), { isFeatureEnabled: n } = I(), d = Number(i);
|
|
50
51
|
let e;
|
|
51
52
|
if (c)
|
|
52
53
|
e = c;
|
|
53
54
|
else {
|
|
54
|
-
const
|
|
55
|
-
if (!
|
|
55
|
+
const a = s.blockStates[d];
|
|
56
|
+
if (!a)
|
|
56
57
|
return "";
|
|
57
|
-
const { recommendationConfigs: r } =
|
|
58
|
+
const { recommendationConfigs: r } = a;
|
|
58
59
|
e = {
|
|
59
60
|
strategy: r.strategy,
|
|
60
61
|
strategyId: r.strategyId,
|
|
@@ -66,20 +67,20 @@ const B = () => ({
|
|
|
66
67
|
shuffleProducts: r.shuffleProducts
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
|
-
if (e.strategyId)
|
|
70
|
-
return s.recommendationCampaignUrls[
|
|
70
|
+
if (n("reusableRecommendationStrategy") && e.strategyId)
|
|
71
|
+
return s.recommendationCampaignUrls[i] = {
|
|
71
72
|
strategyId: e.strategyId,
|
|
72
73
|
locale: e.language,
|
|
73
74
|
currency: e.currencyCode
|
|
74
75
|
}, "";
|
|
75
|
-
const
|
|
76
|
-
t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", o.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", o.variationId), e.strategy === "manualMerchandising" ? t.set("productId",
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
return s.recommendationCampaignUrls[
|
|
76
|
+
const g = ((l = C().find((a) => a.key === e.strategy)) == null ? void 0 : l.path) || "", t = new URLSearchParams();
|
|
77
|
+
t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", o.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", o.variationId), e.strategy === "manualMerchandising" ? t.set("productId", S(e.productIds)) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
|
|
78
|
+
const p = e.filters.filter((a) => a.isValid), u = x(p);
|
|
79
|
+
u && t.set("filter", u), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(P(o.partnerName, e.strategy)).forEach(([a, r]) => t.set(a, r));
|
|
80
|
+
const y = decodeURIComponent(t.toString()), m = `${R.RECOMMENDATION_API_URL}/v2/${g}?${y}`;
|
|
81
|
+
return s.recommendationCampaignUrls[i] = m, m;
|
|
81
82
|
}
|
|
82
83
|
});
|
|
83
84
|
export {
|
|
84
|
-
|
|
85
|
+
L as useRecommendation
|
|
85
86
|
};
|