wickes-css2 2.103.0-IC-976-pre-commit-lint.1 → 2.103.0-IC-976-pre-commit-lint.3

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 (672) hide show
  1. package/build/css/main.css +1 -1
  2. package/build/css/pages/page_book-consultant-thank-you-new.css +1 -1
  3. package/build/css/pages/page_pre_home_thank-you.css +1 -1
  4. package/build/css/pages/page_top-rated.css +1 -1
  5. package/build/img/TradePaint.svg +42 -14
  6. package/build/img/apple-pay.svg +12 -7
  7. package/build/img/big-white-apple-pay.svg +10 -5
  8. package/build/img/billie-logo.svg +4 -2
  9. package/build/img/billie-modal.svg +4 -2
  10. package/build/img/billie-pdp.svg +12 -9
  11. package/build/img/billie-spinner.svg +5 -3
  12. package/build/img/billie.svg +3 -1
  13. package/build/img/clearpay-logo.svg +6 -1
  14. package/build/img/clearpay-spinner.svg +4 -1
  15. package/build/img/energy-efficiency/energy-marker.svg +12 -1
  16. package/build/img/google-spinner.svg +14 -7
  17. package/build/img/googlepay.svg +23 -12
  18. package/build/img/home-banner_arrow.svg +7 -1
  19. package/build/img/ic-menu.svg +7 -1
  20. package/build/img/ic_info_big.svg +4 -1
  21. package/build/img/klarna-big.svg +18 -9
  22. package/build/img/klarna-sm.svg +5 -2
  23. package/build/img/klarna-spinner.svg +3 -1
  24. package/build/img/logo-klarna.svg +5 -2
  25. package/build/img/mastercard.svg +6 -3
  26. package/build/img/payapal_text.svg +6 -1
  27. package/build/img/payment/checkout/applepay.svg +12 -7
  28. package/build/img/payment/checkout/billie.svg +4 -2
  29. package/build/img/payment/checkout/clearpay.svg +5 -1
  30. package/build/img/payment/checkout/googlepay.svg +23 -12
  31. package/build/img/payment/checkout/mastercard.svg +13 -1
  32. package/build/img/payment/checkout/paypal.svg +37 -1
  33. package/build/img/payment/checkout/visa.svg +8 -1
  34. package/build/img/payment/footer/applepay.svg +12 -7
  35. package/build/img/payment/footer/billie.svg +3 -1
  36. package/build/img/payment/footer/clearpay.svg +18 -10
  37. package/build/img/payment/footer/googlepay.svg +23 -12
  38. package/build/img/payment/footer/mastercard.svg +13 -1
  39. package/build/img/payment/footer/paypal.svg +37 -1
  40. package/build/img/payment/footer/visa.svg +8 -1
  41. package/build/img/paypal.svg +8 -1
  42. package/build/img/paypal_logo_loader_paypal.svg +4 -1
  43. package/build/img/paypal_logo_loader_pp.svg +10 -1
  44. package/build/img/placeholders/full-width-img.svg +9 -1
  45. package/build/img/placeholders/img-2-to-1.svg +9 -1
  46. package/build/img/placeholders/img-3-to-4.svg +9 -1
  47. package/build/img/placeholders/img-4-to-3.svg +9 -1
  48. package/build/img/proposition_arrow_click.svg +7 -1
  49. package/build/img/proposition_delivery.svg +7 -1
  50. package/build/img/proposition_price.svg +7 -1
  51. package/build/img/proposition_returns.svg +7 -1
  52. package/build/img/social-icon-facebook.svg +8 -1
  53. package/build/img/social-icon-instagram.svg +15 -1
  54. package/build/img/social-icon-pinterest.svg +7 -1
  55. package/build/img/socials/facebook.svg +5 -1
  56. package/build/img/socials/instagram.svg +5 -1
  57. package/build/img/socials/pinterest.svg +5 -1
  58. package/build/img/socials/tiktok.svg +5 -1
  59. package/build/img/socials/x-twitter.svg +5 -1
  60. package/build/img/socials/youtube.svg +5 -1
  61. package/build/img/socials_facebook_color.svg +7 -1
  62. package/build/img/socials_facebook_white_blue_color.svg +5 -1
  63. package/build/img/socials_info_big.svg +7 -1
  64. package/build/img/socials_instagram_color.svg +16 -1
  65. package/build/img/socials_pinterest_color.svg +4 -1
  66. package/build/img/socials_twitter_color.svg +4 -1
  67. package/build/img/socials_whatsapp_color.svg +5 -1
  68. package/build/img/socials_youtube_color.svg +4 -1
  69. package/build/img/stars.svg +8 -1
  70. package/build/img/visa-logo.svg +3 -1
  71. package/build/img/wickes-dc-logo.svg +17 -13
  72. package/build/img/wickes-logo-v2.svg +15 -1
  73. package/build/img/wickes-logo.svg +36 -1
  74. package/build/img/young-minds.svg +10 -8
  75. package/build/js/account-members.min.js +1 -1
  76. package/build/js/basket.min.js +2 -2
  77. package/build/js/bootstrap.bundle.min.js +1 -1
  78. package/build/js/bundle.min.js +1 -1
  79. package/build/js/checkout.min.js +2 -2
  80. package/build/js/emulation.min.js +11866 -10333
  81. package/build/js/general.bundle.min.js +1 -1
  82. package/build/js/iframeResizer.min.js +2 -2
  83. package/build/js/kitchen/kitchen-plp.min.js +1 -1
  84. package/build/js/merged-checkout.min.js +2 -2
  85. package/build/js/my-orders.min.js +1 -1
  86. package/build/js/page/accordion.js +31 -29
  87. package/build/js/page/account-deletion.js +13 -13
  88. package/build/js/page/account-hub.js +128 -119
  89. package/build/js/page/account-members.js +229 -216
  90. package/build/js/page/address-book.js +186 -184
  91. package/build/js/page/basket/add-project-list-id.js +158 -130
  92. package/build/js/page/basket/clearpay.js +17 -17
  93. package/build/js/page/basket/display-energy-efficiency.js +13 -13
  94. package/build/js/page/basket/gtm.js +60 -54
  95. package/build/js/page/basket/klarna.js +2 -2
  96. package/build/js/page/basket/paypal.js +33 -33
  97. package/build/js/page/basket/session-sync.js +5 -5
  98. package/build/js/page/basket/summary-mobile.js +16 -16
  99. package/build/js/page/basket/wisdom.js +54 -39
  100. package/build/js/page/basket-v2.js +415 -261
  101. package/build/js/page/basket.js +42 -39
  102. package/build/js/page/billie-business-type.js +22 -22
  103. package/build/js/page/business-account-form.js +12 -12
  104. package/build/js/page/buying-guides-guttering.js +3 -3
  105. package/build/js/page/category-landing.js +18 -11
  106. package/build/js/page/change-password.js +100 -99
  107. package/build/js/page/checkout-confirmation-new.js +127 -70
  108. package/build/js/page/checkout-confirmation.js +6 -6
  109. package/build/js/page/checkout-delivery-address.js +35 -32
  110. package/build/js/page/checkout-delivery-details-loader.js +2 -5
  111. package/build/js/page/checkout-edit-address.js +1 -1
  112. package/build/js/page/checkout-payment-details.js +170 -172
  113. package/build/js/page/checkout-sign-in.js +15 -11
  114. package/build/js/page/checkout.js +1 -1
  115. package/build/js/page/cms-homepage.js +87 -45
  116. package/build/js/page/components/charity.js +114 -120
  117. package/build/js/page/components/csrf.js +4 -4
  118. package/build/js/page/components/discounts.js +39 -39
  119. package/build/js/page/components/favourite-product.js +125 -113
  120. package/build/js/page/components/global-search.js +204 -192
  121. package/build/js/page/components/modal-observer.js +43 -46
  122. package/build/js/page/components/order-summary.js +26 -22
  123. package/build/js/page/components/pagination.js +124 -117
  124. package/build/js/page/components/retry-action.js +2 -2
  125. package/build/js/page/components/saving-shopping-list.js +381 -314
  126. package/build/js/page/components/sticky-order-observer.js +36 -39
  127. package/build/js/page/components/voucher.js +46 -47
  128. package/build/js/page/copy-project-id.js +23 -23
  129. package/build/js/page/countdown-timer.js +6 -6
  130. package/build/js/page/default-store.js +40 -34
  131. package/build/js/page/design-appointment.js +6 -3
  132. package/build/js/page/energy-efficiency.js +39 -25
  133. package/build/js/page/finance-tabs.js +4 -4
  134. package/build/js/page/general/cookie.js +20 -10
  135. package/build/js/page/installation/calculator.js +12 -16
  136. package/build/js/page/installation/fi.js +76 -71
  137. package/build/js/page/installation/generic.js +21 -20
  138. package/build/js/page/installation/installation.js +36 -22
  139. package/build/js/page/installation/pdp-generic.js +3 -9
  140. package/build/js/page/installation/ti.js +26 -24
  141. package/build/js/page/installer-files-form.js +98 -76
  142. package/build/js/page/installer-form.js +502 -447
  143. package/build/js/page/installer-validation.js +848 -761
  144. package/build/js/page/instore-checkout.js +2 -2
  145. package/build/js/page/kitchen/card-carousel.js +21 -21
  146. package/build/js/page/kitchen/colour-swatches.js +153 -149
  147. package/build/js/page/kitchen/kitchen-card.js +62 -64
  148. package/build/js/page/kitchen/mobile-nav.js +26 -27
  149. package/build/js/page/kitchen/plp-filters-chips.js +72 -70
  150. package/build/js/page/kitchen/plp-filters-mobile.js +64 -60
  151. package/build/js/page/kitchen/plp-filters-panel.js +106 -102
  152. package/build/js/page/kitchen/plp-filters-utils.js +54 -53
  153. package/build/js/page/kitchen/plp-filters.js +210 -194
  154. package/build/js/page/kitchen/sort-by.js +149 -149
  155. package/build/js/page/klarna-modal-scroll-disable.js +4 -4
  156. package/build/js/page/merged-checkout.js +6 -3
  157. package/build/js/page/my-account.js +44 -46
  158. package/build/js/page/my-orders.js +153 -149
  159. package/build/js/page/online-exclusive.js +28 -31
  160. package/build/js/page/pdp-favourite.js +4 -4
  161. package/build/js/page/pdp-tile.js +0 -4
  162. package/build/js/page/pdp.js +41 -37
  163. package/build/js/page/personal-details.js +307 -277
  164. package/build/js/page/plp-cards-v2.js +39 -25
  165. package/build/js/page/plp-favourite.js +9 -9
  166. package/build/js/page/plp-img-v2.js +2 -3
  167. package/build/js/page/plp-load-more.js +66 -66
  168. package/build/js/page/plp.js +9 -10
  169. package/build/js/page/pre-home.js +159 -144
  170. package/build/js/page/project-list/generate-project-id.js +77 -68
  171. package/build/js/page/project-list-note.js +234 -232
  172. package/build/js/page/project-list.js +2 -3
  173. package/build/js/page/quiz.js +292 -292
  174. package/build/js/page/select-address.js +27 -14
  175. package/build/js/page/smart-banner.js +8 -5
  176. package/build/js/page/ti.js +67 -42
  177. package/build/js/page/top-rated.js +36 -29
  178. package/build/js/page/track-my-order.js +172 -156
  179. package/build/js/page/tradePro-rewards.js +34 -36
  180. package/build/js/page/utils/array-utils.js +13 -10
  181. package/build/js/page/utils/copy-to-clipboard.js +45 -45
  182. package/build/js/page/utils/create-event.js +8 -8
  183. package/build/js/page/utils/errorMesages.js +12 -11
  184. package/build/js/page/utils/helpers.js +14 -9
  185. package/build/js/page/utils/http-action.js +4 -5
  186. package/build/js/page/utils/loader.js +5 -5
  187. package/build/js/page/utils/routes.js +9 -9
  188. package/build/js/page/utils/url-query.js +4 -4
  189. package/build/js/page/utils/validation.js +93 -96
  190. package/build/js/page/wickes-dc.js +51 -44
  191. package/build/js/page/wismo.js +12 -12
  192. package/build/js/page/your-details.js +77 -41
  193. package/build/js/pdp-favourite-product.bundle.min.js +1 -1
  194. package/build/js/pdp.bundle.min.js +1 -1
  195. package/build/js/personal-details.min.js +1 -1
  196. package/build/js/plp-favourite-product.bundle.min.js +1 -1
  197. package/build/js/plp.bundle.min.js +1 -1
  198. package/build/js/project-list.min.js +16 -16
  199. package/build/js/pstrength.min.js +28 -34
  200. package/build/js/wickers.json +2069 -2069
  201. package/package.json +7 -3
  202. package/src/data/data_account-families.json +1 -1
  203. package/src/data/data_bathroom-installation.json +1 -1
  204. package/src/data/data_bathroom-ranges.json +14 -14
  205. package/src/data/data_business-pages.json +27 -27
  206. package/src/data/data_calendar.json +7 -1
  207. package/src/data/data_checkout-order.json +306 -306
  208. package/src/data/data_contact-us-form.json +17 -17
  209. package/src/data/data_contact-us-reasons.json +16 -16
  210. package/src/data/data_design-appointment.json +27 -12
  211. package/src/data/data_discounts.json +4 -4
  212. package/src/data/data_fdl-new-product.json +6 -6
  213. package/src/data/data_fdl-product.json +75 -87
  214. package/src/data/data_flooring-installation.json +6 -6
  215. package/src/data/data_great-quality.json +2 -2
  216. package/src/data/data_heating-plumbing.json +2 -2
  217. package/src/data/data_how-to_fit-corrugated-sheeting.json +245 -258
  218. package/src/data/data_journey-price-lists.json +1 -1
  219. package/src/data/data_kb-brouchure-requests.json +10 -10
  220. package/src/data/data_kitchen-brochure-request.json +1 -1
  221. package/src/data/data_kitchen-cabinets.json +1 -1
  222. package/src/data/data_kitchen-plp.json +24 -18
  223. package/src/data/data_kitchen-ranges.json +21 -23
  224. package/src/data/data_latest-offers.json +1044 -1044
  225. package/src/data/data_locators.json +130 -132
  226. package/src/data/data_next-steps.json +20 -20
  227. package/src/data/data_notification-page.json +72 -24
  228. package/src/data/data_online-ranges.json +1 -1
  229. package/src/data/data_page-category-hub.json +1 -1
  230. package/src/data/data_page-confirmation.json +9 -9
  231. package/src/data/data_page-project-multiple-list.json +18 -18
  232. package/src/data/data_pre-home.json +1090 -1082
  233. package/src/data/data_price-event-new.json +1 -1
  234. package/src/data/data_saved-project-list.json +8 -8
  235. package/src/data/data_seo-widgets.json +31 -31
  236. package/src/data/data_shopping-cart-v2.json +1 -2
  237. package/src/data/data_shopping-cart-with-energy.json +229 -229
  238. package/src/data/data_storage-solutions.json +99 -99
  239. package/src/data/data_tile-installation.json +1 -1
  240. package/src/data/data_top-rated-perfect-product.json +204 -204
  241. package/src/data/data_trade-essentials.json +1 -1
  242. package/src/data/data_tradePro_cards.json +0 -1
  243. package/src/data/data_user-address-saved.json +33 -33
  244. package/src/data/data_voucher_tradePro.json +5 -5
  245. package/src/data/data_wismo.json +12 -12
  246. package/src/data/how-to-guides/data-how_to_fit-bath-and-taps.json +2 -2
  247. package/src/data/how-to-guides/data_how-to-change-door-window-furniture.json +274 -274
  248. package/src/data/how-to-guides/data_how-to-fit-door-locks.json +3 -8
  249. package/src/data/how-to-guides/data_how-to-fit-worktop.json +5 -13
  250. package/src/data/how-to-guides/data_how-to-fit_basin-and-taps.json +2 -6
  251. package/src/data/how-to-guides/data_how-to-fit_bath-and-taps.json +3 -10
  252. package/src/data/how-to-guides/data_how-to-plumb-a-kitchen-appliance.json +3 -7
  253. package/src/data/how-to-guides/data_how-to-unblock-sink.json +5 -7
  254. package/src/data/how-to-guides/data_how-to_bleed-radiator.json +134 -134
  255. package/src/data/how-to-guides/data_how-to_build-raised-deck.json +4 -4
  256. package/src/data/how-to-guides/data_how-to_change-socket.json +2 -2
  257. package/src/data/how-to-guides/data_how-to_fit-guttering.json +282 -282
  258. package/src/data/how-to-guides/data_how-to_fit-toilet.json +2 -2
  259. package/src/data/how-to-guides/data_how-to_fit-wall-tiles.json +77 -23
  260. package/src/data/how-to-guides/data_how-to_fit-worktops.json +3 -4
  261. package/src/data/how-to-guides/data_how-to_fix-leaking-sink.json +3 -3
  262. package/src/data/how-to-guides/data_how-to_fix-leaking-tap.json +3 -3
  263. package/src/data/how-to-guides/data_how-to_garden-calendar.json +4 -5
  264. package/src/data/how-to-guides/data_how-to_grow-fruit-veg.json +3 -3
  265. package/src/data/how-to-guides/data_how-to_hang-internal-door.json +266 -266
  266. package/src/data/how-to-guides/data_how-to_install-artificial-grass.json +3 -4
  267. package/src/data/how-to-guides/data_how-to_install-base-wall-cabinets.json +3 -4
  268. package/src/data/how-to-guides/data_how-to_install-composite-decking.json +6 -14
  269. package/src/data/how-to-guides/data_how-to_install-deck-lighting.json +4 -7
  270. package/src/data/how-to-guides/data_how-to_install-fence.json +5 -5
  271. package/src/data/how-to-guides/data_how-to_insulate-loft.json +2 -2
  272. package/src/data/how-to-guides/data_how-to_lay-deck.json +4 -6
  273. package/src/data/how-to-guides/data_how-to_lay-laminate-flooring.json +3 -8
  274. package/src/data/how-to-guides/data_how-to_lay-maintain-turf.json +4 -4
  275. package/src/data/how-to-guides/data_how-to_lay-path.json +5 -6
  276. package/src/data/how-to-guides/data_how-to_lay-patio.json +5 -5
  277. package/src/data/how-to-guides/data_how-to_lay-solid-wood-flooring.json +0 -8
  278. package/src/data/how-to-guides/data_how-to_lay-vinyl-carpet-tiles.json +3 -3
  279. package/src/data/how-to-guides/data_how-to_paint-a-room.json +5 -5
  280. package/src/data/how-to-guides/data_how-to_plaster-wall.json +8 -6
  281. package/src/data/how-to-guides/data_how-to_plumb-kitchen-appliances.json +3 -3
  282. package/src/data/how-to-guides/data_how-to_prepare-interior-woodwork.json +5 -5
  283. package/src/data/how-to-guides/data_how-to_prepare-paint-exterior-walls.json +1 -1
  284. package/src/data/how-to-guides/data_how-to_prepare-wall-and-ceilings.json +9 -9
  285. package/src/data/how-to-guides/data_how-to_put_up_shelf.json +4 -4
  286. package/src/data/how-to-guides/data_how-to_remove-replace-tiles.json +3 -3
  287. package/src/data/how-to-guides/data_how-to_repair-wall.json +384 -385
  288. package/src/data/how-to-guides/data_how-to_tile-bathroom.json +3 -4
  289. package/src/data/how-to-guides/data_how-to_unblock-sink.json +3 -3
  290. package/src/data/how-to-guides/data_install-composite-decking.json +4 -4
  291. package/src/data/how-to-guides/data_planting-techniques.json +3 -3
  292. package/src/data/how-to-guides/fit-roofing-shingles.json +4 -4
  293. package/src/data/how-to-guides/hubs/data_how-to_hub_home.json +1 -1
  294. package/src/data/my-account/data_address-book.json +12 -3
  295. package/src/data/my-account/data_my-order.json +1 -1
  296. package/src/data/my-account/data_personal-details.json +32 -8
  297. package/src/data/navigation.json +1016 -805
  298. package/src/data/page_how-to-choose-your-doors.json +1 -2
  299. package/src/data/public/wickers.json +2069 -2069
  300. package/src/img/TradePaint.svg +42 -14
  301. package/src/img/apple-pay.svg +12 -7
  302. package/src/img/big-white-apple-pay.svg +10 -5
  303. package/src/img/billie-logo.svg +4 -2
  304. package/src/img/billie-modal.svg +4 -2
  305. package/src/img/billie-pdp.svg +12 -9
  306. package/src/img/billie-spinner.svg +5 -3
  307. package/src/img/billie.svg +3 -1
  308. package/src/img/clearpay-logo.svg +6 -1
  309. package/src/img/clearpay-spinner.svg +4 -1
  310. package/src/img/energy-efficiency/energy-marker.svg +12 -1
  311. package/src/img/google-spinner.svg +14 -7
  312. package/src/img/googlepay.svg +23 -12
  313. package/src/img/home-banner_arrow.svg +7 -1
  314. package/src/img/ic-menu.svg +7 -1
  315. package/src/img/ic_info_big.svg +4 -1
  316. package/src/img/klarna-big.svg +18 -9
  317. package/src/img/klarna-sm.svg +5 -2
  318. package/src/img/klarna-spinner.svg +3 -1
  319. package/src/img/logo-klarna.svg +5 -2
  320. package/src/img/mastercard.svg +6 -3
  321. package/src/img/payapal_text.svg +6 -1
  322. package/src/img/payment/checkout/applepay.svg +12 -7
  323. package/src/img/payment/checkout/billie.svg +4 -2
  324. package/src/img/payment/checkout/clearpay.svg +5 -1
  325. package/src/img/payment/checkout/googlepay.svg +23 -12
  326. package/src/img/payment/checkout/mastercard.svg +13 -1
  327. package/src/img/payment/checkout/paypal.svg +37 -1
  328. package/src/img/payment/checkout/visa.svg +8 -1
  329. package/src/img/payment/footer/applepay.svg +12 -7
  330. package/src/img/payment/footer/billie.svg +3 -1
  331. package/src/img/payment/footer/clearpay.svg +18 -10
  332. package/src/img/payment/footer/googlepay.svg +23 -12
  333. package/src/img/payment/footer/mastercard.svg +13 -1
  334. package/src/img/payment/footer/paypal.svg +37 -1
  335. package/src/img/payment/footer/visa.svg +8 -1
  336. package/src/img/paypal.svg +8 -1
  337. package/src/img/paypal_logo_loader_paypal.svg +4 -1
  338. package/src/img/paypal_logo_loader_pp.svg +10 -1
  339. package/src/img/placeholders/full-width-img.svg +9 -1
  340. package/src/img/placeholders/img-2-to-1.svg +9 -1
  341. package/src/img/placeholders/img-3-to-4.svg +9 -1
  342. package/src/img/placeholders/img-4-to-3.svg +9 -1
  343. package/src/img/proposition_arrow_click.svg +7 -1
  344. package/src/img/proposition_delivery.svg +7 -1
  345. package/src/img/proposition_price.svg +7 -1
  346. package/src/img/proposition_returns.svg +7 -1
  347. package/src/img/social-icon-facebook.svg +8 -1
  348. package/src/img/social-icon-instagram.svg +15 -1
  349. package/src/img/social-icon-pinterest.svg +7 -1
  350. package/src/img/socials/facebook.svg +5 -1
  351. package/src/img/socials/instagram.svg +5 -1
  352. package/src/img/socials/pinterest.svg +5 -1
  353. package/src/img/socials/tiktok.svg +5 -1
  354. package/src/img/socials/x-twitter.svg +5 -1
  355. package/src/img/socials/youtube.svg +5 -1
  356. package/src/img/socials_facebook_color.svg +7 -1
  357. package/src/img/socials_facebook_white_blue_color.svg +5 -1
  358. package/src/img/socials_info_big.svg +7 -1
  359. package/src/img/socials_instagram_color.svg +16 -1
  360. package/src/img/socials_pinterest_color.svg +4 -1
  361. package/src/img/socials_twitter_color.svg +4 -1
  362. package/src/img/socials_whatsapp_color.svg +5 -1
  363. package/src/img/socials_youtube_color.svg +4 -1
  364. package/src/img/stars.svg +8 -1
  365. package/src/img/visa-logo.svg +3 -1
  366. package/src/img/wickes-dc-logo.svg +17 -13
  367. package/src/img/wickes-logo-v2.svg +15 -1
  368. package/src/img/wickes-logo.svg +36 -1
  369. package/src/img/young-minds.svg +10 -8
  370. package/src/js/components/anchors-scroll.js +9 -6
  371. package/src/js/components/badge-cashback.js +5 -6
  372. package/src/js/components/banner-placement-manager.js +269 -232
  373. package/src/js/components/card-color-slider.js +29 -29
  374. package/src/js/components/card-slider.js +78 -73
  375. package/src/js/components/cards-slider.js +64 -58
  376. package/src/js/components/charity-donations.js +3 -4
  377. package/src/js/components/checkout_your-details.js +68 -67
  378. package/src/js/components/clamp.js +47 -32
  379. package/src/js/components/click-disable.js +7 -7
  380. package/src/js/components/date-selection.js +50 -37
  381. package/src/js/components/file-loader.js +33 -33
  382. package/src/js/components/finance.js +3 -4
  383. package/src/js/components/flatpickr.js +135 -149
  384. package/src/js/components/gallery-pdp.js +97 -98
  385. package/src/js/components/gallery-range.js +107 -109
  386. package/src/js/components/general/accordion.js +31 -29
  387. package/src/js/components/general/back-to-top.js +40 -37
  388. package/src/js/components/general/backdrop.js +15 -15
  389. package/src/js/components/general/cart-slider.js +15 -12
  390. package/src/js/components/general/clamp-content.js +80 -80
  391. package/src/js/components/general/clamp.js +53 -38
  392. package/src/js/components/general/clear-input.js +25 -25
  393. package/src/js/components/general/cookie-chat-back.js +19 -13
  394. package/src/js/components/general/cookies-policy.js +5 -5
  395. package/src/js/components/general/create-popup-slider.js +169 -175
  396. package/src/js/components/general/device-type.js +3 -3
  397. package/src/js/components/general/footer.js +82 -52
  398. package/src/js/components/general/handleAccordion.js +28 -28
  399. package/src/js/components/general/is-trade-pro.js +15 -9
  400. package/src/js/components/general/main-nav.js +8 -8
  401. package/src/js/components/general/main-navigation.js +67 -73
  402. package/src/js/components/general/mini-basket-slider.js +6 -6
  403. package/src/js/components/general/notification.js +58 -40
  404. package/src/js/components/general/offer-banner.js +58 -58
  405. package/src/js/components/general/scroll-disable.js +45 -44
  406. package/src/js/components/general/search-filter.js +16 -16
  407. package/src/js/components/general/search.js +27 -29
  408. package/src/js/components/general/snack-bar.js +20 -11
  409. package/src/js/components/general/sticky_header.js +8 -7
  410. package/src/js/components/general/switchVat.js +154 -154
  411. package/src/js/components/general/text-clamp.js +14 -16
  412. package/src/js/components/general/tooltips.js +2 -2
  413. package/src/js/components/general/validation.js +47 -41
  414. package/src/js/components/leave-event.js +116 -113
  415. package/src/js/components/loader.js +11 -11
  416. package/src/js/components/modal-slider.js +57 -52
  417. package/src/js/components/order-item-cc.js +59 -69
  418. package/src/js/components/pdp-read-more.js +7 -11
  419. package/src/js/components/pdp-video.js +2 -2
  420. package/src/js/components/pwdstrength.js +13 -17
  421. package/src/js/components/range-cards.js +12 -12
  422. package/src/js/components/range-types.js +11 -11
  423. package/src/js/components/scrollbar.js +23 -20
  424. package/src/js/components/share-project-list.js +4 -5
  425. package/src/js/components/show-more-less.js +2 -2
  426. package/src/js/components/similar-slider.js +19 -10
  427. package/src/js/components/sticky-aside.js +84 -83
  428. package/src/js/components/store-locator-facilities.js +17 -15
  429. package/src/js/components/tabs.js +16 -17
  430. package/src/js/components/toggle-password-visibility.js +50 -50
  431. package/src/js/components/tradepro-notification-copy.js +5 -6
  432. package/src/js/components/voucher-remove.js +1 -2
  433. package/src/js/components/wisdom.js +35 -26
  434. package/src/js/components/zoom.js +67 -59
  435. package/src/js/emulation/account-hub.js +40 -40
  436. package/src/js/emulation/account-members.js +37 -36
  437. package/src/js/emulation/add-project-list-id-local.js +24 -18
  438. package/src/js/emulation/add.to.any.customisation.js +44 -38
  439. package/src/js/emulation/autocomplete.js +123 -114
  440. package/src/js/emulation/banner-placement-manager.js +40 -35
  441. package/src/js/emulation/basket-data.js +2123 -2037
  442. package/src/js/emulation/basket.js +58 -57
  443. package/src/js/emulation/big-wins.js +1079 -903
  444. package/src/js/emulation/chat-bot.js +14 -14
  445. package/src/js/emulation/checkLocalEnv.js +4 -4
  446. package/src/js/emulation/checkout-delivery-details.js +28 -25
  447. package/src/js/emulation/checkout-payment-details.js +46 -37
  448. package/src/js/emulation/checkout-sign-in-emulation.js +36 -33
  449. package/src/js/emulation/checkout_your-details.js +47 -46
  450. package/src/js/emulation/click-and-collect-modal.js +18 -20
  451. package/src/js/emulation/cnc-notifications.js +9 -10
  452. package/src/js/emulation/custom-slider-emulation.js +16 -17
  453. package/src/js/emulation/date-selection.js +25 -25
  454. package/src/js/emulation/default-store.js +92 -86
  455. package/src/js/emulation/favourite-product-local.js +31 -29
  456. package/src/js/emulation/find-address.js +41 -42
  457. package/src/js/emulation/footer-date.js +6 -3
  458. package/src/js/emulation/forms.js +352 -308
  459. package/src/js/emulation/generate-project-id-local.js +26 -23
  460. package/src/js/emulation/global-search-local.js +125 -122
  461. package/src/js/emulation/google-maps-store-info.js +25 -29
  462. package/src/js/emulation/home-movers.js +47 -49
  463. package/src/js/emulation/input-file.js +638 -558
  464. package/src/js/emulation/kitchen-plp-data.js +4528 -3670
  465. package/src/js/emulation/loadMore.js +13 -14
  466. package/src/js/emulation/main-nav-data.js +1058 -848
  467. package/src/js/emulation/mini-basket.js +34 -34
  468. package/src/js/emulation/mini-cart.js +12 -11
  469. package/src/js/emulation/mock.js +23 -23
  470. package/src/js/emulation/my-orders-local.js +30 -30
  471. package/src/js/emulation/paymentLoader.js +16 -16
  472. package/src/js/emulation/pdf-file-loader.js +88 -90
  473. package/src/js/emulation/pdp.js +18 -12
  474. package/src/js/emulation/personal-details-local.js +57 -56
  475. package/src/js/emulation/plp-load-more.js +16 -13
  476. package/src/js/emulation/popover-mini-basket.js +244 -238
  477. package/src/js/emulation/project-list-multiple.js +24 -18
  478. package/src/js/emulation/project-list-pdp.js +319 -316
  479. package/src/js/emulation/project-list-print.js +43 -40
  480. package/src/js/emulation/quiz-local.js +11 -11
  481. package/src/js/emulation/reference-field.js +2 -7
  482. package/src/js/emulation/selectable.js +19 -18
  483. package/src/js/emulation/shopping-list.js +19 -17
  484. package/src/js/emulation/sign-up.js +17 -21
  485. package/src/js/emulation/store-locator-list.js +11 -13
  486. package/src/js/emulation/switchCalendar.js +12 -8
  487. package/src/js/emulation/total-amount-loader.js +14 -13
  488. package/src/js/emulation/user.js +32 -32
  489. package/src/js/emulation/vat-toggle.js +1 -1
  490. package/src/js/emulation/wickes-responsive.js +178 -189
  491. package/src/js/emulation/wismo-details.js +22 -30
  492. package/src/js/emulation/your-details.js +34 -22
  493. package/src/js/helpers/jquery.cookiebar.js +270 -192
  494. package/src/js/helpers/responsive.js +69 -69
  495. package/src/js/helpers/safari-back.js +4 -4
  496. package/src/js/libs/bootstrap.bundle.min.js +1 -1
  497. package/src/js/libs/iframeResizer.min.js +2 -2
  498. package/src/js/libs/jquery.pstrength.custom-1.2.0.js +28 -34
  499. package/src/js/libs/simplebar.js +3 -3
  500. package/src/js/page/accordion.js +31 -29
  501. package/src/js/page/account-deletion.js +13 -13
  502. package/src/js/page/account-hub.js +128 -119
  503. package/src/js/page/account-members.js +229 -216
  504. package/src/js/page/address-book.js +186 -184
  505. package/src/js/page/basket/add-project-list-id.js +158 -130
  506. package/src/js/page/basket/clearpay.js +17 -17
  507. package/src/js/page/basket/display-energy-efficiency.js +13 -13
  508. package/src/js/page/basket/gtm.js +60 -54
  509. package/src/js/page/basket/klarna.js +2 -2
  510. package/src/js/page/basket/paypal.js +33 -33
  511. package/src/js/page/basket/session-sync.js +5 -5
  512. package/src/js/page/basket/summary-mobile.js +16 -16
  513. package/src/js/page/basket/wisdom.js +54 -39
  514. package/src/js/page/basket-v2.js +415 -261
  515. package/src/js/page/basket.js +42 -39
  516. package/src/js/page/billie-business-type.js +22 -22
  517. package/src/js/page/business-account-form.js +12 -12
  518. package/src/js/page/buying-guides-guttering.js +3 -3
  519. package/src/js/page/category-landing.js +18 -11
  520. package/src/js/page/change-password.js +100 -99
  521. package/src/js/page/checkout-confirmation-new.js +127 -70
  522. package/src/js/page/checkout-confirmation.js +6 -6
  523. package/src/js/page/checkout-delivery-address.js +35 -32
  524. package/src/js/page/checkout-delivery-details-loader.js +2 -5
  525. package/src/js/page/checkout-edit-address.js +1 -1
  526. package/src/js/page/checkout-payment-details.js +170 -172
  527. package/src/js/page/checkout-sign-in.js +15 -11
  528. package/src/js/page/checkout.js +1 -1
  529. package/src/js/page/cms-homepage.js +87 -45
  530. package/src/js/page/components/charity.js +114 -120
  531. package/src/js/page/components/csrf.js +4 -4
  532. package/src/js/page/components/discounts.js +39 -39
  533. package/src/js/page/components/favourite-product.js +125 -113
  534. package/src/js/page/components/global-search.js +204 -192
  535. package/src/js/page/components/modal-observer.js +43 -46
  536. package/src/js/page/components/order-summary.js +26 -22
  537. package/src/js/page/components/pagination.js +124 -117
  538. package/src/js/page/components/retry-action.js +2 -2
  539. package/src/js/page/components/saving-shopping-list.js +381 -314
  540. package/src/js/page/components/sticky-order-observer.js +36 -39
  541. package/src/js/page/components/voucher.js +46 -47
  542. package/src/js/page/copy-project-id.js +23 -23
  543. package/src/js/page/countdown-timer.js +6 -6
  544. package/src/js/page/default-store.js +40 -34
  545. package/src/js/page/design-appointment.js +6 -3
  546. package/src/js/page/energy-efficiency.js +39 -25
  547. package/src/js/page/finance-tabs.js +4 -4
  548. package/src/js/page/general/cookie.js +20 -10
  549. package/src/js/page/installation/calculator.js +12 -16
  550. package/src/js/page/installation/fi.js +76 -71
  551. package/src/js/page/installation/generic.js +21 -20
  552. package/src/js/page/installation/installation.js +36 -22
  553. package/src/js/page/installation/pdp-generic.js +3 -9
  554. package/src/js/page/installation/ti.js +26 -24
  555. package/src/js/page/installer-files-form.js +98 -76
  556. package/src/js/page/installer-form.js +502 -447
  557. package/src/js/page/installer-validation.js +848 -761
  558. package/src/js/page/instore-checkout.js +2 -2
  559. package/src/js/page/kitchen/card-carousel.js +21 -21
  560. package/src/js/page/kitchen/colour-swatches.js +153 -149
  561. package/src/js/page/kitchen/kitchen-card.js +62 -64
  562. package/src/js/page/kitchen/mobile-nav.js +26 -27
  563. package/src/js/page/kitchen/plp-filters-chips.js +72 -70
  564. package/src/js/page/kitchen/plp-filters-mobile.js +64 -60
  565. package/src/js/page/kitchen/plp-filters-panel.js +106 -102
  566. package/src/js/page/kitchen/plp-filters-utils.js +54 -53
  567. package/src/js/page/kitchen/plp-filters.js +210 -194
  568. package/src/js/page/kitchen/sort-by.js +149 -149
  569. package/src/js/page/klarna-modal-scroll-disable.js +4 -4
  570. package/src/js/page/merged-checkout.js +6 -3
  571. package/src/js/page/my-account.js +44 -46
  572. package/src/js/page/my-orders.js +153 -149
  573. package/src/js/page/online-exclusive.js +28 -31
  574. package/src/js/page/pdp-favourite.js +4 -4
  575. package/src/js/page/pdp-tile.js +0 -4
  576. package/src/js/page/pdp.js +41 -37
  577. package/src/js/page/personal-details.js +307 -277
  578. package/src/js/page/plp-cards-v2.js +39 -25
  579. package/src/js/page/plp-favourite.js +9 -9
  580. package/src/js/page/plp-img-v2.js +2 -3
  581. package/src/js/page/plp-load-more.js +66 -66
  582. package/src/js/page/plp.js +9 -10
  583. package/src/js/page/pre-home.js +159 -144
  584. package/src/js/page/project-list/generate-project-id.js +77 -68
  585. package/src/js/page/project-list-note.js +234 -232
  586. package/src/js/page/project-list.js +2 -3
  587. package/src/js/page/quiz.js +292 -292
  588. package/src/js/page/select-address.js +27 -14
  589. package/src/js/page/smart-banner.js +8 -5
  590. package/src/js/page/ti.js +67 -42
  591. package/src/js/page/top-rated.js +36 -29
  592. package/src/js/page/track-my-order.js +172 -156
  593. package/src/js/page/tradePro-rewards.js +34 -36
  594. package/src/js/page/utils/array-utils.js +13 -10
  595. package/src/js/page/utils/copy-to-clipboard.js +45 -45
  596. package/src/js/page/utils/create-event.js +8 -8
  597. package/src/js/page/utils/errorMesages.js +12 -11
  598. package/src/js/page/utils/helpers.js +14 -9
  599. package/src/js/page/utils/http-action.js +4 -5
  600. package/src/js/page/utils/loader.js +5 -5
  601. package/src/js/page/utils/routes.js +9 -9
  602. package/src/js/page/utils/url-query.js +4 -4
  603. package/src/js/page/utils/validation.js +93 -96
  604. package/src/js/page/wickes-dc.js +51 -44
  605. package/src/js/page/wismo.js +12 -12
  606. package/src/js/page/your-details.js +77 -41
  607. package/src/layouts/app_sticky_header.hbs +0 -1
  608. package/src/scss/barclays-paypage-combined.css +585 -585
  609. package/src/scss/barclays-paypage-desktop.css +496 -496
  610. package/src/scss/barclays-paypage-mobile.css +494 -494
  611. package/src/scss/category-main.scss +8 -2
  612. package/src/scss/common/_cat-common.scss +1 -0
  613. package/src/scss/common/_plp-common.scss +1 -0
  614. package/src/scss/components/_billie-modal.scss +2 -2
  615. package/src/scss/components/_card.scss +1 -0
  616. package/src/scss/components/_find-a-store.scss +1 -0
  617. package/src/scss/components/_gallery-pdp-critical.scss +2 -2
  618. package/src/scss/components/_kitchen-card.scss +2 -2
  619. package/src/scss/components/_notifications-critical.scss +2 -2
  620. package/src/scss/components/_offer-banner.scss +1 -0
  621. package/src/scss/components/_order-summary.scss +1 -1
  622. package/src/scss/components/_page-overlay.scss +1 -1
  623. package/src/scss/components/_price-block.scss +1 -0
  624. package/src/scss/components/_price.scss +1 -1
  625. package/src/scss/components/_range-card.scss +0 -1
  626. package/src/scss/components/_recommended.scss +0 -1
  627. package/src/scss/components/_rewards.scss +1 -1
  628. package/src/scss/components/_share-list-modal.scss +1 -1
  629. package/src/scss/components/_shopping-list-note.scss +1 -1
  630. package/src/scss/components/_steps-three.scss +1 -1
  631. package/src/scss/components/_steps.scss +2 -2
  632. package/src/scss/components/_tc-generic.scss +1 -1
  633. package/src/scss/components/_thank-you-modal.scss +3 -1
  634. package/src/scss/components/_ti-total-area.scss +1 -1
  635. package/src/scss/components/_user-address-delivery.scss +1 -1
  636. package/src/scss/components/kitchen/_price.scss +1 -1
  637. package/src/scss/components/my-account/_contacts.scss +3 -1
  638. package/src/scss/components/special-opening-schedule-v2.scss +3 -3
  639. package/src/scss/components/special-opening-schedule.scss +2 -2
  640. package/src/scss/helpers/_variables.scss +157 -154
  641. package/src/scss/helpers/helpers-pdp-critical/_elements-critical-pdp.scss +1 -0
  642. package/src/scss/helpers/helpers-pdp-critical/_helpers-critical-pdp.scss +4 -0
  643. package/src/scss/libs/_bootstrap-extracted.scss +24 -6
  644. package/src/scss/libs/_skeleton.scss +3 -3
  645. package/src/scss/libs/simplebar.css +3 -3
  646. package/src/scss/libs/swiper.css +479 -384
  647. package/src/scss/main.scss +140 -70
  648. package/src/scss/my-account-main-v2.scss +38 -19
  649. package/src/scss/my-account-main.scss +38 -19
  650. package/src/scss/pages/_checkout-widget.scss +1 -1
  651. package/src/scss/pages/_checkout_your-details.scss +1 -0
  652. package/src/scss/pages/checkout-new.scss +1 -0
  653. package/src/scss/pages/checkout.scss +1 -0
  654. package/src/scss/pages/iframe-paypage.scss +9 -8
  655. package/src/scss/pages/page_book-consultant-thank-you-new.scss +2 -2
  656. package/src/scss/pages/page_installer.scss +2 -2
  657. package/src/scss/pages/page_my-account_tradePro.scss +1 -1
  658. package/src/scss/pages/page_new-checkout_login-register.scss +1 -1
  659. package/src/scss/pages/page_pre_home_thank-you.scss +2 -2
  660. package/src/scss/pages/page_product-details-critical.scss +1 -0
  661. package/src/scss/pages/page_products-list-combined.scss +4 -0
  662. package/src/scss/pages/page_store-locator-details.scss +1 -1
  663. package/src/scss/pages/page_top-rated.scss +14 -14
  664. package/src/scss/pages/page_wismo-details.scss +1 -1
  665. package/src/scss/pages/tradePro-rewards-old.scss +1 -1
  666. package/src/scss/partials/_breadcrumbs-critical.scss +2 -2
  667. package/src/scss/partials/_breadcrumbs.scss +2 -2
  668. package/src/scss/partials/_header-critical.scss +1 -1
  669. package/src/scss/partials/_header.scss +1 -1
  670. package/src/scss/store-locator-main.scss +3 -0
  671. package/build/js/page/business-pages.js +0 -13
  672. package/src/js/page/business-pages.js +0 -13
