@bonlineza/luxity-lib 2.39.6 → 2.39.8

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.
Files changed (92) hide show
  1. package/Accordion.js +352 -342
  2. package/AddInterest.js +3179 -3136
  3. package/AddProductInterest.js +7584 -1011
  4. package/BrandSelector.js +861 -854
  5. package/Checkbox.js +250 -240
  6. package/CheckboxButton.js +236 -229
  7. package/CommunicationPreferenceOptionsRenderer.js +568 -560
  8. package/CommunicationPreferenceSection.js +659 -651
  9. package/CommunicationPreferences.js +2402 -2394
  10. package/ConditionSelector.js +859 -852
  11. package/CountryCodeSelect.js +6650 -79
  12. package/CurrencyInputFormatter.js +96 -86
  13. package/CurrencySelect.js +227 -219
  14. package/DropdownSelector.js +6820 -211
  15. package/GALink.js +51 -43
  16. package/GenderSelector.js +362 -355
  17. package/GraphQLDropdownSelector.js +11914 -5307
  18. package/GraphQLMultiSelector.js +601 -593
  19. package/IconHeader.js +126 -118
  20. package/IconWrapper.js +25 -17
  21. package/InterestCatSelector.js +432 -424
  22. package/InterestItem.js +470 -462
  23. package/Interests.js +11324 -4717
  24. package/InterestsSubheading.js +41 -33
  25. package/InvertedTextButton.js +175 -167
  26. package/LuxityAppSideNav.js +189 -181
  27. package/LuxityDesktopHeader.js +1363 -1355
  28. package/LuxityFooter.js +2236 -2228
  29. package/LuxityGraphQLDropdownSelector.js +11999 -5392
  30. package/LuxityGraphQLMultiselector.js +785 -778
  31. package/LuxityMobileHeader.js +1794 -1786
  32. package/LuxityPageReady.js +209 -199
  33. package/LuxityProductInterestItem.js +367 -359
  34. package/LuxitySideNav.js +673 -665
  35. package/MaterialSelector.js +12029 -5422
  36. package/ModelSelector.js +12029 -5422
  37. package/NotificationDropDown.js +7029 -459
  38. package/Notify.js +32 -20
  39. package/OutlinePrimaryButton.js +142 -134
  40. package/PriceRangeSelector.js +1277 -1264
  41. package/PrimaryButton.js +137 -129
  42. package/RadioButtons.js +318 -308
  43. package/RangeSlider.js +1039 -1033
  44. package/RareStepFooter.js +264 -257
  45. package/RareStepHeader.js +808 -801
  46. package/ReactSelectWrapper.js +6604 -33
  47. package/SecondaryButton.js +152 -144
  48. package/ShoeSizeRangeSelector.js +1153 -1147
  49. package/ShoeSizeSelector.js +1198 -1146
  50. package/SimpleErrorBoundary.js +138 -130
  51. package/StyleSelector.js +861 -854
  52. package/TextButton.js +143 -135
  53. package/Tooltip.js +184 -176
  54. package/Tracking.js +25 -15
  55. package/WrapperButton.js +58 -50
  56. package/build/bundle.css +1 -1
  57. package/build/bundle.js +17272 -10631
  58. package/build/constants.js +45 -32
  59. package/package.json +3 -2
  60. package/svg/Accessories.js +42 -34
  61. package/svg/Account.js +38 -30
  62. package/svg/Add.js +39 -31
  63. package/svg/ArrowRight.js +36 -28
  64. package/svg/Bags.js +48 -40
  65. package/svg/BurgerMenu.js +32 -24
  66. package/svg/Calendar.js +106 -98
  67. package/svg/CalendarCircled.js +108 -100
  68. package/svg/CheckCircled.js +40 -32
  69. package/svg/Close.js +37 -29
  70. package/svg/Clothing.js +44 -36
  71. package/svg/Dot.js +40 -32
  72. package/svg/Edit.js +35 -27
  73. package/svg/Eye.js +36 -28
  74. package/svg/FileAttach.js +36 -28
  75. package/svg/FileAttachCircled.js +38 -30
  76. package/svg/Jewellery.js +57 -49
  77. package/svg/LightBulb.js +66 -58
  78. package/svg/Logo.js +140 -132
  79. package/svg/LuxityMenu.js +36 -28
  80. package/svg/Minus.js +37 -29
  81. package/svg/MobileAvatar.js +36 -28
  82. package/svg/MyOrder.js +44 -36
  83. package/svg/MyPayment.js +44 -36
  84. package/svg/MyProfile.js +52 -44
  85. package/svg/MySale.js +39 -31
  86. package/svg/Notification.js +38 -30
  87. package/svg/PointerDown.js +36 -28
  88. package/svg/Search.js +35 -27
  89. package/svg/Shoes.js +45 -37
  90. package/svg/SvgWrapper.js +21 -13
  91. package/svg/Trash.js +40 -32
  92. package/svg/Watches.js +55 -47
