@useinsider/guido 3.0.0-beta.a72fd61 → 3.0.0-beta.ae0075e
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/Guido.vue.js +1 -1
- package/dist/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/EditorActions.vue2.js +6 -6
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +1 -1
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +2 -2
- package/dist/config/compiler/unsubscribeCompilerRules.js +14 -14
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +29 -18
- package/dist/extensions/Blocks/Recommendation/block.js +3 -0
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +15 -12
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +693 -144
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +78 -0
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +27 -24
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +134 -126
- package/dist/extensions/Blocks/Recommendation/extension.js +18 -16
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +126 -2
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +124 -106
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +8 -7
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +63 -34
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +30 -33
- package/dist/extensions/Blocks/Recommendation/templates/index.js +8 -8
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +28 -13
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +25 -44
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +62 -38
- package/dist/guido.css +1 -1
- package/dist/src/components/Guido.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +2 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +8 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +134 -44
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +105 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +10 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +37 -2
- package/dist/static/styles/base.css.js +7 -2
- package/dist/static/styles/variables.css.js +3 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ const n = `/* Utils */
|
|
|
3
3
|
|
|
4
4
|
/* Recommendation Controls - Main settings panel separators */
|
|
5
5
|
.recommendation-controls-container > div {
|
|
6
|
-
border-bottom: 1px solid #
|
|
6
|
+
border-bottom: 1px solid #eee;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.recommendation-controls-container > div:first-child {
|
|
@@ -18,11 +18,135 @@ const n = `/* Utils */
|
|
|
18
18
|
padding: 0
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
/* Hide drag icon for list layout (ordering disabled) */
|
|
21
|
+
/* Hide drag icon for list layout (ordering disabled) — legacy UE-ORDERABLE */
|
|
22
22
|
ue-orderable.orderable-disabled .droppable-icon {
|
|
23
23
|
display: none;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
/* =============================================
|
|
27
|
+
Custom Orderable List (replaces UE-ORDERABLE)
|
|
28
|
+
============================================= */
|
|
29
|
+
|
|
30
|
+
/* Card Composition Description */
|
|
31
|
+
.card-composition-description {
|
|
32
|
+
font-size: 13px;
|
|
33
|
+
color: var(--guido-color-gray-800);
|
|
34
|
+
margin: 0;
|
|
35
|
+
line-height: 1.4;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Add Attribute button */
|
|
39
|
+
#guido__btn-add-attribute {
|
|
40
|
+
margin: 16px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#guido__btn-add-attribute .button {
|
|
44
|
+
background: var(--guido-color-primary-100);
|
|
45
|
+
color: var(--guido-color-primary-500);
|
|
46
|
+
border: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#guido__btn-add-attribute .button:not(.disabled):hover {
|
|
50
|
+
background: var(--guido-color-primary-0);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
#guido__btn-add-attribute .button.disabled {
|
|
54
|
+
background: var(--guido-color-gray-100);
|
|
55
|
+
color: var(--guido-color-gray-500);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Custom attribute select wrapper (inside orderable item) */
|
|
59
|
+
.custom-attr-select-wrap {
|
|
60
|
+
flex: 1;
|
|
61
|
+
min-width: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.custom-attr-select-wrap ue-select {
|
|
65
|
+
width: 270px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Orderable List */
|
|
69
|
+
.orderable-list {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.orderable-item {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: 4px;
|
|
78
|
+
padding: 16px;
|
|
79
|
+
min-height: 72px;
|
|
80
|
+
background: var(--guido-color-white);
|
|
81
|
+
border-top: 1px solid #eee;
|
|
82
|
+
cursor: default;
|
|
83
|
+
transition: background 0.15s;
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.orderable-item:first-child {
|
|
88
|
+
border-top: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.orderable-item:hover {
|
|
92
|
+
background: #fafafa;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.orderable-item.dragging {
|
|
96
|
+
opacity: 0.5;
|
|
97
|
+
background: var(--guido-color-gray-1);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.orderable-item.drag-over {
|
|
101
|
+
border-top: 2px solid var(--guido-color-primary-500, #0A2ECC);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.drag-handle {
|
|
105
|
+
user-select: none;
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
width: 24px;
|
|
110
|
+
height: 24px;
|
|
111
|
+
flex-shrink: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.drag-handle .drag-handle-btn .button {
|
|
115
|
+
padding: 0;
|
|
116
|
+
min-width: auto;
|
|
117
|
+
cursor: move;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.drag-handle .drag-handle-btn .button .icon-button {
|
|
121
|
+
color: var(--guido-color-gray-600);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.item-label {
|
|
125
|
+
flex: 1;
|
|
126
|
+
font-size: 13px;
|
|
127
|
+
line-height: 16px;
|
|
128
|
+
color: #333;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.item-action {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Custom attribute delete button */
|
|
137
|
+
.custom-attr-delete .button .icon-button {
|
|
138
|
+
color: var(--guido-color-danger-500);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Disable drag for list layout */
|
|
142
|
+
.orderable-list.orderable-disabled .drag-handle {
|
|
143
|
+
display: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.orderable-list.orderable-disabled .orderable-item {
|
|
147
|
+
cursor: default;
|
|
148
|
+
}
|
|
149
|
+
|
|
26
150
|
/* ─── Migration Info Box ─────────────────────────────────────────────── */
|
|
27
151
|
/* Shown in the settings panel title when a block was migrated from legacy */
|
|
28
152
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SettingsPanelRegistry as S, SettingsPanelTab as
|
|
1
|
+
import { SettingsPanelRegistry as S, SettingsPanelTab as _, SettingsTab as O, ContainerControls as E, TextControls as C } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
2
|
import { BLOCK_ID as R } from "./block.js";
|
|
3
3
|
import { RecommendationBlockId as N } from "./constants/blockIds.js";
|
|
4
|
-
import { RecommendationControlId as
|
|
5
|
-
import { CONTROL_BLOCK_ID as
|
|
4
|
+
import { RecommendationControlId as T } from "./constants/controlIds.js";
|
|
5
|
+
import { CONTROL_BLOCK_ID as U } from "./controls/main/index.js";
|
|
6
6
|
import "./store/recommendation.js";
|
|
7
7
|
import "./controls/name/index.js";
|
|
8
8
|
import "./controls/price/index.js";
|
|
@@ -11,163 +11,181 @@ import "./controls/omnibusPrice/index.js";
|
|
|
11
11
|
import "./controls/omnibusDiscount/index.js";
|
|
12
12
|
import "./controls/button/index.js";
|
|
13
13
|
import "./controls/image/index.js";
|
|
14
|
-
import { SPACING_CONTROL_ID as
|
|
15
|
-
import { CARD_BACKGROUND_COLOR_CONTROL_ID as
|
|
14
|
+
import { SPACING_CONTROL_ID as A } from "./controls/spacing/index.js";
|
|
15
|
+
import { CARD_BACKGROUND_COLOR_CONTROL_ID as L } from "./controls/cardBackground/index.js";
|
|
16
16
|
import { LAYOUT_CONTROL_ID as D } from "./controls/layout/index.js";
|
|
17
|
-
import { COMPOSITION_CONTROL_BLOCK_ID as
|
|
18
|
-
class
|
|
19
|
-
registerBlockControls(
|
|
20
|
-
|
|
21
|
-
new
|
|
22
|
-
|
|
23
|
-
[
|
|
24
|
-
|
|
17
|
+
import { COMPOSITION_CONTROL_BLOCK_ID as B } from "./controls/cardComposition/index.js";
|
|
18
|
+
class d extends S {
|
|
19
|
+
registerBlockControls(I) {
|
|
20
|
+
I[R] = [
|
|
21
|
+
new _(
|
|
22
|
+
O.SETTINGS,
|
|
23
|
+
[
|
|
24
|
+
U,
|
|
25
25
|
E.EXTERNAL_INDENTS
|
|
26
26
|
]
|
|
27
27
|
),
|
|
28
|
-
new
|
|
29
|
-
|
|
28
|
+
new _(
|
|
29
|
+
O.STYLES,
|
|
30
30
|
[
|
|
31
31
|
C.TEXT_BLOCK_BACKGROUND_COLOR,
|
|
32
|
-
|
|
32
|
+
L,
|
|
33
33
|
D,
|
|
34
|
-
|
|
34
|
+
A
|
|
35
35
|
]
|
|
36
36
|
),
|
|
37
|
-
new
|
|
37
|
+
new _(
|
|
38
38
|
"Card Composition",
|
|
39
39
|
[
|
|
40
|
-
|
|
40
|
+
B
|
|
41
41
|
]
|
|
42
42
|
).withLabel("Card Composition")
|
|
43
|
-
],
|
|
44
|
-
new
|
|
45
|
-
|
|
43
|
+
], I[N.NAME] = [
|
|
44
|
+
new _(
|
|
45
|
+
O.SETTINGS,
|
|
46
|
+
[
|
|
47
|
+
T.NAME_STYLE,
|
|
48
|
+
T.NAME_ALIGN,
|
|
49
|
+
T.NAME_TEXT_TRIM,
|
|
50
|
+
T.NAME_PADDINGS
|
|
51
|
+
]
|
|
52
|
+
),
|
|
53
|
+
new _(
|
|
54
|
+
O.STYLES,
|
|
55
|
+
[
|
|
56
|
+
T.NAME_BACKGROUND,
|
|
57
|
+
T.NAME_FONT_FAMILY,
|
|
58
|
+
T.NAME_SIZE,
|
|
59
|
+
T.NAME_COLOR
|
|
60
|
+
]
|
|
61
|
+
)
|
|
62
|
+
], I[N.PRICE] = [
|
|
63
|
+
new _(
|
|
64
|
+
O.SETTINGS,
|
|
46
65
|
[
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
_.NAME_PADDINGS
|
|
66
|
+
T.PRICE_STYLE,
|
|
67
|
+
T.PRICE_ALIGN,
|
|
68
|
+
T.PRICE_PADDINGS
|
|
51
69
|
]
|
|
52
70
|
),
|
|
53
|
-
new
|
|
54
|
-
|
|
71
|
+
new _(
|
|
72
|
+
O.STYLES,
|
|
55
73
|
[
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
74
|
+
T.PRICE_BACKGROUND,
|
|
75
|
+
T.PRICE_FONT_FAMILY,
|
|
76
|
+
T.PRICE_SIZE,
|
|
77
|
+
T.PRICE_COLOR
|
|
60
78
|
]
|
|
61
79
|
)
|
|
62
|
-
],
|
|
63
|
-
new
|
|
64
|
-
|
|
80
|
+
], I[N.OLD_PRICE] = [
|
|
81
|
+
new _(
|
|
82
|
+
O.SETTINGS,
|
|
65
83
|
[
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
84
|
+
T.OLD_PRICE_STYLE,
|
|
85
|
+
T.OLD_PRICE_ALIGN,
|
|
86
|
+
T.OLD_PRICE_PADDINGS
|
|
69
87
|
]
|
|
70
88
|
),
|
|
71
|
-
new
|
|
72
|
-
|
|
89
|
+
new _(
|
|
90
|
+
O.STYLES,
|
|
73
91
|
[
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
92
|
+
T.OLD_PRICE_BACKGROUND,
|
|
93
|
+
T.OLD_PRICE_FONT_FAMILY,
|
|
94
|
+
T.OLD_PRICE_SIZE,
|
|
95
|
+
T.OLD_PRICE_COLOR
|
|
78
96
|
]
|
|
79
97
|
)
|
|
80
|
-
],
|
|
81
|
-
new
|
|
82
|
-
|
|
98
|
+
], I[N.OMNIBUS_PRICE] = [
|
|
99
|
+
new _(
|
|
100
|
+
O.SETTINGS,
|
|
83
101
|
[
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
102
|
+
T.OMNIBUS_PRICE_TEXT_BEFORE,
|
|
103
|
+
T.OMNIBUS_PRICE_TEXT_AFTER,
|
|
104
|
+
T.OMNIBUS_PRICE_STYLE,
|
|
105
|
+
T.OMNIBUS_PRICE_ALIGN,
|
|
106
|
+
T.OMNIBUS_PRICE_PADDINGS
|
|
87
107
|
]
|
|
88
108
|
),
|
|
89
|
-
new
|
|
90
|
-
|
|
109
|
+
new _(
|
|
110
|
+
O.STYLES,
|
|
91
111
|
[
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
112
|
+
T.OMNIBUS_PRICE_BACKGROUND,
|
|
113
|
+
T.OMNIBUS_PRICE_FONT_FAMILY,
|
|
114
|
+
T.OMNIBUS_PRICE_SIZE,
|
|
115
|
+
T.OMNIBUS_PRICE_COLOR
|
|
96
116
|
]
|
|
97
117
|
)
|
|
98
|
-
],
|
|
99
|
-
new
|
|
100
|
-
|
|
118
|
+
], I[N.OMNIBUS_DISCOUNT] = [
|
|
119
|
+
new _(
|
|
120
|
+
O.SETTINGS,
|
|
101
121
|
[
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
122
|
+
T.OMNIBUS_DISCOUNT_TEXT_BEFORE,
|
|
123
|
+
T.OMNIBUS_DISCOUNT_TEXT_AFTER,
|
|
124
|
+
T.OMNIBUS_DISCOUNT_STYLE,
|
|
125
|
+
T.OMNIBUS_DISCOUNT_ALIGN,
|
|
126
|
+
T.OMNIBUS_DISCOUNT_PADDINGS
|
|
107
127
|
]
|
|
108
128
|
),
|
|
109
|
-
new
|
|
110
|
-
|
|
129
|
+
new _(
|
|
130
|
+
O.STYLES,
|
|
111
131
|
[
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
132
|
+
T.OMNIBUS_DISCOUNT_BACKGROUND,
|
|
133
|
+
T.OMNIBUS_DISCOUNT_FONT_FAMILY,
|
|
134
|
+
T.OMNIBUS_DISCOUNT_SIZE,
|
|
135
|
+
T.OMNIBUS_DISCOUNT_COLOR
|
|
116
136
|
]
|
|
117
137
|
)
|
|
118
|
-
],
|
|
119
|
-
new
|
|
120
|
-
|
|
138
|
+
], I[N.BUTTON] = [
|
|
139
|
+
new _(
|
|
140
|
+
O.SETTINGS,
|
|
121
141
|
[
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
_.OMNIBUS_DISCOUNT_PADDINGS
|
|
142
|
+
T.BUTTON_TEXT,
|
|
143
|
+
T.BUTTON_ALIGN,
|
|
144
|
+
T.BUTTON_PADDINGS,
|
|
145
|
+
T.BUTTON_MARGINS
|
|
127
146
|
]
|
|
128
147
|
),
|
|
129
|
-
new
|
|
130
|
-
|
|
148
|
+
new _(
|
|
149
|
+
O.STYLES,
|
|
131
150
|
[
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
151
|
+
T.BUTTON_COLOR,
|
|
152
|
+
T.BUTTON_FONT_FAMILY,
|
|
153
|
+
T.BUTTON_TEXT_SIZE,
|
|
154
|
+
T.BUTTON_TEXT_STYLE_AND_FONT_COLOR,
|
|
155
|
+
T.BUTTON_FIT_TO_CONTENT,
|
|
156
|
+
T.BUTTON_BORDER_RADIUS,
|
|
157
|
+
T.BUTTON_BORDER
|
|
136
158
|
]
|
|
137
159
|
)
|
|
138
|
-
],
|
|
139
|
-
new
|
|
140
|
-
|
|
160
|
+
], I[N.CUSTOM_ATTRIBUTE] = [
|
|
161
|
+
new _(
|
|
162
|
+
O.SETTINGS,
|
|
141
163
|
[
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
_.BUTTON_MARGINS
|
|
164
|
+
T.CUSTOM_ATTR_STYLE,
|
|
165
|
+
T.CUSTOM_ATTR_ALIGN,
|
|
166
|
+
T.CUSTOM_ATTR_PADDINGS
|
|
146
167
|
]
|
|
147
168
|
),
|
|
148
|
-
new
|
|
149
|
-
|
|
169
|
+
new _(
|
|
170
|
+
O.STYLES,
|
|
150
171
|
[
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
_.BUTTON_FIT_TO_CONTENT,
|
|
156
|
-
_.BUTTON_BORDER_RADIUS,
|
|
157
|
-
_.BUTTON_BORDER
|
|
172
|
+
T.CUSTOM_ATTR_BACKGROUND,
|
|
173
|
+
T.CUSTOM_ATTR_FONT_FAMILY,
|
|
174
|
+
T.CUSTOM_ATTR_SIZE,
|
|
175
|
+
T.CUSTOM_ATTR_COLOR
|
|
158
176
|
]
|
|
159
177
|
)
|
|
160
|
-
],
|
|
161
|
-
new
|
|
162
|
-
|
|
178
|
+
], I[N.IMAGE] = [
|
|
179
|
+
new _(
|
|
180
|
+
O.SETTINGS,
|
|
163
181
|
[
|
|
164
|
-
|
|
165
|
-
|
|
182
|
+
T.IMAGE_SIZE,
|
|
183
|
+
T.IMAGE_MARGINS
|
|
166
184
|
]
|
|
167
185
|
)
|
|
168
186
|
];
|
|
169
187
|
}
|
|
170
188
|
}
|
|
171
189
|
export {
|
|
172
|
-
|
|
190
|
+
d as SettingsPanel
|
|
173
191
|
};
|
|
@@ -5,11 +5,11 @@ import { defineStore as G } from "pinia";
|
|
|
5
5
|
import { DEFAULT_CARDS_IN_ROW as F } from "../constants/layout.js";
|
|
6
6
|
import { EXCLUDED_ALGORITHM_IDS as w } from "../constants/defaultConfig.js";
|
|
7
7
|
import { getDefaultProducts as S } from "../templates/utils.js";
|
|
8
|
-
import { generateCompleteFilterQuery as
|
|
8
|
+
import { generateCompleteFilterQuery as b } from "../utils/filterUtil.js";
|
|
9
9
|
import { isFilterValid as D } from "../validation/filterSchema.js";
|
|
10
10
|
const h = y();
|
|
11
11
|
let u = null, m = null, d = null;
|
|
12
|
-
function
|
|
12
|
+
function I() {
|
|
13
13
|
return {
|
|
14
14
|
cardsInRow: F,
|
|
15
15
|
currencySettings: {
|
|
@@ -32,12 +32,13 @@ function b() {
|
|
|
32
32
|
strategy: "mostPopular",
|
|
33
33
|
textTrimming: !0,
|
|
34
34
|
unresponsive: !1,
|
|
35
|
-
size: "6"
|
|
35
|
+
size: "6",
|
|
36
|
+
customAttributes: []
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
function P() {
|
|
39
40
|
return {
|
|
40
|
-
recommendationConfigs:
|
|
41
|
+
recommendationConfigs: I(),
|
|
41
42
|
recommendationProducts: [],
|
|
42
43
|
filterStatus: !1,
|
|
43
44
|
filterSelectionDrawerStatus: !1,
|
|
@@ -66,7 +67,7 @@ const v = () => ({
|
|
|
66
67
|
* This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
|
|
67
68
|
*/
|
|
68
69
|
recommendationConfigs(t) {
|
|
69
|
-
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs :
|
|
70
|
+
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs : I();
|
|
70
71
|
},
|
|
71
72
|
/**
|
|
72
73
|
* Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
|
|
@@ -352,7 +353,7 @@ const v = () => ({
|
|
|
352
353
|
}), r.recommendationConfigs.filters = e;
|
|
353
354
|
},
|
|
354
355
|
generateFilterQuery() {
|
|
355
|
-
return
|
|
356
|
+
return b(this.recommendationConfigs.filters);
|
|
356
357
|
},
|
|
357
358
|
// ====================================================================
|
|
358
359
|
// Per-Block Product Fetching
|
|
@@ -373,7 +374,7 @@ const v = () => ({
|
|
|
373
374
|
},
|
|
374
375
|
async _doFetchProducts() {
|
|
375
376
|
var p;
|
|
376
|
-
const t = this.currentRecommendationId, r = this.blockStates[t], { recommendationConfigs: e } = r, n = e.filters.filter((a) => a.isValid), c =
|
|
377
|
+
const t = this.currentRecommendationId, r = this.blockStates[t], { recommendationConfigs: e } = r, n = e.filters.filter((a) => a.isValid), c = b(n), i = ((p = g.find((a) => a.key === e.strategy)) == null ? void 0 : p.path) || "", o = C(), s = {
|
|
377
378
|
locale: e.language,
|
|
378
379
|
currency: e.currencySettings.value,
|
|
379
380
|
partnerName: o.partnerName,
|