@@ -1,4 +1,4 @@
1
- import {updateEeaProducts, updateEeaCheckoutProducts, syncEeaProducts} from './basket/gtm';
1
+ import { updateEeaProducts, updateEeaCheckoutProducts, syncEeaProducts } from './basket/gtm';
2
2
  import {
3
3
  toggleWisdom,
4
4
  checkDeliveryStock,
@@ -6,31 +6,31 @@ import {
6
6
  createWisdom,
7
7
  changeWisdomWhenQuantityUpdated,
8
8
  checkDeliveryStockOnEnter,
9
- prettifyWisdomPostcode
9
+ prettifyWisdomPostcode,
10
10
  } from './basket/wisdom';
11
- import {updateOrderSummary} from './components/order-summary';
12
- import {checkVoucherCode, voucherRemove} from './components/voucher';
13
- import {updateKlarnaPlacements} from './basket/klarna';
14
- import {updateClearpayPlacements, updateClearpayVisibility} from './basket/clearpay';
15
- import {checkPayPalAvailability} from './basket/paypal';
11
+ import { updateOrderSummary } from './components/order-summary';
12
+ import { checkVoucherCode, voucherRemove } from './components/voucher';
13
+ import { updateKlarnaPlacements } from './basket/klarna';
14
+ import { updateClearpayPlacements, updateClearpayVisibility } from './basket/clearpay';
15
+ import { checkPayPalAvailability } from './basket/paypal';
16
16
  import {
17
17
  updateCharity,
18
18
  changeCharityPrice,
19
19
  setDefaultCharityValue,
20
20
  initCharityInteractions,
21
21
  } from './components/charity';
22
- import {callAction} from './utils/http-action';
23
- import {ROUTES} from './utils/routes';
22
+ import { callAction } from './utils/http-action';
23
+ import { ROUTES } from './utils/routes';
24
24
  import {
25
25
  getUniqBasketSessionId,
26
26
  updateBasketSession,
27
27
  addStorageCheckEvent,
28
28
  updateBasketDataQuantity,
29
- } from './basket/session-sync'
30
- import {displayEnergyEfficiency} from "./basket/display-energy-efficiency";
31
- import {appendLoader, hideLoader, showLoader} from "./utils/loader";
29
+ } from './basket/session-sync';
30
+ import { displayEnergyEfficiency } from './basket/display-energy-efficiency';
31
+ import { appendLoader, hideLoader, showLoader } from './utils/loader';
32
32
  import { initStickyObserver } from './components/sticky-order-observer';
