@bonlineza/luxity-lib 2.34.1 → 2.34.3

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 (86) hide show
  1. package/Accordion.js +76 -116
  2. package/AddInterest.js +434 -768
  3. package/BrandSelector.js +176 -336
  4. package/Checkbox.js +68 -101
  5. package/CheckboxButton.js +79 -124
  6. package/CommunicationPreferenceOptionsRenderer.js +107 -125
  7. package/CommunicationPreferenceSection.js +114 -134
  8. package/CommunicationPreferences.js +443 -339
  9. package/CountryCodeSelect.js +7 -10
  10. package/CurrencyInputFormatter.js +29 -56
  11. package/CurrencySelect.js +188 -19
  12. package/GALink.js +6 -16
  13. package/GenderSelector.js +88 -142
  14. package/GraphQLDropdownSelector.js +505 -939
  15. package/GraphQLMultiSelector.js +141 -274
  16. package/IconHeader.js +11 -25
  17. package/IconWrapper.js +3 -7
  18. package/InterestCatSelector.js +34 -74
  19. package/InterestItem.js +103 -187
  20. package/Interests.js +485 -890
  21. package/InterestsSubheading.js +5 -10
  22. package/InvertedTextButton.js +27 -63
  23. package/LuxityAppSideNav.js +18 -21
  24. package/LuxityDesktopHeader.js +360 -211
  25. package/LuxityFooter.js +464 -260
  26. package/LuxityGraphQLDropdownSelector.js +519 -969
  27. package/LuxityGraphQLMultiselector.js +167 -321
  28. package/LuxityMobileHeader.js +453 -283
  29. package/LuxityPageReady.js +74 -136
  30. package/LuxitySideNav.js +355 -159
  31. package/MaterialSelector.js +525 -976
  32. package/ModelSelector.js +525 -976
  33. package/NotificationDropDown.js +111 -209
  34. package/Notify.js +0 -1
  35. package/OutlinePrimaryButton.js +26 -58
  36. package/PriceRangeSelector.js +168 -281
  37. package/PrimaryButton.js +26 -58
  38. package/RadioButtons.js +114 -140
  39. package/RangeSlider.js +152 -242
  40. package/RareStepFooter.js +27 -41
  41. package/RareStepHeader.js +139 -190
  42. package/ReactSelectWrapper.js +0 -1
  43. package/SecondaryButton.js +26 -58
  44. package/ShoeSizeRangeSelector.js +162 -260
  45. package/ShoeSizeSelector.js +158 -263
  46. package/SimpleErrorBoundary.js +59 -106
  47. package/StyleSelector.js +176 -336
  48. package/TextButton.js +26 -58
  49. package/Tooltip.js +17 -39
  50. package/Tracking.js +0 -1
  51. package/WrapperButton.js +20 -43
  52. package/build/bundle.css +1 -1
  53. package/build/bundle.js +1321 -1697
  54. package/package.json +1 -1
  55. package/svg/Accessories.js +6 -13
  56. package/svg/Account.js +6 -13
  57. package/svg/Add.js +6 -13
  58. package/svg/ArrowRight.js +6 -13
  59. package/svg/Bags.js +6 -13
  60. package/svg/BurgerMenu.js +6 -13
  61. package/svg/Calendar.js +6 -13
  62. package/svg/CalendarCircled.js +6 -13
  63. package/svg/CheckCircled.js +6 -13
  64. package/svg/Close.js +6 -13
  65. package/svg/Clothing.js +6 -13
  66. package/svg/Dot.js +6 -13
  67. package/svg/Edit.js +6 -13
  68. package/svg/Eye.js +6 -13
  69. package/svg/FileAttach.js +6 -13
  70. package/svg/FileAttachCircled.js +6 -13
  71. package/svg/LightBulb.js +6 -13
  72. package/svg/Logo.js +6 -13
  73. package/svg/LuxityMenu.js +6 -13
  74. package/svg/Minus.js +6 -13
  75. package/svg/MobileAvatar.js +6 -13
  76. package/svg/MyOrder.js +6 -13
  77. package/svg/MyPayment.js +6 -13
  78. package/svg/MyProfile.js +8 -14
  79. package/svg/MySale.js +6 -13
  80. package/svg/Notification.js +6 -13
  81. package/svg/PointerDown.js +6 -13
  82. package/svg/Search.js +6 -13
  83. package/svg/Shoes.js +6 -13
  84. package/svg/SvgWrapper.js +3 -7
  85. package/svg/Trash.js +6 -13
  86. package/svg/Watches.js +6 -13
@@ -8,127 +8,83 @@
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 _classCallCheck(instance, Constructor) {
12
- if (!(instance instanceof Constructor)) {
13
- throw new TypeError("Cannot call a class as a function");
14
- }
11
+ function _assertThisInitialized(e) {
12
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
13
+ return e;
15
14
  }
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
- }
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));
25
17
  }
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;
18
+ function _classCallCheck(a, n) {
19
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
34
20
  }
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;
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);
46
25
  }
