@useinsider/guido 3.2.1-beta.d58ee72 → 3.3.0-beta.1778fd7

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 (158) hide show
  1. package/README.md +117 -1
  2. package/dist/@types/config/schemas.js +153 -95
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +106 -90
  5. package/dist/components/organisms/AutoSaveController.vue.js +17 -0
  6. package/dist/components/organisms/AutoSaveController.vue2.js +13 -0
  7. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +9 -11
  8. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +70 -35
  9. package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
  10. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
  11. package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
  12. package/dist/components/organisms/header/RightSlot.vue.js +8 -8
  13. package/dist/components/organisms/header/RightSlot.vue2.js +9 -8
  14. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
  15. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  16. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
  17. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
  18. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
  19. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  20. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
  21. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
  22. package/dist/composables/useAutoSave.js +71 -0
  23. package/dist/composables/useCortexBlueprintBridge.js +66 -0
  24. package/dist/composables/useEmailTemplateApplier.js +41 -0
  25. package/dist/composables/useFullStoryBridge.js +14 -0
  26. package/dist/composables/useGuidoStateBridge.js +48 -0
  27. package/dist/composables/useHtmlValidator.js +41 -36
  28. package/dist/composables/useRecommendation.js +46 -26
  29. package/dist/composables/useRibbonOffset.js +21 -0
  30. package/dist/composables/useSave.js +19 -16
  31. package/dist/composables/useStripo.js +66 -62
  32. package/dist/composables/validators/useCouponBlockValidator.js +24 -0
  33. package/dist/config/compiler/recommendationCompilerRules.js +25 -25
  34. package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
  35. package/dist/config/compiler/utils/recommendationCompilerUtils.js +107 -71
  36. package/dist/config/migrator/index.js +20 -9
  37. package/dist/config/migrator/radioButtonMigrator.js +92 -47
  38. package/dist/config/migrator/recommendation/compositionMapper.js +98 -0
  39. package/dist/config/migrator/recommendation/extractors.js +27 -0
  40. package/dist/config/migrator/recommendation/htmlBuilder.js +496 -0
  41. package/dist/config/migrator/recommendation/parseLegacyConfig.js +33 -0
  42. package/dist/config/migrator/recommendation/settingsMapper.js +70 -0
  43. package/dist/config/migrator/recommendation/themeMapper.js +93 -0
  44. package/dist/config/migrator/recommendationMigrator.js +74 -290
  45. package/dist/enums/extensions/recommendationBlock.js +103 -47
  46. package/dist/enums/onboarding.js +7 -2
  47. package/dist/enums/unsubscribe.js +39 -31
  48. package/dist/extensions/Blocks/Checkbox/control.js +23 -23
  49. package/dist/extensions/Blocks/RadioButton/control.js +15 -15
  50. package/dist/extensions/Blocks/RadioButton/template.js +7 -7
  51. package/dist/extensions/Blocks/Recommendation/block.js +60 -50
  52. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  53. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +5 -5
  54. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
  55. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
  56. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +27 -26
  57. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
  58. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +228 -181
  59. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
  60. package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
  61. package/dist/extensions/Blocks/Recommendation/services/configService.js +76 -33
  62. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
  63. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +144 -91
  64. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +19 -10
  65. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +8 -8
  66. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +25 -15
  67. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
  68. package/dist/extensions/Blocks/Recommendation/templates/utils.js +1 -1
  69. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +31 -15
  70. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +21 -0
  71. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +13 -22
  72. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +33 -0
  73. package/dist/guido.css +1 -1
  74. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +393 -264
  75. package/dist/node_modules/valibot/dist/index.js +450 -235
  76. package/dist/package.json.js +1 -1
  77. package/dist/services/templateLibraryApi.js +5 -4
  78. package/dist/services/unsubscribeApi.js +6 -6
  79. package/dist/src/@types/config/defaults.d.ts +5 -1
  80. package/dist/src/@types/config/index.d.ts +3 -3
  81. package/dist/src/@types/config/schemas.d.ts +217 -0
  82. package/dist/src/@types/config/types.d.ts +9 -1
  83. package/dist/src/components/Guido.vue.d.ts +1 -1
  84. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +2 -0
  85. package/dist/src/components/organisms/header/AutoSaveToggle.vue.d.ts +2 -0
  86. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
  87. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
  88. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
  89. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  90. package/dist/src/composables/useAutoSave.d.ts +3 -0
  91. package/dist/src/composables/useConfig.d.ts +58 -0
  92. package/dist/src/composables/useCortexBlueprintBridge.d.ts +25 -0
  93. package/dist/src/composables/useEmailTemplateApplier.d.ts +21 -0
  94. package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
  95. package/dist/src/composables/useGuidoStateBridge.d.ts +22 -0
  96. package/dist/src/composables/useRecommendation.d.ts +10 -1
  97. package/dist/src/composables/useRecommendation.test.d.ts +1 -0
  98. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  99. package/dist/src/composables/useSave.d.ts +1 -1
  100. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  101. package/dist/src/config/migrator/index.d.ts +2 -1
  102. package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +2 -0
  103. package/dist/src/config/migrator/recommendation/compositionMapper.test.d.ts +1 -0
  104. package/dist/src/config/migrator/recommendation/extractors.d.ts +7 -0
  105. package/dist/src/config/migrator/recommendation/extractors.test.d.ts +1 -0
  106. package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +11 -0
  107. package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +15 -0
  108. package/dist/src/config/migrator/recommendation/parseLegacyConfig.test.d.ts +1 -0
  109. package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +7 -0
  110. package/dist/src/config/migrator/recommendation/settingsMapper.test.d.ts +1 -0
  111. package/dist/src/config/migrator/recommendation/themeMapper.d.ts +5 -0
  112. package/dist/src/config/migrator/recommendation/themeMapper.test.d.ts +1 -0
  113. package/dist/src/config/migrator/recommendation/types.d.ts +205 -0
  114. package/dist/src/config/migrator/recommendationMigrator.d.ts +13 -1
  115. package/dist/src/config/migrator/recommendationMigrator.test.d.ts +1 -0
  116. package/dist/src/enums/extensions/recommendationBlock.d.ts +6 -1
  117. package/dist/src/enums/onboarding.d.ts +6 -0
  118. package/dist/src/enums/unsubscribe.d.ts +13 -3
  119. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  120. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  121. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
  122. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
  123. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.test.d.ts +1 -0
  124. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
  125. package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
  126. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +21 -3
  127. package/dist/src/extensions/Blocks/Recommendation/services/configService.test.d.ts +1 -0
  128. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +41 -1
  129. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -1
  130. package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +2 -0
  131. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +21 -0
  132. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.test.d.ts +1 -0
  133. package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -3
  134. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +21 -0
  135. package/dist/src/library.d.ts +1 -1
  136. package/dist/src/stores/autosave.d.ts +12 -0
  137. package/dist/src/stores/config.d.ts +522 -0
  138. package/dist/src/stores/editor.d.ts +23 -0
  139. package/dist/src/stores/guido-email-editor.d.ts +41 -0
  140. package/dist/src/stores/onboarding.d.ts +4 -0
  141. package/dist/src/utils/htmlEscape.d.ts +5 -0
  142. package/dist/src/utils/htmlEscape.test.d.ts +1 -0
  143. package/dist/src/utils/timeUtil.d.ts +8 -0
  144. package/dist/static/styles/components/button.css.js +16 -9
  145. package/dist/static/styles/components/loader.css.js +4 -0
  146. package/dist/static/styles/components/narrow-panel.css.js +52 -0
  147. package/dist/stores/autosave.js +17 -0
  148. package/dist/stores/editor.js +3 -1
  149. package/dist/stores/guido-email-editor.js +20 -0
  150. package/dist/stores/onboarding.js +4 -0
  151. package/dist/utils/htmlEscape.js +13 -0
  152. package/dist/utils/pairProductVariables.js +89 -88
  153. package/dist/utils/templatePreparation.js +74 -27
  154. package/dist/utils/timeUtil.js +19 -0
  155. package/package.json +7 -3
  156. package/dist/enums/displayConditions.js +0 -80
  157. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
  158. package/dist/src/enums/displayConditions.d.ts +0 -2
