@bonlineza/luxity-lib 2.17.5 → 2.18.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/build/bundle.js CHANGED
@@ -10897,7 +10897,10 @@
10897
10897
  var _this$state = _this.state,
10898
10898
  limit = _this$state.limit,
10899
10899
  category = _this$state.category,
10900
- nameFilter = _this$state.nameFilter;
10900
+ nameFilter = _this$state.nameFilter,
10901
+ brands = _this$state.brands,
10902
+ models = _this$state.models,
10903
+ materials = _this$state.materials;
10901
10904
  var _this$props = _this.props,
10902
10905
  title = _this$props.title,
10903
10906
  baseClass = _this$props.baseClass,
@@ -10918,10 +10921,10 @@
10918
10921
  }), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
10919
10922
  triggerRequest: function triggerRequest() {
10920
10923
  return requestInstance.post(graphApi, {
10921
- query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter)
10924
+ query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter, brands, models, materials)
10922
10925
  });
10923
10926
  },
10924
- graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter),
10927
+ graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter, brands, models, materials),
10925
10928
  identifier: identifier,
10926
10929
  ref: _this.multiSelectorRef,
10927
10930
  onChange: _this.onChange,
@@ -10934,6 +10937,9 @@
10934
10937
  _this.state = {
10935
10938
  limit: props.baseQueryLimit,
10936
10939
  category: props.category,
10940
+ brands: props.brands,
10941
+ models: props.models,
10942
+ materials: props.materials,
10937
10943
  nameFilter: ''
10938
10944
  };
10939
10945
  return _this;
@@ -10942,11 +10948,23 @@
10942
10948
  _createClass(LuxityGraphQLMultiselector, [{
10943
10949
  key: "componentDidUpdate",
10944
10950
  value: function componentDidUpdate(prevProps) {
10945
- var _this$multiSelectorRe;
10951
+ var _this$multiSelectorRe, _this$multiSelectorRe2, _this$multiSelectorRe3, _this$multiSelectorRe4;
10946
10952
 
10947
10953
  if (prevProps.category !== this.props.category && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
10948
10954
  this.multiSelectorRef.current.emptySelected();
10949
10955
  }
10956
+
10957
+ if (prevProps.brands !== this.props.brands && (_this$multiSelectorRe2 = this.multiSelectorRef) !== null && _this$multiSelectorRe2 !== void 0 && _this$multiSelectorRe2.current) {
10958
+ this.multiSelectorRef.current.emptySelected();
10959
+ }
10960
+
10961
+ if (prevProps.models !== this.props.models && (_this$multiSelectorRe3 = this.multiSelectorRef) !== null && _this$multiSelectorRe3 !== void 0 && _this$multiSelectorRe3.current) {
10962
+ this.multiSelectorRef.current.emptySelected();
10963
+ }
10964
+
10965
+ if (prevProps.materials !== this.props.materials && (_this$multiSelectorRe4 = this.multiSelectorRef) !== null && _this$multiSelectorRe4 !== void 0 && _this$multiSelectorRe4.current) {
10966
+ this.multiSelectorRef.current.emptySelected();
10967
+ }
10950
10968
  }
10951
10969
  }], [{
10952
10970
  key: "getDerivedStateFromProps",
@@ -10957,6 +10975,24 @@
10957
10975
  };
10958
10976
  }
10959
10977
 
10978
+ if (prevState.brands !== props.brands) {
10979
+ return {
10980
+ brands: props.brands
10981
+ };
10982
+ }
10983
+
10984
+ if (prevState.models !== props.models) {
10985
+ return {
10986
+ models: props.models
10987
+ };
10988
+ }
10989
+
10990
+ if (prevState.materials !== props.materials) {
10991
+ return {
10992
+ materials: props.materials
10993
+ };
10994
+ }
10995
+
10960
10996
  return null;
10961
10997
  }
10962
10998
  }]);
@@ -11005,7 +11041,10 @@
11005
11041
  itemRenderer = _ref.itemRenderer,
11006
11042
  getGraphQuery = _ref.getGraphQuery,
11007
11043
  resultProcessor = _ref.resultProcessor,
11008
- requestInstance = _ref.requestInstance;
11044
+ requestInstance = _ref.requestInstance,
11045
+ brands = _ref.brands,
11046
+ models = _ref.models,
11047
+ materials = _ref.materials;
11009
11048
  return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
11010
11049
  title: "Styles",
11011
11050
  queryId: "getStyles",
@@ -11014,6 +11053,9 @@
11014
11053
  identifier: "style-selector",
11015
11054
  searchPlaceHolder: "Search Styles",
11016
11055
  category: category,
11056
+ brands: brands,
11057
+ models: models,
11058
+ materials: materials,
11017
11059
  onChange: onChange,
11018
11060
  graphApi: graphApi,
11019
11061
  itemRenderer: itemRenderer,
@@ -11541,7 +11583,8 @@
11541
11583
  _this.setState({
11542
11584
  brands: brandsArray.map(function (brand) {
11543
11585
  return brand.value;
11544
- })
11586
+ }),
11587
+ styles: []
11545
11588
  });
11546
11589
  });
11547
11590
 
@@ -11565,7 +11608,8 @@
11565
11608
  _this.setState({
11566
11609
  models: modelsArray.map(function (model) {
11567
11610
  return model.value;
11568
- })
11611
+ }),
11612
+ styles: []
11569
11613
  });
11570
11614
  });
11571
11615
 
@@ -11573,7 +11617,8 @@
11573
11617
  _this.setState({
11574
11618
  materials: materialsArray.map(function (material) {
11575
11619
  return material.value;
11576
- })
11620
+ }),
11621
+ styles: []
11577
11622
  });
11578
11623
  });
11579
11624
 
@@ -11676,7 +11721,9 @@
11676
11721
  var _this$state2 = _this.state,
11677
11722
  category_type = _this$state2.category_type,
11678
11723
  fetching = _this$state2.request.fetching,
11679
- brands = _this$state2.brands;
11724
+ brands = _this$state2.brands,
11725
+ models = _this$state2.models,
11726
+ materials = _this$state2.materials;
11680
11727
  var _this$props = _this.props,
11681
11728
  requestInstance = _this$props.requestInstance,
11682
11729
  baseGraphApi = _this$props.baseGraphApi,
@@ -11727,7 +11774,10 @@
11727
11774
  onChange: _this.onStylesChanged,
11728
11775
  requestInstance: requestInstance,
11729
11776
  graphApi: "".concat(baseGraphApi, "?id=getStyles"),
11730
- getGraphQuery: getStylesGraphQuery
11777
+ getGraphQuery: getStylesGraphQuery,
11778
+ brands: brands,
11779
+ models: models,
11780
+ materials: materials
11731
11781
  })) : null, /*#__PURE__*/React__default.createElement(SaveAndCancelButtonContainer, null, /*#__PURE__*/React__default.createElement("div", {
11732
11782
  className: "fl-right"
11733
11783
  }, /*#__PURE__*/React__default.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonlineza/luxity-lib",
3
- "version": "2.17.5",
3
+ "version": "2.18.0",
4
4
  "scripts": {
5
5
  "start": "start-storybook -p 9001 -c .storybook -s ./public",
6
6
  "clean": "rimraf ./build/*.*",