@@ -1,237 +1,247 @@
1
- import React from 'react';
2
- import EllipsisLoader from '@bonlineza/b-lib/EllipsisLoader';
3
- import PageReady from '@bonlineza/b-lib/PageReady';
4
-
5
- function _classCallCheck(instance, Constructor) {
6
- if (!(instance instanceof Constructor)) {
7
- throw new TypeError("Cannot call a class as a function");
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady'], factory) :
4
+ (global = global || self, factory(global.LuxityPageReady = {}, global.React, global.EllipsisLoader, global.PageReady));
5
+ }(this, (function (exports, React, EllipsisLoader, PageReady) { 'use strict';
6
+
7
+ React = React && Object.prototype.hasOwnProperty.call(React, 'default') ? React['default'] : React;
8
+ EllipsisLoader = EllipsisLoader && Object.prototype.hasOwnProperty.call(EllipsisLoader, 'default') ? EllipsisLoader['default'] : EllipsisLoader;
9
+ PageReady = PageReady && Object.prototype.hasOwnProperty.call(PageReady, 'default') ? PageReady['default'] : PageReady;
10
+
11
+ function _classCallCheck(instance, Constructor) {
12
+ if (!(instance instanceof Constructor)) {
13
+ throw new TypeError("Cannot call a class as a function");
14
+ }
8
15
  }
9
- }
10
-
11
- function _defineProperties(target, props) {
12
- for (var i = 0; i < props.length; i++) {
13
- var descriptor = props[i];
14
- descriptor.enumerable = descriptor.enumerable || false;
15
- descriptor.configurable = true;
16
- if ("value" in descriptor) descriptor.writable = true;
17
- Object.defineProperty(target, descriptor.key, descriptor);
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
+ }
18
25
  }
19
- }
20
26
 
21
- function _createClass(Constructor, protoProps, staticProps) {
22
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
23
- if (staticProps) _defineProperties(Constructor, staticProps);
24
- Object.defineProperty(Constructor, "prototype", {
25
- writable: false
26
- });
27
- return Constructor;
28
- }
29
-
30
- function _defineProperty(obj, key, value) {
31
- if (key in obj) {
32
- Object.defineProperty(obj, key, {
33
- value: value,
34
- enumerable: true,
35
- configurable: true,
36
- writable: true
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
37
32
  });
38
- } else {
39
- obj[key] = value;
33
+ return Constructor;
40
34
  }
41
35
 
42
- return obj;
43
- }
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
+ }
44
47
 
45
- function _inherits(subClass, superClass) {
46
- if (typeof superClass !== "function" && superClass !== null) {
47
- throw new TypeError("Super expression must either be null or a function");
48
+ return obj;
48
49
  }
49
50
 
50
- subClass.prototype = Object.create(superClass && superClass.prototype, {
51
- constructor: {
52
- value: subClass,
53
- writable: true,
54
- configurable: true
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");
55
54
  }
56
- });
57
- Object.defineProperty(subClass, "prototype", {
58
- writable: false
59
- });
60
- if (superClass) _setPrototypeOf(subClass, superClass);
61
- }
62
55
 
63
- function _getPrototypeOf(o) {
64
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
65
- return o.__proto__ || Object.getPrototypeOf(o);
66
- };
67
- return _getPrototypeOf(o);
68
- }
56
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
57
+ constructor: {
58
+ value: subClass,
59
+ writable: true,
60
+ configurable: true
61
+ }
62
+ });
63
+ Object.defineProperty(subClass, "prototype", {
64
+ writable: false
65
+ });
66
+ if (superClass) _setPrototypeOf(subClass, superClass);
67
+ }
69
68
 
70
- function _setPrototypeOf(o, p) {
71
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
72
- o.__proto__ = p;
73
- return o;
74
- };
75
- return _setPrototypeOf(o, p);
76
- }
77
-
78
- function _isNativeReflectConstruct() {
79
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
80
- if (Reflect.construct.sham) return false;
81
- if (typeof Proxy === "function") return true;
82
-
83
- try {
84
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
85
- return true;
86
- } catch (e) {
87
- return false;
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);
88
74
  }
89
- }
90
75
 
91
- function _assertThisInitialized(self) {
92
- if (self === void 0) {
93
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
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);
94
82
  }
