@useinsider/guido 2.0.0-beta.a3f32aa → 2.0.0-beta.c2c0829
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +33 -45
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +27 -29
- package/dist/composables/useSave.js +11 -13
- package/dist/composables/useStripo.js +51 -50
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +4 -26
- package/dist/src/@types/config/types.d.ts +1 -7
- package/dist/src/composables/useConfig.d.ts +2 -6
- package/dist/src/stores/config.d.ts +18 -145
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/stores/config.js +0 -7
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { object as o, number as
|
|
2
|
-
const
|
|
1
|
+
import { object as o, number as p, optional as e, string as t, pipe as m, picklist as n, boolean as c, array as a, minLength as u, literal as r, custom as b, variant as S } from "../../node_modules/valibot/dist/index.js";
|
|
2
|
+
const i = {
|
|
3
3
|
/** Promotional/marketing emails */
|
|
4
4
|
PROMOTIONAL: 1,
|
|
5
5
|
/** Transactional/system emails */
|
|
@@ -13,22 +13,22 @@ const m = {
|
|
|
13
13
|
UNSUBSCRIBE_PAGES: 97
|
|
14
14
|
}, h = o({
|
|
15
15
|
/** Unique identifier for the template being edited */
|
|
16
|
-
templateId:
|
|
16
|
+
templateId: m(
|
|
17
17
|
t(),
|
|
18
|
-
|
|
18
|
+
u(1, "templateId is required")
|
|
19
19
|
),
|
|
20
20
|
/** Unique identifier for the user editing the template */
|
|
21
|
-
userId:
|
|
21
|
+
userId: m(
|
|
22
22
|
t(),
|
|
23
|
-
|
|
23
|
+
u(1, "userId is required")
|
|
24
24
|
),
|
|
25
25
|
/** Optional variation ID for A/B testing */
|
|
26
26
|
variationId: e(t())
|
|
27
27
|
}), k = o({
|
|
28
28
|
/** Partner/organization name (required) */
|
|
29
|
-
name:
|
|
29
|
+
name: m(
|
|
30
30
|
t(),
|
|
31
|
-
|
|
31
|
+
u(1, "partner.name is required")
|
|
32
32
|
),
|
|
33
33
|
/** Product type identifier */
|
|
34
34
|
productType: e(
|
|
@@ -41,8 +41,8 @@ const m = {
|
|
|
41
41
|
),
|
|
42
42
|
/** Message type (promotional or transactional) */
|
|
43
43
|
messageType: e(
|
|
44
|
-
n([
|
|
45
|
-
|
|
44
|
+
n([i.PROMOTIONAL, i.TRANSACTIONAL]),
|
|
45
|
+
i.PROMOTIONAL
|
|
46
46
|
),
|
|
47
47
|
/** Display name for the current user */
|
|
48
48
|
username: e(t(), "Guido User")
|
|
@@ -60,7 +60,7 @@ const m = {
|
|
|
60
60
|
value: t()
|
|
61
61
|
})
|
|
62
62
|
)
|
|
63
|
-
}),
|
|
63
|
+
}), R = o({
|
|
64
64
|
/** Initial HTML content */
|
|
65
65
|
html: e(t(), ""),
|
|
66
66
|
/** Initial CSS content */
|
|
@@ -71,8 +71,8 @@ const m = {
|
|
|
71
71
|
[]
|
|
72
72
|
),
|
|
73
73
|
/** Selected unsubscribe page IDs */
|
|
74
|
-
selectedUnsubscribePages: e(a(
|
|
75
|
-
}),
|
|
74
|
+
selectedUnsubscribePages: e(a(p()), [])
|
|
75
|
+
}), C = o({
|
|
76
76
|
/** Sender display name */
|
|
77
77
|
senderName: e(t(), ""),
|
|
78
78
|
/** Email subject line */
|
|
@@ -83,9 +83,9 @@ const m = {
|
|
|
83
83
|
/** Path to translations object */
|
|
84
84
|
translationsPath: e(t(), "window.trans.en"),
|
|
85
85
|
/** Migration date for template compatibility */
|
|
86
|
-
migrationDate: e(
|
|
86
|
+
migrationDate: e(p(), 1759696858),
|
|
87
87
|
/** Email header settings */
|
|
88
|
-
emailHeader: e(
|
|
88
|
+
emailHeader: e(C, { senderName: "", subject: "" })
|
|
89
89
|
}), T = o({
|
|
90
90
|
/** Whether to show the header bar */
|
|
91
91
|
showHeader: e(c(), !0),
|
|
@@ -103,7 +103,9 @@ const m = {
|
|
|
103
103
|
/** Enable display conditions */
|
|
104
104
|
displayConditions: e(c(), !0),
|
|
105
105
|
/** Enable unsubscribe block */
|
|
106
|
-
unsubscribe: e(c(), !0)
|
|
106
|
+
unsubscribe: e(c(), !0),
|
|
107
|
+
/** Disable modules panel in the editor */
|
|
108
|
+
modulesDisabled: e(c(), !1)
|
|
107
109
|
}), f = n([
|
|
108
110
|
"amp-accordion",
|
|
109
111
|
"amp-carousel",
|
|
@@ -143,7 +145,7 @@ const m = {
|
|
|
143
145
|
/** Human-readable description */
|
|
144
146
|
description: e(t()),
|
|
145
147
|
/** Priority for rule ordering (lower = earlier) */
|
|
146
|
-
priority:
|
|
148
|
+
priority: p()
|
|
147
149
|
}), N = o({
|
|
148
150
|
...l.entries,
|
|
149
151
|
type: r("replace"),
|
|
@@ -171,32 +173,21 @@ const m = {
|
|
|
171
173
|
...l.entries,
|
|
172
174
|
type: r("custom"),
|
|
173
175
|
/** Custom processor function */
|
|
174
|
-
processor:
|
|
175
|
-
(
|
|
176
|
+
processor: b(
|
|
177
|
+
(d) => typeof d == "function",
|
|
176
178
|
"processor must be a function"
|
|
177
179
|
)
|
|
178
|
-
}),
|
|
180
|
+
}), B = S("type", [
|
|
179
181
|
N,
|
|
180
182
|
O,
|
|
181
183
|
L,
|
|
182
184
|
v
|
|
183
|
-
]),
|
|
185
|
+
]), P = o({
|
|
184
186
|
/** Custom compiler rules to apply */
|
|
185
|
-
customRules: e(a(
|
|
187
|
+
customRules: e(a(B), []),
|
|
186
188
|
/** Skip default compiler rules */
|
|
187
189
|
ignoreDefaultRules: e(c(), !1)
|
|
188
|
-
}),
|
|
189
|
-
/**
|
|
190
|
-
* External validation handler called before save completes.
|
|
191
|
-
* Return false to cancel the save operation.
|
|
192
|
-
*/
|
|
193
|
-
externalValidation: e(
|
|
194
|
-
d(
|
|
195
|
-
(i) => typeof i == "function",
|
|
196
|
-
"externalValidation must be a function"
|
|
197
|
-
)
|
|
198
|
-
)
|
|
199
|
-
}), U = o({
|
|
190
|
+
}), x = o({
|
|
200
191
|
// Required sections
|
|
201
192
|
/** Identity configuration (required) */
|
|
202
193
|
identity: h,
|
|
@@ -204,7 +195,7 @@ const m = {
|
|
|
204
195
|
partner: k,
|
|
205
196
|
// Optional sections (with defaults)
|
|
206
197
|
/** Template content and presets */
|
|
207
|
-
template: e(
|
|
198
|
+
template: e(R, {}),
|
|
208
199
|
/** Editor settings */
|
|
209
200
|
editor: e(I, {}),
|
|
210
201
|
/** UI configuration */
|
|
@@ -214,30 +205,27 @@ const m = {
|
|
|
214
205
|
/** Block configuration */
|
|
215
206
|
blocks: e(E, {}),
|
|
216
207
|
/** Compiler configuration */
|
|
217
|
-
compiler: e(
|
|
218
|
-
/** Callbacks and event handlers */
|
|
219
|
-
callbacks: e(P, {})
|
|
208
|
+
compiler: e(P, {})
|
|
220
209
|
});
|
|
221
210
|
export {
|
|
222
211
|
E as BlocksSchema,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
B as CompilerSchema,
|
|
212
|
+
B as CompilerRuleSchema,
|
|
213
|
+
P as CompilerSchema,
|
|
226
214
|
g as CustomBlockTypeSchema,
|
|
227
215
|
v as CustomRuleSchema,
|
|
228
216
|
f as DefaultBlockTypeSchema,
|
|
229
217
|
y as DynamicContentSchema,
|
|
230
218
|
I as EditorSchema,
|
|
231
|
-
|
|
219
|
+
C as EmailHeaderSchema,
|
|
232
220
|
A as FeaturesSchema,
|
|
233
|
-
|
|
221
|
+
x as GuidoConfigSchema,
|
|
234
222
|
h as IdentitySchema,
|
|
235
|
-
|
|
223
|
+
i as MessageType,
|
|
236
224
|
k as PartnerSchema,
|
|
237
225
|
s as ProductType,
|
|
238
226
|
O as RegexRuleSchema,
|
|
239
227
|
L as RemoveRuleSchema,
|
|
240
228
|
N as ReplaceRuleSchema,
|
|
241
|
-
|
|
229
|
+
R as TemplateSchema,
|
|
242
230
|
T as UISchema
|
|
243
231
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as H, ref as
|
|
1
|
+
import { defineComponent as H, ref as m, computed as _ } from "vue";
|
|
2
2
|
import { useConfig as h } from "../../../composables/useConfig.js";
|
|
3
3
|
import { useExport as V } from "../../../composables/useExport.js";
|
|
4
4
|
import { useTestEmailClick as x } from "../../../composables/useGuidoActions.js";
|
|
@@ -10,25 +10,25 @@ import { getTooltipOptions as O } from "../../../utils/tooltipUtils.js";
|
|
|
10
10
|
import { InButtonV2 as A } from "@useinsider/design-system-vue";
|
|
11
11
|
const J = /* @__PURE__ */ H({
|
|
12
12
|
__name: "RightSlot",
|
|
13
|
-
setup(k, { expose:
|
|
14
|
-
const { config:
|
|
13
|
+
setup(k, { expose: c }) {
|
|
14
|
+
const { config: u } = h(), { exportHtml: r } = V(), { save: n } = E(), { openVersionHistory: i, closeVersionHistory: a } = w(), o = C(), t = T(), e = m(!1), s = m(!1), f = x(), v = () => {
|
|
15
15
|
if (o.isVersionHistoryOpen) {
|
|
16
16
|
a();
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
i();
|
|
20
|
-
},
|
|
20
|
+
}, d = async () => {
|
|
21
21
|
e.value = !0, await r(), e.value = !1;
|
|
22
|
-
},
|
|
22
|
+
}, y = () => {
|
|
23
23
|
o.isSaveAsTemplateDrawerOpen = !0;
|
|
24
|
-
},
|
|
24
|
+
}, S = _(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), l = async (p) => {
|
|
25
25
|
s.value = !0, o.loadingStatus = !0;
|
|
26
|
-
const
|
|
27
|
-
return s.value = !1,
|
|
26
|
+
const g = await n(p);
|
|
27
|
+
return s.value = !1, p && (o.loadingStatus = !1), g;
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return c({
|
|
30
30
|
handleSave: l
|
|
31
|
-
}), { __sfc: !0, config:
|
|
31
|
+
}), { __sfc: !0, config: u, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: o, trans: t, isExporting: e, isSaving: s, testEmailClick: f, handleVersionHistory: v, handleExport: d, handleSaveAs: y, versionHistoryTooltipText: S, handleSave: l, getTooltipOptions: O, InButtonV2: A };
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
export {
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { useConfigStore as
|
|
2
|
-
import { storeToRefs as
|
|
3
|
-
const
|
|
4
|
-
const e =
|
|
1
|
+
import { useConfigStore as F } from "../stores/config.js";
|
|
2
|
+
import { storeToRefs as I } from "pinia";
|
|
3
|
+
const k = () => {
|
|
4
|
+
const e = F(), {
|
|
5
5
|
config: t,
|
|
6
6
|
initialized: o,
|
|
7
7
|
identity: r,
|
|
8
8
|
partner: i,
|
|
9
|
-
template:
|
|
10
|
-
editor:
|
|
9
|
+
template: n,
|
|
10
|
+
editor: a,
|
|
11
11
|
ui: s,
|
|
12
|
-
features:
|
|
13
|
-
blocks:
|
|
14
|
-
compiler:
|
|
15
|
-
|
|
16
|
-
templateId: p,
|
|
12
|
+
features: u,
|
|
13
|
+
blocks: d,
|
|
14
|
+
compiler: p,
|
|
15
|
+
templateId: c,
|
|
17
16
|
userId: f,
|
|
18
17
|
variationId: m,
|
|
19
18
|
partnerName: g,
|
|
20
|
-
productType:
|
|
21
|
-
messageType:
|
|
22
|
-
username:
|
|
23
|
-
showHeader:
|
|
24
|
-
} =
|
|
19
|
+
productType: l,
|
|
20
|
+
messageType: b,
|
|
21
|
+
username: C,
|
|
22
|
+
showHeader: y
|
|
23
|
+
} = I(e);
|
|
25
24
|
return {
|
|
26
25
|
// State refs
|
|
27
26
|
config: t,
|
|
@@ -29,27 +28,26 @@ const w = () => {
|
|
|
29
28
|
// Section refs
|
|
30
29
|
identity: r,
|
|
31
30
|
partner: i,
|
|
32
|
-
template:
|
|
33
|
-
editor:
|
|
31
|
+
template: n,
|
|
32
|
+
editor: a,
|
|
34
33
|
ui: s,
|
|
35
|
-
features:
|
|
36
|
-
blocks:
|
|
37
|
-
compiler:
|
|
38
|
-
callbacks: l,
|
|
34
|
+
features: u,
|
|
35
|
+
blocks: d,
|
|
36
|
+
compiler: p,
|
|
39
37
|
// Convenience refs
|
|
40
|
-
templateId:
|
|
38
|
+
templateId: c,
|
|
41
39
|
userId: f,
|
|
42
40
|
variationId: m,
|
|
43
41
|
partnerName: g,
|
|
44
|
-
productType:
|
|
45
|
-
messageType:
|
|
46
|
-
username:
|
|
47
|
-
showHeader:
|
|
42
|
+
productType: l,
|
|
43
|
+
messageType: b,
|
|
44
|
+
username: C,
|
|
45
|
+
showHeader: y,
|
|
48
46
|
// Methods
|
|
49
47
|
getConfig: () => t.value,
|
|
50
|
-
isFeatureEnabled: (
|
|
48
|
+
isFeatureEnabled: (E) => e.isFeatureEnabled(E)
|
|
51
49
|
};
|
|
52
50
|
};
|
|
53
51
|
export {
|
|
54
|
-
|
|
52
|
+
k as useConfig
|
|
55
53
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (await o(t.compiledHtml, t.dynamicContentList, !0) && !((e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t)))
|
|
12
|
-
return r || s(t), t;
|
|
1
|
+
import { useSaveStart as i, useSaveComplete as m } from "./useGuidoActions.js";
|
|
2
|
+
import { useTemplatePreparation as n } from "../utils/templatePreparation.js";
|
|
3
|
+
import { useHtmlValidator as l } from "./useHtmlValidator.js";
|
|
4
|
+
const f = () => {
|
|
5
|
+
const e = i(), a = m(), { validateHtml: s } = l();
|
|
6
|
+
return { save: async (o = !1) => {
|
|
7
|
+
e();
|
|
8
|
+
const { prepareTemplateDetails: r } = n(), t = await r();
|
|
9
|
+
if (await s(t.compiledHtml, t.dynamicContentList, !0))
|
|
10
|
+
return o || a(t), t;
|
|
13
11
|
} };
|
|
14
12
|
};
|
|
15
13
|
export {
|
|
16
|
-
|
|
14
|
+
f as useSave
|
|
17
15
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import { useStripoEventHandler as
|
|
6
|
-
import { useToaster as
|
|
7
|
-
import { displayConditions as
|
|
8
|
-
import { useStripoApi as
|
|
9
|
-
import
|
|
10
|
-
import { useEditorStore as
|
|
11
|
-
import { dynamicContentToMergeTags as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
const { features:
|
|
15
|
-
var
|
|
16
|
-
const
|
|
1
|
+
import { useActionsApi as T } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as V } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as _ } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as B } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useStripoEventHandler as v } from "./useStripoEventHandler.js";
|
|
6
|
+
import { useToaster as A } from "./useToaster.js";
|
|
7
|
+
import { displayConditions as F } from "../enums/displayConditions.js";
|
|
8
|
+
import { useStripoApi as D } from "../services/stripoApi.js";
|
|
9
|
+
import I from "../static/styles/customEditorStyle.css.js";
|
|
10
|
+
import { useEditorStore as M } from "../stores/editor.js";
|
|
11
|
+
import { dynamicContentToMergeTags as U } from "../utils/genericUtil.js";
|
|
12
|
+
import P from "../package.json.js";
|
|
13
|
+
const K = (c) => {
|
|
14
|
+
const { features: l } = _(), { handleError: u } = A(), { getToken: y, getCustomFonts: S } = D(), { handleEvent: C } = v(), { getStripoBlocksConfig: E } = V(), h = async (i, n = []) => {
|
|
15
|
+
var g, f;
|
|
16
|
+
const o = M(), { html: r, css: p, forceRecreate: a } = i, { baseBlocks: t, extensions: d } = await E(), m = ((g = l.value) == null ? void 0 : g.displayConditions) ?? !0, b = ((f = l.value) == null ? void 0 : f.modulesDisabled) ?? !1;
|
|
17
17
|
window.UIEditor.initEditor(
|
|
18
18
|
document.querySelector("#guido-editor"),
|
|
19
19
|
{
|
|
20
20
|
metadata: c,
|
|
21
|
-
html:
|
|
22
|
-
css:
|
|
21
|
+
html: r,
|
|
22
|
+
css: p,
|
|
23
23
|
forceRecreate: a,
|
|
24
24
|
locale: "en",
|
|
25
25
|
undoButtonSelector: "#guido__undo-button",
|
|
@@ -30,11 +30,12 @@ const N = (c) => {
|
|
|
30
30
|
customAppearanceMergetags: !0,
|
|
31
31
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
32
32
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
33
|
-
customViewStyles:
|
|
34
|
-
conditionsEnabled:
|
|
35
|
-
customConditionsEnabled:
|
|
36
|
-
conditionCategories:
|
|
33
|
+
customViewStyles: I,
|
|
34
|
+
conditionsEnabled: m,
|
|
35
|
+
customConditionsEnabled: m,
|
|
36
|
+
conditionCategories: F,
|
|
37
37
|
enableXSSSecurity: !0,
|
|
38
|
+
modulesDisabled: b,
|
|
38
39
|
messageSettingsEnabled: !0,
|
|
39
40
|
displayGmailAnnotations: !0,
|
|
40
41
|
displayHiddenPreheader: !1,
|
|
@@ -45,44 +46,44 @@ const N = (c) => {
|
|
|
45
46
|
editorFonts: {
|
|
46
47
|
showDefaultStandardFonts: !0,
|
|
47
48
|
showDefaultNotStandardFonts: !0,
|
|
48
|
-
customFonts:
|
|
49
|
+
customFonts: n
|
|
49
50
|
},
|
|
50
51
|
mergeTags: [
|
|
51
52
|
{
|
|
52
|
-
entries:
|
|
53
|
+
entries: U(c.preselectedDynamicContentList)
|
|
53
54
|
}
|
|
54
55
|
],
|
|
55
|
-
async onTokenRefreshRequest(
|
|
56
|
+
async onTokenRefreshRequest(e) {
|
|
56
57
|
try {
|
|
57
|
-
const s = await
|
|
58
|
-
|
|
58
|
+
const s = await y();
|
|
59
|
+
e(s);
|
|
59
60
|
} catch (s) {
|
|
60
|
-
|
|
61
|
+
u(s, "Failed to refresh token");
|
|
61
62
|
}
|
|
62
63
|
},
|
|
63
64
|
onTemplateLoaded() {
|
|
64
65
|
try {
|
|
65
|
-
const { importCss:
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
const { importCss: e } = B(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: k } = T();
|
|
67
|
+
e(), s(), k(), c.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
|
|
68
|
+
o.hasChanges = !1;
|
|
68
69
|
}, 1e3);
|
|
69
|
-
} catch (
|
|
70
|
-
|
|
70
|
+
} catch (e) {
|
|
71
|
+
u(e, "Failed to load custom interface appearance");
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
|
-
onCodeEditorVisibilityChanged(
|
|
74
|
-
|
|
74
|
+
onCodeEditorVisibilityChanged(e) {
|
|
75
|
+
o.isCodeEditorOpen = e;
|
|
75
76
|
},
|
|
76
|
-
onEditorVisualModeChanged(
|
|
77
|
-
|
|
77
|
+
onEditorVisualModeChanged(e) {
|
|
78
|
+
o.editorVisualMode = e.toLowerCase();
|
|
78
79
|
},
|
|
79
|
-
onVersionHistoryVisibilityChanged(
|
|
80
|
-
|
|
80
|
+
onVersionHistoryVisibilityChanged(e) {
|
|
81
|
+
o.isVersionHistoryOpen = e;
|
|
81
82
|
},
|
|
82
83
|
onDataChanged() {
|
|
83
|
-
|
|
84
|
+
o.hasChanges = !0;
|
|
84
85
|
},
|
|
85
|
-
onEvent:
|
|
86
|
+
onEvent: C,
|
|
86
87
|
ignoreClickOutsideSelectors: [
|
|
87
88
|
"#guido-dynamic-content-modal",
|
|
88
89
|
".in-on-board-wrapper",
|
|
@@ -91,26 +92,26 @@ const N = (c) => {
|
|
|
91
92
|
extensions: d
|
|
92
93
|
}
|
|
93
94
|
);
|
|
94
|
-
},
|
|
95
|
+
}, w = (i) => new Promise((n, o) => {
|
|
95
96
|
var d;
|
|
96
97
|
if (document.getElementById("UiEditorScript")) {
|
|
97
|
-
i(),
|
|
98
|
+
i(), n();
|
|
98
99
|
return;
|
|
99
100
|
}
|
|
100
|
-
const
|
|
101
|
+
const r = P.guido, a = `https://email-static.useinsider.com/guido/${(d = r == null ? void 0 : r.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
|
|
101
102
|
t.id = "UiEditorScript", t.type = "module", t.src = a, t.onload = () => {
|
|
102
|
-
i(),
|
|
103
|
+
i(), n();
|
|
103
104
|
}, t.onerror = () => {
|
|
104
|
-
|
|
105
|
+
o(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
105
106
|
}, document.body.appendChild(t);
|
|
106
107
|
});
|
|
107
108
|
return { initPlugin: async (i) => {
|
|
108
|
-
await
|
|
109
|
-
const
|
|
110
|
-
await
|
|
109
|
+
await w(async () => {
|
|
110
|
+
const n = await S();
|
|
111
|
+
await h(i, n);
|
|
111
112
|
});
|
|
112
113
|
} };
|
|
113
114
|
};
|
|
114
115
|
export {
|
|
115
|
-
|
|
116
|
+
K as useStripo
|
|
116
117
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ExtensionBuilder as e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
2
|
import { UnsubscribeBlock as i } from "./block.js";
|
|
3
3
|
import { UnsubscribeControl as t } from "./control.js";
|
|
4
|
-
import { PreviewUIElement as
|
|
5
|
-
import { UnsubscribeIconsRegistry as
|
|
6
|
-
import { SettingsPanel as
|
|
4
|
+
import { PreviewUIElement as o } from "./elements/preview.js";
|
|
5
|
+
import { UnsubscribeIconsRegistry as r } from "./iconsRegistry.js";
|
|
6
|
+
import { SettingsPanel as s } from "./settingsPanel.js";
|
|
7
7
|
import n from "./styles.css.js";
|
|
8
|
-
import { UnsubscribeTagRegistry as
|
|
9
|
-
const
|
|
8
|
+
import { UnsubscribeTagRegistry as l } from "./tagRegistry.js";
|
|
9
|
+
const f = new e().addBlock(i).withSettingsPanelRegistry(s).addControl(t).addUiElement(o).addStyles(n).withLocalization({
|
|
10
10
|
en: {
|
|
11
|
-
"Unsubscribe Block": "Unsubscribe",
|
|
12
|
-
"Unsubscribe Block Description": "
|
|
11
|
+
"Unsubscribe Block": "Unsubscribe Block",
|
|
12
|
+
"Unsubscribe Block Description": "Add an unsubscribe link to your email",
|
|
13
13
|
"Select Template": "Select Template",
|
|
14
14
|
"Unsubscribe Template": "Unsubscribe Template",
|
|
15
15
|
Showing: "Showing",
|
|
16
16
|
of: "of"
|
|
17
17
|
}
|
|
18
|
-
}).withUiElementTagRegistry(
|
|
18
|
+
}).withUiElementTagRegistry(l).withIconsRegistry(r).build();
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
f as default
|
|
21
21
|
};
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* - Default values for optional configuration
|
|
8
8
|
* - Validation utilities
|
|
9
9
|
*/
|
|
10
|
-
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema,
|
|
11
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput,
|
|
10
|
+
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
+
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
12
12
|
export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_EDITOR, DEFAULT_UI, DEFAULT_FEATURES, DEFAULT_BLOCKS, DEFAULT_COMPILER, DEFAULT_PRODUCT_TYPE, DEFAULT_MESSAGE_TYPE, DEFAULT_USERNAME, EDITOR_TYPE, TEST_PARTNERS, isTestPartner, } from './defaults';
|
|
13
13
|
export { validateConfig, parseConfig, parseConfigSafe, getValidationErrors, isValidConfig, validateIdentity, validatePartner, } from './validator';
|
|
14
14
|
export type { ValidationResult, ValidationError, } from './validator';
|
|
@@ -5,14 +5,7 @@
|
|
|
5
5
|
* All types are inferred from these schemas to ensure single source of truth.
|
|
6
6
|
* @module @types/config/schemas
|
|
7
7
|
*/
|
|
8
|
-
import type { SavedTemplateDetails } from '../stripo';
|
|
9
8
|
import * as v from 'valibot';
|
|
10
|
-
/**
|
|
11
|
-
* Handler function for external validation before save
|
|
12
|
-
* @param data - The template details to validate
|
|
13
|
-
* @returns Promise<boolean> - true if valid, false to cancel save
|
|
14
|
-
*/
|
|
15
|
-
export type ExternalValidationHandler = (data: SavedTemplateDetails) => Promise<boolean>;
|
|
16
9
|
/**
|
|
17
10
|
* Message type constants for email templates
|
|
18
11
|
*/
|
|
@@ -153,6 +146,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
153
146
|
readonly displayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
154
147
|
/** Enable unsubscribe block */
|
|
155
148
|
readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
149
|
+
/** Disable modules panel in the editor */
|
|
150
|
+
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
156
151
|
}, undefined>;
|
|
157
152
|
/**
|
|
158
153
|
* Default block types available in Stripo
|
|
@@ -349,16 +344,6 @@ export declare const CompilerSchema: v.ObjectSchema<{
|
|
|
349
344
|
/** Skip default compiler rules */
|
|
350
345
|
readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
351
346
|
}, undefined>;
|
|
352
|
-
/**
|
|
353
|
-
* Callbacks configuration - event handlers and hooks
|
|
354
|
-
*/
|
|
355
|
-
export declare const CallbacksSchema: v.ObjectSchema<{
|
|
356
|
-
/**
|
|
357
|
-
* External validation handler called before save completes.
|
|
358
|
-
* Return false to cancel the save operation.
|
|
359
|
-
*/
|
|
360
|
-
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
361
|
-
}, undefined>;
|
|
362
347
|
/**
|
|
363
348
|
* Complete Guido configuration schema
|
|
364
349
|
*
|
|
@@ -371,7 +356,6 @@ export declare const CallbacksSchema: v.ObjectSchema<{
|
|
|
371
356
|
* - features: Feature toggles
|
|
372
357
|
* - blocks: Block configuration
|
|
373
358
|
* - compiler: HTML compilation
|
|
374
|
-
* - callbacks: Event handlers and hooks
|
|
375
359
|
*/
|
|
376
360
|
export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
377
361
|
/** Identity configuration (required) */
|
|
@@ -457,6 +441,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
457
441
|
readonly displayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
458
442
|
/** Enable unsubscribe block */
|
|
459
443
|
readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
444
|
+
/** Disable modules panel in the editor */
|
|
445
|
+
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
460
446
|
}, undefined>, {}>;
|
|
461
447
|
/** Block configuration */
|
|
462
448
|
readonly blocks: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -520,12 +506,4 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
520
506
|
/** Skip default compiler rules */
|
|
521
507
|
readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
522
508
|
}, undefined>, {}>;
|
|
523
|
-
/** Callbacks and event handlers */
|
|
524
|
-
readonly callbacks: v.OptionalSchema<v.ObjectSchema<{
|
|
525
|
-
/**
|
|
526
|
-
* External validation handler called before save completes.
|
|
527
|
-
* Return false to cancel the save operation.
|
|
528
|
-
*/
|
|
529
|
-
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
530
|
-
}, undefined>, {}>;
|
|
531
509
|
}, undefined>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This ensures type definitions are always in sync with validation.
|
|
6
6
|
* @module @types/config/types
|
|
7
7
|
*/
|
|
8
|
-
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema,
|
|
8
|
+
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema } from './schemas';
|
|
9
9
|
import type * as v from 'valibot';
|
|
10
10
|
/**
|
|
11
11
|
* Complete validated Guido configuration.
|
|
@@ -41,10 +41,6 @@ export type FeaturesConfig = v.InferOutput<typeof FeaturesSchema>;
|
|
|
41
41
|
export type BlocksConfig = v.InferOutput<typeof BlocksSchema>;
|
|
42
42
|
/** Compiler configuration (custom rules, ignore defaults) */
|
|
43
43
|
export type CompilerConfig = v.InferOutput<typeof CompilerSchema>;
|
|
44
|
-
/** Callbacks configuration (event handlers and hooks) */
|
|
45
|
-
export type CallbacksConfig = v.InferOutput<typeof CallbacksSchema>;
|
|
46
|
-
/** Re-export ExternalValidationHandler for convenience */
|
|
47
|
-
export type { ExternalValidationHandler };
|
|
48
44
|
/** Email header configuration (senderName, subject) */
|
|
49
45
|
export type EmailHeader = v.InferOutput<typeof EmailHeaderSchema>;
|
|
50
46
|
/** Dynamic content item */
|
|
@@ -89,8 +85,6 @@ export type FeaturesConfigInput = v.InferInput<typeof FeaturesSchema>;
|
|
|
89
85
|
export type BlocksConfigInput = v.InferInput<typeof BlocksSchema>;
|
|
90
86
|
/** Input type for compiler configuration */
|
|
91
87
|
export type CompilerConfigInput = v.InferInput<typeof CompilerSchema>;
|
|
92
|
-
/** Input type for callbacks configuration */
|
|
93
|
-
export type CallbacksConfigInput = v.InferInput<typeof CallbacksSchema>;
|
|
94
88
|
/** Default Stripo block types */
|
|
95
89
|
export type DefaultBlockType = v.InferOutput<typeof DefaultBlockTypeSchema>;
|
|
96
90
|
/** Custom Guido block types */
|
|
@@ -52,6 +52,7 @@ export declare const useConfig: () => {
|
|
|
52
52
|
testMessage: boolean;
|
|
53
53
|
displayConditions: boolean;
|
|
54
54
|
unsubscribe: boolean;
|
|
55
|
+
modulesDisabled: boolean;
|
|
55
56
|
};
|
|
56
57
|
blocks: {
|
|
57
58
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -89,9 +90,6 @@ export declare const useConfig: () => {
|
|
|
89
90
|
})[];
|
|
90
91
|
ignoreDefaultRules: boolean;
|
|
91
92
|
};
|
|
92
|
-
callbacks: {
|
|
93
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
94
|
-
};
|
|
95
93
|
} | null>;
|
|
96
94
|
initialized: import("vue").Ref<boolean>;
|
|
97
95
|
identity: import("vue").ComputedRef<{
|
|
@@ -139,6 +137,7 @@ export declare const useConfig: () => {
|
|
|
139
137
|
testMessage: boolean;
|
|
140
138
|
displayConditions: boolean;
|
|
141
139
|
unsubscribe: boolean;
|
|
140
|
+
modulesDisabled: boolean;
|
|
142
141
|
} | null>;
|
|
143
142
|
blocks: import("vue").ComputedRef<{
|
|
144
143
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -176,9 +175,6 @@ export declare const useConfig: () => {
|
|
|
176
175
|
})[];
|
|
177
176
|
ignoreDefaultRules: boolean;
|
|
178
177
|
} | null>;
|
|
179
|
-
callbacks: import("vue").ComputedRef<{
|
|
180
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
181
|
-
} | null>;
|
|
182
178
|
templateId: import("vue").ComputedRef<string>;
|
|
183
179
|
userId: import("vue").ComputedRef<string>;
|
|
184
180
|
variationId: import("vue").ComputedRef<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig
|
|
1
|
+
import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig } from '@@/Types/config';
|
|
2
2
|
interface ConfigStoreState {
|
|
3
3
|
/** Whether the config has been initialized */
|
|
4
4
|
initialized: boolean;
|
|
@@ -57,6 +57,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
57
57
|
testMessage: boolean;
|
|
58
58
|
displayConditions: boolean;
|
|
59
59
|
unsubscribe: boolean;
|
|
60
|
+
modulesDisabled: boolean;
|
|
60
61
|
};
|
|
61
62
|
blocks: {
|
|
62
63
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -94,9 +95,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
94
95
|
})[];
|
|
95
96
|
ignoreDefaultRules: boolean;
|
|
96
97
|
};
|
|
97
|
-
callbacks: {
|
|
98
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
99
|
-
};
|
|
100
98
|
} | null;
|
|
101
99
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
|
|
102
100
|
/**
|
|
@@ -150,6 +148,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
150
148
|
testMessage: boolean;
|
|
151
149
|
displayConditions: boolean;
|
|
152
150
|
unsubscribe: boolean;
|
|
151
|
+
modulesDisabled: boolean;
|
|
153
152
|
};
|
|
154
153
|
blocks: {
|
|
155
154
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -187,9 +186,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
187
186
|
})[];
|
|
188
187
|
ignoreDefaultRules: boolean;
|
|
189
188
|
};
|
|
190
|
-
callbacks: {
|
|
191
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
192
|
-
};
|
|
193
189
|
} | null;
|
|
194
190
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
|
|
195
191
|
/**
|
|
@@ -243,6 +239,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
243
239
|
testMessage: boolean;
|
|
244
240
|
displayConditions: boolean;
|
|
245
241
|
unsubscribe: boolean;
|
|
242
|
+
modulesDisabled: boolean;
|
|
246
243
|
};
|
|
247
244
|
blocks: {
|
|
248
245
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -280,9 +277,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
280
277
|
})[];
|
|
281
278
|
ignoreDefaultRules: boolean;
|
|
282
279
|
};
|
|
283
|
-
callbacks: {
|
|
284
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
285
|
-
};
|
|
286
280
|
} | null;
|
|
287
281
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
|
|
288
282
|
/**
|
|
@@ -336,6 +330,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
336
330
|
testMessage: boolean;
|
|
337
331
|
displayConditions: boolean;
|
|
338
332
|
unsubscribe: boolean;
|
|
333
|
+
modulesDisabled: boolean;
|
|
339
334
|
};
|
|
340
335
|
blocks: {
|
|
341
336
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -373,9 +368,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
373
368
|
})[];
|
|
374
369
|
ignoreDefaultRules: boolean;
|
|
375
370
|
};
|
|
376
|
-
callbacks: {
|
|
377
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
378
|
-
};
|
|
379
371
|
} | null;
|
|
380
372
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
|
|
381
373
|
/**
|
|
@@ -429,6 +421,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
429
421
|
testMessage: boolean;
|
|
430
422
|
displayConditions: boolean;
|
|
431
423
|
unsubscribe: boolean;
|
|
424
|
+
modulesDisabled: boolean;
|
|
432
425
|
};
|
|
433
426
|
blocks: {
|
|
434
427
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -466,9 +459,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
466
459
|
})[];
|
|
467
460
|
ignoreDefaultRules: boolean;
|
|
468
461
|
};
|
|
469
|
-
callbacks: {
|
|
470
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
471
|
-
};
|
|
472
462
|
} | null;
|
|
473
463
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
|
|
474
464
|
/**
|
|
@@ -522,6 +512,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
522
512
|
testMessage: boolean;
|
|
523
513
|
displayConditions: boolean;
|
|
524
514
|
unsubscribe: boolean;
|
|
515
|
+
modulesDisabled: boolean;
|
|
525
516
|
};
|
|
526
517
|
blocks: {
|
|
527
518
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -559,9 +550,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
559
550
|
})[];
|
|
560
551
|
ignoreDefaultRules: boolean;
|
|
561
552
|
};
|
|
562
|
-
callbacks: {
|
|
563
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
564
|
-
};
|
|
565
553
|
} | null;
|
|
566
554
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
|
|
567
555
|
/**
|
|
@@ -615,6 +603,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
615
603
|
testMessage: boolean;
|
|
616
604
|
displayConditions: boolean;
|
|
617
605
|
unsubscribe: boolean;
|
|
606
|
+
modulesDisabled: boolean;
|
|
618
607
|
};
|
|
619
608
|
blocks: {
|
|
620
609
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -652,9 +641,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
652
641
|
})[];
|
|
653
642
|
ignoreDefaultRules: boolean;
|
|
654
643
|
};
|
|
655
|
-
callbacks: {
|
|
656
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
657
|
-
};
|
|
658
644
|
} | null;
|
|
659
645
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
|
|
660
646
|
/**
|
|
@@ -708,6 +694,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
708
694
|
testMessage: boolean;
|
|
709
695
|
displayConditions: boolean;
|
|
710
696
|
unsubscribe: boolean;
|
|
697
|
+
modulesDisabled: boolean;
|
|
711
698
|
};
|
|
712
699
|
blocks: {
|
|
713
700
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -745,104 +732,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
745
732
|
})[];
|
|
746
733
|
ignoreDefaultRules: boolean;
|
|
747
734
|
};
|
|
748
|
-
callbacks: {
|
|
749
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
750
|
-
};
|
|
751
735
|
} | null;
|
|
752
736
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
|
|
753
|
-
/**
|
|
754
|
-
* Get the callbacks configuration
|
|
755
|
-
*/
|
|
756
|
-
callbacks: (state: {
|
|
757
|
-
initialized: boolean;
|
|
758
|
-
config: {
|
|
759
|
-
identity: {
|
|
760
|
-
templateId: string;
|
|
761
|
-
userId: string;
|
|
762
|
-
variationId?: string | undefined;
|
|
763
|
-
};
|
|
764
|
-
partner: {
|
|
765
|
-
name: string;
|
|
766
|
-
productType: 60 | 49 | 97;
|
|
767
|
-
messageType: 1 | 2;
|
|
768
|
-
username: string;
|
|
769
|
-
};
|
|
770
|
-
template: {
|
|
771
|
-
html: string;
|
|
772
|
-
css: string;
|
|
773
|
-
preselectedDynamicContent: {
|
|
774
|
-
text: string;
|
|
775
|
-
value: string;
|
|
776
|
-
fallback?: string | undefined;
|
|
777
|
-
format?: {
|
|
778
|
-
key: string;
|
|
779
|
-
value: string;
|
|
780
|
-
} | undefined;
|
|
781
|
-
}[];
|
|
782
|
-
selectedUnsubscribePages: number[];
|
|
783
|
-
};
|
|
784
|
-
editor: {
|
|
785
|
-
locale: string;
|
|
786
|
-
translationsPath: string;
|
|
787
|
-
migrationDate: number;
|
|
788
|
-
emailHeader: {
|
|
789
|
-
senderName: string;
|
|
790
|
-
subject: string;
|
|
791
|
-
};
|
|
792
|
-
};
|
|
793
|
-
ui: {
|
|
794
|
-
showHeader: boolean;
|
|
795
|
-
backButtonLabel?: string | undefined;
|
|
796
|
-
};
|
|
797
|
-
features: {
|
|
798
|
-
dynamicContent: boolean;
|
|
799
|
-
saveAsTemplate: boolean;
|
|
800
|
-
versionHistory: boolean;
|
|
801
|
-
testMessage: boolean;
|
|
802
|
-
displayConditions: boolean;
|
|
803
|
-
unsubscribe: boolean;
|
|
804
|
-
};
|
|
805
|
-
blocks: {
|
|
806
|
-
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
807
|
-
includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
|
|
808
|
-
};
|
|
809
|
-
compiler: {
|
|
810
|
-
customRules: ({
|
|
811
|
-
type: "replace";
|
|
812
|
-
search: string;
|
|
813
|
-
replacement: string;
|
|
814
|
-
replaceAll?: boolean | undefined;
|
|
815
|
-
id: string;
|
|
816
|
-
description?: string | undefined;
|
|
817
|
-
priority: number;
|
|
818
|
-
} | {
|
|
819
|
-
type: "regex";
|
|
820
|
-
pattern: string;
|
|
821
|
-
replacement: string;
|
|
822
|
-
flags?: string | undefined;
|
|
823
|
-
id: string;
|
|
824
|
-
description?: string | undefined;
|
|
825
|
-
priority: number;
|
|
826
|
-
} | {
|
|
827
|
-
type: "remove";
|
|
828
|
-
targets: string[];
|
|
829
|
-
id: string;
|
|
830
|
-
description?: string | undefined;
|
|
831
|
-
priority: number;
|
|
832
|
-
} | {
|
|
833
|
-
type: "custom";
|
|
834
|
-
processor: (html: string) => string;
|
|
835
|
-
id: string;
|
|
836
|
-
description?: string | undefined;
|
|
837
|
-
priority: number;
|
|
838
|
-
})[];
|
|
839
|
-
ignoreDefaultRules: boolean;
|
|
840
|
-
};
|
|
841
|
-
callbacks: {
|
|
842
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
843
|
-
};
|
|
844
|
-
} | null;
|
|
845
|
-
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
|
|
846
737
|
/**
|
|
847
738
|
* Get the template ID
|
|
848
739
|
*/
|
|
@@ -894,6 +785,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
894
785
|
testMessage: boolean;
|
|
895
786
|
displayConditions: boolean;
|
|
896
787
|
unsubscribe: boolean;
|
|
788
|
+
modulesDisabled: boolean;
|
|
897
789
|
};
|
|
898
790
|
blocks: {
|
|
899
791
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -931,9 +823,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
931
823
|
})[];
|
|
932
824
|
ignoreDefaultRules: boolean;
|
|
933
825
|
};
|
|
934
|
-
callbacks: {
|
|
935
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
936
|
-
};
|
|
937
826
|
} | null;
|
|
938
827
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
939
828
|
/**
|
|
@@ -987,6 +876,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
987
876
|
testMessage: boolean;
|
|
988
877
|
displayConditions: boolean;
|
|
989
878
|
unsubscribe: boolean;
|
|
879
|
+
modulesDisabled: boolean;
|
|
990
880
|
};
|
|
991
881
|
blocks: {
|
|
992
882
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1024,9 +914,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1024
914
|
})[];
|
|
1025
915
|
ignoreDefaultRules: boolean;
|
|
1026
916
|
};
|
|
1027
|
-
callbacks: {
|
|
1028
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1029
|
-
};
|
|
1030
917
|
} | null;
|
|
1031
918
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1032
919
|
/**
|
|
@@ -1080,6 +967,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1080
967
|
testMessage: boolean;
|
|
1081
968
|
displayConditions: boolean;
|
|
1082
969
|
unsubscribe: boolean;
|
|
970
|
+
modulesDisabled: boolean;
|
|
1083
971
|
};
|
|
1084
972
|
blocks: {
|
|
1085
973
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1117,9 +1005,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1117
1005
|
})[];
|
|
1118
1006
|
ignoreDefaultRules: boolean;
|
|
1119
1007
|
};
|
|
1120
|
-
callbacks: {
|
|
1121
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1122
|
-
};
|
|
1123
1008
|
} | null;
|
|
1124
1009
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1125
1010
|
/**
|
|
@@ -1173,6 +1058,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1173
1058
|
testMessage: boolean;
|
|
1174
1059
|
displayConditions: boolean;
|
|
1175
1060
|
unsubscribe: boolean;
|
|
1061
|
+
modulesDisabled: boolean;
|
|
1176
1062
|
};
|
|
1177
1063
|
blocks: {
|
|
1178
1064
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1210,9 +1096,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1210
1096
|
})[];
|
|
1211
1097
|
ignoreDefaultRules: boolean;
|
|
1212
1098
|
};
|
|
1213
|
-
callbacks: {
|
|
1214
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1215
|
-
};
|
|
1216
1099
|
} | null;
|
|
1217
1100
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1218
1101
|
/**
|
|
@@ -1266,6 +1149,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1266
1149
|
testMessage: boolean;
|
|
1267
1150
|
displayConditions: boolean;
|
|
1268
1151
|
unsubscribe: boolean;
|
|
1152
|
+
modulesDisabled: boolean;
|
|
1269
1153
|
};
|
|
1270
1154
|
blocks: {
|
|
1271
1155
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1303,9 +1187,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1303
1187
|
})[];
|
|
1304
1188
|
ignoreDefaultRules: boolean;
|
|
1305
1189
|
};
|
|
1306
|
-
callbacks: {
|
|
1307
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1308
|
-
};
|
|
1309
1190
|
} | null;
|
|
1310
1191
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1311
1192
|
/**
|
|
@@ -1359,6 +1240,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1359
1240
|
testMessage: boolean;
|
|
1360
1241
|
displayConditions: boolean;
|
|
1361
1242
|
unsubscribe: boolean;
|
|
1243
|
+
modulesDisabled: boolean;
|
|
1362
1244
|
};
|
|
1363
1245
|
blocks: {
|
|
1364
1246
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1396,9 +1278,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1396
1278
|
})[];
|
|
1397
1279
|
ignoreDefaultRules: boolean;
|
|
1398
1280
|
};
|
|
1399
|
-
callbacks: {
|
|
1400
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1401
|
-
};
|
|
1402
1281
|
} | null;
|
|
1403
1282
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1404
1283
|
/**
|
|
@@ -1452,6 +1331,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1452
1331
|
testMessage: boolean;
|
|
1453
1332
|
displayConditions: boolean;
|
|
1454
1333
|
unsubscribe: boolean;
|
|
1334
|
+
modulesDisabled: boolean;
|
|
1455
1335
|
};
|
|
1456
1336
|
blocks: {
|
|
1457
1337
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1489,9 +1369,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1489
1369
|
})[];
|
|
1490
1370
|
ignoreDefaultRules: boolean;
|
|
1491
1371
|
};
|
|
1492
|
-
callbacks: {
|
|
1493
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1494
|
-
};
|
|
1495
1372
|
} | null;
|
|
1496
1373
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1497
1374
|
/**
|
|
@@ -1545,6 +1422,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1545
1422
|
testMessage: boolean;
|
|
1546
1423
|
displayConditions: boolean;
|
|
1547
1424
|
unsubscribe: boolean;
|
|
1425
|
+
modulesDisabled: boolean;
|
|
1548
1426
|
};
|
|
1549
1427
|
blocks: {
|
|
1550
1428
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1582,9 +1460,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1582
1460
|
})[];
|
|
1583
1461
|
ignoreDefaultRules: boolean;
|
|
1584
1462
|
};
|
|
1585
|
-
callbacks: {
|
|
1586
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1587
|
-
};
|
|
1588
1463
|
} | null;
|
|
1589
1464
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
|
|
1590
1465
|
/**
|
|
@@ -1638,6 +1513,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1638
1513
|
testMessage: boolean;
|
|
1639
1514
|
displayConditions: boolean;
|
|
1640
1515
|
unsubscribe: boolean;
|
|
1516
|
+
modulesDisabled: boolean;
|
|
1641
1517
|
};
|
|
1642
1518
|
blocks: {
|
|
1643
1519
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1675,9 +1551,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1675
1551
|
})[];
|
|
1676
1552
|
ignoreDefaultRules: boolean;
|
|
1677
1553
|
};
|
|
1678
|
-
callbacks: {
|
|
1679
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1680
|
-
};
|
|
1681
1554
|
} | null;
|
|
1682
1555
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
|
|
1683
1556
|
}, {
|
|
@@ -32,16 +32,6 @@ ue-stripe-thumb:hover:not(.disabled),
|
|
|
32
32
|
padding: 0 16px 16px;
|
|
33
33
|
grid-row-gap: 16px;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
/* TODO: will be removed after we find another way to hide stripo custom modules */
|
|
37
|
-
#moduleTab_tab1,
|
|
38
|
-
button[aria-label="Default Modules"],
|
|
39
|
-
button[aria-controls="moduleTab_tab1_content"],
|
|
40
|
-
#moduleTab_tab2,
|
|
41
|
-
button[aria-label="Pre-Built AMP"],
|
|
42
|
-
button[aria-controls="moduleTab_tab2_content"] {
|
|
43
|
-
display: none !important;
|
|
44
|
-
}
|
|
45
35
|
`;
|
|
46
36
|
export {
|
|
47
37
|
o as default
|
package/dist/stores/config.js
CHANGED
|
@@ -64,13 +64,6 @@ const s = o("guido-config", {
|
|
|
64
64
|
var e;
|
|
65
65
|
return ((e = i.config) == null ? void 0 : e.compiler) ?? null;
|
|
66
66
|
},
|
|
67
|
-
/**
|
|
68
|
-
* Get the callbacks configuration
|
|
69
|
-
*/
|
|
70
|
-
callbacks: (i) => {
|
|
71
|
-
var e;
|
|
72
|
-
return ((e = i.config) == null ? void 0 : e.callbacks) ?? null;
|
|
73
|
-
},
|
|
74
67
|
/**
|
|
75
68
|
* Get the template ID
|
|
76
69
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.c2c0829",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|