@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.
- package/Accordion.js +116 -76
- package/AddInterest.js +777 -440
- package/AddProductInterest.js +644 -485
- package/BrandSelector.js +336 -176
- package/Checkbox.js +101 -68
- package/CheckboxButton.js +124 -79
- package/CommunicationPreferenceOptionsRenderer.js +169 -159
- package/CommunicationPreferenceSection.js +178 -166
- package/CommunicationPreferences.js +427 -549
- package/ConditionSelector.js +336 -174
- package/CountryCodeSelect.js +10 -7
- package/CurrencyInputFormatter.js +56 -29
- package/CurrencySelect.js +49 -23
- package/DropdownSelector.js +92 -68
- package/GALink.js +16 -6
- package/GenderSelector.js +142 -88
- package/GraphQLDropdownSelector.js +1511 -933
- package/GraphQLMultiSelector.js +274 -141
- package/IconHeader.js +25 -11
- package/IconWrapper.js +7 -3
- package/InterestCatSelector.js +74 -34
- package/InterestItem.js +187 -103
- package/Interests.js +1466 -917
- package/InterestsSubheading.js +10 -5
- package/InvertedTextButton.js +63 -27
- package/LuxityAppSideNav.js +22 -19
- package/LuxityDesktopHeader.js +663 -549
- package/LuxityFooter.js +325 -434
- package/LuxityGraphQLDropdownSelector.js +1543 -949
- package/LuxityGraphQLMultiselector.js +321 -167
- package/LuxityMobileHeader.js +807 -681
- package/LuxityPageReady.js +136 -74
- package/LuxityProductInterestItem.js +175 -97
- package/LuxitySideNav.js +310 -382
- package/MaterialSelector.js +1550 -955
- package/ModelSelector.js +1550 -955
- package/NotificationDropDown.js +221 -122
- package/Notify.js +1 -0
- package/OutlinePrimaryButton.js +58 -26
- package/PriceRangeSelector.js +281 -168
- package/PrimaryButton.js +58 -26
- package/RadioButtons.js +140 -114
- package/RangeSlider.js +242 -152
- package/RareStepFooter.js +41 -27
- package/RareStepHeader.js +190 -139
- package/ReactSelectWrapper.js +1 -0
- package/SecondaryButton.js +58 -26
- package/ShoeSizeRangeSelector.js +260 -162
- package/ShoeSizeSelector.js +263 -158
- package/SimpleErrorBoundary.js +106 -59
- package/StyleSelector.js +336 -176
- package/TextButton.js +58 -26
- package/Tooltip.js +39 -17
- package/Tracking.js +1 -0
- package/WrapperButton.js +43 -20
- package/build/bundle.css +1 -1
- package/build/bundle.js +2973 -2457
- package/package.json +2 -3
- package/svg/Accessories.js +13 -6
- package/svg/Account.js +13 -6
- package/svg/Add.js +13 -6
- package/svg/ArrowRight.js +13 -6
- package/svg/Bags.js +13 -6
- package/svg/BurgerMenu.js +13 -6
- package/svg/Calendar.js +13 -6
- package/svg/CalendarCircled.js +13 -6
- package/svg/CheckCircled.js +13 -6
- package/svg/Close.js +13 -6
- package/svg/Clothing.js +13 -6
- package/svg/Dot.js +13 -6
- package/svg/Edit.js +13 -6
- package/svg/Eye.js +13 -6
- package/svg/FileAttach.js +13 -6
- package/svg/FileAttachCircled.js +13 -6
- package/svg/LightBulb.js +13 -6
- package/svg/Logo.js +13 -6
- package/svg/LuxityMenu.js +13 -6
- package/svg/Minus.js +13 -6
- package/svg/MobileAvatar.js +13 -6
- package/svg/MyOrder.js +13 -6
- package/svg/MyPayment.js +13 -6
- package/svg/MyProfile.js +14 -8
- package/svg/MySale.js +13 -6
- package/svg/Notification.js +13 -6
- package/svg/PointerDown.js +13 -6
- package/svg/Search.js +13 -6
- package/svg/Shoes.js +13 -6
- package/svg/SvgWrapper.js +7 -3
- package/svg/Trash.js +13 -6
- package/svg/Watches.js +13 -6
package/AddInterest.js
CHANGED
|
@@ -10,204 +10,296 @@
|
|
|
10
10
|
PageReady = PageReady && Object.prototype.hasOwnProperty.call(PageReady, 'default') ? PageReady['default'] : PageReady;
|
|
11
11
|
var Notifications__default = 'default' in Notifications ? Notifications['default'] : Notifications;
|
|
12
12
|
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
function _assertThisInitialized(e) {
|
|
25
|
-
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
26
|
-
return e;
|
|
13
|
+
function ownKeys(object, enumerableOnly) {
|
|
14
|
+
var keys = Object.keys(object);
|
|
15
|
+
|
|
16
|
+
if (Object.getOwnPropertySymbols) {
|
|
17
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
18
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
19
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
20
|
+
})), keys.push.apply(keys, symbols);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return keys;
|
|
27
24
|
}
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
|
|
26
|
+
function _objectSpread2(target) {
|
|
27
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
28
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
29
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
30
|
+
_defineProperty(target, key, source[key]);
|
|
31
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
32
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return target;
|
|
30
37
|
}
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
|
|
39
|
+
function _classCallCheck(instance, Constructor) {
|
|
40
|
+
if (!(instance instanceof Constructor)) {
|
|
41
|
+
throw new TypeError("Cannot call a class as a function");
|
|
42
|
+
}
|
|
33
43
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
44
|
+
|
|
45
|
+
function _defineProperties(target, props) {
|
|
46
|
+
for (var i = 0; i < props.length; i++) {
|
|
47
|
+
var descriptor = props[i];
|
|
48
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
49
|
+
descriptor.configurable = true;
|
|
50
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
51
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
38
52
|
}
|
|
39
53
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
|
|
55
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
56
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
57
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
58
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
59
|
+
writable: false
|
|
60
|
+
});
|
|
61
|
+
return Constructor;
|
|
44
62
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
63
|
+
|
|
64
|
+
function _defineProperty(obj, key, value) {
|
|
65
|
+
if (key in obj) {
|
|
66
|
+
Object.defineProperty(obj, key, {
|
|
67
|
+
value: value,
|
|
68
|
+
enumerable: true,
|
|
69
|
+
configurable: true,
|
|
70
|
+
writable: true
|
|
71
|
+
});
|
|
72
|
+
} else {
|
|
73
|
+
obj[key] = value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return obj;
|
|
52
77
|
}
|
|
78
|
+
|
|
53
79
|
function _extends() {
|
|
54
|
-
|
|
55
|
-
for (var
|
|
56
|
-
var
|
|
57
|
-
|
|
80
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
81
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
82
|
+
var source = arguments[i];
|
|
83
|
+
|
|
84
|
+
for (var key in source) {
|
|
85
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
86
|
+
target[key] = source[key];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
58
89
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
64
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
65
|
-
}, _getPrototypeOf(t);
|
|
90
|
+
|
|
91
|
+
return target;
|
|
92
|
+
};
|
|
93
|
+
return _extends.apply(this, arguments);
|
|
66
94
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
95
|
+
|
|
96
|
+
function _inherits(subClass, superClass) {
|
|
97
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
98
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
70
102
|
constructor: {
|
|
71
|
-
value:
|
|
72
|
-
writable:
|
|
73
|
-
configurable:
|
|
103
|
+
value: subClass,
|
|
104
|
+
writable: true,
|
|
105
|
+
configurable: true
|
|
74
106
|
}
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(subClass, "prototype", {
|
|
109
|
+
writable: false
|
|
110
|
+
});
|
|
111
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
78
112
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
})();
|
|
113
|
+
|
|
114
|
+
function _getPrototypeOf(o) {
|
|
115
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
116
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
117
|
+
};
|
|
118
|
+
return _getPrototypeOf(o);
|
|
86
119
|
}
|
|
87
|
-
|
|
88
|
-
|
|
120
|
+
|
|
121
|
+
function _setPrototypeOf(o, p) {
|
|
122
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
123
|
+
o.__proto__ = p;
|
|
124
|
+
return o;
|
|
125
|
+
};
|
|
126
|
+
return _setPrototypeOf(o, p);
|
|
89
127
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
102
|
-
if (Object(t) !== t) return;
|
|
103
|
-
f = !1;
|
|
104
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
105
|
-
} catch (r) {
|
|
106
|
-
o = !0, n = r;
|
|
107
|
-
} finally {
|
|
108
|
-
try {
|
|
109
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
110
|
-
} finally {
|
|
111
|
-
if (o) throw n;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return a;
|
|
128
|
+
|
|
129
|
+
function _isNativeReflectConstruct() {
|
|
130
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
131
|
+
if (Reflect.construct.sham) return false;
|
|
132
|
+
if (typeof Proxy === "function") return true;
|
|
133
|
+
|
|
134
|
+
try {
|
|
135
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
136
|
+
return true;
|
|
137
|
+
} catch (e) {
|
|
138
|
+
return false;
|
|
115
139
|
}
|
|
116
140
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
141
|
+
|
|
142
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
143
|
+
if (source == null) return {};
|
|
144
|
+
var target = {};
|
|
145
|
+
var sourceKeys = Object.keys(source);
|
|
146
|
+
var key, i;
|
|
147
|
+
|
|
148
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
149
|
+
key = sourceKeys[i];
|
|
150
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
151
|
+
target[key] = source[key];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return target;
|
|
122
155
|
}
|
|
123
|
-
|
|
124
|
-
|
|
156
|
+
|
|
157
|
+
function _objectWithoutProperties(source, excluded) {
|
|
158
|
+
if (source == null) return {};
|
|
159
|
+
|
|
160
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
161
|
+
|
|
162
|
+
var key, i;
|
|
163
|
+
|
|
125
164
|
if (Object.getOwnPropertySymbols) {
|
|
126
|
-
var
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
165
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
166
|
+
|
|
167
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
168
|
+
key = sourceSymbolKeys[i];
|
|
169
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
170
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
171
|
+
target[key] = source[key];
|
|
172
|
+
}
|
|
130
173
|
}
|
|
131
|
-
|
|
174
|
+
|
|
175
|
+
return target;
|
|
132
176
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
_defineProperty(e, r, t[r]);
|
|
138
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
139
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
140
|
-
});
|
|
177
|
+
|
|
178
|
+
function _assertThisInitialized(self) {
|
|
179
|
+
if (self === void 0) {
|
|
180
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
141
181
|
}
|
|
142
|
-
|
|
182
|
+
|
|
183
|
+
return self;
|
|
143
184
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
151
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
185
|
+
|
|
186
|
+
function _possibleConstructorReturn(self, call) {
|
|
187
|
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
188
|
+
return call;
|
|
189
|
+
} else if (call !== void 0) {
|
|
190
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
152
191
|
}
|
|
153
|
-
|
|
192
|
+
|
|
193
|
+
return _assertThisInitialized(self);
|
|
154
194
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
var
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
195
|
+
|
|
196
|
+
function _createSuper(Derived) {
|
|
197
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
198
|
+
|
|
199
|
+
return function _createSuperInternal() {
|
|
200
|
+
var Super = _getPrototypeOf(Derived),
|
|
201
|
+
result;
|
|
202
|
+
|
|
203
|
+
if (hasNativeReflectConstruct) {
|
|
204
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
205
|
+
|
|
206
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
207
|
+
} else {
|
|
208
|
+
result = Super.apply(this, arguments);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return _possibleConstructorReturn(this, result);
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
216
|
+
if (!raw) {
|
|
217
|
+
raw = strings.slice(0);
|
|
161
218
|
}
|
|
162
|
-
|
|
219
|
+
|
|
220
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
221
|
+
raw: {
|
|
222
|
+
value: Object.freeze(raw)
|
|
223
|
+
}
|
|
224
|
+
}));
|
|
163
225
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
return _assertThisInitialized(t);
|
|
226
|
+
|
|
227
|
+
function _slicedToArray(arr, i) {
|
|
228
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
168
229
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}, _setPrototypeOf(t, e);
|
|
230
|
+
|
|
231
|
+
function _toConsumableArray(arr) {
|
|
232
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
173
233
|
}
|
|
174
|
-
|
|
175
|
-
|
|
234
|
+
|
|
235
|
+
function _arrayWithoutHoles(arr) {
|
|
236
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
176
237
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
value: Object.freeze(t)
|
|
181
|
-
}
|
|
182
|
-
}));
|
|
238
|
+
|
|
239
|
+
function _arrayWithHoles(arr) {
|
|
240
|
+
if (Array.isArray(arr)) return arr;
|
|
183
241
|
}
|
|
184
|
-
|
|
185
|
-
|
|
242
|
+
|
|
243
|
+
function _iterableToArray(iter) {
|
|
244
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
186
245
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
var
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
246
|
+
|
|
247
|
+
function _iterableToArrayLimit(arr, i) {
|
|
248
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
249
|
+
|
|
250
|
+
if (_i == null) return;
|
|
251
|
+
var _arr = [];
|
|
252
|
+
var _n = true;
|
|
253
|
+
var _d = false;
|
|
254
|
+
|
|
255
|
+
var _s, _e;
|
|
256
|
+
|
|
257
|
+
try {
|
|
258
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
259
|
+
_arr.push(_s.value);
|
|
260
|
+
|
|
261
|
+
if (i && _arr.length === i) break;
|
|
262
|
+
}
|
|
263
|
+
} catch (err) {
|
|
264
|
+
_d = true;
|
|
265
|
+
_e = err;
|
|
266
|
+
} finally {
|
|
267
|
+
try {
|
|
268
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
269
|
+
} finally {
|
|
270
|
+
if (_d) throw _e;
|
|
271
|
+
}
|
|
194
272
|
}
|
|
195
|
-
|
|
273
|
+
|
|
274
|
+
return _arr;
|
|
196
275
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
276
|
+
|
|
277
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
278
|
+
if (!o) return;
|
|
279
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
280
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
281
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
282
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
283
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
200
284
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
285
|
+
|
|
286
|
+
function _arrayLikeToArray(arr, len) {
|
|
287
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
288
|
+
|
|
289
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
290
|
+
|
|
291
|
+
return arr2;
|
|
207
292
|
}
|
|
208
293
|
|
|
209
|
-
|
|
294
|
+
function _nonIterableSpread() {
|
|
295
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function _nonIterableRest() {
|
|
299
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
300
|
+
}
|
|
210
301
|
|
|
302
|
+
/** @format */
|
|
211
303
|
var request = {
|
|
212
304
|
fetching: false,
|
|
213
305
|
failed: false,
|
|
@@ -284,23 +376,23 @@
|
|
|
284
376
|
return props.hasBorder ? props.theme.colors.borderColor : props.theme.colors.ntrlMin;
|
|
285
377
|
}, function (_ref) {
|
|
286
378
|
var isChecked = _ref.isChecked,
|
|
287
|
-
|
|
379
|
+
theme = _ref.theme;
|
|
288
380
|
return isChecked ? theme.colors.primary : theme.colors.gray;
|
|
289
381
|
}, function (_ref2) {
|
|
290
382
|
var isChecked = _ref2.isChecked,
|
|
291
|
-
|
|
383
|
+
theme = _ref2.theme;
|
|
292
384
|
return isChecked ? 'white' : theme.colors.base;
|
|
293
385
|
}, function (_ref3) {
|
|
294
386
|
var isChecked = _ref3.isChecked,
|
|
295
|
-
|
|
387
|
+
theme = _ref3.theme;
|
|
296
388
|
return isChecked ? theme.colors.ntrlMin : theme.colors.primary;
|
|
297
389
|
}, function (_ref4) {
|
|
298
390
|
var isChecked = _ref4.isChecked,
|
|
299
|
-
|
|
391
|
+
theme = _ref4.theme;
|
|
300
392
|
return isChecked ? 'white' : theme.colors.base;
|
|
301
393
|
}, function (_ref5) {
|
|
302
394
|
var isChecked = _ref5.isChecked,
|
|
303
|
-
|
|
395
|
+
theme = _ref5.theme;
|
|
304
396
|
return isChecked ? theme.colors.primary : 'white';
|
|
305
397
|
}, media.sm, function (props) {
|
|
306
398
|
return props.theme.marginPaddings[2];
|
|
@@ -519,45 +611,56 @@
|
|
|
519
611
|
var baseButtonStyle = styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 1rem 2rem;\n cursor: pointer;\n letter-spacing: 1.3px;\n border-style: none;\n text-transform: uppercase;\n font-size: 12px;\n color: #fff;\n transition: 0.2s ease-in-out;\n outline: none;\n"])));
|
|
520
612
|
|
|
521
613
|
var _excluded = ["children"];
|
|
614
|
+
|
|
522
615
|
var _templateObject$4;
|
|
523
616
|
var Button = styled__default.button(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n outline: none;\n cursor: pointer;\n background-color: transparent;\n border: none;\n &:disabled {\n ", ";\n }\n"])), disabledButtonStyle);
|
|
617
|
+
|
|
524
618
|
var WrapperButton = function WrapperButton(_ref) {
|
|
525
619
|
var children = _ref.children,
|
|
526
|
-
|
|
620
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
621
|
+
|
|
527
622
|
return /*#__PURE__*/React__default.createElement(Button, restProps, children);
|
|
528
623
|
};
|
|
529
624
|
|
|
530
625
|
var _templateObject$5, _templateObject2$1;
|
|
531
626
|
var categories = catArray;
|
|
627
|
+
|
|
532
628
|
var getSvg = function getSvg() {
|
|
533
629
|
var category = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
630
|
+
|
|
534
631
|
switch (category) {
|
|
535
632
|
case interestCategories.BAGS:
|
|
536
633
|
return /*#__PURE__*/React__default.createElement(Bags, null);
|
|
634
|
+
|
|
537
635
|
case interestCategories.SHOES:
|
|
538
636
|
return /*#__PURE__*/React__default.createElement(Shoes, null);
|
|
637
|
+
|
|
539
638
|
case interestCategories.APPAREL:
|
|
540
639
|
return /*#__PURE__*/React__default.createElement(Clothing, null);
|
|
640
|
+
|
|
541
641
|
case interestCategories.ACCESSORIES:
|
|
542
642
|
return /*#__PURE__*/React__default.createElement(Accessories, null);
|
|
643
|
+
|
|
543
644
|
case interestCategories.WATCHES:
|
|
544
645
|
return /*#__PURE__*/React__default.createElement(Watches, null);
|
|
646
|
+
|
|
545
647
|
default:
|
|
546
648
|
return null;
|
|
547
649
|
}
|
|
548
650
|
};
|
|
651
|
+
|
|
549
652
|
var Container = styled__default.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), function (props) {
|
|
550
653
|
return props.theme.marginPaddings[5];
|
|
551
654
|
});
|
|
552
655
|
var CategoryTitle = styled__default.h1(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n margin-top: 10px;\n font-size: 14px;\n text-transform: uppercase;\n"])));
|
|
553
|
-
|
|
554
656
|
/**
|
|
555
657
|
* InterestCatSelector is a specialized selector for select luxity specific interest categories
|
|
556
658
|
*/
|
|
659
|
+
|
|
557
660
|
var InterestCatSelector = function InterestCatSelector(_ref) {
|
|
558
661
|
var onCategoryChange = _ref.onCategoryChange,
|
|
559
|
-
|
|
560
|
-
|
|
662
|
+
errorMessage = _ref.errorMessage,
|
|
663
|
+
category = _ref.category;
|
|
561
664
|
return /*#__PURE__*/React__default.createElement(Container, null, /*#__PURE__*/React__default.createElement(Body, null, categories.map(function (cat, index) {
|
|
562
665
|
return /*#__PURE__*/React__default.createElement(WrapperButton, {
|
|
563
666
|
key: "cat-".concat(index),
|
|
@@ -572,6 +675,7 @@
|
|
|
572
675
|
}, getSvg(cat.value), /*#__PURE__*/React__default.createElement(CategoryTitle, null, cat.categoryTitle)));
|
|
573
676
|
})), errorMessage && /*#__PURE__*/React__default.createElement(ErrorMessage, null, errorMessage));
|
|
574
677
|
};
|
|
678
|
+
|
|
575
679
|
InterestCatSelector.defaultProps = {
|
|
576
680
|
errorMessage: '',
|
|
577
681
|
category: null,
|
|
@@ -590,39 +694,50 @@
|
|
|
590
694
|
var LuxityPageReadyContext = /*#__PURE__*/React__default.createContext({
|
|
591
695
|
data: null
|
|
592
696
|
});
|
|
593
|
-
|
|
594
697
|
/**
|
|
595
698
|
* A flavour of PageReady with Luxity customisations
|
|
596
699
|
* 1. the onIsLoading callback is useful to parent components that have more complex data interactions
|
|
597
700
|
* 2. an error message interpreter is supplied from the local helper library
|
|
598
701
|
*/
|
|
702
|
+
|
|
599
703
|
var LuxityPageReady = /*#__PURE__*/function (_React$Component) {
|
|
704
|
+
_inherits(LuxityPageReady, _React$Component);
|
|
705
|
+
|
|
706
|
+
var _super = _createSuper(LuxityPageReady);
|
|
707
|
+
|
|
600
708
|
function LuxityPageReady() {
|
|
601
709
|
var _this;
|
|
710
|
+
|
|
602
711
|
_classCallCheck(this, LuxityPageReady);
|
|
712
|
+
|
|
603
713
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
604
714
|
args[_key] = arguments[_key];
|
|
605
715
|
}
|
|
606
|
-
|
|
607
|
-
|
|
716
|
+
|
|
717
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
718
|
+
|
|
719
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
608
720
|
data: null
|
|
609
721
|
});
|
|
610
|
-
|
|
722
|
+
|
|
723
|
+
_defineProperty(_assertThisInitialized(_this), "refreshPage", function () {
|
|
611
724
|
return _this.pageReadyInstance.initRequest();
|
|
612
725
|
});
|
|
726
|
+
|
|
613
727
|
return _this;
|
|
614
728
|
}
|
|
615
|
-
|
|
616
|
-
|
|
729
|
+
|
|
730
|
+
_createClass(LuxityPageReady, [{
|
|
617
731
|
key: "render",
|
|
618
732
|
value: function render() {
|
|
619
733
|
var _this2 = this;
|
|
734
|
+
|
|
620
735
|
var _this$props = this.props,
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
736
|
+
customErrorMessage = _this$props.customErrorMessage,
|
|
737
|
+
customErrorHandler = _this$props.customErrorHandler,
|
|
738
|
+
getRequestPromise = _this$props.getRequestPromise,
|
|
739
|
+
_onData = _this$props.onData,
|
|
740
|
+
children = _this$props.children;
|
|
626
741
|
var data = this.state.data;
|
|
627
742
|
return /*#__PURE__*/React__default.createElement(PageReady, {
|
|
628
743
|
ref: function ref(inst) {
|
|
@@ -632,15 +747,19 @@
|
|
|
632
747
|
_this2.setState({
|
|
633
748
|
data: res.data
|
|
634
749
|
});
|
|
750
|
+
|
|
635
751
|
_onData(res);
|
|
636
752
|
},
|
|
637
753
|
getRequestInstance: function getRequestInstance() {
|
|
638
754
|
_this2.props.onIsLoading(true);
|
|
755
|
+
|
|
639
756
|
return getRequestPromise().then(function (out) {
|
|
640
757
|
_this2.props.onIsLoading(false);
|
|
758
|
+
|
|
641
759
|
return out;
|
|
642
760
|
}).catch(function (oops) {
|
|
643
761
|
_this2.props.onIsLoading(false);
|
|
762
|
+
|
|
644
763
|
return oops;
|
|
645
764
|
});
|
|
646
765
|
},
|
|
@@ -657,7 +776,10 @@
|
|
|
657
776
|
}, children));
|
|
658
777
|
}
|
|
659
778
|
}]);
|
|
779
|
+
|
|
780
|
+
return LuxityPageReady;
|
|
660
781
|
}(React__default.Component);
|
|
782
|
+
|
|
661
783
|
LuxityPageReady.defaultProps = {
|
|
662
784
|
onIsLoading: function onIsLoading() {
|
|
663
785
|
return null;
|
|
@@ -672,6 +794,7 @@
|
|
|
672
794
|
};
|
|
673
795
|
|
|
674
796
|
var _excluded$1 = ["children"];
|
|
797
|
+
|
|
675
798
|
var _templateObject$6;
|
|
676
799
|
var Button$1 = styled__default.button(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n ", ";\n background-color: transparent;\n color: ", ";\n &:hover {\n color: ", ";\n }\n &:disabled {\n ", ";\n color: ", ";\n }\n"])), baseButtonStyle, function (props) {
|
|
677
800
|
return props.theme.colors.base;
|
|
@@ -680,17 +803,21 @@
|
|
|
680
803
|
}, disabledButtonStyle, function (props) {
|
|
681
804
|
return props.theme.colors.base;
|
|
682
805
|
});
|
|
806
|
+
|
|
683
807
|
var TextButton = function TextButton(_ref) {
|
|
684
808
|
var children = _ref.children,
|
|
685
|
-
|
|
809
|
+
restProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
810
|
+
|
|
686
811
|
return /*#__PURE__*/React__default.createElement(Button$1, restProps, children);
|
|
687
812
|
};
|
|
813
|
+
|
|
688
814
|
TextButton.defaultProps = {
|
|
689
815
|
type: 'button'
|
|
690
816
|
};
|
|
691
817
|
var TextButton$1 = themed(TextButton);
|
|
692
818
|
|
|
693
819
|
var _excluded$2 = ["children"];
|
|
820
|
+
|
|
694
821
|
var _templateObject$7;
|
|
695
822
|
var Button$2 = styled__default(TextButton$1)(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n &:hover {\n color: ", ";\n background-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n color: ", ";\n }\n"])), function (props) {
|
|
696
823
|
return props.theme.colors.ntrlMin;
|
|
@@ -705,11 +832,14 @@
|
|
|
705
832
|
}, function (props) {
|
|
706
833
|
return props.theme.colors.primary;
|
|
707
834
|
});
|
|
835
|
+
|
|
708
836
|
var InvertedTextButton = function InvertedTextButton(_ref) {
|
|
709
837
|
var children = _ref.children,
|
|
710
|
-
|
|
838
|
+
restProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
839
|
+
|
|
711
840
|
return /*#__PURE__*/React__default.createElement(Button$2, restProps, children);
|
|
712
841
|
};
|
|
842
|
+
|
|
713
843
|
var InvertedTextButton$1 = themed(InvertedTextButton);
|
|
714
844
|
|
|
715
845
|
var _templateObject$8, _templateObject2$2;
|
|
@@ -751,49 +881,65 @@
|
|
|
751
881
|
}, function (props) {
|
|
752
882
|
return props.theme.colors.ntrlMin;
|
|
753
883
|
});
|
|
754
|
-
|
|
755
884
|
/**
|
|
756
885
|
* Multiselector with a GraphQL flavour (TODO: to be revised to make it remote api agnostic)
|
|
757
886
|
*/
|
|
887
|
+
|
|
758
888
|
var GraphQLMultiSelector = /*#__PURE__*/function (_React$Component) {
|
|
889
|
+
_inherits(GraphQLMultiSelector, _React$Component);
|
|
890
|
+
|
|
891
|
+
var _super = _createSuper(GraphQLMultiSelector);
|
|
892
|
+
|
|
759
893
|
function GraphQLMultiSelector(props) {
|
|
760
894
|
var _this;
|
|
895
|
+
|
|
761
896
|
_classCallCheck(this, GraphQLMultiSelector);
|
|
762
|
-
|
|
763
|
-
|
|
897
|
+
|
|
898
|
+
_this = _super.call(this, props);
|
|
899
|
+
|
|
900
|
+
_defineProperty(_assertThisInitialized(_this), "componentDidUpdate", function (prevProps) {
|
|
764
901
|
if (prevProps.graphQuery !== _this.props.graphQuery) {
|
|
765
902
|
_this.makeRequest();
|
|
766
903
|
}
|
|
767
904
|
});
|
|
768
|
-
|
|
905
|
+
|
|
906
|
+
_defineProperty(_assertThisInitialized(_this), "makeRequest", function () {
|
|
769
907
|
_this.pageReady.refreshPage();
|
|
770
908
|
});
|
|
771
|
-
|
|
909
|
+
|
|
910
|
+
_defineProperty(_assertThisInitialized(_this), "emptySelected", function () {
|
|
772
911
|
return _this.setState({
|
|
773
912
|
selected: [ALL_ITEM]
|
|
774
913
|
});
|
|
775
914
|
});
|
|
776
|
-
|
|
915
|
+
|
|
916
|
+
_defineProperty(_assertThisInitialized(_this), "setNewResults", function (res) {
|
|
777
917
|
var selectedIds = _this.state.selected.map(function (sel) {
|
|
778
918
|
return sel.id;
|
|
779
919
|
});
|
|
920
|
+
|
|
780
921
|
var pagination = _this.props.resultProcessor(res);
|
|
922
|
+
|
|
781
923
|
var allSelected = _this.state.selected.some(function (item) {
|
|
782
924
|
return item.id === ALL_ITEM.id;
|
|
783
925
|
});
|
|
926
|
+
|
|
784
927
|
var newList = pagination.data.filter(function (newItem) {
|
|
785
928
|
return !selectedIds.includes(newItem.id);
|
|
786
929
|
});
|
|
787
930
|
newList = allSelected ? newList : [ALL_ITEM].concat(_toConsumableArray(newList));
|
|
931
|
+
|
|
788
932
|
_this.setState({
|
|
789
933
|
list: newList,
|
|
790
934
|
pagination: pagination
|
|
791
935
|
});
|
|
792
936
|
});
|
|
793
|
-
|
|
937
|
+
|
|
938
|
+
_defineProperty(_assertThisInitialized(_this), "onAddItem", function (addSelectedItem) {
|
|
794
939
|
_this.setState(function (prevState) {
|
|
795
940
|
var newSelectedList;
|
|
796
941
|
var newList;
|
|
942
|
+
|
|
797
943
|
if (addSelectedItem.id === ALL_ITEM.id) {
|
|
798
944
|
// Clear Selected List
|
|
799
945
|
// and move previous Selected items to list
|
|
@@ -813,6 +959,7 @@
|
|
|
813
959
|
return item.id !== addSelectedItem.id;
|
|
814
960
|
})));
|
|
815
961
|
}
|
|
962
|
+
|
|
816
963
|
return {
|
|
817
964
|
selected: newSelectedList,
|
|
818
965
|
list: newList
|
|
@@ -823,20 +970,24 @@
|
|
|
823
970
|
}));
|
|
824
971
|
});
|
|
825
972
|
});
|
|
826
|
-
|
|
973
|
+
|
|
974
|
+
_defineProperty(_assertThisInitialized(_this), "onRemoveItem", function (removeSelectedItem) {
|
|
827
975
|
_this.setState(function (prevState) {
|
|
828
976
|
// Cannot remove ALL from selection by unselecting it
|
|
829
977
|
if ((removeSelectedItem === null || removeSelectedItem === void 0 ? void 0 : removeSelectedItem.id) === ALL_ITEM.id) {
|
|
830
978
|
return {};
|
|
831
979
|
}
|
|
980
|
+
|
|
832
981
|
var newSelectedList = prevState.selected.filter(function (item) {
|
|
833
982
|
return item.id !== removeSelectedItem.id;
|
|
834
983
|
});
|
|
984
|
+
|
|
835
985
|
var newList = _toConsumableArray(prevState.list).concat(removeSelectedItem).filter(function (item) {
|
|
836
986
|
return item.id !== ALL_ITEM.id;
|
|
837
987
|
}).sort(function (a, b) {
|
|
838
988
|
return a.id - b.id;
|
|
839
989
|
});
|
|
990
|
+
|
|
840
991
|
return {
|
|
841
992
|
list: newList,
|
|
842
993
|
selected: newSelectedList.length ? newSelectedList : [ALL_ITEM]
|
|
@@ -847,23 +998,25 @@
|
|
|
847
998
|
}));
|
|
848
999
|
});
|
|
849
1000
|
});
|
|
850
|
-
|
|
1001
|
+
|
|
1002
|
+
_defineProperty(_assertThisInitialized(_this), "onIsLoading", function (flag) {
|
|
851
1003
|
_this.setState({
|
|
852
1004
|
isLoading: flag
|
|
853
1005
|
});
|
|
854
1006
|
});
|
|
855
|
-
|
|
1007
|
+
|
|
1008
|
+
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
856
1009
|
var _this$props = _this.props,
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
1010
|
+
baseClass = _this$props.baseClass,
|
|
1011
|
+
ItemRenderer = _this$props.itemRenderer,
|
|
1012
|
+
identifier = _this$props.identifier,
|
|
1013
|
+
triggerRequest = _this$props.triggerRequest,
|
|
1014
|
+
className = _this$props.className;
|
|
862
1015
|
var _this$state = _this.state,
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
1016
|
+
list = _this$state.list,
|
|
1017
|
+
selected = _this$state.selected,
|
|
1018
|
+
pagination = _this$state.pagination,
|
|
1019
|
+
isLoading = _this$state.isLoading;
|
|
867
1020
|
return /*#__PURE__*/React__default.createElement(StyledMultiselector, null, /*#__PURE__*/React__default.createElement("div", {
|
|
868
1021
|
"data-qe-id": identifier,
|
|
869
1022
|
className: "".concat(className, " ").concat(baseClass)
|
|
@@ -902,6 +1055,7 @@
|
|
|
902
1055
|
type: "button"
|
|
903
1056
|
}, "SHOW MORE"))));
|
|
904
1057
|
});
|
|
1058
|
+
|
|
905
1059
|
_this.state = {
|
|
906
1060
|
selected: [ALL_ITEM],
|
|
907
1061
|
list: [],
|
|
@@ -910,9 +1064,10 @@
|
|
|
910
1064
|
};
|
|
911
1065
|
return _this;
|
|
912
1066
|
}
|
|
913
|
-
|
|
1067
|
+
|
|
914
1068
|
return _createClass(GraphQLMultiSelector);
|
|
915
1069
|
}(React__default.Component);
|
|
1070
|
+
|
|
916
1071
|
GraphQLMultiSelector.defaultProps = {
|
|
917
1072
|
baseClass: 'multiselector'
|
|
918
1073
|
};
|
|
@@ -945,22 +1100,24 @@
|
|
|
945
1100
|
}, function (props) {
|
|
946
1101
|
return props.theme.marginPaddings[3];
|
|
947
1102
|
});
|
|
1103
|
+
|
|
948
1104
|
var InterestsSubheading = function InterestsSubheading(_ref) {
|
|
949
1105
|
var title = _ref.title,
|
|
950
|
-
|
|
951
|
-
|
|
1106
|
+
children = _ref.children,
|
|
1107
|
+
className = _ref.className;
|
|
952
1108
|
return /*#__PURE__*/React__default.createElement(InterestsSubheadingContainer, {
|
|
953
1109
|
className: className
|
|
954
1110
|
}, /*#__PURE__*/React__default.createElement(Title, null, title), /*#__PURE__*/React__default.createElement("div", null, children));
|
|
955
1111
|
};
|
|
956
1112
|
|
|
957
1113
|
var _templateObject$a;
|
|
1114
|
+
|
|
958
1115
|
var Title$1 = function Title(_ref) {
|
|
959
1116
|
var baseClass = _ref.baseClass,
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1117
|
+
className = _ref.className,
|
|
1118
|
+
title = _ref.title,
|
|
1119
|
+
searchPlaceHolder = _ref.searchPlaceHolder,
|
|
1120
|
+
onSearchChanged = _ref.onSearchChanged;
|
|
964
1121
|
return /*#__PURE__*/React__default.createElement(InterestsSubheading, {
|
|
965
1122
|
className: "".concat(className, " ").concat(baseClass, "__title"),
|
|
966
1123
|
title: title
|
|
@@ -973,6 +1130,7 @@
|
|
|
973
1130
|
onChange: onSearchChanged
|
|
974
1131
|
})));
|
|
975
1132
|
};
|
|
1133
|
+
|
|
976
1134
|
var StyledTitle = styled__default(Title$1)(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-weight: bold;\n display: flex;\n align-items: center;\n font-size: ", ";\n\n .title__search,\n .title__search {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 30px;\n margin-bottom: ", ";\n\n svg {\n margin-left: ", ";\n fill: ", ";\n stroke: ", ";\n }\n\n input {\n width: 140px;\n border: none;\n font-size: ", ";\n transition: 0.2s border-color ease-in-out;\n margin-left: ", ";\n padding: 0;\n\n :focus {\n border-color: ", ";\n border-bottom: none;\n }\n }\n }\n"])), function (props) {
|
|
977
1135
|
return props.theme.marginPaddings[2];
|
|
978
1136
|
}, function (props) {
|
|
@@ -995,26 +1153,37 @@
|
|
|
995
1153
|
var Title$2 = themed(StyledTitle);
|
|
996
1154
|
|
|
997
1155
|
var debounceBuilder = functions.debounced(200);
|
|
1156
|
+
|
|
998
1157
|
/**
|
|
999
1158
|
* Luxity flavoured GraphQLMultiselector with text Search, category and limit controls
|
|
1000
1159
|
*/
|
|
1001
1160
|
var LuxityGraphQLMultiselector = /*#__PURE__*/function (_React$Component) {
|
|
1161
|
+
_inherits(LuxityGraphQLMultiselector, _React$Component);
|
|
1162
|
+
|
|
1163
|
+
var _super = _createSuper(LuxityGraphQLMultiselector);
|
|
1164
|
+
|
|
1002
1165
|
function LuxityGraphQLMultiselector(props) {
|
|
1003
1166
|
var _this;
|
|
1167
|
+
|
|
1004
1168
|
_classCallCheck(this, LuxityGraphQLMultiselector);
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1169
|
+
|
|
1170
|
+
_this = _super.call(this, props);
|
|
1171
|
+
|
|
1172
|
+
_defineProperty(_assertThisInitialized(_this), "multiSelectorRef", /*#__PURE__*/React__default.createRef());
|
|
1173
|
+
|
|
1174
|
+
_defineProperty(_assertThisInitialized(_this), "increaseLimit", function () {
|
|
1008
1175
|
_this.setState(function (prevState) {
|
|
1009
1176
|
return {
|
|
1010
1177
|
limit: prevState.limit + _this.props.queryLimitIncrement
|
|
1011
1178
|
};
|
|
1012
1179
|
});
|
|
1013
1180
|
});
|
|
1014
|
-
|
|
1181
|
+
|
|
1182
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (selection) {
|
|
1015
1183
|
_this.props.onChange(selection);
|
|
1016
1184
|
});
|
|
1017
|
-
|
|
1185
|
+
|
|
1186
|
+
_defineProperty(_assertThisInitialized(_this), "onSearchChanged", function (event) {
|
|
1018
1187
|
event.preventDefault();
|
|
1019
1188
|
var searchText = event.target.value;
|
|
1020
1189
|
debounceBuilder(function () {
|
|
@@ -1023,21 +1192,22 @@
|
|
|
1023
1192
|
});
|
|
1024
1193
|
});
|
|
1025
1194
|
});
|
|
1026
|
-
|
|
1195
|
+
|
|
1196
|
+
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
1027
1197
|
var _this$state = _this.state,
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1198
|
+
limit = _this$state.limit,
|
|
1199
|
+
category = _this$state.category,
|
|
1200
|
+
nameFilter = _this$state.nameFilter;
|
|
1031
1201
|
var _this$props = _this.props,
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1202
|
+
title = _this$props.title,
|
|
1203
|
+
baseClass = _this$props.baseClass,
|
|
1204
|
+
getGraphQuery = _this$props.getGraphQuery,
|
|
1205
|
+
resultProcessor = _this$props.resultProcessor,
|
|
1206
|
+
itemRenderer = _this$props.itemRenderer,
|
|
1207
|
+
searchPlaceHolder = _this$props.searchPlaceHolder,
|
|
1208
|
+
graphApi = _this$props.graphApi,
|
|
1209
|
+
identifier = _this$props.identifier,
|
|
1210
|
+
requestInstance = _this$props.requestInstance;
|
|
1041
1211
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1042
1212
|
className: baseClass
|
|
1043
1213
|
}, /*#__PURE__*/React__default.createElement(Title$2, {
|
|
@@ -1060,6 +1230,7 @@
|
|
|
1060
1230
|
itemRenderer: itemRenderer
|
|
1061
1231
|
})));
|
|
1062
1232
|
});
|
|
1233
|
+
|
|
1063
1234
|
_this.state = {
|
|
1064
1235
|
limit: props.baseQueryLimit,
|
|
1065
1236
|
category: props.category,
|
|
@@ -1067,11 +1238,12 @@
|
|
|
1067
1238
|
};
|
|
1068
1239
|
return _this;
|
|
1069
1240
|
}
|
|
1070
|
-
|
|
1071
|
-
|
|
1241
|
+
|
|
1242
|
+
_createClass(LuxityGraphQLMultiselector, [{
|
|
1072
1243
|
key: "componentDidUpdate",
|
|
1073
1244
|
value: function componentDidUpdate(prevProps) {
|
|
1074
1245
|
var _this$multiSelectorRe;
|
|
1246
|
+
|
|
1075
1247
|
if (prevProps.category !== this.props.category && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
|
|
1076
1248
|
this.multiSelectorRef.current.emptySelected();
|
|
1077
1249
|
}
|
|
@@ -1084,10 +1256,14 @@
|
|
|
1084
1256
|
category: props.category
|
|
1085
1257
|
};
|
|
1086
1258
|
}
|
|
1259
|
+
|
|
1087
1260
|
return null;
|
|
1088
1261
|
}
|
|
1089
1262
|
}]);
|
|
1263
|
+
|
|
1264
|
+
return LuxityGraphQLMultiselector;
|
|
1090
1265
|
}(React__default.Component);
|
|
1266
|
+
|
|
1091
1267
|
LuxityGraphQLMultiselector.defaultProps = {
|
|
1092
1268
|
baseClass: '',
|
|
1093
1269
|
searchPlaceHolder: '',
|
|
@@ -1096,17 +1272,21 @@
|
|
|
1096
1272
|
};
|
|
1097
1273
|
|
|
1098
1274
|
var _excluded$3 = ["children"];
|
|
1275
|
+
|
|
1099
1276
|
var _templateObject$b;
|
|
1100
1277
|
var Button$3 = styled__default.button(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n ", ";\n background-color: #fff;\n color: ", ";\n border: 1px solid ", ";\n\n &:disabled {\n ", "\n }\n"])), baseButtonStyle, function (props) {
|
|
1101
1278
|
return props.theme.colors.primary;
|
|
1102
1279
|
}, function (props) {
|
|
1103
1280
|
return props.theme.colors.primary;
|
|
1104
1281
|
}, disabledButtonStyle);
|
|
1282
|
+
|
|
1105
1283
|
var PrimaryButton = function PrimaryButton(_ref) {
|
|
1106
1284
|
var children = _ref.children,
|
|
1107
|
-
|
|
1285
|
+
restProps = _objectWithoutProperties(_ref, _excluded$3);
|
|
1286
|
+
|
|
1108
1287
|
return /*#__PURE__*/React__default.createElement(Button$3, restProps, children);
|
|
1109
1288
|
};
|
|
1289
|
+
|
|
1110
1290
|
var PrimaryButton$1 = themed(PrimaryButton);
|
|
1111
1291
|
|
|
1112
1292
|
var _templateObject$c;
|
|
@@ -1122,10 +1302,11 @@
|
|
|
1122
1302
|
return props.theme.colors.ntrlMin;
|
|
1123
1303
|
});
|
|
1124
1304
|
var UnselectedButton = themed(BaseButton);
|
|
1305
|
+
|
|
1125
1306
|
var ItemRenderer = function ItemRenderer(_ref) {
|
|
1126
1307
|
var item = _ref.item,
|
|
1127
|
-
|
|
1128
|
-
|
|
1308
|
+
onSelect = _ref.onSelect,
|
|
1309
|
+
selected = _ref.selected;
|
|
1129
1310
|
var props = {
|
|
1130
1311
|
onClick: function onClick(e) {
|
|
1131
1312
|
e.preventDefault();
|
|
@@ -1137,12 +1318,12 @@
|
|
|
1137
1318
|
|
|
1138
1319
|
var BrandSelector = function BrandSelector(_ref) {
|
|
1139
1320
|
var onChange = _ref.onChange,
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1321
|
+
category = _ref.category,
|
|
1322
|
+
graphApi = _ref.graphApi,
|
|
1323
|
+
itemRenderer = _ref.itemRenderer,
|
|
1324
|
+
getGraphQuery = _ref.getGraphQuery,
|
|
1325
|
+
resultProcessor = _ref.resultProcessor,
|
|
1326
|
+
requestInstance = _ref.requestInstance;
|
|
1146
1327
|
return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
|
|
1147
1328
|
baseQueryLimit: 16,
|
|
1148
1329
|
title: "Brands",
|
|
@@ -1159,6 +1340,7 @@
|
|
|
1159
1340
|
requestInstance: requestInstance
|
|
1160
1341
|
});
|
|
1161
1342
|
};
|
|
1343
|
+
|
|
1162
1344
|
BrandSelector.defaultProps = {
|
|
1163
1345
|
itemRenderer: ItemRenderer,
|
|
1164
1346
|
resultProcessor: function resultProcessor(result) {
|
|
@@ -1168,12 +1350,12 @@
|
|
|
1168
1350
|
|
|
1169
1351
|
var StyleSelector = function StyleSelector(_ref) {
|
|
1170
1352
|
var onChange = _ref.onChange,
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1353
|
+
category = _ref.category,
|
|
1354
|
+
graphApi = _ref.graphApi,
|
|
1355
|
+
itemRenderer = _ref.itemRenderer,
|
|
1356
|
+
getGraphQuery = _ref.getGraphQuery,
|
|
1357
|
+
resultProcessor = _ref.resultProcessor,
|
|
1358
|
+
requestInstance = _ref.requestInstance;
|
|
1177
1359
|
return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
|
|
1178
1360
|
title: "Styles",
|
|
1179
1361
|
queryId: "getStyles",
|
|
@@ -1190,6 +1372,7 @@
|
|
|
1190
1372
|
requestInstance: requestInstance
|
|
1191
1373
|
});
|
|
1192
1374
|
};
|
|
1375
|
+
|
|
1193
1376
|
StyleSelector.defaultProps = {
|
|
1194
1377
|
itemRenderer: ItemRenderer,
|
|
1195
1378
|
resultProcessor: function resultProcessor(result) {
|
|
@@ -1204,82 +1387,117 @@
|
|
|
1204
1387
|
};
|
|
1205
1388
|
|
|
1206
1389
|
function _extends$1() {
|
|
1207
|
-
|
|
1208
|
-
for (var
|
|
1209
|
-
var
|
|
1210
|
-
|
|
1390
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
1391
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1392
|
+
var source = arguments[i];
|
|
1393
|
+
|
|
1394
|
+
for (var key in source) {
|
|
1395
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1396
|
+
target[key] = source[key];
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1211
1399
|
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1400
|
+
|
|
1401
|
+
return target;
|
|
1402
|
+
};
|
|
1403
|
+
return _extends$1.apply(this, arguments);
|
|
1214
1404
|
}
|
|
1215
1405
|
|
|
1216
|
-
function _assertThisInitialized$1(
|
|
1217
|
-
if (
|
|
1218
|
-
|
|
1406
|
+
function _assertThisInitialized$1(self) {
|
|
1407
|
+
if (self === void 0) {
|
|
1408
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
return self;
|
|
1219
1412
|
}
|
|
1220
1413
|
|
|
1221
|
-
function _setPrototypeOf$1(
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1414
|
+
function _setPrototypeOf$1(o, p) {
|
|
1415
|
+
_setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1416
|
+
o.__proto__ = p;
|
|
1417
|
+
return o;
|
|
1418
|
+
};
|
|
1419
|
+
return _setPrototypeOf$1(o, p);
|
|
1225
1420
|
}
|
|
1226
1421
|
|
|
1227
|
-
function _inheritsLoose(
|
|
1228
|
-
|
|
1422
|
+
function _inheritsLoose(subClass, superClass) {
|
|
1423
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
1424
|
+
subClass.prototype.constructor = subClass;
|
|
1425
|
+
_setPrototypeOf$1(subClass, superClass);
|
|
1229
1426
|
}
|
|
1230
1427
|
|
|
1231
|
-
function _getPrototypeOf$1(
|
|
1232
|
-
|
|
1233
|
-
return
|
|
1234
|
-
}
|
|
1428
|
+
function _getPrototypeOf$1(o) {
|
|
1429
|
+
_getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
1430
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
1431
|
+
};
|
|
1432
|
+
return _getPrototypeOf$1(o);
|
|
1235
1433
|
}
|
|
1236
1434
|
|
|
1237
|
-
function _isNativeFunction(
|
|
1238
|
-
|
|
1239
|
-
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
1240
|
-
} catch (n) {
|
|
1241
|
-
return "function" == typeof t;
|
|
1242
|
-
}
|
|
1435
|
+
function _isNativeFunction(fn) {
|
|
1436
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
1243
1437
|
}
|
|
1244
1438
|
|
|
1245
1439
|
function _isNativeReflectConstruct$1() {
|
|
1440
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
1441
|
+
if (Reflect.construct.sham) return false;
|
|
1442
|
+
if (typeof Proxy === "function") return true;
|
|
1443
|
+
|
|
1246
1444
|
try {
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
return
|
|
1251
|
-
}
|
|
1445
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
1446
|
+
return true;
|
|
1447
|
+
} catch (e) {
|
|
1448
|
+
return false;
|
|
1449
|
+
}
|
|
1252
1450
|
}
|
|
1253
1451
|
|
|
1254
|
-
function _construct(
|
|
1255
|
-
if (_isNativeReflectConstruct$1())
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1452
|
+
function _construct(Parent, args, Class) {
|
|
1453
|
+
if (_isNativeReflectConstruct$1()) {
|
|
1454
|
+
_construct = Reflect.construct.bind();
|
|
1455
|
+
} else {
|
|
1456
|
+
_construct = function _construct(Parent, args, Class) {
|
|
1457
|
+
var a = [null];
|
|
1458
|
+
a.push.apply(a, args);
|
|
1459
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
1460
|
+
var instance = new Constructor();
|
|
1461
|
+
if (Class) _setPrototypeOf$1(instance, Class.prototype);
|
|
1462
|
+
return instance;
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
return _construct.apply(null, arguments);
|
|
1260
1467
|
}
|
|
1261
1468
|
|
|
1262
|
-
function _wrapNativeSuper(
|
|
1263
|
-
var
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
if (
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1469
|
+
function _wrapNativeSuper(Class) {
|
|
1470
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
1471
|
+
|
|
1472
|
+
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
1473
|
+
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
1474
|
+
|
|
1475
|
+
if (typeof Class !== "function") {
|
|
1476
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
if (typeof _cache !== "undefined") {
|
|
1480
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
1481
|
+
|
|
1482
|
+
_cache.set(Class, Wrapper);
|
|
1270
1483
|
}
|
|
1484
|
+
|
|
1271
1485
|
function Wrapper() {
|
|
1272
|
-
return _construct(
|
|
1486
|
+
return _construct(Class, arguments, _getPrototypeOf$1(this).constructor);
|
|
1273
1487
|
}
|
|
1274
|
-
|
|
1488
|
+
|
|
1489
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
|
1275
1490
|
constructor: {
|
|
1276
1491
|
value: Wrapper,
|
|
1277
|
-
enumerable:
|
|
1278
|
-
writable:
|
|
1279
|
-
configurable:
|
|
1492
|
+
enumerable: false,
|
|
1493
|
+
writable: true,
|
|
1494
|
+
configurable: true
|
|
1280
1495
|
}
|
|
1281
|
-
})
|
|
1282
|
-
|
|
1496
|
+
});
|
|
1497
|
+
return _setPrototypeOf$1(Wrapper, Class);
|
|
1498
|
+
};
|
|
1499
|
+
|
|
1500
|
+
return _wrapNativeSuper(Class);
|
|
1283
1501
|
}
|
|
1284
1502
|
|
|
1285
1503
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
@@ -1948,9 +2166,10 @@
|
|
|
1948
2166
|
}, function (props) {
|
|
1949
2167
|
return getSliderMarkStyle(props);
|
|
1950
2168
|
});
|
|
2169
|
+
|
|
1951
2170
|
var getSliderMarkStyle = function getSliderMarkStyle(_ref) {
|
|
1952
2171
|
var showMarks = _ref.showMarks,
|
|
1953
|
-
|
|
2172
|
+
primary = _ref.theme.colors.primary;
|
|
1954
2173
|
var visiblityStyle = showMarks ? styled.css(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral([""]))) : styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .rc-slider-mark-text,\n .rc-slider-dot {\n visibility: hidden;\n }\n "])));
|
|
1955
2174
|
return styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .rc-slider-mark-text {\n color: ", ";\n }\n\n .rc-slider-dot {\n border-color: ", ";\n background-color: white;\n }\n ", "\n "])), primary, primary, visiblityStyle);
|
|
1956
2175
|
};
|
|
@@ -1962,24 +2181,28 @@
|
|
|
1962
2181
|
var Footer = styled__default.div(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-end;\n"])));
|
|
1963
2182
|
|
|
1964
2183
|
var _excluded$4 = ["dragging", "value", "offset", "index"],
|
|
1965
|
-
|
|
2184
|
+
_excluded2 = ["renderTitleSection", "marks", "defaultMinValue", "defaultMaxValue", "min", "max", "toolTipComponent", "renderFooterSection", "onChange", "children", "identifier", "showMarks"];
|
|
2185
|
+
|
|
1966
2186
|
var _templateObject$h;
|
|
1967
2187
|
var debounceBuilder$1 = functions.debounced(100);
|
|
1968
2188
|
var ChildrenWrapper = styled__default.div(_templateObject$h || (_templateObject$h = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), function (props) {
|
|
1969
2189
|
return props.theme.marginPaddings[3];
|
|
1970
2190
|
});
|
|
2191
|
+
|
|
1971
2192
|
var renderCustomHandle = function renderCustomHandle() {
|
|
1972
2193
|
var marks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1973
2194
|
var toolTipComponent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1974
2195
|
var handleProps = arguments.length > 2 ? arguments[2] : undefined;
|
|
2196
|
+
|
|
1975
2197
|
var dragging = handleProps.dragging,
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
2198
|
+
value = handleProps.value,
|
|
2199
|
+
offset = handleProps.offset,
|
|
2200
|
+
index = handleProps.index,
|
|
2201
|
+
restHandleProps = _objectWithoutProperties(handleProps, _excluded$4);
|
|
2202
|
+
|
|
1980
2203
|
var getToolTipProps = function getToolTipProps() {
|
|
1981
|
-
var newProps = {};
|
|
1982
|
-
|
|
2204
|
+
var newProps = {}; // Ensures that Tooltip component does not get ref prop
|
|
2205
|
+
|
|
1983
2206
|
Object.keys(handleProps).forEach(function (propName) {
|
|
1984
2207
|
if (propName !== 'ref') {
|
|
1985
2208
|
newProps[propName] = handleProps[propName];
|
|
@@ -1987,6 +2210,7 @@
|
|
|
1987
2210
|
});
|
|
1988
2211
|
return newProps;
|
|
1989
2212
|
};
|
|
2213
|
+
|
|
1990
2214
|
var Tooltip = toolTipComponent;
|
|
1991
2215
|
return /*#__PURE__*/React__default.createElement(React.Fragment, {
|
|
1992
2216
|
key: index
|
|
@@ -2003,47 +2227,55 @@
|
|
|
2003
2227
|
marks: marks
|
|
2004
2228
|
}, getToolTipProps()))));
|
|
2005
2229
|
};
|
|
2006
|
-
|
|
2007
2230
|
/** slider ui component for react */
|
|
2231
|
+
|
|
2232
|
+
|
|
2008
2233
|
var RangeSlider = function RangeSlider(_ref) {
|
|
2009
2234
|
var renderTitleSection = _ref.renderTitleSection,
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2235
|
+
marks = _ref.marks,
|
|
2236
|
+
defaultMinValue = _ref.defaultMinValue,
|
|
2237
|
+
defaultMaxValue = _ref.defaultMaxValue,
|
|
2238
|
+
min = _ref.min,
|
|
2239
|
+
max = _ref.max,
|
|
2240
|
+
toolTipComponent = _ref.toolTipComponent,
|
|
2241
|
+
renderFooterSection = _ref.renderFooterSection,
|
|
2242
|
+
onChange = _ref.onChange,
|
|
2243
|
+
childRenderer = _ref.children,
|
|
2244
|
+
identifier = _ref.identifier,
|
|
2245
|
+
showMarks = _ref.showMarks,
|
|
2246
|
+
restProps = _objectWithoutProperties(_ref, _excluded2);
|
|
2247
|
+
|
|
2022
2248
|
var _useState = React.useState(defaultMinValue),
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2249
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2250
|
+
currMinVal = _useState2[0],
|
|
2251
|
+
setMinVal = _useState2[1];
|
|
2252
|
+
|
|
2026
2253
|
var _useState3 = React.useState(defaultMaxValue),
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2254
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2255
|
+
currMaxVal = _useState4[0],
|
|
2256
|
+
setMaxVal = _useState4[1];
|
|
2030
2257
|
/*
|
|
2031
2258
|
*Description variable stores the time that the component renders
|
|
2032
2259
|
* the state is used to enforce reenders for the component since the date now
|
|
2033
2260
|
* is always changing
|
|
2034
2261
|
* */
|
|
2262
|
+
|
|
2263
|
+
|
|
2035
2264
|
var _useState5 = React.useState(0),
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2265
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
2266
|
+
seed = _useState6[0],
|
|
2267
|
+
setSeed = _useState6[1];
|
|
2268
|
+
|
|
2039
2269
|
var manuallyChangeMinValue = function manuallyChangeMinValue(val) {
|
|
2040
2270
|
setMinVal(val);
|
|
2041
2271
|
setSeed(Date.now());
|
|
2042
2272
|
};
|
|
2273
|
+
|
|
2043
2274
|
var manuallyChangeMaxValue = function manuallyChangeMaxValue(val) {
|
|
2044
2275
|
setMaxVal(val);
|
|
2045
2276
|
setSeed(Date.now());
|
|
2046
2277
|
};
|
|
2278
|
+
|
|
2047
2279
|
var prevMinVal = functions.usePrevious(currMinVal);
|
|
2048
2280
|
var prevMaxVal = functions.usePrevious(currMaxVal);
|
|
2049
2281
|
React.useEffect(function () {
|
|
@@ -2079,8 +2311,9 @@
|
|
|
2079
2311
|
defaultValue: [defaultMinValue, defaultMaxValue],
|
|
2080
2312
|
onChange: function onChange(_ref2) {
|
|
2081
2313
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
2082
|
-
|
|
2083
|
-
|
|
2314
|
+
nextMin = _ref3[0],
|
|
2315
|
+
nextMax = _ref3[1];
|
|
2316
|
+
|
|
2084
2317
|
setMinVal(nextMin);
|
|
2085
2318
|
setMaxVal(nextMax);
|
|
2086
2319
|
},
|
|
@@ -2093,6 +2326,7 @@
|
|
|
2093
2326
|
allowCross: false
|
|
2094
2327
|
}, restProps)), /*#__PURE__*/React__default.createElement(Footer, null, renderFooterSection(actionsObj)));
|
|
2095
2328
|
};
|
|
2329
|
+
|
|
2096
2330
|
RangeSlider.defaultProps = {
|
|
2097
2331
|
renderTitleSection: function renderTitleSection() {
|
|
2098
2332
|
return false;
|
|
@@ -2114,6 +2348,7 @@
|
|
|
2114
2348
|
var shoe_sizes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
2115
2349
|
return shoe_sizes.length - 1;
|
|
2116
2350
|
};
|
|
2351
|
+
|
|
2117
2352
|
var formatResultsForRangeSlider = function formatResultsForRangeSlider() {
|
|
2118
2353
|
var shoe_sizes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
2119
2354
|
var newDataShape = {};
|
|
@@ -2123,24 +2358,28 @@
|
|
|
2123
2358
|
});
|
|
2124
2359
|
return newDataShape;
|
|
2125
2360
|
};
|
|
2361
|
+
|
|
2126
2362
|
var ToolTipComponent = function ToolTipComponent(props) {
|
|
2127
2363
|
var marks = props.marks,
|
|
2128
|
-
|
|
2364
|
+
value = props.value;
|
|
2129
2365
|
return /*#__PURE__*/React__default.createElement("div", null, marks[value]);
|
|
2130
2366
|
};
|
|
2131
|
-
|
|
2132
2367
|
/** slider ui component for shoe size selection interests */
|
|
2368
|
+
|
|
2369
|
+
|
|
2133
2370
|
var ShoeSizeSelector = function ShoeSizeSelector(_ref2) {
|
|
2134
2371
|
var onChange = _ref2.onChange,
|
|
2135
|
-
|
|
2372
|
+
shoeSizes = _ref2.shoeSizes;
|
|
2373
|
+
|
|
2136
2374
|
var handleShoeSizeChange = function handleShoeSizeChange(value) {
|
|
2137
2375
|
var min_shoe_key = value.min,
|
|
2138
|
-
|
|
2376
|
+
max_shoe_key = value.max;
|
|
2139
2377
|
onChange({
|
|
2140
2378
|
min_shoe_size_id: shoeSizes[min_shoe_key].id,
|
|
2141
2379
|
max_shoe_size_id: shoeSizes[max_shoe_key].id
|
|
2142
2380
|
});
|
|
2143
2381
|
};
|
|
2382
|
+
|
|
2144
2383
|
var getFooterButtons = function getFooterButtons(actionObj) {
|
|
2145
2384
|
var giveFullRange = actionObj.giveFullRange;
|
|
2146
2385
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(InvertedTextButton$1, {
|
|
@@ -2149,6 +2388,7 @@
|
|
|
2149
2388
|
onClick: giveFullRange
|
|
2150
2389
|
}, "Full Shoe Size Range"));
|
|
2151
2390
|
};
|
|
2391
|
+
|
|
2152
2392
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(RangeSlider$1, {
|
|
2153
2393
|
identifier: "shoe-size-range-slider",
|
|
2154
2394
|
marks: formatResultsForRangeSlider(shoeSizes),
|
|
@@ -2161,6 +2401,7 @@
|
|
|
2161
2401
|
onChange: handleShoeSizeChange
|
|
2162
2402
|
}));
|
|
2163
2403
|
};
|
|
2404
|
+
|
|
2164
2405
|
ShoeSizeSelector.defaultProps = {
|
|
2165
2406
|
onChange: function onChange() {
|
|
2166
2407
|
return false;
|
|
@@ -2209,6 +2450,7 @@
|
|
|
2209
2450
|
var inputMarginRight = '0.2em';
|
|
2210
2451
|
var CheckboxLabel = styled__default.label(_templateObject$q || (_templateObject$q = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n\n span {\n :before {\n content: '\\2713';\n position: absolute;\n display: none;\n color: white;\n left: 0.4em;\n top: 0.1em;\n font-size: ", ";\n text-align: center;\n }\n }\n\n input {\n font-size: ", ";\n background-color: ", ";\n appearance: none;\n outline: none;\n height: 1em;\n width: 1em;\n margin-right: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n transition-duration: 0.3s;\n cursor: pointer;\n\n &:checked {\n background-color: ", ";\n }\n\n &:checked + span:before {\n display: block;\n }\n }\n"], ["\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n\n span {\n :before {\n content: '\\\\2713';\n position: absolute;\n display: none;\n color: white;\n left: 0.4em;\n top: 0.1em;\n font-size: ", ";\n text-align: center;\n }\n }\n\n input {\n font-size: ", ";\n background-color: ", ";\n appearance: none;\n outline: none;\n height: 1em;\n width: 1em;\n margin-right: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n transition-duration: 0.3s;\n cursor: pointer;\n\n &:checked {\n background-color: ", ";\n }\n\n &:checked + span:before {\n display: block;\n }\n }\n"])), function (props) {
|
|
2211
2452
|
var _props$theme;
|
|
2453
|
+
|
|
2212
2454
|
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.fontSizes.length ? props.theme.fontSizes[4] : '1em';
|
|
2213
2455
|
}, function (props) {
|
|
2214
2456
|
return props.theme.fontSizes[4];
|
|
@@ -2232,14 +2474,16 @@
|
|
|
2232
2474
|
*/
|
|
2233
2475
|
var RadioButtons = function RadioButtons(_ref) {
|
|
2234
2476
|
var options = _ref.options,
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2477
|
+
name = _ref.name,
|
|
2478
|
+
noWrap = _ref.noWrap,
|
|
2479
|
+
title = _ref.title,
|
|
2480
|
+
errors = _ref.errors;
|
|
2481
|
+
|
|
2239
2482
|
var _useState = React.useState(errors[name]),
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2483
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2484
|
+
errMsg = _useState2[0],
|
|
2485
|
+
setErrMsg = _useState2[1];
|
|
2486
|
+
|
|
2243
2487
|
React.useEffect(function () {
|
|
2244
2488
|
setErrMsg(errors[name]);
|
|
2245
2489
|
}, [errors, name]);
|
|
@@ -2247,15 +2491,15 @@
|
|
|
2247
2491
|
noWrap: noWrap
|
|
2248
2492
|
}, options.map(function (_ref2, index) {
|
|
2249
2493
|
var _ref2$actionCallback = _ref2.actionCallback,
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2494
|
+
actionCallback = _ref2$actionCallback === void 0 ? function () {
|
|
2495
|
+
return null;
|
|
2496
|
+
} : _ref2$actionCallback,
|
|
2497
|
+
_ref2$value = _ref2.value,
|
|
2498
|
+
value = _ref2$value === void 0 ? '' : _ref2$value,
|
|
2499
|
+
_ref2$innerText = _ref2.innerText,
|
|
2500
|
+
innerText = _ref2$innerText === void 0 ? '' : _ref2$innerText,
|
|
2501
|
+
_ref2$checked = _ref2.checked,
|
|
2502
|
+
checked = _ref2$checked === void 0 ? false : _ref2$checked;
|
|
2259
2503
|
return /*#__PURE__*/React__default.createElement(RadioButtonLabel, {
|
|
2260
2504
|
key: "".concat(name, "-").concat(index),
|
|
2261
2505
|
htmlFor: "".concat(name, "_").concat(index)
|
|
@@ -2272,6 +2516,7 @@
|
|
|
2272
2516
|
}), /*#__PURE__*/React__default.createElement(RadioButtonCircle, null, /*#__PURE__*/React__default.createElement(RadioButtonCircleInner, null)), /*#__PURE__*/React__default.createElement(RadioButtonText, null, innerText));
|
|
2273
2517
|
}))), errMsg && /*#__PURE__*/React__default.createElement(ErrorMessage$1, null, errMsg));
|
|
2274
2518
|
};
|
|
2519
|
+
|
|
2275
2520
|
RadioButtons.defaultProps = {
|
|
2276
2521
|
noWrap: false,
|
|
2277
2522
|
title: '',
|
|
@@ -2303,14 +2548,17 @@
|
|
|
2303
2548
|
ShoeSizeFadeContainer.defaultProps = {
|
|
2304
2549
|
childVisible: false
|
|
2305
2550
|
};
|
|
2551
|
+
|
|
2306
2552
|
var OpacityTransitionRender = function OpacityTransitionRender(_ref) {
|
|
2307
2553
|
var shoeSizeType = _ref.shoeSizeType,
|
|
2308
|
-
|
|
2554
|
+
children = _ref.children;
|
|
2309
2555
|
var prevShoeSizeType = functions.usePrevious(shoeSizeType);
|
|
2556
|
+
|
|
2310
2557
|
var _React$useState = React__default.useState(false),
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2558
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
2559
|
+
childVisible = _React$useState2[0],
|
|
2560
|
+
setChildVisible = _React$useState2[1];
|
|
2561
|
+
|
|
2314
2562
|
React__default.useEffect(function () {
|
|
2315
2563
|
if (prevShoeSizeType !== shoeSizeType) {
|
|
2316
2564
|
setChildVisible(false);
|
|
@@ -2323,25 +2571,30 @@
|
|
|
2323
2571
|
childVisible: childVisible
|
|
2324
2572
|
}, children);
|
|
2325
2573
|
};
|
|
2574
|
+
|
|
2326
2575
|
var WrappedShoeSizeSelector = function WrappedShoeSizeSelector(_ref2) {
|
|
2327
2576
|
var onChange = _ref2.onChange,
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2577
|
+
requestInstance = _ref2.requestInstance,
|
|
2578
|
+
graphApi = _ref2.graphApi,
|
|
2579
|
+
defaultShoeSizeType = _ref2.defaultShoeSizeType,
|
|
2580
|
+
getGraphQuery = _ref2.getGraphQuery;
|
|
2581
|
+
|
|
2332
2582
|
var _useState = React.useState(defaultShoeSizeType),
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2583
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2584
|
+
shoeSizeType = _useState2[0],
|
|
2585
|
+
setShoeSizeType = _useState2[1];
|
|
2586
|
+
|
|
2336
2587
|
var _useState3 = React.useState(defaultShoeSizeType),
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2588
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2589
|
+
transitionedTo = _useState4[0],
|
|
2590
|
+
setTransitionedTo = _useState4[1];
|
|
2591
|
+
|
|
2340
2592
|
var triggerRequest = function triggerRequest() {
|
|
2341
2593
|
return requestInstance.post(graphApi, {
|
|
2342
2594
|
query: getGraphQuery()
|
|
2343
2595
|
});
|
|
2344
2596
|
};
|
|
2597
|
+
|
|
2345
2598
|
var shoeSizeTypeProps = {
|
|
2346
2599
|
name: 'shoe_size_type',
|
|
2347
2600
|
noWrap: true,
|
|
@@ -2365,12 +2618,15 @@
|
|
|
2365
2618
|
checked: shoeSizeType === shoeSizeTypes.eu.value
|
|
2366
2619
|
}]
|
|
2367
2620
|
};
|
|
2621
|
+
|
|
2368
2622
|
var handlePropOnChange = function handlePropOnChange(value) {
|
|
2369
2623
|
var payload = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
2370
2624
|
shoe_size_type: shoeSizeType
|
|
2371
2625
|
});
|
|
2626
|
+
|
|
2372
2627
|
onChange(payload);
|
|
2373
2628
|
};
|
|
2629
|
+
|
|
2374
2630
|
var renderShoeSizeSelector = function renderShoeSizeSelector() {
|
|
2375
2631
|
var passedShoeSizes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
2376
2632
|
return /*#__PURE__*/React__default.createElement(ShoeSizeSelector, {
|
|
@@ -2380,32 +2636,38 @@
|
|
|
2380
2636
|
}
|
|
2381
2637
|
});
|
|
2382
2638
|
};
|
|
2639
|
+
|
|
2383
2640
|
var getShoeSizeSelector = function getShoeSizeSelector() {
|
|
2384
2641
|
var euShoeSizes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
2385
2642
|
var ukShoeShoes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
2643
|
+
|
|
2386
2644
|
if (shoeSizeType === shoeSizeTypes.eu.value) {
|
|
2387
2645
|
return renderShoeSizeSelector(euShoeSizes);
|
|
2388
2646
|
}
|
|
2647
|
+
|
|
2389
2648
|
if (shoeSizeType === shoeSizeTypes.uk.value) {
|
|
2390
2649
|
return renderShoeSizeSelector(ukShoeShoes);
|
|
2391
2650
|
}
|
|
2651
|
+
|
|
2392
2652
|
return null;
|
|
2393
2653
|
};
|
|
2654
|
+
|
|
2394
2655
|
return /*#__PURE__*/React__default.createElement(LuxityPageReady, {
|
|
2395
2656
|
getRequestPromise: triggerRequest
|
|
2396
2657
|
}, /*#__PURE__*/React__default.createElement(TitleWrapper, null, /*#__PURE__*/React__default.createElement(InterestsSubheading, {
|
|
2397
2658
|
title: "Shoe Size Range"
|
|
2398
2659
|
}, /*#__PURE__*/React__default.createElement(RadioButtons$1, shoeSizeTypeProps))), /*#__PURE__*/React__default.createElement(LuxityPageReadyContext.Consumer, null, function (_ref3) {
|
|
2399
2660
|
var _ref3$data$data = _ref3.data.data,
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2661
|
+
_ref3$data$data$luxit = _ref3$data$data.luxity_eu_shoe_sizes,
|
|
2662
|
+
luxity_eu_shoe_sizes = _ref3$data$data$luxit === void 0 ? [] : _ref3$data$data$luxit,
|
|
2663
|
+
_ref3$data$data$luxit2 = _ref3$data$data.luxity_uk_shoe_sizes,
|
|
2664
|
+
luxity_uk_shoe_sizes = _ref3$data$data$luxit2 === void 0 ? [] : _ref3$data$data$luxit2;
|
|
2404
2665
|
return /*#__PURE__*/React__default.createElement(OpacityTransitionRender, {
|
|
2405
2666
|
shoeSizeType: transitionedTo
|
|
2406
2667
|
}, getShoeSizeSelector(luxity_eu_shoe_sizes, luxity_uk_shoe_sizes));
|
|
2407
2668
|
}));
|
|
2408
2669
|
};
|
|
2670
|
+
|
|
2409
2671
|
WrappedShoeSizeSelector.defaultProps = {
|
|
2410
2672
|
onChange: function onChange() {
|
|
2411
2673
|
return false;
|
|
@@ -2417,28 +2679,31 @@
|
|
|
2417
2679
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
2418
2680
|
return value.replace(/\D/g, '');
|
|
2419
2681
|
};
|
|
2420
|
-
|
|
2421
2682
|
/**
|
|
2422
2683
|
* Currency Input which formats the value to a specific format
|
|
2423
2684
|
*/
|
|
2685
|
+
|
|
2424
2686
|
var CurrencyInputFormatter = function CurrencyInputFormatter(_ref) {
|
|
2425
2687
|
var value = _ref.value,
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2688
|
+
onChange = _ref.onChange,
|
|
2689
|
+
prefix = _ref.prefix,
|
|
2690
|
+
allowNegativeValue = _ref.allowNegativeValue,
|
|
2691
|
+
groupSeparator = _ref.groupSeparator,
|
|
2692
|
+
decimalSeparator = _ref.decimalSeparator,
|
|
2693
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
2694
|
+
|
|
2432
2695
|
var handleValueChange = function handleValueChange(event) {
|
|
2433
2696
|
var inputValue = event.target.value;
|
|
2434
2697
|
var unmaskedValue = unMask(inputValue);
|
|
2435
2698
|
onChange(unmaskedValue);
|
|
2436
2699
|
};
|
|
2700
|
+
|
|
2437
2701
|
var formatCurrency = function formatCurrency(originalValue) {
|
|
2438
2702
|
var numericValue = Number(originalValue);
|
|
2439
2703
|
var formattedValue = numericValue.toLocaleString('en-US');
|
|
2440
2704
|
return prefix + formattedValue;
|
|
2441
2705
|
};
|
|
2706
|
+
|
|
2442
2707
|
var formattedValue = formatCurrency(value);
|
|
2443
2708
|
return /*#__PURE__*/React__default.createElement("input", _extends({}, rest, {
|
|
2444
2709
|
type: "text",
|
|
@@ -2446,6 +2711,7 @@
|
|
|
2446
2711
|
onChange: handleValueChange
|
|
2447
2712
|
}));
|
|
2448
2713
|
};
|
|
2714
|
+
|
|
2449
2715
|
CurrencyInputFormatter.defaultProps = {
|
|
2450
2716
|
value: '',
|
|
2451
2717
|
prefix: 'R',
|
|
@@ -2456,6 +2722,7 @@
|
|
|
2456
2722
|
};
|
|
2457
2723
|
|
|
2458
2724
|
var _excluded$6 = ["children"];
|
|
2725
|
+
|
|
2459
2726
|
var _templateObject$s;
|
|
2460
2727
|
var Button$4 = styled__default.button(_templateObject$s || (_templateObject$s = _taggedTemplateLiteral(["\n ", ";\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:disabled {\n ", "\n &:hover {\n background-color: ", ";\n }\n }\n"])), baseButtonStyle, function (props) {
|
|
2461
2728
|
return props.theme.colors.ntrlMin;
|
|
@@ -2470,11 +2737,14 @@
|
|
|
2470
2737
|
}, disabledButtonStyle, function (props) {
|
|
2471
2738
|
return props.theme.colors.base;
|
|
2472
2739
|
});
|
|
2740
|
+
|
|
2473
2741
|
var SecondaryButton = function SecondaryButton(_ref) {
|
|
2474
2742
|
var children = _ref.children,
|
|
2475
|
-
|
|
2743
|
+
restProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
2744
|
+
|
|
2476
2745
|
return /*#__PURE__*/React__default.createElement(Button$4, restProps, children);
|
|
2477
2746
|
};
|
|
2747
|
+
|
|
2478
2748
|
var SecondaryButton$1 = themed(SecondaryButton);
|
|
2479
2749
|
|
|
2480
2750
|
var _templateObject$t;
|
|
@@ -2483,23 +2753,31 @@
|
|
|
2483
2753
|
});
|
|
2484
2754
|
|
|
2485
2755
|
var debounceBuilder$2 = functions.debounced(50);
|
|
2756
|
+
|
|
2486
2757
|
var getMaxPrice = function getMaxPrice() {
|
|
2487
2758
|
var interestCategory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
2759
|
+
|
|
2488
2760
|
switch (interestCategory) {
|
|
2489
2761
|
case interestCategories.ACCESSORIES:
|
|
2490
2762
|
return interestCategoryMaxPrices.ACCESSORIES;
|
|
2763
|
+
|
|
2491
2764
|
case interestCategories.BAGS:
|
|
2492
2765
|
return interestCategoryMaxPrices.BAGS;
|
|
2766
|
+
|
|
2493
2767
|
case interestCategories.SHOES:
|
|
2494
2768
|
return interestCategoryMaxPrices.SHOES;
|
|
2769
|
+
|
|
2495
2770
|
case interestCategories.WATCHES:
|
|
2496
2771
|
return interestCategoryMaxPrices.WATCHES;
|
|
2772
|
+
|
|
2497
2773
|
case interestCategories.APPAREL:
|
|
2498
2774
|
return interestCategoryMaxPrices.APPAREL;
|
|
2775
|
+
|
|
2499
2776
|
default:
|
|
2500
2777
|
return 0;
|
|
2501
2778
|
}
|
|
2502
2779
|
};
|
|
2780
|
+
|
|
2503
2781
|
var getFooterButtons = function getFooterButtons(actionObj) {
|
|
2504
2782
|
var giveFullRange = actionObj.giveFullRange;
|
|
2505
2783
|
return /*#__PURE__*/React__default.createElement(SecondaryButton$1, {
|
|
@@ -2507,21 +2785,24 @@
|
|
|
2507
2785
|
onClick: giveFullRange
|
|
2508
2786
|
}, "Full Price Range");
|
|
2509
2787
|
};
|
|
2510
|
-
|
|
2511
2788
|
/** UI Slider with minimum and max input fields give the ability to
|
|
2512
2789
|
* select a price range */
|
|
2790
|
+
|
|
2791
|
+
|
|
2513
2792
|
var PriceRangeSelector = function PriceRangeSelector(_ref) {
|
|
2514
2793
|
var onChange = _ref.onChange,
|
|
2515
|
-
|
|
2794
|
+
category = _ref.category;
|
|
2516
2795
|
var maxPrice = getMaxPrice(category);
|
|
2796
|
+
|
|
2517
2797
|
var handleSlideChange = function handleSlideChange(value) {
|
|
2518
2798
|
var min_price = value.min,
|
|
2519
|
-
|
|
2799
|
+
max_price = value.max;
|
|
2520
2800
|
onChange({
|
|
2521
2801
|
min_price: min_price,
|
|
2522
2802
|
max_price: max_price
|
|
2523
2803
|
});
|
|
2524
2804
|
};
|
|
2805
|
+
|
|
2525
2806
|
var handleMinCurrencyChange = function handleMinCurrencyChange(targetValue, currMaxVal, manuallyChangeMinValue) {
|
|
2526
2807
|
var value = parseInt(unMask(targetValue), 10);
|
|
2527
2808
|
value = Number.isNaN(value) ? 0 : value;
|
|
@@ -2534,6 +2815,7 @@
|
|
|
2534
2815
|
});
|
|
2535
2816
|
});
|
|
2536
2817
|
};
|
|
2818
|
+
|
|
2537
2819
|
var handleMaxCurrencyChange = function handleMaxCurrencyChange(targetValue, currMinVal, manuallyChangeMaxValue) {
|
|
2538
2820
|
var value = parseInt(unMask(targetValue), 10);
|
|
2539
2821
|
value = Number.isNaN(value) ? 0 : value;
|
|
@@ -2546,6 +2828,7 @@
|
|
|
2546
2828
|
});
|
|
2547
2829
|
});
|
|
2548
2830
|
};
|
|
2831
|
+
|
|
2549
2832
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2550
2833
|
className: "price-ranges"
|
|
2551
2834
|
}, /*#__PURE__*/React__default.createElement(RangeSlider$1, {
|
|
@@ -2564,9 +2847,9 @@
|
|
|
2564
2847
|
title: "Price Ranges"
|
|
2565
2848
|
}, function (_ref2) {
|
|
2566
2849
|
var manuallyChangeMinValue = _ref2.manuallyChangeMinValue,
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2850
|
+
manuallyChangeMaxValue = _ref2.manuallyChangeMaxValue,
|
|
2851
|
+
currMinVal = _ref2.currMinVal,
|
|
2852
|
+
currMaxVal = _ref2.currMaxVal;
|
|
2570
2853
|
return /*#__PURE__*/React__default.createElement(CurrencyInputWrapper, null, /*#__PURE__*/React__default.createElement(CurrencyInputFormatter, {
|
|
2571
2854
|
"data-qe-id": "masked-input-min",
|
|
2572
2855
|
value: currMinVal,
|
|
@@ -2582,6 +2865,7 @@
|
|
|
2582
2865
|
}));
|
|
2583
2866
|
}));
|
|
2584
2867
|
};
|
|
2868
|
+
|
|
2585
2869
|
PriceRangeSelector.defaultProps = {
|
|
2586
2870
|
onChange: function onChange() {
|
|
2587
2871
|
return false;
|
|
@@ -2610,6 +2894,7 @@
|
|
|
2610
2894
|
});
|
|
2611
2895
|
|
|
2612
2896
|
var _excluded$7 = ["title", "checked", "renderIcon", "onChange", "checkedValue", "unCheckedValue"];
|
|
2897
|
+
|
|
2613
2898
|
var _templateObject$v, _templateObject2$6, _templateObject3$1;
|
|
2614
2899
|
var Content = styled__default.div(_templateObject$v || (_templateObject$v = _taggedTemplateLiteral(["\n background-color: transparent;\n border: 1px solid ", ";\n transition: 200ms ease-in-out;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: ", ";\n cursor: pointer;\n"])), function (props) {
|
|
2615
2900
|
return props.theme.colors.primary;
|
|
@@ -2628,32 +2913,36 @@
|
|
|
2628
2913
|
}, Content, InputText, function (props) {
|
|
2629
2914
|
return props.theme.colors.ntrlMin;
|
|
2630
2915
|
}, Content);
|
|
2631
|
-
|
|
2632
2916
|
/**
|
|
2633
2917
|
* CheckButton: Styled checkbox that resembles a button
|
|
2634
2918
|
* */
|
|
2919
|
+
|
|
2635
2920
|
var CheckButton = function CheckButton(props) {
|
|
2636
2921
|
var title = props.title,
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2922
|
+
checked = props.checked,
|
|
2923
|
+
renderIcon = props.renderIcon,
|
|
2924
|
+
onChange = props.onChange,
|
|
2925
|
+
checkedValue = props.checkedValue,
|
|
2926
|
+
unCheckedValue = props.unCheckedValue,
|
|
2927
|
+
restProps = _objectWithoutProperties(props, _excluded$7);
|
|
2928
|
+
|
|
2643
2929
|
var _React$useState = React__default.useState(checked),
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2930
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
2931
|
+
checkedState = _React$useState2[0],
|
|
2932
|
+
setCheck = _React$useState2[1];
|
|
2933
|
+
|
|
2647
2934
|
var prevCheckState = functions.usePrevious(checkedState);
|
|
2648
2935
|
React__default.useEffect(function () {
|
|
2649
2936
|
if (prevCheckState !== checkedState) {
|
|
2650
2937
|
onChange(checkedState);
|
|
2651
2938
|
}
|
|
2652
2939
|
}, [checkedState, onChange, prevCheckState]);
|
|
2940
|
+
|
|
2653
2941
|
var handleInputChange = function handleInputChange(e) {
|
|
2654
2942
|
var targetChecked = e.target.checked;
|
|
2655
2943
|
setCheck(targetChecked);
|
|
2656
2944
|
};
|
|
2945
|
+
|
|
2657
2946
|
return /*#__PURE__*/React__default.createElement(StyledLabel, null, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
2658
2947
|
defaultChecked: checked
|
|
2659
2948
|
}, restProps, {
|
|
@@ -2661,6 +2950,7 @@
|
|
|
2661
2950
|
onChange: handleInputChange
|
|
2662
2951
|
})), /*#__PURE__*/React__default.createElement(Content, null, /*#__PURE__*/React__default.createElement(InputText, null, title), renderIcon(checkedState)));
|
|
2663
2952
|
};
|
|
2953
|
+
|
|
2664
2954
|
CheckButton.defaultProps = {
|
|
2665
2955
|
title: '',
|
|
2666
2956
|
checked: false,
|
|
@@ -2674,24 +2964,29 @@
|
|
|
2674
2964
|
var CheckButton$1 = themed(CheckButton);
|
|
2675
2965
|
|
|
2676
2966
|
var MALE = genders.MALE,
|
|
2677
|
-
|
|
2967
|
+
FEMALE = genders.FEMALE;
|
|
2968
|
+
|
|
2678
2969
|
/**
|
|
2679
2970
|
* Stylized CheckboxButton for selecting gender
|
|
2680
2971
|
* */
|
|
2681
2972
|
var GenderCheckbox = function GenderCheckbox(_ref) {
|
|
2682
2973
|
var gender = _ref.gender,
|
|
2683
|
-
|
|
2684
|
-
|
|
2974
|
+
checked = _ref.checked,
|
|
2975
|
+
onInputChange = _ref.onInputChange;
|
|
2976
|
+
|
|
2685
2977
|
var getTitle = function getTitle() {
|
|
2686
2978
|
switch (gender) {
|
|
2687
2979
|
case MALE:
|
|
2688
2980
|
return 'Male';
|
|
2981
|
+
|
|
2689
2982
|
case FEMALE:
|
|
2690
2983
|
return 'Female';
|
|
2984
|
+
|
|
2691
2985
|
default:
|
|
2692
2986
|
return '';
|
|
2693
2987
|
}
|
|
2694
2988
|
};
|
|
2989
|
+
|
|
2695
2990
|
return /*#__PURE__*/React__default.createElement(CheckButton$1, {
|
|
2696
2991
|
onChange: onInputChange,
|
|
2697
2992
|
checked: checked,
|
|
@@ -2699,20 +2994,22 @@
|
|
|
2699
2994
|
title: getTitle()
|
|
2700
2995
|
});
|
|
2701
2996
|
};
|
|
2997
|
+
|
|
2702
2998
|
GenderCheckbox.defaultProps = {
|
|
2703
2999
|
name: ''
|
|
2704
3000
|
};
|
|
2705
3001
|
|
|
2706
3002
|
var MALE$1 = genders.MALE,
|
|
2707
|
-
|
|
3003
|
+
FEMALE$1 = genders.FEMALE;
|
|
3004
|
+
|
|
2708
3005
|
/**
|
|
2709
3006
|
* GenderSelector: specialized selector to pick genders for the Interest Component
|
|
2710
3007
|
* */
|
|
2711
3008
|
var GenderSelector = function GenderSelector(_ref) {
|
|
2712
3009
|
var gender = _ref.gender,
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
3010
|
+
onChange = _ref.onChange,
|
|
3011
|
+
maleInputRef = _ref.maleInputRef,
|
|
3012
|
+
femaleInputRef = _ref.femaleInputRef;
|
|
2716
3013
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2717
3014
|
className: "gender-selector"
|
|
2718
3015
|
}, /*#__PURE__*/React__default.createElement(InterestsSubheading, {
|
|
@@ -2737,6 +3034,7 @@
|
|
|
2737
3034
|
checkBoxButtonRef: femaleInputRef
|
|
2738
3035
|
})));
|
|
2739
3036
|
};
|
|
3037
|
+
|
|
2740
3038
|
GenderSelector.defaultProps = {
|
|
2741
3039
|
gender: null,
|
|
2742
3040
|
onChange: function onChange() {
|
|
@@ -2747,13 +3045,15 @@
|
|
|
2747
3045
|
|
|
2748
3046
|
var ConditionSelector = function ConditionSelector(_ref) {
|
|
2749
3047
|
var onChange = _ref.onChange,
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
3048
|
+
graphApi = _ref.graphApi,
|
|
3049
|
+
itemRenderer = _ref.itemRenderer,
|
|
3050
|
+
getGraphQuery = _ref.getGraphQuery,
|
|
3051
|
+
requestInstance = _ref.requestInstance;
|
|
3052
|
+
|
|
2754
3053
|
var resultProcessor = function resultProcessor(result) {
|
|
2755
3054
|
return result.data.data.conditions_list;
|
|
2756
3055
|
};
|
|
3056
|
+
|
|
2757
3057
|
return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
|
|
2758
3058
|
title: "Condition",
|
|
2759
3059
|
queryId: "getCondition",
|
|
@@ -2770,6 +3070,7 @@
|
|
|
2770
3070
|
requestInstance: requestInstance
|
|
2771
3071
|
});
|
|
2772
3072
|
};
|
|
3073
|
+
|
|
2773
3074
|
ConditionSelector.defaultProps = {
|
|
2774
3075
|
itemRenderer: ItemRenderer
|
|
2775
3076
|
};
|
|
@@ -2808,30 +3109,41 @@
|
|
|
2808
3109
|
request: _objectSpread2({}, request),
|
|
2809
3110
|
isCategoriesShown: false
|
|
2810
3111
|
};
|
|
2811
|
-
|
|
2812
3112
|
/**
|
|
2813
3113
|
* Generates Interest UI and submits graph payloads as a highly specialised component
|
|
2814
3114
|
*/
|
|
3115
|
+
|
|
2815
3116
|
var AddInterest = /*#__PURE__*/function (_React$Component) {
|
|
3117
|
+
_inherits(AddInterest, _React$Component);
|
|
3118
|
+
|
|
3119
|
+
var _super = _createSuper(AddInterest);
|
|
3120
|
+
|
|
2816
3121
|
function AddInterest(props) {
|
|
2817
3122
|
var _this;
|
|
3123
|
+
|
|
2818
3124
|
_classCallCheck(this, AddInterest);
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
_defineProperty(_this, "
|
|
3125
|
+
|
|
3126
|
+
_this = _super.call(this, props);
|
|
3127
|
+
|
|
3128
|
+
_defineProperty(_assertThisInitialized(_this), "maleCheckBoxRef", /*#__PURE__*/React__default.createRef());
|
|
3129
|
+
|
|
3130
|
+
_defineProperty(_assertThisInitialized(_this), "femaleCheckBoxRef", /*#__PURE__*/React__default.createRef());
|
|
3131
|
+
|
|
3132
|
+
_defineProperty(_assertThisInitialized(_this), "onCategoryChanged", function (categoryType) {
|
|
2823
3133
|
_this.setState({
|
|
2824
3134
|
category_type: categoryType,
|
|
2825
3135
|
brands: [],
|
|
2826
3136
|
styles: []
|
|
2827
3137
|
});
|
|
2828
3138
|
});
|
|
2829
|
-
|
|
3139
|
+
|
|
3140
|
+
_defineProperty(_assertThisInitialized(_this), "onGenderChanged", function (isChecked, gender) {
|
|
2830
3141
|
return _this.setState(function (prevState) {
|
|
2831
3142
|
// current array of options
|
|
2832
3143
|
var gendersSelected = _toConsumableArray(prevState.gender);
|
|
2833
|
-
|
|
2834
|
-
// check if the check box is checked or unchecked
|
|
3144
|
+
|
|
3145
|
+
var index; // check if the check box is checked or unchecked
|
|
3146
|
+
|
|
2835
3147
|
if (isChecked) {
|
|
2836
3148
|
gendersSelected.push(gender);
|
|
2837
3149
|
} else {
|
|
@@ -2839,65 +3151,76 @@
|
|
|
2839
3151
|
index = gendersSelected.indexOf(gender);
|
|
2840
3152
|
gendersSelected.splice(index, 1);
|
|
2841
3153
|
}
|
|
3154
|
+
|
|
2842
3155
|
return {
|
|
2843
3156
|
gender: gendersSelected
|
|
2844
3157
|
};
|
|
2845
3158
|
});
|
|
2846
3159
|
});
|
|
2847
|
-
|
|
3160
|
+
|
|
3161
|
+
_defineProperty(_assertThisInitialized(_this), "onBrandsChanged", function (brandsArray) {
|
|
2848
3162
|
_this.setState({
|
|
2849
3163
|
brands: brandsArray.map(function (brand) {
|
|
2850
3164
|
return brand.id;
|
|
2851
3165
|
})
|
|
2852
3166
|
});
|
|
2853
3167
|
});
|
|
2854
|
-
|
|
3168
|
+
|
|
3169
|
+
_defineProperty(_assertThisInitialized(_this), "onShoeSizesChanged", function (shoeSizes) {
|
|
2855
3170
|
_this.setState(_objectSpread2({}, shoeSizes));
|
|
2856
3171
|
});
|
|
2857
|
-
|
|
3172
|
+
|
|
3173
|
+
_defineProperty(_assertThisInitialized(_this), "onPriceRangesChanged", function (priceRange) {
|
|
2858
3174
|
_this.setState(_objectSpread2({}, priceRange));
|
|
2859
3175
|
});
|
|
2860
|
-
|
|
3176
|
+
|
|
3177
|
+
_defineProperty(_assertThisInitialized(_this), "onStylesChanged", function (stylesArray) {
|
|
2861
3178
|
_this.setState({
|
|
2862
3179
|
styles: stylesArray.map(function (style) {
|
|
2863
3180
|
return style.id;
|
|
2864
3181
|
})
|
|
2865
3182
|
});
|
|
2866
3183
|
});
|
|
2867
|
-
|
|
3184
|
+
|
|
3185
|
+
_defineProperty(_assertThisInitialized(_this), "onConditionChanged", function (conditions) {
|
|
2868
3186
|
_this.setState({
|
|
2869
3187
|
condition: conditions.map(function (condition) {
|
|
2870
3188
|
return condition.id;
|
|
2871
3189
|
})
|
|
2872
3190
|
});
|
|
2873
3191
|
});
|
|
2874
|
-
|
|
3192
|
+
|
|
3193
|
+
_defineProperty(_assertThisInitialized(_this), "payloadIsValid", function () {
|
|
2875
3194
|
// price/shoe-size always have initial values as soon as category is set
|
|
2876
3195
|
var category_type = _this.state.category_type;
|
|
2877
3196
|
return category_type !== null;
|
|
2878
3197
|
});
|
|
2879
|
-
|
|
3198
|
+
|
|
3199
|
+
_defineProperty(_assertThisInitialized(_this), "submitInterest", function () {
|
|
2880
3200
|
_this.setState({
|
|
2881
3201
|
request: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
2882
3202
|
fetching: true
|
|
2883
3203
|
})
|
|
2884
3204
|
});
|
|
3205
|
+
|
|
2885
3206
|
var _this$state = _this.state,
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
3207
|
+
brands = _this$state.brands,
|
|
3208
|
+
min_shoe_size_id = _this$state.min_shoe_size_id,
|
|
3209
|
+
max_shoe_size_id = _this$state.max_shoe_size_id,
|
|
3210
|
+
shoe_size_type = _this$state.shoe_size_type,
|
|
3211
|
+
min_price = _this$state.min_price,
|
|
3212
|
+
max_price = _this$state.max_price,
|
|
3213
|
+
styles = _this$state.styles,
|
|
3214
|
+
category_type = _this$state.category_type,
|
|
3215
|
+
requestState = _this$state.request,
|
|
3216
|
+
gender = _this$state.gender,
|
|
3217
|
+
condition = _this$state.condition;
|
|
2897
3218
|
var payloadGender = gender[0];
|
|
3219
|
+
|
|
2898
3220
|
if (gender.length > 1 || !gender.length) {
|
|
2899
3221
|
payloadGender = UNISEX;
|
|
2900
3222
|
}
|
|
3223
|
+
|
|
2901
3224
|
var basePayload = {
|
|
2902
3225
|
category_type: category_type,
|
|
2903
3226
|
brands: brands,
|
|
@@ -2913,21 +3236,27 @@
|
|
|
2913
3236
|
max_shoe_size_id: max_shoe_size_id,
|
|
2914
3237
|
shoe_size_type: shoe_size_type
|
|
2915
3238
|
} : {};
|
|
3239
|
+
|
|
2916
3240
|
var payload = _objectSpread2(_objectSpread2({}, basePayload), shoeSizesPayload);
|
|
3241
|
+
|
|
2917
3242
|
simpleRequest(_this.props.requestInstance, _this.props.addInterestApi, method.POST, payload, function () {
|
|
2918
3243
|
_this.setState({
|
|
2919
3244
|
request: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
2920
3245
|
success: true
|
|
2921
3246
|
})
|
|
2922
3247
|
});
|
|
3248
|
+
|
|
2923
3249
|
_this.props.onSubmitSuccess(_objectSpread2({}, payload));
|
|
2924
3250
|
}, _this.handleRequestError);
|
|
2925
3251
|
});
|
|
2926
|
-
|
|
3252
|
+
|
|
3253
|
+
_defineProperty(_assertThisInitialized(_this), "handleRequestError", function (_ref) {
|
|
2927
3254
|
var data = _ref.data;
|
|
3255
|
+
|
|
2928
3256
|
_this.setState({
|
|
2929
3257
|
request: _objectSpread2({}, request)
|
|
2930
3258
|
});
|
|
3259
|
+
|
|
2931
3260
|
var errorMessages = Object.keys(data).map(function (key) {
|
|
2932
3261
|
return data[key];
|
|
2933
3262
|
}).flat();
|
|
@@ -2937,32 +3266,37 @@
|
|
|
2937
3266
|
}, message);
|
|
2938
3267
|
}));
|
|
2939
3268
|
});
|
|
2940
|
-
|
|
3269
|
+
|
|
3270
|
+
_defineProperty(_assertThisInitialized(_this), "resetState", function () {
|
|
2941
3271
|
_this.setState(_objectSpread2({}, defaultState));
|
|
3272
|
+
|
|
2942
3273
|
_this.props.onCancel();
|
|
2943
3274
|
});
|
|
2944
|
-
|
|
3275
|
+
|
|
3276
|
+
_defineProperty(_assertThisInitialized(_this), "handleGenderChange", function (isChecked, gender) {
|
|
2945
3277
|
return _this.onGenderChanged(isChecked, gender);
|
|
2946
3278
|
});
|
|
2947
|
-
|
|
3279
|
+
|
|
3280
|
+
_defineProperty(_assertThisInitialized(_this), "onAddInterestClick", function () {
|
|
2948
3281
|
_this.setState(function (prevState) {
|
|
2949
3282
|
return _objectSpread2(_objectSpread2({}, prevState), {}, {
|
|
2950
3283
|
isCategoriesShown: true
|
|
2951
3284
|
});
|
|
2952
3285
|
});
|
|
2953
3286
|
});
|
|
2954
|
-
|
|
3287
|
+
|
|
3288
|
+
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
2955
3289
|
var _this$state2 = _this.state,
|
|
2956
|
-
|
|
2957
|
-
|
|
3290
|
+
category_type = _this$state2.category_type,
|
|
3291
|
+
fetching = _this$state2.request.fetching;
|
|
2958
3292
|
var _this$props = _this.props,
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
3293
|
+
requestInstance = _this$props.requestInstance,
|
|
3294
|
+
baseGraphApi = _this$props.baseGraphApi,
|
|
3295
|
+
getBrandsGraphQuery = _this$props.getBrandsGraphQuery,
|
|
3296
|
+
getStylesGraphQuery = _this$props.getStylesGraphQuery,
|
|
3297
|
+
getShoesGraphQuery = _this$props.getShoesGraphQuery,
|
|
3298
|
+
defaultShoeSizeType = _this$props.defaultShoeSizeType,
|
|
3299
|
+
getConditionsGraphQuery = _this$props.getConditionsGraphQuery;
|
|
2966
3300
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
2967
3301
|
className: "interests__section-wrapper"
|
|
2968
3302
|
}, /*#__PURE__*/React__default.createElement(AddInterestContainer, null, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(CatSelectorParagraph, null, "Select the category that interests you"), /*#__PURE__*/React__default.createElement(CategoryInterestSelector, {
|
|
@@ -3013,16 +3347,19 @@
|
|
|
3013
3347
|
type: "button",
|
|
3014
3348
|
onClick: function onClick() {
|
|
3015
3349
|
_this.submitInterest();
|
|
3350
|
+
|
|
3016
3351
|
_this.resetState();
|
|
3017
3352
|
}
|
|
3018
3353
|
}, fetching ? 'SAVING' : 'SAVE'))))))));
|
|
3019
3354
|
});
|
|
3355
|
+
|
|
3020
3356
|
_this.state = _objectSpread2({}, defaultState);
|
|
3021
3357
|
return _this;
|
|
3022
3358
|
}
|
|
3023
|
-
|
|
3359
|
+
|
|
3024
3360
|
return _createClass(AddInterest);
|
|
3025
3361
|
}(React__default.Component);
|
|
3362
|
+
|
|
3026
3363
|
var index = themed(AddInterest);
|
|
3027
3364
|
|
|
3028
3365
|
return index;
|