@useinsider/guido 1.4.4-beta.00a1e0a → 1.4.4-beta.13365fd

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.
Files changed (94) hide show
  1. package/README.md +295 -664
  2. package/dist/@types/config/defaults.js +44 -0
  3. package/dist/@types/config/schemas.js +243 -0
  4. package/dist/@types/config/validator.js +56 -0
  5. package/dist/components/Guido.vue.js +1 -1
  6. package/dist/components/Guido.vue2.js +64 -87
  7. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +13 -13
  8. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +5 -5
  9. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +13 -13
  10. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  11. package/dist/components/organisms/header/LeftSlot.vue2.js +18 -15
  12. package/dist/components/organisms/header/RightSlot.vue.js +10 -10
  13. package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
  14. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +22 -19
  15. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +4 -4
  16. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +8 -8
  17. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  18. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +17 -17
  19. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -10
  20. package/dist/composables/useBlocksConfig.js +23 -20
  21. package/dist/composables/useConfig.js +53 -5
  22. package/dist/composables/useHtmlCompiler.js +20 -19
  23. package/dist/composables/useHtmlValidator.js +41 -41
  24. package/dist/composables/usePartner.js +19 -9
  25. package/dist/composables/useSave.js +13 -11
  26. package/dist/composables/useStripo.js +11 -11
  27. package/dist/composables/useTranslations.js +3 -2
  28. package/dist/config/compiler/unsubscribeCompilerRules.js +1 -1
  29. package/dist/enums/defaults.js +3 -67
  30. package/dist/enums/unsubscribe.js +23 -20
  31. package/dist/extensions/Blocks/CouponBlock/extension.js +4 -5
  32. package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +14 -20
  33. package/dist/extensions/Blocks/CouponBlock/template.js +11 -22
  34. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +12 -11
  35. package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
  36. package/dist/extensions/Blocks/controlFactories.js +111 -122
  37. package/dist/guido.css +1 -1
  38. package/dist/library.js +12 -2
  39. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +52 -57
  40. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +10 -10
  41. package/dist/node_modules/valibot/dist/index.js +476 -103
  42. package/dist/services/templateLibraryApi.js +18 -18
  43. package/dist/src/@types/config/defaults.d.ts +68 -0
  44. package/dist/src/@types/config/index.d.ts +14 -0
  45. package/dist/src/@types/config/schemas.d.ts +531 -0
  46. package/dist/src/@types/config/types.d.ts +148 -0
  47. package/dist/src/@types/config/validator.d.ts +119 -0
  48. package/dist/src/@types/generic.d.ts +4 -45
  49. package/dist/src/components/Guido.vue.d.ts +13 -12
  50. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  51. package/dist/src/composables/useConfig.d.ts +190 -2
  52. package/dist/src/composables/usePartner.d.ts +8 -0
  53. package/dist/src/enums/defaults.d.ts +4 -6
  54. package/dist/src/enums/unsubscribe.d.ts +5 -1
  55. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
  56. package/dist/src/extensions/Blocks/controlFactories.d.ts +7 -30
  57. package/dist/src/library.d.ts +3 -1
  58. package/dist/src/stores/config.d.ts +1691 -102
  59. package/dist/stores/config.js +148 -9
  60. package/package.json +1 -1
  61. package/dist/extensions/Blocks/CouponBlock/constants.js +0 -4
  62. package/dist/extensions/Blocks/CouponBlock/controls/index.js +0 -29
  63. package/dist/node_modules/lodash-es/_apply.js +0 -16
  64. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  65. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  66. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  67. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  68. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  69. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  70. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  71. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  72. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  73. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  74. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  75. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  76. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  77. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  78. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  79. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  80. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  81. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  82. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  83. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  84. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  85. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  86. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  87. package/dist/node_modules/lodash-es/constant.js +0 -8
  88. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  89. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  90. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  91. package/dist/node_modules/lodash-es/merge.js +0 -8
  92. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
  93. package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +0 -14
  94. package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +0 -108