33
- import {addClassToSummaryAside} from "./basket/summary-mobile";
33
+ import { addClassToSummaryAside } from './basket/summary-mobile';
34
34
 
35
35
  var Wick = window.Wick || {};
36
36
  Wick.BasketPage = {
@@ -107,15 +107,15 @@ Wick.BasketPage = {
107
107
  titleItems: '.checkout-title__items',
108
108
  wisdomPostcode: '.wisdom-postcode',
109
109
  orderItemQuantityControl: '.order-item__quantity-control',
110
- loader: '.basket-loader'
110
+ loader: '.basket-loader',
111
111
  },
112
112
  cartEntries: [],
113
113
  sessionId: getUniqBasketSessionId(),
114
114
  loaderPayload: {
115
115
  wrapper: 'body',
116
116
  hidden: true,
117
- titleLoader: "Updating basket…",
118
- modifier: "basket-loader"
117
+ titleLoader: 'Updating basket…',
118
+ modifier: 'basket-loader',
119
119
  },
120
120
  getEqualMapForUpdateCart: function (data) {
121
121
  return [
@@ -124,34 +124,34 @@ Wick.BasketPage = {
124
124
  itemValue: Wick.BasketPage.el.value,
125
125
  dataValue: data.subtotalWithoutCharity.formattedValue,
126
126
  value: data.subTotal.value,
127
- title: 'Items subtotal:'
127
+ title: 'Items subtotal:',
128
128
  },
129
129
  {
130
130
  item: Wick.BasketPage.el.vat,
131
131
  itemValue: Wick.BasketPage.el.value,
132
132
  dataValue: data.totalTax.formattedValue,
133
133
  value: data.totalTax.value,
134
- title: 'VAT:'
134
+ title: 'VAT:',
135
135
  },
136
136
  {
137
137
  item: Wick.BasketPage.el.cc,
138
138
  itemValue: Wick.BasketPage.el.value,
139
139
  dataValue: 'Free',
140
- title: 'Click & Collect:'
140
+ title: 'Click & Collect:',
141
141
  },
142
142
  {
143
143
  item: Wick.BasketPage.el.delivery,
144
144
  itemValue: Wick.BasketPage.el.value,
145
145
  dataValue: data.deliveryCost.formattedValue,
146
146
  value: data.deliveryCost.value,
147
- title: 'Delivery:'
147
+ title: 'Delivery:',
148
148
  },
149
149
  {
150
150
  item: Wick.BasketPage.el.charity,
151
151
  itemValue: Wick.BasketPage.el.value,
152
152
  dataValue: data.charityPrice.formattedValue,
153
153
  value: data.charityPrice.value,
154
- title: 'Charity donation:'
154
+ title: 'Charity donation:',
155
155
  },
156
156
  {
157
157
  item: Wick.BasketPage.el.discountItem,
@@ -197,14 +197,24 @@ Wick.BasketPage = {
197
197
  value = Number.parseInt(value, 10) + 1;
198
198
  if (value) {
199
199
  Wick.BasketPage.updateQuantity(quantityInput, value);
200
- Wick.BasketPage.debounceQuantityChange(entryNumber, value, quantityInput, context);
200
+ Wick.BasketPage.debounceQuantityChange(
201
+ entryNumber,
202
+ value,
203
+ quantityInput,
204
+ context
205
+ );
201
206
  }
202
207
  break;
203
208
  case 'minus':
204
209
  value = Number.parseInt(value, 10) - 1;
205
210
  if (value > 0) {
206
211
  Wick.BasketPage.updateQuantity(quantityInput, value);
207
- Wick.BasketPage.debounceQuantityChange(entryNumber, value, quantityInput, context);
212
+ Wick.BasketPage.debounceQuantityChange(
213
+ entryNumber,
214
+ value,
215
+ quantityInput,
216
+ context
217
+ );
208
218
  } else {
209
219
  Wick.BasketPage.removeQuantityDisable();
210
220
  }
@@ -218,17 +228,22 @@ Wick.BasketPage = {
218
228
  default:
219
229
  if (+value !== 0) {
220
230
  Wick.BasketPage.updateQuantity(quantityInput, value);
221
- Wick.BasketPage.debounceQuantityChange(entryNumber, value, quantityInput, context);
231
+ Wick.BasketPage.debounceQuantityChange(
232
+ entryNumber,
233
+ value,
234
+ quantityInput,
235
+ context
236
+ );
222
237
  }
223
238
  break;
224
239
  }
225
240
 
226
241
  changeWisdomWhenQuantityUpdated(e, context);
227
- Wick.BasketPage.toggleItemTotal(context, +quantityInput.val())
242
+ Wick.BasketPage.toggleItemTotal(context, +quantityInput.val());
228
243
  },
229
244
  debounceQuantityChange: _.debounce(function (entryNumber, value, quantityInput, context) {
230
245
  showLoader(Wick.BasketPage.el.loader);
231
- Wick.BasketPage.updateQuantityAction(entryNumber, value, quantityInput, context)
246
+ Wick.BasketPage.updateQuantityAction(entryNumber, value, quantityInput, context);
232
247
  }, 500),
233
248
  updateQuantityAction: function (entryNumber, quantityToUpdate, quantityInput, context) {
234
249
  console.log('case(api) to update quantity', entryNumber, quantityToUpdate);
@@ -246,32 +261,35 @@ Wick.BasketPage = {
246
261
  Wick.BasketPage.removeQuantityDisable();
247
262
  hideLoader(Wick.BasketPage.el.loader);
248
263
  },
249
- }
264
+ };
250
265
 
251
266
  callAction(
252
- payload,
253
- Wick.BasketPage.updateAction,
254
- quantityToUpdate,
255
- quantityInput,
256
- context,
257
- (response) => {
258
- if (response.statusMessage === 'accConfirmedMsgs') {
259
- const basketSection = Wick.BasketPage.el.basketMainSection;
260
- $(document).trigger("EEUpdateCart", {
261
- cartEntryNumber: entryNumber,
262
- initialCartQuantity: response.quantity - response.quantityAdded,
263
- newCartQuantity: response.quantity,
264
- fulfillment: context.hasClass('charity-new') ? 'Delivery' : context.closest(basketSection).attr('data-type'),
265
- });
266
- }
267
- context.find(Wick.BasketPage.el.actionButton).removeClass('disabled');
268
- });
267
+ payload,
268
+ Wick.BasketPage.updateAction,
269
+ quantityToUpdate,
270
+ quantityInput,
271
+ context,
272
+ (response) => {
273
+ if (response.statusMessage === 'accConfirmedMsgs') {
274
+ const basketSection = Wick.BasketPage.el.basketMainSection;
275
+ $(document).trigger('EEUpdateCart', {
276
+ cartEntryNumber: entryNumber,
277
+ initialCartQuantity: response.quantity - response.quantityAdded,
278
+ newCartQuantity: response.quantity,
279
+ fulfillment: context.hasClass('charity-new')
280
+ ? 'Delivery'
281
+ : context.closest(basketSection).attr('data-type'),
282
+ });
283
+ }
284
+ context.find(Wick.BasketPage.el.actionButton).removeClass('disabled');
285
+ }
286
+ );
269
287
  } else {
270
288
  Wick.BasketPage.updateQuantityOperation(
271
- quantityToUpdate,
272
- quantityInput,
273
- context,
274
- Wick.BasketData.updateQuantity
289
+ quantityToUpdate,
290
+ quantityInput,
291
+ context,
292
+ Wick.BasketData.updateQuantity
275
293
  );
276
294
  Wick.BasketPage.addQuantityDisable(context);
277
295
  setTimeout(() => {
@@ -281,18 +299,14 @@ Wick.BasketPage = {
281
299
  }
282
300
  },
283
301
  updateAction: function (response, quantityToUpdate, quantityInput, context, successCallback) {
284
- Wick.BasketPage.updateQuantityOperation(
285
- quantityToUpdate,
286
- quantityInput,
287
- context,
288
- response
289
- );
302
+ Wick.BasketPage.updateQuantityOperation(quantityToUpdate, quantityInput, context, response);
290
303
  successCallback(response);
291
304
  },
292
305
  updateQuantityOperation: function (quantityToUpdate, quantityInput, context, data) {
293
306
  const charity = context.hasClass('charity-new'),
294
307
  negativeStatus = data.statusMessage !== 'accConfirmedMsgs',
295
- messageInfo = Wick.BasketPage.isMessageExist(data) && Wick.BasketPage.getMessageInfo(data);
308
+ messageInfo =
309
+ Wick.BasketPage.isMessageExist(data) && Wick.BasketPage.getMessageInfo(data);
296
310
  let maxValue, minValue;
297
311
 
298
312
  if (!charity) {
@@ -302,7 +316,7 @@ Wick.BasketPage = {
302
316
 
303
317
  console.log('errorStatus:', negativeStatus);
304
318
 
305
- minValue === 0 ? minValue = 1 : minValue = minValue;
319
+ minValue = minValue === 0 ? 1 : minValue;
306
320
 
307
321
  if (negativeStatus) {
308
322
  Wick.BasketPage.updateCart(messageInfo);
@@ -322,12 +336,11 @@ Wick.BasketPage = {
322
336
  Wick.BasketPage.showNotification(data);
323
337
  Wick.BasketPage.updateCart(messageInfo);
324
338
  } else {
325
- Wick.BasketPage.updateItemTotal(data, context)
326
- Wick.BasketPage.updateCart(null, context)
339
+ Wick.BasketPage.updateItemTotal(data, context);
340
+ Wick.BasketPage.updateCart(null, context);
327
341
  }
328
342
  }
329
343
  }
330
-
331
344
  },
332
345
  isMessageExist: function (data) {
333
346
  return data.message && data.statusMessage;
@@ -336,12 +349,12 @@ Wick.BasketPage = {
336
349
  return {
337
350
  message: data.message,
338
351
  status: data.statusMessage,
339
- }
352
+ };
340
353
  },
341
354
  loadIndexing: function () {
342
355
  Wick.BasketPage.el.$orderItem.each(function (index) {
343
356
  $(this).attr('data-id', index);
344
- })
357
+ });
345
358
  },
346
359
  updateQuantity: function (quantityInput, accum) {
347
360
  quantityInput.val(accum);
@@ -371,7 +384,7 @@ Wick.BasketPage = {
371
384
  },
372
385
  updateCart: function (repaintData, context, charity, initial, callback) {
373
386
  console.log('case(api) to update cart');
374
- const info = {repaintData, context, charity, initial}
387
+ const info = { repaintData, context, charity, initial };
375
388
  const actionCallback = callback || Wick.BasketPage.updateCartAction;
376
389
 
377
390
  if (!Wick.checkLocalEnv) {
@@ -379,9 +392,9 @@ Wick.BasketPage = {
379
392
  url: ROUTES.BASKET_GET_CART,
380
393
  type: 'GET',
381
394
  complete: hideLoader(Wick.BasketPage.el.loader),
382
- }
395
+ };
383
396
 
384
- callAction(payload, actionCallback, info)
397
+ callAction(payload, actionCallback, info);
385
398
  } else {
386
399
  if (initial) {
387
400
  Wick.BasketPage.getCartEntries(Wick.BasketData.initialCartState);
@@ -395,7 +408,8 @@ Wick.BasketPage = {
395
408
  Wick.BasketPage.getEqualMapForUpdateCart(Wick.BasketData.updateCart)
396
409
  );
397
410
 
398
- !repaintData || Wick.BasketPage.repaintOrderItems(Wick.BasketData.updateCart, repaintData);
411
+ !repaintData ||
412
+ Wick.BasketPage.repaintOrderItems(Wick.BasketData.updateCart, repaintData);
399
413
  !charity || Wick.BasketPage.addCharityEntryNumber(Wick.BasketData.updateCart);
400
414
 
401
415
  //update promotion when update quantity
@@ -403,13 +417,16 @@ Wick.BasketPage = {
403
417
  Wick.BasketPage.updatePromotion(Wick.BasketData.updateCart, context);
404
418
  }
405
419
 
406
- updateKlarnaPlacements(Wick.BasketData.updateCart.totalPrice.formattedPriceWithoutCurrencySymbol);
420
+ updateKlarnaPlacements(
421
+ Wick.BasketData.updateCart.totalPrice.formattedPriceWithoutCurrencySymbol
422
+ );
407
423
  updateClearpayPlacements(Wick.BasketData.updateCart.totalPrice.value);
408
424
  updateClearpayVisibility(Wick.BasketData.updateCart.totalPrice.value);
409
425
  Wick.BasketPage.addPotentialPromo(Wick.BasketData.updateCart);
410
426
  addClassToSummaryAside(Wick.BasketData.updateCart);
411
427
  Wick.BasketPage.getCartEntries(Wick.BasketData.updateCart);
412
- Wick.BasketPage.checkProductArrays(Wick.BasketData.updateCart) || Wick.BasketPage.removeOrderItem(repaintData);
428
+ Wick.BasketPage.checkProductArrays(Wick.BasketData.updateCart) ||
429
+ Wick.BasketPage.removeOrderItem(repaintData);
413
430
  updateBasketSession();
414
431
  Wick.EnergyEfficiency && Wick.EnergyEfficiency.drawEnergyLabels();
415
432
  setTimeout(hideLoader, 1000);
@@ -417,25 +434,26 @@ Wick.BasketPage = {
417
434
  }
418
435
  },
419
436
  updateCartAction: function (response, info) {
420
- updateClearpayVisibility(response.totalPrice.value)
421
- addClassToSummaryAside(response)
437
+ updateClearpayVisibility(response.totalPrice.value);
438
+ addClassToSummaryAside(response);
422
439
  if (info.initial) {
423
440
  Wick.BasketPage.getCartEntries(response);
424
441
  } else {
425
442
  updateOrderSummary(response, Wick.BasketPage.getEqualMapForUpdateCart(response));
426
443
  if (info.repaintData) {
427
444
  if (info.repaintData.isChangeDelivery) {
428
- info.repaintData.cartEntry = Wick.BasketPage.cartEntries
429
- .filter(entry => entry.entryNumber === info.repaintData.cartEntryNumber)[0];
430
- $(document).trigger("EEUpdateDeliveryMode", info.repaintData);
445
+ info.repaintData.cartEntry = Wick.BasketPage.cartEntries.filter(
446
+ (entry) => entry.entryNumber === info.repaintData.cartEntryNumber
447
+ )[0];
448
+ $(document).trigger('EEUpdateDeliveryMode', info.repaintData);
431
449
  }
432
450
 
433
- Wick.BasketPage.checkProductArrays(response) ?
434
- Wick.BasketPage.repaintOrderItems(response, info.repaintData) :
435
- (() => {
436
- $(Wick.BasketPage.el.orderItem).remove();
437
- Wick.BasketPage.removeOrderItem(info.repaintData);
438
- })();
451
+ Wick.BasketPage.checkProductArrays(response)
452
+ ? Wick.BasketPage.repaintOrderItems(response, info.repaintData)
453
+ : (() => {
454
+ $(Wick.BasketPage.el.orderItem).remove();
455
+ Wick.BasketPage.removeOrderItem(info.repaintData);
456
+ })();
439
457
  }
440
458
 
441
459
  !info.charity || Wick.BasketPage.addCharityEntryNumber(response);
@@ -449,56 +467,59 @@ Wick.BasketPage = {
449
467
  updateEeaProducts(response.deliveryOrderGroups, response.pickupOrderGroups);
450
468
  updateEeaCheckoutProducts(response.deliveryOrderGroups, response.pickupOrderGroups);
451
469
  syncEeaProducts();
452
- $(document).trigger("cartUpdate");
470
+ $(document).trigger('cartUpdate');
453
471
  Wick.BasketPage.getCartEntries(response);
454
472
  updateKlarnaPlacements(response.totalPrice.formattedPriceWithoutCurrencySymbol);
455
473
  updateClearpayPlacements(response.totalPrice.value);
456
474
  updateClearpayVisibility(response.totalPrice.value);
457
475
  updateBasketSession();
458
- Wick.EnergyEfficiency.drawEnergyLabels()
476
+ Wick.EnergyEfficiency.drawEnergyLabels();
459
477
  }
460
478
  },
461
479
  checkProductArrays(cart) {
462
480
  return cart.pickupUniqueItemsNumber || cart.deliveryUniqueItemsNumber;
463
481
  },
464
482
  getCartEntries(data) {
465
- Wick.BasketPage.cartEntries = data.deliveryOrderGroups.concat(data.pickupOrderGroups)
466
- .map(orderGroup => orderGroup.entries)
467
- .flatMap(entries => entries);
483
+ Wick.BasketPage.cartEntries = data.deliveryOrderGroups
484
+ .concat(data.pickupOrderGroups)
485
+ .map((orderGroup) => orderGroup.entries)
486
+ .flatMap((entries) => entries);
468
487
  },
469
488
  addCharityEntryNumber: function (data) {
470
489
  let entryNumber;
471
- data.deliveryOrderGroups.forEach(order => {
472
- order.entries.forEach(item => {
473
- item.charity ? entryNumber = item.entryNumber : null
474
- })
475
- })
490
+ data.deliveryOrderGroups.forEach((order) => {
491
+ order.entries.forEach((item) => {
492
+ item.charity ? (entryNumber = item.entryNumber) : null;
493
+ });
494
+ });
476
495
  if ($(Wick.BasketPage.el.charityItem).find('input[name="entryNumber"]').length) {
477
- $(Wick.BasketPage.el.charityItem).find('input[name="entryNumber"]').val(entryNumber)
496
+ $(Wick.BasketPage.el.charityItem).find('input[name="entryNumber"]').val(entryNumber);
478
497
  } else {
479
498
  $(Wick.BasketPage.el.charityItem).prepend(
480
499
  `<input type="hidden" name="entryNumber" value="${entryNumber}">`
481
- )
500
+ );
482
501
  }
483
502
  },
484
503
  updatePromotion: function (data) {
485
504
  $(Wick.BasketPage.el.orderItem).each(function () {
486
- let itemNumber = {entryNumber: +$(this).attr('data-id')}
487
- $(this).find(Wick.BasketPage.el.orderItemOffers).remove()
488
- $(this).find(Wick.BasketPage.el.orderItemInfo).append(Wick.BasketPage.addPromotions(itemNumber, data));
489
- })
505
+ let itemNumber = { entryNumber: +$(this).attr('data-id') };
506
+ $(this).find(Wick.BasketPage.el.orderItemOffers).remove();
507
+ $(this)
508
+ .find(Wick.BasketPage.el.orderItemInfo)
509
+ .append(Wick.BasketPage.addPromotions(itemNumber, data));
510
+ });
490
511
  },
491
512
  showNotification: function (data) {
492
513
  let notificationType;
493
514
  switch (data.statusMessage) {
494
515
  case 'accConfirmedMsgs':
495
- notificationType = 'success'
516
+ notificationType = 'success';
496
517
  break;
497
518
  case 'accWarnMsgs':
498
- notificationType = 'warning'
519
+ notificationType = 'warning';
499
520
  break;
500
521
  case 'accErrorMsgs':
501
- notificationType = 'error'
522
+ notificationType = 'error';
502
523
  break;
503
524
  }
504
525
 
@@ -506,47 +527,53 @@ Wick.BasketPage = {
506
527
  text: data.message,
507
528
  container: '.notification-area',
508
529
  type: notificationType,
509
- closeBtn: true
530
+ closeBtn: true,
510
531
  });
511
-
512
532
  },
513
533
  hideUnusedDeliveryTypeCost: function (data, isVoucher) {
514
- $(Wick.BasketPage.el.delivery).show()
515
- $(Wick.BasketPage.el.cc).show()
534
+ $(Wick.BasketPage.el.delivery).show();
535
+ $(Wick.BasketPage.el.cc).show();
516
536
  if (isVoucher) {
517
537
  if (!data.deliveryOrder) {
518
- $(Wick.BasketPage.el.delivery).hide()
538
+ $(Wick.BasketPage.el.delivery).hide();
519
539
  } else if (!data.clickAndCollectOrder) {
520
- $(Wick.BasketPage.el.cc).hide()
540
+ $(Wick.BasketPage.el.cc).hide();
521
541
  }
522
542
  } else {
523
543
  if (data.clickAndCollectOnly) {
524
- $(Wick.BasketPage.el.delivery).hide()
544
+ $(Wick.BasketPage.el.delivery).hide();
525
545
  } else if (data.deliveryItemsQuantity > 0 && data.pickupItemsQuantity === 0) {
526
- $(Wick.BasketPage.el.cc).hide()
546
+ $(Wick.BasketPage.el.cc).hide();
527
547
  }
528
548
  }
529
549
  },
530
550
  paintActionButton: function () {
531
551
  $(Wick.BasketPage.el.basketMainSection).each(function () {
532
- if ($(this).attr('data-type') === "Delivery") {
533
- $(this).find(Wick.BasketPage.el.actionButton).each(function () {
534
- $(this).removeClass(Wick.BasketPage.el.btnSelected);
535
- if ($(this).attr('data-type') === "Delivery" || $(this).attr('data-type') === "Delivery Stock") {
536
- $(this).addClass(Wick.BasketPage.el.btnSelected);
537
- $(this).find('input').prop('checked', true);
538
- }
539
- })
540
- } else if ($(this).attr('data-type') === "Click & Collect") {
541
- $(this).find(Wick.BasketPage.el.actionButton).each(function () {
542
- $(this).removeClass(Wick.BasketPage.el.btnSelected);
543
- if ($(this).attr('data-type') === "Click & Collect") {
544
- $(this).addClass(Wick.BasketPage.el.btnSelected);
545
- $(this).find('input').prop('checked', true);
546
- }
547
- })
552
+ if ($(this).attr('data-type') === 'Delivery') {
553
+ $(this)
554
+ .find(Wick.BasketPage.el.actionButton)
555
+ .each(function () {
556
+ $(this).removeClass(Wick.BasketPage.el.btnSelected);
557
+ if (
558
+ $(this).attr('data-type') === 'Delivery' ||
559
+ $(this).attr('data-type') === 'Delivery Stock'
560
+ ) {
561
+ $(this).addClass(Wick.BasketPage.el.btnSelected);
562
+ $(this).find('input').prop('checked', true);
563
+ }
564
+ });
565
+ } else if ($(this).attr('data-type') === 'Click & Collect') {
566
+ $(this)
567
+ .find(Wick.BasketPage.el.actionButton)
568
+ .each(function () {
569
+ $(this).removeClass(Wick.BasketPage.el.btnSelected);
570
+ if ($(this).attr('data-type') === 'Click & Collect') {
571
+ $(this).addClass(Wick.BasketPage.el.btnSelected);
572
+ $(this).find('input').prop('checked', true);
573
+ }
574
+ });
548
575
  }
549
- })
576
+ });
550
577
  },
