@para-ui/core 4.0.0-rc → 4.0.0-rc.2
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/AutoBox/index.d.ts +1 -1
- package/AutoBox/index.js +12 -12
- package/AutoTips/autoTipsMultiline/index.d.ts +1 -1
- package/AutoTips/index.d.ts +2 -2
- package/AutoTips/index.js +15 -21
- package/Badge/index.d.ts +23 -0
- package/Badge/index.js +54 -0
- package/Breadcrumbs/index.js +8 -8
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +8 -38
- package/Carousel/index.d.ts +6 -6
- package/Carousel/index.js +5 -5
- package/Cascader/Cascader.d.ts +10 -10
- package/Cascader/OptionList/Column.d.ts +3 -3
- package/Cascader/OptionList/index.d.ts +2 -2
- package/Cascader/index.d.ts +1 -1
- package/Cascader/index.js +4 -2
- package/Cascader/lang/en_US.d.ts +5 -0
- package/Cascader/lang/index.d.ts +11 -0
- package/Cascader/lang/zh_CN.d.ts +5 -0
- package/Cascader/utils/treeUtil.d.ts +1 -1
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/index.js +5 -5
- package/CheckboxGroup/index.d.ts +2 -2
- package/CheckboxGroup/index.js +4 -4
- package/Collapse/index.js +5 -5
- package/CollapseBox/index.js +12 -20
- package/CollapseLayout/index.js +21 -21
- package/ColorPicker/index.js +2 -2
- package/ComboSelect/index.js +43 -52
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.d.ts +3 -3
- package/Container/index.js +56 -56
- package/CopyText/index.d.ts +2 -2
- package/CopyText/index.js +3 -3
- package/DatePicker/generatePicker/index.d.ts +22 -22
- package/DatePicker/index.js +10 -9
- package/DatePicker/util.d.ts +1 -1
- package/Descriptions/index.d.ts +38 -0
- package/Descriptions/index.js +23 -0
- package/Desktop/index.d.ts +1 -1
- package/Desktop/index.js +18 -13
- package/DragVerify/index.d.ts +1 -1
- package/DragVerify/index.js +13 -13
- package/Drawer/index.js +40 -38
- package/Drawer/interface.d.ts +4 -6
- package/Dropdown/index.d.ts +1 -1
- package/DynamicMultiBox/formItem.d.ts +1 -1
- package/DynamicMultiBox/index.d.ts +1 -1
- package/DynamicMultiBox/index.js +38 -35
- package/DynamicMultiBox/interface.d.ts +8 -8
- package/DynamicMultiBox/rowForm.d.ts +3 -1
- package/Empty/index.d.ts +1 -1
- package/Empty/index.js +3 -3
- package/Form/index.d.ts +12 -13
- package/Form/index.js +10 -8
- package/FormItem/compoments/defaultCompoments/index.d.ts +4 -4
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +1 -1
- package/FormItem/compoments/formFile/index.d.ts +2 -2
- package/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
- package/FormItem/compoments/formSelect/index.d.ts +7 -7
- package/FormItem/errorTips.d.ts +3 -3
- package/FormItem/index.d.ts +5 -5
- package/FormItem/index.js +3 -2
- package/FormItem/lang/en_US.d.ts +10 -0
- package/FormItem/lang/index.d.ts +21 -0
- package/FormItem/lang/zh_CN.d.ts +10 -0
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/dialog.d.ts +26 -26
- package/FunctionModal/index.d.ts +6 -6
- package/FunctionModal/index.js +9 -10
- package/FunctionModal/modalContext.d.ts +3 -3
- package/GlobalContext/componentsProps.d.ts +7 -7
- package/GlobalContext/confirmLocale.d.ts +1 -2
- package/GlobalContext/index.d.ts +2 -2
- package/GlobalContext/index.js +3 -2
- package/GlobalContext/useFormatMessage.d.ts +1 -1
- package/Help/index.js +2 -2
- package/HelperText/index.js +1 -1
- package/InputLang/index.d.ts +2 -2
- package/InputLang/index.js +8 -8
- package/InputNumber/index.d.ts +4 -2
- package/InputNumber/index.js +27 -15
- package/Label/index.js +2 -2
- package/Loading/index.js +1 -1
- package/Menu/index.js +17 -17
- package/Menu/interface.d.ts +1 -1
- package/Message/index.js +13 -13
- package/Modal/Confirm/index.d.ts +3 -3
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +20 -17
- package/Modal/lang/index.d.ts +8 -0
- package/MultiBox/index.d.ts +2 -2
- package/MultiBox/index.js +4 -4
- package/Notification/index.js +2 -2
- package/OperateBtn/index.d.ts +2 -2
- package/OperateBtn/index.js +49 -49
- package/PageHeader/index.js +45 -34
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +1 -1
- package/Pagination/index.js +19 -19
- package/PasswordRules/index.js +8 -8
- package/PopConfirm/index.js +8 -7
- package/Progress/Line.d.ts +10 -10
- package/Progress/Steps.d.ts +2 -2
- package/Progress/index.d.ts +12 -12
- package/Progress/index.js +43 -42
- package/Progress/utils.d.ts +4 -4
- package/Querying/index.d.ts +1 -1
- package/Querying/index.js +3 -3
- package/README.md +7 -0
- package/Radio/index.d.ts +1 -1
- package/Radio/index.js +5 -5
- package/RadioGroup/index.d.ts +2 -2
- package/RadioGroup/index.js +4 -4
- package/Search/index.js +1 -1
- package/Select/index.d.ts +3 -3
- package/Select/index.js +43 -43
- package/SelectInput/index.js +2 -2
- package/Selector/index.js +26 -34
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +4 -4
- package/SelectorPicker/index.js +10 -10
- package/SingleBox/index.d.ts +2 -2
- package/SingleBox/index.js +4 -4
- package/Slider/index.js +1 -1
- package/Slider/interface.d.ts +1 -1
- package/Status/index.d.ts +4 -4
- package/Status/index.js +6 -7
- package/Stepper/index.d.ts +5 -5
- package/Stepper/index.js +23 -23
- package/Styles/theme.scss +1 -0
- package/Switch/index.d.ts +7 -7
- package/Switch/index.js +38 -21
- package/Switch/lang/en_US.d.ts +4 -0
- package/Switch/lang/index.d.ts +9 -0
- package/Switch/lang/zh_CN.d.ts +4 -0
- package/Table/index.js +35 -35
- package/Table/interface.d.ts +4 -4
- package/Table/tableBodyElement/index.d.ts +1 -1
- package/Table/tableBodyInterface.d.ts +2 -2
- package/Table/tableContainer/index.d.ts +1 -1
- package/Table/tableElement/index.d.ts +1 -1
- package/Table/tableHeadElement/index.d.ts +1 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +6 -6
- package/Table/tdElement/index.d.ts +1 -1
- package/Table/thElement/index.d.ts +2 -2
- package/Table/trElement/index.d.ts +1 -1
- package/Table/util.d.ts +1 -1
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +27 -19
- package/Tag/TagGroup.d.ts +5 -5
- package/Tag/index.d.ts +7 -7
- package/Tag/index.js +25 -25
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +45 -27
- package/TextEditor/lang/en_US.d.ts +4 -0
- package/TextEditor/lang/index.d.ts +9 -0
- package/TextEditor/lang/zh_CN.d.ts +4 -0
- package/TextField/index.d.ts +1 -1
- package/TextField/index.js +19 -16
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +2 -2
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +14 -14
- package/Title/index.d.ts +4 -4
- package/Title/index.js +3 -3
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.d.ts +5 -1
- package/ToggleButton/index.js +18 -11
- package/Transfer/box.d.ts +6 -6
- package/Transfer/index.js +22 -25
- package/Tree/OperateBar/index.d.ts +4 -4
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +2 -2
- package/Tree/interface.d.ts +4 -4
- package/Tree/utils/tools.d.ts +1 -1
- package/Upload/Dragger/index.d.ts +2 -2
- package/Upload/ErroTip/index.d.ts +1 -1
- package/Upload/index.d.ts +2 -2
- package/Upload/index.js +10 -11
- package/Upload/interface.d.ts +1 -1
- package/_verture/{index-8469865e.js → index-024bbc9b.js} +3 -3
- package/_verture/{index-19947788.js → index-05f7bf11.js} +3 -1
- package/_verture/{index-e1b800aa.js → index-50f56891.js} +49 -25
- package/_verture/{index-1c8d3e94.js → index-649b450f.js} +102 -48
- package/_verture/{index-47297a40.js → index-692e29c1.js} +53 -46
- package/_verture/{modalContext-670eab09.js → modalContext-11c51a45.js} +25 -25
- package/index.d.ts +4 -0
- package/index.js +14 -11
- package/locale/en-US.d.ts +19 -0
- package/locale/index.d.ts +38 -0
- package/locale/index.js +40 -2
- package/locale/zh-CN.d.ts +19 -0
- package/package.json +4 -2
- package/umd/AutoBox.js +1 -1
- package/umd/AutoTips.js +1 -1
- package/umd/Badge.js +1 -0
- package/umd/Breadcrumbs.js +1 -1
- package/umd/Button.js +2 -2
- package/umd/ButtonGroup.js +2 -2
- package/umd/Cascader.js +4 -4
- package/umd/Checkbox.js +2 -2
- package/umd/CheckboxGroup.js +2 -2
- package/umd/Collapse.js +5 -5
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +4 -4
- package/umd/CopyText.js +2 -2
- package/umd/DatePicker.js +2 -2
- package/umd/Descriptions.js +1 -0
- package/umd/Desktop.js +2 -2
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +2 -2
- package/umd/DynamicMultiBox.js +4 -4
- package/umd/Empty.js +1 -1
- package/umd/Form.js +4 -4
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +4 -4
- package/umd/GlobalContext.js +1 -1
- package/umd/Help.js +2 -2
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +2 -2
- package/umd/InputNumber.js +4 -4
- package/umd/Label.js +2 -2
- package/umd/Loading.js +1 -1
- package/umd/Menu.js +3 -3
- package/umd/Message.js +2 -2
- package/umd/Modal.js +4 -4
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +2 -2
- package/umd/OperateBtn.js +4 -4
- package/umd/PageHeader.js +4 -4
- package/umd/Pagination.js +2 -2
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +2 -2
- package/umd/Progress.js +3 -3
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +2 -2
- package/umd/RadioGroup.js +2 -2
- package/umd/Search.js +7 -7
- package/umd/Select.js +2 -2
- package/umd/SelectInput.js +2 -2
- package/umd/Selector.js +2 -2
- package/umd/SelectorPicker.js +2 -2
- package/umd/SingleBox.js +2 -2
- package/umd/Slider.js +1 -1
- package/umd/Status.js +2 -2
- package/umd/Stepper.js +1 -1
- package/umd/Switch.js +5 -5
- package/umd/Table.js +6 -6
- package/umd/Tabs.js +6 -6
- package/umd/Tag.js +1 -1
- package/umd/TextEditor.js +3 -3
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +2 -2
- package/umd/Title.js +7 -7
- package/umd/ToggleButton.js +4 -4
- package/umd/Transfer.js +3 -3
- package/umd/Tree.js +2 -2
- package/umd/Upload.js +2 -2
- package/umd/locale.js +1 -1
package/Drawer/index.js
CHANGED
|
@@ -13,10 +13,10 @@ import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
|
13
13
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
14
14
|
import '../_verture/typeof-adeedc13.js';
|
|
15
15
|
import '@para-ui/icons/LoadingF';
|
|
16
|
-
import '@para-ui/icons/Forbid';
|
|
17
16
|
import '../Tooltip/index.js';
|
|
18
17
|
import 'rc-tooltip';
|
|
19
18
|
import 'rc-tooltip/lib/placements';
|
|
19
|
+
import '@para-ui/icons/Forbid';
|
|
20
20
|
import '@para-ui/icons/Down';
|
|
21
21
|
import '../_verture/index-e9007d6a.js';
|
|
22
22
|
import 'rc-dropdown';
|
|
@@ -55,7 +55,7 @@ var closest = function closest(el, selector) {
|
|
|
55
55
|
return el;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\n* @description drawer样式\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-drawer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n pointer-events: none;\n}\n\n.paraui-v4-drawer-inline {\n position: absolute;\n}\n\n.paraui-v4-drawer-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n background: rgba(29, 33, 38, 0.
|
|
58
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\n* @description drawer样式\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-drawer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n pointer-events: none;\n}\n\n.paraui-v4-drawer-inline {\n position: absolute;\n}\n\n.paraui-v4-drawer-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n pointer-events: auto;\n background: rgba(29, 33, 38, 0.4);\n}\n\n.paraui-v4-drawer-content-wrapper {\n position: absolute;\n z-index: 1000;\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-resizing .paraui-v4-drawer-content-wrapper {\n transition: none;\n}\n\n.paraui-v4-drawer-content-wrapper-hidden {\n display: none;\n}\n\n.paraui-v4-drawer-left > .paraui-v4-drawer-content-wrapper {\n top: 0;\n bottom: 0;\n left: 0;\n box-shadow: 6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v4-drawer-right > .paraui-v4-drawer-content-wrapper {\n top: 0;\n right: 0;\n bottom: 0;\n box-shadow: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v4-drawer-top > .paraui-v4-drawer-content-wrapper {\n top: 0;\n right: 0;\n left: 0;\n box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v4-drawer-bottom > .paraui-v4-drawer-content-wrapper {\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v4-drawer-content {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: auto;\n pointer-events: auto;\n background: rgb(255, 255, 255);\n}\n.paraui-v4-drawer-content .drawer-handle {\n position: absolute;\n z-index: 999;\n user-select: none;\n}\n.paraui-v4-drawer-content .drawer-handle .drawer-handle-icon {\n width: 100%;\n height: 100%;\n background: #2e65e6;\n opacity: 0;\n transition: opacity 0.3s;\n}\n.paraui-v4-drawer-content .drawer-handle:hover .drawer-handle-icon {\n opacity: 1;\n}\n.paraui-v4-drawer-content .drawer-content-body {\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-header {\n position: relative;\n display: flex;\n flex: none;\n align-items: center;\n justify-content: space-between;\n height: 50px;\n padding: 0 20px;\n font-size: 16px;\n font-weight: 700;\n color: rgb(29, 33, 38);\n border-bottom: 1px solid rgb(234, 236, 241);\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title-ellipsis {\n overflow: hidden;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra {\n flex-shrink: 0;\n margin-left: 30px;\n text-align: right;\n white-space: nowrap;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra button + button {\n margin-left: 16px;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-content {\n position: relative;\n flex: 1;\n padding: 20px;\n overflow: auto;\n word-wrap: break-word;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-footer {\n display: flex;\n flex: none;\n align-items: center;\n padding: 20px;\n font-size: 16px;\n color: rgb(29, 33, 38);\n border-top: 1px solid rgb(234, 236, 241);\n}\n\n.paraui-v4-drawer-left .drawer-handle,\n.paraui-v4-drawer-right .drawer-handle {\n top: 0;\n width: 6px;\n height: 100%;\n cursor: e-resize;\n}\n\n.paraui-v4-drawer-left .drawer-handle {\n right: 0;\n padding: 0 0 0 4px;\n}\n\n.paraui-v4-drawer-right .drawer-handle {\n left: 0;\n padding: 0 4px 0 0;\n}\n\n.paraui-v4-drawer-top .drawer-handle,\n.paraui-v4-drawer-bottom .drawer-handle {\n left: 0;\n width: 100%;\n height: 6px;\n cursor: n-resize;\n}\n\n.paraui-v4-drawer-top .drawer-handle {\n bottom: 0;\n padding: 4px 0 0;\n}\n\n.paraui-v4-drawer-bottom .drawer-handle {\n top: 0;\n padding: 0 0 4px;\n}\n\n.panel-motion-enter-start,\n.panel-motion-appear-start,\n.panel-motion-leave-start {\n transition: none;\n}\n\n.panel-motion-enter-active,\n.panel-motion-appear-active,\n.panel-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-mask-motion-enter-active,\n.paraui-v4-drawer-mask-motion-appear-active,\n.paraui-v4-drawer-mask-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-mask-motion-enter,\n.paraui-v4-drawer-mask-motion-appear {\n opacity: 0;\n}\n\n.paraui-v4-drawer-mask-motion-enter-active,\n.paraui-v4-drawer-mask-motion-appear-active {\n opacity: 1;\n}\n\n.paraui-v4-drawer-mask-motion-leave {\n opacity: 1;\n}\n\n.paraui-v4-drawer-mask-motion-leave-active {\n opacity: 0;\n}\n\n.paraui-v4-drawer-panel-motion-left-enter-start,\n.paraui-v4-drawer-panel-motion-left-appear-start,\n.paraui-v4-drawer-panel-motion-left-leave-start {\n transition: none;\n}\n\n.paraui-v4-drawer-panel-motion-left-enter-active,\n.paraui-v4-drawer-panel-motion-left-appear-active,\n.paraui-v4-drawer-panel-motion-left-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-panel-motion-left-enter-start,\n.paraui-v4-drawer-panel-motion-left-appear-start {\n transform: translateX(-100%) !important;\n}\n\n.paraui-v4-drawer-panel-motion-left-enter-active,\n.paraui-v4-drawer-panel-motion-left-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v4-drawer-panel-motion-left-leave {\n transform: translateX(0);\n}\n\n.paraui-v4-drawer-panel-motion-left-leave-active {\n transform: translateX(-100%);\n}\n\n.paraui-v4-drawer-panel-motion-right-enter-start,\n.paraui-v4-drawer-panel-motion-right-appear-start,\n.paraui-v4-drawer-panel-motion-right-leave-start {\n transition: none;\n}\n\n.paraui-v4-drawer-panel-motion-right-enter-active,\n.paraui-v4-drawer-panel-motion-right-appear-active,\n.paraui-v4-drawer-panel-motion-right-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-panel-motion-right-enter-start,\n.paraui-v4-drawer-panel-motion-right-appear-start {\n transform: translateX(100%) !important;\n}\n\n.paraui-v4-drawer-panel-motion-right-enter-active,\n.paraui-v4-drawer-panel-motion-right-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v4-drawer-panel-motion-right-leave {\n transform: translateX(0);\n}\n\n.paraui-v4-drawer-panel-motion-right-leave-active {\n transform: translateX(100%);\n}\n\n.paraui-v4-drawer-panel-motion-top-enter-start,\n.paraui-v4-drawer-panel-motion-top-appear-start,\n.paraui-v4-drawer-panel-motion-top-leave-start {\n transition: none;\n}\n\n.paraui-v4-drawer-panel-motion-top-enter-active,\n.paraui-v4-drawer-panel-motion-top-appear-active,\n.paraui-v4-drawer-panel-motion-top-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-panel-motion-top-enter-start,\n.paraui-v4-drawer-panel-motion-top-appear-start {\n transform: translateY(-100%) !important;\n}\n\n.paraui-v4-drawer-panel-motion-top-enter-active,\n.paraui-v4-drawer-panel-motion-top-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v4-drawer-panel-motion-top-leave {\n transform: translateY(0);\n}\n\n.paraui-v4-drawer-panel-motion-top-leave-active {\n transform: translateY(-100%);\n}\n\n.paraui-v4-drawer-panel-motion-bottom-enter-start,\n.paraui-v4-drawer-panel-motion-bottom-appear-start,\n.paraui-v4-drawer-panel-motion-bottom-leave-start {\n transition: none;\n}\n\n.paraui-v4-drawer-panel-motion-bottom-enter-active,\n.paraui-v4-drawer-panel-motion-bottom-appear-active,\n.paraui-v4-drawer-panel-motion-bottom-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-panel-motion-bottom-enter-start,\n.paraui-v4-drawer-panel-motion-bottom-appear-start {\n transform: translateY(100%) !important;\n}\n\n.paraui-v4-drawer-panel-motion-bottom-enter-active,\n.paraui-v4-drawer-panel-motion-bottom-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v4-drawer-panel-motion-bottom-leave {\n transform: translateY(0);\n}\n\n.paraui-v4-drawer-panel-motion-bottom-leave-active {\n transform: translateY(100%);\n}";
|
|
59
59
|
styleInject(css_248z);
|
|
60
60
|
|
|
61
61
|
//drawer 抽屉
|
|
@@ -63,8 +63,6 @@ var Drawer = function Drawer(props) {
|
|
|
63
63
|
var _a;
|
|
64
64
|
var className = props.className,
|
|
65
65
|
resizable = props.resizable,
|
|
66
|
-
_props$resizeMinimum = props.resizeMinimum,
|
|
67
|
-
resizeMinimum = _props$resizeMinimum === void 0 ? 400 : _props$resizeMinimum,
|
|
68
66
|
onClose = props.onClose,
|
|
69
67
|
_props$destroyOnClose = props.destroyOnClose,
|
|
70
68
|
destroyOnClose = _props$destroyOnClose === void 0 ? false : _props$destroyOnClose,
|
|
@@ -86,7 +84,7 @@ var Drawer = function Drawer(props) {
|
|
|
86
84
|
push = _props$push === void 0 ? {
|
|
87
85
|
distance: 100
|
|
88
86
|
} : _props$push,
|
|
89
|
-
restProps = __rest(props, ["className", "resizable", "
|
|
87
|
+
restProps = __rest(props, ["className", "resizable", "onClose", "destroyOnClose", "style", "title", "extra", "showExtra", "footer", "children", "size", "onOk", "onCancel", "afterVisibleChange", "okButtonProps", "cancelButtonProps", "push"]);
|
|
90
88
|
var intl = useFormatMessage('Drawer', localeJson);
|
|
91
89
|
var _useState = useState(0),
|
|
92
90
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -103,7 +101,9 @@ var Drawer = function Drawer(props) {
|
|
|
103
101
|
var timerRef = useRef();
|
|
104
102
|
var isHorizontal = ['left', 'right'].includes((_a = props.placement) !== null && _a !== void 0 ? _a : 'right');
|
|
105
103
|
var startRef = useRef(0);
|
|
106
|
-
var
|
|
104
|
+
var rootEleSize = useRef(0);
|
|
105
|
+
var initialContentEleSize = useRef();
|
|
106
|
+
var contentEleSize = useRef(0);
|
|
107
107
|
useEffect(function () {
|
|
108
108
|
return function () {
|
|
109
109
|
// 销毁时销毁timer
|
|
@@ -112,10 +112,14 @@ var Drawer = function Drawer(props) {
|
|
|
112
112
|
timerRef.current = null;
|
|
113
113
|
window.removeEventListener('mouseup', onHandlerMouseUp);
|
|
114
114
|
window.removeEventListener('mousemove', onHandlerMouseMove);
|
|
115
|
+
initialContentEleSize.current = undefined;
|
|
115
116
|
};
|
|
116
117
|
}, []);
|
|
117
118
|
useEffect(function () {
|
|
118
119
|
setOffsetStyle(getOffsetStyle);
|
|
120
|
+
if (!props.open) {
|
|
121
|
+
initialContentEleSize.current = undefined;
|
|
122
|
+
}
|
|
119
123
|
}, [props.open, props.placement, props.width, props.height, size]);
|
|
120
124
|
//设置drawer width、height
|
|
121
125
|
var getOffsetStyle = function getOffsetStyle() {
|
|
@@ -123,28 +127,20 @@ var Drawer = function Drawer(props) {
|
|
|
123
127
|
return {};
|
|
124
128
|
}
|
|
125
129
|
var sizeMap = {
|
|
126
|
-
large:
|
|
127
|
-
medium:
|
|
128
|
-
small:
|
|
130
|
+
large: '1000px',
|
|
131
|
+
medium: '630px',
|
|
132
|
+
small: '400px'
|
|
129
133
|
};
|
|
130
134
|
var offsetStyle = {};
|
|
131
135
|
if (props.placement === 'left' || props.placement === 'right') {
|
|
132
136
|
var defaultWidth = sizeMap[size];
|
|
133
137
|
if (size !== 'auto') {
|
|
134
|
-
|
|
135
|
-
offsetStyle.width = typeof props.width === 'string' ? parseInt(props.width) : props.width;
|
|
136
|
-
} else {
|
|
137
|
-
offsetStyle.width = defaultWidth;
|
|
138
|
-
}
|
|
138
|
+
offsetStyle.width = props.width === undefined ? defaultWidth : props.width;
|
|
139
139
|
}
|
|
140
140
|
} else {
|
|
141
141
|
var defaultHeight = size === 'large' ? 736 : 378;
|
|
142
142
|
if (size !== 'auto') {
|
|
143
|
-
|
|
144
|
-
offsetStyle.height = typeof props.height === 'string' ? parseInt(props.height) : props.height;
|
|
145
|
-
} else {
|
|
146
|
-
offsetStyle.height = defaultHeight;
|
|
147
|
-
}
|
|
143
|
+
offsetStyle.height = props.height === undefined ? defaultHeight : props.height;
|
|
148
144
|
}
|
|
149
145
|
}
|
|
150
146
|
return offsetStyle;
|
|
@@ -162,10 +158,15 @@ var Drawer = function Drawer(props) {
|
|
|
162
158
|
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
163
159
|
};
|
|
164
160
|
var onHandlerMouseDown = function onHandlerMouseDown(e) {
|
|
165
|
-
var _a;
|
|
161
|
+
var _a, _b, _c;
|
|
166
162
|
setIsResizing(true);
|
|
167
|
-
drawerRootEle.current = (_a = closest(e.target, ".".concat($prefixCls, "-drawer-open"))) !== null && _a !== void 0 ? _a : document.body;
|
|
168
163
|
startRef.current = isHorizontal ? e.clientX : e.clientY;
|
|
164
|
+
var rootEle = (_a = closest(e.target, ".".concat($prefixCls, "-drawer-open"))) !== null && _a !== void 0 ? _a : document.body;
|
|
165
|
+
var contentCls = ".".concat($prefixCls, "-drawer-content-wrapper");
|
|
166
|
+
var contentEle = (_b = closest(e.target, contentCls)) !== null && _b !== void 0 ? _b : rootEle.querySelector(contentCls);
|
|
167
|
+
rootEleSize.current = isHorizontal ? rootEle.offsetWidth : rootEle.offsetHeight;
|
|
168
|
+
contentEleSize.current = isHorizontal ? contentEle.offsetWidth : contentEle.offsetHeight;
|
|
169
|
+
initialContentEleSize.current = (_c = initialContentEleSize.current) !== null && _c !== void 0 ? _c : contentEleSize.current;
|
|
169
170
|
document.addEventListener('mousemove', onHandlerMouseMove);
|
|
170
171
|
document.addEventListener('mouseup', onHandlerMouseUp);
|
|
171
172
|
};
|
|
@@ -175,12 +176,13 @@ var Drawer = function Drawer(props) {
|
|
|
175
176
|
document.removeEventListener('mouseup', onHandlerMouseUp);
|
|
176
177
|
};
|
|
177
178
|
var onHandlerMouseMove = function onHandlerMouseMove(e) {
|
|
178
|
-
var
|
|
179
|
+
var _a;
|
|
180
|
+
var resizeMinimum = (_a = initialContentEleSize.current) !== null && _a !== void 0 ? _a : 400;
|
|
179
181
|
switch (props.placement) {
|
|
180
182
|
case 'left':
|
|
181
183
|
{
|
|
182
|
-
var newWidth =
|
|
183
|
-
if (newWidth + 100 >=
|
|
184
|
+
var newWidth = contentEleSize.current + (e.clientX - startRef.current);
|
|
185
|
+
if (newWidth + 100 >= rootEleSize.current || newWidth < resizeMinimum) return;
|
|
184
186
|
setOffsetStyle({
|
|
185
187
|
width: newWidth
|
|
186
188
|
});
|
|
@@ -188,8 +190,8 @@ var Drawer = function Drawer(props) {
|
|
|
188
190
|
}
|
|
189
191
|
case 'right':
|
|
190
192
|
{
|
|
191
|
-
var _newWidth =
|
|
192
|
-
if (_newWidth + 100 >=
|
|
193
|
+
var _newWidth = contentEleSize.current - (e.clientX - startRef.current);
|
|
194
|
+
if (_newWidth + 100 >= rootEleSize.current || _newWidth < resizeMinimum) return;
|
|
193
195
|
setOffsetStyle({
|
|
194
196
|
width: _newWidth
|
|
195
197
|
});
|
|
@@ -197,8 +199,8 @@ var Drawer = function Drawer(props) {
|
|
|
197
199
|
}
|
|
198
200
|
case 'top':
|
|
199
201
|
{
|
|
200
|
-
var newHeight =
|
|
201
|
-
if (newHeight + 100 >=
|
|
202
|
+
var newHeight = contentEleSize.current + (e.clientY - startRef.current);
|
|
203
|
+
if (newHeight + 100 >= rootEleSize.current || newHeight < resizeMinimum) return;
|
|
202
204
|
setOffsetStyle({
|
|
203
205
|
height: newHeight
|
|
204
206
|
});
|
|
@@ -206,8 +208,8 @@ var Drawer = function Drawer(props) {
|
|
|
206
208
|
}
|
|
207
209
|
case 'bottom':
|
|
208
210
|
{
|
|
209
|
-
var _newHeight =
|
|
210
|
-
if (_newHeight + 100 >=
|
|
211
|
+
var _newHeight = contentEleSize.current - (e.clientY - startRef.current);
|
|
212
|
+
if (_newHeight + 100 >= rootEleSize.current || _newHeight < resizeMinimum) return;
|
|
211
213
|
setOffsetStyle({
|
|
212
214
|
height: _newHeight
|
|
213
215
|
});
|
|
@@ -243,16 +245,16 @@ var Drawer = function Drawer(props) {
|
|
|
243
245
|
}, {
|
|
244
246
|
children: extra || jsxs(Fragment, {
|
|
245
247
|
children: [jsx(Button, Object.assign({
|
|
246
|
-
variant:
|
|
247
|
-
size:
|
|
248
|
+
variant: "outlined",
|
|
249
|
+
size: "medium",
|
|
248
250
|
onClick: handleCancel
|
|
249
251
|
}, cancelButtonProps, {
|
|
250
252
|
children: (cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.children) || intl({
|
|
251
253
|
id: 'cancel'
|
|
252
254
|
})
|
|
253
255
|
})), jsx(Button, Object.assign({
|
|
254
|
-
variant:
|
|
255
|
-
size:
|
|
256
|
+
variant: "contained",
|
|
257
|
+
size: "medium",
|
|
256
258
|
onClick: handleOk
|
|
257
259
|
}, okButtonProps, {
|
|
258
260
|
children: (okButtonProps === null || okButtonProps === void 0 ? void 0 : okButtonProps.children) || intl({
|
|
@@ -285,7 +287,7 @@ var Drawer = function Drawer(props) {
|
|
|
285
287
|
return null;
|
|
286
288
|
}
|
|
287
289
|
var maskMotion = {
|
|
288
|
-
motionName: $prefixCls
|
|
290
|
+
motionName: "".concat($prefixCls, "-drawer-mask-motion"),
|
|
289
291
|
motionAppear: true,
|
|
290
292
|
motionEnter: true,
|
|
291
293
|
motionLeave: true,
|
|
@@ -293,7 +295,7 @@ var Drawer = function Drawer(props) {
|
|
|
293
295
|
};
|
|
294
296
|
var panelMotion = function panelMotion(motionPlacement) {
|
|
295
297
|
return {
|
|
296
|
-
motionName: $prefixCls
|
|
298
|
+
motionName: "".concat($prefixCls, "-drawer-panel-motion-").concat(motionPlacement),
|
|
297
299
|
motionAppear: true,
|
|
298
300
|
motionEnter: true,
|
|
299
301
|
motionLeave: true,
|
|
@@ -321,11 +323,11 @@ var Drawer = function Drawer(props) {
|
|
|
321
323
|
}
|
|
322
324
|
}, {
|
|
323
325
|
children: [resizable && jsx("div", Object.assign({
|
|
324
|
-
className:
|
|
326
|
+
className: "drawer-handle",
|
|
325
327
|
onMouseDown: onHandlerMouseDown
|
|
326
328
|
}, {
|
|
327
329
|
children: jsx("div", {
|
|
328
|
-
className:
|
|
330
|
+
className: "drawer-handle-icon"
|
|
329
331
|
})
|
|
330
332
|
})), renderContent()]
|
|
331
333
|
}));
|
package/Drawer/interface.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ButtonProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
3
|
/**
|
|
4
4
|
* @author Hanz
|
|
5
5
|
* @date 2021/11/8 下午3:07
|
|
@@ -7,7 +7,7 @@ import { ButtonProps } from "../Button";
|
|
|
7
7
|
*/
|
|
8
8
|
type GetContainer = string | HTMLElement | (() => HTMLElement) | false;
|
|
9
9
|
type ILevelMove = number | [number, number];
|
|
10
|
-
type IPlacement = 'left' | 'top' | 'right' | 'bottom';
|
|
10
|
+
export type IPlacement = 'left' | 'top' | 'right' | 'bottom';
|
|
11
11
|
export interface IOffsetStyle {
|
|
12
12
|
width?: string | number;
|
|
13
13
|
height?: string | number;
|
|
@@ -19,10 +19,8 @@ export interface DrawerProps {
|
|
|
19
19
|
width?: string | number;
|
|
20
20
|
/** 高度 */
|
|
21
21
|
height?: string | number;
|
|
22
|
-
/**
|
|
22
|
+
/** 可拖拽边线调整大小。请注意拖拽只可以增大抽屉尺寸,不可以减小!因为减小尺寸会失去设计时给出尺寸的意义 */
|
|
23
23
|
resizable?: boolean;
|
|
24
|
-
/** 拖拽最小尺寸,抽屉方向为纵向时表示最小高度,横向时表示最小宽度,默认400 */
|
|
25
|
-
resizeMinimum?: number;
|
|
26
24
|
/** 打开 */
|
|
27
25
|
open?: boolean;
|
|
28
26
|
/** 默认打开 */
|
package/Dropdown/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FC } from 'react';
|
|
7
7
|
import './index.scss';
|
|
8
|
-
export type Placement =
|
|
8
|
+
export type Placement = 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
|
|
9
9
|
export interface DropdownProps {
|
|
10
10
|
/** 触发下拉的行为 */
|
|
11
11
|
trigger?: ('click' | 'hover' | 'contextMenu')[];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @date 2022/11/7 10:32 AM
|
|
4
4
|
* @description 多值框组件
|
|
5
5
|
*/
|
|
6
|
-
import { FunctionComponent } from
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
7
|
import { IMultiValueProps } from './interface';
|
|
8
8
|
import './index.scss';
|
|
9
9
|
declare const DynamicMultiBox: FunctionComponent<IMultiValueProps>;
|
package/DynamicMultiBox/index.js
CHANGED
|
@@ -73,7 +73,7 @@ import 'rc-pagination';
|
|
|
73
73
|
import '@para-ui/icons/Right';
|
|
74
74
|
import '@para-ui/icons/DoubleLeft';
|
|
75
75
|
import '@para-ui/icons/DoubleRight';
|
|
76
|
-
import '../_verture/index-
|
|
76
|
+
import '../_verture/index-692e29c1.js';
|
|
77
77
|
import 'rc-tree';
|
|
78
78
|
import '@para-ui/icons/Document';
|
|
79
79
|
import 'react-dom';
|
|
@@ -81,6 +81,7 @@ import '@para-ui/icons/EditFile';
|
|
|
81
81
|
import '@para-ui/icons/PlusCircle';
|
|
82
82
|
import '@para-ui/icons/MoreCircle';
|
|
83
83
|
import '../_verture/utils-06d86594.js';
|
|
84
|
+
import '../Search/index.js';
|
|
84
85
|
import 'rc-picker/es/generate/dayjs';
|
|
85
86
|
import '../Tag/index.js';
|
|
86
87
|
import '@para-ui/icons/EditOutline';
|
|
@@ -180,7 +181,7 @@ var FormItem = function FormItem(props) {
|
|
|
180
181
|
var getTextField = function getTextField() {
|
|
181
182
|
return jsx(TextField, Object.assign({}, rest, {
|
|
182
183
|
required: false,
|
|
183
|
-
label:
|
|
184
|
+
label: "",
|
|
184
185
|
disabled: disabled,
|
|
185
186
|
onChange: function onChange(e) {
|
|
186
187
|
return inputChange(e.target.value);
|
|
@@ -196,7 +197,7 @@ var FormItem = function FormItem(props) {
|
|
|
196
197
|
return jsx(Select, Object.assign({}, rest, {
|
|
197
198
|
list: selectList,
|
|
198
199
|
required: false,
|
|
199
|
-
label:
|
|
200
|
+
label: "",
|
|
200
201
|
disabled: disabled,
|
|
201
202
|
onChange: function onChange(value) {
|
|
202
203
|
return inputChange(value);
|
|
@@ -242,7 +243,7 @@ var FormItem = function FormItem(props) {
|
|
|
242
243
|
var getInputNumber = function getInputNumber() {
|
|
243
244
|
return jsx(InputNumber, Object.assign({}, rest, {
|
|
244
245
|
required: false,
|
|
245
|
-
label:
|
|
246
|
+
label: "",
|
|
246
247
|
disabled: disabled,
|
|
247
248
|
onChange: function onChange(value) {
|
|
248
249
|
return inputChange(value);
|
|
@@ -256,7 +257,7 @@ var FormItem = function FormItem(props) {
|
|
|
256
257
|
var getInputLang = function getInputLang() {
|
|
257
258
|
return jsx(InputLang, Object.assign({}, rest, {
|
|
258
259
|
required: false,
|
|
259
|
-
label:
|
|
260
|
+
label: "",
|
|
260
261
|
onChange: function onChange(value) {
|
|
261
262
|
return inputChange(value);
|
|
262
263
|
}
|
|
@@ -269,7 +270,7 @@ var FormItem = function FormItem(props) {
|
|
|
269
270
|
var getDatePicker = function getDatePicker() {
|
|
270
271
|
return jsx(DatePicker, Object.assign({}, rest, {
|
|
271
272
|
required: false,
|
|
272
|
-
label:
|
|
273
|
+
label: "",
|
|
273
274
|
disabled: disabled,
|
|
274
275
|
onChange: onDatePickerChange,
|
|
275
276
|
getPopupContainer: function getPopupContainer() {
|
|
@@ -284,7 +285,7 @@ var FormItem = function FormItem(props) {
|
|
|
284
285
|
var getComboSelect = function getComboSelect() {
|
|
285
286
|
return jsx(ComboSelect, Object.assign({}, rest, {
|
|
286
287
|
required: false,
|
|
287
|
-
label:
|
|
288
|
+
label: "",
|
|
288
289
|
disabled: disabled,
|
|
289
290
|
onChange: function onChange(options) {
|
|
290
291
|
return inputChange(options);
|
|
@@ -306,7 +307,9 @@ var FormItem = function FormItem(props) {
|
|
|
306
307
|
};
|
|
307
308
|
|
|
308
309
|
var RowForm = function RowForm(props) {
|
|
309
|
-
var _props$
|
|
310
|
+
var _props$rowKey = props.rowKey,
|
|
311
|
+
rowKey = _props$rowKey === void 0 ? 'id' : _props$rowKey,
|
|
312
|
+
_props$valueList = props.valueList,
|
|
310
313
|
valueList = _props$valueList === void 0 ? [] : _props$valueList,
|
|
311
314
|
rowError = props.rowError,
|
|
312
315
|
_props$errors = props.errors,
|
|
@@ -339,13 +342,13 @@ var RowForm = function RowForm(props) {
|
|
|
339
342
|
othersData = __rest(data, ["style"]);
|
|
340
343
|
var formItemProps = (data === null || data === void 0 ? void 0 : data.inputType) !== 'Switch' ? Object.assign({
|
|
341
344
|
rowIndex: rowIndex,
|
|
342
|
-
id: rowValue
|
|
345
|
+
id: rowValue[rowKey],
|
|
343
346
|
value: rowValue === null || rowValue === void 0 ? void 0 : rowValue[data.name || ''],
|
|
344
347
|
error: !!(rowError === null || rowError === void 0 ? void 0 : rowError[data.name || '']),
|
|
345
348
|
helperText: rowError === null || rowError === void 0 ? void 0 : rowError[data.name || '']
|
|
346
349
|
}, othersData) : Object.assign({
|
|
347
350
|
rowIndex: rowIndex,
|
|
348
|
-
id: rowValue
|
|
351
|
+
id: rowValue[rowKey],
|
|
349
352
|
checked: rowValue === null || rowValue === void 0 ? void 0 : rowValue[data.name || '']
|
|
350
353
|
}, othersData);
|
|
351
354
|
return jsxs("div", Object.assign({
|
|
@@ -926,11 +929,13 @@ var localeJson = {
|
|
|
926
929
|
en: en
|
|
927
930
|
};
|
|
928
931
|
|
|
929
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-dynamic-multi-box {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box svg {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content {\n width: 100%;\n position: relative;\n overflow-x: auto;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row {\n display: flex;\n flex: 1;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .title-config-row-item {\n display: flex;\n align-items: center;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .row-form-switch {\n flex: 0;\n min-width: 80px;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 {\n width: 32px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box {\n height: 24px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover {\n background: rgb(247, 248, 250);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover svg {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .hidden-icon {\n display: none;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .center-line {\n width: 1px;\n height: 12px;\n background-color: rgb(212, 218, 227);\n margin: 0 3px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-80 {\n width: 72px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form {\n width: 100%;\n display: flex;\n align-items: flex-start;\n min-height: 42px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .paraui-v4-select {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item {\n display: flex;\n align-items: flex-start;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item-icon {\n margin-left: 10px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .row-form-switch {\n flex: 0;\n box-sizing: content-box;\n align-items: center;\n height: 32px;\n min-width: 80px;\n}\n.paraui-v4-dynamic-multi-box .add-button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 32px;\n background: rgb(247, 248, 250);\n border: 1px dashed rgb(212, 218, 227);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .add-button .text {\n font-size: 14px;\n margin-left:
|
|
932
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-dynamic-multi-box {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box svg {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content {\n width: 100%;\n position: relative;\n overflow-x: auto;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row {\n display: flex;\n flex: 1;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .title-config-row-item {\n display: flex;\n align-items: center;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .row-form-switch {\n flex: 0;\n min-width: 80px;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 {\n width: 32px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n margin-right: 1px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box {\n height: 24px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover {\n background: rgb(247, 248, 250);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover svg {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .hidden-icon {\n display: none;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .center-line {\n width: 1px;\n height: 12px;\n background-color: rgb(212, 218, 227);\n margin: 0 3px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-80 {\n width: 72px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form {\n width: 100%;\n display: flex;\n align-items: flex-start;\n min-height: 42px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .paraui-v4-select {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item {\n display: flex;\n align-items: flex-start;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item-icon {\n margin-left: 10px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .row-form-switch {\n flex: 0;\n box-sizing: content-box;\n align-items: center;\n height: 32px;\n min-width: 80px;\n}\n.paraui-v4-dynamic-multi-box .add-button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 32px;\n background: rgb(247, 248, 250);\n border: 1px dashed rgb(212, 218, 227);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .add-button .text {\n font-size: 14px;\n margin-left: 4px;\n}\n.paraui-v4-dynamic-multi-box .add-button.add-button-scroll {\n margin-top: 14px;\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button {\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button .text {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button:hover {\n background: rgb(240, 245, 255);\n border: 1px dashed rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add {\n cursor: not-allowed;\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add .text {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-dynamic-multi-box .paraui-v4-comboselect,\n.paraui-v4-dynamic-multi-box .paraui-v4-picker-wrapper {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch .switch-text {\n color: rgb(161, 168, 179);\n margin-right: 4px;\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch .switch {\n flex: 1;\n}\n\n.paraui-v4-dynamic-multi-box-popover .filter-config {\n width: 140px;\n padding-top: 4px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .title {\n font-size: 12px;\n color: rgb(161, 168, 179);\n line-height: 30px;\n padding: 0 10px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .paraui-v4-checkbox-group {\n max-height: 320px;\n overflow-y: auto;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .paraui-v4-checkbox-group.paraui-v4-checkbox-group-column .checkbox-group-content > span {\n padding: 0 10px;\n margin-bottom: 0;\n line-height: 30px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .restore-default {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 36px;\n color: rgb(46, 101, 230);\n cursor: pointer;\n border-top: 1px solid rgb(247, 248, 250);\n}\n.paraui-v4-dynamic-multi-box-popover .no-other-property {\n width: 200px;\n padding: 16px 0;\n text-align: center;\n font-size: 12px;\n color: rgb(161, 168, 179);\n}";
|
|
930
933
|
styleInject(css_248z);
|
|
931
934
|
|
|
932
935
|
var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
933
|
-
var
|
|
936
|
+
var _props$rowKey = props.rowKey,
|
|
937
|
+
rowKey = _props$rowKey === void 0 ? 'id' : _props$rowKey,
|
|
938
|
+
valueList = props.valueList,
|
|
934
939
|
_props$config = props.config,
|
|
935
940
|
config = _props$config === void 0 ? [] : _props$config,
|
|
936
941
|
_props$errors = props.errors,
|
|
@@ -1140,8 +1145,8 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1140
1145
|
});
|
|
1141
1146
|
};
|
|
1142
1147
|
var popoverHandClass = function popoverHandClass() {
|
|
1143
|
-
var str = $prefixCls
|
|
1144
|
-
if (popoverClassName) str +=
|
|
1148
|
+
var str = "".concat($prefixCls, "-dynamic-multi-box-popover");
|
|
1149
|
+
if (popoverClassName) str += " ".concat(popoverClassName);
|
|
1145
1150
|
return str;
|
|
1146
1151
|
};
|
|
1147
1152
|
/**
|
|
@@ -1161,20 +1166,21 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1161
1166
|
required = item.required,
|
|
1162
1167
|
className = item.className,
|
|
1163
1168
|
inputType = item.inputType,
|
|
1164
|
-
style = item.style
|
|
1169
|
+
style = item.style,
|
|
1170
|
+
labelProps = item.labelProps;
|
|
1165
1171
|
var str = 'title-config-row-item';
|
|
1166
1172
|
if (inputType === 'Switch') str += ' row-form-switch';
|
|
1167
|
-
if (className) str +=
|
|
1173
|
+
if (className) str += " ".concat(className);
|
|
1168
1174
|
var styleCom = Object.assign({}, style);
|
|
1169
1175
|
if (!(style === null || style === void 0 ? void 0 : style.width) && !(style === null || style === void 0 ? void 0 : style.flex)) styleCom.flex = 1;
|
|
1170
1176
|
return jsx("div", Object.assign({
|
|
1171
1177
|
className: str,
|
|
1172
1178
|
style: styleCom
|
|
1173
1179
|
}, {
|
|
1174
|
-
children: jsx(Label, {
|
|
1180
|
+
children: jsx(Label, Object.assign({
|
|
1175
1181
|
required: required,
|
|
1176
1182
|
label: label
|
|
1177
|
-
})
|
|
1183
|
+
}, labelProps))
|
|
1178
1184
|
}), index);
|
|
1179
1185
|
})
|
|
1180
1186
|
})) : titleMode === 'single' ? jsx(Label, {
|
|
@@ -1206,7 +1212,7 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1206
1212
|
}))]
|
|
1207
1213
|
}))]
|
|
1208
1214
|
}));
|
|
1209
|
-
}, [titleMode, fixedConfig, selectedConfig, isSort, isFilter, checked, onCheckChange, onRestoreDefault]);
|
|
1215
|
+
}, [titleMode, fixedConfig, selectedConfig, isSort, isFilter, checked, onCheckChange, onRestoreDefault, rowKey]);
|
|
1210
1216
|
/**
|
|
1211
1217
|
* 判断是否全部隐藏删除
|
|
1212
1218
|
* 默认全部隐藏
|
|
@@ -1218,7 +1224,7 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1218
1224
|
return false;
|
|
1219
1225
|
}
|
|
1220
1226
|
for (var i = 0, l = valueList === null || valueList === void 0 ? void 0 : valueList.length; i < l; i++) {
|
|
1221
|
-
var id = (_a = valueList[i]) === null || _a === void 0 ? void 0 : _a
|
|
1227
|
+
var id = (_a = valueList[i]) === null || _a === void 0 ? void 0 : _a[rowKey];
|
|
1222
1228
|
if (id && deleteDisable.indexOf(id) === -1) {
|
|
1223
1229
|
bol = false;
|
|
1224
1230
|
break;
|
|
@@ -1237,9 +1243,9 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1237
1243
|
return jsx(Fragment, {
|
|
1238
1244
|
children: valueList.map(function (item, rowIndex) {
|
|
1239
1245
|
var _a;
|
|
1240
|
-
var id = item
|
|
1246
|
+
var id = item[rowKey];
|
|
1241
1247
|
var rowError = (_a = errors === null || errors === void 0 ? void 0 : errors.filter(function (item) {
|
|
1242
|
-
return item
|
|
1248
|
+
return item[rowKey] === id;
|
|
1243
1249
|
})) === null || _a === void 0 ? void 0 : _a[0];
|
|
1244
1250
|
return jsxs("div", Object.assign({
|
|
1245
1251
|
className: 'content-row-form'
|
|
@@ -1280,7 +1286,7 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1280
1286
|
})
|
|
1281
1287
|
});
|
|
1282
1288
|
}
|
|
1283
|
-
}, [valueList, isSort, isFilter, errors, fixedConfig, selectedConfig, keepLastItem, deleteRender]);
|
|
1289
|
+
}, [valueList, isSort, isFilter, errors, fixedConfig, selectedConfig, keepLastItem, deleteRender, rowKey]);
|
|
1284
1290
|
/**
|
|
1285
1291
|
* @desc 删除事件
|
|
1286
1292
|
* */
|
|
@@ -1321,12 +1327,8 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1321
1327
|
var id = UUID();
|
|
1322
1328
|
// 取出已经筛选的配置数据
|
|
1323
1329
|
var configArr = [].concat(_toConsumableArray(fixedConfig), _toConsumableArray(selectedConfig));
|
|
1324
|
-
valueArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'value')), {
|
|
1325
|
-
|
|
1326
|
-
}));
|
|
1327
|
-
errorArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'error')), {
|
|
1328
|
-
id: id
|
|
1329
|
-
}));
|
|
1330
|
+
valueArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'value')), _defineProperty({}, rowKey, id)));
|
|
1331
|
+
errorArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'error')), _defineProperty({}, rowKey, id)));
|
|
1330
1332
|
onAdd && onAdd(valueArr, errorArr);
|
|
1331
1333
|
};
|
|
1332
1334
|
/**
|
|
@@ -1346,12 +1348,12 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1346
1348
|
var onDragSort = function onDragSort(newValueList) {
|
|
1347
1349
|
// 获取排序后 id映射下标集合
|
|
1348
1350
|
var idMapIndex = newValueList.reduce(function (acc, cur, index) {
|
|
1349
|
-
return Object.assign(Object.assign({}, acc), _defineProperty({}, cur
|
|
1351
|
+
return Object.assign(Object.assign({}, acc), _defineProperty({}, cur[rowKey], index));
|
|
1350
1352
|
}, {});
|
|
1351
1353
|
// 需要交换的下标集合
|
|
1352
1354
|
var swapIds = [];
|
|
1353
1355
|
valueList.forEach(function (item, idx) {
|
|
1354
|
-
if (idx !== idMapIndex[item
|
|
1356
|
+
if (idx !== idMapIndex[item[rowKey]]) swapIds.push(idx);
|
|
1355
1357
|
});
|
|
1356
1358
|
onSort && onSort(newValueList, swapIds);
|
|
1357
1359
|
};
|
|
@@ -1369,8 +1371,8 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1369
1371
|
* @desc 处理className
|
|
1370
1372
|
* */
|
|
1371
1373
|
var handClass = function handClass() {
|
|
1372
|
-
var str = $prefixCls
|
|
1373
|
-
if (className) str +=
|
|
1374
|
+
var str = "".concat($prefixCls, "-dynamic-multi-box");
|
|
1375
|
+
if (className) str += " ".concat(className);
|
|
1374
1376
|
return str;
|
|
1375
1377
|
};
|
|
1376
1378
|
return jsxs("div", Object.assign({
|
|
@@ -1380,14 +1382,15 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1380
1382
|
children: [jsxs("div", Object.assign({
|
|
1381
1383
|
className: "multi-value-content"
|
|
1382
1384
|
}, {
|
|
1383
|
-
children: [renderTitle, jsx(dist.exports.ReactSortable, Object.assign({
|
|
1385
|
+
children: [renderTitle, isSort ? jsx(dist.exports.ReactSortable, Object.assign({
|
|
1386
|
+
id: rowKey,
|
|
1384
1387
|
list: valueList,
|
|
1385
1388
|
handle: '.sort-handler',
|
|
1386
1389
|
animation: 150,
|
|
1387
1390
|
setList: onDragSort
|
|
1388
1391
|
}, {
|
|
1389
1392
|
children: renderContent
|
|
1390
|
-
}))]
|
|
1393
|
+
})) : renderContent]
|
|
1391
1394
|
})), jsxs("div", Object.assign({
|
|
1392
1395
|
className: "add-button ".concat(disabledAdd ? 'disabled-add' : 'normal-button'),
|
|
1393
1396
|
onClick: onAddEvent
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* @date 2022/11/7 10:32 AM
|
|
4
4
|
* @description 多值框组件接口定义
|
|
5
5
|
*/
|
|
6
|
-
import { ReactNode } from
|
|
7
|
-
import { TextFieldProps, SelectProps, SwitchProps, InputNumberProps, InputLangProps, ComboSelectProps, DatePickerProps } from
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
import { TextFieldProps, SelectProps, SwitchProps, InputNumberProps, InputLangProps, ComboSelectProps, DatePickerProps } from '@para-ui/core';
|
|
8
|
+
import { LabelProps } from "../Label";
|
|
8
9
|
/**组件类型:输入框,下拉框,开关,数字输入框,国际化输入框,日期框,时间选择框,组合选择器,自定义组件*/
|
|
9
10
|
export type IInputType = 'TextField' | 'Select' | 'Switch' | 'InputNumber' | 'InputLang' | 'ComboSelect' | 'DatePicker' | 'custom';
|
|
10
11
|
/** 配置项*/
|
|
@@ -27,31 +28,28 @@ export type IConfig = {
|
|
|
27
28
|
list?: ((rowIndex: number, id: string, name: string, valueList: IValueList[]) => any[]) | any[];
|
|
28
29
|
/** 样式 */
|
|
29
30
|
style?: React.CSSProperties;
|
|
31
|
+
/** 标题样式 */
|
|
32
|
+
labelProps?: LabelProps;
|
|
30
33
|
/** 其他*/
|
|
31
34
|
[name: string]: any;
|
|
32
35
|
} & (TextFieldProps | SelectProps | SwitchProps | InputNumberProps | InputLangProps | ComboSelectProps | DatePickerProps);
|
|
33
36
|
/** value集合*/
|
|
34
37
|
export interface IValueList {
|
|
35
|
-
/** id*/
|
|
36
|
-
id: string;
|
|
37
38
|
/** 每行value值集合, name映射configItem中的name*/
|
|
38
39
|
[name: string]: any;
|
|
39
40
|
}
|
|
40
41
|
export interface IErrors {
|
|
41
|
-
/** id*/
|
|
42
|
-
id: string;
|
|
43
42
|
/** 每行错误集合,name映射configItem中的name*/
|
|
44
43
|
[name: string]: any;
|
|
45
44
|
}
|
|
46
45
|
export interface ICurrentItem {
|
|
47
46
|
/** 表单名*/
|
|
48
47
|
name?: string;
|
|
49
|
-
/** 表单所处行id*/
|
|
50
|
-
id: string;
|
|
51
48
|
/** 表单值*/
|
|
52
49
|
value?: any;
|
|
53
50
|
/** 表单所处下标*/
|
|
54
51
|
rowIndex?: number;
|
|
52
|
+
[name: string]: any;
|
|
55
53
|
}
|
|
56
54
|
/** 过滤回调出参*/
|
|
57
55
|
export interface IFilterParams {
|
|
@@ -66,6 +64,8 @@ export interface IFilterParams {
|
|
|
66
64
|
}
|
|
67
65
|
/** 主体接口定义*/
|
|
68
66
|
export interface IMultiValueProps {
|
|
67
|
+
/** 指定每行key */
|
|
68
|
+
rowKey?: string;
|
|
69
69
|
/**
|
|
70
70
|
* 组件配置项
|
|
71
71
|
*/
|