@bonlineza/luxity-lib 2.28.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/CHANGELOG.md ADDED
@@ -0,0 +1,272 @@
1
+ ## Changelog
2
+
3
+ ### 2.28.0
4
+ - Removed models and materials filtering from `Style Selector`
5
+ - Showing brands as multiselect instead of dropdown on `Add Interest` form
6
+
7
+ ### 2.28.0
8
+ Removed models and materials select from `Add Interest`
9
+
10
+ ### 2.27.0
11
+ Add click event on Sidebar of `Rarestep Header`
12
+
13
+ ### 2.26.0
14
+ Once user click on Menu Items Nav will closed `Rarestep Header`
15
+
16
+ ### 2.25.0
17
+ User icon show when it present in `Rarestep Header`
18
+
19
+ ### 2.24.0
20
+ Reduce padding and size of X of `Rarestep Header`
21
+
22
+ ### 2.23.0
23
+ - All items are capitalize headers in `RarestepHeader`
24
+
25
+ ### 2.22.0
26
+ - Add More Navigation Specific for `RarestepHeader`
27
+
28
+ ### 2.21.0
29
+ - Capitalize all headers in `RarestepHeader`
30
+
31
+ ### 2.20.0
32
+ - Move rarestep dropdown brands to header
33
+
34
+ ### 2.19.0
35
+ - Show tiktok icon on `RareStepFooter`
36
+
37
+ ### 2.18.5
38
+ - Allow `RareStepHeader` brands on menu dropdown to be clickable
39
+
40
+ ### 2.18.4
41
+ - Replace `CurrencyInputFormatter` with custom code
42
+
43
+ ### 2.18.3
44
+ - Only show the scroll bar on the `RareStepHeader` side nav when there is scrollable content
45
+
46
+ ### 2.18.2
47
+ - Reduce `RareStepFooter` link font size
48
+
49
+ ### 2.18.1
50
+ - Ensure RareStep SubMenuLink opens SubMenu instead of opening link
51
+
52
+ ### 2.18.0
53
+ - Passing brands, models and materials to the styles graphql query to filter out styles that don't match up to the selected brands, models and materials.
54
+
55
+ ### 2.17.5
56
+ - Open RareStep social media links in a new tab
57
+
58
+ ### 2.17.4
59
+ - Fix stretching of `RareStepFooter` and `RareStepHeader` logo images
60
+
61
+ ### 2.17.3
62
+ - Set a static height size for images on the desktop dropdown menu
63
+
64
+ ### 2.17.2
65
+ - Made links on `RareStepHeader` dropdown clickable
66
+
67
+ ### 2.17.1
68
+ - Aligned `SellToUsLink` with `HeaderIcon`
69
+
70
+ ### 2.17.0
71
+ - Update `HeaderLogo` dimensions
72
+ - Update `HeaderIcon` dimensions
73
+ - Show dropdown on hover of user icon in the header
74
+
75
+ ### 2.16.0
76
+ - Removed unused links from `RareStepFooter` and `RareStepHeader` components
77
+ - Centre aligned the logo on `RareStepHeader` mobile
78
+ - Changed background color of search container of `RareStepHeader` mobile
79
+ - `RareStepHeader` now accepts handleOnCartClick function to navigate to cart page
80
+
81
+ ### 2.15.1
82
+ - Ensure dropdown search fills page width
83
+ - Make `RareStepFooter` and `RareStepHeader` logo clickable
84
+ ### 2.15.0
85
+ - Adds sliding animation to `RareStepHeader` on mobile
86
+ - Change props to camel case for `RareStepFooter` and `RareStepHeader` components
87
+
88
+ ### 2.14.0
89
+ - Made `RareStepFooter` and `RareStepHeader` components responsive
90
+
91
+ ### 2.13.1
92
+ - Changed interest page heading from `My Interests` to `Interests`.
93
+
94
+ ### 2.13.0
95
+ - Removed `LuxityLoader` component
96
+
97
+ ### 2.12.0
98
+ - Added a `RareStepHeader` and `RareStepFooter` components
99
+
100
+ ### 2.11.0
101
+ - Components added:
102
+ -- `GraphQLDropdownSelector`, `LuxityGraphQLDropdownSelector`, `MaterialSelector`, and `ModelSelector`
103
+ - Added models and materials select form fields to add interests.
104
+
105
+ ### 2.10.0
106
+ - Added a `LuxityLoader` component
107
+ ### 2.9.2
108
+ - Ensure the search icon is not cutting off
109
+
110
+ ### 2.9.1
111
+ - Ensure the interest categories wrap on small screen
112
+
113
+ ### 2.9.0
114
+ - Added clothing as an interest item
115
+ ### 2.8.0
116
+ - Breaking - `CurrencyInput` component renamed to `CurrencyInputFormatter`
117
+ - CurrencyInputFormatter props `onChange, value, prefix, allowNegativeValue,
118
+ groupSeparator,
119
+ decimalSeparator,`
120
+ - upgrade react to react 17.0.2
121
+ - upgrade storybook
122
+ - remove storybook-readme
123
+
124
+ ### 2.7.5
125
+ - Change color of the active Interest category
126
+ when adding item as interest
127
+ ### 2.7.4
128
+ - Bug fix for IOS, extra space showing on `InterestItem`
129
+ ### 2.7.3
130
+ - Fix container alignment of `AddInterest` and `InterestItem` so they match
131
+ - Center alignment trash icon in `InterestItem`
132
+ ### 2.7.2
133
+ - Dont show `MyInterestTitleHeading` if don't have interest items
134
+ ### 2.7.1
135
+ - Change svg colors from pink to black
136
+ ### 2.7.0
137
+ - `AddInterest` and `InterestItem` have a new design that does not use the `Accordion` component
138
+ - Can add a watch as interest
139
+ ### 2.6.2
140
+ - Limit the width of the title of `InterestItem` so that it does not overlap with trash icon
141
+ ### 2.6.1
142
+ - Upgrade `@bonlineza/b-lib` to v3.2.2
143
+
144
+ ### 2.6.0
145
+ - `InterestItem` now has a delete button next to the interest title
146
+ ### 2.5.4
147
+ - Changed background color on `Add Interest` component buttons to black with white text
148
+ ### 2.5.3
149
+ - Changed text color on `Add Interest` component buttons
150
+
151
+ ### 2.5.2
152
+ - `Notify` component now includes a warning function
153
+ ### 2.5.1
154
+ - change base color from pink to black
155
+ ### 2.5.0
156
+ - `Accordion` component now accepts defaultHeight as a prop
157
+ ### 2.4.0
158
+ - Formatted `mark` data for `RangeSlider`
159
+ ### 2.3.0
160
+ - Changed `title` prop on `Accordion` to include support for Component rendering
161
+ ### 2.2.0
162
+ - Add `DummyAccordion` component that looks like an `Accordion` only with a button-like behaviour
163
+ - Remove bundle conversion of Flow types to prop-types
164
+ - Strip 'prop-types' from exported bundles (removed the 'prop-types' Dependency)
165
+ - Add `SvgWrapper` as exported component
166
+ - Include `svgs` in package - can now import them induvidually as `@bonlineza/luxity-lib/svg/Add`
167
+ - Update all packages
168
+ - include `package-lock.json` file
169
+ - Update `Tooltip` - allow passing custom classes for `containerClassName` and `bodyClassName`
170
+ - Update `TextButton` - add default `type` prop as 'button' to prevent unintended form submissions
171
+
172
+ ### 2.1.1
173
+ - Update `CountryCodeSelect` change the value that is used in the onChange callback
174
+
175
+ ### 2.1.0
176
+ - Add components: `CountryCodeSelect` and `ReactSelectWrapper`
177
+
178
+ ### 2.0.3
179
+ - Fix: prevent event from being passed into the `closeAccordion` function
180
+
181
+ ### 2.0.2
182
+ - Fix: export `constants` properly - can now import directly from: `@bonlineza/luxity-lib/constants`
183
+
184
+ ### 2.0.1
185
+ - Add fade transition to for `ShoeSizeTypeSelector` to improve ux
186
+
187
+ ### 2.0.0
188
+ - Amend version to `2.0.0` for sanity due to the last feature being a breaking change
189
+
190
+ ### 1.3.0
191
+ - Correct versioning of package due to `shoe-size-type` feature being a breaking
192
+ change
193
+
194
+ ### 1.2.9
195
+ - Add functionality to choose size type for the `ShoeSelector` in the
196
+ `AddInterest` component due to spec changes. Add prop `shoe_size_type` to
197
+ payload of of request for adding an interest
198
+ - Add default check functionality for `RadioButton` component
199
+ - Update tests for `RadioButton` and `InterestItem`
200
+ - Correct prop definition `SimpleErrorBoundary` which was preventing `yarn docs`
201
+ from creating an `md` file for that component
202
+
203
+ ### 1.2.8
204
+ - Surround `InterestItem` with `SimpleErrorBoundary`
205
+ - Add sanity to the `getShoeSize` output
206
+ - Export `gender` constants
207
+
208
+ ### 1.2.7
209
+ - Change Full Size Range Button in Add Interest inverted button
210
+
211
+ ### 1.2.6
212
+ - Remove deselectAll from AddInterest
213
+ - Fix infinite loop of CheckboxButton
214
+ - Remove reference props in GenderSelector
215
+ - Update test for CheckboxButton
216
+
217
+ ### 1.2.4
218
+ - Change InterestItem to use the 'title' prop and add test
219
+
220
+ ### 1.2.3
221
+ - Refactor styles of InterestItem so it looks the way it is required to look
222
+ - Fix logic for deselecting brands and styles for GraphQLMultiSelector when a category changes
223
+ - Add forwardRef logic to themed function
224
+
225
+ ### 1.2.2
226
+ - Fix InterstItem render that uses new 'name' prop from Styles
227
+
228
+ ### 1.2.1
229
+ - Fix Border Style for NotificationDropdown
230
+ - Change deleteInterest prop to `deleteInterestApi` to better describe it
231
+
232
+ ### 1.2.0
233
+ - No Longer Exporting: BrandSelector and AddInterest
234
+ - Added Component: Interests
235
+
236
+ ### 1.1.1
237
+ - Fix RangeSlider: Tooltip component receives correct props
238
+
239
+ ### 1.1.0
240
+ - Added Components:
241
+ - AddInterest
242
+ - BrandSelector
243
+ - CurrencyInput
244
+ - GraphQLMultiSelector
245
+ - InterestCatSelector
246
+ - InterestItem
247
+ - LuxityGraphQLMultiSelector
248
+ - LuxityPageReady
249
+ - StyleSelector
250
+ - RangeSlider
251
+ - ShoeSizeSelector
252
+ - PriceRangeSelector
253
+ - Added List of Helper functions to the Readme
254
+ - Added Development guide to the Readme
255
+ - Added Publishing Guide to the Readme
256
+
257
+ ### 1.0.0
258
+ - Breaking Change: Reworked Button 'variant' prop into individual Components
259
+ - Removed Generic Button component
260
+ - New Button components: PrimaryButton, SecondaryButton, TextButton, InvertedTextButton, WrapperButton
261
+ - Added SVG components (see README for full List)
262
+
263
+ ### 0.1.2
264
+ - Updated `styled-components` version to v5
265
+
266
+ ### 0.1.1
267
+ - Moved `styled-components` to dev and peer-dependencies as it is a host project requirement
268
+
269
+ ### 0.1.0
270
+ - Added Components: Checkbox, RadioButtons, Tooltip
271
+ - Added generated ocumentation for components
272
+ - Added Element: Button
@@ -9382,141 +9382,6 @@
9382
9382
 
