@bonlineza/luxity-lib 2.17.4 → 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/StyleSelector.js CHANGED
@@ -817,7 +817,10 @@
817
817
  var _this$state = _this.state,
818
818
  limit = _this$state.limit,
819
819
  category = _this$state.category,
820
- nameFilter = _this$state.nameFilter;
820
+ nameFilter = _this$state.nameFilter,
821
+ brands = _this$state.brands,
822
+ models = _this$state.models,
823
+ materials = _this$state.materials;
821
824
  var _this$props = _this.props,
822
825
  title = _this$props.title,
823
826
  baseClass = _this$props.baseClass,
@@ -838,10 +841,10 @@
838
841
  }), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
839
842
  triggerRequest: function triggerRequest() {
840
843
  return requestInstance.post(graphApi, {
841
- query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter)
844
+ query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter, brands, models, materials)
842
845
  });
843
846
  },
844
- graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter),
847
+ graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter, brands, models, materials),
845
848
  identifier: identifier,
846
849
  ref: _this.multiSelectorRef,
847
850
  onChange: _this.onChange,
@@ -854,6 +857,9 @@
854
857
  _this.state = {
855
858
  limit: props.baseQueryLimit,
856
859
  category: props.category,
860
+ brands: props.brands,
861
+ models: props.models,
862
+ materials: props.materials,
857
863
  nameFilter: ''
858
864
  };
859
865
  return _this;
@@ -862,11 +868,23 @@
862
868
  _createClass(LuxityGraphQLMultiselector, [{
863
869
  key: "componentDidUpdate",
864
870
  value: function componentDidUpdate(prevProps) {
865
- var _this$multiSelectorRe;
871
+ var _this$multiSelectorRe, _this$multiSelectorRe2, _this$multiSelectorRe3, _this$multiSelectorRe4;
866
872
 
867
873
  if (prevProps.category !== this.props.category && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
868
874
  this.multiSelectorRef.current.emptySelected();
869
875
  }
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
+ }
870
888
  }
871
889
  }], [{
872
890
  key: "getDerivedStateFromProps",
@@ -877,6 +895,24 @@
877
895
  };
878
896
  }
879
897
 
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
+
880
916
  return null;
881
917
  }
882
918
  }]);
@@ -947,7 +983,10 @@
947
983
  itemRenderer = _ref.itemRenderer,
948
984
  getGraphQuery = _ref.getGraphQuery,
949
985
  resultProcessor = _ref.resultProcessor,
950
- requestInstance = _ref.requestInstance;
986
+ requestInstance = _ref.requestInstance,
987
+ brands = _ref.brands,
988
+ models = _ref.models,
989
+ materials = _ref.materials;
951
990
  return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
952
991
  title: "Styles",
953
992
  queryId: "getStyles",
@@ -956,6 +995,9 @@
956
995
  identifier: "style-selector",
957
996
  searchPlaceHolder: "Search Styles",
958
997
  category: category,
998
+ brands: brands,
999
+ models: models,
1000
+ materials: materials,
959
1001
  onChange: onChange,
960
1002
  graphApi: graphApi,
961
1003
  itemRenderer: itemRenderer,
package/build/bundle.js CHANGED
@@ -1964,7 +1964,6 @@
1964
1964
  return React__default.createElement("input", __assign({}, inputProps));
1965
1965
  });
1966
1966
  CurrencyInput.displayName = 'CurrencyInput';
1967
- //# sourceMappingURL=index.esm.js.map
1968
1967
 
1969
1968
  var _excluded$5 = ["value", "onChange", "prefix", "allowNegativeValue", "groupSeparator", "decimalSeparator"];
1970
1969
  var unMask = function unMask() {
@@ -10898,7 +10897,10 @@
10898
10897
  var _this$state = _this.state,
10899
10898
  limit = _this$state.limit,
10900
10899
  category = _this$state.category,
10901
- nameFilter = _this$state.nameFilter;
10900
+ nameFilter = _this$state.nameFilter,
10901
+ brands = _this$state.brands,
10902
+ models = _this$state.models,
10903
+ materials = _this$state.materials;
10902
10904
  var _this$props = _this.props,
10903
10905
  title = _this$props.title,
10904
10906
  baseClass = _this$props.baseClass,
@@ -10919,10 +10921,10 @@
10919
10921
  }), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
10920
10922
  triggerRequest: function triggerRequest() {
10921
10923
  return requestInstance.post(graphApi, {
10922
- query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter)
10924
+ query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter, brands, models, materials)
10923
10925
  });
10924
10926
  },
10925
- graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter),
10927
+ graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter, brands, models, materials),
10926
10928
  identifier: identifier,
10927
10929
  ref: _this.multiSelectorRef,
10928
10930
  onChange: _this.onChange,
@@ -10935,6 +10937,9 @@
10935
10937
  _this.state = {
10936
10938
  limit: props.baseQueryLimit,
10937
10939
  category: props.category,
10940
+ brands: props.brands,
10941
+ models: props.models,
10942
+ materials: props.materials,
10938
10943
  nameFilter: ''
10939
10944
  };
10940
10945
  return _this;