551
578
  hideCCSectionInDelivery: function (context) {
552
579
  let delivery = context.find(Wick.BasketPage.el.deliveryMessage),
@@ -570,7 +597,7 @@ Wick.BasketPage = {
570
597
  ccOrderInfo.removeClass(Wick.BasketPage.el.ccOrderInfoHide);
571
598
 
572
599
  //hide wisdom if exist
573
- wisdom.length && wisdom.addClass(Wick.BasketPage.el.wisdomBlockHide)
600
+ wisdom.length && wisdom.addClass(Wick.BasketPage.el.wisdomBlockHide);
574
601
 
575
602
  context.find(Wick.BasketPage.el.storeUnselected).unbind();
576
603
  context.find(Wick.BasketPage.el.ccCloseLink).unbind();
@@ -578,12 +605,17 @@ Wick.BasketPage = {
578
605
  context.find(Wick.BasketPage.el.storeUnselected).on('click', (e) => e.preventDefault());
579
606
  context.find(Wick.BasketPage.el.ccCloseLink).on('click', function (e) {
580
607
  e.preventDefault();
581
- Wick.BasketPage.makeRadioActive(context.find(Wick.BasketPage.el.deliveryButtonInCC));
608
+ Wick.BasketPage.makeRadioActive(
609
+ context.find(Wick.BasketPage.el.deliveryButtonInCC)
610
+ );
582
611
  Wick.BasketPage.hideCCSectionInDelivery(context);
583
- })
612
+ });
584
613
  } else {
585
614
  Wick.BasketPage.makeRadioActive(this);
586
- $(this).closest(Wick.BasketPage.el.orderItem).find(Wick.BasketPage.el.wisdomClose).trigger('click');
615
+ $(this)
616
+ .closest(Wick.BasketPage.el.orderItem)
617
+ .find(Wick.BasketPage.el.wisdomClose)
618
+ .trigger('click');
587
619
  }
