@bonlineza/luxity-lib 2.35.1 → 2.35.2

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/build/bundle.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-animate-height'), require('styled-components'), require('numeral'), 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('react-notify-toast'), require('axios')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-animate-height', 'styled-components', 'numeral', '@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', 'react-notify-toast', 'axios'], factory) :
4
- (global = global || self, factory(global.blib = {}, global.React, global.AnimateHeight, global.styled, global.numeral, 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['react-notify-toast'], global.axios));
5
- }(this, (function (exports, React, AnimateHeight, styled, numeral, EllipsisLoader, PageReady, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, Notifications, axios) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-animate-height'), require('styled-components'), require('numeral'), 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('react-notify-toast'), require('helpers/axios'), require('axios')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-animate-height', 'styled-components', 'numeral', '@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', 'react-notify-toast', 'helpers/axios', 'axios'], factory) :
4
+ (global = global || self, factory(global.blib = {}, global.React, global.AnimateHeight, global.styled, global.numeral, 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['react-notify-toast'], global.axiosInstance, global.axios));
5
+ }(this, (function (exports, React, AnimateHeight, styled, numeral, EllipsisLoader, PageReady, stylisRuleSheet, reactDom, PropTypes, raf, AutosizeInput, reactTransitionGroup, functions, rcSlider, Notifications, axiosInstance, axios) { 'use strict';
6
6
 
7
7
  var React__default = 'default' in React ? React['default'] : React;
8
8
  AnimateHeight = AnimateHeight && Object.prototype.hasOwnProperty.call(AnimateHeight, 'default') ? AnimateHeight['default'] : AnimateHeight;
@@ -15,6 +15,7 @@
15
15
  raf = raf && Object.prototype.hasOwnProperty.call(raf, 'default') ? raf['default'] : raf;
16
16
  AutosizeInput = AutosizeInput && Object.prototype.hasOwnProperty.call(AutosizeInput, 'default') ? AutosizeInput['default'] : AutosizeInput;
17
17
  var Notifications__default = 'default' in Notifications ? Notifications['default'] : Notifications;
18
+ axiosInstance = axiosInstance && Object.prototype.hasOwnProperty.call(axiosInstance, 'default') ? axiosInstance['default'] : axiosInstance;
18
19
  axios = axios && Object.prototype.hasOwnProperty.call(axios, 'default') ? axios['default'] : axios;
19
20
 
20
21
  function ownKeys(object, enumerableOnly) {
@@ -43,6 +44,387 @@
43
44
  return target;
44
45
  }
45
46
 
47
+ function _regeneratorRuntime() {
48
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
49
+
50
+ _regeneratorRuntime = function () {
51
+ return exports;
52
+ };
53
+
54
+ var exports = {},
55
+ Op = Object.prototype,
56
+ hasOwn = Op.hasOwnProperty,
57
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
58
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
59
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
60
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
61
+
62
+ function define(obj, key, value) {
63
+ return Object.defineProperty(obj, key, {
64
+ value: value,
65
+ enumerable: !0,
66
+ configurable: !0,
67
+ writable: !0
68
+ }), obj[key];
69
+ }
70
+
71
+ try {
72
+ define({}, "");
73
+ } catch (err) {
74
+ define = function (obj, key, value) {
75
+ return obj[key] = value;
76
+ };
77
+ }
78
+
79
+ function wrap(innerFn, outerFn, self, tryLocsList) {
80
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
81
+ generator = Object.create(protoGenerator.prototype),
82
+ context = new Context(tryLocsList || []);
83
+ return generator._invoke = function (innerFn, self, context) {
84
+ var state = "suspendedStart";
85
+ return function (method, arg) {
86
+ if ("executing" === state) throw new Error("Generator is already running");
87
+
88
+ if ("completed" === state) {
89
+ if ("throw" === method) throw arg;
90
+ return doneResult();
91
+ }
92
+
93
+ for (context.method = method, context.arg = arg;;) {
94
+ var delegate = context.delegate;
95
+
96
+ if (delegate) {
97
+ var delegateResult = maybeInvokeDelegate(delegate, context);
98
+
99
+ if (delegateResult) {
100
+ if (delegateResult === ContinueSentinel) continue;
101
+ return delegateResult;
102
+ }
103
+ }
104
+
105
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
106
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
107
+ context.dispatchException(context.arg);
108
+ } else "return" === context.method && context.abrupt("return", context.arg);
109
+ state = "executing";
110
+ var record = tryCatch(innerFn, self, context);
111
+
112
+ if ("normal" === record.type) {
113
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
114
+ return {
115
+ value: record.arg,
116
+ done: context.done
117
+ };
118
+ }
119
+
120
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
121
+ }
122
+ };
123
+ }(innerFn, self, context), generator;
124
+ }
125
+
126
+ function tryCatch(fn, obj, arg) {
127
+ try {
128
+ return {
129
+ type: "normal",
130
+ arg: fn.call(obj, arg)
131
+ };
132
+ } catch (err) {
133
+ return {
134
+ type: "throw",
135
+ arg: err
136
+ };
137
+ }
138
+ }
139
+
140
+ exports.wrap = wrap;
141
+ var ContinueSentinel = {};
142
+
143
+ function Generator() {}
144
+
145
+ function GeneratorFunction() {}
146
+
147
+ function GeneratorFunctionPrototype() {}
148
+
149
+ var IteratorPrototype = {};
150
+ define(IteratorPrototype, iteratorSymbol, function () {
151
+ return this;
152
+ });
153
+ var getProto = Object.getPrototypeOf,
154
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
155
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
156
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
157
+
158
+ function defineIteratorMethods(prototype) {
159
+ ["next", "throw", "return"].forEach(function (method) {
160
+ define(prototype, method, function (arg) {
161
+ return this._invoke(method, arg);
162
+ });
163
+ });
164
+ }
165
+
166
+ function AsyncIterator(generator, PromiseImpl) {
167
+ function invoke(method, arg, resolve, reject) {
168
+ var record = tryCatch(generator[method], generator, arg);
169
+
170
+ if ("throw" !== record.type) {
171
+ var result = record.arg,
172
+ value = result.value;
173
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
174
+ invoke("next", value, resolve, reject);
175
+ }, function (err) {
176
+ invoke("throw", err, resolve, reject);
177
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
178
+ result.value = unwrapped, resolve(result);
179
+ }, function (error) {
180
+ return invoke("throw", error, resolve, reject);
181
+ });
182
+ }
183
+
184
+ reject(record.arg);
185
+ }
186
+
187
+ var previousPromise;
188
+
189
+ this._invoke = function (method, arg) {
190
+ function callInvokeWithMethodAndArg() {
191
+ return new PromiseImpl(function (resolve, reject) {
192
+ invoke(method, arg, resolve, reject);
193
+ });
194
+ }
195
+
196
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
197
+ };
198
+ }
199
+
200
+ function maybeInvokeDelegate(delegate, context) {
201
+ var method = delegate.iterator[context.method];
202
+
203
+ if (undefined === method) {
204
+ if (context.delegate = null, "throw" === context.method) {
205
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
206
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
207
+ }
208
+
209
+ return ContinueSentinel;
210
+ }
211
+
212
+ var record = tryCatch(method, delegate.iterator, context.arg);
213
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
214
+ var info = record.arg;
215
+ 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);
216
+ }
217
+
218
+ function pushTryEntry(locs) {
219
+ var entry = {
220
+ tryLoc: locs[0]
221
+ };
222
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
223
+ }
224
+
225
+ function resetTryEntry(entry) {
226
+ var record = entry.completion || {};
227
+ record.type = "normal", delete record.arg, entry.completion = record;
228
+ }
229
+
230
+ function Context(tryLocsList) {
231
+ this.tryEntries = [{
232
+ tryLoc: "root"
233
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
234
+ }
235
+
236
+ function values(iterable) {
237
+ if (iterable) {
238
+ var iteratorMethod = iterable[iteratorSymbol];
239
+ if (iteratorMethod) return iteratorMethod.call(iterable);
240
+ if ("function" == typeof iterable.next) return iterable;
241
+
242
+ if (!isNaN(iterable.length)) {
243
+ var i = -1,
244
+ next = function next() {
245
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
246
+
247
+ return next.value = undefined, next.done = !0, next;
248
+ };
249
+
250
+ return next.next = next;
251
+ }
252
+ }
253
+
254
+ return {
255
+ next: doneResult
256
+ };
257
+ }
258
+
259
+ function doneResult() {
260
+ return {
261
+ value: undefined,
262
+ done: !0
263
+ };
264
+ }
265
+
266
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
267
+ var ctor = "function" == typeof genFun && genFun.constructor;
268
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
269
+ }, exports.mark = function (genFun) {
270
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
271
+ }, exports.awrap = function (arg) {
272
+ return {
273
+ __await: arg
274
+ };
275
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
276
+ return this;
277
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
278
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
279
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
280
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
281
+ return result.done ? result.value : iter.next();
282
+ });
283
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
284
+ return this;
285
+ }), define(Gp, "toString", function () {
286
+ return "[object Generator]";
287
+ }), exports.keys = function (object) {
288
+ var keys = [];
289
+
290
+ for (var key in object) keys.push(key);
291
+
292
+ return keys.reverse(), function next() {
293
+ for (; keys.length;) {
294
+ var key = keys.pop();
295
+ if (key in object) return next.value = key, next.done = !1, next;
296
+ }
297
+
298
+ return next.done = !0, next;
299
+ };
300
+ }, exports.values = values, Context.prototype = {
301
+ constructor: Context,
302
+ reset: function (skipTempReset) {
303
+ 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);
304
+ },
305
+ stop: function () {
306
+ this.done = !0;
307
+ var rootRecord = this.tryEntries[0].completion;
308
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
309
+ return this.rval;
310
+ },
311
+ dispatchException: function (exception) {
312
+ if (this.done) throw exception;
313
+ var context = this;
314
+
315
+ function handle(loc, caught) {
316
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
317
+ }
318
+
319
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
320
+ var entry = this.tryEntries[i],
321
+ record = entry.completion;
322
+ if ("root" === entry.tryLoc) return handle("end");
323
+
324
+ if (entry.tryLoc <= this.prev) {
325
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
326
+ hasFinally = hasOwn.call(entry, "finallyLoc");
327
+
328
+ if (hasCatch && hasFinally) {
329
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
330
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
331
+ } else if (hasCatch) {
332
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
333
+ } else {
334
+ if (!hasFinally) throw new Error("try statement without catch or finally");
335
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
336
+ }
337
+ }
338
+ }
339
+ },
340
+ abrupt: function (type, arg) {
341
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
342
+ var entry = this.tryEntries[i];
343
+
344
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
345
+ var finallyEntry = entry;
346
+ break;
347
+ }
348
+ }
349
+
350
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
351
+ var record = finallyEntry ? finallyEntry.completion : {};
352
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
353
+ },
354
+ complete: function (record, afterLoc) {
355
+ if ("throw" === record.type) throw record.arg;
356
+ 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;
357
+ },
358
+ finish: function (finallyLoc) {
359
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
360
+ var entry = this.tryEntries[i];
361
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
362
+ }
363
+ },
364
+ catch: function (tryLoc) {
365
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
366
+ var entry = this.tryEntries[i];
367
+
368
+ if (entry.tryLoc === tryLoc) {
369
+ var record = entry.completion;
370
+
371
+ if ("throw" === record.type) {
372
+ var thrown = record.arg;
373
+ resetTryEntry(entry);
374
+ }
375
+
376
+ return thrown;
377
+ }
378
+ }
379
+
380
+ throw new Error("illegal catch attempt");
381
+ },
382
+ delegateYield: function (iterable, resultName, nextLoc) {
383
+ return this.delegate = {
384
+ iterator: values(iterable),
385
+ resultName: resultName,
386
+ nextLoc: nextLoc
387
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
388
+ }
389
+ }, exports;
390
+ }
391
+
392
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
393
+ try {
394
+ var info = gen[key](arg);
395
+ var value = info.value;
396
+ } catch (error) {
397
+ reject(error);
398
+ return;
399
+ }
400
+
401
+ if (info.done) {
402
+ resolve(value);
403
+ } else {
404
+ Promise.resolve(value).then(_next, _throw);
405
+ }
406
+ }
407
+
408
+ function _asyncToGenerator(fn) {
409
+ return function () {
410
+ var self = this,
411
+ args = arguments;
412
+ return new Promise(function (resolve, reject) {
413
+ var gen = fn.apply(self, args);
414
+
415
+ function _next(value) {
416
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
417
+ }
418
+
419
+ function _throw(err) {
420
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
421
+ }
422
+
423
+ _next(undefined);
424
+ });
425
+ };
426
+ }
427
+
46
428
  function _classCallCheck(instance, Constructor) {
47
429
  if (!(instance instanceof Constructor)) {
48
430
  throw new TypeError("Cannot call a class as a function");
@@ -10666,25 +11048,39 @@
10666
11048
  };
10667
11049
  var GenderSelector$1 = themed(GenderSelector);
10668
11050
 
10669
- var Add = (function (props) {
10670
- return /*#__PURE__*/React__default.createElement("svg", _extends({
10671
- width: "23",
10672
- height: "23",
10673
- viewBox: "0 0 23 23",
10674
- fill: "none",
10675
- xmlns: "http://www.w3.org/2000/svg"
10676
- }, props), /*#__PURE__*/React__default.createElement("path", {
10677
- d: "M0 11.5H23",
10678
- stroke: "#000000",
10679
- strokeWidth: "1.8"
10680
- }), /*#__PURE__*/React__default.createElement("path", {
10681
- d: "M11.5 0L11.5 23",
10682
- stroke: "#000000",
10683
- strokeWidth: "1.8"
10684
- }));
10685
- });
11051
+ var ConditionSelector = function ConditionSelector(_ref) {
11052
+ var onChange = _ref.onChange,
11053
+ graphApi = _ref.graphApi,
11054
+ itemRenderer = _ref.itemRenderer,
11055
+ getGraphQuery = _ref.getGraphQuery,
11056
+ requestInstance = _ref.requestInstance;
11057
+
11058
+ var resultProcessor = function resultProcessor(result) {
11059
+ return result.data.data.conditions_list;
11060
+ };
11061
+
11062
+ return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
11063
+ title: "Condition",
11064
+ queryId: "getCondition",
11065
+ baseQueryLimit: 10,
11066
+ baseClass: "style-selector",
11067
+ identifier: "style-selector",
11068
+ searchPlaceHolder: "Search Condition",
11069
+ category: "",
11070
+ onChange: onChange,
11071
+ graphApi: graphApi,
11072
+ itemRenderer: itemRenderer,
11073
+ getGraphQuery: getGraphQuery,
11074
+ resultProcessor: resultProcessor,
11075
+ requestInstance: requestInstance
11076
+ });
11077
+ };
11078
+
11079
+ ConditionSelector.defaultProps = {
11080
+ itemRenderer: ItemRenderer
11081
+ };
10686
11082
 
