cja-phoenix 0.6.0 → 0.6.2

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 (283) hide show
  1. package/dist/cja-phoenix.es.js +3816 -4306
  2. package/dist/style.css +1 -0
  3. package/dist/types/components/composite/CheckoutCrossSell.vue.d.ts +29 -0
  4. package/dist/types/components/composite/CheckoutLayout.vue.d.ts +23 -0
  5. package/dist/types/components/composite/CheckoutMilestones.vue.d.ts +16 -0
  6. package/dist/types/components/composite/CjaFooter.vue.d.ts +34 -0
  7. package/dist/types/components/composite/CjaMenuBar.vue.d.ts +52 -0
  8. package/dist/types/components/composite/FunnelLayout.vue.d.ts +35 -0
  9. package/dist/types/components/composite/FunnelSubmit.vue.d.ts +26 -0
  10. package/dist/types/components/composite/FunnelSummary.vue.d.ts +77 -0
  11. package/dist/types/components/composite/FunnelTitle.vue.d.ts +19 -0
  12. package/dist/types/components/composite/InfoShowcase.vue.d.ts +25 -0
  13. package/dist/types/components/composite/JourneyMacroSteps.vue.d.ts +16 -0
  14. package/dist/types/components/composite/ResultsSidebar.vue.d.ts +9 -0
  15. package/dist/types/components/forms/CheckboxInput.vue.d.ts +41 -0
  16. package/dist/types/components/forms/CurrencyInput.vue.d.ts +65 -0
  17. package/dist/types/components/forms/FileInput.vue.d.ts +89 -0
  18. package/dist/types/components/forms/NumberInput.vue.d.ts +58 -0
  19. package/dist/types/components/forms/PhoneInput.vue.d.ts +69 -0
  20. package/dist/types/components/forms/RadioInput.vue.d.ts +43 -0
  21. package/dist/types/components/forms/RadioInputList.vue.d.ts +65 -0
  22. package/dist/types/components/forms/SelectInput.vue.d.ts +80 -0
  23. package/dist/types/components/forms/SelectionTiles.vue.d.ts +51 -0
  24. package/dist/types/components/forms/TextInput.vue.d.ts +76 -0
  25. package/dist/types/components/forms/TileCheckboxInput.vue.d.ts +23 -0
  26. package/dist/types/components/forms/ToggleInput.vue.d.ts +51 -0
  27. package/dist/types/components/forms/structure/InputContainer.vue.d.ts +22 -0
  28. package/dist/types/components/forms/structure/InputError.vue.d.ts +15 -0
  29. package/dist/types/components/forms/structure/InputTitle.vue.d.ts +21 -0
  30. package/dist/types/components/structural/CjaButton.vue.d.ts +59 -0
  31. package/dist/types/components/structural/CollapseContainer.vue.d.ts +51 -0
  32. package/dist/{components → types/components}/structural/ContentTabs.vue.d.ts +17 -20
  33. package/dist/types/components/structural/FixedContainer.vue.d.ts +68 -0
  34. package/dist/types/components/structural/GridContainer.vue.d.ts +36 -0
  35. package/dist/types/components/structural/GridItem.vue.d.ts +26 -0
  36. package/dist/types/components/structural/InfoMessage.vue.d.ts +30 -0
  37. package/dist/types/components/structural/LoadingSpinner.vue.d.ts +17 -0
  38. package/dist/types/components/structural/Modal.vue.d.ts +65 -0
  39. package/dist/types/components/structural/Scaffold.vue.d.ts +9 -0
  40. package/dist/types/index.d.ts +16 -7
  41. package/dist/types/stories/CjaButton.story.vue.d.ts +2 -0
  42. package/dist/types/stories/ContentTabs.story.vue.d.ts +2 -0
  43. package/dist/types/stories/Modal.story.vue.d.ts +2 -0
  44. package/dist/types/stories/RadioInputList.story.vue.d.ts +2 -0
  45. package/dist/types/{Router.d.ts → types/Router.d.ts} +1 -0
  46. package/dist/types/types/index.d.ts +7 -0
  47. package/dist/{utils → types/utils}/formValidations.d.ts +3 -0
  48. package/package.json +21 -30
  49. package/src/assets/backdrop.scss +10 -0
  50. package/src/assets/breakpoints.scss +12 -0
  51. package/src/assets/fonts.scss +1 -0
  52. package/src/assets/forms.scss +97 -0
  53. package/src/assets/grid.scss +14 -0
  54. package/src/assets/iconia/Read Me.txt +7 -0
  55. package/src/assets/iconia/demo-files/demo.css +155 -0
  56. package/src/assets/iconia/demo-files/demo.js +30 -0
  57. package/src/assets/iconia/demo.html +7055 -0
  58. package/src/assets/iconia/fonts/CGG-icomoon.eot +0 -0
  59. package/src/assets/iconia/fonts/CGG-icomoon.svg +513 -0
  60. package/src/assets/iconia/fonts/CGG-icomoon.ttf +0 -0
  61. package/src/assets/iconia/fonts/CGG-icomoon.woff +0 -0
  62. package/src/assets/iconia/selection.json +1 -0
  63. package/src/assets/iconia/style.css +1547 -0
  64. package/src/assets/iconia/style.scss +2556 -0
  65. package/src/assets/iconia/variables.scss +507 -0
  66. package/src/assets/main.scss +30 -0
  67. package/src/assets/radioOld.scss +52 -0
  68. package/src/assets/shadows.scss +3 -0
  69. package/src/assets/tippy.scss +45 -0
  70. package/src/assets/vars/development.scss +4 -0
  71. package/src/assets/vars/production.scss +4 -0
  72. package/src/components/composite/CheckoutCrossSell.vue +478 -0
  73. package/src/components/composite/CheckoutLayout.vue +59 -0
  74. package/src/components/composite/CheckoutMilestones.vue +161 -0
  75. package/src/components/composite/CjaFooter.vue +223 -0
  76. package/src/components/composite/CjaMenuBar.vue +543 -0
  77. package/src/components/composite/FunnelLayout.vue +197 -0
  78. package/src/components/composite/FunnelSubmit.vue +53 -0
  79. package/src/components/composite/FunnelSummary.vue +198 -0
  80. package/src/components/composite/FunnelTitle.vue +59 -0
  81. package/src/components/composite/InfoShowcase.vue +87 -0
  82. package/src/components/composite/JourneyMacroSteps.vue +104 -0
  83. package/src/components/composite/ProductDetails.vue +149 -0
  84. package/src/components/composite/ResultsLayout.vue +156 -0
  85. package/src/components/composite/ResultsSidebar.vue +74 -0
  86. package/src/components/forms/CheckboxInput.vue +103 -0
  87. package/src/components/forms/CurrencyInput.vue +126 -0
  88. package/src/components/forms/FileInput.vue +250 -0
  89. package/src/components/forms/NumberInput.vue +165 -0
  90. package/src/components/forms/PhoneInput.vue +122 -0
  91. package/src/components/forms/RadioInput.vue +98 -0
  92. package/src/components/forms/RadioInputList.vue +156 -0
  93. package/src/components/forms/SelectInput.vue +392 -0
  94. package/src/components/forms/SelectionTiles.vue +196 -0
  95. package/src/components/forms/TextInput.vue +144 -0
  96. package/src/components/forms/TileCheckboxInput.vue +96 -0
  97. package/src/components/forms/ToggleInput.vue +88 -0
  98. package/src/components/forms/structure/InputContainer.vue +28 -0
  99. package/src/components/forms/structure/InputError.vue +26 -0
  100. package/src/components/forms/structure/InputTitle.vue +52 -0
  101. package/src/components/index.ts +73 -0
  102. package/src/components/structural/CjaButton.vue +332 -0
  103. package/src/components/structural/CollapseContainer.vue +141 -0
  104. package/src/components/structural/ContentTabs.vue +105 -0
  105. package/src/components/structural/FixedContainer.vue +107 -0
  106. package/src/components/structural/GridContainer.vue +70 -0
  107. package/src/components/structural/GridItem.vue +47 -0
  108. package/src/components/structural/InfoMessage.vue +105 -0
  109. package/src/components/structural/LoadingSpinner.vue +39 -0
  110. package/src/components/structural/Modal.vue +209 -0
  111. package/src/components/structural/Scaffold.vue +3 -0
  112. package/src/constants/MyConstants.ts +1 -0
  113. package/src/constants/index.ts +5 -0
  114. package/src/env.d.ts +11 -0
  115. package/src/index.ts +31 -0
  116. package/src/stories/CjaButton.story.vue +192 -0
  117. package/src/stories/ContentTabs.story.vue +59 -0
  118. package/src/stories/Modal.story.vue +127 -0
  119. package/src/stories/RadioInputList.story.vue +61 -0
  120. package/src/types/CheckoutMilestone.ts +5 -0
  121. package/src/types/Footer.ts +17 -0
  122. package/src/types/Menu.ts +19 -0
  123. package/src/types/RadioOption.ts +7 -0
  124. package/src/types/Router.ts +19 -0
  125. package/src/types/SelectOption.ts +6 -0
  126. package/src/types/StoreDataValue.ts +12 -0
  127. package/src/types/Storyblok.ts +10 -0
  128. package/src/types/TileOption.ts +8 -0
  129. package/src/types/index.ts +19 -0
  130. package/src/utils/cjaRouter.ts +74 -0
  131. package/src/utils/cjaStore.ts +43 -0
  132. package/src/utils/findScrollAncestor.ts +16 -0
  133. package/src/utils/formValidations.ts +192 -0
  134. package/src/utils/generateRoutes.ts +36 -0
  135. package/src/utils/getFromUrl.ts +25 -0
  136. package/src/utils/getMessages.ts +23 -0
  137. package/src/utils/gtm.ts +158 -0
  138. package/src/utils/index.ts +31 -0
  139. package/src/utils/jsonReviver.ts +20 -0
  140. package/src/utils/storyblokLink.ts +4 -0
  141. package/src/utils/updateForm.ts +40 -0
  142. package/src/utils/uploadFile.ts +25 -0
  143. package/src/utils/useGlobalProperties.ts +11 -0
  144. package/src/utils/useViewportDetector.ts +35 -0
  145. package/dist/cja-phoenix.cjs.js +0 -44
  146. package/dist/cja-phoenix.d.ts +0 -3
  147. package/dist/cja-phoenix.umd.js +0 -45
  148. package/dist/components/composite/CheckoutCrossSell.vue.d.ts +0 -36
  149. package/dist/components/composite/CheckoutLayout.vue.d.ts +0 -20
  150. package/dist/components/composite/CheckoutMilestones.vue.d.ts +0 -13
  151. package/dist/components/composite/CjaFooter.vue.d.ts +0 -29
  152. package/dist/components/composite/CjaMenuBar.vue.d.ts +0 -53
  153. package/dist/components/composite/FunnelLayout.vue.d.ts +0 -38
  154. package/dist/components/composite/FunnelSubmit.vue.d.ts +0 -25
  155. package/dist/components/composite/FunnelSummary.vue.d.ts +0 -76
  156. package/dist/components/composite/FunnelTitle.vue.d.ts +0 -24
  157. package/dist/components/composite/InfoShowcase.vue.d.ts +0 -28
  158. package/dist/components/composite/JourneyMacroSteps.vue.d.ts +0 -13
  159. package/dist/components/forms/CheckboxInput.vue.d.ts +0 -38
  160. package/dist/components/forms/CurrencyInput.vue.d.ts +0 -92
  161. package/dist/components/forms/FileInput.vue.d.ts +0 -118
  162. package/dist/components/forms/NumberInput.vue.d.ts +0 -73
  163. package/dist/components/forms/PhoneInput.vue.d.ts +0 -104
  164. package/dist/components/forms/RadioInputList.vue.d.ts +0 -96
  165. package/dist/components/forms/SelectInput.vue.d.ts +0 -121
  166. package/dist/components/forms/SelectionTiles.vue.d.ts +0 -64
  167. package/dist/components/forms/TextInput.vue.d.ts +0 -127
  168. package/dist/components/forms/TileCheckboxInput.vue.d.ts +0 -34
  169. package/dist/components/forms/ToggleInput.vue.d.ts +0 -70
  170. package/dist/components/forms/structure/InputContainer.vue.d.ts +0 -17
  171. package/dist/components/forms/structure/InputError.vue.d.ts +0 -12
  172. package/dist/components/forms/structure/InputTitle.vue.d.ts +0 -30
  173. package/dist/components/structural/CjaButton.vue.d.ts +0 -66
  174. package/dist/components/structural/CollapseContainer.vue.d.ts +0 -40
  175. package/dist/components/structural/FixedContainer.vue.d.ts +0 -69
  176. package/dist/components/structural/GridContainer.vue.d.ts +0 -21
  177. package/dist/components/structural/GridItem.vue.d.ts +0 -29
  178. package/dist/components/structural/InfoMessage.vue.d.ts +0 -39
  179. package/dist/components/structural/LoadingSpinner.vue.d.ts +0 -16
  180. package/dist/components/structural/Modal.vue.d.ts +0 -50
  181. package/dist/components/structural/Scaffold.vue.d.ts +0 -3
  182. package/dist/components/structural/Scaffold.vue.d.ts.map +0 -1
  183. package/dist/index.d.ts +0 -14
  184. package/dist/src/components/composite/CheckoutCrossSell.vue.d.ts +0 -5
  185. package/dist/src/components/composite/CheckoutCrossSell.vue.d.ts.map +0 -1
  186. package/dist/src/components/composite/CheckoutLayout.vue.d.ts +0 -5
  187. package/dist/src/components/composite/CheckoutLayout.vue.d.ts.map +0 -1
  188. package/dist/src/components/composite/CheckoutMilestones.vue.d.ts +0 -5
  189. package/dist/src/components/composite/CheckoutMilestones.vue.d.ts.map +0 -1
  190. package/dist/src/components/composite/CjaFooter.vue.d.ts +0 -5
  191. package/dist/src/components/composite/CjaFooter.vue.d.ts.map +0 -1
  192. package/dist/src/components/composite/CjaMenuBar.vue.d.ts +0 -5
  193. package/dist/src/components/composite/CjaMenuBar.vue.d.ts.map +0 -1
  194. package/dist/src/components/composite/FunnelLayout.vue.d.ts +0 -5
  195. package/dist/src/components/composite/FunnelLayout.vue.d.ts.map +0 -1
  196. package/dist/src/components/composite/FunnelSubmit.vue.d.ts +0 -5
  197. package/dist/src/components/composite/FunnelSubmit.vue.d.ts.map +0 -1
  198. package/dist/src/components/composite/FunnelSummary.vue.d.ts +0 -5
  199. package/dist/src/components/composite/FunnelSummary.vue.d.ts.map +0 -1
  200. package/dist/src/components/composite/FunnelTitle.vue.d.ts +0 -5
  201. package/dist/src/components/composite/FunnelTitle.vue.d.ts.map +0 -1
  202. package/dist/src/components/composite/InfoShowcase.vue.d.ts +0 -5
  203. package/dist/src/components/composite/InfoShowcase.vue.d.ts.map +0 -1
  204. package/dist/src/components/composite/JourneyMacroSteps.vue.d.ts +0 -5
  205. package/dist/src/components/composite/JourneyMacroSteps.vue.d.ts.map +0 -1
  206. package/dist/src/components/composite/ProductDetails.vue.d.ts +0 -5
  207. package/dist/src/components/composite/ProductDetails.vue.d.ts.map +0 -1
  208. package/dist/src/components/composite/ResultsLayout.vue.d.ts +0 -5
  209. package/dist/src/components/composite/ResultsLayout.vue.d.ts.map +0 -1
  210. package/dist/src/components/forms/CheckboxInput.vue.d.ts +0 -5
  211. package/dist/src/components/forms/CheckboxInput.vue.d.ts.map +0 -1
  212. package/dist/src/components/forms/CurrencyInput.vue.d.ts +0 -5
  213. package/dist/src/components/forms/CurrencyInput.vue.d.ts.map +0 -1
  214. package/dist/src/components/forms/FileInput.vue.d.ts +0 -5
  215. package/dist/src/components/forms/FileInput.vue.d.ts.map +0 -1
  216. package/dist/src/components/forms/NumberInput.vue.d.ts +0 -5
  217. package/dist/src/components/forms/NumberInput.vue.d.ts.map +0 -1
  218. package/dist/src/components/forms/PhoneInput.vue.d.ts +0 -5
  219. package/dist/src/components/forms/PhoneInput.vue.d.ts.map +0 -1
  220. package/dist/src/components/forms/RadioInputList.vue.d.ts +0 -5
  221. package/dist/src/components/forms/RadioInputList.vue.d.ts.map +0 -1
  222. package/dist/src/components/forms/SelectInput.vue.d.ts +0 -5
  223. package/dist/src/components/forms/SelectInput.vue.d.ts.map +0 -1
  224. package/dist/src/components/forms/SelectionTiles.vue.d.ts +0 -5
  225. package/dist/src/components/forms/SelectionTiles.vue.d.ts.map +0 -1
  226. package/dist/src/components/forms/TextInput.vue.d.ts +0 -5
  227. package/dist/src/components/forms/TextInput.vue.d.ts.map +0 -1
  228. package/dist/src/components/forms/TileCheckboxInput.vue.d.ts +0 -5
  229. package/dist/src/components/forms/TileCheckboxInput.vue.d.ts.map +0 -1
  230. package/dist/src/components/forms/ToggleInput.vue.d.ts +0 -5
  231. package/dist/src/components/forms/ToggleInput.vue.d.ts.map +0 -1
  232. package/dist/src/components/forms/structure/InputContainer.vue.d.ts +0 -5
  233. package/dist/src/components/forms/structure/InputContainer.vue.d.ts.map +0 -1
  234. package/dist/src/components/forms/structure/InputError.vue.d.ts +0 -5
  235. package/dist/src/components/forms/structure/InputError.vue.d.ts.map +0 -1
  236. package/dist/src/components/forms/structure/InputTitle.vue.d.ts +0 -5
  237. package/dist/src/components/forms/structure/InputTitle.vue.d.ts.map +0 -1
  238. package/dist/src/components/structural/CjaButton.vue.d.ts +0 -5
  239. package/dist/src/components/structural/CjaButton.vue.d.ts.map +0 -1
  240. package/dist/src/components/structural/CollapseContainer.vue.d.ts +0 -5
  241. package/dist/src/components/structural/CollapseContainer.vue.d.ts.map +0 -1
  242. package/dist/src/components/structural/ContentTabs.vue.d.ts +0 -5
  243. package/dist/src/components/structural/ContentTabs.vue.d.ts.map +0 -1
  244. package/dist/src/components/structural/FixedContainer.vue.d.ts +0 -5
  245. package/dist/src/components/structural/FixedContainer.vue.d.ts.map +0 -1
  246. package/dist/src/components/structural/GridContainer.vue.d.ts +0 -5
  247. package/dist/src/components/structural/GridContainer.vue.d.ts.map +0 -1
  248. package/dist/src/components/structural/GridItem.vue.d.ts +0 -5
  249. package/dist/src/components/structural/GridItem.vue.d.ts.map +0 -1
  250. package/dist/src/components/structural/InfoMessage.vue.d.ts +0 -5
  251. package/dist/src/components/structural/InfoMessage.vue.d.ts.map +0 -1
  252. package/dist/src/components/structural/LoadingSpinner.vue.d.ts +0 -5
  253. package/dist/src/components/structural/LoadingSpinner.vue.d.ts.map +0 -1
  254. package/dist/src/components/structural/Modal.vue.d.ts +0 -5
  255. package/dist/src/components/structural/Modal.vue.d.ts.map +0 -1
  256. package/dist/styles.css +0 -1
  257. /package/dist/{components → types/components}/composite/ProductDetails.vue.d.ts +0 -0
  258. /package/dist/{components → types/components}/composite/ResultsLayout.vue.d.ts +0 -0
  259. /package/dist/{components → types/components}/index.d.ts +0 -0
  260. /package/dist/{constants → types/constants}/MyConstants.d.ts +0 -0
  261. /package/dist/{constants → types/constants}/index.d.ts +0 -0
  262. /package/dist/types/{CheckoutMilestone.d.ts → types/CheckoutMilestone.d.ts} +0 -0
  263. /package/dist/types/{Footer.d.ts → types/Footer.d.ts} +0 -0
  264. /package/dist/types/{Menu.d.ts → types/Menu.d.ts} +0 -0
  265. /package/dist/types/{RadioOption.d.ts → types/RadioOption.d.ts} +0 -0
  266. /package/dist/types/{SelectOption.d.ts → types/SelectOption.d.ts} +0 -0
  267. /package/dist/types/{StoreDataValue.d.ts → types/StoreDataValue.d.ts} +0 -0
  268. /package/dist/types/{Storyblok.d.ts → types/Storyblok.d.ts} +0 -0
  269. /package/dist/types/{TileOption.d.ts → types/TileOption.d.ts} +0 -0
  270. /package/dist/{utils → types/utils}/cjaRouter.d.ts +0 -0
  271. /package/dist/{utils → types/utils}/cjaStore.d.ts +0 -0
  272. /package/dist/{utils → types/utils}/findScrollAncestor.d.ts +0 -0
  273. /package/dist/{utils → types/utils}/generateRoutes.d.ts +0 -0
  274. /package/dist/{utils → types/utils}/getFromUrl.d.ts +0 -0
  275. /package/dist/{utils → types/utils}/getMessages.d.ts +0 -0
  276. /package/dist/{utils → types/utils}/gtm.d.ts +0 -0
  277. /package/dist/{utils → types/utils}/index.d.ts +0 -0
  278. /package/dist/{utils → types/utils}/jsonReviver.d.ts +0 -0
  279. /package/dist/{utils → types/utils}/storyblokLink.d.ts +0 -0
  280. /package/dist/{utils → types/utils}/updateForm.d.ts +0 -0
  281. /package/dist/{utils → types/utils}/uploadFile.d.ts +0 -0
  282. /package/dist/{utils → types/utils}/useGlobalProperties.d.ts +0 -0
  283. /package/dist/{utils → types/utils}/useViewportDetector.d.ts +0 -0
