@bonlineza/luxity-lib 2.31.4 → 2.32.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/GraphQLDropdownSelector.js +5 -4
- package/LuxityDesktopHeader.js +107 -36
- package/LuxityGraphQLDropdownSelector.js +5 -4
- package/LuxityMobileHeader.js +146 -56
- package/LuxitySideNav.js +143 -39
- package/MaterialSelector.js +5 -4
- package/ModelSelector.js +5 -4
- package/build/.gitignore +3 -0
- package/build/.npmignore +0 -0
- package/build/bundle.css +1 -1
- package/build/bundle.js +193 -88
- package/package.json +1 -1
package/LuxitySideNav.js
CHANGED
|
@@ -1,10 +1,52 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['react'], factory) :
|
|
4
|
-
(global = global || self, global.LuxitySideNav = factory(global.React));
|
|
5
|
-
}(this, (function (React) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('axios')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['react', 'axios'], factory) :
|
|
4
|
+
(global = global || self, global.LuxitySideNav = factory(global.React, global.axios));
|
|
5
|
+
}(this, (function (React, axios) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var React__default = 'default' in React ? React['default'] : React;
|
|
8
|
+
axios = axios && Object.prototype.hasOwnProperty.call(axios, 'default') ? axios['default'] : axios;
|
|
9
|
+
|
|
10
|
+
function ownKeys(object, enumerableOnly) {
|
|
11
|
+
var keys = Object.keys(object);
|
|
12
|
+
|
|
13
|
+
if (Object.getOwnPropertySymbols) {
|
|
14
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
15
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
16
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
17
|
+
})), keys.push.apply(keys, symbols);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return keys;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function _objectSpread2(target) {
|
|
24
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
25
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
26
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
27
|
+
_defineProperty(target, key, source[key]);
|
|
28
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
29
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return target;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function _defineProperty(obj, key, value) {
|
|
37
|
+
if (key in obj) {
|
|
38
|
+
Object.defineProperty(obj, key, {
|
|
39
|
+
value: value,
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true
|
|
43
|
+
});
|
|
44
|
+
} else {
|
|
45
|
+
obj[key] = value;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return obj;
|
|
49
|
+
}
|
|
8
50
|
|
|
9
51
|
function _slicedToArray(arr, i) {
|
|
10
52
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
@@ -116,12 +158,18 @@
|
|
|
116
158
|
subMenuBrandsTitle = _ref.subMenuBrandsTitle,
|
|
117
159
|
_ref$brandsList = _ref.brandsList,
|
|
118
160
|
brandsList = _ref$brandsList === void 0 ? [] : _ref$brandsList,
|
|
119
|
-
categorySlug = _ref.categorySlug
|
|
161
|
+
categorySlug = _ref.categorySlug,
|
|
162
|
+
isLoading = _ref.isLoading,
|
|
163
|
+
hasError = _ref.hasError;
|
|
120
164
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
121
165
|
className: "side-nav__content ".concat(subMenuOpen ? '' : 'side-nav__content--hidden')
|
|
122
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
166
|
+
}, hasError ? /*#__PURE__*/React__default.createElement("div", {
|
|
167
|
+
className: "side-nav__errors"
|
|
168
|
+
}, "Failed to load data.") : /*#__PURE__*/React__default.createElement("div", {
|
|
123
169
|
className: "side-nav__sub-menu-wrapper"
|
|
124
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
170
|
+
}, isLoading ? /*#__PURE__*/React__default.createElement("div", {
|
|
171
|
+
className: "cover-spinner"
|
|
172
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
125
173
|
className: "side-nav__sub-menu"
|
|
126
174
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
127
175
|
type: "button",
|
|
@@ -141,7 +189,7 @@
|
|
|
141
189
|
return /*#__PURE__*/React__default.createElement("a", {
|
|
142
190
|
href: "".concat(productUrl, "/").concat(category.slug),
|
|
143
191
|
className: "side-nav__element"
|
|
144
|
-
}, category.name);
|
|
192
|
+
}, category.name.toLowerCase());
|
|
145
193
|
})), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("div", {
|
|
146
194
|
className: "side-nav__elements"
|
|
147
195
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -157,6 +205,20 @@
|
|
|
157
205
|
})))));
|
|
158
206
|
};
|
|
159
207
|
|
|
208
|
+
var getBrands = function getBrands() {
|
|
209
|
+
return {
|
|
210
|
+
query: "{\n latest_arrivals: luxity_brands(has_products: true, limit: 1000, page: 1) {data {id name slug}}\n bags: luxity_brands(has_products: true, limit: 1000, page: 1, category_type: BAGS) {data {id name slug}}\n shoes: luxity_brands(has_products: true, limit: 1000, page: 1, category_type: SHOES) {data {id name slug}}\n apparel: luxity_brands(has_products: true, limit: 1000, page: 1, category_type: APPAREL) {data {id name slug}}\n accessories: luxity_brands(has_products: true, limit: 1000, page: 1, category_type: ACCESSORIES) {data {id name slug}}\n watches: luxity_brands(has_products: true, limit: 1000, page: 1, category_type: WATCHES) {data {id name slug}}\n accessories_categories: luxity_accessories_categories_list { id name slug }\n apparel_styles: luxity_apparel_styles_list { name slug }\n } "
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
var removeCategoryByName = function removeCategoryByName(categories, name) {
|
|
215
|
+
var _categories$filter;
|
|
216
|
+
|
|
217
|
+
return (_categories$filter = categories === null || categories === void 0 ? void 0 : categories.filter(function (category) {
|
|
218
|
+
return category.name !== name;
|
|
219
|
+
})) !== null && _categories$filter !== void 0 ? _categories$filter : [];
|
|
220
|
+
};
|
|
221
|
+
|
|
160
222
|
var LuxitySideNav = function LuxitySideNav(_ref) {
|
|
161
223
|
var accordionIcon = _ref.accordionIcon,
|
|
162
224
|
closeIcon = _ref.closeIcon,
|
|
@@ -170,24 +232,9 @@
|
|
|
170
232
|
onSellToUsClick = _ref.onSellToUsClick,
|
|
171
233
|
stores = _ref.stores,
|
|
172
234
|
categoryElements = _ref.categoryElements,
|
|
173
|
-
_ref$newBrandsList = _ref.newBrandsList,
|
|
174
|
-
newBrandsList = _ref$newBrandsList === void 0 ? [] : _ref$newBrandsList,
|
|
175
|
-
_ref$bagsBrandsList = _ref.bagsBrandsList,
|
|
176
|
-
bagsBrandsList = _ref$bagsBrandsList === void 0 ? [] : _ref$bagsBrandsList,
|
|
177
|
-
_ref$shoesBrandsList = _ref.shoesBrandsList,
|
|
178
|
-
shoesBrandsList = _ref$shoesBrandsList === void 0 ? [] : _ref$shoesBrandsList,
|
|
179
|
-
_ref$clothingBrandsLi = _ref.clothingBrandsList,
|
|
180
|
-
clothingBrandsList = _ref$clothingBrandsLi === void 0 ? [] : _ref$clothingBrandsLi,
|
|
181
|
-
_ref$accessoriesBrand = _ref.accessoriesBrandsList,
|
|
182
|
-
accessoriesBrandsList = _ref$accessoriesBrand === void 0 ? [] : _ref$accessoriesBrand,
|
|
183
|
-
_ref$watchesBrandsLis = _ref.watchesBrandsList,
|
|
184
|
-
watchesBrandsList = _ref$watchesBrandsLis === void 0 ? [] : _ref$watchesBrandsLis,
|
|
185
|
-
_ref$accessoriesCateg = _ref.accessoriesCategoryElements,
|
|
186
|
-
accessoriesCategoryElements = _ref$accessoriesCateg === void 0 ? [] : _ref$accessoriesCateg,
|
|
187
|
-
_ref$apparelStylesEle = _ref.apparelStylesElements,
|
|
188
|
-
apparelStylesElements = _ref$apparelStylesEle === void 0 ? [] : _ref$apparelStylesEle,
|
|
189
235
|
showSideNav = _ref.showSideNav,
|
|
190
|
-
onMenuClick = _ref.onMenuClick
|
|
236
|
+
onMenuClick = _ref.onMenuClick,
|
|
237
|
+
endpoint = _ref.endpoint;
|
|
191
238
|
|
|
192
239
|
var _useState = React.useState(false),
|
|
193
240
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -199,6 +246,30 @@
|
|
|
199
246
|
displayedSubMenu = _useState4[0],
|
|
200
247
|
setDisplayedSubMenu = _useState4[1];
|
|
201
248
|
|
|
249
|
+
var _useState5 = React.useState(false),
|
|
250
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
251
|
+
loading = _useState6[0],
|
|
252
|
+
setLoading = _useState6[1];
|
|
253
|
+
|
|
254
|
+
var _useState7 = React.useState({
|
|
255
|
+
latestArrivals: [],
|
|
256
|
+
bags: [],
|
|
257
|
+
shoes: [],
|
|
258
|
+
clothing: [],
|
|
259
|
+
accessories: [],
|
|
260
|
+
watches: [],
|
|
261
|
+
accessoriesCategories: [],
|
|
262
|
+
apparelStyles: []
|
|
263
|
+
}),
|
|
264
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
265
|
+
dropdownData = _useState8[0],
|
|
266
|
+
setDropdownData = _useState8[1];
|
|
267
|
+
|
|
268
|
+
var _useState9 = React.useState(false),
|
|
269
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
270
|
+
hasError = _useState10[0],
|
|
271
|
+
setHasError = _useState10[1];
|
|
272
|
+
|
|
202
273
|
var onSubMenuClick = function onSubMenuClick(subMenu) {
|
|
203
274
|
setSubMenuOpen(function (prev) {
|
|
204
275
|
return !prev;
|
|
@@ -216,6 +287,27 @@
|
|
|
216
287
|
setDisplayedSubMenu('');
|
|
217
288
|
};
|
|
218
289
|
|
|
290
|
+
React.useMemo(function () {
|
|
291
|
+
setLoading(true);
|
|
292
|
+
axios.post("".concat(endpoint), getBrands()).then(function (_ref2) {
|
|
293
|
+
var data = _ref2.data;
|
|
294
|
+
setLoading(false);
|
|
295
|
+
setDropdownData(function (prev) {
|
|
296
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
297
|
+
latestArrivals: data.data.latest_arrivals.data,
|
|
298
|
+
bags: data.data.bags.data,
|
|
299
|
+
shoes: data.data.shoes.data,
|
|
300
|
+
apparel: data.data.apparel.data,
|
|
301
|
+
accessories: data.data.accessories.data,
|
|
302
|
+
watches: data.data.watches.data,
|
|
303
|
+
accessoriesCategories: data.data.accessories_categories,
|
|
304
|
+
apparelStyles: data.data.apparel_styles
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
}).catch(function () {
|
|
308
|
+
return setHasError(true);
|
|
309
|
+
});
|
|
310
|
+
}, [endpoint]);
|
|
219
311
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
220
312
|
className: "side-nav"
|
|
221
313
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -369,8 +461,10 @@
|
|
|
369
461
|
productUrl: productUrl,
|
|
370
462
|
categoryElements: categoryElements,
|
|
371
463
|
subMenuBrandsTitle: "Brands",
|
|
372
|
-
brandsList:
|
|
373
|
-
categorySlug: displayedSubMenu
|
|
464
|
+
brandsList: dropdownData.latestArrivals,
|
|
465
|
+
categorySlug: displayedSubMenu,
|
|
466
|
+
isLoading: loading,
|
|
467
|
+
hasError: hasError
|
|
374
468
|
}), /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
375
469
|
subMenuOpen: subMenuOpen && displayedSubMenu === 'bags',
|
|
376
470
|
onBackClick: onBackClick,
|
|
@@ -379,8 +473,10 @@
|
|
|
379
473
|
productUrl: productUrl,
|
|
380
474
|
categoryElements: categoryElements,
|
|
381
475
|
subMenuBrandsTitle: "Bag Brands",
|
|
382
|
-
brandsList:
|
|
383
|
-
categorySlug: displayedSubMenu
|
|
476
|
+
brandsList: dropdownData.bags,
|
|
477
|
+
categorySlug: displayedSubMenu,
|
|
478
|
+
isLoading: loading,
|
|
479
|
+
hasError: hasError
|
|
384
480
|
}), /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
385
481
|
subMenuOpen: subMenuOpen && displayedSubMenu === 'shoes',
|
|
386
482
|
onBackClick: onBackClick,
|
|
@@ -389,28 +485,34 @@
|
|
|
389
485
|
productUrl: productUrl,
|
|
390
486
|
categoryElements: categoryElements,
|
|
391
487
|
subMenuBrandsTitle: "Shoe Brands",
|
|
392
|
-
brandsList:
|
|
393
|
-
categorySlug: displayedSubMenu
|
|
488
|
+
brandsList: dropdownData.shoes,
|
|
489
|
+
categorySlug: displayedSubMenu,
|
|
490
|
+
isLoading: loading,
|
|
491
|
+
hasError: hasError
|
|
394
492
|
}), /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
395
493
|
subMenuOpen: subMenuOpen && displayedSubMenu === 'clothing',
|
|
396
494
|
onBackClick: onBackClick,
|
|
397
495
|
backIcon: backIcon,
|
|
398
496
|
subMenuCategoryTitle: "Department",
|
|
399
497
|
productUrl: productUrl,
|
|
400
|
-
categoryElements:
|
|
498
|
+
categoryElements: dropdownData.apparelStyles,
|
|
401
499
|
subMenuBrandsTitle: "Clothing Brands",
|
|
402
|
-
brandsList:
|
|
403
|
-
categorySlug: displayedSubMenu
|
|
500
|
+
brandsList: dropdownData.clothing,
|
|
501
|
+
categorySlug: displayedSubMenu,
|
|
502
|
+
isLoading: loading,
|
|
503
|
+
hasError: hasError
|
|
404
504
|
}), /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
405
505
|
subMenuOpen: subMenuOpen && displayedSubMenu === 'accessories',
|
|
406
506
|
onBackClick: onBackClick,
|
|
407
507
|
backIcon: backIcon,
|
|
408
508
|
subMenuCategoryTitle: "Categories",
|
|
409
509
|
productUrl: productUrl,
|
|
410
|
-
categoryElements:
|
|
510
|
+
categoryElements: removeCategoryByName(dropdownData.accessoriesCategories, 'ACCESSORIES'),
|
|
411
511
|
subMenuBrandsTitle: "Accessory Brands",
|
|
412
|
-
brandsList:
|
|
413
|
-
categorySlug: displayedSubMenu
|
|
512
|
+
brandsList: dropdownData.accessories,
|
|
513
|
+
categorySlug: displayedSubMenu,
|
|
514
|
+
isLoading: loading,
|
|
515
|
+
hasError: hasError
|
|
414
516
|
}), /*#__PURE__*/React__default.createElement(BrandsDropDown, {
|
|
415
517
|
subMenuOpen: subMenuOpen && displayedSubMenu === 'watches',
|
|
416
518
|
onBackClick: onBackClick,
|
|
@@ -419,8 +521,10 @@
|
|
|
419
521
|
productUrl: productUrl,
|
|
420
522
|
categoryElements: categoryElements,
|
|
421
523
|
subMenuBrandsTitle: "Watches Brands",
|
|
422
|
-
brandsList:
|
|
423
|
-
categorySlug: displayedSubMenu
|
|
524
|
+
brandsList: dropdownData.watches,
|
|
525
|
+
categorySlug: displayedSubMenu,
|
|
526
|
+
isLoading: loading,
|
|
527
|
+
hasError: hasError
|
|
424
528
|
}), displayedSubMenu === 'stores' && /*#__PURE__*/React__default.createElement("div", {
|
|
425
529
|
className: "side-nav__content"
|
|
426
530
|
}, /*#__PURE__*/React__default.createElement(StoresDropdown, {
|
package/MaterialSelector.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('styled-components'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady'), require('react-animate-height'), require('numeral'), 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')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['react', 'styled-components', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady', 'react-animate-height', 'numeral', 'stylis-rule-sheet', 'react-dom', 'prop-types', 'raf', 'react-input-autosize', 'react-transition-group', '@bonlineza/b-lib/functions', 'rc-slider', 'react-notify-toast'], factory) :
|
|
4
|
-
(global = global || self, global.MaterialSelector = factory(global.React, global.styled, global.EllipsisLoader, global.PageReady, global.AnimateHeight, global.numeral, 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']));
|
|
5
|
-
}(this, (function (React, styled, EllipsisLoader, PageReady, AnimateHeight, numeral, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, Notifications) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('styled-components'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady'), require('react-animate-height'), require('numeral'), 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')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['react', 'styled-components', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady', 'react-animate-height', 'numeral', 'stylis-rule-sheet', 'react-dom', 'prop-types', 'raf', 'react-input-autosize', 'react-transition-group', '@bonlineza/b-lib/functions', 'rc-slider', 'react-notify-toast', 'axios'], factory) :
|
|
4
|
+
(global = global || self, global.MaterialSelector = factory(global.React, global.styled, global.EllipsisLoader, global.PageReady, global.AnimateHeight, global.numeral, 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));
|
|
5
|
+
}(this, (function (React, styled, EllipsisLoader, PageReady, AnimateHeight, numeral, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, Notifications, axios) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var React__default = 'default' in React ? React['default'] : React;
|
|
8
8
|
var styled__default = 'default' in styled ? styled['default'] : styled;
|
|
@@ -15,6 +15,7 @@
|
|
|
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
|
+
axios = axios && Object.prototype.hasOwnProperty.call(axios, 'default') ? axios['default'] : axios;
|
|
18
19
|
|
|
19
20
|
function ownKeys(object, enumerableOnly) {
|
|
20
21
|
var keys = Object.keys(object);
|
package/ModelSelector.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('styled-components'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady'), require('react-animate-height'), require('numeral'), 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')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['react', 'styled-components', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady', 'react-animate-height', 'numeral', 'stylis-rule-sheet', 'react-dom', 'prop-types', 'raf', 'react-input-autosize', 'react-transition-group', '@bonlineza/b-lib/functions', 'rc-slider', 'react-notify-toast'], factory) :
|
|
4
|
-
(global = global || self, global.ModelSelector = factory(global.React, global.styled, global.EllipsisLoader, global.PageReady, global.AnimateHeight, global.numeral, 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']));
|
|
5
|
-
}(this, (function (React, styled, EllipsisLoader, PageReady, AnimateHeight, numeral, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, Notifications) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('styled-components'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady'), require('react-animate-height'), require('numeral'), 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')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['react', 'styled-components', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady', 'react-animate-height', 'numeral', 'stylis-rule-sheet', 'react-dom', 'prop-types', 'raf', 'react-input-autosize', 'react-transition-group', '@bonlineza/b-lib/functions', 'rc-slider', 'react-notify-toast', 'axios'], factory) :
|
|
4
|
+
(global = global || self, global.ModelSelector = factory(global.React, global.styled, global.EllipsisLoader, global.PageReady, global.AnimateHeight, global.numeral, 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));
|
|
5
|
+
}(this, (function (React, styled, EllipsisLoader, PageReady, AnimateHeight, numeral, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, Notifications, axios) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var React__default = 'default' in React ? React['default'] : React;
|
|
8
8
|
var styled__default = 'default' in styled ? styled['default'] : styled;
|
|
@@ -15,6 +15,7 @@
|
|
|
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
|
+
axios = axios && Object.prototype.hasOwnProperty.call(axios, 'default') ? axios['default'] : axios;
|
|
18
19
|
|
|
19
20
|
function ownKeys(object, enumerableOnly) {
|
|
20
21
|
var keys = Object.keys(object);
|
package/build/.gitignore
ADDED
package/build/.npmignore
ADDED
|
File without changes
|
package/build/bundle.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.side-nav{font-family:Martel Sans}.side-nav__overlay{background-color:rgba(78,73,73,.51);height:100%;opacity:0;position:fixed;top:0;transition:opacity .5s ease-out 0s,visibility .5s ease-out 0s;width:100%;z-index:99999}.side-nav__overlay--visible{opacity:1;visibility:visible}.side-nav__overlay--hidden{opacity:1;visibility:hidden}.side-nav__content{background-color:#fff;bottom:0;overflow-y:scroll;padding:1.5rem;position:fixed;top:0;transition:left .5s ease-in-out;width:80%;z-index:99999}.side-nav__content--hidden{display:none}.side-nav__content--open{left:0}.side-nav__content--closed{left:-100%}.side-nav__menu-title-wrapper{align-items:center;background-color:transparent;border:none;display:flex;justify-content:space-between;outline:none;width:100%}.side-nav__icon-container{float:right;margin-bottom:10px}.side-nav__menu-title{font-size:14px;font-weight:700;line-height:20px;text-transform:uppercase}.side-nav__accordion-icon{height:auto;width:15px}.side-nav__menu-item{margin-bottom:25px}.side-nav__close-icon{height:20px;margin-left:auto;width:20px}.side-nav__back-button-wrapper{align-items:center;display:flex;margin-bottom:25px}.side-nav__back-icon{height:20px;width:20px}.side-nav__back-button,.side-nav__sub-menu-title{font-weight:700;text-transform:uppercase}.side-nav__sub-menu-title{font-size:14px;margin-bottom:10px}.side-nav__elements{display:flex;flex-direction:column}.side-nav__element{color:#555;cursor:pointer;font-size:14px;font-weight:400;line-height:20px;margin-bottom:10px}.side-nav__sub-link{font-size:14px;font-weight:400;text-transform:capitalize}.side-nav__block-button{background-color:#000;color:#fff;font-weight:700;padding:10px 0;width:100%}.navbar{box-shadow:2px 2px 10px #dfdede;display:flex;padding-bottom:10px;padding-top:20px;position:relative}.navbar__link-item--desktop{align-items:center;display:flex;height:35px;margin:auto 0;padding-top:5px}.navbar__mobile-wrapper{align-items:center;display:flex;flex-direction:column;padding-left:32px;padding-right:32px}.navbar__container{display:flex;margin:0 auto;max-width:1280px;padding-left:12px;padding-right:12px;width:100%}.navbar__body{flex-basis:60%}.navbar__wrapper{align-items:center;display:flex;justify-content:space-between;margin-bottom:20px;width:100%}.navbar__product-search-wrapper{align-items:center;display:flex;padding:0 20%;width:100%}.navbar__input-close-icon{height:auto;margin-bottom:10px;margin-left:10px;width:20px}.navbar__menu-icon{width:30px}.navbar__product-search{align-items:center;display:flex;max-width:545px;width:100%}.navbar__logo-wrapper{margin-right:18px;width:200px}.navbar__logo{width:200px}@media only screen and (max-width:879px){.navbar__logo{width:125px}}.navbar__form-input{align-items:center;background:transparent;border:none;display:flex;font-size:13px;outline:none;padding:10px;width:100%}.navbar__product-search{border:1px solid #dfdede;margin-bottom:10px}.navbar__section{align-items:center;display:flex;flex-direction:row;justify-content:space-between;width:100%}.navbar__link{display:inline-block;font-family:Martel Sans;font-size:14px;font-weight:700;margin-right:10px;overflow:hidden;text-transform:uppercase;transition:.3s ease-in-out}.navbar__link:after{background-color:#000;content:"";display:block;height:2px;transition:width .25s ease-out;width:0}.navbar__link:hover:after{width:100%}.navbar__link:hover .navbar__dropdown{animation:fadeInDropdown .3s ease-in-out;display:block}.navbar__dropdown{background-color:#fff;box-shadow:5px 5px 5px #dfdede;display:none;left:0;margin-left:10px;position:absolute;width:100%;z-index:999}@keyframes fadeInDropdown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.navbar__company-link{font-size:13px;font-weight:400;list-style:none;margin-right:18px;text-decoration:none}.navbar__company-block{align-items:center;background-color:#000;color:#fff;display:flex;font-weight:700;height:33px;justify-content:center;margin-right:0;padding:0 18px;text-transform:uppercase}.navbar__input-search-icon{height:auto;margin-left:1.125rem;margin-right:.375rem;width:15px}.navbar__nav-links{align-items:center;display:flex}.navbar__nav-links--wrap{flex-wrap:wrap}.navbar__icons{align-items:center;display:flex;height:40px;justify-content:flex-end;margin-bottom:10px}.navbar__icon{cursor:pointer;height:auto;margin-right:18px;width:20px}@media only screen and (max-width:879px){.navbar__icon{margin-right:0}}.navbar__cart-icon{position:relative}.navbar__cart-count{align-items:center;background-color:#000;border-radius:50%;bottom:50%;color:#fff;display:flex;font-size:13px;height:20px;justify-content:center;left:100%;position:absolute;width:20px}.footer__newsletter-section{align-items:center;background-color:#000;color:#fff;display:flex;justify-content:space-between;padding:2.265rem 0}@media only screen and (max-width:879px){.footer__newsletter-section{flex-direction:column}}.footer__newsletter-wrapper{align-items:center;display:flex;justify-content:space-between;margin:0 auto;max-width:1280px;padding-left:32px;padding-right:32px;width:100%}@media only screen and (max-width:879px){.footer__newsletter-wrapper{flex-direction:column}.footer__link-container{flex-basis:50%}}.footer__newsletter-icon{height:30px;position:absolute;right:0;top:0;width:32px}.footer__newsletter-form{flex-basis:50%;max-width:250px;position:relative}@media only screen and (max-width:879px){.footer__newsletter-form{display:block;margin-top:20px;max-width:100%;width:100%}}.footer__newsletter-title{font-family:Martel Sans,sans-serif;font-size:14px;font-weight:700;letter-spacing:3px;margin-bottom:1.125rem;text-transform:uppercase}.footer__newsletter-text{font-size:14px}.footer__form-input{background-color:#000;border:none;border-bottom:1px solid #fff;color:#fff;height:30px;outline:none;width:100%}.footer__form-input::-moz-placeholder{color:#fff;font-weight:400}.footer__form-input::placeholder{color:#fff;font-weight:400}.footer__form-errors{color:#fff;margin-top:5px}.footer__main-section{align-items:flex-start;display:flex;justify-content:space-between;margin-bottom:50px;margin-top:80px}.footer__link-title{font-family:El Messiri;font-size:16px;font-weight:700;margin-bottom:20px;text-transform:uppercase}@media only screen and (max-width:879px){.footer__link-title{margin-bottom:10px}}.footer__link-child{margin-top:50px}.footer__links{display:flex;flex-direction:column}.footer__link{color:#939393;cursor:pointer;font-family:Martel Sans;font-size:14px;line-height:20px;margin-bottom:15px;text-align:left;text-decoration:none}.footer__link:hover{color:#000;text-decoration:underline}@media only screen and (max-width:879px){.footer__link{margin-bottom:10px}}.footer__link-wrapper{align-items:center;display:flex;gap:5px}.footer__link-icon{height:13px;margin-bottom:18px}.footer__text{color:#939393;font-family:Martel Sans;font-size:14px;line-height:20px;margin-bottom:15px;text-align:left;text-decoration:none}.footer__store-hours{margin-top:35px}.footer__copyrights-section{border-top:1px solid;display:flex;justify-content:space-between;padding-bottom:20px;padding-top:20px}.footer__logo{height:30px;width:135px}.footer__payment-icons{align-items:center;display:flex}.footer__wrapper{margin:0 auto;max-width:1280px;padding-left:32px;padding-right:32px;width:100%}@media only screen and (max-width:879px){.footer__wrapper{padding:32px 0 0 24px}}.footer__wrapper--desktop{display:block}@media only screen and (max-width:879px){.footer__wrapper--desktop{display:none}}.footer__wrapper--mobile{display:none}@media only screen and (max-width:879px){.footer__wrapper--mobile{display:block;padding-top:30px}}.footer__copyright{font-size:10px;line-height:22px}.footer__copyright--mobile{display:none}@media only screen and (max-width:879px){.footer__copyright--mobile{display:block;padding:30px 10px 30px 0;text-align:center}}.footer__section-row{display:flex;gap:50%}@media only screen and (max-width:879px){.footer__section-row{gap:unset}}.stores-dropdown{align-items:flex-start;display:flex;font-family:Martel Sans;gap:20px;margin-left:auto;margin-right:auto;max-width:1280px;overflow-x:auto;padding:20px 3px}.stores-dropdown__image{height:200px;-o-object-fit:cover;object-fit:cover;width:100%}.stores-dropdown__store-details{flex-basis:20%}.stores-dropdown__title{font-family:El Messiri}.stores-dropdown__main-title,.stores-dropdown__title{font-size:16px;font-weight:400;letter-spacing:3px;margin-top:20px}.stores-dropdown__main-title{font-weight:700;margin-bottom:10px}.stores-dropdown__open-days{font-size:12px;font-weight:700;line-height:20px}.stores-dropdown__open-hours{font-size:12px;font-weight:400;line-height:20px}.stores-dropdown__queries-title{font-family:El Messiri;font-size:16px;font-weight:400;letter-spacing:3px}.stores-dropdown__contact-details{font-size:16px;font-weight:700}.stores-dropdown__view-more{cursor:pointer;font-size:14px;font-weight:400;margin-top:10px;text-transform:capitalize}.dropdown{display:flex;justify-content:space-between;margin-left:auto;margin-right:auto;max-width:1280px;overflow-x:auto;padding:20px 3px}.dropdown__column{flex:1}.dropdown__column:nth-child(2){flex:2}.dropdown__title{font-family:El Messiri;font-size:16px;font-weight:700;letter-spacing:3px;line-height:1;margin-bottom:20px;text-transform:uppercase}.dropdown__elements{display:flex}.dropdown__elements--column{flex-direction:column}.dropdown__elements--row{flex-flow:row wrap;justify-content:flex-start}.dropdown__element{flex-basis:33.33%;font-family:Martel Sans;font-size:14px;font-weight:400;margin-bottom:10px;text-transform:capitalize}
|
|
1
|
+
.navbar{box-shadow:2px 2px 10px #dfdede;display:flex;padding-bottom:10px;padding-top:20px;position:relative}.navbar__link-item--desktop{align-items:center;display:flex;height:35px;margin:auto 0;padding-top:5px}.navbar__mobile-wrapper{align-items:center;display:flex;flex-direction:column;padding-left:32px;padding-right:32px}.navbar__container{display:flex;margin:0 auto;max-width:1280px;padding-left:12px;padding-right:12px;width:100%}.navbar__body{flex-basis:60%}.navbar__wrapper{align-items:center;display:flex;justify-content:space-between;margin-bottom:20px;width:100%}.navbar__product-search-wrapper{align-items:center;display:flex;padding:0 20%;width:100%}.navbar__input-close-icon{height:auto;margin-bottom:10px;margin-left:10px;width:20px}.navbar__menu-icon{width:30px}.navbar__product-search{align-items:center;display:flex;max-width:545px;width:100%}.navbar__logo-wrapper{margin-right:18px;width:200px}.navbar__logo{width:200px}@media only screen and (max-width:879px){.navbar__logo{width:125px}}.navbar__form-input{align-items:center;background:transparent;border:none;display:flex;font-size:13px;outline:none;padding:10px;width:100%}.navbar__product-search{border:1px solid #dfdede;margin-bottom:10px}.navbar__section{align-items:center;display:flex;flex-direction:row;justify-content:space-between;width:100%}.navbar__link{display:inline-block;font-family:Martel Sans;font-size:14px;font-weight:700;margin-right:10px;overflow:hidden;text-transform:uppercase;transition:.3s ease-in-out}.navbar__link:after{background-color:#000;content:"";display:block;height:2px;transition:width .25s ease-out;width:0}.navbar__link:hover:after{width:100%}.navbar__link:hover .navbar__dropdown{animation:fadeInDropdown .3s ease-in-out;display:block}.navbar__dropdown{background-color:#fff;box-shadow:5px 5px 5px #dfdede;display:none;left:0;position:absolute;width:100%;z-index:999}@keyframes fadeInDropdown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.navbar__company-link{font-size:13px;font-weight:400;list-style:none;margin-right:18px;text-decoration:none}.navbar__company-block{align-items:center;background-color:#000;color:#fff;display:flex;font-weight:700;height:33px;justify-content:center;margin-right:0;padding:0 18px;text-transform:uppercase}.navbar__input-search-icon{height:auto;margin-left:1.125rem;margin-right:.375rem;width:15px}.navbar__nav-links{align-items:center;display:flex}.navbar__nav-links--wrap{flex-wrap:wrap}.navbar__icons{align-items:center;display:flex;height:40px;justify-content:flex-end;margin-bottom:10px}.navbar__icon{cursor:pointer;height:auto;margin-right:18px;width:20px}@media only screen and (max-width:879px){.navbar__icon{margin-right:0}}.navbar__cart-icon{position:relative}.navbar__cart-count{align-items:center;background-color:#000;border-radius:50%;bottom:50%;color:#fff;display:flex;font-size:13px;height:20px;justify-content:center;left:100%;position:absolute;width:20px}.footer__newsletter-section{align-items:center;background-color:#000;color:#fff;display:flex;justify-content:space-between;padding:2.265rem 0}@media only screen and (max-width:879px){.footer__newsletter-section{flex-direction:column}}.footer__newsletter-wrapper{align-items:center;display:flex;justify-content:space-between;margin:0 auto;max-width:1280px;padding-left:32px;padding-right:32px;width:100%}@media only screen and (max-width:879px){.footer__newsletter-wrapper{flex-direction:column}.footer__link-container{flex-basis:50%}}.footer__newsletter-icon{height:30px;position:absolute;right:0;top:0;width:32px}.footer__newsletter-form{flex-basis:50%;max-width:250px;position:relative}@media only screen and (max-width:879px){.footer__newsletter-form{display:block;margin-top:20px;max-width:100%;width:100%}}.footer__newsletter-title{font-family:Martel Sans,sans-serif;font-size:14px;font-weight:700;letter-spacing:3px;margin-bottom:1.125rem;text-transform:uppercase}.footer__newsletter-text{font-size:14px}.footer__form-input{background-color:#000;border:none;border-bottom:1px solid #fff;color:#fff;height:30px;outline:none;width:100%}.footer__form-input::-moz-placeholder{color:#fff;font-weight:400}.footer__form-input::placeholder{color:#fff;font-weight:400}.footer__form-errors{color:#fff;margin-top:5px}.footer__main-section{align-items:flex-start;display:flex;justify-content:space-between;margin-bottom:50px;margin-top:80px}.footer__link-title{font-family:El Messiri;font-size:16px;font-weight:700;margin-bottom:20px;text-transform:uppercase}@media only screen and (max-width:879px){.footer__link-title{margin-bottom:10px}}.footer__link-child{margin-top:50px}.footer__links{display:flex;flex-direction:column}.footer__link{color:#939393;cursor:pointer;font-family:Martel Sans;font-size:14px;line-height:20px;margin-bottom:15px;text-align:left;text-decoration:none}.footer__link:hover{color:#000;text-decoration:underline}@media only screen and (max-width:879px){.footer__link{margin-bottom:10px}}.footer__link-wrapper{align-items:center;display:flex;gap:5px}.footer__link-icon{height:13px;margin-bottom:18px}.footer__text{color:#939393;font-family:Martel Sans;font-size:14px;line-height:20px;margin-bottom:15px;text-align:left;text-decoration:none}.footer__store-hours{margin-top:35px}.footer__copyrights-section{border-top:1px solid;display:flex;justify-content:space-between;padding-bottom:20px;padding-top:20px}.footer__logo{height:30px;width:135px}.footer__payment-icons{align-items:center;display:flex}.footer__wrapper{margin:0 auto;max-width:1280px;padding-left:32px;padding-right:32px;width:100%}@media only screen and (max-width:879px){.footer__wrapper{padding:32px 0 0 24px}}.footer__wrapper--desktop{display:block}@media only screen and (max-width:879px){.footer__wrapper--desktop{display:none}}.footer__wrapper--mobile{display:none}@media only screen and (max-width:879px){.footer__wrapper--mobile{display:block;padding-top:30px}}.footer__copyright{font-size:10px;line-height:22px}.footer__copyright--mobile{display:none}@media only screen and (max-width:879px){.footer__copyright--mobile{display:block;padding:30px 10px 30px 0;text-align:center}}.footer__section-row{display:flex;gap:50%}@media only screen and (max-width:879px){.footer__section-row{gap:unset}}.side-nav{font-family:Martel Sans}.side-nav__errors{align-items:center;color:red;display:flex;font-size:16px;justify-content:center}.side-nav__overlay{background-color:rgba(78,73,73,.51);height:100%;opacity:0;position:fixed;top:0;transition:opacity .5s ease-out 0s,visibility .5s ease-out 0s;width:100%;z-index:99999}.side-nav__overlay--visible{opacity:1;visibility:visible}.side-nav__overlay--hidden{opacity:1;visibility:hidden}.side-nav__content{background-color:#fff;bottom:0;overflow-y:scroll;padding:1.5rem;position:fixed;top:0;transition:left .5s ease-in-out;width:80%;z-index:99999}.side-nav__content--hidden{display:none}.side-nav__content--open{left:0}.side-nav__content--closed{left:-100%}.side-nav__menu-title-wrapper{align-items:center;background-color:transparent;border:none;display:flex;justify-content:space-between;outline:none;width:100%}.side-nav__icon-container{float:right;margin-bottom:10px}.side-nav__menu-title{font-size:14px;font-weight:700;line-height:20px;text-transform:uppercase}.side-nav__accordion-icon{height:auto;width:15px}.side-nav__menu-item{margin-bottom:25px}.side-nav__close-icon{height:20px;margin-left:auto;width:20px}.side-nav__back-button-wrapper{align-items:center;display:flex;margin-bottom:25px}.side-nav__back-icon{height:20px;width:20px}.side-nav__back-button,.side-nav__sub-menu-title{font-weight:700;text-transform:uppercase}.side-nav__sub-menu-title{font-size:14px;margin-bottom:10px}.side-nav__elements{display:flex;flex-direction:column}.side-nav__element{color:#555;cursor:pointer;line-height:20px;margin-bottom:10px}.side-nav__element,.side-nav__sub-link{font-size:14px;font-weight:400;text-transform:capitalize}.side-nav__block-button{background-color:#000;color:#fff;font-weight:700;padding:10px 0;width:100%}.stores-dropdown{align-items:flex-start;display:flex;font-family:Martel Sans;gap:20px;margin-left:auto;margin-right:auto;max-width:1280px;overflow-x:auto;padding:20px 15px}.stores-dropdown__image{height:200px;-o-object-fit:cover;object-fit:cover;width:100%}.stores-dropdown__store-details{flex-basis:20%}.stores-dropdown__title{font-family:El Messiri}.stores-dropdown__main-title,.stores-dropdown__title{font-size:16px;font-weight:400;letter-spacing:3px;margin-top:20px}.stores-dropdown__main-title{font-weight:700;margin-bottom:10px}.stores-dropdown__open-days{font-size:12px;font-weight:700;line-height:20px}.stores-dropdown__open-hours{font-size:12px;font-weight:400;line-height:20px}.stores-dropdown__queries-title{font-family:El Messiri;font-size:16px;font-weight:400;letter-spacing:3px}.stores-dropdown__contact-details{font-size:16px;font-weight:700}.stores-dropdown__view-more{cursor:pointer;font-size:14px;font-weight:400;margin-top:10px;text-transform:capitalize}.dropdown{display:flex;justify-content:space-between;margin-left:auto;margin-right:auto;max-width:1280px;min-height:500px;overflow-x:auto;padding:20px 15px}.dropdown__errors{align-items:center;color:red;display:flex;font-size:16px;justify-content:center;min-height:300px}.dropdown__column{flex:1}.dropdown__column:nth-child(2){flex:2}.dropdown__title{font-family:El Messiri;font-size:16px;font-weight:700;letter-spacing:3px;line-height:1;margin-bottom:20px;text-transform:uppercase}.dropdown__elements{display:flex}.dropdown__elements--column{flex-direction:column}.dropdown__elements--row{flex-flow:row wrap;justify-content:flex-start}.dropdown__element{flex-basis:33.33%;font-family:Martel Sans;font-size:14px;font-weight:400;margin-bottom:10px;text-transform:capitalize}.cover-spinner{align-items:center;background-color:hsla(0,0%,100%,.7);display:flex;height:100%;justify-content:center;min-height:400px;position:relative;top:50%;width:100%;z-index:9999}.cover-spinner:after{animation:spin 1.5s linear infinite;border:4px dotted #000;border-radius:50%;border-top-color:transparent;content:"";display:block;height:40px;position:absolute;width:40px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|