10687
- var _templateObject$L, _templateObject2$9, _templateObject3$4, _templateObject4$3, _templateObject5$1;
11083
+ var _templateObject$L, _templateObject2$9, _templateObject3$4;
10688
11084
  var UNISEX$1 = genders.UNISEX;
10689
11085
  var AddInterestContainer = styled__default.div(_templateObject$L || (_templateObject$L = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n border: 1px solid ", ";\n padding: ", ";\n"])), function (props) {
10690
11086
  return props.theme.marginPaddings[6];
@@ -10705,26 +11101,6 @@
10705
11101
  }, function (props) {
10706
11102
  return props.theme.marginPaddings[2];
10707
11103
  });
10708
- var AddInterestButton = styled__default.div(_templateObject4$3 || (_templateObject4$3 = _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) {
10709
- return props.theme.colors.darkerGray;
10710
- }, function (props) {
10711
- return props.theme.colors.borderColor;
10712
- }, function (props) {
10713
- return props.theme.marginPaddings[0];
10714
- }, function (props) {
10715
- return props.theme.marginPaddings[2];
10716
- });
10717
- var AddInterestButtonContainer = styled__default.div(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral(["\n display: flex;\n\n #add-icon {\n margin-bottom: 1.5rem;\n\n svg {\n width: 15px;\n }\n }\n"])));
10718
-
10719
- var AddIcon = function AddIcon(_ref) {
10720
- var onClick = _ref.onClick,
10721
- id = _ref.id;
10722
- return /*#__PURE__*/React__default.createElement(IconWrapper, {
10723
- id: id,
10724
- onClick: onClick
10725
- }, /*#__PURE__*/React__default.createElement(SvgWrapper, null, /*#__PURE__*/React__default.createElement(Add, null)));
10726
- };
10727
-
10728
11104
  var defaultState = {
10729
11105
  category_type: null,
10730
11106
  brands: [],
@@ -10734,6 +11110,7 @@
10734
11110
  max_price: null,
10735
11111
  styles: [],
10736
11112
  gender: [],
11113
+ condition: [],
10737
11114
  request: _objectSpread2({}, request),
10738
11115
  isCategoriesShown: false
10739
11116
  };
@@ -10810,6 +11187,14 @@
10810
11187
  });
10811
11188
  });
10812
11189
 
11190
+ _defineProperty(_assertThisInitialized(_this), "onConditionChanged", function (conditions) {
11191
+ _this.setState({
11192
+ condition: conditions.map(function (condition) {
11193
+ return condition.id;
11194
+ })
11195
+ });
11196
+ });
11197
+
10813
11198
  _defineProperty(_assertThisInitialized(_this), "payloadIsValid", function () {
10814
11199
  // price/shoe-size always have initial values as soon as category is set
10815
11200
  var category_type = _this.state.category_type;
@@ -10833,7 +11218,8 @@
10833
11218
  styles = _this$state.styles,
10834
11219
  category_type = _this$state.category_type,
10835
11220
  requestState = _this$state.request,
10836
- gender = _this$state.gender;
11221
+ gender = _this$state.gender,
11222
+ condition = _this$state.condition;
10837
11223
  var payloadGender = gender[0];
10838
11224
 
10839
11225
  if (gender.length > 1 || !gender.length) {
@@ -10846,6 +11232,7 @@
10846
11232
  min_price: min_price,
10847
11233
  max_price: max_price,
10848
11234
  styles: styles,
11235
+ condition: condition,
10849
11236
  gender: payloadGender,
10850
11237
  request: requestState
10851
11238
  };
@@ -10868,8 +11255,8 @@
10868
11255
  }, _this.handleRequestError);
10869
11256
  });
10870
11257
 