@@ -0,0 +1,478 @@
1
+ <template>
2
+ <div
3
+ class="cross-sell-container"
4
+ v-if="activeViewport.lg && !loading.messages"
5
+ >
6
+ <Transition>
7
+ <div class="cross-sell-wrapper" v-if="step == 1">
8
+ <h2>{{ t("xsell.checkout.title") }}</h2>
9
+ <p v-html="t('xsell.checkout.description')"></p>
10
+
11
+ <div class="options-container">
12
+ <TileCheckboxInput
13
+ v-for="vert in crossSellOptions"
14
+ :class="[`checkbox-${vert.class}`]"
15
+ :image="vert.image"
16
+ :label="vert.label"
17
+ :description="vert.description"
18
+ :model-value="crossSellData[vert.value]"
19
+ @update:model-value="(v) => (crossSellData[vert.value] = v)"
20
+ />
21
+ </div>
22
+
23
+ <div class="btn-container">
24
+ <CjaButton :color="'orange'" :size="'lg'" @click="submit">
25
+ {{ t("xsell.checkout.btn.submit") }}
26
+ </CjaButton>
27
+ </div>
28
+ </div>
29
+ <div class="cross-sell-wrapper" v-else>
30
+ <div class="icon-wrapper">
31
+ <div class="success-icon m-cgg-icon--check2"></div>
32
+ </div>
33
+ <h2>{{ t("xsell.checkout.success.title") }}</h2>
34
+ <p>{{ t("xsell.checkout.success.description") }}</p>
35
+ </div>
36
+ </Transition>
37
+ </div>
38
+ <Scaffold v-else-if="!loading.messages && mobileBannerActive">
39
+ <Teleport to="body">
40
+ <div class="cross-sell-spacer" ref="spacerEl"></div>
41
+ <div class="cross-sell-banner" ref="bannerEl">
42
+ <div class="banner-header">
43
+ <span v-html="t('xsell.checkout.banner.title')"></span>
44
+ <button
45
+ class="btn-close m-cgg-icon--cross2"
46
+ @click="mobileBannerActive = false"
47
+ ></button>
48
+ </div>
49
+ <div class="banner-description">
50
+ <span class="m-cgg-icon--comparaja">
51
+ <span class="path1"></span>
52
+ <span class="path2"></span>
53
+ </span>
54
+ <span v-html="t('xsell.checkout.banner.description')"></span>
55
+ </div>
56
+ <div class="btn-container">
57
+ <CjaButton @click="openModal">
58
+ {{ t("xsell.checkout.banner.btn") }}
59
+ </CjaButton>
60
+ </div>
61
+ </div>
62
+ </Teleport>
63
+ <Modal ref="modalEl">
64
+ <template v-slot:body>
65
+ <div class="cross-sell-modal-content" v-if="step == 1">
66
+ <h3>{{ t("xsell.checkout.modal.body.title") }}</h3>
67
+ <p>{{ t("xsell.checkout.modal.body.description") }}</p>
68
+ <div class="options-container">
69
+ <TileCheckboxInput
70
+ v-for="vert in crossSellOptions"
71
+ :class="[`checkbox-${vert.class}`]"
72
+ :image="vert.image"
73
+ :label="vert.label"
74
+ :description="vert.description"
75
+ :model-value="crossSellData[vert.value]"
76
+ @update:model-value="(v) => (crossSellData[vert.value] = v)"
77
+ />
78
+ </div>
79
+ </div>
80
+ <div class="cross-sell-modal-content" v-else>
81
+ <div class="icon-wrapper">
82
+ <div class="success-icon m-cgg-icon--check2"></div>
83
+ </div>
84
+ <div class="success-text">
85
+ <h3>{{ t("xsell.checkout.success.title") }}</h3>
86
+ <p>{{ t("xsell.checkout.success.description") }}</p>
87
+ </div>
88
+ </div>
89
+ </template>
90
+ <template v-slot:footer>
91
+ <div class="modal-btn-container">
92
+ <CjaButton @click="submit">
93
+ {{ t("xsell.checkout.modal.footer.btn") }}
94
+ </CjaButton>
95
+ </div>
96
+ </template>
97
+ </Modal>
98
+ </Scaffold>
99
+ </template>
100
+
101
+ <script lang="ts" setup>
102
+ import { ref, watch, onBeforeMount, computed } from "vue";
103
+ import { I18nOptions, useI18n } from "vue-i18n";
104
+ import TileCheckboxInput from "../forms/TileCheckboxInput.vue";
105
+ import Scaffold from "../structural/Scaffold.vue";
106
+ import Modal from "../structural/Modal.vue";
107
+ import CjaButton from "../structural/CjaButton.vue";
108
+ import { useViewportDetector, useGlobalProperties } from "../../utils";
109
+
110
+ const props = defineProps<{
111
+ activeVertical?: string;
112
+ journeyId: string | undefined;
113
+ data: {
114
+ name: string | undefined;
115
+ phone: string | undefined;
116
+ email: string | undefined;
117
+ marketingOptIn: boolean | undefined;
118
+ };
119
+ }>();
120
+
121
+ const loading = ref({
122
+ messages: true,
123
+ });
124
+ const { activeViewport } = useViewportDetector();
125
+ const spacerEl = ref();
126
+ const bannerEl = ref();
127
+ const { imageURL, apiURL } = useGlobalProperties();
128
+
129
+ const { t, setLocaleMessage } = useI18n({
130
+ legacy: false,
131
+ locale: "PT",
132
+ fallbackLocale: "PT",
133
+ messages: {},
134
+ missingWarn: false,
135
+ warnHtmlMessage: false,
136
+ useScope: "local",
137
+ });
138
+
139
+ const step = ref(1);
140
+
141
+ const crossSellOptions = computed(() =>
142
+ [
143
+ {
144
+ class: "all",
145
+ value: "all",
146
+ image: imageURL + "xsell-checkout-cpj.svg",
147
+ label: t("xsell.checkout.input.all.title"),
148
+ description: t("xsell.checkout.input.all.description"),
149
+ },
150
+ {
151
+ class: "hl",
152
+ value: "mg",
153
+ image: imageURL + "xsell-checkout-hl.svg",
154
+ label: t("xsell.checkout.input.hl.title"),
155
+ description: t("xsell.checkout.input.hl.description"),
156
+ },
157
+ {
158
+ class: "pl",
159
+ value: "pl",
160
+ image: imageURL + "xsell-checkout-pl.svg",
161
+ label: t("xsell.checkout.input.pl.title"),
162
+ description: t("xsell.checkout.input.pl.description"),
163
+ },
164
+ {
165
+ class: "cc",
166
+ value: "cc",
167
+ image: imageURL + "xsell-checkout-cc.svg",
168
+ label: t("xsell.checkout.input.cc.title"),
169
+ description: t("xsell.checkout.input.cc.description"),
170
+ },
171
+ {
172
+ class: "pl",
173
+ value: "csc",
174
+ image: imageURL + "xsell-checkout-csc.svg",
175
+ label: t("xsell.checkout.input.csc.title"),
176
+ description: t("xsell.checkout.input.csc.description"),
177
+ },
178
+ {
179
+ class: "ci",
180
+ value: "ci",
181
+ image: imageURL + "xsell-checkout-in.svg",
182
+ label: t("xsell.checkout.input.ci.title"),
183
+ description: t("xsell.checkout.input.ci.description"),
184
+ },
185
+ ].filter((o) => o.value != props.activeVertical)
186
+ );
187
+
188
+ const crossSellData = ref({
189
+ all: true,
190
+ mg: false,
191
+ pl: false,
192
+ cc: false,
193
+ csc: false,
194
+ ci: false,
195
+ });
196
+
197
+ const modalEl = ref();
198
+ const mobileBannerActive = ref(true);
199
+
200
+ onBeforeMount(() => {
201
+ fetch("/Internationalization?contains=xsell.checkout")
202
+ .then((response) => response.json())
203
+ .then((data: I18nOptions["messages"]) => {
204
+ if (data) {
205
+ loading.value.messages = false;
206
+ setLocaleMessage("PT", data);
207
+ }
208
+ });
209
+ });
210
+
211
+ watch(
212
+ () => loading.value.messages,
213
+ () => {
214
+ window.requestAnimationFrame(() => {
215
+ if (!activeViewport.value.lg && spacerEl.value) {
216
+ spacerEl.value.style.height = `${bannerEl.value.offsetHeight}px`;
217
+ }
218
+ });
219
+ }
220
+ );
221
+
222
+ watch(
223
+ () => Object.entries(crossSellData.value),
224
+ (newVal, oldVal) => {
225
+ const newObj = Object.fromEntries(newVal);
226
+ const oldObj = Object.fromEntries(oldVal);
227
+
228
+ if (newObj.all && !oldObj.all) {
229
+ for (const v in crossSellData.value) {
230
+ if (v != "all") {
231
+ crossSellData.value[v] = false;
232
+ }
233
+ }
234
+ } else if (newVal.filter((v) => v[0] != "all" && v[1]).length) {
235
+ crossSellData.value.all = false;
236
+ }
237
+ }
238
+ );
239
+
240
+ const openModal = () => {
241
+ step.value = 1;
242
+ crossSellData.value = {
243
+ all: true,
244
+ mg: false,
245
+ pl: false,
246
+ cc: false,
247
+ csc: false,
248
+ ci: false,
249
+ };
250
+ modalEl.value.openModal();
251
+ };
252
+
253
+ const submit = () => {
254
+ const payload = Object.entries(crossSellData.value)
255
+ .filter((v) => v[1])
256
+ .map((v) => {
257
+ switch (v[0]) {
258
+ case "csc":
259
+ return "PL";
260
+ case "all":
261
+ return "BLOG";
262
+ default:
263
+ return v[0].toUpperCase();
264
+ }
265
+ });
266
+
267
+ fetch(new URL("/core/apis/data/updateForm", apiURL), {
268
+ method: "PUT",
269
+ body: JSON.stringify({
270
+ journeyId: props.journeyId,
271
+ eventType: "LEAD_CAPTURE",
272
+ isActionEvent: true,
273
+ stepName: "LEAD_CAPTURE",
274
+ isCompleted: true,
275
+ sentToDialer: false,
276
+ lastStepNumber: 0,
277
+ lastStepType: "LEAD_CAPTURE",
278
+ lastStepUrl:
279
+ window.location.pathname +
280
+ window.location.search +
281
+ window.location.hash,
282
+ data: JSON.stringify({ verticalCodeSelector: payload }),
283
+ }),
284
+ });
285
+
286
+ fetch(new URL("/core/apis/data/captureLead", apiURL), {
287
+ method: "POST",
288
+ body: JSON.stringify({
289
+ name: props.data.name,
290
+ phone: props.data.phone,
291
+ email: props.data.email,
292
+ verticalCode: payload.length == 1 ? payload[0] : "BLOG",
293
+ utmSource: "RESULTS_PAGE",
294
+ verticalCodeSelector: payload,
295
+ sentToSalesforce: props.data.marketingOptIn,
296
+ sentToDialer: false,
297
+ fromBlog: true,
298
+ xSell: true,
299
+ }),
300
+ });
301
+
302
+ step.value = 2;
303
+
304
+ if (!activeViewport.value.lg) {
305
+ setTimeout(() => {
306
+ modalEl.value.closeModal();
307
+ mobileBannerActive.value = false;
308
+ }, 3000);
309
+ }
310
+ };
311
+ </script>
312
+
313
+ <style lang="scss" scoped>
314
+ @import "../../assets/breakpoints.scss";
315
+
316
+ .cross-sell-container {
317
+ .cross-sell-wrapper {
318
+ max-width: 1050px;
319
+ margin: 0 auto;
320
+ }
321
+
322
+ h2 {
323
+ margin: 0 0 25px;
324
+ font-weight: 700;
325
+ font-size: 24px;
326
+ line-height: 27px;
327
+ text-align: center;
328
+ color: #155072;
329
+ }
330
+
331
+ p {
332
+ margin: 0 0 30px;
333
+ font-size: 16px;
334
+ line-height: 21px;
335
+ text-align: center;
336
+ }
337
+
338
+ .btn-container {
339
+ display: flex;
340
+ justify-content: center;
341
+ margin-top: 40px;
342
+ }
343
+ }
344
+
345
+ .options-container {
346
+ display: flex;
347
+ flex-direction: column;
348
+ gap: 10px;
349
+
350
+ @media screen and (min-width: 992px) {
351
+ flex-direction: row;
352
+ flex-wrap: wrap;
353
+ justify-content: center;
354
+ gap: 30px;
355
+ }
356
+
357
+ [class*="checkbox-"] {
358
+ @media screen and (min-width: 992px) {
359
+ flex-basis: 225px;
360
+ }
361
+ }
362
+
363
+ .checkbox-hl:not(.checked) {
364
+ background: linear-gradient(75.75deg, #f1f7ee 1.02%, #ffffff 100%);
365
+ }
366
+
367
+ .checkbox-pl:not(.checked) {
368
+ background: linear-gradient(80.77deg, #f4f9fc 1.02%, #ffffff 100%), #ffffff;
369
+ }
370
+
371
+ .checkbox-cc:not(.checked) {
372
+ background: linear-gradient(80.77deg, #fff7ff 1.02%, #ffffff 100%), #ffffff;
373
+ }
374
+
375
+ .checkbox-ci:not(.checked) {
376
+ background: linear-gradient(80.77deg, #f6f4ff 1.02%, #ffffff 100%), #ffffff;
377
+ }
378
+ }
379
+
380
+ .cross-sell-banner {
381
+ position: fixed;
382
+ left: 0;
383
+ bottom: 0;
384
+ width: 100%;
385
+ padding: 18px 16px;
386
+ background-color: #fff;
387
+ box-shadow: 0px -4px 13px rgba(0, 0, 0, 0.1);
388
+
389
+ .banner-header {
390
+ position: relative;
391
+ display: flex;
392
+ justify-content: center;
393
+ gap: 15px;
394
+ font-size: 16px;
395
+ line-height: 16px;
396
+ margin-bottom: 15px;
397
+
398
+ span {
399
+ flex-basis: 360px;
400
+ }
401
+
402
+ .btn-close {
403
+ position: absolute;
404
+ right: 0;
405
+ top: 50%;
406
+ transform: translateY(-50%);
407
+ background: none;
408
+ padding: 0;
409
+ border: none;
410
+ outline: none;
411
+ font-size: 24px;
412
+ }
413
+ }
414
+
415
+ .banner-description {
416
+ max-width: 360px;
417
+ margin: 0 auto;
418
+ display: flex;
419
+ flex-direction: row;
420
+ gap: 15px;
421
+ font-size: 14px;
422
+ line-height: 21px;
423
+ margin-bottom: 20px;
424
+
425
+ .m-cgg-icon--comparaja {
426
+ font-size: 30px;
427
+ }
428
+ }
429
+
430
+ .btn-container {
431
+ display: grid;
432
+ max-width: 360px;
433
+ margin: 0 auto;
434
+ }
435
+ }
436
+
437
+ .cross-sell-modal-content {
438
+ h3 {
439
+ font-weight: 700;
440
+ font-size: 24px;
441
+ line-height: 29px;
442
+ margin: 10px 0 15px;
443
+ }
444
+
445
+ p {
446
+ font-size: 16px;
447
+ line-height: 24px;
448
+ margin: 0 0 25px;
449
+ }
450
+
451
+ .success-text {
452
+ text-align: center;
453
+ }
454
+ }
455
+
456
+ .modal-btn-container {
457
+ display: grid;
458
+ }
459
+
460
+ .icon-wrapper {
461
+ margin: 0 auto;
462
+
463
+ .success-icon {
464
+ display: flex;
465
+ align-items: center;
466
+ justify-content: center;
467
+ border-radius: 50%;
468
+ color: #fff;
469
+ font-weight: 700;
470
+ user-select: none;
471
+ background-color: #77aa43;
472
+ height: 80px;
473
+ width: 80px;
474
+ margin: 0 auto 30px;
475
+ font-size: 60px;
476
+ }
477
+ }
478
+ </style>
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <GridContainer class="checkout-container">
3
+ <GridItem
4
+ class="checkout-wrapper"
5
+ :size-sm="2"
6
+ :size-md="4"
7
+ :size-lg="$slots.sidebar ? 8 : 12"
8
+ >
9
+ <slot name="content"></slot>
10
+ </GridItem>
11
+ <GridItem
12
+ class="checkout-sidebar"
13
+ v-if="$slots.sidebar"
14
+ :size-sm="2"
15
+ :size-md="4"
16
+ :size-lg="4"
17
+ :style="{ background: activeViewport.lg ? sidebarBackground : '' }"
18
+ >
19
+ <slot name="sidebar"></slot>
20
+ </GridItem>
21
+ </GridContainer>
22
+ </template>
23
+
24
+ <script lang="ts" setup>
25
+ import GridContainer from "../structural/GridContainer.vue";
26
+ import GridItem from "../structural/GridItem.vue";
27
+ import { useViewportDetector } from "../../utils";
28
+
29
+ const { activeViewport } = useViewportDetector();
30
+
31
+ defineProps<{
32
+ sidebarBackground: string;
33
+ }>();
34
+ </script>
35
+
36
+ <style lang="scss" scoped>
37
+ .checkout-container {
38
+ .checkout-wrapper {
39
+ max-width: 750px;
40
+ padding: 32px 0;
41
+ margin: 0 auto;
42
+
43
+ @media screen and (min-width: 1024px) {
44
+ padding: 56px 0;
45
+ }
46
+ }
47
+
48
+ .checkout-sidebar {
49
+ padding: 32px 0;
50
+ border-top: 1px solid #dedede;
51
+
52
+ @media screen and (min-width: 992px) {
53
+ padding: 56px 0 56px 24px;
54
+ box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
55
+ border-top: none;
56
+ }
57
+ }
58
+ }
59
+ </style>
@@ -0,0 +1,161 @@
1
+ <template>
2
+ <div class="checkout-milestones">
3
+ <ul>
4
+ <li
5
+ v-for="(milestone, i) in milestones"
6
+ :class="[`milestone-${milestone.status}`]"
7
+ >
8
+ <span
9
+ class="step-icon"
10
+ :class="{ 'm-cgg-icon--check2': milestone.status == 'past' }"
11
+ >
12
+ {{ milestone.status != "past" ? i + 1 : "" }}
13
+ </span>
14
+ <div class="text-container">
15
+ <div class="title">
16
+ {{ milestone.title }}
17
+ </div>
18
+ <div class="description" v-if="milestone.description">
19
+ {{ milestone.description }}
20
+ </div>
21
+ </div>
22
+ </li>
23
+ </ul>
24
+ </div>
25
+ </template>
26
+
27
+ <script lang="ts" setup>
28
+ import { CheckoutMilestone } from "../../types";
29
+
30
+ defineProps<{
31
+ milestones: CheckoutMilestone[];
32
+ }>();
33
+ </script>
34
+
35
+ <style lang="scss" scoped>
36
+ @import "../../assets/breakpoints.scss";
37
+
38
+ .checkout-milestones {
39
+ ul {
40
+ list-style: none;
41
+ padding: 0;
42
+ margin: 0 auto;
43
+ max-width: 500px;
44
+ display: flex;
45
+ flex-direction: column;
46
+ gap: 35px;
47
+
48
+ li {
49
+ position: relative;
50
+ display: flex;
51
+ gap: 15px;
52
+ padding: 0 16px;
53
+
54
+ $step-icon-size: 25px;
55
+
56
+ .step-icon {
57
+ display: flex;
58
+ justify-content: center;
59
+ align-items: center;
60
+ width: $step-icon-size;
61
+ height: $step-icon-size;
62
+ border-radius: 50%;
63
+ color: #fff;
64
+ font-weight: 700;
65
+ font-size: 12px;
66
+ line-height: 13px;
67
+ flex-shrink: 0;
68
+ }
69
+
70
+ .text-container {
71
+ display: flex;
72
+ flex-direction: column;
73
+ gap: 8px;
74
+
75
+ .title {
76
+ font-size: 16px;
77
+ line-height: 20px;
78
+ font-weight: 700;
79
+
80
+ @media screen and (min-width: $break-md-min) {
81
+ font-size: 20px;
82
+ line-height: 24px;
83
+ }
84
+ }
85
+
86
+ .description {
87
+ font-size: 14px;
88
+ line-height: 17px;
89
+
90
+ @media screen and (min-width: $break-md-min) {
91
+ font-size: 16px;
92
+ line-height: 19px;
93
+ }
94
+ }
95
+ }
96
+
97
+ &.milestone-past,
98
+ &.milestone-future {
99
+ &::before,
100
+ &::after {
101
+ position: absolute;
102
+ left: 27px;
103
+ width: 3px;
104
+ }
105
+ }
106
+
107
+ &.milestone-past {
108
+ &::after {
109
+ content: "";
110
+ top: $step-icon-size;
111
+ background-color: #77aa43;
112
+ height: calc(100% - $step-icon-size + 35px);
113
+ }
114
+
115
+ .step-icon {
116
+ background-color: #77aa43;
117
+ }
118
+ }
119
+
120
+ &.milestone-future {
121
+ &::before,
122
+ &::after {
123
+ content: "";
124
+ background-color: #9fabbc;
125
+ }
126
+
127
+ &::before {
128
+ top: -35px;
129
+ height: 35px;
130
+ }
131
+
132
+ &:not(:last-child)::after {
133
+ top: $step-icon-size;
134
+ height: calc(100% - $step-icon-size);
135
+ }
136
+
137
+ .step-icon {
138
+ background-color: #9fabbc;
139
+ }
140
+ }
141
+
142
+ &.milestone-current {
143
+ padding: 15px;
144
+ background: #ffffff;
145
+ box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
146
+ border: 1px solid #dedede;
147
+ border-radius: 16px;
148
+ color: #076b9c;
149
+
150
+ .step-icon {
151
+ background-color: #076b9c;
152
+
153
+ &::after {
154
+ display: none;
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
161
+ </style>