@useinsider/guido 1.0.2-beta.ad1dcd9 → 1.0.2-beta.b3c5fc9

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 (250) hide show
  1. package/README.md +2 -44
  2. package/dist/@types/events.d.ts +0 -6
  3. package/dist/@types/generic.d.ts +0 -13
  4. package/dist/_virtual/AddCustomFont.js +4 -0
  5. package/dist/_virtual/AiAssistantValueType.js +4 -0
  6. package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
  7. package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
  8. package/dist/_virtual/Block.js +4 -0
  9. package/dist/_virtual/BlockAttributes.js +4 -0
  10. package/dist/_virtual/BlockCompositionType.js +4 -0
  11. package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
  12. package/dist/_virtual/BlockRenderer.js +4 -0
  13. package/dist/_virtual/BlockType.js +4 -0
  14. package/dist/_virtual/BlocksPanel.js +4 -0
  15. package/dist/_virtual/BuiltInControl.js +4 -0
  16. package/dist/_virtual/BuiltInControlTypes.js +4 -0
  17. package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
  18. package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
  19. package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
  20. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
  21. package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
  22. package/dist/_virtual/ContextAction.js +4 -0
  23. package/dist/_virtual/ContextActionType.js +4 -0
  24. package/dist/_virtual/Control.js +4 -0
  25. package/dist/_virtual/EditorStatePropertyType.js +4 -0
  26. package/dist/_virtual/Extension.js +4 -0
  27. package/dist/_virtual/ExtensionBuilder.js +4 -0
  28. package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
  29. package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
  30. package/dist/_virtual/ModificationDescription.js +4 -0
  31. package/dist/_virtual/PanelPosition.js +4 -0
  32. package/dist/_virtual/PreviewDeviceMode.js +4 -0
  33. package/dist/_virtual/SettingsPanelRegistry.js +4 -0
  34. package/dist/_virtual/SettingsPanelTab.js +4 -0
  35. package/dist/_virtual/SettingsTab.js +4 -0
  36. package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
  37. package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
  38. package/dist/_virtual/TextColorBuiltInControl.js +4 -0
  39. package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
  40. package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
  41. package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
  42. package/dist/_virtual/UIElement.js +4 -0
  43. package/dist/_virtual/UIElementTagRegistry.js +4 -0
  44. package/dist/_virtual/UIElementType.js +4 -0
  45. package/dist/_virtual/UIElementsAttributes.js +4 -0
  46. package/dist/_virtual/index.js +5 -0
  47. package/dist/_virtual/index2.js +4 -0
  48. package/dist/components/Guido.vue.d.ts +2 -5
  49. package/dist/components/Guido.vue.js +10 -10
  50. package/dist/components/Guido.vue2.js +61 -85
  51. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +12 -12
  52. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +8 -7
  53. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -3
  54. package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
  55. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  56. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -15
  57. package/dist/components/organisms/header/LeftSlot.vue.js +9 -10
  58. package/dist/components/organisms/header/MiddleSlot.vue.js +6 -6
  59. package/dist/components/organisms/header/MiddleSlot.vue2.js +16 -15
  60. package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -3
  61. package/dist/components/organisms/header/RightSlot.vue.js +4 -6
  62. package/dist/components/organisms/header/RightSlot.vue2.js +28 -26
  63. package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
  64. package/dist/components/organisms/header/ViewOptions.vue2.js +15 -14
  65. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
  66. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
  67. package/dist/components/wrappers/WpDrawer.vue.d.ts +4 -6
  68. package/dist/components/wrappers/WpDrawer.vue.js +4 -6
  69. package/dist/composables/useCustomInterfaceAppearance.js +19 -25
  70. package/dist/composables/useHtmlCompiler.js +9 -17
  71. package/dist/composables/usePartner.d.ts +0 -1
  72. package/dist/composables/usePartner.js +9 -16
  73. package/dist/composables/usePreviewMode.js +13 -13
  74. package/dist/composables/useStripo.js +52 -61
  75. package/dist/composables/useToaster.js +17 -17
  76. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -2
  77. package/dist/enums/defaults.d.ts +1 -6
  78. package/dist/enums/defaults.js +10 -50
  79. package/dist/extensions/DynamicContent/dynamic-content.js +27 -41
  80. package/dist/extensions/DynamicContent/extension.js +6 -18
  81. package/dist/guido.css +1 -1
  82. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +48 -72
  83. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +49 -74
  84. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +38 -120
  85. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
  86. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
  87. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
  88. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
  89. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +11 -5
  90. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
  91. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +11 -5
  92. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +11 -5
  93. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +101 -116
  94. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +11 -5
  95. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +11 -5
  96. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +11 -5
  97. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +11 -5
  98. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +11 -5
  99. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +11 -5
  100. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +43 -23
  101. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
  102. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
  103. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
  104. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
  105. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
  106. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
  107. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
  108. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
  109. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
  110. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +17 -21
  111. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
  112. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
  113. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +15 -8
  114. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +29 -30
  115. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
  117. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
  118. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
  119. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
  121. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
  122. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +23 -19
  123. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +19 -37
  124. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +15 -2
  125. package/dist/static/styles/components/alert-message.css.js +2 -32
  126. package/dist/static/styles/components/button.css.js +2 -32
  127. package/dist/static/styles/components/wide-panel.css.js +2 -15
  128. package/dist/static/styles/variables.css.js +0 -10
  129. package/dist/stores/dynamic-content.d.ts +0 -12
  130. package/dist/stores/dynamic-content.js +6 -7
  131. package/dist/stores/editor.d.ts +1 -194
  132. package/dist/stores/editor.js +2 -18
  133. package/dist/stores/preview.d.ts +8 -0
  134. package/dist/stores/preview.js +20 -12
  135. package/dist/utils/genericUtil.js +6 -9
  136. package/dist/utils/templatePreparation.js +14 -21
  137. package/package.json +3 -5
  138. package/dist/components/organisms/LoadingWrapper.vue.d.ts +0 -2
  139. package/dist/components/organisms/LoadingWrapper.vue.js +0 -18
  140. package/dist/components/organisms/LoadingWrapper.vue2.js +0 -12
  141. package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -2
  142. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +0 -20
  143. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +0 -37
  144. package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -2
  145. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +0 -21
  146. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +0 -83
  147. package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -2
  148. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +0 -17
  149. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +0 -30
  150. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -2
  151. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +0 -19
  152. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +0 -43
  153. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -2
  154. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +0 -21
  155. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +0 -74
  156. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -2
  157. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +0 -20
  158. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +0 -37
  159. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -2
  160. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +0 -18
  161. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +0 -16
  162. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -2
  163. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +0 -24
  164. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +0 -64
  165. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -2
  166. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +0 -18
  167. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +0 -108
  168. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -2
  169. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +0 -18
  170. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +0 -12
  171. package/dist/composables/useHtmlValidator.d.ts +0 -4
  172. package/dist/composables/useHtmlValidator.js +0 -139
  173. package/dist/composables/useRecommendation.d.ts +0 -19
  174. package/dist/composables/useRecommendation.js +0 -27
  175. package/dist/composables/useSave.d.ts +0 -4
  176. package/dist/composables/useSave.js +0 -15
  177. package/dist/composables/useStripoEventHandler.d.ts +0 -3
  178. package/dist/composables/useStripoEventHandler.js +0 -20
  179. package/dist/config/compiler/outlookCompilerRules.js +0 -36
  180. package/dist/config/compiler/recommendationCompilerRules.d.ts +0 -2
  181. package/dist/config/compiler/recommendationCompilerRules.js +0 -83
  182. package/dist/config/compiler/socialCompilerRules.d.ts +0 -2
  183. package/dist/config/compiler/socialCompilerRules.js +0 -21
  184. package/dist/config/compiler/unsubscribeCompilerRules.d.ts +0 -2
  185. package/dist/config/compiler/unsubscribeCompilerRules.js +0 -64
  186. package/dist/config/migrator/checkboxMigrator.d.ts +0 -1
  187. package/dist/config/migrator/checkboxMigrator.js +0 -83
  188. package/dist/config/migrator/index.d.ts +0 -1
  189. package/dist/config/migrator/index.js +0 -9
  190. package/dist/config/migrator/unsubscribeMigrator.d.ts +0 -1
  191. package/dist/config/migrator/unsubscribeMigrator.js +0 -112
  192. package/dist/enums/html-validator.d.ts +0 -6
  193. package/dist/enums/html-validator.js +0 -7
  194. package/dist/enums/onboarding.d.ts +0 -1
  195. package/dist/enums/onboarding.js +0 -8
  196. package/dist/enums/recommendation.d.ts +0 -54
  197. package/dist/enums/recommendation.js +0 -56
  198. package/dist/enums/unsubscribe.d.ts +0 -34
  199. package/dist/enums/unsubscribe.js +0 -50
  200. package/dist/extensions/Blocks/Checkbox/block.d.ts +0 -10
  201. package/dist/extensions/Blocks/Checkbox/block.js +0 -39
  202. package/dist/extensions/Blocks/Checkbox/control.d.ts +0 -22
  203. package/dist/extensions/Blocks/Checkbox/control.js +0 -104
  204. package/dist/extensions/Blocks/Checkbox/extension.d.ts +0 -2
  205. package/dist/extensions/Blocks/Checkbox/extension.js +0 -20
  206. package/dist/extensions/Blocks/Checkbox/settingsPanel.d.ts +0 -4
  207. package/dist/extensions/Blocks/Checkbox/settingsPanel.js +0 -38
  208. package/dist/extensions/Blocks/Checkbox/template.d.ts +0 -6
  209. package/dist/extensions/Blocks/Checkbox/template.js +0 -75
  210. package/dist/extensions/Blocks/Unsubscribe/block.d.ts +0 -30
  211. package/dist/extensions/Blocks/Unsubscribe/block.js +0 -141
  212. package/dist/extensions/Blocks/Unsubscribe/control.d.ts +0 -29
  213. package/dist/extensions/Blocks/Unsubscribe/control.js +0 -180
  214. package/dist/extensions/Blocks/Unsubscribe/elements/preview.d.ts +0 -11
  215. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +0 -54
  216. package/dist/extensions/Blocks/Unsubscribe/extension.d.ts +0 -2
  217. package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -21
  218. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +0 -4
  219. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +0 -32
  220. package/dist/extensions/Blocks/Unsubscribe/template.d.ts +0 -3
  221. package/dist/extensions/Blocks/Unsubscribe/template.js +0 -28
  222. package/dist/extensions/Blocks/Unsubscribe/utils/constants.d.ts +0 -9
  223. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +0 -11
  224. package/dist/extensions/Blocks/Unsubscribe/utils/utils.d.ts +0 -7
  225. package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +0 -6
  226. package/dist/extensions/Blocks/_Boilerplate/block.d.ts +0 -10
  227. package/dist/extensions/Blocks/_Boilerplate/control.d.ts +0 -17
  228. package/dist/extensions/Blocks/_Boilerplate/extension.d.ts +0 -2
  229. package/dist/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
  230. package/dist/extensions/Blocks/_Boilerplate/template.d.ts +0 -6
  231. package/dist/mock/api/unsubscribe.d.ts +0 -2
  232. package/dist/mock/api/user-modal-state.d.ts +0 -2
  233. package/dist/mock/api/validator.d.ts +0 -2
  234. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +0 -12
  235. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +0 -12
  236. package/dist/services/onboardingApi.d.ts +0 -4
  237. package/dist/services/onboardingApi.js +0 -23
  238. package/dist/services/unsubscribeApi.d.ts +0 -4
  239. package/dist/services/unsubscribeApi.js +0 -16
  240. package/dist/static/assets/onboarding-img.svg.js +0 -4
  241. package/dist/static/styles/components/loader.css.js +0 -10
  242. package/dist/static/styles/components/notification.css.js +0 -55
  243. package/dist/static/styles/components/popup.css.js +0 -68
  244. package/dist/static/styles/customEditorStyle.css.js +0 -24
  245. package/dist/stores/onboarding.d.ts +0 -1068
  246. package/dist/stores/onboarding.js +0 -95
  247. package/dist/stores/recommendation.d.ts +0 -10
  248. package/dist/stores/recommendation.js +0 -9
  249. package/dist/stores/unsubscribe.d.ts +0 -186
  250. package/dist/stores/unsubscribe.js +0 -128
