wickes-css2 2.105.0-develop.6 → 2.105.0-develop.8

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 (209) hide show
  1. package/Readme.md +2 -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/my-account-v2.css +1 -1
  9. package/build/css/pages/page_discount.css +1 -1
  10. package/build/css/pages/page_product_search.css +1 -1
  11. package/build/css/pages/page_products-list-combined.css +1 -1
  12. package/build/css/pages/page_products-list.css +1 -1
  13. package/build/css/pages/tradePro-rewards.css +1 -1
  14. package/build/css/pdp-main-before-combine.css +1 -1
  15. package/build/css/pdp-main-non-critical.css +1 -1
  16. package/build/css/pdp-main.css +1 -1
  17. package/build/css/plp-main.css +1 -1
  18. package/build/css/store-locator-main.css +1 -1
  19. package/build/js/basket.min.js +2 -2
  20. package/build/js/bundle.min.js +1 -1
  21. package/build/js/checkout.min.js +2 -2
  22. package/build/js/emulation.min.js +10255 -10784
  23. package/build/js/general.bundle.min.js +1 -1
  24. package/build/js/kitchen/kitchen-plp.min.js +9 -1
  25. package/build/js/merged-checkout.min.js +2 -2
  26. package/build/js/mini-basket-slider.min.js +1 -1
  27. package/build/js/my-account.min.js +1 -1
  28. package/build/js/page/accordion.js +35 -0
  29. package/build/js/page/basket/basket-update-cart-action.js +56 -59
  30. package/build/js/page/basket/basket-update-cart.js +27 -27
  31. package/build/js/page/basket/basket-utils.js +33 -40
  32. package/build/js/page/basket/mini-basket-total.js +66 -70
  33. package/build/js/page/basket/quantity-change-handler.js +55 -73
  34. package/build/js/page/basket/update-quantity-operation.js +30 -39
  35. package/build/js/page/basket/update-quantity.js +62 -62
  36. package/build/js/page/basket-v2.js +229 -362
  37. package/build/js/page/billie-business-type.js +27 -27
  38. package/build/js/page/checkout-payment-details.js +299 -301
  39. package/build/js/page/components/discounts.js +36 -39
  40. package/build/js/page/components/mini-basket-slider.js +545 -604
  41. package/build/js/page/kitchen/plp-filters-chips.js +90 -0
  42. package/build/js/page/kitchen/plp-filters-mobile.js +72 -0
  43. package/build/js/page/kitchen/plp-filters-panel.js +119 -0
  44. package/build/js/page/kitchen/plp-filters-utils.js +65 -0
  45. package/build/js/page/kitchen/plp-filters.js +205 -0
  46. package/build/js/page/kitchen/sort-by.js +157 -0
  47. package/build/js/page/klarna-modal-scroll-disable.js +4 -4
  48. package/build/js/page/my-account.js +14 -29
  49. package/build/js/page/online-exclusive.js +30 -28
  50. package/build/js/page/tradePro-rewards.js +39 -69
  51. package/build/js/page/utils/copy-to-clipboard.js +47 -79
  52. package/build/js/page/utils/helpers.js +9 -14
  53. package/build/js/pdp.bundle.min.js +1 -1
  54. package/build/js/plp.bundle.min.js +1 -1
  55. package/build/js/project-list.min.js +85 -143
  56. package/build/js/tradePro-rewards.min.js +1 -1
  57. package/package.json +3 -3
  58. package/src/components/.DS_Store +0 -0
  59. package/src/components/accordion.hbs +2 -2
  60. package/src/components/kitchen/dropdown.hbs +3 -6
  61. package/src/components/kitchen/filter-modal.hbs +13 -10
  62. package/src/components/kitchen/plp-filters.hbs +1 -3
  63. package/src/components/kitchen/sort-by.hbs +1 -1
  64. package/src/components/my-account/barcode.hbs +1 -3
  65. package/src/components/my-account/cards-swap.hbs +10 -0
  66. package/src/components/my-account/clipboard-code-card.hbs +3 -3
  67. package/src/components/my-account/discount.hbs +1 -1
  68. package/src/components/my-account/greetings.hbs +1 -1
  69. package/src/components/search-filter.hbs +112 -121
  70. package/src/data/data_plp_load-more.json +1 -1
  71. package/src/data/my-account/data_my-account.json +9 -0
  72. package/src/js/components/cards-swap.js +72 -0
  73. package/src/js/components/general/accordion.js +33 -44
  74. package/src/js/components/general/cart-slider.js +16 -19
  75. package/src/js/components/general/create-popup-slider.js +173 -168
  76. package/src/js/components/general/search-filter.js +21 -0
  77. package/src/js/components/share-project-list.js +53 -0
  78. package/src/js/emulation/big-wins.js +904 -1081
  79. package/src/js/emulation/billie-modal.js +19 -23
  80. package/src/js/emulation/checkout-payment-details.js +38 -47
  81. package/src/js/emulation/custom-slider-emulation.js +13 -17
  82. package/src/js/emulation/forms.js +323 -360
  83. package/src/js/emulation/mini-basket-data.js +923 -1051
  84. package/src/js/emulation/paymentLoader.js +17 -17
  85. package/src/js/emulation/pdf-file-loader.js +91 -89
  86. package/src/js/emulation/popover-mini-basket.js +239 -246
  87. package/src/js/emulation/project-list-pdp.js +316 -320
  88. package/src/js/emulation/repayment-toggle.js +24 -23
  89. package/src/js/emulation/selectable.js +18 -22
  90. package/src/js/emulation/wismo-details.js +31 -23
  91. package/src/js/page/accordion.js +35 -0
  92. package/src/js/page/basket/basket-update-cart-action.js +56 -59
  93. package/src/js/page/basket/basket-update-cart.js +27 -27
  94. package/src/js/page/basket/basket-utils.js +33 -40
  95. package/src/js/page/basket/mini-basket-total.js +66 -70
  96. package/src/js/page/basket/quantity-change-handler.js +55 -73
  97. package/src/js/page/basket/update-quantity-operation.js +30 -39
  98. package/src/js/page/basket/update-quantity.js +62 -62
  99. package/src/js/page/basket-v2.js +229 -362
  100. package/src/js/page/billie-business-type.js +27 -27
  101. package/src/js/page/checkout-payment-details.js +299 -301
  102. package/src/js/page/components/discounts.js +36 -39
  103. package/src/js/page/components/mini-basket-slider.js +545 -604
  104. package/src/js/page/kitchen/plp-filters-chips.js +90 -0
  105. package/src/js/page/kitchen/plp-filters-mobile.js +72 -0
  106. package/src/js/page/kitchen/plp-filters-panel.js +119 -0
  107. package/src/js/page/kitchen/plp-filters-utils.js +65 -0
  108. package/src/js/page/kitchen/plp-filters.js +205 -0
  109. package/src/js/page/kitchen/sort-by.js +157 -0
  110. package/src/js/page/klarna-modal-scroll-disable.js +4 -4
  111. package/src/js/page/my-account.js +14 -29
  112. package/src/js/page/online-exclusive.js +30 -28
  113. package/src/js/page/tradePro-rewards.js +39 -69
  114. package/src/js/page/utils/copy-to-clipboard.js +47 -79
  115. package/src/js/page/utils/helpers.js +9 -14
  116. package/src/page_empty-shared-project-list-bicester-hub.html +0 -4
  117. package/src/page_empty-shopping-list_guest.html +0 -1
  118. package/src/page_kitchen-plp.html +2 -2
  119. package/src/page_my-account-installer.html +1 -1
  120. package/src/page_my-account-trade-pro-carousel-double.html +127 -0
  121. package/src/page_my-account-trade-pro-carousel.html +134 -0
  122. package/src/page_my-account-trade-pro.html +1 -1
  123. package/src/page_my-shopping-list-add-notes.html +0 -1
  124. package/src/page_my-shopping-list-energy.html +0 -1
  125. package/src/page_my-shopping-list-hide-download.html +1 -2
  126. package/src/page_my-shopping-list-pdf.html +0 -2
  127. package/src/page_my-shopping-list-saved-ref.html +0 -1
  128. package/src/page_my-shopping-list-wisdom-oos-registered.html +0 -1
  129. package/src/page_my-shopping-list-wisdom-oos.html +0 -1
  130. package/src/page_my-shopping-list-wisdom-partial-registered.html +0 -1
  131. package/src/page_my-shopping-list-wisdom-registered.html +0 -1
  132. package/src/page_my-shopping-list-wisdom.html +0 -1
  133. package/src/page_my-shopping-list.html +0 -1
  134. package/src/page_my-shopping-list_not-register.html +0 -3
  135. package/src/page_plp-with-paint.html +7 -2
  136. package/src/page_plp.html +7 -2
  137. package/src/page_plp_v2-energy-efficiency.html +6 -1
  138. package/src/page_plp_v2-favourite-products.html +7 -6
  139. package/src/page_plp_v2-vat.html +7 -2
  140. package/src/page_plp_v2.html +9 -22
  141. package/src/page_product_search-vat.html +7 -2
  142. package/src/page_product_search.html +7 -2
  143. package/src/page_project-list-generate-project-list-ID.html +0 -3
  144. package/src/page_project-list-vat.html +0 -4
  145. package/src/page_project-list-with-new-share-popup-android.html +1 -3
  146. package/src/page_project-list-with-new-share-popup-ios.html +1 -3
  147. package/src/page_project-list-with-new-share-popup.html +1 -2
  148. package/src/page_search-results.html +7 -2
  149. package/src/page_shared-project-list-bicester-hub.html +1 -3
  150. package/src/page_tradepro-discount-app.html +1 -1
  151. package/src/page_tradepro-discount-double.html +109 -0
  152. package/src/page_tradepro-discount.html +36 -2
  153. package/src/scss/common/_common.scss +4 -5
  154. package/src/scss/components/_accordion.scss +3 -1
  155. package/src/scss/components/_custom-slider.scss +14 -15
  156. package/src/scss/components/_date-selection-add-new-styles.scss +7 -6
  157. package/src/scss/components/_date-selection.scss +1 -1
  158. package/src/scss/components/_popover-mini-basket.scss +3 -3
  159. package/src/scss/components/_search-filter.scss +15 -95
  160. package/src/scss/components/checkout-chip.scss +2 -2
  161. package/src/scss/components/checkout-payment-repayment-terms.scss +1 -1
  162. package/src/scss/components/{_filter-modal.scss → kitchen/_filter-modal.scss} +4 -55
  163. package/src/scss/components/{_plp-filters.scss → kitchen/_plp-filters.scss} +13 -31
  164. package/src/scss/components/my-account/_barcode.scss +8 -0
  165. package/src/scss/components/my-account/_cards-swap.scss +58 -0
  166. package/src/scss/components/my-account/_clipboard-code.scss +8 -0
  167. package/src/scss/components/my-account/_discount.scss +10 -0
  168. package/src/scss/globals/_global-components.scss +0 -3
  169. package/src/scss/helpers/_colors-semantic.scss +68 -68
  170. package/src/scss/helpers/_variables.scss +196 -242
  171. package/src/scss/kitchen-plp-main.scss +3 -0
  172. package/src/scss/main.scss +65 -65
  173. package/src/scss/pages/my-account-v2.scss +37 -0
  174. package/src/scss/pages/page_discount.scss +8 -4
  175. package/src/scss/pages/page_product-details-v2.scss +4 -1
  176. package/src/scss/pages/page_product_search.scss +1 -9
  177. package/src/scss/pages/page_products-list-combined.scss +24 -28
  178. package/src/scss/pages/page_products-list.scss +0 -8
  179. package/src/scss/pages/tradePro-rewards.scss +4 -3
  180. package/src/sitemap.html +3 -0
  181. package/build/js/page/filters/desktop-nav.js +0 -64
  182. package/build/js/page/filters/mobile-nav.js +0 -93
  183. package/build/js/page/filters/plp-filters-chips.js +0 -92
  184. package/build/js/page/filters/plp-filters-mobile.js +0 -150
  185. package/build/js/page/filters/plp-filters-panel.js +0 -123
  186. package/build/js/page/filters/plp-filters-utils.js +0 -66
  187. package/build/js/page/filters/plp-filters.js +0 -256
  188. package/build/js/page/filters/sort-by.js +0 -172
  189. package/build/js/page/search-filter.js +0 -62
  190. package/build/js/page/share-project-list.js +0 -57
  191. package/build/js/page/utils/show-more-less.js +0 -273
  192. package/src/components/kitchen/filter-modal-content-kitchen.hbs +0 -10
  193. package/src/components/search-filter-modal-content.hbs +0 -102
  194. package/src/elements/btn.hbs +0 -7
  195. package/src/js/emulation/filters-emulation.js +0 -164
  196. package/src/js/emulation/product-counter.js +0 -50
  197. package/src/js/emulation/reset-filter-desktop.js +0 -5
  198. package/src/js/page/filters/desktop-nav.js +0 -64
  199. package/src/js/page/filters/mobile-nav.js +0 -93
  200. package/src/js/page/filters/plp-filters-chips.js +0 -92
  201. package/src/js/page/filters/plp-filters-mobile.js +0 -150
  202. package/src/js/page/filters/plp-filters-panel.js +0 -123
  203. package/src/js/page/filters/plp-filters-utils.js +0 -66
  204. package/src/js/page/filters/plp-filters.js +0 -256
  205. package/src/js/page/filters/sort-by.js +0 -172
  206. package/src/js/page/search-filter.js +0 -62
  207. package/src/js/page/share-project-list.js +0 -57
  208. package/src/js/page/utils/show-more-less.js +0 -273
  209. package/src/scss/components/_sort-by.scss +0 -190