47
-
48
- return obj;
49
26
  }
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, {
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);
27
+ function _createClass(e, r, t) {
28
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
29
+ writable: !1
30
+ }), e;
67
31
  }
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);
32
+ function _defineProperty(e, r, t) {
33
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
34
+ value: t,
35
+ enumerable: !0,
36
+ configurable: !0,
37
+ writable: !0
38
+ }) : e[r] = t, e;
74
39
  }
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);
40
+ function _getPrototypeOf(t) {
41
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
42
+ return t.__proto__ || Object.getPrototypeOf(t);
43
+ }, _getPrototypeOf(t);
44
+ }
45
+ function _inherits(t, e) {
46
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
47
+ t.prototype = Object.create(e && e.prototype, {
48
+ constructor: {
49
+ value: t,
50
+ writable: !0,
51
+ configurable: !0
52
+ }
53
+ }), Object.defineProperty(t, "prototype", {
54
+ writable: !1
55
+ }), e && _setPrototypeOf(t, e);
82
56
  }
83
-
84
57
  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
-
89
58
  try {
90
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
91
- return true;
92
- } catch (e) {
93
- return false;
94
- }
59
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
60
+ } catch (t) {}
61
+ return (_isNativeReflectConstruct = function () {
62
+ return !!t;
63
+ })();
95
64
  }
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;
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);
103
69
  }
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");
70
+ function _setPrototypeOf(t, e) {
71
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
72
+ return t.__proto__ = e, t;
73
+ }, _setPrototypeOf(t, e);
74
+ }
75
+ function _toPrimitive(t, r) {
76
+ if ("object" != typeof t || !t) return t;
77
+ var e = t[Symbol.toPrimitive];
78
+ if (void 0 !== e) {
79
+ var i = e.call(t, r || "default");
80
+ if ("object" != typeof i) return i;
81
+ throw new TypeError("@@toPrimitive must return a primitive value.");
110
82
  }
111
-
112
- return _assertThisInitialized(self);
83
+ return ("string" === r ? String : Number)(t);
113
84
  }
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
- };
85
+ function _toPropertyKey(t) {
86
+ var i = _toPrimitive(t, "string");
87
+ return "symbol" == typeof i ? i : i + "";
132
88
  }
133
89
 
134
90
  var interpretErrorMessage = function interpretErrorMessage(error) {
@@ -140,50 +96,39 @@
140
96
  var LuxityPageReadyContext = /*#__PURE__*/React.createContext({
141
97
  data: null
142
98
  });
99
+
143
100
  /**
144
101
  * A flavour of PageReady with Luxity customisations
145
102
  * 1. the onIsLoading callback is useful to parent components that have more complex data interactions
146
103
  * 2. an error message interpreter is supplied from the local helper library
147
104
  */
148
-
149
105
  var LuxityPageReady = /*#__PURE__*/function (_React$Component) {
150
- _inherits(LuxityPageReady, _React$Component);
151
-
152
- var _super = _createSuper(LuxityPageReady);
153
-
154
106
  function LuxityPageReady() {
155
107
  var _this;
156
-
157
108
  _classCallCheck(this, LuxityPageReady);
158
-
159
109
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
160
110
  args[_key] = arguments[_key];
161
111
  }
162
-
163
- _this = _super.call.apply(_super, [this].concat(args));
164
-
165
- _defineProperty(_assertThisInitialized(_this), "state", {
112
+ _this = _callSuper(this, LuxityPageReady, [].concat(args));
113
+ _defineProperty(_this, "state", {
166
114
  data: null
167
115
  });
168
-
169
- _defineProperty(_assertThisInitialized(_this), "refreshPage", function () {
116
+ _defineProperty(_this, "refreshPage", function () {
170
117
  return _this.pageReadyInstance.initRequest();
171
118
  });
172
-
173
119
  return _this;
174
120
  }
175
-
176
- _createClass(LuxityPageReady, [{
121
+ _inherits(LuxityPageReady, _React$Component);
122
+ return _createClass(LuxityPageReady, [{
177
123
  key: "render",
178
124
  value: function render() {
179
125
  var _this2 = this;
180
-
181
126
  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;
127
+ customErrorMessage = _this$props.customErrorMessage,
128
+ customErrorHandler = _this$props.customErrorHandler,
129
+ getRequestPromise = _this$props.getRequestPromise,
130
+ _onData = _this$props.onData,
131
+ children = _this$props.children;
187
132
  var data = this.state.data;
188
133
  return /*#__PURE__*/React.createElement(PageReady, {
189
134
  ref: function ref(inst) {
@@ -193,19 +138,15 @@
193
138
  _this2.setState({
194
139
  data: res.data
195
140
  });
196
-
197
141
  _onData(res);
198
142
  },
199
143
  getRequestInstance: function getRequestInstance() {
200
144
  _this2.props.onIsLoading(true);
201
-
202
145
  return getRequestPromise().then(function (out) {
203
146
  _this2.props.onIsLoading(false);
204
-
205
147
  return out;
206
148
  }).catch(function (oops) {
207
149
  _this2.props.onIsLoading(false);
208
-
209
150
  return oops;
210
151
  });
211
152
  },
@@ -222,10 +163,7 @@
222
163
  }, children));
223
164
  }
224
165
  }]);
225
-
226
- return LuxityPageReady;
227
166
  }(React.Component);
228
-
229
167
  LuxityPageReady.defaultProps = {
230
168
  onIsLoading: function onIsLoading() {
231
169
  return null;