wickes-css2 2.93.0 → 2.94.0-develop.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.
- package/build/css/category-main.css +1 -1
- package/build/css/emulation.css +1 -1
- package/build/css/homepage-main.css +1 -1
- package/build/css/main.css +1 -1
- package/build/css/my-account-main-v2.css +1 -0
- package/build/css/my-account-main.css +1 -1
- package/build/css/pages/checkout-new.css +1 -1
- package/build/css/pages/checkout.css +1 -1
- package/build/css/pages/my-account-v2.css +1 -0
- package/build/css/pages/my-account.css +1 -1
- package/build/css/pages/page_checkout_delivery-new.css +1 -1
- package/build/css/pages/page_personal-details.css +1 -0
- 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/img/placeholders/discount-sm-15.jpg +0 -0
- package/build/img/placeholders/discount-sm.png +0 -0
- package/build/js/account-members.min.js +1 -1
- package/build/js/basket.min.js +1 -1
- package/build/js/bundle.min.js +1 -1
- package/build/js/checkout.min.js +1 -1
- package/build/js/emulation.min.js +74 -21
- package/build/js/merged-checkout.min.js +1 -1
- package/build/js/my-account.min.js +1 -0
- package/build/js/page/my-account.js +51 -0
- package/build/js/page/personal-details.js +217 -0
- package/build/js/personal-details.min.js +1 -0
- package/build/js/project-list.min.js +1 -1
- package/package.json +1 -1
- package/src/components/account-families/actions-bar.hbs +3 -0
- package/src/components/aside-nav2.hbs +1 -1
- package/src/components/banner-news.hbs +8 -0
- package/src/components/date-selection.hbs +46 -59
- package/src/components/delivery-types.hbs +18 -38
- package/src/components/my-account/active-orders/consignment-info.hbs +11 -0
- package/src/components/my-account/active-orders/header.hbs +4 -0
- package/src/components/my-account/active-orders/list-orders.hbs +9 -0
- package/src/components/my-account/active-orders/order-details.hbs +18 -0
- package/src/components/my-account/active-orders/order-header.hbs +7 -0
- package/src/components/my-account/active-orders/order.hbs +20 -0
- package/src/components/my-account/active-orders/shipment-detail.hbs +13 -0
- package/src/components/my-account/barcode.hbs +17 -0
- package/src/components/my-account/clipboard-code-card.hbs +16 -0
- package/src/components/my-account/contact-us.hbs +23 -0
- package/src/components/my-account/discount.hbs +11 -0
- package/src/components/my-account/greetings.hbs +7 -0
- package/src/components/my-account/leave-modal.hbs +13 -0
- package/src/components/my-account/menu-items.hbs +25 -0
- package/src/components/my-account/mobile-nav.hbs +46 -0
- package/src/components/my-account/personal-details-form.hbs +24 -0
- package/src/components/my-account/personal-details.hbs +14 -0
- package/src/components/my-account/user-account-actions.hbs +18 -0
- package/src/components/user-information-field.hbs +4 -0
- package/src/components.html +1 -0
- package/src/data/data_calendar.json +149 -0
- package/src/data/data_notification-page.json +4 -0
- package/src/data/my-account/data_my-account.json +469 -0
- package/src/data/my-account/data_personal-details.json +179 -0
- package/src/elements/dropdown.hbs +16 -5
- package/src/elements/form-row.hbs +1 -1
- package/src/img/placeholders/discount-sm-15.jpg +0 -0
- package/src/img/placeholders/discount-sm.png +0 -0
- package/src/js/components/date-selection.js +6 -20
- package/src/js/components/leave-event-v2.js +0 -0
- package/src/js/components/leave-event.js +10 -3
- package/src/js/emulation/date-selection.js +0 -21
- package/src/js/emulation/personal-details-local.js +73 -0
- package/src/js/page/my-account.js +51 -0
- package/src/js/page/personal-details.js +217 -0
- package/src/layouts/my-account-v2.hbs +27 -0
- package/src/layouts/my-account.hbs +1 -1
- package/src/page_checkout_delivery-details-v2-asm.html +3 -3
- package/src/page_checkout_delivery-details-v2-calendar-message.html +1 -1
- package/src/page_checkout_delivery-details-v2-oos.html +1 -1
- package/src/page_checkout_delivery-details-v2-wisdom-not-available.html +2 -2
- package/src/page_checkout_delivery-details-v2-wisdom.html +2 -2
- package/src/page_checkout_delivery-details-with-loader-v2.html +1 -1
- package/src/page_checkout_delivery-details_guest-new.html +1 -1
- package/src/page_checkout_next-day-delivery-details.html +161 -0
- package/src/{page_checkout_delivery-details-v2.html → page_checkout_rapid-delivery-details.html} +14 -3
- package/src/page_discount_installer.html +7 -1
- package/src/page_marketing-preferences.html +7 -1
- package/src/page_my-account-installer.html +93 -0
- package/src/page_my-account-trade-pro.html +91 -0
- package/src/page_my-account.html +56 -59
- package/src/page_my-account_address-book.html +8 -2
- package/src/page_my-account_order-history.html +8 -3
- package/src/page_my-account_personal-details.html +7 -1
- package/src/page_personal-details-installer.html +52 -0
- package/src/page_personal-details.html +52 -0
- package/src/page_tradePro_discount.html +8 -2
- package/src/page_tradePro_rewards.html +7 -1
- package/src/partials/breadcrumbs.hbs +27 -8
- package/src/partials/head.hbs +5 -1
- package/src/partials/header.hbs +68 -49
- package/src/partials/main-nav.hbs +17 -9
- package/src/scss/components/_aside-nav2.scss +18 -0
- package/src/scss/components/_date-selection-add-new-styles.scss +78 -19
- package/src/scss/components/_date-selection.scss +30 -215
- package/src/scss/components/my-account/_consignment-info.scss +46 -0
- package/src/scss/components/my-account/_contacts.scss +116 -0
- package/src/scss/components/my-account/_menu.scss +215 -0
- package/src/scss/components/my-account/_mobile-nav.scss +130 -0
- package/src/scss/components/my-account/_order.scss +112 -0
- package/src/scss/components/my-account/_shipment.scss +92 -0
- package/src/scss/emulation.scss +0 -24
- package/src/scss/helpers/_variables.scss +3 -1
- package/src/scss/my-account-main-v2.scss +32 -0
- package/src/scss/pages/checkout-new.scss +51 -0
- package/src/scss/pages/my-account-v2.scss +570 -0
- package/src/scss/pages/my-account.scss +1 -0
- package/src/scss/pages/page_checkout_delivery-new.scss +2 -1
- package/src/scss/pages/page_paint-mixing-error.scss +1 -1
- package/src/scss/pages/page_personal-details.scss +249 -0
- package/src/scss/partials/_header.scss +30 -0
- package/src/scss/partials/_main-nav.scss +6 -2
- package/src/sitemap.html +44 -66
- package/src/components/calendar-time-table-v2.hbs +0 -3
- package/src/components/calendar-time-table.hbs +0 -3
- package/src/components/date-selection-v2.hbs +0 -106
- package/src/components/delivery-selection.hbs +0 -11
- package/src/components/delivery-types-v2.hbs +0 -17
- package/src/page_checkout_delivery-address.html +0 -70
- package/src/page_checkout_delivery-details-ASM.html +0 -251
- package/src/page_checkout_delivery-details-oos-partially.html +0 -215
- package/src/page_checkout_delivery-details-oos.html +0 -232
- package/src/page_checkout_delivery-details-with-loader.html +0 -220
- package/src/page_checkout_delivery-details.html +0 -221
- package/src/page_checkout_delivery-details_guest.html +0 -198
- package/src/page_tradePro_delivery-details.html +0 -243
|
@@ -3259,7 +3259,6 @@ Wick.DateSelection = (function(){
|
|
|
3259
3259
|
cell = '.calendar__cell_cnt',
|
|
3260
3260
|
selectedCell = 'calendar__cell_selected',
|
|
3261
3261
|
isSelected = 'date-selection_selected',
|
|
3262
|
-
backToCalendar = '.delivery-time__show-calendar-link',
|
|
3263
3262
|
isDateSelected = false;
|
|
3264
3263
|
|
|
3265
3264
|
var selectTimeSlot = function(e){
|
|
@@ -3270,32 +3269,12 @@ Wick.DateSelection = (function(){
|
|
|
3270
3269
|
isDateSelected = true;
|
|
3271
3270
|
};
|
|
3272
3271
|
|
|
3273
|
-
var mobileView = function(){
|
|
3274
|
-
var isTimeSlotsVisible = 'date-selection_time-visible';
|
|
3275
|
-
|
|
3276
|
-
$self
|
|
3277
|
-
.off('.time')
|
|
3278
|
-
.removeClass(isTimeSlotsVisible)
|
|
3279
|
-
.on('click.time', cell, function(){
|
|
3280
|
-
$self.addClass(isTimeSlotsVisible);
|
|
3281
|
-
})
|
|
3282
|
-
.on('click.time', backToCalendar, function(){
|
|
3283
|
-
$self.removeClass(isTimeSlotsVisible);
|
|
3284
|
-
});
|
|
3285
|
-
};
|
|
3286
|
-
|
|
3287
3272
|
var init = function () {
|
|
3288
3273
|
if (!$self.length) {
|
|
3289
3274
|
return;
|
|
3290
3275
|
}
|
|
3291
3276
|
|
|
3292
3277
|
$self.on('click', cell, selectTimeSlot);
|
|
3293
|
-
new SimpleBar($self.find('.delivery-types__inner')[0]);
|
|
3294
|
-
|
|
3295
|
-
if (Wick.Responsive.getCurrentBreakpoint() === 'down-sm') {
|
|
3296
|
-
mobileView();
|
|
3297
|
-
}
|
|
3298
|
-
Wick.Responsive.onBreakpoint(mobileView, 'down-sm');
|
|
3299
3278
|
}
|
|
3300
3279
|
|
|
3301
3280
|
init();
|
|
@@ -5742,6 +5721,80 @@ $(document).ready(() => {
|
|
|
5742
5721
|
}
|
|
5743
5722
|
})
|
|
5744
5723
|
|
|
5724
|
+
var Wick = Wick || {};
|
|
5725
|
+
Wick.PersonalDetailsData = (function(){
|
|
5726
|
+
return {
|
|
5727
|
+
success: {
|
|
5728
|
+
globalMessage: {
|
|
5729
|
+
status: 'success',
|
|
5730
|
+
message: 'Your profile has been updated',
|
|
5731
|
+
},
|
|
5732
|
+
fieldErrors: null,
|
|
5733
|
+
},
|
|
5734
|
+
validationError: {
|
|
5735
|
+
globalMessage: {
|
|
5736
|
+
status: 'error',
|
|
5737
|
+
message: 'Please correct the errors below.',
|
|
5738
|
+
},
|
|
5739
|
+
fieldErrors: [
|
|
5740
|
+
{ field: 'email', message: 'Please enter your email' },
|
|
5741
|
+
],
|
|
5742
|
+
},
|
|
5743
|
+
serverError: {
|
|
5744
|
+
globalMessage: {
|
|
5745
|
+
status: 'error',
|
|
5746
|
+
message: 'Sorry, we were unable to update your personal details, please try again',
|
|
5747
|
+
},
|
|
5748
|
+
fieldErrors: null,
|
|
5749
|
+
},
|
|
5750
|
+
}
|
|
5751
|
+
})()
|
|
5752
|
+
|
|
5753
|
+
function getResponseBasedOnField(personalDetails) {
|
|
5754
|
+
const personalDetailsObject = personalDetails.reduce((acc, { name, value }) => {
|
|
5755
|
+
acc[name] = value;
|
|
5756
|
+
return acc;
|
|
5757
|
+
}, {});
|
|
5758
|
+
|
|
5759
|
+
const { firstName, email } = personalDetailsObject;
|
|
5760
|
+
const isValidationError = email === 'test@gmail.com';
|
|
5761
|
+
const isServerError = firstName === 'server_error';
|
|
5762
|
+
|
|
5763
|
+
if (isValidationError) {
|
|
5764
|
+
return { success: false, response: Wick.PersonalDetailsData.validationError };
|
|
5765
|
+
}
|
|
5766
|
+
|
|
5767
|
+
if (isServerError) {
|
|
5768
|
+
return { success: false, response: Wick.PersonalDetailsData.serverError };
|
|
5769
|
+
}
|
|
5770
|
+
|
|
5771
|
+
return { success: true, response: Wick.PersonalDetailsData.success };
|
|
5772
|
+
}
|
|
5773
|
+
|
|
5774
|
+
function initPersonalDetails() {
|
|
5775
|
+
if (!Wick?.PersonalDetails?.UPDATE_PERSONAL_DETAILS_EVENT) {
|
|
5776
|
+
return;
|
|
5777
|
+
}
|
|
5778
|
+
|
|
5779
|
+
$(window).on(Wick.PersonalDetails.UPDATE_PERSONAL_DETAILS_EVENT, function ({ detail: { resolve, reject } }) {
|
|
5780
|
+
setTimeout(() => {
|
|
5781
|
+
const personalDetails = Wick.LeaveEvent.getState(Wick.PersonalDetails.el.userForm);
|
|
5782
|
+
|
|
5783
|
+
const { success, response } = getResponseBasedOnField(personalDetails);
|
|
5784
|
+
|
|
5785
|
+
if (success) {
|
|
5786
|
+
return resolve(response);
|
|
5787
|
+
} else {
|
|
5788
|
+
return reject(response);
|
|
5789
|
+
}
|
|
5790
|
+
}, 500);
|
|
5791
|
+
});
|
|
5792
|
+
}
|
|
5793
|
+
|
|
5794
|
+
$(document).ready(function () {
|
|
5795
|
+
initPersonalDetails();
|
|
5796
|
+
});
|
|
5797
|
+
|
|
5745
5798
|
function getHtmlByCurrentPage({currentPage}) {
|
|
5746
5799
|
const matchingData = Wick.FEMock.productListPagesData.find(item => item.page === currentPage);
|
|
5747
5800
|
|