@bonlineza/luxity-lib 2.39.4 → 2.39.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion.js +342 -352
- package/AddInterest.js +3109 -3068
- package/AddProductInterest.js +999 -7572
- package/BrandSelector.js +854 -861
- package/Checkbox.js +240 -250
- package/CheckboxButton.js +229 -236
- package/CommunicationPreferenceOptionsRenderer.js +560 -568
- package/CommunicationPreferenceSection.js +651 -659
- package/CommunicationPreferences.js +2394 -2402
- package/ConditionSelector.js +852 -859
- package/CountryCodeSelect.js +79 -6650
- package/CurrencyInputFormatter.js +86 -96
- package/CurrencySelect.js +219 -227
- package/DropdownSelector.js +212 -6821
- package/GALink.js +43 -51
- package/GenderSelector.js +355 -362
- package/GraphQLDropdownSelector.js +5308 -11832
- package/GraphQLMultiSelector.js +593 -601
- package/IconHeader.js +118 -126
- package/IconWrapper.js +17 -25
- package/InterestCatSelector.js +424 -389
- package/InterestItem.js +462 -469
- package/Interests.js +4719 -11243
- package/InterestsSubheading.js +33 -41
- package/InvertedTextButton.js +167 -175
- package/LuxityAppSideNav.js +181 -189
- package/LuxityDesktopHeader.js +1355 -1363
- package/LuxityFooter.js +2228 -2236
- package/LuxityGraphQLDropdownSelector.js +5395 -11919
- package/LuxityGraphQLMultiselector.js +778 -785
- package/LuxityMobileHeader.js +1786 -1794
- package/LuxityPageReady.js +199 -209
- package/LuxityProductInterestItem.js +359 -367
- package/LuxitySideNav.js +665 -673
- package/MaterialSelector.js +5430 -11954
- package/ModelSelector.js +5430 -11954
- package/NotificationDropDown.js +459 -7030
- package/Notify.js +20 -32
- package/OutlinePrimaryButton.js +134 -142
- package/PriceRangeSelector.js +1264 -1265
- package/PrimaryButton.js +129 -137
- package/RadioButtons.js +308 -318
- package/RangeSlider.js +1033 -1039
- package/RareStepFooter.js +257 -264
- package/RareStepHeader.js +801 -808
- package/ReactSelectWrapper.js +33 -6604
- package/SecondaryButton.js +144 -152
- package/ShoeSizeRangeSelector.js +1147 -1153
- package/ShoeSizeSelector.js +1146 -1154
- package/SimpleErrorBoundary.js +130 -138
- package/StyleSelector.js +854 -861
- package/TestComponent.js +15 -0
- package/TextButton.js +135 -143
- package/Tooltip.js +176 -184
- package/Tracking.js +15 -25
- package/WrapperButton.js +50 -58
- package/build/CountryCodeSelect/index.js +18 -0
- package/build/ReactSelectWrapper/index.js +34 -0
- package/build/bundle.css +1 -1
- package/build/bundle.js +10634 -17192
- package/build/constants.js +32 -43
- package/package.json +2 -2
- package/postcss.config.js +6 -0
- package/svg/Accessories.js +34 -42
- package/svg/Account.js +30 -38
- package/svg/Add.js +31 -39
- package/svg/ArrowRight.js +28 -36
- package/svg/Bags.js +40 -48
- package/svg/BurgerMenu.js +24 -32
- package/svg/Calendar.js +98 -106
- package/svg/CalendarCircled.js +100 -108
- package/svg/CheckCircled.js +32 -40
- package/svg/Close.js +29 -37
- package/svg/Clothing.js +36 -44
- package/svg/Dot.js +32 -40
- package/svg/Edit.js +27 -35
- package/svg/Eye.js +28 -36
- package/svg/FileAttach.js +28 -36
- package/svg/FileAttachCircled.js +30 -38
- package/svg/Jewellery.js +56 -0
- package/svg/LightBulb.js +58 -66
- package/svg/Logo.js +132 -140
- package/svg/LuxityMenu.js +28 -36
- package/svg/Minus.js +29 -37
- package/svg/MobileAvatar.js +28 -36
- package/svg/MyOrder.js +36 -44
- package/svg/MyPayment.js +36 -44
- package/svg/MyProfile.js +44 -52
- package/svg/MySale.js +31 -39
- package/svg/Notification.js +30 -38
- package/svg/PointerDown.js +28 -36
- package/svg/Search.js +27 -35
- package/svg/Shoes.js +37 -45
- package/svg/SvgWrapper.js +13 -21
- package/svg/Trash.js +32 -40
- package/svg/Watches.js +47 -55
package/InterestItem.js
CHANGED
|
@@ -1,531 +1,524 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (Object.getOwnPropertySymbols) {
|
|
15
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
16
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
17
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
18
|
-
})), keys.push.apply(keys, symbols);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return keys;
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import styled, { ThemeProvider } from 'styled-components';
|
|
3
|
+
import numeral from 'numeral';
|
|
4
|
+
|
|
5
|
+
function ownKeys(object, enumerableOnly) {
|
|
6
|
+
var keys = Object.keys(object);
|
|
7
|
+
|
|
8
|
+
if (Object.getOwnPropertySymbols) {
|
|
9
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
10
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
11
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
12
|
+
})), keys.push.apply(keys, symbols);
|
|
22
13
|
}
|
|
23
14
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
27
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
28
|
-
_defineProperty(target, key, source[key]);
|
|
29
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
30
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
31
|
-
});
|
|
32
|
-
}
|
|
15
|
+
return keys;
|
|
16
|
+
}
|
|
33
17
|
|
|
34
|
-
|
|
18
|
+
function _objectSpread2(target) {
|
|
19
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
20
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
21
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
22
|
+
_defineProperty(target, key, source[key]);
|
|
23
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
24
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
25
|
+
});
|
|
35
26
|
}
|
|
36
27
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
throw new TypeError("Cannot call a class as a function");
|
|
40
|
-
}
|
|
41
|
-
}
|
|
28
|
+
return target;
|
|
29
|
+
}
|
|
42
30
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
47
|
-
descriptor.configurable = true;
|
|
48
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
49
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
50
|
-
}
|
|
31
|
+
function _classCallCheck(instance, Constructor) {
|
|
32
|
+
if (!(instance instanceof Constructor)) {
|
|
33
|
+
throw new TypeError("Cannot call a class as a function");
|
|
51
34
|
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function _defineProperties(target, props) {
|
|
38
|
+
for (var i = 0; i < props.length; i++) {
|
|
39
|
+
var descriptor = props[i];
|
|
40
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
41
|
+
descriptor.configurable = true;
|
|
42
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
43
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
52
46
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
48
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
49
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
50
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
51
|
+
writable: false
|
|
52
|
+
});
|
|
53
|
+
return Constructor;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function _defineProperty(obj, key, value) {
|
|
57
|
+
if (key in obj) {
|
|
58
|
+
Object.defineProperty(obj, key, {
|
|
59
|
+
value: value,
|
|
60
|
+
enumerable: true,
|
|
61
|
+
configurable: true,
|
|
62
|
+
writable: true
|
|
58
63
|
});
|
|
59
|
-
|
|
64
|
+
} else {
|
|
65
|
+
obj[key] = value;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Object.defineProperty(obj, key, {
|
|
65
|
-
value: value,
|
|
66
|
-
enumerable: true,
|
|
67
|
-
configurable: true,
|
|
68
|
-
writable: true
|
|
69
|
-
});
|
|
70
|
-
} else {
|
|
71
|
-
obj[key] = value;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return obj;
|
|
75
|
-
}
|
|
68
|
+
return obj;
|
|
69
|
+
}
|
|
76
70
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
function _extends() {
|
|
72
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
73
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
74
|
+
var source = arguments[i];
|
|
81
75
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
76
|
+
for (var key in source) {
|
|
77
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
78
|
+
target[key] = source[key];
|
|
86
79
|
}
|
|
87
80
|
}
|
|
88
|
-
|
|
89
|
-
return target;
|
|
90
|
-
};
|
|
91
|
-
return _extends.apply(this, arguments);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function _inherits(subClass, superClass) {
|
|
95
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
96
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
97
81
|
}
|
|
98
82
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
configurable: true
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
Object.defineProperty(subClass, "prototype", {
|
|
107
|
-
writable: false
|
|
108
|
-
});
|
|
109
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
110
|
-
}
|
|
83
|
+
return target;
|
|
84
|
+
};
|
|
85
|
+
return _extends.apply(this, arguments);
|
|
86
|
+
}
|
|
111
87
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
};
|
|
116
|
-
return _getPrototypeOf(o);
|
|
88
|
+
function _inherits(subClass, superClass) {
|
|
89
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
90
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
117
91
|
}
|
|
118
92
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
93
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
94
|
+
constructor: {
|
|
95
|
+
value: subClass,
|
|
96
|
+
writable: true,
|
|
97
|
+
configurable: true
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(subClass, "prototype", {
|
|
101
|
+
writable: false
|
|
102
|
+
});
|
|
103
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
104
|
+
}
|
|
126
105
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
106
|
+
function _getPrototypeOf(o) {
|
|
107
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
108
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
109
|
+
};
|
|
110
|
+
return _getPrototypeOf(o);
|
|
111
|
+
}
|
|
131
112
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
113
|
+
function _setPrototypeOf(o, p) {
|
|
114
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
115
|
+
o.__proto__ = p;
|
|
116
|
+
return o;
|
|
117
|
+
};
|
|
118
|
+
return _setPrototypeOf(o, p);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function _isNativeReflectConstruct() {
|
|
122
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
123
|
+
if (Reflect.construct.sham) return false;
|
|
124
|
+
if (typeof Proxy === "function") return true;
|
|
125
|
+
|
|
126
|
+
try {
|
|
127
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
128
|
+
return true;
|
|
129
|
+
} catch (e) {
|
|
130
|
+
return false;
|
|
138
131
|
}
|
|
132
|
+
}
|
|
139
133
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return self;
|
|
134
|
+
function _assertThisInitialized(self) {
|
|
135
|
+
if (self === void 0) {
|
|
136
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
146
137
|
}
|
|
147
138
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
return call;
|
|
151
|
-
} else if (call !== void 0) {
|
|
152
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
153
|
-
}
|
|
139
|
+
return self;
|
|
140
|
+
}
|
|
154
141
|
|
|
155
|
-
|
|
142
|
+
function _possibleConstructorReturn(self, call) {
|
|
143
|
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
144
|
+
return call;
|
|
145
|
+
} else if (call !== void 0) {
|
|
146
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
156
147
|
}
|
|
157
148
|
|
|
158
|
-
|
|
159
|
-
|
|
149
|
+
return _assertThisInitialized(self);
|
|
150
|
+
}
|
|
160
151
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
result;
|
|
152
|
+
function _createSuper(Derived) {
|
|
153
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
164
154
|
|
|
165
|
-
|
|
166
|
-
|
|
155
|
+
return function _createSuperInternal() {
|
|
156
|
+
var Super = _getPrototypeOf(Derived),
|
|
157
|
+
result;
|
|
167
158
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
result = Super.apply(this, arguments);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
return _possibleConstructorReturn(this, result);
|
|
174
|
-
};
|
|
175
|
-
}
|
|
159
|
+
if (hasNativeReflectConstruct) {
|
|
160
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
176
161
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
162
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
163
|
+
} else {
|
|
164
|
+
result = Super.apply(this, arguments);
|
|
180
165
|
}
|
|
181
166
|
|
|
182
|
-
return
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
167
|
+
return _possibleConstructorReturn(this, result);
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
172
|
+
if (!raw) {
|
|
173
|
+
raw = strings.slice(0);
|
|
187
174
|
}
|
|
188
175
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
delimiters: {
|
|
193
|
-
thousands: ',',
|
|
194
|
-
decimal: '.'
|
|
195
|
-
},
|
|
196
|
-
abbreviations: {
|
|
197
|
-
thousand: 'k',
|
|
198
|
-
million: 'm',
|
|
199
|
-
billion: 'b',
|
|
200
|
-
trillion: 't'
|
|
201
|
-
},
|
|
202
|
-
ordinal: function ordinal() {
|
|
203
|
-
return '.';
|
|
204
|
-
},
|
|
205
|
-
currency: {
|
|
206
|
-
symbol: 'R'
|
|
176
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
177
|
+
raw: {
|
|
178
|
+
value: Object.freeze(raw)
|
|
207
179
|
}
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
180
|
+
}));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** @format */
|
|
184
|
+
|
|
185
|
+
numeral.register('locale', 'en-ZA', {
|
|
186
|
+
delimiters: {
|
|
187
|
+
thousands: ',',
|
|
188
|
+
decimal: '.'
|
|
189
|
+
},
|
|
190
|
+
abbreviations: {
|
|
191
|
+
thousand: 'k',
|
|
192
|
+
million: 'm',
|
|
193
|
+
billion: 'b',
|
|
194
|
+
trillion: 't'
|
|
195
|
+
},
|
|
196
|
+
ordinal: function ordinal() {
|
|
197
|
+
return '.';
|
|
198
|
+
},
|
|
199
|
+
currency: {
|
|
200
|
+
symbol: 'R'
|
|
221
201
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
202
|
+
});
|
|
203
|
+
numeral.locale('en-ZA');
|
|
204
|
+
String.locale = numeral.locale;
|
|
205
|
+
/**
|
|
206
|
+
* Curreny Formatter
|
|
207
|
+
* @param {number} number - the number to be formatted
|
|
208
|
+
* @param {boolean} round - flag to indicate if the number needs to be rounded off
|
|
209
|
+
*/
|
|
210
|
+
|
|
211
|
+
function fC(number) {
|
|
212
|
+
var round = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
213
|
+
var parsedNumber = parseFloat(number);
|
|
214
|
+
return !Number.isNaN(parsedNumber) ? numeral(round ? Math.round(parsedNumber) : parsedNumber).format('$ 0,0.00') : 'R -';
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** @format */
|
|
218
|
+
var request = {
|
|
219
|
+
fetching: false,
|
|
220
|
+
failed: false,
|
|
221
|
+
success: false,
|
|
222
|
+
payload: null
|
|
223
|
+
};
|
|
224
|
+
var method = {
|
|
225
|
+
DELETE: 'DELETE',
|
|
226
|
+
POST: 'POST',
|
|
227
|
+
GET: 'GET'
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
var simpleRequest = (function (axiosInstance, url) {
|
|
231
|
+
var method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'get';
|
|
232
|
+
var payload = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
233
|
+
var onSuccess = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {
|
|
234
|
+
return null;
|
|
229
235
|
};
|
|
230
|
-
var
|
|
231
|
-
|
|
232
|
-
POST: 'POST',
|
|
233
|
-
GET: 'GET'
|
|
236
|
+
var onFailed = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : function () {
|
|
237
|
+
return null;
|
|
234
238
|
};
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
var onFailed = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : function () {
|
|
243
|
-
return null;
|
|
244
|
-
};
|
|
245
|
-
var requestConfigParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
|
|
246
|
-
return axiosInstance[method.toLowerCase()](url, payload, requestConfigParams).then(function (res) {
|
|
247
|
-
onSuccess(res);
|
|
248
|
-
return res;
|
|
249
|
-
}).catch(function (err) {
|
|
250
|
-
onFailed(err);
|
|
251
|
-
return err;
|
|
252
|
-
});
|
|
239
|
+
var requestConfigParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
|
|
240
|
+
return axiosInstance[method.toLowerCase()](url, payload, requestConfigParams).then(function (res) {
|
|
241
|
+
onSuccess(res);
|
|
242
|
+
return res;
|
|
243
|
+
}).catch(function (err) {
|
|
244
|
+
onFailed(err);
|
|
245
|
+
return err;
|
|
253
246
|
});
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
var interestCategories = {
|
|
250
|
+
SHOES: 'SHOES',
|
|
251
|
+
BAGS: 'BAGS',
|
|
252
|
+
ACCESSORIES: 'ACCESSORIES',
|
|
253
|
+
WATCHES: 'WATCHES',
|
|
254
|
+
APPAREL: 'APPAREL',
|
|
255
|
+
JEWELLERY: 'JEWELLERY'
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
var genders = {
|
|
259
|
+
FEMALE: 0,
|
|
260
|
+
MALE: 1,
|
|
261
|
+
UNISEX: 2
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
var Trash = (function (props) {
|
|
265
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
266
|
+
version: "1.1",
|
|
267
|
+
id: "svg-trash",
|
|
268
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
269
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
270
|
+
x: "0px",
|
|
271
|
+
y: "0px",
|
|
272
|
+
viewBox: "0 0 15.1 17.5",
|
|
273
|
+
xmlSpace: "preserve"
|
|
274
|
+
}, props), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
275
|
+
d: "M2.4,17.5c-0.4-0.1-0.5-0.4-0.5-0.8c0-4,0-7.9,0-11.9c0-0.1,0-0.1,0-0.2c-0.1,0-0.1,0-0.2,0c-0.3,0-0.7,0-1,0 C0.3,4.6,0,4.3,0,4C0,3.3,0,2.7,0,2c0.1-0.8,0.8-1.5,1.7-1.6c1.3,0,2.6,0,3.9,0c0.1,0,0.2,0,0.3-0.1C6,0.1,6.2,0,6.5,0 c0.7,0,1.4,0,2.1,0c0.3,0,0.5,0.1,0.6,0.3c0.1,0.1,0.1,0.1,0.2,0.1c1.3,0,2.5,0,3.8,0c0.8,0,1.4,0.4,1.7,1.1C15,1.7,15,2,15,2.3 c0,0.5,0,1,0,1.6c0,0.5-0.3,0.7-0.7,0.7c-0.4,0-0.7,0-1.1,0c0,0,0,0-0.1,0c0,0.1,0,0.1,0,0.2c0,4,0,7.9,0,11.9 c0,0.4-0.1,0.7-0.5,0.8C9.2,17.5,5.8,17.5,2.4,17.5z M11.8,16.2c0-3.9,0-7.7,0-11.6c-2.9,0-5.7,0-8.6,0c0,3.9,0,7.7,0,11.6 C6.1,16.2,9,16.2,11.8,16.2z M1.3,3.2c4.1,0,8.3,0,12.4,0c0-0.3,0-0.6,0-0.9c0-0.5-0.2-0.6-0.6-0.6c-3.7,0-7.4,0-11.1,0 c-0.1,0-0.2,0-0.3,0C1.5,1.8,1.3,2,1.3,2.2C1.3,2.5,1.3,2.9,1.3,3.2z"
|
|
276
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
277
|
+
d: "M5.1,9.8c0-1.1,0-2.3,0-3.4c0-0.4,0.2-0.7,0.5-0.7C6,5.6,6.3,5.8,6.4,6.1c0,0.1,0,0.2,0,0.3c0,2.2,0,4.5,0,6.7 c0,0.1,0,0.3-0.1,0.4C6.2,13.8,6,14,5.7,13.9c-0.3,0-0.5-0.2-0.6-0.5c0-0.1,0-0.2,0-0.3C5.1,12,5.1,10.9,5.1,9.8z"
|
|
278
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
279
|
+
d: "M9.9,9.8c0,1.1,0,2.3,0,3.4c0,0.3-0.2,0.6-0.5,0.7c-0.4,0.1-0.8-0.1-0.9-0.5c0-0.1,0-0.2,0-0.2c0-2.3,0-4.5,0-6.8 c0-0.4,0.2-0.7,0.5-0.7c0.3-0.1,0.7,0.1,0.7,0.5c0,0.1,0,0.2,0,0.3C9.9,7.6,9.9,8.7,9.9,9.8z"
|
|
280
|
+
})));
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
var _templateObject;
|
|
284
|
+
var SvgWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 1rem;\n display: flex;\n svg {\n width: 23px;\n height: auto;\n }\n"])));
|
|
285
|
+
|
|
286
|
+
var theme = {
|
|
287
|
+
breakpoints: ['40em', '52em', '64em'],
|
|
288
|
+
space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
|
|
289
|
+
fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
|
|
290
|
+
marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
|
|
291
|
+
letterSpacings: ['-0.5px', '0px', '+0.5px'],
|
|
292
|
+
radii: ['0px', '2px', '4px', '8px'],
|
|
293
|
+
borderRadius: '6px',
|
|
294
|
+
colors: {
|
|
295
|
+
primary: '#000',
|
|
296
|
+
base: '#4e4949',
|
|
297
|
+
baseLt: '#817c7c',
|
|
298
|
+
borderColor: '#d8d8d8',
|
|
299
|
+
ntrlMin: '#fff',
|
|
300
|
+
ntrlMinTen: '#e6e6e6',
|
|
301
|
+
gray: '#efefef',
|
|
302
|
+
darkerGray: '#454141'
|
|
303
|
+
},
|
|
304
|
+
rareStepColors: {
|
|
305
|
+
primary: '#202b58',
|
|
306
|
+
secondary: '#ef5c2d',
|
|
307
|
+
ntrlMin: '#ffffff',
|
|
308
|
+
ntrl40: '#f4f4f4',
|
|
309
|
+
ntrl50: '#808080',
|
|
310
|
+
ntrl60: '#e8e8e8',
|
|
311
|
+
ntrl70: '#252525',
|
|
312
|
+
ntrlMax: '#000000'
|
|
313
|
+
},
|
|
314
|
+
rareStepFontWeights: {
|
|
315
|
+
normal: 400,
|
|
316
|
+
medium: 500,
|
|
317
|
+
semiBold: 600,
|
|
318
|
+
bold: 700
|
|
319
|
+
},
|
|
320
|
+
rareStepFontSize: {
|
|
321
|
+
h1: '36px',
|
|
322
|
+
h2: '30px',
|
|
323
|
+
h3: '24px',
|
|
324
|
+
h4: '20px',
|
|
325
|
+
h5: '16px',
|
|
326
|
+
h6: '14px',
|
|
327
|
+
footerTitle: '16px'
|
|
328
|
+
},
|
|
329
|
+
rareStepPageSizes: {
|
|
330
|
+
mobile: '500px',
|
|
331
|
+
tablet: '768px',
|
|
332
|
+
desktop: '992px',
|
|
333
|
+
screenl: '1280px',
|
|
334
|
+
screenxl: '1680px',
|
|
335
|
+
screenxxl: '1920px',
|
|
336
|
+
container: '1600px'
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
var themed = (function (Component) {
|
|
341
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
342
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
343
|
+
theme: theme
|
|
344
|
+
}, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
345
|
+
ref: ref
|
|
285
346
|
})));
|
|
286
347
|
});
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
var _templateObject$1;
|
|
351
|
+
var IconWrapper = styled.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n height: auto;\n margin-bottom: 1rem;\n margin-left: 1rem;\n display: flex;\n align-items: center;\n height: auto;\n\n :hover {\n background-color: ", ";\n cursor: pointer;\n }\n\n #svg-trash {\n width: 15px;\n height: 100%;\n }\n"])), function (props) {
|
|
352
|
+
return props.theme.colors.borderColor;
|
|
353
|
+
}, function (props) {
|
|
354
|
+
return props.theme.colors.borderColor;
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
var media = {
|
|
358
|
+
xs: '576px',
|
|
359
|
+
sm: '768px',
|
|
360
|
+
md: '992px',
|
|
361
|
+
lg: '1200px'
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
var _templateObject$2, _templateObject2, _templateObject3, _templateObject4;
|
|
365
|
+
var MALE = genders.MALE,
|
|
366
|
+
FEMALE = genders.FEMALE,
|
|
367
|
+
UNISEX = genders.UNISEX;
|
|
368
|
+
|
|
369
|
+
var TrashIcon = function TrashIcon(_ref) {
|
|
370
|
+
var onClick = _ref.onClick,
|
|
371
|
+
id = _ref.id;
|
|
372
|
+
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
373
|
+
onClick: onClick,
|
|
374
|
+
id: id
|
|
375
|
+
}, /*#__PURE__*/React.createElement(SvgWrapper, null, /*#__PURE__*/React.createElement(Trash, null)));
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
var InterestItem = /*#__PURE__*/function (_React$Component) {
|
|
379
|
+
_inherits(InterestItem, _React$Component);
|
|
380
|
+
|
|
381
|
+
var _super = _createSuper(InterestItem);
|
|
382
|
+
|
|
383
|
+
function InterestItem(props) {
|
|
384
|
+
var _this;
|
|
385
|
+
|
|
386
|
+
_classCallCheck(this, InterestItem);
|
|
387
|
+
|
|
388
|
+
_this = _super.call(this, props);
|
|
389
|
+
|
|
390
|
+
_defineProperty(_assertThisInitialized(_this), "deleteInterestItem", function () {
|
|
391
|
+
var id = _this.props.data.id;
|
|
392
|
+
|
|
393
|
+
_this.setState({
|
|
394
|
+
delete: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
395
|
+
fetching: true
|
|
396
|
+
})
|
|
397
|
+
});
|
|
287
398
|
|
|
288
|
-
|
|
289
|
-
var SvgWrapper = styled__default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 1rem;\n display: flex;\n svg {\n width: 23px;\n height: auto;\n }\n"])));
|
|
290
|
-
|
|
291
|
-
var theme = {
|
|
292
|
-
breakpoints: ['40em', '52em', '64em'],
|
|
293
|
-
space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
|
|
294
|
-
fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
|
|
295
|
-
marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
|
|
296
|
-
letterSpacings: ['-0.5px', '0px', '+0.5px'],
|
|
297
|
-
radii: ['0px', '2px', '4px', '8px'],
|
|
298
|
-
borderRadius: '6px',
|
|
299
|
-
colors: {
|
|
300
|
-
primary: '#000',
|
|
301
|
-
base: '#4e4949',
|
|
302
|
-
baseLt: '#817c7c',
|
|
303
|
-
borderColor: '#d8d8d8',
|
|
304
|
-
ntrlMin: '#fff',
|
|
305
|
-
ntrlMinTen: '#e6e6e6',
|
|
306
|
-
gray: '#efefef',
|
|
307
|
-
darkerGray: '#454141'
|
|
308
|
-
},
|
|
309
|
-
rareStepColors: {
|
|
310
|
-
primary: '#202b58',
|
|
311
|
-
secondary: '#ef5c2d',
|
|
312
|
-
ntrlMin: '#ffffff',
|
|
313
|
-
ntrl40: '#f4f4f4',
|
|
314
|
-
ntrl50: '#808080',
|
|
315
|
-
ntrl60: '#e8e8e8',
|
|
316
|
-
ntrl70: '#252525',
|
|
317
|
-
ntrlMax: '#000000'
|
|
318
|
-
},
|
|
319
|
-
rareStepFontWeights: {
|
|
320
|
-
normal: 400,
|
|
321
|
-
medium: 500,
|
|
322
|
-
semiBold: 600,
|
|
323
|
-
bold: 700
|
|
324
|
-
},
|
|
325
|
-
rareStepFontSize: {
|
|
326
|
-
h1: '36px',
|
|
327
|
-
h2: '30px',
|
|
328
|
-
h3: '24px',
|
|
329
|
-
h4: '20px',
|
|
330
|
-
h5: '16px',
|
|
331
|
-
h6: '14px',
|
|
332
|
-
footerTitle: '16px'
|
|
333
|
-
},
|
|
334
|
-
rareStepPageSizes: {
|
|
335
|
-
mobile: '500px',
|
|
336
|
-
tablet: '768px',
|
|
337
|
-
desktop: '992px',
|
|
338
|
-
screenl: '1280px',
|
|
339
|
-
screenxl: '1680px',
|
|
340
|
-
screenxxl: '1920px',
|
|
341
|
-
container: '1600px'
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
var themed = (function (Component) {
|
|
346
|
-
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
347
|
-
return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
|
|
348
|
-
theme: theme
|
|
349
|
-
}, /*#__PURE__*/React__default.createElement(Component, _extends({}, props, {
|
|
350
|
-
ref: ref
|
|
351
|
-
})));
|
|
352
|
-
});
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
var _templateObject$1;
|
|
356
|
-
var IconWrapper = styled__default.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n height: auto;\n margin-bottom: 1rem;\n margin-left: 1rem;\n display: flex;\n align-items: center;\n height: auto;\n\n :hover {\n background-color: ", ";\n cursor: pointer;\n }\n\n #svg-trash {\n width: 15px;\n height: 100%;\n }\n"])), function (props) {
|
|
357
|
-
return props.theme.colors.borderColor;
|
|
358
|
-
}, function (props) {
|
|
359
|
-
return props.theme.colors.borderColor;
|
|
360
|
-
});
|
|
361
|
-
|
|
362
|
-
var media = {
|
|
363
|
-
xs: '576px',
|
|
364
|
-
sm: '768px',
|
|
365
|
-
md: '992px',
|
|
366
|
-
lg: '1200px'
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
var _templateObject$2, _templateObject2, _templateObject3, _templateObject4;
|
|
370
|
-
var MALE = genders.MALE,
|
|
371
|
-
FEMALE = genders.FEMALE,
|
|
372
|
-
UNISEX = genders.UNISEX;
|
|
373
|
-
|
|
374
|
-
var TrashIcon = function TrashIcon(_ref) {
|
|
375
|
-
var onClick = _ref.onClick,
|
|
376
|
-
id = _ref.id;
|
|
377
|
-
return /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
378
|
-
onClick: onClick,
|
|
379
|
-
id: id
|
|
380
|
-
}, /*#__PURE__*/React__default.createElement(SvgWrapper, null, /*#__PURE__*/React__default.createElement(Trash, null)));
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
var InterestItem = /*#__PURE__*/function (_React$Component) {
|
|
384
|
-
_inherits(InterestItem, _React$Component);
|
|
385
|
-
|
|
386
|
-
var _super = _createSuper(InterestItem);
|
|
387
|
-
|
|
388
|
-
function InterestItem(props) {
|
|
389
|
-
var _this;
|
|
390
|
-
|
|
391
|
-
_classCallCheck(this, InterestItem);
|
|
392
|
-
|
|
393
|
-
_this = _super.call(this, props);
|
|
394
|
-
|
|
395
|
-
_defineProperty(_assertThisInitialized(_this), "deleteInterestItem", function () {
|
|
396
|
-
var id = _this.props.data.id;
|
|
399
|
+
var url = _this.props.deleteInterestApi(id);
|
|
397
400
|
|
|
401
|
+
simpleRequest(_this.props.requestInstance, url, method.DELETE, null, function () {
|
|
398
402
|
_this.setState({
|
|
399
403
|
delete: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
400
|
-
|
|
404
|
+
success: true
|
|
401
405
|
})
|
|
402
406
|
});
|
|
403
407
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
delete: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
409
|
-
success: true
|
|
410
|
-
})
|
|
411
|
-
});
|
|
412
|
-
|
|
413
|
-
_this.props.onDeleted(_this.props.data);
|
|
414
|
-
}, function () {
|
|
415
|
-
return _this.setState({
|
|
416
|
-
delete: _objectSpread2({}, request)
|
|
417
|
-
});
|
|
408
|
+
_this.props.onDeleted(_this.props.data);
|
|
409
|
+
}, function () {
|
|
410
|
+
return _this.setState({
|
|
411
|
+
delete: _objectSpread2({}, request)
|
|
418
412
|
});
|
|
419
413
|
});
|
|
414
|
+
});
|
|
420
415
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
416
|
+
_defineProperty(_assertThisInitialized(_this), "getGender", function (gender) {
|
|
417
|
+
switch (gender) {
|
|
418
|
+
case MALE:
|
|
419
|
+
return 'Male';
|
|
425
420
|
|
|
426
|
-
|
|
427
|
-
|
|
421
|
+
case FEMALE:
|
|
422
|
+
return 'Female';
|
|
428
423
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
424
|
+
case UNISEX:
|
|
425
|
+
default:
|
|
426
|
+
return 'Unisex';
|
|
427
|
+
}
|
|
428
|
+
});
|
|
434
429
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
430
|
+
_defineProperty(_assertThisInitialized(_this), "getCategory", function (category) {
|
|
431
|
+
if (category === interestCategories.APPAREL) {
|
|
432
|
+
return 'CLOTHING';
|
|
433
|
+
}
|
|
439
434
|
|
|
440
|
-
|
|
441
|
-
|
|
435
|
+
return category;
|
|
436
|
+
});
|
|
442
437
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
}
|
|
438
|
+
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
439
|
+
var _data$min_shoe_size, _data$max_shoe_size;
|
|
440
|
+
|
|
441
|
+
var data = _this.props.data;
|
|
442
|
+
var success = _this.state.delete.success;
|
|
443
|
+
return /*#__PURE__*/React.createElement(InterestItemContainer, {
|
|
444
|
+
id: "interests__item--".concat(data.id),
|
|
445
|
+
className: "".concat(success && 'interests__item--hiding')
|
|
446
|
+
}, /*#__PURE__*/React.createElement(InterestItemContent, {
|
|
447
|
+
className: "interest-item__container ".concat(_this.props.className || '')
|
|
448
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
449
|
+
className: "interest-item__container_heading"
|
|
450
|
+
}, /*#__PURE__*/React.createElement(InterestItemTitle, null, "Category:"), /*#__PURE__*/React.createElement("div", {
|
|
451
|
+
id: "interest-item-".concat(data.id, "__category"),
|
|
452
|
+
className: "list-items"
|
|
453
|
+
}, _this.getCategory(data.category_type))), /*#__PURE__*/React.createElement("div", {
|
|
454
|
+
className: "interest-item__container_heading"
|
|
455
|
+
}, /*#__PURE__*/React.createElement(InterestItemTitle, null, "Brands:"), /*#__PURE__*/React.createElement("div", {
|
|
456
|
+
className: "list-items"
|
|
457
|
+
}, data.luxity_brands.length > 0 ? data.luxity_brands.map(function (brand) {
|
|
458
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
459
|
+
key: "".concat(brand.name, "-").concat(data.id)
|
|
460
|
+
}, brand.name);
|
|
461
|
+
}) : 'All')), /*#__PURE__*/React.createElement("div", {
|
|
462
|
+
className: "interest-item__container_heading"
|
|
463
|
+
}, /*#__PURE__*/React.createElement(InterestItemTitle, null, "Department:"), /*#__PURE__*/React.createElement("div", {
|
|
464
|
+
className: "list-items"
|
|
465
|
+
}, _this.getGender(data.gender))), /*#__PURE__*/React.createElement("div", {
|
|
466
|
+
className: "interest-item__container_heading"
|
|
467
|
+
}, /*#__PURE__*/React.createElement(InterestItemTitle, null, "Price:"), /*#__PURE__*/React.createElement("div", {
|
|
468
|
+
className: "list-items"
|
|
469
|
+
}, fC(data.min_price), "\xA0-\xA0", fC(data.max_price))), /*#__PURE__*/React.createElement("div", {
|
|
470
|
+
className: "interest-item__container_heading"
|
|
471
|
+
}, /*#__PURE__*/React.createElement(InterestItemTitle, null, "Style:"), /*#__PURE__*/React.createElement("div", {
|
|
472
|
+
className: "list-items"
|
|
473
|
+
}, data.luxity_styles.length > 0 ? data.luxity_styles.map(function (style) {
|
|
474
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
475
|
+
key: "".concat(style.name, "-").concat(data.id)
|
|
476
|
+
}, style.name);
|
|
477
|
+
}) : 'All')), /*#__PURE__*/React.createElement("div", {
|
|
478
|
+
className: "interest-item__container_heading ".concat(data.category_type === interestCategories.SHOES ? '' : 'no-shoe-size-section')
|
|
479
|
+
}, data.category_type === interestCategories.SHOES ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(InterestItemTitle, null, "Shoe Size:"), /*#__PURE__*/React.createElement("div", {
|
|
480
|
+
className: "list-items"
|
|
481
|
+
}, "".concat((data === null || data === void 0 ? void 0 : (_data$min_shoe_size = data.min_shoe_size) === null || _data$min_shoe_size === void 0 ? void 0 : _data$min_shoe_size.size) || '', " - "), "".concat((data === null || data === void 0 ? void 0 : (_data$max_shoe_size = data.max_shoe_size) === null || _data$max_shoe_size === void 0 ? void 0 : _data$max_shoe_size.size) || '', " "))) : /*#__PURE__*/React.createElement(SheoSizeContentDiv, null, "-"))), /*#__PURE__*/React.createElement(TrashIcon, {
|
|
482
|
+
id: "interest-".concat(data.id, "-delete-button"),
|
|
483
|
+
onClick: function onClick() {
|
|
484
|
+
if (!_this.state.delete.fetching) {
|
|
485
|
+
_this.deleteInterestItem();
|
|
492
486
|
}
|
|
493
|
-
}
|
|
494
|
-
});
|
|
495
|
-
|
|
496
|
-
_this.state = {
|
|
497
|
-
delete: _objectSpread2({}, request)
|
|
498
|
-
};
|
|
499
|
-
return _this;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
return _createClass(InterestItem);
|
|
503
|
-
}(React__default.Component);
|
|
504
|
-
|
|
505
|
-
var SheoSizeContentDiv = styled__default.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n @media (max-width: ", ") {\n display: none;\n }\n"])), media.xs);
|
|
506
|
-
var InterestItemTitle = styled__default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-weight: bold;\n display: none;\n\n @media (max-width: ", ") {\n display: inline;\n }\n"])), media.xs);
|
|
507
|
-
var InterestItemContainer = styled__default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n\n .no-shoe-size-section {\n @media (max-width: ", ") {\n display: none;\n }\n }\n"])), media.xs);
|
|
508
|
-
var InterestItemContent = styled__default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n width: 95%;\n height: 100%;\n border: 1px solid ", ";\n padding: 0.5em;\n margin-bottom: ", ";\n\n .interest-item__container_heading {\n color: ", ";\n flex-basis: calc(100% / 8);\n margin-left: ", ";\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) {
|
|
509
|
-
return props.theme.colors.borderColor;
|
|
510
|
-
}, function (props) {
|
|
511
|
-
return props.theme.marginPaddings[1];
|
|
512
|
-
}, function (props) {
|
|
513
|
-
return props.theme.colors.darkerGray;
|
|
514
|
-
}, function (props) {
|
|
515
|
-
return props.theme.marginPaddings[1];
|
|
516
|
-
}, media.xs, media.xs, function (props) {
|
|
517
|
-
return props.theme.marginPaddings[0];
|
|
518
|
-
}, media.xs);
|
|
519
|
-
var ThemedInterestItem = themed(InterestItem);
|
|
520
|
-
/**
|
|
521
|
-
* The Interest Item view shows the selected interest configuration,
|
|
522
|
-
* and gives user control to delete it.
|
|
523
|
-
*/
|
|
524
|
-
|
|
525
|
-
var index = (function (props) {
|
|
526
|
-
return /*#__PURE__*/React__default.createElement(ThemedInterestItem, props);
|
|
527
|
-
});
|
|
487
|
+
}
|
|
488
|
+
}));
|
|
489
|
+
});
|
|
528
490
|
|
|
529
|
-
|
|
491
|
+
_this.state = {
|
|
492
|
+
delete: _objectSpread2({}, request)
|
|
493
|
+
};
|
|
494
|
+
return _this;
|
|
495
|
+
}
|
|
530
496
|
|
|
531
|
-
|
|
497
|
+
return _createClass(InterestItem);
|
|
498
|
+
}(React.Component);
|
|
499
|
+
|
|
500
|
+
var SheoSizeContentDiv = styled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n @media (max-width: ", ") {\n display: none;\n }\n"])), media.xs);
|
|
501
|
+
var InterestItemTitle = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-weight: bold;\n display: none;\n\n @media (max-width: ", ") {\n display: inline;\n }\n"])), media.xs);
|
|
502
|
+
var InterestItemContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n\n .no-shoe-size-section {\n @media (max-width: ", ") {\n display: none;\n }\n }\n"])), media.xs);
|
|
503
|
+
var InterestItemContent = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n width: 95%;\n height: 100%;\n border: 1px solid ", ";\n padding: 0.5em;\n margin-bottom: ", ";\n\n .interest-item__container_heading {\n color: ", ";\n flex-basis: calc(100% / 8);\n margin-left: ", ";\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) {
|
|
504
|
+
return props.theme.colors.borderColor;
|
|
505
|
+
}, function (props) {
|
|
506
|
+
return props.theme.marginPaddings[1];
|
|
507
|
+
}, function (props) {
|
|
508
|
+
return props.theme.colors.darkerGray;
|
|
509
|
+
}, function (props) {
|
|
510
|
+
return props.theme.marginPaddings[1];
|
|
511
|
+
}, media.xs, media.xs, function (props) {
|
|
512
|
+
return props.theme.marginPaddings[0];
|
|
513
|
+
}, media.xs);
|
|
514
|
+
var ThemedInterestItem = themed(InterestItem);
|
|
515
|
+
/**
|
|
516
|
+
* The Interest Item view shows the selected interest configuration,
|
|
517
|
+
* and gives user control to delete it.
|
|
518
|
+
*/
|
|
519
|
+
|
|
520
|
+
var index = (function (props) {
|
|
521
|
+
return /*#__PURE__*/React.createElement(ThemedInterestItem, props);
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
export default index;
|