@bonlineza/luxity-lib 2.39.4 → 2.39.6

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 (96) hide show
  1. package/Accordion.js +342 -352
  2. package/AddInterest.js +3109 -3068
  3. package/AddProductInterest.js +999 -7572
  4. package/BrandSelector.js +854 -861
  5. package/Checkbox.js +240 -250
  6. package/CheckboxButton.js +229 -236
  7. package/CommunicationPreferenceOptionsRenderer.js +560 -568
  8. package/CommunicationPreferenceSection.js +651 -659
  9. package/CommunicationPreferences.js +2394 -2402
  10. package/ConditionSelector.js +852 -859
  11. package/CountryCodeSelect.js +79 -6650
  12. package/CurrencyInputFormatter.js +86 -96
  13. package/CurrencySelect.js +219 -227
  14. package/DropdownSelector.js +212 -6821
  15. package/GALink.js +43 -51
  16. package/GenderSelector.js +355 -362
  17. package/GraphQLDropdownSelector.js +5308 -11832
  18. package/GraphQLMultiSelector.js +593 -601
  19. package/IconHeader.js +118 -126
  20. package/IconWrapper.js +17 -25
  21. package/InterestCatSelector.js +424 -389
  22. package/InterestItem.js +462 -469
  23. package/Interests.js +4719 -11243
  24. package/InterestsSubheading.js +33 -41
  25. package/InvertedTextButton.js +167 -175
  26. package/LuxityAppSideNav.js +181 -189
  27. package/LuxityDesktopHeader.js +1355 -1363
  28. package/LuxityFooter.js +2228 -2236
  29. package/LuxityGraphQLDropdownSelector.js +5395 -11919
  30. package/LuxityGraphQLMultiselector.js +778 -785
  31. package/LuxityMobileHeader.js +1786 -1794
  32. package/LuxityPageReady.js +199 -209
  33. package/LuxityProductInterestItem.js +359 -367
  34. package/LuxitySideNav.js +665 -673
  35. package/MaterialSelector.js +5430 -11954
  36. package/ModelSelector.js +5430 -11954
  37. package/NotificationDropDown.js +459 -7030
  38. package/Notify.js +20 -32
  39. package/OutlinePrimaryButton.js +134 -142
  40. package/PriceRangeSelector.js +1264 -1265
  41. package/PrimaryButton.js +129 -137
  42. package/RadioButtons.js +308 -318
  43. package/RangeSlider.js +1033 -1039
  44. package/RareStepFooter.js +257 -264
  45. package/RareStepHeader.js +801 -808
  46. package/ReactSelectWrapper.js +33 -6604
  47. package/SecondaryButton.js +144 -152
  48. package/ShoeSizeRangeSelector.js +1147 -1153
  49. package/ShoeSizeSelector.js +1146 -1154
  50. package/SimpleErrorBoundary.js +130 -138
  51. package/StyleSelector.js +854 -861
  52. package/TestComponent.js +15 -0
  53. package/TextButton.js +135 -143
  54. package/Tooltip.js +176 -184
  55. package/Tracking.js +15 -25
  56. package/WrapperButton.js +50 -58
  57. package/build/CountryCodeSelect/index.js +18 -0
  58. package/build/ReactSelectWrapper/index.js +34 -0
  59. package/build/bundle.css +1 -1
  60. package/build/bundle.js +10634 -17192
  61. package/build/constants.js +32 -43
  62. package/package.json +2 -2
  63. package/postcss.config.js +6 -0
  64. package/svg/Accessories.js +34 -42
  65. package/svg/Account.js +30 -38
  66. package/svg/Add.js +31 -39
  67. package/svg/ArrowRight.js +28 -36
  68. package/svg/Bags.js +40 -48
  69. package/svg/BurgerMenu.js +24 -32
  70. package/svg/Calendar.js +98 -106
  71. package/svg/CalendarCircled.js +100 -108
  72. package/svg/CheckCircled.js +32 -40
  73. package/svg/Close.js +29 -37
  74. package/svg/Clothing.js +36 -44
  75. package/svg/Dot.js +32 -40
  76. package/svg/Edit.js +27 -35
  77. package/svg/Eye.js +28 -36
  78. package/svg/FileAttach.js +28 -36
  79. package/svg/FileAttachCircled.js +30 -38
  80. package/svg/Jewellery.js +56 -0
  81. package/svg/LightBulb.js +58 -66
  82. package/svg/Logo.js +132 -140
  83. package/svg/LuxityMenu.js +28 -36
  84. package/svg/Minus.js +29 -37
  85. package/svg/MobileAvatar.js +28 -36
  86. package/svg/MyOrder.js +36 -44
  87. package/svg/MyPayment.js +36 -44
  88. package/svg/MyProfile.js +44 -52
  89. package/svg/MySale.js +31 -39
  90. package/svg/Notification.js +30 -38
  91. package/svg/PointerDown.js +28 -36
  92. package/svg/Search.js +27 -35
  93. package/svg/Shoes.js +37 -45
  94. package/svg/SvgWrapper.js +13 -21
  95. package/svg/Trash.js +32 -40
  96. package/svg/Watches.js +47 -55
