wickes-css2 2.109.0-develop.3 → 2.109.0-gift-cards.1

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 (112) hide show
  1. package/Readme.md +1 -2
  2. package/build/css/category-main.css +1 -1
  3. package/build/css/components/card-product-banner.css +1 -1
  4. package/build/css/components/checkout-payment-details-v2.css +1 -1
  5. package/build/css/homepage-main.css +1 -1
  6. package/build/css/kitchen-plp-main.css +1 -1
  7. package/build/css/main.css +1 -1
  8. package/build/css/my-account-main-v2.css +1 -1
  9. package/build/css/my-account-main.css +1 -1
  10. package/build/css/pages/checkout-new.css +1 -1
  11. package/build/css/pages/checkout.css +1 -1
  12. package/build/css/pages/page_checkout_delivery-new.css +1 -1
  13. package/build/css/pages/page_products-list-combined.css +1 -1
  14. package/build/css/pages/page_products-list.css +1 -1
  15. package/build/css/pages/page_shopping-cart-v2.css +1 -1
  16. package/build/css/pdp-main-before-combine.css +1 -1
  17. package/build/css/pdp-main-critical.css +1 -1
  18. package/build/css/pdp-main-non-critical.css +1 -1
  19. package/build/css/pdp-main.css +1 -1
  20. package/build/css/plp-main.css +1 -1
  21. package/build/css/store-locator-main.css +1 -1
  22. package/build/img/payment/checkout/giftcard.svg +28 -0
  23. package/build/img/payment/footer/giftcard.svg +28 -0
  24. package/build/js/basket.min.js +1 -1
  25. package/build/js/checkout.min.js +1 -1
  26. package/build/js/emulation.min.js +56 -178
  27. package/build/js/gift-cards.min.js +1 -1
  28. package/build/js/merged-checkout.min.js +1 -1
  29. package/build/js/mini-basket-slider.min.js +1 -1
  30. package/build/js/page/basket/mini-basket-total.js +2 -17
  31. package/build/js/page/checkout-payment-details.js +176 -79
  32. package/build/js/page/components/gift-cards.js +701 -357
  33. package/build/js/page/components/order-summary.js +0 -35
  34. package/build/js/pdp.bundle.min.js +1 -2
  35. package/build/js/toggle-password-visibility.min.js +1 -0
  36. package/package.json +3 -1
  37. package/src/components/base/button.hbs +1 -1
  38. package/src/components/card_product_banner_v2.hbs +1 -4
  39. package/src/components/card_sponsor_banner.hbs +1 -4
  40. package/src/components/checkout_order-summary-new.hbs +7 -10
  41. package/src/components/checkout_payment-new.hbs +31 -8
  42. package/src/components/click-and-collect-modal.hbs +14 -0
  43. package/src/components/date-selection.hbs +1 -1
  44. package/src/components/delivery-types.hbs +3 -11
  45. package/src/components/gift-cards.hbs +8 -15
  46. package/src/components/injected-content.hbs +1 -6
  47. package/src/components/modal.hbs +1 -1
  48. package/src/components/order-summary.hbs +2 -2
  49. package/src/components/payments.hbs +6 -5
  50. package/src/components/price-block-v2.hbs +214 -211
  51. package/src/data/data_checkout-giftcards.json +7 -0
  52. package/src/data/data_delivery-address-v2.json +5 -1
  53. package/src/data/data_payments-checkout.json +4 -0
  54. package/src/data/data_search-results_v2.json +2 -9
  55. package/src/data/data_spr_injected_content.json +0 -4
  56. package/src/data/footer_menu.json +4 -0
  57. package/src/img/payment/checkout/giftcard.svg +28 -0
  58. package/src/img/payment/footer/giftcard.svg +28 -0
  59. package/src/js/emulation/checkout-delivery-details.js +25 -28
  60. package/src/js/emulation/custom-slider-emulation.js +1 -1
  61. package/src/js/emulation/date-selection.js +24 -136
  62. package/src/js/emulation/forms.js +0 -12
  63. package/src/js/emulation/mini-basket-data.js +3 -3
  64. package/src/js/emulation/switchCalendar.js +8 -12
  65. package/src/js/page/basket/mini-basket-total.js +2 -17
  66. package/src/js/page/checkout-payment-details.js +176 -79
  67. package/src/js/page/components/gift-cards.js +701 -357
  68. package/src/js/page/components/order-summary.js +0 -35
  69. package/src/page_checkout_confirmation-gift-card.html +339 -0
  70. package/src/page_checkout_next-day-delivery-details.html +2 -2
  71. package/src/page_checkout_payment-details-v2-asm.html +1 -1
  72. package/src/page_checkout_payment-details-v2.html +1 -1
  73. package/src/page_checkout_payment-details_with-card-loader.html +1 -1
  74. package/src/page_checkout_payment-details_with-klarna-loader.html +1 -1
  75. package/src/page_checkout_payment-details_with-loader-v2.html +1 -1
  76. package/src/page_checkout_rapid-delivery-details.html +5 -7
  77. package/src/page_klarna_payment-details_with-klarna.html +1 -1
  78. package/src/page_payment-details-with-billie.html +1 -1
  79. package/src/page_payment-details-with-clearpay.html +1 -1
  80. package/src/page_payment-details-with-gift-card.html +2 -2
  81. package/src/page_payment-details_with_apple-pay.html +1 -1
  82. package/src/page_payment-details_with_google-pay.html +1 -1
  83. package/src/page_plp_v2.html +0 -1
  84. package/src/page_product-details-billie.html +2 -0
  85. package/src/page_product-details-clearpay.html +1 -0
  86. package/src/page_product-details-mfe-calculator.html +3 -9
  87. package/src/scss/common/_CTAs.scss +3 -7
  88. package/src/scss/components/_custom-slider.scss +0 -18
  89. package/src/scss/components/_date-selection-add-new-styles.scss +1 -43
  90. package/src/scss/components/_gift-cards.scss +32 -3
  91. package/src/scss/components/_order-summary.scss +12 -25
  92. package/src/scss/components/_payments-checkout.scss +2 -2
  93. package/src/scss/components/_payments-v2.scss +1 -1
  94. package/src/scss/components/_price-block-critical.scss +2 -2
  95. package/src/scss/components/_price-block.scss +4 -14
  96. package/src/scss/components/card-product-banner.scss +0 -8
  97. package/src/scss/helpers/_CTAs.scss +5 -15
  98. package/src/scss/helpers/_variables.scss +2 -0
  99. package/src/scss/pages/_checkout-confirmation-new.scss +86 -2
  100. package/src/scss/pages/page_checkout_delivery-new.scss +0 -36
  101. package/src/scss/pages/page_products-list-combined.scss +1 -8
  102. package/src/scss/pages/page_products-list.scss +1 -8
  103. package/src/scss/pages/page_shopping-cart-v2.scss +10 -34
  104. package/src/scss/pdp-main.scss +0 -1
  105. package/src/sitemap.html +6 -0
  106. package/build/js/page/components/notify-me.js +0 -99
  107. package/build/js/wickes-dc.js +0 -1
  108. package/src/components/modals/notify-me-modal.hbs +0 -76
  109. package/src/components/sponsor-top-banner.hbs +0 -10
  110. package/src/js/emulation/notify-me.js +0 -9
  111. package/src/js/page/components/notify-me.js +0 -99
  112. package/src/scss/components/_notify-me-modal.scss +0 -139