9383
9383
  var NotificationDropDown$1 = themed(NotificationDropDown);
9384
9384
 
9385
- /**
9386
- * Luxity flavoured GraphQLMultiselector with text Search, category and limit controls
9387
- */
9388
- var LuxityGraphQLDropdownSelector = /*#__PURE__*/function (_React$Component) {
9389
- _inherits(LuxityGraphQLDropdownSelector, _React$Component);
9390
-
9391
- var _super = _createSuper(LuxityGraphQLDropdownSelector);
9392
-
9393
- function LuxityGraphQLDropdownSelector(props) {
9394
- var _this;
9395
-
9396
- _classCallCheck(this, LuxityGraphQLDropdownSelector);
9397
-
9398
- _this = _super.call(this, props);
9399
-
9400
- _defineProperty(_assertThisInitialized(_this), "multiSelectorRef", /*#__PURE__*/React__default.createRef());
9401
-
9402
- _defineProperty(_assertThisInitialized(_this), "increaseLimit", function () {
9403
- _this.setState(function (prevState) {
9404
- return {
9405
- limit: prevState.limit + _this.props.queryLimitIncrement
9406
- };
9407
- });
9408
- });
9409
-
9410
- _defineProperty(_assertThisInitialized(_this), "onChange", function (selection) {
9411
- _this.props.onChange(selection);
9412
- });
9413
-
9414
- _defineProperty(_assertThisInitialized(_this), "render", function () {
9415
- var _this$state = _this.state,
9416
- limit = _this$state.limit,
9417
- query_arguments = _this$state.query_arguments;
9418
- var _this$props = _this.props,
9419
- title = _this$props.title,
9420
- baseClass = _this$props.baseClass,
9421
- getGraphQuery = _this$props.getGraphQuery,
9422
- resultProcessor = _this$props.resultProcessor,
9423
- graphApi = _this$props.graphApi,
9424
- identifier = _this$props.identifier,
9425
- requestInstance = _this$props.requestInstance;
9426
- return /*#__PURE__*/React__default.createElement("div", {
9427
- className: baseClass
9428
- }, /*#__PURE__*/React__default.createElement(InterestsSubheading, {
9429
- className: "".concat(baseClass, "__title"),
9430
- title: title
9431
- }), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLDropdownSelector$1, {
9432
- triggerRequest: function triggerRequest() {
9433
- return requestInstance.post(graphApi, {
9434
- query: getGraphQuery(limit, 1, 'id|desc', query_arguments)
9435
- });
9436
- },
9437
- graphQuery: getGraphQuery(limit, 1, 'id|desc', query_arguments),
9438
- identifier: identifier,
9439
- ref: _this.multiSelectorRef,
9440
- onChange: _this.onChange,
9441
- resultProcessor: resultProcessor
9442
- })));
9443
- });
9444
-
9445
- _this.state = {
9446
- limit: props.baseQueryLimit,
9447
- query_arguments: props.query_arguments
9448
- };
9449
- return _this;
9450
- }
9451
-
9452
- _createClass(LuxityGraphQLDropdownSelector, [{
9453
- key: "componentDidUpdate",
9454
- value: function componentDidUpdate(prevProps) {
9455
- var _this$multiSelectorRe;
9456
-
9457
- if (prevProps.query_arguments !== this.props.query_arguments && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
9458
- this.multiSelectorRef.current.emptySelected();
9459
- }
9460
- }
9461
- }], [{
9462
- key: "getDerivedStateFromProps",
9463
- value: function getDerivedStateFromProps(props, prevState) {
9464
- if (prevState.query_arguments !== props.query_arguments) {
9465
- return {
9466
- query_arguments: props.query_arguments
9467
- };
9468
- }
9469
-
9470
- return null;
9471
- }
9472
- }]);
9473
-
9474
- return LuxityGraphQLDropdownSelector;
9475
- }(React__default.Component);
9476
-
9477
- LuxityGraphQLDropdownSelector.defaultProps = {
9478
- baseClass: '',
9479
- searchPlaceHolder: '',
9480
- queryLimitIncrement: 12,
9481
- baseQueryLimit: 12
9482
- };
9483
-
9484
- var BrandSelector = function BrandSelector(_ref) {
9485
- var onChange = _ref.onChange,
9486
- category = _ref.category,
9487
- graphApi = _ref.graphApi,
9488
- getGraphQuery = _ref.getGraphQuery,
9489
- resultProcessor = _ref.resultProcessor,
9490
- requestInstance = _ref.requestInstance;
9491
- return /*#__PURE__*/React__default.createElement(LuxityGraphQLDropdownSelector, {
9492
- baseQueryLimit: 9999,
9493
- title: "Brands",
9494
- queryId: "getBrands",
9495
- baseClass: "brand-selector",
9496
- identifier: "brand-selector",
9497
- searchPlaceHolder: "Search brands",
9498
- query_arguments: category,
9499
- onChange: onChange,
9500
- graphApi: graphApi,
9501
- getGraphQuery: getGraphQuery,
9502
- resultProcessor: resultProcessor,
9503
- requestInstance: requestInstance
9504
- });
9505
- };
9506
-
9507
- BrandSelector.defaultProps = {
9508
- resultProcessor: function resultProcessor(result) {
9509
- return result.data.data.luxity_brands.data.map(function (_ref2) {
9510
- var id = _ref2.id,
9511
- name = _ref2.name;
9512
- return {
9513
- label: name,
9514
- value: id
9515
- };
9516
- });
9517
- }
9518
- };
9519
-
9520
9385
  var _templateObject$E, _templateObject2$6;
