@bonlineza/luxity-lib 2.35.1 → 2.35.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AddInterest.js +58 -57
- package/AddProductInterest.js +7748 -0
- package/ConditionSelector.js +973 -0
- package/DropdownSelector.js +6839 -0
- package/GraphQLDropdownSelector.js +1204 -100
- package/IconHeader.js +2 -2
- package/Interests.js +1211 -106
- package/LuxityGraphQLDropdownSelector.js +1204 -100
- package/LuxityProductInterestItem.js +434 -0
- package/MaterialSelector.js +1204 -100
- package/ModelSelector.js +1204 -100
- package/NotificationDropDown.js +10 -3
- package/build/bundle.css +1 -1
- package/build/bundle.js +1230 -125
- package/package.json +1 -1
- package/build/.gitignore +0 -3
- package/build/.npmignore +0 -0
package/Interests.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('styled-components'), require('react-notify-toast'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady'), require('stylis-rule-sheet'), require('react-dom'), require('prop-types'), require('raf'), require('react-input-autosize'), require('react-transition-group'), require('@bonlineza/b-lib/functions'), require('rc-slider'), require('numeral')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['react', 'styled-components', 'react-notify-toast', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady', 'stylis-rule-sheet', 'react-dom', 'prop-types', 'raf', 'react-input-autosize', 'react-transition-group', '@bonlineza/b-lib/functions', 'rc-slider', 'numeral'], factory) :
|
|
4
|
-
(global = global || self, global.Interests = factory(global.React, global.styled, global['react-notify-toast'], global.EllipsisLoader, global.PageReady, global['stylis-rule-sheet'], global.reactDom, global.PropTypes, global.raf, global['react-input-autosize'], global['react-transition-group'], global.function, global.rcSlider, global.numeral));
|
|
5
|
-
}(this, (function (React, styled, Notifications, EllipsisLoader, PageReady, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, numeral) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('styled-components'), require('react-notify-toast'), require('@bonlineza/b-lib/EllipsisLoader'), require('@bonlineza/b-lib/PageReady'), require('stylis-rule-sheet'), require('react-dom'), require('prop-types'), require('raf'), require('react-input-autosize'), require('react-transition-group'), require('@bonlineza/b-lib/functions'), require('rc-slider'), require('numeral'), require('helpers/axios')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['react', 'styled-components', 'react-notify-toast', '@bonlineza/b-lib/EllipsisLoader', '@bonlineza/b-lib/PageReady', 'stylis-rule-sheet', 'react-dom', 'prop-types', 'raf', 'react-input-autosize', 'react-transition-group', '@bonlineza/b-lib/functions', 'rc-slider', 'numeral', 'helpers/axios'], factory) :
|
|
4
|
+
(global = global || self, global.Interests = factory(global.React, global.styled, global['react-notify-toast'], global.EllipsisLoader, global.PageReady, global['stylis-rule-sheet'], global.reactDom, global.PropTypes, global.raf, global['react-input-autosize'], global['react-transition-group'], global.function, global.rcSlider, global.numeral, global.axiosInstance));
|
|
5
|
+
}(this, (function (React, styled, Notifications, EllipsisLoader, PageReady, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, numeral, axiosInstance) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var React__default = 'default' in React ? React['default'] : React;
|
|
8
8
|
var styled__default = 'default' in styled ? styled['default'] : styled;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
raf = raf && Object.prototype.hasOwnProperty.call(raf, 'default') ? raf['default'] : raf;
|
|
15
15
|
AutosizeInput = AutosizeInput && Object.prototype.hasOwnProperty.call(AutosizeInput, 'default') ? AutosizeInput['default'] : AutosizeInput;
|
|
16
16
|
numeral = numeral && Object.prototype.hasOwnProperty.call(numeral, 'default') ? numeral['default'] : numeral;
|
|
17
|
+
axiosInstance = axiosInstance && Object.prototype.hasOwnProperty.call(axiosInstance, 'default') ? axiosInstance['default'] : axiosInstance;
|
|
17
18
|
|
|
18
19
|
function ownKeys(object, enumerableOnly) {
|
|
19
20
|
var keys = Object.keys(object);
|
|
@@ -41,6 +42,387 @@
|
|
|
41
42
|
return target;
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
function _regeneratorRuntime() {
|
|
46
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
47
|
+
|
|
48
|
+
_regeneratorRuntime = function () {
|
|
49
|
+
return exports;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var exports = {},
|
|
53
|
+
Op = Object.prototype,
|
|
54
|
+
hasOwn = Op.hasOwnProperty,
|
|
55
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
56
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
57
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
58
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
59
|
+
|
|
60
|
+
function define(obj, key, value) {
|
|
61
|
+
return Object.defineProperty(obj, key, {
|
|
62
|
+
value: value,
|
|
63
|
+
enumerable: !0,
|
|
64
|
+
configurable: !0,
|
|
65
|
+
writable: !0
|
|
66
|
+
}), obj[key];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
try {
|
|
70
|
+
define({}, "");
|
|
71
|
+
} catch (err) {
|
|
72
|
+
define = function (obj, key, value) {
|
|
73
|
+
return obj[key] = value;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
78
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
79
|
+
generator = Object.create(protoGenerator.prototype),
|
|
80
|
+
context = new Context(tryLocsList || []);
|
|
81
|
+
return generator._invoke = function (innerFn, self, context) {
|
|
82
|
+
var state = "suspendedStart";
|
|
83
|
+
return function (method, arg) {
|
|
84
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
85
|
+
|
|
86
|
+
if ("completed" === state) {
|
|
87
|
+
if ("throw" === method) throw arg;
|
|
88
|
+
return doneResult();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
for (context.method = method, context.arg = arg;;) {
|
|
92
|
+
var delegate = context.delegate;
|
|
93
|
+
|
|
94
|
+
if (delegate) {
|
|
95
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
96
|
+
|
|
97
|
+
if (delegateResult) {
|
|
98
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
99
|
+
return delegateResult;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
104
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
105
|
+
context.dispatchException(context.arg);
|
|
106
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
107
|
+
state = "executing";
|
|
108
|
+
var record = tryCatch(innerFn, self, context);
|
|
109
|
+
|
|
110
|
+
if ("normal" === record.type) {
|
|
111
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
112
|
+
return {
|
|
113
|
+
value: record.arg,
|
|
114
|
+
done: context.done
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}(innerFn, self, context), generator;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function tryCatch(fn, obj, arg) {
|
|
125
|
+
try {
|
|
126
|
+
return {
|
|
127
|
+
type: "normal",
|
|
128
|
+
arg: fn.call(obj, arg)
|
|
129
|
+
};
|
|
130
|
+
} catch (err) {
|
|
131
|
+
return {
|
|
132
|
+
type: "throw",
|
|
133
|
+
arg: err
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
exports.wrap = wrap;
|
|
139
|
+
var ContinueSentinel = {};
|
|
140
|
+
|
|
141
|
+
function Generator() {}
|
|
142
|
+
|
|
143
|
+
function GeneratorFunction() {}
|
|
144
|
+
|
|
145
|
+
function GeneratorFunctionPrototype() {}
|
|
146
|
+
|
|
147
|
+
var IteratorPrototype = {};
|
|
148
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
149
|
+
return this;
|
|
150
|
+
});
|
|
151
|
+
var getProto = Object.getPrototypeOf,
|
|
152
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
153
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
154
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
155
|
+
|
|
156
|
+
function defineIteratorMethods(prototype) {
|
|
157
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
158
|
+
define(prototype, method, function (arg) {
|
|
159
|
+
return this._invoke(method, arg);
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
165
|
+
function invoke(method, arg, resolve, reject) {
|
|
166
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
167
|
+
|
|
168
|
+
if ("throw" !== record.type) {
|
|
169
|
+
var result = record.arg,
|
|
170
|
+
value = result.value;
|
|
171
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
172
|
+
invoke("next", value, resolve, reject);
|
|
173
|
+
}, function (err) {
|
|
174
|
+
invoke("throw", err, resolve, reject);
|
|
175
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
176
|
+
result.value = unwrapped, resolve(result);
|
|
177
|
+
}, function (error) {
|
|
178
|
+
return invoke("throw", error, resolve, reject);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
reject(record.arg);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
var previousPromise;
|
|
186
|
+
|
|
187
|
+
this._invoke = function (method, arg) {
|
|
188
|
+
function callInvokeWithMethodAndArg() {
|
|
189
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
190
|
+
invoke(method, arg, resolve, reject);
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
199
|
+
var method = delegate.iterator[context.method];
|
|
200
|
+
|
|
201
|
+
if (undefined === method) {
|
|
202
|
+
if (context.delegate = null, "throw" === context.method) {
|
|
203
|
+
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
204
|
+
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return ContinueSentinel;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
211
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
212
|
+
var info = record.arg;
|
|
213
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function pushTryEntry(locs) {
|
|
217
|
+
var entry = {
|
|
218
|
+
tryLoc: locs[0]
|
|
219
|
+
};
|
|
220
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function resetTryEntry(entry) {
|
|
224
|
+
var record = entry.completion || {};
|
|
225
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function Context(tryLocsList) {
|
|
229
|
+
this.tryEntries = [{
|
|
230
|
+
tryLoc: "root"
|
|
231
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function values(iterable) {
|
|
235
|
+
if (iterable) {
|
|
236
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
237
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
238
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
239
|
+
|
|
240
|
+
if (!isNaN(iterable.length)) {
|
|
241
|
+
var i = -1,
|
|
242
|
+
next = function next() {
|
|
243
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
244
|
+
|
|
245
|
+
return next.value = undefined, next.done = !0, next;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
return next.next = next;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return {
|
|
253
|
+
next: doneResult
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function doneResult() {
|
|
258
|
+
return {
|
|
259
|
+
value: undefined,
|
|
260
|
+
done: !0
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
265
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
266
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
267
|
+
}, exports.mark = function (genFun) {
|
|
268
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
269
|
+
}, exports.awrap = function (arg) {
|
|
270
|
+
return {
|
|
271
|
+
__await: arg
|
|
272
|
+
};
|
|
273
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
274
|
+
return this;
|
|
275
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
276
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
277
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
278
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
279
|
+
return result.done ? result.value : iter.next();
|
|
280
|
+
});
|
|
281
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
282
|
+
return this;
|
|
283
|
+
}), define(Gp, "toString", function () {
|
|
284
|
+
return "[object Generator]";
|
|
285
|
+
}), exports.keys = function (object) {
|
|
286
|
+
var keys = [];
|
|
287
|
+
|
|
288
|
+
for (var key in object) keys.push(key);
|
|
289
|
+
|
|
290
|
+
return keys.reverse(), function next() {
|
|
291
|
+
for (; keys.length;) {
|
|
292
|
+
var key = keys.pop();
|
|
293
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return next.done = !0, next;
|
|
297
|
+
};
|
|
298
|
+
}, exports.values = values, Context.prototype = {
|
|
299
|
+
constructor: Context,
|
|
300
|
+
reset: function (skipTempReset) {
|
|
301
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
302
|
+
},
|
|
303
|
+
stop: function () {
|
|
304
|
+
this.done = !0;
|
|
305
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
306
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
307
|
+
return this.rval;
|
|
308
|
+
},
|
|
309
|
+
dispatchException: function (exception) {
|
|
310
|
+
if (this.done) throw exception;
|
|
311
|
+
var context = this;
|
|
312
|
+
|
|
313
|
+
function handle(loc, caught) {
|
|
314
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
318
|
+
var entry = this.tryEntries[i],
|
|
319
|
+
record = entry.completion;
|
|
320
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
321
|
+
|
|
322
|
+
if (entry.tryLoc <= this.prev) {
|
|
323
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
324
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
325
|
+
|
|
326
|
+
if (hasCatch && hasFinally) {
|
|
327
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
328
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
329
|
+
} else if (hasCatch) {
|
|
330
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
331
|
+
} else {
|
|
332
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
333
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
abrupt: function (type, arg) {
|
|
339
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
340
|
+
var entry = this.tryEntries[i];
|
|
341
|
+
|
|
342
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
343
|
+
var finallyEntry = entry;
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
349
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
350
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
351
|
+
},
|
|
352
|
+
complete: function (record, afterLoc) {
|
|
353
|
+
if ("throw" === record.type) throw record.arg;
|
|
354
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
355
|
+
},
|
|
356
|
+
finish: function (finallyLoc) {
|
|
357
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
358
|
+
var entry = this.tryEntries[i];
|
|
359
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
catch: function (tryLoc) {
|
|
363
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
364
|
+
var entry = this.tryEntries[i];
|
|
365
|
+
|
|
366
|
+
if (entry.tryLoc === tryLoc) {
|
|
367
|
+
var record = entry.completion;
|
|
368
|
+
|
|
369
|
+
if ("throw" === record.type) {
|
|
370
|
+
var thrown = record.arg;
|
|
371
|
+
resetTryEntry(entry);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
return thrown;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
throw new Error("illegal catch attempt");
|
|
379
|
+
},
|
|
380
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
381
|
+
return this.delegate = {
|
|
382
|
+
iterator: values(iterable),
|
|
383
|
+
resultName: resultName,
|
|
384
|
+
nextLoc: nextLoc
|
|
385
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
386
|
+
}
|
|
387
|
+
}, exports;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
391
|
+
try {
|
|
392
|
+
var info = gen[key](arg);
|
|
393
|
+
var value = info.value;
|
|
394
|
+
} catch (error) {
|
|
395
|
+
reject(error);
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (info.done) {
|
|
400
|
+
resolve(value);
|
|
401
|
+
} else {
|
|
402
|
+
Promise.resolve(value).then(_next, _throw);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
function _asyncToGenerator(fn) {
|
|
407
|
+
return function () {
|
|
408
|
+
var self = this,
|
|
409
|
+
args = arguments;
|
|
410
|
+
return new Promise(function (resolve, reject) {
|
|
411
|
+
var gen = fn.apply(self, args);
|
|
412
|
+
|
|
413
|
+
function _next(value) {
|
|
414
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
function _throw(err) {
|
|
418
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
_next(undefined);
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
|
|
44
426
|
function _classCallCheck(instance, Constructor) {
|
|
45
427
|
if (!(instance instanceof Constructor)) {
|
|
46
428
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -428,9 +810,9 @@
|
|
|
428
810
|
});
|
|
429
811
|
|
|
430
812
|
var _templateObject;
|
|
431
|
-
var StyledHeader = styled__default.h5(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n\n @media (max-width: ", ") {\n display: block;\n }\n\n .icon-header__left {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n\n @media (max-width: ", ") {\n align-self: flex-start;\n }\n\n svg {\n height: 1.5em;\n width: 1.5em;\n margin-right: ", ";\n }\n }\n\n .icon-header__right {\n display: flex;\n flex-grow: 1;\n justify-content: flex-end;\n }\n"])), media.sm, media.sm, function (props) {
|
|
813
|
+
var StyledHeader = styled__default.h5(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n\n @media (max-width: ", ") {\n display: block;\n }\n\n .icon-header__left {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n\n @media (max-width: ", ") {\n align-self: flex-start;\n }\n\n svg {\n height: 1.5em;\n width: 1.5em;\n margin-right: ", ";\n }\n }\n\n .icon-header__right {\n display: flex;\n flex-grow: 1;\n justify-content: flex-end;\n\n @media (max-width: ", ") {\n justify-content: flex-start;\n }\n }\n"])), media.sm, media.sm, function (props) {
|
|
432
814
|
return props.theme.marginPaddings[1];
|
|
433
|
-
});
|
|
815
|
+
}, media.sm);
|
|
434
816
|
|
|
435
817
|
/**
|
|
436
818
|
* IconHeader can render the standard Luxity Page/Section Header nodes with SVG
|
|
@@ -7143,7 +7525,7 @@
|
|
|
7143
7525
|
var index$1 = manageState(Select);
|
|
7144
7526
|
|
|
7145
7527
|
var _templateObject$1;
|
|
7146
|
-
var NotifyContainer = styled__default.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n .page-ready {\n display: flex;\n align-items: center;\n }\n\n .notification-settings {\n display: flex;\n align-items: center;\n\n @media (max-width:
|
|
7528
|
+
var NotifyContainer = styled__default.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n .page-ready {\n display: flex;\n align-items: center;\n }\n\n .notification-settings {\n display: flex;\n align-items: center;\n\n @media (max-width: ", ") {\n flex-direction: column;\n align-items: flex-end;\n padding: 10px 0;\n }\n }\n\n .notification-row-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (min-width: ", ") {\n justify-content: center;\n width: auto;\n }\n }\n\n .notification-dropdown-label {\n margin-left: 20px;\n\n @media (max-width: ", ") {\n margin-left: 0;\n }\n }\n\n .loader {\n min-width: 150px;\n }\n\n .notification-dropdown-select-container {\n min-width: 110px;\n\n .notification-dropdown-select__control {\n min-height: auto;\n background-color: ", ";\n border: none;\n border-radius: 0;\n\n &--is-focused {\n border: none;\n border-radius: 0;\n box-shadow: none;\n }\n\n .notification-dropdown-select__value-container {\n & > div {\n padding: 0;\n margin: 0;\n color: ", ";\n }\n & .notification-dropdown-select__single-value,\n & .notification-dropdown-select__placeholder {\n overflow: visible;\n font-weight: lighter;\n }\n }\n }\n }\n\n .notification-dropdown-select__indicators {\n padding: 0 !important;\n .notification-dropdown-select__dropdown-indicator {\n color: ", ";\n }\n }\n\n .notification-dropdown-select__menu {\n border-radius: 0;\n\n & > .notification-dropdown-select__menu-list {\n border-radius: 0;\n\n & > .notification-dropdown-select__option {\n font-weight: bold;\n &:last-child {\n border-bottom: none;\n }\n\n &.notification-dropdown-select__option--is-focused {\n background-color: ", ";\n border-style: hidden;\n }\n &.notification-dropdown-select__option--is-selected {\n color: ", ";\n background-color: ", ";\n border-style: hidden;\n }\n &.notification-dropdown-select__option--is-selected.notification-dropdown-select__option--is-focused {\n border-style: hidden;\n }\n }\n }\n }\n"])), media.sm, media.lg, media.sm, function (props) {
|
|
7147
7529
|
return props.theme.colors.ntrlMin;
|
|
7148
7530
|
}, function (props) {
|
|
7149
7531
|
return props.theme.colors.base;
|
|
@@ -7270,7 +7652,7 @@
|
|
|
7270
7652
|
}, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
7271
7653
|
className: "notification-settings"
|
|
7272
7654
|
}, isVip && /*#__PURE__*/React__default.createElement("div", {
|
|
7273
|
-
className: "
|
|
7655
|
+
className: "notification-row-wrapper"
|
|
7274
7656
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7275
7657
|
className: "notification-dropdown-label"
|
|
7276
7658
|
}, "Notify me via WhatsApp:\xA0"), updating ? /*#__PURE__*/React__default.createElement(EllipsisLoader, null) : /*#__PURE__*/React__default.createElement(index$1, {
|
|
@@ -7289,7 +7671,7 @@
|
|
|
7289
7671
|
},
|
|
7290
7672
|
value: whatsappSelectedOption
|
|
7291
7673
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
7292
|
-
className: "
|
|
7674
|
+
className: "notification-row-wrapper"
|
|
7293
7675
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7294
7676
|
className: "notification-dropdown-label"
|
|
7295
7677
|
}, "Notify me via Email:\xA0"), updating ? /*#__PURE__*/React__default.createElement(EllipsisLoader, null) : /*#__PURE__*/React__default.createElement(index$1, {
|
|
@@ -9872,37 +10254,41 @@
|
|
|
9872
10254
|
};
|
|
9873
10255
|
var GenderSelector$1 = themed(GenderSelector);
|
|
9874
10256
|
|
|
9875
|
-
var
|
|
9876
|
-
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
|
|
9881
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
9882
|
-
}, props), /*#__PURE__*/React__default.createElement("path", {
|
|
9883
|
-
d: "M0 11.5H23",
|
|
9884
|
-
stroke: "#000000",
|
|
9885
|
-
strokeWidth: "1.8"
|
|
9886
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
9887
|
-
d: "M11.5 0L11.5 23",
|
|
9888
|
-
stroke: "#000000",
|
|
9889
|
-
strokeWidth: "1.8"
|
|
9890
|
-
}));
|
|
9891
|
-
});
|
|
10257
|
+
var ConditionSelector = function ConditionSelector(_ref) {
|
|
10258
|
+
var onChange = _ref.onChange,
|
|
10259
|
+
graphApi = _ref.graphApi,
|
|
10260
|
+
itemRenderer = _ref.itemRenderer,
|
|
10261
|
+
getGraphQuery = _ref.getGraphQuery,
|
|
10262
|
+
requestInstance = _ref.requestInstance;
|
|
9892
10263
|
|
|
9893
|
-
|
|
9894
|
-
|
|
10264
|
+
var resultProcessor = function resultProcessor(result) {
|
|
10265
|
+
return result.data.data.conditions_list;
|
|
10266
|
+
};
|
|
9895
10267
|
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
10268
|
+
return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
|
|
10269
|
+
title: "Condition",
|
|
10270
|
+
queryId: "getCondition",
|
|
10271
|
+
baseQueryLimit: 10,
|
|
10272
|
+
baseClass: "style-selector",
|
|
10273
|
+
identifier: "style-selector",
|
|
10274
|
+
searchPlaceHolder: "Search Condition",
|
|
10275
|
+
category: "",
|
|
10276
|
+
onChange: onChange,
|
|
10277
|
+
graphApi: graphApi,
|
|
10278
|
+
itemRenderer: itemRenderer,
|
|
10279
|
+
getGraphQuery: getGraphQuery,
|
|
10280
|
+
resultProcessor: resultProcessor,
|
|
10281
|
+
requestInstance: requestInstance
|
|
10282
|
+
});
|
|
10283
|
+
};
|
|
10284
|
+
|
|
10285
|
+
ConditionSelector.defaultProps = {
|
|
10286
|
+
itemRenderer: ItemRenderer
|
|
10287
|
+
};
|
|
9902
10288
|
|
|
9903
|
-
var _templateObject$
|
|
10289
|
+
var _templateObject$y, _templateObject2$7, _templateObject3$2;
|
|
9904
10290
|
var UNISEX = genders.UNISEX;
|
|
9905
|
-
var AddInterestContainer = styled__default.div(_templateObject$
|
|
10291
|
+
var AddInterestContainer = styled__default.div(_templateObject$y || (_templateObject$y = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n border: 1px solid ", ";\n padding: ", ";\n"])), function (props) {
|
|
9906
10292
|
return props.theme.marginPaddings[6];
|
|
9907
10293
|
}, function (props) {
|
|
9908
10294
|
return props.theme.colors.borderColor;
|
|
@@ -9921,26 +10307,6 @@
|
|
|
9921
10307
|
}, function (props) {
|
|
9922
10308
|
return props.theme.marginPaddings[2];
|
|
9923
10309
|
});
|
|
9924
|
-
var AddInterestButton = styled__default.div(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n border: 1px solid ", ";\n padding-top: ", ";\n margin-bottom: ", ";\n padding-left: 1.5rem;\n width: 95%;\n font-size: 17px;\n"])), function (props) {
|
|
9925
|
-
return props.theme.colors.darkerGray;
|
|
9926
|
-
}, function (props) {
|
|
9927
|
-
return props.theme.colors.borderColor;
|
|
9928
|
-
}, function (props) {
|
|
9929
|
-
return props.theme.marginPaddings[0];
|
|
9930
|
-
}, function (props) {
|
|
9931
|
-
return props.theme.marginPaddings[2];
|
|
9932
|
-
});
|
|
9933
|
-
var AddInterestButtonContainer = styled__default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n\n #add-icon {\n margin-bottom: 1.5rem;\n\n svg {\n width: 15px;\n }\n }\n"])));
|
|
9934
|
-
|
|
9935
|
-
var AddIcon = function AddIcon(_ref) {
|
|
9936
|
-
var onClick = _ref.onClick,
|
|
9937
|
-
id = _ref.id;
|
|
9938
|
-
return /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
9939
|
-
id: id,
|
|
9940
|
-
onClick: onClick
|
|
9941
|
-
}, /*#__PURE__*/React__default.createElement(SvgWrapper$1, null, /*#__PURE__*/React__default.createElement(Add, null)));
|
|
9942
|
-
};
|
|
9943
|
-
|
|
9944
10310
|
var defaultState = {
|
|
9945
10311
|
category_type: null,
|
|
9946
10312
|
brands: [],
|
|
@@ -9950,6 +10316,7 @@
|
|
|
9950
10316
|
max_price: null,
|
|
9951
10317
|
styles: [],
|
|
9952
10318
|
gender: [],
|
|
10319
|
+
condition: [],
|
|
9953
10320
|
request: _objectSpread2({}, request),
|
|
9954
10321
|
isCategoriesShown: false
|
|
9955
10322
|
};
|
|
@@ -10026,6 +10393,14 @@
|
|
|
10026
10393
|
});
|
|
10027
10394
|
});
|
|
10028
10395
|
|
|
10396
|
+
_defineProperty(_assertThisInitialized(_this), "onConditionChanged", function (conditions) {
|
|
10397
|
+
_this.setState({
|
|
10398
|
+
condition: conditions.map(function (condition) {
|
|
10399
|
+
return condition.id;
|
|
10400
|
+
})
|
|
10401
|
+
});
|
|
10402
|
+
});
|
|
10403
|
+
|
|
10029
10404
|
_defineProperty(_assertThisInitialized(_this), "payloadIsValid", function () {
|
|
10030
10405
|
// price/shoe-size always have initial values as soon as category is set
|
|
10031
10406
|
var category_type = _this.state.category_type;
|
|
@@ -10049,7 +10424,8 @@
|
|
|
10049
10424
|
styles = _this$state.styles,
|
|
10050
10425
|
category_type = _this$state.category_type,
|
|
10051
10426
|
requestState = _this$state.request,
|
|
10052
|
-
gender = _this$state.gender
|
|
10427
|
+
gender = _this$state.gender,
|
|
10428
|
+
condition = _this$state.condition;
|
|
10053
10429
|
var payloadGender = gender[0];
|
|
10054
10430
|
|
|
10055
10431
|
if (gender.length > 1 || !gender.length) {
|
|
@@ -10062,6 +10438,7 @@
|
|
|
10062
10438
|
min_price: min_price,
|
|
10063
10439
|
max_price: max_price,
|
|
10064
10440
|
styles: styles,
|
|
10441
|
+
condition: condition,
|
|
10065
10442
|
gender: payloadGender,
|
|
10066
10443
|
request: requestState
|
|
10067
10444
|
};
|
|
@@ -10084,8 +10461,8 @@
|
|
|
10084
10461
|
}, _this.handleRequestError);
|
|
10085
10462
|
});
|
|
10086
10463
|
|
|
10087
|
-
_defineProperty(_assertThisInitialized(_this), "handleRequestError", function (
|
|
10088
|
-
var data =
|
|
10464
|
+
_defineProperty(_assertThisInitialized(_this), "handleRequestError", function (_ref) {
|
|
10465
|
+
var data = _ref.data;
|
|
10089
10466
|
|
|
10090
10467
|
_this.setState({
|
|
10091
10468
|
request: _objectSpread2({}, request)
|
|
@@ -10103,6 +10480,8 @@
|
|
|
10103
10480
|
|
|
10104
10481
|
_defineProperty(_assertThisInitialized(_this), "resetState", function () {
|
|
10105
10482
|
_this.setState(_objectSpread2({}, defaultState));
|
|
10483
|
+
|
|
10484
|
+
_this.props.onCancel();
|
|
10106
10485
|
});
|
|
10107
10486
|
|
|
10108
10487
|
_defineProperty(_assertThisInitialized(_this), "handleGenderChange", function (isChecked, gender) {
|
|
@@ -10127,12 +10506,11 @@
|
|
|
10127
10506
|
getBrandsGraphQuery = _this$props.getBrandsGraphQuery,
|
|
10128
10507
|
getStylesGraphQuery = _this$props.getStylesGraphQuery,
|
|
10129
10508
|
getShoesGraphQuery = _this$props.getShoesGraphQuery,
|
|
10130
|
-
defaultShoeSizeType = _this$props.defaultShoeSizeType
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
})), _this.state.isCategoriesShown && /*#__PURE__*/React__default.createElement(AddInterestContainer, null, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(CatSelectorParagraph, null, "Select the catergory that interests you"), /*#__PURE__*/React__default.createElement(CategoryInterestSelector, {
|
|
10509
|
+
defaultShoeSizeType = _this$props.defaultShoeSizeType,
|
|
10510
|
+
getConditionsGraphQuery = _this$props.getConditionsGraphQuery;
|
|
10511
|
+
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10512
|
+
className: "interests__section-wrapper"
|
|
10513
|
+
}, /*#__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, {
|
|
10136
10514
|
category: category_type,
|
|
10137
10515
|
onCategoryChange: _this.onCategoryChanged
|
|
10138
10516
|
}), category_type ? /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GenderSelector$1, {
|
|
@@ -10158,6 +10536,11 @@
|
|
|
10158
10536
|
requestInstance: requestInstance,
|
|
10159
10537
|
graphApi: "".concat(baseGraphApi, "?id=getStyles"),
|
|
10160
10538
|
getGraphQuery: getStylesGraphQuery
|
|
10539
|
+
}), /*#__PURE__*/React__default.createElement(ConditionSelector, {
|
|
10540
|
+
onChange: _this.onConditionChanged,
|
|
10541
|
+
requestInstance: requestInstance,
|
|
10542
|
+
graphApi: "".concat(baseGraphApi, "?id=getCondition"),
|
|
10543
|
+
getGraphQuery: getConditionsGraphQuery
|
|
10161
10544
|
})) : null, /*#__PURE__*/React__default.createElement(SaveAndCancelButtonContainer, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10162
10545
|
className: "fl-right"
|
|
10163
10546
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10178,7 +10561,7 @@
|
|
|
10178
10561
|
|
|
10179
10562
|
_this.resetState();
|
|
10180
10563
|
}
|
|
10181
|
-
}, fetching ? 'SAVING' : 'SAVE')))))));
|
|
10564
|
+
}, fetching ? 'SAVING' : 'SAVE'))))))));
|
|
10182
10565
|
});
|
|
10183
10566
|
|
|
10184
10567
|
_this.state = _objectSpread2({}, defaultState);
|
|
@@ -10243,7 +10626,17 @@
|
|
|
10243
10626
|
})));
|
|
10244
10627
|
});
|
|
10245
10628
|
|
|
10246
|
-
var _templateObject$
|
|
10629
|
+
var _templateObject$z;
|
|
10630
|
+
var SvgWrapper$1 = styled__default.span(_templateObject$z || (_templateObject$z = _taggedTemplateLiteral(["\n padding: 1rem;\n display: flex;\n svg {\n width: 23px;\n height: auto;\n }\n"])));
|
|
10631
|
+
|
|
10632
|
+
var _templateObject$A;
|
|
10633
|
+
var IconWrapper = styled__default.div(_templateObject$A || (_templateObject$A = _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) {
|
|
10634
|
+
return props.theme.colors.borderColor;
|
|
10635
|
+
}, function (props) {
|
|
10636
|
+
return props.theme.colors.borderColor;
|
|
10637
|
+
});
|
|
10638
|
+
|
|
10639
|
+
var _templateObject$B, _templateObject2$8, _templateObject3$3, _templateObject4$1;
|
|
10247
10640
|
var MALE$2 = genders.MALE,
|
|
10248
10641
|
FEMALE$2 = genders.FEMALE,
|
|
10249
10642
|
UNISEX$1 = genders.UNISEX;
|
|
@@ -10382,7 +10775,7 @@
|
|
|
10382
10775
|
var SheoSizeContentDiv = styled__default.div(_templateObject$B || (_templateObject$B = _taggedTemplateLiteral(["\n @media (max-width: ", ") {\n display: none;\n }\n"])), media.xs);
|
|
10383
10776
|
var InterestItemTitle = styled__default.div(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteral(["\n font-weight: bold;\n display: none;\n\n @media (max-width: ", ") {\n display: inline;\n }\n"])), media.xs);
|
|
10384
10777
|
var InterestItemContainer = styled__default.div(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteral(["\n display: flex;\n\n .no-shoe-size-section {\n @media (max-width: ", ") {\n display: none;\n }\n }\n"])), media.xs);
|
|
10385
|
-
var InterestItemContent = styled__default.div(_templateObject4$
|
|
10778
|
+
var InterestItemContent = styled__default.div(_templateObject4$1 || (_templateObject4$1 = _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) {
|
|
10386
10779
|
return props.theme.colors.borderColor;
|
|
10387
10780
|
}, function (props) {
|
|
10388
10781
|
return props.theme.marginPaddings[1];
|
|
@@ -10413,7 +10806,9 @@
|
|
|
10413
10806
|
}, media.xs);
|
|
10414
10807
|
|
|
10415
10808
|
var MyInterestTitleHeading = function MyInterestTitleHeading() {
|
|
10416
|
-
return /*#__PURE__*/React__default.createElement(
|
|
10809
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10810
|
+
className: "interests__title"
|
|
10811
|
+
}, "Category Interests"), /*#__PURE__*/React__default.createElement(MyInterestTitleHeadingContainer, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10417
10812
|
className: "heading-title-section"
|
|
10418
10813
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10419
10814
|
className: "heading-title"
|
|
@@ -10429,46 +10824,685 @@
|
|
|
10429
10824
|
className: "heading-title"
|
|
10430
10825
|
}, "Shoe Size")), /*#__PURE__*/React__default.createElement("div", {
|
|
10431
10826
|
className: "heading-title-empty"
|
|
10432
|
-
}));
|
|
10827
|
+
})));
|
|
10433
10828
|
};
|
|
10434
10829
|
|
|
10435
10830
|
var MyInterestTitleHeading$1 = themed(MyInterestTitleHeading);
|
|
10436
10831
|
|
|
10437
10832
|
var _templateObject$D;
|
|
10438
|
-
var
|
|
10833
|
+
var MyInterestTitleHeadingContainer$1 = styled__default.div(_templateObject$D || (_templateObject$D = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n\n .heading-title-section {\n display: flex;\n justify-content: space-between;\n width: 95%;\n }\n\n .heading-title {\n color: ", ";\n font-weight: bold;\n flex-basis: calc(100% / 6);\n margin-left: ", ";\n padding-bottom: 0;\n }\n\n .heading-title-empty {\n flex-basis: 5%;\n margin-left: 1rem;\n }\n\n @media (max-width: ", ") {\n display: none;\n }\n"])), function (props) {
|
|
10439
10834
|
return props.theme.colors.primary;
|
|
10440
|
-
})
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
});
|
|
10444
|
-
|
|
10445
|
-
/**
|
|
10446
|
-
* Page/View that controls the viewing and Adding of Luxity Interests
|
|
10447
|
-
*/
|
|
10448
|
-
var Interests = /*#__PURE__*/function (_React$Component) {
|
|
10449
|
-
_inherits(Interests, _React$Component);
|
|
10450
|
-
|
|
10451
|
-
var _super = _createSuper(Interests);
|
|
10452
|
-
|
|
10453
|
-
function Interests(props) {
|
|
10454
|
-
var _this;
|
|
10455
|
-
|
|
10456
|
-
_classCallCheck(this, Interests);
|
|
10457
|
-
|
|
10458
|
-
_this = _super.call(this, props);
|
|
10835
|
+
}, function (props) {
|
|
10836
|
+
return props.theme.marginPaddings[1];
|
|
10837
|
+
}, media.xs);
|
|
10459
10838
|
|
|
10460
|
-
|
|
10461
|
-
|
|
10839
|
+
var MyProductInterestTitleHeading = function MyProductInterestTitleHeading() {
|
|
10840
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10841
|
+
className: "interests__title"
|
|
10842
|
+
}, "Product Interests"), /*#__PURE__*/React__default.createElement(MyInterestTitleHeadingContainer$1, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10843
|
+
className: "heading-title-section"
|
|
10844
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10845
|
+
className: "heading-title"
|
|
10846
|
+
}, "Brand"), /*#__PURE__*/React__default.createElement("div", {
|
|
10847
|
+
className: "heading-title"
|
|
10848
|
+
}, "Model"), /*#__PURE__*/React__default.createElement("div", {
|
|
10849
|
+
className: "heading-title"
|
|
10850
|
+
}, "Material")), /*#__PURE__*/React__default.createElement("div", {
|
|
10851
|
+
className: "heading-title-empty"
|
|
10852
|
+
})));
|
|
10853
|
+
};
|
|
10462
10854
|
|
|
10463
|
-
|
|
10464
|
-
interests: interests
|
|
10465
|
-
});
|
|
10466
|
-
});
|
|
10855
|
+
var MyProductInterestTitleHeading$1 = themed(MyProductInterestTitleHeading);
|
|
10467
10856
|
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10857
|
+
var Add = (function (props) {
|
|
10858
|
+
return /*#__PURE__*/React__default.createElement("svg", _extends({
|
|
10859
|
+
width: "23",
|
|
10860
|
+
height: "23",
|
|
10861
|
+
viewBox: "0 0 23 23",
|
|
10862
|
+
fill: "none",
|
|
10863
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10864
|
+
}, props), /*#__PURE__*/React__default.createElement("path", {
|
|
10865
|
+
d: "M0 11.5H23",
|
|
10866
|
+
stroke: "#000000",
|
|
10867
|
+
strokeWidth: "1.8"
|
|
10868
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
10869
|
+
d: "M11.5 0L11.5 23",
|
|
10870
|
+
stroke: "#000000",
|
|
10871
|
+
strokeWidth: "1.8"
|
|
10872
|
+
}));
|
|
10873
|
+
});
|
|
10874
|
+
|
|
10875
|
+
var _excluded$8 = ["children"];
|
|
10876
|
+
|
|
10877
|
+
var DropdownSelector = function DropdownSelector(_ref) {
|
|
10878
|
+
var selectedOption = _ref.selectedOption,
|
|
10879
|
+
onOptionChange = _ref.onOptionChange,
|
|
10880
|
+
options = _ref.options,
|
|
10881
|
+
isSearchable = _ref.isSearchable,
|
|
10882
|
+
placeholder = _ref.placeholder,
|
|
10883
|
+
name = _ref.name,
|
|
10884
|
+
showSearchIcon = _ref.showSearchIcon,
|
|
10885
|
+
isDisabled = _ref.isDisabled;
|
|
10886
|
+
var customComponents = {
|
|
10887
|
+
DropdownIndicator: function DropdownIndicator() {
|
|
10888
|
+
return null;
|
|
10889
|
+
},
|
|
10890
|
+
ValueContainer: function ValueContainer(_ref2) {
|
|
10891
|
+
var children = _ref2.children,
|
|
10892
|
+
props = _objectWithoutProperties(_ref2, _excluded$8);
|
|
10893
|
+
|
|
10894
|
+
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
10895
|
+
style: {
|
|
10896
|
+
position: 'relative'
|
|
10897
|
+
}
|
|
10898
|
+
}, props), showSearchIcon && /*#__PURE__*/React__default.createElement("div", {
|
|
10899
|
+
style: {
|
|
10900
|
+
position: 'absolute',
|
|
10901
|
+
left: '12px',
|
|
10902
|
+
top: '50%',
|
|
10903
|
+
transform: 'translateY(-50%)',
|
|
10904
|
+
pointerEvents: 'none'
|
|
10905
|
+
}
|
|
10906
|
+
}, /*#__PURE__*/React__default.createElement(Search, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
10907
|
+
style: {
|
|
10908
|
+
marginLeft: showSearchIcon ? '32px' : '12px'
|
|
10909
|
+
}
|
|
10910
|
+
}, children));
|
|
10911
|
+
}
|
|
10912
|
+
};
|
|
10913
|
+
var customStyles = {
|
|
10914
|
+
control: function control(provided) {
|
|
10915
|
+
return _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
10916
|
+
minWidth: '200px',
|
|
10917
|
+
width: '100%',
|
|
10918
|
+
boxShadow: 'none',
|
|
10919
|
+
border: '1px solid #ccc'
|
|
10920
|
+
});
|
|
10921
|
+
},
|
|
10922
|
+
valueContainer: function valueContainer(provided) {
|
|
10923
|
+
return _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
10924
|
+
padding: '8px 12px'
|
|
10925
|
+
});
|
|
10926
|
+
},
|
|
10927
|
+
dropdownIndicator: function dropdownIndicator() {
|
|
10928
|
+
return {
|
|
10929
|
+
display: 'none'
|
|
10930
|
+
};
|
|
10931
|
+
},
|
|
10932
|
+
placeholder: function placeholder(provided) {
|
|
10933
|
+
return _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
10934
|
+
fontWeight: 'bold',
|
|
10935
|
+
fontSize: '14px',
|
|
10936
|
+
paddingTop: '4px',
|
|
10937
|
+
color: '#999',
|
|
10938
|
+
minWidth: '200px'
|
|
10939
|
+
});
|
|
10940
|
+
},
|
|
10941
|
+
input: function input(provided) {
|
|
10942
|
+
return _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
10943
|
+
margin: '0',
|
|
10944
|
+
padding: '0',
|
|
10945
|
+
fontWeight: 'bold',
|
|
10946
|
+
fontSize: '14px',
|
|
10947
|
+
minWidth: '200px',
|
|
10948
|
+
maxWidth: '100%'
|
|
10949
|
+
});
|
|
10950
|
+
},
|
|
10951
|
+
singleValue: function singleValue(provided) {
|
|
10952
|
+
return _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
10953
|
+
fontWeight: 'bold',
|
|
10954
|
+
fontSize: '14px',
|
|
10955
|
+
whiteSpace: 'normal',
|
|
10956
|
+
overflow: 'visible',
|
|
10957
|
+
textOverflow: 'unset',
|
|
10958
|
+
maxWidth: 'none'
|
|
10959
|
+
});
|
|
10960
|
+
},
|
|
10961
|
+
indicatorSeparator: function indicatorSeparator() {
|
|
10962
|
+
return {
|
|
10963
|
+
display: 'none'
|
|
10964
|
+
};
|
|
10965
|
+
},
|
|
10966
|
+
menu: function menu(provided) {
|
|
10967
|
+
return _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
10968
|
+
zIndex: 9999,
|
|
10969
|
+
backgroundColor: 'white'
|
|
10970
|
+
});
|
|
10971
|
+
},
|
|
10972
|
+
menuList: function menuList(provided) {
|
|
10973
|
+
return _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
10974
|
+
padding: '0',
|
|
10975
|
+
'::-webkit-scrollbar': {
|
|
10976
|
+
width: '8px'
|
|
10977
|
+
},
|
|
10978
|
+
'::-webkit-scrollbar-track': {
|
|
10979
|
+
background: '#f1f1f1'
|
|
10980
|
+
},
|
|
10981
|
+
'::-webkit-scrollbar-thumb': {
|
|
10982
|
+
background: '#888',
|
|
10983
|
+
borderRadius: '4px'
|
|
10984
|
+
},
|
|
10985
|
+
'::-webkit-scrollbar-thumb:hover': {
|
|
10986
|
+
background: '#555'
|
|
10987
|
+
}
|
|
10988
|
+
});
|
|
10989
|
+
},
|
|
10990
|
+
option: function option(provided, state) {
|
|
10991
|
+
return _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
10992
|
+
color: state.isFocused ? 'white' : 'black',
|
|
10993
|
+
backgroundColor: state.isFocused || state.isSelected ? 'black' : 'white',
|
|
10994
|
+
cursor: 'pointer',
|
|
10995
|
+
padding: '8px 12px',
|
|
10996
|
+
'&:active': {
|
|
10997
|
+
backgroundColor: 'black'
|
|
10998
|
+
}
|
|
10999
|
+
}, state.isSelected && {
|
|
11000
|
+
backgroundColor: 'black',
|
|
11001
|
+
color: 'white'
|
|
11002
|
+
});
|
|
11003
|
+
}
|
|
11004
|
+
};
|
|
11005
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11006
|
+
style: {
|
|
11007
|
+
width: '100%'
|
|
11008
|
+
}
|
|
11009
|
+
}, /*#__PURE__*/React__default.createElement(index$1, {
|
|
11010
|
+
value: selectedOption,
|
|
11011
|
+
onChange: onOptionChange,
|
|
11012
|
+
options: options,
|
|
11013
|
+
isSearchable: isSearchable,
|
|
11014
|
+
name: name,
|
|
11015
|
+
placeholder: placeholder,
|
|
11016
|
+
components: customComponents,
|
|
11017
|
+
styles: customStyles,
|
|
11018
|
+
isDisabled: isDisabled
|
|
11019
|
+
}));
|
|
11020
|
+
};
|
|
11021
|
+
|
|
11022
|
+
DropdownSelector.defaultProps = {
|
|
11023
|
+
isSearchable: false,
|
|
11024
|
+
selectedOption: null,
|
|
11025
|
+
name: '',
|
|
11026
|
+
placeholder: '',
|
|
11027
|
+
showSearchIcon: true,
|
|
11028
|
+
isDisabled: false
|
|
11029
|
+
};
|
|
11030
|
+
|
|
11031
|
+
var _templateObject$E, _templateObject2$9;
|
|
11032
|
+
var AddInterestContainer$1 = styled__default.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n border: 1px solid ", ";\n padding: ", ";\n"])), function (props) {
|
|
11033
|
+
return props.theme.marginPaddings[6];
|
|
11034
|
+
}, function (props) {
|
|
11035
|
+
return props.theme.colors.borderColor;
|
|
11036
|
+
}, function (props) {
|
|
11037
|
+
return props.theme.marginPaddings[6];
|
|
11038
|
+
});
|
|
11039
|
+
var SaveAndCancelButtonContainer$1 = styled__default.div(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteral(["\n margin-top: ", ";\n\n @media (max-width: ", ") {\n .fl-right__item {\n flex-direction: column;\n margin-right: 0;\n margin-left: ", ";\n }\n\n button {\n margin-bottom: ", ";\n }\n }\n"])), function (props) {
|
|
11040
|
+
return props.theme.marginPaddings[6];
|
|
11041
|
+
}, media.xs, function (props) {
|
|
11042
|
+
return props.theme.marginPaddings[0];
|
|
11043
|
+
}, function (props) {
|
|
11044
|
+
return props.theme.marginPaddings[1];
|
|
11045
|
+
});
|
|
11046
|
+
|
|
11047
|
+
var AddProductInterest = function AddProductInterest(_ref) {
|
|
11048
|
+
var baseGraphApi = _ref.baseGraphApi,
|
|
11049
|
+
getBrandsGraphQuery = _ref.getBrandsGraphQuery,
|
|
11050
|
+
getModelsGraphQuery = _ref.getModelsGraphQuery,
|
|
11051
|
+
getMaterialsGraphQuery = _ref.getMaterialsGraphQuery,
|
|
11052
|
+
onCancel = _ref.onCancel,
|
|
11053
|
+
requestInstance = _ref.requestInstance,
|
|
11054
|
+
addLuxityProductInterestApi = _ref.addLuxityProductInterestApi,
|
|
11055
|
+
onSubmitSuccess = _ref.onSubmitSuccess;
|
|
11056
|
+
|
|
11057
|
+
var _useState = React.useState([]),
|
|
11058
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11059
|
+
brands = _useState2[0],
|
|
11060
|
+
setBrands = _useState2[1];
|
|
11061
|
+
|
|
11062
|
+
var _useState3 = React.useState([]),
|
|
11063
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
11064
|
+
models = _useState4[0],
|
|
11065
|
+
setModels = _useState4[1];
|
|
11066
|
+
|
|
11067
|
+
var _useState5 = React.useState([]),
|
|
11068
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
11069
|
+
materials = _useState6[0],
|
|
11070
|
+
setMaterials = _useState6[1];
|
|
11071
|
+
|
|
11072
|
+
var _useState7 = React.useState(null),
|
|
11073
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
11074
|
+
selectedBrand = _useState8[0],
|
|
11075
|
+
setSelectedBrand = _useState8[1];
|
|
11076
|
+
|
|
11077
|
+
var _useState9 = React.useState(null),
|
|
11078
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
11079
|
+
selectedModel = _useState10[0],
|
|
11080
|
+
setSelectedModel = _useState10[1];
|
|
11081
|
+
|
|
11082
|
+
var _useState11 = React.useState(null),
|
|
11083
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
11084
|
+
selectedMaterial = _useState12[0],
|
|
11085
|
+
setSelectedMaterial = _useState12[1];
|
|
11086
|
+
|
|
11087
|
+
var fetchBrands = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11088
|
+
var _response$data, _response$data$data, _response$data$data$l, response, formattedBrands;
|
|
11089
|
+
|
|
11090
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11091
|
+
while (1) {
|
|
11092
|
+
switch (_context.prev = _context.next) {
|
|
11093
|
+
case 0:
|
|
11094
|
+
_context.prev = 0;
|
|
11095
|
+
_context.next = 3;
|
|
11096
|
+
return axiosInstance.post("".concat(baseGraphApi, "?id=getBrands"), {
|
|
11097
|
+
query: getBrandsGraphQuery(1000, 1, 'id|desc')
|
|
11098
|
+
});
|
|
11099
|
+
|
|
11100
|
+
case 3:
|
|
11101
|
+
response = _context.sent;
|
|
11102
|
+
|
|
11103
|
+
if (response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && (_response$data$data = _response$data.data) !== null && _response$data$data !== void 0 && (_response$data$data$l = _response$data$data.luxity_brands) !== null && _response$data$data$l !== void 0 && _response$data$data$l.data) {
|
|
11104
|
+
formattedBrands = response.data.data.luxity_brands.data.map(function (brand) {
|
|
11105
|
+
return {
|
|
11106
|
+
value: brand.id,
|
|
11107
|
+
label: brand.name
|
|
11108
|
+
};
|
|
11109
|
+
});
|
|
11110
|
+
setBrands(formattedBrands);
|
|
11111
|
+
}
|
|
11112
|
+
|
|
11113
|
+
_context.next = 10;
|
|
11114
|
+
break;
|
|
11115
|
+
|
|
11116
|
+
case 7:
|
|
11117
|
+
_context.prev = 7;
|
|
11118
|
+
_context.t0 = _context["catch"](0);
|
|
11119
|
+
error(_context.t0.message);
|
|
11120
|
+
|
|
11121
|
+
case 10:
|
|
11122
|
+
case "end":
|
|
11123
|
+
return _context.stop();
|
|
11124
|
+
}
|
|
11125
|
+
}
|
|
11126
|
+
}, _callee, null, [[0, 7]]);
|
|
11127
|
+
})), [baseGraphApi, getBrandsGraphQuery]);
|
|
11128
|
+
var fetchModels = React.useCallback( /*#__PURE__*/function () {
|
|
11129
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(brandId) {
|
|
11130
|
+
var _response$data2, _response$data2$data, _response$data2$data$, response, formattedModels;
|
|
11131
|
+
|
|
11132
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11133
|
+
while (1) {
|
|
11134
|
+
switch (_context2.prev = _context2.next) {
|
|
11135
|
+
case 0:
|
|
11136
|
+
_context2.prev = 0;
|
|
11137
|
+
_context2.next = 3;
|
|
11138
|
+
return axiosInstance.post("".concat(baseGraphApi, "?id=getModels"), {
|
|
11139
|
+
query: getModelsGraphQuery(brandId)
|
|
11140
|
+
});
|
|
11141
|
+
|
|
11142
|
+
case 3:
|
|
11143
|
+
response = _context2.sent;
|
|
11144
|
+
|
|
11145
|
+
if (response !== null && response !== void 0 && (_response$data2 = response.data) !== null && _response$data2 !== void 0 && (_response$data2$data = _response$data2.data) !== null && _response$data2$data !== void 0 && (_response$data2$data$ = _response$data2$data.luxity_models) !== null && _response$data2$data$ !== void 0 && _response$data2$data$.data) {
|
|
11146
|
+
formattedModels = response.data.data.luxity_models.data.map(function (model) {
|
|
11147
|
+
return {
|
|
11148
|
+
value: model.id,
|
|
11149
|
+
label: model.name
|
|
11150
|
+
};
|
|
11151
|
+
});
|
|
11152
|
+
setModels(formattedModels);
|
|
11153
|
+
}
|
|
11154
|
+
|
|
11155
|
+
_context2.next = 10;
|
|
11156
|
+
break;
|
|
11157
|
+
|
|
11158
|
+
case 7:
|
|
11159
|
+
_context2.prev = 7;
|
|
11160
|
+
_context2.t0 = _context2["catch"](0);
|
|
11161
|
+
error(_context2.t0.message);
|
|
11162
|
+
|
|
11163
|
+
case 10:
|
|
11164
|
+
case "end":
|
|
11165
|
+
return _context2.stop();
|
|
11166
|
+
}
|
|
11167
|
+
}
|
|
11168
|
+
}, _callee2, null, [[0, 7]]);
|
|
11169
|
+
}));
|
|
11170
|
+
|
|
11171
|
+
return function (_x) {
|
|
11172
|
+
return _ref3.apply(this, arguments);
|
|
11173
|
+
};
|
|
11174
|
+
}(), [baseGraphApi, getModelsGraphQuery]);
|
|
11175
|
+
var fetchMaterials = React.useCallback( /*#__PURE__*/function () {
|
|
11176
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(brandId) {
|
|
11177
|
+
var _response$data3, _response$data3$data, _response$data3$data$, response, formattedMaterials;
|
|
11178
|
+
|
|
11179
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
11180
|
+
while (1) {
|
|
11181
|
+
switch (_context3.prev = _context3.next) {
|
|
11182
|
+
case 0:
|
|
11183
|
+
_context3.prev = 0;
|
|
11184
|
+
_context3.next = 3;
|
|
11185
|
+
return axiosInstance.post("".concat(baseGraphApi, "?id=getMaterials"), {
|
|
11186
|
+
query: getMaterialsGraphQuery(brandId)
|
|
11187
|
+
});
|
|
11188
|
+
|
|
11189
|
+
case 3:
|
|
11190
|
+
response = _context3.sent;
|
|
11191
|
+
|
|
11192
|
+
if (response !== null && response !== void 0 && (_response$data3 = response.data) !== null && _response$data3 !== void 0 && (_response$data3$data = _response$data3.data) !== null && _response$data3$data !== void 0 && (_response$data3$data$ = _response$data3$data.luxity_materials) !== null && _response$data3$data$ !== void 0 && _response$data3$data$.data) {
|
|
11193
|
+
formattedMaterials = response.data.data.luxity_materials.data.map(function (material) {
|
|
11194
|
+
return {
|
|
11195
|
+
value: material.id,
|
|
11196
|
+
label: material.name
|
|
11197
|
+
};
|
|
11198
|
+
});
|
|
11199
|
+
setMaterials(formattedMaterials);
|
|
11200
|
+
}
|
|
11201
|
+
|
|
11202
|
+
_context3.next = 10;
|
|
11203
|
+
break;
|
|
11204
|
+
|
|
11205
|
+
case 7:
|
|
11206
|
+
_context3.prev = 7;
|
|
11207
|
+
_context3.t0 = _context3["catch"](0);
|
|
11208
|
+
error(_context3.t0.message);
|
|
11209
|
+
|
|
11210
|
+
case 10:
|
|
11211
|
+
case "end":
|
|
11212
|
+
return _context3.stop();
|
|
11213
|
+
}
|
|
11214
|
+
}
|
|
11215
|
+
}, _callee3, null, [[0, 7]]);
|
|
11216
|
+
}));
|
|
11217
|
+
|
|
11218
|
+
return function (_x2) {
|
|
11219
|
+
return _ref4.apply(this, arguments);
|
|
11220
|
+
};
|
|
11221
|
+
}(), [baseGraphApi, getMaterialsGraphQuery]);
|
|
11222
|
+
React.useEffect(function () {
|
|
11223
|
+
fetchBrands();
|
|
11224
|
+
}, [fetchBrands]);
|
|
11225
|
+
React.useEffect(function () {
|
|
11226
|
+
if (selectedBrand) {
|
|
11227
|
+
setSelectedModel(null);
|
|
11228
|
+
setSelectedMaterial(null);
|
|
11229
|
+
fetchModels(selectedBrand.value);
|
|
11230
|
+
fetchMaterials(selectedBrand.value);
|
|
11231
|
+
} else {
|
|
11232
|
+
setModels([]);
|
|
11233
|
+
setMaterials([]);
|
|
11234
|
+
setSelectedModel(null);
|
|
11235
|
+
setSelectedMaterial(null);
|
|
11236
|
+
}
|
|
11237
|
+
}, [selectedBrand, fetchModels, fetchMaterials]);
|
|
11238
|
+
|
|
11239
|
+
var onBrandChange = function onBrandChange(selectedOption) {
|
|
11240
|
+
setSelectedBrand(selectedOption);
|
|
11241
|
+
};
|
|
11242
|
+
|
|
11243
|
+
var onModelChange = function onModelChange(selectedOption) {
|
|
11244
|
+
setSelectedModel(selectedOption);
|
|
11245
|
+
};
|
|
11246
|
+
|
|
11247
|
+
var onMaterialChange = function onMaterialChange(selectedOption) {
|
|
11248
|
+
setSelectedMaterial(selectedOption);
|
|
11249
|
+
};
|
|
11250
|
+
|
|
11251
|
+
var submitInterest = function submitInterest() {
|
|
11252
|
+
var payload = {
|
|
11253
|
+
luxity_brand_id: selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.value,
|
|
11254
|
+
luxity_model_id: selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.value,
|
|
11255
|
+
luxity_material_id: selectedMaterial === null || selectedMaterial === void 0 ? void 0 : selectedMaterial.value
|
|
11256
|
+
};
|
|
11257
|
+
simpleRequest(requestInstance, addLuxityProductInterestApi, method.POST, payload, function () {
|
|
11258
|
+
onSubmitSuccess(_objectSpread2({}, payload));
|
|
11259
|
+
onCancel();
|
|
11260
|
+
}, handleRequestError);
|
|
11261
|
+
};
|
|
11262
|
+
|
|
11263
|
+
var handleRequestError = function handleRequestError(_ref5) {
|
|
11264
|
+
var data = _ref5.data;
|
|
11265
|
+
var errorMessages = Object.keys(data).map(function (key) {
|
|
11266
|
+
return data[key];
|
|
11267
|
+
}).flat();
|
|
11268
|
+
error(errorMessages.map(function (message, key) {
|
|
11269
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11270
|
+
key: "error-".concat(key)
|
|
11271
|
+
}, message);
|
|
11272
|
+
}));
|
|
11273
|
+
};
|
|
11274
|
+
|
|
11275
|
+
var onReset = function onReset() {
|
|
11276
|
+
onCancel();
|
|
11277
|
+
setSelectedModel(null);
|
|
11278
|
+
setSelectedMaterial(null);
|
|
11279
|
+
setSelectedBrand(null);
|
|
11280
|
+
setBrands([]);
|
|
11281
|
+
setMaterials([]);
|
|
11282
|
+
setModels([]);
|
|
11283
|
+
};
|
|
11284
|
+
|
|
11285
|
+
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11286
|
+
className: "interests__section-wrapper"
|
|
11287
|
+
}, /*#__PURE__*/React__default.createElement(AddInterestContainer$1, null, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11288
|
+
className: "interests__select-option"
|
|
11289
|
+
}, /*#__PURE__*/React__default.createElement(DropdownSelector, {
|
|
11290
|
+
name: "brand",
|
|
11291
|
+
selectedOption: selectedBrand,
|
|
11292
|
+
options: brands,
|
|
11293
|
+
isSearchable: true,
|
|
11294
|
+
onOptionChange: onBrandChange,
|
|
11295
|
+
placeholder: "Select Brand"
|
|
11296
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
11297
|
+
className: "interests__select-option"
|
|
11298
|
+
}, /*#__PURE__*/React__default.createElement(DropdownSelector, {
|
|
11299
|
+
name: "model",
|
|
11300
|
+
selectedOption: selectedModel,
|
|
11301
|
+
options: models,
|
|
11302
|
+
isSearchable: true,
|
|
11303
|
+
onOptionChange: onModelChange,
|
|
11304
|
+
placeholder: "Select Model",
|
|
11305
|
+
isDisabled: !selectedBrand && !models.length
|
|
11306
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
11307
|
+
className: "interests__select-option"
|
|
11308
|
+
}, /*#__PURE__*/React__default.createElement(DropdownSelector, {
|
|
11309
|
+
name: "material",
|
|
11310
|
+
selectedOption: selectedMaterial,
|
|
11311
|
+
options: materials,
|
|
11312
|
+
isSearchable: true,
|
|
11313
|
+
onOptionChange: onMaterialChange,
|
|
11314
|
+
placeholder: "Select Material",
|
|
11315
|
+
isDisabled: !selectedBrand && !materials.length
|
|
11316
|
+
}))), /*#__PURE__*/React__default.createElement(SaveAndCancelButtonContainer$1, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11317
|
+
className: "fl-right"
|
|
11318
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11319
|
+
className: "fl-right__item"
|
|
11320
|
+
}, /*#__PURE__*/React__default.createElement(SecondaryButton$1, {
|
|
11321
|
+
type: "button",
|
|
11322
|
+
onClick: onReset
|
|
11323
|
+
}, "CANCEL")), /*#__PURE__*/React__default.createElement("div", {
|
|
11324
|
+
className: "fl-right__item"
|
|
11325
|
+
}, /*#__PURE__*/React__default.createElement(PrimaryButton$1, {
|
|
11326
|
+
"data-qe-id": "add-interest-btn",
|
|
11327
|
+
disabled: !selectedBrand,
|
|
11328
|
+
type: "button",
|
|
11329
|
+
onClick: submitInterest
|
|
11330
|
+
}, "SAVE"))))))));
|
|
11331
|
+
};
|
|
11332
|
+
|
|
11333
|
+
var AddProductInterest$1 = themed(AddProductInterest);
|
|
11334
|
+
|
|
11335
|
+
var _templateObject$F, _templateObject2$a, _templateObject3$4;
|
|
11336
|
+
|
|
11337
|
+
var TrashIcon$1 = function TrashIcon(_ref) {
|
|
11338
|
+
var onClick = _ref.onClick,
|
|
11339
|
+
id = _ref.id;
|
|
11340
|
+
return /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
11341
|
+
onClick: onClick,
|
|
11342
|
+
id: id
|
|
11343
|
+
}, /*#__PURE__*/React__default.createElement(SvgWrapper$1, null, /*#__PURE__*/React__default.createElement(Trash, null)));
|
|
11344
|
+
};
|
|
11345
|
+
|
|
11346
|
+
var LuxityProductInterestItem = /*#__PURE__*/function (_React$Component) {
|
|
11347
|
+
_inherits(LuxityProductInterestItem, _React$Component);
|
|
11348
|
+
|
|
11349
|
+
var _super = _createSuper(LuxityProductInterestItem);
|
|
11350
|
+
|
|
11351
|
+
function LuxityProductInterestItem(props) {
|
|
11352
|
+
var _this;
|
|
11353
|
+
|
|
11354
|
+
_classCallCheck(this, LuxityProductInterestItem);
|
|
11355
|
+
|
|
11356
|
+
_this = _super.call(this, props);
|
|
11357
|
+
|
|
11358
|
+
_defineProperty(_assertThisInitialized(_this), "deleteInterestItem", function () {
|
|
11359
|
+
var id = _this.props.data.id;
|
|
11360
|
+
|
|
11361
|
+
_this.setState({
|
|
11362
|
+
delete: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
11363
|
+
fetching: true
|
|
11364
|
+
})
|
|
11365
|
+
});
|
|
11366
|
+
|
|
11367
|
+
var url = _this.props.deleteInterestApi(id);
|
|
11368
|
+
|
|
11369
|
+
simpleRequest(_this.props.requestInstance, url, method.DELETE, null, function () {
|
|
11370
|
+
_this.setState({
|
|
11371
|
+
delete: _objectSpread2(_objectSpread2({}, request), {}, {
|
|
11372
|
+
success: true
|
|
11373
|
+
})
|
|
11374
|
+
});
|
|
11375
|
+
|
|
11376
|
+
_this.props.onDeleted(_this.props.data);
|
|
11377
|
+
}, function () {
|
|
11378
|
+
return _this.setState({
|
|
11379
|
+
delete: _objectSpread2({}, request)
|
|
11380
|
+
});
|
|
11381
|
+
});
|
|
11382
|
+
});
|
|
11383
|
+
|
|
11384
|
+
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
11385
|
+
var _data$luxity_model, _data$luxity_material;
|
|
11386
|
+
|
|
11387
|
+
var data = _this.props.data;
|
|
11388
|
+
var success = _this.state.delete.success;
|
|
11389
|
+
return /*#__PURE__*/React__default.createElement(InterestItemContainer$1, {
|
|
11390
|
+
id: "interests__item--".concat(data.id),
|
|
11391
|
+
className: "".concat(success && 'interests__item--hiding')
|
|
11392
|
+
}, /*#__PURE__*/React__default.createElement(InterestItemContent$1, {
|
|
11393
|
+
className: "interest-item__container ".concat(_this.props.className || '')
|
|
11394
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11395
|
+
className: "interest-item__container_heading"
|
|
11396
|
+
}, /*#__PURE__*/React__default.createElement(InterestItemTitle$1, null, "Brand:"), /*#__PURE__*/React__default.createElement("div", {
|
|
11397
|
+
id: "interest-item-".concat(data.id, "__category"),
|
|
11398
|
+
className: "list-items"
|
|
11399
|
+
}, data.luxity_brand.name)), /*#__PURE__*/React__default.createElement("div", {
|
|
11400
|
+
className: "interest-item__container_heading"
|
|
11401
|
+
}, /*#__PURE__*/React__default.createElement(InterestItemTitle$1, null, "Model:"), /*#__PURE__*/React__default.createElement("div", {
|
|
11402
|
+
className: "list-items"
|
|
11403
|
+
}, data === null || data === void 0 ? void 0 : (_data$luxity_model = data.luxity_model) === null || _data$luxity_model === void 0 ? void 0 : _data$luxity_model.name)), /*#__PURE__*/React__default.createElement("div", {
|
|
11404
|
+
className: "interest-item__container_heading"
|
|
11405
|
+
}, /*#__PURE__*/React__default.createElement(InterestItemTitle$1, null, "Material:"), /*#__PURE__*/React__default.createElement("div", {
|
|
11406
|
+
className: "list-items"
|
|
11407
|
+
}, data === null || data === void 0 ? void 0 : (_data$luxity_material = data.luxity_material) === null || _data$luxity_material === void 0 ? void 0 : _data$luxity_material.name))), /*#__PURE__*/React__default.createElement(TrashIcon$1, {
|
|
11408
|
+
id: "interest-".concat(data.id, "-delete-button"),
|
|
11409
|
+
onClick: function onClick() {
|
|
11410
|
+
if (!_this.state.delete.fetching) {
|
|
11411
|
+
_this.deleteInterestItem();
|
|
11412
|
+
}
|
|
11413
|
+
}
|
|
11414
|
+
}));
|
|
11415
|
+
});
|
|
11416
|
+
|
|
11417
|
+
_this.state = {
|
|
11418
|
+
delete: _objectSpread2({}, request)
|
|
11419
|
+
};
|
|
11420
|
+
return _this;
|
|
11421
|
+
}
|
|
11422
|
+
|
|
11423
|
+
return _createClass(LuxityProductInterestItem);
|
|
11424
|
+
}(React__default.Component);
|
|
11425
|
+
|
|
11426
|
+
var InterestItemTitle$1 = styled__default.div(_templateObject$F || (_templateObject$F = _taggedTemplateLiteral(["\n font-weight: bold;\n display: none;\n\n @media (max-width: ", ") {\n display: inline;\n }\n"])), media.xs);
|
|
11427
|
+
var InterestItemContainer$1 = styled__default.div(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteral(["\n display: flex;\n\n .no-shoe-size-section {\n @media (max-width: ", ") {\n display: none;\n }\n }\n"])), media.xs);
|
|
11428
|
+
var InterestItemContent$1 = styled__default.div(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n width: 95%;\n height: 100%;\n border: 1px solid ", ";\n padding: 1rem;\n margin-bottom: ", ";\n\n .interest-item__container_heading {\n color: ", ";\n flex-basis: calc(100% / 6);\n margin-top: 0.3rem;\n\n @media (max-width: ", ") {\n display: inline;\n }\n }\n\n .list-items {\n display: inline-flex;\n flex-direction: column;\n\n @media (max-width: ", ") {\n margin-left: ", ";\n }\n }\n\n @media (max-width: ", ") {\n flex-direction: column;\n }\n"])), function (props) {
|
|
11429
|
+
return props.theme.colors.borderColor;
|
|
11430
|
+
}, function (props) {
|
|
11431
|
+
return props.theme.marginPaddings[1];
|
|
11432
|
+
}, function (props) {
|
|
11433
|
+
return props.theme.colors.darkerGray;
|
|
11434
|
+
}, media.xs, media.xs, function (props) {
|
|
11435
|
+
return props.theme.marginPaddings[0];
|
|
11436
|
+
}, media.xs);
|
|
11437
|
+
var ThemedInterestItem$1 = themed(LuxityProductInterestItem);
|
|
11438
|
+
/**
|
|
11439
|
+
* The Interest Item view shows the selected interest configuration,
|
|
11440
|
+
* and gives user control to delete it.
|
|
11441
|
+
*/
|
|
11442
|
+
|
|
11443
|
+
var LuxityProductInterestItem$1 = (function (props) {
|
|
11444
|
+
return /*#__PURE__*/React__default.createElement(ThemedInterestItem$1, props);
|
|
11445
|
+
});
|
|
11446
|
+
|
|
11447
|
+
var _templateObject$G, _templateObject2$b;
|
|
11448
|
+
var AddInterestButtonContainer = styled__default.div(_templateObject$G || (_templateObject$G = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n\n #add-icon {\n margin-bottom: 1.5rem;\n\n svg {\n width: 15px;\n }\n }\n"])));
|
|
11449
|
+
|
|
11450
|
+
var AddIcon = function AddIcon(_ref) {
|
|
11451
|
+
var onClick = _ref.onClick,
|
|
11452
|
+
id = _ref.id;
|
|
11453
|
+
return /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
11454
|
+
id: id,
|
|
11455
|
+
onClick: onClick
|
|
11456
|
+
}, /*#__PURE__*/React__default.createElement(SvgWrapper$1, null, /*#__PURE__*/React__default.createElement(Add, null)));
|
|
11457
|
+
};
|
|
11458
|
+
|
|
11459
|
+
var AccountIcon = themed(function () {
|
|
11460
|
+
return /*#__PURE__*/React__default.createElement(SvgWrapper$1, null, /*#__PURE__*/React__default.createElement(Account, null));
|
|
11461
|
+
});
|
|
11462
|
+
var AddInterestButton = themed(styled__default.div(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n border: 1px solid ", ";\n padding-top: ", ";\n margin-bottom: ", ";\n padding-left: 1.5rem;\n width: 95%;\n font-size: 17px;\n"])), function (props) {
|
|
11463
|
+
return props.theme.colors.darkerGray;
|
|
11464
|
+
}, function (props) {
|
|
11465
|
+
return props.theme.colors.borderColor;
|
|
11466
|
+
}, function (props) {
|
|
11467
|
+
return props.theme.marginPaddings[0];
|
|
11468
|
+
}, function (props) {
|
|
11469
|
+
return props.theme.marginPaddings[2];
|
|
11470
|
+
}));
|
|
11471
|
+
|
|
11472
|
+
/**
|
|
11473
|
+
* Page/View that controls the viewing and Adding of Luxity Interests
|
|
11474
|
+
*/
|
|
11475
|
+
var Interests = /*#__PURE__*/function (_React$Component) {
|
|
11476
|
+
_inherits(Interests, _React$Component);
|
|
11477
|
+
|
|
11478
|
+
var _super = _createSuper(Interests);
|
|
11479
|
+
|
|
11480
|
+
function Interests(props) {
|
|
11481
|
+
var _this;
|
|
11482
|
+
|
|
11483
|
+
_classCallCheck(this, Interests);
|
|
11484
|
+
|
|
11485
|
+
_this = _super.call(this, props);
|
|
11486
|
+
|
|
11487
|
+
_defineProperty(_assertThisInitialized(_this), "categoryInterestType", 'CATEGORY');
|
|
11488
|
+
|
|
11489
|
+
_defineProperty(_assertThisInitialized(_this), "productInterestType", 'PRODUCT');
|
|
11490
|
+
|
|
11491
|
+
_defineProperty(_assertThisInitialized(_this), "setInterests", function (data) {
|
|
11492
|
+
var _data$data$data = data.data.data,
|
|
11493
|
+
interests = _data$data$data.interests.data,
|
|
11494
|
+
luxity_product_interests = _data$data$data.luxity_product_interests.data;
|
|
11495
|
+
|
|
11496
|
+
_this.setState({
|
|
11497
|
+
interests: interests,
|
|
11498
|
+
luxity_product_interests: luxity_product_interests
|
|
11499
|
+
});
|
|
11500
|
+
});
|
|
11501
|
+
|
|
11502
|
+
_defineProperty(_assertThisInitialized(_this), "onInterestSubmitSuccess", function (interestItem) {
|
|
11503
|
+
// due to the fact that we dont get the Interest payload back - we have to re-request the list
|
|
11504
|
+
_this.triggerInterestRequest().then(function (res) {
|
|
11505
|
+
return _this.setInterests(res);
|
|
10472
11506
|
}); // UNCOMMENT WHEN Interest Items is returned as expected Object Shape
|
|
10473
11507
|
// this.setState(prevState => {
|
|
10474
11508
|
// const newInterests = [interestItem].concat(prevState.interests);
|
|
@@ -10488,6 +11522,17 @@
|
|
|
10488
11522
|
});
|
|
10489
11523
|
});
|
|
10490
11524
|
|
|
11525
|
+
_defineProperty(_assertThisInitialized(_this), "onDeleteLuxityProductInterest", function (deleteItem) {
|
|
11526
|
+
_this.setState(function (prevState) {
|
|
11527
|
+
var newLuxityProductInterests = prevState.luxity_product_interests.filter(function (item) {
|
|
11528
|
+
return item.id !== deleteItem.id;
|
|
11529
|
+
});
|
|
11530
|
+
return _objectSpread2(_objectSpread2({}, prevState), {}, {
|
|
11531
|
+
luxity_product_interests: newLuxityProductInterests
|
|
11532
|
+
});
|
|
11533
|
+
});
|
|
11534
|
+
});
|
|
11535
|
+
|
|
10491
11536
|
_defineProperty(_assertThisInitialized(_this), "triggerInterestRequest", function () {
|
|
10492
11537
|
var _this$props = _this.props,
|
|
10493
11538
|
requestInstance = _this$props.requestInstance,
|
|
@@ -10498,8 +11543,22 @@
|
|
|
10498
11543
|
});
|
|
10499
11544
|
});
|
|
10500
11545
|
|
|
11546
|
+
_defineProperty(_assertThisInitialized(_this), "onAddInterestClick", function (interestType) {
|
|
11547
|
+
_this.setState({
|
|
11548
|
+
interestType: interestType
|
|
11549
|
+
});
|
|
11550
|
+
});
|
|
11551
|
+
|
|
11552
|
+
_defineProperty(_assertThisInitialized(_this), "onCancel", function () {
|
|
11553
|
+
_this.setState({
|
|
11554
|
+
interestType: null
|
|
11555
|
+
});
|
|
11556
|
+
});
|
|
11557
|
+
|
|
10501
11558
|
_this.state = {
|
|
10502
|
-
interests: []
|
|
11559
|
+
interests: [],
|
|
11560
|
+
luxity_product_interests: [],
|
|
11561
|
+
interestType: null
|
|
10503
11562
|
};
|
|
10504
11563
|
return _this;
|
|
10505
11564
|
}
|
|
@@ -10509,7 +11568,9 @@
|
|
|
10509
11568
|
value: function render() {
|
|
10510
11569
|
var _this2 = this;
|
|
10511
11570
|
|
|
10512
|
-
var
|
|
11571
|
+
var _this$state = this.state,
|
|
11572
|
+
interests = _this$state.interests,
|
|
11573
|
+
luxity_product_interests = _this$state.luxity_product_interests;
|
|
10513
11574
|
var _this$props2 = this.props,
|
|
10514
11575
|
addInterestApi = _this$props2.addInterestApi,
|
|
10515
11576
|
requestInstance = _this$props2.requestInstance,
|
|
@@ -10521,7 +11582,12 @@
|
|
|
10521
11582
|
setSchedule = _this$props2.setSchedule,
|
|
10522
11583
|
getSchedule = _this$props2.getSchedule,
|
|
10523
11584
|
interestsTitle = _this$props2.interestsTitle,
|
|
10524
|
-
defaultShoeSizeType = _this$props2.defaultShoeSizeType
|
|
11585
|
+
defaultShoeSizeType = _this$props2.defaultShoeSizeType,
|
|
11586
|
+
getMaterialsGraphQuery = _this$props2.getMaterialsGraphQuery,
|
|
11587
|
+
getModelsGraphQuery = _this$props2.getModelsGraphQuery,
|
|
11588
|
+
addLuxityProductInterestApi = _this$props2.addLuxityProductInterestApi,
|
|
11589
|
+
deleteLuxityProductInterestApi = _this$props2.deleteLuxityProductInterestApi,
|
|
11590
|
+
getConditionsGraphQuery = _this$props2.getConditionsGraphQuery;
|
|
10525
11591
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10526
11592
|
className: "interests"
|
|
10527
11593
|
}, /*#__PURE__*/React__default.createElement(Notifications__default, {
|
|
@@ -10540,7 +11606,23 @@
|
|
|
10540
11606
|
setSchedule: setSchedule
|
|
10541
11607
|
});
|
|
10542
11608
|
}
|
|
10543
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
11609
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11610
|
+
className: "interests__add-button"
|
|
11611
|
+
}, /*#__PURE__*/React__default.createElement(AddInterestButtonContainer, {
|
|
11612
|
+
onClick: function onClick() {
|
|
11613
|
+
return _this2.onAddInterestClick(_this2.categoryInterestType);
|
|
11614
|
+
}
|
|
11615
|
+
}, /*#__PURE__*/React__default.createElement(AddInterestButton, null, "Category Interest"), /*#__PURE__*/React__default.createElement(AddIcon, {
|
|
11616
|
+
id: "add-icon"
|
|
11617
|
+
})), /*#__PURE__*/React__default.createElement(AddInterestButtonContainer, {
|
|
11618
|
+
onClick: function onClick() {
|
|
11619
|
+
return _this2.onAddInterestClick(_this2.productInterestType);
|
|
11620
|
+
}
|
|
11621
|
+
}, /*#__PURE__*/React__default.createElement(AddInterestButton, null, "Product Interest"), /*#__PURE__*/React__default.createElement(AddIcon, {
|
|
11622
|
+
id: "add-icon"
|
|
11623
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11624
|
+
className: "interests__section"
|
|
11625
|
+
}, this.state.interestType === this.categoryInterestType && /*#__PURE__*/React__default.createElement(AddInterest$1, {
|
|
10544
11626
|
addInterestApi: addInterestApi,
|
|
10545
11627
|
onSubmitSuccess: function onSubmitSuccess(interest) {
|
|
10546
11628
|
return _this2.onInterestSubmitSuccess(interest);
|
|
@@ -10550,7 +11632,29 @@
|
|
|
10550
11632
|
getBrandsGraphQuery: getBrandsGraphQuery,
|
|
10551
11633
|
getStylesGraphQuery: getStylesGraphQuery,
|
|
10552
11634
|
getShoesGraphQuery: getShoesGraphQuery,
|
|
10553
|
-
defaultShoeSizeType: defaultShoeSizeType
|
|
11635
|
+
defaultShoeSizeType: defaultShoeSizeType,
|
|
11636
|
+
addInterestTitle: "Category Interest",
|
|
11637
|
+
onCancel: this.onCancel,
|
|
11638
|
+
getConditionsGraphQuery: getConditionsGraphQuery
|
|
11639
|
+
}), this.state.interestType === this.productInterestType && /*#__PURE__*/React__default.createElement(AddProductInterest$1, {
|
|
11640
|
+
addLuxityProductInterestApi: addLuxityProductInterestApi,
|
|
11641
|
+
onSubmitSuccess: function onSubmitSuccess(interest) {
|
|
11642
|
+
return _this2.onInterestSubmitSuccess(interest);
|
|
11643
|
+
},
|
|
11644
|
+
requestInstance: requestInstance,
|
|
11645
|
+
baseGraphApi: baseGraphApi,
|
|
11646
|
+
getBrandsGraphQuery: getBrandsGraphQuery,
|
|
11647
|
+
addInterestTitle: "Product Interest",
|
|
11648
|
+
onCancel: this.onCancel,
|
|
11649
|
+
getModelsGraphQuery: getModelsGraphQuery,
|
|
11650
|
+
getMaterialsGraphQuery: getMaterialsGraphQuery
|
|
11651
|
+
})), (luxity_product_interests === null || luxity_product_interests === void 0 ? void 0 : luxity_product_interests.length) > 0 ? /*#__PURE__*/React__default.createElement(MyProductInterestTitleHeading$1, null) : '', !!(luxity_product_interests !== null && luxity_product_interests !== void 0 && luxity_product_interests.length) && luxity_product_interests.map(function (item) {
|
|
11652
|
+
return /*#__PURE__*/React__default.createElement(LuxityProductInterestItem$1, {
|
|
11653
|
+
deleteInterestApi: deleteLuxityProductInterestApi,
|
|
11654
|
+
requestInstance: requestInstance,
|
|
11655
|
+
onDeleted: _this2.onDeleteLuxityProductInterest,
|
|
11656
|
+
data: item
|
|
11657
|
+
});
|
|
10554
11658
|
}), interests.length > 0 ? /*#__PURE__*/React__default.createElement(MyInterestTitleHeading$1, null) : '', /*#__PURE__*/React__default.createElement(LuxityPageReady, {
|
|
10555
11659
|
getRequestPromise: function getRequestPromise() {
|
|
10556
11660
|
return _this2.triggerInterestRequest();
|
|
@@ -10580,7 +11684,8 @@
|
|
|
10580
11684
|
interestsTitle: 'Interests',
|
|
10581
11685
|
defaultShoeSizeType: shoeSizeTypes.eu.value
|
|
10582
11686
|
};
|
|
11687
|
+
var index$2 = themed(Interests);
|
|
10583
11688
|
|
|
10584
|
-
return
|
|
11689
|
+
return index$2;
|
|
10585
11690
|
|
|
10586
11691
|
})));
|