588
620
  },
589
621
  changeMethodToDelivery: function (e) {
@@ -600,10 +632,10 @@ Wick.BasketPage = {
600
632
  cartEntryNumber: entryNumber,
601
633
  cartEntry: {},
602
634
  fulfilmentData: {
603
- fulfillmentType: 'Delivery'
635
+ fulfillmentType: 'Delivery',
604
636
  },
605
637
  isChangeDelivery: true,
606
- }
638
+ };
607
639
 
608
640
  //checkEnv
609
641
  if (!Wick.checkLocalEnv) {
@@ -611,10 +643,10 @@ Wick.BasketPage = {
611
643
  const payload = {
612
644
  url: `${ROUTES.BASKET_ADD_STOCK}/${entryNumber}/delivery`,
613
645
  type: 'PUT',
614
- }
615
- callAction(payload, Wick.BasketPage.updateDeliveryMethod, options)
646
+ };
647
+ callAction(payload, Wick.BasketPage.updateDeliveryMethod, options);
616
648
  } else {
617
- Wick.BasketPage.showNotification(Wick.BasketData.changeMethod)
649
+ Wick.BasketPage.showNotification(Wick.BasketData.changeMethod);
618
650
  Wick.BasketPage.updateCart(options);
619
651
  }
620
652
  } else {
@@ -624,7 +656,10 @@ Wick.BasketPage = {
624
656
  },
625
657
  changeMethodToCC: function () {
626
658
  let context = $(this).closest(Wick.BasketPage.el.orderItem),
627
- storeId = $(this).closest(Wick.BasketPage.el.orderSectionCta).find('.storeNamePost').val(),
659
+ storeId = $(this)
660
+ .closest(Wick.BasketPage.el.orderSectionCta)
661
+ .find('.storeNamePost')
662
+ .val(),
628
663
  entryNumber = +context.attr('data-id'),
629
664
  quantity = context.find(Wick.BasketPage.el.quantityValue).val(),
630
665
  storeName;
@@ -633,9 +668,18 @@ Wick.BasketPage = {
633
668
  if ($(el).find('input').attr('value') === storeId) {
634
669
  storeName = $(el).find(Wick.BasketPage.el.storeNameText).text().trim();
635
670
  }
636
- })
671
+ });
637
672
 
