wickes-css2 2.105.0-develop.3 → 2.105.0-develop.5

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 (184) hide show
  1. package/Readme.md +1 -2
  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/page_product_search.css +1 -1
  9. package/build/css/pages/page_products-list-combined.css +1 -1
  10. package/build/css/pages/page_products-list.css +1 -1
  11. package/build/css/pages/tradePro-rewards.css +1 -1
  12. package/build/css/pdp-main-before-combine.css +1 -1
  13. package/build/css/pdp-main-non-critical.css +1 -1
  14. package/build/css/pdp-main.css +1 -1
  15. package/build/css/plp-main.css +1 -1
  16. package/build/css/store-locator-main.css +1 -1
  17. package/build/js/basket.min.js +2 -2
  18. package/build/js/bundle.min.js +1 -1
  19. package/build/js/checkout.min.js +2 -2
  20. package/build/js/emulation.min.js +12125 -11596
  21. package/build/js/general.bundle.min.js +1 -1
  22. package/build/js/kitchen/kitchen-plp.min.js +1 -9
  23. package/build/js/merged-checkout.min.js +2 -2
  24. package/build/js/mini-basket-slider.min.js +1 -1
  25. package/build/js/my-account.min.js +1 -1
  26. package/build/js/page/basket/basket-update-cart-action.js +59 -56
  27. package/build/js/page/basket/basket-update-cart.js +27 -27
  28. package/build/js/page/basket/basket-utils.js +40 -33
  29. package/build/js/page/basket/mini-basket-total.js +70 -66
  30. package/build/js/page/basket/quantity-change-handler.js +73 -55
  31. package/build/js/page/basket/update-quantity-operation.js +39 -30
  32. package/build/js/page/basket/update-quantity.js +62 -62
  33. package/build/js/page/basket-v2.js +362 -229
  34. package/build/js/page/billie-business-type.js +27 -27
  35. package/build/js/page/checkout-payment-details.js +301 -299
  36. package/build/js/page/components/discounts.js +39 -36
  37. package/build/js/page/components/mini-basket-slider.js +604 -545
  38. package/build/js/page/filters/desktop-nav.js +64 -0
  39. package/build/js/page/filters/mobile-nav.js +93 -0
  40. package/build/js/page/filters/plp-filters-chips.js +92 -0
  41. package/build/js/page/filters/plp-filters-mobile.js +150 -0
  42. package/build/js/page/filters/plp-filters-panel.js +123 -0
  43. package/build/js/page/filters/plp-filters-utils.js +66 -0
  44. package/build/js/page/filters/plp-filters.js +256 -0
  45. package/build/js/page/filters/sort-by.js +172 -0
  46. package/build/js/page/klarna-modal-scroll-disable.js +4 -4
  47. package/build/js/page/online-exclusive.js +28 -30
  48. package/build/js/page/search-filter.js +62 -0
  49. package/build/js/page/share-project-list.js +57 -0
  50. package/build/js/page/tradePro-rewards.js +69 -39
  51. package/build/js/page/utils/copy-to-clipboard.js +79 -47
  52. package/build/js/page/utils/helpers.js +14 -9
  53. package/build/js/page/utils/show-more-less.js +273 -0
  54. package/build/js/pdp.bundle.min.js +1 -1
  55. package/build/js/plp.bundle.min.js +1 -1
  56. package/build/js/project-list.min.js +143 -85
  57. package/build/js/tradePro-rewards.min.js +1 -1
  58. package/package.json +3 -3
  59. package/src/components/.DS_Store +0 -0
  60. package/src/components/accordion.hbs +2 -2
  61. package/src/components/kitchen/dropdown.hbs +6 -3
  62. package/src/components/kitchen/filter-modal-content-kitchen.hbs +10 -0
  63. package/src/components/kitchen/filter-modal.hbs +10 -13
  64. package/src/components/kitchen/plp-filters.hbs +3 -1
  65. package/src/components/kitchen/sort-by.hbs +1 -1
  66. package/src/components/search-filter-modal-content.hbs +102 -0
  67. package/src/components/search-filter.hbs +121 -112
  68. package/src/data/data_plp_load-more.json +1 -1
  69. package/src/elements/btn.hbs +7 -0
  70. package/src/js/components/general/accordion.js +38 -29
  71. package/src/js/components/general/cart-slider.js +19 -16
  72. package/src/js/components/general/create-popup-slider.js +168 -173
  73. package/src/js/emulation/big-wins.js +1081 -904
  74. package/src/js/emulation/billie-modal.js +23 -19
  75. package/src/js/emulation/checkout-payment-details.js +47 -38
  76. package/src/js/emulation/custom-slider-emulation.js +17 -13
  77. package/src/js/emulation/filters-emulation.js +164 -0
  78. package/src/js/emulation/forms.js +360 -323
  79. package/src/js/emulation/mini-basket-data.js +1051 -923
  80. package/src/js/emulation/paymentLoader.js +17 -17
  81. package/src/js/emulation/pdf-file-loader.js +89 -91
  82. package/src/js/emulation/popover-mini-basket.js +246 -239
  83. package/src/js/emulation/product-counter.js +50 -0
  84. package/src/js/emulation/project-list-pdp.js +320 -316
  85. package/src/js/emulation/repayment-toggle.js +23 -24
  86. package/src/js/emulation/reset-filter-desktop.js +5 -0
  87. package/src/js/emulation/selectable.js +22 -18
  88. package/src/js/emulation/wismo-details.js +23 -31
  89. package/src/js/page/basket/basket-update-cart-action.js +59 -56
  90. package/src/js/page/basket/basket-update-cart.js +27 -27
  91. package/src/js/page/basket/basket-utils.js +40 -33
  92. package/src/js/page/basket/mini-basket-total.js +70 -66
  93. package/src/js/page/basket/quantity-change-handler.js +73 -55
  94. package/src/js/page/basket/update-quantity-operation.js +39 -30
  95. package/src/js/page/basket/update-quantity.js +62 -62
  96. package/src/js/page/basket-v2.js +362 -229
  97. package/src/js/page/billie-business-type.js +27 -27
  98. package/src/js/page/checkout-payment-details.js +301 -299
  99. package/src/js/page/components/discounts.js +39 -36
  100. package/src/js/page/components/mini-basket-slider.js +604 -545
  101. package/src/js/page/filters/desktop-nav.js +64 -0
  102. package/src/js/page/filters/mobile-nav.js +93 -0
  103. package/src/js/page/filters/plp-filters-chips.js +92 -0
  104. package/src/js/page/filters/plp-filters-mobile.js +150 -0
  105. package/src/js/page/filters/plp-filters-panel.js +123 -0
  106. package/src/js/page/filters/plp-filters-utils.js +66 -0
  107. package/src/js/page/filters/plp-filters.js +256 -0
  108. package/src/js/page/filters/sort-by.js +172 -0
  109. package/src/js/page/klarna-modal-scroll-disable.js +4 -4
  110. package/src/js/page/online-exclusive.js +28 -30
  111. package/src/js/page/search-filter.js +62 -0
  112. package/src/js/page/share-project-list.js +57 -0
  113. package/src/js/page/tradePro-rewards.js +69 -39
  114. package/src/js/page/utils/copy-to-clipboard.js +79 -47
  115. package/src/js/page/utils/helpers.js +14 -9
  116. package/src/js/page/utils/show-more-less.js +273 -0
  117. package/src/page_empty-shared-project-list-bicester-hub.html +4 -0
  118. package/src/page_empty-shopping-list_guest.html +1 -0
  119. package/src/page_kitchen-plp.html +2 -2
  120. package/src/page_my-shopping-list-add-notes.html +1 -0
  121. package/src/page_my-shopping-list-energy.html +1 -0
  122. package/src/page_my-shopping-list-hide-download.html +2 -1
  123. package/src/page_my-shopping-list-pdf.html +2 -0
  124. package/src/page_my-shopping-list-saved-ref.html +1 -0
  125. package/src/page_my-shopping-list-wisdom-oos-registered.html +1 -0
  126. package/src/page_my-shopping-list-wisdom-oos.html +1 -0
  127. package/src/page_my-shopping-list-wisdom-partial-registered.html +1 -0
  128. package/src/page_my-shopping-list-wisdom-registered.html +1 -0
  129. package/src/page_my-shopping-list-wisdom.html +1 -0
  130. package/src/page_my-shopping-list.html +1 -0
  131. package/src/page_my-shopping-list_not-register.html +3 -0
  132. package/src/page_plp-with-paint.html +2 -7
  133. package/src/page_plp.html +2 -7
  134. package/src/page_plp_v2-energy-efficiency.html +1 -6
  135. package/src/page_plp_v2-favourite-products.html +6 -7
  136. package/src/page_plp_v2-vat.html +2 -7
  137. package/src/page_plp_v2.html +22 -9
  138. package/src/page_product_search-vat.html +2 -7
  139. package/src/page_product_search.html +2 -7
  140. package/src/page_project-list-generate-project-list-ID.html +3 -0
  141. package/src/page_project-list-vat.html +4 -0
  142. package/src/page_project-list-with-new-share-popup-android.html +3 -1
  143. package/src/page_project-list-with-new-share-popup-ios.html +3 -1
  144. package/src/page_project-list-with-new-share-popup.html +2 -1
  145. package/src/page_search-results.html +2 -7
  146. package/src/page_shared-project-list-bicester-hub.html +3 -1
  147. package/src/scss/common/_common.scss +5 -4
  148. package/src/scss/components/_accordion.scss +1 -3
  149. package/src/scss/components/_custom-slider.scss +15 -14
  150. package/src/scss/components/_date-selection-add-new-styles.scss +6 -7
  151. package/src/scss/components/_date-selection.scss +1 -1
  152. package/src/scss/components/{kitchen/_filter-modal.scss → _filter-modal.scss} +55 -4
  153. package/src/scss/components/{kitchen/_plp-filters.scss → _plp-filters.scss} +31 -13
  154. package/src/scss/components/_popover-mini-basket.scss +3 -3
  155. package/src/scss/components/_search-filter.scss +95 -15
  156. package/src/scss/components/_sort-by.scss +190 -0
  157. package/src/scss/components/checkout-chip.scss +2 -2
  158. package/src/scss/components/checkout-payment-repayment-terms.scss +1 -1
  159. package/src/scss/globals/_global-components.scss +3 -0
  160. package/src/scss/helpers/_colors-semantic.scss +68 -68
  161. package/src/scss/helpers/_variables.scss +242 -196
  162. package/src/scss/kitchen-plp-main.scss +0 -3
  163. package/src/scss/main.scss +65 -65
  164. package/src/scss/pages/page_product-details-v2.scss +1 -4
  165. package/src/scss/pages/page_product_search.scss +9 -1
  166. package/src/scss/pages/page_products-list-combined.scss +28 -24
  167. package/src/scss/pages/page_products-list.scss +8 -0
  168. package/src/scss/pages/tradePro-rewards.scss +3 -4
  169. package/build/js/page/accordion.js +0 -35
  170. package/build/js/page/kitchen/plp-filters-chips.js +0 -90
  171. package/build/js/page/kitchen/plp-filters-mobile.js +0 -72
  172. package/build/js/page/kitchen/plp-filters-panel.js +0 -119
  173. package/build/js/page/kitchen/plp-filters-utils.js +0 -65
  174. package/build/js/page/kitchen/plp-filters.js +0 -205
  175. package/build/js/page/kitchen/sort-by.js +0 -157
  176. package/src/js/components/general/search-filter.js +0 -21
  177. package/src/js/components/share-project-list.js +0 -53
  178. package/src/js/page/accordion.js +0 -35
  179. package/src/js/page/kitchen/plp-filters-chips.js +0 -90
  180. package/src/js/page/kitchen/plp-filters-mobile.js +0 -72
  181. package/src/js/page/kitchen/plp-filters-panel.js +0 -119
  182. package/src/js/page/kitchen/plp-filters-utils.js +0 -65
  183. package/src/js/page/kitchen/plp-filters.js +0 -205
  184. 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
  });