@useinsider/guido 3.18.0-beta.19e1253 → 3.18.0-beta.1eb210f
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/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -15
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +41 -43
- 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/package.json.js +1 -1
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -18
- package/dist/static/styles/components/recommendation-strategy.css.js +4 -1
- package/package.json +2 -2
|
@@ -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
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { useTranslations as r } from "../../composables/useTranslations.js";
|
|
2
|
-
const
|
|
2
|
+
const l = {
|
|
3
3
|
RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com",
|
|
4
4
|
// Relative path → same-origin as the embedding inone dashboard.
|
|
5
5
|
PRODUCT_ATTRIBUTES_PATH: "/product-attributes/get-attributes",
|
|
6
6
|
RECOMMENDATION_STRATEGIES_PATH: "/api/recommendation-strategies",
|
|
7
|
-
RECOMMENDATION_STRATEGIES_PANEL_PATH: "/discovery/recommendation-strategies"
|
|
8
|
-
|
|
9
|
-
}, l = {
|
|
7
|
+
RECOMMENDATION_STRATEGIES_PANEL_PATH: "/discovery/recommendation-strategies"
|
|
8
|
+
}, c = {
|
|
10
9
|
CLIENT_ID: "clientId"
|
|
11
10
|
}, d = () => {
|
|
12
11
|
const e = r();
|
|
@@ -91,13 +90,13 @@ const c = {
|
|
|
91
90
|
{ text: "contains", value: "~" },
|
|
92
91
|
{ text: "does not contain", value: "!~" },
|
|
93
92
|
{ text: "any of", value: a }
|
|
94
|
-
],
|
|
93
|
+
], n = [
|
|
95
94
|
{ text: "is exactly", value: "=" },
|
|
96
95
|
{ text: "is not exactly", value: "!==" },
|
|
97
96
|
{ text: "contains", value: "~" },
|
|
98
97
|
{ text: "does not contain", value: "!~" },
|
|
99
98
|
{ text: "any of", value: a }
|
|
100
|
-
],
|
|
99
|
+
], o = [
|
|
101
100
|
{ text: "is equal to", value: "=" },
|
|
102
101
|
{ text: "is greater than", value: ">" },
|
|
103
102
|
{ text: "is less than", value: "<" }
|
|
@@ -117,11 +116,11 @@ const c = {
|
|
|
117
116
|
case "Date":
|
|
118
117
|
return s;
|
|
119
118
|
case "Number":
|
|
120
|
-
return
|
|
119
|
+
return o;
|
|
121
120
|
case "String":
|
|
122
121
|
return t;
|
|
123
122
|
case "Strings":
|
|
124
|
-
return
|
|
123
|
+
return n;
|
|
125
124
|
default:
|
|
126
125
|
return t;
|
|
127
126
|
}
|
|
@@ -129,16 +128,16 @@ const c = {
|
|
|
129
128
|
export {
|
|
130
129
|
a as OP_ANY_OF,
|
|
131
130
|
m as PriceAttributes,
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
c as QUERY_PARAMS,
|
|
132
|
+
l as URLS,
|
|
134
133
|
h as currencyDecimalCounts,
|
|
135
134
|
p as currencyLocationMaps,
|
|
136
135
|
v as currencyOperators,
|
|
137
136
|
x as getOperatorOptions,
|
|
138
137
|
d as getRecommendationFeedSourceMaps,
|
|
139
|
-
|
|
138
|
+
n as operatorOptionsForArrayOfStrings,
|
|
140
139
|
i as operatorOptionsForBooleans,
|
|
141
140
|
s as operatorOptionsForDates,
|
|
142
|
-
|
|
141
|
+
o as operatorOptionsForNumbers,
|
|
143
142
|
t as operatorOptionsForStrings
|
|
144
143
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
2
|
var y = (r, s, t) => s in r ? d(r, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[s] = t;
|
|
3
|
-
var
|
|
4
|
-
import { ACADEMY_LINKS as
|
|
5
|
-
import { CommonControl as
|
|
6
|
-
import { useRecommendationExtensionStore as
|
|
7
|
-
const
|
|
8
|
-
class f extends
|
|
3
|
+
var o = (r, s, t) => y(r, typeof s != "symbol" ? s + "" : s, t);
|
|
4
|
+
import { ACADEMY_LINKS as m } from "../../../../../enums/academy.js";
|
|
5
|
+
import { CommonControl as h } from "../../../common-control.js";
|
|
6
|
+
import { useRecommendationExtensionStore as u } from "../../store/recommendation.js";
|
|
7
|
+
const p = "recommendation-strategy-control";
|
|
8
|
+
class f extends h {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
o(this, "store", u());
|
|
12
|
+
o(this, "storeUnsubscription", () => {
|
|
13
13
|
});
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
o(this, "listeners", []);
|
|
15
|
+
o(this, "lastPaintedState", null);
|
|
16
16
|
}
|
|
17
17
|
getId() {
|
|
18
|
-
return
|
|
18
|
+
return p;
|
|
19
19
|
}
|
|
20
20
|
getTemplate() {
|
|
21
21
|
const t = this.api.translate(
|
|
@@ -31,7 +31,7 @@ class f extends m {
|
|
|
31
31
|
${t}
|
|
32
32
|
${e}
|
|
33
33
|
<a
|
|
34
|
-
href="${
|
|
34
|
+
href="${m.EMAIL_RECOMMENDATION_BLOCK}"
|
|
35
35
|
target="_blank"
|
|
36
36
|
rel="noopener noreferrer">${a}</a>.
|
|
37
37
|
</p>
|
|
@@ -48,7 +48,8 @@ class f extends m {
|
|
|
48
48
|
name: "createStrategy",
|
|
49
49
|
label: this.api.translate("Create New Strategy"),
|
|
50
50
|
id: "guido__btn-create-strategy",
|
|
51
|
-
className: "strategy-control-cta primary"
|
|
51
|
+
className: "strategy-control-cta primary",
|
|
52
|
+
disabled: !0
|
|
52
53
|
})
|
|
53
54
|
], "strategy-control-cta-row")}
|
|
54
55
|
</div>
|
|
@@ -100,10 +101,10 @@ class f extends m {
|
|
|
100
101
|
if (!t)
|
|
101
102
|
return;
|
|
102
103
|
const e = (a, n) => {
|
|
103
|
-
const
|
|
104
|
-
|
|
104
|
+
const i = t.querySelector(a);
|
|
105
|
+
i && (i.addEventListener("click", n), this.listeners.push({ element: i, handler: n }));
|
|
105
106
|
};
|
|
106
|
-
e("#guido__btn-assign-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-
|
|
107
|
+
e("#guido__btn-assign-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-change-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-remove-strategy", () => this.store.openRemoveStrategyModal());
|
|
107
108
|
}
|
|
108
109
|
_renderState() {
|
|
109
110
|
var l;
|
|
@@ -113,11 +114,11 @@ class f extends m {
|
|
|
113
114
|
const n = this.getContainer();
|
|
114
115
|
if (!n)
|
|
115
116
|
return;
|
|
116
|
-
const
|
|
117
|
-
!
|
|
117
|
+
const i = n.querySelector("[data-strategy-empty-state]"), c = n.querySelector("[data-strategy-assigned-state]"), g = n.querySelector("[data-strategy-name]");
|
|
118
|
+
!i || !c || (i.style.display = t ? "none" : "", c.style.display = t ? "" : "none", g && t && (g.textContent = e || `#${t}`), this.lastPaintedState = a);
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
export {
|
|
121
|
-
|
|
122
|
+
p as STRATEGY_CONTROL_ID,
|
|
122
123
|
f as StrategyControl
|
|
123
124
|
};
|
|
@@ -1,31 +1,22 @@
|
|
|
1
|
-
import { getRecommendationFeedSourceMaps as
|
|
2
|
-
import { useRecommendationApi as
|
|
3
|
-
import { useConfigStore as
|
|
4
|
-
import {
|
|
5
|
-
import { defineStore as N } from "pinia";
|
|
1
|
+
import { getRecommendationFeedSourceMaps as b, getOperatorOptions as G, PriceAttributes as v } from "../../../../enums/extensions/recommendationBlock.js";
|
|
2
|
+
import { useRecommendationApi as D } from "../../../../services/recommendationApi.js";
|
|
3
|
+
import { useConfigStore as P } from "../../../../stores/config.js";
|
|
4
|
+
import { defineStore as F } from "pinia";
|
|
6
5
|
import "../constants/selectors.js";
|
|
7
|
-
import { DEFAULT_MOBILE_CARDS_IN_ROW as
|
|
8
|
-
import { DEFAULT_NODE_CONFIG as
|
|
9
|
-
import { getDefaultProducts as
|
|
10
|
-
import { generateCompleteFilterQuery as
|
|
11
|
-
import { getPartnerRecommendationParams as
|
|
12
|
-
import { sanitizeProductIds as
|
|
6
|
+
import { DEFAULT_MOBILE_CARDS_IN_ROW as _, DEFAULT_CARDS_IN_ROW as U } from "../constants/layout.js";
|
|
7
|
+
import { DEFAULT_NODE_CONFIG as N, EXCLUDED_ALGORITHM_IDS as L } from "../constants/defaultConfig.js";
|
|
8
|
+
import { getDefaultProducts as R } from "../templates/utils.js";
|
|
9
|
+
import { generateCompleteFilterQuery as k } from "../utils/filterUtil.js";
|
|
10
|
+
import { getPartnerRecommendationParams as x } from "../utils/partnerCustomizations.js";
|
|
11
|
+
import { sanitizeProductIds as A } from "../utils/productIds.js";
|
|
13
12
|
import { isFilterValid as B } from "../validation/filterSchema.js";
|
|
14
|
-
import { isConfigValid as
|
|
15
|
-
const
|
|
16
|
-
let
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const z = (t, e) => {
|
|
20
|
-
const r = t.filter((s) => !e.has(String(s.strategy_id)));
|
|
21
|
-
if (!r.length)
|
|
22
|
-
return null;
|
|
23
|
-
const n = r.reduce((s, i) => k(i.created_at) > k(s.created_at) ? i : s);
|
|
24
|
-
return String(n.strategy_id);
|
|
25
|
-
};
|
|
26
|
-
function G() {
|
|
13
|
+
import { isConfigValid as M } from "../validation/requiredFields.js";
|
|
14
|
+
const u = D();
|
|
15
|
+
let f = null, h = null, g = null, S = null;
|
|
16
|
+
const p = /* @__PURE__ */ new Map();
|
|
17
|
+
function w() {
|
|
27
18
|
return {
|
|
28
|
-
cardsInRow:
|
|
19
|
+
cardsInRow: U,
|
|
29
20
|
currencySettings: {
|
|
30
21
|
name: "USD",
|
|
31
22
|
value: "USD",
|
|
@@ -39,7 +30,7 @@ function G() {
|
|
|
39
30
|
productIds: [],
|
|
40
31
|
id: 1,
|
|
41
32
|
language: "en_US",
|
|
42
|
-
mobileCardsInRow:
|
|
33
|
+
mobileCardsInRow: _,
|
|
43
34
|
mobileLayoutEnabled: !1,
|
|
44
35
|
orientation: "grid",
|
|
45
36
|
recommendedProducts: [],
|
|
@@ -55,9 +46,9 @@ function G() {
|
|
|
55
46
|
priceHideIfSameAsDiscounted: !1
|
|
56
47
|
};
|
|
57
48
|
}
|
|
58
|
-
function
|
|
49
|
+
function C() {
|
|
59
50
|
return {
|
|
60
|
-
recommendationConfigs:
|
|
51
|
+
recommendationConfigs: w(),
|
|
61
52
|
recommendationProducts: [],
|
|
62
53
|
filterStatus: !1,
|
|
63
54
|
filterSelectionDrawerStatus: !1,
|
|
@@ -68,7 +59,7 @@ function v() {
|
|
|
68
59
|
filterSnapshot: null
|
|
69
60
|
};
|
|
70
61
|
}
|
|
71
|
-
const
|
|
62
|
+
const z = () => ({
|
|
72
63
|
recommendationCampaignUrls: {},
|
|
73
64
|
activePredictiveAlgorithms: [],
|
|
74
65
|
languages: {},
|
|
@@ -77,12 +68,11 @@ const V = () => ({
|
|
|
77
68
|
strategies: [],
|
|
78
69
|
strategiesLoading: !1,
|
|
79
70
|
strategyUrlTemplates: {},
|
|
80
|
-
lastCreatedStrategyId: null,
|
|
81
71
|
blockStates: {},
|
|
82
72
|
currentRecommendationId: null,
|
|
83
73
|
configVersion: 0
|
|
84
|
-
}),
|
|
85
|
-
state: () =>
|
|
74
|
+
}), Y = F("guidoRecommendationExtension", {
|
|
75
|
+
state: () => z(),
|
|
86
76
|
getters: {
|
|
87
77
|
// ====================================================================
|
|
88
78
|
// Proxy Getters — Backward Compatible Access to Current Block State
|
|
@@ -92,7 +82,7 @@ const V = () => ({
|
|
|
92
82
|
* This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
|
|
93
83
|
*/
|
|
94
84
|
recommendationConfigs(t) {
|
|
95
|
-
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs :
|
|
85
|
+
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs : w();
|
|
96
86
|
},
|
|
97
87
|
/**
|
|
98
88
|
* Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
|
|
@@ -147,8 +137,8 @@ const V = () => ({
|
|
|
147
137
|
return [...new Set(t.map((e) => e.filterGroup))].sort((e, r) => e - r);
|
|
148
138
|
},
|
|
149
139
|
getActivePredictiveAlgorithms: (t) => {
|
|
150
|
-
const e =
|
|
151
|
-
return t.activePredictiveAlgorithms.filter((n) => !
|
|
140
|
+
const e = b(), r = [];
|
|
141
|
+
return t.activePredictiveAlgorithms.filter((n) => !L.includes(n)).forEach((n) => {
|
|
152
142
|
r.push(...e.filter((s) => s.id === n));
|
|
153
143
|
}), r.map((n) => ({
|
|
154
144
|
text: n.name,
|
|
@@ -166,7 +156,7 @@ const V = () => ({
|
|
|
166
156
|
getFilterList() {
|
|
167
157
|
return Object.values(this.filterList).filter((t) => t.isFilterable !== 0 && t.isFilterable !== !1).map((t) => {
|
|
168
158
|
let e;
|
|
169
|
-
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` :
|
|
159
|
+
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : v.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
|
|
170
160
|
text: t.displayName,
|
|
171
161
|
value: e,
|
|
172
162
|
type: t.attributeType
|
|
@@ -188,7 +178,7 @@ const V = () => ({
|
|
|
188
178
|
setCurrentBlock(t) {
|
|
189
179
|
this.blockStates[t] || (this.blockStates = {
|
|
190
180
|
...this.blockStates,
|
|
191
|
-
[t]:
|
|
181
|
+
[t]: C()
|
|
192
182
|
}), this.currentRecommendationId = t;
|
|
193
183
|
},
|
|
194
184
|
/**
|
|
@@ -256,7 +246,7 @@ const V = () => ({
|
|
|
256
246
|
decimalCount: String(e.currencyDecimalCount),
|
|
257
247
|
decimalSeparator: r(e.currencyDecimalSeparator, ","),
|
|
258
248
|
thousandSeparator: r(e.currencyThousandSeparator, ".")
|
|
259
|
-
}, s = !this.blockStates[t], i = s ?
|
|
249
|
+
}, s = !this.blockStates[t], i = s ? C() : this.blockStates[t];
|
|
260
250
|
i.recommendationConfigs = {
|
|
261
251
|
...i.recommendationConfigs,
|
|
262
252
|
strategy: e.strategy,
|
|
@@ -295,7 +285,7 @@ const V = () => ({
|
|
|
295
285
|
* Creates a filter with the first available attribute and operator pre-selected.
|
|
296
286
|
*/
|
|
297
287
|
createDefaultFilter(t, e) {
|
|
298
|
-
const [r] = this.getFilterList, [n] =
|
|
288
|
+
const [r] = this.getFilterList, [n] = G(r == null ? void 0 : r.type);
|
|
299
289
|
return {
|
|
300
290
|
type: "standardFilter",
|
|
301
291
|
attribute: (r == null ? void 0 : r.value) ?? "",
|
|
@@ -355,47 +345,29 @@ const V = () => ({
|
|
|
355
345
|
this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId] || (this.blockStates[this.currentRecommendationId].removeStrategyModalStatus = !1);
|
|
356
346
|
},
|
|
357
347
|
async fetchStrategies() {
|
|
358
|
-
if (
|
|
359
|
-
await
|
|
348
|
+
if (S) {
|
|
349
|
+
await S;
|
|
360
350
|
return;
|
|
361
351
|
}
|
|
362
|
-
|
|
352
|
+
S = (async () => {
|
|
363
353
|
this.strategiesLoading = !0;
|
|
364
354
|
try {
|
|
365
|
-
this.strategies = await
|
|
355
|
+
this.strategies = await u.fetchRecommendationStrategies();
|
|
366
356
|
} finally {
|
|
367
357
|
this.strategiesLoading = !1;
|
|
368
358
|
}
|
|
369
359
|
})();
|
|
370
360
|
try {
|
|
371
|
-
await
|
|
361
|
+
await S;
|
|
372
362
|
} finally {
|
|
373
|
-
|
|
363
|
+
S = null;
|
|
374
364
|
}
|
|
375
365
|
},
|
|
376
|
-
/**
|
|
377
|
-
* Opens Smart Recommender's strategy creation page in a new tab. The first time the user
|
|
378
|
-
* comes back, the list is fetched once more and any strategy that appeared meanwhile
|
|
379
|
-
* is remembered so the drawer can preselect it.
|
|
380
|
-
*/
|
|
381
|
-
openStrategyCreation() {
|
|
382
|
-
const t = new Set(this.strategies.map((r) => String(r.strategy_id)));
|
|
383
|
-
window.open(D.RECOMMENDATION_STRATEGY_CREATE_PATH, "_blank", "noopener"), u == null || u();
|
|
384
|
-
const e = () => {
|
|
385
|
-
document.hidden || (u == null || u(), this.fetchStrategies().then(() => {
|
|
386
|
-
this.lastCreatedStrategyId = z(this.strategies, t);
|
|
387
|
-
}).catch(() => {
|
|
388
|
-
}));
|
|
389
|
-
};
|
|
390
|
-
document.addEventListener("visibilitychange", e), window.addEventListener("focus", e), u = () => {
|
|
391
|
-
document.removeEventListener("visibilitychange", e), window.removeEventListener("focus", e), u = null;
|
|
392
|
-
};
|
|
393
|
-
},
|
|
394
366
|
async resolveStrategyUrlTemplate(t, e) {
|
|
395
367
|
const r = typeof t.updated_at == "string" ? t.updated_at : "", n = r ? `${t.strategy_id}:${r}:${e}` : "", s = n ? this.strategyUrlTemplates[n] : void 0;
|
|
396
368
|
if (s)
|
|
397
369
|
return s;
|
|
398
|
-
const { full_path: i = "" } = await
|
|
370
|
+
const { full_path: i = "" } = await u.generateStrategyEndpoint(t, e) ?? {};
|
|
399
371
|
return n && i && (this.strategyUrlTemplates = {
|
|
400
372
|
...this.strategyUrlTemplates,
|
|
401
373
|
[n]: i
|
|
@@ -408,23 +380,23 @@ const V = () => ({
|
|
|
408
380
|
});
|
|
409
381
|
},
|
|
410
382
|
removeStrategy() {
|
|
411
|
-
this.patchCurrentBlockConfig({ strategyId: "", size:
|
|
383
|
+
this.patchCurrentBlockConfig({ strategyId: "", size: N.size });
|
|
412
384
|
},
|
|
413
385
|
// ====================================================================
|
|
414
386
|
// Shared Data Fetching (fetched once, used by all blocks)
|
|
415
387
|
// ====================================================================
|
|
416
388
|
async fetchRecommendationCreateData() {
|
|
417
389
|
if (!this.activePredictiveAlgorithms.length) {
|
|
418
|
-
if (
|
|
419
|
-
await
|
|
390
|
+
if (f) {
|
|
391
|
+
await f;
|
|
420
392
|
return;
|
|
421
393
|
}
|
|
422
|
-
|
|
394
|
+
f = (async () => {
|
|
423
395
|
const {
|
|
424
396
|
activePredictiveAlgorithms: t,
|
|
425
397
|
languages: e,
|
|
426
398
|
currencies: r
|
|
427
|
-
} = await
|
|
399
|
+
} = await u.fetchRecommendationCreateData();
|
|
428
400
|
if (this.activePredictiveAlgorithms = t, this.languages = e, this.currentRecommendationId !== null && this.blockStates[this.currentRecommendationId]) {
|
|
429
401
|
const n = this.blockStates[this.currentRecommendationId];
|
|
430
402
|
n.filterStatus = !!n.recommendationConfigs.filters.length;
|
|
@@ -432,26 +404,26 @@ const V = () => ({
|
|
|
432
404
|
this.currencyList = r;
|
|
433
405
|
})();
|
|
434
406
|
try {
|
|
435
|
-
await
|
|
407
|
+
await f;
|
|
436
408
|
} finally {
|
|
437
|
-
|
|
409
|
+
f = null;
|
|
438
410
|
}
|
|
439
411
|
}
|
|
440
412
|
},
|
|
441
413
|
async fetchRecommendationFilters() {
|
|
442
414
|
if (!Object.keys(this.filterList).length) {
|
|
443
|
-
if (
|
|
444
|
-
await
|
|
415
|
+
if (h) {
|
|
416
|
+
await h;
|
|
445
417
|
return;
|
|
446
418
|
}
|
|
447
|
-
|
|
448
|
-
const t = await
|
|
419
|
+
h = (async () => {
|
|
420
|
+
const t = await u.fetchRecommendationFilters();
|
|
449
421
|
this.filterList = t;
|
|
450
422
|
})();
|
|
451
423
|
try {
|
|
452
|
-
await
|
|
424
|
+
await h;
|
|
453
425
|
} finally {
|
|
454
|
-
|
|
426
|
+
h = null;
|
|
455
427
|
}
|
|
456
428
|
}
|
|
457
429
|
},
|
|
@@ -518,7 +490,7 @@ const V = () => ({
|
|
|
518
490
|
}), e.recommendationConfigs.filters = r;
|
|
519
491
|
},
|
|
520
492
|
generateFilterQuery() {
|
|
521
|
-
return
|
|
493
|
+
return k(this.recommendationConfigs.filters);
|
|
522
494
|
},
|
|
523
495
|
/**
|
|
524
496
|
* Validation-only check invoked at save-CTA time. Defined as an action
|
|
@@ -526,33 +498,33 @@ const V = () => ({
|
|
|
526
498
|
* every block's recommendationConfigs across user edits.
|
|
527
499
|
*/
|
|
528
500
|
hasInvalidBlock() {
|
|
529
|
-
return Object.values(this.blockStates).some((t) => !
|
|
501
|
+
return Object.values(this.blockStates).some((t) => !M(t.recommendationConfigs, this));
|
|
530
502
|
},
|
|
531
503
|
// ====================================================================
|
|
532
504
|
// Per-Block Product Fetching
|
|
533
505
|
// ====================================================================
|
|
534
506
|
async fetchRecommendationProducts() {
|
|
535
507
|
if (!(this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])) {
|
|
536
|
-
if (
|
|
537
|
-
await
|
|
508
|
+
if (g) {
|
|
509
|
+
await g;
|
|
538
510
|
return;
|
|
539
511
|
}
|
|
540
|
-
|
|
512
|
+
g = this._doFetchProducts();
|
|
541
513
|
try {
|
|
542
|
-
await
|
|
514
|
+
await g;
|
|
543
515
|
} finally {
|
|
544
|
-
|
|
516
|
+
g = null;
|
|
545
517
|
}
|
|
546
518
|
}
|
|
547
519
|
},
|
|
548
520
|
async _doFetchProducts() {
|
|
549
|
-
var
|
|
550
|
-
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n =
|
|
521
|
+
var d;
|
|
522
|
+
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = P();
|
|
551
523
|
if (r.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy")) {
|
|
552
524
|
await this._doFetchStrategyProducts(t);
|
|
553
525
|
return;
|
|
554
526
|
}
|
|
555
|
-
const s = r.filters.filter((m) => m.isValid), i =
|
|
527
|
+
const s = r.filters.filter((m) => m.isValid), i = k(s), o = ((d = b().find((m) => m.key === r.strategy)) == null ? void 0 : d.path) || "", c = parseInt(r.size) || 6, a = {
|
|
556
528
|
locale: r.language,
|
|
557
529
|
currency: r.currencySettings.value,
|
|
558
530
|
partnerName: n.partnerName,
|
|
@@ -560,21 +532,21 @@ const V = () => ({
|
|
|
560
532
|
details: !0,
|
|
561
533
|
campaignId: n.variationId
|
|
562
534
|
};
|
|
563
|
-
r.strategy === "manualMerchandising" ? a.productId =
|
|
535
|
+
r.strategy === "manualMerchandising" ? a.productId = A(r.productIds) : r.strategy === "similarViewed" && (a.productId = "{itemId}"), r.strategy === "userBased" && (a.userId = "{user_id}"), i && (a.filter = i), r.shuffleProducts && (a.shuffle = !0), Object.assign(
|
|
564
536
|
a,
|
|
565
|
-
|
|
537
|
+
x(n.partnerName, r.strategy)
|
|
566
538
|
);
|
|
567
539
|
let l;
|
|
568
540
|
try {
|
|
569
|
-
l = await
|
|
541
|
+
l = await u.fetchRecommendationProducts(o, a);
|
|
570
542
|
} catch {
|
|
571
543
|
l = [];
|
|
572
544
|
}
|
|
573
545
|
this._setBlockProducts(t, l, c);
|
|
574
546
|
},
|
|
575
547
|
async _doFetchStrategyProducts(t) {
|
|
576
|
-
const e = (
|
|
577
|
-
|
|
548
|
+
const e = (p.get(t) ?? 0) + 1;
|
|
549
|
+
p.set(t, e);
|
|
578
550
|
const { recommendationConfigs: r } = this.blockStates[t];
|
|
579
551
|
let n = [], s = parseInt(r.size) || 6;
|
|
580
552
|
try {
|
|
@@ -584,25 +556,25 @@ const V = () => ({
|
|
|
584
556
|
);
|
|
585
557
|
if (i) {
|
|
586
558
|
s = parseInt(String(i.size ?? "")) || s;
|
|
587
|
-
const o = r.currencySettings.value, a = (await this.resolveStrategyUrlTemplate(i, o)).replaceAll("{locale}", r.language).replaceAll("{currency}", o), l = a.indexOf("?"),
|
|
588
|
-
|
|
559
|
+
const o = r.currencySettings.value, a = (await this.resolveStrategyUrlTemplate(i, o)).replaceAll("{locale}", r.language).replaceAll("{currency}", o), l = a.indexOf("?"), d = l === -1 ? a : a.slice(0, l), m = (l === -1 ? "" : a.slice(l + 1)).split("&").filter((I) => I && !I.startsWith("user_id=")), y = m.length ? `${d}?${m.join("&")}` : d;
|
|
560
|
+
y && (n = await u.fetchRecommendationProductsByUrl(y));
|
|
589
561
|
}
|
|
590
562
|
} catch {
|
|
591
563
|
n = [];
|
|
592
564
|
}
|
|
593
|
-
|
|
565
|
+
p.get(t) === e && this._setBlockProducts(t, n, s);
|
|
594
566
|
},
|
|
595
567
|
_setBlockProducts(t, e, r) {
|
|
596
568
|
if (!this.blockStates[t])
|
|
597
569
|
return;
|
|
598
|
-
const n = e.length > 0 ? e :
|
|
570
|
+
const n = e.length > 0 ? e : R(r);
|
|
599
571
|
this.blockStates[t].recommendationProducts = [
|
|
600
572
|
...n.slice(0, r),
|
|
601
|
-
...
|
|
573
|
+
...R(Math.max(0, r - n.length))
|
|
602
574
|
];
|
|
603
575
|
}
|
|
604
576
|
}
|
|
605
577
|
});
|
|
606
578
|
export {
|
|
607
|
-
|
|
579
|
+
Y as useRecommendationExtensionStore
|
|
608
580
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-5c588dc5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-5c588dc5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-5c588dc5]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-
|
|
1
|
+
@charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-5c588dc5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-5c588dc5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-5c588dc5]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-2580a7d9]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-2580a7d9] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}
|
package/dist/package.json.js
CHANGED
|
@@ -71,7 +71,6 @@ interface StoreState {
|
|
|
71
71
|
strategies: RrsStrategy[];
|
|
72
72
|
strategiesLoading: boolean;
|
|
73
73
|
strategyUrlTemplates: Record<string, string>;
|
|
74
|
-
lastCreatedStrategyId: string | null;
|
|
75
74
|
blockStates: Record<number, PerBlockState>;
|
|
76
75
|
currentRecommendationId: number | null;
|
|
77
76
|
configVersion: number;
|
|
@@ -100,7 +99,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
100
99
|
}[];
|
|
101
100
|
strategiesLoading: boolean;
|
|
102
101
|
strategyUrlTemplates: Record<string, string>;
|
|
103
|
-
lastCreatedStrategyId: string | null;
|
|
104
102
|
blockStates: Record<number, PerBlockState>;
|
|
105
103
|
currentRecommendationId: number | null;
|
|
106
104
|
configVersion: number;
|
|
@@ -127,7 +125,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
127
125
|
}[];
|
|
128
126
|
strategiesLoading: boolean;
|
|
129
127
|
strategyUrlTemplates: Record<string, string>;
|
|
130
|
-
lastCreatedStrategyId: string | null;
|
|
131
128
|
blockStates: Record<number, PerBlockState>;
|
|
132
129
|
currentRecommendationId: number | null;
|
|
133
130
|
configVersion: number;
|
|
@@ -154,7 +151,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
154
151
|
}[];
|
|
155
152
|
strategiesLoading: boolean;
|
|
156
153
|
strategyUrlTemplates: Record<string, string>;
|
|
157
|
-
lastCreatedStrategyId: string | null;
|
|
158
154
|
blockStates: Record<number, PerBlockState>;
|
|
159
155
|
currentRecommendationId: number | null;
|
|
160
156
|
configVersion: number;
|
|
@@ -178,7 +174,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
178
174
|
}[];
|
|
179
175
|
strategiesLoading: boolean;
|
|
180
176
|
strategyUrlTemplates: Record<string, string>;
|
|
181
|
-
lastCreatedStrategyId: string | null;
|
|
182
177
|
blockStates: Record<number, PerBlockState>;
|
|
183
178
|
currentRecommendationId: number | null;
|
|
184
179
|
configVersion: number;
|
|
@@ -202,7 +197,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
202
197
|
}[];
|
|
203
198
|
strategiesLoading: boolean;
|
|
204
199
|
strategyUrlTemplates: Record<string, string>;
|
|
205
|
-
lastCreatedStrategyId: string | null;
|
|
206
200
|
blockStates: Record<number, PerBlockState>;
|
|
207
201
|
currentRecommendationId: number | null;
|
|
208
202
|
configVersion: number;
|
|
@@ -226,7 +220,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
226
220
|
}[];
|
|
227
221
|
strategiesLoading: boolean;
|
|
228
222
|
strategyUrlTemplates: Record<string, string>;
|
|
229
|
-
lastCreatedStrategyId: string | null;
|
|
230
223
|
blockStates: Record<number, PerBlockState>;
|
|
231
224
|
currentRecommendationId: number | null;
|
|
232
225
|
configVersion: number;
|
|
@@ -253,7 +246,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
253
246
|
}[];
|
|
254
247
|
strategiesLoading: boolean;
|
|
255
248
|
strategyUrlTemplates: Record<string, string>;
|
|
256
|
-
lastCreatedStrategyId: string | null;
|
|
257
249
|
blockStates: Record<number, PerBlockState>;
|
|
258
250
|
currentRecommendationId: number | null;
|
|
259
251
|
configVersion: number;
|
|
@@ -280,7 +272,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
280
272
|
}[];
|
|
281
273
|
strategiesLoading: boolean;
|
|
282
274
|
strategyUrlTemplates: Record<string, string>;
|
|
283
|
-
lastCreatedStrategyId: string | null;
|
|
284
275
|
blockStates: Record<number, PerBlockState>;
|
|
285
276
|
currentRecommendationId: number | null;
|
|
286
277
|
configVersion: number;
|
|
@@ -308,7 +299,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
308
299
|
}[];
|
|
309
300
|
strategiesLoading: boolean;
|
|
310
301
|
strategyUrlTemplates: Record<string, string>;
|
|
311
|
-
lastCreatedStrategyId: string | null;
|
|
312
302
|
blockStates: Record<number, PerBlockState>;
|
|
313
303
|
currentRecommendationId: number | null;
|
|
314
304
|
configVersion: number;
|
|
@@ -335,7 +325,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
335
325
|
}[];
|
|
336
326
|
strategiesLoading: boolean;
|
|
337
327
|
strategyUrlTemplates: Record<string, string>;
|
|
338
|
-
lastCreatedStrategyId: string | null;
|
|
339
328
|
blockStates: Record<number, PerBlockState>;
|
|
340
329
|
currentRecommendationId: number | null;
|
|
341
330
|
configVersion: number;
|
|
@@ -362,7 +351,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
362
351
|
}[];
|
|
363
352
|
strategiesLoading: boolean;
|
|
364
353
|
strategyUrlTemplates: Record<string, string>;
|
|
365
|
-
lastCreatedStrategyId: string | null;
|
|
366
354
|
blockStates: Record<number, PerBlockState>;
|
|
367
355
|
currentRecommendationId: number | null;
|
|
368
356
|
configVersion: number;
|
|
@@ -445,12 +433,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
445
433
|
openRemoveStrategyModal(): void;
|
|
446
434
|
closeRemoveStrategyModal(): void;
|
|
447
435
|
fetchStrategies(): Promise<void>;
|
|
448
|
-
/**
|
|
449
|
-
* Opens Smart Recommender's strategy creation page in a new tab. The first time the user
|
|
450
|
-
* comes back, the list is fetched once more and any strategy that appeared meanwhile
|
|
451
|
-
* is remembered so the drawer can preselect it.
|
|
452
|
-
*/
|
|
453
|
-
openStrategyCreation(): void;
|
|
454
436
|
resolveStrategyUrlTemplate(strategy: RrsStrategy, currency: string): Promise<string>;
|
|
455
437
|
assignStrategy(strategy: RrsStrategy): void;
|
|
456
438
|
removeStrategy(): void;
|
|
@@ -49,8 +49,11 @@ const n = `.strategy-control-header {
|
|
|
49
49
|
white-space: nowrap;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.strategy-control-cta.primary > .button
|
|
52
|
+
.strategy-control-cta.primary > .button:disabled,
|
|
53
|
+
.strategy-control-cta.primary > .button.disabled {
|
|
54
|
+
opacity: 1;
|
|
53
55
|
color: var(--guido-color-gray-800);
|
|
56
|
+
cursor: default;
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
.strategy-control-name-band {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.18.0-beta.
|
|
3
|
+
"version": "3.18.0-beta.1eb210f",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
},
|
|
119
119
|
"guido": {
|
|
120
120
|
"stripo": {
|
|
121
|
-
"version": "2.
|
|
121
|
+
"version": "2.73.0"
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|