react-asc 21.0.3 → 21.1.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/components/AutoComplete/AutoComplete.d.ts +0 -1
- package/components/TreeView/TreeItem.d.ts +2 -2
- package/hooks/index.d.ts +1 -0
- package/hooks/useCssClasses.d.ts +1 -0
- package/index.es.js +18 -31
- package/index.js +18 -30
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface ITreeItemProps extends React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLLIElement>, HTMLLIElement> {
|
|
3
|
-
nodeId
|
|
4
|
-
label
|
|
3
|
+
nodeId?: string;
|
|
4
|
+
label?: string;
|
|
5
5
|
isExpanded?: boolean;
|
|
6
6
|
isSelected?: boolean;
|
|
7
7
|
isSelectable?: boolean;
|
package/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCssClasses(cssClasses: Array<string>): string[];
|
package/index.es.js
CHANGED
|
@@ -282,6 +282,11 @@ function useDebounce(callback, timeout, deps) {
|
|
|
282
282
|
}, deps);
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
function useCssClasses(cssClasses) {
|
|
286
|
+
const cssClassName = cssClasses.filter(css => css).join(' ');
|
|
287
|
+
return [cssClassName];
|
|
288
|
+
}
|
|
289
|
+
|
|
285
290
|
var css_248z$X = ".Backdrop-module_backdrop__IRMoL {\n height: 100%;\n width: 100%;\n position: absolute;\n opacity: 0.5;\n z-index: 1040;\n top: 0;\n left: 0;\n background-color: #000; }\n .Backdrop-module_backdrop__IRMoL.Backdrop-module_isTransparent__F5nA5 {\n opacity: 0; }\n";
|
|
286
291
|
var styles$X = {"backdrop":"Backdrop-module_backdrop__IRMoL","isTransparent":"Backdrop-module_isTransparent__F5nA5"};
|
|
287
292
|
styleInject(css_248z$X);
|
|
@@ -398,11 +403,11 @@ styleInject(css_248z$Q);
|
|
|
398
403
|
// multiple
|
|
399
404
|
// custom template render items
|
|
400
405
|
const AutoComplete = (props) => {
|
|
401
|
-
const { id, name, className, options = [], openOnFocus = true, disabled, readOnly, debounce = 0, placeholder,
|
|
406
|
+
const { id, name, className, options = [], openOnFocus = true, disabled, readOnly, debounce = 0, placeholder, showClearButton, onChange, onSelect, value } = props;
|
|
402
407
|
const [model, setModel] = useState('');
|
|
403
408
|
const [searchText, setSearchText] = useState('');
|
|
404
409
|
const [isShow, setIsShow] = useState(false);
|
|
405
|
-
const [
|
|
410
|
+
const [_options, setOptions] = useState([]);
|
|
406
411
|
const selectConainter = useRef(null);
|
|
407
412
|
useEffect(() => {
|
|
408
413
|
if (value !== model) {
|
|
@@ -411,17 +416,7 @@ const AutoComplete = (props) => {
|
|
|
411
416
|
}
|
|
412
417
|
}, [value]);
|
|
413
418
|
useEffect(() => {
|
|
414
|
-
|
|
415
|
-
const optionsOrigin = JSON.parse(JSON.stringify(options));
|
|
416
|
-
const regex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'gi');
|
|
417
|
-
const optionsFiltered = optionsOrigin.filter(o => { var _a; return (_a = o.label) === null || _a === void 0 ? void 0 : _a.match(regex); });
|
|
418
|
-
if (optionsFiltered.length === 0 && showNoEntry) {
|
|
419
|
-
setOptionsTemp([{ value: '', label: '- no entry found -' }]);
|
|
420
|
-
}
|
|
421
|
-
else {
|
|
422
|
-
setOptionsTemp(optionsFiltered);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
419
|
+
setOptions(options);
|
|
425
420
|
}, [options]);
|
|
426
421
|
useDebounce(() => { onChange && onChange(searchText); }, debounce, [searchText]);
|
|
427
422
|
useEffect(() => {
|
|
@@ -478,7 +473,7 @@ const AutoComplete = (props) => {
|
|
|
478
473
|
isShow &&
|
|
479
474
|
React.createElement(React.Fragment, null,
|
|
480
475
|
React.createElement("div", { className: styles$Q.selectMenu },
|
|
481
|
-
React.createElement(List, null,
|
|
476
|
+
React.createElement(List, null, _options && _options.map((option, index) => React.createElement(ListItem, { id: `list-item-${index}`, key: option.value, onClick: () => handleOnClick(option), disabled: !option.value },
|
|
482
477
|
React.createElement(ListItemText, { primary: option.label ? option.label : option.value }))))),
|
|
483
478
|
React.createElement(Backdrop, { isTransparent: true, onClick: () => hide() }))));
|
|
484
479
|
};
|
|
@@ -1061,7 +1056,7 @@ const FormInput = (props) => {
|
|
|
1061
1056
|
const handleOnChange = (value, type, name) => {
|
|
1062
1057
|
onChange && onChange({ value, type, name });
|
|
1063
1058
|
};
|
|
1064
|
-
return (React.createElement(Fragment, null,
|
|
1059
|
+
return (React.createElement(React.Fragment, null,
|
|
1065
1060
|
(type === 'text' ||
|
|
1066
1061
|
type === 'date' ||
|
|
1067
1062
|
type === 'datetime-local' ||
|
|
@@ -1077,11 +1072,9 @@ const FormInput = (props) => {
|
|
|
1077
1072
|
type === 'textarea' &&
|
|
1078
1073
|
React.createElement(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, autoFocus: autoFocus, onInput: e => handleOnInput(e.target.value, type, name), onChange: e => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.rows, style: (textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.resize) !== false ? undefined : { resize: 'none' } }),
|
|
1079
1074
|
type === 'select' &&
|
|
1080
|
-
React.createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: e => handleOnChange(e, type, name),
|
|
1081
|
-
// onKeyDown={e => onKeyDown(e)}
|
|
1082
|
-
options: options }),
|
|
1075
|
+
React.createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: e => handleOnChange(e, type, name), options: options }),
|
|
1083
1076
|
type === 'autocomplete' &&
|
|
1084
|
-
React.createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: e => handleOnChange(e, type, name), options: options }),
|
|
1077
|
+
React.createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: e => handleOnChange(e, type, name), onSelect: e => handleOnChange(e.value, type, name), options: options }),
|
|
1085
1078
|
type === 'checkbox' &&
|
|
1086
1079
|
React.createElement(Checkbox, { id: name, name: name, label: label, className: (!isValid ? ' is-invalid' : ''), onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).checked, type, name), checked: value }),
|
|
1087
1080
|
type === 'radio' &&
|
|
@@ -1642,20 +1635,14 @@ styleInject(css_248z$l);
|
|
|
1642
1635
|
const Link = (props) => {
|
|
1643
1636
|
const { href = '#', className, target, children } = props, rest = __rest(props, ["href", "className", "target", "children"]);
|
|
1644
1637
|
const [status, setStatus] = useState(STATUS.NORMAL);
|
|
1645
|
-
const
|
|
1646
|
-
const cssClasses = [];
|
|
1647
|
-
cssClasses.push(styles$l.link);
|
|
1648
|
-
className && cssClasses.push(className);
|
|
1649
|
-
status !== STATUS.NORMAL && cssClasses.push(status);
|
|
1650
|
-
return cssClasses.filter(css => css).join(' ');
|
|
1651
|
-
};
|
|
1638
|
+
const [cssClassName] = useCssClasses([styles$l.link, className, status]);
|
|
1652
1639
|
const onMouseEnter = () => {
|
|
1653
1640
|
setStatus(STATUS.HOVERED);
|
|
1654
1641
|
};
|
|
1655
1642
|
const onMouseLeave = () => {
|
|
1656
1643
|
setStatus(STATUS.NORMAL);
|
|
1657
1644
|
};
|
|
1658
|
-
return (React.createElement("a", Object.assign({ className:
|
|
1645
|
+
return (React.createElement("a", Object.assign({ className: cssClassName, href: href, target: target, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, rest), children));
|
|
1659
1646
|
};
|
|
1660
1647
|
|
|
1661
1648
|
var css_248z$k = ".LoadingIndicator-module_loadingIndicatorContainer__GS9OG {\n position: fixed;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%; }\n\n.LoadingIndicator-module_loadingIndicator__EC9sx {\n animation-name: LoadingIndicator-module_spinAnimation__LeY4Z;\n animation-duration: 5000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n width: 24px;\n height: 24px; }\n\n@keyframes LoadingIndicator-module_spinAnimation__LeY4Z {\n from {\n transform: rotate(0deg); }\n to {\n transform: rotate(360deg); } }\n";
|
|
@@ -2578,7 +2565,7 @@ const TimeSelect = (props) => {
|
|
|
2578
2565
|
React.createElement(MilliSecondSelect, { value: currDate.getMilliseconds(), disabled: disabled, onChange: e => handleOnChange(e, TIMEMODE.MILLISECONDS) }))));
|
|
2579
2566
|
};
|
|
2580
2567
|
|
|
2581
|
-
var css_248z$1 = ".TreeView-module_treeView__VVj-4 {\n list-style-type: none;\n margin-bottom: 0;\n padding-left: 0px !important; }\n .TreeView-module_treeView__VVj-4 ul {\n padding-left: 48px !important; }\n";
|
|
2568
|
+
var css_248z$1 = ".TreeView-module_treeView__VVj-4 {\n list-style-type: none;\n margin-bottom: 0;\n padding-left: 0px !important;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 0px; }\n .TreeView-module_treeView__VVj-4 ul {\n padding-left: 48px !important; }\n";
|
|
2582
2569
|
var styles$1 = {"treeView":"TreeView-module_treeView__VVj-4"};
|
|
2583
2570
|
styleInject(css_248z$1);
|
|
2584
2571
|
|
|
@@ -2625,12 +2612,12 @@ const TreeItem = (props) => {
|
|
|
2625
2612
|
};
|
|
2626
2613
|
return (React.createElement("li", { className: getCssClasses(), style: { paddingLeft: `${(48 * (children ? 0 : 1))}px` } },
|
|
2627
2614
|
React.createElement("div", { className: "d-flex align-items-center" },
|
|
2628
|
-
children &&
|
|
2615
|
+
children && nodeId &&
|
|
2629
2616
|
React.createElement(IconButton, { onClick: () => handleOnToggleExpand(nodeId), icon: !_isExpanded ? React.createElement(ChevronRightSolidIcon, null) : React.createElement(ChevronDownSolidIcon, null) }),
|
|
2630
|
-
isSelectable &&
|
|
2617
|
+
isSelectable && nodeId &&
|
|
2631
2618
|
React.createElement(Checkbox, { checked: _isSelected, onChange: () => handleOnSelect(nodeId) }),
|
|
2632
2619
|
label),
|
|
2633
2620
|
children && _isExpanded ? React.createElement("ul", null, children) : null));
|
|
2634
2621
|
};
|
|
2635
2622
|
|
|
2636
|
-
export { Alert, AppBar, AppBarTitle, AutoComplete, Backdrop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, COLOR, Card, CardBody, CardFooter, CardImage, CardSubtitle, CardText, CardTitle, CaretDownSolidIcon, CheckSolidIcon, CheckSquareRegularIcon, Checkbox, ChevronDownSolidIcon, ChevronLeftSolidIcon, ChevronRightSolidIcon, ChevronUpSolidIcon, Chip, CircleSolidIcon, Column, ConditionalWrapper, DATEMODE, DateSelect, DaySelect, Drawer, EmailValidator, ExpansionPanel, ExpansionPanelContent, ExpansionPanelHeader, FileInput, FloatingActionButton, Form, FormControl, FormError, FormGroup, FormHint, FormInput, FormLabel, GlobalModal, HomeSolidIcon, HourSelect, Icon, IconButton, IsEmptyValidator, IsEqualValidator, Link, List, ListItem, ListItemAction, ListItemAvatar, ListItemIcon, ListItemText, LoadingIndicator, LoadingIndicatorContainer, MODALBUTTONTYPE, MODALTYPE, Menu, MenuBody, MenuDivider, MenuItem, MenuToggle, MilliSecondSelect, MinuteSelect, Modal, ModalBody, ModalFooter, ModalHeader, MonthSelect, NumberSelect, POSITION, PlusSolidIcon, Row, SIZE, STATUS, SecondSelect, Select, Sidebar, Snackbar, SpeedDial, SpeedDialAction, SpeedDialIcon, SpinnerSolidIcon, SquareRegularIcon, Step, Stepper, StepperActions, TIMEMODE, Tab, TabPanel, Table, Tabs, Textarea, TimeSelect, TimesCircleSolidIcon, TimesSolidIcon, Tooltip, TreeItem, TreeView, Typography, VARIANT, YearSelect, loadingIndicatorService, modalService, snackbarService, useConstructor, useDebounce, useHover, useWindowSize };
|
|
2623
|
+
export { Alert, AppBar, AppBarTitle, AutoComplete, Backdrop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, COLOR, Card, CardBody, CardFooter, CardImage, CardSubtitle, CardText, CardTitle, CaretDownSolidIcon, CheckSolidIcon, CheckSquareRegularIcon, Checkbox, ChevronDownSolidIcon, ChevronLeftSolidIcon, ChevronRightSolidIcon, ChevronUpSolidIcon, Chip, CircleSolidIcon, Column, ConditionalWrapper, DATEMODE, DateSelect, DaySelect, Drawer, EmailValidator, ExpansionPanel, ExpansionPanelContent, ExpansionPanelHeader, FileInput, FloatingActionButton, Form, FormControl, FormError, FormGroup, FormHint, FormInput, FormLabel, GlobalModal, HomeSolidIcon, HourSelect, Icon, IconButton, IsEmptyValidator, IsEqualValidator, Link, List, ListItem, ListItemAction, ListItemAvatar, ListItemIcon, ListItemText, LoadingIndicator, LoadingIndicatorContainer, MODALBUTTONTYPE, MODALTYPE, Menu, MenuBody, MenuDivider, MenuItem, MenuToggle, MilliSecondSelect, MinuteSelect, Modal, ModalBody, ModalFooter, ModalHeader, MonthSelect, NumberSelect, POSITION, PlusSolidIcon, Row, SIZE, STATUS, SecondSelect, Select, Sidebar, Snackbar, SpeedDial, SpeedDialAction, SpeedDialIcon, SpinnerSolidIcon, SquareRegularIcon, Step, Stepper, StepperActions, TIMEMODE, Tab, TabPanel, Table, Tabs, Textarea, TimeSelect, TimesCircleSolidIcon, TimesSolidIcon, Tooltip, TreeItem, TreeView, Typography, VARIANT, YearSelect, loadingIndicatorService, modalService, snackbarService, useConstructor, useCssClasses, useDebounce, useHover, useWindowSize };
|
package/index.js
CHANGED
|
@@ -290,6 +290,11 @@ function useDebounce(callback, timeout, deps) {
|
|
|
290
290
|
}, deps);
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
+
function useCssClasses(cssClasses) {
|
|
294
|
+
const cssClassName = cssClasses.filter(css => css).join(' ');
|
|
295
|
+
return [cssClassName];
|
|
296
|
+
}
|
|
297
|
+
|
|
293
298
|
var css_248z$X = ".Backdrop-module_backdrop__IRMoL {\n height: 100%;\n width: 100%;\n position: absolute;\n opacity: 0.5;\n z-index: 1040;\n top: 0;\n left: 0;\n background-color: #000; }\n .Backdrop-module_backdrop__IRMoL.Backdrop-module_isTransparent__F5nA5 {\n opacity: 0; }\n";
|
|
294
299
|
var styles$X = {"backdrop":"Backdrop-module_backdrop__IRMoL","isTransparent":"Backdrop-module_isTransparent__F5nA5"};
|
|
295
300
|
styleInject(css_248z$X);
|
|
@@ -406,11 +411,11 @@ styleInject(css_248z$Q);
|
|
|
406
411
|
// multiple
|
|
407
412
|
// custom template render items
|
|
408
413
|
const AutoComplete = (props) => {
|
|
409
|
-
const { id, name, className, options = [], openOnFocus = true, disabled, readOnly, debounce = 0, placeholder,
|
|
414
|
+
const { id, name, className, options = [], openOnFocus = true, disabled, readOnly, debounce = 0, placeholder, showClearButton, onChange, onSelect, value } = props;
|
|
410
415
|
const [model, setModel] = React.useState('');
|
|
411
416
|
const [searchText, setSearchText] = React.useState('');
|
|
412
417
|
const [isShow, setIsShow] = React.useState(false);
|
|
413
|
-
const [
|
|
418
|
+
const [_options, setOptions] = React.useState([]);
|
|
414
419
|
const selectConainter = React.useRef(null);
|
|
415
420
|
React.useEffect(() => {
|
|
416
421
|
if (value !== model) {
|
|
@@ -419,17 +424,7 @@ const AutoComplete = (props) => {
|
|
|
419
424
|
}
|
|
420
425
|
}, [value]);
|
|
421
426
|
React.useEffect(() => {
|
|
422
|
-
|
|
423
|
-
const optionsOrigin = JSON.parse(JSON.stringify(options));
|
|
424
|
-
const regex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'gi');
|
|
425
|
-
const optionsFiltered = optionsOrigin.filter(o => { var _a; return (_a = o.label) === null || _a === void 0 ? void 0 : _a.match(regex); });
|
|
426
|
-
if (optionsFiltered.length === 0 && showNoEntry) {
|
|
427
|
-
setOptionsTemp([{ value: '', label: '- no entry found -' }]);
|
|
428
|
-
}
|
|
429
|
-
else {
|
|
430
|
-
setOptionsTemp(optionsFiltered);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
427
|
+
setOptions(options);
|
|
433
428
|
}, [options]);
|
|
434
429
|
useDebounce(() => { onChange && onChange(searchText); }, debounce, [searchText]);
|
|
435
430
|
React.useEffect(() => {
|
|
@@ -486,7 +481,7 @@ const AutoComplete = (props) => {
|
|
|
486
481
|
isShow &&
|
|
487
482
|
React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
488
483
|
React__default["default"].createElement("div", { className: styles$Q.selectMenu },
|
|
489
|
-
React__default["default"].createElement(List, null,
|
|
484
|
+
React__default["default"].createElement(List, null, _options && _options.map((option, index) => React__default["default"].createElement(ListItem, { id: `list-item-${index}`, key: option.value, onClick: () => handleOnClick(option), disabled: !option.value },
|
|
490
485
|
React__default["default"].createElement(ListItemText, { primary: option.label ? option.label : option.value }))))),
|
|
491
486
|
React__default["default"].createElement(Backdrop, { isTransparent: true, onClick: () => hide() }))));
|
|
492
487
|
};
|
|
@@ -1069,7 +1064,7 @@ const FormInput = (props) => {
|
|
|
1069
1064
|
const handleOnChange = (value, type, name) => {
|
|
1070
1065
|
onChange && onChange({ value, type, name });
|
|
1071
1066
|
};
|
|
1072
|
-
return (React__default["default"].createElement(
|
|
1067
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1073
1068
|
(type === 'text' ||
|
|
1074
1069
|
type === 'date' ||
|
|
1075
1070
|
type === 'datetime-local' ||
|
|
@@ -1085,11 +1080,9 @@ const FormInput = (props) => {
|
|
|
1085
1080
|
type === 'textarea' &&
|
|
1086
1081
|
React__default["default"].createElement(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, autoFocus: autoFocus, onInput: e => handleOnInput(e.target.value, type, name), onChange: e => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.rows, style: (textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.resize) !== false ? undefined : { resize: 'none' } }),
|
|
1087
1082
|
type === 'select' &&
|
|
1088
|
-
React__default["default"].createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: e => handleOnChange(e, type, name),
|
|
1089
|
-
// onKeyDown={e => onKeyDown(e)}
|
|
1090
|
-
options: options }),
|
|
1083
|
+
React__default["default"].createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: e => handleOnChange(e, type, name), options: options }),
|
|
1091
1084
|
type === 'autocomplete' &&
|
|
1092
|
-
React__default["default"].createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: e => handleOnChange(e, type, name), options: options }),
|
|
1085
|
+
React__default["default"].createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: e => handleOnChange(e, type, name), onSelect: e => handleOnChange(e.value, type, name), options: options }),
|
|
1093
1086
|
type === 'checkbox' &&
|
|
1094
1087
|
React__default["default"].createElement(Checkbox, { id: name, name: name, label: label, className: (!isValid ? ' is-invalid' : ''), onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).checked, type, name), checked: value }),
|
|
1095
1088
|
type === 'radio' &&
|
|
@@ -1650,20 +1643,14 @@ styleInject(css_248z$l);
|
|
|
1650
1643
|
const Link = (props) => {
|
|
1651
1644
|
const { href = '#', className, target, children } = props, rest = __rest(props, ["href", "className", "target", "children"]);
|
|
1652
1645
|
const [status, setStatus] = React.useState(STATUS.NORMAL);
|
|
1653
|
-
const
|
|
1654
|
-
const cssClasses = [];
|
|
1655
|
-
cssClasses.push(styles$l.link);
|
|
1656
|
-
className && cssClasses.push(className);
|
|
1657
|
-
status !== STATUS.NORMAL && cssClasses.push(status);
|
|
1658
|
-
return cssClasses.filter(css => css).join(' ');
|
|
1659
|
-
};
|
|
1646
|
+
const [cssClassName] = useCssClasses([styles$l.link, className, status]);
|
|
1660
1647
|
const onMouseEnter = () => {
|
|
1661
1648
|
setStatus(STATUS.HOVERED);
|
|
1662
1649
|
};
|
|
1663
1650
|
const onMouseLeave = () => {
|
|
1664
1651
|
setStatus(STATUS.NORMAL);
|
|
1665
1652
|
};
|
|
1666
|
-
return (React__default["default"].createElement("a", Object.assign({ className:
|
|
1653
|
+
return (React__default["default"].createElement("a", Object.assign({ className: cssClassName, href: href, target: target, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, rest), children));
|
|
1667
1654
|
};
|
|
1668
1655
|
|
|
1669
1656
|
var css_248z$k = ".LoadingIndicator-module_loadingIndicatorContainer__GS9OG {\n position: fixed;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%; }\n\n.LoadingIndicator-module_loadingIndicator__EC9sx {\n animation-name: LoadingIndicator-module_spinAnimation__LeY4Z;\n animation-duration: 5000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n width: 24px;\n height: 24px; }\n\n@keyframes LoadingIndicator-module_spinAnimation__LeY4Z {\n from {\n transform: rotate(0deg); }\n to {\n transform: rotate(360deg); } }\n";
|
|
@@ -2586,7 +2573,7 @@ const TimeSelect = (props) => {
|
|
|
2586
2573
|
React__default["default"].createElement(MilliSecondSelect, { value: currDate.getMilliseconds(), disabled: disabled, onChange: e => handleOnChange(e, exports.TIMEMODE.MILLISECONDS) }))));
|
|
2587
2574
|
};
|
|
2588
2575
|
|
|
2589
|
-
var css_248z$1 = ".TreeView-module_treeView__VVj-4 {\n list-style-type: none;\n margin-bottom: 0;\n padding-left: 0px !important; }\n .TreeView-module_treeView__VVj-4 ul {\n padding-left: 48px !important; }\n";
|
|
2576
|
+
var css_248z$1 = ".TreeView-module_treeView__VVj-4 {\n list-style-type: none;\n margin-bottom: 0;\n padding-left: 0px !important;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 0px; }\n .TreeView-module_treeView__VVj-4 ul {\n padding-left: 48px !important; }\n";
|
|
2590
2577
|
var styles$1 = {"treeView":"TreeView-module_treeView__VVj-4"};
|
|
2591
2578
|
styleInject(css_248z$1);
|
|
2592
2579
|
|
|
@@ -2633,9 +2620,9 @@ const TreeItem = (props) => {
|
|
|
2633
2620
|
};
|
|
2634
2621
|
return (React__default["default"].createElement("li", { className: getCssClasses(), style: { paddingLeft: `${(48 * (children ? 0 : 1))}px` } },
|
|
2635
2622
|
React__default["default"].createElement("div", { className: "d-flex align-items-center" },
|
|
2636
|
-
children &&
|
|
2623
|
+
children && nodeId &&
|
|
2637
2624
|
React__default["default"].createElement(IconButton, { onClick: () => handleOnToggleExpand(nodeId), icon: !_isExpanded ? React__default["default"].createElement(ChevronRightSolidIcon, null) : React__default["default"].createElement(ChevronDownSolidIcon, null) }),
|
|
2638
|
-
isSelectable &&
|
|
2625
|
+
isSelectable && nodeId &&
|
|
2639
2626
|
React__default["default"].createElement(Checkbox, { checked: _isSelected, onChange: () => handleOnSelect(nodeId) }),
|
|
2640
2627
|
label),
|
|
2641
2628
|
children && _isExpanded ? React__default["default"].createElement("ul", null, children) : null));
|
|
@@ -2747,6 +2734,7 @@ exports.loadingIndicatorService = loadingIndicatorService;
|
|
|
2747
2734
|
exports.modalService = modalService;
|
|
2748
2735
|
exports.snackbarService = snackbarService;
|
|
2749
2736
|
exports.useConstructor = useConstructor;
|
|
2737
|
+
exports.useCssClasses = useCssClasses;
|
|
2750
2738
|
exports.useDebounce = useDebounce;
|
|
2751
2739
|
exports.useHover = useHover;
|
|
2752
2740
|
exports.useWindowSize = useWindowSize;
|