@@ -1,131 +1,147 @@
1
- import { defineComponent as j, defineAsyncComponent as R, ref as A, computed as I, watch as J, onMounted as Q, onUnmounted as X } from "vue";
2
- import { provideGuidoActions as Y } from "../composables/useGuidoActions.js";
3
- import { usePartner as Z } from "../composables/usePartner.js";
4
- import { useStripo as ee } from "../composables/useStripo.js";
5
- import { useTimerClone as te } from "../composables/useTimerClone.js";
6
- import { migrate as W } from "../config/migrator/index.js";
7
- import { ModuleFolderDefaults as B } from "../enums/defaults.js";
8
- import { RIBBON_SELECTOR as oe } from "../enums/onboarding.js";
9
- import ne from "./organisms/base/Toaster.vue.js";
10
- import se from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
11
- import re from "./organisms/header/HeaderWrapper.vue.js";
12
- import ce from "./organisms/LoadingWrapper.vue.js";
13
- import ae from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
14
- import ie from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
15
- import { useStripoApi as me } from "../services/stripoApi.js";
16
- import { useConfigStore as de } from "../stores/config.js";
17
- import { useDynamicContentStore as le } from "../stores/dynamic-content.js";
18
- import { useEditorStore as ue } from "../stores/editor.js";
19
- import { usePreviewStore as pe } from "../stores/preview.js";
20
- import { useUnsubscribeStore as fe } from "../stores/unsubscribe.js";
21
- const Re = /* @__PURE__ */ j({
1
+ import { defineComponent as ee, defineAsyncComponent as G, ref as z, computed as q, watch as oe, onMounted as te, onUnmounted as ne } from "vue";
2
+ import { useCortexBlueprintBridge as se } from "../composables/useCortexBlueprintBridge.js";
3
+ import { provideGuidoActions as re } from "../composables/useGuidoActions.js";
4
+ import { useGuidoStateBridge as ce } from "../composables/useGuidoStateBridge.js";
5
+ import { usePartner as ae } from "../composables/usePartner.js";
6
+ import { useStripo as ie } from "../composables/useStripo.js";
7
+ import { useTimerClone as de } from "../composables/useTimerClone.js";
8
+ import { migrate as K } from "../config/migrator/index.js";
9
+ import { ModuleFolderDefaults as V } from "../enums/defaults.js";
10
+ import { RIBBON_SELECTOR as me } from "../enums/onboarding.js";
11
+ import le from "./organisms/AutoSaveController.vue.js";
12
+ import ue from "./organisms/base/Toaster.vue.js";
13
+ import pe from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
14
+ import fe from "./organisms/header/HeaderWrapper.vue.js";
15
+ import ve from "./organisms/LoadingWrapper.vue.js";
16
+ import be from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
17
+ import ge from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
18
+ import { useStripoApi as ye } from "../services/stripoApi.js";
19
+ import { useConfigStore as Se } from "../stores/config.js";
20
+ import { useDynamicContentStore as he } from "../stores/dynamic-content.js";
21
+ import { useEditorStore as we } from "../stores/editor.js";
22
+ import { usePreviewStore as Ee } from "../stores/preview.js";
23
+ import { useUnsubscribeStore as De } from "../stores/unsubscribe.js";
24
+ const je = /* @__PURE__ */ ee({
22
25
  __name: "Guido",
23
26
  props: {
24
27
  config: null
25
28
  },
26
29
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
27
- setup(H, { expose: x, emit: s }) {
28
- const b = H, G = R(
30
+ setup($, { expose: j, emit: r }) {
31
+ const D = $, J = G(
29
32
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
30
- ), z = R(
33
+ ), Q = G(
31
34
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
32
- ), S = A(), d = A(), l = le(), g = fe(), a = de();
33
- a.init(b.config);
34
- const u = ue(), q = pe(), i = I(() => u.hasChanges), { isTestPartner: K } = Z(), w = () => {
35
+ ), C = z(), v = z(), b = he(), k = De(), m = Se();
36
+ m.init(D.config);
37
+ const g = we(), X = Ee(), f = q(() => g.hasChanges), { isTestPartner: Y } = ae(), T = () => {
35
38
  var e;
36
- return (e = S.value) == null ? void 0 : e.handleSave(!0);
39
+ return (e = C.value) == null ? void 0 : e.handleSave(!0);
37
40
  }, {
38
- templateId: p,
39
- userId: E,
40
- partnerName: D,
41
- username: C,
42
- template: t,
43
- editor: r
44
- } = a, m = (t == null ? void 0 : t.html) || "", T = (t == null ? void 0 : t.css) || "", f = (t == null ? void 0 : t.preselectedDynamicContent) || [], k = (r == null ? void 0 : r.savedModulesFolderName) || B.SAVED_MODULES, F = (r == null ? void 0 : r.defaultModulesFolderName) || B.DEFAULT_MODULES;
45
- u.templateId = p;
46
- const v = {
47
- emailId: p,
48
- userId: E,
49
- username: C,
50
- partnerName: D,
51
- savedModulesFolderName: k,
52
- defaultModulesFolderName: F
53
- }, L = {
54
- preselectedDynamicContentList: f,
41
+ templateId: y,
42
+ userId: A,
43
+ partnerName: B,
44
+ username: F,
45
+ template: o,
46
+ editor: c
47
+ } = m, l = (o == null ? void 0 : o.html) || "", L = (o == null ? void 0 : o.css) || "", S = (o == null ? void 0 : o.preselectedDynamicContent) || [], U = (c == null ? void 0 : c.savedModulesFolderName) || V.SAVED_MODULES, _ = (c == null ? void 0 : c.defaultModulesFolderName) || V.DEFAULT_MODULES;
48
+ g.templateId = y, se(), ce();
49
+ const h = {
50
+ emailId: y,
51
+ userId: A,
52
+ username: F,
53
+ partnerName: B,
54
+ savedModulesFolderName: U,
55
+ defaultModulesFolderName: _
56
+ }, H = {
57
+ preselectedDynamicContentList: S,
55
58
  onReady: () => {
56
- console.debug("guido:ready"), s("ready");
59
+ console.debug("guido:ready"), r("ready");
57
60
  }
58
- }, { initPlugin: U } = ee(v, L), { getDefaultTemplate: _ } = me(), { cloneTimersOnSave: M, hasTimerBlocks: O } = te(), V = I(() => {
61
+ }, { initPlugin: M } = ie(h, H), { getDefaultTemplate: O } = ye(), { cloneTimersOnSave: P, hasTimerBlocks: N } = de(), Z = q(() => {
59
62
  var e;
60
- return !((e = a.ui) != null && e.showHeader);
63
+ return !((e = m.ui) != null && e.showHeader);
61
64
  });
62
- Y({
65
+ re({
63
66
  onBack: () => {
64
- console.debug("guido:back"), s("back");
67
+ console.debug("guido:back"), r("back");
65
68
  },
66
69
  onSaveStart: () => {
67
- console.debug("guido:save:start"), s("save:start");
70
+ console.debug("guido:save:start"), r("save:start");
68
71
  },
69
72
  onSaveComplete: (e) => {
70
- const n = { ...e, metadata: v };
71
- console.debug("guido:save:complete", n), s("save:complete", n);
73
+ const t = { ...e, metadata: h }, a = (n) => ((n == null ? void 0 : n.match(/<td[^>]*radio-button-v2[^>]*>/gi)) ?? []).map((u) => {
74
+ var p;
75
+ const d = (((p = u.match(/class="([^"]*)"/)) == null ? void 0 : p[1]) ?? "").split(/\s+/).filter(Boolean);
76
+ return { classes: d, hasBlock: d.includes("radio-button-block"), tag: u };
77
+ });
78
+ console.debug("guido:save:complete", t), console.debug("guido:save:radio-tds", {
79
+ rawHtml: a(e.rawHtml),
80
+ compiledHtml: a(e.compiledHtml)
81
+ }), r("save:complete", t);
72
82
  },
73
83
  onTestEmailClick: () => {
74
- console.debug("guido:test-email:click"), s("test-email:click");
84
+ console.debug("guido:test-email:click"), r("test-email:click");
75
85
  }
76
86
  });
77
- const P = (e) => {
78
- console.debug("dynamic-content:close", e), l.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
79
- }, N = () => {
87
+ const R = (e) => {
88
+ console.debug("dynamic-content:close", e), b.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
89
+ }, I = () => {
80
90
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
81
91
  };
82
- J(() => i.value, () => {
83
- s("on-change", i.value);
92
+ oe(() => f.value, () => {
93
+ r("on-change", f.value);
84
94
  });
85
- const y = (e) => {
86
- const n = e, { attribute: o, position: $ } = n.detail;
87
- console.debug("dynamic-content:open", n.detail), s("dynamic-content:open", o, $);
95
+ const w = (e) => {
96
+ const t = e, { attribute: a, position: n } = t.detail;
97
+ console.debug("dynamic-content:open", t.detail), r("dynamic-content:open", a, n);
88
98
  };
89
- let c = null;
90
- const h = () => {
91
- var n;
92
- const e = document.querySelector(oe);
93
- (n = d.value) == null || n.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
99
+ let i = null;
100
+ const E = () => {
101
+ var t;
102
+ const e = document.querySelector(me);
103
+ (t = v.value) == null || t.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
94
104
  };
95
- return Q(async () => {
96
- var n;
97
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h();
98
- const e = (n = d.value) == null ? void 0 : n.parentElement;
99
- e && (c = new ResizeObserver(h), c.observe(e));
105
+ return te(async () => {
106
+ var t, a;
107
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), E();
108
+ const e = (t = v.value) == null ? void 0 : t.parentElement;
109
+ e && (i = new ResizeObserver(E), i.observe(e));
100
110
  try {
101
- g.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
102
- let o = {
103
- html: m && await W(m),
104
- css: T
111
+ k.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
112
+ const n = ((a = o == null ? void 0 : o.migration) == null ? void 0 : a.recommendationConfigs) ?? {}, u = (d) => ((d == null ? void 0 : d.match(/<td[^>]*radio-button-v2[^>]*>/gi)) ?? []).map((p) => {
113
+ var x;
114
+ const W = (((x = p.match(/class="([^"]*)"/)) == null ? void 0 : x[1]) ?? "").split(/\s+/).filter(Boolean);
115
+ return { classes: W, hasBlock: W.includes("radio-button-block"), tag: p };
116
+ });
117
+ console.debug("guido:pre-migrate radio-tds", u(l));
118
+ let s = {
119
+ html: l && await K(l, n),
120
+ css: L
105
121
  };
106
- o.html || (o = await _(), o.html = await W(o.html)), O(o.html) && (o.html = await M(o.html)), await U(o), l.selectedDynamicContentList = f;
107
- } catch (o) {
108
- console.error("Failed to initialize Stripo editor:", o);
122
+ console.debug("guido:post-migrate radio-tds", u(s.html)), s.html || (s = await O(), s.html = await K(s.html, n)), N(s.html) && (s.html = await P(s.html)), await M(s), b.selectedDynamicContentList = S;
123
+ } catch (n) {
124
+ console.error("Failed to initialize Stripo editor:", n);
109
125
  }
110
- document.addEventListener("dynamic-content:open", y);
111
- }), X(() => {
112
- c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", y);
126
+ document.addEventListener("dynamic-content:open", w);
127
+ }), ne(() => {
128
+ i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", w);
113
129
  try {
114
130
  window.UIEditor.removeEditor();
115
131
  } catch {
116
132
  console.debug("Failed to remove Stripo editor: No editor found");
117
133
  }
118
- a.reset();
119
- }), x({
134
+ m.reset();
135
+ }), j({
120
136
  dynamicContent: {
121
- insert: P,
122
- close: N
137
+ insert: R,
138
+ close: I
123
139
  },
124
- hasChanges: i,
125
- saveSilent: w
126
- }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: z, headerWrapperRef: S, wrapperRef: d, dynamicContentStore: l, unsubscribeStore: g, props: b, configStore: a, editorStore: u, previewStore: q, hasChanges: i, isTestPartner: K, saveSilent: w, templateId: p, userId: E, partnerName: D, username: C, templateConfig: t, editorConfig: r, html: m, css: T, preselectedDynamicContentList: f, savedModulesFolderName: k, defaultModulesFolderName: F, emit: s, metadata: v, options: L, initPlugin: U, getDefaultTemplate: _, cloneTimersOnSave: M, hasTimerBlocks: O, noHeader: V, insertDynamicContent: P, closeDynamicContent: N, handleDynamicContentOpen: y, ribbonObserver: c, updateRibbonOffset: h, Toaster: ne, FilterSelectionDrawer: se, HeaderWrapper: re, LoadingWrapper: ce, SaveAsTemplateDrawer: ae, UnsubscribeWrapper: ie };
140
+ hasChanges: f,
141
+ saveSilent: T
142
+ }), { __sfc: !0, PreviewContainer: J, OnboardingWrapper: Q, headerWrapperRef: C, wrapperRef: v, dynamicContentStore: b, unsubscribeStore: k, props: D, configStore: m, editorStore: g, previewStore: X, hasChanges: f, isTestPartner: Y, saveSilent: T, templateId: y, userId: A, partnerName: B, username: F, templateConfig: o, editorConfig: c, html: l, css: L, preselectedDynamicContentList: S, savedModulesFolderName: U, defaultModulesFolderName: _, emit: r, metadata: h, options: H, initPlugin: M, getDefaultTemplate: O, cloneTimersOnSave: P, hasTimerBlocks: N, noHeader: Z, insertDynamicContent: R, closeDynamicContent: I, handleDynamicContentOpen: w, ribbonObserver: i, updateRibbonOffset: E, AutoSaveController: le, Toaster: ue, FilterSelectionDrawer: pe, HeaderWrapper: fe, LoadingWrapper: ve, SaveAsTemplateDrawer: be, UnsubscribeWrapper: ge };
127
143
  }
128
144
  });
129
145
  export {
130
- Re as default
146
+ je as default
131
147
  };
@@ -0,0 +1,17 @@
1
+ import n from "./AutoSaveController.vue2.js";
2
+ import t from "../../_virtual/_plugin-vue2_normalizer.js";
3
+ var o = function() {
4
+ var r = this, e = r._self._c;
5
+ return r._self._setupProxy, e("div", { staticClass: "d-n" });
6
+ }, s = [], _ = /* @__PURE__ */ t(
7
+ n,
8
+ o,
9
+ s,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const f = _.exports;
15
+ export {
16
+ f as default
17
+ };
@@ -0,0 +1,13 @@
1
+ import { defineComponent as t } from "vue";
2
+ import { useAutoSave as r } from "../../composables/useAutoSave.js";
3
+ import { useSave as s } from "../../composables/useSave.js";
4
+ const f = /* @__PURE__ */ t({
5
+ __name: "AutoSaveController",
6
+ setup(a) {
7
+ const { save: e } = s(), o = () => e(!1, !0);
8
+ return r(o), { __sfc: !0, save: e, backgroundSave: o };
9
+ }
10
+ });
11
+ export {
12
+ f as default
13
+ };
@@ -1,26 +1,24 @@
1
- import r from "./FilterItem.vue2.js";
1
+ import l from "./FilterItem.vue2.js";
2
2
  /* empty css */
3
- import l from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var i = function() {
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
5
  var a = this, e = a._self._c, t = a._self._setupProxy;
6
6
  return e("div", { staticClass: "d-f f-d-c w-1 gap-16", attrs: { "data-filter-group": a.filter.filterGroup, "data-filter-number": a.filter.filterNumber } }, [e("div", { staticClass: "d-f a-i-c j-c-s-b pt-4", class: { "bor-t-s-s bor-t-w-1 bor-t-c-50": a.index === 0 } }, [e("p", [a._v(" " + a._s(t.trans("newsletter.filter")) + " " + a._s(a.index + 1) + " ")]), e(t.InButtonV2, { attrs: { id: "guido__delete-filter-group-button", "left-icon": "line-delete", styling: "text", type: "danger", "label-text-status": !1 }, on: { click: function(s) {
7
7
  return t.emit("delete-filter", t.props.filter);
8
- } } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "disabled-status": "", "search-status": "", "button-status": !1, "label-text": t.trans("action-builder.filter-type"), options: t.filterTypeOptions, value: [t.filterTypeOptions[0]] } }), e(t.InSelect, { staticClass: "w-2", attrs: { id: "filter-item-input--attribute-type", "search-status": "", "static-position": "bottom right", "button-status": !1, "label-text": t.trans("condition.attribute"), options: t.store.getFilterList, state: t.getFieldState("attribute"), value: [t.selectedAttributeType] }, on: { select: t.handleAttributeChange } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [t.isBooleanAttribute ? e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.booleanValueOptions, state: t.getFieldState("value"), value: [t.selectedBooleanValue] }, on: { select: t.handleBooleanValueChange } }) : [e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.getOperatorOptions(t.selectedAttributeType.type), state: t.getFieldState("operator"), value: [t.selectedOperatorType] }, on: { select: function(s) {
9
- return t.updateFilter({ text: "operator", value: s.value });
10
- } } }), e(t.InBasicTextInput, { staticClass: "w-2", attrs: { id: "filter-item-input--value", name: "imageUrl", "character-counter-status": !1, "label-text": t.trans("condition.value"), "max-character-length": 25, "placeholder-text": t.trans("condition.enter-value-placeholder"), "state-message": t.valueErrorMessage, states: t.getFieldState("value"), "tooltip-status": !1, type: t.valueInputType, value: decodeURIComponent(t.props.filter.value) }, on: { input: function(s) {
8
+ } } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [e(t.InSelect, { staticClass: "w-2", attrs: { "disabled-status": "", "search-status": "", "button-status": !1, "label-text": t.trans("action-builder.filter-type"), options: t.filterTypeOptions, value: [t.filterTypeOptions[0]] } }), e(t.InSelect, { staticClass: "w-2", attrs: { id: "filter-item-input--attribute-type", "search-status": "", "static-position": "bottom right", "button-status": !1, "label-text": t.trans("condition.attribute"), options: t.store.getFilterList, state: t.getFieldState("attribute"), value: [t.selectedAttributeType] }, on: { select: t.handleAttributeChange } })], 1), e("div", { staticClass: "w-1 d-f a-i-s j-c-s-b gap-16" }, [t.isBooleanAttribute ? e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.booleanValueOptions, state: t.getFieldState("value"), value: [t.selectedBooleanValue] }, on: { select: t.handleBooleanValueChange } }) : [e(t.InSelect, { staticClass: "w-2", attrs: { "button-status": !1, "label-text": t.trans("condition.operator"), options: t.getOperatorOptions(t.selectedAttributeType.type), state: t.getFieldState("operator"), value: [t.selectedOperatorType] }, on: { select: t.handleOperatorChange } }), t.isAnyOfOperator ? e(t.InTags, { staticClass: "w-2", attrs: { "allow-bulk-paste": "", validate: "text", "allow-duplicates": !1, invalid: t.invalidFields.has("value"), "invalid-message": t.valueErrorMessage, label: t.trans("condition.value"), placeholder: t.trans("condition.enter-value-placeholder"), value: t.tagValues }, on: { input: t.onTagsInput } }) : t.isDateAttribute ? e(t.InDatePickerV2, { staticClass: "w-2", attrs: { id: `filter-item-input--value-${a.index}`, "single-date-picker-status": "", "label-text": t.trans("condition.value"), locale: t.datePickerLocale, name: `filter-item-input--value-${a.index}`, "placeholder-text": t.trans("condition.enter-value-placeholder"), state: t.getFieldState("value"), "state-message": t.valueErrorMessage, value: t.datePickerValue }, on: { apply: t.onDatePickerApply } }) : e(t.InBasicTextInput, { staticClass: "w-2", attrs: { id: `filter-item-input--value-${a.index}`, name: "imageUrl", "character-counter-status": !1, "label-text": t.trans("condition.value"), "max-character-length": 25, "placeholder-text": t.trans("condition.enter-value-placeholder"), "state-message": t.valueErrorMessage, states: t.getFieldState("value"), "tooltip-status": !1, type: t.valueInputType, value: t.safeDecodeURIComponent(t.props.filter.value) }, on: { input: function(s) {
11
9
  t.updateFilter({ text: "value", value: encodeURIComponent(s) });
12
10
  } } })]], 2), t.props.hasLogicAdapter ? e("div", { staticClass: "w-1 d-f a-i-c j-c-c p-r bor-b-s-s bor-b-w-1 bor-b-c-50 mt-4" }, [e(t.LogicAdapter, { staticClass: "p-a", attrs: { logic: t.props.filter.innerGroupOperator }, on: { change: function(s) {
13
11
  return t.updateFilter({ text: "innerGroupOperator", value: s });
14
12
  } } })], 1) : a._e()]);
15
- }, o = [], n = /* @__PURE__ */ l(
13
+ }, n = [], o = /* @__PURE__ */ i(
14
+ l,
16
15
  r,
17
- i,
18
- o,
16
+ n,
19
17
  !1,
20
18
  null,
21
- "3b53a736"
19
+ "8053a037"
22
20
  );
23
- const f = n.exports;
21
+ const f = o.exports;
24
22
  export {
25
23
  f as default
26
24
  };
@@ -1,12 +1,14 @@
1
- import { defineComponent as _, computed as l } from "vue";
2
- import { useTranslations as C } from "../../../../composables/useTranslations.js";
3
- import { getOperatorOptions as p } from "../../../../enums/extensions/recommendationBlock.js";
4
- import { useRecommendationExtensionStore as V } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
- import { getInvalidFilterFields as A } from "../../../../extensions/Blocks/Recommendation/validation/filterSchema.js";
6
- import { InButtonV2 as L, InSelect as O, InBasicTextInput as S } from "@useinsider/design-system-vue";
7
- import E from "./LogicAdapter.vue.js";
8
- import { useDebounceFn as N } from "../../../../node_modules/@vueuse/shared/index.js";
9
- const K = /* @__PURE__ */ _({
1
+ import { defineComponent as N, computed as r } from "vue";
2
+ import { useTranslations as U } from "../../../../composables/useTranslations.js";
3
+ import { getOperatorOptions as f, OP_ANY_OF as d } from "../../../../enums/extensions/recommendationBlock.js";
4
+ import { useRecommendationExtensionStore as E } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
+ import { parseTagList as j, safeDecodeURIComponent as g } from "../../../../extensions/Blocks/Recommendation/utils/filterUtil.js";
6
+ import { getInvalidFilterFields as w } from "../../../../extensions/Blocks/Recommendation/validation/filterSchema.js";
7
+ import { locale as M } from "../../../../utils/dateUtil.js";
8
+ import { InTags as Y, InButtonV2 as q, InSelect as z, InDatePickerV2 as G, InBasicTextInput as H } from "@useinsider/design-system-vue";
9
+ import J from "./LogicAdapter.vue.js";
10
+ import { useDebounceFn as K } from "../../../../node_modules/@vueuse/shared/index.js";
11
+ const se = /* @__PURE__ */ N({
10
12
  __name: "FilterItem",
11
13
  props: {
12
14
  filter: null,
@@ -15,55 +17,88 @@ const K = /* @__PURE__ */ _({
15
17
  submitted: { type: Boolean }
16
18
  },
17
19
  emits: ["delete-filter"],
18
- setup(f, { emit: v }) {
19
- const t = f, n = C(), a = V(), y = [
20
+ setup(I, { emit: O }) {
21
+ const t = I, s = U(), n = E(), T = [
20
22
  {
21
- text: n("email-editor.standard-filter"),
23
+ text: s("email-editor.standard-filter"),
22
24
  value: "standardFilter"
23
25
  }
24
- ], i = [
26
+ ], u = [
25
27
  { text: "True", value: "true" },
26
28
  { text: "False", value: "false" }
27
- ], d = l(() => t.filter.attribute || ""), r = l(() => a.getFilterList.find((e) => e.value === d.value) || { text: "", value: "", type: "" }), F = l(
29
+ ], m = r(() => t.filter.attribute || ""), i = r(() => n.getFilterList.find((e) => e.value === m.value) || { text: "", value: "", type: "" }), h = r(
28
30
  () => {
29
31
  var e;
30
- return ((e = r.value) == null ? void 0 : e.type) === "Boolean";
32
+ return ((e = i.value) == null ? void 0 : e.type) === "Boolean";
31
33
  }
32
- ), b = l(() => {
34
+ ), b = r(() => {
33
35
  var e;
34
- return p((e = r.value) == null ? void 0 : e.type).find((o) => o.value === t.filter.operator);
35
- }), g = l(
36
- () => i.find((e) => e.value === t.filter.value) || i[0]
37
- ), u = l(() => t.submitted ? A(t.filter) : /* @__PURE__ */ new Set()), h = (e) => u.value.has(e) ? "error" : "default", B = l(
38
- () => u.value.has("value") ? n("action-builder.filter-empty-value-error") : ""
39
- ), c = l(
36
+ return f((e = i.value) == null ? void 0 : e.type).find((o) => o.value === t.filter.operator);
37
+ }), A = r(
38
+ () => u.find((e) => e.value === t.filter.value) || u[0]
39
+ ), p = r(() => t.submitted ? w(t.filter) : /* @__PURE__ */ new Set()), x = (e) => p.value.has(e) ? "error" : "default", B = r(
40
+ () => p.value.has("value") ? s("action-builder.filter-empty-value-error") : ""
41
+ ), v = r(
40
42
  () => {
41
43
  var e;
42
- return ((e = r.value) == null ? void 0 : e.type) === "Number";
44
+ return ((e = i.value) == null ? void 0 : e.type) === "Number";
43
45
  }
44
- ), x = l(() => c.value ? "number" : "text"), T = N((e) => {
45
- a.updateFilter({
46
+ ), D = r(() => v.value ? "number" : "text"), C = r(
47
+ () => {
48
+ var e;
49
+ return ((e = i.value) == null ? void 0 : e.type) === "Date";
50
+ }
51
+ ), _ = r(() => t.filter.operator === d), k = r(() => j(t.filter.value)), P = K((e) => {
52
+ n.updateFilter({
46
53
  ...t.filter,
47
54
  [e.text]: e.value
48
55
  });
49
- }, 500);
50
- return { __sfc: !0, trans: n, store: a, props: t, filterTypeOptions: y, booleanValueOptions: i, attributeType: d, selectedAttributeType: r, isBooleanAttribute: F, selectedOperatorType: b, selectedBooleanValue: g, emit: v, invalidFields: u, getFieldState: h, valueErrorMessage: B, isNumericAttribute: c, valueInputType: x, updateFilter: T, handleAttributeChange: (e) => {
51
- const o = a.getFilterList.find((I) => I.value === e.value), m = (o == null ? void 0 : o.type) === "Boolean", [s] = p(o == null ? void 0 : o.type);
52
- a.updateFilter({
56
+ }, 500), V = (e) => {
57
+ const o = n.getFilterList.find((c) => c.value === e.value), l = (o == null ? void 0 : o.type) === "Boolean", [a] = f(o == null ? void 0 : o.type);
58
+ n.updateFilter({
53
59
  ...t.filter,
54
60
  attribute: e.value,
55
- operator: m ? "=" : (s == null ? void 0 : s.value) ?? "",
56
- value: m ? "true" : ""
61
+ operator: l ? "=" : (a == null ? void 0 : a.value) ?? "",
62
+ value: l ? "true" : ""
57
63
  });
58
- }, handleBooleanValueChange: (e) => {
59
- a.updateFilter({
64
+ }, L = (e) => {
65
+ n.updateFilter({
60
66
  ...t.filter,
61
67
  operator: "=",
62
68
  value: e.value
63
69
  });
64
- }, getOperatorOptions: p, InBasicTextInput: S, InSelect: O, InButtonV2: L, LogicAdapter: E };
70
+ }, S = (e) => {
71
+ const o = e.value;
72
+ if (o === t.filter.operator)
73
+ return;
74
+ const c = t.filter.operator === d !== (o === d);
75
+ n.updateFilter({
76
+ ...t.filter,
77
+ operator: o,
78
+ value: c ? "" : t.filter.value
79
+ });
80
+ }, $ = M(), y = (e) => {
81
+ const [o, l, a] = e.split("-");
82
+ return !o || !l || !a ? "" : `${l}/${a}/${o}`;
83
+ }, F = (e) => {
84
+ const [o, l, a] = e.split("/");
85
+ return !a || !o || !l ? "" : `${a}-${o.padStart(2, "0")}-${l.padStart(2, "0")}`;
86
+ }, R = r(
87
+ () => y(g(t.filter.value))
88
+ );
89
+ return { __sfc: !0, trans: s, store: n, props: t, filterTypeOptions: T, booleanValueOptions: u, attributeType: m, selectedAttributeType: i, isBooleanAttribute: h, selectedOperatorType: b, selectedBooleanValue: A, emit: O, invalidFields: p, getFieldState: x, valueErrorMessage: B, isNumericAttribute: v, valueInputType: D, isDateAttribute: C, isAnyOfOperator: _, tagValues: k, updateFilter: P, handleAttributeChange: V, handleBooleanValueChange: L, handleOperatorChange: S, datePickerLocale: $, isoToPickerDate: y, pickerDateToIso: F, datePickerValue: R, onDatePickerApply: (e) => {
90
+ n.updateFilter({
91
+ ...t.filter,
92
+ value: encodeURIComponent(F(e))
93
+ });
94
+ }, onTagsInput: (e) => {
95
+ n.updateFilter({
96
+ ...t.filter,
97
+ value: e.map(encodeURIComponent).join(",")
98
+ });
99
+ }, getOperatorOptions: f, safeDecodeURIComponent: g, InBasicTextInput: H, InDatePickerV2: G, InSelect: z, InButtonV2: q, InTags: Y, LogicAdapter: J };
65
100
  }
66
101
  });
67
102
  export {
68
- K as default
103
+ se as default
69
104
  };
@@ -0,0 +1,22 @@
1
+ import o from "./AutoSaveToggle.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
+ var e = this, a = e._self._c, t = e._self._setupProxy;
6
+ return t.isFeatureEnabled("autosave") ? a("div", { staticClass: "d-f a-i-c mr-3 auto-save-toggle", on: { mouseenter: function(s) {
7
+ t.isHovered = !0;
8
+ }, mouseleave: function(s) {
9
+ t.isHovered = !1;
10
+ } } }, [a(t.InToggle, { attrs: { id: "guido__autosave-toggle", name: "guido-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggle } }), a("span", { staticClass: "ml-2 auto-save-toggle__label t-c-55" }, [e._v(" " + e._s(t.trans("email-editor.auto-save")) + " ")]), t.autosaveStore.status === t.AUTOSAVE_STATUS.SAVING ? a("span", { staticClass: "ml-2 d-f a-i-c f-s-1" }, [a(t.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), a("span", { staticClass: "ml-1 t-c-53" }, [e._v(" " + e._s(t.trans("newsletter.saving")) + " ")])], 1) : t.lastSavedLabel ? a("span", { staticClass: "ml-2 f-s-1 t-c-53" }, [e._v(" " + e._s(t.lastSavedLabel) + " ")]) : e._e(), t.isHovered ? a(t.InInfoBox, { staticClass: "auto-save-toggle__info-box", attrs: { id: "guido__autosave-info-box", size: "small", variant: "information", "description-text": t.trans("email-editor.auto-save-description"), "title-text": t.trans("email-editor.auto-save-title") } }) : e._e()], 1) : e._e();
11
+ }, l = [], r = /* @__PURE__ */ i(
12
+ o,
13
+ n,
14
+ l,
15
+ !1,
16
+ null,
17
+ "2c964af4"
18
+ );
19
+ const d = r.exports;
20
+ export {
21
+ d as default
22
+ };
@@ -0,0 +1,19 @@
1
+ import { defineComponent as i, ref as f, computed as u } from "vue";
2
+ import { useConfig as l } from "../../../composables/useConfig.js";
3
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
4
+ import { useAutosaveStore as c, AUTOSAVE_STATUS as t } from "../../../stores/autosave.js";
5
+ import { useEditorStore as S } from "../../../stores/editor.js";
6
+ import { formatLocalTime as d } from "../../../utils/timeUtil.js";
7
+ import { InToggle as g, InLoading as _, InInfoBox as A } from "@useinsider/design-system-vue";
8
+ const U = /* @__PURE__ */ i({
9
+ __name: "AutoSaveToggle",
10
+ setup(v) {
11
+ const { isFeatureEnabled: e } = l(), r = S(), o = c(), s = p(), n = f(!1), a = u(() => o.status !== t.SAVED || !o.lastSavedAt ? "" : d(o.lastSavedAt));
12
+ return { __sfc: !0, isFeatureEnabled: e, editorStore: r, autosaveStore: o, trans: s, isHovered: n, lastSavedLabel: a, toggle: (m) => {
13
+ o.isOn = m;
14
+ }, AUTOSAVE_STATUS: t, InInfoBox: A, InLoading: _, InToggle: g };
15
+ }
16
+ });
17
+ export {
18
+ U as default
19
+ };
@@ -1,17 +1,17 @@
1
- import i from "./MiddleSlot.vue2.js";
1
+ import r from "./MiddleSlot.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var t = function() {
4
- var r = this, e = r._self._c, o = r._self._setupProxy;
5
- return e("div", [o.editorStore.isVersionHistoryOpen ? e("div", { staticClass: "d-f" }, [e(o.VersionHistory), e(o.VersionHistoryViewOptions)], 1) : o.editorStore.isPreviewModeOpen ? e("div", { staticClass: "d-f" }, [e(o.EmailSizeIndicator), e(o.AmpToggle)], 1) : r._e(), e(o.EditorToolbar, { directives: [{ name: "show", rawName: "v-show", value: o.editorStore.isEditorToolbarVisible, expression: "editorStore.isEditorToolbarVisible" }] })], 1);
6
- }, n = [], a = /* @__PURE__ */ s(
7
- i,
4
+ var o = this, e = o._self._c, i = o._self._setupProxy;
5
+ return e("div", { staticClass: "d-f a-i-c" }, [i.editorStore.isVersionHistoryOpen ? e("div", { staticClass: "d-f" }, [e(i.VersionHistory), e(i.VersionHistoryViewOptions)], 1) : i.editorStore.isPreviewModeOpen ? e("div", { staticClass: "d-f" }, [e(i.EmailSizeIndicator), e(i.AmpToggle)], 1) : o._e(), e(i.EditorToolbar, { directives: [{ name: "show", rawName: "v-show", value: i.editorStore.isEditorToolbarVisible, expression: "editorStore.isEditorToolbarVisible" }] })], 1);
6
+ }, a = [], n = /* @__PURE__ */ s(
7
+ r,
8
8
  t,
9
- n,
9
+ a,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const c = a.exports;
14
+ const c = n.exports;
15
15
  export {
16
16
  c as default
17
17
  };
@@ -1,11 +1,11 @@
1
- import i from "./RightSlot.vue2.js";
2
- import r from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var o = function() {
4
- var s = this, e = s._self._c, t = s._self._setupProxy;
5
- return e("div", { staticClass: "d-f a-i-c" }, [t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-3", attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : s._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
6
- }, a = [], n = /* @__PURE__ */ r(
7
- i,
8
- o,
1
+ import s from "./RightSlot.vue2.js";
2
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var r = function() {
4
+ var i = this, e = i._self._c, t = i._self._setupProxy;
5
+ return e("div", { staticClass: "d-f a-i-c" }, [t.editorStore.isVersionHistoryOpen ? i._e() : e(t.AutoSaveToggle), t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-1", attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : i._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
6
+ }, a = [], n = /* @__PURE__ */ o(
7
+ s,
8
+ r,
9
9
  a,
10
10
  !1,
11
11
  null,
@@ -1,22 +1,23 @@
1
1
  import { defineComponent as a, ref as f, computed as p } from "vue";
2
2
  import { useConfig as u } from "../../../composables/useConfig.js";
3
3
  import { useTranslations as d } from "../../../composables/useTranslations.js";
4
- import { useEditorStore as c } from "../../../stores/editor.js";
5
- import { InChips as l } from "@useinsider/design-system-vue";
6
- import _ from "./EditorActions.vue.js";
7
- import S from "./version-history/RestoreButton.vue.js";
8
- const x = /* @__PURE__ */ a({
4
+ import { useEditorStore as l } from "../../../stores/editor.js";
5
+ import { InChips as c } from "@useinsider/design-system-vue";
6
+ import _ from "./AutoSaveToggle.vue.js";
7
+ import S from "./EditorActions.vue.js";
8
+ import g from "./version-history/RestoreButton.vue.js";
9
+ const T = /* @__PURE__ */ a({
9
10
  __name: "RightSlot",
10
11
  setup(h, { expose: r }) {
11
- const { isFeatureEnabled: o } = u(), n = d(), i = c(), t = f(null), s = p(() => o("liquidSyntax"));
12
+ const { isFeatureEnabled: o } = u(), i = d(), n = l(), t = f(null), s = p(() => o("liquidSyntax"));
12
13
  return r({
13
14
  handleSave: (m) => {
14
15
  var e;
15
16
  return (e = t.value) == null ? void 0 : e.handleSave(m);
16
17
  }
17
- }), { __sfc: !0, isFeatureEnabled: o, trans: n, editorStore: i, editorActionsRef: t, isLiquidEnabled: s, InChips: l, EditorActions: _, RestoreButton: S };
18
+ }), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips: c, AutoSaveToggle: _, EditorActions: S, RestoreButton: g };
18
19
  }
19
20
  });
20
21
  export {
21
- x as default
22
+ T as default
22
23
  };