@useinsider/guido 3.11.0-beta.181af4d → 3.11.0-beta.1fde696
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 +59 -52
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
- package/dist/components/organisms/header/EditorActions.vue.js +11 -11
- package/dist/components/organisms/header/EditorActions.vue2.js +50 -34
- 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/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +7 -8
- package/dist/components/organisms/header/RightSlot.vue.js +8 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +15 -15
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
- package/dist/composables/useModuleDynamicContentRepair.js +36 -0
- package/dist/composables/useStripo.js +62 -59
- package/dist/config/i18n/en/labels.json.js +0 -17
- package/dist/guido.css +1 -1
- package/dist/node_modules/@vueuse/shared/index.js +28 -40
- package/dist/src/@types/config/schemas.d.ts +36 -4
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +18 -2
- package/dist/src/composables/useHtmlValidator.test.d.ts +1 -0
- package/dist/src/composables/useModuleDynamicContentRepair.d.ts +18 -0
- package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +1 -0
- package/dist/src/stores/config.d.ts +162 -18
- package/dist/src/stores/editor.d.ts +0 -105
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/dynamicContentConverter.d.ts +31 -0
- package/dist/src/utils/genericUtil.d.ts +7 -0
- package/dist/src/utils/timeUtil.d.ts +0 -10
- package/dist/stores/editor.js +1 -5
- package/dist/utils/dynamicContentConverter.js +33 -0
- package/dist/utils/genericUtil.js +26 -19
- package/dist/utils/timeUtil.js +17 -6
- package/package.json +1 -5
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -21
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -39
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -24
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
- package/dist/composables/useAccessibilityApi.js +0 -31
- package/dist/node_modules/@vueuse/core/index.js +0 -102
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +0 -2
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +0 -2
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +0 -2
- package/dist/src/composables/useAccessibilityApi.d.ts +0 -15
- /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
|
|
2
|
-
import { object as a, number as
|
|
2
|
+
import { object as a, number as n, 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 g, variant as R, union as f, unknown as s } 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
|
+
}, C = a({
|
|
16
16
|
/** Unique identifier for the template being edited */
|
|
17
17
|
templateId: p(
|
|
18
18
|
t(),
|
|
@@ -30,7 +30,7 @@ const d = {
|
|
|
30
30
|
name: t(),
|
|
31
31
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
32
32
|
family: t()
|
|
33
|
-
}),
|
|
33
|
+
}), A = a({
|
|
34
34
|
/** Partner/organization name (required) */
|
|
35
35
|
name: p(
|
|
36
36
|
t(),
|
|
@@ -38,7 +38,7 @@ const d = {
|
|
|
38
38
|
),
|
|
39
39
|
/** Product type identifier */
|
|
40
40
|
productType: e(
|
|
41
|
-
|
|
41
|
+
l([
|
|
42
42
|
r.EMAIL,
|
|
43
43
|
r.ARCHITECT,
|
|
44
44
|
r.UNSUBSCRIBE_PAGES
|
|
@@ -47,14 +47,14 @@ const d = {
|
|
|
47
47
|
),
|
|
48
48
|
/** Message type (promotional or transactional) */
|
|
49
49
|
messageType: e(
|
|
50
|
-
|
|
50
|
+
l([d.PROMOTIONAL, d.TRANSACTIONAL]),
|
|
51
51
|
d.PROMOTIONAL
|
|
52
52
|
),
|
|
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
56
|
fallbackFont: e(T)
|
|
57
|
-
}),
|
|
57
|
+
}), y = a({
|
|
58
58
|
/** Display text for the dynamic content */
|
|
59
59
|
text: t(),
|
|
60
60
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -68,35 +68,35 @@ const d = {
|
|
|
68
68
|
value: t()
|
|
69
69
|
})
|
|
70
70
|
)
|
|
71
|
-
}), I =
|
|
71
|
+
}), I = g({
|
|
72
72
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
73
|
-
id: e(
|
|
73
|
+
id: e(n()),
|
|
74
74
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
75
|
-
decimalCount: e(f([t(),
|
|
75
|
+
decimalCount: e(f([t(), n()])),
|
|
76
76
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
77
|
-
productIds: e(c(
|
|
77
|
+
productIds: e(c(s())),
|
|
78
78
|
/** Whether the block requested live products at send time */
|
|
79
79
|
sendProductRequestFlag: e(o()),
|
|
80
80
|
/** Whether to randomize product order */
|
|
81
81
|
shuffleProducts: e(o()),
|
|
82
82
|
/** Filter rules driving product selection */
|
|
83
|
-
filters: e(c(
|
|
83
|
+
filters: e(c(s())),
|
|
84
84
|
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
85
85
|
currency: e(t()),
|
|
86
86
|
/** Currency display settings (separators, alignment, decimals) */
|
|
87
|
-
currencySettings: e(
|
|
87
|
+
currencySettings: e(s()),
|
|
88
88
|
/** Locale (e.g. 'nl_NL') */
|
|
89
89
|
language: e(t()),
|
|
90
90
|
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
91
91
|
strategy: e(t()),
|
|
92
92
|
/** Snapshot of products as rendered by the legacy block */
|
|
93
|
-
recommendedProducts: e(c(
|
|
93
|
+
recommendedProducts: e(c(s())),
|
|
94
94
|
/** Number of product cards per row */
|
|
95
|
-
cardsInRow: e(
|
|
95
|
+
cardsInRow: e(n()),
|
|
96
96
|
/** Mobile-only padding (right) */
|
|
97
|
-
mobileRightPadding: e(
|
|
97
|
+
mobileRightPadding: e(n()),
|
|
98
98
|
/** Mobile-only padding (left) */
|
|
99
|
-
mobileLeftPadding: e(
|
|
99
|
+
mobileLeftPadding: e(n()),
|
|
100
100
|
/** Disable responsive scaling */
|
|
101
101
|
unresponsive: e(o()),
|
|
102
102
|
/** Layout orientation ('vertical' | 'horizontal') */
|
|
@@ -106,14 +106,14 @@ const d = {
|
|
|
106
106
|
/** Block type marker used by some legacy variants */
|
|
107
107
|
blockType: e(t()),
|
|
108
108
|
/** Size variant marker (legacy data may use string or number) */
|
|
109
|
-
size: e(f([t(),
|
|
109
|
+
size: e(f([t(), n()])),
|
|
110
110
|
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
111
111
|
verticalResponsiveness: e(o()),
|
|
112
112
|
/** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
|
|
113
113
|
isPriceMovedToNextLine: e(o()),
|
|
114
114
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
115
115
|
isPriceDeletedForZeroSale: e(o())
|
|
116
|
-
}),
|
|
116
|
+
}), v = a({
|
|
117
117
|
/**
|
|
118
118
|
* Legacy recommendation block configs keyed by block ID.
|
|
119
119
|
* Pass this when loading a template authored with the v1
|
|
@@ -121,28 +121,37 @@ const d = {
|
|
|
121
121
|
* strategy, currency, locale, and layout data.
|
|
122
122
|
*/
|
|
123
123
|
recommendationConfigs: e(
|
|
124
|
-
|
|
124
|
+
k(t(), I),
|
|
125
125
|
{}
|
|
126
126
|
)
|
|
127
|
-
}),
|
|
127
|
+
}), L = a({
|
|
128
128
|
/** Initial HTML content */
|
|
129
129
|
html: e(t(), ""),
|
|
130
130
|
/** Initial CSS content */
|
|
131
131
|
css: e(t(), ""),
|
|
132
132
|
/** Preselected dynamic content items */
|
|
133
133
|
preselectedDynamicContent: e(
|
|
134
|
-
c(
|
|
134
|
+
c(y),
|
|
135
|
+
[]
|
|
136
|
+
),
|
|
137
|
+
/**
|
|
138
|
+
* Full set of dynamic-content items the account offers (label + token).
|
|
139
|
+
* Used as the label→token map that repairs label-form placeholders
|
|
140
|
+
* (e.g. `{{ Phone Number }}`) in dropped saved modules.
|
|
141
|
+
*/
|
|
142
|
+
availableDynamicContent: e(
|
|
143
|
+
c(y),
|
|
135
144
|
[]
|
|
136
145
|
),
|
|
137
146
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
138
147
|
customFieldAttributes: e(c(t()), []),
|
|
139
148
|
/** Selected unsubscribe page IDs */
|
|
140
|
-
selectedUnsubscribePages: e(c(
|
|
149
|
+
selectedUnsubscribePages: e(c(n()), []),
|
|
141
150
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
142
151
|
forceRecreate: e(o(), !1),
|
|
143
152
|
/** Migration-only inputs (legacy block configs) */
|
|
144
|
-
migration: e(
|
|
145
|
-
}),
|
|
153
|
+
migration: e(v, {})
|
|
154
|
+
}), P = a({
|
|
146
155
|
/** Sender display name */
|
|
147
156
|
senderName: e(t(), ""),
|
|
148
157
|
/** Email subject line */
|
|
@@ -153,9 +162,9 @@ const d = {
|
|
|
153
162
|
/** Path to translations object */
|
|
154
163
|
translationsPath: e(t(), "window.trans[Object.keys(window.trans)[0]]"),
|
|
155
164
|
/** Migration date for template compatibility */
|
|
156
|
-
migrationDate: e(
|
|
165
|
+
migrationDate: e(n(), 1759696858),
|
|
157
166
|
/** Email header settings */
|
|
158
|
-
emailHeader: e(
|
|
167
|
+
emailHeader: e(P, { senderName: "", subject: "" }),
|
|
159
168
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
160
169
|
savedModulesFolderName: e(t(), S.SAVED_MODULES),
|
|
161
170
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
@@ -183,10 +192,8 @@ const d = {
|
|
|
183
192
|
/** Enable Liquid template syntax */
|
|
184
193
|
liquidSyntax: e(o(), !1),
|
|
185
194
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
186
|
-
autosave: e(o(), !1)
|
|
187
|
-
|
|
188
|
-
accessibilityTesting: e(o(), !1)
|
|
189
|
-
}), N = i([
|
|
195
|
+
autosave: e(o(), !1)
|
|
196
|
+
}), D = l([
|
|
190
197
|
"amp-accordion",
|
|
191
198
|
"amp-carousel",
|
|
192
199
|
"amp-form-controls",
|
|
@@ -200,7 +207,7 @@ const d = {
|
|
|
200
207
|
"text-block",
|
|
201
208
|
"timer-block",
|
|
202
209
|
"video-block"
|
|
203
|
-
]),
|
|
210
|
+
]), N = l([
|
|
204
211
|
"dynamic-content",
|
|
205
212
|
"checkbox-block",
|
|
206
213
|
"radio-button-block",
|
|
@@ -211,12 +218,12 @@ const d = {
|
|
|
211
218
|
]), x = a({
|
|
212
219
|
/** Default blocks to exclude from the editor */
|
|
213
220
|
excludeDefaults: e(
|
|
214
|
-
c(
|
|
221
|
+
c(D),
|
|
215
222
|
[]
|
|
216
223
|
),
|
|
217
224
|
/** Custom blocks to include in the editor */
|
|
218
225
|
includeCustoms: e(
|
|
219
|
-
c(
|
|
226
|
+
c(N),
|
|
220
227
|
[]
|
|
221
228
|
)
|
|
222
229
|
}), m = a({
|
|
@@ -225,10 +232,10 @@ const d = {
|
|
|
225
232
|
/** Human-readable description */
|
|
226
233
|
description: e(t()),
|
|
227
234
|
/** Priority for rule ordering (lower = earlier) */
|
|
228
|
-
priority:
|
|
235
|
+
priority: n()
|
|
229
236
|
}), F = a({
|
|
230
237
|
...m.entries,
|
|
231
|
-
type:
|
|
238
|
+
type: i("replace"),
|
|
232
239
|
/** String to search for */
|
|
233
240
|
search: t(),
|
|
234
241
|
/** Replacement string */
|
|
@@ -237,7 +244,7 @@ const d = {
|
|
|
237
244
|
replaceAll: e(o())
|
|
238
245
|
}), U = a({
|
|
239
246
|
...m.entries,
|
|
240
|
-
type:
|
|
247
|
+
type: i("regex"),
|
|
241
248
|
/** Regex pattern string */
|
|
242
249
|
pattern: t(),
|
|
243
250
|
/** Replacement string (supports $1, $2, etc.) */
|
|
@@ -246,18 +253,18 @@ const d = {
|
|
|
246
253
|
flags: e(t())
|
|
247
254
|
}), B = a({
|
|
248
255
|
...m.entries,
|
|
249
|
-
type:
|
|
256
|
+
type: i("remove"),
|
|
250
257
|
/** Strings or patterns to remove */
|
|
251
258
|
targets: c(t())
|
|
252
259
|
}), w = a({
|
|
253
260
|
...m.entries,
|
|
254
|
-
type:
|
|
261
|
+
type: i("custom"),
|
|
255
262
|
/** Custom processor function */
|
|
256
|
-
processor:
|
|
263
|
+
processor: h(
|
|
257
264
|
(u) => typeof u == "function",
|
|
258
265
|
"processor must be a function"
|
|
259
266
|
)
|
|
260
|
-
}), H =
|
|
267
|
+
}), H = R("type", [
|
|
261
268
|
F,
|
|
262
269
|
U,
|
|
263
270
|
B,
|
|
@@ -273,7 +280,7 @@ const d = {
|
|
|
273
280
|
* Return false to cancel the save operation.
|
|
274
281
|
*/
|
|
275
282
|
externalValidation: e(
|
|
276
|
-
|
|
283
|
+
h(
|
|
277
284
|
(u) => typeof u == "function",
|
|
278
285
|
"externalValidation must be a function"
|
|
279
286
|
)
|
|
@@ -281,12 +288,12 @@ const d = {
|
|
|
281
288
|
}), V = a({
|
|
282
289
|
// Required sections
|
|
283
290
|
/** Identity configuration (required) */
|
|
284
|
-
identity:
|
|
291
|
+
identity: C,
|
|
285
292
|
/** Partner configuration (required) */
|
|
286
|
-
partner:
|
|
293
|
+
partner: A,
|
|
287
294
|
// Optional sections (with defaults)
|
|
288
295
|
/** Template content and presets */
|
|
289
|
-
template: e(
|
|
296
|
+
template: e(L, {}),
|
|
290
297
|
/** Editor settings */
|
|
291
298
|
editor: e(E, {}),
|
|
292
299
|
/** UI configuration */
|
|
@@ -305,24 +312,24 @@ export {
|
|
|
305
312
|
q as CallbacksSchema,
|
|
306
313
|
H as CompilerRuleSchema,
|
|
307
314
|
j as CompilerSchema,
|
|
308
|
-
|
|
315
|
+
N as CustomBlockTypeSchema,
|
|
309
316
|
w as CustomRuleSchema,
|
|
310
|
-
|
|
311
|
-
|
|
317
|
+
D as DefaultBlockTypeSchema,
|
|
318
|
+
y as DynamicContentSchema,
|
|
312
319
|
E as EditorSchema,
|
|
313
|
-
|
|
320
|
+
P as EmailHeaderSchema,
|
|
314
321
|
T as FallbackFontSchema,
|
|
315
322
|
O as FeaturesSchema,
|
|
316
323
|
V as GuidoConfigSchema,
|
|
317
|
-
|
|
324
|
+
C as IdentitySchema,
|
|
318
325
|
I as LegacyRecommendationConfigSchema,
|
|
319
326
|
d as MessageType,
|
|
320
|
-
|
|
327
|
+
A as PartnerSchema,
|
|
321
328
|
r as ProductType,
|
|
322
329
|
U as RegexRuleSchema,
|
|
323
330
|
B as RemoveRuleSchema,
|
|
324
331
|
F as ReplaceRuleSchema,
|
|
325
|
-
|
|
326
|
-
|
|
332
|
+
v as TemplateMigrationSchema,
|
|
333
|
+
L as TemplateSchema,
|
|
327
334
|
M as UISchema
|
|
328
335
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import o from "./AutoSaveToggle.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var e = this, a = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return t.isFeatureEnabled("autosave") ? a("div", { staticClass: "d-f a-i-c mr-3 auto-save-toggle", on: { mouseenter: function(s) {
|
|
7
|
+
t.isHovered = !0;
|
|
8
|
+
}, mouseleave: function(s) {
|
|
9
|
+
t.isHovered = !1;
|
|
10
|
+
} } }, [a(t.InToggle, { attrs: { id: "guido__autosave-toggle", name: "guido-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggle } }), a("span", { staticClass: "ml-2 auto-save-toggle__label t-c-55" }, [e._v(" " + e._s(t.trans("email-editor.auto-save")) + " ")]), t.autosaveStore.status === t.AUTOSAVE_STATUS.SAVING ? a("span", { staticClass: "ml-2 d-f a-i-c f-s-1" }, [a(t.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), a("span", { staticClass: "ml-1 t-c-53" }, [e._v(" " + e._s(t.trans("newsletter.saving")) + " ")])], 1) : t.lastSavedLabel ? a("span", { staticClass: "ml-2 f-s-1 t-c-53" }, [e._v(" " + e._s(t.lastSavedLabel) + " ")]) : e._e(), t.isHovered ? a(t.InInfoBox, { staticClass: "auto-save-toggle__info-box", attrs: { id: "guido__autosave-info-box", size: "small", variant: "information", "description-text": t.trans("email-editor.auto-save-description"), "title-text": t.trans("email-editor.auto-save-title") } }) : e._e()], 1) : e._e();
|
|
11
|
+
}, l = [], r = /* @__PURE__ */ i(
|
|
12
|
+
o,
|
|
13
|
+
n,
|
|
14
|
+
l,
|
|
15
|
+
!1,
|
|
16
|
+
null,
|
|
17
|
+
"2c964af4"
|
|
18
|
+
);
|
|
19
|
+
const d = r.exports;
|
|
20
|
+
export {
|
|
21
|
+
d as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as i, ref as f, computed as u } from "vue";
|
|
2
|
+
import { useConfig as l } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useTranslations as p } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { useAutosaveStore as c, AUTOSAVE_STATUS as t } from "../../../stores/autosave.js";
|
|
5
|
+
import { useEditorStore as S } from "../../../stores/editor.js";
|
|
6
|
+
import { formatLocalTime as d } from "../../../utils/timeUtil.js";
|
|
7
|
+
import { InToggle as g, InLoading as _, InInfoBox as A } from "@useinsider/design-system-vue";
|
|
8
|
+
const U = /* @__PURE__ */ i({
|
|
9
|
+
__name: "AutoSaveToggle",
|
|
10
|
+
setup(v) {
|
|
11
|
+
const { isFeatureEnabled: e } = l(), r = S(), o = c(), s = p(), n = f(!1), a = u(() => o.status !== t.SAVED || !o.lastSavedAt ? "" : d(o.lastSavedAt));
|
|
12
|
+
return { __sfc: !0, isFeatureEnabled: e, editorStore: r, autosaveStore: o, trans: s, isHovered: n, lastSavedLabel: a, toggle: (m) => {
|
|
13
|
+
o.isOn = m;
|
|
14
|
+
}, AUTOSAVE_STATUS: t, InInfoBox: A, InLoading: _, InToggle: g };
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
U as default
|
|
19
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l from "./EditorActions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var i,
|
|
6
|
-
var
|
|
7
|
-
return
|
|
3
|
+
import d from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var u = function() {
|
|
5
|
+
var s, i, n, a;
|
|
6
|
+
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
7
|
+
return e("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = (s = t.config) == null ? void 0 : s.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : o._e(), t.editorStore.isPreviewModeOpen ? o._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(r) {
|
|
8
8
|
return t.handleSave(!1);
|
|
9
|
-
} } }),
|
|
9
|
+
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
|
|
10
10
|
return t.executeSave(!1);
|
|
11
11
|
} } })], 1);
|
|
12
|
-
},
|
|
13
|
-
r,
|
|
12
|
+
}, p = [], c = /* @__PURE__ */ d(
|
|
14
13
|
l,
|
|
15
|
-
|
|
14
|
+
u,
|
|
15
|
+
p,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"82128f7d"
|
|
19
19
|
);
|
|
20
20
|
const v = c.exports;
|
|
21
21
|
export {
|
|
@@ -1,50 +1,66 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActionsApi as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
1
|
+
import { defineComponent as O, ref as n, computed as h } from "vue";
|
|
2
|
+
import { useActionsApi as q } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as b } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useExport as k } from "../../../composables/useExport.js";
|
|
5
|
+
import { useTestEmailClick as B } from "../../../composables/useGuidoActions.js";
|
|
6
|
+
import { useHtmlCompiler as D } from "../../../composables/useHtmlCompiler.js";
|
|
7
|
+
import { useSave as F } from "../../../composables/useSave.js";
|
|
8
|
+
import { useTranslations as L } from "../../../composables/useTranslations.js";
|
|
9
|
+
import { useVersionHistoryApi as R } from "../../../composables/useVersionHistoryApi.js";
|
|
10
|
+
import { useLiquidValidator as z } from "../../../composables/validators/useLiquidValidator.js";
|
|
11
|
+
import { useEditorStore as I } from "../../../stores/editor.js";
|
|
12
|
+
import { useTemplateStore as P } from "../../../stores/template.js";
|
|
13
|
+
import { getTooltipOptions as j } from "../../../utils/tooltipUtils.js";
|
|
14
|
+
import { InButtonV2 as G } from "@useinsider/design-system-vue";
|
|
15
|
+
import { storeToRefs as J } from "pinia";
|
|
16
|
+
import K from "./MigrationConfirmModal.vue.js";
|
|
17
|
+
const ut = /* @__PURE__ */ O({
|
|
17
18
|
__name: "EditorActions",
|
|
18
|
-
setup(
|
|
19
|
-
const { config:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
setup(N, { expose: x }) {
|
|
20
|
+
const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory: c, closeVersionHistory: p } = R(), { getCompiledEmail: f } = q(), { compileHtml: d } = D(), { validateLiquidSyntax: v } = z(), e = I(), y = P(), { hasMigrations: g } = J(y), s = L(), i = n(!1), r = n(!1), S = n(), H = B(), T = () => {
|
|
21
|
+
if (e.isVersionHistoryOpen) {
|
|
22
|
+
p();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
c();
|
|
26
|
+
}, w = async () => {
|
|
27
|
+
i.value = !0, await m(), i.value = !1;
|
|
28
|
+
}, _ = () => {
|
|
29
|
+
e.isSaveAsTemplateDrawerOpen = !0;
|
|
30
|
+
}, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
|
|
31
|
+
() => {
|
|
32
|
+
var t, o;
|
|
33
|
+
return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
|
|
34
|
+
}
|
|
35
|
+
), V = async (t) => {
|
|
36
|
+
r.value = !0, t || (e.loadingStatus = !0);
|
|
37
|
+
const o = await u(t);
|
|
38
|
+
return r.value = !1, !t && !o && (e.loadingStatus = !1), o;
|
|
39
|
+
}, E = (t) => {
|
|
24
40
|
var o;
|
|
25
|
-
if (!t &&
|
|
26
|
-
(o =
|
|
41
|
+
if (!t && g.value) {
|
|
42
|
+
(o = S.value) == null || o.open();
|
|
27
43
|
return;
|
|
28
44
|
}
|
|
29
|
-
return
|
|
30
|
-
},
|
|
31
|
-
if (
|
|
45
|
+
return V(t);
|
|
46
|
+
}, M = async () => {
|
|
47
|
+
if (l("liquidSyntax")) {
|
|
32
48
|
e.loadingStatus = !0;
|
|
33
49
|
try {
|
|
34
|
-
const { html: t } = await
|
|
35
|
-
if (!await
|
|
50
|
+
const { html: t } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = d(t);
|
|
51
|
+
if (!await v(o))
|
|
36
52
|
return;
|
|
37
53
|
} finally {
|
|
38
54
|
e.loadingStatus = !1;
|
|
39
55
|
}
|
|
40
56
|
}
|
|
41
|
-
|
|
57
|
+
H();
|
|
42
58
|
};
|
|
43
|
-
return
|
|
44
|
-
handleSave:
|
|
45
|
-
}), { __sfc: !0, config:
|
|
59
|
+
return x({
|
|
60
|
+
handleSave: E
|
|
61
|
+
}), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, editorStore: e, templateStore: y, hasMigrations: g, trans: s, isExporting: i, isSaving: r, migrationModalRef: S, testEmailClick: H, handleVersionHistory: T, handleExport: w, handleSaveAs: _, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: A, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: j, InButtonV2: G, MigrationConfirmModal: K };
|
|
46
62
|
}
|
|
47
63
|
});
|
|
48
64
|
export {
|
|
49
|
-
|
|
65
|
+
ut as default
|
|
50
66
|
};
|
|
@@ -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,8 +1,8 @@
|
|
|
1
1
|
import r from "./MiddleSlot.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var t = function() {
|
|
4
|
-
var o = this,
|
|
5
|
-
return
|
|
4
|
+
var o = this, e = o._self._c, i = o._self._setupProxy;
|
|
5
|
+
return e("div", { staticClass: "d-f a-i-c" }, [i.editorStore.isVersionHistoryOpen ? e("div", { staticClass: "d-f" }, [e(i.VersionHistory), e(i.VersionHistoryViewOptions)], 1) : i.editorStore.isPreviewModeOpen ? e("div", { staticClass: "d-f" }, [e(i.EmailSizeIndicator), e(i.AmpToggle)], 1) : o._e(), e(i.EditorToolbar, { directives: [{ name: "show", rawName: "v-show", value: i.editorStore.isEditorToolbarVisible, expression: "editorStore.isEditorToolbarVisible" }] })], 1);
|
|
6
6
|
}, a = [], n = /* @__PURE__ */ s(
|
|
7
7
|
r,
|
|
8
8
|
t,
|
|
@@ -11,7 +11,7 @@ var t = function() {
|
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const c = n.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
c as default
|
|
17
17
|
};
|
|
@@ -2,16 +2,15 @@ import { defineComponent as o } from "vue";
|
|
|
2
2
|
import r from "../email-preview/amp/AmpToggle.vue.js";
|
|
3
3
|
import t from "../email-preview/desktop-preview/EmailSizeIndicator.vue.js";
|
|
4
4
|
import { useEditorStore as i } from "../../../stores/editor.js";
|
|
5
|
-
import e from "./
|
|
6
|
-
import m from "./
|
|
7
|
-
import p from "./version-history/
|
|
8
|
-
|
|
9
|
-
const y = /* @__PURE__ */ o({
|
|
5
|
+
import e from "./EditorToolbar.vue.js";
|
|
6
|
+
import m from "./version-history/VersionHistory.vue.js";
|
|
7
|
+
import p from "./version-history/ViewOptions.vue.js";
|
|
8
|
+
const S = /* @__PURE__ */ o({
|
|
10
9
|
__name: "MiddleSlot",
|
|
11
|
-
setup(
|
|
12
|
-
return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t,
|
|
10
|
+
setup(s) {
|
|
11
|
+
return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t, EditorToolbar: e, VersionHistory: m, VersionHistoryViewOptions: p };
|
|
13
12
|
}
|
|
14
13
|
});
|
|
15
14
|
export {
|
|
16
|
-
|
|
15
|
+
S as default
|
|
17
16
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
return e("div", { staticClass: "d-f a-i-c" }, [t.editorStore.isVersionHistoryOpen ?
|
|
6
|
-
}, a = [], n = /* @__PURE__ */
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import s from "./RightSlot.vue2.js";
|
|
2
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var r = function() {
|
|
4
|
+
var i = this, e = i._self._c, t = i._self._setupProxy;
|
|
5
|
+
return e("div", { staticClass: "d-f a-i-c" }, [t.editorStore.isVersionHistoryOpen ? i._e() : e(t.AutoSaveToggle), t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-1", attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : i._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
|
|
6
|
+
}, a = [], n = /* @__PURE__ */ o(
|
|
7
|
+
s,
|
|
8
|
+
r,
|
|
9
9
|
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as a, ref as
|
|
2
|
-
import { useConfig as
|
|
1
|
+
import { defineComponent as a, ref as f, computed as p } from "vue";
|
|
2
|
+
import { useConfig as u } from "../../../composables/useConfig.js";
|
|
3
3
|
import { useTranslations as d } from "../../../composables/useTranslations.js";
|
|
4
|
-
import { useEditorStore as
|
|
5
|
-
import { InChips as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
4
|
+
import { useEditorStore as l } from "../../../stores/editor.js";
|
|
5
|
+
import { InChips as c } from "@useinsider/design-system-vue";
|
|
6
|
+
import _ from "./AutoSaveToggle.vue.js";
|
|
7
|
+
import S from "./EditorActions.vue.js";
|
|
8
|
+
import g from "./version-history/RestoreButton.vue.js";
|
|
9
|
+
const T = /* @__PURE__ */ a({
|
|
10
10
|
__name: "RightSlot",
|
|
11
|
-
setup(
|
|
12
|
-
const { isFeatureEnabled: o } =
|
|
13
|
-
return
|
|
11
|
+
setup(h, { expose: r }) {
|
|
12
|
+
const { isFeatureEnabled: o } = u(), i = d(), n = l(), t = f(null), s = p(() => o("liquidSyntax"));
|
|
13
|
+
return r({
|
|
14
14
|
handleSave: (m) => {
|
|
15
|
-
var
|
|
16
|
-
return (
|
|
15
|
+
var e;
|
|
16
|
+
return (e = t.value) == null ? void 0 : e.handleSave(m);
|
|
17
17
|
}
|
|
18
|
-
}), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips:
|
|
18
|
+
}), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips: c, AutoSaveToggle: _, EditorActions: S, RestoreButton: g };
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
T as default
|
|
23
23
|
};
|