@laser-ui/components 2.3.5 → 2.5.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/CHANGELOG.md +12 -0
- package/accordion/Accordion.d.ts +0 -1
- package/accordion/types.d.ts +0 -1
- package/affix/Affix.d.ts +0 -1
- package/affix/types.d.ts +0 -1
- package/alert/Alert.d.ts +0 -1
- package/alert/types.d.ts +0 -1
- package/anchor/Anchor.d.ts +0 -1
- package/anchor/types.d.ts +0 -1
- package/avatar/Avatar.d.ts +0 -1
- package/avatar/types.d.ts +0 -1
- package/badge/Badge.d.ts +0 -1
- package/badge/internal/BadgeNumber.d.ts +0 -1
- package/badge/types.d.ts +0 -1
- package/base-input/types.d.ts +0 -1
- package/breadcrumb/Breadcrumb.d.ts +0 -1
- package/breadcrumb/types.d.ts +0 -1
- package/button/types.d.ts +0 -1
- package/card/Card.d.ts +0 -1
- package/card/CardAction.d.ts +0 -1
- package/card/CardActions.d.ts +0 -1
- package/card/CardContent.d.ts +0 -1
- package/card/CardHeader.d.ts +0 -1
- package/card/types.d.ts +0 -1
- package/cascader/Cascader.d.ts +0 -1
- package/cascader/Cascader.js +9 -7
- package/cascader/internal/CascaderPanel.d.ts +1 -1
- package/cascader/internal/CascaderPanel.js +7 -3
- package/cascader/internal/CascaderSearchPanel.d.ts +1 -1
- package/cascader/internal/CascaderSearchPanel.js +2 -2
- package/cascader/internal/types.d.ts +0 -1
- package/cascader/types.d.ts +1 -1
- package/checkbox/Checkbox.d.ts +0 -1
- package/checkbox/CheckboxGroup.d.ts +0 -1
- package/checkbox/types.d.ts +0 -1
- package/circular-progress/CircularProgress.d.ts +0 -1
- package/compose/Compose.d.ts +0 -1
- package/compose/ComposeItem.d.ts +0 -1
- package/compose/types.d.ts +0 -1
- package/config-provider/ConfigProvider.d.ts +0 -1
- package/config-provider/types.d.ts +0 -1
- package/context/index.d.ts +0 -1
- package/date-picker/DatePicker.d.ts +0 -1
- package/date-picker/DatePicker.js +8 -4
- package/date-picker/internal/DatePickerPanel.d.ts +0 -1
- package/date-picker/types.d.ts +0 -1
- package/dialog-service.d.ts +0 -1
- package/drawer/Drawer.d.ts +0 -1
- package/drawer/DrawerFooter.d.ts +0 -1
- package/drawer/DrawerHeader.d.ts +0 -1
- package/drawer/types.d.ts +0 -1
- package/drawer/vars.d.ts +0 -1
- package/dropdown/Dropdown.d.ts +0 -1
- package/dropdown/internal/DropdownList.d.ts +0 -1
- package/dropdown/internal/DropdownList.js +6 -6
- package/dropdown/internal/DropdownSub.d.ts +0 -1
- package/dropdown/types.d.ts +0 -1
- package/dropdown/utils.d.ts +0 -1
- package/empty/Empty.d.ts +0 -1
- package/empty/types.d.ts +0 -1
- package/fab/Fab.d.ts +0 -1
- package/fab/FabBacktop.d.ts +0 -1
- package/fab/FabButton.d.ts +0 -1
- package/fab/types.d.ts +0 -1
- package/fab/vars.d.ts +0 -1
- package/form/Form.d.ts +0 -1
- package/form/FormItem.d.ts +0 -1
- package/form/internal/FormError.d.ts +0 -1
- package/form/types.d.ts +0 -1
- package/form/vars.d.ts +0 -1
- package/hooks/useContainerScrolling.d.ts +0 -1
- package/hooks/useFocusVisible.d.ts +0 -1
- package/hooks/useLayout.d.ts +0 -1
- package/hooks/useNestedPopup.d.ts +0 -1
- package/hooks/useStyled.d.ts +0 -1
- package/hooks/useStyled.js +0 -2
- package/hooks/useZIndex.js +5 -2
- package/icon/Icon.d.ts +0 -1
- package/icon/types.d.ts +0 -1
- package/image/Image.d.ts +0 -1
- package/image/ImageAction.d.ts +0 -1
- package/image/ImageLoader.d.ts +0 -1
- package/image/ImagePreview.d.ts +0 -1
- package/image/types.d.ts +0 -1
- package/input/Input.d.ts +0 -1
- package/input/types.d.ts +0 -1
- package/internal/lazy-loading/LazyLoading.d.ts +0 -1
- package/internal/lazy-loading/types.d.ts +0 -1
- package/internal/popup/Popup.d.ts +0 -1
- package/internal/popup/types.d.ts +0 -1
- package/internal/portal/Portal.d.ts +0 -1
- package/internal/portal/types.d.ts +0 -1
- package/mask/Mask.d.ts +0 -1
- package/mask/types.d.ts +0 -1
- package/menu/Menu.d.ts +0 -1
- package/menu/Menu.js +6 -6
- package/menu/internal/MenuGroup.d.ts +0 -1
- package/menu/internal/MenuItem.d.ts +0 -1
- package/menu/internal/MenuSub.d.ts +0 -1
- package/menu/types.d.ts +0 -1
- package/menu/utils.d.ts +0 -1
- package/modal/Modal.d.ts +0 -1
- package/modal/ModalAlert.d.ts +0 -1
- package/modal/ModalFooter.d.ts +0 -1
- package/modal/ModalHeader.d.ts +0 -1
- package/modal/types.d.ts +0 -1
- package/modal/vars.d.ts +0 -1
- package/notification/Notification.d.ts +0 -1
- package/notification/types.d.ts +0 -1
- package/package.json +2 -2
- package/pagination/Pagination.d.ts +0 -1
- package/pagination/types.d.ts +0 -1
- package/pagination/utils.d.ts +1 -2
- package/popover/Popover.d.ts +0 -1
- package/popover/PopoverFooter.d.ts +0 -1
- package/popover/PopoverHeader.d.ts +0 -1
- package/popover/types.d.ts +0 -1
- package/popover/vars.d.ts +0 -1
- package/progress/Progress.d.ts +0 -1
- package/progress/types.d.ts +0 -1
- package/radio/Radio.d.ts +0 -1
- package/radio/RadioGroup.d.ts +0 -1
- package/radio/types.d.ts +0 -1
- package/radio/vars.d.ts +1 -2
- package/rating/Rating.d.ts +0 -1
- package/rating/internal/RatingStar.d.ts +0 -1
- package/rating/types.d.ts +0 -1
- package/root/Dialogs.d.ts +0 -1
- package/root/Root.d.ts +0 -1
- package/root/types.d.ts +0 -1
- package/root/vars.d.ts +0 -1
- package/select/Select.d.ts +0 -1
- package/select/Select.js +2 -4
- package/select/types.d.ts +0 -1
- package/separator/Separator.d.ts +0 -1
- package/separator/types.d.ts +0 -1
- package/skeleton/Skeleton.d.ts +0 -1
- package/skeleton/types.d.ts +0 -1
- package/slider/Slider.d.ts +0 -1
- package/slider/types.d.ts +0 -1
- package/slides/Slides.d.ts +0 -1
- package/slides/Slides.js +5 -5
- package/slides/types.d.ts +0 -1
- package/spinner/Spinner.d.ts +0 -1
- package/spinner/types.d.ts +0 -1
- package/stepper/Stepper.d.ts +0 -1
- package/stepper/types.d.ts +0 -1
- package/switch/types.d.ts +0 -1
- package/table/Table.d.ts +0 -1
- package/table/TableEmpty.d.ts +0 -1
- package/table/TableExpand.d.ts +0 -1
- package/table/TableFilter.d.ts +0 -1
- package/table/TableTd.d.ts +0 -1
- package/table/TableTh.d.ts +0 -1
- package/table/TableThAction.d.ts +0 -1
- package/table/internal/TableCell.d.ts +0 -1
- package/table/types.d.ts +0 -1
- package/table/vars.d.ts +0 -1
- package/tabs/Tabs.d.ts +0 -1
- package/tabs/types.d.ts +0 -1
- package/tag/Tag.d.ts +0 -1
- package/tag/types.d.ts +0 -1
- package/textarea/Textarea.d.ts +0 -1
- package/textarea/types.d.ts +0 -1
- package/time-picker/TimePicker.d.ts +0 -1
- package/time-picker/internal/TimePickerPanel.d.ts +0 -1
- package/time-picker/types.d.ts +0 -1
- package/timeline/Timeline.d.ts +0 -1
- package/timeline/types.d.ts +0 -1
- package/toast/Toast.d.ts +0 -1
- package/toast/types.d.ts +0 -1
- package/tooltip/Tooltip.d.ts +0 -1
- package/tooltip/types.d.ts +0 -1
- package/transfer/Transfer.d.ts +0 -1
- package/transfer/Transfer.js +4 -5
- package/transfer/internal/TransferPanel.d.ts +0 -1
- package/transfer/types.d.ts +0 -1
- package/transition/CollapseTransition.d.ts +0 -1
- package/transition/Transition.d.ts +0 -1
- package/transition/types.d.ts +0 -1
- package/tree/Tree.d.ts +0 -1
- package/tree/internal/TreePanel.d.ts +0 -1
- package/tree/node/abstract-node.d.ts +0 -1
- package/tree/node/multiple-node.d.ts +0 -1
- package/tree/node/single-node.d.ts +0 -1
- package/tree/types.d.ts +0 -1
- package/tree/utils.d.ts +0 -1
- package/tree-select/TreeSelect.d.ts +0 -1
- package/tree-select/TreeSelect.js +2 -4
- package/tree-select/internal/TreeSelectSearchPanel.d.ts +0 -1
- package/tree-select/internal/types.d.ts +0 -1
- package/tree-select/types.d.ts +0 -1
- package/types.d.ts +0 -1
- package/upload/Upload.d.ts +0 -1
- package/upload/Upload.js +4 -3
- package/upload/UploadAction.d.ts +0 -1
- package/upload/UploadButton.d.ts +0 -1
- package/upload/UploadList.d.ts +0 -1
- package/upload/UploadPicture.d.ts +0 -1
- package/upload/UploadPictureList.d.ts +0 -1
- package/upload/UploadPreviewAction.d.ts +0 -1
- package/upload/hooks.d.ts +0 -1
- package/upload/types.d.ts +0 -1
- package/upload/vars.d.ts +5 -6
- package/utils/handleModalKeyDown.d.ts +0 -1
- package/utils/mergeCS.d.ts +0 -1
- package/virtual-scroll/VirtualScroll.d.ts +0 -1
- package/virtual-scroll/types.d.ts +0 -1
- package/wave/Wave.d.ts +0 -1
- package/wave/types.d.ts +0 -1
package/time-picker/types.d.ts
CHANGED
package/timeline/Timeline.d.ts
CHANGED
package/timeline/types.d.ts
CHANGED
package/toast/Toast.d.ts
CHANGED
package/toast/types.d.ts
CHANGED
package/tooltip/Tooltip.d.ts
CHANGED
package/tooltip/types.d.ts
CHANGED
package/transfer/Transfer.d.ts
CHANGED
package/transfer/Transfer.js
CHANGED
|
@@ -2,7 +2,6 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import KeyboardArrowLeftOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg?react';
|
|
4
4
|
import KeyboardArrowRightOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg?react';
|
|
5
|
-
import { isUndefined } from 'lodash';
|
|
6
5
|
import { useMemo } from 'react';
|
|
7
6
|
import { TransferPanel } from './internal/TransferPanel';
|
|
8
7
|
import { CLASSES, IS_SELECTED, NO_MATCH } from './vars';
|
|
@@ -36,10 +35,10 @@ export function Transfer(props) {
|
|
|
36
35
|
const empty = [true, true];
|
|
37
36
|
const allSelected = [true, true];
|
|
38
37
|
const hasSelected = [false, false];
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
const customFilterFn = customSearch && customSearch.filter ? customSearch.filter : undefined;
|
|
39
|
+
const filterFn = customFilterFn
|
|
40
|
+
? (item, searchValue) => customFilterFn(searchValue, item)
|
|
41
|
+
: (item, searchValue) => item.label.includes(searchValue);
|
|
43
42
|
const sortFn = customSearch === null || customSearch === void 0 ? void 0 : customSearch.sort;
|
|
44
43
|
const handleItem = (item, index, noMatch) => {
|
|
45
44
|
const newItem = Object.assign({ [IS_SELECTED]: false, [NO_MATCH]: noMatch }, item);
|
package/transfer/types.d.ts
CHANGED
package/transition/types.d.ts
CHANGED
package/tree/Tree.d.ts
CHANGED
package/tree/types.d.ts
CHANGED
package/tree/utils.d.ts
CHANGED
|
@@ -121,10 +121,8 @@ export function TreeSelect(props) {
|
|
|
121
121
|
if (!hasSearch) {
|
|
122
122
|
return [];
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
: // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
127
|
-
(item) => customSearch.filter(searchValue, item);
|
|
124
|
+
const customFilterFn = customSearch && customSearch.filter ? customSearch.filter : undefined;
|
|
125
|
+
const filterFn = customFilterFn ? (item) => customFilterFn(searchValue, item) : (item) => item.label.includes(searchValue);
|
|
128
126
|
const sortFn = customSearch === null || customSearch === void 0 ? void 0 : customSearch.sort;
|
|
129
127
|
const searchList = [];
|
|
130
128
|
const reduceNodes = (nodes) => {
|
package/tree-select/types.d.ts
CHANGED
package/types.d.ts
CHANGED
package/upload/Upload.d.ts
CHANGED
package/upload/Upload.js
CHANGED
|
@@ -94,13 +94,14 @@ export const Upload = (props) => {
|
|
|
94
94
|
xhr.addEventListener('load', () => {
|
|
95
95
|
update({ state: xhr.status >= 200 && xhr.status < 300 ? 'load' : 'error', percent: undefined });
|
|
96
96
|
});
|
|
97
|
+
if (!request) {
|
|
98
|
+
throw new Error('`request` prop is required when upload file!');
|
|
99
|
+
}
|
|
97
100
|
const { url, method = 'POST', responseType = 'json', header = {}, body = (file) => {
|
|
98
101
|
const formData = new FormData();
|
|
99
102
|
formData.append('file', file);
|
|
100
103
|
return formData;
|
|
101
|
-
}, custom,
|
|
102
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
103
|
-
} = request;
|
|
104
|
+
}, custom, } = request;
|
|
104
105
|
xhr.open(method, url);
|
|
105
106
|
xhr.responseType = responseType;
|
|
106
107
|
Object.entries(header).forEach((h) => {
|
package/upload/UploadAction.d.ts
CHANGED
package/upload/UploadButton.d.ts
CHANGED
package/upload/UploadList.d.ts
CHANGED
package/upload/hooks.d.ts
CHANGED
package/upload/types.d.ts
CHANGED
package/upload/vars.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { UploadFile } from './types';
|
|
3
2
|
export declare const CLASSES: {
|
|
4
3
|
upload: string;
|
|
@@ -68,9 +67,9 @@ export declare const UploadContext: import("react").Context<{
|
|
|
68
67
|
export declare const UploadActionContext: import("react").Context<{
|
|
69
68
|
file: UploadFile;
|
|
70
69
|
defaultActions?: {
|
|
71
|
-
preview?: (
|
|
72
|
-
download?: (
|
|
73
|
-
}
|
|
74
|
-
light?: boolean
|
|
75
|
-
onRemove?: (
|
|
70
|
+
preview?: (file: UploadFile) => void;
|
|
71
|
+
download?: (file: UploadFile) => void;
|
|
72
|
+
};
|
|
73
|
+
light?: boolean;
|
|
74
|
+
onRemove?: () => void;
|
|
76
75
|
} | undefined>;
|
package/utils/mergeCS.d.ts
CHANGED
package/wave/Wave.d.ts
CHANGED
package/wave/types.d.ts
CHANGED