@useinsider/guido 3.18.1-beta.9b8b7ac → 3.18.1-beta.c5d7fb4
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 +3 -1
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +55 -53
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +82 -57
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +24 -22
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +28 -24
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +46 -0
- package/dist/composables/useCustomInterfaceAppearance.js +46 -42
- package/dist/composables/useLegacyStrategyConversion.js +54 -0
- package/dist/composables/usePreviewMode.js +8 -11
- package/dist/config/compiler/htmlCompilerRules.js +6 -14
- package/dist/enums/extensions/recommendationBlock.js +2 -1
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +70 -69
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -28
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +45 -44
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +104 -58
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +58 -0
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +7 -7
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +61 -52
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +54 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +39 -0
- package/dist/src/services/recommendationApi.d.ts +2 -1
- package/dist/src/stores/config.d.ts +160 -0
- package/dist/src/stores/onboarding.d.ts +808 -10
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
- package/dist/static/assets/icons/line-info.svg.js +5 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +70 -5
- package/dist/static/styles/customEditorStyle.css.js +0 -8
- package/dist/stores/config.js +66 -59
- package/dist/stores/onboarding.js +46 -36
- package/package.json +1 -1
- package/dist/src/utils/preventMobileWordOverflow.d.ts +0 -12
- package/dist/utils/preventMobileWordOverflow.js +0 -15
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const C = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.9403 5.51003L17.6328 11.0273C17.8845 11.3769 18.0068 11.8382 17.9997 12.2963L18 12.3333C18 13.2538 17.4627 14 16.8 14H15V15C15 15.5523 14.5523 16 14 16H10C9.44772 16 9 15.5523 9 15V14H7.2C6.53726 14 6 13.2538 6 12.3333L6.00029 12.2963C5.9932 11.8382 6.11551 11.3769 6.36722 11.0273L11.0597 5.51003C11.3182 5.15101 11.6615 4.98153 12 5.00159C12.3386 4.98153 12.6818 5.15101 12.9403 5.51003Z"/><path d="M10 18C9.44772 18 9 18.4477 9 19C9 19.5523 9.44772 20 10 20H14C14.5523 20 15 19.5523 15 19C15 18.4477 14.5523 18 14 18H10Z"/></svg>
|
|
2
|
+
`;
|
|
3
|
+
export {
|
|
4
|
+
C as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const C = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 4C14.1217 4 16.1566 4.84285 17.6569 6.34315C19.1571 7.84344 20 9.87827 20 12C20 14.1217 19.1571 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20C9.87827 20 7.84344 19.1571 6.34315 17.6569C4.84285 16.1566 4 14.1217 4 12C4 9.87827 4.84285 7.84344 6.34315 6.34315C7.84344 4.84285 9.87827 4 12 4ZM12 5.6C10.3026 5.6 8.67475 6.27428 7.47452 7.47452C6.27428 8.67475 5.6 10.3026 5.6 12C5.6 13.6974 6.27428 15.3253 7.47452 16.5255C8.67475 17.7257 10.3026 18.4 12 18.4C13.6974 18.4 15.3253 17.7257 16.5255 16.5255C17.7257 15.3253 18.4 13.6974 18.4 12C18.4 10.3026 17.7257 8.67475 16.5255 7.47452C15.3253 6.27428 13.6974 5.6 12 5.6ZM11.496 10.448C11.928 10.448 12.264 10.552 12.496 10.768C12.736 10.976 12.848 11.248 12.848 11.584V11.688L12.824 11.944C12.816 12.064 12.8 12.176 12.776 12.28L12.736 12.432L12.288 14.024L12.248 14.152C12.1976 14.376 12.1629 14.6032 12.144 14.832C12.144 15.04 12.192 15.184 12.288 15.264C12.384 15.344 12.544 15.376 12.776 15.376C12.888 15.376 13.016 15.36 13.152 15.32L13.392 15.24L13.448 15.216L13.328 15.712L12.848 15.896L12.584 15.992L12.464 16.032C12.248 16.112 12 16.144 11.72 16.144C11.28 16.144 10.944 16.04 10.696 15.824C10.5803 15.7241 10.488 15.5998 10.4258 15.4602C10.3636 15.3205 10.3329 15.1689 10.336 15.016C10.3355 14.787 10.3624 14.5587 10.416 14.336L10.448 14.176L10.896 12.576L10.936 12.424L11 12.144C11.024 12.008 11.04 11.88 11.04 11.768C11.04 11.56 11 11.424 10.912 11.344C10.832 11.264 10.672 11.224 10.432 11.224C10.312 11.224 10.192 11.24 10.072 11.272L9.856 11.352L9.76 11.376L9.88 10.888L10.168 10.776C10.36 10.696 10.544 10.632 10.728 10.576C11 10.496 11.256 10.448 11.496 10.448ZM12.496 7.536C12.792 7.536 13.04 7.632 13.248 7.832C13.464 8.024 13.568 8.264 13.568 8.544C13.568 8.816 13.464 9.056 13.248 9.248C13.04 9.44 12.792 9.544 12.496 9.544C12.2 9.544 11.944 9.44 11.736 9.248C11.52 9.056 11.416 8.816 11.416 8.544C11.416 8.264 11.52 8.024 11.736 7.824C11.944 7.632 12.2 7.536 12.496 7.536Z"/></svg>
|
|
2
|
+
`;
|
|
3
|
+
export {
|
|
4
|
+
C as default
|
|
5
|
+
};
|
|
@@ -26,6 +26,40 @@ const n = `.strategy-control-header {
|
|
|
26
26
|
text-decoration: underline;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
.strategy-control-notice-row {
|
|
30
|
+
padding: 0 16px 16px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.strategy-control-notice {
|
|
34
|
+
display: flex;
|
|
35
|
+
gap: 8px;
|
|
36
|
+
align-items: center;
|
|
37
|
+
padding: 12px;
|
|
38
|
+
border: 1px solid var(--guido-color-border-onpage-message-info);
|
|
39
|
+
border-radius: 4px;
|
|
40
|
+
background-color: var(--guido-color-background-onpage-message-info);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.strategy-control-notice::before {
|
|
44
|
+
content: '';
|
|
45
|
+
flex: none;
|
|
46
|
+
width: 24px;
|
|
47
|
+
height: 24px;
|
|
48
|
+
background-color: var(--guido-color-border-onpage-message-info);
|
|
49
|
+
mask-image: var(--guido-icon-line-info);
|
|
50
|
+
mask-repeat: no-repeat;
|
|
51
|
+
mask-position: center;
|
|
52
|
+
mask-size: 24px 24px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.strategy-control-notice-text {
|
|
56
|
+
margin: 0;
|
|
57
|
+
padding: 4px 0;
|
|
58
|
+
color: var(--guido-color-neutral-700);
|
|
59
|
+
font-size: 13px;
|
|
60
|
+
line-height: 16px;
|
|
61
|
+
}
|
|
62
|
+
|
|
29
63
|
.recommendation-controls-container .container.strategy-control-cta-row {
|
|
30
64
|
grid-template-columns: repeat(2, minmax(0, 180px));
|
|
31
65
|
justify-content: start;
|
|
@@ -64,6 +98,14 @@ const n = `.strategy-control-header {
|
|
|
64
98
|
background-color: var(--guido-color-gray-0);
|
|
65
99
|
}
|
|
66
100
|
|
|
101
|
+
/* Figma gives the legacy band a 59px row: 17.5px above and below its 24px content. */
|
|
102
|
+
[data-strategy-legacy-state] .strategy-control-name-band {
|
|
103
|
+
gap: 8px;
|
|
104
|
+
justify-content: space-between;
|
|
105
|
+
min-height: auto;
|
|
106
|
+
padding: 17.5px 16px;
|
|
107
|
+
}
|
|
108
|
+
|
|
67
109
|
.strategy-control-name {
|
|
68
110
|
color: var(--guido-color-gray-800);
|
|
69
111
|
font-size: 15px;
|
|
@@ -117,6 +159,15 @@ const n = `.strategy-control-header {
|
|
|
117
159
|
mask-image: var(--guido-icon-line-plus);
|
|
118
160
|
}
|
|
119
161
|
|
|
162
|
+
.strategy-control-action--update::before {
|
|
163
|
+
mask-image: var(--guido-icon-filled-arrow-rising);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.strategy-control-name-band .strategy-control-action > span {
|
|
167
|
+
padding: 0 0 0 8px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.strategy-control-action--update,
|
|
120
171
|
.strategy-control-action--change {
|
|
121
172
|
color: var(--guido-color-primary-500);
|
|
122
173
|
}
|
|
@@ -129,24 +180,38 @@ const n = `.strategy-control-header {
|
|
|
129
180
|
text-decoration: underline;
|
|
130
181
|
}
|
|
131
182
|
|
|
132
|
-
.
|
|
183
|
+
.strategy-control-action:disabled,
|
|
184
|
+
.strategy-control-action:disabled:hover {
|
|
185
|
+
color: var(--guido-color-gray-700);
|
|
186
|
+
text-decoration: none;
|
|
187
|
+
cursor: default;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.recommendation-controls-container:not(.strategy-block):not(.legacy-strategy-block) .strategy-control-container,
|
|
133
191
|
.recommendation-controls-container.strategy-block .product-count-control-container,
|
|
134
192
|
.recommendation-controls-container.strategy-block .algorithm-control-container,
|
|
135
193
|
.recommendation-controls-container.strategy-block .filters-control-container,
|
|
136
|
-
.recommendation-controls-container.strategy-block .shuffle-control-container
|
|
194
|
+
.recommendation-controls-container.strategy-block .shuffle-control-container,
|
|
195
|
+
.recommendation-controls-container.legacy-strategy-block .product-count-control-container,
|
|
196
|
+
.recommendation-controls-container.legacy-strategy-block .algorithm-control-container,
|
|
197
|
+
.recommendation-controls-container.legacy-strategy-block .filters-control-container,
|
|
198
|
+
.recommendation-controls-container.legacy-strategy-block .shuffle-control-container {
|
|
137
199
|
display: none;
|
|
138
200
|
}
|
|
139
201
|
|
|
140
|
-
.recommendation-controls-container.strategy-block
|
|
202
|
+
.recommendation-controls-container.strategy-block,
|
|
203
|
+
.recommendation-controls-container.legacy-strategy-block {
|
|
141
204
|
display: flex;
|
|
142
205
|
flex-direction: column;
|
|
143
206
|
}
|
|
144
207
|
|
|
145
|
-
.recommendation-controls-container.strategy-block .price-placement-control-container
|
|
208
|
+
.recommendation-controls-container.strategy-block .price-placement-control-container,
|
|
209
|
+
.recommendation-controls-container.legacy-strategy-block .price-placement-control-container {
|
|
146
210
|
order: 1;
|
|
147
211
|
}
|
|
148
212
|
|
|
149
|
-
.recommendation-controls-container.strategy-block .product-layout-control-container
|
|
213
|
+
.recommendation-controls-container.strategy-block .product-layout-control-container,
|
|
214
|
+
.recommendation-controls-container.legacy-strategy-block .product-layout-control-container {
|
|
150
215
|
order: 2;
|
|
151
216
|
}
|
|
152
217
|
`;
|
|
@@ -106,14 +106,6 @@ const n = `.esd-x,
|
|
|
106
106
|
.ue-mobile-mode .ins-recommendation-no-mobile-layout .ins-recommendation-mobile-container {
|
|
107
107
|
display: none !important;
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
/* SD-151345: mirror the compiled-email fix in the editor's mobile preview.
|
|
111
|
-
The editor simulates mobile with .ue-mobile-mode, not a viewport media query. */
|
|
112
|
-
.ue-mobile-mode .esd-block-text:not(.ins-coupon-code),
|
|
113
|
-
.ue-mobile-mode .esd-block-text:not(.ins-coupon-code) p {
|
|
114
|
-
word-break: break-word !important;
|
|
115
|
-
overflow-wrap: anywhere !important;
|
|
116
|
-
}
|
|
117
109
|
`;
|
|
118
110
|
export {
|
|
119
111
|
n as default
|
package/dist/stores/config.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../@types/config/schemas.js";
|
|
2
2
|
import "../@types/config/defaults.js";
|
|
3
3
|
import { parseConfig as o } from "../@types/config/validator.js";
|
|
4
|
-
import { defineStore as
|
|
5
|
-
const
|
|
4
|
+
import { defineStore as a } from "pinia";
|
|
5
|
+
const s = a("guido-config", {
|
|
6
6
|
state: () => ({
|
|
7
7
|
initialized: !1,
|
|
8
8
|
config: null
|
|
@@ -11,121 +11,128 @@ const f = r("guido-config", {
|
|
|
11
11
|
/**
|
|
12
12
|
* Get the identity configuration
|
|
13
13
|
*/
|
|
14
|
-
identity: (
|
|
15
|
-
var
|
|
16
|
-
return ((
|
|
14
|
+
identity: (e) => {
|
|
15
|
+
var i;
|
|
16
|
+
return ((i = e.config) == null ? void 0 : i.identity) ?? null;
|
|
17
17
|
},
|
|
18
18
|
/**
|
|
19
19
|
* Get the partner configuration
|
|
20
20
|
*/
|
|
21
|
-
partner: (
|
|
22
|
-
var
|
|
23
|
-
return ((
|
|
21
|
+
partner: (e) => {
|
|
22
|
+
var i;
|
|
23
|
+
return ((i = e.config) == null ? void 0 : i.partner) ?? null;
|
|
24
24
|
},
|
|
25
25
|
/**
|
|
26
26
|
* Get the template configuration
|
|
27
27
|
*/
|
|
28
|
-
template: (
|
|
29
|
-
var
|
|
30
|
-
return ((
|
|
28
|
+
template: (e) => {
|
|
29
|
+
var i;
|
|
30
|
+
return ((i = e.config) == null ? void 0 : i.template) ?? null;
|
|
31
31
|
},
|
|
32
32
|
/**
|
|
33
33
|
* Get the editor configuration
|
|
34
34
|
*/
|
|
35
|
-
editor: (
|
|
36
|
-
var
|
|
37
|
-
return ((
|
|
35
|
+
editor: (e) => {
|
|
36
|
+
var i;
|
|
37
|
+
return ((i = e.config) == null ? void 0 : i.editor) ?? null;
|
|
38
38
|
},
|
|
39
39
|
/**
|
|
40
40
|
* Get the UI configuration
|
|
41
41
|
*/
|
|
42
|
-
ui: (
|
|
43
|
-
var
|
|
44
|
-
return ((
|
|
42
|
+
ui: (e) => {
|
|
43
|
+
var i;
|
|
44
|
+
return ((i = e.config) == null ? void 0 : i.ui) ?? null;
|
|
45
45
|
},
|
|
46
46
|
/**
|
|
47
47
|
* Get the features configuration
|
|
48
48
|
*/
|
|
49
|
-
features: (
|
|
50
|
-
var
|
|
51
|
-
return ((
|
|
49
|
+
features: (e) => {
|
|
50
|
+
var i;
|
|
51
|
+
return ((i = e.config) == null ? void 0 : i.features) ?? null;
|
|
52
52
|
},
|
|
53
53
|
/**
|
|
54
54
|
* Get the blocks configuration
|
|
55
55
|
*/
|
|
56
|
-
blocks: (
|
|
57
|
-
var
|
|
58
|
-
return ((
|
|
56
|
+
blocks: (e) => {
|
|
57
|
+
var i;
|
|
58
|
+
return ((i = e.config) == null ? void 0 : i.blocks) ?? null;
|
|
59
59
|
},
|
|
60
60
|
/**
|
|
61
61
|
* Get the compiler configuration
|
|
62
62
|
*/
|
|
63
|
-
compiler: (
|
|
64
|
-
var
|
|
65
|
-
return ((
|
|
63
|
+
compiler: (e) => {
|
|
64
|
+
var i;
|
|
65
|
+
return ((i = e.config) == null ? void 0 : i.compiler) ?? null;
|
|
66
66
|
},
|
|
67
67
|
/**
|
|
68
68
|
* Get the callbacks configuration
|
|
69
69
|
*/
|
|
70
|
-
callbacks: (
|
|
71
|
-
var
|
|
72
|
-
return ((
|
|
70
|
+
callbacks: (e) => {
|
|
71
|
+
var i;
|
|
72
|
+
return ((i = e.config) == null ? void 0 : i.callbacks) ?? null;
|
|
73
73
|
},
|
|
74
74
|
/**
|
|
75
75
|
* Get the template ID
|
|
76
76
|
*/
|
|
77
|
-
templateId: (
|
|
78
|
-
var
|
|
79
|
-
return ((n = (
|
|
77
|
+
templateId: (e) => {
|
|
78
|
+
var i, n;
|
|
79
|
+
return ((n = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : n.templateId) ?? "";
|
|
80
80
|
},
|
|
81
81
|
/**
|
|
82
82
|
* Get the user ID
|
|
83
83
|
*/
|
|
84
|
-
userId: (
|
|
85
|
-
var
|
|
86
|
-
return ((n = (
|
|
84
|
+
userId: (e) => {
|
|
85
|
+
var i, n;
|
|
86
|
+
return ((n = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : n.userId) ?? "";
|
|
87
87
|
},
|
|
88
88
|
/**
|
|
89
89
|
* Get the variation ID
|
|
90
90
|
*/
|
|
91
|
-
variationId: (
|
|
92
|
-
var
|
|
93
|
-
return ((n = (
|
|
91
|
+
variationId: (e) => {
|
|
92
|
+
var i, n;
|
|
93
|
+
return ((n = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : n.variationId) ?? "";
|
|
94
|
+
},
|
|
95
|
+
/**
|
|
96
|
+
* Get the campaign ID
|
|
97
|
+
*/
|
|
98
|
+
campaignId: (e) => {
|
|
99
|
+
var i, n;
|
|
100
|
+
return ((n = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : n.campaignId) ?? "";
|
|
94
101
|
},
|
|
95
102
|
/**
|
|
96
103
|
* Get the partner name
|
|
97
104
|
*/
|
|
98
|
-
partnerName: (
|
|
99
|
-
var
|
|
100
|
-
return ((n = (
|
|
105
|
+
partnerName: (e) => {
|
|
106
|
+
var i, n;
|
|
107
|
+
return ((n = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : n.name) ?? "";
|
|
101
108
|
},
|
|
102
109
|
/**
|
|
103
110
|
* Get the product type
|
|
104
111
|
*/
|
|
105
|
-
productType: (
|
|
106
|
-
var
|
|
107
|
-
return ((n = (
|
|
112
|
+
productType: (e) => {
|
|
113
|
+
var i, n;
|
|
114
|
+
return ((n = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : n.productType) ?? 60;
|
|
108
115
|
},
|
|
109
116
|
/**
|
|
110
117
|
* Get the message type
|
|
111
118
|
*/
|
|
112
|
-
messageType: (
|
|
113
|
-
var
|
|
114
|
-
return ((n = (
|
|
119
|
+
messageType: (e) => {
|
|
120
|
+
var i, n;
|
|
121
|
+
return ((n = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : n.messageType) ?? 1;
|
|
115
122
|
},
|
|
116
123
|
/**
|
|
117
124
|
* Get the username
|
|
118
125
|
*/
|
|
119
|
-
username: (
|
|
120
|
-
var
|
|
121
|
-
return ((n = (
|
|
126
|
+
username: (e) => {
|
|
127
|
+
var i, n;
|
|
128
|
+
return ((n = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : n.username) ?? "Guido User";
|
|
122
129
|
},
|
|
123
130
|
/**
|
|
124
131
|
* Check if header should be shown
|
|
125
132
|
*/
|
|
126
|
-
showHeader: (
|
|
127
|
-
var
|
|
128
|
-
return ((n = (
|
|
133
|
+
showHeader: (e) => {
|
|
134
|
+
var i, n;
|
|
135
|
+
return ((n = (i = e.config) == null ? void 0 : i.ui) == null ? void 0 : n.showHeader) ?? !0;
|
|
129
136
|
},
|
|
130
137
|
/**
|
|
131
138
|
* Check if a specific feature is enabled.
|
|
@@ -133,18 +140,18 @@ const f = r("guido-config", {
|
|
|
133
140
|
* flash on during loading, then disappear once config resolves.
|
|
134
141
|
*/
|
|
135
142
|
// eslint-disable-next-line @stylistic/max-len
|
|
136
|
-
isFeatureEnabled: (
|
|
143
|
+
isFeatureEnabled: (e) => (i) => {
|
|
137
144
|
var n, t;
|
|
138
|
-
return ((t = (n =
|
|
145
|
+
return ((t = (n = e.config) == null ? void 0 : n.features) == null ? void 0 : t[i]) ?? !1;
|
|
139
146
|
}
|
|
140
147
|
},
|
|
141
148
|
actions: {
|
|
142
149
|
/**
|
|
143
150
|
* Initialize the config store with validated configuration
|
|
144
151
|
*/
|
|
145
|
-
init(
|
|
146
|
-
const
|
|
147
|
-
this.config =
|
|
152
|
+
init(e) {
|
|
153
|
+
const i = o(e);
|
|
154
|
+
this.config = i, this.initialized = !0;
|
|
148
155
|
},
|
|
149
156
|
/**
|
|
150
157
|
* Reset the config store
|
|
@@ -155,5 +162,5 @@ const f = r("guido-config", {
|
|
|
155
162
|
}
|
|
156
163
|
});
|
|
157
164
|
export {
|
|
158
|
-
|
|
165
|
+
s as useConfigStore
|
|
159
166
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useOnboardingApi as
|
|
2
|
-
import { defineStore as
|
|
1
|
+
import { useOnboardingApi as e } from "../services/onboardingApi.js";
|
|
2
|
+
import { defineStore as s } from "pinia";
|
|
3
3
|
const t = () => ({
|
|
4
4
|
cardIndex: 0,
|
|
5
5
|
isActive: !1,
|
|
@@ -11,49 +11,59 @@ const t = () => ({
|
|
|
11
11
|
textBlockOnboarding: t(),
|
|
12
12
|
versionHistoryOnboarding: t(),
|
|
13
13
|
ampOnboarding: t(),
|
|
14
|
-
itemsOnboarding: t()
|
|
14
|
+
itemsOnboarding: t(),
|
|
15
|
+
recommendationStrategyOnboarding: t(),
|
|
16
|
+
recommendationLegacyStrategyOnboarding: t()
|
|
15
17
|
},
|
|
16
18
|
userModalState: {},
|
|
17
19
|
isFetched: !1
|
|
18
|
-
}), c =
|
|
20
|
+
}), c = s("guidoOnboarding", {
|
|
19
21
|
state: () => a(),
|
|
20
22
|
getters: {
|
|
21
|
-
getOnboarding: (n) => (
|
|
22
|
-
isActive: (n) => (
|
|
23
|
-
getCurrentCard: (n) => (
|
|
24
|
-
const
|
|
25
|
-
return
|
|
23
|
+
getOnboarding: (n) => (o) => n.onboardings[o],
|
|
24
|
+
isActive: (n) => (o) => n.onboardings[o].isActive,
|
|
25
|
+
getCurrentCard: (n) => (o) => {
|
|
26
|
+
const i = n.onboardings[o];
|
|
27
|
+
return i.config[i.cardIndex];
|
|
26
28
|
},
|
|
27
29
|
getGenericCurrentCard: (n) => {
|
|
28
|
-
const { genericOnboarding:
|
|
29
|
-
return
|
|
30
|
+
const { genericOnboarding: o } = n.onboardings;
|
|
31
|
+
return o.config[o.cardIndex];
|
|
30
32
|
},
|
|
31
33
|
getTextBlockCurrentCard: (n) => {
|
|
32
|
-
const { textBlockOnboarding:
|
|
33
|
-
return
|
|
34
|
+
const { textBlockOnboarding: o } = n.onboardings;
|
|
35
|
+
return o.config[o.cardIndex];
|
|
34
36
|
},
|
|
35
37
|
getVersionHistoryCurrentCard: (n) => {
|
|
36
|
-
const { versionHistoryOnboarding:
|
|
37
|
-
return
|
|
38
|
+
const { versionHistoryOnboarding: o } = n.onboardings;
|
|
39
|
+
return o.config[o.cardIndex];
|
|
38
40
|
},
|
|
39
41
|
getAmpCurrentCard: (n) => {
|
|
40
|
-
const { ampOnboarding:
|
|
41
|
-
return
|
|
42
|
+
const { ampOnboarding: o } = n.onboardings;
|
|
43
|
+
return o.config[o.cardIndex];
|
|
42
44
|
},
|
|
43
45
|
getItemsCurrentCard: (n) => {
|
|
44
|
-
const { itemsOnboarding:
|
|
45
|
-
return
|
|
46
|
+
const { itemsOnboarding: o } = n.onboardings;
|
|
47
|
+
return o.config[o.cardIndex];
|
|
48
|
+
},
|
|
49
|
+
getRecommendationStrategyCurrentCard: (n) => {
|
|
50
|
+
const { recommendationStrategyOnboarding: o } = n.onboardings;
|
|
51
|
+
return o.config[o.cardIndex];
|
|
52
|
+
},
|
|
53
|
+
getRecommendationLegacyStrategyCurrentCard: (n) => {
|
|
54
|
+
const { recommendationLegacyStrategyOnboarding: o } = n.onboardings;
|
|
55
|
+
return o.config[o.cardIndex];
|
|
46
56
|
},
|
|
47
|
-
shouldShowOnboarding: (n) => (
|
|
48
|
-
const
|
|
49
|
-
return
|
|
57
|
+
shouldShowOnboarding: (n) => (o) => {
|
|
58
|
+
const i = n.userModalState.Guido;
|
|
59
|
+
return o === "newVersionPopup" && (i != null && i.genericOnboarding) ? !1 : i ? !i[o] : !0;
|
|
50
60
|
}
|
|
51
61
|
},
|
|
52
62
|
actions: {
|
|
53
63
|
closeOtherOnboardings(n) {
|
|
54
|
-
Object.keys(this.onboardings).forEach((
|
|
55
|
-
const
|
|
56
|
-
|
|
64
|
+
Object.keys(this.onboardings).forEach((o) => {
|
|
65
|
+
const i = o;
|
|
66
|
+
i !== n && this.onboardings[i].isActive && (this.onboardings[i].isActive = !1, this.onboardings[i].cardIndex = 0, this.onboardings[i].config = []);
|
|
57
67
|
});
|
|
58
68
|
},
|
|
59
69
|
start(n) {
|
|
@@ -71,12 +81,12 @@ const t = () => ({
|
|
|
71
81
|
previous(n) {
|
|
72
82
|
this.onboardings[n].cardIndex > 0 && this.onboardings[n].cardIndex--;
|
|
73
83
|
},
|
|
74
|
-
updateCardPosition(n,
|
|
75
|
-
const r = this.onboardings[n].config[
|
|
76
|
-
r && (r.top =
|
|
84
|
+
updateCardPosition(n, o, i) {
|
|
85
|
+
const r = this.onboardings[n].config[o];
|
|
86
|
+
r && (r.top = i.top, r.position = i.position);
|
|
77
87
|
},
|
|
78
|
-
setConfig(n,
|
|
79
|
-
this.onboardings[n].config =
|
|
88
|
+
setConfig(n, o) {
|
|
89
|
+
this.onboardings[n].config = o ?? [], this.onboardings[n].cardIndex >= this.onboardings[n].config.length && (this.onboardings[n].cardIndex = 0);
|
|
80
90
|
},
|
|
81
91
|
async onDiscoverNowClicked() {
|
|
82
92
|
await this.setUserModalState("newVersionPopup", "true", "Guido"), await this.setUserModalState("genericOnboarding", "true", "Guido"), this.start("genericOnboarding");
|
|
@@ -93,16 +103,16 @@ const t = () => ({
|
|
|
93
103
|
async fetchUserModalState() {
|
|
94
104
|
if (this.isFetched)
|
|
95
105
|
return;
|
|
96
|
-
const { fetchUserModalState: n } =
|
|
106
|
+
const { fetchUserModalState: n } = e();
|
|
97
107
|
try {
|
|
98
|
-
const
|
|
99
|
-
this.userModalState =
|
|
108
|
+
const o = await n();
|
|
109
|
+
this.userModalState = o, this.isFetched = !0;
|
|
100
110
|
} catch {
|
|
101
111
|
}
|
|
102
112
|
},
|
|
103
|
-
async setUserModalState(n,
|
|
104
|
-
const { setUserModalState: r } =
|
|
105
|
-
await r(n,
|
|
113
|
+
async setUserModalState(n, o, i) {
|
|
114
|
+
const { setUserModalState: r } = e();
|
|
115
|
+
await r(n, o, i), this.isFetched = !1, await this.fetchUserModalState();
|
|
106
116
|
}
|
|
107
117
|
}
|
|
108
118
|
});
|
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.c5d7fb4",
|
|
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",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SD-151345 — long unbreakable words steal width from sibling containers on mobile.
|
|
3
|
-
*
|
|
4
|
-
* When a structure is not responsive its containers stay side by side on mobile.
|
|
5
|
-
* A word that cannot wrap forces its own cell wider than its share, and CSS table
|
|
6
|
-
* auto-layout takes that width from its siblings — so identical images render at
|
|
7
|
-
* different sizes and the long-word container spills past the mobile canvas.
|
|
8
|
-
* Letting the word break restores the intended per-container widths.
|
|
9
|
-
*
|
|
10
|
-
* Coupon codes are excluded: a promo code must stay readable as one token.
|
|
11
|
-
*/
|
|
12
|
-
export declare function preventMobileWordOverflow(html: string): string;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const r = "ins-mobile-word-break", n = `<style type="text/css">/* ${r} */
|
|
2
|
-
@media only screen and (max-width:600px){
|
|
3
|
-
.esd-block-text:not(.ins-coupon-code),
|
|
4
|
-
.esd-block-text:not(.ins-coupon-code) p
|
|
5
|
-
{word-break:break-word !important;overflow-wrap:anywhere !important}
|
|
6
|
-
}</style>`, t = /<\/head\s*>/i;
|
|
7
|
-
function c(e) {
|
|
8
|
-
if (!e || e.includes(r))
|
|
9
|
-
return e;
|
|
10
|
-
const o = t.exec(e);
|
|
11
|
-
return o ? e.slice(0, o.index) + n + e.slice(o.index) : n + e;
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
c as preventMobileWordOverflow
|
|
15
|
-
};
|