@@ -1,247 +1,237 @@
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
- }
15
- }
1
+ import React from 'react';
2
+ import EllipsisLoader from '@bonlineza/b-lib/EllipsisLoader';
3
+ import PageReady from '@bonlineza/b-lib/PageReady';
16
4
 
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
- }
5
+ function _classCallCheck(instance, Constructor) {
6
+ if (!(instance instanceof Constructor)) {
7
+ throw new TypeError("Cannot call a class as a function");
25
8
  }
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);
18
+ }
19
+ }
26
20
 
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
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
32
37
  });
33
- return Constructor;
38
+ } else {
39
+ obj[key] = value;
34
40
  }
35
41
 
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
- }
42
+ return obj;
43
+ }
47
44
 
48
- return obj;
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");
49
48
  }
50
49
 
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");
50
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
51
+ constructor: {
52
+ value: subClass,
53
+ writable: true,
54
+ configurable: true
54
55
  }
56
+ });
57
+ Object.defineProperty(subClass, "prototype", {
58
+ writable: false
59
+ });
60
+ if (superClass) _setPrototypeOf(subClass, superClass);
61
+ }
55
62
 
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
- }
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
-
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;
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
+ }
88
69
 
89
- try {
90
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
91
- return true;
92
- } catch (e) {
93
- return false;
94
- }
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;
95
88
  }
89
+ }
96
90
 
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;
91
+ function _assertThisInitialized(self) {
92
+ if (self === void 0) {
93
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
103
94
  }
104
95
 
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
- }
96
+ return self;
97
+ }
111
98
 
112
- return _assertThisInitialized(self);
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");
113
104
  }
114
105
 
115
- function _createSuper(Derived) {
116
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
106
+ return _assertThisInitialized(self);
107
+ }
117
108
 
118
- return function _createSuperInternal() {
119
- var Super = _getPrototypeOf(Derived),
120
- result;
109
+ function _createSuper(Derived) {
110
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
121
111
 
122
- if (hasNativeReflectConstruct) {
123
- var NewTarget = _getPrototypeOf(this).constructor;
112
+ return function _createSuperInternal() {
113
+ var Super = _getPrototypeOf(Derived),
114
+ result;
124
115
 
125
- result = Reflect.construct(Super, arguments, NewTarget);
126
- } else {
127
- result = Super.apply(this, arguments);
128
- }
116
+ if (hasNativeReflectConstruct) {
117
+ var NewTarget = _getPrototypeOf(this).constructor;
129
118
 
130
- return _possibleConstructorReturn(this, result);
131
- };
132
- }
119
+ result = Reflect.construct(Super, arguments, NewTarget);
120
+ } else {
121
+ result = Super.apply(this, arguments);
122
+ }
133
123
 
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');
124
+ return _possibleConstructorReturn(this, result);
138
125
  };
126
+ }
139
127
 
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
- */
148
-
149
- var LuxityPageReady = /*#__PURE__*/function (_React$Component) {
150
- _inherits(LuxityPageReady, _React$Component);
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
+ };
151
133
 
152
- var _super = _createSuper(LuxityPageReady);
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
+ */
153
142
 
154
- function LuxityPageReady() {
155
- var _this;
143
+ var LuxityPageReady = /*#__PURE__*/function (_React$Component) {
144
+ _inherits(LuxityPageReady, _React$Component);
156
145
 
157
- _classCallCheck(this, LuxityPageReady);
146
+ var _super = _createSuper(LuxityPageReady);
158
147
 
159
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
160
- args[_key] = arguments[_key];
161
- }
148
+ function LuxityPageReady() {
149
+ var _this;
162
150
 
163
- _this = _super.call.apply(_super, [this].concat(args));
151
+ _classCallCheck(this, LuxityPageReady);
164
152
 
165
- _defineProperty(_assertThisInitialized(_this), "state", {
166
- data: null
167
- });
153
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
154
+ args[_key] = arguments[_key];
155
+ }
168
156
 
169
- _defineProperty(_assertThisInitialized(_this), "refreshPage", function () {
170
- return _this.pageReadyInstance.initRequest();
171
- });
157
+ _this = _super.call.apply(_super, [this].concat(args));
172
158
 
173
- return _this;
174
- }
159
+ _defineProperty(_assertThisInitialized(_this), "state", {
160
+ data: null
161
+ });
175
162
 
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
- };
163
+ _defineProperty(_assertThisInitialized(_this), "refreshPage", function () {
164
+ return _this.pageReadyInstance.initRequest();
165
+ });
241
166
 
242
- exports.LuxityPageReadyContext = LuxityPageReadyContext;
243
- exports.default = LuxityPageReady;
167
+ return _this;
168
+ }
244
169
 
245
- Object.defineProperty(exports, '__esModule', { value: true });
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));
217
+ }
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
+ };
246
235
 
247
- })));
236
+ export default LuxityPageReady;
237
+ export { LuxityPageReadyContext };