@para-ui/core 4.0.52 → 4.0.54
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/Button/index.js +2 -2
- package/Cascader/Cascader.d.ts +3 -0
- package/Cascader/index.js +11 -8
- package/ComboSelect/index.js +5 -5
- package/CycleSelector/index.js +2 -2
- package/DatePicker/index.js +2 -2
- package/DynamicMultiBox/index.js +7 -7
- package/DynamicMultiBox/interface.d.ts +1 -1
- package/FieldForm/ErrorList.d.ts +16 -0
- package/FieldForm/FieldFormItem/ItemHolder.d.ts +18 -0
- package/FieldForm/FieldFormItem/MemoInput.d.ts +14 -0
- package/FieldForm/FieldFormItem/StatusProvider.d.ts +20 -0
- package/FieldForm/FieldFormItem/index.d.ts +58 -0
- package/FieldForm/Form.d.ts +36 -0
- package/FieldForm/FormItemInput.d.ts +21 -0
- package/FieldForm/FormItemLabel.d.ts +21 -0
- package/FieldForm/FormList.d.ts +23 -0
- package/FieldForm/context.d.ts +33 -0
- package/FieldForm/hooks/useChildren.d.ts +2 -0
- package/FieldForm/hooks/useDebounce.d.ts +1 -0
- package/FieldForm/hooks/useForm.d.ts +6 -0
- package/FieldForm/hooks/useFormInstance.d.ts +2 -0
- package/FieldForm/hooks/useFormItemStatus.d.ts +9 -0
- package/FieldForm/hooks/useFrameState.d.ts +3 -0
- package/FieldForm/hooks/useItemRef.d.ts +3 -0
- package/FieldForm/index.d.ts +30 -0
- package/FieldForm/index.js +5326 -0
- package/FieldForm/interface.d.ts +2 -0
- package/FieldForm/lang/en_US.d.ts +51 -0
- package/FieldForm/lang/index.d.ts +105 -0
- package/FieldForm/lang/zh_CN.d.ts +51 -0
- package/FieldForm/util.d.ts +21 -0
- package/Form/index.js +6 -6
- package/FormItem/index.js +6 -6
- package/FunctionModal/index.js +2 -2
- package/Image/index.js +5 -55
- package/PopMenu/index.js +2 -2
- package/README.md +15 -0
- package/Result/index.js +2 -2
- package/Selector/index.js +1 -1
- package/SelectorPicker/index.js +1 -1
- package/Switch/index.d.ts +4 -0
- package/Switch/index.js +3 -2
- package/Table/index.js +433 -498
- package/Tag/index.js +2 -2
- package/TextEditor/index.d.ts +2 -0
- package/TextEditor/index.js +27 -6
- package/TimePicker/index.js +2 -2
- package/Tooltip/index.js +26 -27
- package/Transfer/index.d.ts +1 -0
- package/Transfer/index.js +120 -119
- package/Tree/index.js +4 -4
- package/Upload/index.js +9 -7
- package/_verture/{Portal-f9bedb3a.js → Portal-502bb85e.js} +29 -481
- package/_verture/{index-5b0d1c7d.js → index-0a300edb.js} +387 -700
- package/_verture/index-1856bbeb.js +480 -0
- package/_verture/{index-ba8815d0.js → index-320d67c4.js} +2 -2
- package/_verture/{index-887e5e11.js → index-43c653bb.js} +1 -1
- package/_verture/isEqual-30b6f859.js +56 -0
- package/_verture/{slicedToArray-75fa4188.js → slicedToArray-61604a6c.js} +1 -1
- package/_verture/{toConsumableArray-c7a8028f.js → toConsumableArray-599cd94a.js} +1 -1
- package/_verture/useState-f2419d68.js +353 -0
- package/index.d.ts +2 -0
- package/index.js +15 -11
- package/locale/en-US.d.ts +46 -0
- package/locale/index.d.ts +92 -0
- package/locale/index.js +92 -0
- package/locale/zh-CN.d.ts +46 -0
- package/package.json +3 -1
- package/umd/Anchor.js +5 -5
- package/umd/Argv.js +5 -5
- package/umd/AutoBox.js +5 -5
- package/umd/AutoButton.js +6 -6
- package/umd/AutoTips.js +5 -5
- package/umd/Breadcrumbs.js +4 -4
- package/umd/Button.js +5 -5
- package/umd/ButtonGroup.js +6 -6
- package/umd/Cascader.js +5 -5
- package/umd/Checkbox.js +4 -4
- package/umd/CheckboxGroup.js +4 -4
- package/umd/Collapse.js +1 -1
- package/umd/ComboSelect.js +5 -5
- package/umd/CopyText.js +5 -5
- package/umd/CycleSelector.js +5 -5
- package/umd/DatePicker.js +5 -5
- package/umd/Descriptions.js +6 -6
- package/umd/Desktop.js +5 -5
- package/umd/Drawer.js +5 -5
- package/umd/Dropdown.js +4 -4
- package/umd/DynamicMultiBox.js +5 -5
- package/umd/FieldForm.js +43 -0
- package/umd/Form.js +5 -5
- package/umd/FormItem.js +5 -5
- package/umd/FunctionModal.js +5 -5
- package/umd/Help.js +5 -5
- package/umd/Image.js +3 -3
- package/umd/InputCode.js +5 -5
- package/umd/InputLang.js +5 -5
- package/umd/InputNumber.js +4 -4
- package/umd/Label.js +4 -4
- package/umd/Menu.js +4 -4
- package/umd/Modal.js +5 -5
- package/umd/MultiBox.js +6 -6
- package/umd/Notification.js +3 -3
- package/umd/OperateBtn.js +5 -5
- package/umd/PageHeader.js +5 -5
- package/umd/Pagination.js +5 -5
- package/umd/PopConfirm.js +5 -5
- package/umd/PopMenu.js +5 -5
- package/umd/Popover.js +5 -5
- package/umd/QuickReply.js +5 -5
- package/umd/Radio.js +4 -4
- package/umd/RadioGroup.js +4 -4
- package/umd/RangeInput.js +5 -5
- package/umd/Result.js +4 -4
- package/umd/Search.js +5 -5
- package/umd/Select.js +5 -5
- package/umd/SelectInput.js +5 -5
- package/umd/Selector.js +5 -5
- package/umd/SelectorPicker.js +5 -5
- package/umd/SingleBox.js +5 -5
- package/umd/Slider.js +4 -4
- package/umd/Stepper.js +4 -4
- package/umd/Switch.js +4 -4
- package/umd/Table.js +6 -6
- package/umd/Tabs.js +4 -4
- package/umd/Tag.js +5 -5
- package/umd/TextEditor.js +6 -6
- package/umd/TextField.js +5 -5
- package/umd/TimePicker.js +5 -5
- package/umd/Title.js +3 -3
- package/umd/ToggleButton.js +5 -5
- package/umd/Tooltip.js +4 -4
- package/umd/Transfer.js +7 -7
- package/umd/Tree.js +3 -3
- package/umd/Upload.js +5 -5
- package/umd/locale.js +1 -1
- /package/_verture/{modalContext-f68b51a2.js → modalContext-6ac2e323.js} +0 -0
package/Tag/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import { useState, useRef, useEffect } from 'react';
|
|
|
4
4
|
import Close from '@para-ui/icons/Close';
|
|
5
5
|
import EditOutline from '@para-ui/icons/EditOutline';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-
|
|
7
|
+
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-599cd94a.js';
|
|
8
8
|
import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
|
|
9
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
9
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-61604a6c.js';
|
|
10
10
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
11
11
|
import AutoTips from '../AutoTips/index.js';
|
|
12
12
|
import { t as tinycolor } from '../_verture/tinycolor-ece3542d.js';
|
package/TextEditor/index.d.ts
CHANGED
|
@@ -110,6 +110,8 @@ export interface TextEditorProps extends HelperTextDetailProps {
|
|
|
110
110
|
onFocus?: (editor: IDomEditor) => void;
|
|
111
111
|
/** 编辑器销毁钩子 */
|
|
112
112
|
onDestroyed?: (editor: IDomEditor) => void;
|
|
113
|
+
/** 是否禁用 */
|
|
114
|
+
disabled?: boolean;
|
|
113
115
|
}
|
|
114
116
|
export interface TextEditorRef {
|
|
115
117
|
/** 获取html内容 */
|
package/TextEditor/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef, useState, useEffect, useImperativeHandle, useMemo } from 'react';
|
|
2
|
+
import { forwardRef, useRef, useState, useEffect, useImperativeHandle, useMemo, useCallback } from 'react';
|
|
3
3
|
import Label from '../Label/index.js';
|
|
4
4
|
import { Toolbar, Editor } from '@wangeditor/editor-for-react';
|
|
5
5
|
import { i18nChangeLanguage } from '@wangeditor/editor';
|
|
@@ -63,7 +63,7 @@ var localeJson = {
|
|
|
63
63
|
en: en
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-text-editor .w-e-max-length-info {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-text-editor .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item {\n padding-left: 0;\n padding-right: 0;\n display: flex;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button {\n flex: 1;\n display: flex;\n justify-content: flex-start;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-full-screen-container {\n z-index: 1000;\n}\n.paraui-v4-text-editor .text-editor-content {\n border: 1px solid rgb(212, 218, 227);\n border-radius: 4px;\n padding: 1px 0;\n background-color: #fff;\n}\n.paraui-v4-text-editor .text-editor-content > div:nth-child(1) {\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false] {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false]:hover {\n
|
|
66
|
+
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-text-editor.is-error .text-editor-content {\n border-color: rgb(244, 66, 66);\n}\n.paraui-v4-text-editor .w-e-max-length-info {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-text-editor .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item {\n padding-left: 0;\n padding-right: 0;\n display: flex;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button {\n flex: 1;\n display: flex;\n justify-content: flex-start;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-full-screen-container {\n z-index: 1000;\n}\n.paraui-v4-text-editor .text-editor-content {\n border: 1px solid rgb(212, 218, 227);\n border-radius: 4px;\n padding: 1px 0;\n background-color: #fff;\n}\n.paraui-v4-text-editor .text-editor-content > div:nth-child(1) {\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false] {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false]:hover {\n cursor: not-allowed;\n}\n.paraui-v4-text-editor .preview-mode > div:nth-child(1) {\n border-bottom: none;\n}";
|
|
67
67
|
styleInject(css_248z$1);
|
|
68
68
|
|
|
69
69
|
var css_248z = ":root,\n:host {\n --w-e-textarea-bg-color: #fff;\n --w-e-textarea-color: #333;\n --w-e-textarea-border-color: #ccc;\n --w-e-textarea-slight-border-color: #e8e8e8;\n --w-e-textarea-slight-color: #d4d4d4;\n --w-e-textarea-slight-bg-color: #f5f2f0;\n --w-e-textarea-selected-border-color: #B4D5FF;\n --w-e-textarea-handler-bg-color: #4290f7;\n --w-e-toolbar-color: #595959;\n --w-e-toolbar-bg-color: #fff;\n --w-e-toolbar-active-color: #333;\n --w-e-toolbar-active-bg-color: #f1f1f1;\n --w-e-toolbar-disabled-color: #999;\n --w-e-toolbar-border-color: #e8e8e8;\n --w-e-modal-button-bg-color: #fafafa;\n --w-e-modal-button-border-color: #d9d9d9;\n}\n\n.w-e-text-container *,.w-e-toolbar *{box-sizing:border-box;margin:0;outline:none;padding:0}.w-e-text-container blockquote,.w-e-text-container li,.w-e-text-container p,.w-e-text-container td,.w-e-text-container th,.w-e-toolbar *{line-height:1.5}.w-e-text-container{background-color:var(--w-e-textarea-bg-color);color:var(--w-e-textarea-color);height:100%;position:relative}.w-e-text-container .w-e-scroll{-webkit-overflow-scrolling:touch;height:100%}.w-e-text-container [data-slate-editor]{word-wrap:break-word;border-top:1px solid transparent;min-height:100%;outline:0;padding:0 10px;white-space:pre-wrap}.w-e-text-container [data-slate-editor] p{margin:15px 0}.w-e-text-container [data-slate-editor] h1,.w-e-text-container [data-slate-editor] h2,.w-e-text-container [data-slate-editor] h3,.w-e-text-container [data-slate-editor] h4,.w-e-text-container [data-slate-editor] h5{margin:20px 0}.w-e-text-container [data-slate-editor] img{cursor:default;display:inline!important;max-width:100%;min-height:20px;min-width:20px}.w-e-text-container [data-slate-editor] span{text-indent:0}.w-e-text-container [data-slate-editor] [data-selected=true]{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-placeholder{font-style:italic;left:10px;top:17px;width:90%}.w-e-max-length-info,.w-e-text-placeholder{color:var(--w-e-textarea-slight-color);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.w-e-max-length-info{bottom:.5em;right:1em}.w-e-bar{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-color);font-size:14px;padding:0 5px}.w-e-bar svg{fill:var(--w-e-toolbar-color);height:14px;width:14px}.w-e-bar-show{display:flex}.w-e-bar-hidden{display:none}.w-e-hover-bar{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 5px #0000001f;position:absolute}.w-e-toolbar{flex-wrap:wrap;position:relative}.w-e-bar-divider{background-color:var(--w-e-toolbar-border-color);display:inline-flex;height:40px;margin:0 5px;width:1px}.w-e-bar-item{display:flex;height:40px;padding:4px;position:relative;text-align:center}.w-e-bar-item,.w-e-bar-item button{align-items:center;justify-content:center}.w-e-bar-item button{background:transparent;border:none;color:var(--w-e-toolbar-color);cursor:pointer;display:inline-flex;height:32px;overflow:hidden;padding:0 8px;white-space:nowrap}.w-e-bar-item button:hover{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item button .title{margin-left:5px}.w-e-bar-item .active{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item .disabled{color:var(--w-e-toolbar-disabled-color);cursor:not-allowed}.w-e-bar-item .disabled svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-menu-tooltip-v5:before{background-color:var(--w-e-toolbar-active-color);border-radius:5px;color:var(--w-e-toolbar-bg-color);content:attr(data-tooltip);font-size:.75em;opacity:0;padding:5px 10px;position:absolute;text-align:center;top:40px;transition:opacity .6s;visibility:hidden;white-space:pre;z-index:1}.w-e-menu-tooltip-v5:after{border:5px solid transparent;border-bottom:5px solid var(--w-e-toolbar-active-color);content:\"\";opacity:0;position:absolute;top:30px;transition:opacity .6s;visibility:hidden}.w-e-menu-tooltip-v5:hover:after,.w-e-menu-tooltip-v5:hover:before{opacity:1;visibility:visible}.w-e-menu-tooltip-v5.tooltip-right:before{left:100%;top:10px}.w-e-menu-tooltip-v5.tooltip-right:after{border-bottom-color:transparent;border-left-color:transparent;border-right-color:var(--w-e-toolbar-active-color);border-top-color:transparent;left:100%;margin-left:-10px;top:16px}.w-e-bar-item-group .w-e-bar-item-menus-container{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;display:none;left:0;margin-top:40px;position:absolute;top:0;z-index:1}.w-e-bar-item-group:hover .w-e-bar-item-menus-container{display:block}.w-e-select-list{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;left:0;margin-top:40px;max-height:350px;min-width:100px;overflow-y:auto;position:absolute;top:0;z-index:1}.w-e-select-list ul{line-height:1;list-style:none}.w-e-select-list ul .selected{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li{cursor:pointer;padding:7px 0 7px 25px;position:relative;text-align:left;white-space:nowrap}.w-e-select-list ul li:hover{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li svg{left:0;margin-left:5px;margin-top:-7px;position:absolute;top:50%}.w-e-bar-bottom .w-e-select-list{bottom:0;margin-bottom:40px;margin-top:0;top:inherit}.w-e-drop-panel{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;margin-top:40px;min-width:200px;padding:10px;position:absolute;top:0;z-index:1}.w-e-bar-bottom .w-e-drop-panel{bottom:0;margin-bottom:40px;margin-top:0;top:inherit}.w-e-modal{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;color:var(--w-e-toolbar-color);font-size:14px;min-height:40px;min-width:100px;padding:20px 15px 0;position:absolute;text-align:left;z-index:1}.w-e-modal .btn-close{cursor:pointer;line-height:1;padding:5px;position:absolute;right:8px;top:7px}.w-e-modal .btn-close svg{fill:var(--w-e-toolbar-color);height:10px;width:10px}.w-e-modal .babel-container{display:block;margin-bottom:15px}.w-e-modal .babel-container span{display:block;margin-bottom:10px}.w-e-modal .button-container{margin-bottom:15px}.w-e-modal button{background-color:var(--w-e-modal-button-bg-color);border:1px solid var(--w-e-modal-button-border-color);border-radius:4px;color:var(--w-e-toolbar-color);cursor:pointer;font-weight:400;height:32px;padding:4.5px 15px;text-align:center;touch-action:manipulation;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.w-e-modal input[type=number],.w-e-modal input[type=text],.w-e-modal textarea{font-feature-settings:\"tnum\";background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-modal-button-border-color);border-radius:4px;color:var(--w-e-toolbar-color);font-variant:tabular-nums;padding:4.5px 11px;transition:all .3s;width:100%}.w-e-modal textarea{min-height:60px}body .w-e-modal,body .w-e-modal *{box-sizing:border-box}.w-e-progress-bar{background-color:var(--w-e-textarea-handler-bg-color);height:1px;position:absolute;transition:width .3s;width:0}.w-e-full-screen-container{bottom:0!important;display:flex!important;flex-direction:column!important;height:100%!important;left:0!important;margin:0!important;padding:0!important;position:fixed;right:0!important;top:0!important;width:100%!important}.w-e-full-screen-container [data-w-e-textarea=true]{flex:1!important}\n.w-e-text-container [data-slate-editor] code{background-color:var(--w-e-textarea-slight-bg-color);border-radius:3px;font-family:monospace;padding:3px}.w-e-panel-content-color{list-style:none;text-align:left;width:230px}.w-e-panel-content-color li{border:1px solid var(--w-e-toolbar-bg-color);border-radius:3px 3px;cursor:pointer;display:inline-block;padding:2px}.w-e-panel-content-color li:hover{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color li .color-block{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px 3px;height:17px;width:17px}.w-e-panel-content-color .active{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color .clear{line-height:1.5;margin-bottom:5px;width:100%}.w-e-panel-content-color .clear svg{height:16px;margin-bottom:-4px;width:16px}.w-e-text-container [data-slate-editor] blockquote{background-color:var(--w-e-textarea-slight-bg-color);border-left:8px solid var(--w-e-textarea-selected-border-color);display:block;font-size:100%;line-height:1.5;margin:10px 0;padding:10px}.w-e-panel-content-emotion{font-size:20px;list-style:none;text-align:left;width:300px}.w-e-panel-content-emotion li{border-radius:3px 3px;cursor:pointer;display:inline-block;padding:0 5px}.w-e-panel-content-emotion li:hover{background-color:var(--w-e-textarea-slight-bg-color)}.w-e-textarea-divider{border-radius:3px;margin:20px auto;padding:20px}.w-e-textarea-divider hr{background-color:var(--w-e-textarea-border-color);border:0;display:block;height:1px}.w-e-text-container [data-slate-editor] pre>code{background-color:var(--w-e-textarea-slight-bg-color);border:1px solid var(--w-e-textarea-slight-border-color);border-radius:4px 4px;display:block;font-size:14px;padding:10px;text-indent:0}.w-e-text-container [data-slate-editor] .w-e-image-container{display:inline-block;margin:0 3px}.w-e-text-container [data-slate-editor] .w-e-image-container:hover{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-container [data-slate-editor] .w-e-selected-image-container{overflow:hidden;position:relative}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .w-e-image-dragger{background-color:var(--w-e-textarea-handler-bg-color);height:7px;position:absolute;width:7px}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-top{cursor:nwse-resize;left:0;top:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-top{cursor:nesw-resize;right:0;top:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-bottom{bottom:0;cursor:nesw-resize;left:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-bottom{bottom:0;cursor:nwse-resize;right:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container:hover{box-shadow:none}.w-e-text-container [contenteditable=false] .w-e-image-container:hover{box-shadow:none}\n\n.w-e-text-container [data-slate-editor] .table-container{border:1px dashed var(--w-e-textarea-border-color);border-radius:5px;margin-top:10px;overflow-x:auto;padding:10px;width:100%}.w-e-text-container [data-slate-editor] table{border-collapse:collapse}.w-e-text-container [data-slate-editor] table td,.w-e-text-container [data-slate-editor] table th{border:1px solid var(--w-e-textarea-border-color);line-height:1.5;min-width:30px;padding:3px 5px;text-align:left}.w-e-text-container [data-slate-editor] table th{background-color:var(--w-e-textarea-slight-bg-color);font-weight:700;text-align:center}.w-e-panel-content-table{background-color:var(--w-e-toolbar-bg-color)}.w-e-panel-content-table table{border-collapse:collapse}.w-e-panel-content-table td{border:1px solid var(--w-e-toolbar-border-color);cursor:pointer;height:15px;padding:3px 5px;width:20px}.w-e-panel-content-table td.active{background-color:var(--w-e-toolbar-active-bg-color)}\n.w-e-textarea-video-container{background-image:linear-gradient(45deg,#eee 25%,transparent 0,transparent 75%,#eee 0,#eee),linear-gradient(45deg,#eee 25%,#fff 0,#fff 75%,#eee 0,#eee);background-position:0 0,10px 10px;background-size:20px 20px;border:1px dashed var(--w-e-textarea-border-color);border-radius:5px;margin:10px auto 0;padding:10px 0;text-align:center}\n\n.w-e-text-container [data-slate-editor] pre>code{word-wrap:normal;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;-webkit-hyphens:none;hyphens:none;line-height:1.5;margin:.5em 0;overflow:auto;padding:1em;-moz-tab-size:4;-o-tab-size:4;tab-size:4;text-align:left;text-shadow:0 1px #fff;white-space:pre;word-break:normal;word-spacing:normal}.w-e-text-container [data-slate-editor] pre>code .token.cdata,.w-e-text-container [data-slate-editor] pre>code .token.comment,.w-e-text-container [data-slate-editor] pre>code .token.doctype,.w-e-text-container [data-slate-editor] pre>code .token.prolog{color:#708090}.w-e-text-container [data-slate-editor] pre>code .token.punctuation{color:#999}.w-e-text-container [data-slate-editor] pre>code .token.namespace{opacity:.7}.w-e-text-container [data-slate-editor] pre>code .token.boolean,.w-e-text-container [data-slate-editor] pre>code .token.constant,.w-e-text-container [data-slate-editor] pre>code .token.deleted,.w-e-text-container [data-slate-editor] pre>code .token.number,.w-e-text-container [data-slate-editor] pre>code .token.property,.w-e-text-container [data-slate-editor] pre>code .token.symbol,.w-e-text-container [data-slate-editor] pre>code .token.tag{color:#905}.w-e-text-container [data-slate-editor] pre>code .token.attr-name,.w-e-text-container [data-slate-editor] pre>code .token.builtin,.w-e-text-container [data-slate-editor] pre>code .token.char,.w-e-text-container [data-slate-editor] pre>code .token.inserted,.w-e-text-container [data-slate-editor] pre>code .token.selector,.w-e-text-container [data-slate-editor] pre>code .token.string{color:#690}.w-e-text-container [data-slate-editor] pre>code .language-css .token.string,.w-e-text-container [data-slate-editor] pre>code .style .token.string,.w-e-text-container [data-slate-editor] pre>code .token.entity,.w-e-text-container [data-slate-editor] pre>code .token.operator,.w-e-text-container [data-slate-editor] pre>code .token.url{color:#9a6e3a}.w-e-text-container [data-slate-editor] pre>code .token.atrule,.w-e-text-container [data-slate-editor] pre>code .token.attr-value,.w-e-text-container [data-slate-editor] pre>code .token.keyword{color:#07a}.w-e-text-container [data-slate-editor] pre>code .token.class-name,.w-e-text-container [data-slate-editor] pre>code .token.function{color:#dd4a68}.w-e-text-container [data-slate-editor] pre>code .token.important,.w-e-text-container [data-slate-editor] pre>code .token.regex,.w-e-text-container [data-slate-editor] pre>code .token.variable{color:#e90}.w-e-text-container [data-slate-editor] pre>code .token.bold,.w-e-text-container [data-slate-editor] pre>code .token.important{font-weight:700}.w-e-text-container [data-slate-editor] pre>code .token.italic{font-style:italic}.w-e-text-container [data-slate-editor] pre>code .token.entity{cursor:help}";
|
|
@@ -109,8 +109,10 @@ const TextEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
109
109
|
},
|
|
110
110
|
uploadVideo = {
|
|
111
111
|
timeout: 15 * 1000
|
|
112
|
-
}
|
|
112
|
+
},
|
|
113
|
+
disabled
|
|
113
114
|
} = props;
|
|
115
|
+
const valueRef = useRef('');
|
|
114
116
|
// editor 实例
|
|
115
117
|
const [editor, setEditor] = useState(null);
|
|
116
118
|
// 编辑器内容
|
|
@@ -137,6 +139,8 @@ const TextEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
137
139
|
/** 改变事件 */
|
|
138
140
|
const onChangeCom = editor => {
|
|
139
141
|
if (props.value === undefined) setValueCom(editor.getHtml());
|
|
142
|
+
if (valueRef.current === editor.getHtml()) return;
|
|
143
|
+
valueRef.current = editor.getHtml();
|
|
140
144
|
onChange && onChange(editor.getHtml(), editor.getText());
|
|
141
145
|
};
|
|
142
146
|
// 工具栏配置
|
|
@@ -181,7 +185,15 @@ const TextEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
181
185
|
if (value !== undefined) {
|
|
182
186
|
setValueCom(value);
|
|
183
187
|
}
|
|
188
|
+
valueRef.current = value || '';
|
|
184
189
|
}, [value]);
|
|
190
|
+
useEffect(() => {
|
|
191
|
+
if (disabled) {
|
|
192
|
+
editor === null || editor === void 0 ? void 0 : editor.disable();
|
|
193
|
+
} else {
|
|
194
|
+
editor === null || editor === void 0 ? void 0 : editor.enable();
|
|
195
|
+
}
|
|
196
|
+
}, [disabled]);
|
|
185
197
|
// 获取html格式的内容
|
|
186
198
|
const getContent = () => {
|
|
187
199
|
if (!editor) return;
|
|
@@ -232,6 +244,7 @@ const TextEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
232
244
|
const handClass = () => {
|
|
233
245
|
let str = "".concat($prefixCls, "-text-editor");
|
|
234
246
|
if (className) str += " ".concat(className);
|
|
247
|
+
if (error) str += " is-error";
|
|
235
248
|
return str;
|
|
236
249
|
};
|
|
237
250
|
/** 标题 */
|
|
@@ -243,14 +256,22 @@ const TextEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
243
256
|
}
|
|
244
257
|
return str;
|
|
245
258
|
};
|
|
246
|
-
return jsx(Label, Object.assign({
|
|
259
|
+
return label ? jsx(Label, Object.assign({
|
|
247
260
|
label: label,
|
|
248
261
|
required: required,
|
|
249
262
|
labelSign: labelSign
|
|
250
263
|
}, labelTooltip, {
|
|
251
264
|
className: handLabelClass()
|
|
252
|
-
}));
|
|
265
|
+
})) : null;
|
|
253
266
|
}, [label, labelSign, required, labelTooltip]);
|
|
267
|
+
const unmounted = useRef(false);
|
|
268
|
+
const onCreated = useCallback(editor => {
|
|
269
|
+
if (unmounted.current) return;
|
|
270
|
+
setEditor(editor);
|
|
271
|
+
}, []);
|
|
272
|
+
useEffect(() => () => {
|
|
273
|
+
unmounted.current = true;
|
|
274
|
+
}, []);
|
|
254
275
|
return jsxs("div", Object.assign({
|
|
255
276
|
className: handClass(),
|
|
256
277
|
style: style
|
|
@@ -266,7 +287,7 @@ const TextEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
266
287
|
}, toolBarKey), jsx(Editor, {
|
|
267
288
|
defaultConfig: editorConfig,
|
|
268
289
|
value: valueCom,
|
|
269
|
-
onCreated:
|
|
290
|
+
onCreated: onCreated,
|
|
270
291
|
onChange: onChangeCom,
|
|
271
292
|
mode: "default",
|
|
272
293
|
style: editorStyle
|
package/TimePicker/index.js
CHANGED
|
@@ -24,8 +24,8 @@ import '@para-ui/icons/Forbid';
|
|
|
24
24
|
import '../Tag/index.js';
|
|
25
25
|
import '@para-ui/icons/Close';
|
|
26
26
|
import '@para-ui/icons/EditOutline';
|
|
27
|
-
import '../_verture/toConsumableArray-
|
|
28
|
-
import '../_verture/slicedToArray-
|
|
27
|
+
import '../_verture/toConsumableArray-599cd94a.js';
|
|
28
|
+
import '../_verture/slicedToArray-61604a6c.js';
|
|
29
29
|
import '../_verture/typeof-adeedc13.js';
|
|
30
30
|
import '../_verture/tinycolor-ece3542d.js';
|
|
31
31
|
import '../_verture/useGlobalProps-4ae1a007.js';
|
package/Tooltip/index.js
CHANGED
|
@@ -9,12 +9,12 @@ import Forbid from '@para-ui/icons/Forbid';
|
|
|
9
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
10
|
|
|
11
11
|
//自动调整位置
|
|
12
|
-
|
|
12
|
+
var autoAdjustOverflowEnabled = {
|
|
13
13
|
adjustX: 1,
|
|
14
14
|
adjustY: 1
|
|
15
15
|
};
|
|
16
16
|
//非自动调整位置
|
|
17
|
-
|
|
17
|
+
var autoAdjustOverflowDisabled = {
|
|
18
18
|
adjustX: 0,
|
|
19
19
|
adjustY: 0
|
|
20
20
|
};
|
|
@@ -27,12 +27,12 @@ function getOverflowOptions(autoAdjustOverflow) {
|
|
|
27
27
|
}
|
|
28
28
|
//tooltip placement
|
|
29
29
|
function getPlacements(config) {
|
|
30
|
-
|
|
31
|
-
horizontalArrowShift = 16,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
var _config$horizontalArr = config.horizontalArrowShift,
|
|
31
|
+
horizontalArrowShift = _config$horizontalArr === void 0 ? 16 : _config$horizontalArr,
|
|
32
|
+
_config$verticalArrow = config.verticalArrowShift,
|
|
33
|
+
verticalArrowShift = _config$verticalArrow === void 0 ? 8 : _config$verticalArrow,
|
|
34
|
+
autoAdjustOverflow = config.autoAdjustOverflow;
|
|
35
|
+
var placementMap = {
|
|
36
36
|
left: {
|
|
37
37
|
points: ['cr', 'cl'],
|
|
38
38
|
offset: [-8, 0]
|
|
@@ -82,7 +82,7 @@ function getPlacements(config) {
|
|
|
82
82
|
offset: [-8, verticalArrowShift]
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
Object.keys(placementMap).forEach(key
|
|
85
|
+
Object.keys(placementMap).forEach(function (key) {
|
|
86
86
|
placementMap[key] = Object.assign(Object.assign({}, placements[key]), {
|
|
87
87
|
offset: getAlignOffset(key).offset,
|
|
88
88
|
overflow: getOverflowOptions(autoAdjustOverflow)
|
|
@@ -91,40 +91,39 @@ function getPlacements(config) {
|
|
|
91
91
|
});
|
|
92
92
|
return placementMap;
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
keys.forEach(key
|
|
94
|
+
var splitObject = function splitObject(obj, keys) {
|
|
95
|
+
var picked = {};
|
|
96
|
+
var omitted = Object.assign({}, obj);
|
|
97
|
+
keys.forEach(function (key) {
|
|
98
98
|
if (obj && key in obj) {
|
|
99
99
|
picked[key] = obj[key];
|
|
100
100
|
delete omitted[key];
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
return {
|
|
104
|
-
picked,
|
|
105
|
-
omitted
|
|
104
|
+
picked: picked,
|
|
105
|
+
omitted: omitted
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
108
|
//兼容禁用title
|
|
109
109
|
function getDisabledCompatibleChildren(child) {
|
|
110
|
-
|
|
110
|
+
var element = /*#__PURE__*/React__default.isValidElement(child) ? child : jsx("span", {
|
|
111
111
|
children: child
|
|
112
112
|
});
|
|
113
113
|
if (element.type === 'button' && element.props.disabled) {
|
|
114
|
-
|
|
115
|
-
picked,
|
|
116
|
-
omitted
|
|
117
|
-
|
|
118
|
-
const spanStyle = Object.assign(Object.assign({
|
|
114
|
+
var _splitObject = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']),
|
|
115
|
+
picked = _splitObject.picked,
|
|
116
|
+
omitted = _splitObject.omitted;
|
|
117
|
+
var spanStyle = Object.assign(Object.assign({
|
|
119
118
|
display: 'inline-block'
|
|
120
119
|
}, picked), {
|
|
121
120
|
cursor: 'not-allowed',
|
|
122
121
|
width: element.props.block ? '100%' : null
|
|
123
122
|
});
|
|
124
|
-
|
|
123
|
+
var buttonStyle = Object.assign(Object.assign({}, omitted), {
|
|
125
124
|
pointerEvents: 'none'
|
|
126
125
|
});
|
|
127
|
-
|
|
126
|
+
var _child = /*#__PURE__*/React__default.cloneElement(element, {
|
|
128
127
|
style: buttonStyle,
|
|
129
128
|
className: null
|
|
130
129
|
});
|
|
@@ -132,14 +131,14 @@ function getDisabledCompatibleChildren(child) {
|
|
|
132
131
|
style: spanStyle,
|
|
133
132
|
className: clsx(element.props.className, "".concat($rcPrefixCls, "-tooltip-disabled-compatible-wrapper"))
|
|
134
133
|
}, {
|
|
135
|
-
children:
|
|
134
|
+
children: _child
|
|
136
135
|
}));
|
|
137
136
|
}
|
|
138
137
|
return element;
|
|
139
138
|
}
|
|
140
139
|
//映射placement
|
|
141
140
|
function mapLegacyPlacement(place) {
|
|
142
|
-
|
|
141
|
+
var legacyPlacement = {
|
|
143
142
|
'bottom-end': 'bottomRight',
|
|
144
143
|
'bottom-start': 'bottomLeft',
|
|
145
144
|
'left-end': 'leftBottom',
|
|
@@ -153,8 +152,8 @@ function mapLegacyPlacement(place) {
|
|
|
153
152
|
}
|
|
154
153
|
//浮层偏移量
|
|
155
154
|
function getAlignOffset(place) {
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
var mPlace = mapLegacyPlacement(place);
|
|
156
|
+
var offsetMap = {
|
|
158
157
|
left: {
|
|
159
158
|
offset: [-8, 0]
|
|
160
159
|
},
|
package/Transfer/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ interface TransferProps {
|
|
|
25
25
|
rightIcon?: (item: ItemDataProps) => ReactNode;
|
|
26
26
|
render?: (data: ItemDataProps) => void;
|
|
27
27
|
customKey?: string;
|
|
28
|
+
disabled?: boolean;
|
|
28
29
|
}
|
|
29
30
|
export declare const Transfer: (props: TransferProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
export default Transfer;
|
package/Transfer/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import ExpandLess from '@para-ui/icons/Up';
|
|
|
8
8
|
import Down from '@para-ui/icons/Down';
|
|
9
9
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
|
|
10
10
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
11
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
11
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-61604a6c.js';
|
|
12
12
|
import { Search } from '../Search/index.js';
|
|
13
13
|
import SearchIcon from '@para-ui/icons/Search';
|
|
14
14
|
import AutoTips from '../AutoTips/index.js';
|
|
@@ -257,7 +257,7 @@ var Box = function Box(props) {
|
|
|
257
257
|
};
|
|
258
258
|
var Sortablejs = Sortable;
|
|
259
259
|
|
|
260
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-transfer {\n display: flex;\n font-size: 14px;\n user-select: none;\n}\n.paraui-v4-transfer .blue-background-class {\n background-color: rgb(240, 245, 255);\n}\n.paraui-v4-transfer .drag-item {\n background: rgb(255, 255, 255) !important;\n box-shadow: rgba(212, 218, 227, 0.4);\n}\n.paraui-v4-transfer .box {\n border-radius: 4px;\n border: 1px solid rgb(212, 218, 227);\n overflow: hidden;\n}\n.paraui-v4-transfer .box .box-header {\n background: rgb(247, 248, 250);\n color: rgb(29, 33, 38);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 10px;\n height: 36px;\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-transfer .box .count {\n color: rgb(29, 33, 38);\n letter-spacing: 1px;\n}\n.paraui-v4-transfer .box .context {\n height: 400px;\n overflow: auto;\n margin-top: 4px;\n}\n.paraui-v4-transfer .box .context .item-fluctuation {\n animation: flucturation 0.4s forwards;\n}\n.paraui-v4-transfer .box .context .item-fluctuationOrther {\n animation: flucturationOrther 0.5s forwards;\n}\n.paraui-v4-transfer .box .context .item {\n padding: 0px 10px;\n height: 30px;\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.paraui-v4-transfer .box .context .item.item-checked:hover {\n background-color: rgb(247, 248, 250) !important;\n}\n.paraui-v4-transfer .box .context .item.item-checked > .item-label {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .context .item > .item-label {\n flex: 1;\n overflow: hidden;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-transfer .box .context .item:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-transfer .box .context .item.item-disabled:hover {\n background: inherit;\n cursor: no-drop;\n}\n.paraui-v4-transfer .box .context .item.item-disabled > .item-label {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .context .item .handle {\n margin-left: 8px;\n display: flex;\n align-content: center;\n}\n.paraui-v4-transfer .box .context .item .handle .handle-line {\n height: 12px;\n border-left: 1px solid rgb(212, 218, 227);\n margin: auto 10px auto 0;\n}\n.paraui-v4-transfer .box .context .item .handle svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-transfer .box .context .item .handle:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .context .item-border {\n padding-left: 6px;\n}\n.paraui-v4-transfer .box .text-field-content {\n border: none;\n border-radius: 0;\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-transfer .box .footer {\n display: flex;\n align-items: center;\n border-top: 1px solid rgb(212, 218, 227);\n height: 36px;\n justify-content: space-between;\n padding: 0 10px;\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) button {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) button:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) .btn-off {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) .btn-off:hover {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) > button {\n padding: 0;\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) > button:nth-child(2) {\n margin-left: 16px;\n}\n.paraui-v4-transfer .moveBtn {\n display: flex;\n height: 500px;\n flex-direction: column;\n justify-content: center;\n margin: 0 20px;\n}\n.paraui-v4-transfer .moveBtn > button {\n background-color: rgb(46, 101, 230);\n color: rgb(255, 255, 255);\n}\n.paraui-v4-transfer .moveBtn .btn-left {\n margin-top: 16px;\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}";
|
|
260
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-transfer {\n display: flex;\n font-size: 14px;\n user-select: none;\n}\n.paraui-v4-transfer .blue-background-class {\n background-color: rgb(240, 245, 255);\n}\n.paraui-v4-transfer .drag-item {\n background: rgb(255, 255, 255) !important;\n box-shadow: rgba(212, 218, 227, 0.4);\n}\n.paraui-v4-transfer .box {\n border-radius: 4px;\n border: 1px solid rgb(212, 218, 227);\n overflow: hidden;\n}\n.paraui-v4-transfer .box .box-header {\n background: rgb(247, 248, 250);\n color: rgb(29, 33, 38);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 10px;\n height: 36px;\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-transfer .box .count {\n color: rgb(29, 33, 38);\n letter-spacing: 1px;\n}\n.paraui-v4-transfer .box .context {\n height: 400px;\n overflow: auto;\n margin-top: 4px;\n}\n.paraui-v4-transfer .box .context .item-fluctuation {\n animation: flucturation 0.4s forwards;\n}\n.paraui-v4-transfer .box .context .item-fluctuationOrther {\n animation: flucturationOrther 0.5s forwards;\n}\n.paraui-v4-transfer .box .context .item {\n padding: 0px 10px;\n height: 30px;\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.paraui-v4-transfer .box .context .item.item-checked:hover {\n background-color: rgb(247, 248, 250) !important;\n}\n.paraui-v4-transfer .box .context .item.item-checked > .item-label {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .context .item > .item-label {\n flex: 1;\n overflow: hidden;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-transfer .box .context .item:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-transfer .box .context .item.item-disabled:hover {\n background: inherit;\n cursor: no-drop;\n}\n.paraui-v4-transfer .box .context .item.item-disabled > .item-label {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .context .item .handle {\n margin-left: 8px;\n display: flex;\n align-content: center;\n}\n.paraui-v4-transfer .box .context .item .handle .handle-line {\n height: 12px;\n border-left: 1px solid rgb(212, 218, 227);\n margin: auto 10px auto 0;\n}\n.paraui-v4-transfer .box .context .item .handle svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-transfer .box .context .item .handle:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .context .item-border {\n padding-left: 6px;\n}\n.paraui-v4-transfer .box .text-field-content {\n border: none;\n border-radius: 0;\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-transfer .box .footer {\n display: flex;\n align-items: center;\n border-top: 1px solid rgb(212, 218, 227);\n height: 36px;\n justify-content: space-between;\n padding: 0 10px;\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) button {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) button:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) .btn-off {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) .btn-off:hover {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) > button {\n padding: 0;\n}\n.paraui-v4-transfer .box .footer > div:nth-child(1) > button:nth-child(2) {\n margin-left: 16px;\n}\n.paraui-v4-transfer .moveBtn {\n display: flex;\n height: 500px;\n flex-direction: column;\n justify-content: center;\n margin: 0 20px;\n}\n.paraui-v4-transfer .moveBtn > button {\n background-color: rgb(46, 101, 230);\n color: rgb(255, 255, 255);\n}\n.paraui-v4-transfer .moveBtn .btn-left {\n margin-top: 16px;\n}\n.paraui-v4-transfer .paraui-v4-transfer-container {\n display: flex;\n}\n.paraui-v4-transfer-disabled > .paraui-v4-transfer-container {\n position: relative;\n}\n.paraui-v4-transfer-disabled > .paraui-v4-transfer-container::before {\n content: \"\";\n position: absolute;\n display: block;\n top: -1px;\n left: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n z-index: 1;\n background: rgba(255, 255, 255, 0.3);\n border-radius: 4px;\n backdrop-filter: blur(1px);\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}";
|
|
261
261
|
styleInject(css_248z);
|
|
262
262
|
|
|
263
263
|
const Transfer = props => {
|
|
@@ -282,9 +282,9 @@ const Transfer = props => {
|
|
|
282
282
|
trim = false,
|
|
283
283
|
multiple = true,
|
|
284
284
|
rightIcon,
|
|
285
|
-
render = item => {}
|
|
285
|
+
render = item => {},
|
|
286
|
+
disabled
|
|
286
287
|
} = props;
|
|
287
|
-
const [transData, setTransData] = useState({});
|
|
288
288
|
const [leftData, setLeftData] = useState([]);
|
|
289
289
|
const [rightData, setRightData] = useState([]);
|
|
290
290
|
const [leftCount, setLeftCount] = useState([]);
|
|
@@ -306,12 +306,12 @@ const Transfer = props => {
|
|
|
306
306
|
const queryAll = useCallback((checked, direction) => {
|
|
307
307
|
if (direction === 'left') {
|
|
308
308
|
leftData.forEach(item => {
|
|
309
|
-
if (!item.disabled && !item.hide) item.checked = checked;
|
|
309
|
+
if (!item.disabled && !item.hide && !disabled) item.checked = checked;
|
|
310
310
|
});
|
|
311
311
|
setLeftData([...leftData]);
|
|
312
312
|
} else {
|
|
313
313
|
rightData.forEach(item => {
|
|
314
|
-
if (!item.disabled && !item.hide) item.checked = checked;
|
|
314
|
+
if (!item.disabled && !item.hide && !disabled) item.checked = checked;
|
|
315
315
|
});
|
|
316
316
|
setRightData([...rightData]);
|
|
317
317
|
}
|
|
@@ -319,12 +319,12 @@ const Transfer = props => {
|
|
|
319
319
|
const inverse = useCallback(direction => {
|
|
320
320
|
if (direction === 'left') {
|
|
321
321
|
leftData.forEach(item => {
|
|
322
|
-
if (!item.disabled && !item.hide) item.checked = !item.checked;
|
|
322
|
+
if (!item.disabled && !item.hide && !disabled) item.checked = !item.checked;
|
|
323
323
|
});
|
|
324
324
|
setLeftData([...leftData]);
|
|
325
325
|
} else {
|
|
326
326
|
rightData.forEach(item => {
|
|
327
|
-
if (!item.disabled && !item.hide) item.checked = !item.checked;
|
|
327
|
+
if (!item.disabled && !item.hide && !disabled) item.checked = !item.checked;
|
|
328
328
|
});
|
|
329
329
|
setRightData([...rightData]);
|
|
330
330
|
}
|
|
@@ -439,32 +439,27 @@ const Transfer = props => {
|
|
|
439
439
|
return [...pre];
|
|
440
440
|
});
|
|
441
441
|
}, []);
|
|
442
|
-
useEffect(() => {
|
|
443
|
-
if (data.length) {
|
|
444
|
-
const leftData = {};
|
|
445
|
-
data.forEach(item => {
|
|
446
|
-
const key = item[customKey];
|
|
447
|
-
render(item);
|
|
448
|
-
leftData[key] = item;
|
|
449
|
-
});
|
|
450
|
-
setTransData(Object.assign({}, leftData));
|
|
451
|
-
}
|
|
452
|
-
}, [data]);
|
|
453
442
|
useEffect(() => {
|
|
454
443
|
const rData = [];
|
|
455
444
|
const lData = [];
|
|
445
|
+
const leftData = {};
|
|
446
|
+
data.forEach(item => {
|
|
447
|
+
const key = item[customKey];
|
|
448
|
+
render(item);
|
|
449
|
+
leftData[key] = item;
|
|
450
|
+
});
|
|
456
451
|
value === null || value === void 0 ? void 0 : value.forEach(item => {
|
|
457
|
-
if (
|
|
458
|
-
rData.push(
|
|
459
|
-
delete
|
|
452
|
+
if (leftData[item]) {
|
|
453
|
+
rData.push(leftData[item]);
|
|
454
|
+
delete leftData[item];
|
|
460
455
|
}
|
|
461
456
|
});
|
|
462
|
-
for (const key in
|
|
463
|
-
lData.push(
|
|
457
|
+
for (const key in leftData) {
|
|
458
|
+
lData.push(leftData[key]);
|
|
464
459
|
}
|
|
465
460
|
setRightData([...rData]);
|
|
466
461
|
setLeftData([...lData]);
|
|
467
|
-
}, [value,
|
|
462
|
+
}, [value, data]);
|
|
468
463
|
useEffect(() => {
|
|
469
464
|
const arr = [];
|
|
470
465
|
leftData.forEach((item, index) => {
|
|
@@ -481,103 +476,109 @@ const Transfer = props => {
|
|
|
481
476
|
});
|
|
482
477
|
setRightCount(rArr);
|
|
483
478
|
}, [leftData, rightData]);
|
|
484
|
-
return
|
|
485
|
-
className: clsx("".concat($prefixCls, "-transfer"), className
|
|
479
|
+
return jsx("div", Object.assign({
|
|
480
|
+
className: clsx("".concat($prefixCls, "-transfer"), className, {
|
|
481
|
+
["".concat($prefixCls, "-transfer-disabled")]: disabled
|
|
482
|
+
})
|
|
486
483
|
}, {
|
|
487
|
-
children:
|
|
488
|
-
|
|
489
|
-
queryAll: queryAll,
|
|
490
|
-
data: leftData,
|
|
491
|
-
style: style,
|
|
492
|
-
direction: "left",
|
|
493
|
-
customKey: customKey,
|
|
494
|
-
rightIcon: rightIcon,
|
|
495
|
-
onchange: onchange,
|
|
496
|
-
multiple: multiple,
|
|
497
|
-
onMove: onMove,
|
|
498
|
-
inverse: inverse,
|
|
499
|
-
onSearch: onSearch
|
|
500
|
-
}), jsxs("div", Object.assign({
|
|
501
|
-
className: "moveBtn"
|
|
484
|
+
children: jsxs("div", Object.assign({
|
|
485
|
+
className: "".concat($prefixCls, "-transfer-container")
|
|
502
486
|
}, {
|
|
503
|
-
children: [jsx(
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}, {
|
|
517
|
-
|
|
518
|
-
})), jsx(Button.IconButton, Object.assign({
|
|
519
|
-
className: 'btn btn-left',
|
|
520
|
-
disabled: rightCount.length <= 0 || ((_a = rightData[0]) === null || _a === void 0 ? void 0 : _a.checked) || animationsLock,
|
|
521
|
-
toolTipTitle: rightCount.length <= 0 || ((_b = rightData[0]) === null || _b === void 0 ? void 0 : _b.checked) ? intl({
|
|
522
|
-
id: 'leftBtnTips'
|
|
523
|
-
}) : '',
|
|
524
|
-
TooltipProps: {
|
|
525
|
-
arrow: false,
|
|
526
|
-
placement: 'bottomLeft'
|
|
527
|
-
},
|
|
528
|
-
onClick: () => {
|
|
529
|
-
fluctuation('up');
|
|
530
|
-
}
|
|
531
|
-
}, {
|
|
532
|
-
children: jsx(ExpandLess, {})
|
|
533
|
-
})), jsx(Button.IconButton, Object.assign({
|
|
534
|
-
className: 'btn btn-left',
|
|
535
|
-
disabled: rightCount.length <= 0 || ((_c = rightData[rightData.length - 1]) === null || _c === void 0 ? void 0 : _c.checked) || animationsLock,
|
|
536
|
-
toolTipTitle: rightCount.length <= 0 || ((_d = rightData[rightData.length - 1]) === null || _d === void 0 ? void 0 : _d.checked) ? intl({
|
|
537
|
-
id: 'leftBtnTips'
|
|
538
|
-
}) : '',
|
|
539
|
-
TooltipProps: {
|
|
540
|
-
arrow: false,
|
|
541
|
-
placement: 'bottomLeft'
|
|
542
|
-
},
|
|
543
|
-
onClick: () => {
|
|
544
|
-
fluctuation('down');
|
|
545
|
-
}
|
|
546
|
-
}, {
|
|
547
|
-
children: jsx(Down, {})
|
|
548
|
-
})), jsx(Button.IconButton, Object.assign({
|
|
549
|
-
className: 'btn btn-left',
|
|
550
|
-
disabled: rightCount.length <= 0,
|
|
551
|
-
toolTipTitle: rightCount.length <= 0 ? intl({
|
|
552
|
-
id: 'leftBtnTips'
|
|
553
|
-
}) : '',
|
|
554
|
-
TooltipProps: {
|
|
555
|
-
arrow: false,
|
|
556
|
-
placement: 'bottomLeft'
|
|
557
|
-
},
|
|
558
|
-
onClick: () => {
|
|
559
|
-
onMove('left');
|
|
560
|
-
}
|
|
487
|
+
children: [jsx(Box, {
|
|
488
|
+
title: titles[0],
|
|
489
|
+
queryAll: queryAll,
|
|
490
|
+
data: leftData,
|
|
491
|
+
style: style,
|
|
492
|
+
direction: "left",
|
|
493
|
+
customKey: customKey,
|
|
494
|
+
rightIcon: rightIcon,
|
|
495
|
+
onchange: onchange,
|
|
496
|
+
multiple: multiple,
|
|
497
|
+
onMove: onMove,
|
|
498
|
+
inverse: inverse,
|
|
499
|
+
onSearch: onSearch
|
|
500
|
+
}), jsxs("div", Object.assign({
|
|
501
|
+
className: "moveBtn"
|
|
561
502
|
}, {
|
|
562
|
-
children: jsx(
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
503
|
+
children: [jsx(Button.IconButton, Object.assign({
|
|
504
|
+
className: 'btn btn-right',
|
|
505
|
+
disabled: leftCount.length <= 0 || disabled,
|
|
506
|
+
toolTipTitle: leftCount.length <= 0 ? intl({
|
|
507
|
+
id: 'rightBtnTips'
|
|
508
|
+
}) : '',
|
|
509
|
+
TooltipProps: {
|
|
510
|
+
arrow: false,
|
|
511
|
+
placement: 'bottomLeft'
|
|
512
|
+
},
|
|
513
|
+
onClick: () => {
|
|
514
|
+
onMove('right');
|
|
515
|
+
}
|
|
516
|
+
}, {
|
|
517
|
+
children: jsx(Right, {})
|
|
518
|
+
})), jsx(Button.IconButton, Object.assign({
|
|
519
|
+
className: 'btn btn-left',
|
|
520
|
+
disabled: rightCount.length <= 0 || ((_a = rightData[0]) === null || _a === void 0 ? void 0 : _a.checked) || animationsLock || disabled,
|
|
521
|
+
toolTipTitle: rightCount.length <= 0 || ((_b = rightData[0]) === null || _b === void 0 ? void 0 : _b.checked) ? intl({
|
|
522
|
+
id: 'leftBtnTips'
|
|
523
|
+
}) : '',
|
|
524
|
+
TooltipProps: {
|
|
525
|
+
arrow: false,
|
|
526
|
+
placement: 'bottomLeft'
|
|
527
|
+
},
|
|
528
|
+
onClick: () => {
|
|
529
|
+
fluctuation('up');
|
|
530
|
+
}
|
|
531
|
+
}, {
|
|
532
|
+
children: jsx(ExpandLess, {})
|
|
533
|
+
})), jsx(Button.IconButton, Object.assign({
|
|
534
|
+
className: 'btn btn-left',
|
|
535
|
+
disabled: rightCount.length <= 0 || ((_c = rightData[rightData.length - 1]) === null || _c === void 0 ? void 0 : _c.checked) || animationsLock || disabled,
|
|
536
|
+
toolTipTitle: rightCount.length <= 0 || ((_d = rightData[rightData.length - 1]) === null || _d === void 0 ? void 0 : _d.checked) ? intl({
|
|
537
|
+
id: 'leftBtnTips'
|
|
538
|
+
}) : '',
|
|
539
|
+
TooltipProps: {
|
|
540
|
+
arrow: false,
|
|
541
|
+
placement: 'bottomLeft'
|
|
542
|
+
},
|
|
543
|
+
onClick: () => {
|
|
544
|
+
fluctuation('down');
|
|
545
|
+
}
|
|
546
|
+
}, {
|
|
547
|
+
children: jsx(Down, {})
|
|
548
|
+
})), jsx(Button.IconButton, Object.assign({
|
|
549
|
+
className: 'btn btn-left',
|
|
550
|
+
disabled: rightCount.length <= 0 || disabled,
|
|
551
|
+
toolTipTitle: rightCount.length <= 0 ? intl({
|
|
552
|
+
id: 'leftBtnTips'
|
|
553
|
+
}) : '',
|
|
554
|
+
TooltipProps: {
|
|
555
|
+
arrow: false,
|
|
556
|
+
placement: 'bottomLeft'
|
|
557
|
+
},
|
|
558
|
+
onClick: () => {
|
|
559
|
+
onMove('left');
|
|
560
|
+
}
|
|
561
|
+
}, {
|
|
562
|
+
children: jsx(NavigateBefore, {})
|
|
563
|
+
}))]
|
|
564
|
+
})), jsx(Box, {
|
|
565
|
+
title: titles[1],
|
|
566
|
+
queryAll: queryAll,
|
|
567
|
+
data: rightData,
|
|
568
|
+
style: style,
|
|
569
|
+
direction: "right",
|
|
570
|
+
customKey: customKey,
|
|
571
|
+
rightIcon: rightIcon,
|
|
572
|
+
onchange: onchange,
|
|
573
|
+
multiple: multiple,
|
|
574
|
+
onMove: onMove,
|
|
575
|
+
inverse: inverse,
|
|
576
|
+
fluctuationPosition: fluctuationPosition,
|
|
577
|
+
fluctuationOrther: fluctuationOrther,
|
|
578
|
+
onEndSort: onEndSort,
|
|
579
|
+
onSearch: onSearch
|
|
580
|
+
})]
|
|
581
|
+
}))
|
|
581
582
|
}));
|
|
582
583
|
};
|
|
583
584
|
const SSortablejs = Sortablejs;
|
package/Tree/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as Tree } from '../_verture/index-
|
|
2
|
-
export { T as default } from '../_verture/index-
|
|
3
|
-
import '../_verture/toConsumableArray-
|
|
4
|
-
import '../_verture/slicedToArray-
|
|
1
|
+
import { T as Tree } from '../_verture/index-320d67c4.js';
|
|
2
|
+
export { T as default } from '../_verture/index-320d67c4.js';
|
|
3
|
+
import '../_verture/toConsumableArray-599cd94a.js';
|
|
4
|
+
import '../_verture/slicedToArray-61604a6c.js';
|
|
5
5
|
import '../_verture/defineProperty-6f62bb2a.js';
|
|
6
6
|
import '../_verture/typeof-adeedc13.js';
|
|
7
7
|
import '../_verture/index-8ac46bd9.js';
|