9521
9386
  var ALL_ITEM = {
9522
9387
  id: 'ALL',
@@ -9849,10 +9714,7 @@
9849
9714
  var _this$state = _this.state,
9850
9715
  limit = _this$state.limit,
9851
9716
  category = _this$state.category,
9852
- nameFilter = _this$state.nameFilter,
9853
- brands = _this$state.brands,
9854
- models = _this$state.models,
9855
- materials = _this$state.materials;
9717
+ nameFilter = _this$state.nameFilter;
9856
9718
  var _this$props = _this.props,
9857
9719
  title = _this$props.title,
9858
9720
  baseClass = _this$props.baseClass,
@@ -9873,10 +9735,10 @@
9873
9735
  }), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
9874
9736
  triggerRequest: function triggerRequest() {
9875
9737
  return requestInstance.post(graphApi, {
9876
- query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter, brands, models, materials)
9738
+ query: getGraphQuery(limit, 1, 'id|desc', category, nameFilter)
9877
9739
  });
9878
9740
  },
9879
- graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter, brands, models, materials),
9741
+ graphQuery: getGraphQuery(limit, 1, 'id|desc', category, nameFilter),
9880
9742
  identifier: identifier,
9881
9743
  ref: _this.multiSelectorRef,
9882
9744
  onChange: _this.onChange,