10871
- _defineProperty(_assertThisInitialized(_this), "handleRequestError", function (_ref2) {
10872
- var data = _ref2.data;
11258
+ _defineProperty(_assertThisInitialized(_this), "handleRequestError", function (_ref) {
11259
+ var data = _ref.data;
10873
11260
 
10874
11261
  _this.setState({
10875
11262
  request: _objectSpread2({}, request)
@@ -10887,6 +11274,8 @@
10887
11274
 
10888
11275
  _defineProperty(_assertThisInitialized(_this), "resetState", function () {
10889
11276
  _this.setState(_objectSpread2({}, defaultState));
11277
+
11278
+ _this.props.onCancel();
10890
11279
  });
10891
11280
 
10892
11281
  _defineProperty(_assertThisInitialized(_this), "handleGenderChange", function (isChecked, gender) {
@@ -10911,12 +11300,11 @@
10911
11300
  getBrandsGraphQuery = _this$props.getBrandsGraphQuery,
10912
11301
  getStylesGraphQuery = _this$props.getStylesGraphQuery,
10913
11302
  getShoesGraphQuery = _this$props.getShoesGraphQuery,
10914
- defaultShoeSizeType = _this$props.defaultShoeSizeType;
10915
- return /*#__PURE__*/React__default.createElement(React.Fragment, null, !_this.state.isCategoriesShown && /*#__PURE__*/React__default.createElement(AddInterestButtonContainer, {
10916
- onClick: _this.onAddInterestClick
10917
- }, /*#__PURE__*/React__default.createElement(AddInterestButton, null, "Add Interest"), /*#__PURE__*/React__default.createElement(AddIcon, {
10918
- id: "add-icon"
10919
- })), _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, {
11303
+ defaultShoeSizeType = _this$props.defaultShoeSizeType,
11304
+ getConditionsGraphQuery = _this$props.getConditionsGraphQuery;
11305
+ return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
11306
+ className: "interests__section-wrapper"
11307
+ }, /*#__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, {
10920
11308
  category: category_type,
10921
11309
  onCategoryChange: _this.onCategoryChanged
10922
11310
  }), category_type ? /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GenderSelector$1, {
@@ -10942,6 +11330,11 @@
10942
11330
  requestInstance: requestInstance,
10943
11331
  graphApi: "".concat(baseGraphApi, "?id=getStyles"),
10944
11332
  getGraphQuery: getStylesGraphQuery
11333
+ }), /*#__PURE__*/React__default.createElement(ConditionSelector, {
11334
+ onChange: _this.onConditionChanged,
11335
+ requestInstance: requestInstance,
11336
+ graphApi: "".concat(baseGraphApi, "?id=getCondition"),
11337
+ getGraphQuery: getConditionsGraphQuery
10945
11338
  })) : null, /*#__PURE__*/React__default.createElement(SaveAndCancelButtonContainer, null, /*#__PURE__*/React__default.createElement("div", {
10946
11339
  className: "fl-right"
10947
11340
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10962,7 +11355,7 @@
10962
11355
 
10963
11356
  _this.resetState();
10964
11357
  }
10965
- }, fetching ? 'SAVING' : 'SAVE')))))));
11358
+ }, fetching ? 'SAVING' : 'SAVE'))))))));
10966
11359
  });
10967
11360
 
10968
11361
  _this.state = _objectSpread2({}, defaultState);
@@ -10984,7 +11377,9 @@
10984
11377
  }, media.xs);
10985
11378
 
10986
11379
  var MyInterestTitleHeading = function MyInterestTitleHeading() {
10987
- return /*#__PURE__*/React__default.createElement(MyInterestTitleHeadingContainer, null, /*#__PURE__*/React__default.createElement("div", {
11380
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
11381
+ className: "interests__title"
11382
+ }, "Category Interests"), /*#__PURE__*/React__default.createElement(MyInterestTitleHeadingContainer, null, /*#__PURE__*/React__default.createElement("div", {
10988
11383
  className: "heading-title-section"
10989
11384
  }, /*#__PURE__*/React__default.createElement("div", {
10990
11385
  className: "heading-title"
@@ -11000,39 +11395,678 @@
11000
11395
  className: "heading-title"
11001
11396
  }, "Shoe Size")), /*#__PURE__*/React__default.createElement("div", {
11002
11397
  className: "heading-title-empty"
11003
- }));
11398
+ })));
11004
11399
  };
11005
11400
 
11006
11401
  var MyInterestTitleHeading$1 = themed(MyInterestTitleHeading);
11007
11402
 
11008
11403
  var _templateObject$N;
11009
- var SvgWrapper$2 = styled__default.span(_templateObject$N || (_templateObject$N = _taggedTemplateLiteral(["\n svg {\n path {\n fill: ", ";\n }\n }\n"])), function (props) {
11404
+ var MyInterestTitleHeadingContainer$1 = styled__default.div(_templateObject$N || (_templateObject$N = _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) {
11010
11405
  return props.theme.colors.primary;
11011
- });
11012
- var AccountIcon = themed(function () {
11013
- return /*#__PURE__*/React__default.createElement(SvgWrapper$2, null, /*#__PURE__*/React__default.createElement(Account, null));
11014
- });
11406
+ }, function (props) {
11407
+ return props.theme.marginPaddings[1];
11408
+ }, media.xs);
11015
11409
 
11016
- /**
11017
- * Page/View that controls the viewing and Adding of Luxity Interests
11018
- */
11019
- var Interests = /*#__PURE__*/function (_React$Component) {
11020
- _inherits(Interests, _React$Component);
11410
+ var MyProductInterestTitleHeading = function MyProductInterestTitleHeading() {
11411
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
11412
+ className: "interests__title"
11413
+ }, "Product Interests"), /*#__PURE__*/React__default.createElement(MyInterestTitleHeadingContainer$1, null, /*#__PURE__*/React__default.createElement("div", {
11414
+ className: "heading-title-section"
11415
+ }, /*#__PURE__*/React__default.createElement("div", {
11416
+ className: "heading-title"
11417
+ }, "Brand"), /*#__PURE__*/React__default.createElement("div", {
11418
+ className: "heading-title"
11419
+ }, "Model"), /*#__PURE__*/React__default.createElement("div", {
11420
+ className: "heading-title"
11421
+ }, "Material")), /*#__PURE__*/React__default.createElement("div", {
11422
+ className: "heading-title-empty"
11423
+ })));
11424
+ };
11021
11425
 
11022
- var _super = _createSuper(Interests);
11426
+ var MyProductInterestTitleHeading$1 = themed(MyProductInterestTitleHeading);
11023
11427
 
11024
- function Interests(props) {
11025
- var _this;
11428
+ var Add = (function (props) {
11429
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
11430
+ width: "23",
11431
+ height: "23",
11432
+ viewBox: "0 0 23 23",
11433
+ fill: "none",
11434
+ xmlns: "http://www.w3.org/2000/svg"
11435
+ }, props), /*#__PURE__*/React__default.createElement("path", {
11436
+ d: "M0 11.5H23",
11437
+ stroke: "#000000",
11438
+ strokeWidth: "1.8"
11439
+ }), /*#__PURE__*/React__default.createElement("path", {
11440
+ d: "M11.5 0L11.5 23",
11441
+ stroke: "#000000",
11442
+ strokeWidth: "1.8"
11443
+ }));
11444
+ });
11026
11445
 
11027
- _classCallCheck(this, Interests);
11446
+ var _excluded$8 = ["children"];
11028
11447
 
