@para-ui/core 3.0.22 → 3.0.24
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.js +2 -2
- package/AutoTips/index.d.ts +2 -0
- package/AutoTips/index.js +10 -2
- package/Breadcrumbs/index.js +2 -2
- package/Button/index.js +5 -3
- package/ButtonGroup/index.js +5 -3
- package/Carousel/index.js +1 -1
- package/Cascader/index.js +1 -1
- package/Checkbox/index.js +1 -1
- package/CheckboxGroup/index.js +1 -1
- package/Collapse/index.js +1 -1
- package/CollapseBox/index.js +1 -1
- package/CollapseLayout/index.js +1 -1
- package/ComboSelect/index.js +10 -9
- package/Container/index.js +1 -1
- package/DatePicker/index.js +11 -178
- package/Desktop/index.js +4 -3
- package/Drawer/index.js +5 -3
- package/Dropdown/index.d.ts +2 -0
- package/Dropdown/index.js +10 -62
- package/Empty/index.js +1 -1
- package/Form/index.js +5 -4
- package/FormItem/index.js +5 -4
- package/FunctionModal/index.js +6 -5
- package/Help/index.js +1 -1
- package/HelperText/index.js +1 -1
- package/InputLang/index.js +4 -3
- package/InputNumber/index.js +1 -1
- package/Label/index.js +1 -1
- package/Loading/index.js +1 -1
- package/Menu/index.js +1 -1
- package/Message/index.js +1 -1
- package/Modal/index.js +5 -4
- package/MultiBox/index.js +4 -3
- package/Notification/index.js +1 -1
- package/OperateBtn/index.js +5 -3
- package/PageHeader/index.js +4 -3
- package/Pagination/index.js +4 -3
- package/ParauiProvider/index.js +1 -1
- package/PopConfirm/index.js +5 -3
- package/Popover/index.js +2 -2
- package/Progress/index.js +1 -1
- package/Querying/index.js +1 -1
- package/README.md +22 -0
- package/Radio/index.js +1 -1
- package/RadioGroup/index.js +1 -1
- package/Search/index.js +4 -3
- package/Select/index.d.ts +8 -0
- package/Select/index.js +45 -38
- package/SelectInput/index.js +3 -2
- package/Selector/index.js +17 -9
- package/SelectorPicker/index.d.ts +3 -1
- package/SelectorPicker/index.js +34 -16
- package/SingleBox/index.js +4 -3
- package/Slider/index.js +1 -1
- package/Split/index.js +1 -1
- package/Status/index.js +1 -1
- package/Stepper/index.js +1 -1
- package/Styles/form.scss +5 -0
- package/Styles/index.scss +37 -0
- package/Styles/normalize.scss +348 -0
- package/Styles/scrollbar.scss +223 -0
- package/Styles/theme.scss +74 -0
- package/Switch/index.js +1 -1
- package/Table/index.js +86 -10
- package/Table/interface.d.ts +29 -8
- package/Tabs/index.js +5 -3
- package/Tag/index.js +1 -1
- package/TextEditor/index.js +1 -1
- package/TextField/index.js +4 -3
- package/TimePicker/index.js +4 -4
- package/Timeline/index.js +1 -1
- package/Title/index.js +1 -1
- package/ToggleButton/index.js +4 -3
- package/Tooltip/index.js +11 -2
- package/Tooltip/interface.d.ts +2 -0
- package/Transfer/index.js +5 -4
- package/Tree/index.js +2 -2
- package/Upload/index.js +9 -8
- package/_verture/{index-6807c0e0.js → index-31ce5a11.js} +7 -41
- package/_verture/{index-6fd242a8.js → index-cef53318.js} +2 -2
- package/_verture/index-ffd2b2cb.js +250 -0
- package/_verture/{modalContext-fcdc497b.js → modalContext-ba1b0528.js} +0 -0
- package/_verture/{usePopupContainer-874d101b.js → usePopupContainer-7bbd7720.js} +2 -2
- package/index.js +6 -6
- package/package.json +1 -1
package/Upload/index.js
CHANGED
|
@@ -28,9 +28,11 @@ import '../Tooltip/index.js';
|
|
|
28
28
|
import 'rc-tooltip';
|
|
29
29
|
import 'rc-tooltip/lib/placements';
|
|
30
30
|
import '@para-ui/icons/Down';
|
|
31
|
-
import '../
|
|
31
|
+
import '../_verture/index-ffd2b2cb.js';
|
|
32
32
|
import 'rc-dropdown';
|
|
33
|
-
import '../_verture/usePopupContainer-
|
|
33
|
+
import '../_verture/usePopupContainer-7bbd7720.js';
|
|
34
|
+
import 'dayjs';
|
|
35
|
+
import '@paraview/lib';
|
|
34
36
|
import 'rc-slider';
|
|
35
37
|
import 'rc-dialog';
|
|
36
38
|
import '@para-ui/icons/Close';
|
|
@@ -40,9 +42,8 @@ import '@para-ui/icons/CheckCircleF';
|
|
|
40
42
|
import '@para-ui/icons/CloseCircleF';
|
|
41
43
|
import '@para-ui/icons/WarningCircle';
|
|
42
44
|
import '@para-ui/icons/WarningCircleF';
|
|
43
|
-
import '@paraview/lib';
|
|
44
45
|
|
|
45
|
-
var css_248z$4 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午3:08\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n
|
|
46
|
+
var css_248z$4 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午3:08\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-upload-list-text .upload-list-item {\n margin-top: 8px;\n}\n.paraui-v3-upload-list-text .upload-list-item-info {\n display: flex;\n align-items: center;\n padding: 0 8px;\n line-height: 28px;\n font-size: 14px;\n color: rgb(46, 55, 67);\n border-radius: 4px;\n transition: background-color 0.3s;\n}\n.paraui-v3-upload-list-text .upload-list-item-info .upload-list-text {\n position: relative;\n display: inline-flex;\n align-items: center;\n}\n.paraui-v3-upload-list-text .upload-list-item-info .upload-list-text .upload-list-fileicon {\n line-height: 0;\n opacity: 1;\n transition: opacity 0.3s;\n}\n.paraui-v3-upload-list-text .upload-list-item-info .upload-list-text .upload-list-fileicon svg {\n color: inherit;\n font-size: inherit;\n}\n.paraui-v3-upload-list-text .upload-list-item-info .upload-list-text-name {\n margin-left: 10px;\n}\n.paraui-v3-upload-list-text .upload-list-item-info .upload-list-text .upload-list-actions {\n position: absolute;\n opacity: 0;\n visibility: hidden;\n line-height: 0;\n transition: opacity 0.3s;\n cursor: pointer;\n}\n.paraui-v3-upload-list-text .upload-list-item-info .upload-list-text .upload-list-actions svg {\n color: rgb(235, 96, 84);\n font-size: inherit;\n}\n.paraui-v3-upload-list-text .upload-list-item-info:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-upload-list-text .upload-list-item-info:hover .upload-list-text .upload-list-actions {\n visibility: visible;\n opacity: 1;\n}\n.paraui-v3-upload-list-text .upload-list-item-info:hover .upload-list-text .upload-list-fileicon-active {\n opacity: 0;\n}\n.paraui-v3-upload-list-picture {\n display: inline-flex;\n align-items: center;\n}\n.paraui-v3-upload-list-picture .upload-list-picture-item {\n position: relative;\n display: inline-block;\n width: 100px;\n height: 100px;\n margin-right: 16px;\n border-radius: 4px;\n cursor: default;\n}\n.paraui-v3-upload-list-picture .upload-list-picture-item::before {\n content: \" \";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n background-color: rgba(46, 55, 67, 0.7);\n border-radius: 4px;\n opacity: 0;\n transition: 0.3s;\n}\n.paraui-v3-upload-list-picture .upload-list-picture-item img {\n width: 100%;\n height: 100%;\n border-radius: 4px;\n}\n.paraui-v3-upload-list-picture .upload-list-picture-item .upload-list-picture-name {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 0 10px;\n font-size: 12px;\n line-height: 24px;\n text-align: center;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n background-color: rgba(46, 55, 67, 0.7);\n border-radius: 0 0 4px 4px;\n color: rgb(255, 255, 255);\n transition: 0.3s;\n}\n.paraui-v3-upload-list-picture .upload-list-picture-item .upload-list-actions {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n opacity: 0;\n line-height: 0;\n cursor: pointer;\n transition: 0.3s;\n}\n.paraui-v3-upload-list-picture .upload-list-picture-item .upload-list-actions svg {\n color: rgb(255, 255, 255);\n}\n.paraui-v3-upload-list-picture .upload-list-picture-item:hover::before {\n opacity: 1;\n}\n.paraui-v3-upload-list-picture .upload-list-picture-item:hover .upload-list-actions {\n opacity: 1;\n}\n.paraui-v3-upload-list-picture .upload-list-picture-item:hover .upload-list-picture-name {\n opacity: 0;\n}";
|
|
46
47
|
styleInject(css_248z$4);
|
|
47
48
|
|
|
48
49
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
@@ -262,7 +263,7 @@ var UploadList = function UploadList(props) {
|
|
|
262
263
|
});
|
|
263
264
|
};
|
|
264
265
|
|
|
265
|
-
var css_248z$3 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/15 下午7:12\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n
|
|
266
|
+
var css_248z$3 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/15 下午7:12\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-upload-error {\n position: absolute;\n left: 0;\n top: 100%;\n margin-top: 12px;\n display: inline-flex;\n align-items: center;\n padding: 0 12px;\n line-height: 28px;\n background-color: #FDF6F5;\n color: rgb(235, 96, 84);\n font-size: 14px;\n white-space: nowrap;\n border-radius: 4px;\n z-index: 1;\n}\n.paraui-v3-upload-error svg {\n margin-right: 4px;\n font-size: inherit;\n color: inherit;\n}\n.paraui-v3-upload-error-image {\n margin-top: 8px;\n}\n.paraui-v3-upload-error-drag {\n top: 20px;\n left: 50%;\n margin-top: 0;\n transform: translateX(-50%);\n}";
|
|
266
267
|
styleInject(css_248z$3);
|
|
267
268
|
|
|
268
269
|
var ErrorTip = function ErrorTip(props) {
|
|
@@ -302,7 +303,7 @@ var localeJson = {
|
|
|
302
303
|
en: en
|
|
303
304
|
};
|
|
304
305
|
|
|
305
|
-
var css_248z$2 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午7:31\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n
|
|
306
|
+
var css_248z$2 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午7:31\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-upload-image {\n display: inline-flex;\n align-items: center;\n}\n.paraui-v3-upload-image .upload-image-select {\n position: relative;\n width: 100px;\n height: 100px;\n background-color: rgba(171, 176, 185, 0.12);\n border-radius: 4px;\n cursor: pointer;\n transition: 0.3s;\n}\n.paraui-v3-upload-image .upload-image-select-loading {\n pointer-events: none;\n}\n.paraui-v3-upload-image .upload-image-select .component-upload {\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-upload-image .upload-image-select:hover {\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-upload-image .upload-image-select:hover .upload-image-picture-card {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-upload-image .upload-image-picture-card {\n display: inline-flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n align-items: center;\n justify-content: center;\n color: rgb(46, 55, 67);\n font-size: 14px;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-img-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n cursor: default;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-img-wrapper img {\n width: 100%;\n height: 100%;\n border-radius: 4px;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-img-wrapper::before {\n content: \" \";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n background-color: rgba(46, 55, 67, 0.7);\n border-radius: 4px;\n opacity: 0;\n transition: 0.3s;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-img-wrapper-name {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 0 10px;\n font-size: 12px;\n line-height: 24px;\n text-align: center;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n background-color: rgba(46, 55, 67, 0.7);\n border-radius: 0 0 4px 4px;\n color: rgb(255, 255, 255);\n transition: 0.3s;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-img-wrapper-action {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n opacity: 0;\n line-height: 0;\n cursor: pointer;\n transition: 0.3s;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-img-wrapper-action svg {\n color: rgb(255, 255, 255);\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-img-wrapper:hover::before {\n opacity: 1;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-img-wrapper:hover .upload-img-wrapper-name {\n opacity: 0;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-img-wrapper:hover .upload-img-wrapper-action {\n opacity: 1;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-image-icon {\n color: rgb(54, 102, 214);\n font-size: 30px;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-image-loading {\n color: rgb(54, 102, 214);\n font-size: 30px;\n animation: imageLoadingCircle 1s infinite linear;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-image-text {\n margin-top: 6px;\n color: inherit;\n transition: 0.3s;\n}\n.paraui-v3-upload-image .upload-image-picture-card .upload-image-text-loading {\n color: rgb(54, 102, 214);\n}\n@keyframes imageLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}";
|
|
306
307
|
styleInject(css_248z$2);
|
|
307
308
|
|
|
308
309
|
var ImageUpload = function ImageUpload(props) {
|
|
@@ -876,7 +877,7 @@ var EasyCrop = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
876
877
|
});
|
|
877
878
|
var EasyCrop$1 = /*#__PURE__*/memo(EasyCrop);
|
|
878
879
|
|
|
879
|
-
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/20 下午4:44\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n
|
|
880
|
+
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/20 下午4:44\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-container {\n position: relative;\n width: 100%;\n height: 40vh;\n}\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-control {\n display: flex;\n align-items: center;\n width: 60%;\n margin-left: auto;\n margin-right: auto;\n}\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-control:first-of-type {\n margin-top: 16px;\n}\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-control:last-of-type {\n margin-bottom: -8px;\n}\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-control button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 34px;\n height: 34px;\n padding: 0;\n font-style: normal;\n background: transparent;\n border: 0;\n outline: 0;\n cursor: pointer;\n}\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-control button[disabled] {\n cursor: default;\n}\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-control button + div:only-of-type {\n flex: 1;\n margin: 0 8px;\n}\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-control-zoom button {\n font-size: 18px;\n}\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-control-rotate button {\n font-size: 16px;\n}\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-control-rotate button:first-of-type {\n transform: rotate(-20deg);\n}\n.paraui-v3-img-crop-modal .paraui-v3-img-crop-control-rotate button:last-of-type {\n transform: rotate(20deg);\n}";
|
|
880
881
|
styleInject(css_248z$1);
|
|
881
882
|
|
|
882
883
|
var ImgCrop = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
@@ -1276,7 +1277,7 @@ var ImgCrop = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1276
1277
|
});
|
|
1277
1278
|
});
|
|
1278
1279
|
|
|
1279
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午1:40\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n
|
|
1280
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午1:40\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-upload .component-upload {\n position: relative;\n display: inline-block;\n}\n.paraui-v3-upload-loading {\n pointer-events: none;\n}\n.paraui-v3-upload .paraui-v3-button {\n color: rgb(54, 102, 214);\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-upload .paraui-v3-button:hover {\n border-color: rgba(54, 102, 214, 0.8);\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-upload .paraui-v3-button-loading .button-icon {\n animation: uploadLoadingCircle 1s infinite linear;\n}\n.paraui-v3-upload-drag {\n position: relative;\n}\n.paraui-v3-upload-drag .component-upload {\n display: block;\n}\n.paraui-v3-upload-drag-loading {\n pointer-events: none;\n}\n.paraui-v3-upload-drag-hover .upload-drag-container {\n border-color: rgba(54, 102, 214, 0.4);\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-upload-drag .upload-drag-container {\n display: inline-flex;\n width: 100%;\n max-width: 960px;\n height: 220px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n font-size: 14px;\n line-height: 1;\n border: 2px dashed rgba(171, 176, 185, 0.4);\n background-color: rgba(171, 176, 185, 0.12);\n border-radius: 4px;\n cursor: pointer;\n transition: 0.3s;\n}\n.paraui-v3-upload-drag .upload-drag-container:hover {\n border-color: rgba(54, 102, 214, 0.4);\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-upload-drag .upload-drag-container .upload-drag-icon {\n line-height: 0;\n}\n.paraui-v3-upload-drag .upload-drag-container .upload-drag-icon svg {\n font-size: 48px;\n color: rgb(54, 102, 214);\n}\n.paraui-v3-upload-drag .upload-drag-container .upload-drag-icon .upload-drag-loading {\n animation: uploadLoadingCircle 1s infinite linear;\n}\n.paraui-v3-upload-drag .upload-drag-container .upload-drag-text {\n margin: 20px 0 12px 0;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-upload-drag .upload-drag-container .upload-drag-text-loading {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-upload-drag .upload-drag-container .upload-drag-text-filename {\n margin-right: 5px;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-upload-drag .upload-drag-container .upload-drag-hint {\n color: rgba(46, 55, 67, 0.7);\n padding: 0 20px;\n text-align: center;\n}\n@keyframes uploadLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}";
|
|
1280
1281
|
styleInject(css_248z);
|
|
1281
1282
|
|
|
1282
1283
|
var InternalUpload = function InternalUpload(props) {
|
|
@@ -156,37 +156,6 @@ var convertByFilter = function convertByFilter(sourceList, filterList) {
|
|
|
156
156
|
return convert(tempArr);
|
|
157
157
|
}; //获得没有匹配数据的keys
|
|
158
158
|
|
|
159
|
-
var getUnMatchDataOfKeys = function getUnMatchDataOfKeys(keys, oriData) {
|
|
160
|
-
var tKeys = [];
|
|
161
|
-
var flatData = flatten(oriData);
|
|
162
|
-
|
|
163
|
-
var _iterator3 = _createForOfIteratorHelper(keys),
|
|
164
|
-
_step3;
|
|
165
|
-
|
|
166
|
-
try {
|
|
167
|
-
var _loop = function _loop() {
|
|
168
|
-
var k = _step3.value;
|
|
169
|
-
var idx = flatData.findIndex(function (node) {
|
|
170
|
-
return node.key === k;
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
if (idx === -1) {
|
|
174
|
-
tKeys.push(k);
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
179
|
-
_loop();
|
|
180
|
-
}
|
|
181
|
-
} catch (err) {
|
|
182
|
-
_iterator3.e(err);
|
|
183
|
-
} finally {
|
|
184
|
-
_iterator3.f();
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
return tKeys;
|
|
188
|
-
}; //获得checkedkeys
|
|
189
|
-
|
|
190
159
|
var getCheckedKeys = function getCheckedKeys(cKeys) {
|
|
191
160
|
if (!Array.isArray(cKeys)) {
|
|
192
161
|
return cKeys.checked;
|
|
@@ -331,7 +300,7 @@ var localeJson = {
|
|
|
331
300
|
en: en
|
|
332
301
|
};
|
|
333
302
|
|
|
334
|
-
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n
|
|
303
|
+
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.sector-container {\n position: relative;\n z-index: 1500;\n}\n.sector-container .sector-item-container {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n padding: 0;\n}\n.sector-container .sector-item-container .sector-item {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n height: 24px;\n background-color: rgb(255, 255, 255);\n border-radius: 50%;\n box-shadow: 4px 4px 6px rgba(70, 75, 105, 0.2), -4px -4px 6px rgba(0, 0, 0, 0.06);\n cursor: pointer;\n opacity: 0;\n}\n.sector-container .sector-item-container .sector-item svg {\n font-size: 14px;\n color: rgba(46, 55, 67, 0.7);\n}\n.sector-container .sector-item-container .sector-item:hover {\n color: rgb(54, 102, 214);\n}\n.sector-container .sector-item-container .sector-item:hover svg {\n color: inherit;\n}\n.sector-container .sector-item-container .sector-item--del:hover {\n color: rgb(235, 96, 84);\n}\n.sector-container .sector-item-container .sector-item--del:hover svg {\n color: inherit;\n}";
|
|
335
304
|
styleInject(css_248z$1);
|
|
336
305
|
|
|
337
306
|
var getIconMap = function getIconMap(intl) {
|
|
@@ -761,8 +730,6 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
761
730
|
|
|
762
731
|
var treeOriDataRef = useRef([]); //tree origin data
|
|
763
732
|
|
|
764
|
-
var unMatchKeys = getUnMatchDataOfKeys(inCheckedKeys, treeData); //没有匹配数据的keys
|
|
765
|
-
|
|
766
733
|
var nPageSize = Object.assign(Object.assign({}, defaultPageSize), pageSize);
|
|
767
734
|
var halfCheckedKeys = useRef([]); //半选keys
|
|
768
735
|
|
|
@@ -990,13 +957,11 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
990
957
|
halfChecked = e.halfCheckedKeys;
|
|
991
958
|
}
|
|
992
959
|
|
|
993
|
-
var mKeys = [].concat(_toConsumableArray(temp), _toConsumableArray(unMatchKeys));
|
|
994
|
-
|
|
995
960
|
if (!('checkedKeys' in props)) {
|
|
996
|
-
setInCheckedKeys(
|
|
961
|
+
setInCheckedKeys(temp);
|
|
997
962
|
}
|
|
998
963
|
|
|
999
|
-
onCheck === null || onCheck === void 0 ? void 0 : onCheck(
|
|
964
|
+
onCheck === null || onCheck === void 0 ? void 0 : onCheck(temp, e, halfChecked);
|
|
1000
965
|
}; //展开节点
|
|
1001
966
|
|
|
1002
967
|
|
|
@@ -1382,7 +1347,8 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
1382
1347
|
//展开keys
|
|
1383
1348
|
setInExpandedKeys(_toConsumableArray(expandedKeys));
|
|
1384
1349
|
}
|
|
1385
|
-
|
|
1350
|
+
}, [checkedKeys, expandedKeys]);
|
|
1351
|
+
useEffect(function () {
|
|
1386
1352
|
if (loadedKeys) {
|
|
1387
1353
|
//loadedKeys
|
|
1388
1354
|
if (loadedKeys.length === 0) {
|
|
@@ -1392,7 +1358,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
1392
1358
|
setInLoadKeys(_toConsumableArray(loadedKeys));
|
|
1393
1359
|
}
|
|
1394
1360
|
}
|
|
1395
|
-
}, [
|
|
1361
|
+
}, [loadedKeys]);
|
|
1396
1362
|
useEffect(function () {
|
|
1397
1363
|
//默认展开所有
|
|
1398
1364
|
function _expandAllNode(newTreeData) {
|
|
@@ -1579,7 +1545,7 @@ if (!Element.prototype.closest) {
|
|
|
1579
1545
|
};
|
|
1580
1546
|
}
|
|
1581
1547
|
|
|
1582
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/9 下午8:39\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-tree-treenode-leaf-last .paraui-v3-tree-switcher-leaf-line::before {\n top: auto !important;\n bottom: auto !important;\n height: 14px !important;\n}\n\n@keyframes treeCheckboxEffect {\n 0% {\n transform: scale(1);\n opacity: 0.5;\n }\n 100% {\n transform: scale(1.6);\n opacity: 0;\n }\n}\n.paraui-v3-tree-rtl {\n direction: rtl;\n}\n.paraui-v3-tree-rtl .paraui-v3-tree-node-content-wrapper[draggable=true] .paraui-v3-tree-drop-indicator::after {\n right: -6px;\n left: unset;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-rtl {\n direction: rtl;\n}\n.paraui-v3-tree-rtl .paraui-v3-tree-switcher_close .paraui-v3-tree-switcher-icon svg {\n transform: rotate(90deg);\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit::before .paraui-v3-tree-rtl.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit::before {\n right: auto;\n left: -13px;\n border-right: none;\n border-left: 1px solid #d9d9d9;\n}\n.paraui-v3-tree-checkbox .paraui-v3-tree-rtl.paraui-v3-tree-checkbox {\n margin: 4px 0 0 8px;\n}\n\n.paraui-v3-tree-select-dropdown-rtl .paraui-v3-select-tree-checkbox {\n margin: 4px 0 0 8px;\n}\n\n.paraui-v3-tree-checkbox {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n position: relative;\n top: 0.2em;\n line-height: 1;\n white-space: nowrap;\n outline: none;\n cursor: pointer;\n}\n.paraui-v3-tree-checkbox-wrapper:hover .paraui-v3-tree-checkbox-inner, .paraui-v3-tree-checkbox:hover .paraui-v3-tree-checkbox-inner, .paraui-v3-tree-checkbox-input:focus + .paraui-v3-tree-checkbox-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-tree-checkbox-checked::after {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 1px solid rgb(54, 102, 214);\n border-radius: 2px;\n visibility: hidden;\n animation: treeCheckboxEffect 0.36s ease-in-out;\n animation-fill-mode: backwards;\n content: \"\";\n box-sizing: border-box;\n}\n.paraui-v3-tree-checkbox:hover::after, .paraui-v3-tree-checkbox-wrapper:hover .paraui-v3-tree-checkbox::after {\n visibility: visible;\n}\n.paraui-v3-tree-checkbox-inner {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n width: 16px;\n height: 16px;\n direction: ltr;\n background-color: rgb(255, 255, 255);\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n border-collapse: separate;\n transition: all 0.3s;\n}\n.paraui-v3-tree-checkbox-inner::after {\n position: absolute;\n top: 50%;\n left: 21.5%;\n display: table;\n width: 6px;\n height: 9px;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n transform: rotate(45deg) scale(0) translate(-50%, -50%);\n opacity: 0;\n transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;\n content: \" \";\n box-sizing: border-box;\n}\n.paraui-v3-tree-checkbox-input {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n cursor: pointer;\n opacity: 0;\n}\n\n.paraui-v3-tree-checkbox-checked .paraui-v3-tree-checkbox-inner::after {\n position: absolute;\n display: table;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n transform: rotate(45deg) scale(1) translate(-50%, -50%);\n opacity: 1;\n transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;\n content: \" \";\n}\n\n.paraui-v3-tree-checkbox-checked .paraui-v3-tree-checkbox-inner {\n background-color: rgb(54, 102, 214);\n border-color: rgb(54, 102, 214);\n}\n\n.paraui-v3-tree-checkbox-disabled {\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-disabled.paraui-v3-tree-checkbox-checked .paraui-v3-tree-checkbox-inner::after {\n border-color: rgba(0, 0, 0, 0.25);\n animation-name: none;\n}\n.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-input {\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-inner {\n background-color: #f5f5f5;\n border-color: #d9d9d9 !important;\n}\n.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-inner::after {\n border-color: #f5f5f5;\n border-collapse: separate;\n animation-name: none;\n}\n.paraui-v3-tree-checkbox-disabled + span {\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-disabled:hover::after, .paraui-v3-tree-checkbox-wrapper:hover .paraui-v3-tree-checkbox-disabled::after {\n visibility: hidden;\n}\n\n.paraui-v3-tree-checkbox-wrapper {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n display: inline-flex;\n align-items: baseline;\n line-height: unset;\n cursor: pointer;\n}\n.paraui-v3-tree-checkbox-wrapper.paraui-v3-tree-checkbox-wrapper-disabled {\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-wrapper + .paraui-v3-tree-checkbox-wrapper {\n margin-left: 8px;\n}\n\n.paraui-v3-tree-checkbox + span {\n padding-right: 8px;\n padding-left: 8px;\n}\n\n.paraui-v3-tree-checkbox-group {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n display: inline-block;\n}\n.paraui-v3-tree-checkbox-group-item {\n margin-right: 8px;\n}\n.paraui-v3-tree-checkbox-group-item:last-child {\n margin-right: 0;\n}\n.paraui-v3-tree-checkbox-group-item + .paraui-v3-tree-checkbox-group-item {\n margin-left: 0;\n}\n\n.paraui-v3-tree-checkbox-indeterminate .paraui-v3-tree-checkbox-inner {\n background-color: rgb(54, 102, 214);\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-tree-checkbox-indeterminate .paraui-v3-tree-checkbox-inner::after {\n top: 50%;\n left: 50%;\n width: 8px;\n height: 2px;\n background-color: rgb(255, 255, 255);\n border: 0;\n transform: translate(-50%, -50%) scale(1);\n opacity: 1;\n content: \" \";\n}\n.paraui-v3-tree-checkbox-indeterminate.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-inner::after {\n background-color: rgba(0, 0, 0, 0.25);\n border-color: rgba(0, 0, 0, 0.25);\n}\n\n.paraui-v3-tree-wrapper .paraui-v3-tree-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.paraui-v3-tree {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n background: rgb(255, 255, 255);\n border-radius: 2px;\n transition: background-color 0.3s;\n}\n.paraui-v3-tree-focused:not(:hover):not(.paraui-v3-tree-active-focused) {\n background: #e6f7ff;\n}\n.paraui-v3-tree-list-holder-inner {\n align-items: flex-start;\n}\n.paraui-v3-tree.paraui-v3-tree-block-node .paraui-v3-tree-list-holder-inner {\n align-items: stretch;\n}\n.paraui-v3-tree.paraui-v3-tree-block-node .paraui-v3-tree-list-holder-inner .paraui-v3-tree-node-content-wrapper {\n flex: auto;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode {\n display: flex;\n align-items: flex-start;\n outline: none;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-disabled .paraui-v3-tree-node-content-wrapper {\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-disabled .paraui-v3-tree-node-content-wrapper:hover {\n background: transparent;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-active .paraui-v3-tree-node-content-wrapper {\n background: #f5f5f5;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode:not(.paraui-v3-tree .paraui-v3-tree-treenode-disabled).filter-node .paraui-v3-tree-title {\n color: inherit;\n font-weight: 500;\n}\n.paraui-v3-tree-indent {\n align-self: stretch;\n white-space: nowrap;\n user-select: none;\n}\n.paraui-v3-tree-indent-unit {\n display: inline-block;\n width: 24px;\n}\n.paraui-v3-tree-switcher {\n position: relative;\n flex: none;\n align-self: stretch;\n width: 24px;\n margin: 0;\n line-height: 24px;\n text-align: center;\n cursor: pointer;\n user-select: none;\n}\n.paraui-v3-tree-switcher .paraui-v3-tree-switcher-icon,\n.paraui-v3-tree-switcher .paraui-v3-select-tree-switcher-icon {\n display: inline-block;\n font-size: 14px;\n vertical-align: middle;\n transition: transform 0.3s;\n color: inherit;\n}\n.paraui-v3-tree-switcher .paraui-v3-tree-switcher-icon svg,\n.paraui-v3-tree-switcher .paraui-v3-select-tree-switcher-icon svg {\n font-size: inherit;\n color: inherit;\n transition: transform 0.3s;\n}\n.paraui-v3-tree-switcher-noop {\n cursor: default;\n}\n.paraui-v3-tree-switcher_close .paraui-v3-tree-switcher-icon {\n transform: rotate(-90deg);\n}\n.paraui-v3-tree-switcher_close .paraui-v3-tree-switcher-icon svg {\n color: currentColor;\n transform: rotate(-90deg);\n}\n.paraui-v3-tree-switcher-loading-icon {\n color: rgb(54, 102, 214);\n will-change: transform;\n transition: transform 0.3s ease-in-out;\n animation: treeLoadingCircle 1s infinite linear;\n vertical-align: middle;\n font-size: 14px !important;\n}\n@keyframes treeLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n.paraui-v3-tree-switcher-leaf-line {\n position: relative;\n z-index: 1;\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-tree-switcher-leaf-line::before {\n position: absolute;\n top: 0;\n bottom: -4px;\n margin-left: -1px;\n border-left: 1px solid #d9d9d9;\n content: \" \";\n}\n.paraui-v3-tree-switcher-leaf-line::after {\n position: absolute;\n width: 10px;\n height: 14px;\n margin-left: -1px;\n border-bottom: 1px solid #d9d9d9;\n content: \" \";\n}\n.paraui-v3-tree-checkbox {\n top: initial;\n margin: 6px 6px 0 0;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper {\n position: relative;\n z-index: auto;\n min-height: 24px;\n margin: 2px 0 0 0;\n padding: 0 6px;\n color: inherit;\n line-height: 24px;\n background: transparent;\n border-radius: 2px;\n cursor: pointer;\n transition: all 0.3s, border 0s, line-height 0s, box-shadow 0s;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper:hover {\n background-color: rgba(171, 176, 185, 0.12);\n border-radius: 4px;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper.paraui-v3-tree-node-selected {\n background-color: transparent;\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper .paraui-v3-tree-iconEle {\n display: inline-block;\n width: 24px;\n height: 24px;\n margin-left: -6px;\n line-height: 24px;\n text-align: center;\n vertical-align: top;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper .paraui-v3-tree-iconEle > svg {\n vertical-align: -0.125em;\n color: inherit;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper .paraui-v3-tree-iconEle:empty {\n display: none;\n}\n.paraui-v3-tree-unselectable .paraui-v3-tree-node-content-wrapper:hover {\n background-color: transparent;\n}\n.paraui-v3-tree-node-content-wrapper[draggable=true] {\n line-height: 24px;\n user-select: none;\n}\n.paraui-v3-tree-node-content-wrapper[draggable=true] .paraui-v3-tree-drop-indicator {\n position: absolute;\n z-index: 1;\n height: 2px;\n background-color: rgb(54, 102, 214);\n border-radius: 1px;\n pointer-events: none;\n}\n.paraui-v3-tree-node-content-wrapper[draggable=true] .paraui-v3-tree-drop-indicator::after {\n position: absolute;\n top: -3px;\n left: -6px;\n width: 8px;\n height: 8px;\n background-color: transparent;\n border: 2px solid rgb(54, 102, 214);\n border-radius: 50%;\n content: \"\";\n}\n.paraui-v3-tree .paraui-v3-tree-treenode.drop-container > [draggable] {\n box-shadow: 0 0 0 2px rgb(54, 102, 214);\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit {\n position: relative;\n height: 100%;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit::before {\n position: absolute;\n top: 0;\n right: 12px;\n bottom: -4px;\n border-right: 1px solid #d9d9d9;\n content: \"\";\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit-end::before {\n display: none;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher {\n background: rgb(255, 255, 255);\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher_close svg {\n transform: rotate(-90deg);\n color: inherit;\n font-size: 14px;\n transition: transform 0.3s;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher_open svg {\n color: inherit;\n font-size: 14px;\n transition: transform 0.3s;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher-line-icon {\n vertical-align: -0.225em;\n color: inherit;\n font-size: 14px;\n}\n.paraui-v3-tree-node-content-wrapper {\n overflow: hidden;\n}\n.paraui-v3-tree-node-content-wrapper .paraui-v3-tree-title {\n display: flex;\n align-items: center;\n}\n.paraui-v3-tree-node-content-wrapper .paraui-v3-tree-treenode-more-wrapper {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper--active {\n background-color: rgba(171, 176, 185, 0.12) !important;\n border-radius: 4px !important;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper--active .sector-anchor {\n opacity: 1 !important;\n}\n.paraui-v3-tree.paraui-v3-tree-block-node .paraui-v3-tree-list-holder-inner .paraui-v3-tree-node-content-wrapper {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper {\n display: inline-flex;\n align-items: center;\n margin: 0 -6px;\n padding: 0 6px;\n overflow: hidden;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor {\n position: relative;\n width: 14px;\n height: 14px;\n margin: 1px 0 0 18px;\n line-height: 14px;\n opacity: 0;\n transition: opacity 0.3s;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor:before {\n content: \" \";\n position: absolute;\n left: -9px;\n top: 0;\n width: 1px;\n height: 14px;\n background-color: rgba(171, 176, 185, 0.2);\n pointer-events: none;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor svg {\n font-size: 14px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor--active.sector-anchor svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper--active .sector-anchor {\n opacity: 1;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-iconEle {\n position: absolute;\n left: -18px;\n top: 0;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-checkbox {\n display: none !important;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-checkbox-checked + .paraui-v3-tree-node-content-wrapper {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-node-radio {\n width: 16px;\n height: 16px;\n padding: 0;\n margin-top: 4px;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable-showradio .paraui-v3-tree-node-content-wrapper {\n margin-left: 22px;\n}\n\n.paraui-v3-tree-motion-collapse {\n overflow: hidden;\n transition: height 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;\n}";
|
|
1548
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/9 下午8:39\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-tree-treenode-leaf-last .paraui-v3-tree-switcher-leaf-line::before {\n top: auto !important;\n bottom: auto !important;\n height: 14px !important;\n}\n\n@keyframes treeCheckboxEffect {\n 0% {\n transform: scale(1);\n opacity: 0.5;\n }\n 100% {\n transform: scale(1.6);\n opacity: 0;\n }\n}\n.paraui-v3-tree-rtl {\n direction: rtl;\n}\n.paraui-v3-tree-rtl .paraui-v3-tree-node-content-wrapper[draggable=true] .paraui-v3-tree-drop-indicator::after {\n right: -6px;\n left: unset;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-rtl {\n direction: rtl;\n}\n.paraui-v3-tree-rtl .paraui-v3-tree-switcher_close .paraui-v3-tree-switcher-icon svg {\n transform: rotate(90deg);\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit::before .paraui-v3-tree-rtl.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit::before {\n right: auto;\n left: -13px;\n border-right: none;\n border-left: 1px solid #d9d9d9;\n}\n.paraui-v3-tree-checkbox .paraui-v3-tree-rtl.paraui-v3-tree-checkbox {\n margin: 4px 0 0 8px;\n}\n\n.paraui-v3-tree-select-dropdown-rtl .paraui-v3-select-tree-checkbox {\n margin: 4px 0 0 8px;\n}\n\n.paraui-v3-tree-checkbox {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n position: relative;\n top: 0.2em;\n line-height: 1;\n white-space: nowrap;\n outline: none;\n cursor: pointer;\n}\n.paraui-v3-tree-checkbox-wrapper:hover .paraui-v3-tree-checkbox-inner, .paraui-v3-tree-checkbox:hover .paraui-v3-tree-checkbox-inner, .paraui-v3-tree-checkbox-input:focus + .paraui-v3-tree-checkbox-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-tree-checkbox-checked::after {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 1px solid rgb(54, 102, 214);\n border-radius: 2px;\n visibility: hidden;\n animation: treeCheckboxEffect 0.36s ease-in-out;\n animation-fill-mode: backwards;\n content: \"\";\n box-sizing: border-box;\n}\n.paraui-v3-tree-checkbox:hover::after, .paraui-v3-tree-checkbox-wrapper:hover .paraui-v3-tree-checkbox::after {\n visibility: visible;\n}\n.paraui-v3-tree-checkbox-inner {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n width: 16px;\n height: 16px;\n direction: ltr;\n background-color: rgb(255, 255, 255);\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n border-collapse: separate;\n transition: all 0.3s;\n}\n.paraui-v3-tree-checkbox-inner::after {\n position: absolute;\n top: 50%;\n left: 21.5%;\n display: table;\n width: 6px;\n height: 9px;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n transform: rotate(45deg) scale(0) translate(-50%, -50%);\n opacity: 0;\n transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;\n content: \" \";\n box-sizing: border-box;\n}\n.paraui-v3-tree-checkbox-input {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n cursor: pointer;\n opacity: 0;\n}\n\n.paraui-v3-tree-checkbox-checked .paraui-v3-tree-checkbox-inner::after {\n position: absolute;\n display: table;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n transform: rotate(45deg) scale(1) translate(-50%, -50%);\n opacity: 1;\n transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;\n content: \" \";\n}\n\n.paraui-v3-tree-checkbox-checked .paraui-v3-tree-checkbox-inner {\n background-color: rgb(54, 102, 214);\n border-color: rgb(54, 102, 214);\n}\n\n.paraui-v3-tree-checkbox-disabled {\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-disabled.paraui-v3-tree-checkbox-checked .paraui-v3-tree-checkbox-inner::after {\n border-color: rgba(0, 0, 0, 0.25);\n animation-name: none;\n}\n.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-input {\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-inner {\n background-color: #f5f5f5;\n border-color: #d9d9d9 !important;\n}\n.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-inner::after {\n border-color: #f5f5f5;\n border-collapse: separate;\n animation-name: none;\n}\n.paraui-v3-tree-checkbox-disabled + span {\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-disabled:hover::after, .paraui-v3-tree-checkbox-wrapper:hover .paraui-v3-tree-checkbox-disabled::after {\n visibility: hidden;\n}\n\n.paraui-v3-tree-checkbox-wrapper {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n display: inline-flex;\n align-items: baseline;\n line-height: unset;\n cursor: pointer;\n}\n.paraui-v3-tree-checkbox-wrapper.paraui-v3-tree-checkbox-wrapper-disabled {\n cursor: not-allowed;\n}\n.paraui-v3-tree-checkbox-wrapper + .paraui-v3-tree-checkbox-wrapper {\n margin-left: 8px;\n}\n\n.paraui-v3-tree-checkbox + span {\n padding-right: 8px;\n padding-left: 8px;\n}\n\n.paraui-v3-tree-checkbox-group {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n display: inline-block;\n}\n.paraui-v3-tree-checkbox-group-item {\n margin-right: 8px;\n}\n.paraui-v3-tree-checkbox-group-item:last-child {\n margin-right: 0;\n}\n.paraui-v3-tree-checkbox-group-item + .paraui-v3-tree-checkbox-group-item {\n margin-left: 0;\n}\n\n.paraui-v3-tree-checkbox-indeterminate .paraui-v3-tree-checkbox-inner {\n background-color: rgb(54, 102, 214);\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-tree-checkbox-indeterminate .paraui-v3-tree-checkbox-inner::after {\n top: 50%;\n left: 50%;\n width: 8px;\n height: 2px;\n background-color: rgb(255, 255, 255);\n border: 0;\n transform: translate(-50%, -50%) scale(1);\n opacity: 1;\n content: \" \";\n}\n.paraui-v3-tree-checkbox-indeterminate.paraui-v3-tree-checkbox-disabled .paraui-v3-tree-checkbox-inner::after {\n background-color: rgba(0, 0, 0, 0.25);\n border-color: rgba(0, 0, 0, 0.25);\n}\n\n.paraui-v3-tree-wrapper .paraui-v3-tree-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.paraui-v3-tree {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n background: rgb(255, 255, 255);\n border-radius: 2px;\n transition: background-color 0.3s;\n}\n.paraui-v3-tree-focused:not(:hover):not(.paraui-v3-tree-active-focused) {\n background: #e6f7ff;\n}\n.paraui-v3-tree-list-holder-inner {\n align-items: flex-start;\n}\n.paraui-v3-tree.paraui-v3-tree-block-node .paraui-v3-tree-list-holder-inner {\n align-items: stretch;\n}\n.paraui-v3-tree.paraui-v3-tree-block-node .paraui-v3-tree-list-holder-inner .paraui-v3-tree-node-content-wrapper {\n flex: auto;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode {\n display: flex;\n align-items: flex-start;\n outline: none;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-disabled .paraui-v3-tree-node-content-wrapper {\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-disabled .paraui-v3-tree-node-content-wrapper:hover {\n background: transparent;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode-active .paraui-v3-tree-node-content-wrapper {\n background: #f5f5f5;\n}\n.paraui-v3-tree .paraui-v3-tree-treenode:not(.paraui-v3-tree .paraui-v3-tree-treenode-disabled).filter-node .paraui-v3-tree-title {\n color: inherit;\n font-weight: 500;\n}\n.paraui-v3-tree-indent {\n align-self: stretch;\n white-space: nowrap;\n user-select: none;\n}\n.paraui-v3-tree-indent-unit {\n display: inline-block;\n width: 24px;\n}\n.paraui-v3-tree-switcher {\n position: relative;\n flex: none;\n align-self: stretch;\n width: 24px;\n margin: 0;\n line-height: 24px;\n text-align: center;\n cursor: pointer;\n user-select: none;\n}\n.paraui-v3-tree-switcher .paraui-v3-tree-switcher-icon,\n.paraui-v3-tree-switcher .paraui-v3-select-tree-switcher-icon {\n display: inline-block;\n font-size: 14px;\n vertical-align: middle;\n transition: transform 0.3s;\n color: inherit;\n}\n.paraui-v3-tree-switcher .paraui-v3-tree-switcher-icon svg,\n.paraui-v3-tree-switcher .paraui-v3-select-tree-switcher-icon svg {\n font-size: inherit;\n color: inherit;\n transition: transform 0.3s;\n}\n.paraui-v3-tree-switcher-noop {\n cursor: default;\n}\n.paraui-v3-tree-switcher_close .paraui-v3-tree-switcher-icon {\n transform: rotate(-90deg);\n}\n.paraui-v3-tree-switcher_close .paraui-v3-tree-switcher-icon svg {\n color: currentColor;\n transform: rotate(-90deg);\n}\n.paraui-v3-tree-switcher-loading-icon {\n color: rgb(54, 102, 214);\n will-change: transform;\n transition: transform 0.3s ease-in-out;\n animation: treeLoadingCircle 1s infinite linear;\n vertical-align: middle;\n font-size: 14px !important;\n}\n@keyframes treeLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n.paraui-v3-tree-switcher-leaf-line {\n position: relative;\n z-index: 1;\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-tree-switcher-leaf-line::before {\n position: absolute;\n top: 0;\n bottom: -4px;\n margin-left: -1px;\n border-left: 1px solid #d9d9d9;\n content: \" \";\n}\n.paraui-v3-tree-switcher-leaf-line::after {\n position: absolute;\n width: 10px;\n height: 14px;\n margin-left: -1px;\n border-bottom: 1px solid #d9d9d9;\n content: \" \";\n}\n.paraui-v3-tree-checkbox {\n top: initial;\n margin: 6px 6px 0 0;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper {\n position: relative;\n z-index: auto;\n min-height: 24px;\n margin: 2px 0 0 0;\n padding: 0 6px;\n color: inherit;\n line-height: 24px;\n background: transparent;\n border-radius: 2px;\n cursor: pointer;\n transition: all 0.3s, border 0s, line-height 0s, box-shadow 0s;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper:hover {\n background-color: rgba(171, 176, 185, 0.12);\n border-radius: 4px;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper.paraui-v3-tree-node-selected {\n background-color: transparent;\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper .paraui-v3-tree-iconEle {\n display: inline-block;\n width: 24px;\n height: 24px;\n margin-left: -6px;\n line-height: 24px;\n text-align: center;\n vertical-align: top;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper .paraui-v3-tree-iconEle > svg {\n vertical-align: -0.125em;\n color: inherit;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper .paraui-v3-tree-iconEle:empty {\n display: none;\n}\n.paraui-v3-tree-unselectable .paraui-v3-tree-node-content-wrapper:hover {\n background-color: transparent;\n}\n.paraui-v3-tree-node-content-wrapper[draggable=true] {\n line-height: 24px;\n user-select: none;\n}\n.paraui-v3-tree-node-content-wrapper[draggable=true] .paraui-v3-tree-drop-indicator {\n position: absolute;\n z-index: 1;\n height: 2px;\n background-color: rgb(54, 102, 214);\n border-radius: 1px;\n pointer-events: none;\n}\n.paraui-v3-tree-node-content-wrapper[draggable=true] .paraui-v3-tree-drop-indicator::after {\n position: absolute;\n top: -3px;\n left: -6px;\n width: 8px;\n height: 8px;\n background-color: transparent;\n border: 2px solid rgb(54, 102, 214);\n border-radius: 50%;\n content: \"\";\n}\n.paraui-v3-tree .paraui-v3-tree-treenode.drop-container > [draggable] {\n box-shadow: 0 0 0 2px rgb(54, 102, 214);\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit {\n position: relative;\n height: 100%;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit::before {\n position: absolute;\n top: 0;\n right: 12px;\n bottom: -4px;\n border-right: 1px solid #d9d9d9;\n content: \"\";\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-indent-unit-end::before {\n display: none;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher {\n background: rgb(255, 255, 255);\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher_close svg {\n transform: rotate(-90deg);\n color: inherit;\n font-size: 14px;\n transition: transform 0.3s;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher_open svg {\n color: inherit;\n font-size: 14px;\n transition: transform 0.3s;\n}\n.paraui-v3-tree-show-line .paraui-v3-tree-switcher-line-icon {\n vertical-align: -0.225em;\n color: inherit;\n font-size: 14px;\n}\n.paraui-v3-tree-node-content-wrapper {\n overflow: hidden;\n}\n.paraui-v3-tree-node-content-wrapper .paraui-v3-tree-title {\n display: flex;\n align-items: center;\n}\n.paraui-v3-tree-node-content-wrapper .paraui-v3-tree-treenode-more-wrapper {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper--active {\n background-color: rgba(171, 176, 185, 0.12) !important;\n border-radius: 4px !important;\n}\n.paraui-v3-tree .paraui-v3-tree-node-content-wrapper--active .sector-anchor {\n opacity: 1 !important;\n}\n.paraui-v3-tree.paraui-v3-tree-block-node .paraui-v3-tree-list-holder-inner .paraui-v3-tree-node-content-wrapper {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper {\n display: inline-flex;\n align-items: center;\n margin: 0 -6px;\n padding: 0 6px;\n overflow: hidden;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor {\n position: relative;\n width: 14px;\n height: 14px;\n margin: 1px 0 0 18px;\n line-height: 14px;\n opacity: 0;\n transition: opacity 0.3s;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor:before {\n content: \" \";\n position: absolute;\n left: -9px;\n top: 0;\n width: 1px;\n height: 14px;\n background-color: rgba(171, 176, 185, 0.2);\n pointer-events: none;\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor svg {\n font-size: 14px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper .sector-anchor--active.sector-anchor svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree .paraui-v3-tree-title-wrapper--active .sector-anchor {\n opacity: 1;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-iconEle {\n position: absolute;\n left: 8px;\n top: 0;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-checkbox {\n display: none !important;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-checkbox-checked + .paraui-v3-tree-node-content-wrapper {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-tree.paraui-v3-tree-radioable .paraui-v3-tree-node-radio {\n width: 16px;\n height: 16px;\n padding: 0;\n margin-top: 4px;\n}\n.paraui-v3-tree.paraui-v3-tree-radioable-showradio .paraui-v3-tree-node-content-wrapper {\n padding-left: 28px;\n}\n\n.paraui-v3-tree-motion-collapse {\n overflow: hidden;\n transition: height 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;\n}";
|
|
1583
1549
|
styleInject(css_248z);
|
|
1584
1550
|
|
|
1585
1551
|
export { Tree as T };
|
|
@@ -267,7 +267,7 @@ var validate = function validate(item, val) {
|
|
|
267
267
|
return false;
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n
|
|
270
|
+
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.form-file {\n padding: 6px;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n}\n.form-file .file-tips {\n min-height: 20px;\n position: relative;\n padding: 6px;\n}\n.form-file .file-tips .file-tips-item {\n position: relative;\n height: 20px;\n line-height: 16px;\n padding-right: 20px;\n}\n.form-file .file-tips .file-tips-item > [data-name=LinkGroup] {\n vertical-align: middle;\n margin-right: 9px;\n}\n.form-file .file-tips .file-tips-item .file-tips-context {\n display: inline-block;\n vertical-align: middle;\n width: calc(100% - 45px);\n color: rgba(46, 55, 67, 0.7);\n}\n.form-file .file-tips .file-tips-item > [data-name=Delete] {\n display: none;\n vertical-align: middle;\n cursor: pointer;\n position: absolute;\n right: 3px;\n top: 2px;\n}\n.form-file .file-tips .file-tips-item > [data-name=Delete]:hover {\n opacity: 0.8;\n}\n.form-file .file-tips .file-tips-item:hover {\n backgroundColor: #f5f5f5;\n}\n.form-file .file-tips .file-tips-item:hover > [data-name=Delete] {\n display: inline-block;\n}";
|
|
271
271
|
styleInject(css_248z$1);
|
|
272
272
|
|
|
273
273
|
/**
|
|
@@ -664,7 +664,7 @@ var ErrorTips = function ErrorTips(props) {
|
|
|
664
664
|
}, helperTextProps));
|
|
665
665
|
};
|
|
666
666
|
|
|
667
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n
|
|
667
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-form-item {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v3-form-item.paraui-v3-form-item-checkGroup .form-label .form-labe-text, .paraui-v3-form-item.paraui-v3-form-item-radioGroup .form-label .form-labe-text {\n margin-bottom: 4px;\n}\n.paraui-v3-form-item .form-label {\n display: inline-block;\n}\n.paraui-v3-form-item .form-edit > div {\n padding: 0;\n width: 100%;\n}\n.paraui-v3-form-item .form-content-vertical {\n display: inline-block;\n width: 100%;\n}";
|
|
668
668
|
styleInject(css_248z);
|
|
669
669
|
|
|
670
670
|
var formInputTypeJson = {
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import RcDropdown from 'rc-dropdown';
|
|
4
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from './constant-bf34e6fa.js';
|
|
5
|
+
import { u as usePopupContainer } from './usePopupContainer-7bbd7720.js';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
|
+
import { UUID } from '@paraview/lib';
|
|
9
|
+
import { s as styleInject } from './style-inject.es-300983ab.js';
|
|
10
|
+
|
|
11
|
+
function getPlaceholder(picker, locale, customizePlaceholder) {
|
|
12
|
+
if (customizePlaceholder !== undefined) {
|
|
13
|
+
return customizePlaceholder;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (picker === 'year' && locale.lang.yearPlaceholder) {
|
|
17
|
+
return locale.lang.yearPlaceholder;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (picker === 'quarter' && locale.lang.quarterPlaceholder) {
|
|
21
|
+
return locale.lang.quarterPlaceholder;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (picker === 'month' && locale.lang.monthPlaceholder) {
|
|
25
|
+
return locale.lang.monthPlaceholder;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (picker === 'week' && locale.lang.weekPlaceholder) {
|
|
29
|
+
return locale.lang.weekPlaceholder;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (picker === 'time' && locale.timePickerLocale.placeholder) {
|
|
33
|
+
return locale.timePickerLocale.placeholder;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return locale.lang.placeholder;
|
|
37
|
+
}
|
|
38
|
+
function getRangePlaceholder(picker, locale, customizePlaceholder) {
|
|
39
|
+
if (customizePlaceholder !== undefined) {
|
|
40
|
+
return customizePlaceholder;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (picker === 'year' && locale.lang.yearPlaceholder) {
|
|
44
|
+
return locale.lang.rangeYearPlaceholder;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (picker === 'month' && locale.lang.monthPlaceholder) {
|
|
48
|
+
return locale.lang.rangeMonthPlaceholder;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (picker === 'week' && locale.lang.weekPlaceholder) {
|
|
52
|
+
return locale.lang.rangeWeekPlaceholder;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (picker === 'time' && locale.timePickerLocale.placeholder) {
|
|
56
|
+
return locale.timePickerLocale.rangePlaceholder;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return locale.lang.rangePlaceholder;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function toArray(list) {
|
|
63
|
+
if (!list) {
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return Array.isArray(list) ? list : [list];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function getTimeProps(props) {
|
|
71
|
+
var format = props.format,
|
|
72
|
+
picker = props.picker,
|
|
73
|
+
showHour = props.showHour,
|
|
74
|
+
showMinute = props.showMinute,
|
|
75
|
+
showSecond = props.showSecond,
|
|
76
|
+
use12Hours = props.use12Hours;
|
|
77
|
+
var firstFormat = toArray(format)[0];
|
|
78
|
+
var showTimeObj = Object.assign({}, props);
|
|
79
|
+
|
|
80
|
+
if (firstFormat && typeof firstFormat === 'string') {
|
|
81
|
+
if (!firstFormat.includes('s') && showSecond === undefined) {
|
|
82
|
+
showTimeObj.showSecond = false;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (!firstFormat.includes('m') && showMinute === undefined) {
|
|
86
|
+
showTimeObj.showMinute = false;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (!firstFormat.includes('H') && !firstFormat.includes('h') && showHour === undefined) {
|
|
90
|
+
showTimeObj.showHour = false;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if ((firstFormat.includes('a') || firstFormat.includes('A')) && use12Hours === undefined) {
|
|
94
|
+
showTimeObj.use12Hours = true;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (picker === 'time') {
|
|
99
|
+
return showTimeObj;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (typeof firstFormat === 'function') {
|
|
103
|
+
delete showTimeObj.format;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
showTime: showTimeObj
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function formatPickerValue(value, format) {
|
|
111
|
+
if (typeof value === 'string') {
|
|
112
|
+
if (value === '') return null;
|
|
113
|
+
|
|
114
|
+
if (format) {
|
|
115
|
+
if (dayjs(value, format).isValid()) return dayjs(value, format);
|
|
116
|
+
} else {
|
|
117
|
+
if (dayjs(value).isValid()) return dayjs(value);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return value;
|
|
124
|
+
}
|
|
125
|
+
function mergedLocale(locale, defaultLocale) {
|
|
126
|
+
var lang = Object.assign(Object.assign({}, defaultLocale === null || defaultLocale === void 0 ? void 0 : defaultLocale.lang), locale === null || locale === void 0 ? void 0 : locale.lang);
|
|
127
|
+
var timePickerLocale = Object.assign(Object.assign({}, defaultLocale === null || defaultLocale === void 0 ? void 0 : defaultLocale.timePickerLocale), locale === null || locale === void 0 ? void 0 : locale.timeLang);
|
|
128
|
+
return {
|
|
129
|
+
lang: lang,
|
|
130
|
+
timePickerLocale: timePickerLocale
|
|
131
|
+
};
|
|
132
|
+
} //最近的绝对定位滚动元素
|
|
133
|
+
|
|
134
|
+
function getNearestAbsoluteAncestor(node, pos) {
|
|
135
|
+
var _a;
|
|
136
|
+
|
|
137
|
+
var parentNode = node.parentNode;
|
|
138
|
+
var nodeName = ((_a = parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
|
|
139
|
+
|
|
140
|
+
if (['html', 'body', '#document'].includes(nodeName)) {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (parentNode instanceof window.HTMLElement) {
|
|
145
|
+
var _window$getComputedSt = window.getComputedStyle(parentNode),
|
|
146
|
+
position = _window$getComputedSt.position;
|
|
147
|
+
|
|
148
|
+
if (new RegExp(pos).test(position)) return parentNode;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return getNearestAbsoluteAncestor(parentNode, pos);
|
|
152
|
+
} //下拉弹出框关闭时,隔离dom污染
|
|
153
|
+
|
|
154
|
+
function isolationPopupPollution(open, uniqueCls) {
|
|
155
|
+
var popupDom = document.getElementsByClassName("".concat(uniqueCls))[0];
|
|
156
|
+
|
|
157
|
+
if (!open) {
|
|
158
|
+
//关闭弹框
|
|
159
|
+
if (popupDom) {
|
|
160
|
+
var nearestDom = getNearestAbsoluteAncestor(popupDom, 'absolute');
|
|
161
|
+
|
|
162
|
+
if (nearestDom) {
|
|
163
|
+
nearestDom.style.position = 'fixed';
|
|
164
|
+
nearestDom.style.left = '-9999px';
|
|
165
|
+
nearestDom.style.top = '-9999px';
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
} else {
|
|
169
|
+
//打开弹框
|
|
170
|
+
if (popupDom) {
|
|
171
|
+
var _nearestDom = getNearestAbsoluteAncestor(popupDom, 'fixed');
|
|
172
|
+
|
|
173
|
+
if (_nearestDom) {
|
|
174
|
+
_nearestDom.style.position = 'absolute';
|
|
175
|
+
_nearestDom.style.left = '0';
|
|
176
|
+
_nearestDom.style.top = '0';
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/5/27 上午9:58\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-dropdown {\n position: absolute;\n left: -9999px;\n top: -9999px;\n z-index: 1500;\n display: block;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.5715;\n background-color: rgb(255, 255, 255);\n box-shadow: 0px 2px 8px 0px rgba(171, 176, 185, 0.4);\n border-radius: 4px;\n}\n.paraui-v3-dropdown.component-dropdown-hidden {\n display: none;\n}\n.paraui-v3-dropdown .component-dropdown-arrow {\n position: absolute;\n border-width: 4px;\n border-color: transparent;\n box-shadow: 0px 2px 8px 0px rgba(171, 176, 185, 0.4);\n border-style: solid;\n transform: rotate(45deg);\n}\n.paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-top, .paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-topLeft, .paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-topRight {\n padding-bottom: 6px;\n}\n.paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-bottom, .paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-bottomLeft, .paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-bottomRight {\n padding-top: 6px;\n}\n.paraui-v3-dropdown.component-dropdown-placement-top .component-dropdown-arrow, .paraui-v3-dropdown.component-dropdown-placement-topLeft .component-dropdown-arrow, .paraui-v3-dropdown.component-dropdown-placement-topRight .component-dropdown-arrow {\n bottom: 4px;\n border-top-color: rgb(255, 255, 255);\n}\n.paraui-v3-dropdown.component-dropdown-placement-top .component-dropdown-arrow {\n left: 50%;\n}\n.paraui-v3-dropdown.component-dropdown-placement-topLeft .component-dropdown-arrow {\n left: 15%;\n}\n.paraui-v3-dropdown.component-dropdown-placement-topRight .component-dropdown-arrow {\n right: 15%;\n}\n.paraui-v3-dropdown.component-dropdown-placement-bottom .component-dropdown-arrow, .paraui-v3-dropdown.component-dropdown-placement-bottomLeft .component-dropdown-arrow, .paraui-v3-dropdown.component-dropdown-placement-bottomRight .component-dropdown-arrow {\n top: 4px;\n border-bottom-color: rgb(255, 255, 255);\n}\n.paraui-v3-dropdown.component-dropdown-placement-bottom .component-dropdown-arrow {\n left: 50%;\n}\n.paraui-v3-dropdown.component-dropdown-placement-bottomLeft .component-dropdown-arrow {\n left: 15%;\n}\n.paraui-v3-dropdown.component-dropdown-placement-bottomRight .component-dropdown-arrow {\n right: 15%;\n}\n\n.component-dropdown-slide-up-enter,\n.component-dropdown-slide-up-appear {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n transform-origin: 0 0;\n display: block !important;\n opacity: 0;\n animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);\n animation-play-state: paused;\n}\n\n.component-dropdown-slide-up-leave {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n transform-origin: 0 0;\n display: block !important;\n opacity: 1;\n animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);\n animation-play-state: paused;\n}\n\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-bottomLeft,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-bottomLeft,\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-bottomCenter,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-bottomCenter,\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-bottomRight,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-bottomRight {\n animation-name: componentDropdownSlideUpIn;\n animation-play-state: running;\n}\n\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-topLeft,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-topLeft,\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-topCenter,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-topCenter,\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-topRight,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-topRight {\n animation-name: componentDropdownSlideDownIn;\n animation-play-state: running;\n}\n\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-bottomLeft,\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-bottomCenter,\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-bottomRight {\n animation-name: componentDropdownSlideUpOut;\n animation-play-state: running;\n}\n\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-topLeft,\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-topCenter,\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-topRight {\n animation-name: componentDropdownSlideDownOut;\n animation-play-state: running;\n}\n\n@keyframes componentDropdownSlideUpIn {\n 0% {\n opacity: 0;\n transform-origin: 0% 0%;\n transform: scaleY(0);\n }\n 100% {\n opacity: 1;\n transform-origin: 0% 0%;\n transform: scaleY(1);\n }\n}\n@keyframes componentDropdownSlideUpOut {\n 0% {\n opacity: 1;\n transform-origin: 0% 0%;\n transform: scaleY(1);\n }\n 100% {\n opacity: 0;\n transform-origin: 0% 0%;\n transform: scaleY(0);\n }\n}\n@keyframes componentDropdownSlideDownIn {\n 0% {\n opacity: 0;\n transform-origin: 0% 100%;\n transform: scaleY(0);\n }\n 100% {\n opacity: 1;\n transform-origin: 0% 100%;\n transform: scaleY(1);\n }\n}\n@keyframes componentDropdownSlideDownOut {\n 0% {\n opacity: 1;\n transform-origin: 0% 100%;\n transform: scaleY(1);\n }\n 100% {\n opacity: 0;\n transform-origin: 0% 100%;\n transform: scaleY(0);\n }\n}";
|
|
183
|
+
styleInject(css_248z);
|
|
184
|
+
|
|
185
|
+
var getDropdownOffset = function getDropdownOffset(place) {
|
|
186
|
+
var _a, _b;
|
|
187
|
+
|
|
188
|
+
var offsetMap = {
|
|
189
|
+
top: {
|
|
190
|
+
offset: [0, -8]
|
|
191
|
+
},
|
|
192
|
+
topLeft: {
|
|
193
|
+
offset: [0, -8]
|
|
194
|
+
},
|
|
195
|
+
topRight: {
|
|
196
|
+
offset: [0, -8]
|
|
197
|
+
},
|
|
198
|
+
bottom: {
|
|
199
|
+
offset: [0, 8]
|
|
200
|
+
},
|
|
201
|
+
bottomRight: {
|
|
202
|
+
offset: [0, 8]
|
|
203
|
+
},
|
|
204
|
+
bottomLeft: {
|
|
205
|
+
offset: [0, 8]
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
return (_b = (_a = offsetMap[place]) === null || _a === void 0 ? void 0 : _a.offset) !== null && _b !== void 0 ? _b : [0, 0];
|
|
209
|
+
}; //dropdown
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
var Dropdown = function Dropdown(props) {
|
|
213
|
+
var wrapRef = React__default.useRef();
|
|
214
|
+
var getPopupContainer = usePopupContainer(wrapRef, props.getPopupContainer);
|
|
215
|
+
var uuidRef = React__default.useRef(UUID()); //visible change
|
|
216
|
+
|
|
217
|
+
var handleVisibleChange = function handleVisibleChange(visible) {
|
|
218
|
+
var _a;
|
|
219
|
+
|
|
220
|
+
(_a = props.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(props, visible);
|
|
221
|
+
|
|
222
|
+
if (props.isolationPopupOnHide) {
|
|
223
|
+
//关闭时隔离dom污染
|
|
224
|
+
isolationPopupPollution(visible, uuidRef.current);
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
return jsx(RcDropdown, Object.assign({}, props, {
|
|
229
|
+
prefixCls: "".concat($rcPrefixCls, "-dropdown"),
|
|
230
|
+
overlayClassName: clsx("".concat($prefixCls, "-dropdown"), props.overlayClassName, uuidRef.current),
|
|
231
|
+
animation: "slide-up",
|
|
232
|
+
align: {
|
|
233
|
+
offset: getDropdownOffset(props.placement)
|
|
234
|
+
},
|
|
235
|
+
getPopupContainer: getPopupContainer,
|
|
236
|
+
ref: wrapRef,
|
|
237
|
+
onVisibleChange: handleVisibleChange
|
|
238
|
+
}, {
|
|
239
|
+
children: props.children
|
|
240
|
+
}));
|
|
241
|
+
};
|
|
242
|
+
Dropdown.defaultProps = {
|
|
243
|
+
mouseEnterDelay: 0.15,
|
|
244
|
+
mouseLeaveDelay: 0.1,
|
|
245
|
+
trigger: ['hover'],
|
|
246
|
+
placement: 'bottomRight',
|
|
247
|
+
isolationPopupOnHide: false
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
export { Dropdown as D, getPlaceholder as a, getRangePlaceholder as b, formatPickerValue as f, getTimeProps as g, isolationPopupPollution as i, mergedLocale as m };
|
|
File without changes
|
|
@@ -37,7 +37,7 @@ function usePopupContainer(wrapRef, customizeContainer) {
|
|
|
37
37
|
var popupRef = React__default.useRef(); //浮层渲染容器
|
|
38
38
|
|
|
39
39
|
var getPopupContainer = function getPopupContainer(triggerNode) {
|
|
40
|
-
var _a, _b;
|
|
40
|
+
var _a, _b, _c;
|
|
41
41
|
|
|
42
42
|
var container;
|
|
43
43
|
|
|
@@ -50,7 +50,7 @@ function usePopupContainer(wrapRef, customizeContainer) {
|
|
|
50
50
|
container = document.body;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
if (
|
|
53
|
+
if (((_c = window.getComputedStyle(container)) === null || _c === void 0 ? void 0 : _c.position) === 'static') {
|
|
54
54
|
container.style.position = 'relative';
|
|
55
55
|
}
|
|
56
56
|
|
package/index.js
CHANGED
|
@@ -17,11 +17,11 @@ export { Container } from './Container/index.js';
|
|
|
17
17
|
export { default as DatePicker } from './DatePicker/index.js';
|
|
18
18
|
export { Desktop } from './Desktop/index.js';
|
|
19
19
|
export { Drawer } from './Drawer/index.js';
|
|
20
|
-
export { Dropdown } from './
|
|
20
|
+
export { D as Dropdown } from './_verture/index-ffd2b2cb.js';
|
|
21
21
|
export { default as Empty } from './Empty/index.js';
|
|
22
22
|
export { default as Form } from './Form/index.js';
|
|
23
|
-
export { F as FormItem } from './_verture/index-
|
|
24
|
-
export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-
|
|
23
|
+
export { F as FormItem } from './_verture/index-cef53318.js';
|
|
24
|
+
export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-ba1b0528.js';
|
|
25
25
|
export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
|
|
26
26
|
export { default as Help } from './Help/index.js';
|
|
27
27
|
export { default as HelperText } from './HelperText/index.js';
|
|
@@ -67,7 +67,7 @@ export { Title } from './Title/index.js';
|
|
|
67
67
|
export { ToggleButton, ToggleButtonGroup } from './ToggleButton/index.js';
|
|
68
68
|
export { Tooltip } from './Tooltip/index.js';
|
|
69
69
|
export { SSortablejs, Transfer } from './Transfer/index.js';
|
|
70
|
-
export { T as Tree } from './_verture/index-
|
|
70
|
+
export { T as Tree } from './_verture/index-31ce5a11.js';
|
|
71
71
|
export { default as Upload } from './Upload/index.js';
|
|
72
72
|
import './_verture/slicedToArray-d7722f4b.js';
|
|
73
73
|
import 'react/jsx-runtime';
|
|
@@ -105,13 +105,13 @@ import 'rc-picker/es/generate/dayjs';
|
|
|
105
105
|
import 'rc-picker';
|
|
106
106
|
import '@para-ui/icons/Calendar';
|
|
107
107
|
import '@para-ui/icons/Time';
|
|
108
|
-
import 'dayjs';
|
|
109
108
|
import 'rc-picker/lib/locale/en_US';
|
|
110
109
|
import 'rc-picker/lib/locale/zh_CN';
|
|
111
|
-
import './_verture/usePopupContainer-
|
|
110
|
+
import './_verture/usePopupContainer-7bbd7720.js';
|
|
112
111
|
import '@para-ui/icons/SortRight';
|
|
113
112
|
import 'rc-drawer';
|
|
114
113
|
import 'rc-dropdown';
|
|
114
|
+
import 'dayjs';
|
|
115
115
|
import './_verture/useGlobalProps-af9a2af6.js';
|
|
116
116
|
import '@para-ui/icons/Delete';
|
|
117
117
|
import '@para-ui/icons/LinkGroup';
|