@bonlineza/luxity-lib 2.34.2 → 2.34.4
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/Accordion.js +116 -76
- package/AddInterest.js +768 -434
- package/BrandSelector.js +336 -176
- package/Checkbox.js +101 -68
- package/CheckboxButton.js +124 -79
- package/CommunicationPreferenceOptionsRenderer.js +125 -107
- package/CommunicationPreferenceSection.js +134 -114
- package/CommunicationPreferences.js +339 -443
- package/CountryCodeSelect.js +10 -7
- package/CurrencyInputFormatter.js +56 -29
- package/CurrencySelect.js +49 -23
- package/GALink.js +16 -6
- package/GenderSelector.js +142 -88
- package/GraphQLDropdownSelector.js +937 -503
- package/GraphQLMultiSelector.js +274 -141
- package/IconHeader.js +25 -11
- package/IconWrapper.js +7 -3
- package/InterestCatSelector.js +74 -34
- package/InterestItem.js +187 -103
- package/Interests.js +890 -485
- package/InterestsSubheading.js +10 -5
- package/InvertedTextButton.js +63 -27
- package/LuxityAppSideNav.js +21 -18
- package/LuxityDesktopHeader.js +246 -189
- package/LuxityFooter.js +276 -374
- package/LuxityGraphQLDropdownSelector.js +969 -519
- package/LuxityGraphQLMultiselector.js +321 -167
- package/LuxityMobileHeader.js +534 -219
- package/LuxityPageReady.js +136 -74
- package/LuxitySideNav.js +402 -137
- package/MaterialSelector.js +976 -525
- package/ModelSelector.js +976 -525
- package/NotificationDropDown.js +209 -111
- package/Notify.js +1 -0
- package/OutlinePrimaryButton.js +58 -26
- package/PriceRangeSelector.js +281 -168
- package/PrimaryButton.js +58 -26
- package/RadioButtons.js +140 -114
- package/RangeSlider.js +242 -152
- package/RareStepFooter.js +41 -27
- package/RareStepHeader.js +190 -139
- package/ReactSelectWrapper.js +1 -0
- package/SecondaryButton.js +58 -26
- package/ShoeSizeRangeSelector.js +260 -162
- package/ShoeSizeSelector.js +263 -158
- package/SimpleErrorBoundary.js +106 -59
- package/StyleSelector.js +336 -176
- package/TextButton.js +58 -26
- package/Tooltip.js +39 -17
- package/Tracking.js +1 -0
- package/WrapperButton.js +43 -20
- package/build/bundle.css +1 -1
- package/build/bundle.js +1701 -1254
- package/package.json +1 -1
- package/svg/Accessories.js +13 -6
- package/svg/Account.js +13 -6
- package/svg/Add.js +13 -6
- package/svg/ArrowRight.js +13 -6
- package/svg/Bags.js +13 -6
- package/svg/BurgerMenu.js +13 -6
- package/svg/Calendar.js +13 -6
- package/svg/CalendarCircled.js +13 -6
- package/svg/CheckCircled.js +13 -6
- package/svg/Close.js +13 -6
- package/svg/Clothing.js +13 -6
- package/svg/Dot.js +13 -6
- package/svg/Edit.js +13 -6
- package/svg/Eye.js +13 -6
- package/svg/FileAttach.js +13 -6
- package/svg/FileAttachCircled.js +13 -6
- package/svg/LightBulb.js +13 -6
- package/svg/Logo.js +13 -6
- package/svg/LuxityMenu.js +13 -6
- package/svg/Minus.js +13 -6
- package/svg/MobileAvatar.js +13 -6
- package/svg/MyOrder.js +13 -6
- package/svg/MyPayment.js +13 -6
- package/svg/MyProfile.js +14 -8
- package/svg/MySale.js +13 -6
- package/svg/Notification.js +13 -6
- package/svg/PointerDown.js +13 -6
- package/svg/Search.js +13 -6
- package/svg/Shoes.js +13 -6
- package/svg/SvgWrapper.js +7 -3
- package/svg/Trash.js +13 -6
- package/svg/Watches.js +13 -6
package/InterestItem.js
CHANGED
|
@@ -8,123 +8,186 @@
|
|
|
8
8
|
var styled__default = 'default' in styled ? styled['default'] : styled;
|
|
9
9
|
numeral = numeral && Object.prototype.hasOwnProperty.call(numeral, 'default') ? numeral['default'] : numeral;
|
|
10
10
|
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
function ownKeys(object, enumerableOnly) {
|
|
12
|
+
var keys = Object.keys(object);
|
|
13
|
+
|
|
14
|
+
if (Object.getOwnPropertySymbols) {
|
|
15
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
16
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
17
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
18
|
+
})), keys.push.apply(keys, symbols);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return keys;
|
|
14
22
|
}
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
|
|
24
|
+
function _objectSpread2(target) {
|
|
25
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
26
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
27
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
28
|
+
_defineProperty(target, key, source[key]);
|
|
29
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
30
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return target;
|
|
17
35
|
}
|
|
18
|
-
|
|
19
|
-
|
|
36
|
+
|
|
37
|
+
function _classCallCheck(instance, Constructor) {
|
|
38
|
+
if (!(instance instanceof Constructor)) {
|
|
39
|
+
throw new TypeError("Cannot call a class as a function");
|
|
40
|
+
}
|
|
20
41
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
42
|
+
|
|
43
|
+
function _defineProperties(target, props) {
|
|
44
|
+
for (var i = 0; i < props.length; i++) {
|
|
45
|
+
var descriptor = props[i];
|
|
46
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
47
|
+
descriptor.configurable = true;
|
|
48
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
49
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
25
50
|
}
|
|
26
51
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
52
|
+
|
|
53
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
54
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
55
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
56
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
57
|
+
writable: false
|
|
58
|
+
});
|
|
59
|
+
return Constructor;
|
|
31
60
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
61
|
+
|
|
62
|
+
function _defineProperty(obj, key, value) {
|
|
63
|
+
if (key in obj) {
|
|
64
|
+
Object.defineProperty(obj, key, {
|
|
65
|
+
value: value,
|
|
66
|
+
enumerable: true,
|
|
67
|
+
configurable: true,
|
|
68
|
+
writable: true
|
|
69
|
+
});
|
|
70
|
+
} else {
|
|
71
|
+
obj[key] = value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return obj;
|
|
39
75
|
}
|
|
76
|
+
|
|
40
77
|
function _extends() {
|
|
41
|
-
|
|
42
|
-
for (var
|
|
43
|
-
var
|
|
44
|
-
|
|
78
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
79
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
80
|
+
var source = arguments[i];
|
|
81
|
+
|
|
82
|
+
for (var key in source) {
|
|
83
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
84
|
+
target[key] = source[key];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
45
87
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
51
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
52
|
-
}, _getPrototypeOf(t);
|
|
88
|
+
|
|
89
|
+
return target;
|
|
90
|
+
};
|
|
91
|
+
return _extends.apply(this, arguments);
|
|
53
92
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
93
|
+
|
|
94
|
+
function _inherits(subClass, superClass) {
|
|
95
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
96
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
57
100
|
constructor: {
|
|
58
|
-
value:
|
|
59
|
-
writable:
|
|
60
|
-
configurable:
|
|
101
|
+
value: subClass,
|
|
102
|
+
writable: true,
|
|
103
|
+
configurable: true
|
|
61
104
|
}
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(subClass, "prototype", {
|
|
107
|
+
writable: false
|
|
108
|
+
});
|
|
109
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function _getPrototypeOf(o) {
|
|
113
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
114
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
115
|
+
};
|
|
116
|
+
return _getPrototypeOf(o);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function _setPrototypeOf(o, p) {
|
|
120
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
121
|
+
o.__proto__ = p;
|
|
122
|
+
return o;
|
|
123
|
+
};
|
|
124
|
+
return _setPrototypeOf(o, p);
|
|
65
125
|
}
|
|
126
|
+
|
|
66
127
|
function _isNativeReflectConstruct() {
|
|
128
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
129
|
+
if (Reflect.construct.sham) return false;
|
|
130
|
+
if (typeof Proxy === "function") return true;
|
|
131
|
+
|
|
67
132
|
try {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return
|
|
72
|
-
})();
|
|
73
|
-
}
|
|
74
|
-
function ownKeys(e, r) {
|
|
75
|
-
var t = Object.keys(e);
|
|
76
|
-
if (Object.getOwnPropertySymbols) {
|
|
77
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
78
|
-
r && (o = o.filter(function (r) {
|
|
79
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
80
|
-
})), t.push.apply(t, o);
|
|
133
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
134
|
+
return true;
|
|
135
|
+
} catch (e) {
|
|
136
|
+
return false;
|
|
81
137
|
}
|
|
82
|
-
return t;
|
|
83
138
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
_defineProperty(e, r, t[r]);
|
|
89
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
90
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
91
|
-
});
|
|
139
|
+
|
|
140
|
+
function _assertThisInitialized(self) {
|
|
141
|
+
if (self === void 0) {
|
|
142
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
92
143
|
}
|
|
93
|
-
|
|
144
|
+
|
|
145
|
+
return self;
|
|
94
146
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (
|
|
98
|
-
|
|
147
|
+
|
|
148
|
+
function _possibleConstructorReturn(self, call) {
|
|
149
|
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
150
|
+
return call;
|
|
151
|
+
} else if (call !== void 0) {
|
|
152
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return _assertThisInitialized(self);
|
|
99
156
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
157
|
+
|
|
158
|
+
function _createSuper(Derived) {
|
|
159
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
160
|
+
|
|
161
|
+
return function _createSuperInternal() {
|
|
162
|
+
var Super = _getPrototypeOf(Derived),
|
|
163
|
+
result;
|
|
164
|
+
|
|
165
|
+
if (hasNativeReflectConstruct) {
|
|
166
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
167
|
+
|
|
168
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
169
|
+
} else {
|
|
170
|
+
result = Super.apply(this, arguments);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return _possibleConstructorReturn(this, result);
|
|
174
|
+
};
|
|
104
175
|
}
|
|
105
|
-
|
|
106
|
-
|
|
176
|
+
|
|
177
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
178
|
+
if (!raw) {
|
|
179
|
+
raw = strings.slice(0);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
107
183
|
raw: {
|
|
108
|
-
value: Object.freeze(
|
|
184
|
+
value: Object.freeze(raw)
|
|
109
185
|
}
|
|
110
186
|
}));
|
|
111
187
|
}
|
|
112
|
-
function _toPrimitive(t, r) {
|
|
113
|
-
if ("object" != typeof t || !t) return t;
|
|
114
|
-
var e = t[Symbol.toPrimitive];
|
|
115
|
-
if (void 0 !== e) {
|
|
116
|
-
var i = e.call(t, r || "default");
|
|
117
|
-
if ("object" != typeof i) return i;
|
|
118
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
119
|
-
}
|
|
120
|
-
return ("string" === r ? String : Number)(t);
|
|
121
|
-
}
|
|
122
|
-
function _toPropertyKey(t) {
|
|
123
|
-
var i = _toPrimitive(t, "string");
|
|
124
|
-
return "symbol" == typeof i ? i : i + "";
|
|
125
|
-
}
|
|
126
188
|
|
|
127
|
-
|
|
189
|
+
/** @format */
|
|
190
|
+
|
|
128
191
|
numeral.register('locale', 'en-ZA', {
|
|
129
192
|
delimiters: {
|
|
130
193
|
thousands: ',',
|
|
@@ -145,12 +208,12 @@
|
|
|
145
208
|
});
|
|
146
209
|
numeral.locale('en-ZA');
|
|
147
210
|
String.locale = numeral.locale;
|
|
148
|
-
|
|
149
211
|
/**
|
|
150
212
|
* Curreny Formatter
|
|
151
213
|
* @param {number} number - the number to be formatted
|
|
152
214
|
* @param {boolean} round - flag to indicate if the number needs to be rounded off
|
|
153
215
|
*/
|
|
216
|
+
|
|
154
217
|
function fC(number) {
|
|
155
218
|
var round = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
156
219
|
var parsedNumber = parseFloat(number);
|
|
@@ -158,7 +221,6 @@
|
|
|
158
221
|
}
|
|
159
222
|
|
|
160
223
|
/** @format */
|
|
161
|
-
|
|
162
224
|
var request = {
|
|
163
225
|
fetching: false,
|
|
164
226
|
failed: false,
|
|
@@ -306,35 +368,48 @@
|
|
|
306
368
|
|
|
307
369
|
var _templateObject$2, _templateObject2, _templateObject3, _templateObject4;
|
|
308
370
|
var MALE = genders.MALE,
|
|
309
|
-
|
|
310
|
-
|
|
371
|
+
FEMALE = genders.FEMALE,
|
|
372
|
+
UNISEX = genders.UNISEX;
|
|
373
|
+
|
|
311
374
|
var TrashIcon = function TrashIcon(_ref) {
|
|
312
375
|
var onClick = _ref.onClick,
|
|
313
|
-
|
|
376
|
+
id = _ref.id;
|
|
314
377
|
return /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
315
378
|
onClick: onClick,
|
|
316
379
|
id: id
|
|
317
380
|
}, /*#__PURE__*/React__default.createElement(SvgWrapper, null, /*#__PURE__*/React__default.createElement(Trash, null)));
|
|
318
381
|
};
|
|
382
|
+
|
|
319
383
|
var InterestItem = /*#__PURE__*/function (_React$Component) {
|
|
384
|
+
_inherits(InterestItem, _React$Component);
|
|
385
|
+
|
|
386
|
+
var _super = _createSuper(InterestItem);
|
|
387
|
+
|
|
320
388
|
function InterestItem(props) {
|
|
321
389
|
var _this;
|
|
390
|
+
|
|
322
391
|
_classCallCheck(this, InterestItem);
|
|
323
|
-
|
|
324
|
-
|
|
392
|
+
|
|
393
|
+
_this = _super.call(this, props);
|
|
394
|
+
|
|
395
|
+
_defineProperty(_assertThisInitialized(_this), "deleteInterestItem", function () {
|
|
325
396
|
var id = _this.props.data.id;
|
|
397
|
+
|
|
326
398
|
_this.setState({
|
|
327
399
|
delete: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
328
400
|
fetching: true
|
|
329
401
|
})
|
|
330
402
|
});
|
|
403
|
+
|
|
331
404
|
var url = _this.props.deleteInterestApi(id);
|
|
405
|
+
|
|
332
406
|
simpleRequest(_this.props.requestInstance, url, method.DELETE, null, function () {
|
|
333
407
|
_this.setState({
|
|
334
408
|
delete: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
335
409
|
success: true
|
|
336
410
|
})
|
|
337
411
|
});
|
|
412
|
+
|
|
338
413
|
_this.props.onDeleted(_this.props.data);
|
|
339
414
|
}, function () {
|
|
340
415
|
return _this.setState({
|
|
@@ -342,25 +417,32 @@
|
|
|
342
417
|
});
|
|
343
418
|
});
|
|
344
419
|
});
|
|
345
|
-
|
|
420
|
+
|
|
421
|
+
_defineProperty(_assertThisInitialized(_this), "getGender", function (gender) {
|
|
346
422
|
switch (gender) {
|
|
347
423
|
case MALE:
|
|
348
424
|
return 'Male';
|
|
425
|
+
|
|
349
426
|
case FEMALE:
|
|
350
427
|
return 'Female';
|
|
428
|
+
|
|
351
429
|
case UNISEX:
|
|
352
430
|
default:
|
|
353
431
|
return 'Unisex';
|
|
354
432
|
}
|
|
355
433
|
});
|
|
356
|
-
|
|
434
|
+
|
|
435
|
+
_defineProperty(_assertThisInitialized(_this), "getCategory", function (category) {
|
|
357
436
|
if (category === interestCategories.APPAREL) {
|
|
358
437
|
return 'CLOTHING';
|
|
359
438
|
}
|
|
439
|
+
|
|
360
440
|
return category;
|
|
361
441
|
});
|
|
362
|
-
|
|
442
|
+
|
|
443
|
+
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
363
444
|
var _data$min_shoe_size, _data$max_shoe_size;
|
|
445
|
+
|
|
364
446
|
var data = _this.props.data;
|
|
365
447
|
var success = _this.state.delete.success;
|
|
366
448
|
return /*#__PURE__*/React__default.createElement(InterestItemContainer, {
|
|
@@ -410,14 +492,16 @@
|
|
|
410
492
|
}
|
|
411
493
|
}));
|
|
412
494
|
});
|
|
495
|
+
|
|
413
496
|
_this.state = {
|
|
414
497
|
delete: _objectSpread2({}, request)
|
|
415
498
|
};
|
|
416
499
|
return _this;
|
|
417
500
|
}
|
|
418
|
-
|
|
501
|
+
|
|
419
502
|
return _createClass(InterestItem);
|
|
420
503
|
}(React__default.Component);
|
|
504
|
+
|
|
421
505
|
var SheoSizeContentDiv = styled__default.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n @media (max-width: ", ") {\n display: none;\n }\n"])), media.xs);
|
|
422
506
|
var InterestItemTitle = styled__default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-weight: bold;\n display: none;\n\n @media (max-width: ", ") {\n display: inline;\n }\n"])), media.xs);
|
|
423
507
|
var InterestItemContainer = styled__default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n\n .no-shoe-size-section {\n @media (max-width: ", ") {\n display: none;\n }\n }\n"])), media.xs);
|
|
@@ -433,11 +517,11 @@
|
|
|
433
517
|
return props.theme.marginPaddings[0];
|
|
434
518
|
}, media.xs);
|
|
435
519
|
var ThemedInterestItem = themed(InterestItem);
|
|
436
|
-
|
|
437
520
|
/**
|
|
438
521
|
* The Interest Item view shows the selected interest configuration,
|
|
439
522
|
* and gives user control to delete it.
|
|
440
523
|
*/
|
|
524
|
+
|
|
441
525
|
var index = (function (props) {
|
|
442
526
|
return /*#__PURE__*/React__default.createElement(ThemedInterestItem, props);
|
|
443
527
|
});
|