@teamix/pro 1.4.25-bugfix.2 → 1.4.25-bugfix.3
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/dist/pro.css +1 -1
- package/dist/pro.js +64943 -84006
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +6 -13
- package/es/actions/base.js +21 -8
- package/es/actions/dialog-component.js +9 -2
- package/es/actions/dialog-form.js +75 -37
- package/es/actions/dialog-info.js +5 -1
- package/es/actions/dialog.js +95 -57
- package/es/actions/index.d.ts +0 -7
- package/es/actions/index.js +153 -93
- package/es/actions/index.scss +1 -6
- package/es/actions/link.js +5 -3
- package/es/actions/request.js +27 -12
- package/es/actions/utils.js +9 -1
- package/es/card/card-container.js +5 -0
- package/es/card/divider.js +5 -0
- package/es/card/index.js +100 -61
- package/es/card/index.scss +0 -15
- package/es/card/selectable.js +13 -4
- package/es/card/tab.js +10 -1
- package/es/card/utils.js +2 -0
- package/es/form/Components/Editable/index.js +55 -16
- package/es/form/Components/FormGroup/index.d.ts +0 -1
- package/es/form/Components/FormGroup/index.js +22 -7
- package/es/form/Components/LightFilter/index.js +35 -15
- package/es/form/Components/ProField/index.js +14 -2
- package/es/form/Components/ProField/mapDateFormat.js +28 -2
- package/es/form/Components/Text/index.d.ts +0 -1
- package/es/form/Components/Text/index.js +11 -2
- package/es/form/Filter/AdvancedFilter.js +26 -11
- package/es/form/Filter/Layout.js +24 -11
- package/es/form/Filter/LightFilter.js +24 -13
- package/es/form/Filter/SimpleFilter.js +21 -7
- package/es/form/Filter/index.js +171 -117
- package/es/form/Filter/index2.js +28 -11
- package/es/form/Filter/layout.scss +1 -1
- package/es/form/Filter/useBindUrl.js +46 -18
- package/es/form/Filter/useSpecialProps.js +13 -8
- package/es/form/ProForm/customComponent.js +5 -0
- package/es/form/ProForm/index.js +38 -30
- package/es/form/ProForm/useAutoLayout.js +42 -21
- package/es/form/ProForm/useAutoSubmit.js +8 -3
- package/es/form/ProForm/useFieldRequest.js +5 -0
- package/es/form/ProForm/useFormDisplayValues.js +28 -12
- package/es/form/ProForm/useInitialRequest.js +5 -0
- package/es/form/SchemaForm/adapterComponent.js +3 -0
- package/es/form/SchemaForm/adapterDecorator.d.ts +1 -1
- package/es/form/SchemaForm/adapterDecorator.js +8 -0
- package/es/form/SchemaForm/adapterType.js +2 -0
- package/es/form/SchemaForm/index.js +114 -78
- package/es/form/SchemaForm/initializeArrayCards.js +6 -0
- package/es/form/SchemaForm/initializeArrayCollapse.js +6 -0
- package/es/form/SchemaForm/initializeArrayItems.js +9 -2
- package/es/form/SchemaForm/initializeArrayTable.js +34 -21
- package/es/form/SchemaForm/initializeDataSource.js +6 -2
- package/es/form/SchemaForm/initializeFormButton.js +31 -14
- package/es/form/SchemaForm/initializeFormCollapse.js +18 -8
- package/es/form/SchemaForm/initializeFormGroup.js +20 -10
- package/es/form/SchemaForm/initializeFormStep.js +23 -11
- package/es/form/SchemaForm/initializeFormTab.js +20 -10
- package/es/form/SchemaForm/initializeReactions.js +33 -9
- package/es/form/SchemaForm/initializeRequest.js +16 -2
- package/es/form/SchemaForm/initializeRules.js +22 -4
- package/es/form/SchemaForm/initializeSelectTable.js +33 -7
- package/es/form/SchemaForm/reactions.js +34 -19
- package/es/form/docs/ActionResponse.d.ts +0 -1
- package/es/form/index.d.ts +9 -9
- package/es/form/index.js +9 -0
- package/es/form/typing.d.ts +4 -26
- package/es/form/utils.d.ts +1 -1
- package/es/form/utils.js +49 -4
- package/es/form/warning.js +7 -2
- package/es/global.scss +1 -3
- package/es/index-without-icon.js +3 -4
- package/es/index.d.ts +1 -1
- package/es/index.js +8 -18
- package/es/info/components/InfoGroup/index.js +32 -21
- package/es/info/components/InfoValueItem/index.js +119 -66
- package/es/info/components/ProInfoItem/index.js +21 -13
- package/es/info/components/baseInfo/index.js +27 -17
- package/es/info/components/headerInfo/index.js +20 -8
- package/es/info/components/tableInfo/index.js +50 -20
- package/es/info/index.js +86 -61
- package/es/info/typing.d.ts +0 -2
- package/es/info/utils/index.js +11 -0
- package/es/nocode/configurators/ProTable.js +22 -1
- package/es/nocode/configurators/common.js +6 -5
- package/es/nocode/configurators/index.js +3 -2
- package/es/nocode/index.js +6 -6
- package/es/nocode/pages/editor.js +9 -5
- package/es/nocode/pages/index.js +30 -5
- package/es/nocode/pages/playground.js +35 -18
- package/es/nocode/pages/renderer.js +42 -9
- package/es/nocode/playground.js +23 -10
- package/es/page-header/index.d.ts +2 -2
- package/es/page-header/index.js +76 -40
- package/es/page-header/index.scss +1 -2
- package/es/sidebar/components/sidebar-container/index.js +69 -54
- package/es/sidebar/components/sidebar-container/index.scss +14 -21
- package/es/sidebar/components/tree/index.js +138 -100
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +26 -11
- package/es/sidebar/components/tree-node/components/IconAction/index.js +35 -9
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +25 -12
- package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/es/sidebar/components/tree-node/index.js +84 -42
- package/es/sidebar/components/tree-node/index.scss +0 -6
- package/es/sidebar/index.d.ts +0 -2
- package/es/sidebar/index.js +95 -72
- package/es/sidebar/typing.d.ts +0 -4
- package/es/sidebar/utils/action-ref.js +7 -2
- package/es/sidebar/utils/index.d.ts +2 -5
- package/es/sidebar/utils/index.js +98 -41
- package/es/table/components/Filter/index.d.ts +3 -6
- package/es/table/components/Filter/index.js +128 -115
- package/es/table/components/Layout/index.js +47 -32
- package/es/table/components/Layout/index.scss +1 -2
- package/es/table/components/Pagination/index.js +58 -25
- package/es/table/components/QuickAction/index.d.ts +0 -1
- package/es/table/components/QuickAction/index.js +11 -3
- package/es/table/components/ToolBar/DensityIcon.js +31 -19
- package/es/table/components/ToolBar/FilterColumnIcon.js +125 -87
- package/es/table/components/ToolBar/FullScreenIcon.js +62 -7
- package/es/table/components/ToolBar/Fullscreen.js +28 -25
- package/es/table/components/ToolBar/RefreshIcon.js +27 -162
- package/es/table/components/ToolBar/index.d.ts +1 -1
- package/es/table/components/ToolBar/index.js +38 -130
- package/es/table/components/ToolBar/index.scss +3 -49
- package/es/table/index.js +423 -455
- package/es/table/index.scss +0 -8
- package/es/table/typing.d.ts +6 -125
- package/es/table/utils/columnRender.d.ts +3 -3
- package/es/table/utils/columnRender.js +79 -39
- package/es/table/utils/genProColumnToColumn.d.ts +2 -2
- package/es/table/utils/genProColumnToColumn.js +16 -13
- package/es/table/utils/index.js +47 -14
- package/es/table/utils/pureColumnRender.js +53 -21
- package/es/table/utils/pureGenProColumnToColumn.d.ts +1 -1
- package/es/table/utils/pureGenProColumnToColumn.js +10 -2
- package/es/table/utils/useTableSelection.js +33 -6
- package/es/templates/List/index.js +9 -2
- package/es/timeline/ProTimeLineItem/index.js +65 -25
- package/es/timeline/index.js +22 -8
- package/es/timeline/typing.d.ts +0 -1
- package/es/utils/message.d.ts +2 -2
- package/es/utils/message.js +5 -0
- package/lib/actions/base.js +24 -8
- package/lib/actions/confirm.js +5 -0
- package/lib/actions/danger-confirm.js +5 -0
- package/lib/actions/danger-pop-confirm.js +4 -0
- package/lib/actions/dialog-component.js +15 -2
- package/lib/actions/dialog-form.js +89 -36
- package/lib/actions/dialog-info.js +10 -1
- package/lib/actions/dialog-table.js +5 -0
- package/lib/actions/dialog.js +112 -55
- package/lib/actions/drawer-form.js +3 -0
- package/lib/actions/drawer-info.js +3 -0
- package/lib/actions/drawer-table.js +3 -0
- package/lib/actions/drawer.js +4 -0
- package/lib/actions/error.js +5 -0
- package/lib/actions/index.d.ts +0 -7
- package/lib/actions/index.js +184 -115
- package/lib/actions/index.scss +1 -6
- package/lib/actions/link.js +10 -1
- package/lib/actions/notice.js +5 -0
- package/lib/actions/pop-confirm.js +5 -0
- package/lib/actions/request.js +32 -8
- package/lib/actions/utils.js +9 -1
- package/lib/card/card-container.js +9 -0
- package/lib/card/divider.js +7 -0
- package/lib/card/index.js +127 -61
- package/lib/card/index.scss +0 -15
- package/lib/card/selectable.js +20 -4
- package/lib/card/tab.js +14 -1
- package/lib/card/utils.js +6 -0
- package/lib/field/index.js +6 -0
- package/lib/form/Components/Editable/index.js +65 -15
- package/lib/form/Components/FormGroup/index.d.ts +0 -1
- package/lib/form/Components/FormGroup/index.js +28 -7
- package/lib/form/Components/LightFilter/index.js +47 -15
- package/lib/form/Components/ProField/index.js +21 -2
- package/lib/form/Components/ProField/mapDateFormat.js +32 -2
- package/lib/form/Components/Text/index.d.ts +0 -1
- package/lib/form/Components/Text/index.js +16 -2
- package/lib/form/Filter/AdvancedFilter.js +34 -11
- package/lib/form/Filter/Layout.js +33 -11
- package/lib/form/Filter/LightFilter.js +32 -13
- package/lib/form/Filter/SimpleFilter.js +27 -5
- package/lib/form/Filter/index.js +191 -116
- package/lib/form/Filter/index2.js +38 -11
- package/lib/form/Filter/layout.scss +1 -1
- package/lib/form/Filter/useBindUrl.js +50 -18
- package/lib/form/Filter/useSpecialProps.js +13 -6
- package/lib/form/ProForm/customComponent.js +8 -0
- package/lib/form/ProForm/index.js +60 -30
- package/lib/form/ProForm/useAutoLayout.js +45 -21
- package/lib/form/ProForm/useAutoSubmit.js +10 -1
- package/lib/form/ProForm/useFieldRequest.js +8 -0
- package/lib/form/ProForm/useFormDisplayValues.js +34 -12
- package/lib/form/ProForm/useInitialRequest.js +6 -0
- package/lib/form/SchemaForm/adapterComponent.js +6 -0
- package/lib/form/SchemaForm/adapterDecorator.d.ts +1 -1
- package/lib/form/SchemaForm/adapterDecorator.js +12 -0
- package/lib/form/SchemaForm/adapterType.js +5 -0
- package/lib/form/SchemaForm/index.js +144 -78
- package/lib/form/SchemaForm/initializeArrayCards.js +7 -0
- package/lib/form/SchemaForm/initializeArrayCollapse.js +7 -0
- package/lib/form/SchemaForm/initializeArrayItems.js +10 -2
- package/lib/form/SchemaForm/initializeArrayTable.js +34 -21
- package/lib/form/SchemaForm/initializeDataSource.js +8 -2
- package/lib/form/SchemaForm/initializeFormButton.js +32 -14
- package/lib/form/SchemaForm/initializeFormCollapse.js +18 -8
- package/lib/form/SchemaForm/initializeFormGroup.js +20 -10
- package/lib/form/SchemaForm/initializeFormStep.js +23 -11
- package/lib/form/SchemaForm/initializeFormTab.js +20 -10
- package/lib/form/SchemaForm/initializeReactions.js +37 -9
- package/lib/form/SchemaForm/initializeRequest.js +18 -2
- package/lib/form/SchemaForm/initializeRules.js +24 -4
- package/lib/form/SchemaForm/initializeSelectTable.js +36 -7
- package/lib/form/SchemaForm/reactions.js +37 -17
- package/lib/form/docs/ActionResponse.d.ts +0 -1
- package/lib/form/docs/ActionResponse.js +5 -0
- package/lib/form/index.d.ts +9 -9
- package/lib/form/index.js +25 -0
- package/lib/form/typing.d.ts +4 -26
- package/lib/form/utils.d.ts +1 -1
- package/lib/form/utils.js +61 -4
- package/lib/form/warning.js +8 -2
- package/lib/global.scss +1 -3
- package/lib/hooks/index.js +5 -0
- package/lib/index-without-icon.js +36 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +40 -13
- package/lib/info/components/InfoGroup/index.js +42 -21
- package/lib/info/components/InfoValueItem/index.js +134 -66
- package/lib/info/components/ProInfoItem/index.js +29 -13
- package/lib/info/components/baseInfo/index.js +39 -17
- package/lib/info/components/headerInfo/index.js +31 -8
- package/lib/info/components/tableInfo/index.js +62 -20
- package/lib/info/index.js +101 -61
- package/lib/info/typing.d.ts +0 -2
- package/lib/info/utils/index.js +19 -0
- package/lib/info/utils/utils.js +1 -0
- package/lib/nocode/configurators/PageHeader.js +2 -0
- package/lib/nocode/configurators/ProTable.js +24 -1
- package/lib/nocode/configurators/common.js +10 -5
- package/lib/nocode/configurators/index.js +10 -2
- package/lib/nocode/configurators/map.js +5 -0
- package/lib/nocode/index.js +11 -0
- package/lib/nocode/pages/editor.js +19 -5
- package/lib/nocode/pages/index.js +35 -3
- package/lib/nocode/pages/playground.js +52 -18
- package/lib/nocode/pages/renderer.js +53 -9
- package/lib/nocode/playground.js +35 -10
- package/lib/page-container/index.js +6 -0
- package/lib/page-header/index.d.ts +2 -2
- package/lib/page-header/index.js +90 -39
- package/lib/page-header/index.scss +1 -2
- package/lib/sidebar/components/sidebar-container/index.js +81 -54
- package/lib/sidebar/components/sidebar-container/index.scss +14 -21
- package/lib/sidebar/components/tree/index.js +152 -100
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +34 -11
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +46 -9
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +35 -12
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/lib/sidebar/components/tree-node/index.js +100 -42
- package/lib/sidebar/components/tree-node/index.scss +0 -6
- package/lib/sidebar/index.d.ts +0 -2
- package/lib/sidebar/index.js +111 -79
- package/lib/sidebar/typing.d.ts +0 -4
- package/lib/sidebar/utils/action-ref.js +8 -2
- package/lib/sidebar/utils/index.d.ts +2 -5
- package/lib/sidebar/utils/index.js +106 -41
- package/lib/skeleton/index.js +6 -0
- package/lib/table/components/EmptyContent/index.js +6 -0
- package/lib/table/components/Filter/index.d.ts +3 -6
- package/lib/table/components/Filter/index.js +137 -114
- package/lib/table/components/Layout/index.js +60 -32
- package/lib/table/components/Layout/index.scss +1 -2
- package/lib/table/components/Pagination/index.js +68 -25
- package/lib/table/components/QuickAction/index.d.ts +0 -1
- package/lib/table/components/QuickAction/index.js +15 -3
- package/lib/table/components/ToolBar/DensityIcon.js +42 -19
- package/lib/table/components/ToolBar/FilterColumnIcon.js +136 -86
- package/lib/table/components/ToolBar/FullScreenIcon.js +74 -10
- package/lib/table/components/ToolBar/Fullscreen.js +35 -25
- package/lib/table/components/ToolBar/RefreshIcon.js +36 -164
- package/lib/table/components/ToolBar/index.d.ts +1 -1
- package/lib/table/components/ToolBar/index.js +47 -133
- package/lib/table/components/ToolBar/index.scss +3 -49
- package/lib/table/index.js +445 -454
- package/lib/table/index.scss +0 -8
- package/lib/table/typing.d.ts +6 -125
- package/lib/table/utils/columnRender.d.ts +3 -3
- package/lib/table/utils/columnRender.js +92 -39
- package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
- package/lib/table/utils/genProColumnToColumn.js +21 -13
- package/lib/table/utils/getTableProps.js +2 -0
- package/lib/table/utils/getTableSortIcons.js +5 -0
- package/lib/table/utils/index.js +55 -12
- package/lib/table/utils/pureColumnRender.js +64 -21
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +1 -1
- package/lib/table/utils/pureGenProColumnToColumn.js +11 -2
- package/lib/table/utils/useTableSelection.js +35 -6
- package/lib/templates/Detail/index.js +5 -0
- package/lib/templates/Form/index.js +5 -0
- package/lib/templates/List/index.js +19 -2
- package/lib/templates/index.js +6 -0
- package/lib/timeline/ProTimeLineItem/index.js +76 -25
- package/lib/timeline/index.js +33 -8
- package/lib/timeline/typing.d.ts +0 -1
- package/lib/utils/index.js +6 -0
- package/lib/utils/message.d.ts +2 -2
- package/lib/utils/message.js +10 -0
- package/package.json +1 -1
- package/dist/pro.all.min.css +0 -1
- package/dist/pro.xconsole.min.css +0 -1
- package/es/actions/quick.d.ts +0 -2
- package/es/actions/quick.js +0 -26
- package/es/card/xconsole.scss +0 -3
- package/es/form/ProForm/addCascadeEffect.d.ts +0 -2
- package/es/form/ProForm/addCascadeEffect.js +0 -203
- package/es/next-xconsole.scss +0 -34
- package/es/page-header/xconsole.scss +0 -5
- package/es/table/components/CardView/index.d.ts +0 -5
- package/es/table/components/CardView/index.js +0 -392
- package/es/table/components/CardView/index.scss +0 -46
- package/es/table/components/LoadMore/index.d.ts +0 -20
- package/es/table/components/LoadMore/index.js +0 -88
- package/es/table/components/LoadMore/index.scss +0 -19
- package/es/table/components/ToolBar/CardSwitch.d.ts +0 -8
- package/es/table/components/ToolBar/CardSwitch.js +0 -52
- package/es/table/utils/util.d.ts +0 -5
- package/es/table/utils/util.js +0 -19
- package/es/xconsole.scss +0 -503
- package/lib/actions/quick.d.ts +0 -2
- package/lib/actions/quick.js +0 -33
- package/lib/card/xconsole.scss +0 -3
- package/lib/form/ProForm/addCascadeEffect.d.ts +0 -2
- package/lib/form/ProForm/addCascadeEffect.js +0 -210
- package/lib/next-xconsole.scss +0 -34
- package/lib/page-header/xconsole.scss +0 -5
- package/lib/table/components/CardView/index.d.ts +0 -5
- package/lib/table/components/CardView/index.js +0 -402
- package/lib/table/components/CardView/index.scss +0 -46
- package/lib/table/components/LoadMore/index.d.ts +0 -20
- package/lib/table/components/LoadMore/index.js +0 -99
- package/lib/table/components/LoadMore/index.scss +0 -19
- package/lib/table/components/ToolBar/CardSwitch.d.ts +0 -8
- package/lib/table/components/ToolBar/CardSwitch.js +0 -60
- package/lib/table/utils/util.d.ts +0 -5
- package/lib/table/utils/util.js +0 -25
- package/lib/xconsole.scss +0 -503
@@ -13,32 +13,52 @@ exports.getTreeNodeLevel = getTreeNodeLevel;
|
|
13
13
|
exports.getTreeNodeProps = getTreeNodeProps;
|
14
14
|
exports.loop = loop;
|
15
15
|
var _excluded = ["selectable", "checkable", "editable", "draggable", "disabled", "checkboxDisabled", "isLeaf", "treeNodeProps"];
|
16
|
+
|
16
17
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
18
|
+
|
17
19
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
20
|
+
|
18
21
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
22
|
+
|
19
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
24
|
+
|
20
25
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
26
|
+
|
21
27
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
22
|
-
|
23
|
-
function _extends() { _extends = Object.assign
|
28
|
+
|
29
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
30
|
+
|
24
31
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
32
|
+
|
25
33
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
34
|
+
|
26
35
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
36
|
+
|
27
37
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
38
|
+
|
28
39
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
40
|
+
|
29
41
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
42
|
+
|
30
43
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
44
|
+
|
31
45
|
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(_e2) { throw _e2; }, 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(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
46
|
+
|
32
47
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
48
|
+
|
33
49
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
50
|
+
|
34
51
|
function loop(data, func, aliasMap) {
|
35
52
|
var level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
53
|
+
|
36
54
|
var _ref = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
37
|
-
|
38
|
-
|
55
|
+
_ref$children = _ref.children,
|
56
|
+
children = _ref$children === void 0 ? 'children' : _ref$children;
|
57
|
+
|
39
58
|
if (data && data.length > 0) {
|
40
59
|
data.forEach(function (item) {
|
41
60
|
func(item, level, data);
|
61
|
+
|
42
62
|
if (Array.isArray(item[children])) {
|
43
63
|
loop(item[children], func, {
|
44
64
|
children: children
|
@@ -54,27 +74,36 @@ function loop(data, func, aliasMap) {
|
|
54
74
|
* @param aliasMap 标识
|
55
75
|
* @returns
|
56
76
|
*/
|
77
|
+
|
78
|
+
|
57
79
|
function findNodeWithoutPath(data, predicate, aliasMap) {
|
58
80
|
var _ref2 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
59
|
-
|
60
|
-
|
61
|
-
|
81
|
+
_ref2$children = _ref2.children,
|
82
|
+
children = _ref2$children === void 0 ? 'children' : _ref2$children; // 如果已经没有节点了,结束递归
|
83
|
+
|
84
|
+
|
62
85
|
if (!(data && data.length)) {
|
63
86
|
return [];
|
64
87
|
}
|
88
|
+
|
65
89
|
var newChildren = [];
|
90
|
+
|
66
91
|
var _iterator = _createForOfIteratorHelper(data),
|
67
|
-
|
92
|
+
_step;
|
93
|
+
|
68
94
|
try {
|
69
95
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
70
96
|
var node = _step.value;
|
97
|
+
|
71
98
|
if (predicate(node)) {
|
72
99
|
var _node$children;
|
100
|
+
|
73
101
|
// 如果节点符合条件,直接加入新的节点集
|
74
102
|
newChildren.push(node);
|
75
103
|
node.children = findNodeWithoutPath((_node$children = node[children]) !== null && _node$children !== void 0 ? _node$children : [], predicate);
|
76
104
|
} else {
|
77
105
|
var _node$children2;
|
106
|
+
|
78
107
|
// 如果当前节点不符合条件,递归过滤子节点,
|
79
108
|
// 把符合条件的子节点提升上来,并入新节点集
|
80
109
|
newChildren.push.apply(newChildren, _toConsumableArray(findNodeWithoutPath((_node$children2 = node[children]) !== null && _node$children2 !== void 0 ? _node$children2 : [], predicate)));
|
@@ -85,6 +114,7 @@ function findNodeWithoutPath(data, predicate, aliasMap) {
|
|
85
114
|
} finally {
|
86
115
|
_iterator.f();
|
87
116
|
}
|
117
|
+
|
88
118
|
return newChildren;
|
89
119
|
}
|
90
120
|
/**
|
@@ -94,25 +124,32 @@ function findNodeWithoutPath(data, predicate, aliasMap) {
|
|
94
124
|
* @param aliasMap 标识
|
95
125
|
* @returns
|
96
126
|
*/
|
127
|
+
|
128
|
+
|
97
129
|
function findNodeWithPath(data, predicate, aliasMap) {
|
98
130
|
var _ref3 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
99
|
-
|
100
|
-
|
131
|
+
_ref3$children = _ref3.children,
|
132
|
+
children = _ref3$children === void 0 ? 'children' : _ref3$children;
|
133
|
+
|
101
134
|
var getNodes = function getNodes(result, node) {
|
102
135
|
if (predicate(node)) {
|
103
136
|
result.push(node);
|
104
137
|
return result;
|
105
138
|
}
|
139
|
+
|
106
140
|
if (Array.isArray(node[children])) {
|
107
141
|
var nodes = node[children].reduce(getNodes, []);
|
142
|
+
|
108
143
|
if (nodes.length) {
|
109
144
|
result.push(_objectSpread(_objectSpread({}, node), {}, {
|
110
145
|
nodes: nodes
|
111
146
|
}));
|
112
147
|
}
|
113
148
|
}
|
149
|
+
|
114
150
|
return result;
|
115
151
|
};
|
152
|
+
|
116
153
|
return data.reduce(getNodes, []);
|
117
154
|
}
|
118
155
|
/**
|
@@ -121,12 +158,15 @@ function findNodeWithPath(data, predicate, aliasMap) {
|
|
121
158
|
* @param aliasMap 标识
|
122
159
|
* @returns
|
123
160
|
*/
|
161
|
+
|
162
|
+
|
124
163
|
function getAllNodeKey(data, aliasMap) {
|
125
164
|
var _ref4 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
165
|
+
_ref4$key = _ref4.key,
|
166
|
+
key = _ref4$key === void 0 ? 'value' : _ref4$key,
|
167
|
+
_ref4$children = _ref4.children,
|
168
|
+
children = _ref4$children === void 0 ? 'children' : _ref4$children;
|
169
|
+
|
130
170
|
var keyList = [];
|
131
171
|
loop(data, function (node) {
|
132
172
|
keyList.push(node[key]);
|
@@ -142,12 +182,15 @@ function getAllNodeKey(data, aliasMap) {
|
|
142
182
|
* @param aliasMap 标识
|
143
183
|
* @returns
|
144
184
|
*/
|
185
|
+
|
186
|
+
|
145
187
|
function getTreeNodeLevel(data, value, aliasMap) {
|
146
188
|
var _ref5 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
189
|
+
_ref5$key = _ref5.key,
|
190
|
+
key = _ref5$key === void 0 ? 'value' : _ref5$key,
|
191
|
+
_ref5$children = _ref5.children,
|
192
|
+
children = _ref5$children === void 0 ? 'children' : _ref5$children;
|
193
|
+
|
151
194
|
var result = 0;
|
152
195
|
loop(data, function (item, level) {
|
153
196
|
if (item[key] === value) {
|
@@ -164,10 +207,13 @@ function getTreeNodeLevel(data, value, aliasMap) {
|
|
164
207
|
* @param aliasMap 标识
|
165
208
|
* @returns
|
166
209
|
*/
|
210
|
+
|
211
|
+
|
167
212
|
function getTreeLevel(data, aliasMap) {
|
168
213
|
var _ref6 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
169
|
-
|
170
|
-
|
214
|
+
_ref6$children = _ref6.children,
|
215
|
+
children = _ref6$children === void 0 ? 'children' : _ref6$children;
|
216
|
+
|
171
217
|
var result = 0;
|
172
218
|
loop(data, function (item, level) {
|
173
219
|
if (result < level) {
|
@@ -185,14 +231,17 @@ function getTreeLevel(data, aliasMap) {
|
|
185
231
|
* @param aliasMap
|
186
232
|
* @returns
|
187
233
|
*/
|
234
|
+
|
235
|
+
|
188
236
|
function getTreeLevelKey(data, level, aliasMap) {
|
189
237
|
var _ref7 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
// TODO 此处可做性能优化
|
238
|
+
_ref7$key = _ref7.key,
|
239
|
+
key = _ref7$key === void 0 ? 'value' : _ref7$key,
|
240
|
+
_ref7$children = _ref7.children,
|
241
|
+
children = _ref7$children === void 0 ? 'children' : _ref7$children;
|
242
|
+
|
243
|
+
var result = []; // TODO 此处可做性能优化
|
244
|
+
|
196
245
|
loop(data, function (item, currentLevel) {
|
197
246
|
if (currentLevel + 1 <= level) {
|
198
247
|
result.push(item === null || item === void 0 ? void 0 : item[key]);
|
@@ -209,29 +258,39 @@ function getTreeLevelKey(data, level, aliasMap) {
|
|
209
258
|
* @param aliasMap 标识
|
210
259
|
* @returns
|
211
260
|
*/
|
261
|
+
|
262
|
+
|
212
263
|
function filterTreeData(nodes, predicate, aliasMap) {
|
213
264
|
if (!(nodes && nodes.length)) {
|
214
265
|
return {
|
215
266
|
filterTreeValue: []
|
216
267
|
};
|
217
268
|
}
|
269
|
+
|
218
270
|
var _ref8 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
|
219
|
-
|
220
|
-
|
271
|
+
_ref8$children = _ref8.children,
|
272
|
+
children = _ref8$children === void 0 ? 'children' : _ref8$children;
|
273
|
+
|
221
274
|
var filterTreeValue = [];
|
275
|
+
|
222
276
|
var _iterator2 = _createForOfIteratorHelper(nodes),
|
223
|
-
|
277
|
+
_step2;
|
278
|
+
|
224
279
|
try {
|
225
280
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
226
281
|
var node = _step2.value;
|
227
|
-
|
282
|
+
|
283
|
+
var others = _extends({}, node);
|
284
|
+
|
228
285
|
if (predicate(node)) {
|
229
286
|
var _node$children3;
|
287
|
+
|
230
288
|
filterTreeValue.push(_objectSpread(_objectSpread({}, others), {}, {
|
231
289
|
children: filterTreeData((_node$children3 = node[children]) !== null && _node$children3 !== void 0 ? _node$children3 : [], predicate, aliasMap).filterTreeValue
|
232
290
|
}));
|
233
291
|
} else {
|
234
292
|
var subs = filterTreeData(node[children], predicate, aliasMap);
|
293
|
+
|
235
294
|
if (subs && subs.filterTreeValue.length) {
|
236
295
|
filterTreeValue.push(_objectSpread(_objectSpread({}, others), {}, {
|
237
296
|
children: subs.filterTreeValue
|
@@ -244,6 +303,7 @@ function filterTreeData(nodes, predicate, aliasMap) {
|
|
244
303
|
} finally {
|
245
304
|
_iterator2.f();
|
246
305
|
}
|
306
|
+
|
247
307
|
return {
|
248
308
|
filterTreeValue: filterTreeValue
|
249
309
|
};
|
@@ -252,17 +312,20 @@ function filterTreeData(nodes, predicate, aliasMap) {
|
|
252
312
|
* 获取TreeNodeProps
|
253
313
|
* @param item
|
254
314
|
*/
|
315
|
+
|
316
|
+
|
255
317
|
function getTreeNodeProps(item) {
|
256
318
|
var selectable = item.selectable,
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
319
|
+
checkable = item.checkable,
|
320
|
+
editable = item.editable,
|
321
|
+
draggable = item.draggable,
|
322
|
+
disabled = item.disabled,
|
323
|
+
checkboxDisabled = item.checkboxDisabled,
|
324
|
+
isLeaf = item.isLeaf,
|
325
|
+
_item$treeNodeProps = item.treeNodeProps,
|
326
|
+
treeNodeProps = _item$treeNodeProps === void 0 ? {} : _item$treeNodeProps,
|
327
|
+
others = _objectWithoutProperties(item, _excluded);
|
328
|
+
|
266
329
|
var nodeProps = _objectSpread({
|
267
330
|
selectable: selectable,
|
268
331
|
checkable: checkable,
|
@@ -272,11 +335,13 @@ function getTreeNodeProps(item) {
|
|
272
335
|
checkboxDisabled: checkboxDisabled,
|
273
336
|
isLeaf: isLeaf
|
274
337
|
}, treeNodeProps);
|
338
|
+
|
275
339
|
return {
|
276
340
|
nodeProps: Object.fromEntries(Object.entries(nodeProps).filter(function (_ref9) {
|
277
341
|
var _ref10 = _slicedToArray(_ref9, 2),
|
278
|
-
|
279
|
-
|
342
|
+
_ = _ref10[0],
|
343
|
+
v = _ref10[1];
|
344
|
+
|
280
345
|
return v !== undefined;
|
281
346
|
})),
|
282
347
|
labelProps: others
|
package/lib/skeleton/index.js
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
4
|
+
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
7
8
|
var _exportNames = {};
|
8
9
|
exports.default = void 0;
|
10
|
+
|
9
11
|
var _proSkeleton = _interopRequireWildcard(require("@teamix/pro-skeleton"));
|
12
|
+
|
10
13
|
Object.keys(_proSkeleton).forEach(function (key) {
|
11
14
|
if (key === "default" || key === "__esModule") return;
|
12
15
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -18,7 +21,10 @@ Object.keys(_proSkeleton).forEach(function (key) {
|
|
18
21
|
}
|
19
22
|
});
|
20
23
|
});
|
24
|
+
|
21
25
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
26
|
+
|
22
27
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
28
|
+
|
23
29
|
var _default = _proSkeleton.default;
|
24
30
|
exports.default = _default;
|
@@ -4,10 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
|
+
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
8
10
|
var _result = _interopRequireDefault(require("@teamix/result"));
|
11
|
+
|
9
12
|
var _utils = require("@teamix/utils");
|
13
|
+
|
10
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
|
+
|
11
16
|
/** ProTable 空状态 */
|
12
17
|
var _default = function _default() {
|
13
18
|
return /*#__PURE__*/_react.default.createElement(_result.default, {
|
@@ -16,4 +21,5 @@ var _default = function _default() {
|
|
16
21
|
title: (0, _utils.getMessage)('noData')
|
17
22
|
});
|
18
23
|
};
|
24
|
+
|
19
25
|
exports.default = _default;
|
@@ -1,12 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import './index.scss';
|
3
|
-
import { ProTableColumnProps, ProTableActionType
|
3
|
+
import { ProTableColumnProps, ProTableActionType } from '../../typing';
|
4
4
|
declare type ProTableFilterProps = {
|
5
5
|
column: ProTableColumnProps;
|
6
6
|
actionRef: React.MutableRefObject<ProTableActionType | undefined>;
|
7
|
-
switchCardView?: 'table' | 'card';
|
8
|
-
bindUrl?: ProTableProps['bindUrl'];
|
9
|
-
bindUrlProps?: ProTableProps['bindUrlProps'];
|
10
7
|
};
|
11
|
-
declare const
|
12
|
-
export default
|
8
|
+
declare const Filter: React.FC<ProTableFilterProps>;
|
9
|
+
export default Filter;
|