@@ -9889,9 +9751,6 @@
9889
9751
  _this.state = {
9890
9752
  limit: props.baseQueryLimit,
9891
9753
  category: props.category,
9892
- brands: props.brands,
9893
- models: props.models,
9894
- materials: props.materials,
9895
9754
  nameFilter: ''
9896
9755
  };
9897
9756
  return _this;
@@ -9900,23 +9759,11 @@
9900
9759
  _createClass(LuxityGraphQLMultiselector, [{
9901
9760
  key: "componentDidUpdate",
9902
9761
  value: function componentDidUpdate(prevProps) {
9903
- var _this$multiSelectorRe, _this$multiSelectorRe2, _this$multiSelectorRe3, _this$multiSelectorRe4;
9762
+ var _this$multiSelectorRe;
9904
9763
 
9905
9764
  if (prevProps.category !== this.props.category && (_this$multiSelectorRe = this.multiSelectorRef) !== null && _this$multiSelectorRe !== void 0 && _this$multiSelectorRe.current) {
9906
9765
  this.multiSelectorRef.current.emptySelected();
9907
9766
  }
9908
-
9909
- if (prevProps.brands !== this.props.brands && (_this$multiSelectorRe2 = this.multiSelectorRef) !== null && _this$multiSelectorRe2 !== void 0 && _this$multiSelectorRe2.current) {
9910
- this.multiSelectorRef.current.emptySelected();
9911
- }
9912
-
9913
- if (prevProps.models !== this.props.models && (_this$multiSelectorRe3 = this.multiSelectorRef) !== null && _this$multiSelectorRe3 !== void 0 && _this$multiSelectorRe3.current) {
9914
- this.multiSelectorRef.current.emptySelected();
9915
- }
9916
-
9917
- if (prevProps.materials !== this.props.materials && (_this$multiSelectorRe4 = this.multiSelectorRef) !== null && _this$multiSelectorRe4 !== void 0 && _this$multiSelectorRe4.current) {
9918
- this.multiSelectorRef.current.emptySelected();
9919
- }
9920
9767
  }
9921
9768
  }], [{
9922
9769
  key: "getDerivedStateFromProps",
@@ -9927,24 +9774,6 @@
9927
9774
  };
9928
9775
  }
9929
9776
 
9930
- if (prevState.brands !== props.brands) {
9931
- return {
9932
- brands: props.brands
9933
- };
9934
- }
9935
-
9936
- if (prevState.models !== props.models) {
9937
- return {
9938
- models: props.models
9939
- };
9940
- }
9941
-
9942
- if (prevState.materials !== props.materials) {
9943
- return {
9944
- materials: props.materials
9945
- };
9946
- }
9947
-
9948
9777
  return null;
9949
9778
  }
