wickes-css2 2.103.0-develop.4 → 2.103.0-develop.6
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.
- package/Readme.md +5 -0
- package/build/css/category-main.css +1 -1
- package/build/css/homepage-main.css +1 -1
- package/build/css/kitchen-plp-main.css +1 -1
- package/build/css/main.css +1 -1
- package/build/css/my-account-main-v2.css +1 -1
- package/build/css/my-account-main.css +1 -1
- package/build/css/pdp-main-before-combine.css +1 -1
- package/build/css/pdp-main-non-critical.css +1 -1
- package/build/css/pdp-main.css +1 -1
- package/build/css/plp-main.css +1 -1
- package/build/css/store-locator-main.css +1 -1
- package/build/js/basket.min.js +2 -2
- package/build/js/bundle.min.js +1 -1
- package/build/js/checkout.min.js +2 -2
- package/build/js/emulation.min.js +50 -994
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/merged-checkout.min.js +2 -2
- package/build/js/page/basket-v2.js +244 -138
- package/build/js/page/components/discounts.js +6 -6
- package/build/js/pdp.bundle.min.js +1 -1
- package/build/js/plp.bundle.min.js +1 -1
- package/build/js/project-list.min.js +1 -1
- package/package.json +18 -3
- package/src/components/mini-basket/mini-basket-empty.hbs +13 -3
- package/src/components/mini-basket/mini-basket.hbs +13 -32
- package/src/components/mini-basket/product-item.hbs +16 -37
- package/src/components/srp-injected.hbs +3 -13
- package/src/data/data_confirmation-summary.json +2 -4
- package/src/data/data_mini-basket.json +80 -4
- package/src/js/components/banner-placement-manager.js +10 -1
- package/src/js/components/general/cart-slider.js +0 -3
- package/src/js/components/general/create-popup-slider.js +2 -5
- package/src/js/components/general/mini-basket-slider.js +8 -0
- package/src/js/emulation/account-hub.js +40 -40
- package/src/js/emulation/custom-slider-emulation.js +10 -4
- package/src/js/page/basket-v2.js +244 -138
- package/src/js/page/components/discounts.js +6 -6
- package/src/layouts/base.hbs +6 -0
- package/src/page_plp_v2.html +2 -1
- package/src/partials/scripts.hbs +0 -1
- package/src/scss/category-main.scss +1 -0
- package/src/scss/components/_custom-slider.scss +3 -124
- package/src/scss/components/_popover-mini-basket.scss +4 -0
- package/src/scss/emulation.scss +3 -3
- package/src/scss/helpers/_colors-semantic.scss +120 -0
- package/src/scss/helpers/_variables.scss +2 -0
- package/src/scss/pages/_facets.scss +86 -0
- package/src/scss/plp-main.scss +1 -0
- package/build/js/mini-basket-slider.min.js +0 -1
- package/build/js/page/basket/basket-update-cart-action.js +0 -60
- package/build/js/page/basket/basket-update-cart.js +0 -29
- package/build/js/page/basket/basket-utils.js +0 -50
- package/build/js/page/basket/mini-basket-total.js +0 -97
- package/build/js/page/basket/quantity-change-handler.js +0 -56
- package/build/js/page/basket/update-quantity-operation.js +0 -37
- package/build/js/page/basket/update-quantity.js +0 -65
- package/build/js/page/components/mini-basket-slider.js +0 -562
- package/src/components/mini-basket/mini-basket-order-item.hbs +0 -73
- package/src/js/emulation/mini-basket-data.js +0 -949
- package/src/js/page/basket/basket-update-cart-action.js +0 -60
- package/src/js/page/basket/basket-update-cart.js +0 -29
- package/src/js/page/basket/basket-utils.js +0 -50
- package/src/js/page/basket/mini-basket-total.js +0 -97
- package/src/js/page/basket/quantity-change-handler.js +0 -56
- package/src/js/page/basket/update-quantity-operation.js +0 -37
- package/src/js/page/basket/update-quantity.js +0 -65
- package/src/js/page/components/mini-basket-slider.js +0 -562
package/package.json
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wickes-css2",
|
|
3
|
-
"version": "2.103.0-develop.
|
|
3
|
+
"version": "2.103.0-develop.6",
|
|
4
4
|
"description": "CSS and JS and page templates in use by Wickes",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"lint:fix": "sass-lint-auto-fix",
|
|
8
|
-
"build": "gulp build"
|
|
8
|
+
"build": "gulp build",
|
|
9
|
+
"prepare": "husky install",
|
|
10
|
+
"setup:husky": "yarn prepare && npx husky add .husky/pre-commit \"yarn lint-staged\" && git add .husky/pre-commit"
|
|
11
|
+
},
|
|
12
|
+
"lint-staged": {
|
|
13
|
+
"src/js/**/*.js": [
|
|
14
|
+
"eslint --fix",
|
|
15
|
+
"prettier --write"
|
|
16
|
+
],
|
|
17
|
+
"src/scss/**/*.{scss,css}": [
|
|
18
|
+
"prettier --write",
|
|
19
|
+
"sass-lint-auto-fix"
|
|
20
|
+
]
|
|
9
21
|
},
|
|
10
22
|
"keywords": [
|
|
11
23
|
"css",
|
|
@@ -48,11 +60,14 @@
|
|
|
48
60
|
"gulp-uglify": "^3.0.2",
|
|
49
61
|
"gulp-watch": "^5.0.0",
|
|
50
62
|
"handlebars-layouts": "^3.1.4",
|
|
63
|
+
"husky": "8.0.3",
|
|
64
|
+
"lint-staged": "13.2.3",
|
|
51
65
|
"mocha": "^6.2.2",
|
|
52
66
|
"node-sass": "^4.0.0",
|
|
53
67
|
"postcss": "^8.4.16",
|
|
54
68
|
"postcss-combine-duplicated-selectors": "^10.0.3",
|
|
55
69
|
"postcss-combine-media-query": "^1.0.1",
|
|
70
|
+
"prettier": "^3.7.4",
|
|
56
71
|
"pug": "2.0.4",
|
|
57
72
|
"sass": "^1.54.9",
|
|
58
73
|
"sass-lint-auto-fix": "^0.21.2",
|
|
@@ -108,7 +123,7 @@
|
|
|
108
123
|
"branches": [
|
|
109
124
|
"alt-master",
|
|
110
125
|
{
|
|
111
|
-
"name": "
|
|
126
|
+
"name": "develop",
|
|
112
127
|
"prerelease": "${name.replace(/^custom-tag\\//g, '')}"
|
|
113
128
|
}
|
|
114
129
|
],
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
<div class="custom-
|
|
1
|
+
<div class="custom-slider mini-basket d-none">
|
|
2
|
+
<div class="custom-slider__wrap">
|
|
3
|
+
<div class="custom-slider__header">
|
|
4
|
+
<span class="custom-slider__count">Your basket (0)</span>
|
|
5
|
+
<a href="#" type="button" class="icon-wrap close-popup">
|
|
6
|
+
<i class="far fa-times icon"></i>
|
|
7
|
+
</a>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="custom-slider__empty">
|
|
2
10
|
<span class="icon-wrap icon-wrap--xl">
|
|
3
11
|
<i class="fas fa-shopping-basket"></i>
|
|
4
12
|
</span>
|
|
5
|
-
|
|
6
|
-
|
|
13
|
+
<p class="text">Your basket is currently empty.</p>
|
|
14
|
+
<button class="btn btn-primary close-popup">Continue Shopping</button>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
7
17
|
</div>
|
|
@@ -1,58 +1,39 @@
|
|
|
1
|
-
<div class="custom-slider mini-basket
|
|
1
|
+
<div class="custom-slider mini-basket d-none">
|
|
2
2
|
<div class="custom-slider__wrap">
|
|
3
3
|
<div class="custom-slider__header">
|
|
4
|
-
<span class="custom-slider__count">Your basket</span>
|
|
4
|
+
<span class="custom-slider__count">Your basket (1)</span>
|
|
5
5
|
<button type="button" class="icon-wrap close-popup">
|
|
6
6
|
<i class="far fa-times icon"></i>
|
|
7
7
|
</button>
|
|
8
8
|
</div>
|
|
9
|
-
<div class="
|
|
10
|
-
|
|
9
|
+
<div class="products popover-mini-basket__cards-holder">
|
|
10
|
+
{{#each mini-basket.products}}
|
|
11
|
+
{{> mini-basket/product-item this switch-vat=true}}
|
|
12
|
+
{{/each}}
|
|
13
|
+
</div>
|
|
11
14
|
</div>
|
|
12
15
|
<div class="custom-slider__footer footer-fixed">
|
|
13
16
|
<div class="mini-basket__total">
|
|
14
|
-
<button class="btn mini-basket__total-toggle
|
|
17
|
+
<button class="btn mini-basket__total-toggle" type="button" data-toggle="collapse" data-target="#checkout-details-accordion-3" aria-expanded="false" aria-controls="checkout-details-accordion-3">
|
|
15
18
|
<span class="mini-basket__wrap-total">
|
|
16
19
|
<span class="icon-wrap">
|
|
17
20
|
<i class="fas fa-chevron-down arrow-icon"></i>
|
|
18
21
|
</span>
|
|
19
22
|
<span class="text">Total:</span>
|
|
20
23
|
</span>
|
|
21
|
-
<span class="mini-
|
|
24
|
+
<span class="value">{{mini-basket.total.totalPrice.formattedValue}}</span>
|
|
22
25
|
</button>
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
<ul class="checkout-widget__details checkout-info-wrap collapse" id="checkout-details-accordion-3">
|
|
26
|
-
<li class="checkout-widget__accordion-wrap checkout-widget__details-discount" style="display: none">
|
|
27
|
-
<span class="checkout-widget__detail-name checkout-widget__detail-name_accordion collapsed" data-toggle="collapse" data-target="#acheckout-widget-accordion-3">
|
|
28
|
-
Discount(s):
|
|
29
|
-
<span class="icon accordion__header-icon-small">
|
|
30
|
-
<i class="fas fa-angle-up"></i>
|
|
31
|
-
</span>
|
|
32
|
-
</span>
|
|
33
|
-
<ul class="checkout-widget__details-hidden collapse" id="acheckout-widget-accordion-3"></ul>
|
|
34
|
-
<span class="checkout-widget__detail-value checkout-widget__item-value">£0.00</span>
|
|
35
|
-
</li>
|
|
36
|
-
</ul>
|
|
37
|
-
</div>
|
|
27
|
+
{{> checkout_order-summary-new confirmationSummary=true head=true mod=true id=3 mobile=true hideApplyVoucher=true}}
|
|
38
28
|
</div>
|
|
39
29
|
<div class="custom-slider__ctas">
|
|
40
|
-
<a href="
|
|
41
|
-
<
|
|
30
|
+
<a href="page_shopping-cart.html" class="btn btn_full btn-secondary">View Basket</a>
|
|
31
|
+
<button class="btn btn-action btn_full btn-checkout">
|
|
42
32
|
Checkout
|
|
43
33
|
<span class="icon-wrap ml-2">
|
|
44
34
|
<i class="fas fa-arrow-right"></i>
|
|
45
35
|
</span>
|
|
46
|
-
</
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<div class="loader-wrapper basket-loader d-none">
|
|
51
|
-
<div class="loader-spinner">
|
|
52
|
-
<svg class="circular-loader" viewBox="25 25 50 50">
|
|
53
|
-
<circle class="loader-path" cx="50" cy="50" r="20" fill="none"></circle>
|
|
54
|
-
</svg>
|
|
36
|
+
</button>
|
|
55
37
|
</div>
|
|
56
|
-
<h2>Updating basket…</h2>
|
|
57
38
|
</div>
|
|
58
39
|
</div>
|
|
@@ -1,45 +1,24 @@
|
|
|
1
|
-
<div class="card product-card-preview"
|
|
1
|
+
<div class="card product-card-preview">
|
|
2
2
|
<div class="products__item card__inner">
|
|
3
3
|
<a class="card__img-wrap card__img-wrap_link products__image" href="page_product-details-with-global-search-v2.html">
|
|
4
4
|
<img class="product-img" src="{{src}}" alt="">
|
|
5
5
|
</a>
|
|
6
6
|
<div class="products__details product-card__content">
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</button>
|
|
23
|
-
<label class="quantity product-card__quantity-label">
|
|
24
|
-
<span class="product-card__quantity-value">{{quantity.value}}</span>
|
|
25
|
-
</label>
|
|
26
|
-
<button class="btn btn--quantity" data-action="plus">
|
|
27
|
-
<i class="fal fa-plus quantity-cta-icon"></i>
|
|
28
|
-
</button>
|
|
29
|
-
</div>
|
|
30
|
-
{{#if switch-vat}}
|
|
31
|
-
<p class="price including-vat-inherit">
|
|
32
|
-
<span class="value">{{incVatPrice}}</span>
|
|
33
|
-
<span class="inc">Inc.VAT</span>
|
|
34
|
-
</p>
|
|
35
|
-
<p class="price excluding-vat-inherit">
|
|
36
|
-
<span class="value">{{excVatPrice}}</span>
|
|
37
|
-
<span class="inc">Exc.VAT</span>
|
|
38
|
-
</p>
|
|
39
|
-
{{else}}
|
|
40
|
-
<p class="price">{{price}}</p>
|
|
41
|
-
{{/if}}
|
|
42
|
-
</div>
|
|
7
|
+
<a href="#" class="title product-card__title product-card__title_link">{{title}}</a>
|
|
8
|
+
<p class="item">Click & Collect: <span class="value">{{CC}}</span></p>
|
|
9
|
+
<p class="item">Qty: <span class="value">{{quantity.value}}</span></p>
|
|
10
|
+
{{#if switch-vat}}
|
|
11
|
+
<p class="price including-vat-inherit">
|
|
12
|
+
{{incVatPrice}}
|
|
13
|
+
<span class="inc">Inc.VAT</span>
|
|
14
|
+
</p>
|
|
15
|
+
<p class="price excluding-vat-inherit">
|
|
16
|
+
{{excVatPrice}}
|
|
17
|
+
<span class="inc">Exc.VAT</span>
|
|
18
|
+
</p>
|
|
19
|
+
{{else}}
|
|
20
|
+
<p class="price">{{price}}</p>
|
|
21
|
+
{{/if}}
|
|
43
22
|
</div>
|
|
44
23
|
</div>
|
|
45
24
|
</div>
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
<div class="srp-injected">
|
|
2
2
|
<div class="srp-injected__content clamped-text">
|
|
3
3
|
<p>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<span style="font-weight:400">
|
|
8
|
-
<span style="font-style:normal">
|
|
9
|
-
<span style="text-decoration:none">
|
|
10
|
-
The right lighting can turn your bathroom into a sanctuary, blending style and practicality. From sleek ceiling lights to illuminated and elegant wall fixtures, each of our options is designed to elevate your space. Create a warm, inviting glow that turns your bathroom into a haven of comfort and style.
|
|
11
|
-
</span>
|
|
12
|
-
</span>
|
|
13
|
-
</span>
|
|
14
|
-
</span>
|
|
15
|
-
</span>
|
|
16
|
-
</span>
|
|
4
|
+
The right lighting can turn your bathroom into a sanctuary, blending style and practicality. From sleek ceiling
|
|
5
|
+
lights to illuminated and elegant wall fixtures, each of our options is designed to elevate your space. Create a
|
|
6
|
+
warm, inviting glow that turns your bathroom into a haven of comfort and style.
|
|
17
7
|
</p>
|
|
18
8
|
</div>
|
|
19
9
|
</div>
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"title": "Click & Collect:",
|
|
16
|
-
"value": "Free"
|
|
17
|
-
"mod": "cc"
|
|
16
|
+
"value": "Free"
|
|
18
17
|
},
|
|
19
18
|
{
|
|
20
19
|
"title": "Delivery:",
|
|
@@ -23,8 +22,7 @@
|
|
|
23
22
|
},
|
|
24
23
|
{
|
|
25
24
|
"title": "Charity donation:",
|
|
26
|
-
"value": "£1.00"
|
|
27
|
-
"mod": "charity"
|
|
25
|
+
"value": "£1.00"
|
|
28
26
|
}
|
|
29
27
|
],
|
|
30
28
|
"total": {
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"number": 0,
|
|
4
4
|
"products": [
|
|
5
5
|
{
|
|
6
|
-
"id": 1,
|
|
7
6
|
"quantity": {
|
|
8
7
|
"value": "1"
|
|
9
8
|
},
|
|
@@ -16,9 +15,87 @@
|
|
|
16
15
|
"CC": "East Grinstead"
|
|
17
16
|
},
|
|
18
17
|
{
|
|
19
|
-
"id": 2,
|
|
20
18
|
"quantity": {
|
|
21
|
-
"value": "
|
|
19
|
+
"value": "1"
|
|
20
|
+
},
|
|
21
|
+
"title": "Rangemaster Classic Deluxe 90 Ceramic Range Cooker - Black with Chrome Trim",
|
|
22
|
+
"src": "img/placeholders/[e-img-4to3].jpg",
|
|
23
|
+
"price": "£2,009.00",
|
|
24
|
+
"incVatPrice": "£309.00",
|
|
25
|
+
"excVatPrice": "£109.00",
|
|
26
|
+
"bad-amount": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"quantity": {
|
|
30
|
+
"value": "1"
|
|
31
|
+
},
|
|
32
|
+
"title": "Rangemaster Classic Deluxe 90 Ceramic Range Cooker - Black with Chrome Trim",
|
|
33
|
+
"src": "img/placeholders/[e-img-4to3].jpg",
|
|
34
|
+
"price": "£2,009.00",
|
|
35
|
+
"incVatPrice": "£309.00",
|
|
36
|
+
"excVatPrice": "£109.00",
|
|
37
|
+
"bad-amount": true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"quantity": {
|
|
41
|
+
"value": "1"
|
|
42
|
+
},
|
|
43
|
+
"title": "Rangemaster Classic Deluxe 90 Ceramic Range Cooker - Black with Chrome Trim",
|
|
44
|
+
"src": "img/placeholders/tap.jpg",
|
|
45
|
+
"price": "£2,009.00",
|
|
46
|
+
"incVatPrice": "£30.00",
|
|
47
|
+
"excVatPrice": "£10.00",
|
|
48
|
+
"lower-quantity": true,
|
|
49
|
+
"CC": "East Grinstead"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"quantity": {
|
|
53
|
+
"value": "1"
|
|
54
|
+
},
|
|
55
|
+
"title": "Rangemaster Classic Deluxe 90 Ceramic Range Cooker - Black with Chrome Trim",
|
|
56
|
+
"src": "img/placeholders/[e-img-4to3].jpg",
|
|
57
|
+
"price": "£2,009.00",
|
|
58
|
+
"incVatPrice": "£309.00",
|
|
59
|
+
"excVatPrice": "£109.00",
|
|
60
|
+
"bad-amount": true
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"quantity": {
|
|
64
|
+
"value": "1"
|
|
65
|
+
},
|
|
66
|
+
"title": "Rangemaster Classic Deluxe 90 Ceramic Range Cooker - Black with Chrome Trim",
|
|
67
|
+
"src": "img/placeholders/[e-img-4to3].jpg",
|
|
68
|
+
"price": "£2,009.00",
|
|
69
|
+
"incVatPrice": "£309.00",
|
|
70
|
+
"excVatPrice": "£109.00",
|
|
71
|
+
"bad-amount": true
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"quantity": {
|
|
75
|
+
"value": "1"
|
|
76
|
+
},
|
|
77
|
+
"title": "Rangemaster Classic Deluxe 90 Ceramic Range Cooker - Black with Chrome Trim",
|
|
78
|
+
"src": "img/placeholders/tap.jpg",
|
|
79
|
+
"price": "£2,009.00",
|
|
80
|
+
"incVatPrice": "£30.00",
|
|
81
|
+
"excVatPrice": "£10.00",
|
|
82
|
+
"lower-quantity": true,
|
|
83
|
+
"CC": "East Grinstead"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"quantity": {
|
|
87
|
+
"value": "1"
|
|
88
|
+
},
|
|
89
|
+
"title": "Rangemaster Classic Deluxe 90 Ceramic Range Cooker - Black with Chrome Trim",
|
|
90
|
+
"src": "img/placeholders/[e-img-4to3].jpg",
|
|
91
|
+
"price": "£2,009.00",
|
|
92
|
+
"incVatPrice": "£309.00",
|
|
93
|
+
"excVatPrice": "£109.00",
|
|
94
|
+
"bad-amount": true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"quantity": {
|
|
98
|
+
"value": "1"
|
|
22
99
|
},
|
|
23
100
|
"title": "Rangemaster Classic Deluxe 90 Ceramic Range Cooker - Black with Chrome Trim",
|
|
24
101
|
"src": "img/placeholders/[e-img-4to3].jpg",
|
|
@@ -48,4 +125,3 @@
|
|
|
48
125
|
}
|
|
49
126
|
}
|
|
50
127
|
}
|
|
51
|
-
|
|
@@ -212,7 +212,16 @@ Wick.BannerPlacementManager = {
|
|
|
212
212
|
},
|
|
213
213
|
getListSlots() {
|
|
214
214
|
return $(Wick.BannerPlacementManager.el.productsWrap)
|
|
215
|
-
.children(Wick.BannerPlacementManager.el.allListSlots)
|
|
215
|
+
.children(Wick.BannerPlacementManager.el.allListSlots)
|
|
216
|
+
.filter(function() {
|
|
217
|
+
if ($(this).hasClass(Wick.BannerPlacementManager.classes.productBanners)) {
|
|
218
|
+
const position = Wick.BannerPlacementManager.getBannerPosition(this);
|
|
219
|
+
const productsCount = Wick.BannerPlacementManager.getListLength();
|
|
220
|
+
return position <= productsCount;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return true;
|
|
224
|
+
});
|
|
216
225
|
},
|
|
217
226
|
getBannerPriority(banner) {
|
|
218
227
|
if ($(banner).hasClass(Wick.BannerPlacementManager.classes.sponsorProducts)) {
|
|
@@ -8,7 +8,7 @@ function createEvent(eventName, payload, eventDetail) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
function createPopupSlider({ type, sliderSelector, onAppendEvent, onAppend
|
|
11
|
+
function createPopupSlider({ type, sliderSelector, onAppendEvent, onAppend }) {
|
|
12
12
|
const events = {
|
|
13
13
|
CLOSE_JUST_ADDED: 'CLOSE_JUST_ADDED',
|
|
14
14
|
CLOSE_MINI_BASKET: 'CLOSE_MINI_BASKET'
|
|
@@ -119,9 +119,6 @@ function createPopupSlider({ type, sliderSelector, onAppendEvent, onAppend, onCl
|
|
|
119
119
|
.finally(() => {
|
|
120
120
|
hideSlider();
|
|
121
121
|
Wick.Backdrop.hide();
|
|
122
|
-
if (typeof onClose === 'function') {
|
|
123
|
-
onClose();
|
|
124
|
-
}
|
|
125
122
|
})
|
|
126
123
|
}
|
|
127
124
|
|
|
@@ -170,7 +167,7 @@ function createPopupSlider({ type, sliderSelector, onAppendEvent, onAppend, onCl
|
|
|
170
167
|
bindClosePopup();
|
|
171
168
|
|
|
172
169
|
if (onAppendEvent && onAppend) {
|
|
173
|
-
|
|
170
|
+
document.addEventListener(onAppendEvent, (event) => {
|
|
174
171
|
onAppend(event, { showSlider, handleScroll, el });
|
|
175
172
|
});
|
|
176
173
|
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
function returnMembers() {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
2
|
+
return {
|
|
3
|
+
canLoadMore: true,
|
|
4
|
+
members: [
|
|
5
|
+
{
|
|
6
|
+
id: 'john.doe@wickes.co.uk',
|
|
7
|
+
name: 'John Doe',
|
|
8
|
+
email: 'john.doe@wickes.co.uk',
|
|
9
|
+
date: '24/02/2022',
|
|
10
|
+
'order-history-url': 'page_tradePro_order-history.html',
|
|
11
|
+
status: 'PENDING',
|
|
12
|
+
'card-label': 'Pending',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
id: 'john.doe2@wickes.co.uk',
|
|
16
|
+
name: 'John Doe2',
|
|
17
|
+
email: 'john.doe2@wickes.co.uk',
|
|
18
|
+
date: '24/02/2022',
|
|
19
|
+
'order-history-url': 'page_tradePro_order-history.html',
|
|
20
|
+
'card-label': 'Other label',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'john.doe3@wickes.co.uk',
|
|
24
|
+
name: 'John Doe3',
|
|
25
|
+
email: 'john.doe3@wickes.co.uk',
|
|
26
|
+
date: '24/02/2022',
|
|
27
|
+
'order-history-url': 'page_tradePro_order-history.html',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function initAccountHubFunctionality() {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
Wick.AccountHub.initAccountHub();
|
|
35
|
+
Wick.AccountHub.initAccountHubRemove();
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
$(window).on(Wick.AccountHub.LOAD_MORE_EVENT, function (e) {
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
e.detail.resolve(returnMembers());
|
|
40
|
+
}, 1000);
|
|
41
|
+
});
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
$(document).ready(function () {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
if (!$('.account-hub').length) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
initAccountHubFunctionality();
|
|
49
49
|
});
|
|
@@ -7,16 +7,22 @@ function simulateHybrisSendingHtml() {
|
|
|
7
7
|
document.dispatchEvent(event);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
function
|
|
11
|
-
$(window).on(
|
|
10
|
+
function initCloseJustAddedDiff() {
|
|
11
|
+
$(window).on('CLOSE_JUST_ADDED CLOSE_MINI_BASKET', function ({ detail: { resolve }}) {
|
|
12
12
|
setTimeout(() => {
|
|
13
|
-
resolve();
|
|
13
|
+
return resolve();
|
|
14
14
|
}, 200);
|
|
15
15
|
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function simulateShowMiniBasket() {
|
|
19
|
+
const event = new CustomEvent('showMiniBasket', {});
|
|
20
|
+
document.dispatchEvent(event);
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
$(document).ready(function () {
|
|
19
24
|
$('.btn-add-to-basket').on('click', simulateHybrisSendingHtml);
|
|
25
|
+
$('.header-minicart__btn').on('click', simulateShowMiniBasket);
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
initCloseJustAddedDiff();
|
|
22
28
|
});
|