@useinsider/guido 3.17.0-beta.6255bfc → 3.17.0-beta.668ca65
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 +0 -5
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +76 -73
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -10
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +75 -36
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.js +19 -0
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue2.js +62 -0
- package/dist/composables/useRecommendation.js +29 -30
- package/dist/config/migrator/recommendation/settingsMapper.js +0 -2
- package/dist/config/migrator/recommendationMigrator.js +0 -1
- package/dist/enums/date.js +5 -4
- package/dist/enums/extensions/recommendationBlock.js +0 -1
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +0 -2
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +27 -45
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -18
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +111 -166
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +11 -17
- package/dist/src/@types/config/schemas.d.ts +0 -10
- package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.d.ts +15 -0
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/enums/date.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +1 -7
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -14
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -56
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -5
- package/dist/src/mock/api/recommendation-strategies.d.ts +0 -61
- package/dist/src/services/recommendationApi.d.ts +1 -1
- package/dist/src/stores/save-as-template.d.ts +4 -3
- package/dist/static/assets/icons/line-delete.svg.js +2 -2
- package/dist/static/assets/icons/line-plus.svg.js +2 -2
- package/dist/static/styles/components/recommendation-strategy.css.js +2 -35
- package/dist/utils/dateUtil.js +18 -24
- package/dist/utils/templatePreparation.js +0 -2
- package/package.json +2 -2
- package/dist/src/utils/strategyInfoBox.d.ts +0 -22
- package/dist/utils/strategyInfoBox.js +0 -37
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const L = () => ({
|
|
1
|
+
import { getRecommendationFeedSourceMaps as y, URLS as I } from "../enums/extensions/recommendationBlock.js";
|
|
2
|
+
import { MinDeviceViewport as C, DefaultPadding as R } from "../enums/recommendation.js";
|
|
3
|
+
import { useRecommendationExtensionStore as l } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
4
|
+
import { generateCompleteFilterQuery as b } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
|
|
5
|
+
import { getPartnerRecommendationParams as h } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
|
|
6
|
+
import { sanitizeProductIds as x } from "../extensions/Blocks/Recommendation/utils/productIds.js";
|
|
7
|
+
import { useConfigStore as P } from "../stores/config.js";
|
|
8
|
+
const B = () => ({
|
|
10
9
|
calculateCardWidth: ({
|
|
11
10
|
mobileLeftPadding: i,
|
|
12
11
|
mobileRightPadding: c,
|
|
13
12
|
cardsInRow: s,
|
|
14
|
-
unresponsive:
|
|
13
|
+
unresponsive: n
|
|
15
14
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
return (
|
|
15
|
+
const o = n ? s : 1, e = i + c + (o - 1) * R;
|
|
16
|
+
return (C - e) / o;
|
|
18
17
|
},
|
|
19
18
|
getRecommendationCampaignData: (i) => {
|
|
20
|
-
const c =
|
|
21
|
-
if (!
|
|
19
|
+
const c = l(), s = Number(i), n = c.blockStates[s];
|
|
20
|
+
if (!n)
|
|
22
21
|
return {
|
|
23
22
|
textTrimming: !1,
|
|
24
23
|
orientation: "vertical",
|
|
@@ -31,14 +30,14 @@ const L = () => ({
|
|
|
31
30
|
discountBeforeTextValue: "",
|
|
32
31
|
discountAfterTextValue: ""
|
|
33
32
|
};
|
|
34
|
-
const { recommendationConfigs:
|
|
33
|
+
const { recommendationConfigs: o } = n, e = o.orientation === "grid" ? "vertical" : "horizontal";
|
|
35
34
|
return {
|
|
36
|
-
textTrimming:
|
|
37
|
-
orientation:
|
|
35
|
+
textTrimming: o.textTrimming,
|
|
36
|
+
orientation: e,
|
|
38
37
|
mobileLeftPadding: 0,
|
|
39
38
|
mobileRightPadding: 0,
|
|
40
|
-
cardsInRow:
|
|
41
|
-
unresponsive:
|
|
39
|
+
cardsInRow: o.cardsInRow,
|
|
40
|
+
unresponsive: o.unresponsive,
|
|
42
41
|
priceBeforeTextValue: "",
|
|
43
42
|
priceAfterTextValue: "",
|
|
44
43
|
discountBeforeTextValue: "",
|
|
@@ -46,13 +45,13 @@ const L = () => ({
|
|
|
46
45
|
};
|
|
47
46
|
},
|
|
48
47
|
buildCampaignUrl: (i, c) => {
|
|
49
|
-
var
|
|
50
|
-
const s =
|
|
48
|
+
var m;
|
|
49
|
+
const s = l(), n = P(), o = Number(i);
|
|
51
50
|
let e;
|
|
52
51
|
if (c)
|
|
53
52
|
e = c;
|
|
54
53
|
else {
|
|
55
|
-
const a = s.blockStates[
|
|
54
|
+
const a = s.blockStates[o];
|
|
56
55
|
if (!a)
|
|
57
56
|
return "";
|
|
58
57
|
const { recommendationConfigs: r } = a;
|
|
@@ -67,20 +66,20 @@ const L = () => ({
|
|
|
67
66
|
shuffleProducts: r.shuffleProducts
|
|
68
67
|
};
|
|
69
68
|
}
|
|
70
|
-
if (n("reusableRecommendationStrategy")
|
|
69
|
+
if (e.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy"))
|
|
71
70
|
return s.recommendationCampaignUrls[i] = {
|
|
72
71
|
strategyId: e.strategyId,
|
|
73
72
|
locale: e.language,
|
|
74
73
|
currency: e.currencyCode
|
|
75
74
|
}, "";
|
|
76
|
-
const g = ((
|
|
77
|
-
t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName",
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
return s.recommendationCampaignUrls[i] =
|
|
75
|
+
const g = ((m = y().find((a) => a.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
|
|
76
|
+
t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", n.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", n.variationId), e.strategy === "manualMerchandising" ? t.set("productId", x(e.productIds)) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
|
|
77
|
+
const f = e.filters.filter((a) => a.isValid), d = b(f);
|
|
78
|
+
d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(h(n.partnerName, e.strategy)).forEach(([a, r]) => t.set(a, r));
|
|
79
|
+
const p = decodeURIComponent(t.toString()), u = `${I.RECOMMENDATION_API_URL}/v2/${g}?${p}`;
|
|
80
|
+
return s.recommendationCampaignUrls[i] = u, u;
|
|
82
81
|
}
|
|
83
82
|
});
|
|
84
83
|
export {
|
|
85
|
-
|
|
84
|
+
B as useRecommendation
|
|
86
85
|
};
|
|
@@ -66,8 +66,6 @@ function O(t, o, n) {
|
|
|
66
66
|
// gated). New Guido blocks default differently (see DEFAULT_NODE_CONFIG).
|
|
67
67
|
priceMovedToNextLine: !!t.isPriceMovedToNextLine,
|
|
68
68
|
priceHideIfSameAsDiscounted: !!t.isPriceDeletedForZeroSale,
|
|
69
|
-
// Legacy blocks stay on the pre-RRS era marker: the campaign they belong
|
|
70
|
-
// to keeps the old settings panel until its own migration ships.
|
|
71
69
|
configVersion: s
|
|
72
70
|
};
|
|
73
71
|
}
|
|
@@ -22,7 +22,6 @@ function B(i, t, a) {
|
|
|
22
22
|
currencySettings: v(t)
|
|
23
23
|
}, c = T(n, r, o), e = b((d = r.composition) == null ? void 0 : d.variables), l = C(t), g = M(t), p = {
|
|
24
24
|
...c,
|
|
25
|
-
// Legacy blocks predate RRS — never strategy-backed.
|
|
26
25
|
strategyId: "",
|
|
27
26
|
composition: e.composition,
|
|
28
27
|
visibility: e.visibility,
|
package/dist/enums/date.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
const t = "tr-TR",
|
|
1
|
+
const T = "tr-TR", t = "tr-TR", E = "default", L = "UTC";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
L as DEFAULT_TZ
|
|
3
|
+
E as DEFAULT,
|
|
4
|
+
T as DEFAULT_LOCALE,
|
|
5
|
+
L as DEFAULT_TZ,
|
|
6
|
+
t as DOTTED_DATE_LOCALE
|
|
6
7
|
};
|
|
@@ -4,7 +4,6 @@ const l = {
|
|
|
4
4
|
// Relative path → same-origin as the embedding inone dashboard.
|
|
5
5
|
PRODUCT_ATTRIBUTES_PATH: "/product-attributes/get-attributes",
|
|
6
6
|
RECOMMENDATION_STRATEGIES_PATH: "/api/recommendation-strategies",
|
|
7
|
-
// Panel route of the Recommendation Strategies listing.
|
|
8
7
|
RECOMMENDATION_STRATEGIES_PANEL_PATH: "/discovery/recommendation-strategies"
|
|
9
8
|
}, c = {
|
|
10
9
|
CLIENT_ID: "clientId"
|
|
@@ -64,8 +64,6 @@ const C = 1, l = 2, a = {
|
|
|
64
64
|
// of "false" (the actual hiding happens server-side at send).
|
|
65
65
|
priceHideIfSameAsDiscounted: !1,
|
|
66
66
|
// Meta
|
|
67
|
-
// Pre-RRS fallback only — block.ts stamps the era of the live session over
|
|
68
|
-
// it on creation. See PRE_RRS_CONFIG_VERSION.
|
|
69
67
|
configVersion: C,
|
|
70
68
|
recommendationId: 0
|
|
71
69
|
}, u = [11, 12];
|
|
@@ -10,9 +10,9 @@ import { AlgorithmControl as I } from "./algorithm.js";
|
|
|
10
10
|
import { ALGORITHM_CONTROL_ID as it } from "./algorithm.js";
|
|
11
11
|
import { CurrencyControl as R } from "./currency.js";
|
|
12
12
|
import { CURRENCY_CONTROL_ID as at } from "./currency.js";
|
|
13
|
-
import { FiltersControl as
|
|
13
|
+
import { FiltersControl as b } from "./filters.js";
|
|
14
14
|
import { FILTERS_CONTROL_ID as lt } from "./filters.js";
|
|
15
|
-
import { LayoutOrientationControl as
|
|
15
|
+
import { LayoutOrientationControl as T } from "./layoutOrientation.js";
|
|
16
16
|
import { LAYOUT_ORIENTATION_CONTROL_ID as dt } from "./layoutOrientation.js";
|
|
17
17
|
import { LocaleControl as S } from "./locale.js";
|
|
18
18
|
import { LOCALE_CONTROL_ID as ht } from "./locale.js";
|
|
@@ -25,11 +25,11 @@ import { PRODUCT_LAYOUT_CONTROL_ID as _t } from "./productLayout.js";
|
|
|
25
25
|
import { ShuffleControl as k } from "./shuffle.js";
|
|
26
26
|
import { SHUFFLE_CONTROL_ID as It } from "./shuffle.js";
|
|
27
27
|
import { StrategyControl as E } from "./strategy.js";
|
|
28
|
-
import { STRATEGY_CONTROL_ID as
|
|
29
|
-
import { setCurrencyAttributes as D, getBlockElement as
|
|
28
|
+
import { STRATEGY_CONTROL_ID as bt } from "./strategy.js";
|
|
29
|
+
import { setCurrencyAttributes as D, getBlockElement as B, isPartnerManagedBlock as w, updateProductContentInPlace as A, regenerateProductRowsWithStyles as v } from "./utils.js";
|
|
30
30
|
import { adjustProductsToSize as St, formatProductPrice as Ot, getCardComposition as Pt, getCurrentLayout as Lt, regenerateMobileProductRows as kt, updatePricesInPlace as Et, updateSingleProductContent as Dt } from "./utils.js";
|
|
31
31
|
import { useDebounceFn as h } from "../../../../../node_modules/@vueuse/shared/index.js";
|
|
32
|
-
const
|
|
32
|
+
const x = "recommendation-id", F = "ui-elements-recommendation-block";
|
|
33
33
|
class ot extends y {
|
|
34
34
|
constructor() {
|
|
35
35
|
super(...arguments);
|
|
@@ -48,6 +48,7 @@ class ot extends y {
|
|
|
48
48
|
n(this, "pricePlacementControl", null);
|
|
49
49
|
n(this, "layoutOrientationControl", null);
|
|
50
50
|
n(this, "strategyControl", null);
|
|
51
|
+
n(this, "rrsEnabled", !1);
|
|
51
52
|
/**
|
|
52
53
|
* Debounced product fetch to prevent rapid API calls during config changes
|
|
53
54
|
*/
|
|
@@ -67,14 +68,14 @@ class ot extends y {
|
|
|
67
68
|
*/
|
|
68
69
|
n(this, "_debouncedRegenerateWithProducts", h(() => {
|
|
69
70
|
const t = this.store.recommendationProducts;
|
|
70
|
-
if (!this.currentNode || !this.api ||
|
|
71
|
+
if (!this.currentNode || !this.api || w(this.currentNode))
|
|
71
72
|
return;
|
|
72
73
|
const e = this.api.getDocumentModifier();
|
|
73
|
-
|
|
74
|
+
A({
|
|
74
75
|
currentNode: this.currentNode,
|
|
75
76
|
documentModifier: e,
|
|
76
77
|
products: t
|
|
77
|
-
}) ||
|
|
78
|
+
}) || v({
|
|
78
79
|
currentNode: this.currentNode,
|
|
79
80
|
documentModifier: e,
|
|
80
81
|
products: t
|
|
@@ -82,9 +83,8 @@ class ot extends y {
|
|
|
82
83
|
}, 100));
|
|
83
84
|
}
|
|
84
85
|
getId() {
|
|
85
|
-
return
|
|
86
|
+
return F;
|
|
86
87
|
}
|
|
87
|
-
/** Every sub-control the coordinator owns, in panel order. */
|
|
88
88
|
get _subControls() {
|
|
89
89
|
return [
|
|
90
90
|
this.layoutOrientationControl,
|
|
@@ -100,27 +100,15 @@ class ot extends y {
|
|
|
100
100
|
];
|
|
101
101
|
}
|
|
102
102
|
getTemplate() {
|
|
103
|
-
|
|
104
|
-
return this._subControls.forEach((e) => {
|
|
103
|
+
var t;
|
|
104
|
+
return this.rrsEnabled = p().isFeatureEnabled("reusableRecommendationStrategy"), this._subControls.forEach((e) => {
|
|
105
105
|
var o;
|
|
106
106
|
return (o = e == null ? void 0 : e.onDestroy) == null ? void 0 : o.call(e);
|
|
107
|
-
}), this.algorithmControl = new I(), this.localeControl = new S(), this.currencyControl = new R(), this.productCountControl = new P(), this.productLayoutControl = new L(), this.filtersControl = new
|
|
107
|
+
}), this.algorithmControl = new I(), this.localeControl = new S(), this.currencyControl = new R(), this.productCountControl = new P(), this.productLayoutControl = new L(), this.filtersControl = new b(), this.shuffleControl = new k(), this.pricePlacementControl = new O(), this.layoutOrientationControl = new T(), this.strategyControl = this.rrsEnabled ? new E() : null, this._subControls.forEach((e) => {
|
|
108
108
|
e && (e.api = this.api);
|
|
109
|
-
}),
|
|
110
|
-
<div class="recommendation-controls-container">
|
|
111
|
-
${this.strategyControl.getTemplate()}
|
|
112
|
-
${this.layoutOrientationControl.getTemplate()}
|
|
113
|
-
${this.productCountControl.getTemplate()}
|
|
114
|
-
${this.productLayoutControl.getTemplate()}
|
|
115
|
-
${this.algorithmControl.getTemplate()}
|
|
116
|
-
${this.localeControl.getTemplate()}
|
|
117
|
-
${this.pricePlacementControl.getTemplate()}
|
|
118
|
-
${this.currencyControl.getTemplate()}
|
|
119
|
-
${this.filtersControl.getTemplate()}
|
|
120
|
-
${this.shuffleControl.getTemplate()}
|
|
121
|
-
</div>
|
|
122
|
-
` : `
|
|
109
|
+
}), `
|
|
123
110
|
<div class="recommendation-controls-container">
|
|
111
|
+
${((t = this.strategyControl) == null ? void 0 : t.getTemplate()) ?? ""}
|
|
124
112
|
${this.layoutOrientationControl.getTemplate()}
|
|
125
113
|
${this.productCountControl.getTemplate()}
|
|
126
114
|
${this.productLayoutControl.getTemplate()}
|
|
@@ -133,17 +121,12 @@ class ot extends y {
|
|
|
133
121
|
</div>
|
|
134
122
|
`;
|
|
135
123
|
}
|
|
136
|
-
/**
|
|
137
|
-
* Shows the selected block's own set of controls. A block is strategy-backed
|
|
138
|
-
* when a flag-on session stamped its config version, or when it already
|
|
139
|
-
* carries a strategy — an assignment must stay editable however it arrived.
|
|
140
|
-
*/
|
|
141
124
|
_showControlsForBlock(t) {
|
|
142
125
|
var i;
|
|
143
126
|
const e = (i = this.getContainer()) == null ? void 0 : i.querySelector(".recommendation-controls-container");
|
|
144
|
-
if (!e
|
|
127
|
+
if (!e)
|
|
145
128
|
return;
|
|
146
|
-
const o = m.getConfig(t), r = (o.configVersion ?? 0) >= _
|
|
129
|
+
const o = this._getRecommendationIdFromNode(t) === null ? null : m.getConfig(t), r = this.rrsEnabled && !!o && (!!(o != null && o.strategyId) || ((o == null ? void 0 : o.configVersion) ?? 0) >= _);
|
|
147
130
|
e.classList.toggle("strategy-block", r);
|
|
148
131
|
}
|
|
149
132
|
async onRender() {
|
|
@@ -185,7 +168,6 @@ class ot extends y {
|
|
|
185
168
|
/**
|
|
186
169
|
* Syncs persisted node config into the Pinia store's block state.
|
|
187
170
|
*
|
|
188
|
-
* setCurrentBlock() creates a default entry (USD, en_US, mostPopular).
|
|
189
171
|
* For saved templates, the real config lives in the node (e.g., TRY, tr_TR).
|
|
190
172
|
* This method reads it and patches the store so fetchRecommendationProducts()
|
|
191
173
|
* uses the correct values.
|
|
@@ -312,10 +294,10 @@ class ot extends y {
|
|
|
312
294
|
* Reads the recommendation-id attribute from the block element within the node
|
|
313
295
|
*/
|
|
314
296
|
_getRecommendationIdFromNode(t) {
|
|
315
|
-
const e =
|
|
297
|
+
const e = B(t);
|
|
316
298
|
if (!e || !("getAttribute" in e))
|
|
317
299
|
return null;
|
|
318
|
-
const o = e.getAttribute(
|
|
300
|
+
const o = e.getAttribute(x);
|
|
319
301
|
if (!o)
|
|
320
302
|
return null;
|
|
321
303
|
const r = parseInt(o);
|
|
@@ -370,14 +352,14 @@ class ot extends y {
|
|
|
370
352
|
export {
|
|
371
353
|
it as ALGORITHM_CONTROL_ID,
|
|
372
354
|
I as AlgorithmControl,
|
|
373
|
-
|
|
355
|
+
F as CONTROL_BLOCK_ID,
|
|
374
356
|
at as CURRENCY_CONTROL_ID,
|
|
375
357
|
R as CurrencyControl,
|
|
376
358
|
lt as FILTERS_CONTROL_ID,
|
|
377
|
-
|
|
359
|
+
b as FiltersControl,
|
|
378
360
|
dt as LAYOUT_ORIENTATION_CONTROL_ID,
|
|
379
361
|
ht as LOCALE_CONTROL_ID,
|
|
380
|
-
|
|
362
|
+
T as LayoutOrientationControl,
|
|
381
363
|
S as LocaleControl,
|
|
382
364
|
Ct as PRICE_PLACEMENT_CONTROL_ID,
|
|
383
365
|
pt as PRODUCT_COUNT_CONTROL_ID,
|
|
@@ -387,19 +369,19 @@ export {
|
|
|
387
369
|
L as ProductLayoutControl,
|
|
388
370
|
ot as RecommendationBlockControl,
|
|
389
371
|
It as SHUFFLE_CONTROL_ID,
|
|
390
|
-
|
|
372
|
+
bt as STRATEGY_CONTROL_ID,
|
|
391
373
|
k as ShuffleControl,
|
|
392
374
|
E as StrategyControl,
|
|
393
375
|
St as adjustProductsToSize,
|
|
394
376
|
Ot as formatProductPrice,
|
|
395
|
-
|
|
377
|
+
B as getBlockElement,
|
|
396
378
|
Pt as getCardComposition,
|
|
397
379
|
Lt as getCurrentLayout,
|
|
398
|
-
|
|
380
|
+
w as isPartnerManagedBlock,
|
|
399
381
|
kt as regenerateMobileProductRows,
|
|
400
|
-
|
|
382
|
+
v as regenerateProductRowsWithStyles,
|
|
401
383
|
D as setCurrencyAttributes,
|
|
402
384
|
Et as updatePricesInPlace,
|
|
403
|
-
|
|
385
|
+
A as updateProductContentInPlace,
|
|
404
386
|
Dt as updateSingleProductContent
|
|
405
387
|
};
|
|
@@ -12,8 +12,6 @@ class f extends h {
|
|
|
12
12
|
o(this, "storeUnsubscription", () => {
|
|
13
13
|
});
|
|
14
14
|
o(this, "listeners", []);
|
|
15
|
-
// The store subscription fires on EVERY mutation of a store six controls
|
|
16
|
-
// share, so the last painted state is kept to skip the DOM work.
|
|
17
15
|
o(this, "lastPaintedState", null);
|
|
18
16
|
}
|
|
19
17
|
getId() {
|
|
@@ -46,8 +44,6 @@ class f extends h {
|
|
|
46
44
|
id: "guido__btn-assign-strategy",
|
|
47
45
|
className: "strategy-control-cta on"
|
|
48
46
|
}),
|
|
49
|
-
// Create round-trip ships with SD-149916; until then the CTA
|
|
50
|
-
// stays inert at full contrast, as the design draws it.
|
|
51
47
|
this._GuButton({
|
|
52
48
|
name: "createStrategy",
|
|
53
49
|
label: this.api.translate("Create New Strategy"),
|
|
@@ -77,15 +73,6 @@ class f extends h {
|
|
|
77
73
|
</div>
|
|
78
74
|
`;
|
|
79
75
|
}
|
|
80
|
-
/**
|
|
81
|
-
* Change / Remove are icon+text actions in the design, not buttons — and
|
|
82
|
-
* `ue-button` cannot pair a caption with an arbitrary icon, so these are
|
|
83
|
-
* plain elements. Click wiring is by id, which works on any element.
|
|
84
|
-
*
|
|
85
|
-
* The icon is a CSS mask, not inline SVG: Stripo re-creates the control's
|
|
86
|
-
* markup through Angular, which rebuilds `<svg>` outside the SVG namespace
|
|
87
|
-
* (the view-box attribute comes back lowercased) and it never paints.
|
|
88
|
-
*/
|
|
89
76
|
_strategyAction({ id: t, label: e, modifier: a }) {
|
|
90
77
|
return `
|
|
91
78
|
<button
|
|
@@ -119,11 +106,6 @@ class f extends h {
|
|
|
119
106
|
};
|
|
120
107
|
e("#guido__btn-assign-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-change-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-remove-strategy", () => this.store.removeStrategy());
|
|
121
108
|
}
|
|
122
|
-
/**
|
|
123
|
-
* Toggles empty vs assigned state from the store's current block config.
|
|
124
|
-
* Display name comes from the listing; falls back to the raw id while the
|
|
125
|
-
* listing loads (or when the strategy is no longer listed).
|
|
126
|
-
*/
|
|
127
109
|
_renderState() {
|
|
128
110
|
var l;
|
|
129
111
|
const { strategyId: t } = this.store.recommendationConfigs, e = t ? ((l = this.store.assignedStrategy) == null ? void 0 : l.name) ?? "" : "", a = `${t}\0${e}`;
|