9950
9779
  }]);
@@ -9986,6 +9815,38 @@
9986
9815
  return selected ? /*#__PURE__*/React__default.createElement(PrimaryButton$1, props, item.name) : /*#__PURE__*/React__default.createElement(UnselectedButton, props, item.name);
9987
9816
  };
9988
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
+
9989
9850
  var StyleSelector = function StyleSelector(_ref) {
9990
9851
  var onChange = _ref.onChange,
9991
9852
  category = _ref.category,
@@ -9993,10 +9854,7 @@
9993
9854
  itemRenderer = _ref.itemRenderer,
9994
9855
  getGraphQuery = _ref.getGraphQuery,
9995
9856
  resultProcessor = _ref.resultProcessor,
9996
- requestInstance = _ref.requestInstance,
9997
- brands = _ref.brands,
9998
- models = _ref.models,
9999
- materials = _ref.materials;
9857
+ requestInstance = _ref.requestInstance;
10000
9858
  return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
10001
9859
  title: "Styles",
10002
9860
  queryId: "getStyles",
@@ -10005,9 +9863,6 @@
10005
9863
  identifier: "style-selector",
10006
9864
  searchPlaceHolder: "Search Styles",
10007
9865
  category: category,
10008
- brands: brands,
10009
- models: models,
10010
- materials: materials,
10011
9866
  onChange: onChange,
10012
9867
  graphApi: graphApi,
10013
9868
  itemRenderer: itemRenderer,
@@ -11248,8 +11103,8 @@
11248
11103
  GraphQLDropdownSelector.defaultProps = {
11249
11104
  baseClass: 'multiselector'
11250
11105
  };
11251
- var GraphQLDropdownSelector$1 = themed(GraphQLDropdownSelector);
11106
+ var index$2 = themed(GraphQLDropdownSelector);
11252
11107
 
11253
- return GraphQLDropdownSelector$1;
11108
+ return index$2;
11254
11109
 
11255
11110
  })));