@bonlineza/luxity-lib 2.36.1-beta.4 → 2.36.1

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 (90) hide show
  1. package/Accordion.js +116 -76
  2. package/AddInterest.js +777 -440
  3. package/AddProductInterest.js +644 -485
  4. package/BrandSelector.js +336 -176
  5. package/Checkbox.js +101 -68
  6. package/CheckboxButton.js +124 -79
  7. package/CommunicationPreferenceOptionsRenderer.js +169 -159
  8. package/CommunicationPreferenceSection.js +178 -166
  9. package/CommunicationPreferences.js +427 -549
  10. package/ConditionSelector.js +336 -174
  11. package/CountryCodeSelect.js +10 -7
  12. package/CurrencyInputFormatter.js +56 -29
  13. package/CurrencySelect.js +49 -23
  14. package/DropdownSelector.js +92 -68
  15. package/GALink.js +16 -6
  16. package/GenderSelector.js +142 -88
  17. package/GraphQLDropdownSelector.js +1511 -933
  18. package/GraphQLMultiSelector.js +274 -141
  19. package/IconHeader.js +25 -11
  20. package/IconWrapper.js +7 -3
  21. package/InterestCatSelector.js +74 -34
  22. package/InterestItem.js +187 -103
  23. package/Interests.js +1466 -917
  24. package/InterestsSubheading.js +10 -5
  25. package/InvertedTextButton.js +63 -27
  26. package/LuxityAppSideNav.js +22 -19
  27. package/LuxityDesktopHeader.js +663 -549
  28. package/LuxityFooter.js +325 -434
  29. package/LuxityGraphQLDropdownSelector.js +1543 -949
  30. package/LuxityGraphQLMultiselector.js +321 -167
  31. package/LuxityMobileHeader.js +807 -681
  32. package/LuxityPageReady.js +136 -74
  33. package/LuxityProductInterestItem.js +175 -97
  34. package/LuxitySideNav.js +310 -382
  35. package/MaterialSelector.js +1550 -955
  36. package/ModelSelector.js +1550 -955
  37. package/NotificationDropDown.js +221 -122
  38. package/Notify.js +1 -0
  39. package/OutlinePrimaryButton.js +58 -26
  40. package/PriceRangeSelector.js +281 -168
  41. package/PrimaryButton.js +58 -26
  42. package/RadioButtons.js +140 -114
  43. package/RangeSlider.js +242 -152
  44. package/RareStepFooter.js +41 -27
  45. package/RareStepHeader.js +190 -139
  46. package/ReactSelectWrapper.js +1 -0
  47. package/SecondaryButton.js +58 -26
  48. package/ShoeSizeRangeSelector.js +260 -162
  49. package/ShoeSizeSelector.js +263 -158
  50. package/SimpleErrorBoundary.js +106 -59
  51. package/StyleSelector.js +336 -176
  52. package/TextButton.js +58 -26
  53. package/Tooltip.js +39 -17
  54. package/Tracking.js +1 -0
  55. package/WrapperButton.js +43 -20
  56. package/build/bundle.css +1 -1
  57. package/build/bundle.js +2973 -2457
  58. package/package.json +2 -3
  59. package/svg/Accessories.js +13 -6
  60. package/svg/Account.js +13 -6
  61. package/svg/Add.js +13 -6
  62. package/svg/ArrowRight.js +13 -6
  63. package/svg/Bags.js +13 -6
  64. package/svg/BurgerMenu.js +13 -6
  65. package/svg/Calendar.js +13 -6
  66. package/svg/CalendarCircled.js +13 -6
  67. package/svg/CheckCircled.js +13 -6
  68. package/svg/Close.js +13 -6
  69. package/svg/Clothing.js +13 -6
  70. package/svg/Dot.js +13 -6
  71. package/svg/Edit.js +13 -6
  72. package/svg/Eye.js +13 -6
  73. package/svg/FileAttach.js +13 -6
  74. package/svg/FileAttachCircled.js +13 -6
  75. package/svg/LightBulb.js +13 -6
  76. package/svg/Logo.js +13 -6
  77. package/svg/LuxityMenu.js +13 -6
  78. package/svg/Minus.js +13 -6
  79. package/svg/MobileAvatar.js +13 -6
  80. package/svg/MyOrder.js +13 -6
  81. package/svg/MyPayment.js +13 -6
  82. package/svg/MyProfile.js +14 -8
  83. package/svg/MySale.js +13 -6
  84. package/svg/Notification.js +13 -6
  85. package/svg/PointerDown.js +13 -6
  86. package/svg/Search.js +13 -6
  87. package/svg/Shoes.js +13 -6
  88. package/svg/SvgWrapper.js +7 -3
  89. package/svg/Trash.js +13 -6
  90. package/svg/Watches.js +13 -6