95
83
 
96
- return self;
97
- }
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;
98
88
 
99
- function _possibleConstructorReturn(self, call) {
100
- if (call && (typeof call === "object" || typeof call === "function")) {
101
- return call;
102
- } else if (call !== void 0) {
103
- throw new TypeError("Derived constructors may only return object or undefined");
89
+ try {
90
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
91
+ return true;
92
+ } catch (e) {
93
+ return false;
94
+ }
104
95
  }
105
96
 
106
- return _assertThisInitialized(self);
107
- }
97
+ function _assertThisInitialized(self) {
98
+ if (self === void 0) {
99
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
100
+ }
108
101
 
109
- function _createSuper(Derived) {
110
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
102
+ return self;
103
+ }
111
104
 
112
- return function _createSuperInternal() {
113
- var Super = _getPrototypeOf(Derived),
114
- result;
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");
110
+ }
115
111
 
116
- if (hasNativeReflectConstruct) {
117
- var NewTarget = _getPrototypeOf(this).constructor;
112
+ return _assertThisInitialized(self);
113
+ }
118
114
 
119
- result = Reflect.construct(Super, arguments, NewTarget);
120
- } else {
121
- result = Super.apply(this, arguments);
122
- }
115
+ function _createSuper(Derived) {
116
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
123
117
 
124
- return _possibleConstructorReturn(this, result);
125
- };
126
- }
118
+ return function _createSuperInternal() {
119
+ var Super = _getPrototypeOf(Derived),
120
+ result;
127
121
 
128
- var interpretErrorMessage = function interpretErrorMessage(error) {
129
- var customMessage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Failed: :error_code';
130
- var message = customMessage || 'Network Error';
131
- return message.replace(':error_code', error.status || 'Network Down');
132
- };
122
+ if (hasNativeReflectConstruct) {
123
+ var NewTarget = _getPrototypeOf(this).constructor;
133
124
 
134
- var LuxityPageReadyContext = /*#__PURE__*/React.createContext({
135
- data: null
136
- });
137
- /**
138
- * A flavour of PageReady with Luxity customisations
139
- * 1. the onIsLoading callback is useful to parent components that have more complex data interactions
140
- * 2. an error message interpreter is supplied from the local helper library
141
- */
125
+ result = Reflect.construct(Super, arguments, NewTarget);
126
+ } else {
127
+ result = Super.apply(this, arguments);
128
+ }
142
129
 
143
- var LuxityPageReady = /*#__PURE__*/function (_React$Component) {
144
- _inherits(LuxityPageReady, _React$Component);
130
+ return _possibleConstructorReturn(this, result);
131
+ };
132
+ }
145
133
 
146
- var _super = _createSuper(LuxityPageReady);
134
+ var interpretErrorMessage = function interpretErrorMessage(error) {
135
+ var customMessage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Failed: :error_code';
136
+ var message = customMessage || 'Network Error';
137
+ return message.replace(':error_code', error.status || 'Network Down');
138
+ };
147
139
 
148
- function LuxityPageReady() {
149
- var _this;
140
+ var LuxityPageReadyContext = /*#__PURE__*/React.createContext({
141
+ data: null
142
+ });
143
+ /**
144
+ * A flavour of PageReady with Luxity customisations
145
+ * 1. the onIsLoading callback is useful to parent components that have more complex data interactions
146
+ * 2. an error message interpreter is supplied from the local helper library
147
+ */
150
148
 
151
- _classCallCheck(this, LuxityPageReady);
149
+ var LuxityPageReady = /*#__PURE__*/function (_React$Component) {
150
+ _inherits(LuxityPageReady, _React$Component);
152
151
 
153
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
154
- args[_key] = arguments[_key];
155
- }
152
+ var _super = _createSuper(LuxityPageReady);
156
153
 
157
- _this = _super.call.apply(_super, [this].concat(args));
154
+ function LuxityPageReady() {
155
+ var _this;
158
156
 
159
- _defineProperty(_assertThisInitialized(_this), "state", {
160
- data: null
161
- });
157
+ _classCallCheck(this, LuxityPageReady);
162
158
 
163
- _defineProperty(_assertThisInitialized(_this), "refreshPage", function () {
164
- return _this.pageReadyInstance.initRequest();
165
- });
159
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
160
+ args[_key] = arguments[_key];
161
+ }
166
162
 
167
- return _this;
168
- }
163
+ _this = _super.call.apply(_super, [this].concat(args));
164
+
165
+ _defineProperty(_assertThisInitialized(_this), "state", {
166
+ data: null
167
+ });
168
+
169
+ _defineProperty(_assertThisInitialized(_this), "refreshPage", function () {
170
+ return _this.pageReadyInstance.initRequest();
171
+ });
169
172
 
