@useinsider/guido 3.19.0-beta.3abc7c5 → 3.19.0-beta.3d545d6
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/README.md +0 -1
- package/dist/@types/config/schemas.js +31 -33
- package/dist/components/Guido.vue.js +9 -9
- package/dist/components/Guido.vue2.js +57 -58
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -9
- package/dist/components/organisms/base/AuthErrorModal.vue.js +18 -0
- package/dist/components/organisms/base/AuthErrorModal.vue2.js +29 -0
- package/dist/components/organisms/header/EditorActions.vue.js +5 -5
- package/dist/components/organisms/header/EditorActions.vue2.js +55 -85
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +12 -16
- package/dist/components/wrappers/WpDrawer.vue.js +7 -9
- package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
- package/dist/components/wrappers/WpModal.vue.js +1 -1
- package/dist/components/wrappers/WpModal.vue2.js +4 -3
- package/dist/composables/useAuthError.js +51 -0
- package/dist/composables/useHtmlCompiler.js +26 -37
- package/dist/composables/useHtmlValidator.js +0 -2
- package/dist/composables/useHttp.js +58 -51
- package/dist/composables/useSave.js +45 -90
- package/dist/composables/useToaster.js +17 -15
- package/dist/composables/validators/useCouponBlockValidator.js +21 -24
- package/dist/composables/validators/useLiquidValidator.js +15 -15
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +47 -54
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/components/Guido.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
- package/dist/src/components/wrappers/WpModal.vue.d.ts +5 -1
- package/dist/src/composables/useAuthError.d.ts +11 -0
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/useHtmlValidator.d.ts +0 -21
- package/dist/src/composables/useHttp.d.ts +2 -0
- package/dist/src/composables/useSave.d.ts +1 -6
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -5
- package/dist/src/stores/config.d.ts +0 -32
- package/dist/src/utils/templatePreparation.d.ts +0 -30
- package/dist/stores/config.js +67 -84
- package/dist/utils/templatePreparation.js +36 -39
- package/package.json +1 -1
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -48
- package/dist/composables/useSaveValidation.js +0 -279
- package/dist/composables/useSaveValidationRollout.js +0 -9
- package/dist/enums/save-validation.js +0 -4
- package/dist/src/@types/save-validation.d.ts +0 -19
- package/dist/src/composables/useSaveValidation.d.ts +0 -6
- package/dist/src/composables/useSaveValidationRollout.d.ts +0 -3
- package/dist/src/enums/save-validation.d.ts +0 -27
- package/dist/src/stores/save-validation.d.ts +0 -22
- package/dist/stores/save-validation.js +0 -30
- /package/dist/src/components/organisms/{validation/ValidationErrorDrawer.vue.d.ts → base/AuthErrorModal.vue.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -164,7 +164,6 @@ const config: GuidoConfigInput = {
|
|
|
164
164
|
liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
|
|
165
165
|
autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
|
|
166
166
|
allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
|
|
167
|
-
allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
|
|
168
167
|
reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
|
|
169
168
|
},
|
|
170
169
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
|
|
2
|
-
import { object as o, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as
|
|
2
|
+
import { object as o, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as h, boolean as a, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as I, union as y, unknown as r, lazy as T } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const p = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -38,7 +38,7 @@ const p = {
|
|
|
38
38
|
name: t(),
|
|
39
39
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
40
40
|
family: t()
|
|
41
|
-
}),
|
|
41
|
+
}), M = o({
|
|
42
42
|
/** Partner/organization name (required) */
|
|
43
43
|
name: m(
|
|
44
44
|
t(),
|
|
@@ -62,7 +62,7 @@ const p = {
|
|
|
62
62
|
username: e(t(), "Guido User"),
|
|
63
63
|
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
64
64
|
fallbackFont: e(L)
|
|
65
|
-
}),
|
|
65
|
+
}), E = o({
|
|
66
66
|
/** Display text for the dynamic content */
|
|
67
67
|
text: t(),
|
|
68
68
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -84,14 +84,14 @@ const p = {
|
|
|
84
84
|
children: e(c(S)),
|
|
85
85
|
// eslint-disable-next-line camelcase -- backend field name
|
|
86
86
|
select_items: e(c(S))
|
|
87
|
-
})),
|
|
87
|
+
})), N = k(
|
|
88
88
|
t(),
|
|
89
89
|
R(c(S), [])
|
|
90
|
-
),
|
|
90
|
+
), P = g({
|
|
91
91
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
92
92
|
id: e(n()),
|
|
93
93
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
94
|
-
decimalCount: e(
|
|
94
|
+
decimalCount: e(y([t(), n()])),
|
|
95
95
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
96
96
|
productIds: e(c(r())),
|
|
97
97
|
/** Whether the block requested live products at send time */
|
|
@@ -125,14 +125,14 @@ const p = {
|
|
|
125
125
|
/** Block type marker used by some legacy variants */
|
|
126
126
|
blockType: e(t()),
|
|
127
127
|
/** Size variant marker (legacy data may use string or number) */
|
|
128
|
-
size: e(
|
|
128
|
+
size: e(y([t(), n()])),
|
|
129
129
|
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
130
130
|
verticalResponsiveness: e(a()),
|
|
131
131
|
/** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
|
|
132
132
|
isPriceMovedToNextLine: e(a()),
|
|
133
133
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
134
134
|
isPriceDeletedForZeroSale: e(a())
|
|
135
|
-
}),
|
|
135
|
+
}), v = o({
|
|
136
136
|
/**
|
|
137
137
|
* Legacy recommendation block configs keyed by block ID.
|
|
138
138
|
* Pass this when loading a template authored with the v1
|
|
@@ -140,7 +140,7 @@ const p = {
|
|
|
140
140
|
* strategy, currency, locale, and layout data.
|
|
141
141
|
*/
|
|
142
142
|
recommendationConfigs: e(
|
|
143
|
-
k(t(),
|
|
143
|
+
k(t(), P),
|
|
144
144
|
{}
|
|
145
145
|
)
|
|
146
146
|
}), x = o({
|
|
@@ -150,7 +150,7 @@ const p = {
|
|
|
150
150
|
css: e(t(), ""),
|
|
151
151
|
/** Preselected dynamic content items */
|
|
152
152
|
preselectedDynamicContent: e(
|
|
153
|
-
c(
|
|
153
|
+
c(E),
|
|
154
154
|
[]
|
|
155
155
|
),
|
|
156
156
|
/**
|
|
@@ -159,7 +159,7 @@ const p = {
|
|
|
159
159
|
* (first) partner's leaf attributes into the label→token map that repairs
|
|
160
160
|
* label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
|
|
161
161
|
*/
|
|
162
|
-
dynamicContentList: e(
|
|
162
|
+
dynamicContentList: e(N, {}),
|
|
163
163
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
164
164
|
customFieldAttributes: e(c(t()), []),
|
|
165
165
|
/** Selected unsubscribe page IDs */
|
|
@@ -181,7 +181,7 @@ const p = {
|
|
|
181
181
|
0
|
|
182
182
|
),
|
|
183
183
|
/** Migration-only inputs (legacy block configs) */
|
|
184
|
-
migration: e(
|
|
184
|
+
migration: e(v, {})
|
|
185
185
|
}), D = o({
|
|
186
186
|
/** Sender display name */
|
|
187
187
|
senderName: e(t(), ""),
|
|
@@ -228,10 +228,8 @@ const p = {
|
|
|
228
228
|
allowlistEnabled: e(a(), !1),
|
|
229
229
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
230
230
|
linkTrackingIds: e(a(), !1),
|
|
231
|
-
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
232
|
-
allowSaveWithErrors: e(a(), !0),
|
|
233
231
|
reusableRecommendationStrategy: e(a(), !1)
|
|
234
|
-
}),
|
|
232
|
+
}), B = i([
|
|
235
233
|
"amp-accordion",
|
|
236
234
|
"amp-carousel",
|
|
237
235
|
"amp-form-controls",
|
|
@@ -245,7 +243,7 @@ const p = {
|
|
|
245
243
|
"text-block",
|
|
246
244
|
"timer-block",
|
|
247
245
|
"video-block"
|
|
248
|
-
]),
|
|
246
|
+
]), w = i([
|
|
249
247
|
"dynamic-content",
|
|
250
248
|
"checkbox-block",
|
|
251
249
|
"radio-button-block",
|
|
@@ -256,12 +254,12 @@ const p = {
|
|
|
256
254
|
]), H = o({
|
|
257
255
|
/** Default blocks to exclude from the editor */
|
|
258
256
|
excludeDefaults: e(
|
|
259
|
-
c(
|
|
257
|
+
c(B),
|
|
260
258
|
[]
|
|
261
259
|
),
|
|
262
260
|
/** Custom blocks to include in the editor */
|
|
263
261
|
includeCustoms: e(
|
|
264
|
-
c(
|
|
262
|
+
c(w),
|
|
265
263
|
[]
|
|
266
264
|
)
|
|
267
265
|
}), d = o({
|
|
@@ -298,7 +296,7 @@ const p = {
|
|
|
298
296
|
...d.entries,
|
|
299
297
|
type: u("custom"),
|
|
300
298
|
/** Custom processor function */
|
|
301
|
-
processor:
|
|
299
|
+
processor: h(
|
|
302
300
|
(s) => typeof s == "function",
|
|
303
301
|
"processor must be a function"
|
|
304
302
|
)
|
|
@@ -312,23 +310,23 @@ const p = {
|
|
|
312
310
|
customRules: e(c(V), []),
|
|
313
311
|
/** Skip default compiler rules */
|
|
314
312
|
ignoreDefaultRules: e(a(), !1)
|
|
315
|
-
}),
|
|
313
|
+
}), Z = o({
|
|
316
314
|
/**
|
|
317
315
|
* External validation handler called before save completes.
|
|
318
316
|
* Return false to cancel the save operation.
|
|
319
317
|
*/
|
|
320
318
|
externalValidation: e(
|
|
321
|
-
|
|
319
|
+
h(
|
|
322
320
|
(s) => typeof s == "function",
|
|
323
321
|
"externalValidation must be a function"
|
|
324
322
|
)
|
|
325
323
|
)
|
|
326
|
-
}),
|
|
324
|
+
}), Q = o({
|
|
327
325
|
// Required sections
|
|
328
326
|
/** Identity configuration (required) */
|
|
329
327
|
identity: A,
|
|
330
328
|
/** Partner configuration (required) */
|
|
331
|
-
partner:
|
|
329
|
+
partner: M,
|
|
332
330
|
// Optional sections (with defaults)
|
|
333
331
|
/** Template content and presets */
|
|
334
332
|
template: e(x, {}),
|
|
@@ -343,33 +341,33 @@ const p = {
|
|
|
343
341
|
/** Compiler configuration */
|
|
344
342
|
compiler: e(z, {}),
|
|
345
343
|
/** Callbacks and event handlers */
|
|
346
|
-
callbacks: e(
|
|
344
|
+
callbacks: e(Z, {})
|
|
347
345
|
});
|
|
348
346
|
export {
|
|
349
347
|
H as BlocksSchema,
|
|
350
|
-
|
|
348
|
+
Z as CallbacksSchema,
|
|
351
349
|
V as CompilerRuleSchema,
|
|
352
350
|
z as CompilerSchema,
|
|
353
|
-
|
|
351
|
+
w as CustomBlockTypeSchema,
|
|
354
352
|
G as CustomRuleSchema,
|
|
355
|
-
|
|
356
|
-
|
|
353
|
+
B as DefaultBlockTypeSchema,
|
|
354
|
+
N as DynamicContentListSchema,
|
|
357
355
|
S as DynamicContentNodeSchema,
|
|
358
|
-
|
|
356
|
+
E as DynamicContentSchema,
|
|
359
357
|
O as EditorSchema,
|
|
360
358
|
D as EmailHeaderSchema,
|
|
361
359
|
L as FallbackFontSchema,
|
|
362
360
|
U as FeaturesSchema,
|
|
363
|
-
|
|
361
|
+
Q as GuidoConfigSchema,
|
|
364
362
|
A as IdentitySchema,
|
|
365
|
-
|
|
363
|
+
P as LegacyRecommendationConfigSchema,
|
|
366
364
|
p as MessageType,
|
|
367
|
-
|
|
365
|
+
M as PartnerSchema,
|
|
368
366
|
l as ProductType,
|
|
369
367
|
j as RegexRuleSchema,
|
|
370
368
|
q as RemoveRuleSchema,
|
|
371
369
|
_ as ReplaceRuleSchema,
|
|
372
|
-
|
|
370
|
+
v as TemplateMigrationSchema,
|
|
373
371
|
x as TemplateSchema,
|
|
374
372
|
F as UISchema
|
|
375
373
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import t from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var i = function() {
|
|
5
5
|
var a = this, r = a._self._c, e = a._self._setupProxy;
|
|
6
|
-
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.
|
|
6
|
+
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
}, s = [], n = /* @__PURE__ */
|
|
9
|
+
}, s = [], n = /* @__PURE__ */ t(
|
|
10
|
+
o,
|
|
10
11
|
i,
|
|
11
|
-
t,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"080ff767"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const f = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
f as default
|
|
20
20
|
};
|
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { useEditorLock as
|
|
4
|
-
import { provideGuidoActions as
|
|
5
|
-
import { useGuidoStateBridge as
|
|
6
|
-
import { usePartner as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { useTimerClone as ye } from "../composables/useTimerClone.js";
|
|
1
|
+
import { defineComponent as re, defineAsyncComponent as m, ref as O, computed as u, watch as x, onMounted as se, onUnmounted as ae } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as ie } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as ce } from "../composables/useEditorLock.js";
|
|
4
|
+
import { provideGuidoActions as de } from "../composables/useGuidoActions.js";
|
|
5
|
+
import { useGuidoStateBridge as me } from "../composables/useGuidoStateBridge.js";
|
|
6
|
+
import { usePartner as le } from "../composables/usePartner.js";
|
|
7
|
+
import { useStripo as ue } from "../composables/useStripo.js";
|
|
8
|
+
import { useTimerClone as pe } from "../composables/useTimerClone.js";
|
|
10
9
|
import { migrate as W } from "../config/migrator/index.js";
|
|
11
10
|
import { ModuleFolderDefaults as G } from "../enums/defaults.js";
|
|
12
|
-
import { RIBBON_SELECTOR as
|
|
13
|
-
import { useRecommendationExtensionStore as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
11
|
+
import { RIBBON_SELECTOR as fe } from "../enums/onboarding.js";
|
|
12
|
+
import { useRecommendationExtensionStore as b } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
|
+
import ye from "./organisms/AutoSaveController.vue.js";
|
|
14
|
+
import ge from "./organisms/base/AuthErrorModal.vue.js";
|
|
15
|
+
import ve from "./organisms/base/Toaster.vue.js";
|
|
16
|
+
import Se from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
17
17
|
import he from "./organisms/header/HeaderWrapper.vue.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { useDynamicContentStore as Te } from "../stores/dynamic-content.js";
|
|
18
|
+
import be from "./organisms/LoadingWrapper.vue.js";
|
|
19
|
+
import Ee from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
20
|
+
import we from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
21
|
+
import { useStripoApi as Ce } from "../services/stripoApi.js";
|
|
22
|
+
import { useConfigStore as De } from "../stores/config.js";
|
|
23
|
+
import { useDynamicContentStore as ke } from "../stores/dynamic-content.js";
|
|
25
24
|
import { useEditorStore as H } from "../stores/editor.js";
|
|
26
|
-
import { usePreviewStore as
|
|
27
|
-
import { useTemplateStore as
|
|
28
|
-
import { useUnsubscribeStore as
|
|
29
|
-
import { readTrackFloor as
|
|
30
|
-
const
|
|
25
|
+
import { usePreviewStore as Me } from "../stores/preview.js";
|
|
26
|
+
import { useTemplateStore as Te } from "../stores/template.js";
|
|
27
|
+
import { useUnsubscribeStore as Fe } from "../stores/unsubscribe.js";
|
|
28
|
+
import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
|
|
29
|
+
const nt = /* @__PURE__ */ re({
|
|
31
30
|
__name: "Guido",
|
|
32
31
|
props: {
|
|
33
32
|
config: null,
|
|
34
33
|
ready: { type: Boolean, default: !0 }
|
|
35
34
|
},
|
|
36
35
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
37
|
-
setup(
|
|
38
|
-
const a =
|
|
36
|
+
setup(z, { expose: q, emit: r }) {
|
|
37
|
+
const a = z, K = m(
|
|
39
38
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
40
|
-
),
|
|
39
|
+
), V = m(
|
|
41
40
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
42
41
|
), j = m(
|
|
43
42
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
@@ -45,15 +44,15 @@ const at = /* @__PURE__ */ se({
|
|
|
45
44
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
46
45
|
), Q = m(
|
|
47
46
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
48
|
-
), E = O(), p = O(), f =
|
|
47
|
+
), E = O(), p = O(), f = ke(), w = Fe(), o = De();
|
|
49
48
|
a.ready && o.init(a.config);
|
|
50
|
-
const c = H(), X =
|
|
49
|
+
const c = H(), X = Me(), l = u(() => c.hasChanges), { isTestPartner: Y } = le(), C = () => {
|
|
51
50
|
var t;
|
|
52
51
|
return (t = E.value) == null ? void 0 : t.handleSave(!0);
|
|
53
52
|
}, D = (t) => {
|
|
54
53
|
c.loadingStatus = t;
|
|
55
54
|
};
|
|
56
|
-
|
|
55
|
+
ie(), me();
|
|
57
56
|
const y = () => {
|
|
58
57
|
var t, e;
|
|
59
58
|
return {
|
|
@@ -64,15 +63,15 @@ const at = /* @__PURE__ */ se({
|
|
|
64
63
|
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
|
|
65
64
|
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
|
|
66
65
|
};
|
|
67
|
-
}, { initPlugin: k, preloadRuntime:
|
|
66
|
+
}, { initPlugin: k, preloadRuntime: M } = ue(), { runExclusive: T, beginMount: F, isCurrentMount: R } = ce();
|
|
68
67
|
let g = 0;
|
|
69
|
-
const { getDefaultTemplate: I } =
|
|
68
|
+
const { getDefaultTemplate: I } = Ce(), { cloneTimersOnSave: L, hasTimerBlocks: A } = pe(), Z = u(() => {
|
|
70
69
|
var t;
|
|
71
70
|
return !((t = o.ui) != null && t.showHeader);
|
|
72
|
-
}),
|
|
73
|
-
() => !!
|
|
71
|
+
}), ee = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), te = u(
|
|
72
|
+
() => !!b().recommendationConfigs.strategyId
|
|
74
73
|
);
|
|
75
|
-
|
|
74
|
+
de({
|
|
76
75
|
onBack: () => {
|
|
77
76
|
console.debug("guido:back"), r("back");
|
|
78
77
|
},
|
|
@@ -87,9 +86,9 @@ const at = /* @__PURE__ */ se({
|
|
|
87
86
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
88
87
|
}
|
|
89
88
|
});
|
|
90
|
-
const
|
|
89
|
+
const B = (t) => {
|
|
91
90
|
console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
92
|
-
},
|
|
91
|
+
}, U = () => {
|
|
93
92
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
94
93
|
};
|
|
95
94
|
x(() => l.value, () => {
|
|
@@ -102,9 +101,9 @@ const at = /* @__PURE__ */ se({
|
|
|
102
101
|
let i = null;
|
|
103
102
|
const S = () => {
|
|
104
103
|
var e;
|
|
105
|
-
const t = document.querySelector(
|
|
104
|
+
const t = document.querySelector(fe);
|
|
106
105
|
(e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
107
|
-
},
|
|
106
|
+
}, h = async () => {
|
|
108
107
|
var t;
|
|
109
108
|
try {
|
|
110
109
|
o.initialized || o.init(a.config), c.templateId = o.templateId;
|
|
@@ -116,51 +115,51 @@ const at = /* @__PURE__ */ se({
|
|
|
116
115
|
css: d
|
|
117
116
|
};
|
|
118
117
|
n.html || (n = await I(), n.html = await W(n.html, _));
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
const
|
|
118
|
+
const oe = N ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
119
|
+
A(n.html) && (n.html = await L(n.html)), N && (c.trackIdSessionFloor = Math.max(oe, $(n.html)));
|
|
120
|
+
const ne = {
|
|
122
121
|
preselectedDynamicContentList: P,
|
|
123
122
|
onReady: () => {
|
|
124
123
|
console.debug("guido:ready"), r("ready");
|
|
125
124
|
}
|
|
126
125
|
};
|
|
127
|
-
g = F(), await k(n, y(),
|
|
126
|
+
g = F(), await k(n, y(), ne), f.selectedDynamicContentList = P;
|
|
128
127
|
} catch (e) {
|
|
129
128
|
console.error("Failed to initialize Stripo editor:", e);
|
|
130
129
|
}
|
|
131
130
|
};
|
|
132
|
-
return
|
|
131
|
+
return se(async () => {
|
|
133
132
|
var e;
|
|
134
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
133
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), b().$reset(), H().$reset(), Te().$reset(), S();
|
|
135
134
|
const t = (e = p.value) == null ? void 0 : e.parentElement;
|
|
136
|
-
if (t && (i = new ResizeObserver(S), i.observe(t)),
|
|
137
|
-
await
|
|
135
|
+
if (t && (i = new ResizeObserver(S), i.observe(t)), M(), a.ready)
|
|
136
|
+
await h();
|
|
138
137
|
else {
|
|
139
138
|
const s = x(() => a.ready, (d) => {
|
|
140
|
-
d && (s(),
|
|
139
|
+
d && (s(), h());
|
|
141
140
|
});
|
|
142
141
|
}
|
|
143
142
|
document.addEventListener("dynamic-content:open", v);
|
|
144
|
-
}),
|
|
145
|
-
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v),
|
|
146
|
-
if (
|
|
143
|
+
}), ae(() => {
|
|
144
|
+
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), b().disposeStrategyPageReturn(), T(async () => {
|
|
145
|
+
if (R(g))
|
|
147
146
|
try {
|
|
148
147
|
window.UIEditor.removeEditor();
|
|
149
148
|
} catch {
|
|
150
149
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
151
150
|
}
|
|
152
151
|
}), o.reset();
|
|
153
|
-
}),
|
|
152
|
+
}), q({
|
|
154
153
|
dynamicContent: {
|
|
155
|
-
insert:
|
|
156
|
-
close:
|
|
154
|
+
insert: B,
|
|
155
|
+
close: U
|
|
157
156
|
},
|
|
158
157
|
hasChanges: l,
|
|
159
158
|
saveSilent: C,
|
|
160
159
|
setLoading: D
|
|
161
|
-
}), { __sfc: !0, PreviewContainer:
|
|
160
|
+
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, LegacyStrategyUpdatedModal: Q, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: a, configStore: o, editorStore: c, previewStore: X, hasChanges: l, isTestPartner: Y, saveSilent: C, setLoading: D, emit: r, buildMetadata: y, initPlugin: k, preloadRuntime: M, runExclusive: T, beginMount: F, isCurrentMount: R, mountGeneration: g, getDefaultTemplate: I, cloneTimersOnSave: L, hasTimerBlocks: A, noHeader: Z, isRrsEnabled: ee, hasAssignedStrategy: te, insertDynamicContent: B, closeDynamicContent: U, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: h, AutoSaveController: ye, AuthErrorModal: ge, Toaster: ve, FilterSelectionDrawer: Se, HeaderWrapper: he, LoadingWrapper: be, SaveAsTemplateDrawer: Ee, UnsubscribeWrapper: we };
|
|
162
161
|
}
|
|
163
162
|
});
|
|
164
163
|
export {
|
|
165
|
-
|
|
164
|
+
nt as default
|
|
166
165
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAutoSave as
|
|
3
|
-
import { useSave as
|
|
4
|
-
|
|
5
|
-
const v = /* @__PURE__ */ r({
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
import { useAutoSave as r } from "../../composables/useAutoSave.js";
|
|
3
|
+
import { useSave as s } from "../../composables/useSave.js";
|
|
4
|
+
const f = /* @__PURE__ */ t({
|
|
6
5
|
__name: "AutoSaveController",
|
|
7
|
-
setup(
|
|
8
|
-
const { save: e
|
|
9
|
-
return
|
|
6
|
+
setup(a) {
|
|
7
|
+
const { save: e } = s(), o = () => e(!1, !0);
|
|
8
|
+
return r(o), { __sfc: !0, save: e, backgroundSave: o };
|
|
10
9
|
}
|
|
11
10
|
});
|
|
12
11
|
export {
|
|
13
|
-
|
|
12
|
+
f as default
|
|
14
13
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import e from "./AuthErrorModal.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
|
+
var r = this, t = r._self._c, o = r._self._setupProxy;
|
|
6
|
+
return o.authError ? t("div", { staticClass: "auth-error-modal" }, [t(o.WpModal, { attrs: { id: "guido__auth-error-modal", state: "warning", "close-button-status": !1, "close-on-outside-click": !1, "footer-button-options": o.footerButtonOptions, title: o.trans("action-builder.session-expired") }, on: { close: o.recover, "primary-action": o.recover } }, [t("p", [r._v(r._s(o.message))])])], 1) : r._e();
|
|
7
|
+
}, n = [], i = /* @__PURE__ */ s(
|
|
8
|
+
e,
|
|
9
|
+
a,
|
|
10
|
+
n,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"4f4ce4cc"
|
|
14
|
+
);
|
|
15
|
+
const f = i.exports;
|
|
16
|
+
export {
|
|
17
|
+
f as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as i, computed as e } from "vue";
|
|
2
|
+
import u from "../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useAuthError as c } from "../../../composables/useAuthError.js";
|
|
4
|
+
import { useTranslations as p } from "../../../composables/useTranslations.js";
|
|
5
|
+
const _ = /* @__PURE__ */ i({
|
|
6
|
+
__name: "AuthErrorModal",
|
|
7
|
+
setup(l) {
|
|
8
|
+
const o = p(), { authError: t } = c(), r = e(() => {
|
|
9
|
+
var n;
|
|
10
|
+
return ((n = t.value) == null ? void 0 : n.status) === 419;
|
|
11
|
+
}), s = e(() => r.value ? o("settings.session-on-another-device") : o("journey-builder.login-session-expired")), a = e(() => ({
|
|
12
|
+
primaryButton: {
|
|
13
|
+
type: "primary",
|
|
14
|
+
labelText: o("journey-builder.login-popup-button")
|
|
15
|
+
},
|
|
16
|
+
cancelOrBackButton: {
|
|
17
|
+
type: "secondary",
|
|
18
|
+
styling: "ghost",
|
|
19
|
+
labelText: o("settings.cancel")
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
22
|
+
return { __sfc: !0, trans: o, authError: t, isTakenOver: r, message: s, footerButtonOptions: a, recover: () => {
|
|
23
|
+
window.location.replace("/login");
|
|
24
|
+
}, WpModal: u };
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
_ as default
|
|
29
|
+
};
|
|
@@ -4,20 +4,20 @@ import d from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
|
4
4
|
var u = function() {
|
|
5
5
|
var s, i, n, a;
|
|
6
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", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "
|
|
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
|
-
},
|
|
12
|
+
}, c = [], p = /* @__PURE__ */ d(
|
|
13
13
|
l,
|
|
14
14
|
u,
|
|
15
|
-
|
|
15
|
+
c,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"c61cc8ea"
|
|
19
19
|
);
|
|
20
|
-
const v =
|
|
20
|
+
const v = p.exports;
|
|
21
21
|
export {
|
|
22
22
|
v as default
|
|
23
23
|
};
|