@@ -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 _assertThisInitialized(e) {
12
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
13
- return e;
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
- 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;
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
- 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;
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
- function _getPrototypeOf(t) {
41
- return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
42
- return t.__proto__ || Object.getPrototypeOf(t);
43
- }, _getPrototypeOf(t);
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
- 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, {
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: t,
50
- writable: !0,
51
- configurable: !0
58
+ value: subClass,
59
+ writable: true,
60
+ configurable: true
52
61
  }
53
- }), Object.defineProperty(t, "prototype", {
54
- writable: !1
55
- }), e && _setPrototypeOf(t, e);
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
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
60
- } catch (t) {}
61
- return (_isNativeReflectConstruct = function () {
62
- return !!t;
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
- 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);
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
- 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.");
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
- return ("string" === r ? String : Number)(t);
111
+
112
+ return _assertThisInitialized(self);
84
113
  }
85
- function _toPropertyKey(t) {
86
- var i = _toPrimitive(t, "string");
87
- return "symbol" == typeof i ? i : i + "";
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
- _this = _callSuper(this, LuxityPageReady, [].concat(args));
113
- _defineProperty(_this, "state", {
162
+
163
+ _this = _super.call.apply(_super, [this].concat(args));
164
+
165
+ _defineProperty(_assertThisInitialized(_this), "state", {
114
166
  data: null
115
167
  });
116
- _defineProperty(_this, "refreshPage", function () {
168
+
169
+ _defineProperty(_assertThisInitialized(_this), "refreshPage", function () {
117
170
  return _this.pageReadyInstance.initRequest();
118
171
  });
172
+
119
173
  return _this;
120
174
  }
121
- _inherits(LuxityPageReady, _React$Component);
122
- return _createClass(LuxityPageReady, [{
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
- customErrorMessage = _this$props.customErrorMessage,
128
- customErrorHandler = _this$props.customErrorHandler,
129
- getRequestPromise = _this$props.getRequestPromise,
130
- _onData = _this$props.onData,
131
- children = _this$props.children;
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;
@@ -7,124 +7,185 @@
7
7
  var React__default = 'default' in React ? React['default'] : React;
8
8
  var styled__default = 'default' in styled ? styled['default'] : styled;
9
9
 
10
- function _assertThisInitialized(e) {
11
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
12
- return e;
10
+ function ownKeys(object, enumerableOnly) {
11
+ var keys = Object.keys(object);
12
+
13
+ if (Object.getOwnPropertySymbols) {
14
+ var symbols = Object.getOwnPropertySymbols(object);
15
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
16
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
17
+ })), keys.push.apply(keys, symbols);
18
+ }
19
+
20
+ return keys;
13
21
  }
14
- function _callSuper(t, o, e) {
15
- return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
22
+
23
+ function _objectSpread2(target) {
24
+ for (var i = 1; i < arguments.length; i++) {
25
+ var source = null != arguments[i] ? arguments[i] : {};
26
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
27
+ _defineProperty(target, key, source[key]);
28
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
29
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
30
+ });
31
+ }
32
+
33
+ return target;
16
34
  }
17
- function _classCallCheck(a, n) {
18
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
35
+
36
+ function _classCallCheck(instance, Constructor) {
37
+ if (!(instance instanceof Constructor)) {
38
+ throw new TypeError("Cannot call a class as a function");
39
+ }
19
40
  }
20
- function _defineProperties(e, r) {
21
- for (var t = 0; t < r.length; t++) {
22
- var o = r[t];
23
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
41
+
42
+ function _defineProperties(target, props) {
43
+ for (var i = 0; i < props.length; i++) {
44
+ var descriptor = props[i];
45
+ descriptor.enumerable = descriptor.enumerable || false;
46
+ descriptor.configurable = true;
47
+ if ("value" in descriptor) descriptor.writable = true;
48
+ Object.defineProperty(target, descriptor.key, descriptor);
24
49
  }
25
50
  }
26
- function _createClass(e, r, t) {
27
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
28
- writable: !1
29
- }), e;
51
+
52
+ function _createClass(Constructor, protoProps, staticProps) {
53
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
54
+ if (staticProps) _defineProperties(Constructor, staticProps);
55
+ Object.defineProperty(Constructor, "prototype", {
56
+ writable: false
57
+ });
58
+ return Constructor;
30
59
  }
31
- function _defineProperty(e, r, t) {
32
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
33
- value: t,
34
- enumerable: !0,
35
- configurable: !0,
36
- writable: !0
37
- }) : e[r] = t, e;
60
+
61
+ function _defineProperty(obj, key, value) {
62
+ if (key in obj) {
63
+ Object.defineProperty(obj, key, {
64
+ value: value,
65
+ enumerable: true,
66
+ configurable: true,
67
+ writable: true
68
+ });
69
+ } else {
70
+ obj[key] = value;
71
+ }
72
+
73
+ return obj;
38
74
  }
75
+
39
76
  function _extends() {
40
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
41
- for (var e = 1; e < arguments.length; e++) {
42
- var t = arguments[e];
43
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
77
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
78
+ for (var i = 1; i < arguments.length; i++) {
79
+ var source = arguments[i];
80
+
81
+ for (var key in source) {
82
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
83
+ target[key] = source[key];
84
+ }
85
+ }
44
86
  }
45
- return n;
46
- }, _extends.apply(null, arguments);
47
- }
48
- function _getPrototypeOf(t) {
49
- return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
50
- return t.__proto__ || Object.getPrototypeOf(t);
51
- }, _getPrototypeOf(t);
87
+
88
+ return target;
89
+ };
90
+ return _extends.apply(this, arguments);
52
91
  }
53
- function _inherits(t, e) {
54
- if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
55
- t.prototype = Object.create(e && e.prototype, {
92
+
93
+ function _inherits(subClass, superClass) {
94
+ if (typeof superClass !== "function" && superClass !== null) {
95
+ throw new TypeError("Super expression must either be null or a function");
96
+ }
97
+
98
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
56
99
  constructor: {
57
- value: t,
58
- writable: !0,
59
- configurable: !0
100
+ value: subClass,
101
+ writable: true,
102
+ configurable: true
60
103
  }
61
- }), Object.defineProperty(t, "prototype", {
62
- writable: !1
63
- }), e && _setPrototypeOf(t, e);
104
+ });
105
+ Object.defineProperty(subClass, "prototype", {
106
+ writable: false
107
+ });
108
+ if (superClass) _setPrototypeOf(subClass, superClass);
64
109
  }
110
+
111
+ function _getPrototypeOf(o) {
112
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
113
+ return o.__proto__ || Object.getPrototypeOf(o);
114
+ };
115
+ return _getPrototypeOf(o);
116
+ }
117
+
118
+ function _setPrototypeOf(o, p) {
119
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
120
+ o.__proto__ = p;
121
+ return o;
122
+ };
123
+ return _setPrototypeOf(o, p);
124
+ }
125
+
65
126
  function _isNativeReflectConstruct() {
127
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
128
+ if (Reflect.construct.sham) return false;
129
+ if (typeof Proxy === "function") return true;
130
+
66
131
  try {
67
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
68
- } catch (t) {}
69
- return (_isNativeReflectConstruct = function () {
70
- return !!t;
71
- })();
72
- }
73
- function ownKeys(e, r) {
74
- var t = Object.keys(e);
75
- if (Object.getOwnPropertySymbols) {
76
- var o = Object.getOwnPropertySymbols(e);
77
- r && (o = o.filter(function (r) {
78
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
79
- })), t.push.apply(t, o);
132
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
133
+ return true;
134
+ } catch (e) {
135
+ return false;
80
136
  }
81
- return t;
82
137
  }
