@bonlineza/luxity-lib 2.35.1 → 2.35.3
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 +58 -57
- package/AddProductInterest.js +7748 -0
- package/ConditionSelector.js +973 -0
- package/DropdownSelector.js +6839 -0
- package/GraphQLDropdownSelector.js +1204 -100
- package/IconHeader.js +2 -2
- package/Interests.js +1211 -106
- package/LuxityGraphQLDropdownSelector.js +1204 -100
- package/LuxityProductInterestItem.js +434 -0
- package/MaterialSelector.js +1204 -100
- package/ModelSelector.js +1204 -100
- package/NotificationDropDown.js +10 -3
- package/build/bundle.css +1 -1
- package/build/bundle.js +1230 -125
- package/package.json +1 -1
- package/build/.gitignore +0 -3
- package/build/.npmignore +0 -0
package/AddInterest.js
CHANGED
|
@@ -3043,37 +3043,41 @@
|
|
|
3043
3043
|
};
|
|
3044
3044
|
var GenderSelector$1 = themed(GenderSelector);
|
|
3045
3045
|
|
|
3046
|
-
var
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
3053
|
-
}, props), /*#__PURE__*/React__default.createElement("path", {
|
|
3054
|
-
d: "M0 11.5H23",
|
|
3055
|
-
stroke: "#000000",
|
|
3056
|
-
strokeWidth: "1.8"
|
|
3057
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
3058
|
-
d: "M11.5 0L11.5 23",
|
|
3059
|
-
stroke: "#000000",
|
|
3060
|
-
strokeWidth: "1.8"
|
|
3061
|
-
}));
|
|
3062
|
-
});
|
|
3046
|
+
var ConditionSelector = function ConditionSelector(_ref) {
|
|
3047
|
+
var onChange = _ref.onChange,
|
|
3048
|
+
graphApi = _ref.graphApi,
|
|
3049
|
+
itemRenderer = _ref.itemRenderer,
|
|
3050
|
+
getGraphQuery = _ref.getGraphQuery,
|
|
3051
|
+
requestInstance = _ref.requestInstance;
|
|
3063
3052
|
|
|
3064
|
-
|
|
3065
|
-
|
|
3053
|
+
var resultProcessor = function resultProcessor(result) {
|
|
3054
|
+
return result.data.data.conditions_list;
|
|
3055
|
+
};
|
|
3066
3056
|
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3057
|
+
return /*#__PURE__*/React__default.createElement(LuxityGraphQLMultiselector, {
|
|
3058
|
+
title: "Condition",
|
|
3059
|
+
queryId: "getCondition",
|
|
3060
|
+
baseQueryLimit: 10,
|
|
3061
|
+
baseClass: "style-selector",
|
|
3062
|
+
identifier: "style-selector",
|
|
3063
|
+
searchPlaceHolder: "Search Condition",
|
|
3064
|
+
category: "",
|
|
3065
|
+
onChange: onChange,
|
|
3066
|
+
graphApi: graphApi,
|
|
3067
|
+
itemRenderer: itemRenderer,
|
|
3068
|
+
getGraphQuery: getGraphQuery,
|
|
3069
|
+
resultProcessor: resultProcessor,
|
|
3070
|
+
requestInstance: requestInstance
|
|
3071
|
+
});
|
|
3072
|
+
};
|
|
3073
|
+
|
|
3074
|
+
ConditionSelector.defaultProps = {
|
|
3075
|
+
itemRenderer: ItemRenderer
|
|
3076
|
+
};
|
|
3073
3077
|
|
|
3074
|
-
var _templateObject$
|
|
3078
|
+
var _templateObject$w, _templateObject2$7, _templateObject3$2;
|
|
3075
3079
|
var UNISEX = genders.UNISEX;
|
|
3076
|
-
var AddInterestContainer = styled__default.div(_templateObject$
|
|
3080
|
+
var AddInterestContainer = styled__default.div(_templateObject$w || (_templateObject$w = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n border: 1px solid ", ";\n padding: ", ";\n"])), function (props) {
|
|
3077
3081
|
return props.theme.marginPaddings[6];
|
|
3078
3082
|
}, function (props) {
|
|
3079
3083
|
return props.theme.colors.borderColor;
|
|
@@ -3092,26 +3096,6 @@
|
|
|
3092
3096
|
}, function (props) {
|
|
3093
3097
|
return props.theme.marginPaddings[2];
|
|
3094
3098
|
});
|
|
3095
|
-
var AddInterestButton = styled__default.div(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n font-weight: bold;\n color: ", ";\n border: 1px solid ", ";\n padding-top: ", ";\n margin-bottom: ", ";\n padding-left: 1.5rem;\n width: 95%;\n font-size: 17px;\n"])), function (props) {
|
|
3096
|
-
return props.theme.colors.darkerGray;
|
|
3097
|
-
}, function (props) {
|
|
3098
|
-
return props.theme.colors.borderColor;
|
|
3099
|
-
}, function (props) {
|
|
3100
|
-
return props.theme.marginPaddings[0];
|
|
3101
|
-
}, function (props) {
|
|
3102
|
-
return props.theme.marginPaddings[2];
|
|
3103
|
-
});
|
|
3104
|
-
var AddInterestButtonContainer = styled__default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n\n #add-icon {\n margin-bottom: 1.5rem;\n\n svg {\n width: 15px;\n }\n }\n"])));
|
|
3105
|
-
|
|
3106
|
-
var AddIcon = function AddIcon(_ref) {
|
|
3107
|
-
var onClick = _ref.onClick,
|
|
3108
|
-
id = _ref.id;
|
|
3109
|
-
return /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
3110
|
-
id: id,
|
|
3111
|
-
onClick: onClick
|
|
3112
|
-
}, /*#__PURE__*/React__default.createElement(SvgWrapper$1, null, /*#__PURE__*/React__default.createElement(Add, null)));
|
|
3113
|
-
};
|
|
3114
|
-
|
|
3115
3099
|
var defaultState = {
|
|
3116
3100
|
category_type: null,
|
|
3117
3101
|
brands: [],
|
|
@@ -3121,6 +3105,7 @@
|
|
|
3121
3105
|
max_price: null,
|
|
3122
3106
|
styles: [],
|
|
3123
3107
|
gender: [],
|
|
3108
|
+
condition: [],
|
|
3124
3109
|
request: _objectSpread2({}, request),
|
|
3125
3110
|
isCategoriesShown: false
|
|
3126
3111
|
};
|
|
@@ -3197,6 +3182,14 @@
|
|
|
3197
3182
|
});
|
|
3198
3183
|
});
|
|
3199
3184
|
|
|
3185
|
+
_defineProperty(_assertThisInitialized(_this), "onConditionChanged", function (conditions) {
|
|
3186
|
+
_this.setState({
|
|
3187
|
+
condition: conditions.map(function (condition) {
|
|
3188
|
+
return condition.id;
|
|
3189
|
+
})
|
|
3190
|
+
});
|
|
3191
|
+
});
|
|
3192
|
+
|
|
3200
3193
|
_defineProperty(_assertThisInitialized(_this), "payloadIsValid", function () {
|
|
3201
3194
|
// price/shoe-size always have initial values as soon as category is set
|
|
3202
3195
|
var category_type = _this.state.category_type;
|
|
@@ -3220,7 +3213,8 @@
|
|
|
3220
3213
|
styles = _this$state.styles,
|
|
3221
3214
|
category_type = _this$state.category_type,
|
|
3222
3215
|
requestState = _this$state.request,
|
|
3223
|
-
gender = _this$state.gender
|
|
3216
|
+
gender = _this$state.gender,
|
|
3217
|
+
condition = _this$state.condition;
|
|
3224
3218
|
var payloadGender = gender[0];
|
|
3225
3219
|
|
|
3226
3220
|
if (gender.length > 1 || !gender.length) {
|
|
@@ -3233,6 +3227,7 @@
|
|
|
3233
3227
|
min_price: min_price,
|
|
3234
3228
|
max_price: max_price,
|
|
3235
3229
|
styles: styles,
|
|
3230
|
+
condition: condition,
|
|
3236
3231
|
gender: payloadGender,
|
|
3237
3232
|
request: requestState
|
|
3238
3233
|
};
|
|
@@ -3255,8 +3250,8 @@
|
|
|
3255
3250
|
}, _this.handleRequestError);
|
|
3256
3251
|
});
|
|
3257
3252
|
|
|
3258
|
-
_defineProperty(_assertThisInitialized(_this), "handleRequestError", function (
|
|
3259
|
-
var data =
|
|
3253
|
+
_defineProperty(_assertThisInitialized(_this), "handleRequestError", function (_ref) {
|
|
3254
|
+
var data = _ref.data;
|
|
3260
3255
|
|
|
3261
3256
|
_this.setState({
|
|
3262
3257
|
request: _objectSpread2({}, request)
|
|
@@ -3274,6 +3269,8 @@
|
|
|
3274
3269
|
|
|
3275
3270
|
_defineProperty(_assertThisInitialized(_this), "resetState", function () {
|
|
3276
3271
|
_this.setState(_objectSpread2({}, defaultState));
|
|
3272
|
+
|
|
3273
|
+
_this.props.onCancel();
|
|
3277
3274
|
});
|
|
3278
3275
|
|
|
3279
3276
|
_defineProperty(_assertThisInitialized(_this), "handleGenderChange", function (isChecked, gender) {
|
|
@@ -3298,12 +3295,11 @@
|
|
|
3298
3295
|
getBrandsGraphQuery = _this$props.getBrandsGraphQuery,
|
|
3299
3296
|
getStylesGraphQuery = _this$props.getStylesGraphQuery,
|
|
3300
3297
|
getShoesGraphQuery = _this$props.getShoesGraphQuery,
|
|
3301
|
-
defaultShoeSizeType = _this$props.defaultShoeSizeType
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
})), _this.state.isCategoriesShown && /*#__PURE__*/React__default.createElement(AddInterestContainer, null, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(CatSelectorParagraph, null, "Select the catergory that interests you"), /*#__PURE__*/React__default.createElement(CategoryInterestSelector, {
|
|
3298
|
+
defaultShoeSizeType = _this$props.defaultShoeSizeType,
|
|
3299
|
+
getConditionsGraphQuery = _this$props.getConditionsGraphQuery;
|
|
3300
|
+
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
3301
|
+
className: "interests__section-wrapper"
|
|
3302
|
+
}, /*#__PURE__*/React__default.createElement(AddInterestContainer, null, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(CatSelectorParagraph, null, "Select the category that interests you"), /*#__PURE__*/React__default.createElement(CategoryInterestSelector, {
|
|
3307
3303
|
category: category_type,
|
|
3308
3304
|
onCategoryChange: _this.onCategoryChanged
|
|
3309
3305
|
}), category_type ? /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(GenderSelector$1, {
|
|
@@ -3329,6 +3325,11 @@
|
|
|
3329
3325
|
requestInstance: requestInstance,
|
|
3330
3326
|
graphApi: "".concat(baseGraphApi, "?id=getStyles"),
|
|
3331
3327
|
getGraphQuery: getStylesGraphQuery
|
|
3328
|
+
}), /*#__PURE__*/React__default.createElement(ConditionSelector, {
|
|
3329
|
+
onChange: _this.onConditionChanged,
|
|
3330
|
+
requestInstance: requestInstance,
|
|
3331
|
+
graphApi: "".concat(baseGraphApi, "?id=getCondition"),
|
|
3332
|
+
getGraphQuery: getConditionsGraphQuery
|
|
3332
3333
|
})) : null, /*#__PURE__*/React__default.createElement(SaveAndCancelButtonContainer, null, /*#__PURE__*/React__default.createElement("div", {
|
|
3333
3334
|
className: "fl-right"
|
|
3334
3335
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -3349,7 +3350,7 @@
|
|
|
3349
3350
|
|
|
3350
3351
|
_this.resetState();
|
|
3351
3352
|
}
|
|
3352
|
-
}, fetching ? 'SAVING' : 'SAVE')))))));
|
|
3353
|
+
}, fetching ? 'SAVING' : 'SAVE'))))))));
|
|
3353
3354
|
});
|
|
3354
3355
|
|
|
3355
3356
|
_this.state = _objectSpread2({}, defaultState);
|