@useinsider/guido 3.3.0 → 3.4.0-beta.0ec3bc7
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 +1 -1
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +42 -40
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +9 -11
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +70 -35
- package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
- package/dist/composables/useCortexBlueprintBridge.js +66 -0
- package/dist/composables/useEmailTemplateApplier.js +41 -0
- package/dist/composables/useGuidoStateBridge.js +48 -0
- package/dist/composables/useHtmlValidator.js +41 -36
- package/dist/composables/useRecommendation.js +2 -2
- package/dist/composables/useResponsivePreview.js +1 -1
- package/dist/config/compiler/recommendationCompilerRules.js +10 -10
- package/dist/config/migrator/radioButtonMigrator.js +30 -29
- package/dist/config/migrator/recommendation/htmlBuilder.js +65 -65
- package/dist/enums/extensions/recommendationBlock.js +101 -46
- package/dist/enums/unsubscribe.js +25 -24
- package/dist/extensions/Blocks/Checkbox/control.js +23 -23
- package/dist/extensions/Blocks/RadioButton/control.js +15 -15
- package/dist/extensions/Blocks/RadioButton/template.js +6 -6
- package/dist/extensions/Blocks/Recommendation/block.js +43 -36
- package/dist/extensions/Blocks/Recommendation/services/configService.js +33 -26
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +35 -26
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +10 -10
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +5 -5
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +26 -13
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +33 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/valibot/dist/index.js +252 -329
- package/dist/package.json.js +1 -1
- package/dist/services/unsubscribeApi.js +6 -6
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +25 -0
- package/dist/src/composables/useEmailTemplateApplier.d.ts +21 -0
- package/dist/src/composables/useGuidoStateBridge.d.ts +22 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +6 -1
- package/dist/src/enums/unsubscribe.d.ts +8 -3
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +11 -3
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +7 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.test.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +21 -0
- package/dist/src/stores/guido-email-editor.d.ts +41 -0
- package/dist/stores/guido-email-editor.js +20 -0
- package/package.json +5 -4
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getRecommendationFeedSourceMaps as g, getOperatorOptions as R, PriceAttributes as y } from "../../../../enums/extensions/recommendationBlock.js";
|
|
2
2
|
import { useRecommendationApi as C } from "../../../../services/recommendationApi.js";
|
|
3
3
|
import { useConfigStore as G } from "../../../../stores/config.js";
|
|
4
4
|
import { defineStore as P } from "pinia";
|
|
5
5
|
import { DEFAULT_CARDS_IN_ROW as F } from "../constants/layout.js";
|
|
6
6
|
import { EXCLUDED_ALGORITHM_IDS as D } from "../constants/defaultConfig.js";
|
|
7
|
-
import { getDefaultProducts as
|
|
7
|
+
import { getDefaultProducts as S } from "../templates/utils.js";
|
|
8
8
|
import { generateCompleteFilterQuery as b } from "../utils/filterUtil.js";
|
|
9
9
|
import { isFilterValid as w } from "../validation/filterSchema.js";
|
|
10
|
+
import { isConfigValid as v } from "../validation/requiredFields.js";
|
|
10
11
|
const h = C();
|
|
11
|
-
let
|
|
12
|
+
let m = null, u = null, d = null;
|
|
12
13
|
function k() {
|
|
13
14
|
return {
|
|
14
15
|
cardsInRow: F,
|
|
@@ -48,7 +49,7 @@ function I() {
|
|
|
48
49
|
filterSnapshot: null
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
const
|
|
52
|
+
const N = () => ({
|
|
52
53
|
recommendationCampaignUrls: {},
|
|
53
54
|
activePredictiveAlgorithms: [],
|
|
54
55
|
languages: {},
|
|
@@ -57,8 +58,8 @@ const v = () => ({
|
|
|
57
58
|
blockStates: {},
|
|
58
59
|
currentRecommendationId: null,
|
|
59
60
|
configVersion: 0
|
|
60
|
-
}),
|
|
61
|
-
state: () =>
|
|
61
|
+
}), M = P("guidoRecommendationExtension", {
|
|
62
|
+
state: () => N(),
|
|
62
63
|
getters: {
|
|
63
64
|
// ====================================================================
|
|
64
65
|
// Proxy Getters — Backward Compatible Access to Current Block State
|
|
@@ -113,12 +114,12 @@ const v = () => ({
|
|
|
113
114
|
return [...new Set(t.map((e) => e.filterGroup))].sort((e, r) => e - r);
|
|
114
115
|
},
|
|
115
116
|
getActivePredictiveAlgorithms: (t) => {
|
|
116
|
-
const e = [];
|
|
117
|
-
return t.activePredictiveAlgorithms.filter((
|
|
118
|
-
|
|
119
|
-
}),
|
|
120
|
-
text:
|
|
121
|
-
value:
|
|
117
|
+
const e = g(), r = [];
|
|
118
|
+
return t.activePredictiveAlgorithms.filter((n) => !D.includes(n)).forEach((n) => {
|
|
119
|
+
r.push(...e.filter((c) => c.id === n));
|
|
120
|
+
}), r.map((n) => ({
|
|
121
|
+
text: n.name,
|
|
122
|
+
value: n.key
|
|
122
123
|
}));
|
|
123
124
|
},
|
|
124
125
|
getLanguages: (t) => Object.entries(t.languages).map(([e, r]) => ({
|
|
@@ -293,11 +294,11 @@ const v = () => ({
|
|
|
293
294
|
// ====================================================================
|
|
294
295
|
async fetchRecommendationCreateData() {
|
|
295
296
|
if (!this.activePredictiveAlgorithms.length) {
|
|
296
|
-
if (
|
|
297
|
-
await
|
|
297
|
+
if (m) {
|
|
298
|
+
await m;
|
|
298
299
|
return;
|
|
299
300
|
}
|
|
300
|
-
|
|
301
|
+
m = (async () => {
|
|
301
302
|
const {
|
|
302
303
|
activePredictiveAlgorithms: t,
|
|
303
304
|
languages: e,
|
|
@@ -310,26 +311,26 @@ const v = () => ({
|
|
|
310
311
|
this.currencyList = r;
|
|
311
312
|
})();
|
|
312
313
|
try {
|
|
313
|
-
await
|
|
314
|
+
await m;
|
|
314
315
|
} finally {
|
|
315
|
-
|
|
316
|
+
m = null;
|
|
316
317
|
}
|
|
317
318
|
}
|
|
318
319
|
},
|
|
319
320
|
async fetchRecommendationFilters() {
|
|
320
321
|
if (!Object.keys(this.filterList).length) {
|
|
321
|
-
if (
|
|
322
|
-
await
|
|
322
|
+
if (u) {
|
|
323
|
+
await u;
|
|
323
324
|
return;
|
|
324
325
|
}
|
|
325
|
-
|
|
326
|
+
u = (async () => {
|
|
326
327
|
const t = await h.fetchRecommendationFilters();
|
|
327
328
|
this.filterList = t;
|
|
328
329
|
})();
|
|
329
330
|
try {
|
|
330
|
-
await
|
|
331
|
+
await u;
|
|
331
332
|
} finally {
|
|
332
|
-
|
|
333
|
+
u = null;
|
|
333
334
|
}
|
|
334
335
|
}
|
|
335
336
|
},
|
|
@@ -398,6 +399,14 @@ const v = () => ({
|
|
|
398
399
|
generateFilterQuery() {
|
|
399
400
|
return b(this.recommendationConfigs.filters);
|
|
400
401
|
},
|
|
402
|
+
/**
|
|
403
|
+
* Validation-only check invoked at save-CTA time. Defined as an action
|
|
404
|
+
* (not a getter) so reading it does not register reactive tracking on
|
|
405
|
+
* every block's recommendationConfigs across user edits.
|
|
406
|
+
*/
|
|
407
|
+
hasInvalidBlock() {
|
|
408
|
+
return Object.values(this.blockStates).some((t) => !v(t.recommendationConfigs, this));
|
|
409
|
+
},
|
|
401
410
|
// ====================================================================
|
|
402
411
|
// Per-Block Product Fetching
|
|
403
412
|
// ====================================================================
|
|
@@ -417,7 +426,7 @@ const v = () => ({
|
|
|
417
426
|
},
|
|
418
427
|
async _doFetchProducts() {
|
|
419
428
|
var p;
|
|
420
|
-
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = r.filters.filter((l) => l.isValid), c = b(n), i = ((p =
|
|
429
|
+
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = r.filters.filter((l) => l.isValid), c = b(n), i = ((p = g().find((l) => l.key === r.strategy)) == null ? void 0 : p.path) || "", o = G(), s = parseInt(r.size) || 6, a = {
|
|
421
430
|
locale: r.language,
|
|
422
431
|
currency: r.currencySettings.value,
|
|
423
432
|
partnerName: o.partnerName,
|
|
@@ -433,15 +442,15 @@ const v = () => ({
|
|
|
433
442
|
f = [];
|
|
434
443
|
}
|
|
435
444
|
if (this.blockStates[t]) {
|
|
436
|
-
const l = f.length > 0 ? f :
|
|
445
|
+
const l = f.length > 0 ? f : S(s);
|
|
437
446
|
l.length < s ? this.blockStates[t].recommendationProducts = [
|
|
438
447
|
...l,
|
|
439
|
-
...
|
|
448
|
+
...S(s - l.length)
|
|
440
449
|
] : l.length > s ? this.blockStates[t].recommendationProducts = l.slice(0, s) : this.blockStates[t].recommendationProducts = l;
|
|
441
450
|
}
|
|
442
451
|
}
|
|
443
452
|
}
|
|
444
453
|
});
|
|
445
454
|
export {
|
|
446
|
-
|
|
455
|
+
M as useRecommendationExtensionStore
|
|
447
456
|
};
|
|
@@ -2,7 +2,7 @@ import { RecommendationBlockId as s } from "../../constants/blockIds.js";
|
|
|
2
2
|
import { ATTR_PRODUCT_ATTR as b, ATTR_PRODUCT_BUTTON as u, ATTR_PRODUCT_OMNIBUS_DISCOUNT as m, ATTR_PRODUCT_OMNIBUS_PRICE as h, ATTR_PRODUCT_OLD_PRICE as y, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_NAME as f, ATTR_PRODUCT_IMAGE as x } from "../../constants/selectors.js";
|
|
3
3
|
import { useRecommendationExtensionStore as _ } from "../../store/recommendation.js";
|
|
4
4
|
import { formatPrice as $ } from "../../utils/priceFormatter.js";
|
|
5
|
-
import {
|
|
5
|
+
import { CUSTOM_CELL_HTML as C, sanitizeImageUrl as R } from "../utils.js";
|
|
6
6
|
const a = "0 5px", l = "attribute-cell";
|
|
7
7
|
function p() {
|
|
8
8
|
const t = _(), { currencySettings: e } = t.recommendationConfigs;
|
|
@@ -15,7 +15,7 @@ function p() {
|
|
|
15
15
|
thousandSeparator: e.thousandSeparator
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function r(t, e = "price") {
|
|
19
19
|
const o = p(), n = t[e], d = (n == null ? void 0 : n[o.code]) ?? Object.values(n ?? {})[0] ?? 0;
|
|
20
20
|
return $({
|
|
21
21
|
price: d,
|
|
@@ -40,7 +40,7 @@ const I = {
|
|
|
40
40
|
esd-extension-block-id="${s.IMAGE}">
|
|
41
41
|
<a target="_blank" href="${t.url}">
|
|
42
42
|
<img
|
|
43
|
-
src="${
|
|
43
|
+
src="${R(t.image_url)}"
|
|
44
44
|
alt="${t.name}"
|
|
45
45
|
style="display: block; max-width: 100%; height: auto;"
|
|
46
46
|
class="adapt-img">
|
|
@@ -92,7 +92,7 @@ const I = {
|
|
|
92
92
|
align="center"
|
|
93
93
|
esd-extension-block-id="${s.PRICE}">
|
|
94
94
|
<p contenteditable="false" style="font-size: 16px; color: #333333;">
|
|
95
|
-
<strong>${
|
|
95
|
+
<strong>${r(t, "price")}</strong>
|
|
96
96
|
</p>
|
|
97
97
|
</td>
|
|
98
98
|
</tr>
|
|
@@ -116,7 +116,7 @@ const I = {
|
|
|
116
116
|
align="center"
|
|
117
117
|
esd-extension-block-id="${s.OLD_PRICE}">
|
|
118
118
|
<p contenteditable="false" style="font-size: 14px; color: #999999;">
|
|
119
|
-
<strong>${
|
|
119
|
+
<strong>${r(t, "original_price")}</strong>
|
|
120
120
|
</p>
|
|
121
121
|
</td>
|
|
122
122
|
</tr>
|
|
@@ -143,7 +143,7 @@ const I = {
|
|
|
143
143
|
esd-extension-block-id="${s.OMNIBUS_PRICE}">
|
|
144
144
|
<p contenteditable="false" style="font-size: 12px; color: #666666;">
|
|
145
145
|
<span class="omnibus-text-before">Lowest 30-day price: </span>
|
|
146
|
-
<span class="omnibus-price-value">${
|
|
146
|
+
<span class="omnibus-price-value">${r(t, "original_price")}</span>
|
|
147
147
|
<span class="omnibus-text-after"></span>
|
|
148
148
|
</p>
|
|
149
149
|
</td>
|
|
@@ -153,8 +153,8 @@ const I = {
|
|
|
153
153
|
</td>
|
|
154
154
|
`,
|
|
155
155
|
[m]: (t) => {
|
|
156
|
-
var
|
|
157
|
-
const e = p(), o = ((
|
|
156
|
+
var i, c;
|
|
157
|
+
const e = p(), o = ((i = t.original_price) == null ? void 0 : i[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, n = ((c = t.price) == null ? void 0 : c[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, d = o > 0 ? Math.round((o - n) / o * 100) : 0, g = d > 0 ? `-${d}%` : "0%";
|
|
158
158
|
return `
|
|
159
159
|
<td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
|
|
160
160
|
<table
|
|
@@ -208,7 +208,7 @@ const I = {
|
|
|
208
208
|
">
|
|
209
209
|
<a
|
|
210
210
|
href="#"
|
|
211
|
-
class="es-button
|
|
211
|
+
class="es-button reco-v3-button"
|
|
212
212
|
target="_blank"
|
|
213
213
|
style="
|
|
214
214
|
color: rgb(56, 118, 29);
|
|
@@ -236,7 +236,7 @@ const I = {
|
|
|
236
236
|
* @param productAttrValue - Resolved product-attr value (e.g., "brand" for default, "product_attribute.rating_star" for custom)
|
|
237
237
|
* @param content - Display content for the cell
|
|
238
238
|
*/
|
|
239
|
-
[
|
|
239
|
+
[C]: (t, e) => `
|
|
240
240
|
<td class="${l}" style="padding: ${a}; height: 100%;" valign="middle">
|
|
241
241
|
<table
|
|
242
242
|
class="product-card-segment"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_PRODUCTS_PER_ROW as L } from "../../constants/layout.js";
|
|
2
|
-
import { getDefaultProducts as E,
|
|
2
|
+
import { getDefaultProducts as E, DEFAULTS as I, createBlockTemplate as _, DEFAULT_CARD_COMPOSITION as S, spacer as b, buildElementRenderer as A, DEFAULT_CARD_VISIBILITY as f } from "../utils.js";
|
|
3
3
|
import { ATTRIBUTE_CELL_CLASS as w, DEFAULT_CELL_PADDING as D, gridElementRenderer as C } from "./elementRenderer.js";
|
|
4
4
|
const O = `
|
|
5
5
|
<tr class="recommendation-product-row">
|
|
@@ -53,8 +53,8 @@ function h(t, e, o, r = {}) {
|
|
|
53
53
|
return U(t, e, C, o, r);
|
|
54
54
|
}
|
|
55
55
|
function F(t) {
|
|
56
|
-
const e = t ? `ins-recommendation-v3-block-${t}` : void 0, o =
|
|
57
|
-
return o.replace("{-{-TITLE-}-}",
|
|
56
|
+
const e = t ? `ins-recommendation-v3-block-${t}` : void 0, o = _("grid", e), r = E(), n = h(r, L);
|
|
57
|
+
return o.replace("{-{-TITLE-}-}", I.TITLE).replace("{-{-PRODUCT_ROWS-}-}", n).replace("{-{-MOBILE_PRODUCT_ROWS-}-}", "");
|
|
58
58
|
}
|
|
59
59
|
export {
|
|
60
60
|
F as getDefaultTemplate,
|
|
@@ -2,7 +2,7 @@ import { RecommendationBlockId as o } from "../../constants/blockIds.js";
|
|
|
2
2
|
import { ATTR_PRODUCT_ATTR as m, ATTR_PRODUCT_BUTTON as c, ATTR_PRODUCT_IMAGE as d, ATTR_PRODUCT_OMNIBUS_DISCOUNT as u, ATTR_PRODUCT_OMNIBUS_PRICE as g, ATTR_PRODUCT_OLD_PRICE as f, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_NAME as x } from "../../constants/selectors.js";
|
|
3
3
|
import { useRecommendationExtensionStore as _ } from "../../store/recommendation.js";
|
|
4
4
|
import { formatPrice as R } from "../../utils/priceFormatter.js";
|
|
5
|
-
import {
|
|
5
|
+
import { CUSTOM_CELL_HTML as C, sanitizeImageUrl as y } from "../utils.js";
|
|
6
6
|
function p() {
|
|
7
7
|
const t = _(), { currencySettings: e } = t.recommendationConfigs;
|
|
8
8
|
return {
|
|
@@ -15,9 +15,9 @@ function p() {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
function s(t, e = "price") {
|
|
18
|
-
const n = p(),
|
|
18
|
+
const n = p(), r = t[e], a = (r == null ? void 0 : r[n.code]) ?? Object.values(r ?? {})[0] ?? 0;
|
|
19
19
|
return R({
|
|
20
|
-
price:
|
|
20
|
+
price: a,
|
|
21
21
|
currency: n
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -115,7 +115,7 @@ const U = {
|
|
|
115
115
|
*/
|
|
116
116
|
[u]: (t) => {
|
|
117
117
|
var i, l;
|
|
118
|
-
const e = p(), n = ((i = t.original_price) == null ? void 0 : i[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0,
|
|
118
|
+
const e = p(), n = ((i = t.original_price) == null ? void 0 : i[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, r = ((l = t.price) == null ? void 0 : l[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, a = n > 0 ? Math.round((n - r) / n * 100) : 0, b = a > 0 ? `-${a}%` : "0%";
|
|
119
119
|
return `
|
|
120
120
|
<tr>
|
|
121
121
|
<td
|
|
@@ -156,7 +156,7 @@ const U = {
|
|
|
156
156
|
<a
|
|
157
157
|
href="${t.url}"
|
|
158
158
|
target="_blank"
|
|
159
|
-
class="es-button
|
|
159
|
+
class="es-button reco-v3-button"
|
|
160
160
|
style="
|
|
161
161
|
color: rgb(56, 118, 29);
|
|
162
162
|
background: rgb(217, 234, 211);
|
|
@@ -1,31 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
import { OP_ANY_OF as l } from "../../../../enums/extensions/recommendationBlock.js";
|
|
2
|
+
function m(t) {
|
|
3
|
+
try {
|
|
4
|
+
return decodeURIComponent(t);
|
|
5
|
+
} catch {
|
|
6
|
+
return t;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function f(t) {
|
|
10
|
+
return t.split(",").filter(Boolean).map(m);
|
|
11
|
+
}
|
|
12
|
+
function y(t) {
|
|
2
13
|
if (t.length === 0)
|
|
3
14
|
return "";
|
|
4
15
|
const o = t.sort((r, e) => r.filterNumber - e.filterNumber), u = o.map((r) => {
|
|
5
|
-
const e = r.operator ===
|
|
6
|
-
return `[${r.attribute}][${a}][${c}]`;
|
|
7
|
-
}), [
|
|
8
|
-
let n =
|
|
16
|
+
const e = r.operator === l, a = e ? "=" : r.operator, c = e ? f(r.value).join(l) : r.value;
|
|
17
|
+
return `[${r.attribute}][${encodeURIComponent(a)}][${c}]`;
|
|
18
|
+
}), [i, ...p] = u;
|
|
19
|
+
let n = i;
|
|
9
20
|
for (let r = 0; r < p.length; r++) {
|
|
10
21
|
const e = o[r].innerGroupOperator;
|
|
11
22
|
n += `${e}${p[r]}`;
|
|
12
23
|
}
|
|
13
24
|
return `(${n})`;
|
|
14
25
|
}
|
|
15
|
-
function
|
|
26
|
+
function g(t) {
|
|
16
27
|
if (!t || t.length === 0)
|
|
17
28
|
return "";
|
|
18
|
-
const o = t.reduce((r, e) => (r[e.filterGroup] || (r[e.filterGroup] = []), r[e.filterGroup].push(e), r), {}), u = Object.keys(o).map(Number).sort((r, e) => r - e),
|
|
29
|
+
const o = t.reduce((r, e) => (r[e.filterGroup] || (r[e.filterGroup] = []), r[e.filterGroup].push(e), r), {}), u = Object.keys(o).map(Number).sort((r, e) => r - e), i = u.map((r) => {
|
|
19
30
|
const e = o[r];
|
|
20
|
-
return
|
|
21
|
-
}), [p, ...n] =
|
|
22
|
-
let
|
|
31
|
+
return y(e);
|
|
32
|
+
}), [p, ...n] = i;
|
|
33
|
+
let s = p;
|
|
23
34
|
for (let r = 0; r < n.length; r++) {
|
|
24
35
|
const e = u[r + 1], c = o[e][0].outerGroupOperator;
|
|
25
|
-
|
|
36
|
+
s += `${c}${n[r]}`;
|
|
26
37
|
}
|
|
27
|
-
return
|
|
38
|
+
return s.trim();
|
|
28
39
|
}
|
|
29
40
|
export {
|
|
30
|
-
|
|
41
|
+
g as generateCompleteFilterQuery,
|
|
42
|
+
f as parseTagList,
|
|
43
|
+
m as safeDecodeURIComponent
|
|
31
44
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const o = [
|
|
2
|
+
{
|
|
3
|
+
key: "locale",
|
|
4
|
+
getValue: (e) => e.language,
|
|
5
|
+
getAvailableOptions: (e) => Object.keys(e.languages)
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
key: "currency",
|
|
9
|
+
getValue: (e) => e.currencySettings.value,
|
|
10
|
+
getAvailableOptions: (e) => e.currencyList.map((n) => n.text)
|
|
11
|
+
}
|
|
12
|
+
], l = "newsletter.recommendation-fill-required-fields";
|
|
13
|
+
function u(e, n) {
|
|
14
|
+
return o.filter((t) => {
|
|
15
|
+
var a;
|
|
16
|
+
if (t.condition && !t.condition(e))
|
|
17
|
+
return !1;
|
|
18
|
+
const i = t.getValue(e);
|
|
19
|
+
if (!i)
|
|
20
|
+
return !0;
|
|
21
|
+
const r = (a = t.getAvailableOptions) == null ? void 0 : a.call(t, n);
|
|
22
|
+
return r !== void 0 && !r.includes(i);
|
|
23
|
+
}).map((t) => t.key);
|
|
24
|
+
}
|
|
25
|
+
function s(e, n) {
|
|
26
|
+
return u(e, n).length === 0;
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
o as REQUIRED_RECOMMENDATION_FIELDS,
|
|
30
|
+
l as RecommendationRequiredFieldsKey,
|
|
31
|
+
u as getInvalidFields,
|
|
32
|
+
s as isConfigValid
|
|
33
|
+
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-
|
|
1
|
+
.gap-16[data-v-8053a037],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .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-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__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-4e2a4adb]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-cdee3452]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-cdee3452]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-cdee3452]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .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-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{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-7419ae06] .vueperslides__bullets,[data-v-796d193b] .vueperslides__bullets{pointer-events:none!important}[data-v-796d193b] .vueperslides__parallax-wrapper{height:110px!important}[data-v-cadfc82d] .vueperslides__bullets{pointer-events:none!important}[data-v-cadfc82d] .vueperslides__parallax-wrapper{height:110px!important}
|