@@ -51,17 +51,10 @@ $color-bar-radius: 3px;
51
51
  margin-bottom: 20px;
52
52
  margin-top: 10px;
53
53
 
54
- &__picture {
55
- display: flex;
56
- }
57
-
58
54
  &__image {
59
55
  display: block;
60
56
  max-width: 100%;
61
- }
62
-
63
- img.sponsor-top-banner__image {
64
- width: 100%;
57
+ margin-bottom: 20px;
65
58
  }
66
59
  }
67
60
 
@@ -39,18 +39,11 @@
39
39
  }
40
40
 
41
41
  .sponsor-top-banner {
42
- &__picture {
43
- display: flex;
44
- }
45
-
46
42
  &__image {
43
+ margin-bottom: 20px;
47
44
  display: block;
48
45
  max-width: 100%;
49
46
  }
50
-
51
- img.sponsor-top-banner__image {
52
- width: 100%;
53
- }
54
47
  }
55
48
  }
56
49
 
@@ -16,6 +16,7 @@
16
16
  @include make-col-ready;
17
17
  }
18
18
 
19
+
19
20
  &__main,
20
21
  .content,
21
22
  .right-aside {
@@ -101,16 +102,6 @@
101
102
  display: flex;
102
103
  }
103
104
 
104
- &:has(.checkout-widget__item-delivery-cost-message) {
105
- .checkout-widget__item-charity {
106
- order: 0;
107
- }
108
-
109
- .checkout-widget__voucher-accordion {
110
- order: 2;
111
- }
112
- }
113
-
114
105
  .checkout-widget {
115
106
  &__item {
116
107
  &-bold {
@@ -137,6 +128,7 @@
137
128
  }
138
129
  }
139
130
 
131
+
140
132
  &__details-discount {
141
133
  order: 1;
142
134
  }
@@ -159,7 +151,7 @@
159
151
  .checkout-widget {
160
152
  &__item {
161
153
  font-weight: 400;
162
- font-size: 0.875rem;
154
+ font-size: .875rem;
163
155
  padding: 10px 0;
164
156
  margin: 0;
165
157
 
@@ -183,6 +175,7 @@
183
175
  padding: 0;
184
176
  }
185
177
 
178
+
186
179
  &:not(.checkout-widget__item-vat) {
187
180
  margin-top: 0;
188
181
  }
@@ -195,34 +188,15 @@
195
188
  margin: 0;
196
189
  padding: 0 0 10px;
197
190
  color: $warm-grey;
198
- font-size: 0.75rem;
191
+ font-size: .75rem;
199
192
  border-bottom: 1px solid #eee;
200
193
  }
201
-
202
- &-delivery:has(+ .checkout-widget__item-delivery-cost-message) {
203
- padding-bottom: 0;
204
- }
205
-
206
- &-delivery-cost-message {
207
- padding-top: 0;
208
- margin-top: 4px !important;
209
- margin-bottom: 0;
210
- justify-content: flex-end;
211
-
212
- #order-delivery-cost-message {
213
- @include font-size(10);
214
- @include line-height(12);
215
-
216
- font-weight: 700;
217
- color: $squant;
218
- }
219
- }
220
194
  }