11029
- _this = _super.call(this, props);
11448
+ var DropdownSelector = function DropdownSelector(_ref) {
11449
+ var selectedOption = _ref.selectedOption,
11450
+ onOptionChange = _ref.onOptionChange,
11451
+ options = _ref.options,
11452
+ isSearchable = _ref.isSearchable,
11453
+ placeholder = _ref.placeholder,
11454
+ name = _ref.name,
11455
+ showSearchIcon = _ref.showSearchIcon,
11456
+ isDisabled = _ref.isDisabled;
11457
+ var customComponents = {
11458
+ DropdownIndicator: function DropdownIndicator() {
11459
+ return null;
11460
+ },
11461
+ ValueContainer: function ValueContainer(_ref2) {
11462
+ var children = _ref2.children,
11463
+ props = _objectWithoutProperties(_ref2, _excluded$8);
11464
+
11465
+ return /*#__PURE__*/React__default.createElement("div", _extends({
11466
+ style: {
11467
+ position: 'relative'
11468
+ }
11469
+ }, props), showSearchIcon && /*#__PURE__*/React__default.createElement("div", {
11470
+ style: {
11471
+ position: 'absolute',
11472
+ left: '12px',
11473
+ top: '50%',
11474
+ transform: 'translateY(-50%)',
11475
+ pointerEvents: 'none'
11476
+ }
11477
+ }, /*#__PURE__*/React__default.createElement(Search, null)), /*#__PURE__*/React__default.createElement("div", {
11478
+ style: {
11479
+ marginLeft: showSearchIcon ? '32px' : '12px'
11480
+ }
11481
+ }, children));
11482
+ }
11483
+ };
11484
+ var customStyles = {
11485
+ control: function control(provided) {
11486
+ return _objectSpread2(_objectSpread2({}, provided), {}, {
11487
+ minWidth: '200px',
11488
+ width: '100%',
11489
+ boxShadow: 'none',
11490
+ border: '1px solid #ccc'
11491
+ });
11492
+ },
11493
+ valueContainer: function valueContainer(provided) {
11494
+ return _objectSpread2(_objectSpread2({}, provided), {}, {
11495
+ padding: '8px 12px'
11496
+ });
11497
+ },
11498
+ dropdownIndicator: function dropdownIndicator() {
11499
+ return {
11500
+ display: 'none'
11501
+ };
11502
+ },
11503
+ placeholder: function placeholder(provided) {
11504
+ return _objectSpread2(_objectSpread2({}, provided), {}, {
11505
+ fontWeight: 'bold',
11506
+ fontSize: '14px',
11507
+ paddingTop: '4px',
11508
+ color: '#999',
11509
+ minWidth: '200px'
11510
+ });
11511
+ },
11512
+ input: function input(provided) {
11513
+ return _objectSpread2(_objectSpread2({}, provided), {}, {
11514
+ margin: '0',
11515
+ padding: '0',
11516
+ fontWeight: 'bold',
11517
+ fontSize: '14px',
11518
+ minWidth: '200px',
11519
+ maxWidth: '100%'
11520
+ });
11521
+ },
11522
+ singleValue: function singleValue(provided) {
11523
+ return _objectSpread2(_objectSpread2({}, provided), {}, {
11524
+ fontWeight: 'bold',
11525
+ fontSize: '14px',
11526
+ whiteSpace: 'normal',
11527
+ overflow: 'visible',
11528
+ textOverflow: 'unset',
11529
+ maxWidth: 'none'
11530
+ });
11531
+ },
11532
+ indicatorSeparator: function indicatorSeparator() {
11533
+ return {
11534
+ display: 'none'
11535
+ };
11536
+ },
11537
+ menu: function menu(provided) {
11538
+ return _objectSpread2(_objectSpread2({}, provided), {}, {
11539
+ zIndex: 9999,
11540
+ backgroundColor: 'white'
11541
+ });
11542
+ },
11543
+ menuList: function menuList(provided) {
11544
+ return _objectSpread2(_objectSpread2({}, provided), {}, {
11545
+ padding: '0',
11546
+ '::-webkit-scrollbar': {
11547
+ width: '8px'
11548
+ },
11549
+ '::-webkit-scrollbar-track': {
11550
+ background: '#f1f1f1'
11551
+ },
11552
+ '::-webkit-scrollbar-thumb': {
11553
+ background: '#888',
11554
+ borderRadius: '4px'
11555
+ },
11556
+ '::-webkit-scrollbar-thumb:hover': {
11557
+ background: '#555'
11558
+ }
11559
+ });
11560
+ },
11561
+ option: function option(provided, state) {
11562
+ return _objectSpread2(_objectSpread2({}, provided), {}, {
11563
+ color: state.isFocused ? 'white' : 'black',
11564
+ backgroundColor: state.isFocused || state.isSelected ? 'black' : 'white',
11565
+ cursor: 'pointer',
11566
+ padding: '8px 12px',
11567
+ '&:active': {
11568
+ backgroundColor: 'black'
11569
+ }
11570
+ }, state.isSelected && {
11571
+ backgroundColor: 'black',
11572
+ color: 'white'
11573
+ });
11574
+ }
11575
+ };
11576
+ return /*#__PURE__*/React__default.createElement("div", {
11577
+ style: {
11578
+ width: '100%'
11579
+ }
11580
+ }, /*#__PURE__*/React__default.createElement(index$1$1, {
11581
+ value: selectedOption,
11582
+ onChange: onOptionChange,
11583
+ options: options,
11584
+ isSearchable: isSearchable,
11585
+ name: name,
11586
+ placeholder: placeholder,
11587
+ components: customComponents,
11588
+ styles: customStyles,
11589
+ isDisabled: isDisabled
11590
+ }));
11591
+ };
11592
+
11593
+ DropdownSelector.defaultProps = {
11594
+ isSearchable: false,
11595
+ selectedOption: null,
11596
+ name: '',
11597
+ placeholder: '',
11598
+ showSearchIcon: true,
11599
+ isDisabled: false
11600
+ };
11601
+
11602
+ var _templateObject$O, _templateObject2$a;
11603
+ var AddInterestContainer$1 = styled__default.div(_templateObject$O || (_templateObject$O = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n border: 1px solid ", ";\n padding: ", ";\n"])), function (props) {
11604
+ return props.theme.marginPaddings[6];
11605
+ }, function (props) {
11606
+ return props.theme.colors.borderColor;
11607
+ }, function (props) {
11608
+ return props.theme.marginPaddings[6];
11609
+ });
11610
+ var SaveAndCancelButtonContainer$1 = styled__default.div(_templateObject2$a || (_templateObject2$a = _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) {
11611
+ return props.theme.marginPaddings[6];
11612
+ }, media.xs, function (props) {
11613
+ return props.theme.marginPaddings[0];
11614
+ }, function (props) {
11615
+ return props.theme.marginPaddings[1];
11616
+ });
11617
+
11618
+ var AddProductInterest = function AddProductInterest(_ref) {
11619
+ var baseGraphApi = _ref.baseGraphApi,
11620
+ getBrandsGraphQuery = _ref.getBrandsGraphQuery,
11621
+ getModelsGraphQuery = _ref.getModelsGraphQuery,
11622
+ getMaterialsGraphQuery = _ref.getMaterialsGraphQuery,
11623
+ onCancel = _ref.onCancel,
11624
+ requestInstance = _ref.requestInstance,
11625
+ addLuxityProductInterestApi = _ref.addLuxityProductInterestApi,
11626
+ onSubmitSuccess = _ref.onSubmitSuccess;
11627
+
11628
+ var _useState = React.useState([]),
11629
+ _useState2 = _slicedToArray(_useState, 2),
11630
+ brands = _useState2[0],
11631
+ setBrands = _useState2[1];
11632
+
11633
+ var _useState3 = React.useState([]),
11634
+ _useState4 = _slicedToArray(_useState3, 2),
11635
+ models = _useState4[0],
11636
+ setModels = _useState4[1];
11637
+
11638
+ var _useState5 = React.useState([]),
11639
+ _useState6 = _slicedToArray(_useState5, 2),
11640
+ materials = _useState6[0],
11641
+ setMaterials = _useState6[1];
11642
+
11643
+ var _useState7 = React.useState(null),
11644
+ _useState8 = _slicedToArray(_useState7, 2),
11645
+ selectedBrand = _useState8[0],
11646
+ setSelectedBrand = _useState8[1];
11647
+
11648
+ var _useState9 = React.useState(null),
11649
+ _useState10 = _slicedToArray(_useState9, 2),
11650
+ selectedModel = _useState10[0],
11651
+ setSelectedModel = _useState10[1];
11652
+
11653
+ var _useState11 = React.useState(null),
11654
+ _useState12 = _slicedToArray(_useState11, 2),
11655
+ selectedMaterial = _useState12[0],
11656
+ setSelectedMaterial = _useState12[1];
11657
+
11658
+ var fetchBrands = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11659
+ var _response$data, _response$data$data, _response$data$data$l, response, formattedBrands;
11660
+
11661
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11662
+ while (1) {
11663
+ switch (_context.prev = _context.next) {
11664
+ case 0:
11665
+ _context.prev = 0;
11666
+ _context.next = 3;
11667
+ return axiosInstance.post("".concat(baseGraphApi, "?id=getBrands"), {
11668
+ query: getBrandsGraphQuery(1000, 1, 'id|desc')
11669
+ });
11670
+
11671
+ case 3:
11672
+ response = _context.sent;
11673
+
11674
+ 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) {
11675
+ formattedBrands = response.data.data.luxity_brands.data.map(function (brand) {
11676
+ return {
11677
+ value: brand.id,
11678
+ label: brand.name
11679
+ };
11680
+ });
11681
+ setBrands(formattedBrands);
11682
+ }
11683
+
11684
+ _context.next = 10;
11685
+ break;
11686
+
11687
+ case 7:
11688
+ _context.prev = 7;
11689
+ _context.t0 = _context["catch"](0);
11690
+ error(_context.t0.message);
11691
+
11692
+ case 10:
11693
+ case "end":
11694
+ return _context.stop();
11695
+ }
11696
+ }
11697
+ }, _callee, null, [[0, 7]]);
11698
+ })), [baseGraphApi, getBrandsGraphQuery]);
11699
+ var fetchModels = React.useCallback( /*#__PURE__*/function () {
11700
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(brandId) {
11701
+ var _response$data2, _response$data2$data, _response$data2$data$, response, formattedModels;
11702
+
11703
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11704
+ while (1) {
11705
+ switch (_context2.prev = _context2.next) {
11706
+ case 0:
11707
+ _context2.prev = 0;
11708
+ _context2.next = 3;
11709
+ return axiosInstance.post("".concat(baseGraphApi, "?id=getModels"), {
11710
+ query: getModelsGraphQuery(brandId)
11711
+ });
11712
+
11713
+ case 3:
11714
+ response = _context2.sent;
11715
+
11716
+ 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) {
11717
+ formattedModels = response.data.data.luxity_models.data.map(function (model) {
11718
+ return {
11719
+ value: model.id,
11720
+ label: model.name
11721
+ };
11722
+ });
11723
+ setModels(formattedModels);
11724
+ }
11725
+
11726
+ _context2.next = 10;
11727
+ break;
11728
+
11729
+ case 7:
11730
+ _context2.prev = 7;
11731
+ _context2.t0 = _context2["catch"](0);
11732
+ error(_context2.t0.message);
11733
+
11734
+ case 10:
11735
+ case "end":
11736
+ return _context2.stop();
11737
+ }
11738
+ }
11739
+ }, _callee2, null, [[0, 7]]);
11740
+ }));
11741
+
11742
+ return function (_x) {
11743
+ return _ref3.apply(this, arguments);
11744
+ };
11745
+ }(), [baseGraphApi, getModelsGraphQuery]);
11746
+ var fetchMaterials = React.useCallback( /*#__PURE__*/function () {
11747
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(brandId) {
11748
+ var _response$data3, _response$data3$data, _response$data3$data$, response, formattedMaterials;
11749
+
11750
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11751
+ while (1) {
11752
+ switch (_context3.prev = _context3.next) {
11753
+ case 0:
11754
+ _context3.prev = 0;
11755
+ _context3.next = 3;
11756
+ return axiosInstance.post("".concat(baseGraphApi, "?id=getMaterials"), {
11757
+ query: getMaterialsGraphQuery(brandId)
11758
+ });
11759
+
11760
+ case 3:
11761
+ response = _context3.sent;
11762
+
11763
+ 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) {
11764
+ formattedMaterials = response.data.data.luxity_materials.data.map(function (material) {
11765
+ return {
11766
+ value: material.id,
11767
+ label: material.name
11768
+ };
11769
+ });
11770
+ setMaterials(formattedMaterials);
11771
+ }
11772
+
11773
+ _context3.next = 10;
11774
+ break;
11775
+
11776
+ case 7:
11777
+ _context3.prev = 7;
11778
+ _context3.t0 = _context3["catch"](0);
11779
+ error(_context3.t0.message);
11780
+
11781
+ case 10:
11782
+ case "end":
11783
+ return _context3.stop();
11784
+ }
11785
+ }
11786
+ }, _callee3, null, [[0, 7]]);
11787
+ }));
11788
+
11789
+ return function (_x2) {
11790
+ return _ref4.apply(this, arguments);
11791
+ };
11792
+ }(), [baseGraphApi, getMaterialsGraphQuery]);
11793
+ React.useEffect(function () {
11794
+ fetchBrands();
11795
+ }, [fetchBrands]);
11796
+ React.useEffect(function () {
11797
+ if (selectedBrand) {
11798
+ setSelectedModel(null);
11799
+ setSelectedMaterial(null);
11800
+ fetchModels(selectedBrand.value);
11801
+ fetchMaterials(selectedBrand.value);
11802
+ } else {
11803
+ setModels([]);
11804
+ setMaterials([]);
11805
+ setSelectedModel(null);
11806
+ setSelectedMaterial(null);
11807
+ }
11808
+ }, [selectedBrand, fetchModels, fetchMaterials]);
11809
+
11810
+ var onBrandChange = function onBrandChange(selectedOption) {
11811
+ setSelectedBrand(selectedOption);
11812
+ };
11813
+
11814
+ var onModelChange = function onModelChange(selectedOption) {
11815
+ setSelectedModel(selectedOption);
11816
+ };
11817
+
11818
+ var onMaterialChange = function onMaterialChange(selectedOption) {
11819
+ setSelectedMaterial(selectedOption);
11820
+ };
11821
+
11822
+ var submitInterest = function submitInterest() {
11823
+ var payload = {
11824
+ luxity_brand_id: selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.value,
11825
+ luxity_model_id: selectedModel === null || selectedModel === void 0 ? void 0 : selectedModel.value,
11826
+ luxity_material_id: selectedMaterial === null || selectedMaterial === void 0 ? void 0 : selectedMaterial.value
11827
+ };
11828
+ simpleRequest(requestInstance, addLuxityProductInterestApi, method.POST, payload, function () {
11829
+ onSubmitSuccess(_objectSpread2({}, payload));
11830
+ onCancel();
11831
+ }, handleRequestError);
11832
+ };
11833
+
11834
+ var handleRequestError = function handleRequestError(_ref5) {
11835
+ var data = _ref5.data;
11836
+ var errorMessages = Object.keys(data).map(function (key) {
11837
+ return data[key];
11838
+ }).flat();
11839
+ error(errorMessages.map(function (message, key) {
11840
+ return /*#__PURE__*/React__default.createElement("div", {
11841
+ key: "error-".concat(key)
11842
+ }, message);
11843
+ }));
11844
+ };
11845
+
11846
+ var onReset = function onReset() {
11847
+ onCancel();
11848
+ setSelectedModel(null);
11849
+ setSelectedMaterial(null);
11850
+ setSelectedBrand(null);
11851
+ setBrands([]);
11852
+ setMaterials([]);
11853
+ setModels([]);
11854
+ };
11855
+
11856
+ return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
11857
+ className: "interests__section-wrapper"
11858
+ }, /*#__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", {
11859
+ className: "interests__select-option"
11860
+ }, /*#__PURE__*/React__default.createElement(DropdownSelector, {
11861
+ name: "brand",
11862
+ selectedOption: selectedBrand,
11863
+ options: brands,
11864
+ isSearchable: true,
11865
+ onOptionChange: onBrandChange,
11866
+ placeholder: "Select Brand"
11867
+ })), /*#__PURE__*/React__default.createElement("div", {
11868
+ className: "interests__select-option"
11869
+ }, /*#__PURE__*/React__default.createElement(DropdownSelector, {
11870
+ name: "model",
11871
+ selectedOption: selectedModel,
11872
+ options: models,
11873
+ isSearchable: true,
11874
+ onOptionChange: onModelChange,
11875
+ placeholder: "Select Model",
11876
+ isDisabled: !selectedBrand && !models.length
11877
+ })), /*#__PURE__*/React__default.createElement("div", {
11878
+ className: "interests__select-option"
11879
+ }, /*#__PURE__*/React__default.createElement(DropdownSelector, {
11880
+ name: "material",
11881
+ selectedOption: selectedMaterial,
11882
+ options: materials,
11883
+ isSearchable: true,
11884
+ onOptionChange: onMaterialChange,
11885
+ placeholder: "Select Material",
11886
+ isDisabled: !selectedBrand && !materials.length
11887
+ }))), /*#__PURE__*/React__default.createElement(SaveAndCancelButtonContainer$1, null, /*#__PURE__*/React__default.createElement("div", {
11888
+ className: "fl-right"
11889
+ }, /*#__PURE__*/React__default.createElement("div", {
11890
+ className: "fl-right__item"
11891
+ }, /*#__PURE__*/React__default.createElement(SecondaryButton$1, {
11892
+ type: "button",
11893
+ onClick: onReset
11894
+ }, "CANCEL")), /*#__PURE__*/React__default.createElement("div", {
11895
+ className: "fl-right__item"
11896
+ }, /*#__PURE__*/React__default.createElement(PrimaryButton$1, {
11897
+ "data-qe-id": "add-interest-btn",
11898
+ disabled: !selectedBrand,
11899
+ type: "button",
11900
+ onClick: submitInterest
11901
+ }, "SAVE"))))))));
11902
+ };
11903
+
11904
+ var AddProductInterest$1 = themed(AddProductInterest);
11905
+
11906
+ var _templateObject$P, _templateObject2$b, _templateObject3$5;
11907
+
11908
+ var TrashIcon$1 = function TrashIcon(_ref) {
11909
+ var onClick = _ref.onClick,
11910
+ id = _ref.id;
11911
+ return /*#__PURE__*/React__default.createElement(IconWrapper, {
11912
+ onClick: onClick,
11913
+ id: id
11914
+ }, /*#__PURE__*/React__default.createElement(SvgWrapper, null, /*#__PURE__*/React__default.createElement(Trash, null)));
11915
+ };
11916
+
11917
+ var LuxityProductInterestItem = /*#__PURE__*/function (_React$Component) {
11918
+ _inherits(LuxityProductInterestItem, _React$Component);
11919
+
11920
+ var _super = _createSuper(LuxityProductInterestItem);
11921
+
11922
+ function LuxityProductInterestItem(props) {
11923
+ var _this;
11924
+
11925
+ _classCallCheck(this, LuxityProductInterestItem);
11926
+
11927
+ _this = _super.call(this, props);
11928
+
11929
+ _defineProperty(_assertThisInitialized(_this), "deleteInterestItem", function () {
11930
+ var id = _this.props.data.id;
11931
+
11932
+ _this.setState({
11933
+ delete: _objectSpread2(_objectSpread2({}, request), {}, {
11934
+ fetching: true
11935
+ })
11936
+ });
11937
+
11938
+ var url = _this.props.deleteInterestApi(id);
11939
+
11940
+ simpleRequest(_this.props.requestInstance, url, method.DELETE, null, function () {
11941
+ _this.setState({
11942
+ delete: _objectSpread2(_objectSpread2({}, request), {}, {
11943
+ success: true
11944
+ })
11945
+ });
11946
+
11947
+ _this.props.onDeleted(_this.props.data);
11948
+ }, function () {
11949
+ return _this.setState({
11950
+ delete: _objectSpread2({}, request)
11951
+ });
11952
+ });
11953
+ });
11954
+
11955
+ _defineProperty(_assertThisInitialized(_this), "render", function () {
11956
+ var _data$luxity_model, _data$luxity_material;
11957
+
11958
+ var data = _this.props.data;
11959
+ var success = _this.state.delete.success;
11960
+ return /*#__PURE__*/React__default.createElement(InterestItemContainer$1, {
11961
+ id: "interests__item--".concat(data.id),
11962
+ className: "".concat(success && 'interests__item--hiding')
11963
+ }, /*#__PURE__*/React__default.createElement(InterestItemContent$1, {
11964
+ className: "interest-item__container ".concat(_this.props.className || '')
11965
+ }, /*#__PURE__*/React__default.createElement("div", {
11966
+ className: "interest-item__container_heading"
11967
+ }, /*#__PURE__*/React__default.createElement(InterestItemTitle$1, null, "Brand:"), /*#__PURE__*/React__default.createElement("div", {
11968
+ id: "interest-item-".concat(data.id, "__category"),
11969
+ className: "list-items"
11970
+ }, data.luxity_brand.name)), /*#__PURE__*/React__default.createElement("div", {
11971
+ className: "interest-item__container_heading"
11972
+ }, /*#__PURE__*/React__default.createElement(InterestItemTitle$1, null, "Model:"), /*#__PURE__*/React__default.createElement("div", {
11973
+ className: "list-items"
11974
+ }, 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", {
11975
+ className: "interest-item__container_heading"
11976
+ }, /*#__PURE__*/React__default.createElement(InterestItemTitle$1, null, "Material:"), /*#__PURE__*/React__default.createElement("div", {
11977
+ className: "list-items"
11978
+ }, 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, {
11979
+ id: "interest-".concat(data.id, "-delete-button"),
11980
+ onClick: function onClick() {
11981
+ if (!_this.state.delete.fetching) {
11982
+ _this.deleteInterestItem();
11983
+ }
11984
+ }
11985
+ }));
11986
+ });
11987
+
11988
+ _this.state = {
11989
+ delete: _objectSpread2({}, request)
11990
+ };
11991
+ return _this;
11992
+ }
11993
+
11994
+ return _createClass(LuxityProductInterestItem);
11995
+ }(React__default.Component);
11996
+
11997
+ var InterestItemTitle$1 = styled__default.div(_templateObject$P || (_templateObject$P = _taggedTemplateLiteral(["\n font-weight: bold;\n display: none;\n\n @media (max-width: ", ") {\n display: inline;\n }\n"])), media.xs);
11998
+ var InterestItemContainer$1 = styled__default.div(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteral(["\n display: flex;\n\n .no-shoe-size-section {\n @media (max-width: ", ") {\n display: none;\n }\n }\n"])), media.xs);
11999
+ var InterestItemContent$1 = styled__default.div(_templateObject3$5 || (_templateObject3$5 = _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) {
12000
+ return props.theme.colors.borderColor;
12001
+ }, function (props) {
12002
+ return props.theme.marginPaddings[1];
12003
+ }, function (props) {
12004
+ return props.theme.colors.darkerGray;
12005
+ }, media.xs, media.xs, function (props) {
12006
+ return props.theme.marginPaddings[0];
12007
+ }, media.xs);
12008
+ var ThemedInterestItem$1 = themed(LuxityProductInterestItem);
12009
+ /**
12010
+ * The Interest Item view shows the selected interest configuration,
12011
+ * and gives user control to delete it.
12012
+ */
12013
+
12014
+ var LuxityProductInterestItem$1 = (function (props) {
12015
+ return /*#__PURE__*/React__default.createElement(ThemedInterestItem$1, props);
12016
+ });
12017
+
12018
+ var _templateObject$Q, _templateObject2$c;
12019
+ var AddInterestButtonContainer = styled__default.div(_templateObject$Q || (_templateObject$Q = _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"])));
12020
+
12021
+ var AddIcon = function AddIcon(_ref) {
12022
+ var onClick = _ref.onClick,
12023
+ id = _ref.id;
12024
+ return /*#__PURE__*/React__default.createElement(IconWrapper, {
12025
+ id: id,
12026
+ onClick: onClick
12027
+ }, /*#__PURE__*/React__default.createElement(SvgWrapper, null, /*#__PURE__*/React__default.createElement(Add, null)));
12028
+ };
12029
+
12030
+ var AccountIcon = themed(function () {
12031
+ return /*#__PURE__*/React__default.createElement(SvgWrapper, null, /*#__PURE__*/React__default.createElement(Account, null));
12032
+ });
12033
+ var AddInterestButton = themed(styled__default.div(_templateObject2$c || (_templateObject2$c = _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) {
12034
+ return props.theme.colors.darkerGray;
12035
+ }, function (props) {
12036
+ return props.theme.colors.borderColor;
12037
+ }, function (props) {
12038
+ return props.theme.marginPaddings[0];
12039
+ }, function (props) {
12040
+ return props.theme.marginPaddings[2];
12041
+ }));
12042
+
12043
+ /**
12044
+ * Page/View that controls the viewing and Adding of Luxity Interests
12045
+ */
12046
+ var Interests = /*#__PURE__*/function (_React$Component) {
12047
+ _inherits(Interests, _React$Component);
12048
+
12049
+ var _super = _createSuper(Interests);
12050
+
12051
+ function Interests(props) {
12052
+ var _this;
12053
+
12054
+ _classCallCheck(this, Interests);
12055
+
12056
+ _this = _super.call(this, props);
12057
+
12058
+ _defineProperty(_assertThisInitialized(_this), "categoryInterestType", 'CATEGORY');
12059
+
12060
+ _defineProperty(_assertThisInitialized(_this), "productInterestType", 'PRODUCT');
11030
12061
 
11031
12062
  _defineProperty(_assertThisInitialized(_this), "setInterests", function (data) {
11032
- var interests = data.data.data.interests.data;
12063
+ var _data$data$data = data.data.data,
12064
+ interests = _data$data$data.interests.data,
12065
+ luxity_product_interests = _data$data$data.luxity_product_interests.data;
11033
12066
 
11034
12067
  _this.setState({
11035
- interests: interests
12068
+ interests: interests,
12069
+ luxity_product_interests: luxity_product_interests
11036
12070
  });
11037
12071
  });
11038
12072
 
@@ -11059,6 +12093,17 @@
11059
12093
  });
11060
12094
  });
11061
12095
 
12096
+ _defineProperty(_assertThisInitialized(_this), "onDeleteLuxityProductInterest", function (deleteItem) {
12097
+ _this.setState(function (prevState) {
12098
+ var newLuxityProductInterests = prevState.luxity_product_interests.filter(function (item) {
12099
+ return item.id !== deleteItem.id;
12100
+ });
12101
+ return _objectSpread2(_objectSpread2({}, prevState), {}, {
12102
+ luxity_product_interests: newLuxityProductInterests
12103
+ });
12104
+ });
12105
+ });
12106
+
11062
12107
  _defineProperty(_assertThisInitialized(_this), "triggerInterestRequest", function () {
11063
12108
  var _this$props = _this.props,
11064
12109
  requestInstance = _this$props.requestInstance,
@@ -11069,8 +12114,22 @@
11069
12114
  });
11070
12115
  });