638
- console.log('case(api) change to C&C method, entry -', entryNumber, 'storeId', storeId, 'qty-', quantity, 'storeName-', storeName);
673
+ console.log(
674
+ 'case(api) change to C&C method, entry -',
675
+ entryNumber,
676
+ 'storeId',
677
+ storeId,
678
+ 'qty-',
679
+ quantity,
680
+ 'storeName-',
681
+ storeName
682
+ );
639
683
 
640
684
  const options = {
641
685
  cartEntryNumber: entryNumber,
@@ -646,7 +690,7 @@ Wick.BasketPage = {
646
690
  storeName: storeName,
647
691
  },
648
692
  isChangeDelivery: true,
649
- }
693
+ };
650
694
 
651
695
  //checkEnv
652
696
  if (!Wick.checkLocalEnv) {
@@ -658,17 +702,18 @@ Wick.BasketPage = {
658
702
  quantity: quantity,
659
703
  },
660
704
  type: 'PUT',
661
- }
662
- callAction(payload, Wick.BasketPage.updateDeliveryMethod, options)
705
+ };
706
+ callAction(payload, Wick.BasketPage.updateDeliveryMethod, options);
663
707
  } else {
664
- Wick.BasketPage.showNotification(Wick.BasketData.changeMethod)
708
+ Wick.BasketPage.showNotification(Wick.BasketData.changeMethod);
665
709
  Wick.BasketPage.updateCart(options);
666
710
  }
667
711
  },
668
712
  updateDeliveryMethod: function (response, options) {
669
- const messageInfo = Wick.BasketPage.isMessageExist(response) && Wick.BasketPage.getMessageInfo(response);
713
+ const messageInfo =
714
+ Wick.BasketPage.isMessageExist(response) && Wick.BasketPage.getMessageInfo(response);
670
715
  Object.assign(options, messageInfo);
671
- Wick.BasketPage.showNotification(response)
716
+ Wick.BasketPage.showNotification(response);
672
717
  Wick.BasketPage.updateCart(options);
673
718
  },
