@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,42 +9382,6 @@
|
|
|
9398
9382
|
|
|
9399
9383
|
var NotificationDropDown$1 = themed(NotificationDropDown);
|
|
9400
9384
|
|
|
9401
|
-
var BrandSelector = function BrandSelector(_ref) {
|
|
9402
|
-
var onChange = _ref.onChange,
|
|
9403
|
-
category = _ref.category,
|
|
9404
|
-
graphApi = _ref.graphApi,
|
|
9405
|
-
getGraphQuery = _ref.getGraphQuery,
|
|
9406
|
-
resultProcessor = _ref.resultProcessor,
|
|
9407
|
-
requestInstance = _ref.requestInstance;
|
|
9408
|
-
return /*#__PURE__*/React__default.createElement(LuxityGraphQLDropdownSelector, {
|
|
9409
|
-
baseQueryLimit: 9999,
|
|
9410
|
-
title: "Brands",
|
|
9411
|
-
queryId: "getBrands",
|
|
9412
|
-
baseClass: "brand-selector",
|
|
9413
|
-
identifier: "brand-selector",
|
|
9414
|
-
searchPlaceHolder: "Search brands",
|
|
9415
|
-
query_arguments: category,
|
|
9416
|
-
onChange: onChange,
|
|
9417
|
-
graphApi: graphApi,
|
|
9418
|
-
getGraphQuery: getGraphQuery,
|
|
9419
|
-
resultProcessor: resultProcessor,
|
|
9420
|
-
requestInstance: requestInstance
|
|
9421
|
-
});
|
|
9422
|
-
};
|
|
9423
|
-
|
|
9424
|
-
BrandSelector.defaultProps = {
|
|
9425
|
-
resultProcessor: function resultProcessor(result) {
|
|
9426
|
-
return result.data.data.luxity_brands.data.map(function (_ref2) {
|
|
9427
|
-
var id = _ref2.id,
|
|
9428
|
-
name = _ref2.name;
|
|
9429
|
-
return {
|
|
9430
|
-
label: name,
|
|
9431
|
-
value: id
|
|
9432
|
-
};
|
|
9433
|
-
});
|
|
9434
|
-
}
|
|
9435
|
-
};
|
|
9436
|
-
|
|
9437
9385
|
var _templateObject$E, _templateObject2$6;
|
|
9438
9386
|
var ALL_ITEM = {
|
|
9439
9387
|
id: 'ALL',
|
|
@@ -9766,10 +9714,7 @@
|
|
|
9766
9714
|
var _this$state = _this.state,
|
|
9767
9715
|
limit = _this$state.limit,
|
|
9768
9716
|
category = _this$state.category,
|
|
9769
|
-
nameFilter = _this$state.nameFilter
|
|
9770
|
-
brands = _this$state.brands,
|
|
9771
|
-
models = _this$state.models,
|
|
9772
|
-
materials = _this$state.materials;
|
|
9717
|
+
nameFilter = _this$state.nameFilter;
|
|
9773
9718
|
var _this$props = _this.props,
|
|
9774
9719
|
title = _this$props.title,
|
|
9775
9720
|
baseClass = _this$props.baseClass,
|
|
@@ -9790,10 +9735,10 @@
|
|
|
9790
9735
|
}), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
|
|
9791
9736
|
triggerRequest: function triggerRequest() {
|
|
9792
9737
|
return requestInstance.post(graphApi, {
|
|
9793
|
-
query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter
|
|
9738
|
+
query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter)
|
|
9794
9739
|
});
|
|
9795
9740
|
},
|
|
9796
|
-
graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter
|
|
9741
|
+
graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter),
|
|
9797
9742
|
identifier: identifier,
|
|
9798
9743
|
ref: _this.multiSelectorRef,
|
|
9799
9744
|
onChange: _this.onChange,
|
|
@@ -9806,9 +9751,6 @@
|
|
|
9806
9751
|
_this.state = {
|
|
9807
9752
|
limit: props.baseQueryLimit,
|
|
9808
9753
|
category: props.category,
|
|
9809
|
-
brands: props.brands,
|
|
9810
|
-
models: props.models,
|
|
9811
|
-
materials: props.materials,
|
|
9812
9754
|
nameFilter: ''
|
|
9813
9755
|
};
|
|
9814
9756
|
return _this;
|
|
@@ -9817,23 +9759,11 @@
|
|
|
9817
9759
|
_createClass(LuxityGraphQLMultiselector, [{
|
|
9818
9760
|
key: "componentDidUpdate",
|
|
9819
9761
|
value: function componentDidUpdate(prevProps) {
|
|
9820
|
-
var _this$multiSelectorRe
|
|
9762
|
+
var _this$multiSelectorRe;
|
|
9821
9763
|
|
|
9822
9764
|
if (prevProps.category !== this.props.category && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
|
|
9823
9765
|
this.multiSelectorRef.current.emptySelected();
|
|
9824
9766
|
}
|
|
9825
|
-
|
|
9826
|
-
if (prevProps.brands !== this.props.brands && (_this$multiSelectorRe2 = this.multiSelectorRef) !== null && _this$multiSelectorRe2 !== void 0 && _this$multiSelectorRe2.current) {
|
|
9827
|
-
this.multiSelectorRef.current.emptySelected();
|
|
9828
|
-
}
|
|
9829
|
-
|
|
9830
|
-
if (prevProps.models !== this.props.models && (_this$multiSelectorRe3 = this.multiSelectorRef) !== null && _this$multiSelectorRe3 !== void 0 && _this$multiSelectorRe3.current) {
|
|
9831
|
-
this.multiSelectorRef.current.emptySelected();
|
|
9832
|
-
}
|
|
9833
|
-
|
|
9834
|
-
if (prevProps.materials !== this.props.materials && (_this$multiSelectorRe4 = this.multiSelectorRef) !== null && _this$multiSelectorRe4 !== void 0 && _this$multiSelectorRe4.current) {
|
|
9835
|
-
this.multiSelectorRef.current.emptySelected();
|
|
9836
|
-
}
|
|
9837
9767
|
}
|
|
9838
9768
|
}], [{
|
|
9839
9769
|
key: "getDerivedStateFromProps",
|
|
@@ -9844,24 +9774,6 @@
|
|
|
9844
9774
|
};
|
|
9845
9775
|
}
|
|
9846
9776
|
|
|
9847
|
-
if (prevState.brands !== props.brands) {
|
|
9848
|
-
return {
|
|
9849
|
-
brands: props.brands
|
|
9850
|
-
};
|
|
9851
|
-
}
|
|
9852
|
-
|
|
9853
|
-
if (prevState.models !== props.models) {
|
|
9854
|
-
return {
|
|
9855
|
-
models: props.models
|
|
9856
|
-
};
|
|
9857
|
-
}
|
|
9858
|
-
|
|
9859
|
-
if (prevState.materials !== props.materials) {
|
|
9860
|
-
return {
|
|
9861
|
-
materials: props.materials
|
|
9862
|
-
};
|
|
9863
|
-
}
|
|
9864
|
-
|
|
9865
9777
|
return null;
|
|
9866
9778
|
}
|
|
9867
9779
|
}]);
|
|
@@ -9903,6 +9815,38 @@
|
|
|
9903
9815
|
return selected ? /*#__PURE__*/React__default.createElement(PrimaryButton$1, props, item.name) : /*#__PURE__*/React__default.createElement(UnselectedButton, props, item.name);
|
|
9904
9816
|
};
|
|
9905
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
|
+
|
|
9906
9850
|
var StyleSelector = function StyleSelector(_ref) {
|
|
9907
9851
|
var onChange = _ref.onChange,
|
|
9908
9852
|
category = _ref.category,
|
|
@@ -9910,10 +9854,7 @@
|
|
|
9910
9854
|
itemRenderer = _ref.itemRenderer,
|
|
9911
9855
|
getGraphQuery = _ref.getGraphQuery,
|
|
9912
9856
|
resultProcessor = _ref.resultProcessor,
|
|
9913
|
-
requestInstance = _ref.requestInstance
|
|
9914
|
-
brands = _ref.brands,
|
|
9915
|
-
models = _ref.models,
|
|
9916
|
-
materials = _ref.materials;
|
|
9857
|
+
requestInstance = _ref.requestInstance;
|
|
9917
9858
|
return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
|
|
9918
9859
|
title: "Styles",
|
|
9919
9860
|
queryId: "getStyles",
|
|
@@ -9922,9 +9863,6 @@
|
|
|
9922
9863
|
identifier: "style-selector",
|
|
9923
9864
|
searchPlaceHolder: "Search Styles",
|
|
9924
9865
|
category: category,
|
|
9925
|
-
brands: brands,
|
|
9926
|
-
models: models,
|
|
9927
|
-
materials: materials,
|
|
9928
9866
|
onChange: onChange,
|
|
9929
9867
|
graphApi: graphApi,
|
|
9930
9868
|
itemRenderer: itemRenderer,
|
|
@@ -10274,76 +10212,6 @@
|
|
|
10274
10212
|
}));
|
|
10275
10213
|
});
|
|
10276
10214
|
|
|
10277
|
-
var ModelSelector = function ModelSelector(_ref) {
|
|
10278
|
-
var onChange = _ref.onChange,
|
|
10279
|
-
brands = _ref.brands,
|
|
10280
|
-
graphApi = _ref.graphApi,
|
|
10281
|
-
getGraphQuery = _ref.getGraphQuery,
|
|
10282
|
-
resultProcessor = _ref.resultProcessor,
|
|
10283
|
-
requestInstance = _ref.requestInstance;
|
|
10284
|
-
return /*#__PURE__*/React__default.createElement(LuxityGraphQLDropdownSelector, {
|
|
10285
|
-
baseQueryLimit: 1000,
|
|
10286
|
-
title: "Models",
|
|
10287
|
-
queryId: "getModels",
|
|
10288
|
-
baseClass: "model-selector",
|
|
10289
|
-
identifier: "model-selector",
|
|
10290
|
-
query_arguments: brands,
|
|
10291
|
-
onChange: onChange,
|
|
10292
|
-
graphApi: graphApi,
|
|
10293
|
-
getGraphQuery: getGraphQuery,
|
|
10294
|
-
resultProcessor: resultProcessor,
|
|
10295
|
-
requestInstance: requestInstance
|
|
10296
|
-
});
|
|
10297
|
-
};
|
|
10298
|
-
|
|
10299
|
-
ModelSelector.defaultProps = {
|
|
10300
|
-
resultProcessor: function resultProcessor(result) {
|
|
10301
|
-
return result.data.data.luxity_models.data.map(function (_ref2) {
|
|
10302
|
-
var id = _ref2.id,
|
|
10303
|
-
name = _ref2.name;
|
|
10304
|
-
return {
|
|
10305
|
-
label: name,
|
|
10306
|
-
value: id
|
|
10307
|
-
};
|
|
10308
|
-
});
|
|
10309
|
-
}
|
|
10310
|
-
};
|
|
10311
|
-
|
|
10312
|
-
var MaterialSelector = function MaterialSelector(_ref) {
|
|
10313
|
-
var onChange = _ref.onChange,
|
|
10314
|
-
brands = _ref.brands,
|
|
10315
|
-
graphApi = _ref.graphApi,
|
|
10316
|
-
getGraphQuery = _ref.getGraphQuery,
|
|
10317
|
-
resultProcessor = _ref.resultProcessor,
|
|
10318
|
-
requestInstance = _ref.requestInstance;
|
|
10319
|
-
return /*#__PURE__*/React__default.createElement(LuxityGraphQLDropdownSelector, {
|
|
10320
|
-
baseQueryLimit: 1000,
|
|
10321
|
-
title: "Materials",
|
|
10322
|
-
queryId: "getMaterials",
|
|
10323
|
-
baseClass: "material-selector",
|
|
10324
|
-
identifier: "material-selector",
|
|
10325
|
-
query_arguments: brands,
|
|
10326
|
-
onChange: onChange,
|
|
10327
|
-
graphApi: graphApi,
|
|
10328
|
-
getGraphQuery: getGraphQuery,
|
|
10329
|
-
resultProcessor: resultProcessor,
|
|
10330
|
-
requestInstance: requestInstance
|
|
10331
|
-
});
|
|
10332
|
-
};
|
|
10333
|
-
|
|
10334
|
-
MaterialSelector.defaultProps = {
|
|
10335
|
-
resultProcessor: function resultProcessor(result) {
|
|
10336
|
-
return result.data.data.luxity_materials.data.map(function (_ref2) {
|
|
10337
|
-
var id = _ref2.id,
|
|
10338
|
-
name = _ref2.name;
|
|
10339
|
-
return {
|
|
10340
|
-
label: name,
|
|
10341
|
-
value: id
|
|
10342
|
-
};
|
|
10343
|
-
});
|
|
10344
|
-
}
|
|
10345
|
-
};
|
|
10346
|
-
|
|
10347
10215
|
var _templateObject$K, _templateObject2$9, _templateObject3$4, _templateObject4$3, _templateObject5$1;
|
|
10348
10216
|
var UNISEX$1 = genders.UNISEX;
|
|
10349
10217
|
var AddInterestContainer = styled__default.div(_templateObject$K || (_templateObject$K = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n border: 1px solid ", ";\n padding: ", ";\n"])), function (props) {
|
|
@@ -10395,9 +10263,7 @@
|
|
|
10395
10263
|
styles: [],
|
|
10396
10264
|
gender: [],
|
|
10397
10265
|
request: _objectSpread2({}, request),
|
|
10398
|
-
isCategoriesShown: false
|
|
10399
|
-
models: [],
|
|
10400
|
-
materials: []
|
|
10266
|
+
isCategoriesShown: false
|
|
10401
10267
|
};
|
|
10402
10268
|
/**
|
|
10403
10269
|
* Generates Interest UI and submits graph payloads as a highly specialised component
|
|
@@ -10451,9 +10317,8 @@
|
|
|
10451
10317
|
_defineProperty(_assertThisInitialized(_this), "onBrandsChanged", function (brandsArray) {
|
|
10452
10318
|
_this.setState({
|
|
10453
10319
|
brands: brandsArray.map(function (brand) {
|
|
10454
|
-
return brand.
|
|
10455
|
-
})
|
|
10456
|
-
styles: []
|
|
10320
|
+
return brand.id;
|
|
10321
|
+
})
|
|
10457
10322
|
});
|
|
10458
10323
|
});
|
|
10459
10324
|
|
|
@@ -10473,24 +10338,6 @@
|
|
|
10473
10338
|
});
|
|
10474
10339
|
});
|
|
10475
10340
|
|
|
10476
|
-
_defineProperty(_assertThisInitialized(_this), "onModelsChanged", function (modelsArray) {
|
|
10477
|
-
_this.setState({
|
|
10478
|
-
models: modelsArray.map(function (model) {
|
|
10479
|
-
return model.value;
|
|
10480
|
-
}),
|
|
10481
|
-
styles: []
|
|
10482
|
-
});
|
|
10483
|
-
});
|
|
10484
|
-
|
|
10485
|
-
_defineProperty(_assertThisInitialized(_this), "onMaterialsChanged", function (materialsArray) {
|
|
10486
|
-
_this.setState({
|
|
10487
|
-
materials: materialsArray.map(function (material) {
|
|
10488
|
-
return material.value;
|
|
10489
|
-
}),
|
|
10490
|
-
styles: []
|
|
10491
|
-
});
|
|
10492
|
-
});
|
|
10493
|
-
|
|
10494
10341
|
_defineProperty(_assertThisInitialized(_this), "payloadIsValid", function () {
|
|
10495
10342
|
// price/shoe-size always have initial values as soon as category is set
|
|
10496
10343
|
var category_type = _this.state.category_type;
|
|
@@ -10514,9 +10361,7 @@
|
|
|
10514
10361
|
styles = _this$state.styles,
|
|
10515
10362
|
category_type = _this$state.category_type,
|
|
10516
10363
|
requestState = _this$state.request,
|
|
10517
|
-
gender = _this$state.gender
|
|
10518
|
-
models = _this$state.models,
|
|
10519
|
-
materials = _this$state.materials;
|
|
10364
|
+
gender = _this$state.gender;
|
|
10520
10365
|
var payloadGender = gender[0];
|
|
10521
10366
|
|
|
10522
10367
|
if (gender.length > 1 || !gender.length) {
|
|
@@ -10530,9 +10375,7 @@
|
|
|
10530
10375
|
max_price: max_price,
|
|
10531
10376
|
styles: styles,
|
|
10532
10377
|
gender: payloadGender,
|
|
10533
|
-
request: requestState
|
|
10534
|
-
models: models,
|
|
10535
|
-
materials: materials
|
|
10378
|
+
request: requestState
|
|
10536
10379
|
};
|
|
10537
10380
|
var shoeSizesPayload = category_type === interestCategories.SHOES ? {
|
|
10538
10381
|
min_shoe_size_id: min_shoe_size_id,
|
|
@@ -10589,19 +10432,14 @@
|
|
|
10589
10432
|
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
10590
10433
|
var _this$state2 = _this.state,
|
|
10591
10434
|
category_type = _this$state2.category_type,
|
|
10592
|
-
fetching = _this$state2.request.fetching
|
|
10593
|
-
brands = _this$state2.brands,
|
|
10594
|
-
models = _this$state2.models,
|
|
10595
|
-
materials = _this$state2.materials;
|
|
10435
|
+
fetching = _this$state2.request.fetching;
|
|
10596
10436
|
var _this$props = _this.props,
|
|
10597
10437
|
requestInstance = _this$props.requestInstance,
|
|
10598
10438
|
baseGraphApi = _this$props.baseGraphApi,
|
|
10599
10439
|
getBrandsGraphQuery = _this$props.getBrandsGraphQuery,
|
|
10600
10440
|
getStylesGraphQuery = _this$props.getStylesGraphQuery,
|
|
10601
10441
|
getShoesGraphQuery = _this$props.getShoesGraphQuery,
|
|
10602
|
-
defaultShoeSizeType = _this$props.defaultShoeSizeType
|
|
10603
|
-
getModelsGraphQuery = _this$props.getModelsGraphQuery,
|
|
10604
|
-
getMaterialsGraphQuery = _this$props.getMaterialsGraphQuery;
|
|
10442
|
+
defaultShoeSizeType = _this$props.defaultShoeSizeType;
|
|
10605
10443
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, !_this.state.isCategoriesShown && /*#__PURE__*/React__default.createElement(AddInterestButtonContainer, {
|
|
10606
10444
|
onClick: _this.onAddInterestClick
|
|
10607
10445
|
}, /*#__PURE__*/React__default.createElement(AddInterestButton, null, "Add Interest"), /*#__PURE__*/React__default.createElement(AddIcon, {
|
|
@@ -10617,19 +10455,7 @@
|
|
|
10617
10455
|
requestInstance: requestInstance,
|
|
10618
10456
|
graphApi: "".concat(baseGraphApi, "?id=getBrands"),
|
|
10619
10457
|
getGraphQuery: getBrandsGraphQuery
|
|
10620
|
-
}),
|
|
10621
|
-
brands: brands,
|
|
10622
|
-
getGraphQuery: getModelsGraphQuery,
|
|
10623
|
-
graphApi: "".concat(baseGraphApi, "?id=getModels"),
|
|
10624
|
-
requestInstance: requestInstance,
|
|
10625
|
-
onChange: _this.onModelsChanged
|
|
10626
|
-
}), /*#__PURE__*/React__default.createElement(MaterialSelector, {
|
|
10627
|
-
brands: brands,
|
|
10628
|
-
getGraphQuery: getMaterialsGraphQuery,
|
|
10629
|
-
graphApi: "".concat(baseGraphApi, "?id=getMaterials"),
|
|
10630
|
-
requestInstance: requestInstance,
|
|
10631
|
-
onChange: _this.onMaterialsChanged
|
|
10632
|
-
})), category_type === interestCategories.SHOES && /*#__PURE__*/React__default.createElement(WrappedShoeSizeSelector, {
|
|
10458
|
+
}), category_type === interestCategories.SHOES && /*#__PURE__*/React__default.createElement(WrappedShoeSizeSelector, {
|
|
10633
10459
|
defaultShoeSizeType: defaultShoeSizeType,
|
|
10634
10460
|
getGraphQuery: getShoesGraphQuery,
|
|
10635
10461
|
graphApi: "".concat(baseGraphApi, "?id=shoeSizeQuery"),
|
|
@@ -10643,10 +10469,7 @@
|
|
|
10643
10469
|
onChange: _this.onStylesChanged,
|
|
10644
10470
|
requestInstance: requestInstance,
|
|
10645
10471
|
graphApi: "".concat(baseGraphApi, "?id=getStyles"),
|
|
10646
|
-
getGraphQuery: getStylesGraphQuery
|
|
10647
|
-
brands: brands,
|
|
10648
|
-
models: models,
|
|
10649
|
-
materials: materials
|
|
10472
|
+
getGraphQuery: getStylesGraphQuery
|
|
10650
10473
|
})) : null, /*#__PURE__*/React__default.createElement(SaveAndCancelButtonContainer, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10651
10474
|
className: "fl-right"
|
|
10652
10475
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10703,10 +10526,6 @@
|
|
|
10703
10526
|
className: "heading-title"
|
|
10704
10527
|
}, "Style"), /*#__PURE__*/React__default.createElement("div", {
|
|
10705
10528
|
className: "heading-title"
|
|
10706
|
-
}, "Models"), /*#__PURE__*/React__default.createElement("div", {
|
|
10707
|
-
className: "heading-title"
|
|
10708
|
-
}, "Materials"), /*#__PURE__*/React__default.createElement("div", {
|
|
10709
|
-
className: "heading-title"
|
|
10710
10529
|
}, "Shoe Size")), /*#__PURE__*/React__default.createElement("div", {
|
|
10711
10530
|
className: "heading-title-empty"
|
|
10712
10531
|
}));
|
|
@@ -10797,8 +10616,6 @@
|
|
|
10797
10616
|
getBrandsGraphQuery = _this$props2.getBrandsGraphQuery,
|
|
10798
10617
|
getStylesGraphQuery = _this$props2.getStylesGraphQuery,
|
|
10799
10618
|
getShoesGraphQuery = _this$props2.getShoesGraphQuery,
|
|
10800
|
-
getModelsGraphQuery = _this$props2.getModelsGraphQuery,
|
|
10801
|
-
getMaterialsGraphQuery = _this$props2.getMaterialsGraphQuery,
|
|
10802
10619
|
deleteInterestApi = _this$props2.deleteInterestApi,
|
|
10803
10620
|
setSchedule = _this$props2.setSchedule,
|
|
10804
10621
|
getSchedule = _this$props2.getSchedule,
|
|
@@ -10832,9 +10649,7 @@
|
|
|
10832
10649
|
getBrandsGraphQuery: getBrandsGraphQuery,
|
|
10833
10650
|
getStylesGraphQuery: getStylesGraphQuery,
|
|
10834
10651
|
getShoesGraphQuery: getShoesGraphQuery,
|
|
10835
|
-
defaultShoeSizeType: defaultShoeSizeType
|
|
10836
|
-
getModelsGraphQuery: getModelsGraphQuery,
|
|
10837
|
-
getMaterialsGraphQuery: getMaterialsGraphQuery
|
|
10652
|
+
defaultShoeSizeType: defaultShoeSizeType
|
|
10838
10653
|
}), interests.length > 0 ? /*#__PURE__*/React__default.createElement(MyInterestTitleHeading$1, null) : '', /*#__PURE__*/React__default.createElement(LuxityPageReady, {
|
|
10839
10654
|
getRequestPromise: function getRequestPromise() {
|
|
10840
10655
|
return _this2.triggerInterestRequest();
|
|
@@ -817,10 +817,7 @@
|
|
|
817
817
|
var _this$state = _this.state,
|
|
818
818
|
limit = _this$state.limit,
|
|
819
819
|
category = _this$state.category,
|
|
820
|
-
nameFilter = _this$state.nameFilter
|
|
821
|
-
brands = _this$state.brands,
|
|
822
|
-
models = _this$state.models,
|
|
823
|
-
materials = _this$state.materials;
|
|
820
|
+
nameFilter = _this$state.nameFilter;
|
|
824
821
|
var _this$props = _this.props,
|
|
825
822
|
title = _this$props.title,
|
|
826
823
|
baseClass = _this$props.baseClass,
|
|
@@ -841,10 +838,10 @@
|
|
|
841
838
|
}), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
|
|
842
839
|
triggerRequest: function triggerRequest() {
|
|
843
840
|
return requestInstance.post(graphApi, {
|
|
844
|
-
query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter
|
|
841
|
+
query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter)
|
|
845
842
|
});
|
|
846
843
|
},
|
|
847
|
-
graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter
|
|
844
|
+
graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter),
|
|
848
845
|
identifier: identifier,
|
|
849
846
|
ref: _this.multiSelectorRef,
|
|
850
847
|
onChange: _this.onChange,
|
|
@@ -857,9 +854,6 @@
|
|
|
857
854
|
_this.state = {
|
|
858
855
|
limit: props.baseQueryLimit,
|
|
859
856
|
category: props.category,
|
|
860
|
-
brands: props.brands,
|
|
861
|
-
models: props.models,
|
|
862
|
-
materials: props.materials,
|
|
863
857
|
nameFilter: ''
|
|
864
858
|
};
|
|
865
859
|
return _this;
|
|
@@ -868,23 +862,11 @@
|
|
|
868
862
|
_createClass(LuxityGraphQLMultiselector, [{
|
|
869
863
|
key: "componentDidUpdate",
|
|
870
864
|
value: function componentDidUpdate(prevProps) {
|
|
871
|
-
var _this$multiSelectorRe
|
|
865
|
+
var _this$multiSelectorRe;
|
|
872
866
|
|
|
873
867
|
if (prevProps.category !== this.props.category && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
|
|
874
868
|
this.multiSelectorRef.current.emptySelected();
|
|
875
869
|
}
|
|
876
|
-
|
|
877
|
-
if (prevProps.brands !== this.props.brands && (_this$multiSelectorRe2 = this.multiSelectorRef) !== null && _this$multiSelectorRe2 !== void 0 && _this$multiSelectorRe2.current) {
|
|
878
|
-
this.multiSelectorRef.current.emptySelected();
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
if (prevProps.models !== this.props.models && (_this$multiSelectorRe3 = this.multiSelectorRef) !== null && _this$multiSelectorRe3 !== void 0 && _this$multiSelectorRe3.current) {
|
|
882
|
-
this.multiSelectorRef.current.emptySelected();
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
if (prevProps.materials !== this.props.materials && (_this$multiSelectorRe4 = this.multiSelectorRef) !== null && _this$multiSelectorRe4 !== void 0 && _this$multiSelectorRe4.current) {
|
|
886
|
-
this.multiSelectorRef.current.emptySelected();
|
|
887
|
-
}
|
|
888
870
|
}
|
|
889
871
|
}], [{
|
|
890
872
|
key: "getDerivedStateFromProps",
|
|
@@ -895,24 +877,6 @@
|
|
|
895
877
|
};
|
|
896
878
|
}
|
|
897
879
|
|
|
898
|
-
if (prevState.brands !== props.brands) {
|
|
899
|
-
return {
|
|
900
|
-
brands: props.brands
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
if (prevState.models !== props.models) {
|
|
905
|
-
return {
|
|
906
|
-
models: props.models
|
|
907
|
-
};
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
if (prevState.materials !== props.materials) {
|
|
911
|
-
return {
|
|
912
|
-
materials: props.materials
|
|
913
|
-
};
|
|
914
|
-
}
|
|
915
|
-
|
|
916
880
|
return null;
|
|
917
881
|
}
|
|
918
882
|
}]);
|