221
195
 
222
196
  &__detail {
223
197
  &-name {
224
198
  font-weight: 400;
225
- font-size: 0.875rem;
199
+ font-size: .875rem;
226
200
 
227
201
  .accordion__header-icon-small {
228
202
  left: 75px;
@@ -232,7 +206,7 @@
232
206
 
233
207
  &-value {
234
208
  color: $gray-dark;
235
- font-size: 0.875rem;
209
+ font-size: .875rem;
236
210
  }
237
211
  }
238
212
 
@@ -302,7 +276,7 @@
302
276
  & h5 {
303
277
  margin: 0;
304
278
  margin-top: 8px;
305
- font-size: 0.875rem;
279
+ font-size: .875rem;
306
280
  }
307
281
  }
308
282
  }
@@ -383,6 +357,7 @@
383
357
  }
384
358
  }
385
359
  }
360
+
386
361
  }
387
362
  }
388
363
  }
@@ -560,6 +535,7 @@
560
535
  }
561
536
  }
562
537
 
538
+
563
539
  @include media-breakpoint-up(xl) {
564
540
  .basket {
565
541
  .checkout-title {
@@ -81,7 +81,6 @@
81
81
  @import 'components/billie-online-messaging';
82
82
  @import 'components/billie-modal';
83
83
  @import 'components/input-counter';
84
- @import 'components/notify-me-modal';
85
84
 
86
85
  // Pages
87
86
  @import 'pages/page_ti';
package/src/sitemap.html CHANGED
@@ -990,6 +990,12 @@
990
990
  Page with Gift Cards
991
991
  </a>
992
992
  </li>
993
+ <li>
994
+ <span class="page-id">2</span>
995
+ <a href="page_checkout_confirmation-gift-card.html" target="_blank">
996
+ Gift Card Checkout - Confirmation new
997
+ </a>
998
+ </li>
993
999
  </ul>
994
1000
  </div>
995
1001
  <div class="col">
@@ -1,99 +0,0 @@
1
- import { showValidationErrors, clearValidationErrors, isValidEmail } from '../utils/validation';
2
-
3
- var Wick = window.Wick || {};
4
-
5
- Wick.NotifyMeSubscription = {
6
- NOTIFY_ME_EVENT: 'NOTIFY_ME',
7
- HIDDEN_CLASS_NAME: 'd-none',
8
- el: {
9
- notifyMePopup: '#modal-notify-me',
10
- notifyMeBtn: '.btn--notify-open',
11
-
12
- form: '#modal-notify-me .notify-me-form',
13
- emailInput: '#modal-notify-me #notify-me-email',
14
- stateForm: '#modal-notify-me [data-notify-state="form"]',
15
- stateSuccess: '#modal-notify-me [data-notify-state="success"]',
16
- headerForm: '#modal-notify-me [data-notify-header="form"]',
17
- headerSuccess: '#modal-notify-me [data-notify-header="success"]',
18
- productId: '#product-code-val',
19
- },
20
- defaultErrorMessage: 'Something went wrong',
21
- invalidEmailMessage: 'Please enter a valid email address',
22
- showCustomModal() {
23
- $(Wick.NotifyMeSubscription.el.notifyMePopup).modal('show');
24
- },
25
- getEmail() {
26
- return ($(Wick.NotifyMeSubscription.el.emailInput).val() || '').toString().trim();
27
- },
28
- isEmailValid() {
29
- const email = Wick.NotifyMeSubscription.getEmail();
30
-
31
- return isValidEmail(email);
32
- },
33
- showFormState() {
34
- $(Wick.NotifyMeSubscription.el.stateSuccess).addClass(
35
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
36
- );
37
- $(Wick.NotifyMeSubscription.el.stateForm).removeClass(
38
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
39
- );
40
-
41
- $(Wick.NotifyMeSubscription.el.headerSuccess).addClass(
42
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
43
- );
44
- $(Wick.NotifyMeSubscription.el.headerForm).removeClass(
45
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
46
- );
47
- },
48
- showSuccessState() {
49
- $(Wick.NotifyMeSubscription.el.stateForm).addClass(
50
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
51
- );
52
- $(Wick.NotifyMeSubscription.el.stateSuccess).removeClass(
53
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
54
- );
55
-
56
- $(Wick.NotifyMeSubscription.el.headerForm).addClass(
57
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
58
- );
59
- $(Wick.NotifyMeSubscription.el.headerSuccess).removeClass(
60
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
61
- );
62
- },
63
- resetValidation() {
64
- clearValidationErrors(Wick.NotifyMeSubscription.el.form);
65
- },
66
- validateForm() {
67
- Wick.NotifyMeSubscription.resetValidation();
68
-
69
- if (!Wick.NotifyMeSubscription.isEmailValid()) {
70
- showValidationErrors(
71
- Wick.NotifyMeSubscription.el.form,
72
- Wick.NotifyMeSubscription.invalidEmailMessage
73
- );
74
- return false;
75
- }
76
-
77
- return true;
78
- },
79
- showError(err = {}) {
80
- const msg = err.errMsg || err.errorMessage || Wick.NotifyMeSubscription.defaultErrorMessage;
81
-
82
- showValidationErrors(Wick.NotifyMeSubscription.el.form, msg);
83
- },
84
- init() {
85
- $(document).on('click', Wick.NotifyMeSubscription.el.notifyMeBtn, function (e) {
86
- e.preventDefault();
87
- Wick.NotifyMeSubscription.showCustomModal();
88
- });
89
-
90
- $(Wick.NotifyMeSubscription.el.notifyMePopup).on('hidden.bs.modal', function () {
91
- Wick.NotifyMeSubscription.showFormState();
92
- clearValidationErrors(Wick.NotifyMeSubscription.el.form);
93
- });
94
- },
95
- };
96
-
97
- $(document).ready(function () {
98
- Wick.NotifyMeSubscription.init();
99
- });
@@ -1 +0,0 @@
1
- !function a(i,n,s){function o(t,e){if(!n[t]){if(!i[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}r=n[t]={exports:{}},i[t][0].call(r.exports,function(e){return o(i[t][1][e]||e)},r,r.exports,a,i,n,s)}return n[t].exports}for(var l="function"==typeof require&&require,e=0;e<s.length;e++)o(s[e]);return o}({1:[function(e,t,r){"use strict";$(document).ready(function(){$(".header-right-wrapp .header-right__item:eq(-2)").after('<li class="header-right__item"><a href="#" class="header-right__link swal-confirm"><span class="btn__text"><i class="fas fa-trash fa-2x"></i></span><span class="header-right__link-title">Empty</span></a></li>'),$(".header-mobileicon a:eq(-1)").after('<a class="trash-button-dc swal-confirm" href="#"><div class="btn btn-primary header-shop-list"><span class="icon"><i class="svg-inline--fa fas fa-trash fa-w-12 fa-lg"></i></span></div></a>'),$("head").append("<script src='https://unpkg.com/sweetalert/dist/sweetalert.min.js'><\/script>"),$("head").append("<style>@media (max-width: 399px) { .trash-button-dc { display: none; } }</style>"),"ontouchstart"in window&&$(".trash-button-dc .btn").removeClass("btn-primary");$(".swal-confirm").click(function(e){e.preventDefault(),swal({title:"Are you sure?",text:"You will remove all the items from the basket, including any vouchers applied.",buttons:!0,dangerMode:!0}).then(function(e){e&&($("body").append('<div class="loader-wrapper loader-wrapper--full-page"> <div class="loader-container"> <div class="loader"></div> <div class="loader-message">Removing items from your basket</div> </div> </div>'),$.post("/cart/clear").fail(function(){swal({title:"Error",text:"Failed to remove items from the basket.",dangerMode:!0}),$(".loader-wrapper").remove()}).done(function(){location.reload()}))})})})},{}]},{},[1]);
@@ -1,76 +0,0 @@
1
- {{#extend "modal"
2
- id="modal-notify-me"
3
- fullWidth=false
4
- wide=true
5
- backdrop=true
6
- title=""
7
- showCloseBtn=true
8
- classMod=mod
9
- }}
10
- {{#content "header"}}
11
- <div class="notify-me__header">
12
- <h3 class="modal-title modal-box__title"
13
- data-notify-header="form">
14
- <span class="icon-wrap">
15
- <i class="fas fa-bell icon"></i>
16
- </span>
17
- Notify me when this product is back in stock
18
- </h3>
19
-
20
- <h3 class="modal-title modal-box__title d-none"
21
- data-notify-header="success">
22
- <i class="fas fa-check-circle text-success icon"></i>
23
- You will receive an email when the product is back in stock
24
- </h3>
25
- </div>
26
- {{/content}}
27
-
28
- {{#content "sections"}}
29
- {{#extend "modal-body-section"}}
30
- {{#content "body"}}
31
- <div class="notify-me" data-notify-root>
32
- <div class="notify-me__state notify-me__state--form" data-notify-state="form">
33
- <form class="notify-me-form" novalidate>
34
- {{> form-row type="email" id="notify-me-email" name="email" label="Email address" value="test@test.com" required="true"}}
35
-
36
- <p class="notify-me-form__note">
37
- By providing your email address, you agree to receive email notifications until your product is back in
38
- stock.
39
- Your email will not be stored for any other purpose.
40
- </p>
41
-
42
- <div class="notify-me-form__ctas">
43
- {{> base/button
44
- text="Notify me"
45
- modification="btn-primary btn--notify-submit"
46
- type="submit"
47
- }}
48
- <button class="btn btn-outline-primary btn--notify-cancel" type="button" data-dismiss="modal">
49
- Cancel
50
- </button>
51
- </div>
52
- </form>
53
- </div>
54
-
55
- <div class="notify-me__state notify-me__state--success d-none" data-notify-state="success">
56
- <div class="notify-me__success">
57
- <div class="notify-me-result">
58
- <img
59
- src="./img/tile-buying-guide.jpg"
60
- alt="Wickes General Purpose Claw Hammer - 16oz"
61
- class="notify-me-result__img">
62
- <p class="notify-me-result__title">
63
- Wickes General Purpose Claw Hammer - 16oz
64
- </p>
65
- </div>
66
-
67
- <button class="btn btn-outline-primary btn--notify-close" type="button" data-dismiss="modal">
68
- Close
69
- </button>
70
- </div>
71
- </div>
72
- </div>
73
- {{/content}}
74
- {{/extend}}
75
- {{/content}}
76
- {{/extend}}
@@ -1,10 +0,0 @@
1
- {{#if search-result_v2.sponsor-top-banner}}
2
- <div class="sponsor-top-banner sponsored-ad">
3
- <a class="sponsor-top-banner__link" href="{{search-result_v2.sponsor-top-banner.href}}">
4
- <picture class="sponsor-top-banner__picture">
5
- <source class="sponsor-top-banner__image" srcset="{{#if search-result_v2.sponsor-top-banner.mobile-src}}{{search-result_v2.sponsor-top-banner.mobile-src}}{{else}}{{search-result_v2.sponsor-top-banner.src}}{{/if}}" media="(max-width: 768px)">
6
- <img class="sponsor-top-banner__image" src="{{search-result_v2.sponsor-top-banner.src}}" alt="banner">
7
- </picture>
8
- </a>
9
- </div>
10
- {{/if}}
@@ -1,9 +0,0 @@
1
- function initNotifyMeEmulation() {
2
- $(document).on('submit', Wick.NotifyMeSubscription.el.form, () =>
3
- Wick.NotifyMeSubscription.showSuccessState()
4
- );
5
- }
6
-
7
- $(document).ready(function () {
8
- initNotifyMeEmulation();
9
- });
@@ -1,99 +0,0 @@
1
- import { showValidationErrors, clearValidationErrors, isValidEmail } from '../utils/validation';
2
-
3
- var Wick = window.Wick || {};
4
-
5
- Wick.NotifyMeSubscription = {
6
- NOTIFY_ME_EVENT: 'NOTIFY_ME',
7
- HIDDEN_CLASS_NAME: 'd-none',
8
- el: {
9
- notifyMePopup: '#modal-notify-me',
10
- notifyMeBtn: '.btn--notify-open',
11
-
12
- form: '#modal-notify-me .notify-me-form',
13
- emailInput: '#modal-notify-me #notify-me-email',
14
- stateForm: '#modal-notify-me [data-notify-state="form"]',
15
- stateSuccess: '#modal-notify-me [data-notify-state="success"]',
16
- headerForm: '#modal-notify-me [data-notify-header="form"]',
17
- headerSuccess: '#modal-notify-me [data-notify-header="success"]',
18
- productId: '#product-code-val',
19
- },
20
- defaultErrorMessage: 'Something went wrong',
21
- invalidEmailMessage: 'Please enter a valid email address',
22
- showCustomModal() {
23
- $(Wick.NotifyMeSubscription.el.notifyMePopup).modal('show');
24
- },
25
- getEmail() {
26
- return ($(Wick.NotifyMeSubscription.el.emailInput).val() || '').toString().trim();
27
- },
28
- isEmailValid() {
29
- const email = Wick.NotifyMeSubscription.getEmail();
30
-
31
- return isValidEmail(email);
32
- },
33
- showFormState() {
34
- $(Wick.NotifyMeSubscription.el.stateSuccess).addClass(
35
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
36
- );
37
- $(Wick.NotifyMeSubscription.el.stateForm).removeClass(
38
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
39
- );
40
-
41
- $(Wick.NotifyMeSubscription.el.headerSuccess).addClass(
42
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
43
- );
44
- $(Wick.NotifyMeSubscription.el.headerForm).removeClass(
45
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
46
- );
47
- },
48
- showSuccessState() {
49
- $(Wick.NotifyMeSubscription.el.stateForm).addClass(
50
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
51
- );
52
- $(Wick.NotifyMeSubscription.el.stateSuccess).removeClass(
53
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
54
- );
55
-
56
- $(Wick.NotifyMeSubscription.el.headerForm).addClass(
57
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
58
- );
59
- $(Wick.NotifyMeSubscription.el.headerSuccess).removeClass(
60
- Wick.NotifyMeSubscription.HIDDEN_CLASS_NAME
61
- );
62
- },
63
- resetValidation() {
64
- clearValidationErrors(Wick.NotifyMeSubscription.el.form);
65
- },
66
- validateForm() {
67
- Wick.NotifyMeSubscription.resetValidation();
68
-
69
- if (!Wick.NotifyMeSubscription.isEmailValid()) {
70
- showValidationErrors(
71
- Wick.NotifyMeSubscription.el.form,
72
- Wick.NotifyMeSubscription.invalidEmailMessage
73
- );
74
- return false;
75
- }
76
-
77
- return true;
78
- },
79
- showError(err = {}) {
80
- const msg = err.errMsg || err.errorMessage || Wick.NotifyMeSubscription.defaultErrorMessage;
81
-
82
- showValidationErrors(Wick.NotifyMeSubscription.el.form, msg);
83
- },
84
- init() {
85
- $(document).on('click', Wick.NotifyMeSubscription.el.notifyMeBtn, function (e) {
86
- e.preventDefault();
87
- Wick.NotifyMeSubscription.showCustomModal();
88
- });
89
-
90
- $(Wick.NotifyMeSubscription.el.notifyMePopup).on('hidden.bs.modal', function () {
91
- Wick.NotifyMeSubscription.showFormState();
92
- clearValidationErrors(Wick.NotifyMeSubscription.el.form);
93
- });
94
- },
95
- };
96
-
97
- $(document).ready(function () {
98
- Wick.NotifyMeSubscription.init();
99
- });
@@ -1,139 +0,0 @@
1
- .modal-notify-me {
2
- .modal-dialog {
3
- height: 100%;
4
- margin: 0 auto;
5
- max-width: 100%;
6
- }
7
-
8
- &.modal-box_wide {
9
- .modal-box__columns {
10
- max-width: 520px;
11
- padding: 0;
12
- }
13
- }
14
-
15
- .modal-box__inner-row {
16
- margin: 0;
17
-
18
- .modal-box__inner-columns {
19
- padding: 0;
20
- max-width: 100%;
21
- flex: 0 0 100%;
22
- }
23
- }
24
-
25
- .modal-header {
26
- padding: 16px 35px 16px 24px;
27
-
28
- .modal-title {
29
- @include font-size(18);
30
- @include line-height(24);
31
- color: $gray-dark;
32
- font-weight: 700;
33
- display: flex;
34
- align-items: center;
35
- gap: 14px;
36
-
37
- .icon-wrap {
38
- width: 40px;
39
- height: 40px;
40
- }
41
-
42
- .icon {
43
- @include font-size(30);
44
- color: $blue;
45
- height: auto;
46
- }
47
- }
48
-
49
- .close {
50
- opacity: 1;
51
- outline: 0;
52
- right: 10px;
53
- }
54
-
55
- &:after {
56
- left: 0;
57
- right: 0;
58
- }
59
- }
60
-
61
- .modal-body {
62
- padding: 24px;
63
-
64
- .form-row__label {
65
- margin-bottom: 8px;
66
- }
67
-
68
- .notify-me-form {
69
- &__note {
70
- @include font-size(12);
71
- @include line-height(16);
72
- color: $squant;
73
- font-weight: 400;
74
- margin-bottom: 0;
75
- }
76
-
77
- &__ctas {
78
- margin-top: 40px;
79
- display: flex;
80
- gap: 16px;
81
-
82
- & > div {
83
- display: contents;
84
- }
85
- }
86
- }
87
-
88
- .notify-me-result {
89
- display: flex;
90
- align-items: center;
91
- gap: 15px;
92
-
93
- &__img {
94
- width: 64px;
95
- height: 64px;
96
- object-fit: cover;
97
- }
98
-
99
- &__title {
100
- @include font-size(14);
101
- @include line-height(22);
102
- font-weight: 700;
103
- }
104
-
105
- & + .btn--notify-close {
106
- margin-top: 40px;
107
- }
108
- }
109
- }
110
- }
111
-
112
- @include media-breakpoint-down(xl) {
113
- .modal-notify-me {
114
- height: auto;
115
- margin: 40px 16px 0;
116
-
117
- &.modal-box_full .modal-box__inner-row {
118
- margin: 0;
119
- }
120
-
121
- .modal-body {
122
- .form-row {
123
- padding: 0;
124
- margin: 0 0 16px;
125
- }
126
-
127
- .form-row__label,
128
- .form-row__field,
129
- .form-row__error {
130
- padding: 0;
131
- }
132
- }
133
-
134
- .modal-body .notify-me-form__ctas,
135
- .notify-me-result .btn--notify-close {
136
- margin-top: 32px;
137
- }
138
- }
139
- }