@@ -0,0 +1,44 @@
1
+ import { ProductType as a, MessageType as o } from "./schemas.js";
2
+ a.EMAIL;
3
+ o.PROMOTIONAL;
4
+ const e = [
5
+ "alfredtesting",
6
+ "electio",
7
+ "eurekatest",
8
+ "gachapontestpart",
9
+ "gluautomation1",
10
+ "gluautomation2",
11
+ "gluautomation3",
12
+ "gluautomation4",
13
+ "inone",
14
+ "inshoppingcart",
15
+ "krakentest",
16
+ "leeroy",
17
+ "newsletteruat",
18
+ "ozaspava",
19
+ "piratesquad",
20
+ "qaautomation1",
21
+ "qaautomation2",
22
+ "qaautomation3",
23
+ "qaautomation4",
24
+ "roiautomation",
25
+ "seleniumautomation",
26
+ "seleniumautomation1",
27
+ "seleniumautomation2",
28
+ "seleniumautomation3",
29
+ "shopbagg",
30
+ "shopifytest",
31
+ "singlepageqa",
32
+ "testqa",
33
+ "vikingsankara",
34
+ "stripoeditorlivetest"
35
+ ];
36
+ function n(t) {
37
+ return e.includes(t);
38
+ }
39
+ export {
40
+ o as MessageType,
41
+ a as ProductType,
42
+ e as TEST_PARTNERS,
43
+ n as isTestPartner
44
+ };
@@ -0,0 +1,243 @@
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
+ /** Promotional/marketing emails */
4
+ PROMOTIONAL: 1,
5
+ /** Transactional/system emails */
6
+ TRANSACTIONAL: 2
7
+ }, s = {
8
+ /** Standard email campaigns */
9
+ EMAIL: 60,
10
+ /** Architect journey builder */
11
+ ARCHITECT: 49,
12
+ /** Unsubscribe page builder */
13
+ UNSUBSCRIBE_PAGES: 97
14
+ }, h = o({
15
+ /** Unique identifier for the template being edited */
16
+ templateId: u(
17
+ t(),
18
+ p(1, "templateId is required")
19
+ ),
20
+ /** Unique identifier for the user editing the template */
21
+ userId: u(
22
+ t(),
23
+ p(1, "userId is required")
24
+ ),
25
+ /** Optional variation ID for A/B testing */
26
+ variationId: e(t())
27
+ }), k = o({
28
+ /** Partner/organization name (required) */
29
+ name: u(
30
+ t(),
31
+ p(1, "partner.name is required")
32
+ ),
33
+ /** Product type identifier */
34
+ productType: e(
35
+ n([
36
+ s.EMAIL,
37
+ s.ARCHITECT,
38
+ s.UNSUBSCRIBE_PAGES
39
+ ]),
40
+ s.EMAIL
41
+ ),
42
+ /** Message type (promotional or transactional) */
43
+ messageType: e(
44
+ n([m.PROMOTIONAL, m.TRANSACTIONAL]),
45
+ m.PROMOTIONAL
46
+ ),
47
+ /** Display name for the current user */
48
+ username: e(t(), "Guido User")
49
+ }), y = o({
50
+ /** Display text for the dynamic content */
51
+ text: t(),
52
+ /** Template variable value (e.g., {{username}}) */
53
+ value: t(),
54
+ /** Fallback value if variable is empty */
55
+ fallback: e(t()),
56
+ /** Optional formatting options */
57
+ format: e(
58
+ o({
59
+ key: t(),
60
+ value: t()
61
+ })
62
+ )
63
+ }), C = o({
64
+ /** Initial HTML content */
65
+ html: e(t(), ""),
66
+ /** Initial CSS content */
67
+ css: e(t(), ""),
68
+ /** Preselected dynamic content items */
69
+ preselectedDynamicContent: e(
70
+ a(y),
71
+ []
72
+ ),
73
+ /** Selected unsubscribe page IDs */
74
+ selectedUnsubscribePages: e(a(b()), [])
75
+ }), R = o({
76
+ /** Sender display name */
77
+ senderName: e(t(), ""),
78
+ /** Email subject line */
79
+ subject: e(t(), "")
80
+ }), I = o({
81
+ /** Locale for the editor UI */
82
+ locale: e(t(), "en"),
83
+ /** Path to translations object */
84
+ translationsPath: e(t(), "window.trans.en"),
85
+ /** Migration date for template compatibility */
86
+ migrationDate: e(b(), 1759696858),
87
+ /** Email header settings */
88
+ emailHeader: e(R, { senderName: "", subject: "" })
89
+ }), T = o({
90
+ /** Whether to show the header bar */
91
+ showHeader: e(c(), !0),
92
+ /** Custom label for back button (if shown) */
93
+ backButtonLabel: e(t())
94
+ }), A = o({
95
+ /** Enable dynamic content insertion */
96
+ dynamicContent: e(c(), !0),
97
+ /** Enable save as template functionality */
98
+ saveAsTemplate: e(c(), !0),
99
+ /** Enable version history */
100
+ versionHistory: e(c(), !0),
101
+ /** Enable test message sending */
102
+ testMessage: e(c(), !0),
103
+ /** Enable display conditions */
104
+ displayConditions: e(c(), !0),
105
+ /** Enable unsubscribe block */
106
+ unsubscribe: e(c(), !0)
107
+ }), f = n([
108
+ "amp-accordion",
109
+ "amp-carousel",
110
+ "amp-form-controls",
111
+ "banner-block",
112
+ "button-block",
113
+ "html-block",
114
+ "image-block",
115
+ "menu-block",
116
+ "social-block",
117
+ "spacer-block",
118
+ "text-block",
119
+ "timer-block",
120
+ "video-block"
121
+ ]), g = n([
122
+ "dynamic-content",
123
+ "checkbox-block",
124
+ "radio-button-block",
125
+ "recommendation-block",
126
+ "unsubscribe-block",
127
+ "coupon-block",
128
+ "items-block"
129
+ ]), E = o({
130
+ /** Default blocks to exclude from the editor */
131
+ excludeDefaults: e(
132
+ a(f),
133
+ []
134
+ ),
135
+ /** Custom blocks to include in the editor */
136
+ includeCustoms: e(
137
+ a(g),
138
+ []
139
+ )
140
+ }), l = o({
141
+ /** Unique identifier for the rule */
142
+ id: t(),
143
+ /** Human-readable description */
144
+ description: e(t()),
145
+ /** Priority for rule ordering (lower = earlier) */
146
+ priority: b()
147
+ }), N = o({
148
+ ...l.entries,
149
+ type: r("replace"),
150
+ /** String to search for */
151
+ search: t(),
152
+ /** Replacement string */
153
+ replacement: t(),
154
+ /** Replace all occurrences (default: false) */
155
+ replaceAll: e(c())
156
+ }), O = o({
157
+ ...l.entries,
158
+ type: r("regex"),
159
+ /** Regex pattern string */
160
+ pattern: t(),
161
+ /** Replacement string (supports $1, $2, etc.) */
162
+ replacement: t(),
163
+ /** Regex flags (e.g., 'gi') */
164
+ flags: e(t())
165
+ }), L = o({
166
+ ...l.entries,
167
+ type: r("remove"),
168
+ /** Strings or patterns to remove */
169
+ targets: a(t())
170
+ }), v = o({
171
+ ...l.entries,
172
+ type: r("custom"),
173
+ /** Custom processor function */
174
+ processor: d(
175
+ (i) => typeof i == "function",
176
+ "processor must be a function"
177
+ )
178
+ }), x = S("type", [
179
+ N,
180
+ O,
181
+ L,
182
+ v
183
+ ]), B = o({
184
+ /** Custom compiler rules to apply */
185
+ customRules: e(a(x), []),
186
+ /** Skip default compiler rules */
187
+ ignoreDefaultRules: e(c(), !1)
188
+ }), P = o({
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({
200
+ // Required sections
201
+ /** Identity configuration (required) */
202
+ identity: h,
203
+ /** Partner configuration (required) */
204
+ partner: k,
205
+ // Optional sections (with defaults)
206
+ /** Template content and presets */
207
+ template: e(C, {}),
208
+ /** Editor settings */
209
+ editor: e(I, {}),
210
+ /** UI configuration */
211
+ ui: e(T, {}),
212
+ /** Feature toggles */
213
+ features: e(A, {}),
214
+ /** Block configuration */
215
+ blocks: e(E, {}),
216
+ /** Compiler configuration */
217
+ compiler: e(B, {}),
218
+ /** Callbacks and event handlers */
219
+ callbacks: e(P, {})
220
+ });
221
+ export {
222
+ E as BlocksSchema,
223
+ P as CallbacksSchema,
224
+ x as CompilerRuleSchema,
225
+ B as CompilerSchema,
226
+ g as CustomBlockTypeSchema,
227
+ v as CustomRuleSchema,
228
+ f as DefaultBlockTypeSchema,
229
+ y as DynamicContentSchema,
230
+ I as EditorSchema,
231
+ R as EmailHeaderSchema,
232
+ A as FeaturesSchema,
233
+ U as GuidoConfigSchema,
234
+ h as IdentitySchema,
235
+ m as MessageType,
236
+ k as PartnerSchema,
237
+ s as ProductType,
238
+ O as RegexRuleSchema,
239
+ L as RemoveRuleSchema,
240
+ N as ReplaceRuleSchema,
241
+ C as TemplateSchema,
242
+ T as UISchema
243
+ };
@@ -0,0 +1,56 @@
1
+ import { safeParse as n } from "../../node_modules/valibot/dist/index.js";
2
+ import { GuidoConfigSchema as o } from "./schemas.js";
3
+ function i(s) {
4
+ return s.map((r) => {
5
+ var e;
6
+ return `[${((e = r.path) == null ? void 0 : e.map((a) => a.key).join(".")) || "root"}] ${r.message}`;
7
+ });
8
+ }
9
+ function c(s) {
10
+ return s.map((r) => {
11
+ var t;
12
+ return {
13
+ path: ((t = r.path) == null ? void 0 : t.map((e) => e.key).join(".")) || "root",
14
+ message: r.message
15
+ };
16
+ });
17
+ }
18
+ function u(s) {
19
+ const r = n(o, s);
20
+ return r.success ? {
21
+ success: !0,
22
+ data: r.output
23
+ } : {
24
+ success: !1,
25
+ errors: i(r.issues)
26
+ };
27
+ }
28
+ function p(s) {
29
+ var t;
30
+ const r = u(s);
31
+ if (!r.success)
32
+ throw new Error(
33
+ `Invalid GuidoConfig:
34
+ ${(t = r.errors) == null ? void 0 : t.join(`
35
+ `)}`
36
+ );
37
+ return r.data;
38
+ }
39
+ function m(s) {
40
+ const r = u(s);
41
+ return r.success ? r.data : (console.error("[Guido] Invalid configuration:", r.errors), null);
42
+ }
43
+ function d(s) {
44
+ const r = n(o, s);
45
+ return r.success ? [] : c(r.issues);
46
+ }
47
+ function g(s) {
48
+ return n(o, s).success;
49
+ }
50
+ export {
51
+ d as getValidationErrors,
52
+ g as isValidConfig,
53
+ p as parseConfig,
54
+ m as parseConfigSafe,
55
+ u as validateConfig
56
+ };
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "98181b5a"
15
+ "49987685"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,134 +1,111 @@
1
- import { defineComponent as O, defineAsyncComponent as I, ref as z, computed as U, watch as B, onMounted as K, onUnmounted as j } from "vue";
2
- import { provideGuidoActions as q } from "../composables/useGuidoActions.js";
3
- import { usePartner as J } from "../composables/usePartner.js";
4
- import { useStripo as Q } from "../composables/useStripo.js";
5
- import { migrate as L } from "../config/migrator/index.js";
6
- import { DefaultUsername as V, DefaultMessageType as X, DefaultGuidoConfig as Y } from "../enums/defaults.js";
7
- import Z from "./organisms/base/Toaster.vue.js";
8
- import $ from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
- import ee from "./organisms/header/HeaderWrapper.vue.js";
10
- import oe from "./organisms/LoadingWrapper.vue.js";
11
- import te from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
- import ne from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
- import { useStripoApi as re } from "../services/stripoApi.js";
14
- import { useConfigStore as ie } from "../stores/config.js";
15
- import { useDynamicContentStore as se } from "../stores/dynamic-content.js";
16
- import { useEditorStore as ae } from "../stores/editor.js";
17
- import { usePreviewStore as ce } from "../stores/preview.js";
18
- import { useUnsubscribeStore as me } from "../stores/unsubscribe.js";
19
- import de from "../node_modules/lodash-es/merge.js";
20
- const Ue = /* @__PURE__ */ O({
1
+ import { defineComponent as R, defineAsyncComponent as k, ref as x, computed as P, watch as N, onMounted as O, onUnmounted as z } from "vue";
2
+ import { provideGuidoActions as B } from "../composables/useGuidoActions.js";
3
+ import { usePartner as K } from "../composables/usePartner.js";
4
+ import { useStripo as M } from "../composables/useStripo.js";
5
+ import { migrate as T } from "../config/migrator/index.js";
6
+ import j from "./organisms/base/Toaster.vue.js";
7
+ import q from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
8
+ import J from "./organisms/header/HeaderWrapper.vue.js";
9
+ import Q from "./organisms/LoadingWrapper.vue.js";
10
+ import V from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
11
+ import X from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
12
+ import { useStripoApi as Y } from "../services/stripoApi.js";
13
+ import { useConfigStore as Z } from "../stores/config.js";
14
+ import { useDynamicContentStore as $ } from "../stores/dynamic-content.js";
15
+ import { useEditorStore as ee } from "../stores/editor.js";
16
+ import { usePreviewStore as oe } from "../stores/preview.js";
17
+ import { useUnsubscribeStore as te } from "../stores/unsubscribe.js";
18
+ const Se = /* @__PURE__ */ R({
21
19
  __name: "Guido",
22
20
  props: {
23
- templateId: null,
24
- userId: null,
25
- messageType: null,
26
- partnerName: null,
27
- productType: null,
28
- username: null,
29
- html: null,
30
- css: null,
31
- guidoConfig: null,
32
- templateConfig: null
21
+ config: null
33
22
  },
34
23
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
35
- setup(W, { expose: _, emit: o }) {
36
- const u = W, A = I(
24
+ setup(U, { expose: W, emit: t }) {
25
+ const l = U, _ = k(
37
26
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
38
- ), N = I(
27
+ ), I = k(
39
28
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
40
- ), p = z(), i = se(), g = me(), f = ie(), s = ae(), F = ce(), n = U(() => s.hasChanges), { getPartnerName: y, getProductType: v, isTestPartner: H } = J(), b = () => {
29
+ ), p = x(), s = $(), u = te(), n = Z();
30
+ n.init(l.config);
31
+ const i = ee(), L = oe(), r = P(() => i.hasChanges), { isTestPartner: A } = K(), y = () => {
41
32
  var e;
42
33
  return (e = p.value) == null ? void 0 : e.handleSave(!0);
43
- }, {
44
- templateId: a,
45
- userId: C,
46
- guidoConfig: h,
47
- templateConfig: t,
48
- html: r = "",
49
- css: S = "",
50
- partnerName: c = y(),
51
- productType: m = v(),
52
- messageType: w = X,
53
- username: D = V
54
- } = u, d = (t == null ? void 0 : t.preselectedDynamicContentList) || [];
55
- s.templateId = a, window.GuidoConfig = de(Y, h), window.GuidoConfig.partner = {
56
- partnerName: c,
57
- productType: m,
58
- messageType: w
59
- }, f.templateConfig = t;
60
- const { initPlugin: E } = Q({
34
+ }, { templateId: a, userId: v, partnerName: b, productType: f, username: g, template: o } = n, c = (o == null ? void 0 : o.html) || "", h = (o == null ? void 0 : o.css) || "", d = (o == null ? void 0 : o.preselectedDynamicContent) || [];
35
+ i.templateId = a;
36
+ const { initPlugin: S } = M({
61
37
  emailId: a,
62
- userId: C,
63
- username: D,
64
- partnerName: c,
65
- productType: m,
38
+ userId: v,
39
+ username: g,
40
+ partnerName: b,
41
+ productType: f,
66
42
  preselectedDynamicContentList: d,
67
43
  onReady: () => {
68
- console.debug("guido:ready"), o("ready");
44
+ console.debug("guido:ready"), t("ready");
69
45
  }
70
- }), { getDefaultTemplate: T } = re(), R = U(() => {
46
+ }), { getDefaultTemplate: w } = Y(), F = P(() => {
71
47
  var e;
72
- return !((e = window.GuidoConfig) != null && e.useHeader);
48
+ return !((e = n.ui) != null && e.showHeader);
73
49
  });
74
- q({
50
+ B({
75
51
  onBack: () => {
76
- console.debug("guido:back"), o("back");
52
+ console.debug("guido:back"), t("back");
77
53
  },
78
54
  onSaveStart: () => {
79
- console.debug("guido:save:start"), o("save:start");
55
+ console.debug("guido:save:start"), t("save:start");
80
56
  },
81
57
  onSaveComplete: (e) => {
82
- console.debug("guido:save:complete", e), o("save:complete", e);
58
+ console.debug("guido:save:complete", e), t("save:complete", e);
83
59
  },
84
60
  onTestEmailClick: () => {
85
- console.debug("guido:test-email:click"), o("test-email:click");
61
+ console.debug("guido:test-email:click"), t("test-email:click");
86
62
  }
87
63
  });
88
- const P = (e) => {
89
- console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
90
- }, k = () => {
64
+ const C = (e) => {
65
+ console.debug("dynamic-content:close", e), s.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
66
+ }, D = () => {
91
67
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
92
68
  };
93
- B(() => n.value, () => {
94
- o("on-change", n.value);
69
+ N(() => r.value, () => {
70
+ t("on-change", r.value);
95
71
  });
96
- const l = (e) => {
97
- const G = e, { attribute: x, position: M } = G.detail;
98
- console.debug("dynamic-content:open", G.detail), o("dynamic-content:open", x, M);
72
+ const m = (e) => {
73
+ const E = e, { attribute: G, position: H } = E.detail;
74
+ console.debug("dynamic-content:open", E.detail), t("dynamic-content:open", G, H);
99
75
  };
100
- return K(async () => {
76
+ return O(async () => {
101
77
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
102
78
  try {
103
- g.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
79
+ u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
104
80
  let e = {
105
- html: r && await L(r),
106
- css: S,
81
+ html: c && await T(c),
82
+ css: h,
107
83
  forceRecreate: !0
108
84
  // TODO: It should be false for old templates. We will communicate with Stripo
109
85
  };
110
- e.html || (e = await T(), e.html = await L(e.html)), await E(e), i.selectedDynamicContentList = d;
86
+ e.html || (e = await w(), e.html = await T(e.html)), await S(e), s.selectedDynamicContentList = d;
111
87
  } catch (e) {
112
88
  console.error("Failed to initialize Stripo editor:", e);
113
89
  }
114
- document.addEventListener("dynamic-content:open", l);
115
- }), j(() => {
116
- document.removeEventListener("dynamic-content:open", l);
90
+ document.addEventListener("dynamic-content:open", m);
91
+ }), z(() => {
92
+ document.removeEventListener("dynamic-content:open", m);
117
93
  try {
118
94
  window.UIEditor.removeEditor();
119
95
  } catch {
120
96
  console.debug("Failed to remove Stripo editor: No editor found");
121
97
  }
122
- }), _({
98
+ n.reset();
99
+ }), W({
123
100
  dynamicContent: {
124
- insert: P,
125
- close: k
101
+ insert: C,
102
+ close: D
126
103
  },
127
- hasChanges: n,
128
- saveSilent: b
129
- }), { __sfc: !0, PreviewContainer: A, OnboardingWrapper: N, headerWrapperRef: p, dynamicContentStore: i, unsubscribeStore: g, props: u, configStore: f, editorStore: s, previewStore: F, hasChanges: n, getPartnerName: y, getProductType: v, isTestPartner: H, saveSilent: b, templateId: a, userId: C, guidoConfig: h, templateConfig: t, html: r, css: S, partnerName: c, productType: m, messageType: w, username: D, preselectedDynamicContentList: d, emit: o, initPlugin: E, getDefaultTemplate: T, noHeader: R, insertDynamicContent: P, closeDynamicContent: k, handleDynamicContentOpen: l, Toaster: Z, FilterSelectionDrawer: $, HeaderWrapper: ee, LoadingWrapper: oe, SaveAsTemplateDrawer: te, UnsubscribeWrapper: ne };
104
+ hasChanges: r,
105
+ saveSilent: y
106
+ }), { __sfc: !0, PreviewContainer: _, OnboardingWrapper: I, headerWrapperRef: p, dynamicContentStore: s, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: L, hasChanges: r, isTestPartner: A, saveSilent: y, templateId: a, userId: v, partnerName: b, productType: f, username: g, templateConfig: o, html: c, css: h, preselectedDynamicContentList: d, emit: t, initPlugin: S, getDefaultTemplate: w, noHeader: F, insertDynamicContent: C, closeDynamicContent: D, handleDynamicContentOpen: m, Toaster: j, FilterSelectionDrawer: q, HeaderWrapper: J, LoadingWrapper: Q, SaveAsTemplateDrawer: V, UnsubscribeWrapper: X };
130
107
  }
131
108
  });
132
109
  export {
133
- Ue as default
110
+ Se as default
134
111
  };
@@ -1,20 +1,20 @@
1
- import { defineComponent as m, computed as o } from "vue";
2
- import { useConfig as a } from "../../../../composables/useConfig.js";
3
- import { useTranslations as i } from "../../../../composables/useTranslations.js";
4
- import { InIcons as c } from "@useinsider/design-system-vue";
5
- const l = /* @__PURE__ */ m({
1
+ import { defineComponent as i, computed as s } from "vue";
2
+ import { useConfig as c } from "../../../../composables/useConfig.js";
3
+ import { useTranslations as d } from "../../../../composables/useTranslations.js";
4
+ import { InIcons as u } from "@useinsider/design-system-vue";
5
+ const g = /* @__PURE__ */ i({
6
6
  __name: "EmailHeaderInfo",
7
7
  setup(f) {
8
- const { config: t } = a(), n = i(), s = o(() => {
9
- var e;
10
- return ((e = t.emailHeader) == null ? void 0 : e.senderName) || n("settings.sender-name");
11
- }), r = o(() => {
12
- var e;
13
- return ((e = t.emailHeader) == null ? void 0 : e.subject) || n("email-editor.default-subject");
8
+ const { config: n } = c(), r = d(), a = s(() => {
9
+ var e, t, o;
10
+ return ((o = (t = (e = n.value) == null ? void 0 : e.editor) == null ? void 0 : t.emailHeader) == null ? void 0 : o.senderName) || r("settings.sender-name");
11
+ }), m = s(() => {
12
+ var e, t, o;
13
+ return ((o = (t = (e = n.value) == null ? void 0 : e.editor) == null ? void 0 : t.emailHeader) == null ? void 0 : o.subject) || r("email-editor.default-subject");
14
14
  });
15
- return { __sfc: !0, config: t, trans: n, senderName: s, subject: r, InIcons: c };
15
+ return { __sfc: !0, config: n, trans: r, senderName: a, subject: m, InIcons: u };
16
16
  }
17
17
  });
18
18
  export {
19
- l as default
19
+ g as default
20
20
  };
@@ -1,18 +1,18 @@
1
1
  import e from "./InboxView.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var r = function() {
3
+ import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = function() {
5
5
  var s = this, t = s._self._c, c = s._self._setupProxy;
6
6
  return t("div", { staticClass: "p-y-13 p-x-3 bor-b-w-1 bor-b-s-s bor-b-c-50 cur-p b-c-4 b-c-h-5 p-3", on: { click: function(_) {
7
7
  return c.emit("open-email");
8
8
  } } }, [t("div", { staticClass: "d-f j-c-s-b a-i-c w-1" }, [t("div", { staticClass: "f-g-1 min-w-0-s" }, [t("div", { staticClass: "f-s-1 f-w-600 t-c-53 l-h-1 mb-12 cropped-text" }, [s._v(" " + s._s(c.senderName) + " ")]), t("div", { staticClass: "f-s-12 f-w-400 t-c-55 l-h-1 cropped-text" }, [s._v(" " + s._s(c.subject) + " ")])]), t("div", { staticClass: "f-sh-0 ml-2 f-s-12 f-w-400 t-c-55 l-h-1" }, [s._v(" " + s._s(c.trans("product-catalog.today")) + " ")]), t(c.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-right" } })], 1)]);
9
- }, i = [], n = /* @__PURE__ */ a(
9
+ }, i = [], n = /* @__PURE__ */ r(
10
10
  e,
11
- r,
11
+ a,
12
12
  i,
13
13
  !1,
14
14
  null,
15
- "f20b3a9b"
15
+ "4b876c1b"
16
16
  );
17
17
  const m = n.exports;
18
18
  export {
@@ -1,21 +1,21 @@
1
- import { defineComponent as a, computed as o } from "vue";
2
- import { useConfig as i } from "../../../../composables/useConfig.js";
3
- import { useTranslations as c } from "../../../../composables/useTranslations.js";
1
+ import { defineComponent as c, computed as r } from "vue";
2
+ import { useConfig as u } from "../../../../composables/useConfig.js";
3
+ import { useTranslations as d } from "../../../../composables/useTranslations.js";
4
4
  import { InIcons as f } from "@useinsider/design-system-vue";
5
- const b = /* @__PURE__ */ a({
5
+ const j = /* @__PURE__ */ c({
6
6
  __name: "InboxView",
7
7
  emits: ["open-email"],
8
- setup(p, { emit: s }) {
9
- const t = c(), { config: n } = i(), r = o(() => {
10
- var e;
11
- return ((e = n.emailHeader) == null ? void 0 : e.senderName) || t("settings.sender-name");
12
- }), m = o(() => {
13
- var e;
14
- return ((e = n.emailHeader) == null ? void 0 : e.subject) || t("email-editor.default-subject");
8
+ setup(p, { emit: m }) {
9
+ const n = d(), { config: s } = u(), a = r(() => {
10
+ var e, t, o;
11
+ return ((o = (t = (e = s.value) == null ? void 0 : e.editor) == null ? void 0 : t.emailHeader) == null ? void 0 : o.senderName) || n("settings.sender-name");
12
+ }), i = r(() => {
13
+ var e, t, o;
14
+ return ((o = (t = (e = s.value) == null ? void 0 : e.editor) == null ? void 0 : t.emailHeader) == null ? void 0 : o.subject) || n("email-editor.default-subject");
15
15
  });
16
- return { __sfc: !0, emit: s, trans: t, config: n, senderName: r, subject: m, InIcons: f };
16
+ return { __sfc: !0, emit: m, trans: n, config: s, senderName: a, subject: i, InIcons: f };
17
17
  }
18
18
  });
19
19
  export {
20
- b as default
20
+ j as default
21
21
  };
@@ -10,7 +10,7 @@ var n = function() {
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "0502bceb"
13
+ "06e6f7a7"
14
14
  );
15
15
  const p = i.exports;
16
16
  export {