magneto365.ui 2.69.0-beta → 2.69.0-beta.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/dist/cjs/css/magneto.ui.lib.min.css +1 -1
- package/dist/cjs/index.js +15 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/UI/molecules/InputPlus/InputPlus.interface.d.ts +4 -0
- package/dist/esm/css/magneto.ui.lib.min.css +1 -1
- package/dist/esm/index.js +15 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/UI/molecules/InputPlus/InputPlus.interface.d.ts +4 -0
- package/dist/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -4408,7 +4408,7 @@ var Input = function (_a) {
|
|
|
4408
4408
|
var styles$1I = {"magneto-ui-input-plus":"mg_input_plus_magneto-ui-input-plus_1diki","magneto-ui-input-plus__plus-button":"mg_input_plus_magneto-ui-input-plus_plus-button_1diki","disabled":"mg_input_plus_disabled_1diki","disabled-img":"mg_input_plus_disabled-img_1diki"};
|
|
4409
4409
|
|
|
4410
4410
|
var InputPlus = function (_a) {
|
|
4411
|
-
var onChange = _a.onChange, placeholder = _a.placeholder, _b = _a.maxWords, maxWords = _b === void 0 ? 4 : _b, disabled = _a.disabled, isLoading = _a.isLoading, _c = _a.className, className = _c === void 0 ? '' : _c, getValue = _a.getValue;
|
|
4411
|
+
var onChange = _a.onChange, placeholder = _a.placeholder, _b = _a.maxWords, maxWords = _b === void 0 ? 4 : _b, disabled = _a.disabled, isLoading = _a.isLoading, _c = _a.className, className = _c === void 0 ? '' : _c, getValue = _a.getValue, maxLength = _a.maxLength;
|
|
4412
4412
|
var _d = React.useState(''), inputValue = _d[0], setInputValue = _d[1];
|
|
4413
4413
|
var _e = React.useState(false), disabledBtn = _e[0], setDisabledBtn = _e[1];
|
|
4414
4414
|
React.useEffect(function () {
|
|
@@ -4435,7 +4435,7 @@ var InputPlus = function (_a) {
|
|
|
4435
4435
|
}
|
|
4436
4436
|
setDisabledBtn(false);
|
|
4437
4437
|
}, [disabled, maxWords]);
|
|
4438
|
-
var
|
|
4438
|
+
var handleSubmit = React.useCallback(function () {
|
|
4439
4439
|
if (inputValue) {
|
|
4440
4440
|
onChange(inputValue);
|
|
4441
4441
|
setInputValue('');
|
|
@@ -4445,13 +4445,13 @@ var InputPlus = function (_a) {
|
|
|
4445
4445
|
if (event.key === 'Enter') {
|
|
4446
4446
|
event.preventDefault();
|
|
4447
4447
|
if (!disabledBtn) {
|
|
4448
|
-
|
|
4448
|
+
handleSubmit();
|
|
4449
4449
|
}
|
|
4450
4450
|
}
|
|
4451
|
-
}, [disabledBtn,
|
|
4451
|
+
}, [disabledBtn, handleSubmit]);
|
|
4452
4452
|
return (React__default["default"].createElement("div", { className: "".concat(styles$1I["".concat(classMUI, "-input-plus")], " ").concat(className) },
|
|
4453
|
-
React__default["default"].createElement("input", { onKeyDown: handleKeyDown, placeholder: placeholder, value: inputValue, onChange: handleValue, type: "text" }),
|
|
4454
|
-
React__default["default"].createElement("button", { type: "button", onClick:
|
|
4453
|
+
React__default["default"].createElement("input", { onKeyDown: handleKeyDown, placeholder: placeholder, value: inputValue, onChange: handleValue, type: "text", maxLength: maxLength }),
|
|
4454
|
+
React__default["default"].createElement("button", { type: "button", onClick: handleSubmit, className: "".concat(styles$1I["".concat(classMUI, "-input-plus__plus-button")], " ").concat(disabledBtn ? styles$1I.disabled : ''), disabled: disabledBtn }, isLoading ? (React__default["default"].createElement(FlatLoader, { color: "white", secondColor: "transparent" })) : (React__default["default"].createElement("img", { className: "".concat(disabledBtn ? styles$1I['disabled-img'] : ''), src: Add2, alt: "icon" })))));
|
|
4455
4455
|
};
|
|
4456
4456
|
|
|
4457
4457
|
var styles$1H = {"magneto-ui-job-actions":"mg_job_actions_magneto-ui-job-actions_1awr3","magneto-ui-job-actions__button-wrapper":"mg_job_actions_magneto-ui-job-actions_button-wrapper_1awr3","magneto-ui-job-actions__buttons-wrapper":"mg_job_actions_magneto-ui-job-actions_buttons-wrapper_1awr3","magneto-ui-job-actions__icon-wrapper":"mg_job_actions_magneto-ui-job-actions_icon-wrapper_1awr3","magneto-ui-job-actions__icon-anchor":"mg_job_actions_magneto-ui-job-actions_icon-anchor_1awr3","magneto-ui__external-child":"mg_job_actions_magneto-ui_external-child_1awr3"};
|
|
@@ -6345,15 +6345,10 @@ var FilterCard = function (_a) {
|
|
|
6345
6345
|
var _e = React.useState(showFilters), showItems = _e[0], setShowItems = _e[1];
|
|
6346
6346
|
var hasSearch = React.useMemo(function () { return renderType === ERenderType.multiSelect; }, [renderType]);
|
|
6347
6347
|
var hasTotal = React.useMemo(function () { return !values.find(function (value) { return value.isApplied; }); }, [values]);
|
|
6348
|
-
var appliedOption = React.useMemo(function () {
|
|
6349
|
-
var
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
});
|
|
6353
|
-
if (option != undefined)
|
|
6354
|
-
setShowItems(true);
|
|
6355
|
-
return option;
|
|
6356
|
-
}, [options]);
|
|
6348
|
+
var appliedOption = React.useMemo(function () { return options.find(function (_a) {
|
|
6349
|
+
var isApplied = _a.isApplied;
|
|
6350
|
+
return isApplied;
|
|
6351
|
+
}); }, [options]);
|
|
6357
6352
|
var hasntOptions = React.useMemo(function () { return options.every(function (_a) {
|
|
6358
6353
|
var total = _a.total;
|
|
6359
6354
|
return total == 0 || total == undefined;
|
|
@@ -6383,6 +6378,10 @@ var FilterCard = function (_a) {
|
|
|
6383
6378
|
return React__default["default"].createElement(React.Fragment, null);
|
|
6384
6379
|
return options.map(renderItem);
|
|
6385
6380
|
}, [options, appliedOption, renderItem, hasntOptions]);
|
|
6381
|
+
React.useEffect(function () {
|
|
6382
|
+
if (appliedOption != undefined)
|
|
6383
|
+
setShowItems(true);
|
|
6384
|
+
}, [appliedOption]);
|
|
6386
6385
|
React.useEffect(function () {
|
|
6387
6386
|
setOptions(values);
|
|
6388
6387
|
}, [values]);
|
|
@@ -9641,7 +9640,7 @@ var SortBar = function (_a) {
|
|
|
9641
9640
|
React__default["default"].createElement(MobileSortMenu, { isOpen: showMenu, orderFields: orderFields, orderByText: orderByText, textOrderFilter: textOrderFilter, titleBtnOrder: titleBtnOrder, onClose: function () { return setShowMenu(!showMenu); }, setFilter: setFilter, orderFilter: orderFilter, setShowPopover: setShowMenu })));
|
|
9642
9641
|
};
|
|
9643
9642
|
|
|
9644
|
-
var style$3 = {"magneto-ui-vacant-positions-layout":"mg_vacant_positions_magneto-ui-vacant-positions-
|
|
9643
|
+
var style$3 = {"magneto-ui-vacant-positions-layout":"mg_vacant_positions_magneto-ui-vacant-positions-layout_a7gay","magneto-ui-vacant-positions-layout-top-container":"mg_vacant_positions_magneto-ui-vacant-positions-layout-top-container_a7gay","magneto-ui-vacant-positions-layout-top-container__back-button":"mg_vacant_positions_magneto-ui-vacant-positions-layout-top-container_back-button_a7gay","magneto-ui-vacant-positions-layout-top-container--description":"mg_vacant_positions_magneto-ui-vacant-positions-layout-top-container--description_a7gay","magneto-ui-vacant-positions-layout-view-more-container":"mg_vacant_positions_magneto-ui-vacant-positions-layout-view-more-container_a7gay","magneto-ui-vacant-positions-layout-view-more-container__button":"mg_vacant_positions_magneto-ui-vacant-positions-layout-view-more-container_button_a7gay"};
|
|
9645
9644
|
|
|
9646
9645
|
var Muiclass = 'magneto-ui';
|
|
9647
9646
|
var VacantPositions = function (_a) {
|