wickes-css2 2.105.0-develop.1 → 2.105.0-develop.10

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 (259) hide show
  1. package/Readme.md +4 -3
  2. package/build/css/category-main.css +1 -1
  3. package/build/css/homepage-main.css +1 -1
  4. package/build/css/kitchen-plp-main.css +1 -1
  5. package/build/css/main.css +1 -1
  6. package/build/css/my-account-main-v2.css +1 -1
  7. package/build/css/my-account-main.css +1 -1
  8. package/build/css/pages/checkout-new.css +1 -1
  9. package/build/css/pages/checkout.css +1 -1
  10. package/build/css/pages/my-account-v2.css +1 -1
  11. package/build/css/pages/page_checkout_delivery-new.css +1 -1
  12. package/build/css/pages/page_discount.css +1 -1
  13. package/build/css/pages/page_product_search.css +1 -1
  14. package/build/css/pages/page_products-list-combined.css +1 -1
  15. package/build/css/pages/page_products-list.css +1 -1
  16. package/build/css/pages/tradePro-rewards.css +1 -1
  17. package/build/css/pdp-main-before-combine.css +1 -1
  18. package/build/css/pdp-main-critical.css +1 -1
  19. package/build/css/pdp-main-non-critical.css +1 -1
  20. package/build/css/pdp-main.css +1 -1
  21. package/build/css/plp-main.css +1 -1
  22. package/build/css/store-locator-main.css +1 -1
  23. package/build/img/quick-filters/bath1.svg +10 -0
  24. package/build/img/quick-filters/bath3.svg +3 -0
  25. package/build/img/quick-filters/bath4.svg +10 -0
  26. package/build/img/quick-filters/bath5.svg +10 -0
  27. package/build/img/quick-filters/image1.jpg +0 -0
  28. package/build/img/quick-filters/image2.jpg +0 -0
  29. package/build/img/quick-filters/image3.jpg +0 -0
  30. package/build/js/account-members.min.js +1 -1
  31. package/build/js/basket.min.js +2 -2
  32. package/build/js/bundle.min.js +1 -1
  33. package/build/js/checkout.min.js +2 -2
  34. package/build/js/emulation.min.js +12125 -11596
  35. package/build/js/general.bundle.min.js +1 -1
  36. package/build/js/kitchen/kitchen-plp.min.js +1 -9
  37. package/build/js/merged-checkout.min.js +2 -2
  38. package/build/js/mini-basket-slider.min.js +1 -1
  39. package/build/js/my-account.min.js +1 -1
  40. package/build/js/page/basket/basket-update-cart-action.js +59 -56
  41. package/build/js/page/basket/basket-update-cart.js +27 -27
  42. package/build/js/page/basket/basket-utils.js +40 -33
  43. package/build/js/page/basket/mini-basket-total.js +70 -66
  44. package/build/js/page/basket/quantity-change-handler.js +73 -55
  45. package/build/js/page/basket/update-quantity-operation.js +39 -30
  46. package/build/js/page/basket/update-quantity.js +62 -62
  47. package/build/js/page/basket-v2.js +362 -229
  48. package/build/js/page/billie-business-type.js +27 -27
  49. package/build/js/page/checkout-payment-details.js +301 -299
  50. package/build/js/page/components/discounts.js +39 -36
  51. package/build/js/page/components/mini-basket-slider.js +604 -545
  52. package/build/js/page/filters/desktop-nav.js +64 -0
  53. package/build/js/page/filters/mobile-nav.js +93 -0
  54. package/build/js/page/filters/plp-filters-chips.js +92 -0
  55. package/build/js/page/filters/plp-filters-mobile.js +150 -0
  56. package/build/js/page/filters/plp-filters-panel.js +123 -0
  57. package/build/js/page/filters/plp-filters-utils.js +66 -0
  58. package/build/js/page/filters/plp-filters.js +268 -0
  59. package/build/js/page/filters/sort-by.js +172 -0
  60. package/build/js/page/kitchen/colour-swatches.js +5 -2
  61. package/build/js/page/klarna-modal-scroll-disable.js +4 -4
  62. package/build/js/page/my-account.js +32 -47
  63. package/build/js/page/online-exclusive.js +28 -31
  64. package/build/js/page/quick-filter.js +108 -0
  65. package/build/js/page/search-filter.js +62 -0
  66. package/build/js/page/share-project-list.js +57 -0
  67. package/build/js/page/tradePro-rewards.js +69 -39
  68. package/build/js/page/utils/copy-to-clipboard.js +79 -47
  69. package/build/js/page/utils/helpers.js +14 -9
  70. package/build/js/page/utils/show-more-less.js +273 -0
  71. package/build/js/pdp.bundle.min.js +1 -1
  72. package/build/js/plp-filters.min.js +9 -0
  73. package/build/js/plp.bundle.min.js +1 -1
  74. package/build/js/project-list.min.js +143 -85
  75. package/build/js/search-filter.min.js +1 -0
  76. package/build/js/share-project-list.min.js +1 -0
  77. package/build/js/tradePro-rewards.min.js +1 -1
  78. package/package.json +4 -2
  79. package/src/components/.DS_Store +0 -0
  80. package/src/components/accordion.hbs +2 -2
  81. package/src/components/date-selection.hbs +25 -6
  82. package/src/components/generate-project-id.hbs +1 -1
  83. package/src/components/kitchen/dropdown.hbs +6 -3
  84. package/src/components/kitchen/filter-modal-content-kitchen.hbs +10 -0
  85. package/src/components/kitchen/filter-modal.hbs +10 -13
  86. package/src/components/kitchen/kitchen-card.hbs +1 -1
  87. package/src/components/kitchen/plp-filters.hbs +3 -1
  88. package/src/components/kitchen/sort-by.hbs +1 -1
  89. package/src/components/my-account/barcode.hbs +1 -3
  90. package/src/components/my-account/cards-swap.hbs +10 -0
  91. package/src/components/my-account/clipboard-code-card.hbs +3 -3
  92. package/src/components/my-account/discount.hbs +1 -1
  93. package/src/components/my-account/greetings.hbs +1 -1
  94. package/src/components/quick-filter.hbs +56 -0
  95. package/src/components/search-filter-modal-content.hbs +102 -0
  96. package/src/components/search-filter.hbs +121 -112
  97. package/src/components/shopping-list-with-share-list-v2.hbs +28 -10
  98. package/src/components/shopping-list.hbs +5 -5
  99. package/src/data/data_plp_load-more.json +1 -1
  100. package/src/data/data_quick-filter.json +508 -0
  101. package/src/data/my-account/data_my-account.json +9 -0
  102. package/src/elements/btn.hbs +7 -0
  103. package/src/img/quick-filters/bath1.svg +10 -0
  104. package/src/img/quick-filters/bath3.svg +3 -0
  105. package/src/img/quick-filters/bath4.svg +10 -0
  106. package/src/img/quick-filters/bath5.svg +10 -0
  107. package/src/img/quick-filters/image1.jpg +0 -0
  108. package/src/img/quick-filters/image2.jpg +0 -0
  109. package/src/img/quick-filters/image3.jpg +0 -0
  110. package/src/js/components/cards-swap.js +74 -0
  111. package/src/js/components/general/accordion.js +44 -33
  112. package/src/js/components/general/cart-slider.js +19 -16
  113. package/src/js/components/general/create-popup-slider.js +168 -173
  114. package/src/js/components/share-project-list.js +8 -5
  115. package/src/js/emulation/big-wins.js +1081 -904
  116. package/src/js/emulation/billie-modal.js +23 -19
  117. package/src/js/emulation/checkout-payment-details.js +47 -38
  118. package/src/js/emulation/custom-slider-emulation.js +17 -13
  119. package/src/js/emulation/filters-emulation.js +164 -0
  120. package/src/js/emulation/forms.js +360 -323
  121. package/src/js/emulation/mini-basket-data.js +1051 -923
  122. package/src/js/emulation/paymentLoader.js +17 -17
  123. package/src/js/emulation/pdf-file-loader.js +89 -91
  124. package/src/js/emulation/popover-mini-basket.js +246 -239
  125. package/src/js/emulation/product-counter.js +50 -0
  126. package/src/js/emulation/project-list-pdp.js +320 -316
  127. package/src/js/emulation/repayment-toggle.js +23 -24
  128. package/src/js/emulation/reset-filter-desktop.js +5 -0
  129. package/src/js/emulation/selectable.js +22 -18
  130. package/src/js/emulation/wismo-details.js +23 -31
  131. package/src/js/page/basket/basket-update-cart-action.js +59 -56
  132. package/src/js/page/basket/basket-update-cart.js +27 -27
  133. package/src/js/page/basket/basket-utils.js +40 -33
  134. package/src/js/page/basket/mini-basket-total.js +70 -66
  135. package/src/js/page/basket/quantity-change-handler.js +73 -55
  136. package/src/js/page/basket/update-quantity-operation.js +39 -30
  137. package/src/js/page/basket/update-quantity.js +62 -62
  138. package/src/js/page/basket-v2.js +362 -229
  139. package/src/js/page/billie-business-type.js +27 -27
  140. package/src/js/page/checkout-payment-details.js +301 -299
  141. package/src/js/page/components/discounts.js +39 -36
  142. package/src/js/page/components/mini-basket-slider.js +604 -545
  143. package/src/js/page/filters/desktop-nav.js +64 -0
  144. package/src/js/page/filters/mobile-nav.js +93 -0
  145. package/src/js/page/filters/plp-filters-chips.js +92 -0
  146. package/src/js/page/filters/plp-filters-mobile.js +150 -0
  147. package/src/js/page/filters/plp-filters-panel.js +123 -0
  148. package/src/js/page/filters/plp-filters-utils.js +66 -0
  149. package/src/js/page/filters/plp-filters.js +268 -0
  150. package/src/js/page/filters/sort-by.js +172 -0
  151. package/src/js/page/kitchen/colour-swatches.js +5 -2
  152. package/src/js/page/klarna-modal-scroll-disable.js +4 -4
  153. package/src/js/page/my-account.js +32 -47
  154. package/src/js/page/online-exclusive.js +28 -31
  155. package/src/js/page/quick-filter.js +108 -0
  156. package/src/js/page/search-filter.js +62 -0
  157. package/src/js/page/share-project-list.js +57 -0
  158. package/src/js/page/tradePro-rewards.js +69 -39
  159. package/src/js/page/utils/copy-to-clipboard.js +79 -47
  160. package/src/js/page/utils/helpers.js +14 -9
  161. package/src/js/page/utils/show-more-less.js +273 -0
  162. package/src/page_empty-shared-project-list-bicester-hub.html +4 -0
  163. package/src/page_empty-shopping-list_guest.html +1 -0
  164. package/src/page_kitchen-plp.html +2 -2
  165. package/src/page_my-account-installer.html +1 -1
  166. package/src/page_my-account-trade-pro-carousel-double.html +127 -0
  167. package/src/page_my-account-trade-pro-carousel.html +134 -0
  168. package/src/page_my-account-trade-pro.html +1 -1
  169. package/src/page_my-shopping-list-add-notes.html +1 -0
  170. package/src/page_my-shopping-list-energy.html +1 -0
  171. package/src/page_my-shopping-list-hide-download.html +3 -2
  172. package/src/page_my-shopping-list-pdf.html +2 -0
  173. package/src/page_my-shopping-list-saved-ref.html +1 -0
  174. package/src/page_my-shopping-list-wisdom-oos-registered.html +1 -0
  175. package/src/page_my-shopping-list-wisdom-oos.html +1 -0
  176. package/src/page_my-shopping-list-wisdom-partial-registered.html +1 -0
  177. package/src/page_my-shopping-list-wisdom-registered.html +1 -0
  178. package/src/page_my-shopping-list-wisdom.html +1 -0
  179. package/src/page_my-shopping-list.html +1 -0
  180. package/src/page_my-shopping-list_not-register.html +3 -0
  181. package/src/page_plp-with-paint.html +2 -7
  182. package/src/page_plp.html +2 -7
  183. package/src/page_plp_v2-energy-efficiency.html +1 -6
  184. package/src/page_plp_v2-favourite-products.html +6 -7
  185. package/src/page_plp_v2-quick-filter_colourSwatches_11.html +79 -0
  186. package/src/page_plp_v2-quick-filter_colourSwatches_5.html +79 -0
  187. package/src/page_plp_v2-quick-filter_iconAndText_5.html +79 -0
  188. package/src/page_plp_v2-quick-filter_iconAndText_9.html +79 -0
  189. package/src/page_plp_v2-quick-filter_iconOnly_11.html +79 -0
  190. package/src/page_plp_v2-quick-filter_iconOnly_5.html +79 -0
  191. package/src/page_plp_v2-quick-filter_imageAndText_5.html +79 -0
  192. package/src/page_plp_v2-quick-filter_imageAndText_9.html +79 -0
  193. package/src/page_plp_v2-quick-filter_textOnly_5.html +79 -0
  194. package/src/page_plp_v2-quick-filter_textOnly_9.html +79 -0
  195. package/src/page_plp_v2-vat.html +2 -7
  196. package/src/page_plp_v2.html +22 -9
  197. package/src/page_product_search-vat.html +2 -7
  198. package/src/page_product_search.html +2 -7
  199. package/src/page_project-list-generate-project-list-ID.html +3 -0
  200. package/src/page_project-list-vat.html +4 -0
  201. package/src/page_project-list-with-new-share-popup-android.html +16 -0
  202. package/src/page_project-list-with-new-share-popup-ios.html +16 -0
  203. package/src/page_project-list-with-new-share-popup.html +2 -1
  204. package/src/page_search-results.html +2 -7
  205. package/src/page_shared-project-list-bicester-hub.html +3 -1
  206. package/src/page_tradepro-discount-app.html +1 -1
  207. package/src/page_tradepro-discount-double.html +109 -0
  208. package/src/page_tradepro-discount.html +36 -2
  209. package/src/partials/head.hbs +1 -0
  210. package/src/scss/common/_common.scss +10 -4
  211. package/src/scss/components/_accordion.scss +1 -3
  212. package/src/scss/components/_custom-slider.scss +17 -16
  213. package/src/scss/components/_date-selection-add-new-styles.scss +48 -7
  214. package/src/scss/components/_date-selection.scss +80 -1
  215. package/src/scss/components/{kitchen/_filter-modal.scss → _filter-modal.scss} +55 -4
  216. package/src/scss/components/{kitchen/_plp-filters.scss → _plp-filters.scss} +31 -13
  217. package/src/scss/components/_popover-mini-basket.scss +3 -3
  218. package/src/scss/components/_quick-filter.scss +288 -0
  219. package/src/scss/components/_search-filter.scss +95 -15
  220. package/src/scss/components/_shared-shopping-list.scss +22 -0
  221. package/src/scss/components/_shopping-list.scss +18 -8
  222. package/src/scss/components/_sort-by.scss +190 -0
  223. package/src/scss/components/checkout-chip.scss +2 -2
  224. package/src/scss/components/checkout-payment-repayment-terms.scss +1 -1
  225. package/src/scss/components/kitchen/_price-tooltip.scss +1 -1
  226. package/src/scss/components/kitchen/_price.scss +1 -1
  227. package/src/scss/components/my-account/_barcode.scss +9 -1
  228. package/src/scss/components/my-account/_cards-swap.scss +60 -0
  229. package/src/scss/components/my-account/_clipboard-code.scss +11 -3
  230. package/src/scss/components/my-account/_discount.scss +12 -2
  231. package/src/scss/globals/_global-components.scss +3 -0
  232. package/src/scss/helpers/_colors-semantic.scss +68 -68
  233. package/src/scss/helpers/_variables.scss +244 -196
  234. package/src/scss/kitchen-plp-main.scss +0 -4
  235. package/src/scss/main.scss +65 -65
  236. package/src/scss/pages/my-account-v2.scss +42 -5
  237. package/src/scss/pages/page_discount.scss +8 -4
  238. package/src/scss/pages/page_product-details-v2.scss +1 -4
  239. package/src/scss/pages/page_product_search.scss +9 -1
  240. package/src/scss/pages/page_products-list-combined.scss +28 -24
  241. package/src/scss/pages/page_products-list.scss +8 -0
  242. package/src/scss/pages/tradePro-rewards.scss +3 -4
  243. package/src/scss/plp-main.scss +1 -0
  244. package/src/sitemap.html +25 -1
  245. package/build/js/page/accordion.js +0 -35
  246. package/build/js/page/kitchen/plp-filters-chips.js +0 -90
  247. package/build/js/page/kitchen/plp-filters-mobile.js +0 -72
  248. package/build/js/page/kitchen/plp-filters-panel.js +0 -119
  249. package/build/js/page/kitchen/plp-filters-utils.js +0 -65
  250. package/build/js/page/kitchen/plp-filters.js +0 -205
  251. package/build/js/page/kitchen/sort-by.js +0 -157
  252. package/src/js/components/general/search-filter.js +0 -21
  253. package/src/js/page/accordion.js +0 -35
  254. package/src/js/page/kitchen/plp-filters-chips.js +0 -90
  255. package/src/js/page/kitchen/plp-filters-mobile.js +0 -72
  256. package/src/js/page/kitchen/plp-filters-panel.js +0 -119
  257. package/src/js/page/kitchen/plp-filters-utils.js +0 -65
  258. package/src/js/page/kitchen/plp-filters.js +0 -205
  259. package/src/js/page/kitchen/sort-by.js +0 -157