674
719
  removeOrderItem: function (messageInfo) {
@@ -677,13 +722,14 @@ Wick.BasketPage = {
677
722
  status = messageInfo.status,
678
723
  link;
679
724
 
680
- link = `${currentLink}?notificationMessage=${message}&messageStatus=${status}`
725
+ link = `${currentLink}?notificationMessage=${message}&messageStatus=${status}`;
681
726
  window.location.replace(link);
682
727
  },
683
- repaintOrderItems: function (data, message) {
728
+ repaintOrderItems: function (data) {
684
729
  const ccGroup = data.pickupOrderGroups || [],
685
730
  deliveryGroup = data.deliveryOrderGroups || [];
686
- let type, itemDetails = {};
731
+ let type,
732
+ itemDetails = {};
687
733
 
688
734
  $(Wick.BasketPage.el.orderItem).remove();
689
735
 
@@ -691,19 +737,27 @@ Wick.BasketPage = {
691
737
  type = 'cc';
692
738
  if ($(Wick.BasketPage.el.basketCCSection).length) {
693
739
  ccGroup.forEach((obj) => {
694
- obj.entries.forEach(item => {
740
+ obj.entries.forEach((item) => {
695
741
  itemDetails = {
696
- item, type, data,
742
+ item,
743
+ type,
744
+ data,
697
745
  };
698
- $(Wick.BasketPage.el.basketCCSection).append(Wick.BasketPage.createOrderItem(itemDetails));
699
- })
700
- })
746
+ $(Wick.BasketPage.el.basketCCSection).append(
747
+ Wick.BasketPage.createOrderItem(itemDetails)
748
+ );
749
+ });
750
+ });
701
751
  Wick.BasketPage.updateItemsCount(data, type);
702
752
  } else {
703
753
  if ($(Wick.BasketPage.el.basketDeliverySection)) {
704
- $(Wick.BasketPage.el.basketDeliverySection).after(Wick.BasketPage.createBasketSection(type, ccGroup, data))
754
+ $(Wick.BasketPage.el.basketDeliverySection).after(
755
+ Wick.BasketPage.createBasketSection(type, ccGroup, data)
756
+ );
705
757
  } else {
706
- $(Wick.BasketPage.el.content).prepend(Wick.BasketPage.createBasketSection(type, ccGroup, data));
758
+ $(Wick.BasketPage.el.content).prepend(
759
+ Wick.BasketPage.createBasketSection(type, ccGroup, data)
760
+ );
707
761
  }
708
762
  }
709
763
  } else {
@@ -711,24 +765,33 @@ Wick.BasketPage = {
711
765
  }
712
766
 
713
767
  if (deliveryGroup.length) {
714
- if (deliveryGroup.length === 1 && deliveryGroup[0].entries.length === 1 && deliveryGroup[0].entries[0].charity) {
768
+ if (
769
+ deliveryGroup.length === 1 &&
770
+ deliveryGroup[0].entries.length === 1 &&
771
+ deliveryGroup[0].entries[0].charity
772
+ ) {
715
773
  $(Wick.BasketPage.el.basketDeliverySection).remove();
716
774
  } else {
717
775
  type = 'delivery';
718
776
 
719
777
  if ($(Wick.BasketPage.el.basketDeliverySection).length) {
720
778
  deliveryGroup.forEach((obj) => {
721
- obj.entries.forEach(item => {
779
+ obj.entries.forEach((item) => {
722
780
  itemDetails = {
723
- item, type, data,
781
+ item,
782
+ type,
783
+ data,
724
784
  };
725
- $(Wick.BasketPage.el.basketDeliverySection).append(Wick.BasketPage.createOrderItem(itemDetails));
726
- })
727
-
728
- })
785
+ $(Wick.BasketPage.el.basketDeliverySection).append(
786
+ Wick.BasketPage.createOrderItem(itemDetails)
787
+ );
788
+ });
789
+ });
729
790
  Wick.BasketPage.updateItemsCount(data, type);
730
791
  } else {
731
- $(Wick.BasketPage.el.content).prepend(Wick.BasketPage.createBasketSection(type, deliveryGroup, data));
792
+ $(Wick.BasketPage.el.content).prepend(
793
+ Wick.BasketPage.createBasketSection(type, deliveryGroup, data)
794
+ );
732
795
  }
733
796
  }
734
797
  Wick.BasketPage.addCharityEntryNumber(data);
@@ -738,27 +801,30 @@ Wick.BasketPage = {
738
801
 
739
802
  $('.order-item').each(function () {
740
803
  let quantity = +$(this).find('.order-item__quantity-value').val();
741
- Wick.BasketPage.toggleItemTotal(this, quantity)
742
- })
804
+ Wick.BasketPage.toggleItemTotal(this, quantity);
805
+ });
743
806
 
744
807
  Wick.BasketPage.paintActionButton();
745
808
  checkPayPalAvailability(data);
746
809
  Wick.VatToggle.reapplyDisplayClass();
747
- $(document).trigger("cartRerender");
810
+ $(document).trigger('cartRerender');
748
811
  },
