@useinsider/guido 1.0.3-beta.e1adf59 → 1.0.3-beta.e517316

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 (222) hide show
  1. package/dist/{src/@types → @types}/generic.d.ts +0 -9
  2. package/dist/{src/components → components}/Guido.vue.d.ts +2 -3
  3. package/dist/components/Guido.vue.js +5 -5
  4. package/dist/components/Guido.vue2.js +71 -99
  5. package/dist/{src/components → components}/wrappers/WpDrawer.vue.d.ts +4 -6
  6. package/dist/components/wrappers/WpDrawer.vue.js +4 -6
  7. package/dist/composables/useHttp.js +52 -89
  8. package/dist/composables/useStripo.js +63 -158
  9. package/dist/config/compiler/unsubscribeCompilerRules.js +29 -42
  10. package/dist/config/migrator/index.d.ts +1 -0
  11. package/dist/config/migrator/index.js +6 -7
  12. package/dist/enums/defaults.js +3 -6
  13. package/dist/enums/unsubscribe.d.ts +15 -0
  14. package/dist/enums/unsubscribe.js +6 -43
  15. package/dist/extensions/Blocks/Checkbox/control.js +53 -55
  16. package/dist/extensions/Blocks/RadioButton/control.js +42 -44
  17. package/dist/extensions/Blocks/Recommendation/block.js +1 -1
  18. package/dist/{src/extensions → extensions}/Blocks/Recommendation/control.d.ts +1 -2
  19. package/dist/extensions/Blocks/Recommendation/control.js +77 -91
  20. package/dist/{src/extensions → extensions}/Blocks/Recommendation/store/recommendation.d.ts +0 -8
  21. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +15 -16
  22. package/dist/extensions/Blocks/Recommendation/template.js +26 -194
  23. package/dist/guido.css +1 -1
  24. package/dist/services/stripoApi.js +19 -49
  25. package/dist/stores/unsubscribe.d.ts +8 -0
  26. package/dist/stores/unsubscribe.js +6 -126
  27. package/dist/utils/templatePreparation.js +16 -17
  28. package/package.json +1 -6
  29. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +0 -18
  30. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +0 -16
  31. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +0 -24
  32. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +0 -64
  33. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +0 -18
  34. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +0 -107
  35. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +0 -18
  36. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +0 -12
  37. package/dist/composables/useApiErrorTracking.js +0 -120
  38. package/dist/composables/useErrorTracking.js +0 -98
  39. package/dist/composables/useStripoErrorCategory.js +0 -86
  40. package/dist/composables/useStripoSlackNotifier.js +0 -47
  41. package/dist/config/migrator/unsubscribeMigrator.js +0 -124
  42. package/dist/extensions/Blocks/Unsubscribe/block.js +0 -131
  43. package/dist/extensions/Blocks/Unsubscribe/control.js +0 -167
  44. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +0 -42
  45. package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -21
  46. package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +0 -21
  47. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +0 -35
  48. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +0 -42
  49. package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +0 -10
  50. package/dist/extensions/Blocks/Unsubscribe/template.js +0 -22
  51. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +0 -11
  52. package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +0 -6
  53. package/dist/package.json.js +0 -7
  54. package/dist/services/slackNotificationService.js +0 -167
  55. package/dist/services/stripoErrorDeduplicationService.js +0 -91
  56. package/dist/services/unsubscribeApi.js +0 -16
  57. package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -2
  58. package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -2
  59. package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -2
  60. package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -2
  61. package/dist/src/composables/useApiErrorTracking.d.ts +0 -26
  62. package/dist/src/composables/useErrorTracking.d.ts +0 -30
  63. package/dist/src/composables/useStripoErrorCategory.d.ts +0 -26
  64. package/dist/src/composables/useStripoSlackNotifier.d.ts +0 -8
  65. package/dist/src/config/migrator/index.d.ts +0 -1
  66. package/dist/src/config/migrator/unsubscribeMigrator.d.ts +0 -1
  67. package/dist/src/enums/unsubscribe.d.ts +0 -38
  68. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +0 -32
  69. package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +0 -29
  70. package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +0 -11
  71. package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -4
  72. package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +0 -4
  73. package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +0 -12
  74. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +0 -9
  75. package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +0 -7
  76. package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
  77. package/dist/src/extensions/DynamicContent/extension.d.ts +0 -2
  78. package/dist/src/services/slackNotificationService.d.ts +0 -110
  79. package/dist/src/services/stripoErrorDeduplicationService.d.ts +0 -75
  80. package/dist/src/services/unsubscribeApi.d.ts +0 -4
  81. package/dist/src/stores/config.d.ts +0 -96
  82. package/dist/src/stores/unsubscribe.d.ts +0 -256
  83. package/dist/stores/config.js +0 -17
  84. /package/dist/{src/@types → @types}/events.d.ts +0 -0
  85. /package/dist/{src/@types → @types}/save-as-template.d.ts +0 -0
  86. /package/dist/{src/App.vue.d.ts → App.vue.d.ts} +0 -0
  87. /package/dist/{src/components → components}/organisms/LoadingWrapper.vue.d.ts +0 -0
  88. /package/dist/{src/components → components}/organisms/base/Toaster.vue.d.ts +0 -0
  89. /package/dist/{src/components → components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
  90. /package/dist/{src/components → components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
  91. /package/dist/{src/components → components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
  92. /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
  93. /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
  94. /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
  95. /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
  96. /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
  97. /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
  98. /package/dist/{src/components → components}/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -0
  99. /package/dist/{src/components → components}/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -0
  100. /package/dist/{src/components → components}/organisms/extensions/recommendation/Filters.vue.d.ts +0 -0
  101. /package/dist/{src/components → components}/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -0
  102. /package/dist/{src/components → components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
  103. /package/dist/{src/components → components}/organisms/header/LeftSlot.vue.d.ts +0 -0
  104. /package/dist/{src/components → components}/organisms/header/MiddleSlot.vue.d.ts +0 -0
  105. /package/dist/{src/components → components}/organisms/header/RightSlot.vue.d.ts +0 -0
  106. /package/dist/{src/components → components}/organisms/header/ViewOptions.vue.d.ts +0 -0
  107. /package/dist/{src/components → components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
  108. /package/dist/{src/components → components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
  109. /package/dist/{src/components → components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
  110. /package/dist/{src/components → components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
  111. /package/dist/{src/components → components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
  112. /package/dist/{src/components → components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
  113. /package/dist/{src/components → components}/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -0
  114. /package/dist/{src/components → components}/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -0
  115. /package/dist/{src/components → components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
  116. /package/dist/{src/components → components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
  117. /package/dist/{src/components → components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
  118. /package/dist/{src/components → components}/wrappers/WpModal.vue.d.ts +0 -0
  119. /package/dist/{src/composables → composables}/useActionsApi.d.ts +0 -0
  120. /package/dist/{src/composables → composables}/useApiExample.d.ts +0 -0
  121. /package/dist/{src/composables → composables}/useCodeEditorApi.d.ts +0 -0
  122. /package/dist/{src/composables → composables}/useConfig.d.ts +0 -0
  123. /package/dist/{src/composables → composables}/useCustomInterfaceAppearance.d.ts +0 -0
  124. /package/dist/{src/composables → composables}/useDebounce.d.ts +0 -0
  125. /package/dist/{src/composables → composables}/useExport.d.ts +0 -0
  126. /package/dist/{src/composables → composables}/useGuidoActions.d.ts +0 -0
  127. /package/dist/{src/composables → composables}/useHtmlCompiler.d.ts +0 -0
  128. /package/dist/{src/composables → composables}/useHtmlValidator.d.ts +0 -0
  129. /package/dist/{src/composables → composables}/useHttp.d.ts +0 -0
  130. /package/dist/{src/composables → composables}/usePartner.d.ts +0 -0
  131. /package/dist/{src/composables → composables}/usePreviewMode.d.ts +0 -0
  132. /package/dist/{src/composables → composables}/useProvideInject.d.ts +0 -0
  133. /package/dist/{src/composables → composables}/useRecommendation.d.ts +0 -0
  134. /package/dist/{src/composables → composables}/useResponsivePreview.d.ts +0 -0
  135. /package/dist/{src/composables → composables}/useSave.d.ts +0 -0
  136. /package/dist/{src/composables → composables}/useStripo.d.ts +0 -0
  137. /package/dist/{src/composables → composables}/useStripoEventHandler.d.ts +0 -0
  138. /package/dist/{src/composables → composables}/useToaster.d.ts +0 -0
  139. /package/dist/{src/composables → composables}/useTranslations.d.ts +0 -0
  140. /package/dist/{src/composables → composables}/useValidation.d.ts +0 -0
  141. /package/dist/{src/composables → composables}/useVersionHistoryApi.d.ts +0 -0
  142. /package/dist/{src/composables → composables}/validators/saveAsTemplate.d.ts +0 -0
  143. /package/dist/{src/config → config}/compiler/htmlCompilerRules.d.ts +0 -0
  144. /package/dist/{src/config → config}/compiler/outlookCompilerRules.d.ts +0 -0
  145. /package/dist/{src/config → config}/compiler/recommendationCompilerRules.d.ts +0 -0
  146. /package/dist/{src/config → config}/compiler/socialCompilerRules.d.ts +0 -0
  147. /package/dist/{src/config → config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
  148. /package/dist/{src/config → config}/migrator/checkboxMigrator.d.ts +0 -0
  149. /package/dist/{src/config → config}/migrator/couponBlockMigrator.d.ts +0 -0
  150. /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
  151. /package/dist/{src/enums → enums}/defaults.d.ts +0 -0
  152. /package/dist/{src/enums → enums}/displayConditions.d.ts +0 -0
  153. /package/dist/{src/enums → enums}/extensions/recommendationBlock.d.ts +0 -0
  154. /package/dist/{src/enums → enums}/html-validator.d.ts +0 -0
  155. /package/dist/{src/enums → enums}/onboarding.d.ts +0 -0
  156. /package/dist/{src/enums → enums}/preview.d.ts +0 -0
  157. /package/dist/{src/enums → enums}/recommendation.d.ts +0 -0
  158. /package/dist/{src/enums → enums}/toaster.d.ts +0 -0
  159. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/block.d.ts +0 -0
  160. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/control.d.ts +0 -0
  161. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/extension.d.ts +0 -0
  162. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/iconsRegistry.d.ts +0 -0
  163. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
  164. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/template.d.ts +0 -0
  165. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/block.d.ts +0 -0
  166. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
  167. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/iconsRegistry.d.ts +0 -0
  168. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
  169. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/template.d.ts +0 -0
  170. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/block.d.ts +0 -0
  171. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/control.d.ts +0 -0
  172. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/extension.d.ts +0 -0
  173. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/iconsRegistry.d.ts +0 -0
  174. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
  175. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/template.d.ts +0 -0
  176. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/block.d.ts +0 -0
  177. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/extension.d.ts +0 -0
  178. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/iconsRegistry.d.ts +0 -0
  179. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/settingsPanel.d.ts +0 -0
  180. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/template.d.ts +0 -0
  181. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/filterUtil.d.ts +0 -0
  182. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/block.d.ts +0 -0
  183. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
  184. /package/dist/{src/extensions/Blocks/Unsubscribe → extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
  185. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -0
  186. /package/dist/{src/extensions/Blocks/Unsubscribe → extensions/Blocks/_Boilerplate}/settingsPanel.d.ts +0 -0
  187. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
  188. /package/dist/{src/extensions → extensions}/Blocks/common-control.d.ts +0 -0
  189. /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
  190. /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content.d.ts +0 -0
  191. /package/dist/{src/extensions/Blocks/_Boilerplate → extensions/DynamicContent}/extension.d.ts +0 -0
  192. /package/dist/{src/library.d.ts → library.d.ts} +0 -0
  193. /package/dist/{src/main.d.ts → main.d.ts} +0 -0
  194. /package/dist/{src/mock → mock}/api/auth.d.ts +0 -0
  195. /package/dist/{src/mock → mock}/api/custom-fonts.d.ts +0 -0
  196. /package/dist/{src/mock → mock}/api/default-template.d.ts +0 -0
  197. /package/dist/{src/mock → mock}/api/recommendation.d.ts +0 -0
  198. /package/dist/{src/mock → mock}/api/template-library.d.ts +0 -0
  199. /package/dist/{src/mock → mock}/api/unsubscribe.d.ts +0 -0
  200. /package/dist/{src/mock → mock}/api/user-modal-state.d.ts +0 -0
  201. /package/dist/{src/mock → mock}/api/validator.d.ts +0 -0
  202. /package/dist/{src/mock → mock}/browser.d.ts +0 -0
  203. /package/dist/{src/mock → mock}/handlers.d.ts +0 -0
  204. /package/dist/{src/services → services}/onboardingApi.d.ts +0 -0
  205. /package/dist/{src/services → services}/recommendationApi.d.ts +0 -0
  206. /package/dist/{src/services → services}/stripoApi.d.ts +0 -0
  207. /package/dist/{src/services → services}/templateLibraryApi.d.ts +0 -0
  208. /package/dist/{src/stores → stores}/dynamic-content.d.ts +0 -0
  209. /package/dist/{src/stores → stores}/editor.d.ts +0 -0
  210. /package/dist/{src/stores → stores}/onboarding.d.ts +0 -0
  211. /package/dist/{src/stores → stores}/preview.d.ts +0 -0
  212. /package/dist/{src/stores → stores}/recommendation.d.ts +0 -0
  213. /package/dist/{src/stores → stores}/save-as-template.d.ts +0 -0
  214. /package/dist/{src/stores → stores}/toaster.d.ts +0 -0
  215. /package/dist/{src/stores → stores}/version-history.d.ts +0 -0
  216. /package/dist/{src/utils → utils}/arrayUtil.d.ts +0 -0
  217. /package/dist/{src/utils → utils}/base64.d.ts +0 -0
  218. /package/dist/{src/utils → utils}/dateUtil.d.ts +0 -0
  219. /package/dist/{src/utils → utils}/genericUtil.d.ts +0 -0
  220. /package/dist/{src/utils → utils}/htmlCompiler.d.ts +0 -0
  221. /package/dist/{src/utils → utils}/templatePreparation.d.ts +0 -0
  222. /package/dist/{src/utils → utils}/tooltipUtils.d.ts +0 -0
@@ -1,7 +1,4 @@
1
1
  import type { CompilerRule } from './html-compiler';
2
- type Extensions = {
3
- unsubscribe?: boolean;
4
- };
5
2
  type Features = {
6
3
  dynamicContent?: boolean;
7
4
  saveAsTemplate?: boolean;
@@ -19,14 +16,8 @@ export type GuidoConfig = {
19
16
  useHeader?: boolean;
20
17
  emailHeader: EmailHeader;
21
18
  partner?: Partner;
22
- extensions?: Extensions;
23
19
  features?: Features;
24
20
  };
25
- export type TemplateConfig = {
26
- preselectedDynamicContentList?: DynamicContent[];
27
- selectedUnsubscribePages?: number[];
28
- variationId?: string;
29
- };
30
21
  export type DynamicContent = {
31
22
  value: string;
32
23
  text: string;
@@ -1,4 +1,4 @@
1
- import type { DynamicContent, GuidoConfig, TemplateConfig } from '@@/Types/generic';
1
+ import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
2
2
  import type { SavedTemplateDetails } from '@@/Types/stripo';
3
3
  type __VLS_Props = {
4
4
  templateId: string;
@@ -9,9 +9,8 @@ type __VLS_Props = {
9
9
  username?: string;
10
10
  html?: string;
11
11
  css?: string;
12
+ preselectedDynamicContentList: DynamicContent[];
12
13
  guidoConfig: GuidoConfig;
13
- templateConfig?: TemplateConfig;
14
- traceId?: string;
15
14
  };
16
15
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
17
16
  dynamicContent: {
@@ -1,16 +1,16 @@
1
- import o from "./Guido.vue2.js";
1
+ import a from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
- var a = this, r = a._self._c, e = a._self._setupProxy;
6
- return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
5
+ var o = this, r = o._self._c, e = o._self._setupProxy;
6
+ return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
7
7
  }, s = [], d = /* @__PURE__ */ i(
8
- o,
8
+ a,
9
9
  t,
10
10
  s,
11
11
  !1,
12
12
  null,
13
- "5a4aa0bc"
13
+ "05d5e64c"
14
14
  );
15
15
  const l = d.exports;
16
16
  export {
@@ -1,23 +1,20 @@
1
- import { defineComponent as M, defineAsyncComponent as G, ref as R, computed as U, watch as z, onMounted as B, onUnmounted as K } from "vue";
2
- import { provideGuidoActions as O } 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 W } from "../config/migrator/index.js";
6
- import { DefaultMessageType as J, DefaultUsername as Q, DefaultGuidoConfig as V } from "../enums/defaults.js";
7
- import X from "./organisms/base/Toaster.vue.js";
8
- import Y from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
- import Z from "./organisms/header/HeaderWrapper.vue.js";
10
- import $ from "./organisms/LoadingWrapper.vue.js";
11
- import ee from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
- import oe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
- import { useStripoApi as te } from "../services/stripoApi.js";
14
- import { useConfigStore as ne } from "../stores/config.js";
15
- import { useDynamicContentStore as re } from "../stores/dynamic-content.js";
16
- import { useEditorStore as ie } from "../stores/editor.js";
17
- import { usePreviewStore as se } from "../stores/preview.js";
18
- import { useUnsubscribeStore as ae } from "../stores/unsubscribe.js";
19
- import ce from "../node_modules/lodash-es/merge.js";
20
- const Pe = /* @__PURE__ */ M({
1
+ import { defineComponent as F, defineAsyncComponent as E, ref as H, computed as G, watch as R, onMounted as U, onUnmounted as x } from "vue";
2
+ import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
3
+ import { usePartner as z } from "../composables/usePartner.js";
4
+ import { useStripo as B } from "../composables/useStripo.js";
5
+ import { migrate as I } from "../config/migrator/index.js";
6
+ import { DefaultUsername as K, DefaultMessageType as O, DefaultGuidoConfig as j } from "../enums/defaults.js";
7
+ import q from "./organisms/base/Toaster.vue.js";
8
+ import J from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
+ import Q from "./organisms/header/HeaderWrapper.vue.js";
10
+ import V from "./organisms/LoadingWrapper.vue.js";
11
+ import X from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
+ import { useStripoApi as Y } from "../services/stripoApi.js";
13
+ import { useDynamicContentStore as Z } from "../stores/dynamic-content.js";
14
+ import { useEditorStore as $ } from "../stores/editor.js";
15
+ import { usePreviewStore as ee } from "../stores/preview.js";
16
+ import oe from "../node_modules/lodash-es/merge.js";
17
+ const Ce = /* @__PURE__ */ F({
21
18
  __name: "Guido",
22
19
  props: {
23
20
  templateId: null,
@@ -28,109 +25,84 @@ const Pe = /* @__PURE__ */ M({
28
25
  username: null,
29
26
  html: null,
30
27
  css: null,
31
- guidoConfig: null,
32
- templateConfig: null,
33
- traceId: null
28
+ preselectedDynamicContentList: null,
29
+ guidoConfig: null
34
30
  },
35
31
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
36
- setup(F, { expose: L, emit: t }) {
37
- const p = F, k = G(
32
+ setup(P, { expose: L, emit: o }) {
33
+ const r = P, _ = E(
38
34
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
39
- ), x = G(
35
+ ), W = E(
40
36
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
41
- ), g = R(), c = re(), f = ae(), y = ne(), d = ie(), A = se(), i = U(() => d.hasChanges), { getPartnerName: w, getProductType: v, isTestPartner: N } = j(), S = () => {
37
+ ), l = H(), a = Z(), i = $(), k = ee(), t = G(() => i.hasChanges), s = r.preselectedDynamicContentList || [], { getPartnerName: p, getProductType: u, isTestPartner: A } = z(), g = () => {
42
38
  var e;
43
- return (e = g.value) == null ? void 0 : e.handleSave(!0);
39
+ return (e = l.value) == null ? void 0 : e.handleSave(!0);
44
40
  }, {
45
- templateId: n,
46
- userId: s,
47
- guidoConfig: C,
48
- templateConfig: o,
49
- html: a = "",
50
- css: b = "",
51
- partnerName: m = w(),
52
- productType: u = v(),
53
- messageType: h = J,
54
- username: D = Q,
55
- traceId: r
56
- } = p, l = (o == null ? void 0 : o.preselectedDynamicContentList) || [];
57
- d.templateId = n, window.GuidoConfig = ce(V, C), window.GuidoConfig.partner = {
58
- partnerName: m,
59
- productType: u,
60
- messageType: h
61
- }, r && (window.GuidoConfig.traceId = r), y.templateConfig = o;
62
- const { initPlugin: I } = q({
63
- emailId: n,
64
- userId: s,
65
- username: D,
66
- partnerName: m,
67
- productType: u,
68
- preselectedDynamicContentList: l,
41
+ templateId: c,
42
+ userId: f,
43
+ guidoConfig: y,
44
+ html: n = "",
45
+ css: v = "",
46
+ partnerName: d = p(),
47
+ productType: m = u(),
48
+ messageType: C = O,
49
+ username: h = K
50
+ } = r;
51
+ i.templateId = c, window.GuidoConfig = oe(j, y), window.GuidoConfig.partner = {
52
+ partnerName: d,
53
+ productType: m,
54
+ messageType: C
55
+ };
56
+ const { initPlugin: w } = B({
57
+ emailId: c,
58
+ userId: f,
59
+ username: h,
60
+ partnerName: d,
61
+ productType: m,
62
+ preselectedDynamicContentList: s,
69
63
  onReady: () => {
70
- console.debug("guido:ready"), t("ready");
64
+ console.debug("guido:ready"), o("ready");
71
65
  }
72
- }), { getDefaultTemplate: _ } = te(), H = U(() => {
66
+ }), { getDefaultTemplate: S } = Y(), N = G(() => {
73
67
  var e;
74
68
  return !((e = window.GuidoConfig) != null && e.useHeader);
75
69
  });
76
- O({
70
+ M({
77
71
  onBack: () => {
78
- console.debug("guido:back"), t("back");
72
+ console.debug("guido:back"), o("back");
79
73
  },
80
74
  onSaveStart: () => {
81
- console.debug("guido:save:start"), t("save:start");
75
+ console.debug("guido:save:start"), o("save:start");
82
76
  },
83
77
  onSaveComplete: (e) => {
84
- console.debug("guido:save:complete", e), t("save:complete", e);
78
+ console.debug("guido:save:complete", e), o("save:complete", e);
85
79
  }
86
80
  });
87
- const E = (e) => {
88
- console.debug("dynamic-content:close", e), c.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
89
- }, T = () => {
81
+ const D = (e) => {
82
+ console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
83
+ }, b = () => {
90
84
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
91
85
  };
92
- return z(() => i.value, () => {
93
- t("on-change", i.value);
94
- }), B(async () => {
86
+ return R(() => t.value, () => {
87
+ o("on-change", t.value);
88
+ }), U(async () => {
95
89
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
96
90
  try {
97
- f.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
98
91
  let e = {
99
- html: a && await W(a),
100
- css: b,
92
+ html: n && I(n),
93
+ css: v,
101
94
  forceRecreate: !0
102
95
  // TODO: It should be false for old templates. We will communicate with Stripo
103
96
  };
104
- e.html || (e = await _(), e.html = await W(e.html)), await I(e), c.selectedDynamicContentList = l;
97
+ e.html || (e = await S(), e.html = I(e.html)), await w(e), a.selectedDynamicContentList = s;
105
98
  } catch (e) {
106
- console.error("Failed to initialize Stripo editor:", e), window.Sentry && window.Sentry.captureException(e, {
107
- tags: {
108
- component: "guido-component",
109
- operation: "mount"
110
- },
111
- contexts: {
112
- guido: {
113
- templateId: n,
114
- userId: s,
115
- traceId: r
116
- }
117
- }
118
- }), window.FS && window.FS("event", "guido_mount_error", {
119
- // eslint-disable-next-line camelcase
120
- errorMessage_str: e instanceof Error ? e.message : String(e),
121
- // eslint-disable-next-line camelcase
122
- templateId_str: n,
123
- // eslint-disable-next-line camelcase
124
- userId_str: s,
125
- // eslint-disable-next-line camelcase
126
- traceId_str: r || ""
127
- });
99
+ console.error("Failed to initialize Stripo editor:", e);
128
100
  }
129
101
  document.addEventListener("dynamic-content:open", (e) => {
130
- const P = e;
131
- console.debug("dynamic-content:open", P.detail), t("dynamic-content:open", P.detail);
102
+ const T = e;
103
+ console.debug("dynamic-content:open", T.detail), o("dynamic-content:open", T.detail);
132
104
  });
133
- }), K(() => {
105
+ }), x(() => {
134
106
  try {
135
107
  window.UIEditor.removeEditor();
136
108
  } catch {
@@ -138,14 +110,14 @@ const Pe = /* @__PURE__ */ M({
138
110
  }
139
111
  }), L({
140
112
  dynamicContent: {
141
- insert: E,
142
- close: T
113
+ insert: D,
114
+ close: b
143
115
  },
144
- hasChanges: i,
145
- saveSilent: S
146
- }), { __sfc: !0, PreviewContainer: k, OnboardingWrapper: x, headerWrapperRef: g, dynamicContentStore: c, unsubscribeStore: f, props: p, configStore: y, editorStore: d, previewStore: A, hasChanges: i, getPartnerName: w, getProductType: v, isTestPartner: N, saveSilent: S, templateId: n, userId: s, guidoConfig: C, templateConfig: o, html: a, css: b, partnerName: m, productType: u, messageType: h, username: D, traceId: r, preselectedDynamicContentList: l, emit: t, initPlugin: I, getDefaultTemplate: _, noHeader: H, insertDynamicContent: E, closeDynamicContent: T, Toaster: X, FilterSelectionDrawer: Y, HeaderWrapper: Z, LoadingWrapper: $, SaveAsTemplateDrawer: ee, UnsubscribeWrapper: oe };
116
+ hasChanges: t,
117
+ saveSilent: g
118
+ }), { __sfc: !0, PreviewContainer: _, OnboardingWrapper: W, headerWrapperRef: l, dynamicContentStore: a, props: r, editorStore: i, previewStore: k, hasChanges: t, preselectedDynamicContentList: s, getPartnerName: p, getProductType: u, isTestPartner: A, saveSilent: g, templateId: c, userId: f, guidoConfig: y, html: n, css: v, partnerName: d, productType: m, messageType: C, username: h, emit: o, initPlugin: w, getDefaultTemplate: S, noHeader: N, insertDynamicContent: D, closeDynamicContent: b, Toaster: q, FilterSelectionDrawer: J, HeaderWrapper: Q, LoadingWrapper: V, SaveAsTemplateDrawer: X };
147
119
  }
148
120
  });
149
121
  export {
150
- Pe as default
122
+ Ce as default
151
123
  };
@@ -2,7 +2,7 @@ import type { FooterButtonGroupOptions } from '@@/Types/wrappers/wp-drawer';
2
2
  interface Props {
3
3
  id: string;
4
4
  className?: string;
5
- size?: 'small' | 'medium' | 'large';
5
+ size?: string;
6
6
  closeOnOutsideClick?: boolean;
7
7
  descriptionStatus?: boolean;
8
8
  descriptionText?: string;
@@ -10,11 +10,9 @@ interface Props {
10
10
  status: boolean;
11
11
  titleText: string;
12
12
  }
13
- declare var __VLS_12: {}, __VLS_14: {};
13
+ declare var __VLS_12: {};
14
14
  type __VLS_Slots = {} & {
15
- headerBottomSlot?: (props: typeof __VLS_12) => any;
16
- } & {
17
- default?: (props: typeof __VLS_14) => any;
15
+ default?: (props: typeof __VLS_12) => any;
18
16
  };
19
17
  declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
20
18
  className: string;
@@ -34,7 +32,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
34
32
  descriptionText: string;
35
33
  }>>>, {
36
34
  className: string;
37
- size: "small" | "medium" | "large";
35
+ size: string;
38
36
  closeOnOutsideClick: boolean;
39
37
  descriptionStatus: boolean;
40
38
  descriptionText: string;
@@ -1,6 +1,6 @@
1
1
  import r from "./WpDrawer.vue2.js";
2
2
  import s from "../../_virtual/_plugin-vue2_normalizer.js";
3
- var u = function() {
3
+ var i = function() {
4
4
  var t = this, n = t._self._c, e = t._self._setupProxy;
5
5
  return n(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(o) {
6
6
  return e.emit("cancelOrBackButtonEvent");
@@ -8,15 +8,13 @@ var u = function() {
8
8
  return e.emit("onCloseEvent");
9
9
  }, primaryButtonEvent: function(o) {
10
10
  return e.emit("primaryButtonEvent");
11
- } }, scopedSlots: t._u([t.$slots.headerBottomSlot ? { key: "headerBottomSlot", fn: function() {
12
- return [t._t("headerBottomSlot")];
13
- }, proxy: !0 } : null, { key: "contentSlot", fn: function() {
11
+ } }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
14
12
  return [n("div", [t._t("default")], 2)];
15
13
  }, proxy: !0 }], null, !0) });
16
- }, i = [], c = /* @__PURE__ */ s(
14
+ }, u = [], c = /* @__PURE__ */ s(
17
15
  r,
18
- u,
19
16
  i,
17
+ u,
20
18
  !1,
21
19
  null,
22
20
  null
@@ -1,123 +1,86 @@
1
- import { getCsrfToken as S } from "../utils/genericUtil.js";
2
- import { ref as h, computed as w } from "vue";
3
- let b;
4
- const g = async () => {
5
- if (!b)
6
- try {
7
- const { useApiErrorTracking: E } = await import("./useApiErrorTracking.js");
8
- b = E();
9
- } catch {
10
- }
11
- return b;
12
- }, M = (E = {}) => {
13
- const d = h(!1), i = h(null), l = h(null), P = w(() => d.value), k = w(() => i.value !== null), v = {
1
+ import { getCsrfToken as H } from "../utils/genericUtil.js";
2
+ import { ref as p, computed as T } from "vue";
3
+ const k = (b = {}) => {
4
+ const h = p(!1), a = p(null), u = p(null), g = T(() => h.value), y = T(() => a.value !== null), v = {
14
5
  baseURL: "",
15
6
  timeout: 1e4,
16
7
  retry: 0,
17
8
  retryDelay: 1e3,
18
9
  headers: {
19
10
  "Content-Type": "application/json",
20
- "X-CSRF-TOKEN": S()
11
+ "X-CSRF-TOKEN": H()
21
12
  },
22
- ...E
23
- }, C = (t, s) => {
24
- if (t.startsWith("http://") || t.startsWith("https://"))
25
- return t;
26
- const e = s || v.baseURL || "";
27
- return e.endsWith("/") && t.startsWith("/") ? `${e}${t.slice(1)}` : e.endsWith("/") || t.startsWith("/") ? `${e}${t}` : `${e}/${t}`;
28
- }, A = (t) => new Promise((s, e) => {
13
+ ...b
14
+ }, w = (e, s) => {
15
+ if (e.startsWith("http://") || e.startsWith("https://"))
16
+ return e;
17
+ const t = s || v.baseURL || "";
18
+ return t.endsWith("/") && e.startsWith("/") ? `${t}${e.slice(1)}` : t.endsWith("/") || e.startsWith("/") ? `${t}${e}` : `${t}/${e}`;
19
+ }, P = (e) => new Promise((s, t) => {
29
20
  setTimeout(() => {
30
- e(new Error("Request timeout"));
31
- }, t);
32
- }), $ = (t) => new Promise((s) => {
33
- setTimeout(() => {
34
- s();
35
- }, t);
36
- }), c = async (t, s, e, L = {}) => {
37
- i.value = null, d.value = !0, l.value = new AbortController();
38
- const n = { ...v, ...L }, T = C(s, n.baseURL), m = {
39
- method: t,
21
+ t(new Error("Request timeout"));
22
+ }, e);
23
+ }), x = (e) => new Promise((s) => {
24
+ setTimeout(s, e);
25
+ }), i = async (e, s, t, D = {}) => {
26
+ a.value = null, h.value = !0, u.value = new AbortController();
27
+ const n = { ...v, ...D }, L = w(s, n.baseURL), c = {
28
+ method: e,
40
29
  headers: { ...n.headers },
41
- signal: l.value.signal,
30
+ signal: u.value.signal,
42
31
  ...n
43
32
  };
44
- e && ["POST", "PUT", "PATCH"].includes(t) && (e instanceof FormData ? (delete m.headers["Content-Type"], m.body = e) : m.body = JSON.stringify(e));
45
- const y = async (f = 0) => {
33
+ t && ["POST", "PUT", "PATCH"].includes(e) && (t instanceof FormData ? (delete c.headers["Content-Type"], c.body = t) : c.body = JSON.stringify(t));
34
+ const E = async (m = 0) => {
46
35
  try {
47
- const o = [fetch(T, m)];
48
- n.timeout && o.push(A(n.timeout));
36
+ const o = [fetch(L, c)];
37
+ n.timeout && o.push(P(n.timeout));
49
38
  const r = await Promise.race(o);
50
39
  if (!r.ok) {
51
- const O = `HTTP Error: ${r.status} ${r.statusText}`, p = new Error(O);
52
- p.status = r.status, p.statusText = r.statusText, p.response = r;
53
- const x = await g();
54
- throw x && x.captureHttpError(p, T, {
55
- method: t,
56
- statusCode: r.status,
57
- statusText: r.statusText
58
- }), p;
40
+ const O = `HTTP Error: ${r.status} ${r.statusText}`, d = new Error(O);
41
+ throw d.status = r.status, d.statusText = r.statusText, d.response = r, d;
59
42
  }
60
- let a;
61
- const u = r.headers.get("content-type");
62
- return u != null && u.includes("application/json") ? a = await r.json() : u != null && u.includes("text/") ? a = await r.text() : a = await r.blob(), {
63
- data: a,
43
+ let f;
44
+ const l = r.headers.get("content-type");
45
+ return l != null && l.includes("application/json") ? f = await r.json() : l != null && l.includes("text/") ? f = await r.text() : f = await r.blob(), {
46
+ data: f,
64
47
  status: r.status,
65
48
  statusText: r.statusText,
66
49
  headers: r.headers
67
50
  };
68
51
  } catch (o) {
69
52
  const r = o instanceof Error && o.name === "AbortError";
70
- if (f < (n.retry || 0) && !r)
71
- return await $(n.retryDelay || 1e3), y(f + 1);
72
- if (o instanceof Error)
73
- if (o.name === "AbortError")
74
- i.value = { message: "Request was cancelled" };
75
- else {
76
- i.value = { message: o.message };
77
- const a = await g();
78
- a && a.captureNetworkError(o, T, {
79
- method: t,
80
- attemptNumber: f + 1,
81
- timeoutMs: n.timeout
82
- });
83
- }
84
- else {
85
- i.value = o;
86
- const a = await g();
87
- a && o instanceof Error && a.captureNetworkError(o, T, {
88
- method: t,
89
- attemptNumber: f + 1
90
- });
91
- }
92
- throw o;
53
+ if (m < (n.retry || 0) && !r)
54
+ return await x(n.retryDelay || 1e3), E(m + 1);
55
+ throw o instanceof Error ? o.name === "AbortError" ? a.value = { message: "Request was cancelled" } : a.value = { message: o.message } : a.value = o, o;
93
56
  }
94
57
  };
95
58
  try {
96
- return await y();
59
+ return await E();
97
60
  } finally {
98
- d.value = !1, l.value = null;
61
+ h.value = !1, u.value = null;
99
62
  }
100
- }, R = (t, s) => c("GET", t, void 0, s), U = (t, s, e) => c("POST", t, s, e), N = (t, s, e) => c("PUT", t, s, e), W = (t, s, e) => c("PATCH", t, s, e), q = (t, s) => c("DELETE", t, void 0, s), D = (t) => {
101
- l.value && l.value.abort(t);
102
- }, H = () => {
103
- i.value = null;
63
+ }, C = (e, s) => i("GET", e, void 0, s), $ = (e, s, t) => i("POST", e, s, t), R = (e, s, t) => i("PUT", e, s, t), U = (e, s, t) => i("PATCH", e, s, t), A = (e, s) => i("DELETE", e, void 0, s), W = (e) => {
64
+ u.value && u.value.abort(e);
65
+ }, q = () => {
66
+ a.value = null;
104
67
  };
105
68
  return {
106
69
  // State
107
- loading: P,
108
- error: w(() => i.value),
109
- hasError: k,
70
+ loading: g,
71
+ error: T(() => a.value),
72
+ hasError: y,
110
73
  // Methods
111
- request: c,
112
- get: R,
113
- post: U,
114
- put: N,
115
- patch: W,
116
- delete: q,
117
- cancel: D,
118
- clearError: H
74
+ request: i,
75
+ get: C,
76
+ post: $,
77
+ put: R,
78
+ patch: U,
79
+ delete: A,
80
+ cancel: W,
81
+ clearError: q
119
82
  };
120
83
  };
121
84
  export {
122
- M as useHttp
85
+ k as useHttp
123
86
  };