@useinsider/guido 3.18.2-beta.ec25841 → 3.18.2-beta.f42547e
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 +1 -1
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +49 -48
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +9 -9
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +34 -34
- package/dist/composables/useHttp.js +24 -22
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -3
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +53 -51
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
- package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
- package/dist/guido.css +1 -1
- package/dist/services/templateLibraryApi.js +17 -14
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
- package/dist/src/utils/genericUtil.d.ts +6 -0
- package/dist/utils/genericUtil.js +45 -39
- package/dist/utils/templatePreparation.js +41 -40
- package/package.json +1 -1
- package/dist/extensions/Blocks/Recommendation/utils/strategyDetach.js +0 -19
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyDetach.d.ts +0 -12
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, defineAsyncComponent as S, ref as T, computed as g, watch as h } from "vue";
|
|
2
2
|
import "@useinsider/design-system-organisms/style";
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
3
|
+
import { useToaster as C } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as b } from "../../../../composables/useTranslations.js";
|
|
5
5
|
import { DOTTED_DATE_LOCALE as B } from "../../../../enums/date.js";
|
|
6
|
-
import { URLS as
|
|
7
|
-
import { ToasterTypeOptions as
|
|
8
|
-
import { useRecommendationExtensionStore as
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
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
11
|
import { formatShortDate as P } from "../../../../utils/dateUtil.js";
|
|
12
|
-
import { asText as
|
|
12
|
+
import { asText as v } from "../../../../utils/genericUtil.js";
|
|
13
13
|
import { escapeHtml as U } from "../../../../utils/htmlEscape.js";
|
|
14
14
|
import { InSkeleton as L } from "@useinsider/design-system-vue";
|
|
15
|
-
const rt = /* @__PURE__ */
|
|
15
|
+
const rt = /* @__PURE__ */ A({
|
|
16
16
|
__name: "AssignStrategyDrawer",
|
|
17
17
|
setup(M) {
|
|
18
|
-
const
|
|
19
|
-
render: (
|
|
20
|
-
}),
|
|
21
|
-
loader: async () => (await
|
|
22
|
-
loadingComponent:
|
|
18
|
+
const m = () => import("@useinsider/design-system-organisms"), u = (t, r) => ({
|
|
19
|
+
render: (a) => a(L, { props: { sizing: { width: t, height: r } } })
|
|
20
|
+
}), w = S({
|
|
21
|
+
loader: async () => (await m()).OrgStrategyDetailModal,
|
|
22
|
+
loadingComponent: u(480, 240),
|
|
23
23
|
delay: 0
|
|
24
|
-
}),
|
|
25
|
-
loader: async () => (await
|
|
26
|
-
}), n = "guido-edit-strategy-",
|
|
24
|
+
}), D = S({
|
|
25
|
+
loader: async () => (await m()).OrgStrategyDropdown
|
|
26
|
+
}), n = "guido-edit-strategy-", o = b(), e = R(), { showToaster: i } = C(), s = T(null), c = T(!1), I = g(() => e.assignStrategyDrawerStatus ? o("email-editor.assign-strategy-description", { url: k.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
|
|
27
27
|
h(() => e.assignStrategyDrawerStatus, (t) => {
|
|
28
28
|
if (!t)
|
|
29
29
|
return;
|
|
30
30
|
const { strategyId: r } = e.recommendationConfigs;
|
|
31
|
-
|
|
31
|
+
s.value = r || null, c.value = !1, e.fetchStrategies().catch(() => {
|
|
32
32
|
i({
|
|
33
|
-
type:
|
|
34
|
-
message:
|
|
33
|
+
type: d.Error,
|
|
34
|
+
message: o("discovery-strategy.error-description")
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
|
-
const
|
|
39
|
-
const r =
|
|
38
|
+
const y = (t) => {
|
|
39
|
+
const r = v(t.updated_at || t.created_at);
|
|
40
40
|
if (!r)
|
|
41
41
|
return "";
|
|
42
|
-
const
|
|
43
|
-
return
|
|
44
|
-
}, x =
|
|
42
|
+
const a = P(r, B);
|
|
43
|
+
return o("recommendation-strategy.last-updated-on", { value: a });
|
|
44
|
+
}, x = g(() => e.strategies.map((t) => ({
|
|
45
45
|
text: t.name,
|
|
46
46
|
value: t.strategy_id,
|
|
47
47
|
infoBoxProps: {
|
|
@@ -49,16 +49,16 @@ const rt = /* @__PURE__ */ I({
|
|
|
49
49
|
theme: "light",
|
|
50
50
|
variant: "information",
|
|
51
51
|
className: "assign-strategy-info-box",
|
|
52
|
-
titleText: U(
|
|
52
|
+
titleText: U(v(t.name)),
|
|
53
53
|
descriptionStatus: !0,
|
|
54
|
-
descriptionText:
|
|
55
|
-
slot:
|
|
54
|
+
descriptionText: y(t),
|
|
55
|
+
slot: N,
|
|
56
56
|
slotProps: { strategy: t },
|
|
57
57
|
// The info box drops the option's value/text, so the id is the only channel
|
|
58
58
|
// that can carry the strategy back to the click handler.
|
|
59
59
|
buttonOptions: [{
|
|
60
60
|
id: `${n}${t.strategy_id}`,
|
|
61
|
-
text:
|
|
61
|
+
text: o("eureka.edit-strategy"),
|
|
62
62
|
type: "text",
|
|
63
63
|
// Resolved from Guido's own public/sprite.svg by InIcons; an unknown name would
|
|
64
64
|
// silently render blank space instead of failing.
|
|
@@ -70,26 +70,26 @@ const rt = /* @__PURE__ */ I({
|
|
|
70
70
|
const r = (f = t == null ? void 0 : t.id) != null && f.startsWith(n) ? t.id.slice(n.length) : "";
|
|
71
71
|
if (!r)
|
|
72
72
|
return;
|
|
73
|
-
const
|
|
74
|
-
String(
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
}, p =
|
|
78
|
-
const t = e.strategies.find((r) => String(r.strategy_id) === String(
|
|
73
|
+
const a = e.currentRecommendationId;
|
|
74
|
+
String(s.value ?? "") === r && (s.value = null);
|
|
75
|
+
const l = e.recommendationConfigs.strategyId === r;
|
|
76
|
+
l && e.removeStrategy(), e.openStrategyEdit(r), l && a !== null && _(a, "Removed recommendation strategy");
|
|
77
|
+
}, p = g(() => {
|
|
78
|
+
const t = e.strategies.find((r) => String(r.strategy_id) === String(s.value ?? ""));
|
|
79
79
|
return t ? { ...t, fallback_config: null } : null;
|
|
80
|
-
}), O =
|
|
80
|
+
}), O = g(() => ({
|
|
81
81
|
primaryButton: {
|
|
82
82
|
styling: "solid",
|
|
83
83
|
type: "primary",
|
|
84
|
-
labelText:
|
|
84
|
+
labelText: o("products.assign-btn")
|
|
85
85
|
},
|
|
86
86
|
cancelOrBackButton: {
|
|
87
87
|
styling: "ghost",
|
|
88
88
|
type: "secondary",
|
|
89
|
-
labelText:
|
|
89
|
+
labelText: o("products.cancel")
|
|
90
90
|
}
|
|
91
91
|
}));
|
|
92
|
-
return { __sfc: !0, loadOrganisms:
|
|
92
|
+
return { __sfc: !0, loadOrganisms: m, skeleton: u, OrgStrategyDetailModal: w, OrgStrategyDropdown: D, EDIT_BUTTON_ID_PREFIX: n, trans: o, store: e, showToaster: i, selectedStrategyId: s, showSelectionError: c, drawerDescription: I, lastUpdatedText: y, strategyOptions: x, onInfoBoxButtonClick: E, selectedStrategy: p, footerButtonGroupOptions: O, closeDrawer: () => {
|
|
93
93
|
e.closeAssignStrategyDrawer();
|
|
94
94
|
}, assignStrategy: async () => {
|
|
95
95
|
const t = p.value;
|
|
@@ -100,22 +100,23 @@ const rt = /* @__PURE__ */ I({
|
|
|
100
100
|
let r = "";
|
|
101
101
|
try {
|
|
102
102
|
r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
|
|
103
|
-
} catch (
|
|
104
|
-
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed",
|
|
103
|
+
} catch (l) {
|
|
104
|
+
console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", l);
|
|
105
105
|
}
|
|
106
106
|
if (!r) {
|
|
107
107
|
i({
|
|
108
|
-
type:
|
|
109
|
-
message:
|
|
108
|
+
type: d.Error,
|
|
109
|
+
message: o("email-editor.strategy-assign-failed", { strategyName: t.name })
|
|
110
110
|
});
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
+
const a = e.currentRecommendationId;
|
|
113
114
|
e.assignStrategy(t), i({
|
|
114
|
-
type:
|
|
115
|
-
message:
|
|
116
|
-
}), e.closeAssignStrategyDrawer();
|
|
115
|
+
type: d.Success,
|
|
116
|
+
message: o("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
117
|
+
}), e.closeAssignStrategyDrawer(), a !== null && await _(a, "Assigned recommendation strategy");
|
|
117
118
|
}, onSelect: (t) => {
|
|
118
|
-
|
|
119
|
+
s.value = t.value, c.value = !1;
|
|
119
120
|
} };
|
|
120
121
|
}
|
|
121
122
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useToaster as
|
|
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
4
|
import { useTranslations as y } from "../../../../composables/useTranslations.js";
|
|
5
5
|
import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
|
|
6
6
|
import { useRecommendationExtensionStore as f } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
7
|
-
import {
|
|
7
|
+
import { commitStrategyChange as _ } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
|
|
8
8
|
import { escapeHtml as T } from "../../../../utils/htmlEscape.js";
|
|
9
|
-
const
|
|
9
|
+
const B = /* @__PURE__ */ d({
|
|
10
10
|
__name: "RemoveStrategyModal",
|
|
11
11
|
setup(v) {
|
|
12
|
-
const t = y(), e = f(), { showToaster: n } =
|
|
12
|
+
const t = y(), e = f(), { showToaster: n } = l(), i = a(() => ({
|
|
13
13
|
cancelOrBackButton: {
|
|
14
14
|
type: "secondary",
|
|
15
15
|
labelText: t("products.cancel"),
|
|
@@ -34,10 +34,10 @@ const C = /* @__PURE__ */ l({
|
|
|
34
34
|
message: t("email-editor.strategy-removed-success", {
|
|
35
35
|
strategyName: `<b>${T(s)}</b>`
|
|
36
36
|
})
|
|
37
|
-
}), o !== null && await _(o);
|
|
38
|
-
}, WpModal:
|
|
37
|
+
}), o !== null && await _(o, "Removed recommendation strategy");
|
|
38
|
+
}, WpModal: g };
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
B as default
|
|
43
43
|
};
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useTranslations as
|
|
1
|
+
import { defineComponent as _, ref as c, computed as h, watch as C, toRef as N, nextTick as O } from "vue";
|
|
2
|
+
import b from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import { useTranslations as D } from "../../../composables/useTranslations.js";
|
|
4
4
|
import { useTemplateNameValidator as x } from "../../../composables/validators/saveAsTemplate.js";
|
|
5
5
|
import { useTemplateLibraryApi as B } from "../../../services/templateLibraryApi.js";
|
|
6
|
-
import { useEditorStore as
|
|
7
|
-
import { useSaveAsTemplateStore as
|
|
8
|
-
import { InMultiSelect as
|
|
9
|
-
import { useDebounceFn as
|
|
10
|
-
const
|
|
6
|
+
import { useEditorStore as k } from "../../../stores/editor.js";
|
|
7
|
+
import { useSaveAsTemplateStore as I } from "../../../stores/save-as-template.js";
|
|
8
|
+
import { InMultiSelect as M, InBasicTextInput as V } from "@useinsider/design-system-vue";
|
|
9
|
+
import { useDebounceFn as E } from "../../../node_modules/@vueuse/shared/index.js";
|
|
10
|
+
const J = /* @__PURE__ */ _({
|
|
11
11
|
__name: "SaveAsTemplateDrawer",
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
12
|
+
setup(R) {
|
|
13
|
+
const s = D(), o = k(), t = I(), { createTemplate: m } = B(), a = c(!1), n = c(!1), r = c(""), f = h(() => ({
|
|
14
14
|
primaryButton: {
|
|
15
15
|
styling: "solid",
|
|
16
16
|
type: "primary",
|
|
17
|
-
labelText:
|
|
17
|
+
labelText: s(a.value ? "newsletter.saving" : "products.save"),
|
|
18
18
|
loadingStatus: a.value,
|
|
19
19
|
disabledStatus: t.skeletonStatus
|
|
20
20
|
},
|
|
21
21
|
cancelOrBackButton: {
|
|
22
22
|
styling: "ghost",
|
|
23
23
|
type: "secondary",
|
|
24
|
-
labelText:
|
|
24
|
+
labelText: s("products.cancel"),
|
|
25
25
|
disabledStatus: a.value
|
|
26
26
|
}
|
|
27
|
-
})),
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
const e =
|
|
31
|
-
return
|
|
32
|
-
}, v =
|
|
33
|
-
t.templateName = e, await
|
|
34
|
-
}, 500),
|
|
35
|
-
|
|
36
|
-
},
|
|
27
|
+
})), p = () => {
|
|
28
|
+
r.value = "", o.isSaveAsTemplateDrawerOpen = !1;
|
|
29
|
+
}, l = async () => {
|
|
30
|
+
const e = N(t, "templateName"), { success: i, errorMessage: A } = await x(e).validate();
|
|
31
|
+
return r.value = A, i;
|
|
32
|
+
}, v = E(async (e) => {
|
|
33
|
+
t.templateName = e, await l();
|
|
34
|
+
}, 500), S = async (e) => {
|
|
35
|
+
n.value = !0, await t.addCategory(e), n.value = !1;
|
|
36
|
+
}, T = (e) => {
|
|
37
37
|
t.selectedCategories = e;
|
|
38
|
-
},
|
|
38
|
+
}, g = (e) => {
|
|
39
39
|
e && (t.selectedCategories = e);
|
|
40
|
-
},
|
|
40
|
+
}, y = () => {
|
|
41
41
|
t.selectedCategories = [];
|
|
42
42
|
}, w = async () => {
|
|
43
|
-
if (a.value = !0, !await
|
|
43
|
+
if (a.value = !0, !await l()) {
|
|
44
44
|
a.value = !1;
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
const
|
|
48
|
-
a.value = !1,
|
|
49
|
-
},
|
|
50
|
-
|
|
47
|
+
const i = await m();
|
|
48
|
+
a.value = !1, i && p();
|
|
49
|
+
}, u = () => {
|
|
50
|
+
O(() => {
|
|
51
51
|
const e = document.querySelector("input#guido__template-name-input");
|
|
52
52
|
e == null || e.focus();
|
|
53
53
|
});
|
|
54
54
|
}, d = async () => {
|
|
55
|
-
t.$reset(), await t.fetchCategories(), t.skeletonStatus = !1,
|
|
55
|
+
t.$reset(), await t.fetchCategories(), t.skeletonStatus = !1, u();
|
|
56
56
|
};
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
}), { __sfc: !0, trans:
|
|
57
|
+
return C(() => o.isSaveAsTemplateDrawerOpen, (e) => {
|
|
58
|
+
e && d();
|
|
59
|
+
}), { __sfc: !0, trans: s, editorStore: o, saveAsTemplateStore: t, createTemplate: m, isSaving: a, isAddingOption: n, templateNameError: r, footerButtonGroupOptions: f, closeModal: p, validateTemplateName: l, handleTemplateName: v, handleAddOption: S, handleCategoryChange: T, handleSelectAllOptions: g, handleResetAllOptions: y, saveTemplate: w, focusToInput: u, initializeDrawer: d, WpDrawer: b, InBasicTextInput: V, InMultiSelect: M };
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
J as default
|
|
64
64
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { getCsrfToken as
|
|
2
|
-
import { ref as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
1
|
+
import { getCsrfToken as O } from "../utils/genericUtil.js";
|
|
2
|
+
import { ref as m, computed as T } from "vue";
|
|
3
|
+
const X = (b = {}) => {
|
|
4
|
+
const p = m(!1), a = m(null), u = m(null), g = T(() => p.value), y = T(() => a.value !== null), v = {
|
|
5
5
|
baseURL: "",
|
|
6
6
|
timeout: 1e4,
|
|
7
7
|
retry: 0,
|
|
8
8
|
retryDelay: 1e3,
|
|
9
9
|
headers: {
|
|
10
10
|
"Content-Type": "application/json",
|
|
11
|
-
"X-CSRF-TOKEN":
|
|
11
|
+
"X-CSRF-TOKEN": O(),
|
|
12
|
+
Accept: "application/json",
|
|
13
|
+
"X-Requested-With": "XMLHttpRequest"
|
|
12
14
|
},
|
|
13
15
|
...b
|
|
14
16
|
}, w = (e, s) => {
|
|
@@ -22,22 +24,22 @@ const k = (b = {}) => {
|
|
|
22
24
|
}, e);
|
|
23
25
|
}), x = (e) => new Promise((s) => {
|
|
24
26
|
setTimeout(s, e);
|
|
25
|
-
}), i = async (e, s, t,
|
|
26
|
-
a.value = null,
|
|
27
|
-
const n = { ...v, ...
|
|
27
|
+
}), i = async (e, s, t, L = {}) => {
|
|
28
|
+
a.value = null, p.value = !0, u.value = new AbortController();
|
|
29
|
+
const n = { ...v, ...L }, D = w(s, n.baseURL), c = {
|
|
28
30
|
method: e,
|
|
29
31
|
headers: { ...n.headers },
|
|
30
32
|
signal: u.value.signal,
|
|
31
33
|
...n
|
|
32
34
|
};
|
|
33
35
|
t && ["POST", "PUT", "PATCH"].includes(e) && (t instanceof FormData ? (delete c.headers["Content-Type"], c.body = t) : c.body = JSON.stringify(t));
|
|
34
|
-
const E = async (
|
|
36
|
+
const E = async (h = 0) => {
|
|
35
37
|
try {
|
|
36
|
-
const o = [fetch(
|
|
38
|
+
const o = [fetch(D, c)];
|
|
37
39
|
n.timeout && o.push(P(n.timeout));
|
|
38
40
|
const r = await Promise.race(o);
|
|
39
41
|
if (!r.ok) {
|
|
40
|
-
const
|
|
42
|
+
const H = `HTTP Error: ${r.status} ${r.statusText}`, d = new Error(H);
|
|
41
43
|
throw d.status = r.status, d.statusText = r.statusText, d.response = r, d;
|
|
42
44
|
}
|
|
43
45
|
let f;
|
|
@@ -50,19 +52,19 @@ const k = (b = {}) => {
|
|
|
50
52
|
};
|
|
51
53
|
} catch (o) {
|
|
52
54
|
const r = o instanceof Error && o.name === "AbortError";
|
|
53
|
-
if (
|
|
54
|
-
return await x(n.retryDelay || 1e3), E(
|
|
55
|
+
if (h < (n.retry || 0) && !r)
|
|
56
|
+
return await x(n.retryDelay || 1e3), E(h + 1);
|
|
55
57
|
throw o instanceof Error ? o.name === "AbortError" ? a.value = { message: "Request was cancelled" } : a.value = { message: o.message } : a.value = o, o;
|
|
56
58
|
}
|
|
57
59
|
};
|
|
58
60
|
try {
|
|
59
61
|
return await E();
|
|
60
62
|
} finally {
|
|
61
|
-
|
|
63
|
+
p.value = !1, u.value = null;
|
|
62
64
|
}
|
|
63
|
-
}, C = (e, s) => i("GET", e, void 0, s),
|
|
65
|
+
}, C = (e, s) => i("GET", e, void 0, s), R = (e, s, t) => i("POST", e, s, t), $ = (e, s, t) => i("PUT", e, s, t), q = (e, s, t) => i("PATCH", e, s, t), A = (e, s) => i("DELETE", e, void 0, s), U = (e) => {
|
|
64
66
|
u.value && u.value.abort(e);
|
|
65
|
-
},
|
|
67
|
+
}, W = () => {
|
|
66
68
|
a.value = null;
|
|
67
69
|
};
|
|
68
70
|
return {
|
|
@@ -73,14 +75,14 @@ const k = (b = {}) => {
|
|
|
73
75
|
// Methods
|
|
74
76
|
request: i,
|
|
75
77
|
get: C,
|
|
76
|
-
post:
|
|
77
|
-
put:
|
|
78
|
-
patch:
|
|
78
|
+
post: R,
|
|
79
|
+
put: $,
|
|
80
|
+
patch: q,
|
|
79
81
|
delete: A,
|
|
80
|
-
cancel:
|
|
81
|
-
clearError:
|
|
82
|
+
cancel: U,
|
|
83
|
+
clearError: W
|
|
82
84
|
};
|
|
83
85
|
};
|
|
84
86
|
export {
|
|
85
|
-
|
|
87
|
+
X as useHttp
|
|
86
88
|
};
|
|
@@ -221,11 +221,11 @@ class at extends N {
|
|
|
221
221
|
const t = this.store.currentRecommendationId;
|
|
222
222
|
if (!this.currentNode || !this.api || t === null)
|
|
223
223
|
return;
|
|
224
|
-
const { filters: e,
|
|
224
|
+
const { filters: e, strategy: o, strategyId: r, size: i } = this.store.recommendationConfigs;
|
|
225
225
|
this.pendingNodeConfigWrite = {
|
|
226
226
|
blockId: t,
|
|
227
227
|
node: this.currentNode,
|
|
228
|
-
updates: { filters: e,
|
|
228
|
+
updates: { filters: e, strategy: o, strategyId: r, size: i }
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
@@ -265,7 +265,7 @@ class at extends N {
|
|
|
265
265
|
if (this.pendingNodeConfigWrite = null, this._clearConfigFlush(), !t || !this.api)
|
|
266
266
|
return;
|
|
267
267
|
const e = t.blockId === this.store.currentRecommendationId && this.currentNode ? this.currentNode : t.node, o = l.getConfig(e);
|
|
268
|
-
JSON.stringify(o.filters) === JSON.stringify(t.updates.filters) && o.strategyId === t.updates.strategyId && o.size === t.updates.size || l.updateConfig(this.api, e, t.updates, "Update recommendation filters");
|
|
268
|
+
JSON.stringify(o.filters) === JSON.stringify(t.updates.filters) && o.strategy === t.updates.strategy && o.strategyId === t.updates.strategyId && o.size === t.updates.size || l.updateConfig(this.api, e, t.updates, "Update recommendation filters");
|
|
269
269
|
}
|
|
270
270
|
_syncNodeConfigToStore() {
|
|
271
271
|
var r;
|