@useinsider/guido 3.7.2-beta.d7d2e30 → 3.7.2-beta.e9ee855

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 (23) hide show
  1. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +8 -8
  2. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +15 -12
  3. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
  4. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +16 -15
  5. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +4 -4
  6. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +38 -35
  7. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +1 -1
  8. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +54 -51
  9. package/dist/composables/usePreviewInteractionGuard.js +17 -0
  10. package/dist/composables/useSave.js +14 -14
  11. package/dist/composables/validators/useUnsubscribeBlockValidator.js +26 -17
  12. package/dist/extensions/Blocks/Items/block.js +29 -48
  13. package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +45 -62
  14. package/dist/extensions/Blocks/Unsubscribe/block.js +40 -37
  15. package/dist/extensions/Blocks/Unsubscribe/control.js +17 -14
  16. package/dist/guido.css +1 -1
  17. package/dist/src/composables/usePreviewInteractionGuard.d.ts +3 -0
  18. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +1 -0
  19. package/dist/src/extensions/Blocks/Items/block.d.ts +0 -8
  20. package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +1 -1
  21. package/dist/src/stores/unsubscribe.d.ts +11 -1
  22. package/dist/stores/unsubscribe.js +8 -7
  23. package/package.json +1 -1
@@ -10,6 +10,7 @@ interface StoreState {
10
10
  typeSelectionDrawerStatus: boolean;
11
11
  isGlobalUnsubscribeDisabled: boolean;
12
12
  isSubscriptionPreferencesCenterDisabled: boolean;
13
+ pendingBlockId: string | null;
13
14
  }
14
15
  export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guidoUnsubscribe", StoreState, {
15
16
  getSelectedCollection: (state: {
@@ -35,6 +36,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
35
36
  typeSelectionDrawerStatus: boolean;
36
37
  isGlobalUnsubscribeDisabled: boolean;
37
38
  isSubscriptionPreferencesCenterDisabled: boolean;
39
+ pendingBlockId: string | null;
38
40
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => number[];
39
41
  getSelectedTemplateByActiveType: (state: {
40
42
  templates: {
@@ -59,6 +61,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
59
61
  typeSelectionDrawerStatus: boolean;
60
62
  isGlobalUnsubscribeDisabled: boolean;
61
63
  isSubscriptionPreferencesCenterDisabled: boolean;
64
+ pendingBlockId: string | null;
62
65
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => number;
63
66
  getTemplatesByActiveType: (state: {
64
67
  templates: {
@@ -83,6 +86,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
83
86
  typeSelectionDrawerStatus: boolean;
84
87
  isGlobalUnsubscribeDisabled: boolean;
85
88
  isSubscriptionPreferencesCenterDisabled: boolean;
89
+ pendingBlockId: string | null;
86
90
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => {
87
91
  id: number;
88
92
  name: string;
@@ -119,6 +123,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
119
123
  typeSelectionDrawerStatus: boolean;
120
124
  isGlobalUnsubscribeDisabled: boolean;
121
125
  isSubscriptionPreferencesCenterDisabled: boolean;
126
+ pendingBlockId: string | null;
122
127
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => (id: number) => string;
123
128
  getSelectedUnsubscribePagesByCollection: (state: {
124
129
  templates: {
@@ -143,6 +148,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
143
148
  typeSelectionDrawerStatus: boolean;
144
149
  isGlobalUnsubscribeDisabled: boolean;
145
150
  isSubscriptionPreferencesCenterDisabled: boolean;
151
+ pendingBlockId: string | null;
146
152
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => (collectionType: number) => number[];
147
153
  isActiveTypeFirstInCollection: (state: {
148
154
  templates: {
@@ -167,6 +173,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
167
173
  typeSelectionDrawerStatus: boolean;
168
174
  isGlobalUnsubscribeDisabled: boolean;
169
175
  isSubscriptionPreferencesCenterDisabled: boolean;
176
+ pendingBlockId: string | null;
170
177
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
171
178
  isActiveTypeLastInCollection: (state: {
172
179
  templates: {
@@ -191,6 +198,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
191
198
  typeSelectionDrawerStatus: boolean;
192
199
  isGlobalUnsubscribeDisabled: boolean;
193
200
  isSubscriptionPreferencesCenterDisabled: boolean;
201
+ pendingBlockId: string | null;
194
202
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
195
203
  hasTemplatesByCollectionType: (state: {
196
204
  templates: {
@@ -215,6 +223,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
215
223
  typeSelectionDrawerStatus: boolean;
216
224
  isGlobalUnsubscribeDisabled: boolean;
217
225
  isSubscriptionPreferencesCenterDisabled: boolean;
226
+ pendingBlockId: string | null;
218
227
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => Record<number, boolean>;
219
228
  unsubscribePagesStatus: (state: {
220
229
  templates: {
@@ -239,10 +248,11 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
239
248
  typeSelectionDrawerStatus: boolean;
240
249
  isGlobalUnsubscribeDisabled: boolean;
241
250
  isSubscriptionPreferencesCenterDisabled: boolean;
251
+ pendingBlockId: string | null;
242
252
  } & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
243
253
  }, {
244
254
  $reset(): void;
245
- fetchTemplates(): Promise<void>;
255
+ fetchTemplates(force?: boolean): Promise<void>;
246
256
  setCollection(collectionType: number): void;
247
257
  setCollectionWithoutAutoSelection(collectionType: number): void;
248
258
  setSelectedTemplate(template: number): void;
@@ -1,6 +1,6 @@
1
1
  import { TYPE_COLLECTIONS as i, PAGE_TYPES as p } from "../enums/unsubscribe.js";
2
2
  import { useUnsubscribeApi as d } from "../services/unsubscribeApi.js";
3
- import { defineStore as h } from "pinia";
3
+ import { defineStore as u } from "pinia";
4
4
  let o = null;
5
5
  const r = () => ({
6
6
  templates: [],
@@ -12,8 +12,9 @@ const r = () => ({
12
12
  pageSelectionDrawerStatus: !1,
13
13
  typeSelectionDrawerStatus: !1,
14
14
  isGlobalUnsubscribeDisabled: !1,
15
- isSubscriptionPreferencesCenterDisabled: !1
16
- }), b = h("guidoUnsubscribe", {
15
+ isSubscriptionPreferencesCenterDisabled: !1,
16
+ pendingBlockId: null
17
+ }), b = u("guidoUnsubscribe", {
17
18
  state: () => r(),
18
19
  getters: {
19
20
  getSelectedCollection: (e) => i[e.selectedCollectionType],
@@ -62,10 +63,10 @@ const r = () => ({
62
63
  selectedUnsubscribePages: t
63
64
  });
64
65
  },
65
- async fetchTemplates() {
66
- this.templates.length || (o || (o = (async () => {
67
- const { getUnsubscribePages: e } = d();
68
- this.templates = await e();
66
+ async fetchTemplates(e = !1) {
67
+ !e && this.templates.length || ((e || !o) && (o = (async () => {
68
+ const { getUnsubscribePages: t } = d();
69
+ this.templates = await t();
69
70
  })().finally(() => {
70
71
  o = null;
71
72
  })), await o);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.7.2-beta.d7d2e30",
3
+ "version": "3.7.2-beta.e9ee855",
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",