@bonlineza/luxity-lib 2.34.3 → 2.34.5
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 +258 -191
- package/LuxityFooter.js +276 -374
- package/LuxityGraphQLDropdownSelector.js +969 -519
- package/LuxityGraphQLMultiselector.js +321 -167
- package/LuxityMobileHeader.js +351 -253
- package/LuxityPageReady.js +136 -74
- package/LuxitySideNav.js +213 -165
- 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/TestComponent.js +15 -0
- 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 +1711 -1265
- 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/LuxityPageReady.js
CHANGED
|
@@ -8,83 +8,127 @@
|
|
|
8
8
|
EllipsisLoader = EllipsisLoader && Object.prototype.hasOwnProperty.call(EllipsisLoader, 'default') ? EllipsisLoader['default'] : EllipsisLoader;
|
|
9
9
|
PageReady = PageReady && Object.prototype.hasOwnProperty.call(PageReady, 'default') ? PageReady['default'] : PageReady;
|
|
10
10
|
|
|
11
|
-
function
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
function _callSuper(t, o, e) {
|
|
16
|
-
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
17
|
-
}
|
|
18
|
-
function _classCallCheck(a, n) {
|
|
19
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
20
|
-
}
|
|
21
|
-
function _defineProperties(e, r) {
|
|
22
|
-
for (var t = 0; t < r.length; t++) {
|
|
23
|
-
var o = r[t];
|
|
24
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
11
|
+
function _classCallCheck(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
25
14
|
}
|
|
26
15
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
|
|
17
|
+
function _defineProperties(target, props) {
|
|
18
|
+
for (var i = 0; i < props.length; i++) {
|
|
19
|
+
var descriptor = props[i];
|
|
20
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
21
|
+
descriptor.configurable = true;
|
|
22
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
23
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
24
|
+
}
|
|
31
25
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
writable:
|
|
38
|
-
})
|
|
26
|
+
|
|
27
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
28
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
29
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
30
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
31
|
+
writable: false
|
|
32
|
+
});
|
|
33
|
+
return Constructor;
|
|
39
34
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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;
|
|
44
49
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
|
|
51
|
+
function _inherits(subClass, superClass) {
|
|
52
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
53
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
48
57
|
constructor: {
|
|
49
|
-
value:
|
|
50
|
-
writable:
|
|
51
|
-
configurable:
|
|
58
|
+
value: subClass,
|
|
59
|
+
writable: true,
|
|
60
|
+
configurable: true
|
|
52
61
|
}
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(subClass, "prototype", {
|
|
64
|
+
writable: false
|
|
65
|
+
});
|
|
66
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
56
67
|
}
|
|
68
|
+
|
|
69
|
+
function _getPrototypeOf(o) {
|
|
70
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
71
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
72
|
+
};
|
|
73
|
+
return _getPrototypeOf(o);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function _setPrototypeOf(o, p) {
|
|
77
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
78
|
+
o.__proto__ = p;
|
|
79
|
+
return o;
|
|
80
|
+
};
|
|
81
|
+
return _setPrototypeOf(o, p);
|
|
82
|
+
}
|
|
83
|
+
|
|
57
84
|
function _isNativeReflectConstruct() {
|
|
85
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
86
|
+
if (Reflect.construct.sham) return false;
|
|
87
|
+
if (typeof Proxy === "function") return true;
|
|
88
|
+
|
|
58
89
|
try {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function _possibleConstructorReturn(t, e) {
|
|
66
|
-
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
67
|
-
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
68
|
-
return _assertThisInitialized(t);
|
|
90
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
91
|
+
return true;
|
|
92
|
+
} catch (e) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
69
95
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
96
|
+
|
|
97
|
+
function _assertThisInitialized(self) {
|
|
98
|
+
if (self === void 0) {
|
|
99
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return self;
|
|
74
103
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
104
|
+
|
|
105
|
+
function _possibleConstructorReturn(self, call) {
|
|
106
|
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
107
|
+
return call;
|
|
108
|
+
} else if (call !== void 0) {
|
|
109
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
82
110
|
}
|
|
83
|
-
|
|
111
|
+
|
|
112
|
+
return _assertThisInitialized(self);
|
|
84
113
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
114
|
+
|
|
115
|
+
function _createSuper(Derived) {
|
|
116
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
117
|
+
|
|
118
|
+
return function _createSuperInternal() {
|
|
119
|
+
var Super = _getPrototypeOf(Derived),
|
|
120
|
+
result;
|
|
121
|
+
|
|
122
|
+
if (hasNativeReflectConstruct) {
|
|
123
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
124
|
+
|
|
125
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
126
|
+
} else {
|
|
127
|
+
result = Super.apply(this, arguments);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return _possibleConstructorReturn(this, result);
|
|
131
|
+
};
|
|
88
132
|
}
|
|
89
133
|
|
|
90
134
|
var interpretErrorMessage = function interpretErrorMessage(error) {
|
|
@@ -96,39 +140,50 @@
|
|
|
96
140
|
var LuxityPageReadyContext = /*#__PURE__*/React.createContext({
|
|
97
141
|
data: null
|
|
98
142
|
});
|
|
99
|
-
|
|
100
143
|
/**
|
|
101
144
|
* A flavour of PageReady with Luxity customisations
|
|
102
145
|
* 1. the onIsLoading callback is useful to parent components that have more complex data interactions
|
|
103
146
|
* 2. an error message interpreter is supplied from the local helper library
|
|
104
147
|
*/
|
|
148
|
+
|
|
105
149
|
var LuxityPageReady = /*#__PURE__*/function (_React$Component) {
|
|
150
|
+
_inherits(LuxityPageReady, _React$Component);
|
|
151
|
+
|
|
152
|
+
var _super = _createSuper(LuxityPageReady);
|
|
153
|
+
|
|
106
154
|
function LuxityPageReady() {
|
|
107
155
|
var _this;
|
|
156
|
+
|
|
108
157
|
_classCallCheck(this, LuxityPageReady);
|
|
158
|
+
|
|
109
159
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
110
160
|
args[_key] = arguments[_key];
|
|
111
161
|
}
|
|
112
|
-
|
|
113
|
-
|
|
162
|
+
|
|
163
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
164
|
+
|
|
165
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
114
166
|
data: null
|
|
115
167
|
});
|
|
116
|
-
|
|
168
|
+
|
|
169
|
+
_defineProperty(_assertThisInitialized(_this), "refreshPage", function () {
|
|
117
170
|
return _this.pageReadyInstance.initRequest();
|
|
118
171
|
});
|
|
172
|
+
|
|
119
173
|
return _this;
|
|
120
174
|
}
|
|
121
|
-
|
|
122
|
-
|
|
175
|
+
|
|
176
|
+
_createClass(LuxityPageReady, [{
|
|
123
177
|
key: "render",
|
|
124
178
|
value: function render() {
|
|
125
179
|
var _this2 = this;
|
|
180
|
+
|
|
126
181
|
var _this$props = this.props,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
182
|
+
customErrorMessage = _this$props.customErrorMessage,
|
|
183
|
+
customErrorHandler = _this$props.customErrorHandler,
|
|
184
|
+
getRequestPromise = _this$props.getRequestPromise,
|
|
185
|
+
_onData = _this$props.onData,
|
|
186
|
+
children = _this$props.children;
|
|
132
187
|
var data = this.state.data;
|
|
133
188
|
return /*#__PURE__*/React.createElement(PageReady, {
|
|
134
189
|
ref: function ref(inst) {
|
|
@@ -138,15 +193,19 @@
|
|
|
138
193
|
_this2.setState({
|
|
139
194
|
data: res.data
|
|
140
195
|
});
|
|
196
|
+
|
|
141
197
|
_onData(res);
|
|
142
198
|
},
|
|
143
199
|
getRequestInstance: function getRequestInstance() {
|
|
144
200
|
_this2.props.onIsLoading(true);
|
|
201
|
+
|
|
145
202
|
return getRequestPromise().then(function (out) {
|
|
146
203
|
_this2.props.onIsLoading(false);
|
|
204
|
+
|
|
147
205
|
return out;
|
|
148
206
|
}).catch(function (oops) {
|
|
149
207
|
_this2.props.onIsLoading(false);
|
|
208
|
+
|
|
150
209
|
return oops;
|
|
151
210
|
});
|
|
152
211
|
},
|
|
@@ -163,7 +222,10 @@
|
|
|
163
222
|
}, children));
|
|
164
223
|
}
|
|
165
224
|
}]);
|
|
225
|
+
|
|
226
|
+
return LuxityPageReady;
|
|
166
227
|
}(React.Component);
|
|
228
|
+
|
|
167
229
|
LuxityPageReady.defaultProps = {
|
|
168
230
|
onIsLoading: function onIsLoading() {
|
|
169
231
|
return null;
|