@useinsider/guido 3.11.0-beta.f4ab671 → 3.11.0
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 +84 -105
- package/dist/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/HeaderWrapper.vue.js +3 -3
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +0 -2
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +2 -2
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +9 -9
- package/dist/composables/useStripo.js +67 -70
- package/dist/guido.css +1 -1
- package/dist/node_modules/valibot/dist/index.js +112 -148
- package/dist/src/@types/config/schemas.d.ts +0 -32
- package/dist/src/@types/generic.d.ts +0 -18
- package/dist/src/composables/useConfig.d.ts +0 -6
- package/dist/src/composables/useHtmlValidator.test.d.ts +1 -0
- package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +1 -0
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/config.d.ts +0 -54
- package/dist/src/utils/genericUtil.d.ts +1 -18
- package/dist/utils/genericUtil.js +21 -42
- package/package.json +1 -10
- package/dist/composables/useModuleDynamicContentRepair.js +0 -37
- package/dist/src/composables/useModuleDynamicContentRepair.d.ts +0 -18
- package/dist/src/utils/dynamicContentConverter.d.ts +0 -27
- package/dist/utils/dynamicContentConverter.js +0 -31
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
2
|
-
import { object as a, number as
|
|
1
|
+
import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
|
|
2
|
+
import { object as a, number as s, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as h, boolean as o, array as c, record as k, literal as i, looseObject as y, variant as g, union as f, unknown as n } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const d = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -12,7 +12,7 @@ const d = {
|
|
|
12
12
|
ARCHITECT: 49,
|
|
13
13
|
/** Unsubscribe page builder */
|
|
14
14
|
UNSUBSCRIBE_PAGES: 97
|
|
15
|
-
},
|
|
15
|
+
}, R = a({
|
|
16
16
|
/** Unique identifier for the template being edited */
|
|
17
17
|
templateId: p(
|
|
18
18
|
t(),
|
|
@@ -25,12 +25,12 @@ const d = {
|
|
|
25
25
|
),
|
|
26
26
|
/** Optional variation ID for A/B testing */
|
|
27
27
|
variationId: e(t())
|
|
28
|
-
}),
|
|
28
|
+
}), T = a({
|
|
29
29
|
/** Fallback font name (e.g., "Georgia") */
|
|
30
30
|
name: t(),
|
|
31
31
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
32
32
|
family: t()
|
|
33
|
-
}),
|
|
33
|
+
}), C = a({
|
|
34
34
|
/** Partner/organization name (required) */
|
|
35
35
|
name: p(
|
|
36
36
|
t(),
|
|
@@ -53,8 +53,8 @@ const d = {
|
|
|
53
53
|
/** Display name for the current user */
|
|
54
54
|
username: e(t(), "Guido User"),
|
|
55
55
|
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
56
|
-
fallbackFont: e(
|
|
57
|
-
}),
|
|
56
|
+
fallbackFont: e(T)
|
|
57
|
+
}), A = a({
|
|
58
58
|
/** Display text for the dynamic content */
|
|
59
59
|
text: t(),
|
|
60
60
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -68,46 +68,35 @@ const d = {
|
|
|
68
68
|
value: t()
|
|
69
69
|
})
|
|
70
70
|
)
|
|
71
|
-
}),
|
|
72
|
-
text: e(t()),
|
|
73
|
-
// eslint-disable-next-line camelcase -- backend field name
|
|
74
|
-
tag_text: e(t()),
|
|
75
|
-
value: e(t()),
|
|
76
|
-
children: e(c(S)),
|
|
77
|
-
// eslint-disable-next-line camelcase -- backend field name
|
|
78
|
-
select_items: e(c(S))
|
|
79
|
-
})), P = k(
|
|
80
|
-
t(),
|
|
81
|
-
C(c(S), [])
|
|
82
|
-
), D = g({
|
|
71
|
+
}), I = y({
|
|
83
72
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
84
|
-
id: e(
|
|
73
|
+
id: e(s()),
|
|
85
74
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
86
|
-
decimalCount: e(
|
|
75
|
+
decimalCount: e(f([t(), s()])),
|
|
87
76
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
88
|
-
productIds: e(c(
|
|
77
|
+
productIds: e(c(n())),
|
|
89
78
|
/** Whether the block requested live products at send time */
|
|
90
79
|
sendProductRequestFlag: e(o()),
|
|
91
80
|
/** Whether to randomize product order */
|
|
92
81
|
shuffleProducts: e(o()),
|
|
93
82
|
/** Filter rules driving product selection */
|
|
94
|
-
filters: e(c(
|
|
83
|
+
filters: e(c(n())),
|
|
95
84
|
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
96
85
|
currency: e(t()),
|
|
97
86
|
/** Currency display settings (separators, alignment, decimals) */
|
|
98
|
-
currencySettings: e(
|
|
87
|
+
currencySettings: e(n()),
|
|
99
88
|
/** Locale (e.g. 'nl_NL') */
|
|
100
89
|
language: e(t()),
|
|
101
90
|
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
102
91
|
strategy: e(t()),
|
|
103
92
|
/** Snapshot of products as rendered by the legacy block */
|
|
104
|
-
recommendedProducts: e(c(
|
|
93
|
+
recommendedProducts: e(c(n())),
|
|
105
94
|
/** Number of product cards per row */
|
|
106
|
-
cardsInRow: e(
|
|
95
|
+
cardsInRow: e(s()),
|
|
107
96
|
/** Mobile-only padding (right) */
|
|
108
|
-
mobileRightPadding: e(
|
|
97
|
+
mobileRightPadding: e(s()),
|
|
109
98
|
/** Mobile-only padding (left) */
|
|
110
|
-
mobileLeftPadding: e(
|
|
99
|
+
mobileLeftPadding: e(s()),
|
|
111
100
|
/** Disable responsive scaling */
|
|
112
101
|
unresponsive: e(o()),
|
|
113
102
|
/** Layout orientation ('vertical' | 'horizontal') */
|
|
@@ -117,14 +106,14 @@ const d = {
|
|
|
117
106
|
/** Block type marker used by some legacy variants */
|
|
118
107
|
blockType: e(t()),
|
|
119
108
|
/** Size variant marker (legacy data may use string or number) */
|
|
120
|
-
size: e(
|
|
109
|
+
size: e(f([t(), s()])),
|
|
121
110
|
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
122
111
|
verticalResponsiveness: e(o()),
|
|
123
112
|
/** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
|
|
124
113
|
isPriceMovedToNextLine: e(o()),
|
|
125
114
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
126
115
|
isPriceDeletedForZeroSale: e(o())
|
|
127
|
-
}),
|
|
116
|
+
}), L = a({
|
|
128
117
|
/**
|
|
129
118
|
* Legacy recommendation block configs keyed by block ID.
|
|
130
119
|
* Pass this when loading a template authored with the v1
|
|
@@ -132,59 +121,51 @@ const d = {
|
|
|
132
121
|
* strategy, currency, locale, and layout data.
|
|
133
122
|
*/
|
|
134
123
|
recommendationConfigs: e(
|
|
135
|
-
k(t(),
|
|
124
|
+
k(t(), I),
|
|
136
125
|
{}
|
|
137
126
|
)
|
|
138
|
-
}),
|
|
127
|
+
}), P = a({
|
|
139
128
|
/** Initial HTML content */
|
|
140
129
|
html: e(t(), ""),
|
|
141
130
|
/** Initial CSS content */
|
|
142
131
|
css: e(t(), ""),
|
|
143
132
|
/** Preselected dynamic content items */
|
|
144
133
|
preselectedDynamicContent: e(
|
|
145
|
-
c(
|
|
134
|
+
c(A),
|
|
146
135
|
[]
|
|
147
136
|
),
|
|
148
|
-
/**
|
|
149
|
-
* Partner-keyed set of dynamic-content items the account offers, e.g.
|
|
150
|
-
* `{ [partnerName]: [{ text, value, children }] }`. Guido flattens it
|
|
151
|
-
* (union across partners, leaf attributes only) into the label→token map
|
|
152
|
-
* that repairs label-form placeholders (`{{ Phone Number }}`) in dropped
|
|
153
|
-
* saved modules.
|
|
154
|
-
*/
|
|
155
|
-
dynamicContentList: e(P, {}),
|
|
156
137
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
157
138
|
customFieldAttributes: e(c(t()), []),
|
|
158
139
|
/** Selected unsubscribe page IDs */
|
|
159
|
-
selectedUnsubscribePages: e(c(
|
|
140
|
+
selectedUnsubscribePages: e(c(s()), []),
|
|
160
141
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
161
142
|
forceRecreate: e(o(), !1),
|
|
162
143
|
/** Migration-only inputs (legacy block configs) */
|
|
163
|
-
migration: e(
|
|
164
|
-
}),
|
|
144
|
+
migration: e(L, {})
|
|
145
|
+
}), v = a({
|
|
165
146
|
/** Sender display name */
|
|
166
147
|
senderName: e(t(), ""),
|
|
167
148
|
/** Email subject line */
|
|
168
149
|
subject: e(t(), "")
|
|
169
|
-
}),
|
|
150
|
+
}), E = a({
|
|
170
151
|
/** Locale for the editor UI */
|
|
171
152
|
locale: e(t(), "en"),
|
|
172
153
|
/** Path to translations object */
|
|
173
154
|
translationsPath: e(t(), "window.trans[Object.keys(window.trans)[0]]"),
|
|
174
155
|
/** Migration date for template compatibility */
|
|
175
|
-
migrationDate: e(
|
|
156
|
+
migrationDate: e(s(), 1759696858),
|
|
176
157
|
/** Email header settings */
|
|
177
|
-
emailHeader: e(
|
|
158
|
+
emailHeader: e(v, { senderName: "", subject: "" }),
|
|
178
159
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
179
|
-
savedModulesFolderName: e(t(),
|
|
160
|
+
savedModulesFolderName: e(t(), S.SAVED_MODULES),
|
|
180
161
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
181
|
-
defaultModulesFolderName: e(t(),
|
|
182
|
-
}),
|
|
162
|
+
defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
|
|
163
|
+
}), M = a({
|
|
183
164
|
/** Whether to show the header bar */
|
|
184
165
|
showHeader: e(o(), !0),
|
|
185
166
|
/** Custom label for back button (if shown) */
|
|
186
167
|
backButtonLabel: e(t())
|
|
187
|
-
}),
|
|
168
|
+
}), O = a({
|
|
188
169
|
/** Enable dynamic content insertion */
|
|
189
170
|
dynamicContent: e(o(), !0),
|
|
190
171
|
/** Enable save as template functionality */
|
|
@@ -203,7 +184,7 @@ const d = {
|
|
|
203
184
|
liquidSyntax: e(o(), !1),
|
|
204
185
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
205
186
|
autosave: e(o(), !1)
|
|
206
|
-
}),
|
|
187
|
+
}), N = l([
|
|
207
188
|
"amp-accordion",
|
|
208
189
|
"amp-carousel",
|
|
209
190
|
"amp-form-controls",
|
|
@@ -217,7 +198,7 @@ const d = {
|
|
|
217
198
|
"text-block",
|
|
218
199
|
"timer-block",
|
|
219
200
|
"video-block"
|
|
220
|
-
]),
|
|
201
|
+
]), D = l([
|
|
221
202
|
"dynamic-content",
|
|
222
203
|
"checkbox-block",
|
|
223
204
|
"radio-button-block",
|
|
@@ -225,15 +206,15 @@ const d = {
|
|
|
225
206
|
"unsubscribe-block",
|
|
226
207
|
"coupon-block",
|
|
227
208
|
"items-block"
|
|
228
|
-
]),
|
|
209
|
+
]), x = a({
|
|
229
210
|
/** Default blocks to exclude from the editor */
|
|
230
211
|
excludeDefaults: e(
|
|
231
|
-
c(
|
|
212
|
+
c(N),
|
|
232
213
|
[]
|
|
233
214
|
),
|
|
234
215
|
/** Custom blocks to include in the editor */
|
|
235
216
|
includeCustoms: e(
|
|
236
|
-
c(
|
|
217
|
+
c(D),
|
|
237
218
|
[]
|
|
238
219
|
)
|
|
239
220
|
}), m = a({
|
|
@@ -242,8 +223,8 @@ const d = {
|
|
|
242
223
|
/** Human-readable description */
|
|
243
224
|
description: e(t()),
|
|
244
225
|
/** Priority for rule ordering (lower = earlier) */
|
|
245
|
-
priority:
|
|
246
|
-
}),
|
|
226
|
+
priority: s()
|
|
227
|
+
}), F = a({
|
|
247
228
|
...m.entries,
|
|
248
229
|
type: i("replace"),
|
|
249
230
|
/** String to search for */
|
|
@@ -252,7 +233,7 @@ const d = {
|
|
|
252
233
|
replacement: t(),
|
|
253
234
|
/** Replace all occurrences (default: false) */
|
|
254
235
|
replaceAll: e(o())
|
|
255
|
-
}),
|
|
236
|
+
}), U = a({
|
|
256
237
|
...m.entries,
|
|
257
238
|
type: i("regex"),
|
|
258
239
|
/** Regex pattern string */
|
|
@@ -261,87 +242,85 @@ const d = {
|
|
|
261
242
|
replacement: t(),
|
|
262
243
|
/** Regex flags (e.g., 'gi') */
|
|
263
244
|
flags: e(t())
|
|
264
|
-
}),
|
|
245
|
+
}), B = a({
|
|
265
246
|
...m.entries,
|
|
266
247
|
type: i("remove"),
|
|
267
248
|
/** Strings or patterns to remove */
|
|
268
249
|
targets: c(t())
|
|
269
|
-
}),
|
|
250
|
+
}), w = a({
|
|
270
251
|
...m.entries,
|
|
271
252
|
type: i("custom"),
|
|
272
253
|
/** Custom processor function */
|
|
273
|
-
processor:
|
|
254
|
+
processor: h(
|
|
274
255
|
(u) => typeof u == "function",
|
|
275
256
|
"processor must be a function"
|
|
276
257
|
)
|
|
277
|
-
}),
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
]),
|
|
258
|
+
}), H = g("type", [
|
|
259
|
+
F,
|
|
260
|
+
U,
|
|
261
|
+
B,
|
|
262
|
+
w
|
|
263
|
+
]), j = a({
|
|
283
264
|
/** Custom compiler rules to apply */
|
|
284
|
-
customRules: e(c(
|
|
265
|
+
customRules: e(c(H), []),
|
|
285
266
|
/** Skip default compiler rules */
|
|
286
267
|
ignoreDefaultRules: e(o(), !1)
|
|
287
|
-
}),
|
|
268
|
+
}), q = a({
|
|
288
269
|
/**
|
|
289
270
|
* External validation handler called before save completes.
|
|
290
271
|
* Return false to cancel the save operation.
|
|
291
272
|
*/
|
|
292
273
|
externalValidation: e(
|
|
293
|
-
|
|
274
|
+
h(
|
|
294
275
|
(u) => typeof u == "function",
|
|
295
276
|
"externalValidation must be a function"
|
|
296
277
|
)
|
|
297
278
|
)
|
|
298
|
-
}),
|
|
279
|
+
}), V = a({
|
|
299
280
|
// Required sections
|
|
300
281
|
/** Identity configuration (required) */
|
|
301
|
-
identity:
|
|
282
|
+
identity: R,
|
|
302
283
|
/** Partner configuration (required) */
|
|
303
|
-
partner:
|
|
284
|
+
partner: C,
|
|
304
285
|
// Optional sections (with defaults)
|
|
305
286
|
/** Template content and presets */
|
|
306
|
-
template: e(
|
|
287
|
+
template: e(P, {}),
|
|
307
288
|
/** Editor settings */
|
|
308
|
-
editor: e(
|
|
289
|
+
editor: e(E, {}),
|
|
309
290
|
/** UI configuration */
|
|
310
|
-
ui: e(
|
|
291
|
+
ui: e(M, {}),
|
|
311
292
|
/** Feature toggles */
|
|
312
|
-
features: e(
|
|
293
|
+
features: e(O, {}),
|
|
313
294
|
/** Block configuration */
|
|
314
|
-
blocks: e(
|
|
295
|
+
blocks: e(x, {}),
|
|
315
296
|
/** Compiler configuration */
|
|
316
|
-
compiler: e(
|
|
297
|
+
compiler: e(j, {}),
|
|
317
298
|
/** Callbacks and event handlers */
|
|
318
|
-
callbacks: e(
|
|
299
|
+
callbacks: e(q, {})
|
|
319
300
|
});
|
|
320
301
|
export {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
v as
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
A as IdentitySchema,
|
|
337
|
-
D as LegacyRecommendationConfigSchema,
|
|
302
|
+
x as BlocksSchema,
|
|
303
|
+
q as CallbacksSchema,
|
|
304
|
+
H as CompilerRuleSchema,
|
|
305
|
+
j as CompilerSchema,
|
|
306
|
+
D as CustomBlockTypeSchema,
|
|
307
|
+
w as CustomRuleSchema,
|
|
308
|
+
N as DefaultBlockTypeSchema,
|
|
309
|
+
A as DynamicContentSchema,
|
|
310
|
+
E as EditorSchema,
|
|
311
|
+
v as EmailHeaderSchema,
|
|
312
|
+
T as FallbackFontSchema,
|
|
313
|
+
O as FeaturesSchema,
|
|
314
|
+
V as GuidoConfigSchema,
|
|
315
|
+
R as IdentitySchema,
|
|
316
|
+
I as LegacyRecommendationConfigSchema,
|
|
338
317
|
d as MessageType,
|
|
339
|
-
|
|
318
|
+
C as PartnerSchema,
|
|
340
319
|
r as ProductType,
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
320
|
+
U as RegexRuleSchema,
|
|
321
|
+
B as RemoveRuleSchema,
|
|
322
|
+
F as ReplaceRuleSchema,
|
|
323
|
+
L as TemplateMigrationSchema,
|
|
324
|
+
P as TemplateSchema,
|
|
325
|
+
M as UISchema
|
|
347
326
|
};
|
|
@@ -8,8 +8,6 @@ const c = /* @__PURE__ */ n({
|
|
|
8
8
|
setup(l, { expose: r }) {
|
|
9
9
|
const e = m(null);
|
|
10
10
|
return r({
|
|
11
|
-
// Stryker disable next-line OptionalChaining: RightSlot is always rendered (no
|
|
12
|
-
// v-if), so rightSlotRef.value is never null and `?.` cannot short-circuit.
|
|
13
11
|
handleSave: (t) => {
|
|
14
12
|
var o;
|
|
15
13
|
return (o = e.value) == null ? void 0 : o.handleSave(t);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from "./UnsubscribePageSelection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var o = function() {
|
|
5
5
|
var r = this, e = r._self._c, t = r._self._setupProxy;
|
|
6
6
|
return e(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", size: "large", "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.pageSelectionDrawerStatus, "title-text": t.trans("newsletter.select-a-template") }, on: { cancelOrBackButtonEvent: t.handleBack, onCloseEvent: t.handleClose, primaryButtonEvent: t.handleSave }, scopedSlots: r._u([{ key: "headerBottomSlot", fn: function() {
|
|
@@ -10,13 +10,13 @@ var o = function() {
|
|
|
10
10
|
return t.selectTemplate(s.id);
|
|
11
11
|
} } }, [e(t.InContainer, { staticClass: "template-container o-h", class: { selected: t.unsubscribeStore.getSelectedTemplateByActiveType === s.id }, attrs: { border: t.getBorderClass(s.id) } }, [e("div", { staticClass: "w-1 h-1 d-f j-c-c a-i-c" }, [e("img", { staticClass: "w-1 h-1 thumbnail o-h", attrs: { alt: s.name, src: s.thumbnail } })])]), e("div", { staticClass: "mt-1 f-s-1" }, [r._v(" " + r._s(s.name) + " ")])], 1);
|
|
12
12
|
}), 0)]);
|
|
13
|
-
}, i = [], c = /* @__PURE__ */
|
|
14
|
-
|
|
13
|
+
}, i = [], c = /* @__PURE__ */ a(
|
|
14
|
+
n,
|
|
15
15
|
o,
|
|
16
16
|
i,
|
|
17
17
|
!1,
|
|
18
18
|
null,
|
|
19
|
-
"
|
|
19
|
+
"669fe7cf"
|
|
20
20
|
);
|
|
21
21
|
const _ = c.exports;
|
|
22
22
|
export {
|
|
@@ -29,9 +29,9 @@ const N = /* @__PURE__ */ y({
|
|
|
29
29
|
t();
|
|
30
30
|
}, 500);
|
|
31
31
|
}, m = () => {
|
|
32
|
-
|
|
32
|
+
n(), e.pageSelectionUpdateStatus || document.dispatchEvent(new CustomEvent("unsubscribe:cancel", {
|
|
33
33
|
detail: { blockId: e.pendingBlockId }
|
|
34
|
-
}))
|
|
34
|
+
}));
|
|
35
35
|
}, b = () => {
|
|
36
36
|
if (e.isActiveTypeFirstInCollection) {
|
|
37
37
|
n(), e.pageSelectionUpdateStatus || (e.typeSelectionDrawerStatus = !0);
|
|
@@ -2,15 +2,15 @@ import n from "./UnsubscribeTypeSelection.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var i = function() {
|
|
5
|
-
var
|
|
6
|
-
return s(
|
|
5
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return s(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.typeSelectionDrawerStatus, "title-text": t.trans("unsubscription-preference.select-unsubscribe-page-title") }, on: { cancelOrBackButtonEvent: t.closeModal, onCloseEvent: t.closeModal, primaryButtonEvent: t.selectCollection } }, [s(t.InSegments, { staticClass: "w-1", attrs: { "with-icon": "", align: "vertical", disable: t.isSelecting, "segment-list": t.segmentList, selected: t.selectedCollection, "skeleton-sizing": { width: 495, height: 180 }, "skeleton-status": t.skeletonStatus }, on: { click: t.changeCollection } })], 1);
|
|
7
7
|
}, r = [], c = /* @__PURE__ */ o(
|
|
8
8
|
n,
|
|
9
9
|
i,
|
|
10
10
|
r,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"7a305bb2"
|
|
14
14
|
);
|
|
15
15
|
const _ = c.exports;
|
|
16
16
|
export {
|
|
@@ -10,10 +10,10 @@ import { InSegments as L } from "@useinsider/design-system-vue";
|
|
|
10
10
|
const W = /* @__PURE__ */ _({
|
|
11
11
|
__name: "UnsubscribeTypeSelection",
|
|
12
12
|
setup(k) {
|
|
13
|
-
const t = N(), { showToaster: d } = w(), e = G(), n = b(!1), o = b(!0), r = b(l.GLOBAL_UNSUBSCRIBE),
|
|
13
|
+
const t = N(), { showToaster: d } = w(), e = G(), n = b(!1), o = b(!0), r = b(l.GLOBAL_UNSUBSCRIBE), T = t(
|
|
14
14
|
"unsubscription-preference.select-unsubscribe-page-description",
|
|
15
15
|
{ action: `<a href="${D.GLOBAL_UNSUBSCRIBE}" target="_blank">${t("ds-rules.visit-academy")}</a>` }
|
|
16
|
-
),
|
|
16
|
+
), y = f(() => [
|
|
17
17
|
{
|
|
18
18
|
description: t("unsubscription-preference.type-global-unsubscribe-description"),
|
|
19
19
|
icon: "line-contact-global-unsub-page",
|
|
@@ -31,7 +31,7 @@ const W = /* @__PURE__ */ _({
|
|
|
31
31
|
disable: e.isSubscriptionPreferencesCenterDisabled,
|
|
32
32
|
tooltipText: e.isSubscriptionPreferencesCenterDisabled ? t("unsubscription-preference.pref-center-added") : ""
|
|
33
33
|
}
|
|
34
|
-
]),
|
|
34
|
+
]), g = f(
|
|
35
35
|
() => e.isGlobalUnsubscribeDisabled && e.isSubscriptionPreferencesCenterDisabled
|
|
36
36
|
), C = f(() => ({
|
|
37
37
|
primaryButton: {
|
|
@@ -41,7 +41,7 @@ const W = /* @__PURE__ */ _({
|
|
|
41
41
|
n.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
|
|
42
42
|
),
|
|
43
43
|
loadingStatus: n.value,
|
|
44
|
-
disabledStatus:
|
|
44
|
+
disabledStatus: g.value,
|
|
45
45
|
skeletonStatus: o.value,
|
|
46
46
|
skeletonSizing: { width: 168, height: 40 }
|
|
47
47
|
},
|
|
@@ -53,12 +53,12 @@ const W = /* @__PURE__ */ _({
|
|
|
53
53
|
skeletonStatus: o.value,
|
|
54
54
|
skeletonSizing: { width: 78, height: 40 }
|
|
55
55
|
}
|
|
56
|
-
})),
|
|
57
|
-
e.typeSelectionDrawerStatus
|
|
56
|
+
})), S = (s) => {
|
|
57
|
+
e.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel", {
|
|
58
58
|
detail: { blockId: e.pendingBlockId }
|
|
59
59
|
})), s && setTimeout(() => {
|
|
60
60
|
s();
|
|
61
|
-
}, 500)
|
|
61
|
+
}, 500);
|
|
62
62
|
}, E = (s) => {
|
|
63
63
|
r.value = s;
|
|
64
64
|
}, m = () => {
|
|
@@ -98,14 +98,14 @@ const W = /* @__PURE__ */ _({
|
|
|
98
98
|
}), !1;
|
|
99
99
|
}, B = async () => {
|
|
100
100
|
if (n.value = !0, await e.fetchTemplates(!0), e.setCollection(r.value), !m()) {
|
|
101
|
-
n.value = !1,
|
|
101
|
+
n.value = !1, S();
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
n.value = !1, e.typeSelectionDrawerStatus = !1, e.pageSelectionDrawerStatus = !0;
|
|
105
105
|
};
|
|
106
106
|
return v(() => e.typeSelectionDrawerStatus, (s) => {
|
|
107
107
|
s && (o.value = !0, r.value = l.GLOBAL_UNSUBSCRIBE, e.isGlobalUnsubscribeDisabled && (r.value = e.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), o.value = !1);
|
|
108
|
-
}), { __sfc: !0, trans: t, showToaster: d, unsubscribeStore: e, isSelecting: n, skeletonStatus: o, selectedCollection: r, descriptionText:
|
|
108
|
+
}), { __sfc: !0, trans: t, showToaster: d, unsubscribeStore: e, isSelecting: n, skeletonStatus: o, selectedCollection: r, descriptionText: T, segmentList: y, hasNoSelectableType: g, footerButtonGroupOptions: C, closeModal: S, changeCollection: E, validateTemplates: m, selectCollection: B, WpDrawer: U, InSegments: L };
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
export {
|