@useinsider/guido 2.0.0-beta.828ad6c → 2.0.0-beta.84d530c

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.
@@ -1,5 +1,5 @@
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 d, variant as S } from "../../node_modules/valibot/dist/index.js";
2
- const i = {
1
+ import { object as o, number as b, optional as e, string as t, pipe as u, picklist as n, custom as d, boolean as c, array as a, minLength as p, literal as r, variant as S } from "../../node_modules/valibot/dist/index.js";
2
+ const m = {
3
3
  /** Promotional/marketing emails */
4
4
  PROMOTIONAL: 1,
5
5
  /** Transactional/system emails */
@@ -13,22 +13,22 @@ const i = {
13
13
  UNSUBSCRIBE_PAGES: 97
14
14
  }, h = o({
15
15
  /** Unique identifier for the template being edited */
16
- templateId: m(
16
+ templateId: u(
17
17
  t(),
18
- u(1, "templateId is required")
18
+ p(1, "templateId is required")
19
19
  ),
20
20
  /** Unique identifier for the user editing the template */
21
- userId: m(
21
+ userId: u(
22
22
  t(),
23
- u(1, "userId is required")
23
+ p(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: m(
29
+ name: u(
30
30
  t(),
31
- u(1, "partner.name is required")
31
+ p(1, "partner.name is required")
32
32
  ),
33
33
  /** Product type identifier */
34
34
  productType: e(
@@ -41,8 +41,8 @@ const i = {
41
41
  ),
42
42
  /** Message type (promotional or transactional) */
43
43
  messageType: e(
44
- n([i.PROMOTIONAL, i.TRANSACTIONAL]),
45
- i.PROMOTIONAL
44
+ n([m.PROMOTIONAL, m.TRANSACTIONAL]),
45
+ m.PROMOTIONAL
46
46
  ),
47
47
  /** Display name for the current user */
48
48
  username: e(t(), "Guido User")
@@ -60,7 +60,7 @@ const i = {
60
60
  value: t()
61
61
  })
62
62
  )
63
- }), R = o({
63
+ }), C = o({
64
64
  /** Initial HTML content */
65
65
  html: e(t(), ""),
66
66
  /** Initial CSS content */
@@ -71,8 +71,8 @@ const i = {
71
71
  []
72
72
  ),
73
73
  /** Selected unsubscribe page IDs */
74
- selectedUnsubscribePages: e(a(p()), [])
75
- }), C = o({
74
+ selectedUnsubscribePages: e(a(b()), [])
75
+ }), R = o({
76
76
  /** Sender display name */
77
77
  senderName: e(t(), ""),
78
78
  /** Email subject line */
@@ -83,15 +83,15 @@ const i = {
83
83
  /** Path to translations object */
84
84
  translationsPath: e(t(), "window.trans.en"),
85
85
  /** Migration date for template compatibility */
86
- migrationDate: e(p(), 1759696858),
86
+ migrationDate: e(b(), 1759696858),
87
87
  /** Email header settings */
88
- emailHeader: e(C, { senderName: "", subject: "" })
88
+ emailHeader: e(R, { senderName: "", subject: "" })
89
89
  }), T = o({
90
90
  /** Whether to show the header bar */
91
91
  showHeader: e(c(), !0),
92
92
  /** Custom label for back button (if shown) */
93
93
  backButtonLabel: e(t())
94
- }), A = o({
94
+ }), f = o({
95
95
  /** Enable dynamic content insertion */
96
96
  dynamicContent: e(c(), !0),
97
97
  /** Enable save as template functionality */
@@ -103,8 +103,10 @@ const i = {
103
103
  /** Enable display conditions */
104
104
  displayConditions: e(c(), !0),
105
105
  /** Enable unsubscribe block */
106
- unsubscribe: e(c(), !0)
107
- }), f = n([
106
+ unsubscribe: e(c(), !0),
107
+ /** Disable modules panel in the editor */
108
+ modulesDisabled: e(c(), !1)
109
+ }), A = n([
108
110
  "amp-accordion",
109
111
  "amp-carousel",
110
112
  "amp-form-controls",
@@ -129,7 +131,7 @@ const i = {
129
131
  ]), E = o({
130
132
  /** Default blocks to exclude from the editor */
131
133
  excludeDefaults: e(
132
- a(f),
134
+ a(A),
133
135
  []
134
136
  ),
135
137
  /** Custom blocks to include in the editor */
@@ -143,7 +145,7 @@ const i = {
143
145
  /** Human-readable description */
144
146
  description: e(t()),
145
147
  /** Priority for rule ordering (lower = earlier) */
146
- priority: p()
148
+ priority: b()
147
149
  }), N = o({
148
150
  ...l.entries,
149
151
  type: r("replace"),
@@ -172,20 +174,31 @@ const i = {
172
174
  type: r("custom"),
173
175
  /** Custom processor function */
174
176
  processor: d(
175
- (b) => typeof b == "function",
177
+ (i) => typeof i == "function",
176
178
  "processor must be a function"
177
179
  )
178
- }), B = S("type", [
180
+ }), x = S("type", [
179
181
  N,
180
182
  O,
181
183
  L,
182
184
  v
183
- ]), P = o({
185
+ ]), B = o({
184
186
  /** Custom compiler rules to apply */
185
- customRules: e(a(B), []),
187
+ customRules: e(a(x), []),
186
188
  /** Skip default compiler rules */
187
189
  ignoreDefaultRules: e(c(), !1)
188
- }), x = o({
190
+ }), P = o({
191
+ /**
192
+ * External validation handler called before save completes.
193
+ * Return false to cancel the save operation.
194
+ */
195
+ externalValidation: e(
196
+ d(
197
+ (i) => typeof i == "function",
198
+ "externalValidation must be a function"
199
+ )
200
+ )
201
+ }), D = o({
189
202
  // Required sections
190
203
  /** Identity configuration (required) */
191
204
  identity: h,
@@ -193,37 +206,40 @@ const i = {
193
206
  partner: k,
194
207
  // Optional sections (with defaults)
195
208
  /** Template content and presets */
196
- template: e(R, {}),
209
+ template: e(C, {}),
197
210
  /** Editor settings */
198
211
  editor: e(I, {}),
199
212
  /** UI configuration */
200
213
  ui: e(T, {}),
201
214
  /** Feature toggles */
202
- features: e(A, {}),
215
+ features: e(f, {}),
203
216
  /** Block configuration */
204
217
  blocks: e(E, {}),
205
218
  /** Compiler configuration */
206
- compiler: e(P, {})
219
+ compiler: e(B, {}),
220
+ /** Callbacks and event handlers */
221
+ callbacks: e(P, {})
207
222
  });
208
223
  export {
209
224
  E as BlocksSchema,
210
- B as CompilerRuleSchema,
211
- P as CompilerSchema,
225
+ P as CallbacksSchema,
226
+ x as CompilerRuleSchema,
227
+ B as CompilerSchema,
212
228
  g as CustomBlockTypeSchema,
213
229
  v as CustomRuleSchema,
214
- f as DefaultBlockTypeSchema,
230
+ A as DefaultBlockTypeSchema,
215
231
  y as DynamicContentSchema,
216
232
  I as EditorSchema,
217
- C as EmailHeaderSchema,
218
- A as FeaturesSchema,
219
- x as GuidoConfigSchema,
233
+ R as EmailHeaderSchema,
234
+ f as FeaturesSchema,
235
+ D as GuidoConfigSchema,
220
236
  h as IdentitySchema,
221
- i as MessageType,
237
+ m as MessageType,
222
238
  k as PartnerSchema,
223
239
  s as ProductType,
224
240
  O as RegexRuleSchema,
225
241
  L as RemoveRuleSchema,
226
242
  N as ReplaceRuleSchema,
227
- R as TemplateSchema,
243
+ C as TemplateSchema,
228
244
  T as UISchema
229
245
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as H, ref as m, computed as _ } from "vue";
1
+ import { defineComponent as H, ref as c, 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: 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 = () => {
13
+ setup(k, { expose: u }) {
14
+ const { config: f } = h(), { exportHtml: r } = V(), { save: n } = E(), { openVersionHistory: i, closeVersionHistory: a } = w(), o = C(), t = T(), e = c(!1), s = c(!1), v = x(), d = () => {
15
15
  if (o.isVersionHistoryOpen) {
16
16
  a();
17
17
  return;
18
18
  }
19
19
  i();
20
- }, d = async () => {
20
+ }, y = async () => {
21
21
  e.value = !0, await r(), e.value = !1;
22
- }, y = () => {
22
+ }, S = () => {
23
23
  o.isSaveAsTemplateDrawerOpen = !0;
24
- }, S = _(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), l = async (p) => {
24
+ }, g = _(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), l = async (p) => {
25
25
  s.value = !0, o.loadingStatus = !0;
26
- const g = await n(p);
27
- return s.value = !1, p && (o.loadingStatus = !1), g;
26
+ const m = await n(p);
27
+ return s.value = !1, (p || !m) && (o.loadingStatus = !1), m;
28
28
  };
29
- return c({
29
+ return u({
30
30
  handleSave: l
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 };
31
+ }), { __sfc: !0, config: f, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: o, trans: t, isExporting: e, isSaving: s, testEmailClick: v, handleVersionHistory: d, handleExport: y, handleSaveAs: S, versionHistoryTooltipText: g, handleSave: l, getTooltipOptions: O, InButtonV2: A };
32
32
  }
33
33
  });
34
34
  export {
@@ -1,26 +1,27 @@
1
- import { useConfigStore as F } from "../stores/config.js";
2
- import { storeToRefs as I } from "pinia";
3
- const k = () => {
4
- const e = F(), {
1
+ import { useConfigStore as I } from "../stores/config.js";
2
+ import { storeToRefs as T } from "pinia";
3
+ const w = () => {
4
+ const e = I(), {
5
5
  config: t,
6
6
  initialized: o,
7
7
  identity: r,
8
8
  partner: i,
9
- template: n,
10
- editor: a,
9
+ template: a,
10
+ editor: n,
11
11
  ui: s,
12
- features: u,
13
- blocks: d,
14
- compiler: p,
15
- templateId: c,
12
+ features: c,
13
+ blocks: u,
14
+ compiler: d,
15
+ callbacks: l,
16
+ templateId: p,
16
17
  userId: f,
17
18
  variationId: m,
18
19
  partnerName: g,
19
- productType: l,
20
- messageType: b,
21
- username: C,
22
- showHeader: y
23
- } = I(e);
20
+ productType: b,
21
+ messageType: C,
22
+ username: y,
23
+ showHeader: E
24
+ } = T(e);
24
25
  return {
25
26
  // State refs
26
27
  config: t,
@@ -28,26 +29,27 @@ const k = () => {
28
29
  // Section refs
29
30
  identity: r,
30
31
  partner: i,
31
- template: n,
32
- editor: a,
32
+ template: a,
33
+ editor: n,
33
34
  ui: s,
34
- features: u,
35
- blocks: d,
36
- compiler: p,
35
+ features: c,
36
+ blocks: u,
37
+ compiler: d,
38
+ callbacks: l,
37
39
  // Convenience refs
38
- templateId: c,
40
+ templateId: p,
39
41
  userId: f,
40
42
  variationId: m,
41
43
  partnerName: g,
42
- productType: l,
43
- messageType: b,
44
- username: C,
45
- showHeader: y,
44
+ productType: b,
45
+ messageType: C,
46
+ username: y,
47
+ showHeader: E,
46
48
  // Methods
47
49
  getConfig: () => t.value,
48
- isFeatureEnabled: (E) => e.isFeatureEnabled(E)
50
+ isFeatureEnabled: (F) => e.isFeatureEnabled(F)
49
51
  };
50
52
  };
51
53
  export {
52
- k as useConfig
54
+ w as useConfig
53
55
  };
@@ -1,15 +1,17 @@
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;
1
+ import { useConfig as l } from "./useConfig.js";
2
+ import { useSaveStart as m, useSaveComplete as c } from "./useGuidoActions.js";
3
+ import { useTemplatePreparation as d } from "../utils/templatePreparation.js";
4
+ import { useHtmlValidator as p } from "./useHtmlValidator.js";
5
+ const w = () => {
6
+ const i = m(), s = c(), { validateHtml: o } = p(), { callbacks: a } = l();
7
+ return { save: async (r = !1) => {
8
+ var e;
9
+ i();
10
+ const { prepareTemplateDetails: n } = d(), t = await n();
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;
11
13
  } };
12
14
  };
13
15
  export {
14
- f as useSave
16
+ w as useSave
15
17
  };
@@ -1,25 +1,25 @@
1
- import { useActionsApi as b } from "./useActionsApi.js";
2
- import { useBlocksConfig as k } from "./useBlocksConfig.js";
3
- import { useConfig as T } from "./useConfig.js";
4
- import { useCustomInterfaceAppearance as V } from "./useCustomInterfaceAppearance.js";
5
- import { useStripoEventHandler as _ } from "./useStripoEventHandler.js";
6
- import { useToaster as B } from "./useToaster.js";
7
- import { displayConditions as A } from "../enums/displayConditions.js";
8
- import { useStripoApi as v } from "../services/stripoApi.js";
9
- import F from "../static/styles/customEditorStyle.css.js";
10
- import { useEditorStore as I } from "../stores/editor.js";
11
- import { dynamicContentToMergeTags as M } from "../utils/genericUtil.js";
12
- import U from "../package.json.js";
13
- const N = (c) => {
14
- const { features: g } = T(), { handleError: l } = B(), { getToken: f, getCustomFonts: y } = v(), { handleEvent: S } = _(), { getStripoBlocksConfig: C } = k(), E = async (i, r = []) => {
15
- var m;
16
- const e = I(), { html: n, css: u, forceRecreate: a } = i, { baseBlocks: t, extensions: d } = await C(), p = ((m = g.value) == null ? void 0 : m.displayConditions) ?? !0;
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: n,
22
- css: u,
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: F,
34
- conditionsEnabled: p,
35
- customConditionsEnabled: p,
36
- conditionCategories: A,
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: r
49
+ customFonts: n
49
50
  },
50
51
  mergeTags: [
51
52
  {
52
- entries: M(c.preselectedDynamicContentList)
53
+ entries: U(c.preselectedDynamicContentList)
53
54
  }
54
55
  ],
55
- async onTokenRefreshRequest(o) {
56
+ async onTokenRefreshRequest(e) {
56
57
  try {
57
- const s = await f();
58
- o(s);
58
+ const s = await y();
59
+ e(s);
59
60
  } catch (s) {
60
- l(s, "Failed to refresh token");
61
+ u(s, "Failed to refresh token");
61
62
  }
62
63
  },
63
64
  onTemplateLoaded() {
64
65
  try {
65
- const { importCss: o } = V(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: w } = b();
66
- o(), s(), w(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
67
- e.hasChanges = !1;
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 (o) {
70
- l(o, "Failed to load custom interface appearance");
70
+ } catch (e) {
71
+ u(e, "Failed to load custom interface appearance");
71
72
  }
72
73
  },
73
- onCodeEditorVisibilityChanged(o) {
74
- e.isCodeEditorOpen = o;
74
+ onCodeEditorVisibilityChanged(e) {
75
+ o.isCodeEditorOpen = e;
75
76
  },
76
- onEditorVisualModeChanged(o) {
77
- e.editorVisualMode = o.toLowerCase();
77
+ onEditorVisualModeChanged(e) {
78
+ o.editorVisualMode = e.toLowerCase();
78
79
  },
79
- onVersionHistoryVisibilityChanged(o) {
80
- e.isVersionHistoryOpen = o;
80
+ onVersionHistoryVisibilityChanged(e) {
81
+ o.isVersionHistoryOpen = e;
81
82
  },
82
83
  onDataChanged() {
83
- e.hasChanges = !0;
84
+ o.hasChanges = !0;
84
85
  },
85
- onEvent: S,
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
- }, h = (i) => new Promise((r, e) => {
95
+ }, w = (i) => new Promise((n, o) => {
95
96
  var d;
96
97
  if (document.getElementById("UiEditorScript")) {
97
- i(), r();
98
+ i(), n();
98
99
  return;
99
100
  }
100
- const n = U.guido, a = `https://email-static.useinsider.com/guido/${(d = n == null ? void 0 : n.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
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(), r();
103
+ i(), n();
103
104
  }, t.onerror = () => {
104
- e(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
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 h(async () => {
109
- const r = await y();
110
- await E(i, r);
109
+ await w(async () => {
110
+ const n = await S();
111
+ await h(i, n);
111
112
  });
112
113
  } };
113
114
  };
114
115
  export {
115
- N as useStripo
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 o } from "./elements/preview.js";
5
- import { UnsubscribeIconsRegistry as r } from "./iconsRegistry.js";
6
- import { SettingsPanel as s } from "./settingsPanel.js";
4
+ import { PreviewUIElement as s } from "./elements/preview.js";
5
+ import { UnsubscribeIconsRegistry as o } from "./iconsRegistry.js";
6
+ import { SettingsPanel as r } from "./settingsPanel.js";
7
7
  import n from "./styles.css.js";
8
- import { UnsubscribeTagRegistry as l } from "./tagRegistry.js";
9
- const f = new e().addBlock(i).withSettingsPanelRegistry(s).addControl(t).addUiElement(o).addStyles(n).withLocalization({
8
+ import { UnsubscribeTagRegistry as c } from "./tagRegistry.js";
9
+ const g = new e().addBlock(i).withSettingsPanelRegistry(r).addControl(t).addUiElement(s).addStyles(n).withLocalization({
10
10
  en: {
11
- "Unsubscribe Block": "Unsubscribe Block",
12
- "Unsubscribe Block Description": "Add an unsubscribe link to your email",
11
+ "Unsubscribe Block": "Unsubscribe",
12
+ "Unsubscribe Block Description": "Unsubscribe lets you add an Unsubscribe Link to direct users to opt out of receiving your messages.",
13
13
  "Select Template": "Select Template",
14
14
  "Unsubscribe Template": "Unsubscribe Template",
15
15
  Showing: "Showing",
16
16
  of: "of"
17
17
  }
18
- }).withUiElementTagRegistry(l).withIconsRegistry(r).build();
18
+ }).withUiElementTagRegistry(c).withIconsRegistry(o).build();
19
19
  export {
20
- f as default
20
+ g 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, 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';
10
+ export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, 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, CallbacksConfig, CallbacksConfigInput, ExternalValidationHandler, 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,7 +5,14 @@
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';
8
9
  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>;
9
16
  /**
10
17
  * Message type constants for email templates
11
18
  */
@@ -146,6 +153,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
146
153
  readonly displayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
147
154
  /** Enable unsubscribe block */
148
155
  readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
156
+ /** Disable modules panel in the editor */
157
+ readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
149
158
  }, undefined>;
150
159
  /**
151
160
  * Default block types available in Stripo
@@ -342,6 +351,16 @@ export declare const CompilerSchema: v.ObjectSchema<{
342
351
  /** Skip default compiler rules */
343
352
  readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
344
353
  }, undefined>;
354
+ /**
355
+ * Callbacks configuration - event handlers and hooks
356
+ */
357
+ export declare const CallbacksSchema: v.ObjectSchema<{
358
+ /**
359
+ * External validation handler called before save completes.
360
+ * Return false to cancel the save operation.
361
+ */
362
+ readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
363
+ }, undefined>;
345
364
  /**
346
365
  * Complete Guido configuration schema
347
366
  *
@@ -354,6 +373,7 @@ export declare const CompilerSchema: v.ObjectSchema<{
354
373
  * - features: Feature toggles
355
374
  * - blocks: Block configuration
356
375
  * - compiler: HTML compilation
376
+ * - callbacks: Event handlers and hooks
357
377
  */
358
378
  export declare const GuidoConfigSchema: v.ObjectSchema<{
359
379
  /** Identity configuration (required) */
@@ -439,6 +459,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
439
459
  readonly displayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
440
460
  /** Enable unsubscribe block */
441
461
  readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
462
+ /** Disable modules panel in the editor */
463
+ readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
442
464
  }, undefined>, {}>;
443
465
  /** Block configuration */
444
466
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -502,4 +524,12 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
502
524
  /** Skip default compiler rules */
503
525
  readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
504
526
  }, undefined>, {}>;
527
+ /** Callbacks and event handlers */
528
+ readonly callbacks: v.OptionalSchema<v.ObjectSchema<{
529
+ /**
530
+ * External validation handler called before save completes.
531
+ * Return false to cancel the save operation.
532
+ */
533
+ readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
534
+ }, undefined>, {}>;
505
535
  }, 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, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema } from './schemas';
8
+ import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, ExternalValidationHandler } from './schemas';
9
9
  import type * as v from 'valibot';
10
10
  /**
11
11
  * Complete validated Guido configuration.
@@ -41,6 +41,10 @@ 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 };
44
48
  /** Email header configuration (senderName, subject) */
45
49
  export type EmailHeader = v.InferOutput<typeof EmailHeaderSchema>;
46
50
  /** Dynamic content item */
@@ -85,6 +89,8 @@ export type FeaturesConfigInput = v.InferInput<typeof FeaturesSchema>;
85
89
  export type BlocksConfigInput = v.InferInput<typeof BlocksSchema>;
86
90
  /** Input type for compiler configuration */
87
91
  export type CompilerConfigInput = v.InferInput<typeof CompilerSchema>;
92
+ /** Input type for callbacks configuration */
93
+ export type CallbacksConfigInput = v.InferInput<typeof CallbacksSchema>;
88
94
  /** Default Stripo block types */
89
95
  export type DefaultBlockType = v.InferOutput<typeof DefaultBlockTypeSchema>;
90
96
  /** 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,6 +90,9 @@ export declare const useConfig: () => {
89
90
  })[];
90
91
  ignoreDefaultRules: boolean;
91
92
  };
93
+ callbacks: {
94
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
95
+ };
92
96
  } | null>;
93
97
  initialized: import("vue").Ref<boolean>;
94
98
  identity: import("vue").ComputedRef<{
@@ -136,6 +140,7 @@ export declare const useConfig: () => {
136
140
  testMessage: boolean;
137
141
  displayConditions: boolean;
138
142
  unsubscribe: boolean;
143
+ modulesDisabled: boolean;
139
144
  } | null>;
140
145
  blocks: import("vue").ComputedRef<{
141
146
  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")[];
@@ -173,6 +178,9 @@ export declare const useConfig: () => {
173
178
  })[];
174
179
  ignoreDefaultRules: boolean;
175
180
  } | null>;
181
+ callbacks: import("vue").ComputedRef<{
182
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
183
+ } | null>;
176
184
  templateId: import("vue").ComputedRef<string>;
177
185
  userId: import("vue").ComputedRef<string>;
178
186
  variationId: import("vue").ComputedRef<string>;
@@ -1,4 +1,4 @@
1
- import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig } from '@@/Types/config';
1
+ import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, CallbacksConfig } 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,6 +95,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
94
95
  })[];
95
96
  ignoreDefaultRules: boolean;
96
97
  };
98
+ callbacks: {
99
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
100
+ };
97
101
  } | null;
98
102
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
99
103
  /**
@@ -147,6 +151,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
147
151
  testMessage: boolean;
148
152
  displayConditions: boolean;
149
153
  unsubscribe: boolean;
154
+ modulesDisabled: boolean;
150
155
  };
151
156
  blocks: {
152
157
  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")[];
@@ -184,6 +189,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
184
189
  })[];
185
190
  ignoreDefaultRules: boolean;
186
191
  };
192
+ callbacks: {
193
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
194
+ };
187
195
  } | null;
188
196
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
189
197
  /**
@@ -237,6 +245,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
237
245
  testMessage: boolean;
238
246
  displayConditions: boolean;
239
247
  unsubscribe: boolean;
248
+ modulesDisabled: boolean;
240
249
  };
241
250
  blocks: {
242
251
  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")[];
@@ -274,6 +283,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
274
283
  })[];
275
284
  ignoreDefaultRules: boolean;
276
285
  };
286
+ callbacks: {
287
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
288
+ };
277
289
  } | null;
278
290
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
279
291
  /**
@@ -327,6 +339,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
327
339
  testMessage: boolean;
328
340
  displayConditions: boolean;
329
341
  unsubscribe: boolean;
342
+ modulesDisabled: boolean;
330
343
  };
331
344
  blocks: {
332
345
  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")[];
@@ -364,6 +377,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
364
377
  })[];
365
378
  ignoreDefaultRules: boolean;
366
379
  };
380
+ callbacks: {
381
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
382
+ };
367
383
  } | null;
368
384
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
369
385
  /**
@@ -417,6 +433,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
417
433
  testMessage: boolean;
418
434
  displayConditions: boolean;
419
435
  unsubscribe: boolean;
436
+ modulesDisabled: boolean;
420
437
  };
421
438
  blocks: {
422
439
  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")[];
@@ -454,6 +471,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
454
471
  })[];
455
472
  ignoreDefaultRules: boolean;
456
473
  };
474
+ callbacks: {
475
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
476
+ };
457
477
  } | null;
458
478
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
459
479
  /**
@@ -507,6 +527,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
507
527
  testMessage: boolean;
508
528
  displayConditions: boolean;
509
529
  unsubscribe: boolean;
530
+ modulesDisabled: boolean;
510
531
  };
511
532
  blocks: {
512
533
  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")[];
@@ -544,6 +565,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
544
565
  })[];
545
566
  ignoreDefaultRules: boolean;
546
567
  };
568
+ callbacks: {
569
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
570
+ };
547
571
  } | null;
548
572
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
549
573
  /**
@@ -597,6 +621,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
597
621
  testMessage: boolean;
598
622
  displayConditions: boolean;
599
623
  unsubscribe: boolean;
624
+ modulesDisabled: boolean;
600
625
  };
601
626
  blocks: {
602
627
  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")[];
@@ -634,6 +659,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
634
659
  })[];
635
660
  ignoreDefaultRules: boolean;
636
661
  };
662
+ callbacks: {
663
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
664
+ };
637
665
  } | null;
638
666
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
639
667
  /**
@@ -687,6 +715,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
687
715
  testMessage: boolean;
688
716
  displayConditions: boolean;
689
717
  unsubscribe: boolean;
718
+ modulesDisabled: boolean;
690
719
  };
691
720
  blocks: {
692
721
  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")[];
@@ -724,8 +753,105 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
724
753
  })[];
725
754
  ignoreDefaultRules: boolean;
726
755
  };
756
+ callbacks: {
757
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
758
+ };
727
759
  } | null;
728
760
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
761
+ /**
762
+ * Get the callbacks configuration
763
+ */
764
+ callbacks: (state: {
765
+ initialized: boolean;
766
+ config: {
767
+ identity: {
768
+ templateId: string;
769
+ userId: string;
770
+ variationId?: string | undefined;
771
+ };
772
+ partner: {
773
+ name: string;
774
+ productType: 60 | 49 | 97;
775
+ messageType: 1 | 2;
776
+ username: string;
777
+ };
778
+ template: {
779
+ html: string;
780
+ css: string;
781
+ preselectedDynamicContent: {
782
+ text: string;
783
+ value: string;
784
+ fallback?: string | undefined;
785
+ format?: {
786
+ key: string;
787
+ value: string;
788
+ } | undefined;
789
+ }[];
790
+ selectedUnsubscribePages: number[];
791
+ };
792
+ editor: {
793
+ locale: string;
794
+ translationsPath: string;
795
+ migrationDate: number;
796
+ emailHeader: {
797
+ senderName: string;
798
+ subject: string;
799
+ };
800
+ };
801
+ ui: {
802
+ showHeader: boolean;
803
+ backButtonLabel?: string | undefined;
804
+ };
805
+ features: {
806
+ dynamicContent: boolean;
807
+ saveAsTemplate: boolean;
808
+ versionHistory: boolean;
809
+ testMessage: boolean;
810
+ displayConditions: boolean;
811
+ unsubscribe: boolean;
812
+ modulesDisabled: boolean;
813
+ };
814
+ blocks: {
815
+ 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")[];
816
+ includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
817
+ };
818
+ compiler: {
819
+ customRules: ({
820
+ type: "replace";
821
+ search: string;
822
+ replacement: string;
823
+ replaceAll?: boolean | undefined;
824
+ id: string;
825
+ description?: string | undefined;
826
+ priority: number;
827
+ } | {
828
+ type: "regex";
829
+ pattern: string;
830
+ replacement: string;
831
+ flags?: string | undefined;
832
+ id: string;
833
+ description?: string | undefined;
834
+ priority: number;
835
+ } | {
836
+ type: "remove";
837
+ targets: string[];
838
+ id: string;
839
+ description?: string | undefined;
840
+ priority: number;
841
+ } | {
842
+ type: "custom";
843
+ processor: (html: string) => string;
844
+ id: string;
845
+ description?: string | undefined;
846
+ priority: number;
847
+ })[];
848
+ ignoreDefaultRules: boolean;
849
+ };
850
+ callbacks: {
851
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
852
+ };
853
+ } | null;
854
+ } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
729
855
  /**
730
856
  * Get the template ID
731
857
  */
@@ -777,6 +903,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
777
903
  testMessage: boolean;
778
904
  displayConditions: boolean;
779
905
  unsubscribe: boolean;
906
+ modulesDisabled: boolean;
780
907
  };
781
908
  blocks: {
782
909
  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")[];
@@ -814,6 +941,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
814
941
  })[];
815
942
  ignoreDefaultRules: boolean;
816
943
  };
944
+ callbacks: {
945
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
946
+ };
817
947
  } | null;
818
948
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
819
949
  /**
@@ -867,6 +997,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
867
997
  testMessage: boolean;
868
998
  displayConditions: boolean;
869
999
  unsubscribe: boolean;
1000
+ modulesDisabled: boolean;
870
1001
  };
871
1002
  blocks: {
872
1003
  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")[];
@@ -904,6 +1035,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
904
1035
  })[];
905
1036
  ignoreDefaultRules: boolean;
906
1037
  };
1038
+ callbacks: {
1039
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1040
+ };
907
1041
  } | null;
908
1042
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
909
1043
  /**
@@ -957,6 +1091,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
957
1091
  testMessage: boolean;
958
1092
  displayConditions: boolean;
959
1093
  unsubscribe: boolean;
1094
+ modulesDisabled: boolean;
960
1095
  };
961
1096
  blocks: {
962
1097
  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")[];
@@ -994,6 +1129,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
994
1129
  })[];
995
1130
  ignoreDefaultRules: boolean;
996
1131
  };
1132
+ callbacks: {
1133
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1134
+ };
997
1135
  } | null;
998
1136
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
999
1137
  /**
@@ -1047,6 +1185,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1047
1185
  testMessage: boolean;
1048
1186
  displayConditions: boolean;
1049
1187
  unsubscribe: boolean;
1188
+ modulesDisabled: boolean;
1050
1189
  };
1051
1190
  blocks: {
1052
1191
  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")[];
@@ -1084,6 +1223,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1084
1223
  })[];
1085
1224
  ignoreDefaultRules: boolean;
1086
1225
  };
1226
+ callbacks: {
1227
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1228
+ };
1087
1229
  } | null;
1088
1230
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
1089
1231
  /**
@@ -1137,6 +1279,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1137
1279
  testMessage: boolean;
1138
1280
  displayConditions: boolean;
1139
1281
  unsubscribe: boolean;
1282
+ modulesDisabled: boolean;
1140
1283
  };
1141
1284
  blocks: {
1142
1285
  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")[];
@@ -1174,6 +1317,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1174
1317
  })[];
1175
1318
  ignoreDefaultRules: boolean;
1176
1319
  };
1320
+ callbacks: {
1321
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1322
+ };
1177
1323
  } | null;
1178
1324
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
1179
1325
  /**
@@ -1227,6 +1373,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1227
1373
  testMessage: boolean;
1228
1374
  displayConditions: boolean;
1229
1375
  unsubscribe: boolean;
1376
+ modulesDisabled: boolean;
1230
1377
  };
1231
1378
  blocks: {
1232
1379
  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")[];
@@ -1264,6 +1411,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1264
1411
  })[];
1265
1412
  ignoreDefaultRules: boolean;
1266
1413
  };
1414
+ callbacks: {
1415
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1416
+ };
1267
1417
  } | null;
1268
1418
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
1269
1419
  /**
@@ -1317,6 +1467,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1317
1467
  testMessage: boolean;
1318
1468
  displayConditions: boolean;
1319
1469
  unsubscribe: boolean;
1470
+ modulesDisabled: boolean;
1320
1471
  };
1321
1472
  blocks: {
1322
1473
  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")[];
@@ -1354,6 +1505,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1354
1505
  })[];
1355
1506
  ignoreDefaultRules: boolean;
1356
1507
  };
1508
+ callbacks: {
1509
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1510
+ };
1357
1511
  } | null;
1358
1512
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
1359
1513
  /**
@@ -1407,6 +1561,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1407
1561
  testMessage: boolean;
1408
1562
  displayConditions: boolean;
1409
1563
  unsubscribe: boolean;
1564
+ modulesDisabled: boolean;
1410
1565
  };
1411
1566
  blocks: {
1412
1567
  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")[];
@@ -1444,6 +1599,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1444
1599
  })[];
1445
1600
  ignoreDefaultRules: boolean;
1446
1601
  };
1602
+ callbacks: {
1603
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1604
+ };
1447
1605
  } | null;
1448
1606
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
1449
1607
  /**
@@ -1497,6 +1655,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1497
1655
  testMessage: boolean;
1498
1656
  displayConditions: boolean;
1499
1657
  unsubscribe: boolean;
1658
+ modulesDisabled: boolean;
1500
1659
  };
1501
1660
  blocks: {
1502
1661
  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")[];
@@ -1534,6 +1693,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1534
1693
  })[];
1535
1694
  ignoreDefaultRules: boolean;
1536
1695
  };
1696
+ callbacks: {
1697
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1698
+ };
1537
1699
  } | null;
1538
1700
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
1539
1701
  }, {
@@ -48,7 +48,7 @@ const o = `.control-shadow-wrapper:has(.button) {
48
48
  }
49
49
 
50
50
  .e2e-text-insert-controls .control-shadow-wrapper:not(:last-of-type) {
51
- margin-right: 16px;
51
+ margin-right: 6px;
52
52
  }
53
53
 
54
54
  .flat-white > .button {
@@ -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
@@ -64,6 +64,13 @@ 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
+ },
67
74
  /**
68
75
  * Get the template ID
69
76
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "2.0.0-beta.828ad6c",
3
+ "version": "2.0.0-beta.84d530c",
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",