11071
12116
 
12117
+ _defineProperty(_assertThisInitialized(_this), "onAddInterestClick", function (interestType) {
12118
+ _this.setState({
12119
+ interestType: interestType
12120
+ });
12121
+ });
12122
+
12123
+ _defineProperty(_assertThisInitialized(_this), "onCancel", function () {
12124
+ _this.setState({
12125
+ interestType: null
12126
+ });
12127
+ });
12128
+
11072
12129
  _this.state = {
11073
- interests: []
12130
+ interests: [],
12131
+ luxity_product_interests: [],
12132
+ interestType: null
11074
12133
  };
11075
12134
  return _this;
11076
12135
  }
@@ -11080,7 +12139,9 @@
11080
12139
  value: function render() {
11081
12140
  var _this2 = this;
11082
12141
 
11083
- var interests = this.state.interests;
12142
+ var _this$state = this.state,
12143
+ interests = _this$state.interests,
12144
+ luxity_product_interests = _this$state.luxity_product_interests;
11084
12145
  var _this$props2 = this.props,
11085
12146
  addInterestApi = _this$props2.addInterestApi,
11086
12147
  requestInstance = _this$props2.requestInstance,
@@ -11092,7 +12153,12 @@
11092
12153
  setSchedule = _this$props2.setSchedule,
11093
12154
  getSchedule = _this$props2.getSchedule,
11094
12155
  interestsTitle = _this$props2.interestsTitle,
11095
- defaultShoeSizeType = _this$props2.defaultShoeSizeType;
12156
+ defaultShoeSizeType = _this$props2.defaultShoeSizeType,
12157
+ getMaterialsGraphQuery = _this$props2.getMaterialsGraphQuery,
12158
+ getModelsGraphQuery = _this$props2.getModelsGraphQuery,
12159
+ addLuxityProductInterestApi = _this$props2.addLuxityProductInterestApi,
12160
+ deleteLuxityProductInterestApi = _this$props2.deleteLuxityProductInterestApi,
12161
+ getConditionsGraphQuery = _this$props2.getConditionsGraphQuery;
11096
12162
  return /*#__PURE__*/React__default.createElement("div", {
11097
12163
  className: "interests"
11098
12164
  }, /*#__PURE__*/React__default.createElement(Notifications__default, {
@@ -11111,7 +12177,23 @@
11111
12177
  setSchedule: setSchedule
11112
12178
  });
11113
12179
  }
11114
- }), /*#__PURE__*/React__default.createElement(AddInterest$1, {
12180
+ }), /*#__PURE__*/React__default.createElement("div", {
12181
+ className: "interests__add-button"
12182
+ }, /*#__PURE__*/React__default.createElement(AddInterestButtonContainer, {
12183
+ onClick: function onClick() {
12184
+ return _this2.onAddInterestClick(_this2.categoryInterestType);
12185
+ }
12186
+ }, /*#__PURE__*/React__default.createElement(AddInterestButton, null, "Category Interest"), /*#__PURE__*/React__default.createElement(AddIcon, {
12187
+ id: "add-icon"
12188
+ })), /*#__PURE__*/React__default.createElement(AddInterestButtonContainer, {
12189
+ onClick: function onClick() {
12190
+ return _this2.onAddInterestClick(_this2.productInterestType);
12191
+ }
12192
+ }, /*#__PURE__*/React__default.createElement(AddInterestButton, null, "Product Interest"), /*#__PURE__*/React__default.createElement(AddIcon, {
12193
+ id: "add-icon"
12194
+ }))), /*#__PURE__*/React__default.createElement("div", {
12195
+ className: "interests__section"
12196
+ }, this.state.interestType === this.categoryInterestType && /*#__PURE__*/React__default.createElement(AddInterest$1, {
11115
12197
  addInterestApi: addInterestApi,
11116
12198
  onSubmitSuccess: function onSubmitSuccess(interest) {
11117
12199
  return _this2.onInterestSubmitSuccess(interest);
@@ -11121,7 +12203,29 @@
11121
12203
  getBrandsGraphQuery: getBrandsGraphQuery,
11122
12204
  getStylesGraphQuery: getStylesGraphQuery,
11123
12205
  getShoesGraphQuery: getShoesGraphQuery,
11124
- defaultShoeSizeType: defaultShoeSizeType
12206
+ defaultShoeSizeType: defaultShoeSizeType,
12207
+ addInterestTitle: "Category Interest",
12208
+ onCancel: this.onCancel,
12209
+ getConditionsGraphQuery: getConditionsGraphQuery
12210
+ }), this.state.interestType === this.productInterestType && /*#__PURE__*/React__default.createElement(AddProductInterest$1, {
12211
+ addLuxityProductInterestApi: addLuxityProductInterestApi,
12212
+ onSubmitSuccess: function onSubmitSuccess(interest) {
12213
+ return _this2.onInterestSubmitSuccess(interest);
12214
+ },
12215
+ requestInstance: requestInstance,
12216
+ baseGraphApi: baseGraphApi,
12217
+ getBrandsGraphQuery: getBrandsGraphQuery,
12218
+ addInterestTitle: "Product Interest",
12219
+ onCancel: this.onCancel,
12220
+ getModelsGraphQuery: getModelsGraphQuery,
12221
+ getMaterialsGraphQuery: getMaterialsGraphQuery
12222
+ })), (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) {
12223
+ return /*#__PURE__*/React__default.createElement(LuxityProductInterestItem$1, {
12224
+ deleteInterestApi: deleteLuxityProductInterestApi,
12225
+ requestInstance: requestInstance,
12226
+ onDeleted: _this2.onDeleteLuxityProductInterest,
12227
+ data: item
12228
+ });
11125
12229
  }), interests.length > 0 ? /*#__PURE__*/React__default.createElement(MyInterestTitleHeading$1, null) : '', /*#__PURE__*/React__default.createElement(LuxityPageReady, {
11126
12230
  getRequestPromise: function getRequestPromise() {
11127
12231
  return _this2.triggerInterestRequest();
@@ -11151,9 +12255,10 @@
11151
12255
  interestsTitle: 'Interests',
11152
12256
  defaultShoeSizeType: shoeSizeTypes.eu.value
11153
12257
  };
12258
+ var index$2 = themed(Interests);
11154
12259
 
11155
- var _templateObject$O, _templateObject2$a, _templateObject3$5, _templateObject4$4, _templateObject5$2, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30;
11156
- var HeaderWrapper = styled__default.div(_templateObject$O || (_templateObject$O = _taggedTemplateLiteral(["\n {\n display: inline-block;\n background-color: ", ";\n position: relative;\n width: 100%;\n\n .header__search-container,\n .header__search-input {\n background-color: ", ";\n }\n\n .header__search-container {\n max-width: ", ";\n margin: 0 auto;\n padding: ", " 5%;\n }\n }\n"])), function (props) {
12260
+ var _templateObject$R, _templateObject2$d, _templateObject3$6, _templateObject4$3, _templateObject5$1, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30;
12261
+ var HeaderWrapper = styled__default.div(_templateObject$R || (_templateObject$R = _taggedTemplateLiteral(["\n {\n display: inline-block;\n background-color: ", ";\n position: relative;\n width: 100%;\n\n .header__search-container,\n .header__search-input {\n background-color: ", ";\n }\n\n .header__search-container {\n max-width: ", ";\n margin: 0 auto;\n padding: ", " 5%;\n }\n }\n"])), function (props) {
11157
12262
  return props.theme.rareStepColors.ntrlMin;
11158
12263
  }, function (props) {
11159
12264
  return props.theme.rareStepColors.primary;
@@ -11162,16 +12267,16 @@
11162
12267
  }, function (props) {
11163
12268
  return props.theme.marginPaddings[1];
11164
12269
  });
11165
- var PageContainer = styled__default.div(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteral(["\n {\n max-width: ", ";\n margin: 0 auto;\n width: 100%;\n padding: 0 5%;\n display: flex;\n justify-content: space-between;\n }\n"])), function (props) {
12270
+ var PageContainer = styled__default.div(_templateObject2$d || (_templateObject2$d = _taggedTemplateLiteral(["\n {\n max-width: ", ";\n margin: 0 auto;\n width: 100%;\n padding: 0 5%;\n display: flex;\n justify-content: space-between;\n }\n"])), function (props) {
11166
12271
  return props.theme.rareStepPageSizes.container;
11167
12272
  });
11168
- var HeaderContainer = styled__default.div(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteral(["\n {\n display: flex;\n justify-content: space-between;\n padding: ", " 5%;\n max-width: ", ";\n margin: 0 auto;\n width: 100%;\n }\n"])), function (props) {
12273
+ var HeaderContainer = styled__default.div(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteral(["\n {\n display: flex;\n justify-content: space-between;\n padding: ", " 5%;\n max-width: ", ";\n margin: 0 auto;\n width: 100%;\n }\n"])), function (props) {
11169
12274
  return props.theme.marginPaddings[1];
11170
12275
  }, function (props) {
11171
12276
  return props.theme.rareStepPageSizes.container;
11172
12277
  });
11173
- var LogoFigure = styled__default.div(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral(["\n {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n"])));
11174
- var LogoImage = styled__default.img(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteral(["\n {\n width: 160px;\n cursor: pointer;\n }\n"])));
12278
+ var LogoFigure = styled__default.div(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteral(["\n {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n"])));
12279
+ var LogoImage = styled__default.img(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral(["\n {\n width: 160px;\n cursor: pointer;\n }\n"])));
11175
12280
  var CurrencyFlagIcon = styled__default.img(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n {\n width: 25px;\n height: 15px;\n margin-top: 9px;\n margin-right: 10px;\n }\n"])));
11176
12281
  var SellToUsLink = styled__default.a(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n {\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n text-transform: uppercase;\n letter-spacing: 1px;\n cursor: pointer;\n text-decoration: none;\n font-style: italic;\n\n &:hover,\n &:active {\n color: ", ";\n text-decoration: none;\n }\n }\n"])), function (props) {
11177
12282
  return props.theme.rareStepColors.secondary;
@@ -11491,16 +12596,16 @@
11491
12596
 
11492
12597
  var RareStepDesktopHeader$1 = themed(RareStepDesktopHeader);
11493
12598
 
11494
- var _templateObject$P, _templateObject2$b, _templateObject3$6, _templateObject4$5, _templateObject5$3, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20$1, _templateObject21$1, _templateObject22$1, _templateObject23$1;
11495
- var HeaderWrapper$1 = styled__default.div(_templateObject$P || (_templateObject$P = _taggedTemplateLiteral(["\n {\n display: flex;\n background-color: ", ";\n position: relative;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n padding: ", " 5%;\n }\n"])), function (props) {
12599
+ var _templateObject$S, _templateObject2$e, _templateObject3$7, _templateObject4$4, _templateObject5$2, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20$1, _templateObject21$1, _templateObject22$1, _templateObject23$1;
12600
+ var HeaderWrapper$1 = styled__default.div(_templateObject$S || (_templateObject$S = _taggedTemplateLiteral(["\n {\n display: flex;\n background-color: ", ";\n position: relative;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n padding: ", " 5%;\n }\n"])), function (props) {
11496
12601
  return props.theme.rareStepColors.ntrlMin;
11497
12602
  }, function (props) {
11498
12603
  return props.theme.marginPaddings[3];
11499
12604
  });
11500
- var Icon = styled__default.img(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteral(["\n {\n width: 30px;\n height: 30px;\n cursor: pointer;\n }\n"])));
11501
- var Logo = styled__default.img(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteral(["\n {\n width: 140px;\n height: auto;\n margin-left: 30px;\n cursor: pointer;\n }\n"])));
11502
- var IconWrapper$1 = styled__default.div(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteral(["\n {\n display: flex;\n width: auto;\n height: 25px;\n\n .search-icon,\n .cart-icon {\n width: 100%;\n height: 100%;\n }\n\n .cart-icon {\n margin-left: 10px;\n }\n }\n"])));
11503
- var NavigationWrapper = styled__default.div(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteral(["\n padding: ", ";\n"])), function (props) {
12605
+ var Icon = styled__default.img(_templateObject2$e || (_templateObject2$e = _taggedTemplateLiteral(["\n {\n width: 30px;\n height: 30px;\n cursor: pointer;\n }\n"])));
12606
+ var Logo = styled__default.img(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteral(["\n {\n width: 140px;\n height: auto;\n margin-left: 30px;\n cursor: pointer;\n }\n"])));
12607
+ var IconWrapper$1 = styled__default.div(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral(["\n {\n display: flex;\n width: auto;\n height: 25px;\n\n .search-icon,\n .cart-icon {\n width: 100%;\n height: 100%;\n }\n\n .cart-icon {\n margin-left: 10px;\n }\n }\n"])));
12608
+ var NavigationWrapper = styled__default.div(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteral(["\n padding: ", ";\n"])), function (props) {
11504
12609
  return props.theme.marginPaddings[1];
11505
12610
  });
