@useinsider/guido 3.18.1-beta.d82285c → 3.18.1-beta.db1e41e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +1 -1
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +25 -27
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +21 -20
- package/dist/composables/useCustomInterfaceAppearance.js +56 -48
- package/dist/composables/useStripo.js +30 -30
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +57 -52
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +81 -62
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +46 -31
- package/dist/guido.css +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +27 -2
- package/dist/static/styles/components/recommendation-strategy.css.js +23 -8
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getRecommendationFeedSourceMaps as k, strategyEditPath as G, URLS as D, getOperatorOptions as _, PriceAttributes as L } from "../../../../enums/extensions/recommendationBlock.js";
|
|
2
2
|
import { useRecommendationApi as E } from "../../../../services/recommendationApi.js";
|
|
3
|
-
import { useConfigStore as
|
|
3
|
+
import { useConfigStore as F } from "../../../../stores/config.js";
|
|
4
4
|
import { defineStore as N } from "pinia";
|
|
5
5
|
import "../constants/selectors.js";
|
|
6
6
|
import { DEFAULT_MOBILE_CARDS_IN_ROW as U, DEFAULT_CARDS_IN_ROW as A } from "../constants/layout.js";
|
|
@@ -14,8 +14,8 @@ import { getInvalidFields as z, isConfigValid as V } from "../validation/require
|
|
|
14
14
|
const d = E();
|
|
15
15
|
let h = null, g = null, S = null, p = null, y = 0;
|
|
16
16
|
const b = /* @__PURE__ */ new Map();
|
|
17
|
-
let
|
|
18
|
-
function
|
|
17
|
+
let l = null;
|
|
18
|
+
function P() {
|
|
19
19
|
return {
|
|
20
20
|
cardsInRow: A,
|
|
21
21
|
currencySettings: {
|
|
@@ -41,7 +41,7 @@ function F() {
|
|
|
41
41
|
// that default is what reached buildCampaignUrl and baked a most-popular feed URL
|
|
42
42
|
// for a block the user never configured (SD-149916). Legacy blocks still get their real
|
|
43
43
|
// algorithm from the node-config sync or the save-time seed.
|
|
44
|
-
strategy:
|
|
44
|
+
strategy: F().isFeatureEnabled("reusableRecommendationStrategy") ? "" : "mostPopular",
|
|
45
45
|
strategyId: "",
|
|
46
46
|
textTrimming: !0,
|
|
47
47
|
unresponsive: !1,
|
|
@@ -53,7 +53,7 @@ function F() {
|
|
|
53
53
|
}
|
|
54
54
|
function w() {
|
|
55
55
|
return {
|
|
56
|
-
recommendationConfigs:
|
|
56
|
+
recommendationConfigs: P(),
|
|
57
57
|
recommendationProducts: [],
|
|
58
58
|
filterStatus: !1,
|
|
59
59
|
filterSelectionDrawerStatus: !1,
|
|
@@ -74,8 +74,10 @@ const j = () => ({
|
|
|
74
74
|
strategiesLoading: !1,
|
|
75
75
|
strategyUrlTemplates: {},
|
|
76
76
|
strategiesFetched: !1,
|
|
77
|
+
strategiesSettled: !1,
|
|
77
78
|
blockStates: {},
|
|
78
79
|
currentRecommendationId: null,
|
|
80
|
+
strategyPanelOpen: !1,
|
|
79
81
|
configVersion: 0
|
|
80
82
|
}), nt = N("guidoRecommendationExtension", {
|
|
81
83
|
state: () => j(),
|
|
@@ -88,7 +90,7 @@ const j = () => ({
|
|
|
88
90
|
* This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
|
|
89
91
|
*/
|
|
90
92
|
recommendationConfigs(t) {
|
|
91
|
-
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs :
|
|
93
|
+
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs : P();
|
|
92
94
|
},
|
|
93
95
|
/**
|
|
94
96
|
* Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
|
|
@@ -351,28 +353,33 @@ const j = () => ({
|
|
|
351
353
|
this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId] || (this.blockStates[this.currentRecommendationId].removeStrategyModalStatus = !1);
|
|
352
354
|
},
|
|
353
355
|
async fetchStrategies() {
|
|
354
|
-
|
|
356
|
+
for (; p; )
|
|
357
|
+
try {
|
|
358
|
+
await p;
|
|
359
|
+
} catch {
|
|
360
|
+
}
|
|
361
|
+
if (this.strategiesFetched)
|
|
355
362
|
return;
|
|
356
|
-
const t = y
|
|
357
|
-
p = (async () => {
|
|
363
|
+
const t = y, e = (async () => {
|
|
358
364
|
this.strategiesLoading = !0;
|
|
359
365
|
try {
|
|
360
|
-
const
|
|
366
|
+
const r = await d.fetchRecommendationStrategies();
|
|
361
367
|
if (t !== y)
|
|
362
368
|
return;
|
|
363
|
-
this.strategies =
|
|
369
|
+
this.strategies = r, this.strategiesFetched = !0;
|
|
364
370
|
} finally {
|
|
365
|
-
this.strategiesLoading = !1;
|
|
371
|
+
this.strategiesLoading = !1, t === y && (this.strategiesSettled = !0);
|
|
366
372
|
}
|
|
367
373
|
})();
|
|
374
|
+
p = e;
|
|
368
375
|
try {
|
|
369
|
-
await
|
|
376
|
+
await e;
|
|
370
377
|
} finally {
|
|
371
378
|
p = null;
|
|
372
379
|
}
|
|
373
380
|
},
|
|
374
381
|
invalidateStrategies() {
|
|
375
|
-
this.strategiesFetched = !1, y += 1;
|
|
382
|
+
this.strategiesFetched = !1, this.strategiesSettled = !1, y += 1;
|
|
376
383
|
},
|
|
377
384
|
/**
|
|
378
385
|
* Opens a Smart Recommender strategy page in a new tab and refreshes the list every time
|
|
@@ -381,20 +388,24 @@ const j = () => ({
|
|
|
381
388
|
*
|
|
382
389
|
* Deliberately NOT one-shot: the strategy tab stays open, so a user can create a second
|
|
383
390
|
* strategy in it and come back again — a listener that disarmed on the first return would
|
|
384
|
-
* leave that one missing from the list.
|
|
385
|
-
*
|
|
391
|
+
* leave that one missing from the list. It disarms on the first return AFTER that tab is
|
|
392
|
+
* closed instead, so an ordinary alt-tab later in the session costs nothing. Armed only
|
|
393
|
+
* once the user actually opens a strategy page, so anyone who never does pays nothing.
|
|
386
394
|
*/
|
|
387
395
|
_armStrategyPageReturn(t) {
|
|
388
|
-
window.open(t, "_blank"
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
396
|
+
const e = window.open(t, "_blank");
|
|
397
|
+
if (!e)
|
|
398
|
+
return;
|
|
399
|
+
e.opener = null, l == null || l();
|
|
400
|
+
let r = !1;
|
|
401
|
+
const n = () => {
|
|
402
|
+
document.hidden || r || (e != null && e.closed && (l == null || l()), r = !0, this.invalidateStrategies(), this.fetchStrategies().then(() => this._refreshAssignedStrategyProducts()).catch(() => {
|
|
392
403
|
}).finally(() => {
|
|
393
|
-
|
|
404
|
+
r = !1;
|
|
394
405
|
}));
|
|
395
406
|
};
|
|
396
|
-
document.addEventListener("visibilitychange",
|
|
397
|
-
document.removeEventListener("visibilitychange",
|
|
407
|
+
document.addEventListener("visibilitychange", n), window.addEventListener("focus", n), l = () => {
|
|
408
|
+
document.removeEventListener("visibilitychange", n), window.removeEventListener("focus", n), l = null;
|
|
398
409
|
};
|
|
399
410
|
},
|
|
400
411
|
/**
|
|
@@ -411,7 +422,7 @@ const j = () => ({
|
|
|
411
422
|
},
|
|
412
423
|
/** Lets the editor tear the return listeners down when it unmounts. */
|
|
413
424
|
disposeStrategyPageReturn() {
|
|
414
|
-
|
|
425
|
+
l == null || l();
|
|
415
426
|
},
|
|
416
427
|
/**
|
|
417
428
|
* Opens Smart Recommender's strategy creation page. Every return refreshes the list so the
|
|
@@ -444,7 +455,11 @@ const j = () => ({
|
|
|
444
455
|
});
|
|
445
456
|
},
|
|
446
457
|
removeStrategy() {
|
|
447
|
-
this.patchCurrentBlockConfig({
|
|
458
|
+
this.patchCurrentBlockConfig({
|
|
459
|
+
strategyId: "",
|
|
460
|
+
strategy: "",
|
|
461
|
+
size: x.size
|
|
462
|
+
});
|
|
448
463
|
},
|
|
449
464
|
// ====================================================================
|
|
450
465
|
// Shared Data Fetching (fetched once, used by all blocks)
|
|
@@ -590,7 +605,7 @@ const j = () => ({
|
|
|
590
605
|
},
|
|
591
606
|
async _doFetchProducts() {
|
|
592
607
|
var f;
|
|
593
|
-
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n =
|
|
608
|
+
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = F();
|
|
594
609
|
if (r.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy")) {
|
|
595
610
|
await this._doFetchStrategyProducts(t);
|
|
596
611
|
return;
|
|
@@ -612,13 +627,13 @@ const j = () => ({
|
|
|
612
627
|
a,
|
|
613
628
|
M(n.partnerName, r.strategy)
|
|
614
629
|
);
|
|
615
|
-
let
|
|
630
|
+
let u;
|
|
616
631
|
try {
|
|
617
|
-
|
|
632
|
+
u = await d.fetchRecommendationProducts(c, a);
|
|
618
633
|
} catch {
|
|
619
|
-
|
|
634
|
+
u = [];
|
|
620
635
|
}
|
|
621
|
-
this._setBlockProducts(t,
|
|
636
|
+
this._setBlockProducts(t, u, s);
|
|
622
637
|
},
|
|
623
638
|
async _doFetchStrategyProducts(t) {
|
|
624
639
|
const e = (b.get(t) ?? 0) + 1;
|
|
@@ -632,7 +647,7 @@ const j = () => ({
|
|
|
632
647
|
);
|
|
633
648
|
if (i) {
|
|
634
649
|
s = parseInt(String(i.size ?? "")) || s;
|
|
635
|
-
const o = r.currencySettings.value, a = (await this.resolveStrategyUrlTemplate(i, o)).replaceAll("{locale}", r.language).replaceAll("{currency}", o),
|
|
650
|
+
const o = r.currencySettings.value, a = (await this.resolveStrategyUrlTemplate(i, o)).replaceAll("{locale}", r.language).replaceAll("{currency}", o), u = a.indexOf("?"), f = u === -1 ? a : a.slice(0, u), m = (u === -1 ? "" : a.slice(u + 1)).split("&").filter((R) => R && !R.startsWith("user_id=")), I = m.length ? `${f}?${m.join("&")}` : f;
|
|
636
651
|
I && (n = await d.fetchRecommendationProductsByUrl(I));
|
|
637
652
|
}
|
|
638
653
|
} catch {
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-1ca6baf0]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-cc5ee925]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-cc5ee925]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-cc5ee925]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-
|
|
1
|
+
@charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-1ca6baf0]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-cc5ee925]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-cc5ee925]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-cc5ee925]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-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-b447f626]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-b447f626] .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}
|
|
@@ -66,6 +66,8 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
66
66
|
* edits are never clobbered (SD-141049).
|
|
67
67
|
*/
|
|
68
68
|
private _syncNodeConfigIfChanged;
|
|
69
|
+
/** Whether the deferred write would move the node's strategyId — see the caller (SD-149916). */
|
|
70
|
+
private _isPendingStrategyIdChange;
|
|
69
71
|
private _capturePendingNodeConfigWrite;
|
|
70
72
|
/**
|
|
71
73
|
* Accumulates the pending write into `documentModifier` without applying, so the
|
|
@@ -10,6 +10,14 @@ export declare class StrategyControl extends CommonControl {
|
|
|
10
10
|
getTemplate(): string;
|
|
11
11
|
private _strategyAction;
|
|
12
12
|
onRender(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the document itself says this block has no strategy.
|
|
15
|
+
*
|
|
16
|
+
* Read the node, not the store: when the main control cannot resolve the block id off the
|
|
17
|
+
* node it never syncs the persisted config, so the store still holds defaults (empty
|
|
18
|
+
* strategyId) for an assigned block.
|
|
19
|
+
*/
|
|
20
|
+
private _isNodeUnassigned;
|
|
13
21
|
onDestroy(): void;
|
|
14
22
|
private _teardown;
|
|
15
23
|
private _setupButtonListeners;
|
|
@@ -72,8 +72,10 @@ interface StoreState {
|
|
|
72
72
|
strategiesLoading: boolean;
|
|
73
73
|
strategyUrlTemplates: Record<string, string>;
|
|
74
74
|
strategiesFetched: boolean;
|
|
75
|
+
strategiesSettled: boolean;
|
|
75
76
|
blockStates: Record<number, PerBlockState>;
|
|
76
77
|
currentRecommendationId: number | null;
|
|
78
|
+
strategyPanelOpen: boolean;
|
|
77
79
|
configVersion: number;
|
|
78
80
|
}
|
|
79
81
|
export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"guidoRecommendationExtension", StoreState, {
|
|
@@ -101,8 +103,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
101
103
|
strategiesLoading: boolean;
|
|
102
104
|
strategyUrlTemplates: Record<string, string>;
|
|
103
105
|
strategiesFetched: boolean;
|
|
106
|
+
strategiesSettled: boolean;
|
|
104
107
|
blockStates: Record<number, PerBlockState>;
|
|
105
108
|
currentRecommendationId: number | null;
|
|
109
|
+
strategyPanelOpen: boolean;
|
|
106
110
|
configVersion: number;
|
|
107
111
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): PerBlockConfigs;
|
|
108
112
|
/**
|
|
@@ -128,8 +132,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
128
132
|
strategiesLoading: boolean;
|
|
129
133
|
strategyUrlTemplates: Record<string, string>;
|
|
130
134
|
strategiesFetched: boolean;
|
|
135
|
+
strategiesSettled: boolean;
|
|
131
136
|
blockStates: Record<number, PerBlockState>;
|
|
132
137
|
currentRecommendationId: number | null;
|
|
138
|
+
strategyPanelOpen: boolean;
|
|
133
139
|
configVersion: number;
|
|
134
140
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): RecommendationProduct[];
|
|
135
141
|
/**
|
|
@@ -155,8 +161,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
155
161
|
strategiesLoading: boolean;
|
|
156
162
|
strategyUrlTemplates: Record<string, string>;
|
|
157
163
|
strategiesFetched: boolean;
|
|
164
|
+
strategiesSettled: boolean;
|
|
158
165
|
blockStates: Record<number, PerBlockState>;
|
|
159
166
|
currentRecommendationId: number | null;
|
|
167
|
+
strategyPanelOpen: boolean;
|
|
160
168
|
configVersion: number;
|
|
161
169
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
162
170
|
assignStrategyDrawerStatus(state: {
|
|
@@ -179,8 +187,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
179
187
|
strategiesLoading: boolean;
|
|
180
188
|
strategyUrlTemplates: Record<string, string>;
|
|
181
189
|
strategiesFetched: boolean;
|
|
190
|
+
strategiesSettled: boolean;
|
|
182
191
|
blockStates: Record<number, PerBlockState>;
|
|
183
192
|
currentRecommendationId: number | null;
|
|
193
|
+
strategyPanelOpen: boolean;
|
|
184
194
|
configVersion: number;
|
|
185
195
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
186
196
|
removeStrategyModalStatus(state: {
|
|
@@ -203,8 +213,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
203
213
|
strategiesLoading: boolean;
|
|
204
214
|
strategyUrlTemplates: Record<string, string>;
|
|
205
215
|
strategiesFetched: boolean;
|
|
216
|
+
strategiesSettled: boolean;
|
|
206
217
|
blockStates: Record<number, PerBlockState>;
|
|
207
218
|
currentRecommendationId: number | null;
|
|
219
|
+
strategyPanelOpen: boolean;
|
|
208
220
|
configVersion: number;
|
|
209
221
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
210
222
|
assignedStrategy(state: {
|
|
@@ -227,8 +239,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
227
239
|
strategiesLoading: boolean;
|
|
228
240
|
strategyUrlTemplates: Record<string, string>;
|
|
229
241
|
strategiesFetched: boolean;
|
|
242
|
+
strategiesSettled: boolean;
|
|
230
243
|
blockStates: Record<number, PerBlockState>;
|
|
231
244
|
currentRecommendationId: number | null;
|
|
245
|
+
strategyPanelOpen: boolean;
|
|
232
246
|
configVersion: number;
|
|
233
247
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): RrsStrategy | null;
|
|
234
248
|
/**
|
|
@@ -254,8 +268,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
254
268
|
strategiesLoading: boolean;
|
|
255
269
|
strategyUrlTemplates: Record<string, string>;
|
|
256
270
|
strategiesFetched: boolean;
|
|
271
|
+
strategiesSettled: boolean;
|
|
257
272
|
blockStates: Record<number, PerBlockState>;
|
|
258
273
|
currentRecommendationId: number | null;
|
|
274
|
+
strategyPanelOpen: boolean;
|
|
259
275
|
configVersion: number;
|
|
260
276
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
261
277
|
/**
|
|
@@ -281,8 +297,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
281
297
|
strategiesLoading: boolean;
|
|
282
298
|
strategyUrlTemplates: Record<string, string>;
|
|
283
299
|
strategiesFetched: boolean;
|
|
300
|
+
strategiesSettled: boolean;
|
|
284
301
|
blockStates: Record<number, PerBlockState>;
|
|
285
302
|
currentRecommendationId: number | null;
|
|
303
|
+
strategyPanelOpen: boolean;
|
|
286
304
|
configVersion: number;
|
|
287
305
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): number;
|
|
288
306
|
hasFilters(): boolean;
|
|
@@ -309,8 +327,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
309
327
|
strategiesLoading: boolean;
|
|
310
328
|
strategyUrlTemplates: Record<string, string>;
|
|
311
329
|
strategiesFetched: boolean;
|
|
330
|
+
strategiesSettled: boolean;
|
|
312
331
|
blockStates: Record<number, PerBlockState>;
|
|
313
332
|
currentRecommendationId: number | null;
|
|
333
|
+
strategyPanelOpen: boolean;
|
|
314
334
|
configVersion: number;
|
|
315
335
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
316
336
|
text: string;
|
|
@@ -336,8 +356,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
336
356
|
strategiesLoading: boolean;
|
|
337
357
|
strategyUrlTemplates: Record<string, string>;
|
|
338
358
|
strategiesFetched: boolean;
|
|
359
|
+
strategiesSettled: boolean;
|
|
339
360
|
blockStates: Record<number, PerBlockState>;
|
|
340
361
|
currentRecommendationId: number | null;
|
|
362
|
+
strategyPanelOpen: boolean;
|
|
341
363
|
configVersion: number;
|
|
342
364
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
343
365
|
text: string;
|
|
@@ -363,8 +385,10 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
363
385
|
strategiesLoading: boolean;
|
|
364
386
|
strategyUrlTemplates: Record<string, string>;
|
|
365
387
|
strategiesFetched: boolean;
|
|
388
|
+
strategiesSettled: boolean;
|
|
366
389
|
blockStates: Record<number, PerBlockState>;
|
|
367
390
|
currentRecommendationId: number | null;
|
|
391
|
+
strategyPanelOpen: boolean;
|
|
368
392
|
configVersion: number;
|
|
369
393
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
370
394
|
text: string;
|
|
@@ -453,8 +477,9 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
453
477
|
*
|
|
454
478
|
* Deliberately NOT one-shot: the strategy tab stays open, so a user can create a second
|
|
455
479
|
* strategy in it and come back again — a listener that disarmed on the first return would
|
|
456
|
-
* leave that one missing from the list.
|
|
457
|
-
*
|
|
480
|
+
* leave that one missing from the list. It disarms on the first return AFTER that tab is
|
|
481
|
+
* closed instead, so an ordinary alt-tab later in the session costs nothing. Armed only
|
|
482
|
+
* once the user actually opens a strategy page, so anyone who never does pays nothing.
|
|
458
483
|
*/
|
|
459
484
|
_armStrategyPageReturn(url: string): void;
|
|
460
485
|
/**
|
|
@@ -85,24 +85,39 @@ const n = `.strategy-control-header {
|
|
|
85
85
|
to { background-position-x: -200%; }
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
/* Each skeleton mirrors the footprint of the element it stands in for, so retiring
|
|
89
|
+
the loading state does not shift the panel. */
|
|
90
|
+
.guido-skeleton--strategy-title {
|
|
91
|
+
width: 366px;
|
|
92
|
+
height: 38px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.guido-skeleton--strategy-description {
|
|
96
|
+
width: 366px;
|
|
97
|
+
height: 48px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.guido-skeleton--strategy-cta {
|
|
101
|
+
width: 175px;
|
|
102
|
+
height: 40px;
|
|
91
103
|
}
|
|
92
104
|
|
|
93
|
-
.guido-skeleton--strategy-
|
|
94
|
-
width:
|
|
95
|
-
height:
|
|
105
|
+
.guido-skeleton--strategy-name {
|
|
106
|
+
width: 398px;
|
|
107
|
+
height: 48px;
|
|
96
108
|
}
|
|
97
109
|
|
|
98
|
-
.
|
|
99
|
-
|
|
110
|
+
.strategy-control-skeleton-row {
|
|
111
|
+
display: flex;
|
|
112
|
+
gap: 16px;
|
|
113
|
+
padding: 0 16px 16px;
|
|
100
114
|
}
|
|
101
115
|
|
|
102
116
|
[data-strategy-loading-state] .guido-skeleton {
|
|
103
117
|
display: block;
|
|
104
118
|
}
|
|
105
119
|
|
|
120
|
+
|
|
106
121
|
.strategy-control-actions {
|
|
107
122
|
display: flex;
|
|
108
123
|
align-items: center;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.18.1-beta.
|
|
3
|
+
"version": "3.18.1-beta.db1e41e",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|