@@ -1,24 +0,0 @@
1
- import a from "./UnsubscribePageSelection.vue2.js";
2
- /* empty css */
3
- import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var o = function() {
5
- var r = this, e = r._self._c, t = r._self._setupProxy;
6
- return e(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", size: "large", "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.pageSelectionDrawerStatus, "title-text": t.trans("newsletter.select-a-template") }, on: { cancelOrBackButtonEvent: t.handleBack, onCloseEvent: t.closeModal, primaryButtonEvent: t.handleSave }, scopedSlots: r._u([{ key: "headerBottomSlot", fn: function() {
7
- return [e(t.UnsubscribeBreadcrumb, { staticClass: "px-5 py-3" })];
8
- }, proxy: !0 }]) }, [e("div", { staticClass: "d-g templates-wrapper" }, r._l(t.unsubscribeStore.getTemplatesByActiveType, function(s) {
9
- return e("div", { key: s.id, staticClass: "template-wrapper", on: { click: function(u) {
10
- return t.selectTemplate(s.id);
11
- } } }, [e(t.InContainer, { staticClass: "template-container o-h", class: { selected: t.unsubscribeStore.getSelectedTemplateByActiveType === s.id }, attrs: { border: t.getBorderClass(s.id) } }, [e("div", { staticClass: "w-1 h-1 d-f j-c-c a-i-c" }, [e("img", { staticClass: "w-1 h-1 thumbnail o-h", attrs: { alt: s.name, src: s.thumbnail } })])]), e("div", { staticClass: "mt-1 f-s-1" }, [r._v(" " + r._s(s.name) + " ")])], 1);
12
- }), 0)]);
13
- }, i = [], c = /* @__PURE__ */ n(
14
- a,
15
- o,
16
- i,
17
- !1,
18
- null,
19
- "a86fc486"
20
- );
21
- const _ = c.exports;
22
- export {
23
- _ as default
24
- };
@@ -1,64 +0,0 @@
1
- import { defineComponent as f, ref as y, computed as n, watch as T } from "vue";
2
- import g from "../../wrappers/WpDrawer.vue.js";
3
- import { useToaster as S } from "../../../composables/useToaster.js";
4
- import { useTranslations as v } from "../../../composables/useTranslations.js";
5
- import { ToasterTypeOptions as B } from "../../../enums/toaster.js";
6
- import { useUnsubscribeStore as w } from "../../../stores/unsubscribe.js";
7
- import { InContainer as C } from "@useinsider/design-system-vue";
8
- import h from "./UnsubscribeBreadcrumb.vue.js";
9
- const E = /* @__PURE__ */ f({
10
- __name: "UnsubscribePageSelection",
11
- setup(_) {
12
- const s = v(), e = w(), { showToaster: a } = S(), o = y(!1), c = n(() => e.isActiveTypeLastInCollection ? o.value ? s("unsubscription-preference.applying-changes") : s("statistics.apply") : s("products.select-and-continue")), i = n(() => e.pageSelectionUpdateStatus && e.isActiveTypeFirstInCollection ? s("products.cancel") : s("newsletter.back")), p = n(() => ({
13
- primaryButton: {
14
- styling: "solid",
15
- type: "primary",
16
- labelText: c.value,
17
- loadingStatus: o.value,
18
- disabledStatus: !1
19
- },
20
- cancelOrBackButton: {
21
- styling: "ghost",
22
- type: "secondary",
23
- labelText: i.value,
24
- disabledStatus: o.value
25
- }
26
- })), u = (t) => e.getSelectedTemplateByActiveType === t ? "bor-w-3 bor-s-s bor-c-7" : "bor-w-1 bor-s-s bor-c-6", r = (t) => {
27
- e.pageSelectionDrawerStatus = !1, t && setTimeout(() => {
28
- t();
29
- }, 500);
30
- }, m = () => {
31
- if (e.isActiveTypeFirstInCollection) {
32
- r(), e.pageSelectionUpdateStatus || (e.typeSelectionDrawerStatus = !0);
33
- return;
34
- }
35
- e.setPreviousType();
36
- }, d = () => {
37
- if (e.isActiveTypeLastInCollection) {
38
- o.value = !0;
39
- const t = e.selectedCollectionType, l = e.getSelectedTemplatesByCollection(t);
40
- e.addUnsubscribePages(l), document.dispatchEvent(new CustomEvent("unsubscribe:select", {
41
- detail: {
42
- collectionType: t,
43
- selectedPages: l
44
- }
45
- })), r(() => {
46
- o.value = !1, a({
47
- type: B.Success,
48
- message: s("global-unsubscribe.pages-were-attached")
49
- });
50
- });
51
- return;
52
- }
53
- e.setNextType();
54
- }, b = (t) => {
55
- e.setSelectedTemplate(t);
56
- };
57
- return T(() => e.pageSelectionDrawerStatus, (t) => {
58
- t && e.pageSelectionUpdateStatus && e.fetchTemplates();
59
- }), { __sfc: !0, trans: s, unsubscribeStore: e, showToaster: a, isApplying: o, getPrimaryButtonText: c, getCancelOrBackButtonText: i, footerButtonGroupOptions: p, getBorderClass: u, closeModal: r, handleBack: m, handleSave: d, selectTemplate: b, WpDrawer: g, InContainer: C, UnsubscribeBreadcrumb: h };
60
- }
61
- });
62
- export {
63
- E as default
64
- };
@@ -1,2 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
- export default _default;
@@ -1,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
- "dda47b76"
14
- );
15
- const d = c.exports;
16
- export {
17
- d as default
18
- };
@@ -1,108 +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), r = 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
- tooltipText: t.isGlobalUnsubscribeDisabled ? e("unsubscription-preference.global-unsub-added") : ""
23
- },
24
- {
25
- description: e("unsubscription-preference.type-subscription-preferences-center-description"),
26
- icon: "line-contact-sub-pref-center-page",
27
- text: e("unsubscription-preference.type-subscription-preferences-center"),
28
- value: l.SUBSCRIPTION_PREFERENCE_CENTER,
29
- disable: t.isSubscriptionPreferencesCenterDisabled,
30
- tooltipText: t.isSubscriptionPreferencesCenterDisabled ? e("unsubscription-preference.pref-center-added") : ""
31
- }
32
- ]), y = m(() => ({
33
- primaryButton: {
34
- styling: "solid",
35
- type: "primary",
36
- labelText: e(
37
- n.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
38
- ),
39
- loadingStatus: n.value,
40
- disabledStatus: !1,
41
- skeletonStatus: i.value,
42
- skeletonSizing: { width: 168, height: 40 }
43
- },
44
- cancelOrBackButton: {
45
- styling: "ghost",
46
- type: "secondary",
47
- labelText: e("products.cancel"),
48
- disabledStatus: n.value,
49
- skeletonStatus: i.value,
50
- skeletonSizing: { width: 78, height: 40 }
51
- }
52
- })), d = (s) => {
53
- t.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel")), s && setTimeout(() => {
54
- s();
55
- }, 500);
56
- }, E = (s) => {
57
- r.value = s;
58
- }, g = () => {
59
- const s = t.hasTemplatesByCollectionType, o = [];
60
- if (Object.entries(s).forEach(([c, p]) => {
61
- p || o.push(Number(c));
62
- }), o.length === 0)
63
- return !0;
64
- const a = o.map((c) => R[c]);
65
- let u = "";
66
- if (o.length === 1)
67
- u = e("unsubscription-preference.create-page-to-continue", {
68
- page: a[0]
69
- });
70
- else if (o.length === 2)
71
- u = e("unsubscription-preference.create-pages-to-continue", {
72
- page1: a[0],
73
- page2: a[1]
74
- });
75
- else {
76
- const c = a.pop() ?? "", p = a.join(", ");
77
- u = e("unsubscription-preference.create-multiple-pages-to-continue", {
78
- pages: p,
79
- lastPage: c
80
- });
81
- }
82
- return f({
83
- type: U.Warning,
84
- message: u,
85
- actionButton: {
86
- text: "Go to Unsubscribe Pages",
87
- onClick: () => {
88
- window.location.href = P;
89
- }
90
- }
91
- }), !1;
92
- }, C = async () => {
93
- if (n.value = !0, await t.fetchTemplates(), t.setCollection(r.value), !g()) {
94
- n.value = !1, d();
95
- return;
96
- }
97
- n.value = !1, t.typeSelectionDrawerStatus = !1, t.pageSelectionDrawerStatus = !0;
98
- };
99
- return _(() => t.typeSelectionDrawerStatus, (s) => {
100
- s && (i.value = !0, r.value = l.GLOBAL_UNSUBSCRIBE, t.isGlobalUnsubscribeDisabled && (r.value = t.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), setTimeout(() => {
101
- i.value = !1;
102
- }, 1e3));
103
- }), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: r, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates: g, selectCollection: C, WpDrawer: v, InSegments: I };
104
- }
105
- });
106
- export {
107
- z as default
108
- };
@@ -1,2 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
- export default _default;
@@ -1,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,4 +0,0 @@
1
- import type { DynamicContent } from '@@/Types/generic';
2
- export declare const useHtmlValidator: () => {
3
- validateHtml: (html: string, customFields: DynamicContent[], isOnSaveValidation?: boolean) => Promise<boolean>;
4
- };
@@ -1,139 +0,0 @@
1
- import { useConfig as H } from "./useConfig.js";
2
- import { TemplateTypes as V } from "../enums/defaults.js";
3
- import { DISPLAY_CONDITIONS_REGEX as B, DISPLAY_CONDITIONS_EXCEPTIONS_REGEX as _, CampaignCouldNotBeSavedKey as D, CanNotMakeAnyChangesForRunningKey as P } from "../enums/html-validator.js";
4
- import { ToasterTypeOptions as l } from "../enums/toaster.js";
5
- import { useRecommendationStore as R } from "../stores/recommendation.js";
6
- import { base64EncodeWithSpecialChars as $ } from "../utils/base64.js";
7
- import { useHttp as j } from "./useHttp.js";
8
- import { useToaster as G } from "./useToaster.js";
9
- import { useTranslations as X } from "./useTranslations.js";
10
- const te = () => {
11
- var d;
12
- const { showToaster: c } = G(), { post: y } = j(), { config: h } = H(), o = X(), m = R(), u = ((d = h.partner) == null ? void 0 : d.messageType) === V.transactional, C = async (e) => {
13
- const t = await y(
14
- "/newsletter/template-library/check-template-html-body",
15
- { html: $(e) }
16
- ), { status: n, message: a } = t.data;
17
- return n || c({
18
- type: l.Alert,
19
- message: n === void 0 ? a : o("newsletter.invalid-url-link-for-toaster")
20
- }), o(D), a === o(P) && c({
21
- type: l.Alert,
22
- message: o("newsletter.already-in-progress")
23
- }), n;
24
- }, v = (e) => !["if", "endif", "else", "elif", "now"].includes(e.toLowerCase()), w = (e) => ["if", "endif"].includes(e.toLowerCase()), S = (e, s) => {
25
- const t = e.match(/({%(.*?)%})/g);
26
- let n = !0;
27
- return t !== null && !u && t.forEach((a) => {
28
- const i = a.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
29
- if (i && i.length > 0) {
30
- const [r] = i;
31
- v(r) && !s.includes(r) && (c({
32
- type: l.Warning,
33
- message: o("custom-fields.invalid-custom-fields")
34
- }), n = !1);
35
- }
36
- }), n;
37
- }, b = async (e, s, t) => {
38
- const n = t ? await C(e) : !0;
39
- return S(e, s) && n;
40
- }, E = (e) => e.length > 0 ? !0 : (c({
41
- type: l.Warning,
42
- message: o("newsletter.html-content-is-empty")
43
- }), !1), A = (e) => {
44
- const s = (e.match(/{/gm) || []).length, t = (e.match(/}/gm) || []).length;
45
- return s > t && c({
46
- type: l.Warning,
47
- message: o("custom-fields.missing-closing-braces")
48
- }), s < t && c({
49
- type: l.Warning,
50
- message: o("custom-fields.missing-opening-braces")
51
- }), s === t;
52
- }, x = (e) => {
53
- const s = e.match(/{{\s*(\w+\s+((\w+\|\w+)|(\w+)))\s*}}/gm) === null;
54
- return s || c({
55
- type: l.Warning,
56
- message: o("custom-fields.invalid-custom-fields")
57
- }), s;
58
- }, T = (e, s) => {
59
- const t = e.match(/{{([a-zA-Z0-9_\s]*)}}/gm);
60
- if (t && !u) {
61
- const n = new Set(s.map((i) => i.toLowerCase())), a = [];
62
- if (t.forEach((i) => {
63
- const r = i.slice(2, -2).trim().toLowerCase();
64
- (!n.has(r) || r === "") && a.push(r);
65
- }), a.length > 0) {
66
- const i = `
67
- <ul>
68
- ${a.map((r) => `<li>${r}</li>`).join("")}
69
- </ul>
70
- `;
71
- return c({
72
- type: l.Alert,
73
- message: o("custom-fields.invalid-custom-fields") + i
74
- }), !1;
75
- }
76
- }
77
- return !0;
78
- }, k = (e) => {
79
- const s = e.match(/{%(.*?)%}/g), t = [];
80
- let n = !0;
81
- if (s && s.forEach((a) => {
82
- const i = a.match(B), r = a.match(_), O = (i == null ? void 0 : i.join("")) || "";
83
- (!i || a !== O) && !r && (c({
84
- type: l.Alert,
85
- message: o("newsletter.display-conditions-invalid-syntax")
86
- }), n = !1), i && i.forEach((f) => {
87
- f.trim() === "=" && (c({
88
- type: l.Alert,
89
- message: o("custom-conditions.wrong-equality-operators")
90
- }), n = !1);
91
- const g = f.match(/^[a-zA-Z]*$/g);
92
- g && g.forEach((p) => {
93
- w(p) && t.push(p);
94
- });
95
- });
96
- }), t.length) {
97
- const a = t.filter((r) => r === "if"), i = t.filter((r) => r === "endif");
98
- a.length !== i.length && (c({
99
- type: l.Alert,
100
- message: o("custom-conditions.missing-if-endif-tag")
101
- }), n = !1);
102
- }
103
- return n;
104
- }, F = (e) => {
105
- const s = (e.match(/{% /gm) || []).length, t = (e.match(/ %}/gm) || []).length, n = s === t;
106
- return n || c({
107
- type: l.Warning,
108
- message: o("custom-conditions.no-space-after-braces")
109
- }), n;
110
- }, I = (e) => (e.match(/({%(.*?)%})/g) || []).filter((t) => t.includes("if")).map((t) => (t.match(/{{.*}}/gm) || []).length).reduce((t, n) => t + n, 0) > 0 ? (c({
111
- type: l.Warning,
112
- message: o("custom-conditions.no-braces-inside-if-tag")
113
- }), !1) : !0, W = () => m.recommendationConfigs && Object.values(m.recommendationConfigs).find((s) => s.filters.find((t) => t.value === "")) !== void 0 ? (c({
114
- type: l.Alert,
115
- message: o("newsletter.fill-all-necessary-fields")
116
- }), !1) : !0, L = (e) => {
117
- const s = /src="[^"]*\.(svg|pst)"/gm;
118
- return e.match(s) === null ? !0 : (c({
119
- type: l.Alert,
120
- message: o("newsletter.invalid-image-type")
121
- }), !1);
122
- }, N = (e) => {
123
- const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".checkbox-block-v2");
124
- return Array.from(n).find((i) => {
125
- var r;
126
- return !((r = i.id) != null && r.trim());
127
- }) ? (c({
128
- type: l.Alert,
129
- message: o("unsubscribe-templates.select-checkbox-groups")
130
- }), !1) : !0;
131
- };
132
- return { validateHtml: async (e, s, t = !1) => {
133
- const n = s.map((i) => i.value);
134
- return await b(e, n, t) && E(e) && A(e) && x(e) && T(e, n) && k(e) && F(e) && I(e) && W() && L(e) && N(e);
135
- } };
136
- };
137
- export {
138
- te as useHtmlValidator
139
- };
@@ -1,19 +0,0 @@
1
- type CardWidthParams = {
2
- mobileLeftPadding: number;
3
- mobileRightPadding: number;
4
- cardsInRow: number;
5
- unresponsive: boolean;
6
- };
7
- interface CampaignData extends CardWidthParams {
8
- textTrimming: boolean;
9
- orientation: string;
10
- priceBeforeTextValue: string;
11
- priceAfterTextValue: string;
12
- discountBeforeTextValue: string;
13
- discountAfterTextValue: string;
14
- }
15
- export declare const useRecommendation: () => {
16
- calculateCardWidth: ({ mobileLeftPadding, mobileRightPadding, cardsInRow, unresponsive, }: CardWidthParams) => number;
17
- getRecommendationCampaignData: (id: string) => CampaignData;
18
- };
19
- export {};
@@ -1,27 +0,0 @@
1
- import { MinDeviceViewport as r, DefaultPadding as c } from "../enums/recommendation.js";
2
- const m = () => ({
3
- calculateCardWidth: ({
4
- mobileLeftPadding: e,
5
- mobileRightPadding: a,
6
- cardsInRow: n,
7
- unresponsive: i
8
- }) => {
9
- const t = i ? n : 1, o = e + a + (t - 1) * c;
10
- return (r - o) / t;
11
- },
12
- getRecommendationCampaignData: (e) => (console.debug(e), {
13
- textTrimming: !1,
14
- orientation: "vertical",
15
- mobileLeftPadding: 0,
16
- mobileRightPadding: 0,
17
- cardsInRow: 2,
18
- unresponsive: !1,
19
- priceBeforeTextValue: "",
20
- priceAfterTextValue: "",
21
- discountBeforeTextValue: "",
22
- discountAfterTextValue: ""
23
- })
24
- });
25
- export {
26
- m as useRecommendation
27
- };
@@ -1,4 +0,0 @@
1
- import { SavedTemplateDetails } from '@@/Types/stripo';
2
- export declare const useSave: () => {
3
- save: (isSilent?: boolean) => Promise<SavedTemplateDetails | undefined>;
4
- };
@@ -1,15 +0,0 @@
1
- import { useSaveStart as i, useSaveComplete as m } from "./useGuidoActions.js";
2
- import { useTemplatePreparation as n } from "../utils/templatePreparation.js";
3
- import { useHtmlValidator as l } from "./useHtmlValidator.js";
4
- const f = () => {
5
- const e = i(), a = m(), { validateHtml: s } = l();
6
- return { save: async (o = !1) => {
7
- e();
8
- const { prepareTemplateDetails: r } = n(), t = await r();
9
- if (await s(t.compiledHtml, t.dynamicContentList, !0))
10
- return o || a(t), t;
11
- } };
12
- };
13
- export {
14
- f as useSave
15
- };
@@ -1,3 +0,0 @@
1
- export declare const useStripoEventHandler: () => {
2
- handleEvent: (type: string, params: Record<string, string>) => Promise<void>;
3
- };
@@ -1,20 +0,0 @@
1
- import { useOnboardingStore as i } from "../stores/onboarding.js";
2
- const c = () => {
3
- const e = {
4
- block_dropped: ({ blockName: t }) => {
5
- if (t === "BLOCK_TEXT") {
6
- const n = i(), o = !n.shouldShowOnboarding("textBlockOnboarding"), r = n.isActive("textBlockOnboarding");
7
- if (o || r)
8
- return;
9
- n.start("textBlockOnboarding");
10
- }
11
- }
12
- };
13
- return { handleEvent: async (t, n) => {
14
- const o = e[t];
15
- o && await o(n);
16
- } };
17
- };
18
- export {
19
- c as useStripoEventHandler
20
- };
@@ -1,36 +0,0 @@
1
- const c = `
2
- <!--[if gte mso 9]>
3
- <xml>
4
- <o:OfficeDocumentSettings>
5
- <o:AllowPNG></o:AllowPNG>
6
- <o:PixelsPerInch>96</o:PixelsPerInch>
7
- </o:OfficeDocumentSettings>
8
- </xml>
9
- <![endif]-->`, s = {
10
- xmlns: "http://www.w3.org/1999/xhtml",
11
- "xmlns:o": "urn:schemas-microsoft-com:office:office"
12
- }, r = [
13
- {
14
- id: "append-office-xml",
15
- description: "Appending office XML into the head if it does not exist.",
16
- type: "custom",
17
- processor: (e) => e.includes("<o:OfficeDocumentSettings>") ? e : e.replace("</head>", `${c}</head>`),
18
- priority: 70
19
- },
20
- {
21
- id: "set-html-attributes",
22
- description: "Appending office XML into the head if it does not exist.",
23
- type: "custom",
24
- processor: (e) => {
25
- let t = e;
26
- return Object.entries(s).forEach(([o, i]) => {
27
- const n = new RegExp(`${o}="[^"]*"`);
28
- t.search(n) === -1 && (t = t.replace("<html", `<html ${o}="${i}"`));
29
- }), t;
30
- },
31
- priority: 71
32
- }
33
- ];
34
- export {
35
- r as outlookCompilerRules
36
- };
@@ -1,2 +0,0 @@
1
- import type { CompilerRule } from '@@/Types/html-compiler';
2
- export declare const recommendationCompilerRules: CompilerRule[];
@@ -1,83 +0,0 @@
1
- import { useRecommendation as u } from "../../composables/useRecommendation.js";
2
- import { DUMMY_IMAGE_MAPPINGS as P, REGEX as i, CSS as e, CONDITIONS as E, ATTRIBUTES as r, HTML as h } from "../../enums/recommendation.js";
3
- const H = [
4
- {
5
- id: "replace-images-with-variable-names",
6
- description: "Replacing dummy images with variable names in recommendation module",
7
- type: "custom",
8
- processor: (a) => {
9
- let t = a;
10
- return Object.entries(P).forEach(([, n]) => {
11
- Object.entries(n).forEach(([s, o]) => {
12
- t = t.replaceAll(o, `{{${s}}}`);
13
- });
14
- }), t;
15
- },
16
- priority: 50
17
- },
18
- {
19
- id: "replace-recommendation-button-span-css",
20
- description: "Replacing recommendation button span css",
21
- type: "replace",
22
- search: ".ext-product-button span,",
23
- replacement: ".ext-product-button,",
24
- replaceAll: !0,
25
- priority: 51
26
- },
27
- {
28
- id: "add-recommendation-unresponsive-css",
29
- description: "Adding recommendation unresponsive css",
30
- type: "custom",
31
- processor: (a) => {
32
- const { getRecommendationCampaignData: t } = u();
33
- let n = a;
34
- const s = n.match(i.ID);
35
- if (s) {
36
- const o = [];
37
- if (s.forEach((c) => {
38
- const m = c.slice(35, c.length - 1).trim();
39
- t(m);
40
- }), o.length) {
41
- const c = `width:${Math.min(...o)}px!important;`;
42
- n = n.replace(e.REGULAR_NAME_HEIGHT, `${e.TRIMMED_NAME_HEIGHT} ${c} ${e.ELLIPSIS}`).replace(e.REGULAR_NAME_CONTAINER_HEIGHT, e.TRIMMED_NAME_CONTAINER_CSS).replace(e.RESPONSIVE_NAME_SIZE, `${e.RESPONSIVE_NAME_HEIGHT} ${c} ${e.ELLIPSIS}`).replace(e.RESPONSIVE_NAME_CONTAINER_HEIGHT, e.TRIMMED_RESPONSIVE_NAME_CONTAINER_CSS);
43
- }
44
- }
45
- return n;
46
- },
47
- priority: 52
48
- },
49
- // TODO: prepareRecommendations
50
- // TODO: addRecommendationCustomFields
51
- {
52
- id: "add-discount-conditions",
53
- description: "Adding discount conditions to the recommendation block",
54
- type: "custom",
55
- processor: (a) => {
56
- let t = a;
57
- const n = t.match(i.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: s } = u();
58
- return n !== null && n.forEach((o) => {
59
- const c = o.match(i.CUSTOM_FIELD);
60
- if (!c)
61
- return;
62
- const [m] = c, p = m.match(i.CUSTOM_FIELD_INDEXES_PART), A = m.match(i.CUSTOM_FIELD_NAME_PART), _ = o.match(i.ATTRIBUTE_PARAGRAPH_START_TAG);
63
- if (!p || !A || !_)
64
- return;
65
- const [l] = p, [T] = A, [d] = _, N = T.substring(1, T.length - 2), R = d.match(i.COMPOSITION) !== null;
66
- let O = m;
67
- if (R) {
68
- const M = l.substring(2, l.length - 3);
69
- s(M);
70
- }
71
- const I = l.substring(2);
72
- let S = "";
73
- N in E.IF && (S = E.IF[N].replaceAll(`{${r.DISCOUNT}}`, `${I}${r.DISCOUNT}`).replaceAll(`{${r.OMNIBUS_DISCOUNT}}`, `${I}${r.OMNIBUS_DISCOUNT}`).replaceAll(`{${r.OMNIBUS_PRICE}}`, `${I}${r.OMNIBUS_PRICE}`));
74
- const $ = `${d}${O}${h.PARAGRAPH_END_TAG}`, C = `${S}${R ? $ : o}${E.ELSE}${d}${h.PARAGRAPH_END_TAG}${E.END_IF}`;
75
- t = t.replace(o, C);
76
- }), t;
77
- },
78
- priority: 53
79
- }
80
- ];
81
- export {
82
- H as recommendationCompilerRules
83
- };
@@ -1,2 +0,0 @@
1
- import type { CompilerRule } from '@@/Types/html-compiler';
2
- export declare const socialCompilerRules: CompilerRule[];
@@ -1,21 +0,0 @@
1
- const a = [
2
- {
3
- id: "fix-custom-social-block",
4
- description: "Fixing custom social block.",
5
- type: "custom",
6
- processor: (e) => {
7
- let c = e;
8
- const s = c.match(/<table[^>]*?class="[^>]*?es-social[^>]*?"[\S\s]*?<\/table>/gm);
9
- return s && s.forEach((o) => {
10
- if (o.match(/<img[^>]*?height="[0-9]+?"/gm)) {
11
- const i = o.replace(/<img[^>]*?height="[0-9]+?"/gm, (t) => t.replace("height", "width"));
12
- c = c.replace(o, i);
13
- }
14
- }), c;
15
- },
16
- priority: 80
17
- }
18
- ];
19
- export {
20
- a as socialCompilerRules
21
- };
@@ -1,2 +0,0 @@
1
- import type { CompilerRule } from '@@/Types/html-compiler';
2
- export declare const unsubscribeCompilerRules: CompilerRule[];