@bonlineza/luxity-lib 2.36.1-beta.2 → 2.36.1-beta.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.
- package/Accordion.js +76 -116
- package/AddInterest.js +440 -777
- package/AddProductInterest.js +485 -644
- package/BrandSelector.js +176 -336
- package/Checkbox.js +68 -101
- package/CheckboxButton.js +79 -124
- package/CommunicationPreferenceOptionsRenderer.js +159 -169
- package/CommunicationPreferenceSection.js +166 -178
- package/CommunicationPreferences.js +549 -427
- package/ConditionSelector.js +174 -336
- package/CountryCodeSelect.js +7 -10
- package/CurrencyInputFormatter.js +29 -56
- package/CurrencySelect.js +23 -49
- package/DropdownSelector.js +68 -92
- package/GALink.js +6 -16
- package/GenderSelector.js +88 -142
- package/GraphQLDropdownSelector.js +931 -1510
- package/GraphQLMultiSelector.js +141 -274
- package/IconHeader.js +11 -25
- package/IconWrapper.js +3 -7
- package/InterestCatSelector.js +34 -74
- package/InterestItem.js +103 -187
- package/Interests.js +920 -1470
- package/InterestsSubheading.js +5 -10
- package/InvertedTextButton.js +27 -63
- package/LuxityAppSideNav.js +18 -21
- package/LuxityDesktopHeader.js +206 -269
- package/LuxityFooter.js +430 -321
- package/LuxityGraphQLDropdownSelector.js +947 -1542
- package/LuxityGraphQLMultiselector.js +167 -321
- package/LuxityMobileHeader.js +251 -342
- package/LuxityPageReady.js +74 -136
- package/LuxityProductInterestItem.js +97 -175
- package/LuxitySideNav.js +165 -215
- package/MaterialSelector.js +954 -1550
- package/ModelSelector.js +954 -1550
- package/NotificationDropDown.js +120 -220
- package/Notify.js +0 -1
- package/OutlinePrimaryButton.js +26 -58
- package/PriceRangeSelector.js +168 -281
- package/PrimaryButton.js +26 -58
- package/RadioButtons.js +114 -140
- package/RangeSlider.js +152 -242
- package/RareStepFooter.js +27 -41
- package/RareStepHeader.js +139 -190
- package/ReactSelectWrapper.js +0 -1
- package/SecondaryButton.js +26 -58
- package/ShoeSizeRangeSelector.js +162 -260
- package/ShoeSizeSelector.js +158 -263
- package/SimpleErrorBoundary.js +59 -106
- package/StyleSelector.js +176 -336
- package/TextButton.js +26 -58
- package/Tooltip.js +17 -39
- package/Tracking.js +0 -1
- package/WrapperButton.js +20 -43
- package/build/bundle.css +1 -1
- package/build/bundle.js +1805 -2367
- package/package.json +3 -2
- package/svg/Accessories.js +6 -13
- package/svg/Account.js +6 -13
- package/svg/Add.js +6 -13
- package/svg/ArrowRight.js +6 -13
- package/svg/Bags.js +6 -13
- package/svg/BurgerMenu.js +6 -13
- package/svg/Calendar.js +6 -13
- package/svg/CalendarCircled.js +6 -13
- package/svg/CheckCircled.js +6 -13
- package/svg/Close.js +6 -13
- package/svg/Clothing.js +6 -13
- package/svg/Dot.js +6 -13
- package/svg/Edit.js +6 -13
- package/svg/Eye.js +6 -13
- package/svg/FileAttach.js +6 -13
- package/svg/FileAttachCircled.js +6 -13
- package/svg/LightBulb.js +6 -13
- package/svg/Logo.js +6 -13
- package/svg/LuxityMenu.js +6 -13
- package/svg/Minus.js +6 -13
- package/svg/MobileAvatar.js +6 -13
- package/svg/MyOrder.js +6 -13
- package/svg/MyPayment.js +6 -13
- package/svg/MyProfile.js +8 -14
- package/svg/MySale.js +6 -13
- package/svg/Notification.js +6 -13
- package/svg/PointerDown.js +6 -13
- package/svg/Search.js +6 -13
- package/svg/Shoes.js +6 -13
- package/svg/SvgWrapper.js +3 -7
- package/svg/Trash.js +6 -13
- package/svg/Watches.js +6 -13
package/LuxityPageReady.js
CHANGED
|
@@ -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
|
|
12
|
-
if (
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
Object.defineProperty(
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
return
|
|
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
|
-
|
|
98
|
-
if (
|
|
99
|
-
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
116
|
-
|
|
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
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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;
|
|
@@ -7,185 +7,124 @@
|
|
|
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
|
|
11
|
-
|
|
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;
|
|
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;
|
|
21
13
|
}
|
|
22
|
-
|
|
23
|
-
|
|
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;
|
|
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));
|
|
34
16
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (!(instance instanceof Constructor)) {
|
|
38
|
-
throw new TypeError("Cannot call a class as a function");
|
|
39
|
-
}
|
|
17
|
+
function _classCallCheck(a, n) {
|
|
18
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
40
19
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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);
|
|
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);
|
|
49
24
|
}
|
|
50
25
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
56
|
-
writable: false
|
|
57
|
-
});
|
|
58
|
-
return Constructor;
|
|
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;
|
|
59
30
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
writable: true
|
|
68
|
-
});
|
|
69
|
-
} else {
|
|
70
|
-
obj[key] = value;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return obj;
|
|
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;
|
|
74
38
|
}
|
|
75
|
-
|
|
76
39
|
function _extends() {
|
|
77
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
78
|
-
for (var
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
for (var key in source) {
|
|
82
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
83
|
-
target[key] = source[key];
|
|
84
|
-
}
|
|
85
|
-
}
|
|
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]);
|
|
86
44
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
};
|
|
90
|
-
return _extends.apply(this, arguments);
|
|
45
|
+
return n;
|
|
46
|
+
}, _extends.apply(null, arguments);
|
|
91
47
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
48
|
+
function _getPrototypeOf(t) {
|
|
49
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
50
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
51
|
+
}, _getPrototypeOf(t);
|
|
52
|
+
}
|
|
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, {
|
|
99
56
|
constructor: {
|
|
100
|
-
value:
|
|
101
|
-
writable:
|
|
102
|
-
configurable:
|
|
57
|
+
value: t,
|
|
58
|
+
writable: !0,
|
|
59
|
+
configurable: !0
|
|
103
60
|
}
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
});
|
|
108
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
61
|
+
}), Object.defineProperty(t, "prototype", {
|
|
62
|
+
writable: !1
|
|
63
|
+
}), e && _setPrototypeOf(t, e);
|
|
109
64
|
}
|
|
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
|
-
|
|
126
65
|
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
|
-
|
|
131
66
|
try {
|
|
132
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return
|
|
136
|
-
}
|
|
67
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
68
|
+
} catch (t) {}
|
|
69
|
+
return (_isNativeReflectConstruct = function () {
|
|
70
|
+
return !!t;
|
|
71
|
+
})();
|
|
137
72
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (
|
|
141
|
-
|
|
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);
|
|
142
80
|
}
|
|
143
|
-
|
|
144
|
-
return self;
|
|
81
|
+
return t;
|
|
145
82
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
+
});
|
|
152
91
|
}
|
|
153
|
-
|
|
154
|
-
return _assertThisInitialized(self);
|
|
92
|
+
return e;
|
|
155
93
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
-
};
|
|
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);
|
|
174
98
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return Object.freeze(Object.defineProperties(
|
|
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);
|
|
103
|
+
}
|
|
104
|
+
function _taggedTemplateLiteral(e, t) {
|
|
105
|
+
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
|
|
182
106
|
raw: {
|
|
183
|
-
value: Object.freeze(
|
|
107
|
+
value: Object.freeze(t)
|
|
184
108
|
}
|
|
185
109
|
}));
|
|
186
110
|
}
|
|
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
|
+
}
|
|
187
125
|
|
|
188
126
|
/** @format */
|
|
127
|
+
|
|
189
128
|
var request = {
|
|
190
129
|
fetching: false,
|
|
191
130
|
failed: false,
|
|
@@ -318,46 +257,33 @@
|
|
|
318
257
|
};
|
|
319
258
|
|
|
320
259
|
var _templateObject$2, _templateObject2, _templateObject3;
|
|
321
|
-
|
|
322
260
|
var TrashIcon = function TrashIcon(_ref) {
|
|
323
261
|
var onClick = _ref.onClick,
|
|
324
|
-
|
|
262
|
+
id = _ref.id;
|
|
325
263
|
return /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
326
264
|
onClick: onClick,
|
|
327
265
|
id: id
|
|
328
266
|
}, /*#__PURE__*/React__default.createElement(SvgWrapper, null, /*#__PURE__*/React__default.createElement(Trash, null)));
|
|
329
267
|
};
|
|
330
|
-
|
|
331
268
|
var LuxityProductInterestItem = /*#__PURE__*/function (_React$Component) {
|
|
332
|
-
_inherits(LuxityProductInterestItem, _React$Component);
|
|
333
|
-
|
|
334
|
-
var _super = _createSuper(LuxityProductInterestItem);
|
|
335
|
-
|
|
336
269
|
function LuxityProductInterestItem(props) {
|
|
337
270
|
var _this;
|
|
338
|
-
|
|
339
271
|
_classCallCheck(this, LuxityProductInterestItem);
|
|
340
|
-
|
|
341
|
-
_this
|
|
342
|
-
|
|
343
|
-
_defineProperty(_assertThisInitialized(_this), "deleteInterestItem", function () {
|
|
272
|
+
_this = _callSuper(this, LuxityProductInterestItem, [props]);
|
|
273
|
+
_defineProperty(_this, "deleteInterestItem", function () {
|
|
344
274
|
var id = _this.props.data.id;
|
|
345
|
-
|
|
346
275
|
_this.setState({
|
|
347
276
|
delete: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
348
277
|
fetching: true
|
|
349
278
|
})
|
|
350
279
|
});
|
|
351
|
-
|
|
352
280
|
var url = _this.props.deleteInterestApi(id);
|
|
353
|
-
|
|
354
281
|
simpleRequest(_this.props.requestInstance, url, method.DELETE, null, function () {
|
|
355
282
|
_this.setState({
|
|
356
283
|
delete: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
357
284
|
success: true
|
|
358
285
|
})
|
|
359
286
|
});
|
|
360
|
-
|
|
361
287
|
_this.props.onDeleted(_this.props.data);
|
|
362
288
|
}, function () {
|
|
363
289
|
return _this.setState({
|
|
@@ -365,10 +291,8 @@
|
|
|
365
291
|
});
|
|
366
292
|
});
|
|
367
293
|
});
|
|
368
|
-
|
|
369
|
-
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
294
|
+
_defineProperty(_this, "render", function () {
|
|
370
295
|
var _data$luxity_model, _data$luxity_material;
|
|
371
|
-
|
|
372
296
|
var data = _this.props.data;
|
|
373
297
|
var success = _this.state.delete.success;
|
|
374
298
|
return /*#__PURE__*/React__default.createElement(InterestItemContainer, {
|
|
@@ -398,16 +322,14 @@
|
|
|
398
322
|
}
|
|
399
323
|
}));
|
|
400
324
|
});
|
|
401
|
-
|
|
402
325
|
_this.state = {
|
|
403
326
|
delete: _objectSpread2({}, request)
|
|
404
327
|
};
|
|
405
328
|
return _this;
|
|
406
329
|
}
|
|
407
|
-
|
|
330
|
+
_inherits(LuxityProductInterestItem, _React$Component);
|
|
408
331
|
return _createClass(LuxityProductInterestItem);
|
|
409
332
|
}(React__default.Component);
|
|
410
|
-
|
|
411
333
|
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);
|
|
412
334
|
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);
|
|
413
335
|
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) {
|
|
@@ -420,11 +342,11 @@
|
|
|
420
342
|
return props.theme.marginPaddings[0];
|
|
421
343
|
}, media.xs);
|
|
422
344
|
var ThemedInterestItem = themed(LuxityProductInterestItem);
|
|
345
|
+
|
|
423
346
|
/**
|
|
424
347
|
* The Interest Item view shows the selected interest configuration,
|
|
425
348
|
* and gives user control to delete it.
|
|
426
349
|
*/
|
|
427
|
-
|
|
428
350
|
var index = (function (props) {
|
|
429
351
|
return /*#__PURE__*/React__default.createElement(ThemedInterestItem, props);
|
|
430
352
|
});
|