83
- function _objectSpread2(e) {
84
- for (var r = 1; r < arguments.length; r++) {
85
- var t = null != arguments[r] ? arguments[r] : {};
86
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
87
- _defineProperty(e, r, t[r]);
88
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
89
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
90
- });
138
+
139
+ function _assertThisInitialized(self) {
140
+ if (self === void 0) {
141
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
91
142
  }
92
- return e;
143
+
144
+ return self;
93
145
  }
94
- function _possibleConstructorReturn(t, e) {
95
- if (e && ("object" == typeof e || "function" == typeof e)) return e;
96
- if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
97
- return _assertThisInitialized(t);
146
+
147
+ function _possibleConstructorReturn(self, call) {
148
+ if (call && (typeof call === "object" || typeof call === "function")) {
149
+ return call;
150
+ } else if (call !== void 0) {
151
+ throw new TypeError("Derived constructors may only return object or undefined");
152
+ }
153
+
154
+ return _assertThisInitialized(self);
98
155
  }
99
- function _setPrototypeOf(t, e) {
100
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
101
- return t.__proto__ = e, t;
102
- }, _setPrototypeOf(t, e);
156
+
157
+ function _createSuper(Derived) {
158
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
159
+
160
+ return function _createSuperInternal() {
161
+ var Super = _getPrototypeOf(Derived),
162
+ result;
163
+
164
+ if (hasNativeReflectConstruct) {
165
+ var NewTarget = _getPrototypeOf(this).constructor;
166
+
167
+ result = Reflect.construct(Super, arguments, NewTarget);
168
+ } else {
169
+ result = Super.apply(this, arguments);
170
+ }
171
+
172
+ return _possibleConstructorReturn(this, result);
173
+ };
103
174
  }
104
- function _taggedTemplateLiteral(e, t) {
105
- return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
175
+
176
+ function _taggedTemplateLiteral(strings, raw) {
177
+ if (!raw) {
178
+ raw = strings.slice(0);
179
+ }
180
+
181
+ return Object.freeze(Object.defineProperties(strings, {
106
182
  raw: {
107
- value: Object.freeze(t)
183
+ value: Object.freeze(raw)
108
184
  }
109
185
  }));
110
186
  }
111
- function _toPrimitive(t, r) {
112
- if ("object" != typeof t || !t) return t;
113
- var e = t[Symbol.toPrimitive];
114
- if (void 0 !== e) {
115
- var i = e.call(t, r || "default");
116
- if ("object" != typeof i) return i;
117
- throw new TypeError("@@toPrimitive must return a primitive value.");
118
- }
119
- return ("string" === r ? String : Number)(t);
120
- }
121
- function _toPropertyKey(t) {
122
- var i = _toPrimitive(t, "string");
123
- return "symbol" == typeof i ? i : i + "";
124
- }
125
187
 
126
188
  /** @format */
127
-
128
189
  var request = {
129
190
  fetching: false,
130
191
  failed: false,
@@ -257,33 +318,46 @@
257
318
  };
258
319
 
259
320
  var _templateObject$2, _templateObject2, _templateObject3;
321
+
260
322
  var TrashIcon = function TrashIcon(_ref) {
261
323
  var onClick = _ref.onClick,
262
- id = _ref.id;
324
+ id = _ref.id;
263
325
  return /*#__PURE__*/React__default.createElement(IconWrapper, {
264
326
  onClick: onClick,
265
327
  id: id
266
328
  }, /*#__PURE__*/React__default.createElement(SvgWrapper, null, /*#__PURE__*/React__default.createElement(Trash, null)));
267
329
  };
330
+
268
331
  var LuxityProductInterestItem = /*#__PURE__*/function (_React$Component) {
332
+ _inherits(LuxityProductInterestItem, _React$Component);
333
+
334
+ var _super = _createSuper(LuxityProductInterestItem);
335
+
269
336
  function LuxityProductInterestItem(props) {
270
337
  var _this;
338
+
271
339
  _classCallCheck(this, LuxityProductInterestItem);
272
- _this = _callSuper(this, LuxityProductInterestItem, [props]);
273
- _defineProperty(_this, "deleteInterestItem", function () {
340
+
341
+ _this = _super.call(this, props);
342
+
343
+ _defineProperty(_assertThisInitialized(_this), "deleteInterestItem", function () {
274
344
  var id = _this.props.data.id;
345
+
275
346
  _this.setState({
276
347
  delete: _objectSpread2(_objectSpread2({}, request), {}, {
277
348
  fetching: true
278
349
  })
279
350
  });
351
+
280
352
  var url = _this.props.deleteInterestApi(id);
353
+
281
354
  simpleRequest(_this.props.requestInstance, url, method.DELETE, null, function () {
282
355
  _this.setState({
283
356
  delete: _objectSpread2(_objectSpread2({}, request), {}, {
284
357
  success: true
285
358
  })
286
359
  });
360
+
287
361
  _this.props.onDeleted(_this.props.data);
288
362
  }, function () {
289
363
  return _this.setState({
@@ -291,8 +365,10 @@
291
365
  });
292
366
  });
293
367
  });
294
- _defineProperty(_this, "render", function () {
368
+
369
+ _defineProperty(_assertThisInitialized(_this), "render", function () {
295
370
  var _data$luxity_model, _data$luxity_material;
371
+
296
372
  var data = _this.props.data;
297
373
  var success = _this.state.delete.success;
298
374
  return /*#__PURE__*/React__default.createElement(InterestItemContainer, {
@@ -322,14 +398,16 @@
322
398
  }
323
399
  }));
324
400
  });
401
+
325
402
  _this.state = {
326
403
  delete: _objectSpread2({}, request)
327
404
  };
328
405
  return _this;
329
406
  }
330
- _inherits(LuxityProductInterestItem, _React$Component);
407
+
331
408
  return _createClass(LuxityProductInterestItem);
332
409
  }(React__default.Component);
410
+
333
411
  var InterestItemTitle = styled__default.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n font-weight: bold;\n display: none;\n\n @media (max-width: ", ") {\n display: inline;\n }\n"])), media.xs);
334
412
  var InterestItemContainer = styled__default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n\n .no-shoe-size-section {\n @media (max-width: ", ") {\n display: none;\n }\n }\n"])), media.xs);
335
413
  var InterestItemContent = styled__default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n width: 95%;\n height: 100%;\n border: 1px solid ", ";\n padding: 1rem;\n margin-bottom: ", ";\n\n .interest-item__container_heading {\n color: ", ";\n flex-basis: calc(100% / 6);\n margin-top: 0.3rem;\n\n @media (max-width: ", ") {\n display: inline;\n }\n }\n\n .list-items {\n display: inline-flex;\n flex-direction: column;\n\n @media (max-width: ", ") {\n margin-left: ", ";\n }\n }\n\n @media (max-width: ", ") {\n flex-direction: column;\n }\n"])), function (props) {
@@ -342,11 +420,11 @@
342
420
  return props.theme.marginPaddings[0];
343
421
  }, media.xs);
344
422
  var ThemedInterestItem = themed(LuxityProductInterestItem);
345
-
346
423
  /**
347
424
  * The Interest Item view shows the selected interest configuration,
348
425
  * and gives user control to delete it.
349
426
  */
427
+
350
428
  var index = (function (props) {
351
429
  return /*#__PURE__*/React__default.createElement(ThemedInterestItem, props);
352
430
  });