11506
12611
  var NavigationWrapperTitle = styled__default.div(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteral(["\n font-size: 16px;\n"])));
@@ -11841,10 +12946,10 @@
11841
12946
  RareStepHeader.defaultProps = {
11842
12947
  userIconDropdownContent: null
11843
12948
  };
11844
- var index$2 = themed(RareStepHeader);
12949
+ var index$3 = themed(RareStepHeader);
11845
12950
 
11846
- var _templateObject$Q, _templateObject2$c, _templateObject3$7, _templateObject4$6, _templateObject5$4, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$2, _templateObject10$2, _templateObject11$2, _templateObject12$2, _templateObject13$2, _templateObject14$2, _templateObject15$2, _templateObject16$2;
11847
- var FooterWrapper = styled__default.div(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteral(["\n {\n background-color: ", ";\n font-weight: ", ";\n padding-top: ", ";\n font-size: ", ";\n }\n"])), function (props) {
12951
+ var _templateObject$T, _templateObject2$f, _templateObject3$8, _templateObject4$5, _templateObject5$3, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$2, _templateObject10$2, _templateObject11$2, _templateObject12$2, _templateObject13$2, _templateObject14$2, _templateObject15$2, _templateObject16$2;
12952
+ var FooterWrapper = styled__default.div(_templateObject$T || (_templateObject$T = _taggedTemplateLiteral(["\n {\n background-color: ", ";\n font-weight: ", ";\n padding-top: ", ";\n font-size: ", ";\n }\n"])), function (props) {
11848
12953
  return props.theme.rareStepColors.ntrlMax;
11849
12954
  }, function (props) {
11850
12955
  return props.theme.rareStepFontWeights.bold;
@@ -11853,16 +12958,16 @@
11853
12958
  }, function (props) {
11854
12959
  return props.theme.rareStepFontSize.h5;
11855
12960
  });
11856
- var PageContainer$1 = styled__default.div(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteral(["\n {\n max-width: ", ";\n margin: 0 auto;\n width: 100%;\n padding: 0 5%;\n display: flex;\n justify-content: space-between;\n }\n"])), function (props) {
12961
+ var PageContainer$1 = styled__default.div(_templateObject2$f || (_templateObject2$f = _taggedTemplateLiteral(["\n {\n max-width: ", ";\n margin: 0 auto;\n width: 100%;\n padding: 0 5%;\n display: flex;\n justify-content: space-between;\n }\n"])), function (props) {
11857
12962
  return props.theme.rareStepPageSizes.container;
11858
12963
  });
11859
- var FooterLinksWrapper = styled__default.div(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteral(["\n {\n display: flex;\n flex-basis: 70%;\n padding-bottom: ", ";\n }\n"])), function (props) {
12964
+ var FooterLinksWrapper = styled__default.div(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteral(["\n {\n display: flex;\n flex-basis: 70%;\n padding-bottom: ", ";\n }\n"])), function (props) {
11860
12965
  return props.theme.marginPaddings[4];
11861
12966
  });
11862
- var FooterLinksContainer = styled__default.div(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteral(["\n {\n display: flex;\n flex-direction: column;\n flex: 1;\n padding-right: ", ";\n }\n"])), function (props) {
12967
+ var FooterLinksContainer = styled__default.div(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteral(["\n {\n display: flex;\n flex-direction: column;\n flex: 1;\n padding-right: ", ";\n }\n"])), function (props) {
11863
12968
  return props.theme.marginPaddings[4];
11864
12969
  });
11865
- var FooterTitleLink = styled__default.a(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteral(["\n {\n text-transform: uppercase;\n color: ", ";\n margin-bottom: ", ";\n cursor: pointer;\n font-weight: ", ";\n font-size: ", ";\n text-decoration: none;\n\n &:hover,\n &:active {\n color: ", ";\n text-decoration: underline;\n }\n }\n"])), function (props) {
12970
+ var FooterTitleLink = styled__default.a(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteral(["\n {\n text-transform: uppercase;\n color: ", ";\n margin-bottom: ", ";\n cursor: pointer;\n font-weight: ", ";\n font-size: ", ";\n text-decoration: none;\n\n &:hover,\n &:active {\n color: ", ";\n text-decoration: underline;\n }\n }\n"])), function (props) {
11866
12971
  return props.theme.rareStepColors.ntrlMin;
11867
12972
  }, function (props) {
11868
12973
  return props.theme.marginPaddings[1];
@@ -12030,7 +13135,7 @@
12030
13135
  }));
12031
13136
  };
