@bonlineza/luxity-lib 2.39.9 → 2.40.1
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 +72 -4
- package/ApparelSizeSelector.js +988 -0
- package/BrandSelector.js +7 -2
- package/ConditionSelector.js +7 -2
- package/GraphQLDropdownSelector.js +78 -12
- package/Interests.js +78 -12
- package/LuxityGraphQLDropdownSelector.js +78 -12
- package/LuxityGraphQLMultiselector.js +7 -2
- package/MaterialSelector.js +78 -12
- package/ModelSelector.js +78 -12
- package/NotificationDropDown.js +4 -8
- package/StyleSelector.js +7 -2
- package/build/bundle.css +1 -1
- package/build/bundle.js +78 -12
- package/package.json +1 -1
package/BrandSelector.js
CHANGED
|
@@ -737,11 +737,13 @@
|
|
|
737
737
|
className = _ref.className,
|
|
738
738
|
title = _ref.title,
|
|
739
739
|
searchPlaceHolder = _ref.searchPlaceHolder,
|
|
740
|
-
onSearchChanged = _ref.onSearchChanged
|
|
740
|
+
onSearchChanged = _ref.onSearchChanged,
|
|
741
|
+
_ref$searchable = _ref.searchable,
|
|
742
|
+
searchable = _ref$searchable === void 0 ? true : _ref$searchable;
|
|
741
743
|
return /*#__PURE__*/React__default.createElement(InterestsSubheading, {
|
|
742
744
|
className: "".concat(className, " ").concat(baseClass, "__title"),
|
|
743
745
|
title: title
|
|
744
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
746
|
+
}, searchable && /*#__PURE__*/React__default.createElement("div", {
|
|
745
747
|
className: "title__search"
|
|
746
748
|
}, /*#__PURE__*/React__default.createElement(Search, null), /*#__PURE__*/React__default.createElement("input", {
|
|
747
749
|
placeholder: searchPlaceHolder,
|
|
@@ -825,6 +827,7 @@
|
|
|
825
827
|
resultProcessor = _this$props.resultProcessor,
|
|
826
828
|
itemRenderer = _this$props.itemRenderer,
|
|
827
829
|
searchPlaceHolder = _this$props.searchPlaceHolder,
|
|
830
|
+
searchable = _this$props.searchable,
|
|
828
831
|
graphApi = _this$props.graphApi,
|
|
829
832
|
identifier = _this$props.identifier,
|
|
830
833
|
requestInstance = _this$props.requestInstance;
|
|
@@ -834,6 +837,7 @@
|
|
|
834
837
|
title: title,
|
|
835
838
|
baseClass: baseClass,
|
|
836
839
|
searchPlaceHolder: searchPlaceHolder,
|
|
840
|
+
searchable: searchable,
|
|
837
841
|
onSearchChanged: _this.onSearchChanged
|
|
838
842
|
}), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
|
|
839
843
|
triggerRequest: function triggerRequest() {
|
|
@@ -887,6 +891,7 @@
|
|
|
887
891
|
LuxityGraphQLMultiselector.defaultProps = {
|
|
888
892
|
baseClass: '',
|
|
889
893
|
searchPlaceHolder: '',
|
|
894
|
+
searchable: true,
|
|
890
895
|
queryLimitIncrement: 12,
|
|
891
896
|
baseQueryLimit: 12
|
|
892
897
|
};
|
package/ConditionSelector.js
CHANGED
|
@@ -737,11 +737,13 @@
|
|
|
737
737
|
className = _ref.className,
|
|
738
738
|
title = _ref.title,
|
|
739
739
|
searchPlaceHolder = _ref.searchPlaceHolder,
|
|
740
|
-
onSearchChanged = _ref.onSearchChanged
|
|
740
|
+
onSearchChanged = _ref.onSearchChanged,
|
|
741
|
+
_ref$searchable = _ref.searchable,
|
|
742
|
+
searchable = _ref$searchable === void 0 ? true : _ref$searchable;
|
|
741
743
|
return /*#__PURE__*/React__default.createElement(InterestsSubheading, {
|
|
742
744
|
className: "".concat(className, " ").concat(baseClass, "__title"),
|
|
743
745
|
title: title
|
|
744
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
746
|
+
}, searchable && /*#__PURE__*/React__default.createElement("div", {
|
|
745
747
|
className: "title__search"
|
|
746
748
|
}, /*#__PURE__*/React__default.createElement(Search, null), /*#__PURE__*/React__default.createElement("input", {
|
|
747
749
|
placeholder: searchPlaceHolder,
|
|
@@ -825,6 +827,7 @@
|
|
|
825
827
|
resultProcessor = _this$props.resultProcessor,
|
|
826
828
|
itemRenderer = _this$props.itemRenderer,
|
|
827
829
|
searchPlaceHolder = _this$props.searchPlaceHolder,
|
|
830
|
+
searchable = _this$props.searchable,
|
|
828
831
|
graphApi = _this$props.graphApi,
|
|
829
832
|
identifier = _this$props.identifier,
|
|
830
833
|
requestInstance = _this$props.requestInstance;
|
|
@@ -834,6 +837,7 @@
|
|
|
834
837
|
title: title,
|
|
835
838
|
baseClass: baseClass,
|
|
836
839
|
searchPlaceHolder: searchPlaceHolder,
|
|
840
|
+
searchable: searchable,
|
|
837
841
|
onSearchChanged: _this.onSearchChanged
|
|
838
842
|
}), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
|
|
839
843
|
triggerRequest: function triggerRequest() {
|
|
@@ -887,6 +891,7 @@
|
|
|
887
891
|
LuxityGraphQLMultiselector.defaultProps = {
|
|
888
892
|
baseClass: '',
|
|
889
893
|
searchPlaceHolder: '',
|
|
894
|
+
searchable: true,
|
|
890
895
|
queryLimitIncrement: 12,
|
|
891
896
|
baseQueryLimit: 12
|
|
892
897
|
};
|
|
@@ -9797,12 +9797,10 @@
|
|
|
9797
9797
|
|
|
9798
9798
|
var _data$data$user = data.data.user,
|
|
9799
9799
|
email_interest_send_schedule = _data$data$user.email_interest_send_schedule,
|
|
9800
|
-
whatsapp_interest_send_schedule = _data$data$user.whatsapp_interest_send_schedule
|
|
9801
|
-
can_receive_whatsapp_interest_notifications = _data$data$user.can_receive_whatsapp_interest_notifications;
|
|
9800
|
+
whatsapp_interest_send_schedule = _data$data$user.whatsapp_interest_send_schedule;
|
|
9802
9801
|
|
|
9803
9802
|
_this.setState({
|
|
9804
9803
|
options: options,
|
|
9805
|
-
canReceiveWhatsAppNotifications: !!can_receive_whatsapp_interest_notifications,
|
|
9806
9804
|
emailSelectedOption: options.find(function (item) {
|
|
9807
9805
|
return item.value === email_interest_send_schedule;
|
|
9808
9806
|
}),
|
|
@@ -9817,16 +9815,15 @@
|
|
|
9817
9815
|
options = _this$state.options,
|
|
9818
9816
|
emailSelectedOption = _this$state.emailSelectedOption,
|
|
9819
9817
|
whatsappSelectedOption = _this$state.whatsappSelectedOption,
|
|
9820
|
-
canReceiveWhatsAppNotifications = _this$state.canReceiveWhatsAppNotifications,
|
|
9821
9818
|
updating = _this$state.request.fetching;
|
|
9822
9819
|
return /*#__PURE__*/React__default.createElement(NotifyContainer, null, /*#__PURE__*/React__default.createElement(LuxityNotifications, null), /*#__PURE__*/React__default.createElement(LuxityPageReady, {
|
|
9823
9820
|
getRequestPromise: _this.props.getSchedule,
|
|
9824
9821
|
onData: function onData(data) {
|
|
9825
9822
|
return _this.onData(data);
|
|
9826
9823
|
}
|
|
9827
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9824
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9828
9825
|
className: "notification-settings"
|
|
9829
|
-
},
|
|
9826
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9830
9827
|
className: "notification-row-wrapper"
|
|
9831
9828
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9832
9829
|
className: "notification-dropdown-label"
|
|
@@ -9864,14 +9861,13 @@
|
|
|
9864
9861
|
return _this.postUpdate(option, 'EMAIL');
|
|
9865
9862
|
},
|
|
9866
9863
|
value: emailSelectedOption
|
|
9867
|
-
})))))
|
|
9864
|
+
})))));
|
|
9868
9865
|
});
|
|
9869
9866
|
|
|
9870
9867
|
_this.state = {
|
|
9871
9868
|
options: [],
|
|
9872
9869
|
emailSelectedOption: null,
|
|
9873
9870
|
whatsappSelectedOption: null,
|
|
9874
|
-
canReceiveWhatsAppNotifications: false,
|
|
9875
9871
|
request: _objectSpread2({}, request)
|
|
9876
9872
|
};
|
|
9877
9873
|
return _this;
|
|
@@ -10134,11 +10130,13 @@
|
|
|
10134
10130
|
className = _ref.className,
|
|
10135
10131
|
title = _ref.title,
|
|
10136
10132
|
searchPlaceHolder = _ref.searchPlaceHolder,
|
|
10137
|
-
onSearchChanged = _ref.onSearchChanged
|
|
10133
|
+
onSearchChanged = _ref.onSearchChanged,
|
|
10134
|
+
_ref$searchable = _ref.searchable,
|
|
10135
|
+
searchable = _ref$searchable === void 0 ? true : _ref$searchable;
|
|
10138
10136
|
return /*#__PURE__*/React__default.createElement(InterestsSubheading, {
|
|
10139
10137
|
className: "".concat(className, " ").concat(baseClass, "__title"),
|
|
10140
10138
|
title: title
|
|
10141
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10139
|
+
}, searchable && /*#__PURE__*/React__default.createElement("div", {
|
|
10142
10140
|
className: "title__search"
|
|
10143
10141
|
}, /*#__PURE__*/React__default.createElement(Search, null), /*#__PURE__*/React__default.createElement("input", {
|
|
10144
10142
|
placeholder: searchPlaceHolder,
|
|
@@ -10222,6 +10220,7 @@
|
|
|
10222
10220
|
resultProcessor = _this$props.resultProcessor,
|
|
10223
10221
|
itemRenderer = _this$props.itemRenderer,
|
|
10224
10222
|
searchPlaceHolder = _this$props.searchPlaceHolder,
|
|
10223
|
+
searchable = _this$props.searchable,
|
|
10225
10224
|
graphApi = _this$props.graphApi,
|
|
10226
10225
|
identifier = _this$props.identifier,
|
|
10227
10226
|
requestInstance = _this$props.requestInstance;
|
|
@@ -10231,6 +10230,7 @@
|
|
|
10231
10230
|
title: title,
|
|
10232
10231
|
baseClass: baseClass,
|
|
10233
10232
|
searchPlaceHolder: searchPlaceHolder,
|
|
10233
|
+
searchable: searchable,
|
|
10234
10234
|
onSearchChanged: _this.onSearchChanged
|
|
10235
10235
|
}), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
|
|
10236
10236
|
triggerRequest: function triggerRequest() {
|
|
@@ -10284,6 +10284,7 @@
|
|
|
10284
10284
|
LuxityGraphQLMultiselector.defaultProps = {
|
|
10285
10285
|
baseClass: '',
|
|
10286
10286
|
searchPlaceHolder: '',
|
|
10287
|
+
searchable: true,
|
|
10287
10288
|
queryLimitIncrement: 12,
|
|
10288
10289
|
baseQueryLimit: 12
|
|
10289
10290
|
};
|
|
@@ -10379,6 +10380,48 @@
|
|
|
10379
10380
|
}
|
|
10380
10381
|
};
|
|
10381
10382
|
|
|
10383
|
+
var ApparelSizeSelector = function ApparelSizeSelector(_ref) {
|
|
10384
|
+
var onChange = _ref.onChange,
|
|
10385
|
+
category = _ref.category,
|
|
10386
|
+
graphApi = _ref.graphApi,
|
|
10387
|
+
itemRenderer = _ref.itemRenderer,
|
|
10388
|
+
getGraphQuery = _ref.getGraphQuery,
|
|
10389
|
+
resultProcessor = _ref.resultProcessor,
|
|
10390
|
+
requestInstance = _ref.requestInstance;
|
|
10391
|
+
return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
|
|
10392
|
+
title: "Sizes",
|
|
10393
|
+
queryId: "getApparelSizes",
|
|
10394
|
+
baseQueryLimit: 16,
|
|
10395
|
+
baseClass: "apparel-size-selector",
|
|
10396
|
+
identifier: "apparel-size-selector",
|
|
10397
|
+
searchable: false,
|
|
10398
|
+
category: category,
|
|
10399
|
+
onChange: onChange,
|
|
10400
|
+
graphApi: graphApi,
|
|
10401
|
+
itemRenderer: itemRenderer,
|
|
10402
|
+
getGraphQuery: getGraphQuery,
|
|
10403
|
+
resultProcessor: resultProcessor,
|
|
10404
|
+
requestInstance: requestInstance
|
|
10405
|
+
});
|
|
10406
|
+
};
|
|
10407
|
+
|
|
10408
|
+
ApparelSizeSelector.defaultProps = {
|
|
10409
|
+
itemRenderer: ItemRenderer,
|
|
10410
|
+
resultProcessor: function resultProcessor(result) {
|
|
10411
|
+
return {
|
|
10412
|
+
data: (result.data.data.luxity_universal_apparel_size_list || []).map(function (_ref2) {
|
|
10413
|
+
var id = _ref2.id,
|
|
10414
|
+
size = _ref2.size;
|
|
10415
|
+
return {
|
|
10416
|
+
id: id,
|
|
10417
|
+
name: size
|
|
10418
|
+
};
|
|
10419
|
+
}),
|
|
10420
|
+
has_more_pages: false
|
|
10421
|
+
};
|
|
10422
|
+
}
|
|
10423
|
+
};
|
|
10424
|
+
|
|
10382
10425
|
var shoeSizeTypes = {
|
|
10383
10426
|
uk: {
|
|
10384
10427
|
label: 'UK',
|
|
@@ -10755,6 +10798,7 @@
|
|
|
10755
10798
|
min_price: null,
|
|
10756
10799
|
max_price: null,
|
|
10757
10800
|
styles: [],
|
|
10801
|
+
apparel_sizes: [],
|
|
10758
10802
|
gender: [],
|
|
10759
10803
|
condition: [],
|
|
10760
10804
|
request: _objectSpread2({}, request),
|
|
@@ -10784,7 +10828,8 @@
|
|
|
10784
10828
|
_this.setState({
|
|
10785
10829
|
category_type: categoryType,
|
|
10786
10830
|
brands: [],
|
|
10787
|
-
styles: []
|
|
10831
|
+
styles: [],
|
|
10832
|
+
apparel_sizes: []
|
|
10788
10833
|
});
|
|
10789
10834
|
});
|
|
10790
10835
|
|
|
@@ -10833,6 +10878,14 @@
|
|
|
10833
10878
|
});
|
|
10834
10879
|
});
|
|
10835
10880
|
|
|
10881
|
+
_defineProperty(_assertThisInitialized(_this), "onApparelSizesChanged", function (apparelSizesArray) {
|
|
10882
|
+
_this.setState({
|
|
10883
|
+
apparel_sizes: apparelSizesArray.map(function (apparelSize) {
|
|
10884
|
+
return apparelSize.id;
|
|
10885
|
+
})
|
|
10886
|
+
});
|
|
10887
|
+
});
|
|
10888
|
+
|
|
10836
10889
|
_defineProperty(_assertThisInitialized(_this), "onConditionChanged", function (conditions) {
|
|
10837
10890
|
_this.setState({
|
|
10838
10891
|
condition: conditions.map(function (condition) {
|
|
@@ -10862,6 +10915,7 @@
|
|
|
10862
10915
|
min_price = _this$state.min_price,
|
|
10863
10916
|
max_price = _this$state.max_price,
|
|
10864
10917
|
styles = _this$state.styles,
|
|
10918
|
+
apparel_sizes = _this$state.apparel_sizes,
|
|
10865
10919
|
category_type = _this$state.category_type,
|
|
10866
10920
|
requestState = _this$state.request,
|
|
10867
10921
|
gender = _this$state.gender,
|
|
@@ -10887,8 +10941,11 @@
|
|
|
10887
10941
|
max_shoe_size_id: max_shoe_size_id,
|
|
10888
10942
|
shoe_size_type: shoe_size_type
|
|
10889
10943
|
} : {};
|
|
10944
|
+
var apparelSizesPayload = category_type === interestCategories.APPAREL ? {
|
|
10945
|
+
apparel_sizes: apparel_sizes
|
|
10946
|
+
} : {};
|
|
10890
10947
|
|
|
10891
|
-
var payload = _objectSpread2(_objectSpread2({}, basePayload), shoeSizesPayload);
|
|
10948
|
+
var payload = _objectSpread2(_objectSpread2(_objectSpread2({}, basePayload), shoeSizesPayload), apparelSizesPayload);
|
|
10892
10949
|
|
|
10893
10950
|
simpleRequest(_this.props.requestInstance, _this.props.addInterestApi, method.POST, payload, function () {
|
|
10894
10951
|
_this.setState({
|
|
@@ -10945,6 +11002,7 @@
|
|
|
10945
11002
|
baseGraphApi = _this$props.baseGraphApi,
|
|
10946
11003
|
getBrandsGraphQuery = _this$props.getBrandsGraphQuery,
|
|
10947
11004
|
getStylesGraphQuery = _this$props.getStylesGraphQuery,
|
|
11005
|
+
getApparelSizesGraphQuery = _this$props.getApparelSizesGraphQuery,
|
|
10948
11006
|
getShoesGraphQuery = _this$props.getShoesGraphQuery,
|
|
10949
11007
|
defaultShoeSizeType = _this$props.defaultShoeSizeType,
|
|
10950
11008
|
getConditionsGraphQuery = _this$props.getConditionsGraphQuery;
|
|
@@ -10976,6 +11034,12 @@
|
|
|
10976
11034
|
requestInstance: requestInstance,
|
|
10977
11035
|
graphApi: "".concat(baseGraphApi, "?id=getStyles"),
|
|
10978
11036
|
getGraphQuery: getStylesGraphQuery
|
|
11037
|
+
}), category_type === interestCategories.APPAREL && /*#__PURE__*/React__default.createElement(ApparelSizeSelector, {
|
|
11038
|
+
category: category_type,
|
|
11039
|
+
onChange: _this.onApparelSizesChanged,
|
|
11040
|
+
requestInstance: requestInstance,
|
|
11041
|
+
graphApi: "".concat(baseGraphApi, "?id=getApparelSizes"),
|
|
11042
|
+
getGraphQuery: getApparelSizesGraphQuery
|
|
10979
11043
|
}), /*#__PURE__*/React__default.createElement(ConditionSelector, {
|
|
10980
11044
|
onChange: _this.onConditionChanged,
|
|
10981
11045
|
requestInstance: requestInstance,
|
|
@@ -11794,6 +11858,7 @@
|
|
|
11794
11858
|
baseGraphApi = _this$props2.baseGraphApi,
|
|
11795
11859
|
getBrandsGraphQuery = _this$props2.getBrandsGraphQuery,
|
|
11796
11860
|
getStylesGraphQuery = _this$props2.getStylesGraphQuery,
|
|
11861
|
+
getApparelSizesGraphQuery = _this$props2.getApparelSizesGraphQuery,
|
|
11797
11862
|
getShoesGraphQuery = _this$props2.getShoesGraphQuery,
|
|
11798
11863
|
deleteInterestApi = _this$props2.deleteInterestApi,
|
|
11799
11864
|
setSchedule = _this$props2.setSchedule,
|
|
@@ -11848,6 +11913,7 @@
|
|
|
11848
11913
|
baseGraphApi: baseGraphApi,
|
|
11849
11914
|
getBrandsGraphQuery: getBrandsGraphQuery,
|
|
11850
11915
|
getStylesGraphQuery: getStylesGraphQuery,
|
|
11916
|
+
getApparelSizesGraphQuery: getApparelSizesGraphQuery,
|
|
11851
11917
|
getShoesGraphQuery: getShoesGraphQuery,
|
|
11852
11918
|
defaultShoeSizeType: defaultShoeSizeType,
|
|
11853
11919
|
addInterestTitle: "Category Interest",
|
package/Interests.js
CHANGED
|
@@ -7618,12 +7618,10 @@
|
|
|
7618
7618
|
|
|
7619
7619
|
var _data$data$user = data.data.user,
|
|
7620
7620
|
email_interest_send_schedule = _data$data$user.email_interest_send_schedule,
|
|
7621
|
-
whatsapp_interest_send_schedule = _data$data$user.whatsapp_interest_send_schedule
|
|
7622
|
-
can_receive_whatsapp_interest_notifications = _data$data$user.can_receive_whatsapp_interest_notifications;
|
|
7621
|
+
whatsapp_interest_send_schedule = _data$data$user.whatsapp_interest_send_schedule;
|
|
7623
7622
|
|
|
7624
7623
|
_this.setState({
|
|
7625
7624
|
options: options,
|
|
7626
|
-
canReceiveWhatsAppNotifications: !!can_receive_whatsapp_interest_notifications,
|
|
7627
7625
|
emailSelectedOption: options.find(function (item) {
|
|
7628
7626
|
return item.value === email_interest_send_schedule;
|
|
7629
7627
|
}),
|
|
@@ -7638,16 +7636,15 @@
|
|
|
7638
7636
|
options = _this$state.options,
|
|
7639
7637
|
emailSelectedOption = _this$state.emailSelectedOption,
|
|
7640
7638
|
whatsappSelectedOption = _this$state.whatsappSelectedOption,
|
|
7641
|
-
canReceiveWhatsAppNotifications = _this$state.canReceiveWhatsAppNotifications,
|
|
7642
7639
|
updating = _this$state.request.fetching;
|
|
7643
7640
|
return /*#__PURE__*/React__default.createElement(NotifyContainer, null, /*#__PURE__*/React__default.createElement(LuxityNotifications, null), /*#__PURE__*/React__default.createElement(LuxityPageReady, {
|
|
7644
7641
|
getRequestPromise: _this.props.getSchedule,
|
|
7645
7642
|
onData: function onData(data) {
|
|
7646
7643
|
return _this.onData(data);
|
|
7647
7644
|
}
|
|
7648
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
7645
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7649
7646
|
className: "notification-settings"
|
|
7650
|
-
},
|
|
7647
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7651
7648
|
className: "notification-row-wrapper"
|
|
7652
7649
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7653
7650
|
className: "notification-dropdown-label"
|
|
@@ -7685,14 +7682,13 @@
|
|
|
7685
7682
|
return _this.postUpdate(option, 'EMAIL');
|
|
7686
7683
|
},
|
|
7687
7684
|
value: emailSelectedOption
|
|
7688
|
-
})))))
|
|
7685
|
+
})))));
|
|
7689
7686
|
});
|
|
7690
7687
|
|
|
7691
7688
|
_this.state = {
|
|
7692
7689
|
options: [],
|
|
7693
7690
|
emailSelectedOption: null,
|
|
7694
7691
|
whatsappSelectedOption: null,
|
|
7695
|
-
canReceiveWhatsAppNotifications: false,
|
|
7696
7692
|
request: _objectSpread2({}, request)
|
|
7697
7693
|
};
|
|
7698
7694
|
return _this;
|
|
@@ -8373,11 +8369,13 @@
|
|
|
8373
8369
|
className = _ref.className,
|
|
8374
8370
|
title = _ref.title,
|
|
8375
8371
|
searchPlaceHolder = _ref.searchPlaceHolder,
|
|
8376
|
-
onSearchChanged = _ref.onSearchChanged
|
|
8372
|
+
onSearchChanged = _ref.onSearchChanged,
|
|
8373
|
+
_ref$searchable = _ref.searchable,
|
|
8374
|
+
searchable = _ref$searchable === void 0 ? true : _ref$searchable;
|
|
8377
8375
|
return /*#__PURE__*/React__default.createElement(InterestsSubheading, {
|
|
8378
8376
|
className: "".concat(className, " ").concat(baseClass, "__title"),
|
|
8379
8377
|
title: title
|
|
8380
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8378
|
+
}, searchable && /*#__PURE__*/React__default.createElement("div", {
|
|
8381
8379
|
className: "title__search"
|
|
8382
8380
|
}, /*#__PURE__*/React__default.createElement(Search, null), /*#__PURE__*/React__default.createElement("input", {
|
|
8383
8381
|
placeholder: searchPlaceHolder,
|
|
@@ -8461,6 +8459,7 @@
|
|
|
8461
8459
|
resultProcessor = _this$props.resultProcessor,
|
|
8462
8460
|
itemRenderer = _this$props.itemRenderer,
|
|
8463
8461
|
searchPlaceHolder = _this$props.searchPlaceHolder,
|
|
8462
|
+
searchable = _this$props.searchable,
|
|
8464
8463
|
graphApi = _this$props.graphApi,
|
|
8465
8464
|
identifier = _this$props.identifier,
|
|
8466
8465
|
requestInstance = _this$props.requestInstance;
|
|
@@ -8470,6 +8469,7 @@
|
|
|
8470
8469
|
title: title,
|
|
8471
8470
|
baseClass: baseClass,
|
|
8472
8471
|
searchPlaceHolder: searchPlaceHolder,
|
|
8472
|
+
searchable: searchable,
|
|
8473
8473
|
onSearchChanged: _this.onSearchChanged
|
|
8474
8474
|
}), /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GraphQLMultiSelector$1, {
|
|
8475
8475
|
triggerRequest: function triggerRequest() {
|
|
@@ -8523,6 +8523,7 @@
|
|
|
8523
8523
|
LuxityGraphQLMultiselector.defaultProps = {
|
|
8524
8524
|
baseClass: '',
|
|
8525
8525
|
searchPlaceHolder: '',
|
|
8526
|
+
searchable: true,
|
|
8526
8527
|
queryLimitIncrement: 12,
|
|
8527
8528
|
baseQueryLimit: 12
|
|
8528
8529
|
};
|
|
@@ -8636,6 +8637,48 @@
|
|
|
8636
8637
|
}
|
|
8637
8638
|
};
|
|
8638
8639
|
|
|
8640
|
+
var ApparelSizeSelector = function ApparelSizeSelector(_ref) {
|
|
8641
|
+
var onChange = _ref.onChange,
|
|
8642
|
+
category = _ref.category,
|
|
8643
|
+
graphApi = _ref.graphApi,
|
|
8644
|
+
itemRenderer = _ref.itemRenderer,
|
|
8645
|
+
getGraphQuery = _ref.getGraphQuery,
|
|
8646
|
+
resultProcessor = _ref.resultProcessor,
|
|
8647
|
+
requestInstance = _ref.requestInstance;
|
|
8648
|
+
return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
|
|
8649
|
+
title: "Sizes",
|
|
8650
|
+
queryId: "getApparelSizes",
|
|
8651
|
+
baseQueryLimit: 16,
|
|
8652
|
+
baseClass: "apparel-size-selector",
|
|
8653
|
+
identifier: "apparel-size-selector",
|
|
8654
|
+
searchable: false,
|
|
8655
|
+
category: category,
|
|
8656
|
+
onChange: onChange,
|
|
8657
|
+
graphApi: graphApi,
|
|
8658
|
+
itemRenderer: itemRenderer,
|
|
8659
|
+
getGraphQuery: getGraphQuery,
|
|
8660
|
+
resultProcessor: resultProcessor,
|
|
8661
|
+
requestInstance: requestInstance
|
|
8662
|
+
});
|
|
8663
|
+
};
|
|
8664
|
+
|
|
8665
|
+
ApparelSizeSelector.defaultProps = {
|
|
8666
|
+
itemRenderer: ItemRenderer,
|
|
8667
|
+
resultProcessor: function resultProcessor(result) {
|
|
8668
|
+
return {
|
|
8669
|
+
data: (result.data.data.luxity_universal_apparel_size_list || []).map(function (_ref2) {
|
|
8670
|
+
var id = _ref2.id,
|
|
8671
|
+
size = _ref2.size;
|
|
8672
|
+
return {
|
|
8673
|
+
id: id,
|
|
8674
|
+
name: size
|
|
8675
|
+
};
|
|
8676
|
+
}),
|
|
8677
|
+
has_more_pages: false
|
|
8678
|
+
};
|
|
8679
|
+
}
|
|
8680
|
+
};
|
|
8681
|
+
|
|
8639
8682
|
var genders = {
|
|
8640
8683
|
FEMALE: 0,
|
|
8641
8684
|
MALE: 1,
|
|
@@ -10395,6 +10438,7 @@
|
|
|
10395
10438
|
min_price: null,
|
|
10396
10439
|
max_price: null,
|
|
10397
10440
|
styles: [],
|
|
10441
|
+
apparel_sizes: [],
|
|
10398
10442
|
gender: [],
|
|
10399
10443
|
condition: [],
|
|
10400
10444
|
request: _objectSpread2({}, request),
|
|
@@ -10424,7 +10468,8 @@
|
|
|
10424
10468
|
_this.setState({
|
|
10425
10469
|
category_type: categoryType,
|
|
10426
10470
|
brands: [],
|
|
10427
|
-
styles: []
|
|
10471
|
+
styles: [],
|
|
10472
|
+
apparel_sizes: []
|
|
10428
10473
|
});
|
|
10429
10474
|
});
|
|
10430
10475
|
|
|
@@ -10473,6 +10518,14 @@
|
|
|
10473
10518
|
});
|
|
10474
10519
|
});
|
|
10475
10520
|
|
|
10521
|
+
_defineProperty(_assertThisInitialized(_this), "onApparelSizesChanged", function (apparelSizesArray) {
|
|
10522
|
+
_this.setState({
|
|
10523
|
+
apparel_sizes: apparelSizesArray.map(function (apparelSize) {
|
|
10524
|
+
return apparelSize.id;
|
|
10525
|
+
})
|
|
10526
|
+
});
|
|
10527
|
+
});
|
|
10528
|
+
|
|
10476
10529
|
_defineProperty(_assertThisInitialized(_this), "onConditionChanged", function (conditions) {
|
|
10477
10530
|
_this.setState({
|
|
10478
10531
|
condition: conditions.map(function (condition) {
|
|
@@ -10502,6 +10555,7 @@
|
|
|
10502
10555
|
min_price = _this$state.min_price,
|
|
10503
10556
|
max_price = _this$state.max_price,
|
|
10504
10557
|
styles = _this$state.styles,
|
|
10558
|
+
apparel_sizes = _this$state.apparel_sizes,
|
|
10505
10559
|
category_type = _this$state.category_type,
|
|
10506
10560
|
requestState = _this$state.request,
|
|
10507
10561
|
gender = _this$state.gender,
|
|
@@ -10527,8 +10581,11 @@
|
|
|
10527
10581
|
max_shoe_size_id: max_shoe_size_id,
|
|
10528
10582
|
shoe_size_type: shoe_size_type
|
|
10529
10583
|
} : {};
|
|
10584
|
+
var apparelSizesPayload = category_type === interestCategories.APPAREL ? {
|
|
10585
|
+
apparel_sizes: apparel_sizes
|
|
10586
|
+
} : {};
|
|
10530
10587
|
|
|
10531
|
-
var payload = _objectSpread2(_objectSpread2({}, basePayload), shoeSizesPayload);
|
|
10588
|
+
var payload = _objectSpread2(_objectSpread2(_objectSpread2({}, basePayload), shoeSizesPayload), apparelSizesPayload);
|
|
10532
10589
|
|
|
10533
10590
|
simpleRequest(_this.props.requestInstance, _this.props.addInterestApi, method.POST, payload, function () {
|
|
10534
10591
|
_this.setState({
|
|
@@ -10585,6 +10642,7 @@
|
|
|
10585
10642
|
baseGraphApi = _this$props.baseGraphApi,
|
|
10586
10643
|
getBrandsGraphQuery = _this$props.getBrandsGraphQuery,
|
|
10587
10644
|
getStylesGraphQuery = _this$props.getStylesGraphQuery,
|
|
10645
|
+
getApparelSizesGraphQuery = _this$props.getApparelSizesGraphQuery,
|
|
10588
10646
|
getShoesGraphQuery = _this$props.getShoesGraphQuery,
|
|
10589
10647
|
defaultShoeSizeType = _this$props.defaultShoeSizeType,
|
|
10590
10648
|
getConditionsGraphQuery = _this$props.getConditionsGraphQuery;
|
|
@@ -10616,6 +10674,12 @@
|
|
|
10616
10674
|
requestInstance: requestInstance,
|
|
10617
10675
|
graphApi: "".concat(baseGraphApi, "?id=getStyles"),
|
|
10618
10676
|
getGraphQuery: getStylesGraphQuery
|
|
10677
|
+
}), category_type === interestCategories.APPAREL && /*#__PURE__*/React__default.createElement(ApparelSizeSelector, {
|
|
10678
|
+
category: category_type,
|
|
10679
|
+
onChange: _this.onApparelSizesChanged,
|
|
10680
|
+
requestInstance: requestInstance,
|
|
10681
|
+
graphApi: "".concat(baseGraphApi, "?id=getApparelSizes"),
|
|
10682
|
+
getGraphQuery: getApparelSizesGraphQuery
|
|
10619
10683
|
}), /*#__PURE__*/React__default.createElement(ConditionSelector, {
|
|
10620
10684
|
onChange: _this.onConditionChanged,
|
|
10621
10685
|
requestInstance: requestInstance,
|
|
@@ -11657,6 +11721,7 @@
|
|
|
11657
11721
|
baseGraphApi = _this$props2.baseGraphApi,
|
|
11658
11722
|
getBrandsGraphQuery = _this$props2.getBrandsGraphQuery,
|
|
11659
11723
|
getStylesGraphQuery = _this$props2.getStylesGraphQuery,
|
|
11724
|
+
getApparelSizesGraphQuery = _this$props2.getApparelSizesGraphQuery,
|
|
11660
11725
|
getShoesGraphQuery = _this$props2.getShoesGraphQuery,
|
|
11661
11726
|
deleteInterestApi = _this$props2.deleteInterestApi,
|
|
11662
11727
|
setSchedule = _this$props2.setSchedule,
|
|
@@ -11711,6 +11776,7 @@
|
|
|
11711
11776
|
baseGraphApi: baseGraphApi,
|
|
11712
11777
|
getBrandsGraphQuery: getBrandsGraphQuery,
|
|
11713
11778
|
getStylesGraphQuery: getStylesGraphQuery,
|
|
11779
|
+
getApparelSizesGraphQuery: getApparelSizesGraphQuery,
|
|
11714
11780
|
getShoesGraphQuery: getShoesGraphQuery,
|
|
11715
11781
|
defaultShoeSizeType: defaultShoeSizeType,
|
|
11716
11782
|
addInterestTitle: "Category Interest",
|