@@ -1,337 +1,341 @@
1
+ var Wick = (window.Wick = window.Wick || {});
2
+
1
3
  function returnErrorCreatePayload() {
2
- return {
3
- message: 'Min. characters 5, max. characters 59, only use characters A-Z and 0-9'
4
- };
4
+ return {
5
+ message: 'Min. characters 5, max. characters 59, only use characters A-Z and 0-9',
6
+ };
5
7
  }
6
8
 
7
9
  function returnErrorSelectPayload() {
8
- return {
9
- message: 'Something went wrong'
10
- };
10
+ return {
11
+ message: 'Something went wrong',
12
+ };
11
13
  }
12
14
 
13
15
  function returnSuccessSelectPayload() {
14
- return {
15
- currentProjectList: {
16
- name: 'Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua.Utenimadminimveniam',
17
- id: 123,
18
- link: '/page_my-shopping-list.html',
19
- isFull: true,
20
- products: [
21
- {
22
- name: 'BoschPSB1800LI218VLiIonCordlessCombiDrillExamplewithlongtitleintworaws',
23
- image: '//media.wickes.co.uk/is/image/wickes/B3182_221100_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
24
- itemTotal: '£2.00',
25
- itemTotalExcVat: '£1.99',
26
- quantity: 1,
27
- },
28
- {
29
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
30
- image: '//media.wickes.co.uk/is/image/wickes/B3182_224661_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
31
- itemTotal: '£1.00',
32
- itemTotalExcVat: '£1.99',
33
- quantity: 2,
34
- },
35
- {
36
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
37
- image: '//media.wickes.co.uk/is/image/wickes/M3549_144650_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
38
- itemTotal: '£3.00',
39
- itemTotalExcVat: '£1.99',
40
- quantity: 3,
41
- },
42
- {
43
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
44
- image: '//media.wickes.co.uk/is/image/wickes/R1478_131881_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
45
- itemTotal: '£3.00',
46
- itemTotalExcVat: '£1.99',
47
- quantity: 3,
48
- },
49
- {
50
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
51
- image: '//media.wickes.co.uk/is/image/wickes/B3182_154100_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
52
- itemTotal: '£3.00',
53
- itemTotalExcVat: '£1.99',
54
- quantity: 3,
55
- },
56
- {
57
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
58
- image: '//media.wickes.co.uk/is/image/wickes/R1478_131882_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
59
- itemTotal: '£3.00',
60
- itemTotalExcVat: '£1.99',
61
- quantity: 3,
62
- },
63
- {
64
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
65
- image: '//media.wickes.co.uk/is/image/wickes/T3274_103040_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
66
- itemTotal: '£3.00',
67
- itemTotalExcVat: '£1.99',
68
- quantity: 3,
69
- },
70
- {
71
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
72
- image: '//media.wickes.co.uk/is/image/wickes/T3274_103015_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
73
- itemTotal: '£3.00',
74
- itemTotalExcVat: '£1.99',
75
- quantity: 3,
16
+ return {
17
+ currentProjectList: {
18
+ name: 'Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua.Utenimadminimveniam',
19
+ id: 123,
20
+ link: '/page_my-shopping-list.html',
21
+ isFull: true,
22
+ products: [
23
+ {
24
+ name: 'BoschPSB1800LI218VLiIonCordlessCombiDrillExamplewithlongtitleintworaws',
25
+ image: '//media.wickes.co.uk/is/image/wickes/B3182_221100_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
26
+ itemTotal: '£2.00',
27
+ itemTotalExcVat: '£1.99',
28
+ quantity: 1,
29
+ },
30
+ {
31
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
32
+ image: '//media.wickes.co.uk/is/image/wickes/B3182_224661_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
33
+ itemTotal: '£1.00',
34
+ itemTotalExcVat: '£1.99',
35
+ quantity: 2,
36
+ },
37
+ {
38
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
39
+ image: '//media.wickes.co.uk/is/image/wickes/M3549_144650_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
40
+ itemTotal: '£3.00',
41
+ itemTotalExcVat: '£1.99',
42
+ quantity: 3,
43
+ },
44
+ {
45
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
46
+ image: '//media.wickes.co.uk/is/image/wickes/R1478_131881_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
47
+ itemTotal: '£3.00',
48
+ itemTotalExcVat: '£1.99',
49
+ quantity: 3,
50
+ },
51
+ {
52
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
53
+ image: '//media.wickes.co.uk/is/image/wickes/B3182_154100_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
54
+ itemTotal: '£3.00',
55
+ itemTotalExcVat: '£1.99',
56
+ quantity: 3,
57
+ },
58
+ {
59
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
60
+ image: '//media.wickes.co.uk/is/image/wickes/R1478_131882_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
61
+ itemTotal: '£3.00',
62
+ itemTotalExcVat: '£1.99',
63
+ quantity: 3,
64
+ },
65
+ {
66
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
67
+ image: '//media.wickes.co.uk/is/image/wickes/T3274_103040_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
68
+ itemTotal: '£3.00',
69
+ itemTotalExcVat: '£1.99',
70
+ quantity: 3,
71
+ },
72
+ {
73
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
74
+ image: '//media.wickes.co.uk/is/image/wickes/T3274_103015_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
75
+ itemTotal: '£3.00',
76
+ itemTotalExcVat: '£1.99',
77
+ quantity: 3,
78
+ },
79
+ {
80
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
81
+ image: '//media.wickes.co.uk/is/image/wickes/T3274_103043_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
82
+ itemTotal: '£3.00',
83
+ itemTotalExcVat: '£1.99',
84
+ quantity: 3,
85
+ },
86
+ {
87
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
88
+ image: '//media.wickes.co.uk/is/image/wickes/O0032_109450_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
89
+ itemTotal: '£3.00',
90
+ itemTotalExcVat: '£1.99',
91
+ quantity: 3,
92
+ },
93
+ {
94
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
95
+ image: '//media.wickes.co.uk/is/image/wickes/O0032_109451_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
96
+ itemTotal: '£3.00',
97
+ itemTotalExcVat: '£1.99',
98
+ quantity: 3,
99
+ },
100
+ {
101
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
102
+ image: '//media.wickes.co.uk/is/image/wickes/GPID_5000030119_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
103
+ itemTotal: '£3.00',
104
+ itemTotalExcVat: '£1.99',
105
+ quantity: 3,
106
+ },
107
+ {
108
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
109
+ image: '//media.wickes.co.uk/is/image/wickes/X0041_165857_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
110
+ itemTotal: '£3.00',
111
+ itemTotalExcVat: '£1.99',
112
+ quantity: 3,
113
+ },
114
+ {
115
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
116
+ image: '//media.wickes.co.uk/is/image/wickes/R0486_180900_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
117
+ itemTotal: '£3.00',
118
+ itemTotalExcVat: '£1.99',
119
+ quantity: 3,
120
+ },
121
+ ],
76
122
  },
77
- {
78
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
79
- image: '//media.wickes.co.uk/is/image/wickes/T3274_103043_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
80
- itemTotal: '£3.00',
81
- itemTotalExcVat: '£1.99',
82
- quantity: 3,
83
- },
84
- {
85
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
86
- image: '//media.wickes.co.uk/is/image/wickes/O0032_109450_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
87
- itemTotal: '£3.00',
88
- itemTotalExcVat: '£1.99',
89
- quantity: 3,
90
- },
91
- {
92
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
93
- image: '//media.wickes.co.uk/is/image/wickes/O0032_109451_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
94
- itemTotal: '£3.00',
95
- itemTotalExcVat: '£1.99',
96
- quantity: 3,
97
- },
98
- {
99
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
100
- image: '//media.wickes.co.uk/is/image/wickes/GPID_5000030119_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
101
- itemTotal: '£3.00',
102
- itemTotalExcVat: '£1.99',
103
- quantity: 3,
104
- },
105
- {
106
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
107
- image: '//media.wickes.co.uk/is/image/wickes/X0041_165857_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
108
- itemTotal: '£3.00',
109
- itemTotalExcVat: '£1.99',
110
- quantity: 3,
111
- },
112
- {
113
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
114
- image: '//media.wickes.co.uk/is/image/wickes/R0486_180900_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
115
- itemTotal: '£3.00',
116
- itemTotalExcVat: '£1.99',
117
- quantity: 3,
118
- },
119
- ],
120
- },
121
- }
123
+ };
122
124
  }
123
125
 
124
126
  function returnSuccessCreatePayload() {
125
- return {
126
- currentProjectList: {
127
- name: 'Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua.Utenimadminimveniam',
128
- id: 123,
129
- link: '/page_my-shopping-list.html',
130
- isFull: true,
131
- products: [
132
- {
133
- name: 'BoschPSB1800LI218VLiIonCordlessCombiDrillExamplewithlongtitleintworaws',
134
- image: '//media.wickes.co.uk/is/image/wickes/B3182_221100_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
135
- itemTotal: '£2.00',
136
- itemTotalExcVat: '£1.99',
137
- quantity: 1,
138
- },
139
- {
140
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
141
- image: '//media.wickes.co.uk/is/image/wickes/B3182_224661_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
142
- itemTotal: '£1.00',
143
- itemTotalExcVat: '£1.99',
144
- quantity: 2,
127
+ return {
128
+ currentProjectList: {
129
+ name: 'Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua.Utenimadminimveniam',
130
+ id: 123,
131
+ link: '/page_my-shopping-list.html',
132
+ isFull: true,
133
+ products: [
134
+ {
135
+ name: 'BoschPSB1800LI218VLiIonCordlessCombiDrillExamplewithlongtitleintworaws',
136
+ image: '//media.wickes.co.uk/is/image/wickes/B3182_221100_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
137
+ itemTotal: '£2.00',
138
+ itemTotalExcVat: '£1.99',
139
+ quantity: 1,
140
+ },
141
+ {
142
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
143
+ image: '//media.wickes.co.uk/is/image/wickes/B3182_224661_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
144
+ itemTotal: '£1.00',
145
+ itemTotalExcVat: '£1.99',
146
+ quantity: 2,
147
+ },
148
+ {
149
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
150
+ image: '//media.wickes.co.uk/is/image/wickes/M3549_144650_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
151
+ itemTotal: '£3.00',
152
+ itemTotalExcVat: '£1.99',
153
+ quantity: 3,
154
+ },
155
+ {
156
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
157
+ image: '//media.wickes.co.uk/is/image/wickes/R1478_131881_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
158
+ itemTotal: '£3.00',
159
+ itemTotalExcVat: '£1.99',
160
+ quantity: 3,
161
+ },
162
+ {
163
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
164
+ image: '//media.wickes.co.uk/is/image/wickes/B3182_154100_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
165
+ itemTotal: '£3.00',
166
+ itemTotalExcVat: '£1.99',
167
+ quantity: 3,
168
+ },
169
+ {
170
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
171
+ image: '//media.wickes.co.uk/is/image/wickes/R1478_131882_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
172
+ itemTotal: '£3.00',
173
+ itemTotalExcVat: '£1.99',
174
+ quantity: 3,
175
+ },
176
+ {
177
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
178
+ image: '//media.wickes.co.uk/is/image/wickes/T3274_103040_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
179
+ itemTotal: '£3.00',
180
+ itemTotalExcVat: '£1.99',
181
+ quantity: 3,
182
+ },
183
+ {
184
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
185
+ image: '//media.wickes.co.uk/is/image/wickes/T3274_103015_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
186
+ itemTotal: '£3.00',
187
+ itemTotalExcVat: '£1.99',
188
+ quantity: 3,
189
+ },
190
+ {
191
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
192
+ image: '//media.wickes.co.uk/is/image/wickes/T3274_103043_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
193
+ itemTotal: '£3.00',
194
+ itemTotalExcVat: '£1.99',
195
+ quantity: 3,
196
+ },
197
+ {
198
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
199
+ image: '//media.wickes.co.uk/is/image/wickes/O0032_109450_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
200
+ itemTotal: '£3.00',
201
+ itemTotalExcVat: '£1.99',
202
+ quantity: 3,
203
+ },
204
+ {
205
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
206
+ image: '//media.wickes.co.uk/is/image/wickes/O0032_109451_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
207
+ itemTotal: '£3.00',
208
+ itemTotalExcVat: '£1.99',
209
+ quantity: 3,
210
+ },
211
+ {
212
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
213
+ image: '//media.wickes.co.uk/is/image/wickes/GPID_5000030119_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
214
+ itemTotal: '£3.00',
215
+ itemTotalExcVat: '£1.99',
216
+ quantity: 3,
217
+ },
218
+ {
219
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
220
+ image: '//media.wickes.co.uk/is/image/wickes/X0041_165857_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
221
+ itemTotal: '£3.00',
222
+ itemTotalExcVat: '£1.99',
223
+ quantity: 3,
224
+ },
225
+ {
226
+ name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
227
+ image: '//media.wickes.co.uk/is/image/wickes/R0486_180900_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
228
+ itemTotal: '£3.00',
229
+ itemTotalExcVat: '£1.99',
230
+ quantity: 3,
231
+ },
232
+ ],
145
233
  },
146
- {
147
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
148
- image: '//media.wickes.co.uk/is/image/wickes/M3549_144650_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
149
- itemTotal: '£3.00',
150
- itemTotalExcVat: '£1.99',
151
- quantity: 3,
152
- },
153
- {
154
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
155
- image: '//media.wickes.co.uk/is/image/wickes/R1478_131881_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
156
- itemTotal: '£3.00',
157
- itemTotalExcVat: '£1.99',
158
- quantity: 3,
159
- },
160
- {
161
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
162
- image: '//media.wickes.co.uk/is/image/wickes/B3182_154100_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
163
- itemTotal: '£3.00',
164
- itemTotalExcVat: '£1.99',
165
- quantity: 3,
166
- },
167
- {
168
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
169
- image: '//media.wickes.co.uk/is/image/wickes/R1478_131882_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
170
- itemTotal: '£3.00',
171
- itemTotalExcVat: '£1.99',
172
- quantity: 3,
173
- },
174
- {
175
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
176
- image: '//media.wickes.co.uk/is/image/wickes/T3274_103040_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
177
- itemTotal: '£3.00',
178
- itemTotalExcVat: '£1.99',
179
- quantity: 3,
180
- },
181
- {
182
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
183
- image: '//media.wickes.co.uk/is/image/wickes/T3274_103015_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
184
- itemTotal: '£3.00',
185
- itemTotalExcVat: '£1.99',
186
- quantity: 3,
187
- },
188
- {
189
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
190
- image: '//media.wickes.co.uk/is/image/wickes/T3274_103043_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
191
- itemTotal: '£3.00',
192
- itemTotalExcVat: '£1.99',
193
- quantity: 3,
194
- },
195
- {
196
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
197
- image: '//media.wickes.co.uk/is/image/wickes/O0032_109450_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
198
- itemTotal: '£3.00',
199
- itemTotalExcVat: '£1.99',
200
- quantity: 3,
201
- },
202
- {
203
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
204
- image: '//media.wickes.co.uk/is/image/wickes/O0032_109451_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
205
- itemTotal: '£3.00',
206
- itemTotalExcVat: '£1.99',
207
- quantity: 3,
208
- },
209
- {
210
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
211
- image: '//media.wickes.co.uk/is/image/wickes/GPID_5000030119_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
212
- itemTotal: '£3.00',
213
- itemTotalExcVat: '£1.99',
214
- quantity: 3,
215
- },
216
- {
217
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
218
- image: '//media.wickes.co.uk/is/image/wickes/X0041_165857_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
219
- itemTotal: '£3.00',
220
- itemTotalExcVat: '£1.99',
221
- quantity: 3,
222
- },
223
- {
224
- name: 'Bosch PSB 1800 LI-2 18V Li-Ion Cordless Combi Drill Example with long title in two raws',
225
- image: '//media.wickes.co.uk/is/image/wickes/R0486_180900_00?$largeNormal$&defaultImage=wickes/2018-Wickes-Missing-Product-650x650',
226
- itemTotal: '£3.00',
227
- itemTotalExcVat: '£1.99',
228
- quantity: 3,
229
- },
230
- ],
231
- },
232
- projectListLength: 10,
233
- maxAmountOfProjects: 2,
234
- }
234
+ projectListLength: 10,
235
+ maxAmountOfProjects: 2,
236
+ };
235
237
  }
236
238
 
237
239
  function returnSuccessGetPayload(currentPage) {
238
- return {
239
- currentPage: currentPage,
240
- pagesLength: 101,
241
- projectLists: [
242
- {
243
- name: `Bathroom ${currentPage}`,
244
- id: "bathroom",
245
- isFull: true,
246
- },
247
- {
248
- name: `Dining room ${currentPage}`,
249
- id: "dining-room",
250
- isFull: false
251
- }, {
252
- name: `Driveway ${currentPage}`,
253
- id: "driveway",
254
- isFull: false
255
- },
256
- {
257
- name: `Floors ${currentPage}`,
258
- id: "floors",
259
- isFull: false
260
- },
261
- {
262
- name: `Garage ${currentPage}`,
263
- id: "garage",
264
- isFull: true,
265
- },
266
- {
267
- name: `Garden ${currentPage}`,
268
- id: "garden",
269
- isFull: false
270
- },
271
- {
272
- name: `Garden shed ${currentPage}`,
273
- id: "garden-shed",
274
- isFull: false
275
- },
276
- {
277
- name: `Gym ${currentPage}`,
278
- id: "gym",
279
- isFull: false
280
- },
281
- {
282
- name: `Kids room ${currentPage}`,
283
- id: "kids-room",
284
- isFull: false
285
- },
286
- {
287
- name: `Kitchen update ${currentPage}`,
288
- id: "kitchen-update",
289
- isFull: false
290
- },
291
- {
292
- name: `Living room ${currentPage}`,
293
- id: "living-room",
294
- isFull: false
295
- },
296
- {
297
- name: `Paint ${currentPage}`,
298
- id: "paint",
299
- isFull: true,
300
- }
301
- ],
302
- }
240
+ return {
241
+ currentPage: currentPage,
242
+ pagesLength: 101,
243
+ projectLists: [
244
+ {
245
+ name: `Bathroom ${currentPage}`,
246
+ id: 'bathroom',
247
+ isFull: true,
248
+ },
249
+ {
250
+ name: `Dining room ${currentPage}`,
251
+ id: 'dining-room',
252
+ isFull: false,
253
+ },
254
+ {
255
+ name: `Driveway ${currentPage}`,
256
+ id: 'driveway',
257
+ isFull: false,
258
+ },
259
+ {
260
+ name: `Floors ${currentPage}`,
261
+ id: 'floors',
262
+ isFull: false,
263
+ },
264
+ {
265
+ name: `Garage ${currentPage}`,
266
+ id: 'garage',
267
+ isFull: true,
268
+ },
269
+ {
270
+ name: `Garden ${currentPage}`,
271
+ id: 'garden',
272
+ isFull: false,
273
+ },
274
+ {
275
+ name: `Garden shed ${currentPage}`,
276
+ id: 'garden-shed',
277
+ isFull: false,
278
+ },
279
+ {
280
+ name: `Gym ${currentPage}`,
281
+ id: 'gym',
282
+ isFull: false,
283
+ },
284
+ {
285
+ name: `Kids room ${currentPage}`,
286
+ id: 'kids-room',
287
+ isFull: false,
288
+ },
289
+ {
290
+ name: `Kitchen update ${currentPage}`,
291
+ id: 'kitchen-update',
292
+ isFull: false,
293
+ },
294
+ {
295
+ name: `Living room ${currentPage}`,
296
+ id: 'living-room',
297
+ isFull: false,
298
+ },
299
+ {
300
+ name: `Paint ${currentPage}`,
301
+ id: 'paint',
302
+ isFull: true,
303
+ },
304
+ ],
305
+ };
303
306
  }
304
307
 
305
308
  $(document).ready(function () {
306
- function init() {
307
- if (!$('.shop-list-modal').length) {
308
- return;
309
+ function init() {
310
+ if (!$('.shop-list-modal').length || !Wick.SavingShoppingList) {
311
+ return;
312
+ }
313
+ $(Wick.SavingShoppingList?.el.modalSavingToShopList).on(
314
+ 'show.bs.modal',
315
+ Wick.SavingShoppingList.init
316
+ );
317
+ $(window).on(Wick.SavingShoppingList.CREATE_PROJECT_LIST_EVENT, function (e) {
318
+ setTimeout(() => {
319
+ e.detail.payload.projectListName.length >= 5
320
+ ? e.detail.resolve(returnSuccessCreatePayload())
321
+ : e.detail.reject(returnErrorCreatePayload());
322
+ }, 1000);
323
+ });
324
+ $(window).on(Wick.SavingShoppingList.SELECT_PROJECT_LIST_EVENT, function (e) {
325
+ setTimeout(() => {
326
+ e.detail.payload.projectListId === 'dining-room'
327
+ ? e.detail.reject(returnErrorSelectPayload())
328
+ : e.detail.resolve(returnSuccessSelectPayload());
329
+ }, 1000);
330
+ });
331
+ $(window).on(Wick.SavingShoppingList.GET_PROJECT_LISTS_EVENT, function (e) {
332
+ setTimeout(() => {
333
+ e.detail.payload.page === 4
334
+ ? e.detail.reject(returnErrorSelectPayload())
335
+ : e.detail.resolve(returnSuccessGetPayload(e.detail.payload.page));
336
+ }, 1000);
337
+ });
309
338
  }
310
339
 
311
- $(Wick.SavingShoppingList.el.modalSavingToShopList).on('show.bs.modal', Wick.SavingShoppingList.init);
312
- $(window).on(Wick.SavingShoppingList.CREATE_PROJECT_LIST_EVENT, function (e) {
313
- setTimeout(() => {
314
- e.detail.payload.projectListName.length >= 5
315
- ? e.detail.resolve(returnSuccessCreatePayload())
316
- : e.detail.reject(returnErrorCreatePayload());
317
- }, 1000);
318
-
319
- });
320
- $(window).on(Wick.SavingShoppingList.SELECT_PROJECT_LIST_EVENT, function (e) {
321
- setTimeout(() => {
322
- e.detail.payload.projectListId === "dining-room"
323
- ? e.detail.reject(returnErrorSelectPayload())
324
- : e.detail.resolve(returnSuccessSelectPayload())
325
- }, 1000);
326
- });
327
- $(window).on(Wick.SavingShoppingList.GET_PROJECT_LISTS_EVENT, function (e) {
328
- setTimeout(() => {
329
- e.detail.payload.page === 4
330
- ? e.detail.reject(returnErrorSelectPayload())
331
- : e.detail.resolve(returnSuccessGetPayload(e.detail.payload.page))
332
- }, 1000);
333
- });
334
- }
335
-
336
- init();
340
+ init();
337
341
  });