@bonlineza/luxity-lib 2.27.0 → 2.29.0
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 +1791 -9816
- package/BrandSelector.js +371 -10788
- package/CHANGELOG.md +272 -0
- package/GraphQLDropdownSelector.js +49 -333
- package/InterestItem.js +0 -16
- package/Interests.js +1161 -1997
- package/LuxityGraphQLDropdownSelector.js +47 -232
- package/LuxityGraphQLMultiselector.js +4 -40
- package/MaterialSelector.js +47 -197
- package/ModelSelector.js +47 -197
- package/StyleSelector.js +5 -47
- package/build/bundle.js +88 -520
- package/package.json +1 -1
|
@@ -786,22 +786,6 @@
|
|
|
786
786
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
787
787
|
key: "".concat(style.name, "-").concat(data.id)
|
|
788
788
|
}, style.name);
|
|
789
|
-
}) : 'All')), /*#__PURE__*/React__default.createElement("div", {
|
|
790
|
-
className: "interest-item__container_heading"
|
|
791
|
-
}, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Models:"), /*#__PURE__*/React__default.createElement("div", {
|
|
792
|
-
className: "list-items"
|
|
793
|
-
}, data.luxity_models != null && data.luxity_models.length > 0 ? data.luxity_models.map(function (model) {
|
|
794
|
-
return /*#__PURE__*/React__default.createElement("span", {
|
|
795
|
-
key: "".concat(model.name, "-").concat(data.id)
|
|
796
|
-
}, model.name);
|
|
797
|
-
}) : 'All')), /*#__PURE__*/React__default.createElement("div", {
|
|
798
|
-
className: "interest-item__container_heading"
|
|
799
|
-
}, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Materials:"), /*#__PURE__*/React__default.createElement("div", {
|
|
800
|
-
className: "list-items"
|
|
801
|
-
}, data.luxity_materials != null && data.luxity_materials.length > 0 ? data.luxity_materials.map(function (material) {
|
|
802
|
-
return /*#__PURE__*/React__default.createElement("span", {
|
|
803
|
-
key: "".concat(material.name, "-").concat(data.id)
|
|
804
|
-
}, material.name);
|
|
805
789
|
}) : 'All')), /*#__PURE__*/React__default.createElement("div", {
|
|
806
790
|
className: "interest-item__container_heading ".concat(data.category_type === interestCategories.SHOES ? '' : 'no-shoe-size-section')
|
|
807
791
|
}, data.category_type === interestCategories.SHOES ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Shoe Size:"), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -9398,141 +9382,6 @@
|
|
|
9398
9382
|
|
|
9399
9383
|
var NotificationDropDown$1 = themed(NotificationDropDown);
|
|
9400
9384
|
|
|
9401
|
-
/**
|
|
9402
|
-
* Luxity flavoured GraphQLMultiselector with text Search, category and limit controls
|
|
9403
|
-
*/
|
|
9404
|
-
var LuxityGraphQLDropdownSelector = /*#__PURE__*/function (_React$Component) {
|
|
9405
|
-
_inherits(LuxityGraphQLDropdownSelector, _React$Component);
|
|
9406
|
-
|
|
9407
|
-
var _super = _createSuper(LuxityGraphQLDropdownSelector);
|
|
9408
|
-
|
|
9409
|
-
function LuxityGraphQLDropdownSelector(props) {
|
|
9410
|
-
var _this;
|
|
9411
|
-
|
|
9412
|
-
_classCallCheck(this, LuxityGraphQLDropdownSelector);
|
|
9413
|
-
|
|
9414
|
-
_this = _super.call(this, props);
|
|
9415
|
-
|
|
9416
|
-
_defineProperty(_assertThisInitialized(_this), "multiSelectorRef", /*#__PURE__*/React__default.createRef());
|
|
9417
|
-
|
|
9418
|
-
_defineProperty(_assertThisInitialized(_this), "increaseLimit", function () {
|
|
9419
|
-
_this.setState(function (prevState) {
|
|
9420
|
-
return {
|
|
9421
|
-
limit: prevState.limit + _this.props.queryLimitIncrement
|
|
9422
|
-
};
|
|
9423
|
-
});
|
|
9424
|
-
});
|
|
9425
|
-
|
|
9426
|
-
_defineProperty(_assertThisInitialized(_this), "onChange", function (selection) {
|
|
9427
|
-
_this.props.onChange(selection);
|
|
9428
|
-
});
|
|
9429
|
-
|
|
9430
|
-
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
9431
|
-
var _this$state = _this.state,
|
|
9432
|
-
limit = _this$state.limit,
|
|
9433
|
-
query_arguments = _this$state.query_arguments;
|
|
9434
|
-
var _this$props = _this.props,
|
|
9435
|
-
title = _this$props.title,
|
|
9436
|
-
baseClass = _this$props.baseClass,
|
|
9437
|
-
getGraphQuery = _this$props.getGraphQuery,
|
|
9438
|
-
resultProcessor = _this$props.resultProcessor,
|
|
9439
|
-
graphApi = _this$props.graphApi,
|
|
9440
|
-
identifier = _this$props.identifier,
|
|
9441
|
-
requestInstance = _this$props.requestInstance;
|
|
9442
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9443
|
-
className: baseClass
|
|
9444
|
-
}, /*#__PURE__*/React__default.createElement(InterestsSubheading, {
|
|
9445
|
-
className: "".concat(baseClass, "__title"),
|
|
9446
|
-
title: title
|
|
9447
|
-
}), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLDropdownSelector$1, {
|
|
9448
|
-
triggerRequest: function triggerRequest() {
|
|
9449
|
-
return requestInstance.post(graphApi, {
|
|
9450
|
-
query: getGraphQuery(limit, 1, 'id|desc', query_arguments)
|
|
9451
|
-
});
|
|
9452
|
-
},
|
|
9453
|
-
graphQuery: getGraphQuery(limit, 1, 'id|desc', query_arguments),
|
|
9454
|
-
identifier: identifier,
|
|
9455
|
-
ref: _this.multiSelectorRef,
|
|
9456
|
-
onChange: _this.onChange,
|
|
9457
|
-
resultProcessor: resultProcessor
|
|
9458
|
-
})));
|
|
9459
|
-
});
|
|
9460
|
-
|
|
9461
|
-
_this.state = {
|
|
9462
|
-
limit: props.baseQueryLimit,
|
|
9463
|
-
query_arguments: props.query_arguments
|
|
9464
|
-
};
|
|
9465
|
-
return _this;
|
|
9466
|
-
}
|
|
9467
|
-
|
|
9468
|
-
_createClass(LuxityGraphQLDropdownSelector, [{
|
|
9469
|
-
key: "componentDidUpdate",
|
|
9470
|
-
value: function componentDidUpdate(prevProps) {
|
|
9471
|
-
var _this$multiSelectorRe;
|
|
9472
|
-
|
|
9473
|
-
if (prevProps.query_arguments !== this.props.query_arguments && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
|
|
9474
|
-
this.multiSelectorRef.current.emptySelected();
|
|
9475
|
-
}
|
|
9476
|
-
}
|
|
9477
|
-
}], [{
|
|
9478
|
-
key: "getDerivedStateFromProps",
|
|
9479
|
-
value: function getDerivedStateFromProps(props, prevState) {
|
|
9480
|
-
if (prevState.query_arguments !== props.query_arguments) {
|
|
9481
|
-
return {
|
|
9482
|
-
query_arguments: props.query_arguments
|
|
9483
|
-
};
|
|
9484
|
-
}
|
|
9485
|
-
|
|
9486
|
-
return null;
|
|
9487
|
-
}
|
|
9488
|
-
}]);
|
|
9489
|
-
|
|
9490
|
-
return LuxityGraphQLDropdownSelector;
|
|
9491
|
-
}(React__default.Component);
|
|
9492
|
-
|
|
9493
|
-
LuxityGraphQLDropdownSelector.defaultProps = {
|
|
9494
|
-
baseClass: '',
|
|
9495
|
-
searchPlaceHolder: '',
|
|
9496
|
-
queryLimitIncrement: 12,
|
|
9497
|
-
baseQueryLimit: 12
|
|
9498
|
-
};
|
|
9499
|
-
|
|
9500
|
-
var BrandSelector = function BrandSelector(_ref) {
|
|
9501
|
-
var onChange = _ref.onChange,
|
|
9502
|
-
category = _ref.category,
|
|
9503
|
-
graphApi = _ref.graphApi,
|
|
9504
|
-
getGraphQuery = _ref.getGraphQuery,
|
|
9505
|
-
resultProcessor = _ref.resultProcessor,
|
|
9506
|
-
requestInstance = _ref.requestInstance;
|
|
9507
|
-
return /*#__PURE__*/React__default.createElement(LuxityGraphQLDropdownSelector, {
|
|
9508
|
-
baseQueryLimit: 9999,
|
|
9509
|
-
title: "Brands",
|
|
9510
|
-
queryId: "getBrands",
|
|
9511
|
-
baseClass: "brand-selector",
|
|
9512
|
-
identifier: "brand-selector",
|
|
9513
|
-
searchPlaceHolder: "Search brands",
|
|
9514
|
-
query_arguments: category,
|
|
9515
|
-
onChange: onChange,
|
|
9516
|
-
graphApi: graphApi,
|
|
9517
|
-
getGraphQuery: getGraphQuery,
|
|
9518
|
-
resultProcessor: resultProcessor,
|
|
9519
|
-
requestInstance: requestInstance
|
|
9520
|
-
});
|
|
9521
|
-
};
|
|
9522
|
-
|
|
9523
|
-
BrandSelector.defaultProps = {
|
|
9524
|
-
resultProcessor: function resultProcessor(result) {
|
|
9525
|
-
return result.data.data.luxity_brands.data.map(function (_ref2) {
|
|
9526
|
-
var id = _ref2.id,
|
|
9527
|
-
name = _ref2.name;
|
|
9528
|
-
return {
|
|
9529
|
-
label: name,
|
|
9530
|
-
value: id
|
|
9531
|
-
};
|
|
9532
|
-
});
|
|
9533
|
-
}
|
|
9534
|
-
};
|
|
9535
|
-
|
|
9536
9385
|
var _templateObject$E, _templateObject2$6;
|
|
9537
9386
|
var ALL_ITEM = {
|
|
9538
9387
|
id: 'ALL',
|
|
@@ -9865,10 +9714,7 @@
|
|
|
9865
9714
|
var _this$state = _this.state,
|
|
9866
9715
|
limit = _this$state.limit,
|
|
9867
9716
|
category = _this$state.category,
|
|
9868
|
-
nameFilter = _this$state.nameFilter
|
|
9869
|
-
brands = _this$state.brands,
|
|
9870
|
-
models = _this$state.models,
|
|
9871
|
-
materials = _this$state.materials;
|
|
9717
|
+
nameFilter = _this$state.nameFilter;
|
|
9872
9718
|
var _this$props = _this.props,
|
|
9873
9719
|
title = _this$props.title,
|
|
9874
9720
|
baseClass = _this$props.baseClass,
|
|
@@ -9889,10 +9735,10 @@
|
|
|
9889
9735
|
}), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
|
|
9890
9736
|
triggerRequest: function triggerRequest() {
|
|
9891
9737
|
return requestInstance.post(graphApi, {
|
|
9892
|
-
query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter
|
|
9738
|
+
query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter)
|
|
9893
9739
|
});
|
|
9894
9740
|
},
|
|
9895
|
-
graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter
|
|
9741
|
+
graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter),
|
|
9896
9742
|
identifier: identifier,
|
|
9897
9743
|
ref: _this.multiSelectorRef,
|
|
9898
9744
|
onChange: _this.onChange,
|
|
@@ -9905,9 +9751,6 @@
|
|
|
9905
9751
|
_this.state = {
|
|
9906
9752
|
limit: props.baseQueryLimit,
|
|
9907
9753
|
category: props.category,
|
|
9908
|
-
brands: props.brands,
|
|
9909
|
-
models: props.models,
|
|
9910
|
-
materials: props.materials,
|
|
9911
9754
|
nameFilter: ''
|
|
9912
9755
|
};
|
|
9913
9756
|
return _this;
|
|
@@ -9916,23 +9759,11 @@
|
|
|
9916
9759
|
_createClass(LuxityGraphQLMultiselector, [{
|
|
9917
9760
|
key: "componentDidUpdate",
|
|
9918
9761
|
value: function componentDidUpdate(prevProps) {
|
|
9919
|
-
var _this$multiSelectorRe
|
|
9762
|
+
var _this$multiSelectorRe;
|
|
9920
9763
|
|
|
9921
9764
|
if (prevProps.category !== this.props.category && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
|
|
9922
9765
|
this.multiSelectorRef.current.emptySelected();
|
|
9923
9766
|
}
|
|
9924
|
-
|
|
9925
|
-
if (prevProps.brands !== this.props.brands && (_this$multiSelectorRe2 = this.multiSelectorRef) !== null && _this$multiSelectorRe2 !== void 0 && _this$multiSelectorRe2.current) {
|
|
9926
|
-
this.multiSelectorRef.current.emptySelected();
|
|
9927
|
-
}
|
|
9928
|
-
|
|
9929
|
-
if (prevProps.models !== this.props.models && (_this$multiSelectorRe3 = this.multiSelectorRef) !== null && _this$multiSelectorRe3 !== void 0 && _this$multiSelectorRe3.current) {
|
|
9930
|
-
this.multiSelectorRef.current.emptySelected();
|
|
9931
|
-
}
|
|
9932
|
-
|
|
9933
|
-
if (prevProps.materials !== this.props.materials && (_this$multiSelectorRe4 = this.multiSelectorRef) !== null && _this$multiSelectorRe4 !== void 0 && _this$multiSelectorRe4.current) {
|
|
9934
|
-
this.multiSelectorRef.current.emptySelected();
|
|
9935
|
-
}
|
|
9936
9767
|
}
|
|
9937
9768
|
}], [{
|
|
9938
9769
|
key: "getDerivedStateFromProps",
|
|
@@ -9943,24 +9774,6 @@
|
|
|
9943
9774
|
};
|
|
9944
9775
|
}
|
|
9945
9776
|
|
|
9946
|
-
if (prevState.brands !== props.brands) {
|
|
9947
|
-
return {
|
|
9948
|
-
brands: props.brands
|
|
9949
|
-
};
|
|
9950
|
-
}
|
|
9951
|
-
|
|
9952
|
-
if (prevState.models !== props.models) {
|
|
9953
|
-
return {
|
|
9954
|
-
models: props.models
|
|
9955
|
-
};
|
|
9956
|
-
}
|
|
9957
|
-
|
|
9958
|
-
if (prevState.materials !== props.materials) {
|
|
9959
|
-
return {
|
|
9960
|
-
materials: props.materials
|
|
9961
|
-
};
|
|
9962
|
-
}
|
|
9963
|
-
|
|
9964
9777
|
return null;
|
|
9965
9778
|
}
|
|
9966
9779
|
}]);
|
|
@@ -10002,6 +9815,38 @@
|
|
|
10002
9815
|
return selected ? /*#__PURE__*/React__default.createElement(PrimaryButton$1, props, item.name) : /*#__PURE__*/React__default.createElement(UnselectedButton, props, item.name);
|
|
10003
9816
|
};
|
|
10004
9817
|
|
|
9818
|
+
var BrandSelector = function BrandSelector(_ref) {
|
|
9819
|
+
var onChange = _ref.onChange,
|
|
9820
|
+
category = _ref.category,
|
|
9821
|
+
graphApi = _ref.graphApi,
|
|
9822
|
+
itemRenderer = _ref.itemRenderer,
|
|
9823
|
+
getGraphQuery = _ref.getGraphQuery,
|
|
9824
|
+
resultProcessor = _ref.resultProcessor,
|
|
9825
|
+
requestInstance = _ref.requestInstance;
|
|
9826
|
+
return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
|
|
9827
|
+
baseQueryLimit: 16,
|
|
9828
|
+
title: "Brands",
|
|
9829
|
+
queryId: "getBrands",
|
|
9830
|
+
baseClass: "brand-selector",
|
|
9831
|
+
identifier: "brand-selector",
|
|
9832
|
+
searchPlaceHolder: "Search brands",
|
|
9833
|
+
category: category,
|
|
9834
|
+
onChange: onChange,
|
|
9835
|
+
graphApi: graphApi,
|
|
9836
|
+
itemRenderer: itemRenderer,
|
|
9837
|
+
getGraphQuery: getGraphQuery,
|
|
9838
|
+
resultProcessor: resultProcessor,
|
|
9839
|
+
requestInstance: requestInstance
|
|
9840
|
+
});
|
|
9841
|
+
};
|
|
9842
|
+
|
|
9843
|
+
BrandSelector.defaultProps = {
|
|
9844
|
+
itemRenderer: ItemRenderer,
|
|
9845
|
+
resultProcessor: function resultProcessor(result) {
|
|
9846
|
+
return result.data.data.luxity_brands;
|
|
9847
|
+
}
|
|
9848
|
+
};
|
|
9849
|
+
|
|
10005
9850
|
var StyleSelector = function StyleSelector(_ref) {
|
|
10006
9851
|
var onChange = _ref.onChange,
|
|
10007
9852
|
category = _ref.category,
|
|
@@ -10009,10 +9854,7 @@
|
|
|
10009
9854
|
itemRenderer = _ref.itemRenderer,
|
|
10010
9855
|
getGraphQuery = _ref.getGraphQuery,
|
|
10011
9856
|
resultProcessor = _ref.resultProcessor,
|
|
10012
|
-
requestInstance = _ref.requestInstance
|
|
10013
|
-
brands = _ref.brands,
|
|
10014
|
-
models = _ref.models,
|
|
10015
|
-
materials = _ref.materials;
|
|
9857
|
+
requestInstance = _ref.requestInstance;
|
|
10016
9858
|
return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
|
|
10017
9859
|
title: "Styles",
|
|
10018
9860
|
queryId: "getStyles",
|
|
@@ -10021,9 +9863,6 @@
|
|
|
10021
9863
|
identifier: "style-selector",
|
|
10022
9864
|
searchPlaceHolder: "Search Styles",
|
|
10023
9865
|
category: category,
|
|
10024
|
-
brands: brands,
|
|
10025
|
-
models: models,
|
|
10026
|
-
materials: materials,
|
|
10027
9866
|
onChange: onChange,
|
|
10028
9867
|
graphApi: graphApi,
|
|
10029
9868
|
itemRenderer: itemRenderer,
|
|
@@ -10373,76 +10212,6 @@
|
|
|
10373
10212
|
}));
|
|
10374
10213
|
});
|
|
10375
10214
|
|
|
10376
|
-
var ModelSelector = function ModelSelector(_ref) {
|
|
10377
|
-
var onChange = _ref.onChange,
|
|
10378
|
-
brands = _ref.brands,
|
|
10379
|
-
graphApi = _ref.graphApi,
|
|
10380
|
-
getGraphQuery = _ref.getGraphQuery,
|
|
10381
|
-
resultProcessor = _ref.resultProcessor,
|
|
10382
|
-
requestInstance = _ref.requestInstance;
|
|
10383
|
-
return /*#__PURE__*/React__default.createElement(LuxityGraphQLDropdownSelector, {
|
|
10384
|
-
baseQueryLimit: 1000,
|
|
10385
|
-
title: "Models",
|
|
10386
|
-
queryId: "getModels",
|
|
10387
|
-
baseClass: "model-selector",
|
|
10388
|
-
identifier: "model-selector",
|
|
10389
|
-
query_arguments: brands,
|
|
10390
|
-
onChange: onChange,
|
|
10391
|
-
graphApi: graphApi,
|
|
10392
|
-
getGraphQuery: getGraphQuery,
|
|
10393
|
-
resultProcessor: resultProcessor,
|
|
10394
|
-
requestInstance: requestInstance
|
|
10395
|
-
});
|
|
10396
|
-
};
|
|
10397
|
-
|
|
10398
|
-
ModelSelector.defaultProps = {
|
|
10399
|
-
resultProcessor: function resultProcessor(result) {
|
|
10400
|
-
return result.data.data.luxity_models.data.map(function (_ref2) {
|
|
10401
|
-
var id = _ref2.id,
|
|
10402
|
-
name = _ref2.name;
|
|
10403
|
-
return {
|
|
10404
|
-
label: name,
|
|
10405
|
-
value: id
|
|
10406
|
-
};
|
|
10407
|
-
});
|
|
10408
|
-
}
|
|
10409
|
-
};
|
|
10410
|
-
|
|
10411
|
-
var MaterialSelector = function MaterialSelector(_ref) {
|
|
10412
|
-
var onChange = _ref.onChange,
|
|
10413
|
-
brands = _ref.brands,
|
|
10414
|
-
graphApi = _ref.graphApi,
|
|
10415
|
-
getGraphQuery = _ref.getGraphQuery,
|
|
10416
|
-
resultProcessor = _ref.resultProcessor,
|
|
10417
|
-
requestInstance = _ref.requestInstance;
|
|
10418
|
-
return /*#__PURE__*/React__default.createElement(LuxityGraphQLDropdownSelector, {
|
|
10419
|
-
baseQueryLimit: 1000,
|
|
10420
|
-
title: "Materials",
|
|
10421
|
-
queryId: "getMaterials",
|
|
10422
|
-
baseClass: "material-selector",
|
|
10423
|
-
identifier: "material-selector",
|
|
10424
|
-
query_arguments: brands,
|
|
10425
|
-
onChange: onChange,
|
|
10426
|
-
graphApi: graphApi,
|
|
10427
|
-
getGraphQuery: getGraphQuery,
|
|
10428
|
-
resultProcessor: resultProcessor,
|
|
10429
|
-
requestInstance: requestInstance
|
|
10430
|
-
});
|
|
10431
|
-
};
|
|
10432
|
-
|
|
10433
|
-
MaterialSelector.defaultProps = {
|
|
10434
|
-
resultProcessor: function resultProcessor(result) {
|
|
10435
|
-
return result.data.data.luxity_materials.data.map(function (_ref2) {
|
|
10436
|
-
var id = _ref2.id,
|
|
10437
|
-
name = _ref2.name;
|
|
10438
|
-
return {
|
|
10439
|
-
label: name,
|
|
10440
|
-
value: id
|
|
10441
|
-
};
|
|
10442
|
-
});
|
|
10443
|
-
}
|
|
10444
|
-
};
|
|
10445
|
-
|
|
10446
10215
|
var _templateObject$K, _templateObject2$9, _templateObject3$4, _templateObject4$3, _templateObject5$1;
|
|
10447
10216
|
var UNISEX$1 = genders.UNISEX;
|
|
10448
10217
|
var AddInterestContainer = styled__default.div(_templateObject$K || (_templateObject$K = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n border: 1px solid ", ";\n padding: ", ";\n"])), function (props) {
|
|
@@ -10494,9 +10263,7 @@
|
|
|
10494
10263
|
styles: [],
|
|
10495
10264
|
gender: [],
|
|
10496
10265
|
request: _objectSpread2({}, request),
|
|
10497
|
-
isCategoriesShown: false
|
|
10498
|
-
models: [],
|
|
10499
|
-
materials: []
|
|
10266
|
+
isCategoriesShown: false
|
|
10500
10267
|
};
|
|
10501
10268
|
/**
|
|
10502
10269
|
* Generates Interest UI and submits graph payloads as a highly specialised component
|
|
@@ -10550,9 +10317,8 @@
|
|
|
10550
10317
|
_defineProperty(_assertThisInitialized(_this), "onBrandsChanged", function (brandsArray) {
|
|
10551
10318
|
_this.setState({
|
|
10552
10319
|
brands: brandsArray.map(function (brand) {
|
|
10553
|
-
return brand.
|
|
10554
|
-
})
|
|
10555
|
-
styles: []
|
|
10320
|
+
return brand.id;
|
|
10321
|
+
})
|
|
10556
10322
|
});
|
|
10557
10323
|
});
|
|
10558
10324
|
|
|
@@ -10572,24 +10338,6 @@
|
|
|
10572
10338
|
});
|
|
10573
10339
|
});
|
|
10574
10340
|
|
|
10575
|
-
_defineProperty(_assertThisInitialized(_this), "onModelsChanged", function (modelsArray) {
|
|
10576
|
-
_this.setState({
|
|
10577
|
-
models: modelsArray.map(function (model) {
|
|
10578
|
-
return model.value;
|
|
10579
|
-
}),
|
|
10580
|
-
styles: []
|
|
10581
|
-
});
|
|
10582
|
-
});
|
|
10583
|
-
|
|
10584
|
-
_defineProperty(_assertThisInitialized(_this), "onMaterialsChanged", function (materialsArray) {
|
|
10585
|
-
_this.setState({
|
|
10586
|
-
materials: materialsArray.map(function (material) {
|
|
10587
|
-
return material.value;
|
|
10588
|
-
}),
|
|
10589
|
-
styles: []
|
|
10590
|
-
});
|
|
10591
|
-
});
|
|
10592
|
-
|
|
10593
10341
|
_defineProperty(_assertThisInitialized(_this), "payloadIsValid", function () {
|
|
10594
10342
|
// price/shoe-size always have initial values as soon as category is set
|
|
10595
10343
|
var category_type = _this.state.category_type;
|
|
@@ -10613,9 +10361,7 @@
|
|
|
10613
10361
|
styles = _this$state.styles,
|
|
10614
10362
|
category_type = _this$state.category_type,
|
|
10615
10363
|
requestState = _this$state.request,
|
|
10616
|
-
gender = _this$state.gender
|
|
10617
|
-
models = _this$state.models,
|
|
10618
|
-
materials = _this$state.materials;
|
|
10364
|
+
gender = _this$state.gender;
|
|
10619
10365
|
var payloadGender = gender[0];
|
|
10620
10366
|
|
|
10621
10367
|
if (gender.length > 1 || !gender.length) {
|
|
@@ -10629,9 +10375,7 @@
|
|
|
10629
10375
|
max_price: max_price,
|
|
10630
10376
|
styles: styles,
|
|
10631
10377
|
gender: payloadGender,
|
|
10632
|
-
request: requestState
|
|
10633
|
-
models: models,
|
|
10634
|
-
materials: materials
|
|
10378
|
+
request: requestState
|
|
10635
10379
|
};
|
|
10636
10380
|
var shoeSizesPayload = category_type === interestCategories.SHOES ? {
|
|
10637
10381
|
min_shoe_size_id: min_shoe_size_id,
|
|
@@ -10688,19 +10432,14 @@
|
|
|
10688
10432
|
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
10689
10433
|
var _this$state2 = _this.state,
|
|
10690
10434
|
category_type = _this$state2.category_type,
|
|
10691
|
-
fetching = _this$state2.request.fetching
|
|
10692
|
-
brands = _this$state2.brands,
|
|
10693
|
-
models = _this$state2.models,
|
|
10694
|
-
materials = _this$state2.materials;
|
|
10435
|
+
fetching = _this$state2.request.fetching;
|
|
10695
10436
|
var _this$props = _this.props,
|
|
10696
10437
|
requestInstance = _this$props.requestInstance,
|
|
10697
10438
|
baseGraphApi = _this$props.baseGraphApi,
|
|
10698
10439
|
getBrandsGraphQuery = _this$props.getBrandsGraphQuery,
|
|
10699
10440
|
getStylesGraphQuery = _this$props.getStylesGraphQuery,
|
|
10700
10441
|
getShoesGraphQuery = _this$props.getShoesGraphQuery,
|
|
10701
|
-
defaultShoeSizeType = _this$props.defaultShoeSizeType
|
|
10702
|
-
getModelsGraphQuery = _this$props.getModelsGraphQuery,
|
|
10703
|
-
getMaterialsGraphQuery = _this$props.getMaterialsGraphQuery;
|
|
10442
|
+
defaultShoeSizeType = _this$props.defaultShoeSizeType;
|
|
10704
10443
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, !_this.state.isCategoriesShown && /*#__PURE__*/React__default.createElement(AddInterestButtonContainer, {
|
|
10705
10444
|
onClick: _this.onAddInterestClick
|
|
10706
10445
|
}, /*#__PURE__*/React__default.createElement(AddInterestButton, null, "Add Interest"), /*#__PURE__*/React__default.createElement(AddIcon, {
|
|
@@ -10716,19 +10455,7 @@
|
|
|
10716
10455
|
requestInstance: requestInstance,
|
|
10717
10456
|
graphApi: "".concat(baseGraphApi, "?id=getBrands"),
|
|
10718
10457
|
getGraphQuery: getBrandsGraphQuery
|
|
10719
|
-
}),
|
|
10720
|
-
brands: brands,
|
|
10721
|
-
getGraphQuery: getModelsGraphQuery,
|
|
10722
|
-
graphApi: "".concat(baseGraphApi, "?id=getModels"),
|
|
10723
|
-
requestInstance: requestInstance,
|
|
10724
|
-
onChange: _this.onModelsChanged
|
|
10725
|
-
}), /*#__PURE__*/React__default.createElement(MaterialSelector, {
|
|
10726
|
-
brands: brands,
|
|
10727
|
-
getGraphQuery: getMaterialsGraphQuery,
|
|
10728
|
-
graphApi: "".concat(baseGraphApi, "?id=getMaterials"),
|
|
10729
|
-
requestInstance: requestInstance,
|
|
10730
|
-
onChange: _this.onMaterialsChanged
|
|
10731
|
-
})), category_type === interestCategories.SHOES && /*#__PURE__*/React__default.createElement(WrappedShoeSizeSelector, {
|
|
10458
|
+
}), category_type === interestCategories.SHOES && /*#__PURE__*/React__default.createElement(WrappedShoeSizeSelector, {
|
|
10732
10459
|
defaultShoeSizeType: defaultShoeSizeType,
|
|
10733
10460
|
getGraphQuery: getShoesGraphQuery,
|
|
10734
10461
|
graphApi: "".concat(baseGraphApi, "?id=shoeSizeQuery"),
|
|
@@ -10742,10 +10469,7 @@
|
|
|
10742
10469
|
onChange: _this.onStylesChanged,
|
|
10743
10470
|
requestInstance: requestInstance,
|
|
10744
10471
|
graphApi: "".concat(baseGraphApi, "?id=getStyles"),
|
|
10745
|
-
getGraphQuery: getStylesGraphQuery
|
|
10746
|
-
brands: brands,
|
|
10747
|
-
models: models,
|
|
10748
|
-
materials: materials
|
|
10472
|
+
getGraphQuery: getStylesGraphQuery
|
|
10749
10473
|
})) : null, /*#__PURE__*/React__default.createElement(SaveAndCancelButtonContainer, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10750
10474
|
className: "fl-right"
|
|
10751
10475
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10802,10 +10526,6 @@
|
|
|
10802
10526
|
className: "heading-title"
|
|
10803
10527
|
}, "Style"), /*#__PURE__*/React__default.createElement("div", {
|
|
10804
10528
|
className: "heading-title"
|
|
10805
|
-
}, "Models"), /*#__PURE__*/React__default.createElement("div", {
|
|
10806
|
-
className: "heading-title"
|
|
10807
|
-
}, "Materials"), /*#__PURE__*/React__default.createElement("div", {
|
|
10808
|
-
className: "heading-title"
|
|
10809
10529
|
}, "Shoe Size")), /*#__PURE__*/React__default.createElement("div", {
|
|
10810
10530
|
className: "heading-title-empty"
|
|
10811
10531
|
}));
|
|
@@ -10896,8 +10616,6 @@
|
|
|
10896
10616
|
getBrandsGraphQuery = _this$props2.getBrandsGraphQuery,
|
|
10897
10617
|
getStylesGraphQuery = _this$props2.getStylesGraphQuery,
|
|
10898
10618
|
getShoesGraphQuery = _this$props2.getShoesGraphQuery,
|
|
10899
|
-
getModelsGraphQuery = _this$props2.getModelsGraphQuery,
|
|
10900
|
-
getMaterialsGraphQuery = _this$props2.getMaterialsGraphQuery,
|
|
10901
10619
|
deleteInterestApi = _this$props2.deleteInterestApi,
|
|
10902
10620
|
setSchedule = _this$props2.setSchedule,
|
|
10903
10621
|
getSchedule = _this$props2.getSchedule,
|
|
@@ -10931,9 +10649,7 @@
|
|
|
10931
10649
|
getBrandsGraphQuery: getBrandsGraphQuery,
|
|
10932
10650
|
getStylesGraphQuery: getStylesGraphQuery,
|
|
10933
10651
|
getShoesGraphQuery: getShoesGraphQuery,
|
|
10934
|
-
defaultShoeSizeType: defaultShoeSizeType
|
|
10935
|
-
getModelsGraphQuery: getModelsGraphQuery,
|
|
10936
|
-
getMaterialsGraphQuery: getMaterialsGraphQuery
|
|
10652
|
+
defaultShoeSizeType: defaultShoeSizeType
|
|
10937
10653
|
}), interests.length > 0 ? /*#__PURE__*/React__default.createElement(MyInterestTitleHeading$1, null) : '', /*#__PURE__*/React__default.createElement(LuxityPageReady, {
|
|
10938
10654
|
getRequestPromise: function getRequestPromise() {
|
|
10939
10655
|
return _this2.triggerInterestRequest();
|
|
@@ -11387,8 +11103,8 @@
|
|
|
11387
11103
|
GraphQLDropdownSelector.defaultProps = {
|
|
11388
11104
|
baseClass: 'multiselector'
|
|
11389
11105
|
};
|
|
11390
|
-
var
|
|
11106
|
+
var index$2 = themed(GraphQLDropdownSelector);
|
|
11391
11107
|
|
|
11392
|
-
return
|
|
11108
|
+
return index$2;
|
|
11393
11109
|
|
|
11394
11110
|
})));
|
package/InterestItem.js
CHANGED
|
@@ -479,22 +479,6 @@
|
|
|
479
479
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
480
480
|
key: "".concat(style.name, "-").concat(data.id)
|
|
481
481
|
}, style.name);
|
|
482
|
-
}) : 'All')), /*#__PURE__*/React__default.createElement("div", {
|
|
483
|
-
className: "interest-item__container_heading"
|
|
484
|
-
}, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Models:"), /*#__PURE__*/React__default.createElement("div", {
|
|
485
|
-
className: "list-items"
|
|
486
|
-
}, data.luxity_models != null && data.luxity_models.length > 0 ? data.luxity_models.map(function (model) {
|
|
487
|
-
return /*#__PURE__*/React__default.createElement("span", {
|
|
488
|
-
key: "".concat(model.name, "-").concat(data.id)
|
|
489
|
-
}, model.name);
|
|
490
|
-
}) : 'All')), /*#__PURE__*/React__default.createElement("div", {
|
|
491
|
-
className: "interest-item__container_heading"
|
|
492
|
-
}, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Materials:"), /*#__PURE__*/React__default.createElement("div", {
|
|
493
|
-
className: "list-items"
|
|
494
|
-
}, data.luxity_materials != null && data.luxity_materials.length > 0 ? data.luxity_materials.map(function (material) {
|
|
495
|
-
return /*#__PURE__*/React__default.createElement("span", {
|
|
496
|
-
key: "".concat(material.name, "-").concat(data.id)
|
|
497
|
-
}, material.name);
|
|
498
482
|
}) : 'All')), /*#__PURE__*/React__default.createElement("div", {
|
|
499
483
|
className: "interest-item__container_heading ".concat(data.category_type === interestCategories.SHOES ? '' : 'no-shoe-size-section')
|
|
500
484
|
}, data.category_type === interestCategories.SHOES ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(InterestItemTitle, null, "Shoe Size:"), /*#__PURE__*/React__default.createElement("div", {
|