12032
13137
 
12033
- var index$3 = themed(RareStepFooter);
13138
+ var index$4 = themed(RareStepFooter);
12034
13139
 
12035
13140
  var isCheckBoxInput = (element) => element.type === 'checkbox';
12036
13141
 
@@ -14032,11 +15137,11 @@
14032
15137
  return _formControl.current;
14033
15138
  }
14034
15139
 
14035
- var _excluded$8 = ["ref"];
15140
+ var _excluded$9 = ["ref"];
14036
15141
 
14037
- var _templateObject$R, _templateObject2$d;
14038
- var OptionsRow = styled__default.div(_templateObject$R || (_templateObject$R = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: nowrap;\n flex-direction: row;\n"])));
14039
- var Options = styled__default.div(_templateObject2$d || (_templateObject2$d = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: nowrap;\n flex-direction: row;\n flex-basis: 60%;\n"])));
15142
+ var _templateObject$U, _templateObject2$g;
15143
+ var OptionsRow = styled__default.div(_templateObject$U || (_templateObject$U = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: nowrap;\n flex-direction: row;\n"])));
15144
+ var Options = styled__default.div(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: nowrap;\n flex-direction: row;\n flex-basis: 60%;\n"])));
14040
15145
 
14041
15146
  var CommunicationPreferenceOptionsRenderer = function CommunicationPreferenceOptionsRenderer(_ref) {
14042
15147
  var control = _ref.control,
@@ -14053,7 +15158,7 @@
14053
15158
  }),
14054
15159
  _useController$field = _useController.field,
14055
15160
  ref = _useController$field.ref,
14056
- inputProps = _objectWithoutProperties(_useController$field, _excluded$8),
15161
+ inputProps = _objectWithoutProperties(_useController$field, _excluded$9),
14057
15162
  _useController$fieldS = _useController.fieldState,
14058
15163
  invalid = _useController$fieldS.invalid,
14059
15164
  error = _useController$fieldS.error;
@@ -14082,11 +15187,11 @@
14082
15187
  }, error === null || error === void 0 ? void 0 : error.message));
14083
15188
  };
14084
15189
 
14085
- var _templateObject$S, _templateObject2$e;
14086
- var SectionContainer = styled__default.div(_templateObject$S || (_templateObject$S = _taggedTemplateLiteral(["\n border-top: flex 1px solid ", ";\n border-top-width: calc(100% - 50px);\n padding: 5px 10px;\n"])), function (props) {
15190
+ var _templateObject$V, _templateObject2$h;
15191
+ var SectionContainer = styled__default.div(_templateObject$V || (_templateObject$V = _taggedTemplateLiteral(["\n border-top: flex 1px solid ", ";\n border-top-width: calc(100% - 50px);\n padding: 5px 10px;\n"])), function (props) {
14087
15192
  return props.theme.colors.primary;
14088
15193
  });
14089
- var SectionHeading = styled__default.div(_templateObject2$e || (_templateObject2$e = _taggedTemplateLiteral(["\n padding: 5px 10px;\n"])));
15194
+ var SectionHeading = styled__default.div(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteral(["\n padding: 5px 10px;\n"])));
14090
15195
 
14091
15196
  var CommunicationPreferenceSection = function CommunicationPreferenceSection(_ref) {
14092
15197
  var section_heading = _ref.section_heading,
@@ -14110,10 +15215,10 @@
14110
15215
 
14111
15216
  var CommunicationPreferenceSection$1 = themed(CommunicationPreferenceSection);
14112
15217
 
14113
- var _templateObject$T, _templateObject2$f, _templateObject3$8;
14114
- var CommunicationPreferenceContainer = styled__default.div(_templateObject$T || (_templateObject$T = _taggedTemplateLiteral(["\n border: solid 1px #d1d5dbff;\n margin-bottom: 40px;\n"])));
14115
- var EditButtonRow = styled__default.div(_templateObject2$f || (_templateObject2$f = _taggedTemplateLiteral(["\n display: flex;\n justify-content: end;\n padding: 10px 5px;\n margin-right: 16px;\n"])));
14116
- var SubmitButton = styled__default.input(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteral(["\n flex-basis: 15%;\n margin-right: 5px;\n"])));
15218
+ var _templateObject$W, _templateObject2$i, _templateObject3$9;
15219
+ var CommunicationPreferenceContainer = styled__default.div(_templateObject$W || (_templateObject$W = _taggedTemplateLiteral(["\n border: solid 1px #d1d5dbff;\n margin-bottom: 40px;\n"])));
15220
+ var EditButtonRow = styled__default.div(_templateObject2$i || (_templateObject2$i = _taggedTemplateLiteral(["\n display: flex;\n justify-content: end;\n padding: 10px 5px;\n margin-right: 16px;\n"])));
15221
+ var SubmitButton = styled__default.input(_templateObject3$9 || (_templateObject3$9 = _taggedTemplateLiteral(["\n flex-basis: 15%;\n margin-right: 5px;\n"])));
14117
15222
  var BaseRequest = {
14118
15223
  loading: false,
14119
15224
  success: false,
@@ -14212,10 +15317,10 @@
14212
15317
  }, "Edit")))));
