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