749
812
  createBasketSection: function (type, group, data) {
750
- type === 'cc' ? type = 'Click & Collect' : type = 'Delivery';
813
+ type === 'cc' ? (type = 'Click & Collect') : (type = 'Delivery');
751
814
  const orderItems = [];
752
815
  let itemDetails = {};
753
816
 
754
- group.forEach(obj => {
755
- obj.entries.forEach(item => {
756
- itemDetails = {item, type, data};
817
+ group.forEach((obj) => {
818
+ obj.entries.forEach((item) => {
819
+ itemDetails = { item, type, data };
757
820
  orderItems.push(Wick.BasketPage.createOrderItem(itemDetails));
758
- })
821
+ });
759
822
  });
760
823
 
761
- const itemsCount = type === 'Click & Collect' ? data.pickupUniqueItemsNumber : data.deliveryUniqueItemsNumber;
824
+ const itemsCount =
825
+ type === 'Click & Collect'
826
+ ? data.pickupUniqueItemsNumber
827
+ : data.deliveryUniqueItemsNumber;
762
828
 
763
829
  return `
764
830
  <section class="basket__section" data-type="${type}">
@@ -772,18 +838,23 @@ Wick.BasketPage = {
772
838
  </div>
773
839
  ${orderItems.join('')}
774
840
  </section>
775
- `
841
+ `;
776
842
  },
777
843
  updateItemsCount: function (data, type) {
778
- const itemCount = type === 'cc' ? data.pickupUniqueItemsNumber : data.deliveryUniqueItemsNumber,
844
+ const itemCount =
845
+ type === 'cc' ? data.pickupUniqueItemsNumber : data.deliveryUniqueItemsNumber,
779
846
  titleItemsText = `${itemCount} item${itemCount > 1 ? 's' : ''}`;
780
847
 
781
848
  if (type === 'cc') {
782
- $(Wick.BasketPage.el.basketCCSection).find(Wick.BasketPage.el.titleItems).text(titleItemsText)
849
+ $(Wick.BasketPage.el.basketCCSection)
850
+ .find(Wick.BasketPage.el.titleItems)
851
+ .text(titleItemsText);
783
852
  }
784
853
 
785
854
  if (type === 'delivery') {
786
- $(Wick.BasketPage.el.basketDeliverySection).find(Wick.BasketPage.el.titleItems).text(titleItemsText);
855
+ $(Wick.BasketPage.el.basketDeliverySection)
856
+ .find(Wick.BasketPage.el.titleItems)
857
+ .text(titleItemsText);
787
858
  }
788
859
  },
789
860
  createOrderItem: function (itemDetails) {
@@ -852,7 +923,7 @@ Wick.BasketPage = {
852
923
  currentItem.basePrice.value === 0
853
924
  ? '<span class="order-item__value">FREE</span>'
854
925
  : Wick.VatToggle.isToggleVatAvailable()
855
- ? `
926
+ ? `
856
927
  <div class="including-vat"><!--
857
928
  --><span class="order-item__value">${currentItem.basePrice.formattedValue}</span><!--
858
929
  --><div class="price-vat">Inc.VAT</div>
@@ -862,7 +933,7 @@ Wick.BasketPage = {
862
933
  --><div class="price-vat">Exc.VAT</div>
863
934
  </div>
864
935
  `
865
- : `<span class="order-item__value">${currentItem.basePrice.formattedValue}</span>`
936
+ : `<span class="order-item__value">${currentItem.basePrice.formattedValue}</span>`
866
937
  }
867
938
  </div>
868
939
  </div>
@@ -874,7 +945,7 @@ Wick.BasketPage = {
874
945
  currentItem.itemTotalWithoutDiscount.value === 0
875
946
  ? '<span class="order-item__value">FREE</span>'
876
947
  : Wick.VatToggle.isToggleVatAvailable()
877
- ? `
948
+ ? `
878
949
  <div class="including-vat"><!--
879
950
  --><span class="order-item__value">${currentItem.itemTotalWithoutDiscount.formattedValue}</span><!--
880
951
  --><div class="price-vat">Inc.VAT</div><!--
@@ -884,7 +955,7 @@ Wick.BasketPage = {
884
955
  --><div class="price-vat">Exc.VAT</div>
885
956
  </div>
886
957
  `
887
- : `<span class="order-item__value">${currentItem.itemTotalWithoutDiscount.formattedValue}</span>`
958
+ : `<span class="order-item__value">${currentItem.itemTotalWithoutDiscount.formattedValue}</span>`
888
959
  }
889
960
  </div>
890
961
  </div>
@@ -903,13 +974,11 @@ Wick.BasketPage = {
903
974
  ${Wick.BasketPage.createDeliveryMessage(currentItem, itemDetails.type)}
904
975
  ${Wick.BasketPage.createCCFinder(currentItem)}
905
976
  </div>
906
- `
977
+ `;
907
978
  }
908
979
  },
909
980
  createActionButton: function (item, type, section) {
910
- let available,
911
- title,
912
- dataType;
981
+ let available, title, dataType;
913
982
 
914
983
  if (type === 'cc') {
915
984
  title = 'Click & Collect';
@@ -929,7 +998,7 @@ Wick.BasketPage = {
929
998
  } else {
930
999
  title = 'Check Delivery Stock';
931
1000
  dataType = 'Delivery Stock';
932
- type = "delivery_stock";
1001
+ type = 'delivery_stock';
933
1002
  available = item.orderFulfilmentControls.availableForWickesFulfilment;
934
1003
  }
935
1004
  }
@@ -949,51 +1018,61 @@ Wick.BasketPage = {
949
1018
  <span>${title}</span>
950
1019
  </label>
951
1020
  </div>
952
- `
1021
+ `;
953
1022
  } else {
954
- return ''
1023
+ return '';
955
1024
  }
956
-
957
1025
  },
958
1026
  addPromotions: function (item, data) {
959
1027
  let arr = [];
960
1028
 
961
- data.potentialProductPromotions && data.potentialProductPromotions.forEach((entry) => {
962
- entry.consumedEntries.forEach((promo) => {
963
- if (promo.orderEntryNumber === item.entryNumber) {
964
- if (arr.length) {
965
- let duplicate = arr.every((el) => {
966
- return el !== `<div class="order-item__promo">${entry.description}</div>`
967
- })
968
-
969
- !duplicate || arr.push(`<div class="order-item__promo">${entry.description}</div>`);
970
-
971
- } else {
972
- arr.push(`<div class="order-item__promo">${entry.description}</div>`);
1029
+ data.potentialProductPromotions &&
1030
+ data.potentialProductPromotions.forEach((entry) => {
1031
+ entry.consumedEntries.forEach((promo) => {
1032
+ if (promo.orderEntryNumber === item.entryNumber) {
1033
+ if (arr.length) {
1034
+ let duplicate = arr.every((el) => {
1035
+ return (
1036
+ el !==
1037
+ `<div class="order-item__promo">${entry.description}</div>`
1038
+ );
1039
+ });
1040
+
1041
+ !duplicate ||
1042
+ arr.push(
1043
+ `<div class="order-item__promo">${entry.description}</div>`
1044
+ );
1045
+ } else {
1046
+ arr.push(`<div class="order-item__promo">${entry.description}</div>`);
1047
+ }
973
1048
  }
974
- }
975
- })
976
-
977
- });
978
-
979
- data.appliedProductPromotions && data.appliedProductPromotions.forEach((entry) => {
980
- entry.consumedEntries.forEach((promo) => {
981
- if (promo.orderEntryNumber === item.entryNumber && entry.description) {
982
- if (arr.length) {
983
- let duplicate = arr.every((el) => {
984
- return el !== `<div class="order-item__promo">${entry.description}</div>`
985
- })
986
-
987
- !duplicate || arr.push(`<div class="order-item__promo">${entry.description}</div>`);
988
-
989
- } else {
990
- arr.push(`<div class="order-item__promo">${entry.description}</div>`);
1049
+ });
1050
+ });
1051
+
1052
+ data.appliedProductPromotions &&
1053
+ data.appliedProductPromotions.forEach((entry) => {
1054
+ entry.consumedEntries.forEach((promo) => {
1055
+ if (promo.orderEntryNumber === item.entryNumber && entry.description) {
1056
+ if (arr.length) {
1057
+ let duplicate = arr.every((el) => {
1058
+ return (
1059
+ el !==
1060
+ `<div class="order-item__promo">${entry.description}</div>`
1061
+ );
1062
+ });
1063
+
1064
+ !duplicate ||
1065
+ arr.push(
1066
+ `<div class="order-item__promo">${entry.description}</div>`
1067
+ );
1068
+ } else {
1069
+ arr.push(`<div class="order-item__promo">${entry.description}</div>`);
1070
+ }
991
1071
  }
992
- }
993
- })
994
- });
1072
+ });
1073
+ });
995
1074
 
996
- return arr.length ? `<div class="order-item__offers">${arr.join('')}</div>` : ''
1075
+ return arr.length ? `<div class="order-item__offers">${arr.join('')}</div>` : '';
997
1076
  },
998
1077
  createPerMeterPrice: function (item) {
999
1078
  if (item.product.installationProduct) {
@@ -1017,16 +1096,20 @@ Wick.BasketPage = {
1017
1096
  }
1018
1097
  </div>
1019
1098
  </div>
1020
- `
1099
+ `;
1021
1100
  } else {
1022
- return ''
1101
+ return '';
1023
1102
  }
1024
1103
  },
1025
1104
  createDeliveryMessage: function (item, type) {
1026
1105
  if (type === 'delivery') {
1027
- let currentFulfillment = item.product.fulfillmentAttributes.supplierDelivered ? 'SUPPLIER_DELIVERED' : 'STANDARD',
1106
+ let currentFulfillment = item.product.fulfillmentAttributes.supplierDelivered
1107
+ ? 'SUPPLIER_DELIVERED'
1108
+ : 'STANDARD',
1028
1109
  productCode = item.product.code,
1029
- coincidenceFulfillmentValue = $(Wick.BasketPage.el.content).find(`#${productCode}_${currentFulfillment}`).val()
1110
+ coincidenceFulfillmentValue = $(Wick.BasketPage.el.content)
1111
+ .find(`#${productCode}_${currentFulfillment}`)
1112
+ .val();
1030
1113
 
1031
1114
  if (coincidenceFulfillmentValue) {
1032
1115
  return `
@@ -1036,12 +1119,12 @@ Wick.BasketPage = {
1036
1119
  ${coincidenceFulfillmentValue}
1037
1120
  </div>
1038
1121
  </div>
1039
- `
1122
+ `;
1040
1123
  } else {
1041
- return ''
1124
+ return '';
1042
1125
  }
1043
1126
  } else {
1044
- return ''
1127
+ return '';
1045
1128
  }
1046
1129
  },
1047
1130
  createCCFinder: function (item) {
@@ -1052,7 +1135,7 @@ Wick.BasketPage = {
1052
1135
  </div>
1053
1136
  ${Wick.BasketPage.createCCOrderInfo(item)}
1054
1137
  </div>
1055
- `
1138
+ `;
1056
1139
  },
1057
1140
  createCCOrderInfo: function (item) {
1058
1141
  if (item.updateable) {
@@ -1115,9 +1198,9 @@ Wick.BasketPage = {
1115
1198
  </div>
1116
1199
  </div>
1117
1200
  </div>
1118
- `
1201
+ `;
1119
1202
  } else {
1120
- return ''
1203
+ return '';
1121
1204
  }
1122
1205
  },
1123
1206
  checkStoreAvailability: function (store, item) {
@@ -1130,7 +1213,7 @@ Wick.BasketPage = {
1130
1213
  <a href="#" class="cc-order__change" ${item.updateable || 'style="display: none"'}>
1131
1214
  Change Store location
1132
1215
  </a>
1133
- `
1216
+ `;
1134
1217
  } else {
1135
1218
  return `
1136
1219
  <div class="cc-order__store-select">
@@ -1141,17 +1224,19 @@ Wick.BasketPage = {
1141
1224
  </a>
1142
1225
  </div>
1143
1226
  </div>
1144
- `
1227
+ `;
1145
1228
  }
1146
1229
  },
1147
1230
  removePromotion: function () {
1148
- $(this).closest(Wick.BasketPage.el.promo).remove()
1231
+ $(this).closest(Wick.BasketPage.el.promo).remove();
1149
1232
  },
1150
1233
  addPotentialPromo: function (data) {
1151
1234
  $(Wick.BasketPage.el.promo).remove();
1152
1235
 
1153
- if ((data.potentialOrderPromotions && data.potentialOrderPromotions.length)
1154
- || (data.appliedOrderPromotions && data.appliedOrderPromotions.length)) {
1236
+ if (
1237
+ (data.potentialOrderPromotions && data.potentialOrderPromotions.length) ||
1238
+ (data.appliedOrderPromotions && data.appliedOrderPromotions.length)
1239
+ ) {
1155
1240
  $(Wick.BasketPage.el.promoWrapper).append(Wick.BasketPage.createPotentialPromo(data));
1156
1241
  }
1157
1242
  },
@@ -1159,7 +1244,8 @@ Wick.BasketPage = {
1159
1244
  const arr = [];
1160
1245
  if (data.potentialOrderPromotions && data.potentialOrderPromotions.length) {
1161
1246
  data.potentialOrderPromotions.forEach((promo) => {
1162
- !promo.description || arr.push(`
1247
+ !promo.description ||
1248
+ arr.push(`
1163
1249
  <div class="p-promotion">
1164
1250
  <div class="p-promotion__icon">
1165
1251
  <i class="icon fas fa-gift"></i>
@@ -1171,14 +1257,14 @@ Wick.BasketPage = {
1171
1257
  <i class="icon fas fa-times"></i>
1172
1258
  </div>
1173
1259
  </div>
1174
- `
1175
- )
1176
- })
1260
+ `);
1261
+ });
1177
1262
  }
1178
1263
 
1179
1264
  if (data.appliedOrderPromotions && data.appliedOrderPromotions.length) {
1180
1265
  data.appliedOrderPromotions.forEach((promo) => {
1181
- !promo.description || arr.push(`
1266
+ !promo.description ||
1267
+ arr.push(`
1182
1268
  <div class="p-promotion">
1183
1269
  <div class="p-promotion__icon">
1184
1270
  <i class="icon fas fa-gift"></i>
@@ -1190,14 +1276,15 @@ Wick.BasketPage = {
1190
1276
  <i class="icon fas fa-times"></i>
1191
1277
  </div>
1192
1278
  </div>
1193
- `
1194
- )
1195
- })
1279
+ `);
1280
+ });
1196
1281
  }
1197
1282
  if ($(Wick.BasketPage.el.promoWrapper).length) {
1198
1283
  return arr.join('');
1199
1284
  } else {
1200
- $(Wick.BasketPage.el.checkoutHeader).before(`<div class="checkout-header__promo">${arr.join('')}</div>`)
1285
+ $(Wick.BasketPage.el.checkoutHeader).before(
1286
+ `<div class="checkout-header__promo">${arr.join('')}</div>`
1287
+ );
1201
1288
  }
1202
1289
  },
1203
1290
  limitingQuantityValue: function () {
@@ -1229,7 +1316,7 @@ Wick.BasketPage = {
1229
1316
  const collapsed = $(context).hasClass('collapsed');
1230
1317
  const accordionText = collapsed ? showText : hideText;
1231
1318
 
1232
- $(context).find(Wick.BasketPage.el.summaryAccordionText).text(accordionText)
1319
+ $(context).find(Wick.BasketPage.el.summaryAccordionText).text(accordionText);
1233
1320
  }, 150),
1234
1321
  changeOnBlur: function () {
1235
1322
  const context = $(this).closest(Wick.BasketPage.el.orderItem),
@@ -1259,29 +1346,60 @@ Wick.BasketPage = {
1259
1346
 
1260
1347
  $(Wick.BasketPage.el.content).find(quantityValue).prop('disabled', false);
1261
1348
  $(Wick.BasketPage.el.content).find(quantityButton).prop('disabled', false);
1262
- }
1349
+ },
1263
1350
  };
1264
1351
 
1265
1352
  $(document).on('cartUpdate', initStickyObserver);
1266
1353
 
1267
1354
  $(document).ready(function () {
1268
1355
  function init() {
1269
-
1270
1356
  if (!$('.page_basket.basket').length) {
1271
1357
  return;
1272
1358
  }
1273
1359
 
1274
1360
  addStorageCheckEvent();
1275
1361
  Wick.BasketPage.el.$voucherFormBtn.on('click', checkVoucherCode);
1276
- $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.quantityButton, Wick.BasketPage.updateItemQuantity);
1277
- $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.removeButton, Wick.BasketPage.updateItemQuantity);
1278
- $(Wick.BasketPage.el.content).on('change', Wick.BasketPage.el.quantityValue, Wick.BasketPage.updateItemQuantity);
1279
- $(Wick.BasketPage.el.content).on('input', Wick.BasketPage.el.quantityValue, Wick.BasketPage.limitingQuantityValue);
1280
- $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.ccButton, Wick.BasketPage.showCCSectionInDelivery);
1281
- $(Wick.BasketPage.el.content).on('focusout', Wick.BasketPage.el.quantityValue, Wick.BasketPage.changeOnBlur);
1282
- $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.deliveryButtonInCC, Wick.BasketPage.changeMethodToDelivery);
1283
- $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.updateStoreButton, Wick.BasketPage.changeMethodToCC);
1284
- $(Wick.BasketPage.el.donationCartBtn).on('click', function(e) {
1362
+ $(Wick.BasketPage.el.content).on(
1363
+ 'click',
1364
+ Wick.BasketPage.el.quantityButton,
1365
+ Wick.BasketPage.updateItemQuantity
1366
+ );
1367
+ $(Wick.BasketPage.el.content).on(
1368
+ 'click',
1369
+ Wick.BasketPage.el.removeButton,
1370
+ Wick.BasketPage.updateItemQuantity
1371
+ );
1372
+ $(Wick.BasketPage.el.content).on(
1373
+ 'change',
1374
+ Wick.BasketPage.el.quantityValue,
1375
+ Wick.BasketPage.updateItemQuantity
1376
+ );
1377
+ $(Wick.BasketPage.el.content).on(
1378
+ 'input',
1379
+ Wick.BasketPage.el.quantityValue,
1380
+ Wick.BasketPage.limitingQuantityValue
1381
+ );
1382
+ $(Wick.BasketPage.el.content).on(
1383
+ 'click',
1384
+ Wick.BasketPage.el.ccButton,
1385
+ Wick.BasketPage.showCCSectionInDelivery
1386
+ );
1387
+ $(Wick.BasketPage.el.content).on(
1388
+ 'focusout',
1389
+ Wick.BasketPage.el.quantityValue,
1390
+ Wick.BasketPage.changeOnBlur
1391
+ );
1392
+ $(Wick.BasketPage.el.content).on(
1393
+ 'click',
1394
+ Wick.BasketPage.el.deliveryButtonInCC,
1395
+ Wick.BasketPage.changeMethodToDelivery
1396
+ );
1397
+ $(Wick.BasketPage.el.content).on(
1398
+ 'click',
1399
+ Wick.BasketPage.el.updateStoreButton,
1400
+ Wick.BasketPage.changeMethodToCC
1401
+ );
1402
+ $(Wick.BasketPage.el.donationCartBtn).on('click', function (e) {
1285
1403
  e.preventDefault();
1286
1404
  const context = $(this).closest(Wick.BasketPage.el.charityItem);
1287
1405
  if (!context.hasClass('charity-added')) {
@@ -1291,17 +1409,53 @@ $(document).ready(function () {
1291
1409
  changeCharityPrice.call(this);
1292
1410
  }
1293
1411
  });
1294
- $(Wick.BasketPage.el.charityItem).on('click', Wick.BasketPage.el.removeButton, updateCharity);
1295
- $(Wick.BasketPage.el.orderSummary).on('click', Wick.BasketPage.el.voucherRemove, voucherRemove);
1296
- $(Wick.BasketPage.el.promoWrapper).on('click', Wick.BasketPage.el.promoClose, Wick.BasketPage.removePromotion);
1297
- $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.deliveryStockButton, toggleWisdom);
1412
+ $(Wick.BasketPage.el.charityItem).on(
1413
+ 'click',
1414
+ Wick.BasketPage.el.removeButton,
1415
+ updateCharity
1416
+ );
1417
+ $(Wick.BasketPage.el.orderSummary).on(
1418
+ 'click',
1419
+ Wick.BasketPage.el.voucherRemove,
1420
+ voucherRemove
1421
+ );
1422
+ $(Wick.BasketPage.el.promoWrapper).on(
1423
+ 'click',
1424
+ Wick.BasketPage.el.promoClose,
1425
+ Wick.BasketPage.removePromotion
1426
+ );
1427
+ $(Wick.BasketPage.el.content).on(
1428
+ 'click',
1429
+ Wick.BasketPage.el.deliveryStockButton,
1430
+ toggleWisdom
1431
+ );
1298
1432
  $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.wisdomClose, toggleWisdom);
1299
- $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.wisdomCheck, checkDeliveryStock);
1300
- $(Wick.BasketPage.el.content).on('keypress', Wick.BasketPage.el.wisdomPostcode, checkDeliveryStockOnEnter);
1301
- $(Wick.BasketPage.el.content).on('blur', Wick.BasketPage.el.wisdomPostcode, prettifyWisdomPostcode);
1433
+ $(Wick.BasketPage.el.content).on(
1434
+ 'click',
1435
+ Wick.BasketPage.el.wisdomCheck,
1436
+ checkDeliveryStock
1437
+ );
1438
+ $(Wick.BasketPage.el.content).on(
1439
+ 'keypress',
1440
+ Wick.BasketPage.el.wisdomPostcode,
1441
+ checkDeliveryStockOnEnter
1442
+ );
1443
+ $(Wick.BasketPage.el.content).on(
1444
+ 'blur',
1445
+ Wick.BasketPage.el.wisdomPostcode,
1446
+ prettifyWisdomPostcode
1447
+ );
1302
1448
  $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.wisdomAdd, addDeliveryStock);
1303
- $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.changeLink, Wick.Wisdom.onLinkChange);
1304
- $(Wick.BasketPage.el.content).on('click', Wick.BasketPage.el.summaryAccordion, Wick.BasketPage.changeAccordionText);
1449
+ $(Wick.BasketPage.el.content).on(
1450
+ 'click',
1451
+ Wick.BasketPage.el.changeLink,
1452
+ Wick.Wisdom.onLinkChange
1453
+ );
1454
+ $(Wick.BasketPage.el.content).on(
1455
+ 'click',
1456
+ Wick.BasketPage.el.summaryAccordion,
1457
+ Wick.BasketPage.changeAccordionText
1458
+ );
1305
1459
  $('main').on('click', Wick.BasketPage.el.promoClose, Wick.BasketPage.removePromotion);
1306
1460
 
1307
1461
  $(Wick.BasketPage.el.voucherRemove).unbind('click');