@useinsider/guido 3.19.0-beta.c604f7d → 3.19.0-beta.cac604e
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 +104 -92
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +47 -54
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -10
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
- package/dist/components/organisms/header/EditorActions.vue.js +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +51 -37
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +17 -9
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +23 -32
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +7 -8
- package/dist/components/organisms/header/RightSlot.vue.js +8 -9
- package/dist/components/organisms/header/RightSlot.vue2.js +18 -13
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +38 -56
- package/dist/composables/useActionsApi.js +52 -47
- package/dist/composables/useCodeEditorApi.js +23 -9
- package/dist/composables/useCustomInterfaceAppearance.js +41 -42
- package/dist/composables/useTranslations.js +3 -2
- package/dist/composables/useVersionHistoryApi.js +33 -24
- package/dist/config/i18n/en/labels.json.js +4 -36
- package/dist/config/i18n/en/tooltips.json.js +1 -2
- package/dist/extensions/Blocks/Recommendation/block.js +88 -53
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +45 -38
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -49
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +42 -22
- package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +26 -0
- package/dist/guido.css +1 -1
- package/dist/sprite.svg +0 -6
- package/dist/src/@types/config/schemas.d.ts +16 -2
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +3 -1
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +2 -2
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +27 -0
- package/dist/src/stores/config.d.ts +20 -20
- package/dist/src/stores/editor.d.ts +0 -109
- package/dist/src/stores/onboarding.d.ts +21 -952
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/stripoEditorApi.d.ts +4 -0
- package/dist/src/utils/timeUtil.d.ts +0 -5
- package/dist/static/styles/components/recommendation-strategy.css.js +9 -0
- package/dist/static/styles/variables.css.js +0 -2
- package/dist/stores/editor.js +4 -7
- package/dist/stores/onboarding.js +21 -43
- package/dist/stores/unsubscribe.js +3 -3
- package/dist/utils/stripoEditorApi.js +11 -0
- package/dist/utils/timeUtil.js +17 -6
- package/package.json +2 -1
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -25
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -98
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -22
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -19
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -90
- package/dist/composables/useAccessibilityApi.js +0 -35
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +0 -2
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +0 -2
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useAccessibilityApi.d.ts +0 -15
- package/dist/static/styles/components/accessibility.css.js +0 -234
- /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var i = (
|
|
4
|
-
import { useLegacyStrategyConversion as
|
|
5
|
-
import { ACADEMY_LINKS as
|
|
6
|
-
import { useOnboardingStore as
|
|
7
|
-
import { CommonControl as
|
|
8
|
-
import { RRS_CONFIG_VERSION as
|
|
9
|
-
import { RecommendationConfigService as
|
|
10
|
-
import { useRecommendationExtensionStore as
|
|
11
|
-
const
|
|
12
|
-
class
|
|
1
|
+
var w = Object.defineProperty;
|
|
2
|
+
var N = (l, o, t) => o in l ? w(l, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[o] = t;
|
|
3
|
+
var i = (l, o, t) => N(l, typeof o != "symbol" ? o + "" : o, t);
|
|
4
|
+
import { useLegacyStrategyConversion as L } from "../../../../../composables/useLegacyStrategyConversion.js";
|
|
5
|
+
import { ACADEMY_LINKS as $ } from "../../../../../enums/academy.js";
|
|
6
|
+
import { useOnboardingStore as A } from "../../../../../stores/onboarding.js";
|
|
7
|
+
import { CommonControl as R } from "../../../common-control.js";
|
|
8
|
+
import { RRS_CONFIG_VERSION as E } from "../../constants/defaultConfig.js";
|
|
9
|
+
import { RecommendationConfigService as C } from "../../services/configService.js";
|
|
10
|
+
import { useRecommendationExtensionStore as O } from "../../store/recommendation.js";
|
|
11
|
+
const I = "recommendation-strategy-control";
|
|
12
|
+
class P extends R {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
|
-
i(this, "store",
|
|
16
|
-
i(this, "onboardingStore",
|
|
17
|
-
i(this, "legacyConversion",
|
|
15
|
+
i(this, "store", O());
|
|
16
|
+
i(this, "onboardingStore", A());
|
|
17
|
+
i(this, "legacyConversion", L());
|
|
18
18
|
i(this, "storeUnsubscription", () => {
|
|
19
19
|
});
|
|
20
20
|
i(this, "listeners", []);
|
|
21
21
|
i(this, "lastPaintedState", null);
|
|
22
22
|
}
|
|
23
23
|
getId() {
|
|
24
|
-
return
|
|
24
|
+
return I;
|
|
25
25
|
}
|
|
26
26
|
getTemplate() {
|
|
27
27
|
const t = this.api.translate(
|
|
28
28
|
"You can assign a recommendation strategy by selecting an existing one or creating a new one to show specific content."
|
|
29
|
-
), e = this.api.translate("For more information, you can"),
|
|
29
|
+
), e = this.api.translate("For more information, you can"), a = this.api.translate("visit Academy"), r = this.api.translate("Legacy Strategy"), s = this.api.translate(
|
|
30
30
|
"Note that this is an older version of the Recommendation Strategy. We recommend you update it to the new Recommendation Strategy for an improved experience."
|
|
31
|
+
), g = this.api.translate(
|
|
32
|
+
"The recommendation strategy used in the recommendation block is no longer available. You can assign a different strategy to it."
|
|
31
33
|
);
|
|
32
34
|
return `
|
|
33
35
|
<div class="strategy-control-container">
|
|
@@ -52,9 +54,9 @@ class M extends A {
|
|
|
52
54
|
${t}
|
|
53
55
|
${e}
|
|
54
56
|
<a
|
|
55
|
-
href="${
|
|
57
|
+
href="${$.EMAIL_RECOMMENDATION_BLOCK}"
|
|
56
58
|
target="_blank"
|
|
57
|
-
rel="noopener noreferrer">${
|
|
59
|
+
rel="noopener noreferrer">${a}</a>.
|
|
58
60
|
</p>
|
|
59
61
|
</div>
|
|
60
62
|
<div data-strategy-empty-state style="display: none;">
|
|
@@ -71,16 +73,37 @@ class M extends A {
|
|
|
71
73
|
id: "guido__btn-create-strategy",
|
|
72
74
|
className: "strategy-control-cta primary"
|
|
73
75
|
})
|
|
76
|
+
], "strategy-control-cta-row")}
|
|
77
|
+
</div>
|
|
78
|
+
<div data-strategy-unavailable-state style="display: none;">
|
|
79
|
+
<div class="strategy-control-notice-row">
|
|
80
|
+
<div class="strategy-control-notice strategy-control-notice--error" role="alert">
|
|
81
|
+
<p class="strategy-control-notice-text">${g}</p>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
${this._GuTwoColumns([
|
|
85
|
+
this._GuButton({
|
|
86
|
+
name: "assignUnavailableStrategy",
|
|
87
|
+
label: this.api.translate("Assign Strategy"),
|
|
88
|
+
id: "guido__btn-assign-unavailable-strategy",
|
|
89
|
+
className: "strategy-control-cta on"
|
|
90
|
+
}),
|
|
91
|
+
this._GuButton({
|
|
92
|
+
name: "createUnavailableStrategy",
|
|
93
|
+
label: this.api.translate("Create New Strategy"),
|
|
94
|
+
id: "guido__btn-create-unavailable-strategy",
|
|
95
|
+
className: "strategy-control-cta primary"
|
|
96
|
+
})
|
|
74
97
|
], "strategy-control-cta-row")}
|
|
75
98
|
</div>
|
|
76
99
|
<div data-strategy-legacy-state style="display: none;">
|
|
77
100
|
<div class="strategy-control-notice-row">
|
|
78
101
|
<div class="strategy-control-notice">
|
|
79
|
-
<p class="strategy-control-notice-text">${
|
|
102
|
+
<p class="strategy-control-notice-text">${s}</p>
|
|
80
103
|
</div>
|
|
81
104
|
</div>
|
|
82
105
|
<div class="strategy-control-name-band">
|
|
83
|
-
<span class="strategy-control-name">${
|
|
106
|
+
<span class="strategy-control-name">${r}</span>
|
|
84
107
|
${this._strategyAction({
|
|
85
108
|
id: "guido__btn-update-legacy-strategy",
|
|
86
109
|
label: this.api.translate("Update"),
|
|
@@ -123,12 +146,12 @@ class M extends A {
|
|
|
123
146
|
</div>
|
|
124
147
|
`;
|
|
125
148
|
}
|
|
126
|
-
_strategyAction({ id: t, label: e, modifier:
|
|
149
|
+
_strategyAction({ id: t, label: e, modifier: a }) {
|
|
127
150
|
return `
|
|
128
151
|
<button
|
|
129
152
|
id="${t}"
|
|
130
153
|
type="button"
|
|
131
|
-
class="strategy-control-action strategy-control-action--${
|
|
154
|
+
class="strategy-control-action strategy-control-action--${a}">
|
|
132
155
|
<span>${e}</span>
|
|
133
156
|
</button>
|
|
134
157
|
`;
|
|
@@ -136,8 +159,8 @@ class M extends A {
|
|
|
136
159
|
onRender() {
|
|
137
160
|
this._teardown(), this.store.strategyPanelOpen = !0, this._setupButtonListeners(), this._renderState(), this.storeUnsubscription = this.store.$subscribe(() => {
|
|
138
161
|
this._renderState();
|
|
139
|
-
}), this.store.recommendationConfigs.strategyId && !this.store.
|
|
140
|
-
});
|
|
162
|
+
}), this.store.recommendationConfigs.strategyId && !this.store.strategiesLoading && (this.store.invalidateStrategies(), this.store.fetchStrategies().catch(() => {
|
|
163
|
+
}));
|
|
141
164
|
}
|
|
142
165
|
/**
|
|
143
166
|
* Whether the document itself says this block has no strategy.
|
|
@@ -147,10 +170,10 @@ class M extends A {
|
|
|
147
170
|
* strategyId) for an assigned block.
|
|
148
171
|
*/
|
|
149
172
|
_isNodeUnassigned() {
|
|
150
|
-
if (!
|
|
173
|
+
if (!C.hasConfig(this.currentNode))
|
|
151
174
|
return !1;
|
|
152
|
-
const t =
|
|
153
|
-
return !t.strategyId && (t.configVersion ?? 0) >=
|
|
175
|
+
const t = C.getConfig(this.currentNode);
|
|
176
|
+
return !t.strategyId && (t.configVersion ?? 0) >= E;
|
|
154
177
|
}
|
|
155
178
|
onDestroy() {
|
|
156
179
|
this._teardown();
|
|
@@ -163,37 +186,37 @@ class M extends A {
|
|
|
163
186
|
const t = this.getContainer();
|
|
164
187
|
if (!t)
|
|
165
188
|
return;
|
|
166
|
-
const e = (
|
|
167
|
-
const
|
|
168
|
-
|
|
189
|
+
const e = (a, r) => {
|
|
190
|
+
const s = t.querySelector(a);
|
|
191
|
+
s && (s.addEventListener("click", r), this.listeners.push({ element: s, handler: r }));
|
|
169
192
|
};
|
|
170
|
-
e("#guido__btn-assign-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-create-strategy", () => this.store.openStrategyCreation()), e("#guido__btn-change-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-change-legacy-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-remove-strategy", () => this.store.openRemoveStrategyModal()), e("#guido__btn-remove-legacy-strategy", () => this.store.openRemoveStrategyModal()), e("#guido__btn-update-legacy-strategy", () => {
|
|
193
|
+
e("#guido__btn-assign-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-create-strategy", () => this.store.openStrategyCreation()), e("#guido__btn-assign-unavailable-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-create-unavailable-strategy", () => this.store.openStrategyCreation()), e("#guido__btn-change-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-change-legacy-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-remove-strategy", () => this.store.openRemoveStrategyModal()), e("#guido__btn-remove-legacy-strategy", () => this.store.openRemoveStrategyModal()), e("#guido__btn-update-legacy-strategy", () => {
|
|
171
194
|
this.legacyConversion.convertLegacyStrategy();
|
|
172
195
|
});
|
|
173
196
|
}
|
|
174
197
|
_renderState() {
|
|
175
|
-
var
|
|
176
|
-
const { strategyId: t } = this.store.recommendationConfigs, e = t ? ((
|
|
177
|
-
if (
|
|
198
|
+
var f;
|
|
199
|
+
const { strategyId: t } = this.store.recommendationConfigs, e = t ? ((f = this.store.assignedStrategy) == null ? void 0 : f.name) ?? "" : "", a = !!t && !e && (this.store.strategiesLoading || !this.store.strategiesSettled), r = !!t && !e && !a && this.store.strategiesFetched, s = this.store.legacyConversionLoading, g = this.store.isLegacyStrategyBlock, p = [t, e, a, r, s, g].join("\0");
|
|
200
|
+
if (p === this.lastPaintedState)
|
|
178
201
|
return;
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
202
|
+
const n = this.getContainer();
|
|
203
|
+
if (!n)
|
|
181
204
|
return;
|
|
182
|
-
const
|
|
183
|
-
if (!
|
|
205
|
+
const y = n.querySelector("[data-strategy-empty-state]"), u = n.querySelector("[data-strategy-assigned-state]"), c = n.querySelector("[data-strategy-legacy-state]"), h = n.querySelector("[data-strategy-unavailable-state]"), v = n.querySelector("[data-strategy-loading-state]"), b = n.querySelector("[data-strategy-content]"), m = n.querySelector("[data-strategy-name]"), _ = n.querySelector("[data-strategy-name-skeleton]");
|
|
206
|
+
if (!y || !u || !c || !h)
|
|
184
207
|
return;
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
[
|
|
188
|
-
|
|
189
|
-
}),
|
|
190
|
-
|
|
191
|
-
}),
|
|
208
|
+
v && (v.style.display = "none"), b && (b.style.display = "");
|
|
209
|
+
const k = t ? r ? h : u : g ? c : y;
|
|
210
|
+
[y, u, c, h].forEach((d) => {
|
|
211
|
+
d.style.display = d === k ? "" : "none";
|
|
212
|
+
}), c.querySelectorAll("button").forEach((d) => {
|
|
213
|
+
d.disabled = s;
|
|
214
|
+
}), c.classList.toggle("is-converting", s), !t && this._isNodeUnassigned() && this.onboardingStore.startOnboarding("recommendationStrategyOnboarding");
|
|
192
215
|
const S = this.store.currentRecommendationId;
|
|
193
|
-
|
|
216
|
+
g && S !== null && this.store.blockStates[S] && this.onboardingStore.startOnboarding("recommendationLegacyStrategyOnboarding"), m && (m.style.display = a ? "none" : "", t && !a && (m.textContent = e || `#${t}`)), _ && (_.style.display = a ? "block" : "none"), this.lastPaintedState = p;
|
|
194
217
|
}
|
|
195
218
|
}
|
|
196
219
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
220
|
+
I as STRATEGY_CONTROL_ID,
|
|
221
|
+
P as StrategyControl
|
|
199
222
|
};
|
|
@@ -3,7 +3,7 @@ import { useTranslations as L } from "../../../../composables/useTranslations.js
|
|
|
3
3
|
import { getRecommendationFeedSourceMaps as F, strategyEditPath as U, URLS as E, getOperatorOptions as N, PriceAttributes as M } from "../../../../enums/extensions/recommendationBlock.js";
|
|
4
4
|
import { ToasterTypeOptions as A } from "../../../../enums/toaster.js";
|
|
5
5
|
import { useRecommendationApi as T } from "../../../../services/recommendationApi.js";
|
|
6
|
-
import { useConfigStore as
|
|
6
|
+
import { useConfigStore as R } from "../../../../stores/config.js";
|
|
7
7
|
import { defineStore as B } from "pinia";
|
|
8
8
|
import "../constants/selectors.js";
|
|
9
9
|
import { DEFAULT_MOBILE_CARDS_IN_ROW as O, DEFAULT_CARDS_IN_ROW as z } from "../constants/layout.js";
|
|
@@ -12,11 +12,11 @@ import { getDefaultProducts as w } from "../templates/utils.js";
|
|
|
12
12
|
import { generateCompleteFilterQuery as P } from "../utils/filterUtil.js";
|
|
13
13
|
import { isLegacyStrategyConfig as j } from "../utils/legacyStrategyMigration.js";
|
|
14
14
|
import { getPartnerRecommendationParams as $ } from "../utils/partnerCustomizations.js";
|
|
15
|
-
import { sanitizeProductIds as
|
|
16
|
-
import { isFilterValid as
|
|
15
|
+
import { sanitizeProductIds as K } from "../utils/productIds.js";
|
|
16
|
+
import { isFilterValid as q } from "../validation/filterSchema.js";
|
|
17
17
|
import { getInvalidFields as H, isConfigValid as J } from "../validation/requiredFields.js";
|
|
18
18
|
const m = T();
|
|
19
|
-
let S = null, p = null, y = null,
|
|
19
|
+
let S = null, p = null, y = null, b = "", k = null, I = 0;
|
|
20
20
|
const g = /* @__PURE__ */ new Map();
|
|
21
21
|
let l = null;
|
|
22
22
|
function _() {
|
|
@@ -45,7 +45,7 @@ function _() {
|
|
|
45
45
|
// that default is what reached buildCampaignUrl and baked a most-popular feed URL
|
|
46
46
|
// for a block the user never configured (SD-149916). Legacy blocks still get their real
|
|
47
47
|
// algorithm from the node-config sync or the save-time seed.
|
|
48
|
-
strategy:
|
|
48
|
+
strategy: R().isFeatureEnabled("reusableRecommendationStrategy") ? "" : "mostPopular",
|
|
49
49
|
strategyId: "",
|
|
50
50
|
nodeConfigVersion: C,
|
|
51
51
|
textTrimming: !0,
|
|
@@ -119,7 +119,7 @@ const Q = () => ({
|
|
|
119
119
|
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].removeStrategyModalStatus : !1;
|
|
120
120
|
},
|
|
121
121
|
isLegacyStrategyBlock() {
|
|
122
|
-
return
|
|
122
|
+
return R().isFeatureEnabled("reusableRecommendationStrategy") && j(this.recommendationConfigs);
|
|
123
123
|
},
|
|
124
124
|
legacyConversionLoading(t) {
|
|
125
125
|
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].legacyConversionLoading ?? !1 : !1;
|
|
@@ -234,7 +234,7 @@ const Q = () => ({
|
|
|
234
234
|
const r = this.blockStates[t];
|
|
235
235
|
if (r) {
|
|
236
236
|
const o = structuredClone(r);
|
|
237
|
-
o.recommendationConfigs.id = e, o.recommendationConfigs.strategyId &&
|
|
237
|
+
o.recommendationConfigs.id = e, o.recommendationConfigs.strategyId && R().isFeatureEnabled("reusableRecommendationStrategy") && (o.isInitialized = !1, o.syncedConfigFingerprint = null), this.blockStates = {
|
|
238
238
|
...this.blockStates,
|
|
239
239
|
[e]: o
|
|
240
240
|
};
|
|
@@ -380,31 +380,50 @@ const Q = () => ({
|
|
|
380
380
|
this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId] || (this.blockStates[this.currentRecommendationId].removeStrategyModalStatus = !1);
|
|
381
381
|
},
|
|
382
382
|
async fetchStrategies() {
|
|
383
|
-
for (;
|
|
383
|
+
for (; k; )
|
|
384
384
|
try {
|
|
385
|
-
await
|
|
385
|
+
await k;
|
|
386
386
|
} catch {
|
|
387
387
|
}
|
|
388
388
|
if (this.strategiesFetched)
|
|
389
389
|
return;
|
|
390
|
-
const t =
|
|
390
|
+
const t = I, e = (async () => {
|
|
391
391
|
this.strategiesLoading = !0;
|
|
392
392
|
try {
|
|
393
393
|
const r = await m.fetchRecommendationStrategies();
|
|
394
|
-
if (t !==
|
|
394
|
+
if (t !== I)
|
|
395
395
|
return;
|
|
396
396
|
this.strategies = r, this.strategiesFetched = !0;
|
|
397
397
|
} finally {
|
|
398
|
-
this.strategiesLoading = !1, t ===
|
|
398
|
+
this.strategiesLoading = !1, t === I && (this.strategiesSettled = !0);
|
|
399
399
|
}
|
|
400
400
|
})();
|
|
401
|
-
|
|
401
|
+
k = e;
|
|
402
402
|
try {
|
|
403
403
|
await e;
|
|
404
404
|
} finally {
|
|
405
|
-
|
|
405
|
+
k = null;
|
|
406
406
|
}
|
|
407
407
|
},
|
|
408
|
+
/**
|
|
409
|
+
* Drops what the store still holds for a block whose account-scoped config was just
|
|
410
|
+
* reset in the document (SD-151945), so the panel re-seeds from the emptied node.
|
|
411
|
+
*/
|
|
412
|
+
resetPartnerScopedConfig(t) {
|
|
413
|
+
const e = t.toString();
|
|
414
|
+
if (this.recommendationCampaignUrls[e] !== void 0) {
|
|
415
|
+
const n = { ...this.recommendationCampaignUrls };
|
|
416
|
+
delete n[e], this.recommendationCampaignUrls = n;
|
|
417
|
+
}
|
|
418
|
+
const r = this.blockStates[t];
|
|
419
|
+
r && (r.recommendationConfigs = {
|
|
420
|
+
...r.recommendationConfigs,
|
|
421
|
+
strategyId: "",
|
|
422
|
+
strategy: "",
|
|
423
|
+
filters: [],
|
|
424
|
+
productIds: []
|
|
425
|
+
}, r.isInitialized = !1, r.syncedConfigFingerprint = null, this.currentRecommendationId === t && this.configVersion++);
|
|
426
|
+
},
|
|
408
427
|
/**
|
|
409
428
|
* Clears what a block inherited from the id it arrived holding, so the panel fetches for it.
|
|
410
429
|
* A re-dropped saved module can keep the source's id — and its "already fetched" entry —
|
|
@@ -416,7 +435,7 @@ const Q = () => ({
|
|
|
416
435
|
}));
|
|
417
436
|
},
|
|
418
437
|
invalidateStrategies() {
|
|
419
|
-
this.strategiesFetched = !1, this.strategiesSettled = !1,
|
|
438
|
+
this.strategiesFetched = !1, this.strategiesSettled = !1, I += 1;
|
|
420
439
|
},
|
|
421
440
|
/**
|
|
422
441
|
* Opens a Smart Recommender strategy page in a new tab and refreshes the list every time
|
|
@@ -503,6 +522,7 @@ const Q = () => ({
|
|
|
503
522
|
this.blockStates[r].legacyConversionLoading = !0;
|
|
504
523
|
try {
|
|
505
524
|
const n = await m.migrateLegacyStrategy(t, e);
|
|
525
|
+
this.invalidateStrategies();
|
|
506
526
|
try {
|
|
507
527
|
await this.fetchStrategies();
|
|
508
528
|
} catch (o) {
|
|
@@ -606,7 +626,7 @@ const Q = () => ({
|
|
|
606
626
|
const n = [...e.recommendationConfigs.filters];
|
|
607
627
|
n[r] = {
|
|
608
628
|
...t,
|
|
609
|
-
isValid:
|
|
629
|
+
isValid: q(t)
|
|
610
630
|
}, e.recommendationConfigs.filters = n;
|
|
611
631
|
}
|
|
612
632
|
},
|
|
@@ -670,22 +690,22 @@ const Q = () => ({
|
|
|
670
690
|
const t = [
|
|
671
691
|
this.currentRecommendationId,
|
|
672
692
|
this.configVersion,
|
|
673
|
-
|
|
693
|
+
I
|
|
674
694
|
].join(":");
|
|
675
|
-
if (y &&
|
|
695
|
+
if (y && b === t) {
|
|
676
696
|
await y;
|
|
677
697
|
return;
|
|
678
698
|
}
|
|
679
|
-
|
|
699
|
+
b = t, y = this._doFetchProducts();
|
|
680
700
|
try {
|
|
681
701
|
await y;
|
|
682
702
|
} finally {
|
|
683
|
-
|
|
703
|
+
b === t && (y = null, b = "");
|
|
684
704
|
}
|
|
685
705
|
},
|
|
686
706
|
async _doFetchProducts() {
|
|
687
707
|
var h;
|
|
688
|
-
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n =
|
|
708
|
+
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = R();
|
|
689
709
|
if (r.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy")) {
|
|
690
710
|
await this._doFetchStrategyProducts(t);
|
|
691
711
|
return;
|
|
@@ -705,7 +725,7 @@ const Q = () => ({
|
|
|
705
725
|
details: !0,
|
|
706
726
|
campaignId: n.variationId
|
|
707
727
|
};
|
|
708
|
-
r.strategy === "manualMerchandising" ? c.productId =
|
|
728
|
+
r.strategy === "manualMerchandising" ? c.productId = K(r.productIds) : r.strategy === "similarViewed" && (c.productId = "{itemId}"), r.strategy === "userBased" && (c.userId = "{user_id}"), a && (c.filter = a), r.shuffleProducts && (c.shuffle = !0), Object.assign(
|
|
709
729
|
c,
|
|
710
730
|
$(n.partnerName, r.strategy)
|
|
711
731
|
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ATTR_CUSTOM_PREFIX as f, RECOMMENDATION_ID_ATTR as o } from "../constants/selectors.js";
|
|
2
|
+
const s = new RegExp(`\\s${o}="(\\d+)"`, "g");
|
|
3
|
+
function u(t) {
|
|
4
|
+
if (typeof t == "string")
|
|
5
|
+
return t.trim() !== "";
|
|
6
|
+
if (t && typeof t == "object" && "strategyId" in t) {
|
|
7
|
+
const { strategyId: r } = t;
|
|
8
|
+
return (typeof r == "string" || typeof r == "number") && String(r).trim() !== "";
|
|
9
|
+
}
|
|
10
|
+
return !1;
|
|
11
|
+
}
|
|
12
|
+
function a(t) {
|
|
13
|
+
return new Set([...t.matchAll(s)].map((r) => Number(r[1])));
|
|
14
|
+
}
|
|
15
|
+
function g({ config: t, blockId: r, partnerName: e, campaignUrls: n, loadedIds: i }) {
|
|
16
|
+
return e ? t.partnerName ? t.partnerName !== e : !t.strategyId || !n || !i.has(r) ? !1 : !u(n[String(r)]) : !1;
|
|
17
|
+
}
|
|
18
|
+
function p(t) {
|
|
19
|
+
return t.filter((r) => !r.startsWith(f));
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
g as carriesForeignPartnerConfig,
|
|
23
|
+
u as isDefinedCampaignUrl,
|
|
24
|
+
a as loadedRecommendationIds,
|
|
25
|
+
p as withoutCustomAttributes
|
|
26
|
+
};
|
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-
|
|
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-c61cc8ea]{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-36867e2e]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-36867e2e]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-36867e2e]{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-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .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-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .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}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
|
package/dist/sprite.svg
CHANGED
|
@@ -3107,12 +3107,6 @@
|
|
|
3107
3107
|
<symbol viewBox="0 0 24 24" data-token-name="line-replace-dynamic-content" id="line-replace-dynamic-content">
|
|
3108
3108
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8327 5.42341C11.2222 5.81502 11.221 6.44877 10.8301 6.83894C10.8013 6.86765 10.7712 6.89425 10.74 6.91873L8.70549 8.95706C8.31533 9.34795 7.68275 9.34795 7.29259 8.95706C6.90243 8.56617 6.90243 7.93242 7.29259 7.54153L7.73664 7.09666L7.00053 7.09662C6.44823 7.0966 6.00049 7.54432 6.00049 8.09662V10.0001C6.00049 10.5524 5.55277 11.0001 5.00049 11.0001C4.4482 11.0001 4.00049 10.5524 4.00049 10.0001V8.09662C4.00049 6.43972 5.34372 5.09655 7.00062 5.09662L7.6872 5.09665L7.30179 4.70909C6.91235 4.31748 6.91353 3.68372 7.30442 3.29356C7.69531 2.9034 8.32788 2.90458 8.71732 3.29619L10.8327 5.42341ZM12 6.00024C12 4.89567 12.8954 4.00024 14 4.00024H18C19.1046 4.00024 20 4.89567 20 6.00024V10.0002C20 11.1048 19.1046 12.0002 18 12.0002H14C12.8954 12.0002 12 11.1048 12 10.0002V6.00024ZM14 6.00024H18V10.0002H14V6.00024ZM4 14.0002C4 12.8957 4.89543 12.0002 6 12.0002H10C11.1046 12.0002 12 12.8957 12 14.0002V18.0002C12 19.1048 11.1046 20.0002 10 20.0002H6C4.89543 20.0002 4 19.1048 4 18.0002V14.0002ZM6 14.0002H10V18.0002H6V14.0002ZM13.2939 17.1612C12.9031 17.5513 12.9019 18.1851 13.2913 18.5767L15.4067 20.7039C15.7961 21.0955 16.4287 21.0967 16.8196 20.7065C17.2105 20.3164 17.2117 19.6826 16.8222 19.291L16.4368 18.9034L17.1234 18.9035C18.7803 18.9035 20.1235 17.5604 20.1235 15.9035V14C20.1235 13.4477 19.6758 13 19.1235 13C18.5713 13 18.1235 13.4477 18.1235 14L18.1235 15.9035C18.1235 16.4558 17.6758 16.9035 17.1235 16.9035L16.3874 16.9034L16.8314 16.4586C17.2216 16.0677 17.2216 15.4339 16.8314 15.043C16.4413 14.6522 15.8087 14.6522 15.4185 15.043L13.384 17.0814C13.3528 17.1058 13.3227 17.1324 13.2939 17.1612Z"/>
|
|
3109
3109
|
</symbol>
|
|
3110
|
-
<symbol viewBox="0 0 24 24" id="line-accessibility">
|
|
3111
|
-
<g transform="translate(2 2)">
|
|
3112
|
-
<rect x="1" y="1" width="18" height="18" rx="9" fill="none" stroke="currentColor" stroke-width="2"/>
|
|
3113
|
-
<path fill="currentColor" d="M14.8125 6.08473C15.332 5.94828 15.6875 6.47668 15.6875 6.95875C15.6873 7.44052 15.2498 7.66778 14.8125 7.8318C14.798 7.83727 14.7826 7.84147 14.7676 7.84547L12.3262 8.69898C12.013 8.81663 11.8784 8.93913 11.8486 8.99391C11.848 8.99533 11.8475 8.9975 11.8467 8.99879C11.8153 9.05489 11.7235 9.29227 11.8379 10.0076L11.9961 11.238L12.8887 16.0154C12.8969 16.0521 12.9036 16.0895 12.9092 16.1267C12.9741 16.5696 12.6498 16.9997 12.0342 16.9998C11.4983 16.9998 11.2617 16.63 11.1592 16.1267C11.1592 16.1267 10.3701 11.8181 9.9873 11.8181C9.60444 11.8205 8.94137 15.6235 8.83887 16.1267C8.7363 16.63 8.49971 16.9998 7.96387 16.9998C7.34999 16.9996 7.02548 16.5711 7.08887 16.1296L7.0957 16.0955C7.09789 16.0818 7.09981 16.0676 7.10254 16.0545L7.9834 11.2371L8.1416 10.0066C8.17359 9.80644 8.26392 9.23379 8.15137 8.9441C8.11665 8.85389 8.0452 8.7492 7.7793 8.64723L5.17962 7.83495C5.17734 7.83424 5.17578 7.83212 5.17578 7.82972C5.17578 7.82745 5.17437 7.82541 5.17224 7.8246C4.74007 7.66146 4.31254 7.43412 4.3125 6.95777C4.31258 6.47553 4.66813 5.9482 5.1875 6.08473C5.26161 6.10405 5.33481 6.12744 5.40625 6.15504C6.12486 6.3593 8.37146 6.9607 9.98828 6.9607C11.7281 6.96068 14.1981 6.26431 14.707 6.115C14.7342 6.10658 14.7619 6.09917 14.7891 6.09156L14.7998 6.08766L14.8125 6.08473ZM9.70117 3.02906C9.99821 2.96998 10.3061 3.00106 10.5859 3.11695C10.8657 3.23286 11.1052 3.42866 11.2734 3.68043C11.4416 3.93217 11.5312 4.22828 11.5312 4.53101C11.5308 4.93693 11.369 5.326 11.082 5.61305C10.795 5.9001 10.406 6.06183 10 6.06226C9.69721 6.06226 9.40119 5.97264 9.14941 5.80445C8.89762 5.63621 8.70086 5.39673 8.58496 5.11695C8.46918 4.83725 8.439 4.52909 8.49805 4.23219C8.55716 3.93526 8.70292 3.6621 8.91699 3.44801C9.13112 3.23391 9.4042 3.08814 9.70117 3.02906Z"/>
|
|
3114
|
-
</g>
|
|
3115
|
-
</symbol>
|
|
3116
3110
|
<svg viewBox="0 0 24 24" data-token-name="line-advanced-settings" id="line-advanced-settings">
|
|
3117
3111
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 3C15.4477 3 15 3.44772 15 4V6V8C15 8.55228 15.4477 9 16 9C16.5523 9 17 8.55228 17 8V7H20C20.5523 7 21 6.55228 21 6C21 5.44772 20.5523 5 20 5H17V4C17 3.44772 16.5523 3 16 3ZM3 6C3 5.44772 3.44772 5 4 5H12C12.5523 5 13 5.44772 13 6C13 6.55228 12.5523 7 12 7H4C3.44772 7 3 6.55228 3 6ZM16 15C15.4477 15 15 15.4477 15 16V18V20C15 20.5523 15.4477 21 16 21C16.5523 21 17 20.5523 17 20V19H20C20.5523 19 21 18.5523 21 18C21 17.4477 20.5523 17 20 17H17V16C17 15.4477 16.5523 15 16 15ZM3 18C3 17.4477 3.44772 17 4 17H12C12.5523 17 13 17.4477 13 18C13 18.5523 12.5523 19 12 19H4C3.44772 19 3 18.5523 3 18ZM7 10C7 9.44772 7.44772 9 8 9C8.55228 9 9 9.44772 9 10V12V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V13H4C3.44772 13 3 12.5523 3 12C3 11.4477 3.44772 11 4 11H7V10ZM12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13H20C20.5523 13 21 12.5523 21 12C21 11.4477 20.5523 11 20 11H12Z"/>
|
|
3118
3112
|
</svg>
|
|
@@ -278,6 +278,14 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
278
278
|
* mount. Non-numbers still fail, like every other field in this schema.
|
|
279
279
|
*/
|
|
280
280
|
readonly trackIdCounter: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, number>]>, 0>;
|
|
281
|
+
/**
|
|
282
|
+
* The variation's saved `recommendationCampaignUrls`, keyed by block id. A block
|
|
283
|
+
* that still names a strategy but has no entry here had it dropped by a
|
|
284
|
+
* cross-account duplicate, so Guido resets it on load (SD-151945). Omit it and
|
|
285
|
+
* that check is off, and so is any non-object value such as `null`, because a reset
|
|
286
|
+
* cannot be undone. Hosts send `[]` for an empty map.
|
|
287
|
+
*/
|
|
288
|
+
readonly recommendationCampaignUrls: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TransformAction<unknown, Record<string, unknown> | undefined>]>, undefined>;
|
|
281
289
|
/** Migration-only inputs (legacy block configs) */
|
|
282
290
|
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
283
291
|
/**
|
|
@@ -399,7 +407,6 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
399
407
|
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
400
408
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
401
409
|
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
402
|
-
readonly accessibilityTesting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
403
410
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
404
411
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
405
412
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
@@ -702,6 +709,14 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
702
709
|
* mount. Non-numbers still fail, like every other field in this schema.
|
|
703
710
|
*/
|
|
704
711
|
readonly trackIdCounter: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, number>]>, 0>;
|
|
712
|
+
/**
|
|
713
|
+
* The variation's saved `recommendationCampaignUrls`, keyed by block id. A block
|
|
714
|
+
* that still names a strategy but has no entry here had it dropped by a
|
|
715
|
+
* cross-account duplicate, so Guido resets it on load (SD-151945). Omit it and
|
|
716
|
+
* that check is off, and so is any non-object value such as `null`, because a reset
|
|
717
|
+
* cannot be undone. Hosts send `[]` for an empty map.
|
|
718
|
+
*/
|
|
719
|
+
readonly recommendationCampaignUrls: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TransformAction<unknown, Record<string, unknown> | undefined>]>, undefined>;
|
|
705
720
|
/** Migration-only inputs (legacy block configs) */
|
|
706
721
|
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
707
722
|
/**
|
|
@@ -808,7 +823,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
808
823
|
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
809
824
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
810
825
|
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
811
|
-
readonly accessibilityTesting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
812
826
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
813
827
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
814
828
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
saveSilent: () => Promise<Omit<import("../../@types/stripo").SavedTemplateDetails, "metadata" | "silent"> | undefined>;
|
|
3
|
-
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
2
|
export default _default;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
3
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
4
|
export default _default;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
3
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
4
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CompileEmailOptions } from '@@/Types/
|
|
2
|
-
import { GetCompiledEmailOptions, CompiledEmailResult, TemplateData } from '@@/Types/
|
|
1
|
+
import type { CompileEmailOptions } from '@@/Types/actions-api';
|
|
2
|
+
import { GetCompiledEmailOptions, CompiledEmailResult, TemplateData } from '@@/Types/actions-api';
|
|
3
3
|
export declare const useActionsApi: () => {
|
|
4
4
|
getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
|
|
5
5
|
getTemplateData: () => Promise<TemplateData>;
|
|
@@ -43,6 +43,7 @@ export declare const useConfig: () => {
|
|
|
43
43
|
selectedUnsubscribePages: number[];
|
|
44
44
|
forceRecreate: boolean;
|
|
45
45
|
trackIdCounter: number;
|
|
46
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
46
47
|
migration: {
|
|
47
48
|
recommendationConfigs: {
|
|
48
49
|
[x: string]: {
|
|
@@ -99,7 +100,6 @@ export declare const useConfig: () => {
|
|
|
99
100
|
modulesDisabled: boolean;
|
|
100
101
|
liquidSyntax: boolean;
|
|
101
102
|
autosave: boolean;
|
|
102
|
-
accessibilityTesting: boolean;
|
|
103
103
|
allowlistEnabled: boolean;
|
|
104
104
|
linkTrackingIds: boolean;
|
|
105
105
|
reusableRecommendationStrategy: boolean;
|
|
@@ -181,6 +181,7 @@ export declare const useConfig: () => {
|
|
|
181
181
|
selectedUnsubscribePages: number[];
|
|
182
182
|
forceRecreate: boolean;
|
|
183
183
|
trackIdCounter: number;
|
|
184
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
184
185
|
migration: {
|
|
185
186
|
recommendationConfigs: {
|
|
186
187
|
[x: string]: {
|
|
@@ -237,7 +238,6 @@ export declare const useConfig: () => {
|
|
|
237
238
|
modulesDisabled: boolean;
|
|
238
239
|
liquidSyntax: boolean;
|
|
239
240
|
autosave: boolean;
|
|
240
|
-
accessibilityTesting: boolean;
|
|
241
241
|
allowlistEnabled: boolean;
|
|
242
242
|
linkTrackingIds: boolean;
|
|
243
243
|
reusableRecommendationStrategy: boolean;
|
|
@@ -137,6 +137,12 @@ export declare class RecommendationBlock extends Block {
|
|
|
137
137
|
* heals templates saved before this feature without dirtying current ones.
|
|
138
138
|
*/
|
|
139
139
|
private _healHidePriceAttr;
|
|
140
|
+
/**
|
|
141
|
+
* Empties a block copied in from another account: its strategy and attribute types
|
|
142
|
+
* are account-scoped and would not resolve here (SD-151945). Layout, locale and
|
|
143
|
+
* currency stay. The write stamps the current account, so the next pass is a no-op.
|
|
144
|
+
*/
|
|
145
|
+
private _resetForeignPartnerConfig;
|
|
140
146
|
/**
|
|
141
147
|
* Gets the recommendation-id from a block node
|
|
142
148
|
*/
|
|
@@ -543,6 +543,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
543
543
|
openRemoveStrategyModal(): void;
|
|
544
544
|
closeRemoveStrategyModal(): void;
|
|
545
545
|
fetchStrategies(): Promise<void>;
|
|
546
|
+
/**
|
|
547
|
+
* Drops what the store still holds for a block whose account-scoped config was just
|
|
548
|
+
* reset in the document (SD-151945), so the panel re-seeds from the emptied node.
|
|
549
|
+
*/
|
|
550
|
+
resetPartnerScopedConfig(id: number): void;
|
|
546
551
|
/**
|
|
547
552
|
* Clears what a block inherited from the id it arrived holding, so the panel fetches for it.
|
|
548
553
|
* A re-dropped saved module can keep the source's id — and its "already fetched" entry —
|
|
@@ -83,6 +83,12 @@ export interface RecommendationNodeConfig {
|
|
|
83
83
|
*/
|
|
84
84
|
filters: Filter[];
|
|
85
85
|
strategyId: string;
|
|
86
|
+
/**
|
|
87
|
+
* Account (`config.partner.name`) that last wrote the strategy config. Strategy ids and
|
|
88
|
+
* attribute types are account-scoped, so a block opened under another account is reset.
|
|
89
|
+
* Absent on blocks saved before SD-151945.
|
|
90
|
+
*/
|
|
91
|
+
partnerName?: string;
|
|
86
92
|
/**
|
|
87
93
|
* Layout orientation
|
|
88
94
|
* - 'grid': Products in a grid, attributes aligned across products
|