@useinsider/guido 3.19.0-beta.e110e88 → 3.19.0-beta.e424587
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 -91
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +96 -85
- package/dist/components/organisms/base/AuthErrorModal.vue.js +18 -0
- package/dist/components/organisms/base/AuthErrorModal.vue2.js +42 -0
- package/dist/components/wrappers/WpModal.vue.js +1 -1
- package/dist/components/wrappers/WpModal.vue2.js +4 -3
- package/dist/composables/useAuthError.js +52 -0
- package/dist/composables/useAutoSave.js +11 -11
- package/dist/composables/useCortexBlueprintBridge.js +122 -54
- package/dist/composables/useEmailTemplateApplier.js +111 -50
- package/dist/composables/useHttp.js +64 -54
- package/dist/composables/useLegacyStrategyConversion.js +23 -19
- package/dist/composables/useStripo.js +24 -20
- package/dist/composables/useToaster.js +17 -15
- package/dist/composables/validators/useLiquidValidator.js +15 -15
- package/dist/config/compiler/itemsCompilerRules.js +14 -5
- package/dist/config/compiler/utils/itemsCompilerUtils.js +48 -21
- package/dist/config/migrator/index.js +14 -13
- package/dist/config/migrator/itemsBlockMigrator.js +245 -253
- package/dist/config/migrator/recommendationMigrator.js +28 -21
- package/dist/config/migrator/recommendationPartnerMigrator.js +56 -0
- package/dist/enums/extensions/recommendationBlock.js +30 -29
- package/dist/extensions/Blocks/Items/block.js +78 -67
- package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
- package/dist/extensions/Blocks/Items/constants/cardWidth.js +20 -0
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
- package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +1 -1
- package/dist/extensions/Blocks/Items/template.js +219 -204
- package/dist/extensions/Blocks/Recommendation/block.js +21 -22
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +97 -107
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -49
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +203 -209
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +67 -91
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +21 -26
- package/dist/extensions/Blocks/Recommendation/utils/partnerCustomizations.js +3 -1
- package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +25 -0
- package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +16 -55
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +16 -0
- package/dist/src/components/organisms/base/AuthErrorModal.vue.d.ts +2 -0
- package/dist/src/components/wrappers/WpModal.vue.d.ts +5 -1
- package/dist/src/composables/useAuthError.d.ts +12 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +2 -3
- package/dist/src/composables/useEmailTemplateApplier.d.ts +18 -5
- package/dist/src/composables/useGuidoActions.d.ts +2 -0
- package/dist/src/composables/useHttp.d.ts +2 -0
- package/dist/src/config/compiler/utils/itemsCompilerUtils.d.ts +5 -0
- package/dist/src/config/migrator/index.d.ts +2 -1
- package/dist/src/config/migrator/recommendationPartnerMigrator.d.ts +19 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/block.d.ts +5 -0
- package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
- package/dist/src/extensions/Blocks/Items/constants/cardWidth.d.ts +12 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +2 -13
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/nodeConfigWriter.d.ts +1 -3
- package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +0 -7
- package/dist/src/mock/cortexChatStore.d.ts +12 -0
- package/dist/src/stores/config.d.ts +20 -0
- package/dist/src/stores/guido-email-editor.d.ts +20 -10
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/stores/recommendation.d.ts +5 -0
- package/dist/src/utils/dateUtil.d.ts +10 -0
- package/dist/src/utils/genericUtil.d.ts +3 -0
- package/dist/src/utils/liquidProtection.d.ts +3 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +9 -0
- package/dist/static/styles/components/version-history.css.js +2 -6
- package/dist/stores/guido-email-editor.js +3 -1
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/liquidProtection.js +5 -0
- package/dist/utils/pairProductVariables.js +71 -71
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { useToaster as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import { getRecommendationFeedSourceMaps as
|
|
1
|
+
import { useToaster as _ } from "../../../../composables/useToaster.js";
|
|
2
|
+
import { useTranslations as L } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { getRecommendationFeedSourceMaps as F, strategyEditPath as U, strategyCreatePath as N, getOperatorOptions as M, PriceAttributes as E } from "../../../../enums/extensions/recommendationBlock.js";
|
|
4
4
|
import { ToasterTypeOptions as B } from "../../../../enums/toaster.js";
|
|
5
5
|
import { useRecommendationApi as z } from "../../../../services/recommendationApi.js";
|
|
6
6
|
import { useConfigStore as R } from "../../../../stores/config.js";
|
|
7
|
-
import { defineStore as
|
|
7
|
+
import { defineStore as A } from "pinia";
|
|
8
8
|
import "../constants/selectors.js";
|
|
9
|
-
import { DEFAULT_MOBILE_CARDS_IN_ROW as
|
|
10
|
-
import { CURRENT_CONFIG_VERSION as C, DEFAULT_NODE_CONFIG as
|
|
11
|
-
import { getDefaultProducts as
|
|
12
|
-
import { generateCompleteFilterQuery as
|
|
13
|
-
import { isLegacyStrategyConfig as
|
|
14
|
-
import { getPartnerRecommendationParams as
|
|
15
|
-
import { sanitizeProductIds as
|
|
16
|
-
import { isFilterValid as
|
|
17
|
-
import { getInvalidFields as
|
|
18
|
-
const
|
|
9
|
+
import { DEFAULT_MOBILE_CARDS_IN_ROW as O, DEFAULT_CARDS_IN_ROW as x } from "../constants/layout.js";
|
|
10
|
+
import { CURRENT_CONFIG_VERSION as C, DEFAULT_NODE_CONFIG as T, EXCLUDED_ALGORITHM_IDS as V } from "../constants/defaultConfig.js";
|
|
11
|
+
import { getDefaultProducts as w } from "../templates/utils.js";
|
|
12
|
+
import { generateCompleteFilterQuery as P } from "../utils/filterUtil.js";
|
|
13
|
+
import { isLegacyStrategyConfig as j } from "../utils/legacyStrategyMigration.js";
|
|
14
|
+
import { getPartnerRecommendationParams as $ } from "../utils/partnerCustomizations.js";
|
|
15
|
+
import { sanitizeProductIds as q } from "../utils/productIds.js";
|
|
16
|
+
import { isFilterValid as K } from "../validation/filterSchema.js";
|
|
17
|
+
import { getInvalidFields as H, isConfigValid as J } from "../validation/requiredFields.js";
|
|
18
|
+
const m = z();
|
|
19
19
|
let S = null, p = null, y = null, I = "", k = null, b = 0;
|
|
20
20
|
const g = /* @__PURE__ */ new Map();
|
|
21
21
|
let l = null;
|
|
@@ -35,7 +35,7 @@ function D() {
|
|
|
35
35
|
productIds: [],
|
|
36
36
|
id: 1,
|
|
37
37
|
language: "en_US",
|
|
38
|
-
mobileCardsInRow:
|
|
38
|
+
mobileCardsInRow: O,
|
|
39
39
|
mobileLayoutEnabled: !1,
|
|
40
40
|
orientation: "grid",
|
|
41
41
|
recommendedProducts: [],
|
|
@@ -56,7 +56,7 @@ function D() {
|
|
|
56
56
|
priceHideIfSameAsDiscounted: !1
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function G() {
|
|
60
60
|
return {
|
|
61
61
|
recommendationConfigs: D(),
|
|
62
62
|
recommendationProducts: [],
|
|
@@ -72,7 +72,7 @@ function _() {
|
|
|
72
72
|
legacyConversionLoading: !1
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const Q = () => ({
|
|
76
76
|
recommendationCampaignUrls: {},
|
|
77
77
|
activePredictiveAlgorithms: [],
|
|
78
78
|
languages: {},
|
|
@@ -87,8 +87,8 @@ const W = () => ({
|
|
|
87
87
|
currentRecommendationId: null,
|
|
88
88
|
strategyPanelOpen: !1,
|
|
89
89
|
configVersion: 0
|
|
90
|
-
}),
|
|
91
|
-
state: () =>
|
|
90
|
+
}), ft = A("guidoRecommendationExtension", {
|
|
91
|
+
state: () => Q(),
|
|
92
92
|
getters: {
|
|
93
93
|
// ====================================================================
|
|
94
94
|
// Proxy Getters — Backward Compatible Access to Current Block State
|
|
@@ -119,7 +119,7 @@ const W = () => ({
|
|
|
119
119
|
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].removeStrategyModalStatus : !1;
|
|
120
120
|
},
|
|
121
121
|
isLegacyStrategyBlock() {
|
|
122
|
-
return R().isFeatureEnabled("reusableRecommendationStrategy") &&
|
|
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;
|
|
@@ -162,8 +162,8 @@ const W = () => ({
|
|
|
162
162
|
return [...new Set(t.map((e) => e.filterGroup))].sort((e, r) => e - r);
|
|
163
163
|
},
|
|
164
164
|
getActivePredictiveAlgorithms: (t) => {
|
|
165
|
-
const e =
|
|
166
|
-
return t.activePredictiveAlgorithms.filter((n) => !
|
|
165
|
+
const e = F(), r = [];
|
|
166
|
+
return t.activePredictiveAlgorithms.filter((n) => !V.includes(n)).forEach((n) => {
|
|
167
167
|
r.push(...e.filter((s) => s.id === n));
|
|
168
168
|
}), r.map((n) => ({
|
|
169
169
|
text: n.name,
|
|
@@ -181,7 +181,7 @@ const W = () => ({
|
|
|
181
181
|
getFilterList() {
|
|
182
182
|
return Object.values(this.filterList).filter((t) => t.isFilterable !== 0 && t.isFilterable !== !1).map((t) => {
|
|
183
183
|
let e;
|
|
184
|
-
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` :
|
|
184
|
+
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : E.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
|
|
185
185
|
text: t.displayName,
|
|
186
186
|
value: e,
|
|
187
187
|
type: t.attributeType
|
|
@@ -203,7 +203,7 @@ const W = () => ({
|
|
|
203
203
|
setCurrentBlock(t) {
|
|
204
204
|
this.blockStates[t] || (this.blockStates = {
|
|
205
205
|
...this.blockStates,
|
|
206
|
-
[t]:
|
|
206
|
+
[t]: G()
|
|
207
207
|
}), this.currentRecommendationId = t;
|
|
208
208
|
},
|
|
209
209
|
/**
|
|
@@ -275,7 +275,7 @@ const W = () => ({
|
|
|
275
275
|
decimalCount: String(e.currencyDecimalCount),
|
|
276
276
|
decimalSeparator: r(e.currencyDecimalSeparator, ","),
|
|
277
277
|
thousandSeparator: r(e.currencyThousandSeparator, ".")
|
|
278
|
-
}, s = !this.blockStates[t], i = s ?
|
|
278
|
+
}, s = !this.blockStates[t], i = s ? G() : this.blockStates[t];
|
|
279
279
|
i.recommendationConfigs = {
|
|
280
280
|
...i.recommendationConfigs,
|
|
281
281
|
strategy: e.strategy,
|
|
@@ -390,7 +390,7 @@ const W = () => ({
|
|
|
390
390
|
const t = b, e = (async () => {
|
|
391
391
|
this.strategiesLoading = !0;
|
|
392
392
|
try {
|
|
393
|
-
const r = await
|
|
393
|
+
const r = await m.fetchRecommendationStrategies();
|
|
394
394
|
if (t !== b)
|
|
395
395
|
return;
|
|
396
396
|
this.strategies = r, this.strategiesFetched = !0;
|
|
@@ -434,9 +434,9 @@ const W = () => ({
|
|
|
434
434
|
_armStrategyPageReturn(t) {
|
|
435
435
|
const e = window.open(t, "_blank");
|
|
436
436
|
if (!e)
|
|
437
|
-
return
|
|
437
|
+
return _().showToaster({
|
|
438
438
|
type: B.Error,
|
|
439
|
-
message:
|
|
439
|
+
message: L()("discovery-strategy.error-description")
|
|
440
440
|
}), !1;
|
|
441
441
|
e.opener = null, l == null || l();
|
|
442
442
|
let r = !1;
|
|
@@ -471,20 +471,20 @@ const W = () => ({
|
|
|
471
471
|
* new strategy is offered; the user picks it themselves.
|
|
472
472
|
*/
|
|
473
473
|
openStrategyCreation() {
|
|
474
|
-
return this._armStrategyPageReturn(N
|
|
474
|
+
return this._armStrategyPageReturn(N());
|
|
475
475
|
},
|
|
476
476
|
/**
|
|
477
477
|
* Opens the strategy's edit page. Every return refreshes the list so the block reflects the
|
|
478
478
|
* edited configuration.
|
|
479
479
|
*/
|
|
480
480
|
openStrategyEdit(t) {
|
|
481
|
-
return this._armStrategyPageReturn(
|
|
481
|
+
return this._armStrategyPageReturn(U(t));
|
|
482
482
|
},
|
|
483
483
|
async resolveStrategyUrlTemplate(t, e) {
|
|
484
484
|
const r = typeof t.updated_at == "string" ? t.updated_at : "", n = r ? `${t.strategy_id}:${r}:${e}` : "", s = n ? this.strategyUrlTemplates[n] : void 0;
|
|
485
485
|
if (s)
|
|
486
486
|
return s;
|
|
487
|
-
const { full_path: i = "" } = await
|
|
487
|
+
const { full_path: i = "" } = await m.generateStrategyEndpoint(t, e) ?? {};
|
|
488
488
|
return n && i && (this.strategyUrlTemplates = {
|
|
489
489
|
...this.strategyUrlTemplates,
|
|
490
490
|
[n]: i
|
|
@@ -502,7 +502,8 @@ const W = () => ({
|
|
|
502
502
|
throw new Error("[Guido] convertLegacyStrategy called without an active block");
|
|
503
503
|
this.blockStates[r].legacyConversionLoading = !0;
|
|
504
504
|
try {
|
|
505
|
-
const n = await
|
|
505
|
+
const n = await m.migrateLegacyStrategy(t, e);
|
|
506
|
+
this.invalidateStrategies();
|
|
506
507
|
try {
|
|
507
508
|
await this.fetchStrategies();
|
|
508
509
|
} catch (o) {
|
|
@@ -532,7 +533,7 @@ const W = () => ({
|
|
|
532
533
|
this.patchCurrentBlockConfig({
|
|
533
534
|
strategyId: "",
|
|
534
535
|
strategy: "",
|
|
535
|
-
size:
|
|
536
|
+
size: T.size,
|
|
536
537
|
nodeConfigVersion: C
|
|
537
538
|
});
|
|
538
539
|
},
|
|
@@ -550,7 +551,7 @@ const W = () => ({
|
|
|
550
551
|
activePredictiveAlgorithms: t,
|
|
551
552
|
languages: e,
|
|
552
553
|
currencies: r
|
|
553
|
-
} = await
|
|
554
|
+
} = await m.fetchRecommendationCreateData();
|
|
554
555
|
if (this.activePredictiveAlgorithms = t, this.languages = e, this.currentRecommendationId !== null && this.blockStates[this.currentRecommendationId]) {
|
|
555
556
|
const n = this.blockStates[this.currentRecommendationId];
|
|
556
557
|
n.filterStatus = !!n.recommendationConfigs.filters.length;
|
|
@@ -571,7 +572,7 @@ const W = () => ({
|
|
|
571
572
|
return;
|
|
572
573
|
}
|
|
573
574
|
p = (async () => {
|
|
574
|
-
const t = await
|
|
575
|
+
const t = await m.fetchRecommendationFilters();
|
|
575
576
|
this.filterList = t;
|
|
576
577
|
})();
|
|
577
578
|
try {
|
|
@@ -606,7 +607,7 @@ const W = () => ({
|
|
|
606
607
|
const n = [...e.recommendationConfigs.filters];
|
|
607
608
|
n[r] = {
|
|
608
609
|
...t,
|
|
609
|
-
isValid:
|
|
610
|
+
isValid: K(t)
|
|
610
611
|
}, e.recommendationConfigs.filters = n;
|
|
611
612
|
}
|
|
612
613
|
},
|
|
@@ -620,7 +621,7 @@ const W = () => ({
|
|
|
620
621
|
let i = 1;
|
|
621
622
|
n = n.map((o) => o.filterGroup === t.filterGroup ? { ...o, filterNumber: i++ } : o);
|
|
622
623
|
} else {
|
|
623
|
-
const i = [...new Set(n.map((a) => a.filterGroup))].sort((a,
|
|
624
|
+
const i = [...new Set(n.map((a) => a.filterGroup))].sort((a, d) => a - d), o = new Map(i.map((a, d) => [a, d + 1]));
|
|
624
625
|
n = n.map((a) => ({
|
|
625
626
|
...a,
|
|
626
627
|
filterGroup: o.get(a.filterGroup) ?? a.filterGroup
|
|
@@ -644,7 +645,7 @@ const W = () => ({
|
|
|
644
645
|
}), e.recommendationConfigs.filters = r;
|
|
645
646
|
},
|
|
646
647
|
generateFilterQuery() {
|
|
647
|
-
return
|
|
648
|
+
return P(this.recommendationConfigs.filters);
|
|
648
649
|
},
|
|
649
650
|
/**
|
|
650
651
|
* Validation-only check invoked at save-CTA time. Defined as an action
|
|
@@ -652,14 +653,14 @@ const W = () => ({
|
|
|
652
653
|
* every block's recommendationConfigs across user edits.
|
|
653
654
|
*/
|
|
654
655
|
hasInvalidBlock() {
|
|
655
|
-
return Object.values(this.blockStates).some((t) => !
|
|
656
|
+
return Object.values(this.blockStates).some((t) => !J(t.recommendationConfigs, this));
|
|
656
657
|
},
|
|
657
658
|
/**
|
|
658
659
|
* Which required fields are missing across the design's blocks, so the save
|
|
659
660
|
* toaster can name the cause instead of always showing the generic message.
|
|
660
661
|
*/
|
|
661
662
|
invalidBlockFields() {
|
|
662
|
-
return Object.values(this.blockStates).flatMap((t) =>
|
|
663
|
+
return Object.values(this.blockStates).flatMap((t) => H(t.recommendationConfigs, this));
|
|
663
664
|
},
|
|
664
665
|
// ====================================================================
|
|
665
666
|
// Per-Block Product Fetching
|
|
@@ -697,7 +698,7 @@ const W = () => ({
|
|
|
697
698
|
this._setBlockProducts(t, [], i);
|
|
698
699
|
return;
|
|
699
700
|
}
|
|
700
|
-
const o = r.filters.filter((f) => f.isValid), a =
|
|
701
|
+
const o = r.filters.filter((f) => f.isValid), a = P(o), d = ((h = F().find((f) => f.key === r.strategy)) == null ? void 0 : h.path) || "", c = {
|
|
701
702
|
locale: r.language,
|
|
702
703
|
currency: r.currencySettings.value,
|
|
703
704
|
partnerName: n.partnerName,
|
|
@@ -705,83 +706,58 @@ const W = () => ({
|
|
|
705
706
|
details: !0,
|
|
706
707
|
campaignId: n.variationId
|
|
707
708
|
};
|
|
708
|
-
r.strategy === "manualMerchandising" ? c.productId =
|
|
709
|
+
r.strategy === "manualMerchandising" ? c.productId = q(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
710
|
c,
|
|
710
|
-
|
|
711
|
+
$(n.partnerName, r.strategy)
|
|
711
712
|
);
|
|
712
|
-
let
|
|
713
|
+
let u;
|
|
713
714
|
try {
|
|
714
|
-
|
|
715
|
+
u = await m.fetchRecommendationProducts(d, c);
|
|
715
716
|
} catch {
|
|
716
|
-
|
|
717
|
+
u = [];
|
|
717
718
|
}
|
|
718
|
-
g.get(t) === s && this._setBlockProducts(t,
|
|
719
|
+
g.get(t) === s && this._setBlockProducts(t, u, i);
|
|
719
720
|
},
|
|
720
721
|
/**
|
|
721
722
|
* Block-scoped counterpart of `fetchRecommendationProducts`, which only ever serves the
|
|
722
723
|
* selected block. The legacy conversion must refresh the products of the block that
|
|
723
724
|
* started it even after the user selected another one.
|
|
724
|
-
* @returns whether real products arrived
|
|
725
725
|
*/
|
|
726
|
-
async fetchStrategyProductsForBlock(t
|
|
727
|
-
var
|
|
728
|
-
|
|
726
|
+
async fetchStrategyProductsForBlock(t) {
|
|
727
|
+
var e;
|
|
728
|
+
(e = this.blockStates[t]) != null && e.recommendationConfigs.strategyId && await this._doFetchStrategyProducts(t);
|
|
729
729
|
},
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
async refreshStrategyBlock(t) {
|
|
736
|
-
var s;
|
|
737
|
-
const e = (s = this.blockStates[t]) == null ? void 0 : s.recommendationConfigs.strategyId;
|
|
738
|
-
if (!e)
|
|
739
|
-
return !1;
|
|
740
|
-
try {
|
|
741
|
-
await this.fetchStrategies();
|
|
742
|
-
} catch {
|
|
743
|
-
return !1;
|
|
744
|
-
}
|
|
745
|
-
const r = this.strategiesFetched ? this.strategies.find((i) => String(i.strategy_id) === e) : void 0;
|
|
746
|
-
if (!r || !await this.fetchStrategyProductsForBlock(t, { keepOnFailure: !0 }))
|
|
747
|
-
return !1;
|
|
748
|
-
const n = this.blockStates[t];
|
|
749
|
-
return n ? (r.size !== void 0 && (n.recommendationConfigs = {
|
|
750
|
-
...n.recommendationConfigs,
|
|
751
|
-
size: String(r.size)
|
|
752
|
-
}), !0) : !1;
|
|
753
|
-
},
|
|
754
|
-
async _doFetchStrategyProducts(t, { keepOnFailure: e = !1 } = {}) {
|
|
755
|
-
const r = (g.get(t) ?? 0) + 1;
|
|
756
|
-
g.set(t, r);
|
|
757
|
-
const { recommendationConfigs: n } = this.blockStates[t];
|
|
758
|
-
let s = [], i = parseInt(n.size) || 6;
|
|
730
|
+
async _doFetchStrategyProducts(t) {
|
|
731
|
+
const e = (g.get(t) ?? 0) + 1;
|
|
732
|
+
g.set(t, e);
|
|
733
|
+
const { recommendationConfigs: r } = this.blockStates[t];
|
|
734
|
+
let n = [], s = parseInt(r.size) || 6;
|
|
759
735
|
try {
|
|
760
736
|
await this.fetchStrategies();
|
|
761
|
-
const
|
|
762
|
-
(
|
|
737
|
+
const i = this.strategies.find(
|
|
738
|
+
(o) => String(o.strategy_id) === r.strategyId
|
|
763
739
|
);
|
|
764
|
-
if (
|
|
765
|
-
|
|
766
|
-
const
|
|
767
|
-
|
|
740
|
+
if (i) {
|
|
741
|
+
s = parseInt(String(i.size ?? "")) || s;
|
|
742
|
+
const o = r.currencySettings.value, d = (await this.resolveStrategyUrlTemplate(i, o)).replaceAll("{locale}", r.language).replaceAll("{currency}", o), c = d.indexOf("?"), u = c === -1 ? d : d.slice(0, c), h = (c === -1 ? "" : d.slice(c + 1)).split("&").filter((v) => v && !v.startsWith("user_id=")), f = h.length ? `${u}?${h.join("&")}` : u;
|
|
743
|
+
f && (n = await m.fetchRecommendationProductsByUrl(f));
|
|
768
744
|
}
|
|
769
745
|
} catch {
|
|
770
|
-
|
|
746
|
+
n = [];
|
|
771
747
|
}
|
|
772
|
-
|
|
748
|
+
g.get(t) === e && this._setBlockProducts(t, n, s);
|
|
773
749
|
},
|
|
774
750
|
_setBlockProducts(t, e, r) {
|
|
775
751
|
if (!this.blockStates[t])
|
|
776
752
|
return;
|
|
777
|
-
const n = e.length > 0 ? e :
|
|
753
|
+
const n = e.length > 0 ? e : w(r);
|
|
778
754
|
this.blockStates[t].recommendationProducts = [
|
|
779
755
|
...n.slice(0, r),
|
|
780
|
-
...
|
|
756
|
+
...w(Math.max(0, r - n.length))
|
|
781
757
|
];
|
|
782
758
|
}
|
|
783
759
|
}
|
|
784
760
|
});
|
|
785
761
|
export {
|
|
786
|
-
|
|
762
|
+
ft as useRecommendationExtensionStore
|
|
787
763
|
};
|
|
@@ -1,37 +1,32 @@
|
|
|
1
|
-
import { ModificationDescription as
|
|
2
|
-
import { RECOMMENDATION_ID_ATTR as
|
|
3
|
-
import { isPartnerManagedBlock as
|
|
4
|
-
import { RecommendationConfigService as
|
|
5
|
-
let
|
|
6
|
-
function
|
|
7
|
-
|
|
1
|
+
import { ModificationDescription as g } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RECOMMENDATION_ID_ATTR as s } from "../constants/selectors.js";
|
|
3
|
+
import { isPartnerManagedBlock as p, updateProductContentInPlace as C, regenerateProductRowsWithStyles as N } from "../controls/main/utils.js";
|
|
4
|
+
import { RecommendationConfigService as m } from "../services/configService.js";
|
|
5
|
+
let o = null;
|
|
6
|
+
function D(n) {
|
|
7
|
+
o = n;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
function P(n, o, i, u) {
|
|
14
|
-
const c = e == null ? void 0 : e.getDocumentRootHtmlNode();
|
|
15
|
-
if (!e || !c || !("querySelector" in c))
|
|
9
|
+
function P(n, r, c, l) {
|
|
10
|
+
const i = o == null ? void 0 : o.getDocumentRootHtmlNode();
|
|
11
|
+
if (!o || !i || !("querySelector" in i))
|
|
16
12
|
return !1;
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
13
|
+
const e = i.querySelector(`[${s}="${n}"]`);
|
|
14
|
+
if (!e)
|
|
19
15
|
return !1;
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
return
|
|
16
|
+
const t = o.getDocumentModifier(), a = m.getConfig(e), d = Object.keys(r).some((u) => JSON.stringify(a[u]) !== JSON.stringify(r[u]));
|
|
17
|
+
if (m.stageConfig(t, e, r), p(e))
|
|
18
|
+
return t.apply(new g(l)), !0;
|
|
23
19
|
let f = !1;
|
|
24
|
-
return
|
|
25
|
-
currentNode:
|
|
26
|
-
documentModifier:
|
|
27
|
-
products:
|
|
20
|
+
return C({
|
|
21
|
+
currentNode: e,
|
|
22
|
+
documentModifier: t,
|
|
23
|
+
products: c,
|
|
28
24
|
onApplied: () => {
|
|
29
25
|
f = !0;
|
|
30
26
|
}
|
|
31
|
-
}) || (f =
|
|
27
|
+
}) || (f = N({ currentNode: e, documentModifier: t, products: c })), !f && d && t.apply(new g(l)), !0;
|
|
32
28
|
}
|
|
33
29
|
export {
|
|
34
30
|
P as commitBlockChangeOutsidePanel,
|
|
35
|
-
|
|
36
|
-
O as registerNodeConfigWriter
|
|
31
|
+
D as registerNodeConfigWriter
|
|
37
32
|
};
|
|
@@ -10,7 +10,9 @@ const i = [
|
|
|
10
10
|
"iboodde",
|
|
11
11
|
"iboodfr",
|
|
12
12
|
"iboodnl",
|
|
13
|
-
"iboodpl"
|
|
13
|
+
"iboodpl",
|
|
14
|
+
"marionnaudaustria",
|
|
15
|
+
"marionnaudfrance"
|
|
14
16
|
], r = ["interencheres", "interencherespreprod"], d = ["lodenfrey", "lodenfreyuat"], c = "manualMerchandising";
|
|
15
17
|
function s(e, n) {
|
|
16
18
|
const o = {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ATTR_CUSTOM_PREFIX as f } from "../constants/selectors.js";
|
|
2
|
+
function o(t) {
|
|
3
|
+
if (typeof t == "string")
|
|
4
|
+
return t.trim() !== "";
|
|
5
|
+
if (t && typeof t == "object" && "strategyId" in t) {
|
|
6
|
+
const { strategyId: r } = t;
|
|
7
|
+
return (typeof r == "string" || typeof r == "number") && String(r).trim() !== "";
|
|
8
|
+
}
|
|
9
|
+
return !1;
|
|
10
|
+
}
|
|
11
|
+
function u({ config: t, blockId: r, partnerName: e, campaignUrls: n, rrsEnabled: i }) {
|
|
12
|
+
return e ? t.partnerName ? t.partnerName !== e : !i || !t.strategyId || !n ? !1 : !o(n[String(r)]) : !1;
|
|
13
|
+
}
|
|
14
|
+
function a({ config: t, campaignUrls: r, rrsEnabled: e }) {
|
|
15
|
+
return !t.strategyId || e && !!r;
|
|
16
|
+
}
|
|
17
|
+
function g(t) {
|
|
18
|
+
return t.filter((r) => !r.startsWith(f));
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
a as canJudgeUnstampedBlock,
|
|
22
|
+
u as carriesForeignPartnerConfig,
|
|
23
|
+
o as isDefinedCampaignUrl,
|
|
24
|
+
g as withoutCustomAttributes
|
|
25
|
+
};
|
|
@@ -1,63 +1,24 @@
|
|
|
1
|
-
import { useRecommendationExtensionStore as
|
|
2
|
-
import { commitBlockChangeOutsidePanel as
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
strategyId: e.strategyId,
|
|
7
|
-
language: e.language,
|
|
8
|
-
size: e.size,
|
|
9
|
-
productIds: [...e.productIds],
|
|
10
|
-
filters: structuredClone(e.filters),
|
|
11
|
-
shuffleProducts: e.shuffleProducts,
|
|
12
|
-
currencyCode: e.currency.code,
|
|
13
|
-
currencySymbol: e.currency.symbol,
|
|
14
|
-
currencyAlignment: e.currency.alignment,
|
|
15
|
-
currencyDecimalCount: e.currency.decimalCount,
|
|
16
|
-
currencyDecimalSeparator: e.currency.decimalSeparator,
|
|
17
|
-
currencyThousandSeparator: e.currency.thousandSeparator
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function f(e, n) {
|
|
21
|
-
const o = JSON.stringify(i(n));
|
|
22
|
-
return l(e).find((r) => JSON.stringify(i(r)) !== o) ?? n;
|
|
23
|
-
}
|
|
24
|
-
async function C(e, n, o) {
|
|
25
|
-
const r = m(), c = [e, n];
|
|
26
|
-
(/* @__PURE__ */ new Map([[e, f(e, o)], [n, o]])).forEach((t, s) => {
|
|
27
|
-
var a;
|
|
28
|
-
t.strategyId && ((a = r.blockStates[s]) == null ? void 0 : a.recommendationConfigs.strategyId) !== t.strategyId && r.seedBlockUrlConfig(s, i(t));
|
|
29
|
-
}), r.resetArrivedBlock(n), await Promise.all(c.map(async (t) => {
|
|
30
|
-
if (!await r.refreshStrategyBlock(t))
|
|
31
|
-
return;
|
|
32
|
-
const { recommendationConfigs: s, recommendationProducts: a } = r.blockStates[t];
|
|
33
|
-
d(
|
|
34
|
-
t,
|
|
35
|
-
{ size: s.size },
|
|
36
|
-
a,
|
|
37
|
-
"Refresh duplicated recommendation strategy"
|
|
38
|
-
);
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
async function S(e, n) {
|
|
42
|
-
const o = m(), r = o.blockStates[e];
|
|
43
|
-
if (!r)
|
|
1
|
+
import { useRecommendationExtensionStore as d } from "../store/recommendation.js";
|
|
2
|
+
import { commitBlockChangeOutsidePanel as f } from "./nodeConfigWriter.js";
|
|
3
|
+
async function h(e, r) {
|
|
4
|
+
const t = d(), o = t.blockStates[e];
|
|
5
|
+
if (!o)
|
|
44
6
|
return !1;
|
|
45
|
-
const { strategyId:
|
|
46
|
-
if (
|
|
7
|
+
const { strategyId: a, strategy: c, size: i, nodeConfigVersion: s } = o.recommendationConfigs;
|
|
8
|
+
if (t.currentRecommendationId === e)
|
|
47
9
|
try {
|
|
48
|
-
await
|
|
49
|
-
} catch (
|
|
50
|
-
console.error("[recommendation] product refetch after a strategy change failed",
|
|
10
|
+
await t.fetchRecommendationProducts();
|
|
11
|
+
} catch (m) {
|
|
12
|
+
console.error("[recommendation] product refetch after a strategy change failed", m);
|
|
51
13
|
}
|
|
52
|
-
const
|
|
14
|
+
const n = f(
|
|
53
15
|
e,
|
|
54
|
-
{ strategyId:
|
|
55
|
-
|
|
56
|
-
|
|
16
|
+
{ strategyId: a, strategy: c, size: i, configVersion: s },
|
|
17
|
+
o.recommendationProducts,
|
|
18
|
+
r
|
|
57
19
|
);
|
|
58
|
-
return
|
|
20
|
+
return n || console.error("[recommendation] strategy change did not reach a node", { blockId: e }), n;
|
|
59
21
|
}
|
|
60
22
|
export {
|
|
61
|
-
|
|
62
|
-
C as refreshDuplicatedStrategyBlocks
|
|
23
|
+
h as commitStrategyChange
|
|
63
24
|
};
|
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-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-
|
|
1
|
+
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.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-c404d230]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-c404d230]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-c404d230]{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}
|
|
@@ -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
|
/**
|
|
@@ -701,6 +709,14 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
701
709
|
* mount. Non-numbers still fail, like every other field in this schema.
|
|
702
710
|
*/
|
|
703
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>;
|
|
704
720
|
/** Migration-only inputs (legacy block configs) */
|
|
705
721
|
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
706
722
|
/**
|
|
@@ -0,0 +1,2 @@
|
|
|
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<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
id: string;
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
state?: 'default' | 'primary' | 'warning' | 'danger';
|
|
6
7
|
size?: 'X-small' | 'small' | 'medium' | 'large';
|
|
7
8
|
footerButtonOptions?: FooterButtonGroup;
|
|
8
9
|
closeButtonStatus?: boolean;
|
|
@@ -15,6 +16,7 @@ type __VLS_Slots = {} & {
|
|
|
15
16
|
};
|
|
16
17
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
17
18
|
description: string;
|
|
19
|
+
state: string;
|
|
18
20
|
size: string;
|
|
19
21
|
footerButtonOptions: undefined;
|
|
20
22
|
closeButtonStatus: boolean;
|
|
@@ -26,6 +28,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
26
28
|
"secondary-action": () => void;
|
|
27
29
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
28
30
|
description: string;
|
|
31
|
+
state: string;
|
|
29
32
|
size: string;
|
|
30
33
|
footerButtonOptions: undefined;
|
|
31
34
|
closeButtonStatus: boolean;
|
|
@@ -34,9 +37,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
34
37
|
}>>>, {
|
|
35
38
|
size: "X-small" | "small" | "medium" | "large";
|
|
36
39
|
description: string;
|
|
37
|
-
|
|
40
|
+
state: "default" | "primary" | "warning" | "danger";
|
|
38
41
|
footerButtonOptions: FooterButtonGroup;
|
|
39
42
|
closeButtonStatus: boolean;
|
|
43
|
+
closeOnOutsideClick: boolean;
|
|
40
44
|
footerStatus: boolean;
|
|
41
45
|
}>;
|
|
42
46
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|