@para-ui/core 3.0.53 → 3.0.55
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/README.md +24 -0
- package/package.json +1 -1
- package/AutoBox/index.d.ts +0 -34
- package/AutoBox/index.js +0 -277
- package/AutoBox/protal.d.ts +0 -17
- package/AutoTips/autoTipsMultiline/index.d.ts +0 -18
- package/AutoTips/index.d.ts +0 -35
- package/AutoTips/index.js +0 -271
- package/Breadcrumbs/index.d.ts +0 -53
- package/Breadcrumbs/index.js +0 -266
- package/Breadcrumbs/lang/en_US.d.ts +0 -4
- package/Breadcrumbs/lang/index.d.ts +0 -9
- package/Breadcrumbs/lang/zh_CN.d.ts +0 -4
- package/Button/SplitButton.d.ts +0 -64
- package/Button/index.d.ts +0 -79
- package/Button/index.js +0 -376
- package/Button/lang/en_US.d.ts +0 -4
- package/Button/lang/index.d.ts +0 -9
- package/Button/lang/zh_CN.d.ts +0 -4
- package/ButtonGroup/index.d.ts +0 -33
- package/ButtonGroup/index.js +0 -124
- package/Carousel/index.d.ts +0 -38
- package/Carousel/index.js +0 -78
- package/Cascader/index.d.ts +0 -54
- package/Cascader/index.js +0 -159
- package/Cascader/lang/en_US.d.ts +0 -4
- package/Cascader/lang/index.d.ts +0 -9
- package/Cascader/lang/zh_CN.d.ts +0 -4
- package/Checkbox/index.d.ts +0 -40
- package/Checkbox/index.js +0 -109
- package/CheckboxGroup/index.d.ts +0 -45
- package/CheckboxGroup/index.js +0 -142
- package/Collapse/collapsePanel.d.ts +0 -30
- package/Collapse/index.d.ts +0 -57
- package/Collapse/index.js +0 -152
- package/Collapse/motion.d.ts +0 -5
- package/Collapse/util.d.ts +0 -11
- package/CollapseBox/index.d.ts +0 -27
- package/CollapseBox/index.js +0 -148
- package/CollapseBox/util.d.ts +0 -5
- package/CollapseLayout/index.d.ts +0 -53
- package/CollapseLayout/index.js +0 -176
- package/ColorPicker/index.d.ts +0 -4
- package/ColorPicker/index.js +0 -4
- package/ComboSelect/index.d.ts +0 -6
- package/ComboSelect/index.js +0 -1049
- package/ComboSelect/interface.d.ts +0 -146
- package/ComboSelect/lang/en_US.d.ts +0 -9
- package/ComboSelect/lang/index.d.ts +0 -19
- package/ComboSelect/lang/zh_CN.d.ts +0 -9
- package/ComboSelect/utils.d.ts +0 -9
- package/Container/index.d.ts +0 -77
- package/Container/index.js +0 -232
- package/DatePicker/PickerButton.d.ts +0 -3
- package/DatePicker/PickerTag.d.ts +0 -3
- package/DatePicker/generatePicker/generateRangePicker.d.ts +0 -4
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +0 -11
- package/DatePicker/generatePicker/index.d.ts +0 -95
- package/DatePicker/index.d.ts +0 -18
- package/DatePicker/index.js +0 -633
- package/DatePicker/lang/en_US.d.ts +0 -3
- package/DatePicker/lang/index.d.ts +0 -7
- package/DatePicker/lang/zh_CN.d.ts +0 -3
- package/DatePicker/util.d.ts +0 -22
- package/Desktop/index.d.ts +0 -57
- package/Desktop/index.js +0 -746
- package/DragVerify/index.d.ts +0 -36
- package/DragVerify/index.js +0 -385
- package/DragVerify/lang/en_US.d.ts +0 -5
- package/DragVerify/lang/index.d.ts +0 -11
- package/DragVerify/lang/zh_CN.d.ts +0 -5
- package/Drawer/index.d.ts +0 -11
- package/Drawer/index.js +0 -235
- package/Drawer/interface.d.ts +0 -92
- package/Drawer/lang/en_US.d.ts +0 -5
- package/Drawer/lang/index.d.ts +0 -11
- package/Drawer/lang/zh_CN.d.ts +0 -5
- package/Dropdown/index.d.ts +0 -40
- package/Dropdown/index.js +0 -10
- package/DynamicMultiBox/formItem.d.ts +0 -14
- package/DynamicMultiBox/index.d.ts +0 -5
- package/DynamicMultiBox/index.js +0 -1313
- package/DynamicMultiBox/interface.d.ts +0 -161
- package/DynamicMultiBox/rowForm.d.ts +0 -24
- package/Empty/images/index.d.ts +0 -3
- package/Empty/index.d.ts +0 -30
- package/Empty/index.js +0 -642
- package/Empty/lang/en_US.d.ts +0 -6
- package/Empty/lang/index.d.ts +0 -13
- package/Empty/lang/zh_CN.d.ts +0 -6
- package/Form/index.d.ts +0 -187
- package/Form/index.js +0 -355
- package/FormItem/compoments/defaultCompoments/index.d.ts +0 -19
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +0 -8
- package/FormItem/compoments/formFile/index.d.ts +0 -38
- package/FormItem/compoments/formRadioGroup/index.d.ts +0 -8
- package/FormItem/compoments/formSelect/index.d.ts +0 -18
- package/FormItem/errorTips.d.ts +0 -12
- package/FormItem/index.d.ts +0 -152
- package/FormItem/index.js +0 -78
- package/FormItem/itemType.d.ts +0 -42
- package/FormItem/validateFunction.d.ts +0 -15
- package/FunctionModal/dialog.d.ts +0 -58
- package/FunctionModal/index.d.ts +0 -8
- package/FunctionModal/index.js +0 -43
- package/FunctionModal/modalContext.d.ts +0 -15
- package/GlobalContext/componentsProps.d.ts +0 -21
- package/GlobalContext/confirmLocale.d.ts +0 -7
- package/GlobalContext/constant.d.ts +0 -8
- package/GlobalContext/index.d.ts +0 -28
- package/GlobalContext/index.js +0 -41
- package/GlobalContext/intl.d.ts +0 -34
- package/GlobalContext/useFormatMessage.d.ts +0 -3
- package/GlobalContext/usePopupContainer.d.ts +0 -4
- package/Help/index.d.ts +0 -24
- package/Help/index.js +0 -41
- package/HelperText/index.d.ts +0 -27
- package/HelperText/index.js +0 -34
- package/Hooks/useGlobalProps.d.ts +0 -1
- package/InputLang/index.d.ts +0 -46
- package/InputLang/index.js +0 -247
- package/InputNumber/index.d.ts +0 -71
- package/InputNumber/index.js +0 -277
- package/Label/index.d.ts +0 -37
- package/Label/index.js +0 -85
- package/Loading/index.d.ts +0 -17
- package/Loading/index.js +0 -47
- package/Menu/footerExpansion.d.ts +0 -9
- package/Menu/index.d.ts +0 -10
- package/Menu/index.js +0 -1105
- package/Menu/interface.d.ts +0 -141
- package/Menu/logo.d.ts +0 -9
- package/Menu/verticalMenuList.d.ts +0 -14
- package/Message/index.d.ts +0 -99
- package/Message/index.js +0 -246
- package/Modal/Confirm/index.d.ts +0 -65
- package/Modal/index.d.ts +0 -99
- package/Modal/index.js +0 -421
- package/Modal/lang/en_US.d.ts +0 -5
- package/Modal/lang/index.d.ts +0 -11
- package/Modal/lang/zh_CN.d.ts +0 -5
- package/MultiBox/index.d.ts +0 -58
- package/MultiBox/index.js +0 -272
- package/MultiBox/lang/en_US.d.ts +0 -4
- package/MultiBox/lang/index.d.ts +0 -9
- package/MultiBox/lang/zh_CN.d.ts +0 -4
- package/Notification/index.d.ts +0 -74
- package/Notification/index.js +0 -252
- package/OperateBtn/index.d.ts +0 -59
- package/OperateBtn/index.js +0 -237
- package/OperateBtn/lang/en_US.d.ts +0 -4
- package/OperateBtn/lang/index.d.ts +0 -9
- package/OperateBtn/lang/zh_CN.d.ts +0 -4
- package/PageHeader/horizontalMeun.d.ts +0 -9
- package/PageHeader/horizontalMeunRight.d.ts +0 -9
- package/PageHeader/index.d.ts +0 -10
- package/PageHeader/index.js +0 -1050
- package/PageHeader/interface.d.ts +0 -169
- package/Pagination/index.d.ts +0 -46
- package/Pagination/index.js +0 -461
- package/Pagination/lang/en_US.d.ts +0 -8
- package/Pagination/lang/index.d.ts +0 -17
- package/Pagination/lang/zh_CN.d.ts +0 -8
- package/ParauiProvider/index.d.ts +0 -8
- package/ParauiProvider/index.js +0 -52
- package/PasswordRules/index.d.ts +0 -46
- package/PasswordRules/index.js +0 -113
- package/PopConfirm/index.d.ts +0 -61
- package/PopConfirm/index.js +0 -194
- package/PopConfirm/lang/en_US.d.ts +0 -5
- package/PopConfirm/lang/index.d.ts +0 -11
- package/PopConfirm/lang/zh_CN.d.ts +0 -5
- package/Popover/index.d.ts +0 -16
- package/Popover/index.js +0 -59
- package/Progress/Line.d.ts +0 -47
- package/Progress/Steps.d.ts +0 -17
- package/Progress/index.d.ts +0 -83
- package/Progress/index.js +0 -323
- package/Progress/utils.d.ts +0 -6
- package/Querying/images/index.d.ts +0 -3
- package/Querying/index.d.ts +0 -26
- package/Querying/index.js +0 -760
- package/Querying/lang/en_US.d.ts +0 -4
- package/Querying/lang/index.d.ts +0 -9
- package/Querying/lang/zh_CN.d.ts +0 -4
- package/Radio/index.d.ts +0 -38
- package/Radio/index.js +0 -97
- package/RadioGroup/index.d.ts +0 -46
- package/RadioGroup/index.js +0 -134
- package/Search/index.d.ts +0 -57
- package/Search/index.js +0 -208
- package/Select/index.d.ts +0 -93
- package/Select/index.js +0 -1146
- package/Select/lang/en_US.d.ts +0 -5
- package/Select/lang/index.d.ts +0 -11
- package/Select/lang/zh_CN.d.ts +0 -5
- package/SelectInput/index.d.ts +0 -12
- package/SelectInput/index.js +0 -55
- package/Selector/index.d.ts +0 -11
- package/Selector/index.js +0 -2175
- package/Selector/interface.d.ts +0 -432
- package/Selector/lang/en_US.d.ts +0 -11
- package/Selector/lang/index.d.ts +0 -23
- package/Selector/lang/zh_CN.d.ts +0 -11
- package/Selector/selectorData/index.d.ts +0 -10
- package/Selector/selectorMain/index.d.ts +0 -10
- package/Selector/selectorNode/index.d.ts +0 -10
- package/Selector/util.d.ts +0 -15
- package/SelectorPicker/index.d.ts +0 -53
- package/SelectorPicker/index.js +0 -444
- package/SelectorPicker/lang/en_US.d.ts +0 -5
- package/SelectorPicker/lang/index.d.ts +0 -11
- package/SelectorPicker/lang/zh_CN.d.ts +0 -5
- package/SingleBox/index.d.ts +0 -44
- package/SingleBox/index.js +0 -224
- package/SingleBox/lang/en_US.d.ts +0 -4
- package/SingleBox/lang/index.d.ts +0 -9
- package/SingleBox/lang/zh_CN.d.ts +0 -4
- package/Slider/index.d.ts +0 -14
- package/Slider/index.js +0 -119
- package/Slider/interface.d.ts +0 -102
- package/Split/index.d.ts +0 -7
- package/Split/index.js +0 -123
- package/Status/index.d.ts +0 -21
- package/Status/index.js +0 -37
- package/Stepper/icons.d.ts +0 -5
- package/Stepper/index.d.ts +0 -59
- package/Stepper/index.js +0 -97
- package/Switch/index.d.ts +0 -78
- package/Switch/index.js +0 -71
- package/Table/index.d.ts +0 -10
- package/Table/index.js +0 -2999
- package/Table/interface.d.ts +0 -346
- package/Table/lang/en_US.d.ts +0 -8
- package/Table/lang/index.d.ts +0 -17
- package/Table/lang/zh_CN.d.ts +0 -8
- package/Table/tableBody.d.ts +0 -9
- package/Table/tableBodyElement/index.d.ts +0 -15
- package/Table/tableBodyInterface.d.ts +0 -73
- package/Table/tableContainer/index.d.ts +0 -16
- package/Table/tableElement/index.d.ts +0 -17
- package/Table/tableHead.d.ts +0 -9
- package/Table/tableHeadElement/index.d.ts +0 -15
- package/Table/tableHeadInterface.d.ts +0 -37
- package/Table/tablePagination.d.ts +0 -9
- package/Table/tablePaginationInterface.d.ts +0 -27
- package/Table/tdElement/index.d.ts +0 -15
- package/Table/thElement/index.d.ts +0 -28
- package/Table/trElement/index.d.ts +0 -15
- package/Table/util.d.ts +0 -34
- package/Tabs/index.d.ts +0 -69
- package/Tabs/index.js +0 -205
- package/Tabs/lang/en_US.d.ts +0 -4
- package/Tabs/lang/index.d.ts +0 -9
- package/Tabs/lang/zh_CN.d.ts +0 -4
- package/Tag/TagGroup.d.ts +0 -66
- package/Tag/index.d.ts +0 -34
- package/Tag/index.js +0 -259
- package/TextEditor/common.d.ts +0 -11
- package/TextEditor/index.d.ts +0 -127
- package/TextEditor/index.js +0 -286
- package/TextField/index.d.ts +0 -90
- package/TextField/index.js +0 -611
- package/TimePicker/index.d.ts +0 -22
- package/TimePicker/index.js +0 -80
- package/TimePicker/locale/en_US.d.ts +0 -3
- package/TimePicker/locale/zh_CN.d.ts +0 -3
- package/TimePicker/style/index.d.ts +0 -1
- package/Timeline/TimelineItem.d.ts +0 -30
- package/Timeline/index.d.ts +0 -32
- package/Timeline/index.js +0 -148
- package/Title/index.d.ts +0 -30
- package/Title/index.js +0 -50
- package/ToggleButton/ToggleButtonGroup.d.ts +0 -49
- package/ToggleButton/index.d.ts +0 -49
- package/ToggleButton/index.js +0 -193
- package/Tooltip/index.d.ts +0 -11
- package/Tooltip/index.js +0 -368
- package/Tooltip/interface.d.ts +0 -35
- package/Tooltip/utils.d.ts +0 -18
- package/Transfer/box.d.ts +0 -38
- package/Transfer/index.d.ts +0 -32
- package/Transfer/index.js +0 -611
- package/Transfer/lang/en_US.d.ts +0 -10
- package/Transfer/lang/index.d.ts +0 -21
- package/Transfer/lang/zh_CN.d.ts +0 -10
- package/Transfer/useClick.d.ts +0 -3
- package/Tree/OperateBar/index.d.ts +0 -13
- package/Tree/Tree.d.ts +0 -4
- package/Tree/index.d.ts +0 -5
- package/Tree/index.js +0 -38
- package/Tree/interface.d.ts +0 -210
- package/Tree/lang/en_US.d.ts +0 -8
- package/Tree/lang/index.d.ts +0 -17
- package/Tree/lang/zh_CN.d.ts +0 -8
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +0 -25
- package/Tree/utils/treeUtil.d.ts +0 -15
- package/Upload/Dragger/index.d.ts +0 -10
- package/Upload/ErroTip/index.d.ts +0 -13
- package/Upload/ImageUpload/index.d.ts +0 -16
- package/Upload/ImgCrop/EasyCrop.d.ts +0 -17
- package/Upload/ImgCrop/constants.d.ts +0 -7
- package/Upload/ImgCrop/index.d.ts +0 -6
- package/Upload/ImgCrop/interface.d.ts +0 -48
- package/Upload/UploadList/index.d.ts +0 -5
- package/Upload/index.d.ts +0 -15
- package/Upload/index.js +0 -1446
- package/Upload/interface.d.ts +0 -136
- package/Upload/lang/en_US.d.ts +0 -12
- package/Upload/lang/index.d.ts +0 -25
- package/Upload/lang/zh_CN.d.ts +0 -12
- package/_verture/constant-66aa48a1.js +0 -10
- package/_verture/defineProperty-62acccfc.js +0 -34
- package/_verture/index-74f820ba.js +0 -1355
- package/_verture/index-77f9e0fb.js +0 -236
- package/_verture/index-9fd86055.js +0 -711
- package/_verture/index-a369ca3f.js +0 -4
- package/_verture/index-beef914f.js +0 -340
- package/_verture/index-e2881a53.js +0 -16
- package/_verture/intl-5cbb940c.js +0 -57
- package/_verture/modalContext-92bb0e16.js +0 -201
- package/_verture/slicedToArray-76060636.js +0 -43
- package/_verture/sortable.esm-49896035.js +0 -3791
- package/_verture/style-inject.es-300983ab.js +0 -28
- package/_verture/toConsumableArray-81040c9e.js +0 -19
- package/_verture/tslib.es6-55ed4bd2.js +0 -38
- package/_verture/typeof-498dd2b1.js +0 -11
- package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
- package/_verture/useFormatMessage-703f8b20.js +0 -20
- package/_verture/useGlobalProps-1b846a65.js +0 -11
- package/_verture/usePopupContainer-87febeb9.js +0 -68
- package/_verture/util-7e1fb1e2.js +0 -18
- package/index.d.ts +0 -144
- package/index.js +0 -180
- package/umd/AutoBox.js +0 -43
- package/umd/AutoTips.js +0 -15
- package/umd/Breadcrumbs.js +0 -42
- package/umd/Button.js +0 -43
- package/umd/ButtonGroup.js +0 -43
- package/umd/Carousel.js +0 -6
- package/umd/Cascader.js +0 -43
- package/umd/Checkbox.js +0 -42
- package/umd/CheckboxGroup.js +0 -42
- package/umd/Collapse.js +0 -43
- package/umd/CollapseBox.js +0 -1
- package/umd/CollapseLayout.js +0 -29
- package/umd/ColorPicker.js +0 -1
- package/umd/ComboSelect.js +0 -42
- package/umd/Container.js +0 -1
- package/umd/DatePicker.js +0 -42
- package/umd/Desktop.js +0 -42
- package/umd/DragVerify.js +0 -28
- package/umd/Drawer.js +0 -43
- package/umd/Dropdown.js +0 -15
- package/umd/DynamicMultiBox.js +0 -54
- package/umd/Empty.js +0 -15
- package/umd/Form.js +0 -42
- package/umd/FormItem.js +0 -42
- package/umd/FunctionModal.js +0 -42
- package/umd/GlobalContext.js +0 -1
- package/umd/Help.js +0 -42
- package/umd/HelperText.js +0 -1
- package/umd/InputLang.js +0 -42
- package/umd/InputNumber.js +0 -42
- package/umd/Label.js +0 -42
- package/umd/Loading.js +0 -29
- package/umd/Menu.js +0 -29
- package/umd/Message.js +0 -30
- package/umd/Modal.js +0 -42
- package/umd/MultiBox.js +0 -42
- package/umd/Notification.js +0 -43
- package/umd/OperateBtn.js +0 -42
- package/umd/PageHeader.js +0 -42
- package/umd/Pagination.js +0 -42
- package/umd/ParauiProvider.js +0 -15
- package/umd/PasswordRules.js +0 -29
- package/umd/PopConfirm.js +0 -42
- package/umd/Popover.js +0 -15
- package/umd/Progress.js +0 -35
- package/umd/Querying.js +0 -15
- package/umd/Radio.js +0 -42
- package/umd/RadioGroup.js +0 -42
- package/umd/Search.js +0 -42
- package/umd/Select.js +0 -42
- package/umd/SelectInput.js +0 -42
- package/umd/Selector.js +0 -42
- package/umd/SelectorPicker.js +0 -42
- package/umd/SingleBox.js +0 -42
- package/umd/Slider.js +0 -15
- package/umd/Split.js +0 -1
- package/umd/Status.js +0 -1
- package/umd/Stepper.js +0 -42
- package/umd/Switch.js +0 -42
- package/umd/Table.js +0 -42
- package/umd/Tabs.js +0 -42
- package/umd/Tag.js +0 -43
- package/umd/TextEditor.js +0 -205
- package/umd/TextField.js +0 -42
- package/umd/TimePicker.js +0 -42
- package/umd/Timeline.js +0 -1
- package/umd/Title.js +0 -1
- package/umd/ToggleButton.js +0 -43
- package/umd/Tooltip.js +0 -15
- package/umd/Transfer.js +0 -49
- package/umd/Tree.js +0 -42
- package/umd/Upload.js +0 -56
package/Transfer/index.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/// <reference types="sortablejs" />
|
|
2
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { ItemDataProps } from './box';
|
|
4
|
-
import './style/index.scss';
|
|
5
|
-
/**
|
|
6
|
-
* @description: 穿梭框
|
|
7
|
-
* @param className{string} 类名
|
|
8
|
-
* @param style{string} 样式
|
|
9
|
-
* @param data{Array} 数据源
|
|
10
|
-
* @param value{Array} 当前选中的值
|
|
11
|
-
* @param onChange{Function} 值改变时的回调
|
|
12
|
-
* @param title{String} 标题
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
interface TransferProps {
|
|
16
|
-
className?: string;
|
|
17
|
-
style?: CSSProperties;
|
|
18
|
-
data?: Array<ItemDataProps>;
|
|
19
|
-
value?: Array<string>;
|
|
20
|
-
onChange?: (data: Array<string>) => void;
|
|
21
|
-
onSort?: (data: Array<string>) => void;
|
|
22
|
-
titles?: Array<string>;
|
|
23
|
-
trim?: boolean;
|
|
24
|
-
multiple?: boolean;
|
|
25
|
-
rightIcon?: (item: ItemDataProps) => ReactNode;
|
|
26
|
-
render?: (data: ItemDataProps) => void;
|
|
27
|
-
customKey?: string;
|
|
28
|
-
}
|
|
29
|
-
export declare const Transfer: (props: TransferProps) => JSX.Element;
|
|
30
|
-
export default Transfer;
|
|
31
|
-
export type IItemDataProps = ItemDataProps;
|
|
32
|
-
export declare const SSortablejs: typeof import("sortablejs");
|
package/Transfer/index.js
DELETED
|
@@ -1,611 +0,0 @@
|
|
|
1
|
-
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-81040c9e.js';
|
|
2
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-76060636.js';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { useRef, useState, useEffect, useCallback } from 'react';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { Button } from '../Button/index.js';
|
|
7
|
-
import NavigateBefore from '@para-ui/icons/Left';
|
|
8
|
-
import Right from '@para-ui/icons/Right';
|
|
9
|
-
import ExpandLess from '@para-ui/icons/Up';
|
|
10
|
-
import Down from '@para-ui/icons/Down';
|
|
11
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
12
|
-
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
13
|
-
import { Search } from '../Search/index.js';
|
|
14
|
-
import SearchIcon from '@para-ui/icons/Search';
|
|
15
|
-
import AutoTips from '../AutoTips/index.js';
|
|
16
|
-
import Drag from '@para-ui/icons/Drag';
|
|
17
|
-
import { S as Sortable } from '../_verture/sortable.esm-49896035.js';
|
|
18
|
-
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
19
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
20
|
-
import '../_verture/typeof-498dd2b1.js';
|
|
21
|
-
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
22
|
-
import '@para-ui/icons/LoadingF';
|
|
23
|
-
import '@para-ui/icons/Forbid';
|
|
24
|
-
import '../Tooltip/index.js';
|
|
25
|
-
import 'rc-tooltip';
|
|
26
|
-
import 'rc-tooltip/lib/placements';
|
|
27
|
-
import '../_verture/index-77f9e0fb.js';
|
|
28
|
-
import 'rc-dropdown';
|
|
29
|
-
import '../_verture/usePopupContainer-87febeb9.js';
|
|
30
|
-
import 'dayjs';
|
|
31
|
-
import '@paraview/lib';
|
|
32
|
-
import '@para-ui/core/GlobalContext';
|
|
33
|
-
import '../TextField/index.js';
|
|
34
|
-
import '../Label/index.js';
|
|
35
|
-
import '../Help/index.js';
|
|
36
|
-
import '@para-ui/icons/Help';
|
|
37
|
-
import '@para-ui/icons/PreviewClose';
|
|
38
|
-
import '@para-ui/icons/PreviewOpen';
|
|
39
|
-
import '@para-ui/icons/CloseCircle';
|
|
40
|
-
import '../Loading/index.js';
|
|
41
|
-
import '../HelperText/index.js';
|
|
42
|
-
import '../_verture/useGlobalProps-1b846a65.js';
|
|
43
|
-
|
|
44
|
-
var en = {
|
|
45
|
-
left: 'Left',
|
|
46
|
-
right: 'Right',
|
|
47
|
-
allCheck: 'Select All',
|
|
48
|
-
inVertCheck: 'Invert selection',
|
|
49
|
-
searchPlaceholder: 'Please enter the search content',
|
|
50
|
-
leftBtnTips: 'Please check the content on the right first',
|
|
51
|
-
rightBtnTips: 'Please check the content on the left first'
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
var zh = {
|
|
55
|
-
left: '左侧',
|
|
56
|
-
right: '右侧',
|
|
57
|
-
allCheck: '全选',
|
|
58
|
-
inVertCheck: '反选',
|
|
59
|
-
searchPlaceholder: '请输入搜索内容',
|
|
60
|
-
leftBtnTips: '请先勾选右侧内容',
|
|
61
|
-
rightBtnTips: '请先勾选左侧内容'
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
var localeJson = {
|
|
65
|
-
zh: zh,
|
|
66
|
-
en: en
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
var useClick = function useClick(callback, doubleCallback) {
|
|
70
|
-
var clickRef = useRef({
|
|
71
|
-
clickCount: 0,
|
|
72
|
-
time: 0,
|
|
73
|
-
timer: null
|
|
74
|
-
});
|
|
75
|
-
return function () {
|
|
76
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
77
|
-
args[_key] = arguments[_key];
|
|
78
|
-
}
|
|
79
|
-
clickRef.current.clickCount += 1;
|
|
80
|
-
clickRef.current.time = Date.now();
|
|
81
|
-
clickRef.current.timer = setTimeout(function () {
|
|
82
|
-
if (Date.now() - clickRef.current.time <= 200 && clickRef.current.clickCount === 2) {
|
|
83
|
-
doubleCallback && doubleCallback.apply(null, args);
|
|
84
|
-
}
|
|
85
|
-
if (clickRef.current.clickCount === 1) {
|
|
86
|
-
callback && callback.apply(null, args);
|
|
87
|
-
}
|
|
88
|
-
clearTimeout(clickRef.current.timer);
|
|
89
|
-
clickRef.current.clickCount = 0;
|
|
90
|
-
}, 200);
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
var Box = function Box(props) {
|
|
95
|
-
var title = props.title,
|
|
96
|
-
data = props.data,
|
|
97
|
-
onSearch = props.onSearch,
|
|
98
|
-
onchange = props.onchange,
|
|
99
|
-
onMove = props.onMove,
|
|
100
|
-
queryAll = props.queryAll,
|
|
101
|
-
inverse = props.inverse,
|
|
102
|
-
direction = props.direction,
|
|
103
|
-
fluctuationPosition = props.fluctuationPosition,
|
|
104
|
-
fluctuationOrther = props.fluctuationOrther,
|
|
105
|
-
onEndSort = props.onEndSort,
|
|
106
|
-
multiple = props.multiple,
|
|
107
|
-
rightIcon = props.rightIcon,
|
|
108
|
-
style = props.style,
|
|
109
|
-
customKey = props.customKey;
|
|
110
|
-
var intl = useFormatMessage('Transfer', localeJson);
|
|
111
|
-
var _useState = useState([]),
|
|
112
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
113
|
-
checkCount = _useState2[0],
|
|
114
|
-
setCheckCount = _useState2[1];
|
|
115
|
-
var _useState3 = useState(0),
|
|
116
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
117
|
-
disabledCount = _useState4[0],
|
|
118
|
-
setDisabledCount = _useState4[1];
|
|
119
|
-
var ref = useRef();
|
|
120
|
-
useEffect(function () {
|
|
121
|
-
var arr = [];
|
|
122
|
-
var count = 0;
|
|
123
|
-
data.forEach(function (item, index) {
|
|
124
|
-
if (item.checked && !item.hide) {
|
|
125
|
-
arr.push(index);
|
|
126
|
-
}
|
|
127
|
-
if (item.disabled || item.hide) {
|
|
128
|
-
count++;
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
setDisabledCount(count);
|
|
132
|
-
setCheckCount(arr);
|
|
133
|
-
}, [data]);
|
|
134
|
-
useEffect(function () {
|
|
135
|
-
if (direction == 'right') {
|
|
136
|
-
new Sortable(ref.current, {
|
|
137
|
-
animation: 180,
|
|
138
|
-
ghostClass: 'blue-background-class',
|
|
139
|
-
handle: '.handle',
|
|
140
|
-
onEnd: function onEnd(evt) {
|
|
141
|
-
onEndSort === null || onEndSort === void 0 ? void 0 : onEndSort(evt.oldIndex, evt.newIndex);
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}, []);
|
|
146
|
-
var handler = useClick(function (e, index, item) {
|
|
147
|
-
if (item.disabled) return;
|
|
148
|
-
onchange(e, !item.checked, index, direction, multiple);
|
|
149
|
-
}, function (e, index, item) {
|
|
150
|
-
if (item === null || item === void 0 ? void 0 : item.disabled) return;
|
|
151
|
-
onchange(e, true, index, direction, false);
|
|
152
|
-
onMove(direction === "right" ? 'left' : 'right');
|
|
153
|
-
});
|
|
154
|
-
return jsxs("div", Object.assign({
|
|
155
|
-
className: "box",
|
|
156
|
-
style: style
|
|
157
|
-
}, {
|
|
158
|
-
children: [jsx("div", Object.assign({
|
|
159
|
-
className: "box-header"
|
|
160
|
-
}, {
|
|
161
|
-
children: title
|
|
162
|
-
})), jsx(Search, {
|
|
163
|
-
btnType: "inside",
|
|
164
|
-
placeholder: intl({
|
|
165
|
-
id: 'searchPlaceholder'
|
|
166
|
-
}),
|
|
167
|
-
showBtn: false,
|
|
168
|
-
rightIcon: jsx(SearchIcon, {}),
|
|
169
|
-
rightIconExist: true,
|
|
170
|
-
onChange: function onChange(val) {
|
|
171
|
-
onSearch(val, direction);
|
|
172
|
-
},
|
|
173
|
-
onClickRightIcon: function onClickRightIcon(val) {
|
|
174
|
-
onSearch(val, direction);
|
|
175
|
-
},
|
|
176
|
-
onEnter: function onEnter(event) {
|
|
177
|
-
var _a;
|
|
178
|
-
var val = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
179
|
-
onSearch(val, direction);
|
|
180
|
-
},
|
|
181
|
-
allowClear: false
|
|
182
|
-
}), jsx("div", Object.assign({
|
|
183
|
-
className: "context",
|
|
184
|
-
ref: ref
|
|
185
|
-
}, {
|
|
186
|
-
children: data.map(function (item, index) {
|
|
187
|
-
if (item === null || item === void 0 ? void 0 : item.hide) return null;
|
|
188
|
-
return jsxs("div", Object.assign({
|
|
189
|
-
className: clsx('item', (item === null || item === void 0 ? void 0 : item.disabled) && 'item-disabled', (item === null || item === void 0 ? void 0 : item.checked) && 'item-checked', fluctuationPosition === index && 'item-fluctuation', fluctuationOrther === index && 'item-fluctuationOrther'),
|
|
190
|
-
style: (item === null || item === void 0 ? void 0 : item.tagColor) ? {
|
|
191
|
-
borderLeft: "4px solid ".concat(item.tagColor)
|
|
192
|
-
} : undefined,
|
|
193
|
-
onClick: function onClick(e) {
|
|
194
|
-
handler(e, index, item);
|
|
195
|
-
}
|
|
196
|
-
}, {
|
|
197
|
-
children: [jsx("div", Object.assign({
|
|
198
|
-
className: 'item-label'
|
|
199
|
-
}, {
|
|
200
|
-
children: jsx(AutoTips, {
|
|
201
|
-
children: (item === null || item === void 0 ? void 0 : item.name) || item[item[customKey]]
|
|
202
|
-
})
|
|
203
|
-
})), rightIcon ? jsx("div", Object.assign({
|
|
204
|
-
className: 'right-icon'
|
|
205
|
-
}, {
|
|
206
|
-
children: rightIcon(item)
|
|
207
|
-
})) : null, direction === 'right' ? jsx("div", Object.assign({
|
|
208
|
-
className: 'handle'
|
|
209
|
-
}, {
|
|
210
|
-
children: jsx(Drag, {})
|
|
211
|
-
})) : null]
|
|
212
|
-
}), item[item[customKey]] || item.name);
|
|
213
|
-
})
|
|
214
|
-
})), jsxs("div", Object.assign({
|
|
215
|
-
className: 'footer'
|
|
216
|
-
}, {
|
|
217
|
-
children: [jsx(Button, Object.assign({
|
|
218
|
-
variant: "text",
|
|
219
|
-
className: "".concat(checkCount.length === data.length - disabledCount && data.length > 0 ? 'btn-on' : ''),
|
|
220
|
-
onClick: function onClick() {
|
|
221
|
-
queryAll(checkCount.length !== data.length - disabledCount, direction);
|
|
222
|
-
}
|
|
223
|
-
}, {
|
|
224
|
-
children: intl({
|
|
225
|
-
id: 'allCheck'
|
|
226
|
-
})
|
|
227
|
-
})), jsx(Button, Object.assign({
|
|
228
|
-
variant: "text",
|
|
229
|
-
className: "".concat(checkCount.length === 0 || checkCount.length === data.length - disabledCount ? 'btn-off' : ''),
|
|
230
|
-
disabled: checkCount.length === 0 || checkCount.length === data.length - disabledCount,
|
|
231
|
-
onClick: function onClick() {
|
|
232
|
-
inverse(direction);
|
|
233
|
-
}
|
|
234
|
-
}, {
|
|
235
|
-
children: intl({
|
|
236
|
-
id: 'inVertCheck'
|
|
237
|
-
})
|
|
238
|
-
})), jsxs("div", Object.assign({
|
|
239
|
-
className: "count"
|
|
240
|
-
}, {
|
|
241
|
-
children: [checkCount.length, "/", data.length]
|
|
242
|
-
}))]
|
|
243
|
-
}))]
|
|
244
|
-
}));
|
|
245
|
-
};
|
|
246
|
-
var Sortablejs = Sortable;
|
|
247
|
-
|
|
248
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-transfer {\n display: flex;\n font-size: 14px;\n user-select: none;\n}\n.paraui-v3-transfer .blue-background-class {\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-transfer .box {\n border-radius: 4px;\n border: 1px solid rgba(171, 176, 185, 0.4);\n overflow: hidden;\n}\n.paraui-v3-transfer .box .box-header {\n background: rgba(171, 176, 185, 0.12);\n color: rgb(46, 55, 67);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 10px;\n height: 36px;\n border-bottom: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-transfer .box .count {\n margin: 0 10px 0 0;\n color: rgb(46, 55, 67);\n letter-spacing: 1px;\n margin: 0 16px 0 auto;\n}\n.paraui-v3-transfer .box .context {\n height: 400px;\n overflow: auto;\n scrollbar-base-color: red;\n}\n.paraui-v3-transfer .box .context .item-fluctuation {\n animation: flucturation 0.4s forwards;\n}\n.paraui-v3-transfer .box .context .item-fluctuationOrther {\n animation: flucturationOrther 0.5s forwards;\n}\n.paraui-v3-transfer .box .context .item {\n padding: 0px 8px;\n height: 36px;\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.paraui-v3-transfer .box .context .item.item-checked {\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-transfer .box .context .item.item-checked:hover {\n background-color: rgba(54, 102, 214, 0.05) !important;\n}\n.paraui-v3-transfer .box .context .item.item-checked > .item-label {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-transfer .box .context .item > .item-label {\n margin-left: 8px;\n flex: 1;\n overflow: hidden;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-transfer .box .context .item:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-transfer .box .context .item.item-disabled:hover {\n background: inherit;\n cursor: no-drop;\n}\n.paraui-v3-transfer .box .context .item.item-disabled > .item-label {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-transfer .box .context .item .handle {\n margin-left: 14px;\n display: flex;\n align-content: center;\n}\n.paraui-v3-transfer .box .context .item .handle svg {\n color: rgb(28, 41, 60);\n}\n.paraui-v3-transfer .box .context .item .handle:hover {\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-transfer .box .context .item .handle:hover svg {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-transfer .box .text-field-content {\n border: none;\n border-radius: 0;\n border-bottom: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-transfer .box .footer {\n display: flex;\n align-items: center;\n border-top: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-transfer .box .footer .btn-on {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-transfer .box .footer .btn-off {\n color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-transfer .box .footer button {\n color: rgb(46, 55, 67);\n padding: 0 0 0 16px;\n}\n.paraui-v3-transfer .box .footer button:hover {\n color: #3666D6;\n}\n.paraui-v3-transfer ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: rgb(54, 102, 214);\n}\n.paraui-v3-transfer .moveBtn {\n display: flex;\n height: 500px;\n flex-direction: column;\n justify-content: center;\n margin: 0 24px;\n}\n.paraui-v3-transfer .moveBtn > button:hover {\n color: white;\n background: rgb(54, 102, 214);\n}\n.paraui-v3-transfer .moveBtn .btn-left {\n margin-top: 20px;\n}\n\n@keyframes flucturation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(36px);\n }\n}\n@keyframes flucturationOrther {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-36px);\n }\n}";
|
|
249
|
-
styleInject(css_248z);
|
|
250
|
-
|
|
251
|
-
var Transfer = function Transfer(props) {
|
|
252
|
-
var _a, _b, _c, _d;
|
|
253
|
-
var intl = useFormatMessage('Transfer', localeJson);
|
|
254
|
-
var _props$data = props.data,
|
|
255
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
256
|
-
value = props.value,
|
|
257
|
-
_props$customKey = props.customKey,
|
|
258
|
-
customKey = _props$customKey === void 0 ? 'key' : _props$customKey,
|
|
259
|
-
onChange = props.onChange,
|
|
260
|
-
_props$titles = props.titles,
|
|
261
|
-
titles = _props$titles === void 0 ? [intl({
|
|
262
|
-
id: 'left'
|
|
263
|
-
}), intl({
|
|
264
|
-
id: 'right'
|
|
265
|
-
})] : _props$titles,
|
|
266
|
-
className = props.className,
|
|
267
|
-
_props$style = props.style,
|
|
268
|
-
style = _props$style === void 0 ? {
|
|
269
|
-
width: '298px'
|
|
270
|
-
} : _props$style,
|
|
271
|
-
onSort = props.onSort,
|
|
272
|
-
_props$trim = props.trim,
|
|
273
|
-
trim = _props$trim === void 0 ? false : _props$trim,
|
|
274
|
-
_props$multiple = props.multiple,
|
|
275
|
-
multiple = _props$multiple === void 0 ? true : _props$multiple,
|
|
276
|
-
rightIcon = props.rightIcon,
|
|
277
|
-
_props$render = props.render,
|
|
278
|
-
render = _props$render === void 0 ? function (item) {} : _props$render;
|
|
279
|
-
var _useState = useState({}),
|
|
280
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
281
|
-
transData = _useState2[0],
|
|
282
|
-
setTransData = _useState2[1];
|
|
283
|
-
var _useState3 = useState([]),
|
|
284
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
285
|
-
leftData = _useState4[0],
|
|
286
|
-
setLeftData = _useState4[1];
|
|
287
|
-
var _useState5 = useState([]),
|
|
288
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
289
|
-
rightData = _useState6[0],
|
|
290
|
-
setRightData = _useState6[1];
|
|
291
|
-
var _useState7 = useState([]),
|
|
292
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
293
|
-
leftCount = _useState8[0],
|
|
294
|
-
setLeftCount = _useState8[1];
|
|
295
|
-
var _useState9 = useState([]),
|
|
296
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
297
|
-
rightCount = _useState10[0],
|
|
298
|
-
setRightCount = _useState10[1];
|
|
299
|
-
var _useState11 = useState(),
|
|
300
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
301
|
-
fluctuationPosition = _useState12[0];
|
|
302
|
-
_useState12[1];
|
|
303
|
-
var _useState13 = useState(),
|
|
304
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
305
|
-
fluctuationOrther = _useState14[0];
|
|
306
|
-
_useState14[1];
|
|
307
|
-
var _useState15 = useState(false),
|
|
308
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
309
|
-
animationsLock = _useState16[0],
|
|
310
|
-
setAnimationLock = _useState16[1];
|
|
311
|
-
var onchange = useCallback(function (e, bol, index, direction, multiple) {
|
|
312
|
-
if (direction === 'left') {
|
|
313
|
-
!multiple && leftData.forEach(function (item) {
|
|
314
|
-
return item.checked = false;
|
|
315
|
-
});
|
|
316
|
-
leftData[index].checked = bol;
|
|
317
|
-
setLeftData(_toConsumableArray(leftData));
|
|
318
|
-
} else {
|
|
319
|
-
!multiple && rightData.forEach(function (item) {
|
|
320
|
-
return item.checked = false;
|
|
321
|
-
});
|
|
322
|
-
rightData[index].checked = bol;
|
|
323
|
-
setRightData(_toConsumableArray(rightData));
|
|
324
|
-
}
|
|
325
|
-
}, [leftData, rightData]);
|
|
326
|
-
var queryAll = useCallback(function (checked, direction) {
|
|
327
|
-
if (direction === 'left') {
|
|
328
|
-
leftData.forEach(function (item) {
|
|
329
|
-
if (!item.disabled && !item.hide) item.checked = checked;
|
|
330
|
-
});
|
|
331
|
-
setLeftData(_toConsumableArray(leftData));
|
|
332
|
-
} else {
|
|
333
|
-
rightData.forEach(function (item) {
|
|
334
|
-
if (!item.disabled && !item.hide) item.checked = checked;
|
|
335
|
-
});
|
|
336
|
-
setRightData(_toConsumableArray(rightData));
|
|
337
|
-
}
|
|
338
|
-
}, [leftData, rightData]);
|
|
339
|
-
var inverse = useCallback(function (direction) {
|
|
340
|
-
if (direction === 'left') {
|
|
341
|
-
leftData.forEach(function (item) {
|
|
342
|
-
if (!item.disabled && !item.hide) item.checked = !item.checked;
|
|
343
|
-
});
|
|
344
|
-
setLeftData(_toConsumableArray(leftData));
|
|
345
|
-
} else {
|
|
346
|
-
rightData.forEach(function (item) {
|
|
347
|
-
if (!item.disabled && !item.hide) item.checked = !item.checked;
|
|
348
|
-
});
|
|
349
|
-
setRightData(_toConsumableArray(rightData));
|
|
350
|
-
}
|
|
351
|
-
}, [leftData, rightData]);
|
|
352
|
-
var onMove = function onMove(direction) {
|
|
353
|
-
var newData = [];
|
|
354
|
-
if (direction === 'left') {
|
|
355
|
-
newData = _toConsumableArray(rightData);
|
|
356
|
-
newData.forEach(function (item) {
|
|
357
|
-
if ((item === null || item === void 0 ? void 0 : item.checked) && !(item === null || item === void 0 ? void 0 : item.hide)) {
|
|
358
|
-
item.checked = false;
|
|
359
|
-
leftData.push(item);
|
|
360
|
-
rightData.splice(rightData.indexOf(item), 1);
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
} else {
|
|
364
|
-
newData = _toConsumableArray(leftData);
|
|
365
|
-
newData.forEach(function (item) {
|
|
366
|
-
if ((item === null || item === void 0 ? void 0 : item.checked) && !(item === null || item === void 0 ? void 0 : item.hide)) {
|
|
367
|
-
item.checked = false;
|
|
368
|
-
rightData.push(item);
|
|
369
|
-
leftData.splice(leftData.indexOf(item), 1);
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
setLeftData(_toConsumableArray(leftData));
|
|
374
|
-
setRightData(_toConsumableArray(rightData));
|
|
375
|
-
var rArr = [];
|
|
376
|
-
rightData.forEach(function (item) {
|
|
377
|
-
rArr.push(item[customKey]);
|
|
378
|
-
});
|
|
379
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(rArr);
|
|
380
|
-
};
|
|
381
|
-
// 上下移动
|
|
382
|
-
var fluctuation = function fluctuation(direction) {
|
|
383
|
-
setAnimationLock(true);
|
|
384
|
-
console.log(rightCount);
|
|
385
|
-
if (direction == 'up') {
|
|
386
|
-
// setFluctuationPosition(rightCount[0] - 1)
|
|
387
|
-
// setFluctuationOrther(rightCount[0])
|
|
388
|
-
// setTimeout(() => {
|
|
389
|
-
setRightData(function (pre) {
|
|
390
|
-
// setFluctuationPosition(undefined)
|
|
391
|
-
// setFluctuationOrther(undefined)
|
|
392
|
-
rightCount.forEach(function (item) {
|
|
393
|
-
pre.splice.apply(pre, [item - 1, 0].concat(_toConsumableArray(pre.splice(item, 1))));
|
|
394
|
-
});
|
|
395
|
-
setAnimationLock(false);
|
|
396
|
-
var rArr = [];
|
|
397
|
-
pre.forEach(function (item) {
|
|
398
|
-
rArr.push(item[customKey]);
|
|
399
|
-
});
|
|
400
|
-
onSort === null || onSort === void 0 ? void 0 : onSort([].concat(rArr));
|
|
401
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(rArr));
|
|
402
|
-
return _toConsumableArray(pre);
|
|
403
|
-
});
|
|
404
|
-
// }, 400)
|
|
405
|
-
} else {
|
|
406
|
-
// setFluctuationPosition(rightCount[0])
|
|
407
|
-
// setFluctuationOrther(rightCount[0] + 1)
|
|
408
|
-
// setTimeout(() => {
|
|
409
|
-
setRightData(function (pre) {
|
|
410
|
-
// setFluctuationPosition(undefined)
|
|
411
|
-
// setFluctuationOrther(undefined)
|
|
412
|
-
rightCount.reverse().forEach(function (item) {
|
|
413
|
-
pre.splice.apply(pre, [item + 1, 0].concat(_toConsumableArray(pre.splice(item, 1))));
|
|
414
|
-
});
|
|
415
|
-
setAnimationLock(false);
|
|
416
|
-
var rArr = [];
|
|
417
|
-
pre.forEach(function (item) {
|
|
418
|
-
rArr.push(item[customKey]);
|
|
419
|
-
});
|
|
420
|
-
onSort === null || onSort === void 0 ? void 0 : onSort([].concat(rArr));
|
|
421
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(rArr));
|
|
422
|
-
return _toConsumableArray(pre);
|
|
423
|
-
});
|
|
424
|
-
// }, 400)
|
|
425
|
-
}
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
var onSearch = function onSearch(e, direction) {
|
|
429
|
-
var str = trim ? e.toUpperCase().trim() : e.toUpperCase();
|
|
430
|
-
if (direction === 'left') {
|
|
431
|
-
leftData.forEach(function (item) {
|
|
432
|
-
item.hide = false;
|
|
433
|
-
var name = (item.name || '').toUpperCase();
|
|
434
|
-
var description = (item.description || '').toUpperCase();
|
|
435
|
-
if (!(name.indexOf(str) !== -1 || description.indexOf(str) !== -1)) {
|
|
436
|
-
item.hide = true;
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
setLeftData(_toConsumableArray(leftData));
|
|
440
|
-
} else {
|
|
441
|
-
rightData.filter(function (item) {
|
|
442
|
-
item.hide = false;
|
|
443
|
-
var name = (item.name || '').toUpperCase();
|
|
444
|
-
var description = (item.description || '').toUpperCase();
|
|
445
|
-
if (!(name.indexOf(str) !== -1 || description.indexOf(str) !== -1)) {
|
|
446
|
-
item.hide = true;
|
|
447
|
-
}
|
|
448
|
-
});
|
|
449
|
-
setRightData(_toConsumableArray(rightData));
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
var onEndSort = useCallback(function (oldIndex, newIndex) {
|
|
453
|
-
setRightData(function (pre) {
|
|
454
|
-
pre.splice.apply(pre, [newIndex, 0].concat(_toConsumableArray(pre.splice(oldIndex, 1))));
|
|
455
|
-
var rArr = [];
|
|
456
|
-
pre.forEach(function (item) {
|
|
457
|
-
rArr.push(item[customKey]);
|
|
458
|
-
});
|
|
459
|
-
onSort === null || onSort === void 0 ? void 0 : onSort([].concat(rArr));
|
|
460
|
-
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(rArr));
|
|
461
|
-
return _toConsumableArray(pre);
|
|
462
|
-
});
|
|
463
|
-
}, []);
|
|
464
|
-
useEffect(function () {
|
|
465
|
-
if (data.length) {
|
|
466
|
-
var _leftData = {};
|
|
467
|
-
data.forEach(function (item) {
|
|
468
|
-
var key = item[customKey];
|
|
469
|
-
render(item);
|
|
470
|
-
_leftData[key] = item;
|
|
471
|
-
});
|
|
472
|
-
setTransData(Object.assign({}, _leftData));
|
|
473
|
-
}
|
|
474
|
-
}, [data]);
|
|
475
|
-
useEffect(function () {
|
|
476
|
-
var rData = [];
|
|
477
|
-
var lData = [];
|
|
478
|
-
value === null || value === void 0 ? void 0 : value.forEach(function (item) {
|
|
479
|
-
if (transData[item]) {
|
|
480
|
-
rData.push(transData[item]);
|
|
481
|
-
delete transData[item];
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
for (var key in transData) {
|
|
485
|
-
lData.push(transData[key]);
|
|
486
|
-
}
|
|
487
|
-
setRightData([].concat(rData));
|
|
488
|
-
setLeftData([].concat(lData));
|
|
489
|
-
}, [value, transData]);
|
|
490
|
-
useEffect(function () {
|
|
491
|
-
var arr = [];
|
|
492
|
-
leftData.forEach(function (item, index) {
|
|
493
|
-
if (item.checked && !item.hide) {
|
|
494
|
-
arr.push(index);
|
|
495
|
-
}
|
|
496
|
-
});
|
|
497
|
-
setLeftCount(arr);
|
|
498
|
-
var rArr = [];
|
|
499
|
-
rightData.forEach(function (item, index) {
|
|
500
|
-
if (item.checked && !item.hide) {
|
|
501
|
-
rArr.push(index);
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
setRightCount(rArr);
|
|
505
|
-
}, [leftData, rightData]);
|
|
506
|
-
return jsxs("div", Object.assign({
|
|
507
|
-
className: clsx("".concat($prefixCls, "-transfer"), className)
|
|
508
|
-
}, {
|
|
509
|
-
children: [jsx(Box, {
|
|
510
|
-
title: titles[0],
|
|
511
|
-
queryAll: queryAll,
|
|
512
|
-
data: leftData,
|
|
513
|
-
style: style,
|
|
514
|
-
direction: "left",
|
|
515
|
-
customKey: customKey,
|
|
516
|
-
rightIcon: rightIcon,
|
|
517
|
-
onchange: onchange,
|
|
518
|
-
multiple: multiple,
|
|
519
|
-
onMove: onMove,
|
|
520
|
-
inverse: inverse,
|
|
521
|
-
onSearch: onSearch
|
|
522
|
-
}), jsxs("div", Object.assign({
|
|
523
|
-
className: "moveBtn"
|
|
524
|
-
}, {
|
|
525
|
-
children: [jsx(Button.IconButton, Object.assign({
|
|
526
|
-
className: 'btn btn-right',
|
|
527
|
-
variant: 'outlined',
|
|
528
|
-
disabled: leftCount.length <= 0,
|
|
529
|
-
toolTipTitle: leftCount.length <= 0 ? intl({
|
|
530
|
-
id: 'rightBtnTips'
|
|
531
|
-
}) : '',
|
|
532
|
-
TooltipProps: {
|
|
533
|
-
arrow: false,
|
|
534
|
-
placement: 'bottomRight'
|
|
535
|
-
},
|
|
536
|
-
onClick: function onClick() {
|
|
537
|
-
onMove("right");
|
|
538
|
-
}
|
|
539
|
-
}, {
|
|
540
|
-
children: jsx(Right, {})
|
|
541
|
-
})), jsx(Button.IconButton, Object.assign({
|
|
542
|
-
className: 'btn btn-left',
|
|
543
|
-
variant: 'outlined',
|
|
544
|
-
disabled: rightCount.length <= 0 || ((_a = rightData[0]) === null || _a === void 0 ? void 0 : _a.checked) || animationsLock,
|
|
545
|
-
toolTipTitle: rightCount.length <= 0 || ((_b = rightData[0]) === null || _b === void 0 ? void 0 : _b.checked) ? intl({
|
|
546
|
-
id: 'leftBtnTips'
|
|
547
|
-
}) : '',
|
|
548
|
-
TooltipProps: {
|
|
549
|
-
arrow: false,
|
|
550
|
-
placement: 'bottomRight'
|
|
551
|
-
},
|
|
552
|
-
onClick: function onClick() {
|
|
553
|
-
fluctuation('up');
|
|
554
|
-
}
|
|
555
|
-
}, {
|
|
556
|
-
children: jsx(ExpandLess, {})
|
|
557
|
-
})), jsx(Button.IconButton, Object.assign({
|
|
558
|
-
className: 'btn btn-left',
|
|
559
|
-
variant: 'outlined',
|
|
560
|
-
disabled: rightCount.length <= 0 || ((_c = rightData[rightData.length - 1]) === null || _c === void 0 ? void 0 : _c.checked) || animationsLock,
|
|
561
|
-
toolTipTitle: rightCount.length <= 0 || ((_d = rightData[rightData.length - 1]) === null || _d === void 0 ? void 0 : _d.checked) ? intl({
|
|
562
|
-
id: 'leftBtnTips'
|
|
563
|
-
}) : '',
|
|
564
|
-
TooltipProps: {
|
|
565
|
-
arrow: false,
|
|
566
|
-
placement: 'bottomRight'
|
|
567
|
-
},
|
|
568
|
-
onClick: function onClick() {
|
|
569
|
-
fluctuation('down');
|
|
570
|
-
}
|
|
571
|
-
}, {
|
|
572
|
-
children: jsx(Down, {})
|
|
573
|
-
})), jsx(Button.IconButton, Object.assign({
|
|
574
|
-
className: 'btn btn-left',
|
|
575
|
-
variant: 'outlined',
|
|
576
|
-
disabled: rightCount.length <= 0,
|
|
577
|
-
toolTipTitle: rightCount.length <= 0 ? intl({
|
|
578
|
-
id: 'leftBtnTips'
|
|
579
|
-
}) : '',
|
|
580
|
-
TooltipProps: {
|
|
581
|
-
arrow: false,
|
|
582
|
-
placement: 'bottomRight'
|
|
583
|
-
},
|
|
584
|
-
onClick: function onClick() {
|
|
585
|
-
onMove('left');
|
|
586
|
-
}
|
|
587
|
-
}, {
|
|
588
|
-
children: jsx(NavigateBefore, {})
|
|
589
|
-
}))]
|
|
590
|
-
})), jsx(Box, {
|
|
591
|
-
title: titles[1],
|
|
592
|
-
queryAll: queryAll,
|
|
593
|
-
data: rightData,
|
|
594
|
-
style: style,
|
|
595
|
-
direction: "right",
|
|
596
|
-
customKey: customKey,
|
|
597
|
-
rightIcon: rightIcon,
|
|
598
|
-
onchange: onchange,
|
|
599
|
-
multiple: multiple,
|
|
600
|
-
onMove: onMove,
|
|
601
|
-
inverse: inverse,
|
|
602
|
-
fluctuationPosition: fluctuationPosition,
|
|
603
|
-
fluctuationOrther: fluctuationOrther,
|
|
604
|
-
onEndSort: onEndSort,
|
|
605
|
-
onSearch: onSearch
|
|
606
|
-
})]
|
|
607
|
-
}));
|
|
608
|
-
};
|
|
609
|
-
var SSortablejs = Sortablejs;
|
|
610
|
-
|
|
611
|
-
export { SSortablejs, Transfer, Transfer as default };
|
package/Transfer/lang/en_US.d.ts
DELETED
package/Transfer/lang/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
zh: {
|
|
3
|
-
left: string;
|
|
4
|
-
right: string;
|
|
5
|
-
allCheck: string;
|
|
6
|
-
inVertCheck: string;
|
|
7
|
-
searchPlaceholder: string;
|
|
8
|
-
leftBtnTips: string;
|
|
9
|
-
rightBtnTips: string;
|
|
10
|
-
};
|
|
11
|
-
en: {
|
|
12
|
-
left: string;
|
|
13
|
-
right: string;
|
|
14
|
-
allCheck: string;
|
|
15
|
-
inVertCheck: string;
|
|
16
|
-
searchPlaceholder: string;
|
|
17
|
-
leftBtnTips: string;
|
|
18
|
-
rightBtnTips: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
package/Transfer/lang/zh_CN.d.ts
DELETED
package/Transfer/useClick.d.ts
DELETED