@useinsider/guido 1.0.3-beta.d6f4719 → 1.0.3-beta.d8a9e56

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 (236) hide show
  1. package/README.md +0 -126
  2. package/dist/{src/@types → @types}/generic.d.ts +0 -20
  3. package/dist/{src/components → components}/Guido.vue.d.ts +2 -2
  4. package/dist/components/Guido.vue.js +7 -7
  5. package/dist/components/Guido.vue2.js +68 -74
  6. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  7. package/dist/components/organisms/header/LeftSlot.vue2.js +15 -16
  8. package/dist/components/organisms/header/RightSlot.vue.js +5 -5
  9. package/dist/components/organisms/header/RightSlot.vue2.js +19 -20
  10. package/dist/{src/components → components}/wrappers/WpDrawer.vue.d.ts +4 -6
  11. package/dist/components/wrappers/WpDrawer.vue.js +4 -6
  12. package/dist/{src/composables → composables}/usePartner.d.ts +0 -1
  13. package/dist/composables/usePartner.js +5 -9
  14. package/dist/composables/useStripo.js +42 -40
  15. package/dist/config/compiler/unsubscribeCompilerRules.js +29 -42
  16. package/dist/config/migrator/index.d.ts +1 -0
  17. package/dist/config/migrator/index.js +6 -7
  18. package/dist/enums/defaults.js +7 -15
  19. package/dist/enums/unsubscribe.d.ts +15 -0
  20. package/dist/enums/unsubscribe.js +6 -43
  21. package/dist/extensions/Blocks/Checkbox/control.js +53 -55
  22. package/dist/extensions/Blocks/RadioButton/control.js +42 -44
  23. package/dist/extensions/Blocks/RadioButton/template.js +6 -6
  24. package/dist/guido.css +1 -1
  25. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +71 -83
  26. package/dist/{src/stores → stores}/editor.d.ts +0 -21
  27. package/dist/stores/editor.js +1 -2
  28. package/dist/stores/unsubscribe.d.ts +8 -0
  29. package/dist/stores/unsubscribe.js +6 -126
  30. package/dist/{src/utils → utils}/genericUtil.d.ts +0 -1
  31. package/dist/utils/genericUtil.js +7 -8
  32. package/dist/utils/templatePreparation.js +16 -17
  33. package/package.json +2 -7
  34. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +0 -28
  35. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +0 -38
  36. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +0 -17
  37. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +0 -37
  38. package/dist/components/organisms/extensions/recommendation/Filters.vue.js +0 -20
  39. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +0 -44
  40. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +0 -17
  41. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +0 -27
  42. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +0 -18
  43. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +0 -16
  44. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +0 -24
  45. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +0 -64
  46. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +0 -18
  47. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +0 -107
  48. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +0 -18
  49. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +0 -12
  50. package/dist/composables/useBlocksConfig.js +0 -58
  51. package/dist/config/migrator/unsubscribeMigrator.js +0 -124
  52. package/dist/enums/extensions/recommendationBlock.js +0 -80
  53. package/dist/extensions/Blocks/Recommendation/block.js +0 -27
  54. package/dist/extensions/Blocks/Recommendation/control.js +0 -277
  55. package/dist/extensions/Blocks/Recommendation/extension.js +0 -10
  56. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +0 -51
  57. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +0 -19
  58. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +0 -32
  59. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +0 -266
  60. package/dist/extensions/Blocks/Recommendation/template.js +0 -200
  61. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +0 -28
  62. package/dist/extensions/Blocks/Unsubscribe/block.js +0 -131
  63. package/dist/extensions/Blocks/Unsubscribe/control.js +0 -167
  64. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +0 -42
  65. package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -21
  66. package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +0 -21
  67. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +0 -35
  68. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +0 -42
  69. package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +0 -10
  70. package/dist/extensions/Blocks/Unsubscribe/template.js +0 -22
  71. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +0 -11
  72. package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +0 -6
  73. package/dist/extensions/Blocks/common-control.js +0 -102
  74. package/dist/package.json.js +0 -7
  75. package/dist/services/recommendationApi.js +0 -43
  76. package/dist/services/unsubscribeApi.js +0 -16
  77. package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -19
  78. package/dist/src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -2
  79. package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +0 -2
  80. package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -16
  81. package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -2
  82. package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -2
  83. package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -2
  84. package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -2
  85. package/dist/src/composables/useBlocksConfig.d.ts +0 -11
  86. package/dist/src/config/migrator/index.d.ts +0 -1
  87. package/dist/src/config/migrator/unsubscribeMigrator.d.ts +0 -1
  88. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -16
  89. package/dist/src/enums/unsubscribe.d.ts +0 -38
  90. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -10
  91. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -29
  92. package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +0 -4
  93. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -555
  94. package/dist/src/extensions/Blocks/Recommendation/template.d.ts +0 -6
  95. package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +0 -7
  96. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +0 -32
  97. package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +0 -29
  98. package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +0 -11
  99. package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -4
  100. package/dist/src/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +0 -4
  101. package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +0 -4
  102. package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +0 -12
  103. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +0 -9
  104. package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +0 -7
  105. package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +0 -2
  106. package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
  107. package/dist/src/extensions/Blocks/common-control.d.ts +0 -66
  108. package/dist/src/extensions/DynamicContent/extension.d.ts +0 -2
  109. package/dist/src/mock/api/recommendation.d.ts +0 -2
  110. package/dist/src/services/recommendationApi.d.ts +0 -6
  111. package/dist/src/services/unsubscribeApi.d.ts +0 -4
  112. package/dist/src/stores/config.d.ts +0 -100
  113. package/dist/src/stores/unsubscribe.d.ts +0 -256
  114. package/dist/stores/config.js +0 -17
  115. package/dist/{src/@types → @types}/events.d.ts +0 -0
  116. package/dist/{src/@types → @types}/save-as-template.d.ts +0 -0
  117. package/dist/{src/App.vue.d.ts → App.vue.d.ts} +0 -0
  118. package/dist/{src/components → components}/organisms/LoadingWrapper.vue.d.ts +0 -0
  119. package/dist/{src/components → components}/organisms/base/Toaster.vue.d.ts +0 -0
  120. package/dist/{src/components → components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
  121. package/dist/{src/components → components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
  122. package/dist/{src/components → components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
  123. package/dist/{src/components → components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
  124. package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
  125. package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
  126. package/dist/{src/components → components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
  127. package/dist/{src/components → components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
  128. package/dist/{src/components → components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
  129. package/dist/{src/components → components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
  130. package/dist/{src/components → components}/organisms/header/LeftSlot.vue.d.ts +0 -0
  131. package/dist/{src/components → components}/organisms/header/MiddleSlot.vue.d.ts +0 -0
  132. package/dist/{src/components → components}/organisms/header/RightSlot.vue.d.ts +0 -0
  133. package/dist/{src/components → components}/organisms/header/ViewOptions.vue.d.ts +0 -0
  134. package/dist/{src/components → components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
  135. package/dist/{src/components → components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
  136. package/dist/{src/components → components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
  137. package/dist/{src/components → components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
  138. package/dist/{src/components → components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
  139. package/dist/{src/components → components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
  140. package/dist/{src/components → components}/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -0
  141. package/dist/{src/components → components}/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -0
  142. package/dist/{src/components → components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
  143. package/dist/{src/components → components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
  144. package/dist/{src/components → components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
  145. package/dist/{src/components → components}/wrappers/WpModal.vue.d.ts +1 -1
  146. /package/dist/{src/composables → composables}/useActionsApi.d.ts +0 -0
  147. /package/dist/{src/composables → composables}/useApiExample.d.ts +0 -0
  148. /package/dist/{src/composables → composables}/useCodeEditorApi.d.ts +0 -0
  149. /package/dist/{src/composables → composables}/useConfig.d.ts +0 -0
  150. /package/dist/{src/composables → composables}/useCustomInterfaceAppearance.d.ts +0 -0
  151. /package/dist/{src/composables → composables}/useDebounce.d.ts +0 -0
  152. /package/dist/{src/composables → composables}/useExport.d.ts +0 -0
  153. /package/dist/{src/composables → composables}/useGuidoActions.d.ts +0 -0
  154. /package/dist/{src/composables → composables}/useHtmlCompiler.d.ts +0 -0
  155. /package/dist/{src/composables → composables}/useHtmlValidator.d.ts +0 -0
  156. /package/dist/{src/composables → composables}/useHttp.d.ts +0 -0
  157. /package/dist/{src/composables → composables}/usePreviewMode.d.ts +0 -0
  158. /package/dist/{src/composables → composables}/useProvideInject.d.ts +0 -0
  159. /package/dist/{src/composables → composables}/useRecommendation.d.ts +0 -0
  160. /package/dist/{src/composables → composables}/useResponsivePreview.d.ts +0 -0
  161. /package/dist/{src/composables → composables}/useSave.d.ts +0 -0
  162. /package/dist/{src/composables → composables}/useStripo.d.ts +0 -0
  163. /package/dist/{src/composables → composables}/useStripoEventHandler.d.ts +0 -0
  164. /package/dist/{src/composables → composables}/useToaster.d.ts +0 -0
  165. /package/dist/{src/composables → composables}/useTranslations.d.ts +0 -0
  166. /package/dist/{src/composables → composables}/useValidation.d.ts +0 -0
  167. /package/dist/{src/composables → composables}/useVersionHistoryApi.d.ts +0 -0
  168. /package/dist/{src/composables → composables}/validators/saveAsTemplate.d.ts +0 -0
  169. /package/dist/{src/config → config}/compiler/htmlCompilerRules.d.ts +0 -0
  170. /package/dist/{src/config → config}/compiler/outlookCompilerRules.d.ts +0 -0
  171. /package/dist/{src/config → config}/compiler/recommendationCompilerRules.d.ts +0 -0
  172. /package/dist/{src/config → config}/compiler/socialCompilerRules.d.ts +0 -0
  173. /package/dist/{src/config → config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
  174. /package/dist/{src/config → config}/migrator/checkboxMigrator.d.ts +0 -0
  175. /package/dist/{src/config → config}/migrator/couponBlockMigrator.d.ts +0 -0
  176. /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
  177. /package/dist/{src/enums → enums}/defaults.d.ts +0 -0
  178. /package/dist/{src/enums → enums}/displayConditions.d.ts +0 -0
  179. /package/dist/{src/enums → enums}/html-validator.d.ts +0 -0
  180. /package/dist/{src/enums → enums}/onboarding.d.ts +0 -0
  181. /package/dist/{src/enums → enums}/preview.d.ts +0 -0
  182. /package/dist/{src/enums → enums}/recommendation.d.ts +0 -0
  183. /package/dist/{src/enums → enums}/toaster.d.ts +0 -0
  184. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/block.d.ts +0 -0
  185. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/control.d.ts +0 -0
  186. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/extension.d.ts +0 -0
  187. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/iconsRegistry.d.ts +0 -0
  188. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
  189. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/template.d.ts +0 -0
  190. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/block.d.ts +0 -0
  191. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
  192. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/iconsRegistry.d.ts +0 -0
  193. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
  194. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/template.d.ts +0 -0
  195. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/block.d.ts +0 -0
  196. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/control.d.ts +0 -0
  197. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/extension.d.ts +0 -0
  198. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/iconsRegistry.d.ts +0 -0
  199. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
  200. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/template.d.ts +0 -0
  201. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/block.d.ts +0 -0
  202. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
  203. /package/dist/{src/extensions/Blocks/Recommendation → extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
  204. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -0
  205. /package/dist/{src/extensions/Blocks/Recommendation → extensions/Blocks/_Boilerplate}/settingsPanel.d.ts +0 -0
  206. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
  207. /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
  208. /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content.d.ts +0 -0
  209. /package/dist/{src/extensions/Blocks/Unsubscribe → extensions/DynamicContent}/extension.d.ts +0 -0
  210. /package/dist/{src/library.d.ts → library.d.ts} +0 -0
  211. /package/dist/{src/main.d.ts → main.d.ts} +0 -0
  212. /package/dist/{src/mock → mock}/api/auth.d.ts +0 -0
  213. /package/dist/{src/mock → mock}/api/custom-fonts.d.ts +0 -0
  214. /package/dist/{src/mock → mock}/api/default-template.d.ts +0 -0
  215. /package/dist/{src/mock → mock}/api/template-library.d.ts +0 -0
  216. /package/dist/{src/mock → mock}/api/unsubscribe.d.ts +0 -0
  217. /package/dist/{src/mock → mock}/api/user-modal-state.d.ts +0 -0
  218. /package/dist/{src/mock → mock}/api/validator.d.ts +0 -0
  219. /package/dist/{src/mock → mock}/browser.d.ts +0 -0
  220. /package/dist/{src/mock → mock}/handlers.d.ts +0 -0
  221. /package/dist/{src/services → services}/onboardingApi.d.ts +0 -0
  222. /package/dist/{src/services → services}/stripoApi.d.ts +0 -0
  223. /package/dist/{src/services → services}/templateLibraryApi.d.ts +0 -0
  224. /package/dist/{src/stores → stores}/dynamic-content.d.ts +0 -0
  225. /package/dist/{src/stores → stores}/onboarding.d.ts +0 -0
  226. /package/dist/{src/stores → stores}/preview.d.ts +0 -0
  227. /package/dist/{src/stores → stores}/recommendation.d.ts +0 -0
  228. /package/dist/{src/stores → stores}/save-as-template.d.ts +0 -0
  229. /package/dist/{src/stores → stores}/toaster.d.ts +0 -0
  230. /package/dist/{src/stores → stores}/version-history.d.ts +0 -0
  231. /package/dist/{src/utils → utils}/arrayUtil.d.ts +0 -0
  232. /package/dist/{src/utils → utils}/base64.d.ts +0 -0
  233. /package/dist/{src/utils → utils}/dateUtil.d.ts +0 -0
  234. /package/dist/{src/utils → utils}/htmlCompiler.d.ts +0 -0
  235. /package/dist/{src/utils → utils}/templatePreparation.d.ts +0 -0
  236. /package/dist/{src/utils → utils}/tooltipUtils.d.ts +0 -0
@@ -1,18 +0,0 @@
1
- import n from "./UnsubscribeTypeSelection.vue2.js";
2
- /* empty css */
3
- import o from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var i = function() {
5
- var e = this, s = e._self._c, t = e._self._setupProxy;
6
- return s(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.typeSelectionDrawerStatus, "title-text": t.trans("unsubscription-preference.select-unsubscribe-page-title") }, on: { cancelOrBackButtonEvent: t.closeModal, onCloseEvent: t.closeModal, primaryButtonEvent: t.selectCollection } }, [s(t.InSegments, { staticClass: "w-1", attrs: { "with-icon": "", align: "vertical", disable: t.isSelecting, "segment-list": t.segmentList, selected: t.selectedCollection, "skeleton-sizing": { width: 495, height: 180 }, "skeleton-status": t.skeletonStatus }, on: { click: t.changeCollection } })], 1);
7
- }, r = [], c = /* @__PURE__ */ o(
8
- n,
9
- i,
10
- r,
11
- !1,
12
- null,
13
- "dd57102d"
14
- );
15
- const d = c.exports;
16
- export {
17
- d as default
18
- };
@@ -1,107 +0,0 @@
1
- import { defineComponent as h, ref as b, computed as m, watch as _ } from "vue";
2
- import v from "../../wrappers/WpDrawer.vue.js";
3
- import { useToaster as B } from "../../../composables/useToaster.js";
4
- import { useTranslations as N } from "../../../composables/useTranslations.js";
5
- import { ToasterTypeOptions as U } from "../../../enums/toaster.js";
6
- import { PAGE_TYPES as l, ACADEMY_LINK as w, UNSUBSCRIBE_PAGES_LINK as P, TYPE_TRANSLATIONS as R } from "../../../enums/unsubscribe.js";
7
- import { useUnsubscribeStore as D } from "../../../stores/unsubscribe.js";
8
- import { InSegments as I } from "@useinsider/design-system-vue";
9
- const z = /* @__PURE__ */ h({
10
- __name: "UnsubscribeTypeSelection",
11
- setup(G) {
12
- const e = N(), { showToaster: f } = B(), t = D(), n = b(!1), i = b(!0), o = b(l.GLOBAL_UNSUBSCRIBE), S = e(
13
- "unsubscription-preference.select-unsubscribe-page-description",
14
- { action: `<a href="${w}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
15
- ), T = m(() => [
16
- {
17
- description: e("unsubscription-preference.type-global-unsubscribe-description"),
18
- icon: "line-contact-global-unsub-page",
19
- text: e("unsubscription-preference.type-global-unsubscribe"),
20
- value: l.GLOBAL_UNSUBSCRIBE,
21
- disable: t.isGlobalUnsubscribeDisabled,
22
- position: "bottom",
23
- tooltipText: t.isGlobalUnsubscribeDisabled ? e("unsubscription-preference.global-unsub-added") : ""
24
- },
25
- {
26
- description: e("unsubscription-preference.type-subscription-preferences-center-description"),
27
- icon: "line-contact-sub-pref-center-page",
28
- text: e("unsubscription-preference.type-subscription-preferences-center"),
29
- value: l.SUBSCRIPTION_PREFERENCE_CENTER,
30
- disable: t.isSubscriptionPreferencesCenterDisabled,
31
- tooltipText: t.isSubscriptionPreferencesCenterDisabled ? e("unsubscription-preference.pref-center-added") : ""
32
- }
33
- ]), y = m(() => ({
34
- primaryButton: {
35
- styling: "solid",
36
- type: "primary",
37
- labelText: e(
38
- n.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
39
- ),
40
- loadingStatus: n.value,
41
- disabledStatus: !1,
42
- skeletonStatus: i.value,
43
- skeletonSizing: { width: 168, height: 40 }
44
- },
45
- cancelOrBackButton: {
46
- styling: "ghost",
47
- type: "secondary",
48
- labelText: e("products.cancel"),
49
- disabledStatus: n.value,
50
- skeletonStatus: i.value,
51
- skeletonSizing: { width: 78, height: 40 }
52
- }
53
- })), d = (s) => {
54
- t.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel")), s && setTimeout(() => {
55
- s();
56
- }, 500);
57
- }, E = (s) => {
58
- o.value = s;
59
- }, g = () => {
60
- const s = t.hasTemplatesByCollectionType, r = [];
61
- if (Object.entries(s).forEach(([c, p]) => {
62
- p || r.push(Number(c));
63
- }), r.length === 0)
64
- return !0;
65
- const a = r.map((c) => R[c]);
66
- let u = "";
67
- if (r.length === 1)
68
- u = e("unsubscription-preference.create-page-to-continue", {
69
- page: a[0]
70
- });
71
- else if (r.length === 2)
72
- u = e("unsubscription-preference.create-pages-to-continue", {
73
- page1: a[0],
74
- page2: a[1]
75
- });
76
- else {
77
- const c = a.pop() ?? "", p = a.join(", ");
78
- u = e("unsubscription-preference.create-multiple-pages-to-continue", {
79
- pages: p,
80
- lastPage: c
81
- });
82
- }
83
- return f({
84
- type: U.Warning,
85
- message: u,
86
- actionButton: {
87
- text: "Go to Unsubscribe Pages",
88
- onClick: () => {
89
- window.location.href = P;
90
- }
91
- }
92
- }), !1;
93
- }, C = async () => {
94
- if (n.value = !0, await t.fetchTemplates(), t.setCollection(o.value), !g()) {
95
- n.value = !1, d();
96
- return;
97
- }
98
- n.value = !1, t.typeSelectionDrawerStatus = !1, t.pageSelectionDrawerStatus = !0;
99
- };
100
- return _(() => t.typeSelectionDrawerStatus, (s) => {
101
- s && (i.value = !0, o.value = l.GLOBAL_UNSUBSCRIBE, t.isGlobalUnsubscribeDisabled && (o.value = t.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), i.value = !1);
102
- }), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates: g, selectCollection: C, WpDrawer: v, InSegments: I };
103
- }
104
- });
105
- export {
106
- z as default
107
- };
@@ -1,18 +0,0 @@
1
- import o from "./UnsubscribeWrapper.vue2.js";
2
- import t from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var _ = function() {
4
- var s;
5
- var e = this, n = e._self._c, r = e._self._setupProxy;
6
- return (s = r.config.extensions) != null && s.unsubscribe ? n("div", [n(r.UnsubscribeTypeSelection), n(r.UnsubscribePageSelection)], 1) : e._e();
7
- }, c = [], i = /* @__PURE__ */ t(
8
- o,
9
- _,
10
- c,
11
- !1,
12
- null,
13
- null
14
- );
15
- const l = i.exports;
16
- export {
17
- l as default
18
- };
@@ -1,12 +0,0 @@
1
- import { defineComponent as t, defineAsyncComponent as e } from "vue";
2
- import { useConfig as r } from "../../../composables/useConfig.js";
3
- const m = /* @__PURE__ */ t({
4
- __name: "UnsubscribeWrapper",
5
- setup(i) {
6
- const n = e(() => import("./UnsubscribePageSelection.vue.js")), o = e(() => import("./UnsubscribeTypeSelection.vue.js")), { config: s } = r();
7
- return { __sfc: !0, UnsubscribePageSelection: n, UnsubscribeTypeSelection: o, config: s };
8
- }
9
- });
10
- export {
11
- m as default
12
- };
@@ -1,58 +0,0 @@
1
- import c from "../extensions/Blocks/Checkbox/extension.js";
2
- import r from "../extensions/Blocks/CouponBlock/extension.js";
3
- import i from "../extensions/Blocks/RadioButton/extension.js";
4
- import l from "../extensions/Blocks/Recommendation/extension.js";
5
- import s from "../extensions/Blocks/Unsubscribe/extension.js";
6
- import b from "../extensions/DynamicContent/extension.js";
7
- const a = {
8
- "amp-accordion": "ampAccordionEnabled",
9
- "amp-carousel": "ampCarouselEnabled",
10
- "amp-form-controls": "ampFormControlsEnabled",
11
- "banner-block": "bannerEnabled",
12
- "button-block": "buttonEnabled",
13
- "html-block": "htmlEnabled",
14
- "image-block": "imageEnabled",
15
- "menu-block": "menuEnabled",
16
- "social-block": "socialNetEnabled",
17
- "spacer-block": "spacerEnabled",
18
- "text-block": "textEnabled",
19
- "timer-block": "timerEnabled",
20
- "video-block": "videoEnabled"
21
- }, m = {
22
- "dynamic-content": b,
23
- "checkbox-block": c,
24
- "radio-button-block": i,
25
- "recommendation-block": l,
26
- "unsubscribe-block": s,
27
- "coupon-block": r,
28
- "items-block": null
29
- // TODO: Add ItemsBlock extension when available
30
- }, E = (n) => {
31
- if (!n || !n.length)
32
- return {};
33
- const o = {};
34
- return n.forEach((e) => {
35
- const t = a[e];
36
- t && (o[t] = !1);
37
- }), o;
38
- }, d = (n) => {
39
- if (!n || !n.length)
40
- return [];
41
- const o = [];
42
- return n.forEach((e) => {
43
- const t = m[e];
44
- t && o.push(t);
45
- }), o;
46
- }, C = () => ({
47
- getStripoBlocksConfig: () => {
48
- var e;
49
- const o = (e = window.GuidoConfig) == null ? void 0 : e.blocks;
50
- return {
51
- baseBlocks: E(o == null ? void 0 : o.excludeDefaults),
52
- extensions: d(o == null ? void 0 : o.includeCustoms)
53
- };
54
- }
55
- });
56
- export {
57
- C as useBlocksConfig
58
- };
@@ -1,124 +0,0 @@
1
- var h = Object.defineProperty;
2
- var x = (l, e, t) => e in l ? h(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
3
- var S = (l, e, t) => x(l, typeof e != "symbol" ? e + "" : e, t);
4
- import { MERGE_TAGS as k, PAGE_TYPES as p } from "../../enums/unsubscribe.js";
5
- import { DATA_ATTRIBUTES as A } from "../../extensions/Blocks/Unsubscribe/utils/constants.js";
6
- import { useUnsubscribeStore as T } from "../../stores/unsubscribe.js";
7
- class C {
8
- constructor() {
9
- S(this, "parser");
10
- this.parser = new DOMParser();
11
- }
12
- async migrate(e) {
13
- try {
14
- const t = this.parser.parseFromString(e, "text/html"), i = t.querySelectorAll("td.unsubscribe-block");
15
- if (!i.length)
16
- return e;
17
- const o = T();
18
- return await o.fetchTemplates(), i.forEach((r) => {
19
- const c = r.getAttribute("id"), g = this.extractPaddingClass(r), u = r.getAttribute("bgcolor") || "", n = this.extractUnsubscribeContent(r), s = this.getCollectionTypeFromMergeTag(n.linkHref), b = o.getSelectedUnsubscribePagesByCollection(s);
20
- console.debug("[UnsubscribeMigrator]", {
21
- mergeTag: n.linkHref,
22
- collectionType: s,
23
- pageIds: b,
24
- paddingClass: g,
25
- bgColor: u
26
- });
27
- const f = this.buildUnsubscribeBlock(
28
- n,
29
- s,
30
- b,
31
- g,
32
- u
33
- ), a = this.parser.parseFromString(
34
- `<table id="tempDoc"><tbody><tr>${f}</tr></tbody></table>`,
35
- "text/html"
36
- ).querySelector(".unsubscribe-block-v2");
37
- a && r.parentNode && (a.setAttribute("id", c || ""), r.parentNode.replaceChild(a, r));
38
- }), t.documentElement.outerHTML;
39
- } catch (t) {
40
- return console.error("UnsubscribeMigrator failed:", t), e;
41
- }
42
- }
43
- extractPaddingClass(e) {
44
- const i = (e.getAttribute("class") || "").match(/\bes-p\d+\b/);
45
- return i ? i[0] : "";
46
- }
47
- extractUnsubscribeContent(e) {
48
- var m;
49
- const t = e.querySelector("p");
50
- if (!t)
51
- return {
52
- textBefore: "You can ",
53
- linkText: "unsubscribe",
54
- linkHref: "{{ins-unsubscribe-link}}",
55
- linkStyle: "",
56
- textAfter: " from our emails, if you need to.",
57
- isBold: !1,
58
- isItalic: !1,
59
- align: "center",
60
- paragraphStyle: ""
61
- };
62
- const i = e.getAttribute("align") || t.getAttribute("align") || "center", o = t.getAttribute("style") || "", r = t.querySelector("a.unsubscribe-link") || t.querySelector('a[href*="unsubscribe"]');
63
- if (!r)
64
- return {
65
- textBefore: "You can ",
66
- linkText: "unsubscribe",
67
- linkHref: "{{ins-unsubscribe-link}}",
68
- linkStyle: "",
69
- textAfter: " from our emails, if you need to.",
70
- isBold: !1,
71
- isItalic: !1,
72
- align: i,
73
- paragraphStyle: o
74
- };
75
- const c = ((m = r.textContent) == null ? void 0 : m.trim()) || "unsubscribe", g = r.getAttribute("href") || "{{ins-unsubscribe-link}}", u = r.getAttribute("style") || "", n = t.textContent || "", s = n.indexOf(c), b = s >= 0 ? n.substring(0, s).trim() : "You can ", f = s >= 0 ? n.substring(s + c.length).trim() : " from our emails, if you need to.", d = !!t.querySelector("b, strong"), a = !!t.querySelector("i, em");
76
- return {
77
- textBefore: b,
78
- linkText: c,
79
- linkHref: this.normalizeUnsubscribeHref(g),
80
- linkStyle: u,
81
- textAfter: f,
82
- isBold: d,
83
- isItalic: a,
84
- align: i,
85
- paragraphStyle: o
86
- };
87
- }
88
- buildUnsubscribeBlock(e, t, i, o, r) {
89
- const c = e.linkStyle ? ` style="${e.linkStyle}"` : "", u = `<a ${`href="${e.linkHref}" class="unsubscribe-link" target="_blank" data-unsubscribe-link="true"`}${c}>${e.linkText}</a>`, n = [];
90
- e.textBefore && n.push(e.textBefore), n.push(u), e.textAfter && n.push(e.textAfter);
91
- let s = n.join(" ");
92
- e.isBold && e.isItalic ? s = `<strong path="1,0"><em path="1,0,0">${s}</em></strong>` : e.isBold ? s = `<strong path="1,0">${s}</strong>` : e.isItalic && (s = `<em path="1,0">${s}</em>`);
93
- const b = e.align ? ` align="${e.align}"` : "", f = r ? ` bgcolor="${r}"` : "", d = e.paragraphStyle ? ` style="${e.paragraphStyle}"` : "", a = i.length > 0 ? ` ${A.PAGE_LIST}="${i.join(",")}"` : "", m = ` ${A.PAGE_TYPE}="${t}"`, y = "esd-block-text unsubscribe-block-v2 esd-block-unsubscribe esd-unsubscribe-block esd-extension-block";
94
- return `
95
- <td
96
- data-migration="true"
97
- esd-extension-block-id="unsubscribe-block"
98
- class="${o ? `${y} ${o}` : y}"
99
- ${b}${f}${m}${a}
100
- >
101
- <p path="1"${d}>
102
- ${s}
103
- </p>
104
- </td>
105
- `;
106
- }
107
- getCollectionTypeFromMergeTag(e) {
108
- return e === k[p.SUBSCRIPTION_PREFERENCE_CENTER] ? p.SUBSCRIPTION_PREFERENCE_CENTER : e === k[p.GLOBAL_UNSUBSCRIBE] ? p.GLOBAL_UNSUBSCRIBE : p.GLOBAL_UNSUBSCRIBE;
109
- }
110
- normalizeUnsubscribeHref(e) {
111
- if (Object.values(k).includes(e))
112
- return e;
113
- const i = e.match(/{{ins-(?:global-)?(?:preferences-)?unsubscribe-link}}/);
114
- return i ? i[0] : e.includes("unsubscribe") || e.includes("unsub") ? (console.warn(
115
- `[UnsubscribeMigrator] Unrecognized unsubscribe href format: "${e}". Defaulting to {{ins-unsubscribe-link}}`
116
- ), "{{ins-unsubscribe-link}}") : e;
117
- }
118
- }
119
- async function M(l) {
120
- return new C().migrate(l);
121
- }
122
- export {
123
- M as migrateUnsubscribe
124
- };
@@ -1,80 +0,0 @@
1
- const s = {
2
- RECOMMENDATION_API_URL: "http://recommendationv2.api.useinsider.com"
3
- }, i = [
4
- { id: 11, key: "similarViewed", name: "Viewed Together", path: "viewed-together" },
5
- { id: 12, key: "similarBought", name: "Purchased Together", path: "purchased-together" },
6
- { id: 13, key: "userBased", name: "User Based", path: "user-based" },
7
- { id: 36, key: "highestDiscounted", name: "Highest Discounted Items", path: "highest-discounted" },
8
- { id: 38, key: "manualMerchandising", name: "Manual Merchandising", path: "manual-merchandising" },
9
- { id: 39, key: "newArrivals", name: "New Arrivals", path: "new-arrivals" },
10
- { id: 40, key: "trendingProducts", name: "Trending Products", path: "trending" },
11
- { id: 46, key: "mostValuableOfPartner", name: "Most Valuable Products", path: "most-valuable" },
12
- { id: 61, key: "mostPopular", name: "Most Popular Items", path: "most-popular" },
13
- { id: 62, key: "mostPurchased", name: "Top Sellers", path: "top-sellers" }
14
- ], u = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], l = [
15
- { text: "after the amount", value: "1" },
16
- { text: "before the amount", value: "0" }
17
- ], c = [
18
- { text: "dot(.)", value: "." },
19
- { text: "comma(,)", value: "," }
20
- ], d = [
21
- { text: "0", value: "0" },
22
- { text: "1", value: "1" },
23
- { text: "2", value: "2" },
24
- { text: "3", value: "3" },
25
- { text: "4", value: "4" },
26
- { text: "5", value: "5" }
27
- ], e = [
28
- { text: "is exactly", value: "=" },
29
- { text: "contains", value: "~" },
30
- { text: "does not contain", value: "!~" },
31
- { text: "any of", value: "||" }
32
- ], a = [
33
- { text: "is exactly", value: "=" },
34
- { text: "is not exactly", value: "!==" },
35
- { text: "contains", value: "~" },
36
- { text: "does not contain", value: "!~" },
37
- { text: "any of", value: "||" }
38
- ], r = [
39
- { text: "is equal to", value: "=" },
40
- { text: "is greater than", value: ">" },
41
- { text: "is less than", value: "<" }
42
- ], o = [
43
- { text: "is equal to", value: "=" },
44
- { text: "after", value: ">" },
45
- { text: "before", value: "<" }
46
- ], n = [
47
- { text: "true", value: "==" },
48
- { text: "false", value: "!=" }
49
- ], p = (t) => {
50
- if (!t)
51
- return e;
52
- switch (t) {
53
- case "Boolean":
54
- return n;
55
- case "Date":
56
- return o;
57
- case "Number":
58
- return r;
59
- case "String":
60
- return e;
61
- case "Strings":
62
- return a;
63
- default:
64
- return e;
65
- }
66
- };
67
- export {
68
- u as PriceAttributes,
69
- i as RecommendationFeedSourceMaps,
70
- s as URLS,
71
- d as currencyDecimalCounts,
72
- l as currencyLocationMaps,
73
- c as currencyOperators,
74
- p as getOperatorOptions,
75
- a as operatorOptionsForArrayOfStrings,
76
- n as operatorOptionsForBooleans,
77
- o as operatorOptionsForDates,
78
- r as operatorOptionsForNumbers,
79
- e as operatorOptionsForStrings
80
- };
@@ -1,27 +0,0 @@
1
- import { Block as e, BlockCompositionType as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { getDefaultTemplate as o } from "./template.js";
3
- const n = "recommendation-block";
4
- class c extends e {
5
- getId() {
6
- return n;
7
- }
8
- getIcon() {
9
- return "recommendation-icon";
10
- }
11
- getBlockCompositionType() {
12
- return t.CONTAINER;
13
- }
14
- getName() {
15
- return this.api.translate("Recommendation Block");
16
- }
17
- getDescription() {
18
- return this.api.translate("Recommendation Block Title Description");
19
- }
20
- getTemplate() {
21
- return o();
22
- }
23
- }
24
- export {
25
- n as BLOCK_ID,
26
- c as RecommendationBlock
27
- };