@@ -10943,11 +10948,23 @@
10943
10948
  _createClass(LuxityGraphQLMultiselector, [{
10944
10949
  key: "componentDidUpdate",
10945
10950
  value: function componentDidUpdate(prevProps) {
10946
- var _this$multiSelectorRe;
10951
+ var _this$multiSelectorRe, _this$multiSelectorRe2, _this$multiSelectorRe3, _this$multiSelectorRe4;
10947
10952
 
10948
10953
  if (prevProps.category !== this.props.category && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
10949
10954
  this.multiSelectorRef.current.emptySelected();
10950
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
+ }
10951
10968
  }
10952
10969
  }], [{
10953
10970
  key: "getDerivedStateFromProps",
@@ -10958,6 +10975,24 @@
10958
10975
  };
10959
10976
  }
10960
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
+
10961
10996
  return null;
10962
10997
  }
10963
10998
  }]);
@@ -11006,7 +11041,10 @@
11006
11041
  itemRenderer = _ref.itemRenderer,
11007
11042
  getGraphQuery = _ref.getGraphQuery,
11008
11043
  resultProcessor = _ref.resultProcessor,
11009
- requestInstance = _ref.requestInstance;
11044
+ requestInstance = _ref.requestInstance,
11045
+ brands = _ref.brands,
11046
+ models = _ref.models,
11047
+ materials = _ref.materials;
11010
11048
  return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
11011
11049
  title: "Styles",
11012
11050
  queryId: "getStyles",
@@ -11015,6 +11053,9 @@
11015
11053
  identifier: "style-selector",
11016
11054
  searchPlaceHolder: "Search Styles",
11017
11055
  category: category,
11056
+ brands: brands,
11057
+ models: models,
11058
+ materials: materials,
11018
11059
  onChange: onChange,
11019
11060
  graphApi: graphApi,
11020
11061
  itemRenderer: itemRenderer,
@@ -11542,7 +11583,8 @@
11542
11583
  _this.setState({
11543
11584
  brands: brandsArray.map(function (brand) {
11544
11585
  return brand.value;
11545
- })
11586
+ }),
11587
+ styles: []
11546
11588
  });
11547
11589
  });
11548
11590
 
@@ -11566,7 +11608,8 @@
11566
11608
  _this.setState({
11567
11609
  models: modelsArray.map(function (model) {
11568
11610
  return model.value;
11569
- })
11611
+ }),
11612
+ styles: []
11570
11613
  });
11571
11614
  });
11572
11615
 
@@ -11574,7 +11617,8 @@
11574
11617
  _this.setState({
11575
11618
  materials: materialsArray.map(function (material) {
11576
11619
  return material.value;
11577
- })
11620
+ }),
11621
+ styles: []
11578
11622
  });
11579
11623
  });
11580
11624
 
@@ -11677,7 +11721,9 @@
11677
11721
  var _this$state2 = _this.state,
11678
11722
  category_type = _this$state2.category_type,
11679
11723
  fetching = _this$state2.request.fetching,
11680
- brands = _this$state2.brands;
11724
+ brands = _this$state2.brands,
11725
+ models = _this$state2.models,
11726
+ materials = _this$state2.materials;
11681
11727
  var _this$props = _this.props,
11682
11728
  requestInstance = _this$props.requestInstance,
11683
11729
  baseGraphApi = _this$props.baseGraphApi,
@@ -11728,7 +11774,10 @@
11728
11774
  onChange: _this.onStylesChanged,
11729
11775
  requestInstance: requestInstance,
11730
11776
  graphApi: "".concat(baseGraphApi, "?id=getStyles"),
11731
- getGraphQuery: getStylesGraphQuery
11777
+ getGraphQuery: getStylesGraphQuery,
11778
+ brands: brands,
11779
+ models: models,
11780
+ materials: materials
11732
11781
  })) : null, /*#__PURE__*/React__default.createElement(SaveAndCancelButtonContainer, null, /*#__PURE__*/React__default.createElement("div", {
11733
11782
  className: "fl-right"
11734
11783
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -12723,10 +12772,12 @@
12723
12772
  }), /*#__PURE__*/React__default.createElement(FooterTitleLink, {
12724
12773
  className: "footer__link"
12725
12774
  }, "Connect"), /*#__PURE__*/React__default.createElement(SocialIconWrapper, null, /*#__PURE__*/React__default.createElement(FooterLink, {
12775
+ target: "_blank",
12726
12776
  href: facebookUrl
12727
12777
  }, /*#__PURE__*/React__default.createElement(SocialIcon, {
12728
12778
  src: facebookIconUrl
12729
12779
  })), /*#__PURE__*/React__default.createElement(FooterLink, {
12780
+ target: "_blank",
12730
12781
  href: instagramUrl
12731
12782
  }, /*#__PURE__*/React__default.createElement(SocialIcon, {
12732
12783
  src: instagramImageUrl
@@ -12754,10 +12805,12 @@
12754
12805
  className: "footer__links",
12755
12806
  key: index
12756
12807
  }, /*#__PURE__*/React__default.createElement(FooterTitleLink, {
12808
+ target: footerLink !== null && footerLink !== void 0 && footerLink.openInNewTab ? '_blank' : '_self',
12757
12809
  className: "footer__link",
12758
12810
  href: footerLink.url
12759
12811
  }, footerLink.title), footerLink.links.map(function (link, linkIndex) {
12760
12812
  return /*#__PURE__*/React__default.createElement(FooterLink, {
12813
+ target: footerLink !== null && footerLink !== void 0 && footerLink.openInNewTab ? '_blank' : '_self',
12761
12814
  className: "footer__link",
12762
12815
  href: link.url,
12763
12816
  key: linkIndex
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonlineza/luxity-lib",
3
- "version": "2.17.4",
3
+ "version": "2.18.0",
4
4
  "scripts": {
5
5
  "start": "start-storybook -p 9001 -c .storybook -s ./public",
6
6
  "clean": "rimraf ./build/*.*",