@useinsider/guido 3.18.2-beta.eedafd2 → 3.18.2-beta.ef84353

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 (59) hide show
  1. package/README.md +20 -1
  2. package/dist/@types/config/schemas.js +26 -28
  3. package/dist/components/Guido.vue.js +8 -8
  4. package/dist/components/Guido.vue2.js +51 -53
  5. package/dist/components/organisms/AutoSaveController.vue2.js +8 -9
  6. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  7. package/dist/components/organisms/header/EditorActions.vue2.js +56 -86
  8. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  9. package/dist/components/organisms/header/LeftSlot.vue2.js +12 -16
  10. package/dist/components/wrappers/WpDrawer.vue.js +7 -9
  11. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  12. package/dist/composables/useGuidoStateBridge.js +29 -24
  13. package/dist/composables/useHtmlCompiler.js +26 -37
  14. package/dist/composables/useHtmlValidator.js +0 -2
  15. package/dist/composables/useSave.js +45 -90
  16. package/dist/composables/useStripo.js +7 -7
  17. package/dist/composables/validators/useCouponBlockValidator.js +21 -24
  18. package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
  19. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +36 -43
  20. package/dist/guido.css +1 -1
  21. package/dist/library.js +15 -13
  22. package/dist/public/editorState.js +4 -0
  23. package/dist/src/@types/config/schemas.d.ts +0 -4
  24. package/dist/src/components/Guido.vue.d.ts +1 -17
  25. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
  26. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
  27. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
  28. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
  29. package/dist/src/composables/useConfig.d.ts +0 -2
  30. package/dist/src/composables/useGuidoStateBridge.d.ts +11 -7
  31. package/dist/src/composables/useHtmlValidator.d.ts +0 -21
  32. package/dist/src/composables/useSave.d.ts +1 -6
  33. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
  34. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
  35. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -5
  36. package/dist/src/library.d.ts +2 -0
  37. package/dist/src/public/editorState.d.ts +14 -0
  38. package/dist/src/public/trackingIds.d.ts +6 -2
  39. package/dist/src/stores/config.d.ts +0 -30
  40. package/dist/src/stores/editor.d.ts +25 -0
  41. package/dist/src/stores/guido-email-editor.d.ts +27 -27
  42. package/dist/src/utils/templatePreparation.d.ts +0 -30
  43. package/dist/stores/config.js +22 -39
  44. package/dist/stores/editor.js +4 -0
  45. package/dist/stores/guido-email-editor.js +0 -4
  46. package/dist/utils/templatePreparation.js +25 -28
  47. package/package.json +5 -1
  48. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
  49. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -48
  50. package/dist/composables/useSaveValidation.js +0 -279
  51. package/dist/composables/useSaveValidationRollout.js +0 -9
  52. package/dist/enums/save-validation.js +0 -4
  53. package/dist/src/@types/save-validation.d.ts +0 -19
  54. package/dist/src/components/organisms/validation/ValidationErrorDrawer.vue.d.ts +0 -2
  55. package/dist/src/composables/useSaveValidation.d.ts +0 -6
  56. package/dist/src/composables/useSaveValidationRollout.d.ts +0 -3
  57. package/dist/src/enums/save-validation.d.ts +0 -27
  58. package/dist/src/stores/save-validation.d.ts +0 -22
  59. package/dist/stores/save-validation.js +0 -30
@@ -1,2 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
- export default _default;
@@ -1,6 +0,0 @@
1
- import type { DynamicContent } from '@@/Types/generic';
2
- import type { SaveValidationError } from '@@/Types/save-validation';
3
- export declare const useSaveValidation: () => {
4
- collectSaveValidationErrors: (compiledHtml: string, dynamicContentList: DynamicContent[]) => Promise<SaveValidationError[]>;
5
- validateCurrentTemplate: () => Promise<SaveValidationError[]>;
6
- };
@@ -1,3 +0,0 @@
1
- export declare const useSaveValidationRollout: () => {
2
- isEnabled: import("vue").ComputedRef<boolean>;
3
- };
@@ -1,27 +0,0 @@
1
- /**
2
- * Stable discriminators for each save-validation rule site — one per rule that
3
- * can produce a drawer row, kept in sync with the collector + legacy validator chains.
4
- */
5
- export declare enum SaveValidationRule {
6
- CouponTagModified = "coupon-tag-modified",
7
- DuplicateUnsubBlock = "duplicate-unsub-block",
8
- UnsubBlockMissingTemplate = "unsub-block-missing-template",
9
- LiquidSyntax = "liquid-syntax",
10
- InvalidLinks = "invalid-links",
11
- LinkCheckInProgress = "link-check-in-progress",
12
- CustomFieldScript = "custom-field-script",
13
- EmptyHtml = "empty-html",
14
- MismatchedBraces = "mismatched-braces",
15
- InvalidDynamicTag = "invalid-dynamic-tag",
16
- InvalidCustomField = "invalid-custom-field",
17
- ConditionsSyntax = "conditions-syntax",
18
- WrongEqualityOperator = "wrong-equality-operator",
19
- MissingIfEndif = "missing-if-endif",
20
- ConditionTagSpacing = "condition-tag-spacing",
21
- BracesInsideIfTag = "braces-inside-if-tag",
22
- RecommendationRequiredFields = "recommendation-required-fields",
23
- RecommendationFilters = "recommendation-filters",
24
- InvalidImageType = "invalid-image-type",
25
- CheckboxUnsubGroup = "checkbox-unsub-group",
26
- RadioButtonUnsubGroup = "radio-button-unsub-group"
27
- }
@@ -1,22 +0,0 @@
1
- import type { SaveValidationError, SaveValidationIntent } from '@@/Types/save-validation';
2
- interface SaveValidationState {
3
- errors: SaveValidationError[];
4
- isDrawerOpen: boolean;
5
- intent: SaveValidationIntent | null;
6
- }
7
- export declare const useSaveValidationStore: import("pinia").StoreDefinition<"guidoSaveValidation", SaveValidationState, {
8
- errorCount: (state: {
9
- errors: {
10
- rule: import("../enums/save-validation").SaveValidationRule;
11
- message: string;
12
- detail?: string | undefined;
13
- type: import("../enums/toaster").ToasterTypeOptions;
14
- }[];
15
- isDrawerOpen: boolean;
16
- intent: SaveValidationIntent | null;
17
- } & import("pinia").PiniaCustomStateProperties<SaveValidationState>) => number;
18
- }, {
19
- open(errors: SaveValidationError[], intent: SaveValidationIntent): void;
20
- close(): void;
21
- }>;
22
- export {};
@@ -1,30 +0,0 @@
1
- import { defineStore as n } from "pinia";
2
- function i(e) {
3
- const t = /* @__PURE__ */ new Set();
4
- return e.filter((r) => {
5
- const s = JSON.stringify([r.rule, r.message, r.detail ?? ""]);
6
- return t.has(s) ? !1 : (t.add(s), !0);
7
- });
8
- }
9
- const o = n("guidoSaveValidation", {
10
- state: () => ({
11
- errors: [],
12
- isDrawerOpen: !1,
13
- intent: null
14
- }),
15
- getters: {
16
- errorCount: (e) => e.errors.length
17
- },
18
- actions: {
19
- open(e, t) {
20
- this.errors = i(e), this.intent = t, this.isDrawerOpen = !0;
21
- },
22
- // Errors are retained so rows don't blank during the ~300ms close animation.
23
- close() {
24
- this.isDrawerOpen = !1;
25
- }
26
- }
27
- });
28
- export {
29
- o as useSaveValidationStore
30
- };