@useinsider/guido 2.1.0-beta.e13d291 → 2.1.0-beta.e2153c2
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/README.md +36 -0
- package/dist/@types/config/schemas.js +70 -65
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +69 -58
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +15 -14
- package/dist/components/organisms/header/HeaderWrapper.vue.js +9 -9
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
- package/dist/composables/useActionsApi.js +15 -13
- package/dist/composables/useBlocksConfig.js +26 -16
- package/dist/composables/useHtmlValidator.js +114 -104
- package/dist/composables/useRecommendation.js +54 -21
- package/dist/composables/useStripo.js +25 -23
- package/dist/composables/useVersionHistoryApi.js +1 -1
- package/dist/config/compiler/recommendationCompilerRules.js +45 -39
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +121 -0
- package/dist/config/i18n/en/index.js +11 -0
- package/dist/config/i18n/en/labels.json.js +7 -0
- package/dist/config/i18n/en/toasters.json.js +56 -0
- package/dist/config/i18n/en/tooltips.json.js +82 -0
- package/dist/config/i18n/index.js +7 -0
- package/dist/config/migrator/itemsBlockMigrator.js +142 -120
- package/dist/enums/defaults.js +8 -4
- package/dist/enums/extensions/recommendationBlock.js +1 -1
- package/dist/enums/recommendation.js +16 -15
- package/dist/extensions/Blocks/Items/block.js +19 -28
- package/dist/extensions/Blocks/Items/controls/button/link.js +19 -31
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +124 -85
- package/dist/extensions/Blocks/Items/controls/image/link.js +19 -31
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +28 -40
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +35 -47
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +49 -54
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +42 -51
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +23 -36
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +45 -57
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +42 -60
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +189 -196
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +0 -2
- package/dist/extensions/Blocks/Items/extension.js +8 -9
- package/dist/extensions/Blocks/Items/settingsPanel.js +10 -15
- package/dist/extensions/Blocks/Items/template.js +181 -175
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +65 -65
- package/dist/extensions/Blocks/Recommendation/block.js +117 -27
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +33 -31
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +6 -4
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +12 -10
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +10 -14
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +19 -27
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +49 -44
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +1 -3
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +147 -102
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +1 -5
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +85 -43
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +9 -13
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +138 -117
- package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +66 -34
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +2 -2
- package/dist/extensions/Blocks/Recommendation/services/configService.js +2 -1
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +248 -206
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +26 -31
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +31 -34
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +20 -25
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +22 -22
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +52 -39
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +10 -10
- package/dist/extensions/Blocks/Unsubscribe/block.js +29 -29
- package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
- package/dist/extensions/Blocks/common-control.js +91 -92
- package/dist/extensions/ModulesTabIcons/extension.js +17 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +257 -187
- package/dist/package.json.js +1 -1
- package/dist/services/recommendationApi.js +11 -9
- package/dist/services/stripoApi.js +20 -17
- package/dist/services/templateLibraryApi.js +16 -13
- package/dist/src/@types/config/schemas.d.ts +8 -0
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useRecommendation.d.ts +1 -0
- package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +17 -0
- package/dist/src/config/i18n/en/index.d.ts +1 -0
- package/dist/src/config/i18n/index.d.ts +16 -0
- package/dist/src/enums/defaults.d.ts +4 -0
- package/dist/src/extensions/Blocks/Items/block.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +5 -5
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/name/trimming.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/currencyLocation.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/currencySymbol.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/formattedPrice.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/hideDiscount.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +0 -5
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +10 -12
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +2 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +44 -11
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +2 -2
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +8 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +27 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +22 -4
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +9 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +19 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +2 -2
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +138 -469
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +2 -2
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +2 -2
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +2 -2
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +16 -4
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +14 -2
- package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +1 -1
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +4 -5
- package/dist/src/extensions/ModulesTabIcons/extension.d.ts +2 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/dist/static/styles/components/notification.css.js +19 -0
- package/dist/static/styles/components/tools.css.js +6 -2
- package/dist/static/styles/components/version-history.css.js +10 -2
- package/dist/static/styles/components/wide-panel.css.js +18 -2
- package/dist/static/styles/customEditorStyle.css.js +10 -9
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/static/templates/empty/index.html.js +74 -0
- package/dist/static/templates/empty/style.css.js +779 -0
- package/dist/stores/unsubscribe.js +37 -34
- package/dist/utils/pairProductVariables.js +57 -56
- package/dist/utils/templatePreparation.js +15 -14
- package/package.json +2 -2
- package/dist/extensions/Blocks/Items/store/items-block.js +0 -79
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +0 -45
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
|
@@ -1,45 +1,60 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var c = (i, o, t) => o in i ? _(i, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[o] = t;
|
|
3
|
+
var d = (i, o, t) => c(i, typeof o != "symbol" ? o + "" : o, t);
|
|
4
|
+
import { EditorStatePropertyType as u, PreviewDeviceMode as R } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
+
import { CommonControl as h } from "../../../common-control.js";
|
|
6
|
+
import { MAX_PRODUCT_COUNT as C, MAX_PRODUCTS_PER_ROW as p, MAX_MOBILE_PRODUCTS_PER_ROW as m } from "../../constants/layout.js";
|
|
6
7
|
import { RecommendationConfigService as s } from "../../services/configService.js";
|
|
7
|
-
import { useRecommendationExtensionStore as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
8
|
+
import { useRecommendationExtensionStore as l } from "../../store/recommendation.js";
|
|
9
|
+
import { ensureMobileCssRulesExist as O } from "../mobileLayout/cssRules.js";
|
|
10
|
+
import { getCurrentLayout as I, regenerateMobileProductRows as g, regenerateProductRowsWithStyles as b } from "./utils.js";
|
|
11
|
+
import { useDebounceFn as N } from "../../../../../node_modules/@vueuse/shared/index.js";
|
|
12
|
+
const P = "recommendation-product-layout-control", e = {
|
|
11
13
|
PRODUCT_COUNT: "size",
|
|
12
14
|
PRODUCT_IN_ROW: "cardsInRow",
|
|
13
|
-
PRODUCT_IN_ROW_LABEL: "cardsInRowLabel"
|
|
15
|
+
PRODUCT_IN_ROW_LABEL: "cardsInRowLabel",
|
|
16
|
+
MOBILE_CARDS_IN_ROW: "mobileCardsInRow",
|
|
17
|
+
MOBILE_CARDS_IN_ROW_LABEL: "mobileCardsInRowLabel"
|
|
14
18
|
};
|
|
15
|
-
class
|
|
19
|
+
class S extends h {
|
|
16
20
|
constructor() {
|
|
17
21
|
super(...arguments);
|
|
18
22
|
// Store is used for backward compatibility with product fetching and regeneration
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
d(this, "store", l());
|
|
24
|
+
d(this, "storeUnsubscription", () => {
|
|
21
25
|
});
|
|
22
|
-
|
|
26
|
+
d(this, "_debouncedRegenerateProductRows", N(() => {
|
|
23
27
|
this._regenerateProductRows();
|
|
24
28
|
}, 500));
|
|
25
29
|
}
|
|
26
30
|
getId() {
|
|
27
|
-
return
|
|
31
|
+
return P;
|
|
28
32
|
}
|
|
29
33
|
getTemplate() {
|
|
30
34
|
return `
|
|
31
35
|
<div class="product-layout-control-container">
|
|
32
36
|
${this._GuTwoColumns([
|
|
33
37
|
this._GuLabel({ text: "Number of Products" }),
|
|
34
|
-
this._GuCounter({ name:
|
|
35
|
-
this._GuLabel({
|
|
36
|
-
|
|
38
|
+
this._GuCounter({ name: e.PRODUCT_COUNT, maxValue: C }),
|
|
39
|
+
this._GuLabel({
|
|
40
|
+
text: "Products in One Row on Desktop",
|
|
41
|
+
name: e.PRODUCT_IN_ROW_LABEL
|
|
42
|
+
}),
|
|
43
|
+
this._GuCounter({ name: e.PRODUCT_IN_ROW, maxValue: p }),
|
|
44
|
+
this._GuLabel({
|
|
45
|
+
text: "Products in One Row on Mobile",
|
|
46
|
+
name: e.MOBILE_CARDS_IN_ROW_LABEL
|
|
47
|
+
}),
|
|
48
|
+
this._GuCounter({
|
|
49
|
+
name: e.MOBILE_CARDS_IN_ROW,
|
|
50
|
+
maxValue: m
|
|
51
|
+
})
|
|
37
52
|
])}
|
|
38
53
|
</div>
|
|
39
54
|
`;
|
|
40
55
|
}
|
|
41
56
|
onRender() {
|
|
42
|
-
this._setFormValues(), this._updateProductsInRowVisibility(), this._listenToFormUpdates(), this._listenStateUpdates();
|
|
57
|
+
this._setFormValues(), this._updateProductsInRowVisibility(), this._listenToFormUpdates(), this._listenStateUpdates(), this._subscribeToEditorModeChanges();
|
|
43
58
|
}
|
|
44
59
|
onTemplateNodeUpdated(t) {
|
|
45
60
|
super.onTemplateNodeUpdated(t), this._setFormValues(), this._updateProductsInRowVisibility();
|
|
@@ -50,18 +65,40 @@ class I extends c {
|
|
|
50
65
|
_setFormValues() {
|
|
51
66
|
const t = s.getConfig(this.currentNode);
|
|
52
67
|
this.api.updateValues({
|
|
53
|
-
[
|
|
54
|
-
[
|
|
68
|
+
[e.PRODUCT_COUNT]: t.size,
|
|
69
|
+
[e.PRODUCT_IN_ROW]: t.cardsInRow,
|
|
70
|
+
[e.MOBILE_CARDS_IN_ROW]: t.mobileCardsInRow
|
|
55
71
|
});
|
|
56
72
|
}
|
|
57
73
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
|
|
74
|
+
* Checks if the editor is currently in mobile preview mode
|
|
75
|
+
* using Stripo's EditorStatePropertyType API.
|
|
76
|
+
*/
|
|
77
|
+
_isMobileMode() {
|
|
78
|
+
return this.api.getEditorState()[u.previewDeviceMode] === R.MOBILE;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Updates counter visibility based on layout orientation and editor mode.
|
|
82
|
+
* - List layout: hide both counters (products always full-width)
|
|
83
|
+
* - Grid + desktop mode: show desktop counter, hide mobile counter
|
|
84
|
+
* - Grid + mobile mode: show mobile counter, hide desktop counter
|
|
61
85
|
*/
|
|
62
86
|
_updateProductsInRowVisibility() {
|
|
63
|
-
const
|
|
64
|
-
this.api.setVisibility(
|
|
87
|
+
const r = (s.getConfig(this.currentNode).layout || I(this.currentNode)) === "grid", n = this._isMobileMode();
|
|
88
|
+
this.api.setVisibility(e.PRODUCT_IN_ROW, r && !n), this.api.setVisibility(e.PRODUCT_IN_ROW_LABEL, r && !n), this.api.setVisibility(e.MOBILE_CARDS_IN_ROW, r && n), this.api.setVisibility(e.MOBILE_CARDS_IN_ROW_LABEL, r && n);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Subscribes to editor preview mode changes via Stripo API.
|
|
92
|
+
* When the user switches between desktop/mobile preview, toggles
|
|
93
|
+
* which "Products in One Row" counter is visible.
|
|
94
|
+
*/
|
|
95
|
+
_subscribeToEditorModeChanges() {
|
|
96
|
+
this.api.onEditorStatePropUpdated(
|
|
97
|
+
u.previewDeviceMode,
|
|
98
|
+
() => {
|
|
99
|
+
this._updateProductsInRowVisibility();
|
|
100
|
+
}
|
|
101
|
+
);
|
|
65
102
|
}
|
|
66
103
|
_onProductCountChange(t) {
|
|
67
104
|
this.currentNode && (s.updateConfig(
|
|
@@ -69,11 +106,7 @@ class I extends c {
|
|
|
69
106
|
this.currentNode,
|
|
70
107
|
{ size: t },
|
|
71
108
|
`Changed product count to ${t}`
|
|
72
|
-
), this.store
|
|
73
|
-
recommendationConfigs: {
|
|
74
|
-
size: t
|
|
75
|
-
}
|
|
76
|
-
}), this._debouncedRegenerateProductRows());
|
|
109
|
+
), this.store.patchCurrentBlockConfig({ size: t }), this._debouncedRegenerateProductRows());
|
|
77
110
|
}
|
|
78
111
|
_onProductsInRowChange(t) {
|
|
79
112
|
this.currentNode && (s.updateConfig(
|
|
@@ -81,23 +114,32 @@ class I extends c {
|
|
|
81
114
|
this.currentNode,
|
|
82
115
|
{ cardsInRow: t },
|
|
83
116
|
`Changed products per row to ${t}`
|
|
84
|
-
), this.store
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
117
|
+
), this.store.patchCurrentBlockConfig({ cardsInRow: t }), this._debouncedRegenerateProductRows());
|
|
118
|
+
}
|
|
119
|
+
_onMobileCardsInRowChange(t) {
|
|
120
|
+
this.currentNode && (s.updateConfig(
|
|
121
|
+
this.api,
|
|
122
|
+
this.currentNode,
|
|
123
|
+
{ mobileCardsInRow: t },
|
|
124
|
+
`Changed mobile products per row to ${t}`
|
|
125
|
+
), O(this.api), g({
|
|
126
|
+
currentNode: this.currentNode,
|
|
127
|
+
documentModifier: this.api.getDocumentModifier()
|
|
128
|
+
}));
|
|
89
129
|
}
|
|
90
130
|
_regenerateProductRows() {
|
|
91
|
-
|
|
131
|
+
b({
|
|
92
132
|
currentNode: this.currentNode,
|
|
93
133
|
documentModifier: this.api.getDocumentModifier()
|
|
94
134
|
});
|
|
95
135
|
}
|
|
96
136
|
_listenToFormUpdates() {
|
|
97
|
-
this.api.onValueChanged(
|
|
137
|
+
this.api.onValueChanged(e.PRODUCT_COUNT, (t) => {
|
|
98
138
|
this._onProductCountChange(t.toString());
|
|
99
|
-
}), this.api.onValueChanged(
|
|
139
|
+
}), this.api.onValueChanged(e.PRODUCT_IN_ROW, (t) => {
|
|
100
140
|
this._onProductsInRowChange(Number(t));
|
|
141
|
+
}), this.api.onValueChanged(e.MOBILE_CARDS_IN_ROW, (t) => {
|
|
142
|
+
this._onMobileCardsInRowChange(Number(t));
|
|
101
143
|
});
|
|
102
144
|
}
|
|
103
145
|
/**
|
|
@@ -107,12 +149,12 @@ class I extends c {
|
|
|
107
149
|
_listenStateUpdates() {
|
|
108
150
|
let t = this.store.recommendationConfigs.orientation;
|
|
109
151
|
this.storeUnsubscription = this.store.$subscribe(() => {
|
|
110
|
-
const
|
|
111
|
-
|
|
152
|
+
const a = this.store.recommendationConfigs.orientation;
|
|
153
|
+
a !== t && (t = a, this._updateProductsInRowVisibility());
|
|
112
154
|
});
|
|
113
155
|
}
|
|
114
156
|
}
|
|
115
157
|
export {
|
|
116
|
-
|
|
117
|
-
|
|
158
|
+
P as PRODUCT_LAYOUT_CONTROL_ID,
|
|
159
|
+
S as ProductLayoutControl
|
|
118
160
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
var r = Object.defineProperty;
|
|
2
2
|
var u = (o, t, e) => t in o ? r(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
3
|
var n = (o, t, e) => u(o, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { UEAttr as
|
|
5
|
-
import { CommonControl as
|
|
4
|
+
import { UEAttr as l } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
+
import { CommonControl as f } from "../../../common-control.js";
|
|
6
6
|
import { RecommendationConfigService as i } from "../../services/configService.js";
|
|
7
7
|
import { useRecommendationExtensionStore as d } from "../../store/recommendation.js";
|
|
8
|
-
const
|
|
8
|
+
const h = "recommendation-shuffle-control", s = {
|
|
9
9
|
SHUFFLE_PRODUCTS: "shuffleProducts"
|
|
10
10
|
};
|
|
11
|
-
class
|
|
11
|
+
class g extends f {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
14
|
// Store is used for backward compatibility with product fetching
|
|
15
15
|
n(this, "store", d());
|
|
16
16
|
}
|
|
17
17
|
getId() {
|
|
18
|
-
return
|
|
18
|
+
return h;
|
|
19
19
|
}
|
|
20
20
|
getTemplate() {
|
|
21
21
|
return `
|
|
@@ -43,7 +43,7 @@ class C extends l {
|
|
|
43
43
|
const e = i.getConfig(this.currentNode);
|
|
44
44
|
this.api.setUIEAttribute(
|
|
45
45
|
s.SHUFFLE_PRODUCTS,
|
|
46
|
-
|
|
46
|
+
l.SELECTPICKER.items,
|
|
47
47
|
e.shuffleProducts
|
|
48
48
|
);
|
|
49
49
|
}
|
|
@@ -53,11 +53,7 @@ class C extends l {
|
|
|
53
53
|
this.currentNode,
|
|
54
54
|
{ shuffleProducts: e },
|
|
55
55
|
`${e ? "Enabled" : "Disabled"} product shuffle`
|
|
56
|
-
), this.store
|
|
57
|
-
recommendationConfigs: {
|
|
58
|
-
shuffleProducts: e
|
|
59
|
-
}
|
|
60
|
-
}));
|
|
56
|
+
), this.store.patchCurrentBlockConfig({ shuffleProducts: e }));
|
|
61
57
|
}
|
|
62
58
|
_listenToFormUpdates() {
|
|
63
59
|
this.api.onValueChanged(s.SHUFFLE_PRODUCTS, (e) => {
|
|
@@ -66,6 +62,6 @@ class C extends l {
|
|
|
66
62
|
}
|
|
67
63
|
}
|
|
68
64
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
h as SHUFFLE_CONTROL_ID,
|
|
66
|
+
g as ShuffleControl
|
|
71
67
|
};
|