@useinsider/guido 3.2.0-beta.ec6228c → 3.2.0-beta.ecc7c6c
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 +1 -24
- package/dist/@types/config/schemas.js +36 -38
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +34 -35
- package/dist/components/organisms/header/RightSlot.vue.js +8 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +8 -9
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
- package/dist/composables/useHtmlValidator.js +41 -36
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/composables/useSave.js +21 -18
- package/dist/composables/useStripo.js +14 -16
- package/dist/composables/validators/useCouponBlockValidator.js +24 -0
- package/dist/config/compiler/recommendationCompilerRules.js +27 -27
- package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
- package/dist/config/migrator/radioButtonMigrator.js +64 -44
- package/dist/enums/onboarding.js +7 -2
- package/dist/enums/unsubscribe.js +34 -27
- package/dist/extensions/Blocks/RadioButton/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +18 -9
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +33 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -235
- package/dist/package.json.js +1 -1
- package/dist/services/templateLibraryApi.js +5 -4
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/enums/unsubscribe.d.ts +5 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +7 -1
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +21 -0
- package/dist/src/stores/config.d.ts +0 -18
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/pairProductVariables.js +89 -88
- package/package.json +3 -3
- package/dist/components/organisms/AutoSaveController.vue.js +0 -17
- package/dist/components/organisms/AutoSaveController.vue2.js +0 -13
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
- package/dist/composables/useAutoSave.js +0 -68
- package/dist/enums/displayConditions.js +0 -80
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +0 -2
- package/dist/src/components/organisms/header/AutoSaveToggle.vue.d.ts +0 -2
- package/dist/src/composables/useAutoSave.d.ts +0 -3
- package/dist/src/enums/displayConditions.d.ts +0 -2
- package/dist/src/stores/autosave.d.ts +0 -6
- package/dist/src/utils/timeUtil.d.ts +0 -8
- package/dist/stores/autosave.js +0 -11
- package/dist/utils/timeUtil.js +0 -19
package/README.md
CHANGED
|
@@ -143,8 +143,7 @@ const config: GuidoConfigInput = {
|
|
|
143
143
|
displayConditions?: boolean, // Default: true
|
|
144
144
|
unsubscribe?: boolean, // Default: true
|
|
145
145
|
modulesDisabled?: boolean, // Default: false - Disable modules panel
|
|
146
|
-
liquidSyntax?: boolean,
|
|
147
|
-
autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
|
|
146
|
+
liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
|
|
148
147
|
},
|
|
149
148
|
|
|
150
149
|
// Optional: Callbacks
|
|
@@ -328,28 +327,6 @@ const config: GuidoConfigInput = {
|
|
|
328
327
|
|
|
329
328
|
---
|
|
330
329
|
|
|
331
|
-
## Autosave
|
|
332
|
-
|
|
333
|
-
Guido ships an opt-in **autosave** that saves on a 2-minute interval and when the user leaves the tab. Enable it with the `features.autosave` feature flag — this **shows an "Auto Save" toggle in the editor header**; the end user switches autosave on per session.
|
|
334
|
-
|
|
335
|
-
```typescript
|
|
336
|
-
const config: GuidoConfigInput = {
|
|
337
|
-
identity: { templateId: 'tpl-123', userId: 'user-456' },
|
|
338
|
-
partner: { name: 'partner' },
|
|
339
|
-
features: {
|
|
340
|
-
autosave: true, // Default: false — shows the Auto Save toggle in the header
|
|
341
|
-
},
|
|
342
|
-
};
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
- Default is `false` — integrations see no change unless they opt in.
|
|
346
|
-
- Autosave reuses the same save pipeline as the Save button, so your existing `@save:complete` handler receives autosave output identically to a manual save. No new events or callbacks.
|
|
347
|
-
- Toggle state is **session-only** (Pinia) — resets to OFF on reload.
|
|
348
|
-
|
|
349
|
-
For a deep dive on triggers, guards, and limitations, see **[wiki/AUTOSAVE.md](wiki/AUTOSAVE.md)**.
|
|
350
|
-
|
|
351
|
-
---
|
|
352
|
-
|
|
353
330
|
## HTML Compiler Rules
|
|
354
331
|
|
|
355
332
|
Add custom rules to transform HTML during export:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as b } from "../../enums/defaults.js";
|
|
2
|
-
import { object as
|
|
2
|
+
import { object as o, number as p, optional as e, string as t, pipe as u, picklist as n, minLength as d, custom as S, boolean as a, array as c, literal as l, variant as k } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const m = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -12,7 +12,7 @@ const m = {
|
|
|
12
12
|
ARCHITECT: 49,
|
|
13
13
|
/** Unsubscribe page builder */
|
|
14
14
|
UNSUBSCRIBE_PAGES: 97
|
|
15
|
-
}, h =
|
|
15
|
+
}, h = o({
|
|
16
16
|
/** Unique identifier for the template being edited */
|
|
17
17
|
templateId: u(
|
|
18
18
|
t(),
|
|
@@ -25,12 +25,12 @@ const m = {
|
|
|
25
25
|
),
|
|
26
26
|
/** Optional variation ID for A/B testing */
|
|
27
27
|
variationId: e(t())
|
|
28
|
-
}),
|
|
28
|
+
}), y = o({
|
|
29
29
|
/** Fallback font name (e.g., "Georgia") */
|
|
30
30
|
name: t(),
|
|
31
31
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
32
32
|
family: t()
|
|
33
|
-
}),
|
|
33
|
+
}), f = o({
|
|
34
34
|
/** Partner/organization name (required) */
|
|
35
35
|
name: u(
|
|
36
36
|
t(),
|
|
@@ -53,8 +53,8 @@ const m = {
|
|
|
53
53
|
/** Display name for the current user */
|
|
54
54
|
username: e(t(), "Guido User"),
|
|
55
55
|
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
56
|
-
fallbackFont: e(
|
|
57
|
-
}), A =
|
|
56
|
+
fallbackFont: e(y)
|
|
57
|
+
}), A = o({
|
|
58
58
|
/** Display text for the dynamic content */
|
|
59
59
|
text: t(),
|
|
60
60
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -63,12 +63,12 @@ const m = {
|
|
|
63
63
|
fallback: e(t()),
|
|
64
64
|
/** Optional formatting options */
|
|
65
65
|
format: e(
|
|
66
|
-
|
|
66
|
+
o({
|
|
67
67
|
key: t(),
|
|
68
68
|
value: t()
|
|
69
69
|
})
|
|
70
70
|
)
|
|
71
|
-
}), R =
|
|
71
|
+
}), R = o({
|
|
72
72
|
/** Initial HTML content */
|
|
73
73
|
html: e(t(), ""),
|
|
74
74
|
/** Initial CSS content */
|
|
@@ -83,13 +83,13 @@ const m = {
|
|
|
83
83
|
/** Selected unsubscribe page IDs */
|
|
84
84
|
selectedUnsubscribePages: e(c(p()), []),
|
|
85
85
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
86
|
-
forceRecreate: e(
|
|
87
|
-
}), C =
|
|
86
|
+
forceRecreate: e(a(), !1)
|
|
87
|
+
}), C = o({
|
|
88
88
|
/** Sender display name */
|
|
89
89
|
senderName: e(t(), ""),
|
|
90
90
|
/** Email subject line */
|
|
91
91
|
subject: e(t(), "")
|
|
92
|
-
}), T =
|
|
92
|
+
}), T = o({
|
|
93
93
|
/** Locale for the editor UI */
|
|
94
94
|
locale: e(t(), "en"),
|
|
95
95
|
/** Path to translations object */
|
|
@@ -102,30 +102,28 @@ const m = {
|
|
|
102
102
|
savedModulesFolderName: e(t(), b.SAVED_MODULES),
|
|
103
103
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
104
104
|
defaultModulesFolderName: e(t(), b.DEFAULT_MODULES)
|
|
105
|
-
}), I =
|
|
105
|
+
}), I = o({
|
|
106
106
|
/** Whether to show the header bar */
|
|
107
|
-
showHeader: e(
|
|
107
|
+
showHeader: e(a(), !0),
|
|
108
108
|
/** Custom label for back button (if shown) */
|
|
109
109
|
backButtonLabel: e(t())
|
|
110
|
-
}), E =
|
|
110
|
+
}), E = o({
|
|
111
111
|
/** Enable dynamic content insertion */
|
|
112
|
-
dynamicContent: e(
|
|
112
|
+
dynamicContent: e(a(), !0),
|
|
113
113
|
/** Enable save as template functionality */
|
|
114
|
-
saveAsTemplate: e(
|
|
114
|
+
saveAsTemplate: e(a(), !0),
|
|
115
115
|
/** Enable version history */
|
|
116
|
-
versionHistory: e(
|
|
116
|
+
versionHistory: e(a(), !0),
|
|
117
117
|
/** Enable test message sending */
|
|
118
|
-
testMessage: e(
|
|
118
|
+
testMessage: e(a(), !0),
|
|
119
119
|
/** Enable display conditions */
|
|
120
|
-
displayConditions: e(
|
|
120
|
+
displayConditions: e(a(), !0),
|
|
121
121
|
/** Enable unsubscribe block */
|
|
122
|
-
unsubscribe: e(
|
|
122
|
+
unsubscribe: e(a(), !0),
|
|
123
123
|
/** Disable modules panel in the editor */
|
|
124
|
-
modulesDisabled: e(
|
|
124
|
+
modulesDisabled: e(a(), !1),
|
|
125
125
|
/** Enable Liquid template syntax */
|
|
126
|
-
liquidSyntax: e(
|
|
127
|
-
/** Enable autosave (2-min interval + tab-hide). User toggles on/off from the header. */
|
|
128
|
-
autosave: e(o(), !1)
|
|
126
|
+
liquidSyntax: e(a(), !1)
|
|
129
127
|
}), g = n([
|
|
130
128
|
"amp-accordion",
|
|
131
129
|
"amp-carousel",
|
|
@@ -148,7 +146,7 @@ const m = {
|
|
|
148
146
|
"unsubscribe-block",
|
|
149
147
|
"coupon-block",
|
|
150
148
|
"items-block"
|
|
151
|
-
]), L =
|
|
149
|
+
]), L = o({
|
|
152
150
|
/** Default blocks to exclude from the editor */
|
|
153
151
|
excludeDefaults: e(
|
|
154
152
|
c(g),
|
|
@@ -159,14 +157,14 @@ const m = {
|
|
|
159
157
|
c(O),
|
|
160
158
|
[]
|
|
161
159
|
)
|
|
162
|
-
}), r =
|
|
160
|
+
}), r = o({
|
|
163
161
|
/** Unique identifier for the rule */
|
|
164
162
|
id: t(),
|
|
165
163
|
/** Human-readable description */
|
|
166
164
|
description: e(t()),
|
|
167
165
|
/** Priority for rule ordering (lower = earlier) */
|
|
168
166
|
priority: p()
|
|
169
|
-
}), M =
|
|
167
|
+
}), M = o({
|
|
170
168
|
...r.entries,
|
|
171
169
|
type: l("replace"),
|
|
172
170
|
/** String to search for */
|
|
@@ -174,8 +172,8 @@ const m = {
|
|
|
174
172
|
/** Replacement string */
|
|
175
173
|
replacement: t(),
|
|
176
174
|
/** Replace all occurrences (default: false) */
|
|
177
|
-
replaceAll: e(
|
|
178
|
-
}), N =
|
|
175
|
+
replaceAll: e(a())
|
|
176
|
+
}), N = o({
|
|
179
177
|
...r.entries,
|
|
180
178
|
type: l("regex"),
|
|
181
179
|
/** Regex pattern string */
|
|
@@ -184,12 +182,12 @@ const m = {
|
|
|
184
182
|
replacement: t(),
|
|
185
183
|
/** Regex flags (e.g., 'gi') */
|
|
186
184
|
flags: e(t())
|
|
187
|
-
}), D =
|
|
185
|
+
}), D = o({
|
|
188
186
|
...r.entries,
|
|
189
187
|
type: l("remove"),
|
|
190
188
|
/** Strings or patterns to remove */
|
|
191
189
|
targets: c(t())
|
|
192
|
-
}), v =
|
|
190
|
+
}), v = o({
|
|
193
191
|
...r.entries,
|
|
194
192
|
type: l("custom"),
|
|
195
193
|
/** Custom processor function */
|
|
@@ -202,12 +200,12 @@ const m = {
|
|
|
202
200
|
N,
|
|
203
201
|
D,
|
|
204
202
|
v
|
|
205
|
-
]), U =
|
|
203
|
+
]), U = o({
|
|
206
204
|
/** Custom compiler rules to apply */
|
|
207
205
|
customRules: e(c(x), []),
|
|
208
206
|
/** Skip default compiler rules */
|
|
209
|
-
ignoreDefaultRules: e(
|
|
210
|
-
}), B =
|
|
207
|
+
ignoreDefaultRules: e(a(), !1)
|
|
208
|
+
}), B = o({
|
|
211
209
|
/**
|
|
212
210
|
* External validation handler called before save completes.
|
|
213
211
|
* Return false to cancel the save operation.
|
|
@@ -218,12 +216,12 @@ const m = {
|
|
|
218
216
|
"externalValidation must be a function"
|
|
219
217
|
)
|
|
220
218
|
)
|
|
221
|
-
}), H =
|
|
219
|
+
}), H = o({
|
|
222
220
|
// Required sections
|
|
223
221
|
/** Identity configuration (required) */
|
|
224
222
|
identity: h,
|
|
225
223
|
/** Partner configuration (required) */
|
|
226
|
-
partner:
|
|
224
|
+
partner: f,
|
|
227
225
|
// Optional sections (with defaults)
|
|
228
226
|
/** Template content and presets */
|
|
229
227
|
template: e(R, {}),
|
|
@@ -251,12 +249,12 @@ export {
|
|
|
251
249
|
A as DynamicContentSchema,
|
|
252
250
|
T as EditorSchema,
|
|
253
251
|
C as EmailHeaderSchema,
|
|
254
|
-
|
|
252
|
+
y as FallbackFontSchema,
|
|
255
253
|
E as FeaturesSchema,
|
|
256
254
|
H as GuidoConfigSchema,
|
|
257
255
|
h as IdentitySchema,
|
|
258
256
|
m as MessageType,
|
|
259
|
-
|
|
257
|
+
f as PartnerSchema,
|
|
260
258
|
s as ProductType,
|
|
261
259
|
N as RegexRuleSchema,
|
|
262
260
|
D as RemoveRuleSchema,
|
|
@@ -3,7 +3,7 @@ import i from "./Guido.vue2.js";
|
|
|
3
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" }),
|
|
6
|
+
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), 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
9
|
}, n = [], s = /* @__PURE__ */ a(
|
|
@@ -12,9 +12,9 @@ var t = function() {
|
|
|
12
12
|
n,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"25780af6"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const u = s.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
u as default
|
|
20
20
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as j, defineAsyncComponent as
|
|
1
|
+
import { defineComponent as j, defineAsyncComponent as R, ref as A, computed as I, watch as J, onMounted as Q, onUnmounted as X } from "vue";
|
|
2
2
|
import { provideGuidoActions as Y } from "../composables/useGuidoActions.js";
|
|
3
3
|
import { usePartner as Z } from "../composables/usePartner.js";
|
|
4
4
|
import { useStripo as ee } from "../composables/useStripo.js";
|
|
@@ -6,43 +6,42 @@ import { useTimerClone as te } from "../composables/useTimerClone.js";
|
|
|
6
6
|
import { migrate as W } from "../config/migrator/index.js";
|
|
7
7
|
import { ModuleFolderDefaults as B } from "../enums/defaults.js";
|
|
8
8
|
import { RIBBON_SELECTOR as oe } from "../enums/onboarding.js";
|
|
9
|
-
import ne from "./organisms/
|
|
10
|
-
import re from "./organisms/base/Toaster.vue.js";
|
|
9
|
+
import ne from "./organisms/base/Toaster.vue.js";
|
|
11
10
|
import se from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { useStripoApi as
|
|
17
|
-
import { useConfigStore as
|
|
18
|
-
import { useDynamicContentStore as
|
|
19
|
-
import { useEditorStore as
|
|
20
|
-
import { usePreviewStore as
|
|
21
|
-
import { useUnsubscribeStore as
|
|
22
|
-
const
|
|
11
|
+
import re from "./organisms/header/HeaderWrapper.vue.js";
|
|
12
|
+
import ce from "./organisms/LoadingWrapper.vue.js";
|
|
13
|
+
import ae from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
14
|
+
import ie from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
15
|
+
import { useStripoApi as me } from "../services/stripoApi.js";
|
|
16
|
+
import { useConfigStore as de } from "../stores/config.js";
|
|
17
|
+
import { useDynamicContentStore as le } from "../stores/dynamic-content.js";
|
|
18
|
+
import { useEditorStore as ue } from "../stores/editor.js";
|
|
19
|
+
import { usePreviewStore as pe } from "../stores/preview.js";
|
|
20
|
+
import { useUnsubscribeStore as fe } from "../stores/unsubscribe.js";
|
|
21
|
+
const Re = /* @__PURE__ */ j({
|
|
23
22
|
__name: "Guido",
|
|
24
23
|
props: {
|
|
25
24
|
config: null
|
|
26
25
|
},
|
|
27
26
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
28
|
-
setup(H, { expose: x, emit:
|
|
29
|
-
const
|
|
27
|
+
setup(H, { expose: x, emit: s }) {
|
|
28
|
+
const b = H, G = R(
|
|
30
29
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
31
|
-
), z =
|
|
30
|
+
), z = R(
|
|
32
31
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
33
|
-
),
|
|
34
|
-
a.init(
|
|
35
|
-
const u =
|
|
32
|
+
), S = A(), d = A(), l = le(), g = fe(), a = de();
|
|
33
|
+
a.init(b.config);
|
|
34
|
+
const u = ue(), q = pe(), i = I(() => u.hasChanges), { isTestPartner: K } = Z(), w = () => {
|
|
36
35
|
var e;
|
|
37
|
-
return (e =
|
|
36
|
+
return (e = S.value) == null ? void 0 : e.handleSave(!0);
|
|
38
37
|
}, {
|
|
39
38
|
templateId: p,
|
|
40
39
|
userId: E,
|
|
41
40
|
partnerName: D,
|
|
42
41
|
username: C,
|
|
43
42
|
template: t,
|
|
44
|
-
editor:
|
|
45
|
-
} = a, m = (t == null ? void 0 : t.html) || "", T = (t == null ? void 0 : t.css) || "", f = (t == null ? void 0 : t.preselectedDynamicContent) || [], k = (
|
|
43
|
+
editor: r
|
|
44
|
+
} = a, m = (t == null ? void 0 : t.html) || "", T = (t == null ? void 0 : t.css) || "", f = (t == null ? void 0 : t.preselectedDynamicContent) || [], k = (r == null ? void 0 : r.savedModulesFolderName) || B.SAVED_MODULES, F = (r == null ? void 0 : r.defaultModulesFolderName) || B.DEFAULT_MODULES;
|
|
46
45
|
u.templateId = p;
|
|
47
46
|
const v = {
|
|
48
47
|
emailId: p,
|
|
@@ -54,38 +53,38 @@ const Ie = /* @__PURE__ */ j({
|
|
|
54
53
|
}, L = {
|
|
55
54
|
preselectedDynamicContentList: f,
|
|
56
55
|
onReady: () => {
|
|
57
|
-
console.debug("guido:ready"),
|
|
56
|
+
console.debug("guido:ready"), s("ready");
|
|
58
57
|
}
|
|
59
|
-
}, { initPlugin: U } = ee(v, L), { getDefaultTemplate: _ } =
|
|
58
|
+
}, { initPlugin: U } = ee(v, L), { getDefaultTemplate: _ } = me(), { cloneTimersOnSave: M, hasTimerBlocks: O } = te(), V = I(() => {
|
|
60
59
|
var e;
|
|
61
60
|
return !((e = a.ui) != null && e.showHeader);
|
|
62
61
|
});
|
|
63
62
|
Y({
|
|
64
63
|
onBack: () => {
|
|
65
|
-
console.debug("guido:back"),
|
|
64
|
+
console.debug("guido:back"), s("back");
|
|
66
65
|
},
|
|
67
66
|
onSaveStart: () => {
|
|
68
|
-
console.debug("guido:save:start"),
|
|
67
|
+
console.debug("guido:save:start"), s("save:start");
|
|
69
68
|
},
|
|
70
69
|
onSaveComplete: (e) => {
|
|
71
70
|
const n = { ...e, metadata: v };
|
|
72
|
-
console.debug("guido:save:complete", n),
|
|
71
|
+
console.debug("guido:save:complete", n), s("save:complete", n);
|
|
73
72
|
},
|
|
74
73
|
onTestEmailClick: () => {
|
|
75
|
-
console.debug("guido:test-email:click"),
|
|
74
|
+
console.debug("guido:test-email:click"), s("test-email:click");
|
|
76
75
|
}
|
|
77
76
|
});
|
|
78
77
|
const P = (e) => {
|
|
79
78
|
console.debug("dynamic-content:close", e), l.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
80
|
-
},
|
|
79
|
+
}, N = () => {
|
|
81
80
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
82
81
|
};
|
|
83
82
|
J(() => i.value, () => {
|
|
84
|
-
|
|
83
|
+
s("on-change", i.value);
|
|
85
84
|
});
|
|
86
85
|
const y = (e) => {
|
|
87
86
|
const n = e, { attribute: o, position: $ } = n.detail;
|
|
88
|
-
console.debug("dynamic-content:open", n.detail),
|
|
87
|
+
console.debug("dynamic-content:open", n.detail), s("dynamic-content:open", o, $);
|
|
89
88
|
};
|
|
90
89
|
let c = null;
|
|
91
90
|
const h = () => {
|
|
@@ -120,13 +119,13 @@ const Ie = /* @__PURE__ */ j({
|
|
|
120
119
|
}), x({
|
|
121
120
|
dynamicContent: {
|
|
122
121
|
insert: P,
|
|
123
|
-
close:
|
|
122
|
+
close: N
|
|
124
123
|
},
|
|
125
124
|
hasChanges: i,
|
|
126
125
|
saveSilent: w
|
|
127
|
-
}), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: z, headerWrapperRef:
|
|
126
|
+
}), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: z, headerWrapperRef: S, wrapperRef: d, dynamicContentStore: l, unsubscribeStore: g, props: b, configStore: a, editorStore: u, previewStore: q, hasChanges: i, isTestPartner: K, saveSilent: w, templateId: p, userId: E, partnerName: D, username: C, templateConfig: t, editorConfig: r, html: m, css: T, preselectedDynamicContentList: f, savedModulesFolderName: k, defaultModulesFolderName: F, emit: s, metadata: v, options: L, initPlugin: U, getDefaultTemplate: _, cloneTimersOnSave: M, hasTimerBlocks: O, noHeader: V, insertDynamicContent: P, closeDynamicContent: N, handleDynamicContentOpen: y, ribbonObserver: c, updateRibbonOffset: h, Toaster: ne, FilterSelectionDrawer: se, HeaderWrapper: re, LoadingWrapper: ce, SaveAsTemplateDrawer: ae, UnsubscribeWrapper: ie };
|
|
128
127
|
}
|
|
129
128
|
});
|
|
130
129
|
export {
|
|
131
|
-
|
|
130
|
+
Re as default
|
|
132
131
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
return e("div", { staticClass: "d-f a-i-c" }, [t.
|
|
6
|
-
}, a = [], n = /* @__PURE__ */
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import i from "./RightSlot.vue2.js";
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var o = function() {
|
|
4
|
+
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
5
|
+
return e("div", { staticClass: "d-f a-i-c" }, [t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-3", 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") } }) : s._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
|
|
6
|
+
}, a = [], n = /* @__PURE__ */ r(
|
|
7
|
+
i,
|
|
8
|
+
o,
|
|
9
9
|
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { defineComponent as a, ref as f, computed as p } from "vue";
|
|
2
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 _ from "./
|
|
7
|
-
import S from "./
|
|
8
|
-
|
|
9
|
-
const T = /* @__PURE__ */ a({
|
|
4
|
+
import { useEditorStore as c } from "../../../stores/editor.js";
|
|
5
|
+
import { InChips as l } from "@useinsider/design-system-vue";
|
|
6
|
+
import _ from "./EditorActions.vue.js";
|
|
7
|
+
import S from "./version-history/RestoreButton.vue.js";
|
|
8
|
+
const x = /* @__PURE__ */ a({
|
|
10
9
|
__name: "RightSlot",
|
|
11
10
|
setup(h, { expose: r }) {
|
|
12
|
-
const { isFeatureEnabled: o } = u(),
|
|
11
|
+
const { isFeatureEnabled: o } = u(), n = d(), i = c(), t = f(null), s = p(() => o("liquidSyntax"));
|
|
13
12
|
return r({
|
|
14
13
|
handleSave: (m) => {
|
|
15
14
|
var e;
|
|
16
15
|
return (e = t.value) == null ? void 0 : e.handleSave(m);
|
|
17
16
|
}
|
|
18
|
-
}), { __sfc: !0, isFeatureEnabled: o, trans:
|
|
17
|
+
}), { __sfc: !0, isFeatureEnabled: o, trans: n, editorStore: i, editorActionsRef: t, isLiquidEnabled: s, InChips: l, EditorActions: _, RestoreButton: S };
|
|
19
18
|
}
|
|
20
19
|
});
|
|
21
20
|
export {
|
|
22
|
-
|
|
21
|
+
x as default
|
|
23
22
|
};
|
|
@@ -1,37 +1,57 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as u, computed as d, watch as b, nextTick as f } from "vue";
|
|
2
|
+
import { useTranslations as C } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { HEADER_SELECTOR as O, AMP_TOGGLE_BUTTON_SELECTOR as _, AMP_TOGGLE_WRAPPER_SELECTOR as T, POPOVER_LEFT_OFFSET as g, POPOVER_TOP_GAP as E } from "../../../enums/onboarding.js";
|
|
4
|
+
import { useOnboardingStore as x } from "../../../stores/onboarding.js";
|
|
5
|
+
import { InOnboard as P } from "@useinsider/design-system-vue";
|
|
6
|
+
const G = /* @__PURE__ */ u({
|
|
6
7
|
__name: "AMPOnboarding",
|
|
7
|
-
setup(
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
setup(R) {
|
|
9
|
+
const e = C(), o = x(), r = () => {
|
|
10
|
+
const t = document.querySelector(O), n = document.querySelector(_), c = n == null ? void 0 : n.closest(T);
|
|
11
|
+
if (!c || !t)
|
|
12
|
+
return {
|
|
13
|
+
left: `${((t == null ? void 0 : t.offsetWidth) ?? window.innerWidth) / 2 - g}px`,
|
|
14
|
+
top: "68px"
|
|
15
|
+
};
|
|
16
|
+
const s = t.getBoundingClientRect(), i = c.getBoundingClientRect();
|
|
17
|
+
return {
|
|
18
|
+
left: `${i.left - s.left + i.width / 2 - g}px`,
|
|
19
|
+
top: `${i.bottom - s.top + E}px`
|
|
20
|
+
};
|
|
21
|
+
}, a = d(() => {
|
|
22
|
+
const { left: t, top: n } = r();
|
|
23
|
+
return [
|
|
24
|
+
{
|
|
25
|
+
classes: "guido-amp-onboarding",
|
|
26
|
+
left: t,
|
|
27
|
+
top: n,
|
|
28
|
+
position: "Top Center",
|
|
29
|
+
title: e("email-editor.onboarding-amp-title"),
|
|
30
|
+
description: e("email-editor.onboarding-amp-description"),
|
|
31
|
+
imageSource: "",
|
|
32
|
+
backButtonClick: () => {
|
|
33
|
+
},
|
|
34
|
+
nextButtonType: "text",
|
|
35
|
+
nextButtonText: e("action-builder.ok"),
|
|
36
|
+
nextButtonClick: () => void o.close("ampOnboarding")
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
}), l = d(() => o.onboardings.ampOnboarding.config.length > 0 && o.onboardings.ampOnboarding.isActive), p = () => {
|
|
40
|
+
var t, n;
|
|
41
|
+
(n = (t = o.getAmpCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
42
|
+
}, m = () => {
|
|
43
|
+
var t, n;
|
|
44
|
+
(n = (t = o.getAmpCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
29
45
|
};
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
46
|
+
return b(
|
|
47
|
+
() => o.onboardings.ampOnboarding.isActive,
|
|
48
|
+
async (t) => {
|
|
49
|
+
t && (await f(), o.setConfig("ampOnboarding", a.value));
|
|
50
|
+
},
|
|
51
|
+
{ immediate: !0 }
|
|
52
|
+
), { __sfc: !0, trans: e, onboardingStore: o, getTogglePosition: r, onboardingCardsConfig: a, isVisible: l, handleNext: p, handleBack: m, InOnboard: P };
|
|
33
53
|
}
|
|
34
54
|
});
|
|
35
55
|
export {
|
|
36
|
-
|
|
56
|
+
G as default
|
|
37
57
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as l, computed as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as l, computed as r, watch as m } from "vue";
|
|
2
|
+
import { useRibbonOffset as x } from "../../../composables/useRibbonOffset.js";
|
|
3
|
+
import { useTranslations as f } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { SERVICE_HOVER_SELECTORS as k } from "../../../enums/onboarding.js";
|
|
5
|
+
import { useOnboardingStore as B } from "../../../stores/onboarding.js";
|
|
6
|
+
import { InOnboard as C } from "@useinsider/design-system-vue";
|
|
7
|
+
const y = /* @__PURE__ */ l({
|
|
7
8
|
__name: "GenericOnboarding",
|
|
8
|
-
setup(
|
|
9
|
-
const e =
|
|
9
|
+
setup(T) {
|
|
10
|
+
const e = f(), o = B(), { getTopPosition: i } = x(), s = r(() => `${window.innerWidth / 2 - 146}px`), c = () => {
|
|
10
11
|
const t = document.querySelector("ui-editor");
|
|
11
|
-
t != null && t.shadowRoot &&
|
|
12
|
-
var
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
t != null && t.shadowRoot && k.forEach((n) => {
|
|
13
|
+
var g;
|
|
14
|
+
const d = (g = t.shadowRoot) == null ? void 0 : g.querySelector(n);
|
|
15
|
+
d && d.classList.add("hover");
|
|
15
16
|
});
|
|
16
|
-
},
|
|
17
|
+
}, a = r(() => [
|
|
17
18
|
{
|
|
18
19
|
classes: "guido-onboarding-blocks",
|
|
19
20
|
left: "90px",
|
|
20
|
-
top:
|
|
21
|
+
top: i(90),
|
|
21
22
|
position: "Left Top",
|
|
22
23
|
title: e("email-editor.onboarding-blocks-title"),
|
|
23
24
|
description: e("email-editor.onboarding-blocks-description"),
|
|
@@ -51,8 +52,8 @@ const S = /* @__PURE__ */ l({
|
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
classes: "guido-onboarding-preview",
|
|
54
|
-
left:
|
|
55
|
-
top:
|
|
55
|
+
left: s.value,
|
|
56
|
+
top: i(68),
|
|
56
57
|
position: "Top Center",
|
|
57
58
|
title: e("email-editor.onboarding-preview-title"),
|
|
58
59
|
description: e("email-editor.onboarding-preview-description"),
|
|
@@ -66,18 +67,18 @@ const S = /* @__PURE__ */ l({
|
|
|
66
67
|
o.close("genericOnboarding");
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
]),
|
|
70
|
+
]), p = r(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), u = () => {
|
|
70
71
|
var t, n;
|
|
71
72
|
(n = (t = o.getGenericCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
72
|
-
},
|
|
73
|
+
}, b = () => {
|
|
73
74
|
var t, n;
|
|
74
75
|
(n = (t = o.getGenericCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
75
76
|
};
|
|
76
|
-
return
|
|
77
|
-
t && o.setConfig("genericOnboarding",
|
|
78
|
-
}, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, centerLeft:
|
|
77
|
+
return m(() => o.onboardings.genericOnboarding.isActive, (t) => {
|
|
78
|
+
t && o.setConfig("genericOnboarding", a.value);
|
|
79
|
+
}, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, getTopPosition: i, centerLeft: s, addHoverToServiceElements: c, onboardingCardsConfig: a, isVisible: p, handleNext: u, handleBack: b, InOnboard: C };
|
|
79
80
|
}
|
|
80
81
|
});
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
+
y as default
|
|
83
84
|
};
|