@@ -1,341 +1,337 @@
1
- var Wick = (window.Wick = window.Wick || {});
2
-
3
1
  function returnErrorCreatePayload() {
4
- return {
5
- message: 'Min. characters 5, max. characters 59, only use characters A-Z and 0-9',
6
- };
2
+ return {
3
+ message: 'Min. characters 5, max. characters 59, only use characters A-Z and 0-9'
4
+ };
7
5
  }
8
6
 
9
7
  function returnErrorSelectPayload() {
10
- return {
11
- message: 'Something went wrong',
12
- };
8
+ return {
9
+ message: 'Something went wrong'
10
+ };
13
11
  }
14
12
 
15
13
  function returnSuccessSelectPayload() {
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
- ],
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,
122
76
  },
123
- };
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
+ }
124
122
  }
125
123
 
126
124
  function returnSuccessCreatePayload() {
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
- ],
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,
233
145
  },
234
- projectListLength: 10,
235
- maxAmountOfProjects: 2,
236
- };
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
+ }
237
235
  }
238
236
 
239
237
  function returnSuccessGetPayload(currentPage) {
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
- };
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
+ }
306
303
  }
307
304
 
308
305
  $(document).ready(function () {
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
- });
306
+ function init() {
307
+ if (!$('.shop-list-modal').length) {
308
+ return;
338
309
  }
339
310
 
340
- init();
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();
341
337
  });