170
- _createClass(LuxityPageReady, [{
171
- key: "render",
172
- value: function render() {
173
- var _this2 = this;
174
-
175
- var _this$props = this.props,
176
- customErrorMessage = _this$props.customErrorMessage,
177
- customErrorHandler = _this$props.customErrorHandler,
178
- getRequestPromise = _this$props.getRequestPromise,
179
- _onData = _this$props.onData,
180
- children = _this$props.children;
181
- var data = this.state.data;
182
- return /*#__PURE__*/React.createElement(PageReady, {
183
- ref: function ref(inst) {
184
- _this2.pageReadyInstance = inst;
185
- },
186
- onData: function onData(res) {
187
- _this2.setState({
188
- data: res.data
189
- });
190
-
191
- _onData(res);
192
- },
193
- getRequestInstance: function getRequestInstance() {
194
- _this2.props.onIsLoading(true);
195
-
196
- return getRequestPromise().then(function (out) {
197
- _this2.props.onIsLoading(false);
198
-
199
- return out;
200
- }).catch(function (oops) {
201
- _this2.props.onIsLoading(false);
202
-
203
- return oops;
204
- });
205
- },
206
- customErrorMessage: customErrorMessage,
207
- customErrorHandler: customErrorHandler,
208
- renderCustomLoader: function renderCustomLoader() {
209
- return /*#__PURE__*/React.createElement(EllipsisLoader, null);
210
- },
211
- errorMessageInterpreter: interpretErrorMessage
212
- }, /*#__PURE__*/React.createElement(LuxityPageReadyContext.Provider, {
213
- value: {
214
- data: data
215
- }
216
- }, children));
173
+ return _this;
217
174
  }
218
- }]);
219
-
220
- return LuxityPageReady;
221
- }(React.Component);
222
-
223
- LuxityPageReady.defaultProps = {
224
- onIsLoading: function onIsLoading() {
225
- return null;
226
- },
227
- customErrorMessage: '',
228
- customErrorHandler: function customErrorHandler() {
229
- return null;
230
- },
231
- onData: function onData() {
232
- return null;
233
- }
234
- };
235
175
 
236
- export default LuxityPageReady;
237
- export { LuxityPageReadyContext };
176
+ _createClass(LuxityPageReady, [{
177
+ key: "render",
178
+ value: function render() {
179
+ var _this2 = this;
180
+
181
+ var _this$props = this.props,
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;
187
+ var data = this.state.data;
188
+ return /*#__PURE__*/React.createElement(PageReady, {
189
+ ref: function ref(inst) {
190
+ _this2.pageReadyInstance = inst;
191
+ },
192
+ onData: function onData(res) {
193
+ _this2.setState({
194
+ data: res.data
195
+ });
196
+
197
+ _onData(res);
198
+ },
199
+ getRequestInstance: function getRequestInstance() {
200
+ _this2.props.onIsLoading(true);
201
+
202
+ return getRequestPromise().then(function (out) {
203
+ _this2.props.onIsLoading(false);
204
+
205
+ return out;
206
+ }).catch(function (oops) {
207
+ _this2.props.onIsLoading(false);
208
+
209
+ return oops;
210
+ });
211
+ },
212
+ customErrorMessage: customErrorMessage,
213
+ customErrorHandler: customErrorHandler,
214
+ renderCustomLoader: function renderCustomLoader() {
215
+ return /*#__PURE__*/React.createElement(EllipsisLoader, null);
216
+ },
217
+ errorMessageInterpreter: interpretErrorMessage
218
+ }, /*#__PURE__*/React.createElement(LuxityPageReadyContext.Provider, {
219
+ value: {
220
+ data: data
221
+ }
222
+ }, children));
223
+ }
224
+ }]);
225
+
226
+ return LuxityPageReady;
227
+ }(React.Component);
228
+
229
+ LuxityPageReady.defaultProps = {
230
+ onIsLoading: function onIsLoading() {
231
+ return null;
232
+ },
233
+ customErrorMessage: '',
234
+ customErrorHandler: function customErrorHandler() {
235
+ return null;
236
+ },
237
+ onData: function onData() {
238
+ return null;
239
+ }
240
+ };
241
+
242
+ exports.LuxityPageReadyContext = LuxityPageReadyContext;
243
+ exports.default = LuxityPageReady;
244
+
245
+ Object.defineProperty(exports, '__esModule', { value: true });
246
+
247
+ })));