@bonlineza/luxity-lib 2.35.2 → 2.36.1-beta.0
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/AddProductInterest.js +127 -5
- package/GraphQLDropdownSelector.js +131 -10
- package/IconHeader.js +2 -2
- package/Interests.js +132 -10
- package/LuxityDesktopHeader.js +60 -138
- package/LuxityFooter.js +4 -4
- package/LuxityGraphQLDropdownSelector.js +131 -10
- package/LuxityMobileHeader.js +99 -225
- package/LuxitySideNav.js +91 -219
- package/MaterialSelector.js +131 -10
- package/ModelSelector.js +131 -10
- package/NotificationDropDown.js +10 -3
- package/build/bundle.css +1 -1
- package/build/bundle.js +293 -353
- package/package.json +1 -1
- package/TestComponent.js +0 -15
- package/build/CountryCodeSelect/index.js +0 -18
- package/build/ReactSelectWrapper/index.js +0 -34
- package/postcss.config.js +0 -6
package/build/bundle.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-animate-height'), require('styled-components'), require('numeral'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady'), require('stylis-rule-sheet'), require('react-dom'), require('prop-types'), require('raf'), require('react-input-autosize'), require('react-transition-group'), require('@bonlineza/b-lib/functions'), require('rc-slider'), require('react-notify-toast'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-animate-height', 'styled-components', 'numeral', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady', 'stylis-rule-sheet', 'react-dom', 'prop-types', 'raf', 'react-input-autosize', 'react-transition-group', '@bonlineza/b-lib/functions', 'rc-slider', 'react-notify-toast', '
|
|
4
|
-
(global = global || self, factory(global.blib = {}, global.React, global.AnimateHeight, global.styled, global.numeral, global.EllipsisLoader, global.PageReady, global['stylis-rule-sheet'], global.reactDom, global.PropTypes, global.raf, global['react-input-autosize'], global['react-transition-group'], global.function, global.rcSlider, global['react-notify-toast'], global.
|
|
5
|
-
}(this, (function (exports, React, AnimateHeight, styled, numeral, EllipsisLoader, PageReady, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, Notifications,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-animate-height'), require('styled-components'), require('numeral'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady'), require('stylis-rule-sheet'), require('react-dom'), require('prop-types'), require('raf'), require('react-input-autosize'), require('react-transition-group'), require('@bonlineza/b-lib/functions'), require('rc-slider'), require('react-notify-toast'), require('axios'), require('js-cookie')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-animate-height', 'styled-components', 'numeral', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady', 'stylis-rule-sheet', 'react-dom', 'prop-types', 'raf', 'react-input-autosize', 'react-transition-group', '@bonlineza/b-lib/functions', 'rc-slider', 'react-notify-toast', 'axios', 'js-cookie'], factory) :
|
|
4
|
+
(global = global || self, factory(global.blib = {}, global.React, global.AnimateHeight, global.styled, global.numeral, global.EllipsisLoader, global.PageReady, global['stylis-rule-sheet'], global.reactDom, global.PropTypes, global.raf, global['react-input-autosize'], global['react-transition-group'], global.function, global.rcSlider, global['react-notify-toast'], global.axios, global.Cookies));
|
|
5
|
+
}(this, (function (exports, React, AnimateHeight, styled, numeral, EllipsisLoader, PageReady, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, Notifications, axios, Cookies) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var React__default = 'default' in React ? React['default'] : React;
|
|
8
8
|
AnimateHeight = AnimateHeight && Object.prototype.hasOwnProperty.call(AnimateHeight, 'default') ? AnimateHeight['default'] : AnimateHeight;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
raf = raf && Object.prototype.hasOwnProperty.call(raf, 'default') ? raf['default'] : raf;
|
|
16
16
|
AutosizeInput = AutosizeInput && Object.prototype.hasOwnProperty.call(AutosizeInput, 'default') ? AutosizeInput['default'] : AutosizeInput;
|
|
17
17
|
var Notifications__default = 'default' in Notifications ? Notifications['default'] : Notifications;
|
|
18
|
-
axiosInstance = axiosInstance && Object.prototype.hasOwnProperty.call(axiosInstance, 'default') ? axiosInstance['default'] : axiosInstance;
|
|
19
18
|
axios = axios && Object.prototype.hasOwnProperty.call(axios, 'default') ? axios['default'] : axios;
|
|
19
|
+
Cookies = Cookies && Object.prototype.hasOwnProperty.call(Cookies, 'default') ? Cookies['default'] : Cookies;
|
|
20
20
|
|
|
21
21
|
function ownKeys(object, enumerableOnly) {
|
|
22
22
|
var keys = Object.keys(object);
|
|
@@ -10020,9 +10020,9 @@
|
|
|
10020
10020
|
};
|
|
10021
10021
|
|
|
10022
10022
|
var _templateObject$D;
|
|
10023
|
-
var StyledHeader = styled__default.h5(_templateObject$D || (_templateObject$D = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n\n @media (max-width: ", ") {\n display: block;\n }\n\n .icon-header__left {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n\n @media (max-width: ", ") {\n align-self: flex-start;\n }\n\n svg {\n height: 1.5em;\n width: 1.5em;\n margin-right: ", ";\n }\n }\n\n .icon-header__right {\n display: flex;\n flex-grow: 1;\n justify-content: flex-end;\n }\n"])), media.sm, media.sm, function (props) {
|
|
10023
|
+
var StyledHeader = styled__default.h5(_templateObject$D || (_templateObject$D = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n\n @media (max-width: ", ") {\n display: block;\n }\n\n .icon-header__left {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n\n @media (max-width: ", ") {\n align-self: flex-start;\n }\n\n svg {\n height: 1.5em;\n width: 1.5em;\n margin-right: ", ";\n }\n }\n\n .icon-header__right {\n display: flex;\n flex-grow: 1;\n justify-content: flex-end;\n\n @media (max-width: ", ") {\n justify-content: flex-start;\n }\n }\n"])), media.sm, media.sm, function (props) {
|
|
10024
10024
|
return props.theme.marginPaddings[1];
|
|
10025
|
-
});
|
|
10025
|
+
}, media.sm);
|
|
10026
10026
|
|
|
10027
10027
|
/**
|
|
10028
10028
|
* IconHeader can render the standard Luxity Page/Section Header nodes with SVG
|
|
@@ -10067,7 +10067,7 @@
|
|
|
10067
10067
|
});
|
|
10068
10068
|
|
|
10069
10069
|
var _templateObject$E;
|
|
10070
|
-
var NotifyContainer = styled__default.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteral(["\n .page-ready {\n display: flex;\n align-items: center;\n }\n\n .notification-settings {\n display: flex;\n align-items: center;\n\n @media (max-width:
|
|
10070
|
+
var NotifyContainer = styled__default.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteral(["\n .page-ready {\n display: flex;\n align-items: center;\n }\n\n .notification-settings {\n display: flex;\n align-items: center;\n\n @media (max-width: ", ") {\n flex-direction: column;\n align-items: flex-end;\n padding: 10px 0;\n }\n }\n\n .notification-row-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (min-width: ", ") {\n justify-content: center;\n width: auto;\n }\n }\n\n .notification-dropdown-label {\n margin-left: 20px;\n\n @media (max-width: ", ") {\n margin-left: 0;\n }\n }\n\n .loader {\n min-width: 150px;\n }\n\n .notification-dropdown-select-container {\n min-width: 110px;\n\n .notification-dropdown-select__control {\n min-height: auto;\n background-color: ", ";\n border: none;\n border-radius: 0;\n\n &--is-focused {\n border: none;\n border-radius: 0;\n box-shadow: none;\n }\n\n .notification-dropdown-select__value-container {\n & > div {\n padding: 0;\n margin: 0;\n color: ", ";\n }\n & .notification-dropdown-select__single-value,\n & .notification-dropdown-select__placeholder {\n overflow: visible;\n font-weight: lighter;\n }\n }\n }\n }\n\n .notification-dropdown-select__indicators {\n padding: 0 !important;\n .notification-dropdown-select__dropdown-indicator {\n color: ", ";\n }\n }\n\n .notification-dropdown-select__menu {\n border-radius: 0;\n\n & > .notification-dropdown-select__menu-list {\n border-radius: 0;\n\n & > .notification-dropdown-select__option {\n font-weight: bold;\n &:last-child {\n border-bottom: none;\n }\n\n &.notification-dropdown-select__option--is-focused {\n background-color: ", ";\n border-style: hidden;\n }\n &.notification-dropdown-select__option--is-selected {\n color: ", ";\n background-color: ", ";\n border-style: hidden;\n }\n &.notification-dropdown-select__option--is-selected.notification-dropdown-select__option--is-focused {\n border-style: hidden;\n }\n }\n }\n }\n"])), media.sm, media.lg, media.sm, function (props) {
|
|
10071
10071
|
return props.theme.colors.ntrlMin;
|
|
10072
10072
|
}, function (props) {
|
|
10073
10073
|
return props.theme.colors.base;
|
|
@@ -10181,7 +10181,7 @@
|
|
|
10181
10181
|
}, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10182
10182
|
className: "notification-settings"
|
|
10183
10183
|
}, isVip && /*#__PURE__*/React__default.createElement("div", {
|
|
10184
|
-
className: "
|
|
10184
|
+
className: "notification-row-wrapper"
|
|
10185
10185
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10186
10186
|
className: "notification-dropdown-label"
|
|
10187
10187
|
}, "Notify me via WhatsApp:\xA0"), updating ? /*#__PURE__*/React__default.createElement(EllipsisLoader, null) : /*#__PURE__*/React__default.createElement(index$1$1, {
|
|
@@ -10200,7 +10200,7 @@
|
|
|
10200
10200
|
},
|
|
10201
10201
|
value: whatsappSelectedOption
|
|
10202
10202
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10203
|
-
className: "
|
|
10203
|
+
className: "notification-row-wrapper"
|
|
10204
10204
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10205
10205
|
className: "notification-dropdown-label"
|
|
10206
10206
|
}, "Notify me via Email:\xA0"), updating ? /*#__PURE__*/React__default.createElement(EllipsisLoader, null) : /*#__PURE__*/React__default.createElement(index$1$1, {
|
|
@@ -11443,6 +11443,127 @@
|
|
|
11443
11443
|
}));
|
|
11444
11444
|
});
|
|
11445
11445
|
|
|
11446
|
+
function getToken() {
|
|
11447
|
+
var _Cookies$get;
|
|
11448
|
+
|
|
11449
|
+
return (_Cookies$get = Cookies.get('_tk')) === null || _Cookies$get === void 0 ? void 0 : _Cookies$get.replace('*', 'Bearer ');
|
|
11450
|
+
}
|
|
11451
|
+
function setToken(value) {
|
|
11452
|
+
Cookies.set('_tk', value, 30);
|
|
11453
|
+
}
|
|
11454
|
+
|
|
11455
|
+
/** @format */
|
|
11456
|
+
|
|
11457
|
+
function getEncodedSearch(currentUrl) {
|
|
11458
|
+
var splitUrl = currentUrl.split('?');
|
|
11459
|
+
var baseUrl = splitUrl[0];
|
|
11460
|
+
var nextUrlSegments = splitUrl[1].split('&');
|
|
11461
|
+
var nextQueryString = splitUrl[1];
|
|
11462
|
+
|
|
11463
|
+
if (nextUrlSegments.length > 0) {
|
|
11464
|
+
nextQueryString = nextUrlSegments.map(function (v) {
|
|
11465
|
+
var nextValue = v;
|
|
11466
|
+
|
|
11467
|
+
if (v.includes('search=')) {
|
|
11468
|
+
var temp = v.split('=');
|
|
11469
|
+
nextValue = "".concat(temp[0], "=").concat(encodeURIComponent(temp[1]));
|
|
11470
|
+
}
|
|
11471
|
+
|
|
11472
|
+
return nextValue;
|
|
11473
|
+
}).join('&');
|
|
11474
|
+
}
|
|
11475
|
+
|
|
11476
|
+
return "".concat(baseUrl, "?").concat(nextQueryString);
|
|
11477
|
+
}
|
|
11478
|
+
/**
|
|
11479
|
+
* Gets an instance of Axios that is configured with the custom failure handlers
|
|
11480
|
+
* @param {Function} onAuthFailed - callback triggers when auth fails - ie, server error is one of ['token_invalid', 'token_not_provided', 'user_not_found', 'token_expired'] or http status is one of [401, 503, 400]
|
|
11481
|
+
* @param {Function} onForbidden - callback triggers when http status = 403
|
|
11482
|
+
*/
|
|
11483
|
+
|
|
11484
|
+
|
|
11485
|
+
var axiosInstance = function axiosInstance(onAuthFailed, onForbidden) {
|
|
11486
|
+
var instance = axios.create({
|
|
11487
|
+
validateStatus: function validateStatus(status) {
|
|
11488
|
+
return status >= 200 && status < 300;
|
|
11489
|
+
}
|
|
11490
|
+
});
|
|
11491
|
+
var token = getToken();
|
|
11492
|
+
|
|
11493
|
+
if (token !== '') {
|
|
11494
|
+
instance.defaults.headers.common.Authorization = token;
|
|
11495
|
+
}
|
|
11496
|
+
|
|
11497
|
+
instance.defaults.headers.common['Content-Type'] = 'application/json;charset=UTF-8'; // Add a request interceptor
|
|
11498
|
+
|
|
11499
|
+
instance.interceptors.request.use(function (request, error) {
|
|
11500
|
+
if (error) {
|
|
11501
|
+
return Promise.reject(error.response);
|
|
11502
|
+
}
|
|
11503
|
+
|
|
11504
|
+
if (request.url.includes('search') && request.url.includes('?')) {
|
|
11505
|
+
// do some uri manipulation for ie
|
|
11506
|
+
// https://stackoverflow.com/questions/18220057
|
|
11507
|
+
// eslint-disable-next-line no-param-reassign
|
|
11508
|
+
request.url = getEncodedSearch(request.url);
|
|
11509
|
+
} // eslint-disable-next-line no-param-reassign
|
|
11510
|
+
|
|
11511
|
+
|
|
11512
|
+
request.headers.common['Content-Type'] = 'application/json; charset=utf-8';
|
|
11513
|
+
|
|
11514
|
+
if (typeof request.body === 'undefined') {
|
|
11515
|
+
request.body = {};
|
|
11516
|
+
}
|
|
11517
|
+
|
|
11518
|
+
token = getToken();
|
|
11519
|
+
|
|
11520
|
+
if (token !== '') {
|
|
11521
|
+
// eslint-disable-next-line no-param-reassign
|
|
11522
|
+
request.headers.common.Authorization = token;
|
|
11523
|
+
}
|
|
11524
|
+
|
|
11525
|
+
return request;
|
|
11526
|
+
}, function (error) {
|
|
11527
|
+
return Promise.reject(error.message);
|
|
11528
|
+
}); // Add a response interceptor
|
|
11529
|
+
|
|
11530
|
+
instance.interceptors.response.use(function (response, error) {
|
|
11531
|
+
if (error) {
|
|
11532
|
+
return Promise.reject(error.response);
|
|
11533
|
+
}
|
|
11534
|
+
|
|
11535
|
+
if (response.headers.authorization) {
|
|
11536
|
+
setToken(response.headers.authorization);
|
|
11537
|
+
}
|
|
11538
|
+
|
|
11539
|
+
return response;
|
|
11540
|
+
}, function (error) {
|
|
11541
|
+
if (error.response) {
|
|
11542
|
+
// network error
|
|
11543
|
+
if (error.response.data && error.response.data.error && (error.response.data.error === 'token_invalid' || error.response.data.error === 'token_not_provided' || error.response.data.error === 'user_not_found' || error.response.data.error === 'token_expired') || error.response.status === 401 || error.response.status === 503 || error.response.status === 400) {
|
|
11544
|
+
onAuthFailed();
|
|
11545
|
+
} // if (error.response.status === 500) {
|
|
11546
|
+
// // INTERNAL SERVER ERROR
|
|
11547
|
+
// store.dispatch({
|
|
11548
|
+
// type: AppConstants.OVERLAY.SERVER_ERROR,
|
|
11549
|
+
// });
|
|
11550
|
+
// return Promise.reject(error.response);
|
|
11551
|
+
// }
|
|
11552
|
+
|
|
11553
|
+
|
|
11554
|
+
if (error.response.status === 403) {
|
|
11555
|
+
// FORBIDDEN
|
|
11556
|
+
onForbidden();
|
|
11557
|
+
}
|
|
11558
|
+
|
|
11559
|
+
return Promise.reject(error.response);
|
|
11560
|
+
}
|
|
11561
|
+
|
|
11562
|
+
return Promise.reject(error);
|
|
11563
|
+
});
|
|
11564
|
+
return instance;
|
|
11565
|
+
}; // NOTE: this to be instanciated with params: onAuthFailed, onForbidden
|
|
11566
|
+
|
|
11446
11567
|
var _excluded$8 = ["children"];
|
|
11447
11568
|
|
|
11448
11569
|
var DropdownSelector = function DropdownSelector(_ref) {
|
|
@@ -15441,13 +15562,13 @@
|
|
|
15441
15562
|
setError = _useForm.setError;
|
|
15442
15563
|
|
|
15443
15564
|
var renderLinks = function renderLinks(links, title) {
|
|
15444
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
15565
|
+
return !!links.length && /*#__PURE__*/React__default.createElement("div", {
|
|
15445
15566
|
className: "footer__link-container"
|
|
15446
15567
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15447
15568
|
className: "footer__link-title"
|
|
15448
15569
|
}, title), /*#__PURE__*/React__default.createElement("div", {
|
|
15449
15570
|
className: "footer__links"
|
|
15450
|
-
},
|
|
15571
|
+
}, links.map(function (link) {
|
|
15451
15572
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15452
15573
|
className: "footer__link-wrapper",
|
|
15453
15574
|
key: link.label
|
|
@@ -15630,13 +15751,13 @@
|
|
|
15630
15751
|
}), /*#__PURE__*/React__default.createElement(AccordionSection, {
|
|
15631
15752
|
title: "POPULAR",
|
|
15632
15753
|
links: popularLinks
|
|
15633
|
-
}), /*#__PURE__*/React__default.createElement(AccordionSection, {
|
|
15754
|
+
}), !!sellLinks.length && /*#__PURE__*/React__default.createElement(AccordionSection, {
|
|
15634
15755
|
title: "SELL",
|
|
15635
15756
|
links: sellLinks
|
|
15636
15757
|
}), /*#__PURE__*/React__default.createElement(AccordionSection, {
|
|
15637
15758
|
title: "COMPANY",
|
|
15638
15759
|
links: companyLinks
|
|
15639
|
-
}), /*#__PURE__*/React__default.createElement(AccordionSection, {
|
|
15760
|
+
}), !!storeLinks.length && /*#__PURE__*/React__default.createElement(AccordionSection, {
|
|
15640
15761
|
title: "CONNECT",
|
|
15641
15762
|
links: storeLinks
|
|
15642
15763
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -15945,37 +16066,6 @@
|
|
|
15945
16066
|
}, contactNumber)));
|
|
15946
16067
|
};
|
|
15947
16068
|
|
|
15948
|
-
var categories$1 = {
|
|
15949
|
-
shoes: {
|
|
15950
|
-
name: 'Shoes',
|
|
15951
|
-
slug: 'shoes'
|
|
15952
|
-
},
|
|
15953
|
-
bags: {
|
|
15954
|
-
name: 'Bags',
|
|
15955
|
-
slug: 'bags'
|
|
15956
|
-
},
|
|
15957
|
-
clothing: {
|
|
15958
|
-
name: 'Clothing',
|
|
15959
|
-
slug: 'apparel'
|
|
15960
|
-
},
|
|
15961
|
-
watches: {
|
|
15962
|
-
name: 'Watches',
|
|
15963
|
-
slug: 'watches'
|
|
15964
|
-
},
|
|
15965
|
-
accessories: {
|
|
15966
|
-
name: 'Accessories',
|
|
15967
|
-
slug: 'accessories'
|
|
15968
|
-
}
|
|
15969
|
-
};
|
|
15970
|
-
|
|
15971
|
-
var removeCategoryByName = function removeCategoryByName(categories, name) {
|
|
15972
|
-
var _categories$filter;
|
|
15973
|
-
|
|
15974
|
-
return (_categories$filter = categories === null || categories === void 0 ? void 0 : categories.filter(function (category) {
|
|
15975
|
-
return category.name !== name;
|
|
15976
|
-
})) !== null && _categories$filter !== void 0 ? _categories$filter : [];
|
|
15977
|
-
};
|
|
15978
|
-
|
|
15979
16069
|
var SearchResults = function SearchResults(_ref) {
|
|
15980
16070
|
var searchValue = _ref.searchValue,
|
|
15981
16071
|
searchResults = _ref.searchResults,
|
|
@@ -16029,6 +16119,14 @@
|
|
|
16029
16119
|
return null;
|
|
16030
16120
|
};
|
|
16031
16121
|
|
|
16122
|
+
var removeCategoryByName = function removeCategoryByName(categories, name) {
|
|
16123
|
+
var _categories$filter;
|
|
16124
|
+
|
|
16125
|
+
return (_categories$filter = categories === null || categories === void 0 ? void 0 : categories.filter(function (category) {
|
|
16126
|
+
return category.name.toLowerCase() !== name.toLowerCase();
|
|
16127
|
+
})) !== null && _categories$filter !== void 0 ? _categories$filter : [];
|
|
16128
|
+
};
|
|
16129
|
+
|
|
16032
16130
|
var LuxityDesktopHeader = function LuxityDesktopHeader(_ref) {
|
|
16033
16131
|
var accountIcon = _ref.accountIcon,
|
|
16034
16132
|
cartIcon = _ref.cartIcon,
|
|
@@ -16036,12 +16134,6 @@
|
|
|
16036
16134
|
cartCount = _ref.cartCount,
|
|
16037
16135
|
logoSrc = _ref.logoSrc,
|
|
16038
16136
|
categoryElements = _ref.categoryElements,
|
|
16039
|
-
newBrandsImage = _ref.newBrandsImage,
|
|
16040
|
-
bagsImage = _ref.bagsImage,
|
|
16041
|
-
shoesImage = _ref.shoesImage,
|
|
16042
|
-
clothingImage = _ref.clothingImage,
|
|
16043
|
-
accessoriesImage = _ref.accessoriesImage,
|
|
16044
|
-
watchesImage = _ref.watchesImage,
|
|
16045
16137
|
stores = _ref.stores,
|
|
16046
16138
|
contactNumber = _ref.contactNumber,
|
|
16047
16139
|
productsUrl = _ref.productsUrl,
|
|
@@ -16056,7 +16148,6 @@
|
|
|
16056
16148
|
ourStoryLink = _ref.ourStoryLink,
|
|
16057
16149
|
onLogoClick = _ref.onLogoClick,
|
|
16058
16150
|
endpoint = _ref.endpoint,
|
|
16059
|
-
menuData = _ref.menuData,
|
|
16060
16151
|
onSearchSubmit = _ref.onSearchSubmit,
|
|
16061
16152
|
onProductIdsReceived = _ref.onProductIdsReceived,
|
|
16062
16153
|
currency = _ref.currency,
|
|
@@ -16068,7 +16159,8 @@
|
|
|
16068
16159
|
name = _ref.name,
|
|
16069
16160
|
isVip = _ref.isVip,
|
|
16070
16161
|
shop = _ref.shop,
|
|
16071
|
-
app = _ref.app
|
|
16162
|
+
app = _ref.app,
|
|
16163
|
+
categoryConfig = _ref.categoryConfig;
|
|
16072
16164
|
|
|
16073
16165
|
var _useState = React.useState(''),
|
|
16074
16166
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -16080,16 +16172,7 @@
|
|
|
16080
16172
|
loading = _useState4[0],
|
|
16081
16173
|
setLoading = _useState4[1];
|
|
16082
16174
|
|
|
16083
|
-
var _useState5 = React.useState({
|
|
16084
|
-
latestArrivals: [],
|
|
16085
|
-
bags: [],
|
|
16086
|
-
shoes: [],
|
|
16087
|
-
clothing: [],
|
|
16088
|
-
accessories: [],
|
|
16089
|
-
watches: [],
|
|
16090
|
-
accessoriesCategories: [],
|
|
16091
|
-
apparelStyles: []
|
|
16092
|
-
}),
|
|
16175
|
+
var _useState5 = React.useState({}),
|
|
16093
16176
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
16094
16177
|
dropdownData = _useState6[0],
|
|
16095
16178
|
setDropdownData = _useState6[1];
|
|
@@ -16190,35 +16273,60 @@
|
|
|
16190
16273
|
}
|
|
16191
16274
|
};
|
|
16192
16275
|
|
|
16193
|
-
function
|
|
16276
|
+
React.useMemo(function () {
|
|
16277
|
+
setLoading(true);
|
|
16278
|
+
axios.get("".concat(categoryConfig.menuData)).then(function (_ref2) {
|
|
16279
|
+
var data = _ref2.data;
|
|
16280
|
+
setLoading(false);
|
|
16281
|
+
setDropdownData(data);
|
|
16282
|
+
}).catch(function () {
|
|
16283
|
+
return setHasError(true);
|
|
16284
|
+
});
|
|
16285
|
+
}, [categoryConfig.menuData]);
|
|
16286
|
+
|
|
16287
|
+
var addCategoryToElements = function addCategoryToElements(elements, categoryName) {
|
|
16194
16288
|
return elements.map(function (element) {
|
|
16195
16289
|
return _objectSpread2(_objectSpread2({}, element), {}, {
|
|
16196
16290
|
category: categoryName
|
|
16197
16291
|
});
|
|
16198
16292
|
});
|
|
16199
|
-
}
|
|
16293
|
+
};
|
|
16200
16294
|
|
|
16201
|
-
|
|
16202
|
-
|
|
16203
|
-
|
|
16204
|
-
|
|
16205
|
-
|
|
16206
|
-
|
|
16207
|
-
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16295
|
+
var renderDropdownLinks = function renderDropdownLinks() {
|
|
16296
|
+
return categoryConfig.categories.map(function (category) {
|
|
16297
|
+
var title = category.title,
|
|
16298
|
+
imageSrc = category.imageSrc,
|
|
16299
|
+
categorySlug = category.categorySlug,
|
|
16300
|
+
categoryName = category.categoryName,
|
|
16301
|
+
elementsKey = category.elementsKey,
|
|
16302
|
+
subCategoryElementsKey = category.subCategoryElementsKey,
|
|
16303
|
+
styleElementsKey = category.styleElementsKey;
|
|
16304
|
+
var categoryElementsProcessed = categoryElements;
|
|
16305
|
+
|
|
16306
|
+
if (subCategoryElementsKey && dropdownData[subCategoryElementsKey]) {
|
|
16307
|
+
// show subcategory elements
|
|
16308
|
+
categoryElementsProcessed = removeCategoryByName(dropdownData[subCategoryElementsKey], categoryName);
|
|
16309
|
+
} else if (styleElementsKey && dropdownData[styleElementsKey]) {
|
|
16310
|
+
categoryElementsProcessed = addCategoryToElements(dropdownData[styleElementsKey], categorySlug);
|
|
16311
|
+
} else {
|
|
16312
|
+
categoryElementsProcessed = addCategoryToElements(categoryElementsProcessed, categorySlug);
|
|
16313
|
+
}
|
|
16314
|
+
|
|
16315
|
+
return /*#__PURE__*/React__default.createElement(DropdownLink$1, {
|
|
16316
|
+
key: categorySlug,
|
|
16317
|
+
title: title,
|
|
16318
|
+
imageSrc: imageSrc,
|
|
16319
|
+
categoryElements: categoryElementsProcessed,
|
|
16320
|
+
brandElements: dropdownData[elementsKey] || [],
|
|
16321
|
+
productsUrl: productsUrl,
|
|
16322
|
+
categorySlug: categorySlug,
|
|
16323
|
+
categoryTitle: categoryName,
|
|
16324
|
+
isLoading: loading,
|
|
16325
|
+
hasError: hasError,
|
|
16326
|
+
LinkComponent: LinkComponent
|
|
16217
16327
|
});
|
|
16218
|
-
}).catch(function () {
|
|
16219
|
-
return setHasError(true);
|
|
16220
16328
|
});
|
|
16221
|
-
}
|
|
16329
|
+
};
|
|
16222
16330
|
|
|
16223
16331
|
var getMarginRight = function getMarginRight(userIsVip, userName) {
|
|
16224
16332
|
if (userIsVip) return '15px';
|
|
@@ -16275,74 +16383,9 @@
|
|
|
16275
16383
|
setSearchValue: setSearchValue
|
|
16276
16384
|
}), /*#__PURE__*/React__default.createElement("nav", {
|
|
16277
16385
|
className: "navbar__nav-links navbar__nav-links--wrap"
|
|
16278
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
16279
|
-
|
|
16280
|
-
|
|
16281
|
-
categoryElements: categoryElements,
|
|
16282
|
-
brandElements: dropdownData.latestArrivals,
|
|
16283
|
-
productsUrl: productsUrl,
|
|
16284
|
-
categorySlug: "brands",
|
|
16285
|
-
categoryTitle: "Brands",
|
|
16286
|
-
isLoading: loading,
|
|
16287
|
-
hasError: hasError,
|
|
16288
|
-
LinkComponent: LinkComponent
|
|
16289
|
-
}), /*#__PURE__*/React__default.createElement(DropdownLink$1, {
|
|
16290
|
-
title: "Bags",
|
|
16291
|
-
imageSrc: bagsImage,
|
|
16292
|
-
categoryElements: addCategoryToElements(categoryElements, categories$1.bags.slug),
|
|
16293
|
-
brandElements: dropdownData.bags,
|
|
16294
|
-
productsUrl: productsUrl,
|
|
16295
|
-
categorySlug: categories$1.bags.slug,
|
|
16296
|
-
categoryTitle: categories$1.bags.name,
|
|
16297
|
-
isLoading: loading,
|
|
16298
|
-
hasError: hasError,
|
|
16299
|
-
LinkComponent: LinkComponent
|
|
16300
|
-
}), /*#__PURE__*/React__default.createElement(DropdownLink$1, {
|
|
16301
|
-
title: "Shoes",
|
|
16302
|
-
imageSrc: shoesImage,
|
|
16303
|
-
categoryElements: addCategoryToElements(categoryElements, categories$1.shoes.slug),
|
|
16304
|
-
brandElements: dropdownData.shoes,
|
|
16305
|
-
productsUrl: productsUrl,
|
|
16306
|
-
categorySlug: categories$1.shoes.slug,
|
|
16307
|
-
categoryTitle: categories$1.shoes.name,
|
|
16308
|
-
isLoading: loading,
|
|
16309
|
-
hasError: hasError,
|
|
16310
|
-
LinkComponent: LinkComponent
|
|
16311
|
-
}), /*#__PURE__*/React__default.createElement(DropdownLink$1, {
|
|
16312
|
-
title: "Clothing",
|
|
16313
|
-
imageSrc: clothingImage,
|
|
16314
|
-
categoryElements: addCategoryToElements(dropdownData.apparelStyles, categories$1.clothing.slug),
|
|
16315
|
-
brandElements: dropdownData.apparel,
|
|
16316
|
-
productsUrl: productsUrl,
|
|
16317
|
-
categorySlug: categories$1.clothing.slug,
|
|
16318
|
-
categoryTitle: categories$1.clothing.name,
|
|
16319
|
-
isLoading: loading,
|
|
16320
|
-
hasError: hasError,
|
|
16321
|
-
LinkComponent: LinkComponent
|
|
16322
|
-
}), /*#__PURE__*/React__default.createElement(DropdownLink$1, {
|
|
16323
|
-
title: "Accessories",
|
|
16324
|
-
imageSrc: accessoriesImage,
|
|
16325
|
-
categoryElements: removeCategoryByName(dropdownData.accessoriesCategories, 'ACCESSORIES'),
|
|
16326
|
-
brandElements: dropdownData.accessories,
|
|
16327
|
-
productsUrl: productsUrl,
|
|
16328
|
-
categorySlug: categories$1.accessories.slug,
|
|
16329
|
-
categoryTitle: categories$1.accessories.name,
|
|
16330
|
-
isLoading: loading,
|
|
16331
|
-
hasError: hasError,
|
|
16332
|
-
LinkComponent: LinkComponent
|
|
16333
|
-
}), /*#__PURE__*/React__default.createElement(DropdownLink$1, {
|
|
16334
|
-
title: "Watches",
|
|
16335
|
-
imageSrc: watchesImage,
|
|
16336
|
-
categoryElements: addCategoryToElements(categoryElements, categories$1.watches.slug),
|
|
16337
|
-
brandElements: dropdownData.watches,
|
|
16338
|
-
productsUrl: productsUrl,
|
|
16339
|
-
categorySlug: categories$1.watches.slug,
|
|
16340
|
-
categoryTitle: categories$1.watches.name,
|
|
16341
|
-
isLoading: loading,
|
|
16342
|
-
hasError: hasError,
|
|
16343
|
-
LinkComponent: LinkComponent
|
|
16344
|
-
}), /*#__PURE__*/React__default.createElement("li", {
|
|
16345
|
-
className: "navbar__link"
|
|
16386
|
+
}, renderDropdownLinks(), !!stores.length && /*#__PURE__*/React__default.createElement("li", {
|
|
16387
|
+
className: "navbar__link",
|
|
16388
|
+
key: "Stores"
|
|
16346
16389
|
}, /*#__PURE__*/React__default.createElement(LinkComponent, {
|
|
16347
16390
|
href: contactUsLink,
|
|
16348
16391
|
className: "navbar__link-item navbar__link-item--desktop"
|
|
@@ -16554,7 +16597,8 @@
|
|
|
16554
16597
|
onCartClick = _ref.onCartClick,
|
|
16555
16598
|
onContactUsClick = _ref.onContactUsClick,
|
|
16556
16599
|
onOurStoryClick = _ref.onOurStoryClick,
|
|
16557
|
-
onBlogClick = _ref.onBlogClick,
|
|
16600
|
+
_ref$onBlogClick = _ref.onBlogClick,
|
|
16601
|
+
onBlogClick = _ref$onBlogClick === void 0 ? undefined : _ref$onBlogClick,
|
|
16558
16602
|
onSellToUsClick = _ref.onSellToUsClick,
|
|
16559
16603
|
stores = _ref.stores,
|
|
16560
16604
|
categoryElements = _ref.categoryElements,
|
|
@@ -16566,7 +16610,8 @@
|
|
|
16566
16610
|
onCurrencyChange = _ref.onCurrencyChange,
|
|
16567
16611
|
isCurrencySelectionDisabled = _ref.isCurrencySelectionDisabled,
|
|
16568
16612
|
tooltipContent = _ref.tooltipContent,
|
|
16569
|
-
LinkComponent = _ref.LinkComponent
|
|
16613
|
+
LinkComponent = _ref.LinkComponent,
|
|
16614
|
+
categoryConfig = _ref.categoryConfig;
|
|
16570
16615
|
|
|
16571
16616
|
var _useState = React.useState(false),
|
|
16572
16617
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -16583,16 +16628,7 @@
|
|
|
16583
16628
|
loading = _useState6[0],
|
|
16584
16629
|
setLoading = _useState6[1];
|
|
16585
16630
|
|
|
16586
|
-
var _useState7 = React.useState({
|
|
16587
|
-
latestArrivals: [],
|
|
16588
|
-
bags: [],
|
|
16589
|
-
shoes: [],
|
|
16590
|
-
apparel: [],
|
|
16591
|
-
accessories: [],
|
|
16592
|
-
watches: [],
|
|
16593
|
-
accessoriesCategories: [],
|
|
16594
|
-
apparelStyles: []
|
|
16595
|
-
}),
|
|
16631
|
+
var _useState7 = React.useState({}),
|
|
16596
16632
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
16597
16633
|
dropdownData = _useState8[0],
|
|
16598
16634
|
setDropdownData = _useState8[1];
|
|
@@ -16642,22 +16678,88 @@
|
|
|
16642
16678
|
axios.get("".concat(menuData)).then(function (_ref2) {
|
|
16643
16679
|
var data = _ref2.data;
|
|
16644
16680
|
setLoading(false);
|
|
16645
|
-
setDropdownData(
|
|
16646
|
-
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
16647
|
-
latestArrivals: data.latest_arrivals,
|
|
16648
|
-
bags: data.bags,
|
|
16649
|
-
shoes: data.shoes,
|
|
16650
|
-
apparel: data.apparel,
|
|
16651
|
-
accessories: data.accessories,
|
|
16652
|
-
watches: data.watches,
|
|
16653
|
-
accessoriesCategories: data.accessories_categories,
|
|
16654
|
-
apparelStyles: data.apparel_styles
|
|
16655
|
-
});
|
|
16656
|
-
});
|
|
16681
|
+
setDropdownData(data);
|
|
16657
16682
|
}).catch(function () {
|
|
16658
16683
|
return setHasError(true);
|
|
16659
16684
|
});
|
|
16660
16685
|
}, [menuData]);
|
|
16686
|
+
|
|
16687
|
+
var renderMenuItems = function renderMenuItems() {
|
|
16688
|
+
return categoryConfig.categories.map(function (category) {
|
|
16689
|
+
var title = category.title,
|
|
16690
|
+
categorySlug = category.categorySlug;
|
|
16691
|
+
var slug = categorySlug;
|
|
16692
|
+
|
|
16693
|
+
if (categorySlug === 'brands') {
|
|
16694
|
+
slug = 'new';
|
|
16695
|
+
}
|
|
16696
|
+
|
|
16697
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
16698
|
+
className: "side-nav__menu-item"
|
|
16699
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
16700
|
+
type: "button",
|
|
16701
|
+
className: "side-nav__menu-title-wrapper",
|
|
16702
|
+
onClick: function onClick() {
|
|
16703
|
+
return onSubMenuClick(slug);
|
|
16704
|
+
}
|
|
16705
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
16706
|
+
className: "side-nav__menu-title"
|
|
16707
|
+
}, title), /*#__PURE__*/React__default.createElement("img", {
|
|
16708
|
+
src: accordionIcon,
|
|
16709
|
+
alt: "accordion-icon",
|
|
16710
|
+
className: "side-nav__accordion-icon"
|
|
16711
|
+
})));
|
|
16712
|
+
});
|
|
16713
|
+
};
|
|
16714
|
+
|
|
16715
|
+
var renderDropdownLinks = function renderDropdownLinks() {
|
|
16716
|
+
return categoryConfig.categories.map(function (category) {
|
|
16717
|
+
var categorySlug = category.categorySlug,
|
|
16718
|
+
categoryName = category.categoryName,
|
|
16719
|
+
elementsKey = category.elementsKey,
|
|
16720
|
+
subCategoryElementsKey = category.subCategoryElementsKey,
|
|
16721
|
+
styleElementsKey = category.styleElementsKey;
|
|
16722
|
+
var categoryElementsProcessed = categoryElements;
|
|
16723
|
+
|
|
16724
|
+
if (subCategoryElementsKey && dropdownData[subCategoryElementsKey]) {
|
|
16725
|
+
// show subcategory elements
|
|
16726
|
+
categoryElementsProcessed = removeCategoryByName(dropdownData[subCategoryElementsKey], categoryName);
|
|
16727
|
+
} else if (styleElementsKey && dropdownData[styleElementsKey]) {
|
|
16728
|
+
categoryElementsProcessed = addCategoryToElements(dropdownData[styleElementsKey], categorySlug);
|
|
16729
|
+
} else {
|
|
16730
|
+
categoryElementsProcessed = addCategoryToElements(categoryElementsProcessed, categorySlug);
|
|
16731
|
+
}
|
|
16732
|
+
|
|
16733
|
+
var subMenuTitle = 'Brands';
|
|
16734
|
+
|
|
16735
|
+
if (categorySlug !== 'brands') {
|
|
16736
|
+
subMenuTitle = "".concat(categoryName, " Brands");
|
|
16737
|
+
}
|
|
16738
|
+
|
|
16739
|
+
var subMenu = categorySlug;
|
|
16740
|
+
|
|
16741
|
+
if (subMenu === 'brands') {
|
|
16742
|
+
subMenu = 'new';
|
|
16743
|
+
}
|
|
16744
|
+
|
|
16745
|
+
return /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
16746
|
+
subMenuOpen: subMenuOpen && displayedSubMenu === subMenu,
|
|
16747
|
+
onBackClick: onBackClick,
|
|
16748
|
+
backIcon: backIcon,
|
|
16749
|
+
subMenuCategoryTitle: "Department",
|
|
16750
|
+
productUrl: productUrl,
|
|
16751
|
+
categoryElements: categoryElementsProcessed,
|
|
16752
|
+
subMenuBrandsTitle: subMenuTitle,
|
|
16753
|
+
brandsList: dropdownData[elementsKey],
|
|
16754
|
+
categorySlug: displayedSubMenu,
|
|
16755
|
+
isLoading: loading,
|
|
16756
|
+
hasError: hasError,
|
|
16757
|
+
onCloseSideNav: onCloseSideNav,
|
|
16758
|
+
LinkComponent: LinkComponent
|
|
16759
|
+
});
|
|
16760
|
+
});
|
|
16761
|
+
};
|
|
16762
|
+
|
|
16661
16763
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
16662
16764
|
className: "side-nav"
|
|
16663
16765
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -16678,91 +16780,7 @@
|
|
|
16678
16780
|
className: "side-nav__close-icon"
|
|
16679
16781
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
16680
16782
|
className: "side-nav__menu-items-wrapper"
|
|
16681
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
16682
|
-
className: "side-nav__menu-item"
|
|
16683
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
16684
|
-
type: "button",
|
|
16685
|
-
className: "side-nav__menu-title-wrapper",
|
|
16686
|
-
onClick: function onClick() {
|
|
16687
|
-
return onSubMenuClick('new');
|
|
16688
|
-
}
|
|
16689
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
16690
|
-
className: "side-nav__menu-title"
|
|
16691
|
-
}, "New"), /*#__PURE__*/React__default.createElement("img", {
|
|
16692
|
-
src: accordionIcon,
|
|
16693
|
-
alt: "accordion-icon",
|
|
16694
|
-
className: "side-nav__accordion-icon"
|
|
16695
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
16696
|
-
className: "side-nav__menu-item"
|
|
16697
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
16698
|
-
type: "button",
|
|
16699
|
-
className: "side-nav__menu-title-wrapper",
|
|
16700
|
-
onClick: function onClick() {
|
|
16701
|
-
return onSubMenuClick('bags');
|
|
16702
|
-
}
|
|
16703
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
16704
|
-
className: "side-nav__menu-title"
|
|
16705
|
-
}, "Bags"), /*#__PURE__*/React__default.createElement("img", {
|
|
16706
|
-
src: accordionIcon,
|
|
16707
|
-
alt: "accordion-icon",
|
|
16708
|
-
className: "side-nav__accordion-icon"
|
|
16709
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
16710
|
-
className: "side-nav__menu-item"
|
|
16711
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
16712
|
-
type: "button",
|
|
16713
|
-
className: "side-nav__menu-title-wrapper",
|
|
16714
|
-
onClick: function onClick() {
|
|
16715
|
-
return onSubMenuClick('shoes');
|
|
16716
|
-
}
|
|
16717
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
16718
|
-
className: "side-nav__menu-title"
|
|
16719
|
-
}, "Shoes"), /*#__PURE__*/React__default.createElement("img", {
|
|
16720
|
-
src: accordionIcon,
|
|
16721
|
-
alt: "accordion-icon",
|
|
16722
|
-
className: "side-nav__accordion-icon"
|
|
16723
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
16724
|
-
className: "side-nav__menu-item"
|
|
16725
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
16726
|
-
type: "button",
|
|
16727
|
-
className: "side-nav__menu-title-wrapper",
|
|
16728
|
-
onClick: function onClick() {
|
|
16729
|
-
return onSubMenuClick('apparel');
|
|
16730
|
-
}
|
|
16731
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
16732
|
-
className: "side-nav__menu-title"
|
|
16733
|
-
}, "Clothing"), /*#__PURE__*/React__default.createElement("img", {
|
|
16734
|
-
src: accordionIcon,
|
|
16735
|
-
alt: "accordion-icon",
|
|
16736
|
-
className: "side-nav__accordion-icon"
|
|
16737
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
16738
|
-
className: "side-nav__menu-item"
|
|
16739
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
16740
|
-
type: "button",
|
|
16741
|
-
className: "side-nav__menu-title-wrapper",
|
|
16742
|
-
onClick: function onClick() {
|
|
16743
|
-
return onSubMenuClick('accessories');
|
|
16744
|
-
}
|
|
16745
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
16746
|
-
className: "side-nav__menu-title"
|
|
16747
|
-
}, "Accessories"), /*#__PURE__*/React__default.createElement("img", {
|
|
16748
|
-
src: accordionIcon,
|
|
16749
|
-
alt: "accordion-icon",
|
|
16750
|
-
className: "side-nav__accordion-icon"
|
|
16751
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
16752
|
-
className: "side-nav__menu-item"
|
|
16753
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
16754
|
-
type: "button",
|
|
16755
|
-
className: "side-nav__menu-title-wrapper",
|
|
16756
|
-
onClick: function onClick() {
|
|
16757
|
-
return onSubMenuClick('watches');
|
|
16758
|
-
}
|
|
16759
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
16760
|
-
className: "side-nav__menu-title"
|
|
16761
|
-
}, "Watches"), /*#__PURE__*/React__default.createElement("img", {
|
|
16762
|
-
src: accordionIcon,
|
|
16763
|
-
alt: "accordion-icon",
|
|
16764
|
-
className: "side-nav__accordion-icon"
|
|
16765
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
16783
|
+
}, renderMenuItems(), !!stores.length && /*#__PURE__*/React__default.createElement("div", {
|
|
16766
16784
|
className: "side-nav__menu-item"
|
|
16767
16785
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
16768
16786
|
type: "button",
|
|
@@ -16786,7 +16804,7 @@
|
|
|
16786
16804
|
type: "button",
|
|
16787
16805
|
className: "side-nav__sub-link",
|
|
16788
16806
|
onClick: onOurStoryClick
|
|
16789
|
-
}, "Our Story")), /*#__PURE__*/React__default.createElement("div", {
|
|
16807
|
+
}, "Our Story")), typeof onBlogClick === 'function' && /*#__PURE__*/React__default.createElement("div", {
|
|
16790
16808
|
className: "side-nav__menu-item"
|
|
16791
16809
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
16792
16810
|
type: "button",
|
|
@@ -16816,91 +16834,7 @@
|
|
|
16816
16834
|
onCurrencyChange: onCurrencyChange,
|
|
16817
16835
|
isCurrencySelectionDisabled: isCurrencySelectionDisabled,
|
|
16818
16836
|
tooltipContent: tooltipContent
|
|
16819
|
-
}))), /*#__PURE__*/React__default.createElement(
|
|
16820
|
-
subMenuOpen: subMenuOpen && displayedSubMenu === 'new',
|
|
16821
|
-
onBackClick: onBackClick,
|
|
16822
|
-
backIcon: backIcon,
|
|
16823
|
-
subMenuCategoryTitle: "Department",
|
|
16824
|
-
productUrl: productUrl,
|
|
16825
|
-
categoryElements: categoryElements,
|
|
16826
|
-
subMenuBrandsTitle: "Brands",
|
|
16827
|
-
brandsList: dropdownData.latestArrivals,
|
|
16828
|
-
categorySlug: displayedSubMenu,
|
|
16829
|
-
isLoading: loading,
|
|
16830
|
-
hasError: hasError,
|
|
16831
|
-
onCloseSideNav: onCloseSideNav,
|
|
16832
|
-
LinkComponent: LinkComponent
|
|
16833
|
-
}), /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
16834
|
-
subMenuOpen: subMenuOpen && displayedSubMenu === 'bags',
|
|
16835
|
-
onBackClick: onBackClick,
|
|
16836
|
-
backIcon: backIcon,
|
|
16837
|
-
subMenuCategoryTitle: "Department",
|
|
16838
|
-
productUrl: productUrl,
|
|
16839
|
-
categoryElements: addCategoryToElements(categoryElements, categories$1.bags.slug),
|
|
16840
|
-
subMenuBrandsTitle: "Bag Brands",
|
|
16841
|
-
brandsList: dropdownData.bags,
|
|
16842
|
-
categorySlug: displayedSubMenu,
|
|
16843
|
-
isLoading: loading,
|
|
16844
|
-
hasError: hasError,
|
|
16845
|
-
onCloseSideNav: onCloseSideNav,
|
|
16846
|
-
LinkComponent: LinkComponent
|
|
16847
|
-
}), /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
16848
|
-
subMenuOpen: subMenuOpen && displayedSubMenu === 'shoes',
|
|
16849
|
-
onBackClick: onBackClick,
|
|
16850
|
-
backIcon: backIcon,
|
|
16851
|
-
subMenuCategoryTitle: "Department",
|
|
16852
|
-
productUrl: productUrl,
|
|
16853
|
-
categoryElements: addCategoryToElements(categoryElements, categories$1.shoes.slug),
|
|
16854
|
-
subMenuBrandsTitle: "Shoe Brands",
|
|
16855
|
-
brandsList: dropdownData.shoes,
|
|
16856
|
-
categorySlug: displayedSubMenu,
|
|
16857
|
-
isLoading: loading,
|
|
16858
|
-
hasError: hasError,
|
|
16859
|
-
onCloseSideNav: onCloseSideNav,
|
|
16860
|
-
LinkComponent: LinkComponent
|
|
16861
|
-
}), /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
16862
|
-
subMenuOpen: subMenuOpen && displayedSubMenu === 'apparel',
|
|
16863
|
-
onBackClick: onBackClick,
|
|
16864
|
-
backIcon: backIcon,
|
|
16865
|
-
subMenuCategoryTitle: "Department",
|
|
16866
|
-
productUrl: productUrl,
|
|
16867
|
-
categoryElements: addCategoryToElements(dropdownData.apparelStyles, categories$1.clothing.slug),
|
|
16868
|
-
subMenuBrandsTitle: "Clothing Brands",
|
|
16869
|
-
brandsList: dropdownData.apparel,
|
|
16870
|
-
categorySlug: displayedSubMenu,
|
|
16871
|
-
isLoading: loading,
|
|
16872
|
-
hasError: hasError,
|
|
16873
|
-
onCloseSideNav: onCloseSideNav,
|
|
16874
|
-
LinkComponent: LinkComponent
|
|
16875
|
-
}), /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
16876
|
-
subMenuOpen: subMenuOpen && displayedSubMenu === 'accessories',
|
|
16877
|
-
onBackClick: onBackClick,
|
|
16878
|
-
backIcon: backIcon,
|
|
16879
|
-
subMenuCategoryTitle: "Categories",
|
|
16880
|
-
productUrl: productUrl,
|
|
16881
|
-
categoryElements: removeCategoryByName(dropdownData.accessoriesCategories, 'ACCESSORIES'),
|
|
16882
|
-
subMenuBrandsTitle: "Accessory Brands",
|
|
16883
|
-
brandsList: dropdownData.accessories,
|
|
16884
|
-
categorySlug: displayedSubMenu,
|
|
16885
|
-
isLoading: loading,
|
|
16886
|
-
hasError: hasError,
|
|
16887
|
-
onCloseSideNav: onCloseSideNav,
|
|
16888
|
-
LinkComponent: LinkComponent
|
|
16889
|
-
}), /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
16890
|
-
subMenuOpen: subMenuOpen && displayedSubMenu === 'watches',
|
|
16891
|
-
onBackClick: onBackClick,
|
|
16892
|
-
backIcon: backIcon,
|
|
16893
|
-
subMenuCategoryTitle: "Department",
|
|
16894
|
-
productUrl: productUrl,
|
|
16895
|
-
categoryElements: addCategoryToElements(categoryElements, categories$1.watches.slug),
|
|
16896
|
-
subMenuBrandsTitle: "Watches Brands",
|
|
16897
|
-
brandsList: dropdownData.watches,
|
|
16898
|
-
categorySlug: displayedSubMenu,
|
|
16899
|
-
isLoading: loading,
|
|
16900
|
-
hasError: hasError,
|
|
16901
|
-
onCloseSideNav: onCloseSideNav,
|
|
16902
|
-
LinkComponent: LinkComponent
|
|
16903
|
-
}), displayedSubMenu === 'stores' && /*#__PURE__*/React__default.createElement("div", {
|
|
16837
|
+
}))), renderDropdownLinks(), displayedSubMenu === 'stores' && /*#__PURE__*/React__default.createElement("div", {
|
|
16904
16838
|
className: "side-nav__content"
|
|
16905
16839
|
}, /*#__PURE__*/React__default.createElement(StoresDropdown$1, {
|
|
16906
16840
|
backIcon: backIcon,
|
|
@@ -16910,6 +16844,10 @@
|
|
|
16910
16844
|
})));
|
|
16911
16845
|
};
|
|
16912
16846
|
|
|
16847
|
+
LuxitySideNav.defaultProps = {
|
|
16848
|
+
onBlogClick: undefined
|
|
16849
|
+
};
|
|
16850
|
+
|
|
16913
16851
|
var LuxityAppSideNav = function LuxityAppSideNav(_ref) {
|
|
16914
16852
|
var closeIcon = _ref.closeIcon,
|
|
16915
16853
|
accountIcon = _ref.accountIcon,
|
|
@@ -17114,7 +17052,8 @@
|
|
|
17114
17052
|
onDashboardClick = _ref.onDashboardClick,
|
|
17115
17053
|
onContactUsClick = _ref.onContactUsClick,
|
|
17116
17054
|
onOurStoryClick = _ref.onOurStoryClick,
|
|
17117
|
-
onBlogClick = _ref.onBlogClick,
|
|
17055
|
+
_ref$onBlogClick = _ref.onBlogClick,
|
|
17056
|
+
onBlogClick = _ref$onBlogClick === void 0 ? undefined : _ref$onBlogClick,
|
|
17118
17057
|
bugReportLink = _ref.bugReportLink,
|
|
17119
17058
|
onSellToUsClick = _ref.onSellToUsClick,
|
|
17120
17059
|
onLogoClick = _ref.onLogoClick,
|
|
@@ -17140,7 +17079,8 @@
|
|
|
17140
17079
|
tooltipContent = _ref.tooltipContent,
|
|
17141
17080
|
LinkComponent = _ref.LinkComponent,
|
|
17142
17081
|
shop = _ref.shop,
|
|
17143
|
-
app = _ref.app
|
|
17082
|
+
app = _ref.app,
|
|
17083
|
+
categoryConfig = _ref.categoryConfig;
|
|
17144
17084
|
|
|
17145
17085
|
var _useState = React.useState(''),
|
|
17146
17086
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -17319,10 +17259,9 @@
|
|
|
17319
17259
|
return handleClick(onOurStoryClick);
|
|
17320
17260
|
};
|
|
17321
17261
|
|
|
17322
|
-
var handleBlogClick = function
|
|
17262
|
+
var handleBlogClick = onBlogClick ? function () {
|
|
17323
17263
|
return handleClick(onBlogClick);
|
|
17324
|
-
};
|
|
17325
|
-
|
|
17264
|
+
} : undefined;
|
|
17326
17265
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
17327
17266
|
className: "navbar navbar__mobile-wrapper"
|
|
17328
17267
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -17426,7 +17365,8 @@
|
|
|
17426
17365
|
onCurrencyChange: onCurrencyChange,
|
|
17427
17366
|
isCurrencySelectionDisabled: isCurrencySelectionDisabled,
|
|
17428
17367
|
tooltipContent: tooltipContent,
|
|
17429
|
-
LinkComponent: LinkComponent
|
|
17368
|
+
LinkComponent: LinkComponent,
|
|
17369
|
+
categoryConfig: categoryConfig
|
|
17430
17370
|
}), app && /*#__PURE__*/React__default.createElement(LuxityAppSideNav, {
|
|
17431
17371
|
accordionIcon: accordionIcon,
|
|
17432
17372
|
closeIcon: closeIcon,
|