@useinsider/guido 3.17.0-beta.ea65303 → 3.17.0-beta.eae947f
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 +5 -6
- package/dist/@types/config/schemas.js +27 -29
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +76 -78
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -9
- package/dist/components/organisms/header/EditorActions.vue.js +2 -2
- package/dist/components/organisms/header/EditorActions.vue2.js +43 -74
- 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/composables/useHtmlCompiler.js +26 -37
- package/dist/composables/useHtmlValidator.js +0 -2
- package/dist/composables/useSave.js +41 -84
- package/dist/composables/validators/useCouponBlockValidator.js +21 -24
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
- package/dist/extensions/Blocks/Items/block.js +98 -49
- package/dist/extensions/Blocks/Items/constants/currency.js +11 -0
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +25 -24
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +12 -11
- package/dist/extensions/Blocks/Items/template.js +153 -152
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +26 -33
- 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/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/useHtmlValidator.d.ts +0 -21
- 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/Items/block.d.ts +21 -0
- package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -5
- package/dist/src/stores/config.d.ts +0 -30
- package/dist/src/utils/templatePreparation.d.ts +0 -30
- package/dist/stores/config.js +22 -39
- package/dist/utils/pairProductVariables.js +60 -59
- package/dist/utils/templatePreparation.js +25 -28
- package/package.json +2 -2
- 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/components/organisms/validation/ValidationErrorDrawer.vue.d.ts +0 -2
- 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/README.md
CHANGED
|
@@ -162,7 +162,6 @@ const config: GuidoConfigInput = {
|
|
|
162
162
|
liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
|
|
163
163
|
autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
|
|
164
164
|
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).
|
|
165
|
-
allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
|
|
166
165
|
},
|
|
167
166
|
|
|
168
167
|
// Optional: Callbacks
|
|
@@ -634,16 +633,16 @@ toaster fires (useful before the host has wired the catalog).
|
|
|
634
633
|
|
|
635
634
|
```bash
|
|
636
635
|
# Install
|
|
637
|
-
|
|
636
|
+
npm install
|
|
638
637
|
|
|
639
638
|
# Start dev server
|
|
640
|
-
|
|
639
|
+
npm start
|
|
641
640
|
|
|
642
641
|
# Build
|
|
643
|
-
|
|
642
|
+
npm run build
|
|
644
643
|
|
|
645
644
|
# Lint & type-check
|
|
646
|
-
|
|
645
|
+
npm run lint
|
|
647
646
|
```
|
|
648
647
|
|
|
649
648
|
### Environment Variables
|
|
@@ -661,7 +660,7 @@ VITE_STRIPO_USER=your_user
|
|
|
661
660
|
|
|
662
661
|
```bash
|
|
663
662
|
# Build the package
|
|
664
|
-
|
|
663
|
+
npm run build
|
|
665
664
|
|
|
666
665
|
# Create tarball
|
|
667
666
|
npm pack
|
|
@@ -30,7 +30,7 @@ const p = {
|
|
|
30
30
|
name: t(),
|
|
31
31
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
32
32
|
family: t()
|
|
33
|
-
}),
|
|
33
|
+
}), M = a({
|
|
34
34
|
/** Partner/organization name (required) */
|
|
35
35
|
name: m(
|
|
36
36
|
t(),
|
|
@@ -54,7 +54,7 @@ const p = {
|
|
|
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(L)
|
|
57
|
-
}),
|
|
57
|
+
}), E = a({
|
|
58
58
|
/** Display text for the dynamic content */
|
|
59
59
|
text: t(),
|
|
60
60
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -76,10 +76,10 @@ const p = {
|
|
|
76
76
|
children: e(c(S)),
|
|
77
77
|
// eslint-disable-next-line camelcase -- backend field name
|
|
78
78
|
select_items: e(c(S))
|
|
79
|
-
})),
|
|
79
|
+
})), N = y(
|
|
80
80
|
t(),
|
|
81
81
|
R(c(S), [])
|
|
82
|
-
),
|
|
82
|
+
), P = g({
|
|
83
83
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
84
84
|
id: e(n()),
|
|
85
85
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
@@ -124,7 +124,7 @@ const p = {
|
|
|
124
124
|
isPriceMovedToNextLine: e(o()),
|
|
125
125
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
126
126
|
isPriceDeletedForZeroSale: e(o())
|
|
127
|
-
}),
|
|
127
|
+
}), v = a({
|
|
128
128
|
/**
|
|
129
129
|
* Legacy recommendation block configs keyed by block ID.
|
|
130
130
|
* Pass this when loading a template authored with the v1
|
|
@@ -132,7 +132,7 @@ const p = {
|
|
|
132
132
|
* strategy, currency, locale, and layout data.
|
|
133
133
|
*/
|
|
134
134
|
recommendationConfigs: e(
|
|
135
|
-
y(t(),
|
|
135
|
+
y(t(), P),
|
|
136
136
|
{}
|
|
137
137
|
)
|
|
138
138
|
}), x = a({
|
|
@@ -142,7 +142,7 @@ const p = {
|
|
|
142
142
|
css: e(t(), ""),
|
|
143
143
|
/** Preselected dynamic content items */
|
|
144
144
|
preselectedDynamicContent: e(
|
|
145
|
-
c(
|
|
145
|
+
c(E),
|
|
146
146
|
[]
|
|
147
147
|
),
|
|
148
148
|
/**
|
|
@@ -151,7 +151,7 @@ const p = {
|
|
|
151
151
|
* (first) partner's leaf attributes into the label→token map that repairs
|
|
152
152
|
* label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
|
|
153
153
|
*/
|
|
154
|
-
dynamicContentList: e(
|
|
154
|
+
dynamicContentList: e(N, {}),
|
|
155
155
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
156
156
|
customFieldAttributes: e(c(t()), []),
|
|
157
157
|
/** Selected unsubscribe page IDs */
|
|
@@ -173,7 +173,7 @@ const p = {
|
|
|
173
173
|
0
|
|
174
174
|
),
|
|
175
175
|
/** Migration-only inputs (legacy block configs) */
|
|
176
|
-
migration: e(
|
|
176
|
+
migration: e(v, {})
|
|
177
177
|
}), D = a({
|
|
178
178
|
/** Sender display name */
|
|
179
179
|
senderName: e(t(), ""),
|
|
@@ -219,10 +219,8 @@ const p = {
|
|
|
219
219
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
220
220
|
allowlistEnabled: e(o(), !1),
|
|
221
221
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
222
|
-
linkTrackingIds: e(o(), !1)
|
|
223
|
-
|
|
224
|
-
allowSaveWithErrors: e(o(), !0)
|
|
225
|
-
}), w = i([
|
|
222
|
+
linkTrackingIds: e(o(), !1)
|
|
223
|
+
}), B = i([
|
|
226
224
|
"amp-accordion",
|
|
227
225
|
"amp-carousel",
|
|
228
226
|
"amp-form-controls",
|
|
@@ -236,7 +234,7 @@ const p = {
|
|
|
236
234
|
"text-block",
|
|
237
235
|
"timer-block",
|
|
238
236
|
"video-block"
|
|
239
|
-
]),
|
|
237
|
+
]), w = i([
|
|
240
238
|
"dynamic-content",
|
|
241
239
|
"checkbox-block",
|
|
242
240
|
"radio-button-block",
|
|
@@ -247,12 +245,12 @@ const p = {
|
|
|
247
245
|
]), H = a({
|
|
248
246
|
/** Default blocks to exclude from the editor */
|
|
249
247
|
excludeDefaults: e(
|
|
250
|
-
c(
|
|
248
|
+
c(B),
|
|
251
249
|
[]
|
|
252
250
|
),
|
|
253
251
|
/** Custom blocks to include in the editor */
|
|
254
252
|
includeCustoms: e(
|
|
255
|
-
c(
|
|
253
|
+
c(w),
|
|
256
254
|
[]
|
|
257
255
|
)
|
|
258
256
|
}), d = a({
|
|
@@ -303,7 +301,7 @@ const p = {
|
|
|
303
301
|
customRules: e(c(V), []),
|
|
304
302
|
/** Skip default compiler rules */
|
|
305
303
|
ignoreDefaultRules: e(o(), !1)
|
|
306
|
-
}),
|
|
304
|
+
}), Z = a({
|
|
307
305
|
/**
|
|
308
306
|
* External validation handler called before save completes.
|
|
309
307
|
* Return false to cancel the save operation.
|
|
@@ -314,12 +312,12 @@ const p = {
|
|
|
314
312
|
"externalValidation must be a function"
|
|
315
313
|
)
|
|
316
314
|
)
|
|
317
|
-
}),
|
|
315
|
+
}), Q = a({
|
|
318
316
|
// Required sections
|
|
319
317
|
/** Identity configuration (required) */
|
|
320
318
|
identity: A,
|
|
321
319
|
/** Partner configuration (required) */
|
|
322
|
-
partner:
|
|
320
|
+
partner: M,
|
|
323
321
|
// Optional sections (with defaults)
|
|
324
322
|
/** Template content and presets */
|
|
325
323
|
template: e(x, {}),
|
|
@@ -334,33 +332,33 @@ const p = {
|
|
|
334
332
|
/** Compiler configuration */
|
|
335
333
|
compiler: e(z, {}),
|
|
336
334
|
/** Callbacks and event handlers */
|
|
337
|
-
callbacks: e(
|
|
335
|
+
callbacks: e(Z, {})
|
|
338
336
|
});
|
|
339
337
|
export {
|
|
340
338
|
H as BlocksSchema,
|
|
341
|
-
|
|
339
|
+
Z as CallbacksSchema,
|
|
342
340
|
V as CompilerRuleSchema,
|
|
343
341
|
z as CompilerSchema,
|
|
344
|
-
|
|
342
|
+
w as CustomBlockTypeSchema,
|
|
345
343
|
G as CustomRuleSchema,
|
|
346
|
-
|
|
347
|
-
|
|
344
|
+
B as DefaultBlockTypeSchema,
|
|
345
|
+
N as DynamicContentListSchema,
|
|
348
346
|
S as DynamicContentNodeSchema,
|
|
349
|
-
|
|
347
|
+
E as DynamicContentSchema,
|
|
350
348
|
O as EditorSchema,
|
|
351
349
|
D as EmailHeaderSchema,
|
|
352
350
|
L as FallbackFontSchema,
|
|
353
351
|
U as FeaturesSchema,
|
|
354
|
-
|
|
352
|
+
Q as GuidoConfigSchema,
|
|
355
353
|
A as IdentitySchema,
|
|
356
|
-
|
|
354
|
+
P as LegacyRecommendationConfigSchema,
|
|
357
355
|
p as MessageType,
|
|
358
|
-
|
|
356
|
+
M as PartnerSchema,
|
|
359
357
|
l as ProductType,
|
|
360
358
|
j as RegexRuleSchema,
|
|
361
359
|
q as RemoveRuleSchema,
|
|
362
360
|
_ as ReplaceRuleSchema,
|
|
363
|
-
|
|
361
|
+
v as TemplateMigrationSchema,
|
|
364
362
|
x as TemplateSchema,
|
|
365
363
|
F as UISchema
|
|
366
364
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import a from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
5
|
var o = this, r = o._self._c, e = o._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) : o._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), 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) : o._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), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
}, n = [],
|
|
10
|
-
|
|
9
|
+
}, n = [], s = /* @__PURE__ */ a(
|
|
10
|
+
i,
|
|
11
11
|
t,
|
|
12
12
|
n,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"b0d3b445"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const l = s.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
l as default
|
|
20
20
|
};
|
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { provideGuidoActions as
|
|
4
|
-
import { useGuidoStateBridge as
|
|
5
|
-
import { usePartner as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { useTimerClone as re } from "../composables/useTimerClone.js";
|
|
1
|
+
import { defineComponent as j, defineAsyncComponent as R, ref as B, computed as U, watch as _, onMounted as J, onUnmounted as Q } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as X } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { provideGuidoActions as Y } from "../composables/useGuidoActions.js";
|
|
4
|
+
import { useGuidoStateBridge as Z } from "../composables/useGuidoStateBridge.js";
|
|
5
|
+
import { usePartner as ee } from "../composables/usePartner.js";
|
|
6
|
+
import { useStripo as te } from "../composables/useStripo.js";
|
|
7
|
+
import { useTimerClone as oe } from "../composables/useTimerClone.js";
|
|
9
8
|
import { migrate as N } from "../config/migrator/index.js";
|
|
10
9
|
import { ModuleFolderDefaults as O } from "../enums/defaults.js";
|
|
11
|
-
import { RIBBON_SELECTOR as
|
|
12
|
-
import { useRecommendationExtensionStore as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { useDynamicContentStore as Se } from "../stores/dynamic-content.js";
|
|
10
|
+
import { RIBBON_SELECTOR as ne } from "../enums/onboarding.js";
|
|
11
|
+
import { useRecommendationExtensionStore as re } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
12
|
+
import se from "./organisms/AutoSaveController.vue.js";
|
|
13
|
+
import ae from "./organisms/base/Toaster.vue.js";
|
|
14
|
+
import ie from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
15
|
+
import ce from "./organisms/header/HeaderWrapper.vue.js";
|
|
16
|
+
import de from "./organisms/LoadingWrapper.vue.js";
|
|
17
|
+
import me from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
18
|
+
import le from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
19
|
+
import { useStripoApi as ue } from "../services/stripoApi.js";
|
|
20
|
+
import { useConfigStore as pe } from "../stores/config.js";
|
|
21
|
+
import { useDynamicContentStore as fe } from "../stores/dynamic-content.js";
|
|
24
22
|
import { useEditorStore as P } from "../stores/editor.js";
|
|
25
|
-
import { usePreviewStore as
|
|
26
|
-
import { useTemplateStore as
|
|
27
|
-
import { useUnsubscribeStore as
|
|
23
|
+
import { usePreviewStore as ye } from "../stores/preview.js";
|
|
24
|
+
import { useTemplateStore as ve } from "../stores/template.js";
|
|
25
|
+
import { useUnsubscribeStore as he } from "../stores/unsubscribe.js";
|
|
28
26
|
import { readTrackFloor as A } from "../utils/linkTrackingIds.js";
|
|
29
|
-
const
|
|
27
|
+
const ze = /* @__PURE__ */ j({
|
|
30
28
|
__name: "Guido",
|
|
31
29
|
props: {
|
|
32
30
|
config: null,
|
|
@@ -34,121 +32,121 @@ const Je = /* @__PURE__ */ J({
|
|
|
34
32
|
},
|
|
35
33
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
36
34
|
setup(W, { expose: x, emit: r }) {
|
|
37
|
-
const a = W, G =
|
|
35
|
+
const a = W, G = R(
|
|
38
36
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
39
|
-
), H =
|
|
37
|
+
), H = R(
|
|
40
38
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
41
|
-
),
|
|
42
|
-
a.ready &&
|
|
43
|
-
const c = P(),
|
|
44
|
-
var
|
|
45
|
-
return (
|
|
46
|
-
},
|
|
47
|
-
c.loadingStatus =
|
|
39
|
+
), h = B(), l = B(), u = fe(), S = he(), o = pe();
|
|
40
|
+
a.ready && o.init(a.config);
|
|
41
|
+
const c = P(), $ = ye(), m = U(() => c.hasChanges), { isTestPartner: z } = ee(), g = () => {
|
|
42
|
+
var t;
|
|
43
|
+
return (t = h.value) == null ? void 0 : t.handleSave(!0);
|
|
44
|
+
}, b = (t) => {
|
|
45
|
+
c.loadingStatus = t;
|
|
48
46
|
};
|
|
49
|
-
|
|
47
|
+
X(), Z();
|
|
50
48
|
const p = () => {
|
|
51
|
-
var
|
|
49
|
+
var t, e;
|
|
52
50
|
return {
|
|
53
|
-
emailId:
|
|
54
|
-
userId:
|
|
55
|
-
username:
|
|
56
|
-
partnerName:
|
|
57
|
-
savedModulesFolderName: ((
|
|
58
|
-
defaultModulesFolderName: ((e =
|
|
51
|
+
emailId: o.templateId,
|
|
52
|
+
userId: o.userId,
|
|
53
|
+
username: o.username,
|
|
54
|
+
partnerName: o.partnerName,
|
|
55
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || O.SAVED_MODULES,
|
|
56
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || O.DEFAULT_MODULES
|
|
59
57
|
};
|
|
60
|
-
}, { initPlugin: E, preloadRuntime: w } =
|
|
61
|
-
var
|
|
62
|
-
return !((
|
|
58
|
+
}, { initPlugin: E, preloadRuntime: w } = te(), { getDefaultTemplate: C } = ue(), { cloneTimersOnSave: D, hasTimerBlocks: k } = oe(), q = U(() => {
|
|
59
|
+
var t;
|
|
60
|
+
return !((t = o.ui) != null && t.showHeader);
|
|
63
61
|
});
|
|
64
|
-
|
|
62
|
+
Y({
|
|
65
63
|
onBack: () => {
|
|
66
64
|
console.debug("guido:back"), r("back");
|
|
67
65
|
},
|
|
68
66
|
onSaveStart: () => {
|
|
69
67
|
console.debug("guido:save:start"), r("save:start");
|
|
70
68
|
},
|
|
71
|
-
onSaveComplete: (
|
|
72
|
-
const e = { ...
|
|
69
|
+
onSaveComplete: (t) => {
|
|
70
|
+
const e = { ...t, metadata: p() };
|
|
73
71
|
console.debug("guido:save:complete", e), r("save:complete", e);
|
|
74
72
|
},
|
|
75
73
|
onTestEmailClick: () => {
|
|
76
74
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
77
75
|
}
|
|
78
76
|
});
|
|
79
|
-
const T = (
|
|
80
|
-
console.debug("dynamic-content:close",
|
|
77
|
+
const T = (t) => {
|
|
78
|
+
console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
81
79
|
}, F = () => {
|
|
82
80
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
83
81
|
};
|
|
84
82
|
_(() => m.value, () => {
|
|
85
83
|
r("on-change", m.value);
|
|
86
84
|
});
|
|
87
|
-
const f = (
|
|
88
|
-
const e =
|
|
85
|
+
const f = (t) => {
|
|
86
|
+
const e = t, { attribute: s, position: d } = e.detail;
|
|
89
87
|
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
|
|
90
88
|
};
|
|
91
89
|
let i = null;
|
|
92
|
-
const
|
|
90
|
+
const y = () => {
|
|
93
91
|
var e;
|
|
94
|
-
const
|
|
95
|
-
(e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(
|
|
96
|
-
},
|
|
97
|
-
var
|
|
92
|
+
const t = document.querySelector(ne);
|
|
93
|
+
(e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
94
|
+
}, v = async () => {
|
|
95
|
+
var t;
|
|
98
96
|
try {
|
|
99
|
-
|
|
100
|
-
const e =
|
|
101
|
-
|
|
102
|
-
const L = ((
|
|
97
|
+
o.initialized || o.init(a.config), c.templateId = o.templateId;
|
|
98
|
+
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", I = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
99
|
+
S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
100
|
+
const L = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, M = o.isFeatureEnabled("linkTrackingIds");
|
|
103
101
|
let n = {
|
|
104
102
|
html: s && await N(s, L),
|
|
105
103
|
css: d
|
|
106
104
|
};
|
|
107
|
-
n.html || (n = await
|
|
108
|
-
const K =
|
|
109
|
-
k(n.html) && (n.html = await
|
|
110
|
-
const
|
|
105
|
+
n.html || (n = await C(), n.html = await N(n.html, L));
|
|
106
|
+
const K = M ? A(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
107
|
+
k(n.html) && (n.html = await D(n.html)), M && (c.trackIdSessionFloor = Math.max(K, A(n.html)));
|
|
108
|
+
const V = {
|
|
111
109
|
preselectedDynamicContentList: I,
|
|
112
110
|
onReady: () => {
|
|
113
111
|
console.debug("guido:ready"), r("ready");
|
|
114
112
|
}
|
|
115
113
|
};
|
|
116
|
-
await E(n, p(),
|
|
114
|
+
await E(n, p(), V), u.selectedDynamicContentList = I;
|
|
117
115
|
} catch (e) {
|
|
118
116
|
console.error("Failed to initialize Stripo editor:", e);
|
|
119
117
|
}
|
|
120
118
|
};
|
|
121
|
-
return
|
|
119
|
+
return J(async () => {
|
|
122
120
|
var e;
|
|
123
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
await
|
|
121
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), re().$reset(), P().$reset(), ve().$reset(), y();
|
|
122
|
+
const t = (e = l.value) == null ? void 0 : e.parentElement;
|
|
123
|
+
if (t && (i = new ResizeObserver(y), i.observe(t)), w(), a.ready)
|
|
124
|
+
await v();
|
|
127
125
|
else {
|
|
128
126
|
const s = _(() => a.ready, (d) => {
|
|
129
|
-
d && (s(),
|
|
127
|
+
d && (s(), v());
|
|
130
128
|
});
|
|
131
129
|
}
|
|
132
130
|
document.addEventListener("dynamic-content:open", f);
|
|
133
|
-
}),
|
|
131
|
+
}), Q(() => {
|
|
134
132
|
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", f);
|
|
135
133
|
try {
|
|
136
134
|
window.UIEditor.removeEditor();
|
|
137
135
|
} catch {
|
|
138
136
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
139
137
|
}
|
|
140
|
-
|
|
138
|
+
o.reset();
|
|
141
139
|
}), x({
|
|
142
140
|
dynamicContent: {
|
|
143
141
|
insert: T,
|
|
144
142
|
close: F
|
|
145
143
|
},
|
|
146
144
|
hasChanges: m,
|
|
147
|
-
saveSilent:
|
|
148
|
-
setLoading:
|
|
149
|
-
}), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef:
|
|
145
|
+
saveSilent: g,
|
|
146
|
+
setLoading: b
|
|
147
|
+
}), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef: h, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: a, configStore: o, editorStore: c, previewStore: $, hasChanges: m, isTestPartner: z, saveSilent: g, setLoading: b, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: k, noHeader: q, insertDynamicContent: T, closeDynamicContent: F, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: se, Toaster: ae, FilterSelectionDrawer: ie, HeaderWrapper: ce, LoadingWrapper: de, SaveAsTemplateDrawer: me, UnsubscribeWrapper: le };
|
|
150
148
|
}
|
|
151
149
|
});
|
|
152
150
|
export {
|
|
153
|
-
|
|
151
|
+
ze as default
|
|
154
152
|
};
|
|
@@ -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
|
};
|
|
@@ -4,7 +4,7 @@ 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);
|
|
@@ -15,7 +15,7 @@ var u = function() {
|
|
|
15
15
|
p,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"6e711fd7"
|
|
19
19
|
);
|
|
20
20
|
const v = c.exports;
|
|
21
21
|
export {
|