@useinsider/guido 3.18.1-beta.cb31236 → 3.18.1-beta.d0bc5f3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +51 -59
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +70 -72
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +9 -7
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +76 -87
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +22 -24
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +26 -28
- package/dist/composables/useCustomInterfaceAppearance.js +42 -46
- package/dist/enums/extensions/recommendationBlock.js +29 -25
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +71 -72
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +37 -68
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +44 -45
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +119 -105
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +7 -7
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +84 -93
- package/dist/src/@types/config/schemas.d.ts +0 -16
- package/dist/src/composables/useConfig.d.ts +0 -4
- package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +45 -54
- package/dist/src/services/recommendationApi.d.ts +1 -2
- package/dist/src/stores/config.d.ts +0 -322
- package/dist/src/stores/onboarding.d.ts +0 -421
- package/dist/static/styles/components/recommendation-strategy.css.js +41 -74
- package/dist/stores/config.js +60 -74
- package/dist/stores/onboarding.js +1 -6
- package/package.json +1 -1
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +0 -46
- package/dist/composables/useLegacyStrategyConversion.js +0 -58
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -72
- package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -44
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
- package/dist/static/assets/icons/line-info.svg.js +0 -5
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-1ca6baf0]{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-
|
|
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-1ca6baf0]{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-cc5ee925]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-cc5ee925]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-cc5ee925]{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-1f4a4044] .vueperslides__bullets,[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-3bcefe18]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-3bcefe18] .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}
|
|
@@ -1,100 +1,91 @@
|
|
|
1
|
-
import { useHttp as
|
|
2
|
-
import { URLS as
|
|
3
|
-
const
|
|
4
|
-
(
|
|
5
|
-
attributeName:
|
|
6
|
-
attributeJs:
|
|
7
|
-
attributeType:
|
|
8
|
-
type:
|
|
9
|
-
displayName:
|
|
10
|
-
isFilterable:
|
|
11
|
-
},
|
|
1
|
+
import { useHttp as l } from "../composables/useHttp.js";
|
|
2
|
+
import { URLS as m, QUERY_PARAMS as u } from "../enums/extensions/recommendationBlock.js";
|
|
3
|
+
const y = "[sr_strategies.status][=][active]*[sr_strategies.suitable_channels][~][EMAIL]", R = (c) => c.reduce(
|
|
4
|
+
(s, r, i) => (s[i] = {
|
|
5
|
+
attributeName: r.attributeName,
|
|
6
|
+
attributeJs: r.attributeJs,
|
|
7
|
+
attributeType: r.attributeType,
|
|
8
|
+
type: r.type,
|
|
9
|
+
displayName: r.displayName,
|
|
10
|
+
isFilterable: r.isFilterable
|
|
11
|
+
}, s),
|
|
12
12
|
{}
|
|
13
|
-
),
|
|
14
|
-
const { get:
|
|
15
|
-
try {
|
|
16
|
-
return (await i(`${c.NEWSLETTER_RECOMMENDATIONS_PATH}/create-data`)).data;
|
|
17
|
-
} catch (t) {
|
|
18
|
-
throw console.error("fetchUserModalState error:", t), t;
|
|
19
|
-
}
|
|
20
|
-
}, R = async () => {
|
|
21
|
-
try {
|
|
22
|
-
const { data: t } = await i(
|
|
23
|
-
c.PRODUCT_ATTRIBUTES_PATH
|
|
24
|
-
), a = Array.isArray(t) ? t : (t == null ? void 0 : t.data) ?? [];
|
|
25
|
-
return S(a);
|
|
26
|
-
} catch (t) {
|
|
27
|
-
throw console.error("fetchRecommendationFilters error:", t), t;
|
|
28
|
-
}
|
|
29
|
-
}, l = async (t, a) => {
|
|
30
|
-
var e;
|
|
31
|
-
try {
|
|
32
|
-
const r = new URLSearchParams(Object.entries(a));
|
|
33
|
-
r.set(m.CLIENT_ID, E);
|
|
34
|
-
const n = decodeURIComponent(r.toString());
|
|
35
|
-
console.debug("🏁 Recommendation API Query:", n);
|
|
36
|
-
const s = await o(
|
|
37
|
-
`${c.RECOMMENDATION_API_URL}/v2/${t}?${n}`
|
|
38
|
-
);
|
|
39
|
-
return ((e = s == null ? void 0 : s.data) == null ? void 0 : e.data) ?? [];
|
|
40
|
-
} catch (r) {
|
|
41
|
-
throw console.error("fetchRecommendationProducts error:", r), r;
|
|
42
|
-
}
|
|
43
|
-
}, g = async (t) => {
|
|
44
|
-
var a;
|
|
45
|
-
try {
|
|
46
|
-
const e = new RegExp(`[?&]${m.CLIENT_ID}=`).test(t), r = t.includes("?") ? "&" : "?", n = e ? t : `${t}${r}${m.CLIENT_ID}=${E}`, s = await o(
|
|
47
|
-
n
|
|
48
|
-
);
|
|
49
|
-
return ((a = s == null ? void 0 : s.data) == null ? void 0 : a.data) ?? [];
|
|
50
|
-
} catch (e) {
|
|
51
|
-
return console.error("fetchRecommendationProductsByUrl error:", e), [];
|
|
52
|
-
}
|
|
53
|
-
}, p = async () => {
|
|
54
|
-
try {
|
|
55
|
-
const { data: t } = await i(
|
|
56
|
-
`${c.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(h)}`
|
|
57
|
-
);
|
|
58
|
-
return Array.isArray(t) ? t : (t == null ? void 0 : t.data) ?? [];
|
|
59
|
-
} catch (t) {
|
|
60
|
-
throw console.error("fetchRecommendationStrategies error:", t), t;
|
|
61
|
-
}
|
|
62
|
-
}, I = async (t, a) => {
|
|
63
|
-
try {
|
|
64
|
-
const { data: e } = await d(
|
|
65
|
-
`${c.RECOMMENDATION_STRATEGIES_PATH}/endpoint-generate`,
|
|
66
|
-
{
|
|
67
|
-
campaignId: 0,
|
|
68
|
-
pageTypes: [],
|
|
69
|
-
isPreviewer: !1,
|
|
70
|
-
strategy: t,
|
|
71
|
-
userId: "",
|
|
72
|
-
currency: a
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
return !e || typeof e != "object" || !("full_path" in e || "data" in e) ? (console.error("generateStrategyEndpoint unexpected response shape:", e), null) : "full_path" in e ? e : e.data;
|
|
76
|
-
} catch (e) {
|
|
77
|
-
return console.error("generateStrategyEndpoint error:", e), null;
|
|
78
|
-
}
|
|
79
|
-
}, A = (t) => t.scope === "template" ? `${c.NEWSLETTER_RECOMMENDATIONS_PATH}/${_}/${u}` : `${c.NEWSLETTER_RECOMMENDATIONS_PATH}/${u}`;
|
|
13
|
+
), _ = () => {
|
|
14
|
+
const { get: c, post: s } = l(), { get: r } = l({ headers: {} }), i = "6KcLM9TwheVB1mgK";
|
|
80
15
|
return {
|
|
81
|
-
fetchRecommendationCreateData:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
16
|
+
fetchRecommendationCreateData: async () => {
|
|
17
|
+
try {
|
|
18
|
+
return (await c("/newsletter/recommendations/create-data")).data;
|
|
19
|
+
} catch (e) {
|
|
20
|
+
throw console.error("fetchUserModalState error:", e), e;
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
fetchRecommendationFilters: async () => {
|
|
24
|
+
try {
|
|
25
|
+
const { data: e } = await c(
|
|
26
|
+
m.PRODUCT_ATTRIBUTES_PATH
|
|
27
|
+
), o = Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
|
|
28
|
+
return R(o);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
fetchRecommendationProducts: async (e, o) => {
|
|
34
|
+
var t;
|
|
35
|
+
try {
|
|
36
|
+
const n = new URLSearchParams(Object.entries(o));
|
|
37
|
+
n.set(u.CLIENT_ID, i);
|
|
38
|
+
const d = decodeURIComponent(n.toString());
|
|
39
|
+
console.debug("🏁 Recommendation API Query:", d);
|
|
40
|
+
const a = await r(
|
|
41
|
+
`${m.RECOMMENDATION_API_URL}/v2/${e}?${d}`
|
|
42
|
+
);
|
|
43
|
+
return ((t = a == null ? void 0 : a.data) == null ? void 0 : t.data) ?? [];
|
|
44
|
+
} catch (n) {
|
|
45
|
+
throw console.error("fetchRecommendationProducts error:", n), n;
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
fetchRecommendationProductsByUrl: async (e) => {
|
|
49
|
+
var o;
|
|
50
|
+
try {
|
|
51
|
+
const t = new RegExp(`[?&]${u.CLIENT_ID}=`).test(e), n = e.includes("?") ? "&" : "?", d = t ? e : `${e}${n}${u.CLIENT_ID}=${i}`, a = await r(
|
|
52
|
+
d
|
|
53
|
+
);
|
|
54
|
+
return ((o = a == null ? void 0 : a.data) == null ? void 0 : o.data) ?? [];
|
|
55
|
+
} catch (t) {
|
|
56
|
+
return console.error("fetchRecommendationProductsByUrl error:", t), [];
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
fetchRecommendationStrategies: async () => {
|
|
60
|
+
try {
|
|
61
|
+
const { data: e } = await c(
|
|
62
|
+
`${m.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(y)}`
|
|
63
|
+
);
|
|
64
|
+
return Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
|
|
65
|
+
} catch (e) {
|
|
66
|
+
throw console.error("fetchRecommendationStrategies error:", e), e;
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
generateStrategyEndpoint: async (e, o) => {
|
|
70
|
+
try {
|
|
71
|
+
const { data: t } = await s(
|
|
72
|
+
`${m.RECOMMENDATION_STRATEGIES_PATH}/endpoint-generate`,
|
|
73
|
+
{
|
|
74
|
+
campaignId: 0,
|
|
75
|
+
pageTypes: [],
|
|
76
|
+
isPreviewer: !1,
|
|
77
|
+
strategy: e,
|
|
78
|
+
userId: "",
|
|
79
|
+
currency: o
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
return !t || typeof t != "object" || !("full_path" in t || "data" in t) ? (console.error("generateStrategyEndpoint unexpected response shape:", t), null) : "full_path" in t ? t : t.data;
|
|
83
|
+
} catch (t) {
|
|
84
|
+
return console.error("generateStrategyEndpoint error:", t), null;
|
|
85
|
+
}
|
|
95
86
|
}
|
|
96
87
|
};
|
|
97
88
|
};
|
|
98
89
|
export {
|
|
99
|
-
|
|
90
|
+
_ as useRecommendationApi
|
|
100
91
|
};
|
|
@@ -50,14 +50,6 @@ export declare const IdentitySchema: v.ObjectSchema<{
|
|
|
50
50
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "userId is required">]>;
|
|
51
51
|
/** Optional variation ID for A/B testing */
|
|
52
52
|
readonly variationId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
53
|
-
/** Optional numeric campaign ID of the host campaign; absent for templates and modules */
|
|
54
|
-
readonly campaignId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
55
|
-
/**
|
|
56
|
-
* Optional numeric template-library id of the host template; absent for campaigns and
|
|
57
|
-
* modules. Distinct from `templateId`, which is the editor's document identity (a uuid /
|
|
58
|
-
* Stripo doc id) and is never an endpoint id.
|
|
59
|
-
*/
|
|
60
|
-
readonly templateLibraryId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
61
53
|
}, undefined>;
|
|
62
54
|
/**
|
|
63
55
|
* Partner configuration - organization and product context
|
|
@@ -633,14 +625,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
633
625
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "userId is required">]>;
|
|
634
626
|
/** Optional variation ID for A/B testing */
|
|
635
627
|
readonly variationId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
636
|
-
/** Optional numeric campaign ID of the host campaign; absent for templates and modules */
|
|
637
|
-
readonly campaignId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
638
|
-
/**
|
|
639
|
-
* Optional numeric template-library id of the host template; absent for campaigns and
|
|
640
|
-
* modules. Distinct from `templateId`, which is the editor's document identity (a uuid /
|
|
641
|
-
* Stripo doc id) and is never an endpoint id.
|
|
642
|
-
*/
|
|
643
|
-
readonly templateLibraryId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
644
628
|
}, undefined>;
|
|
645
629
|
/** Partner configuration (required) */
|
|
646
630
|
readonly partner: v.ObjectSchema<{
|
|
@@ -11,8 +11,6 @@ export declare const useConfig: () => {
|
|
|
11
11
|
templateId: string;
|
|
12
12
|
userId: string;
|
|
13
13
|
variationId?: string | undefined;
|
|
14
|
-
campaignId?: string | undefined;
|
|
15
|
-
templateLibraryId?: string | undefined;
|
|
16
14
|
};
|
|
17
15
|
partner: {
|
|
18
16
|
name: string;
|
|
@@ -148,8 +146,6 @@ export declare const useConfig: () => {
|
|
|
148
146
|
templateId: string;
|
|
149
147
|
userId: string;
|
|
150
148
|
variationId?: string | undefined;
|
|
151
|
-
campaignId?: string | undefined;
|
|
152
|
-
templateLibraryId?: string | undefined;
|
|
153
149
|
} | null>;
|
|
154
150
|
partner: import("vue").ComputedRef<{
|
|
155
151
|
name: string;
|
|
@@ -5,10 +5,9 @@ export declare const URLS: {
|
|
|
5
5
|
PRODUCT_ATTRIBUTES_PATH: string;
|
|
6
6
|
RECOMMENDATION_STRATEGIES_PATH: string;
|
|
7
7
|
RECOMMENDATION_STRATEGIES_PANEL_PATH: string;
|
|
8
|
-
|
|
8
|
+
RECOMMENDATION_STRATEGY_CREATE_PATH: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const TEMPLATE_MIGRATION_SCOPE_SEGMENT = "template";
|
|
10
|
+
export declare const strategyEditPath: (strategyId: string | number) => string;
|
|
12
11
|
export declare const QUERY_PARAMS: {
|
|
13
12
|
CLIENT_ID: string;
|
|
14
13
|
};
|
|
@@ -3,7 +3,6 @@ export declare const STRATEGY_CONTROL_ID = "recommendation-strategy-control";
|
|
|
3
3
|
export declare class StrategyControl extends CommonControl {
|
|
4
4
|
private store;
|
|
5
5
|
private onboardingStore;
|
|
6
|
-
private legacyConversion;
|
|
7
6
|
private storeUnsubscription;
|
|
8
7
|
private listeners;
|
|
9
8
|
private lastPaintedState;
|
|
@@ -88,8 +88,6 @@ export interface RegenerateWithStylesOptions extends Omit<RegenerateProductRowsO
|
|
|
88
88
|
products?: RecommendationProduct[];
|
|
89
89
|
/** Optional: pass layout directly to avoid stale DOM reads after setAttribute */
|
|
90
90
|
layout?: Orientation;
|
|
91
|
-
/** Applies the batch even when the rows are unchanged, for callers that staged their own edits. */
|
|
92
|
-
forceApply?: boolean;
|
|
93
91
|
}
|
|
94
92
|
/**
|
|
95
93
|
* Regenerates product rows while preserving user-applied styles, in a SINGLE commit.
|
|
@@ -153,8 +151,6 @@ export interface UpdateProductContentInPlaceOptions {
|
|
|
153
151
|
currentNode: ImmutableHtmlNode | null | undefined;
|
|
154
152
|
documentModifier: DocumentModifier;
|
|
155
153
|
products: RecommendationProduct[];
|
|
156
|
-
/** Applies the batch even when the cards are unchanged, for callers that staged their own edits. */
|
|
157
|
-
forceApply?: boolean;
|
|
158
154
|
}
|
|
159
155
|
/**
|
|
160
156
|
* Updates product content in-place without regenerating HTML structure.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationCampaignUrlValue, RecommendationProduct,
|
|
1
|
+
import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationCampaignUrlValue, RecommendationProduct, RrsStrategy } from '@@/Types/recommendation';
|
|
2
2
|
export interface PerBlockConfigs {
|
|
3
3
|
cardsInRow: number;
|
|
4
4
|
currencySettings: {
|
|
@@ -22,7 +22,6 @@ export interface PerBlockConfigs {
|
|
|
22
22
|
shuffleProducts: boolean;
|
|
23
23
|
strategy: string;
|
|
24
24
|
strategyId: string;
|
|
25
|
-
nodeConfigVersion: number;
|
|
26
25
|
textTrimming: boolean;
|
|
27
26
|
unresponsive: boolean;
|
|
28
27
|
size: string;
|
|
@@ -37,13 +36,11 @@ interface PerBlockState {
|
|
|
37
36
|
filterSelectionDrawerStatus: boolean;
|
|
38
37
|
assignStrategyDrawerStatus: boolean;
|
|
39
38
|
removeStrategyModalStatus: boolean;
|
|
40
|
-
legacyStrategyUpdatedModalStatus: boolean;
|
|
41
39
|
filterGroup: number;
|
|
42
40
|
/** Whether initial API data (filters, algorithms, products) has been fetched for this block */
|
|
43
41
|
isInitialized: boolean;
|
|
44
42
|
/** Snapshot of filters taken when the drawer opens, used to revert on cancel */
|
|
45
43
|
filterSnapshot: Filter[] | null;
|
|
46
|
-
legacyConversionLoading: boolean;
|
|
47
44
|
}
|
|
48
45
|
/**
|
|
49
46
|
* Persisted-config subset used by `seedBlockUrlConfig` to reconstruct
|
|
@@ -74,6 +71,7 @@ interface StoreState {
|
|
|
74
71
|
strategies: RrsStrategy[];
|
|
75
72
|
strategiesLoading: boolean;
|
|
76
73
|
strategyUrlTemplates: Record<string, string>;
|
|
74
|
+
strategiesFetched: boolean;
|
|
77
75
|
blockStates: Record<number, PerBlockState>;
|
|
78
76
|
currentRecommendationId: number | null;
|
|
79
77
|
configVersion: number;
|
|
@@ -102,6 +100,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
102
100
|
}[];
|
|
103
101
|
strategiesLoading: boolean;
|
|
104
102
|
strategyUrlTemplates: Record<string, string>;
|
|
103
|
+
strategiesFetched: boolean;
|
|
105
104
|
blockStates: Record<number, PerBlockState>;
|
|
106
105
|
currentRecommendationId: number | null;
|
|
107
106
|
configVersion: number;
|
|
@@ -128,6 +127,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
128
127
|
}[];
|
|
129
128
|
strategiesLoading: boolean;
|
|
130
129
|
strategyUrlTemplates: Record<string, string>;
|
|
130
|
+
strategiesFetched: boolean;
|
|
131
131
|
blockStates: Record<number, PerBlockState>;
|
|
132
132
|
currentRecommendationId: number | null;
|
|
133
133
|
configVersion: number;
|
|
@@ -154,6 +154,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
154
154
|
}[];
|
|
155
155
|
strategiesLoading: boolean;
|
|
156
156
|
strategyUrlTemplates: Record<string, string>;
|
|
157
|
+
strategiesFetched: boolean;
|
|
157
158
|
blockStates: Record<number, PerBlockState>;
|
|
158
159
|
currentRecommendationId: number | null;
|
|
159
160
|
configVersion: number;
|
|
@@ -177,6 +178,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
177
178
|
}[];
|
|
178
179
|
strategiesLoading: boolean;
|
|
179
180
|
strategyUrlTemplates: Record<string, string>;
|
|
181
|
+
strategiesFetched: boolean;
|
|
180
182
|
blockStates: Record<number, PerBlockState>;
|
|
181
183
|
currentRecommendationId: number | null;
|
|
182
184
|
configVersion: number;
|
|
@@ -200,53 +202,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
200
202
|
}[];
|
|
201
203
|
strategiesLoading: boolean;
|
|
202
204
|
strategyUrlTemplates: Record<string, string>;
|
|
203
|
-
|
|
204
|
-
currentRecommendationId: number | null;
|
|
205
|
-
configVersion: number;
|
|
206
|
-
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
207
|
-
isLegacyStrategyBlock(): boolean;
|
|
208
|
-
legacyConversionLoading(state: {
|
|
209
|
-
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
210
|
-
activePredictiveAlgorithms: number[];
|
|
211
|
-
languages: Languages;
|
|
212
|
-
currencyList: {
|
|
213
|
-
text: string;
|
|
214
|
-
value: string;
|
|
215
|
-
}[];
|
|
216
|
-
filterList: FiltersResponse;
|
|
217
|
-
strategies: {
|
|
218
|
-
[x: string]: unknown;
|
|
219
|
-
strategy_id: number;
|
|
220
|
-
name: string;
|
|
221
|
-
status: string;
|
|
222
|
-
suitable_channels: string;
|
|
223
|
-
size?: (number | string) | undefined;
|
|
224
|
-
}[];
|
|
225
|
-
strategiesLoading: boolean;
|
|
226
|
-
strategyUrlTemplates: Record<string, string>;
|
|
227
|
-
blockStates: Record<number, PerBlockState>;
|
|
228
|
-
currentRecommendationId: number | null;
|
|
229
|
-
configVersion: number;
|
|
230
|
-
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
231
|
-
legacyStrategyUpdatedModalStatus(state: {
|
|
232
|
-
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
233
|
-
activePredictiveAlgorithms: number[];
|
|
234
|
-
languages: Languages;
|
|
235
|
-
currencyList: {
|
|
236
|
-
text: string;
|
|
237
|
-
value: string;
|
|
238
|
-
}[];
|
|
239
|
-
filterList: FiltersResponse;
|
|
240
|
-
strategies: {
|
|
241
|
-
[x: string]: unknown;
|
|
242
|
-
strategy_id: number;
|
|
243
|
-
name: string;
|
|
244
|
-
status: string;
|
|
245
|
-
suitable_channels: string;
|
|
246
|
-
size?: (number | string) | undefined;
|
|
247
|
-
}[];
|
|
248
|
-
strategiesLoading: boolean;
|
|
249
|
-
strategyUrlTemplates: Record<string, string>;
|
|
205
|
+
strategiesFetched: boolean;
|
|
250
206
|
blockStates: Record<number, PerBlockState>;
|
|
251
207
|
currentRecommendationId: number | null;
|
|
252
208
|
configVersion: number;
|
|
@@ -270,6 +226,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
270
226
|
}[];
|
|
271
227
|
strategiesLoading: boolean;
|
|
272
228
|
strategyUrlTemplates: Record<string, string>;
|
|
229
|
+
strategiesFetched: boolean;
|
|
273
230
|
blockStates: Record<number, PerBlockState>;
|
|
274
231
|
currentRecommendationId: number | null;
|
|
275
232
|
configVersion: number;
|
|
@@ -296,6 +253,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
296
253
|
}[];
|
|
297
254
|
strategiesLoading: boolean;
|
|
298
255
|
strategyUrlTemplates: Record<string, string>;
|
|
256
|
+
strategiesFetched: boolean;
|
|
299
257
|
blockStates: Record<number, PerBlockState>;
|
|
300
258
|
currentRecommendationId: number | null;
|
|
301
259
|
configVersion: number;
|
|
@@ -322,6 +280,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
322
280
|
}[];
|
|
323
281
|
strategiesLoading: boolean;
|
|
324
282
|
strategyUrlTemplates: Record<string, string>;
|
|
283
|
+
strategiesFetched: boolean;
|
|
325
284
|
blockStates: Record<number, PerBlockState>;
|
|
326
285
|
currentRecommendationId: number | null;
|
|
327
286
|
configVersion: number;
|
|
@@ -349,6 +308,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
349
308
|
}[];
|
|
350
309
|
strategiesLoading: boolean;
|
|
351
310
|
strategyUrlTemplates: Record<string, string>;
|
|
311
|
+
strategiesFetched: boolean;
|
|
352
312
|
blockStates: Record<number, PerBlockState>;
|
|
353
313
|
currentRecommendationId: number | null;
|
|
354
314
|
configVersion: number;
|
|
@@ -375,6 +335,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
375
335
|
}[];
|
|
376
336
|
strategiesLoading: boolean;
|
|
377
337
|
strategyUrlTemplates: Record<string, string>;
|
|
338
|
+
strategiesFetched: boolean;
|
|
378
339
|
blockStates: Record<number, PerBlockState>;
|
|
379
340
|
currentRecommendationId: number | null;
|
|
380
341
|
configVersion: number;
|
|
@@ -401,6 +362,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
401
362
|
}[];
|
|
402
363
|
strategiesLoading: boolean;
|
|
403
364
|
strategyUrlTemplates: Record<string, string>;
|
|
365
|
+
strategiesFetched: boolean;
|
|
404
366
|
blockStates: Record<number, PerBlockState>;
|
|
405
367
|
currentRecommendationId: number | null;
|
|
406
368
|
configVersion: number;
|
|
@@ -480,14 +442,43 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
480
442
|
cancelFilterDrawer(): void;
|
|
481
443
|
openAssignStrategyDrawer(): void;
|
|
482
444
|
closeAssignStrategyDrawer(): void;
|
|
483
|
-
openLegacyStrategyUpdatedModal(): void;
|
|
484
|
-
closeLegacyStrategyUpdatedModal(): void;
|
|
485
445
|
openRemoveStrategyModal(): void;
|
|
486
446
|
closeRemoveStrategyModal(): void;
|
|
487
447
|
fetchStrategies(): Promise<void>;
|
|
448
|
+
invalidateStrategies(): void;
|
|
449
|
+
/**
|
|
450
|
+
* Opens a Smart Recommender strategy page in a new tab and refreshes the list every time
|
|
451
|
+
* the user comes back. `visibilitychange` covers the tab case; `focus` covers the page
|
|
452
|
+
* landing in a separate window, where this document never goes hidden.
|
|
453
|
+
*
|
|
454
|
+
* Deliberately NOT one-shot: the strategy tab stays open, so a user can create a second
|
|
455
|
+
* strategy in it and come back again — a listener that disarmed on the first return would
|
|
456
|
+
* leave that one missing from the list. Armed only once the user actually opens a strategy
|
|
457
|
+
* page, so anyone who never does pays nothing.
|
|
458
|
+
*/
|
|
459
|
+
_armStrategyPageReturn(url: string): void;
|
|
460
|
+
/**
|
|
461
|
+
* Reloads the products of the block the user is on, so an edit made in the strategy tab
|
|
462
|
+
* lands on the canvas instead of waiting for the assign drawer to be reopened.
|
|
463
|
+
*
|
|
464
|
+
* Only the selected block: the canvas regeneration is driven off the active block's
|
|
465
|
+
* product array, so refreshing an unselected block would fetch without redrawing it.
|
|
466
|
+
*/
|
|
467
|
+
_refreshAssignedStrategyProducts(): Promise<void>;
|
|
468
|
+
/** Lets the editor tear the return listeners down when it unmounts. */
|
|
469
|
+
disposeStrategyPageReturn(): void;
|
|
470
|
+
/**
|
|
471
|
+
* Opens Smart Recommender's strategy creation page. Every return refreshes the list so the
|
|
472
|
+
* new strategy is offered; the user picks it themselves.
|
|
473
|
+
*/
|
|
474
|
+
openStrategyCreation(): void;
|
|
475
|
+
/**
|
|
476
|
+
* Opens the strategy's edit page. Every return refreshes the list so the block reflects the
|
|
477
|
+
* edited configuration.
|
|
478
|
+
*/
|
|
479
|
+
openStrategyEdit(strategyId: string | number): void;
|
|
488
480
|
resolveStrategyUrlTemplate(strategy: RrsStrategy, currency: string): Promise<string>;
|
|
489
481
|
assignStrategy(strategy: RrsStrategy): void;
|
|
490
|
-
convertLegacyStrategy(payload: RrsMigrationPayload, target?: RrsMigrationTarget): Promise<string>;
|
|
491
482
|
removeStrategy(): void;
|
|
492
483
|
fetchRecommendationCreateData(): Promise<void>;
|
|
493
484
|
fetchRecommendationFilters(): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams, RrsEndpointGenerateResponse,
|
|
1
|
+
import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams, RrsEndpointGenerateResponse, RrsStrategy } from '@@/Types/recommendation';
|
|
2
2
|
export declare const useRecommendationApi: () => {
|
|
3
3
|
fetchRecommendationCreateData: () => Promise<InitialResponse>;
|
|
4
4
|
fetchRecommendationFilters: () => Promise<FiltersResponse>;
|
|
@@ -6,5 +6,4 @@ export declare const useRecommendationApi: () => {
|
|
|
6
6
|
fetchRecommendationProductsByUrl: (url: string) => Promise<RecommendationProduct[]>;
|
|
7
7
|
fetchRecommendationStrategies: () => Promise<RrsStrategy[]>;
|
|
8
8
|
generateStrategyEndpoint: (strategy: RrsStrategy, currency: string) => Promise<RrsEndpointGenerateResponse | null>;
|
|
9
|
-
migrateLegacyStrategy: (payload: RrsMigrationPayload, target?: RrsMigrationTarget) => Promise<string>;
|
|
10
9
|
};
|