@lanaco/lnc-react-ui 2.1.12 → 2.1.13
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/lib/index.esm.js +49 -11
- package/lib/index.js +49 -11
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -53325,7 +53325,7 @@ Item.propTypes = {
|
|
|
53325
53325
|
var css_248z = ".option-item-enter {\n opacity: 0;\n}\n\n.option-item-enter-active {\n transition: all 0.2s ease-in;\n opacity: 1;\n}\n\n.option-item-exit {\n}\n\n.option--exit-active {\n opacity: 0;\n transition: opacity 200ms ease-out;\n}\n";
|
|
53326
53326
|
styleInject(css_248z);
|
|
53327
53327
|
|
|
53328
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
|
|
53328
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
53329
53329
|
var spin = keyframes$2(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 100% {\n transform: rotate(360deg);\n }\n\n 0% {\n transform: rotate(0deg);\n }\n"])));
|
|
53330
53330
|
|
|
53331
53331
|
var getIconFontSize = function getIconFontSize(props) {
|
|
@@ -53373,7 +53373,7 @@ var Input = newStyled.input(_templateObject7 || (_templateObject7 = _taggedTempl
|
|
|
53373
53373
|
var Content = newStyled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n position: absolute;\n background-color: white;\n z-index: 1;\n margin-top: 0.25rem;\n padding: 0.1875rem;\n width: calc(100% - 0.625rem);\n border-radius: 0.15625rem;\n box-shadow: 0 0 0.375rem #bebebe;\n border: 0.125rem solid ", ";\n flex-direction: column;\n transition: all 250ms ease;\n"])), function (props) {
|
|
53374
53374
|
return props.theme.palette[props.color].main;
|
|
53375
53375
|
});
|
|
53376
|
-
var ContentItem = newStyled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n font-family: ", ";\n font-size: ", ";\n padding: 0.375rem;\n cursor: pointer;\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: whitesmoke;\n color: ", ";\n }\n"])), function (props) {
|
|
53376
|
+
var ContentItem = newStyled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n font-family: ", ";\n font-size: ", ";\n\n padding: 0.375rem;\n cursor: pointer;\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: whitesmoke;\n color: ", ";\n }\n"])), function (props) {
|
|
53377
53377
|
return props.theme.typography.fontFamily;
|
|
53378
53378
|
}, function (props) {
|
|
53379
53379
|
return props.theme.typography[props.size].fontSize;
|
|
@@ -53408,12 +53408,14 @@ var LoadingIcon = newStyled.div(_templateObject12 || (_templateObject12 = _tagge
|
|
|
53408
53408
|
var InnerContainer = newStyled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: no-wrap;\n align-items: stretch;\n"])));
|
|
53409
53409
|
var ItemsContent = newStyled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n flex-grow: 1;\n"])));
|
|
53410
53410
|
var Controls = newStyled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
53411
|
+
var AddOptionText = newStyled.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n font-weight: bold;\n"])));
|
|
53411
53412
|
|
|
53412
53413
|
var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
53413
53414
|
var items = props.items,
|
|
53414
53415
|
options = props.options,
|
|
53415
53416
|
load = props.load,
|
|
53416
53417
|
onChange = props.onChange,
|
|
53418
|
+
onAdd = props.onAdd,
|
|
53417
53419
|
clearOptions = props.clearOptions,
|
|
53418
53420
|
loading = props.loading,
|
|
53419
53421
|
notItemsFoundText = props.notItemsFoundText,
|
|
@@ -53424,7 +53426,9 @@ var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
|
53424
53426
|
mapValueTo = props.mapValueTo,
|
|
53425
53427
|
size = props.size,
|
|
53426
53428
|
color = props.color,
|
|
53427
|
-
theme = props.theme
|
|
53429
|
+
theme = props.theme,
|
|
53430
|
+
enableAdd = props.enableAdd,
|
|
53431
|
+
addOptionText = props.addOptionText;
|
|
53428
53432
|
|
|
53429
53433
|
var _useState = useState(false),
|
|
53430
53434
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -53466,17 +53470,23 @@ var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
|
53466
53470
|
|
|
53467
53471
|
if (options !== null && options.length !== 0 && inFocus) {
|
|
53468
53472
|
if (e.keyCode === 38 && cursor > 0) setCursor(cursor - 1);
|
|
53469
|
-
|
|
53470
|
-
if (e.keyCode ===
|
|
53473
|
+
|
|
53474
|
+
if (e.keyCode === 40 && (cursor === options.length - 1 && enableAdd || cursor < options.length - 1)) {
|
|
53475
|
+
setCursor(cursor + 1);
|
|
53476
|
+
}
|
|
53477
|
+
|
|
53478
|
+
if (e.keyCode === 13 && cursor != options.length) optionSelected([].concat(_toConsumableArray(items), [options[cursor]]));
|
|
53479
|
+
if (e.keyCode === 13 && cursor === options.length && enableAdd) addNew();
|
|
53471
53480
|
|
|
53472
53481
|
if (e.key === "Backspace" && items.length > 0 && value === "") {
|
|
53473
53482
|
handleRemoveItem(items.length - 1);
|
|
53474
53483
|
}
|
|
53475
53484
|
|
|
53476
|
-
console.log("ARR DOWN");
|
|
53477
53485
|
return;
|
|
53478
53486
|
}
|
|
53479
53487
|
|
|
53488
|
+
if (e.keyCode === 13 && enableAdd && (options === null || options !== null && options.length === 0)) addNew();
|
|
53489
|
+
|
|
53480
53490
|
if (e.keyCode === 40) {
|
|
53481
53491
|
setInFocus(true);
|
|
53482
53492
|
setCursor(0);
|
|
@@ -53502,6 +53512,14 @@ var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
|
53502
53512
|
setCursor(0);
|
|
53503
53513
|
};
|
|
53504
53514
|
|
|
53515
|
+
var addNew = function addNew() {
|
|
53516
|
+
onAdd(value);
|
|
53517
|
+
setValue("");
|
|
53518
|
+
clearOptions(id);
|
|
53519
|
+
setInFocus(false);
|
|
53520
|
+
setCursor(0);
|
|
53521
|
+
};
|
|
53522
|
+
|
|
53505
53523
|
var onInputBlur = function onInputBlur() {
|
|
53506
53524
|
setInFocus(false);
|
|
53507
53525
|
setInputFocus(false);
|
|
@@ -53539,7 +53557,15 @@ var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
|
53539
53557
|
},
|
|
53540
53558
|
hover: cursor === i
|
|
53541
53559
|
}), item[mapValueTo]);
|
|
53542
|
-
}))
|
|
53560
|
+
}), enableAdd && !options.map(function (y) {
|
|
53561
|
+
return y.value;
|
|
53562
|
+
}).includes(value) ? /*#__PURE__*/React__default.createElement(ContentItem, _extends({}, themeProps, {
|
|
53563
|
+
key: options.length,
|
|
53564
|
+
onMouseDown: function onMouseDown() {
|
|
53565
|
+
return addNew();
|
|
53566
|
+
},
|
|
53567
|
+
hover: cursor === options.length
|
|
53568
|
+
}), /*#__PURE__*/React__default.createElement(AddOptionText, null, addOptionText), value) : ""));
|
|
53543
53569
|
}
|
|
53544
53570
|
|
|
53545
53571
|
var empty = options === null || options !== null && options.length === 0;
|
|
@@ -53547,9 +53573,15 @@ var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
|
53547
53573
|
if (inFocus && empty && loading === false) {
|
|
53548
53574
|
return /*#__PURE__*/React__default.createElement(FadeIn, null, /*#__PURE__*/React__default.createElement(Content, _extends({}, themeProps, {
|
|
53549
53575
|
key: 0
|
|
53550
|
-
}), /*#__PURE__*/React__default.createElement(ContentItem, _extends({}, themeProps, {
|
|
53576
|
+
}), enableAdd ? /*#__PURE__*/React__default.createElement(ContentItem, _extends({}, themeProps, {
|
|
53551
53577
|
key: 0,
|
|
53552
|
-
|
|
53578
|
+
onMouseDown: function onMouseDown() {
|
|
53579
|
+
return addNew();
|
|
53580
|
+
},
|
|
53581
|
+
hover: true
|
|
53582
|
+
}), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, notItemsFoundText, /*#__PURE__*/React__default.createElement(AddOptionText, null, addOptionText), value)) : /*#__PURE__*/React__default.createElement(ContentItem, _extends({}, themeProps, {
|
|
53583
|
+
key: 0,
|
|
53584
|
+
hover: false,
|
|
53553
53585
|
onMouseDown: onInputBlur
|
|
53554
53586
|
}), notItemsFoundText)));
|
|
53555
53587
|
}
|
|
@@ -53610,6 +53642,7 @@ MultiSelectDropdown.defaultProps = {
|
|
|
53610
53642
|
disabled: false,
|
|
53611
53643
|
load: function load() {},
|
|
53612
53644
|
onChange: function onChange() {},
|
|
53645
|
+
onAdd: function onAdd() {},
|
|
53613
53646
|
clearOptions: function clearOptions() {},
|
|
53614
53647
|
items: [],
|
|
53615
53648
|
options: [],
|
|
@@ -53619,7 +53652,9 @@ MultiSelectDropdown.defaultProps = {
|
|
|
53619
53652
|
notItemsFoundText: "No items found...",
|
|
53620
53653
|
theme: theme,
|
|
53621
53654
|
mapIdTo: "id",
|
|
53622
|
-
mapValueTo: "value"
|
|
53655
|
+
mapValueTo: "value",
|
|
53656
|
+
enableAdd: false,
|
|
53657
|
+
addOptionText: "Add new item"
|
|
53623
53658
|
};
|
|
53624
53659
|
MultiSelectDropdown.propTypes = {
|
|
53625
53660
|
theme: PropTypes.object.isRequired,
|
|
@@ -53627,6 +53662,7 @@ MultiSelectDropdown.propTypes = {
|
|
|
53627
53662
|
disabled: PropTypes.bool,
|
|
53628
53663
|
load: PropTypes.func,
|
|
53629
53664
|
onChange: PropTypes.func,
|
|
53665
|
+
onAdd: PropTypes.func,
|
|
53630
53666
|
clearOptions: PropTypes.func,
|
|
53631
53667
|
className: PropTypes.string,
|
|
53632
53668
|
items: PropTypes.array,
|
|
@@ -53635,7 +53671,9 @@ MultiSelectDropdown.propTypes = {
|
|
|
53635
53671
|
mapValueTo: PropTypes.string,
|
|
53636
53672
|
notItemsFoundText: PropTypes.string,
|
|
53637
53673
|
size: PropTypes.oneOf(["small", "medium", "large"]),
|
|
53638
|
-
color: PropTypes.oneOf(["primary", "secondary", "success", "error", "warning", "gray", "background", "transparent"])
|
|
53674
|
+
color: PropTypes.oneOf(["primary", "secondary", "success", "error", "warning", "gray", "background", "transparent"]),
|
|
53675
|
+
enableAdd: PropTypes.bool,
|
|
53676
|
+
addOptionText: PropTypes.string
|
|
53639
53677
|
};
|
|
53640
53678
|
|
|
53641
53679
|
export { Alet as Alert, Button$1 as Button, CheckBox, CheckboxLookup, ConfirmationForm, DataView, DateInput, DropDown, DropdownLookup, DropdownMenu, FormContainer, FormField, Grid, Icon$1 as Icon, ItemCounter, Modal$1 as Modal, MultiSelectDropdown, NumberInput, Pagination, PasswordInput, PeriodSelector, SearchBar, Spinner, Tabs, TagSelector, TextArea, TextInput, ToggleSwitch, theme };
|
package/lib/index.js
CHANGED
|
@@ -53366,7 +53366,7 @@ Item.propTypes = {
|
|
|
53366
53366
|
var css_248z = ".option-item-enter {\n opacity: 0;\n}\n\n.option-item-enter-active {\n transition: all 0.2s ease-in;\n opacity: 1;\n}\n\n.option-item-exit {\n}\n\n.option--exit-active {\n opacity: 0;\n transition: opacity 200ms ease-out;\n}\n";
|
|
53367
53367
|
styleInject(css_248z);
|
|
53368
53368
|
|
|
53369
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
|
|
53369
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
53370
53370
|
var spin = keyframes$2(_templateObject || (_templateObject = _taggedTemplateLiteral__default['default'](["\n 100% {\n transform: rotate(360deg);\n }\n\n 0% {\n transform: rotate(0deg);\n }\n"])));
|
|
53371
53371
|
|
|
53372
53372
|
var getIconFontSize = function getIconFontSize(props) {
|
|
@@ -53414,7 +53414,7 @@ var Input = newStyled.input(_templateObject7 || (_templateObject7 = _taggedTempl
|
|
|
53414
53414
|
var Content = newStyled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral__default['default'](["\n display: flex;\n position: absolute;\n background-color: white;\n z-index: 1;\n margin-top: 0.25rem;\n padding: 0.1875rem;\n width: calc(100% - 0.625rem);\n border-radius: 0.15625rem;\n box-shadow: 0 0 0.375rem #bebebe;\n border: 0.125rem solid ", ";\n flex-direction: column;\n transition: all 250ms ease;\n"])), function (props) {
|
|
53415
53415
|
return props.theme.palette[props.color].main;
|
|
53416
53416
|
});
|
|
53417
|
-
var ContentItem = newStyled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral__default['default'](["\n font-family: ", ";\n font-size: ", ";\n padding: 0.375rem;\n cursor: pointer;\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: whitesmoke;\n color: ", ";\n }\n"])), function (props) {
|
|
53417
|
+
var ContentItem = newStyled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral__default['default'](["\n font-family: ", ";\n font-size: ", ";\n\n padding: 0.375rem;\n cursor: pointer;\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: whitesmoke;\n color: ", ";\n }\n"])), function (props) {
|
|
53418
53418
|
return props.theme.typography.fontFamily;
|
|
53419
53419
|
}, function (props) {
|
|
53420
53420
|
return props.theme.typography[props.size].fontSize;
|
|
@@ -53449,12 +53449,14 @@ var LoadingIcon = newStyled.div(_templateObject12 || (_templateObject12 = _tagge
|
|
|
53449
53449
|
var InnerContainer = newStyled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral__default['default'](["\n display: flex;\n flex-wrap: no-wrap;\n align-items: stretch;\n"])));
|
|
53450
53450
|
var ItemsContent = newStyled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral__default['default'](["\n flex-grow: 1;\n"])));
|
|
53451
53451
|
var Controls = newStyled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral__default['default'](["\n display: flex;\n"])));
|
|
53452
|
+
var AddOptionText = newStyled.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral__default['default'](["\n font-weight: bold;\n"])));
|
|
53452
53453
|
|
|
53453
53454
|
var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
53454
53455
|
var items = props.items,
|
|
53455
53456
|
options = props.options,
|
|
53456
53457
|
load = props.load,
|
|
53457
53458
|
onChange = props.onChange,
|
|
53459
|
+
onAdd = props.onAdd,
|
|
53458
53460
|
clearOptions = props.clearOptions,
|
|
53459
53461
|
loading = props.loading,
|
|
53460
53462
|
notItemsFoundText = props.notItemsFoundText,
|
|
@@ -53465,7 +53467,9 @@ var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
|
53465
53467
|
mapValueTo = props.mapValueTo,
|
|
53466
53468
|
size = props.size,
|
|
53467
53469
|
color = props.color,
|
|
53468
|
-
theme = props.theme
|
|
53470
|
+
theme = props.theme,
|
|
53471
|
+
enableAdd = props.enableAdd,
|
|
53472
|
+
addOptionText = props.addOptionText;
|
|
53469
53473
|
|
|
53470
53474
|
var _useState = React.useState(false),
|
|
53471
53475
|
_useState2 = _slicedToArray__default['default'](_useState, 2),
|
|
@@ -53507,17 +53511,23 @@ var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
|
53507
53511
|
|
|
53508
53512
|
if (options !== null && options.length !== 0 && inFocus) {
|
|
53509
53513
|
if (e.keyCode === 38 && cursor > 0) setCursor(cursor - 1);
|
|
53510
|
-
|
|
53511
|
-
if (e.keyCode ===
|
|
53514
|
+
|
|
53515
|
+
if (e.keyCode === 40 && (cursor === options.length - 1 && enableAdd || cursor < options.length - 1)) {
|
|
53516
|
+
setCursor(cursor + 1);
|
|
53517
|
+
}
|
|
53518
|
+
|
|
53519
|
+
if (e.keyCode === 13 && cursor != options.length) optionSelected([].concat(_toConsumableArray__default['default'](items), [options[cursor]]));
|
|
53520
|
+
if (e.keyCode === 13 && cursor === options.length && enableAdd) addNew();
|
|
53512
53521
|
|
|
53513
53522
|
if (e.key === "Backspace" && items.length > 0 && value === "") {
|
|
53514
53523
|
handleRemoveItem(items.length - 1);
|
|
53515
53524
|
}
|
|
53516
53525
|
|
|
53517
|
-
console.log("ARR DOWN");
|
|
53518
53526
|
return;
|
|
53519
53527
|
}
|
|
53520
53528
|
|
|
53529
|
+
if (e.keyCode === 13 && enableAdd && (options === null || options !== null && options.length === 0)) addNew();
|
|
53530
|
+
|
|
53521
53531
|
if (e.keyCode === 40) {
|
|
53522
53532
|
setInFocus(true);
|
|
53523
53533
|
setCursor(0);
|
|
@@ -53543,6 +53553,14 @@ var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
|
53543
53553
|
setCursor(0);
|
|
53544
53554
|
};
|
|
53545
53555
|
|
|
53556
|
+
var addNew = function addNew() {
|
|
53557
|
+
onAdd(value);
|
|
53558
|
+
setValue("");
|
|
53559
|
+
clearOptions(id);
|
|
53560
|
+
setInFocus(false);
|
|
53561
|
+
setCursor(0);
|
|
53562
|
+
};
|
|
53563
|
+
|
|
53546
53564
|
var onInputBlur = function onInputBlur() {
|
|
53547
53565
|
setInFocus(false);
|
|
53548
53566
|
setInputFocus(false);
|
|
@@ -53580,7 +53598,15 @@ var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
|
53580
53598
|
},
|
|
53581
53599
|
hover: cursor === i
|
|
53582
53600
|
}), item[mapValueTo]);
|
|
53583
|
-
}))
|
|
53601
|
+
}), enableAdd && !options.map(function (y) {
|
|
53602
|
+
return y.value;
|
|
53603
|
+
}).includes(value) ? /*#__PURE__*/React__default['default'].createElement(ContentItem, _extends__default['default']({}, themeProps, {
|
|
53604
|
+
key: options.length,
|
|
53605
|
+
onMouseDown: function onMouseDown() {
|
|
53606
|
+
return addNew();
|
|
53607
|
+
},
|
|
53608
|
+
hover: cursor === options.length
|
|
53609
|
+
}), /*#__PURE__*/React__default['default'].createElement(AddOptionText, null, addOptionText), value) : ""));
|
|
53584
53610
|
}
|
|
53585
53611
|
|
|
53586
53612
|
var empty = options === null || options !== null && options.length === 0;
|
|
@@ -53588,9 +53614,15 @@ var MultiSelectDropdown = function MultiSelectDropdown(props) {
|
|
|
53588
53614
|
if (inFocus && empty && loading === false) {
|
|
53589
53615
|
return /*#__PURE__*/React__default['default'].createElement(FadeIn, null, /*#__PURE__*/React__default['default'].createElement(Content, _extends__default['default']({}, themeProps, {
|
|
53590
53616
|
key: 0
|
|
53591
|
-
}), /*#__PURE__*/React__default['default'].createElement(ContentItem, _extends__default['default']({}, themeProps, {
|
|
53617
|
+
}), enableAdd ? /*#__PURE__*/React__default['default'].createElement(ContentItem, _extends__default['default']({}, themeProps, {
|
|
53592
53618
|
key: 0,
|
|
53593
|
-
|
|
53619
|
+
onMouseDown: function onMouseDown() {
|
|
53620
|
+
return addNew();
|
|
53621
|
+
},
|
|
53622
|
+
hover: true
|
|
53623
|
+
}), /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, notItemsFoundText, /*#__PURE__*/React__default['default'].createElement(AddOptionText, null, addOptionText), value)) : /*#__PURE__*/React__default['default'].createElement(ContentItem, _extends__default['default']({}, themeProps, {
|
|
53624
|
+
key: 0,
|
|
53625
|
+
hover: false,
|
|
53594
53626
|
onMouseDown: onInputBlur
|
|
53595
53627
|
}), notItemsFoundText)));
|
|
53596
53628
|
}
|
|
@@ -53651,6 +53683,7 @@ MultiSelectDropdown.defaultProps = {
|
|
|
53651
53683
|
disabled: false,
|
|
53652
53684
|
load: function load() {},
|
|
53653
53685
|
onChange: function onChange() {},
|
|
53686
|
+
onAdd: function onAdd() {},
|
|
53654
53687
|
clearOptions: function clearOptions() {},
|
|
53655
53688
|
items: [],
|
|
53656
53689
|
options: [],
|
|
@@ -53660,7 +53693,9 @@ MultiSelectDropdown.defaultProps = {
|
|
|
53660
53693
|
notItemsFoundText: "No items found...",
|
|
53661
53694
|
theme: theme,
|
|
53662
53695
|
mapIdTo: "id",
|
|
53663
|
-
mapValueTo: "value"
|
|
53696
|
+
mapValueTo: "value",
|
|
53697
|
+
enableAdd: false,
|
|
53698
|
+
addOptionText: "Add new item"
|
|
53664
53699
|
};
|
|
53665
53700
|
MultiSelectDropdown.propTypes = {
|
|
53666
53701
|
theme: PropTypes__default['default'].object.isRequired,
|
|
@@ -53668,6 +53703,7 @@ MultiSelectDropdown.propTypes = {
|
|
|
53668
53703
|
disabled: PropTypes__default['default'].bool,
|
|
53669
53704
|
load: PropTypes__default['default'].func,
|
|
53670
53705
|
onChange: PropTypes__default['default'].func,
|
|
53706
|
+
onAdd: PropTypes__default['default'].func,
|
|
53671
53707
|
clearOptions: PropTypes__default['default'].func,
|
|
53672
53708
|
className: PropTypes__default['default'].string,
|
|
53673
53709
|
items: PropTypes__default['default'].array,
|
|
@@ -53676,7 +53712,9 @@ MultiSelectDropdown.propTypes = {
|
|
|
53676
53712
|
mapValueTo: PropTypes__default['default'].string,
|
|
53677
53713
|
notItemsFoundText: PropTypes__default['default'].string,
|
|
53678
53714
|
size: PropTypes__default['default'].oneOf(["small", "medium", "large"]),
|
|
53679
|
-
color: PropTypes__default['default'].oneOf(["primary", "secondary", "success", "error", "warning", "gray", "background", "transparent"])
|
|
53715
|
+
color: PropTypes__default['default'].oneOf(["primary", "secondary", "success", "error", "warning", "gray", "background", "transparent"]),
|
|
53716
|
+
enableAdd: PropTypes__default['default'].bool,
|
|
53717
|
+
addOptionText: PropTypes__default['default'].string
|
|
53680
53718
|
};
|
|
53681
53719
|
|
|
53682
53720
|
exports.Alert = Alet;
|