14213
15318
  };
14214
15319
 
14215
- var index$4 = themed(CommunicationPreferences);
15320
+ var index$5 = themed(CommunicationPreferences);
14216
15321
 
14217
- var _templateObject$U;
14218
- var FooterWrapper$1 = styled__default.div(_templateObject$U || (_templateObject$U = _taggedTemplateLiteral(["\n {\n background-color: ", ";\n }\n"])), function (props) {
15322
+ var _templateObject$X;
15323
+ var FooterWrapper$1 = styled__default.div(_templateObject$X || (_templateObject$X = _taggedTemplateLiteral(["\n {\n background-color: ", ";\n }\n"])), function (props) {
14219
15324
  return props.theme.colors.gray;
14220
15325
  });
14221
15326
 
@@ -14541,7 +15646,7 @@
14541
15646
  }, "Copyright ", currentYear, " | Luxity (Pty) LTD | All Rights Reserved | Website Developed by B Online")));
14542
15647
  };
14543
15648
 
14544
- var index$5 = themed(LuxityFooter);
15649
+ var index$6 = themed(LuxityFooter);
14545
15650
 
14546
15651
  var cssUnit = {
14547
15652
  cm: true,
@@ -16349,17 +17454,17 @@
16349
17454
  exports.Accordion = index;
16350
17455
  exports.Checkbox = LuxityCheckbox;
16351
17456
  exports.CheckboxFormWrapper = FormWrapper;
16352
- exports.CommunicationPreferences = index$4;
17457
+ exports.CommunicationPreferences = index$5;
16353
17458
  exports.CountryCodeSelect = CountryCodeSelect;
16354
17459
  exports.CurrencyInputFormatter = CurrencyInputFormatter;
16355
17460
  exports.CurrencySelect = CurrencySelect;
16356
17461
  exports.InterestCatSelector = CategoryInterestSelector;
16357
17462
  exports.InterestItem = InterestItem$1;
16358
- exports.Interests = Interests;
17463
+ exports.Interests = index$2;
16359
17464
  exports.InvertedTextButton = InvertedTextButton$1;
16360
17465
  exports.LuxityAppSideNav = LuxityAppSideNav;
16361
17466
  exports.LuxityDesktopHeader = LuxityDesktopHeader;
16362
- exports.LuxityFooter = index$5;
17467
+ exports.LuxityFooter = index$6;
16363
17468
  exports.LuxityMobileHeader = LuxityMobileHeader;
16364
17469
  exports.LuxityPageReady = LuxityPageReady;
16365
17470
  exports.LuxitySideNav = LuxitySideNav;
@@ -16370,8 +17475,8 @@
16370
17475
  exports.PrimaryButton = PrimaryButton$1;
16371
17476
  exports.RadioButtons = RadioButtons$1;
16372
17477
  exports.RadioButtonsFormWrapper = FormWrapper$1;
16373
- exports.RareStepFooter = index$3;
16374
- exports.RareStepHeader = index$2;
17478
+ exports.RareStepFooter = index$4;
17479
+ exports.RareStepHeader = index$3;
16375
17480
  exports.ReactSelectWrapper = ReactSelectWrapper;
16376
17481
  exports.SecondaryButton = SecondaryButton$1;
16377
17482
  exports.ShoeSizeRangeSelector = ShoeSizeRangeSelector;