@teamix/pro 1.4.24 → 1.4.25-bugfix.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pro.all.min.css +1 -0
- package/dist/pro.css +1 -1
- package/dist/pro.js +76829 -56886
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +13 -6
- package/dist/pro.xconsole.min.css +1 -0
- package/es/actions/base.js +8 -21
- package/es/actions/dialog-component.js +2 -9
- package/es/actions/dialog-form.js +37 -75
- package/es/actions/dialog-info.js +1 -5
- package/es/actions/dialog.d.ts +2 -0
- package/es/actions/dialog.js +57 -94
- package/es/actions/index.d.ts +7 -0
- package/es/actions/index.js +93 -153
- package/es/actions/index.scss +6 -1
- package/es/actions/link.js +3 -5
- package/es/actions/quick.d.ts +2 -0
- package/es/actions/quick.js +26 -0
- package/es/actions/request.js +12 -27
- package/es/actions/utils.js +1 -9
- package/es/card/card-container.js +0 -5
- package/es/card/divider.js +0 -5
- package/es/card/index.js +61 -100
- package/es/card/index.scss +15 -0
- package/es/card/selectable.js +4 -13
- package/es/card/tab.js +1 -10
- package/es/card/utils.js +0 -2
- package/es/card/xconsole.scss +3 -0
- package/es/form/Components/Editable/index.js +16 -55
- package/es/form/Components/FormGroup/index.d.ts +1 -0
- package/es/form/Components/FormGroup/index.js +7 -22
- package/es/form/Components/LightFilter/index.js +15 -35
- package/es/form/Components/ProField/index.js +2 -14
- package/es/form/Components/ProField/mapDateFormat.js +2 -28
- package/es/form/Components/Text/index.d.ts +1 -0
- package/es/form/Components/Text/index.js +2 -11
- package/es/form/Filter/AdvancedFilter.js +18 -27
- package/es/form/Filter/Layout.js +11 -24
- package/es/form/Filter/LightFilter.js +13 -24
- package/es/form/Filter/SimpleFilter.js +7 -21
- package/es/form/Filter/index.js +117 -171
- package/es/form/Filter/index2.js +11 -28
- package/es/form/Filter/layout.scss +1 -1
- package/es/form/Filter/useBindUrl.js +18 -46
- package/es/form/Filter/useSpecialProps.js +8 -13
- package/es/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/es/form/ProForm/addCascadeEffect.js +203 -0
- package/es/form/ProForm/customComponent.js +0 -5
- package/es/form/ProForm/index.js +30 -38
- package/es/form/ProForm/index.scss +33 -0
- package/es/form/ProForm/useAutoLayout.js +21 -42
- package/es/form/ProForm/useAutoSubmit.js +3 -8
- package/es/form/ProForm/useFieldRequest.js +0 -5
- package/es/form/ProForm/useFormDisplayValues.js +12 -28
- package/es/form/ProForm/useInitialRequest.js +0 -5
- package/es/form/SchemaForm/adapterComponent.js +0 -3
- package/es/form/SchemaForm/adapterDecorator.d.ts +1 -1
- package/es/form/SchemaForm/adapterDecorator.js +0 -8
- package/es/form/SchemaForm/adapterType.js +0 -2
- package/es/form/SchemaForm/index.js +78 -114
- package/es/form/SchemaForm/initializeArrayCards.js +0 -6
- package/es/form/SchemaForm/initializeArrayCollapse.js +0 -6
- package/es/form/SchemaForm/initializeArrayItems.js +2 -9
- package/es/form/SchemaForm/initializeArrayTable.js +21 -34
- package/es/form/SchemaForm/initializeDataSource.js +2 -6
- package/es/form/SchemaForm/initializeFormButton.js +14 -31
- package/es/form/SchemaForm/initializeFormCollapse.js +8 -18
- package/es/form/SchemaForm/initializeFormGroup.js +10 -20
- package/es/form/SchemaForm/initializeFormStep.js +11 -23
- package/es/form/SchemaForm/initializeFormTab.js +10 -20
- package/es/form/SchemaForm/initializeReactions.js +9 -33
- package/es/form/SchemaForm/initializeRequest.js +2 -16
- package/es/form/SchemaForm/initializeRules.js +4 -22
- package/es/form/SchemaForm/initializeSelectTable.js +7 -33
- package/es/form/SchemaForm/reactions.js +19 -34
- package/es/form/docs/ActionResponse.d.ts +1 -0
- package/es/form/index.d.ts +12 -9
- package/es/form/index.js +0 -9
- package/es/form/typing.d.ts +26 -4
- package/es/form/utils.d.ts +1 -1
- package/es/form/utils.js +4 -49
- package/es/form/warning.js +2 -7
- package/es/global.scss +3 -1
- package/es/index-without-icon.js +4 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +18 -8
- package/es/info/components/InfoGroup/index.js +21 -32
- package/es/info/components/InfoValueItem/index.js +74 -116
- package/es/info/components/ProInfoItem/index.js +13 -21
- package/es/info/components/baseInfo/index.js +17 -27
- package/es/info/components/headerInfo/index.js +8 -20
- package/es/info/components/tableInfo/index.js +20 -50
- package/es/info/index.js +61 -86
- package/es/info/typing.d.ts +6 -1
- package/es/info/utils/index.js +0 -11
- package/es/next-xconsole.scss +34 -0
- package/es/nocode/configurators/ProTable.js +1 -22
- package/es/nocode/configurators/common.js +5 -6
- package/es/nocode/configurators/index.js +2 -3
- package/es/nocode/index.js +6 -6
- package/es/nocode/pages/editor.js +5 -9
- package/es/nocode/pages/index.js +5 -30
- package/es/nocode/pages/playground.js +18 -35
- package/es/nocode/pages/renderer.js +9 -42
- package/es/nocode/playground.js +10 -23
- package/es/page-header/index.d.ts +2 -2
- package/es/page-header/index.js +40 -76
- package/es/page-header/index.scss +2 -1
- package/es/page-header/xconsole.scss +5 -0
- package/es/sidebar/components/sidebar-container/index.js +54 -69
- package/es/sidebar/components/sidebar-container/index.scss +21 -14
- package/es/sidebar/components/tree/index.js +100 -138
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +11 -26
- package/es/sidebar/components/tree-node/components/IconAction/index.js +9 -35
- package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +12 -25
- package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/es/sidebar/components/tree-node/index.js +42 -84
- package/es/sidebar/components/tree-node/index.scss +6 -0
- package/es/sidebar/index.d.ts +2 -0
- package/es/sidebar/index.js +72 -95
- package/es/sidebar/typing.d.ts +4 -0
- package/es/sidebar/utils/action-ref.js +2 -7
- package/es/sidebar/utils/index.d.ts +5 -2
- package/es/sidebar/utils/index.js +41 -98
- package/es/table/components/CardView/index.d.ts +5 -0
- package/es/table/components/CardView/index.js +392 -0
- package/es/table/components/CardView/index.scss +46 -0
- package/es/table/components/Filter/index.d.ts +6 -3
- package/es/table/components/Filter/index.js +115 -128
- package/es/table/components/Layout/index.js +32 -47
- package/es/table/components/Layout/index.scss +2 -1
- package/es/table/components/LoadMore/index.d.ts +20 -0
- package/es/table/components/LoadMore/index.js +88 -0
- package/es/table/components/LoadMore/index.scss +19 -0
- package/es/table/components/Pagination/index.js +26 -60
- package/es/table/components/QuickAction/index.d.ts +1 -0
- package/es/table/components/QuickAction/index.js +3 -11
- package/es/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/es/table/components/ToolBar/CardSwitch.js +52 -0
- package/es/table/components/ToolBar/DensityIcon.js +19 -31
- package/es/table/components/ToolBar/FilterColumnIcon.js +87 -125
- package/es/table/components/ToolBar/FullScreenIcon.js +7 -62
- package/es/table/components/ToolBar/Fullscreen.js +25 -28
- package/es/table/components/ToolBar/RefreshIcon.js +162 -27
- package/es/table/components/ToolBar/index.d.ts +1 -1
- package/es/table/components/ToolBar/index.js +130 -38
- package/es/table/components/ToolBar/index.scss +49 -3
- package/es/table/index.js +467 -422
- package/es/table/index.scss +9 -1
- package/es/table/typing.d.ts +125 -6
- package/es/table/utils/columnRender.d.ts +3 -3
- package/es/table/utils/columnRender.js +39 -79
- package/es/table/utils/genProColumnToColumn.d.ts +2 -2
- package/es/table/utils/genProColumnToColumn.js +13 -16
- package/es/table/utils/index.js +14 -47
- package/es/table/utils/pureColumnRender.js +21 -53
- package/es/table/utils/pureGenProColumnToColumn.d.ts +1 -1
- package/es/table/utils/pureGenProColumnToColumn.js +2 -10
- package/es/table/utils/useTableSelection.js +6 -33
- package/es/table/utils/util.d.ts +5 -0
- package/es/table/utils/util.js +19 -0
- package/es/templates/List/index.js +2 -9
- package/es/timeline/ProTimeLineItem/index.js +25 -65
- package/es/timeline/index.js +8 -22
- package/es/timeline/typing.d.ts +1 -0
- package/es/utils/message.d.ts +2 -2
- package/es/utils/message.js +0 -5
- package/es/xconsole.scss +503 -0
- package/lib/actions/base.js +8 -24
- package/lib/actions/confirm.js +0 -5
- package/lib/actions/danger-confirm.js +0 -5
- package/lib/actions/danger-pop-confirm.js +0 -4
- package/lib/actions/dialog-component.js +2 -15
- package/lib/actions/dialog-form.js +36 -89
- package/lib/actions/dialog-info.js +1 -10
- package/lib/actions/dialog-table.js +0 -5
- package/lib/actions/dialog.d.ts +2 -0
- package/lib/actions/dialog.js +55 -111
- package/lib/actions/drawer-form.js +0 -3
- package/lib/actions/drawer-info.js +0 -3
- package/lib/actions/drawer-table.js +0 -3
- package/lib/actions/drawer.js +0 -4
- package/lib/actions/error.js +0 -5
- package/lib/actions/index.d.ts +7 -0
- package/lib/actions/index.js +115 -184
- package/lib/actions/index.scss +6 -1
- package/lib/actions/link.js +1 -10
- package/lib/actions/notice.js +0 -5
- package/lib/actions/pop-confirm.js +0 -5
- package/lib/actions/quick.d.ts +2 -0
- package/lib/actions/quick.js +33 -0
- package/lib/actions/request.js +8 -32
- package/lib/actions/utils.js +1 -9
- package/lib/card/card-container.js +0 -9
- package/lib/card/divider.js +0 -7
- package/lib/card/index.js +61 -127
- package/lib/card/index.scss +15 -0
- package/lib/card/selectable.js +4 -20
- package/lib/card/tab.js +1 -14
- package/lib/card/utils.js +0 -6
- package/lib/card/xconsole.scss +3 -0
- package/lib/field/index.js +0 -6
- package/lib/form/Components/Editable/index.js +15 -65
- package/lib/form/Components/FormGroup/index.d.ts +1 -0
- package/lib/form/Components/FormGroup/index.js +7 -28
- package/lib/form/Components/LightFilter/index.js +15 -47
- package/lib/form/Components/ProField/index.js +2 -21
- package/lib/form/Components/ProField/mapDateFormat.js +2 -32
- package/lib/form/Components/Text/index.d.ts +1 -0
- package/lib/form/Components/Text/index.js +2 -16
- package/lib/form/Filter/AdvancedFilter.js +17 -34
- package/lib/form/Filter/Layout.js +11 -33
- package/lib/form/Filter/LightFilter.js +13 -32
- package/lib/form/Filter/SimpleFilter.js +5 -27
- package/lib/form/Filter/index.js +116 -191
- package/lib/form/Filter/index2.js +11 -38
- package/lib/form/Filter/layout.scss +1 -1
- package/lib/form/Filter/useBindUrl.js +18 -50
- package/lib/form/Filter/useSpecialProps.js +6 -13
- package/lib/form/ProForm/addCascadeEffect.d.ts +2 -0
- package/lib/form/ProForm/addCascadeEffect.js +210 -0
- package/lib/form/ProForm/customComponent.js +0 -8
- package/lib/form/ProForm/index.js +30 -60
- package/lib/form/ProForm/index.scss +33 -0
- package/lib/form/ProForm/useAutoLayout.js +21 -45
- package/lib/form/ProForm/useAutoSubmit.js +1 -10
- package/lib/form/ProForm/useFieldRequest.js +0 -8
- package/lib/form/ProForm/useFormDisplayValues.js +12 -34
- package/lib/form/ProForm/useInitialRequest.js +0 -6
- package/lib/form/SchemaForm/adapterComponent.js +0 -6
- package/lib/form/SchemaForm/adapterDecorator.d.ts +1 -1
- package/lib/form/SchemaForm/adapterDecorator.js +0 -12
- package/lib/form/SchemaForm/adapterType.js +0 -5
- package/lib/form/SchemaForm/index.js +78 -144
- package/lib/form/SchemaForm/initializeArrayCards.js +0 -7
- package/lib/form/SchemaForm/initializeArrayCollapse.js +0 -7
- package/lib/form/SchemaForm/initializeArrayItems.js +2 -10
- package/lib/form/SchemaForm/initializeArrayTable.js +21 -34
- package/lib/form/SchemaForm/initializeDataSource.js +2 -8
- package/lib/form/SchemaForm/initializeFormButton.js +14 -32
- package/lib/form/SchemaForm/initializeFormCollapse.js +8 -18
- package/lib/form/SchemaForm/initializeFormGroup.js +10 -20
- package/lib/form/SchemaForm/initializeFormStep.js +11 -23
- package/lib/form/SchemaForm/initializeFormTab.js +10 -20
- package/lib/form/SchemaForm/initializeReactions.js +9 -37
- package/lib/form/SchemaForm/initializeRequest.js +2 -18
- package/lib/form/SchemaForm/initializeRules.js +4 -24
- package/lib/form/SchemaForm/initializeSelectTable.js +7 -36
- package/lib/form/SchemaForm/reactions.js +17 -37
- package/lib/form/docs/ActionResponse.d.ts +1 -0
- package/lib/form/docs/ActionResponse.js +0 -5
- package/lib/form/index.d.ts +12 -9
- package/lib/form/index.js +0 -25
- package/lib/form/typing.d.ts +26 -4
- package/lib/form/utils.d.ts +1 -1
- package/lib/form/utils.js +4 -61
- package/lib/form/warning.js +2 -8
- package/lib/global.scss +3 -1
- package/lib/hooks/index.js +0 -5
- package/lib/index-without-icon.js +2 -36
- package/lib/index.d.ts +1 -1
- package/lib/index.js +13 -40
- package/lib/info/components/InfoGroup/index.js +21 -42
- package/lib/info/components/InfoValueItem/index.js +74 -131
- package/lib/info/components/ProInfoItem/index.js +13 -29
- package/lib/info/components/baseInfo/index.js +17 -39
- package/lib/info/components/headerInfo/index.js +8 -31
- package/lib/info/components/tableInfo/index.js +20 -62
- package/lib/info/index.js +61 -101
- package/lib/info/typing.d.ts +6 -1
- package/lib/info/utils/index.js +0 -19
- package/lib/info/utils/utils.js +0 -1
- package/lib/next-xconsole.scss +34 -0
- package/lib/nocode/configurators/PageHeader.js +0 -2
- package/lib/nocode/configurators/ProTable.js +1 -24
- package/lib/nocode/configurators/common.js +5 -10
- package/lib/nocode/configurators/index.js +2 -10
- package/lib/nocode/configurators/map.js +0 -5
- package/lib/nocode/index.js +0 -11
- package/lib/nocode/pages/editor.js +5 -19
- package/lib/nocode/pages/index.js +3 -35
- package/lib/nocode/pages/playground.js +18 -52
- package/lib/nocode/pages/renderer.js +9 -53
- package/lib/nocode/playground.js +10 -35
- package/lib/page-container/index.js +0 -6
- package/lib/page-header/index.d.ts +2 -2
- package/lib/page-header/index.js +39 -90
- package/lib/page-header/index.scss +2 -1
- package/lib/page-header/xconsole.scss +5 -0
- package/lib/sidebar/components/sidebar-container/index.js +54 -81
- package/lib/sidebar/components/sidebar-container/index.scss +21 -14
- package/lib/sidebar/components/tree/index.js +100 -152
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +11 -34
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +9 -46
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +12 -35
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
- package/lib/sidebar/components/tree-node/index.js +42 -100
- package/lib/sidebar/components/tree-node/index.scss +6 -0
- package/lib/sidebar/index.d.ts +2 -0
- package/lib/sidebar/index.js +79 -111
- package/lib/sidebar/typing.d.ts +4 -0
- package/lib/sidebar/utils/action-ref.js +2 -8
- package/lib/sidebar/utils/index.d.ts +5 -2
- package/lib/sidebar/utils/index.js +41 -106
- package/lib/skeleton/index.js +0 -6
- package/lib/table/components/CardView/index.d.ts +5 -0
- package/lib/table/components/CardView/index.js +402 -0
- package/lib/table/components/CardView/index.scss +46 -0
- package/lib/table/components/EmptyContent/index.js +0 -6
- package/lib/table/components/Filter/index.d.ts +6 -3
- package/lib/table/components/Filter/index.js +114 -137
- package/lib/table/components/Layout/index.js +32 -60
- package/lib/table/components/Layout/index.scss +2 -1
- package/lib/table/components/LoadMore/index.d.ts +20 -0
- package/lib/table/components/LoadMore/index.js +99 -0
- package/lib/table/components/LoadMore/index.scss +19 -0
- package/lib/table/components/Pagination/index.js +26 -70
- package/lib/table/components/QuickAction/index.d.ts +1 -0
- package/lib/table/components/QuickAction/index.js +3 -15
- package/lib/table/components/ToolBar/CardSwitch.d.ts +8 -0
- package/lib/table/components/ToolBar/CardSwitch.js +60 -0
- package/lib/table/components/ToolBar/DensityIcon.js +19 -42
- package/lib/table/components/ToolBar/FilterColumnIcon.js +86 -136
- package/lib/table/components/ToolBar/FullScreenIcon.js +10 -74
- package/lib/table/components/ToolBar/Fullscreen.js +25 -35
- package/lib/table/components/ToolBar/RefreshIcon.js +164 -36
- package/lib/table/components/ToolBar/index.d.ts +1 -1
- package/lib/table/components/ToolBar/index.js +133 -47
- package/lib/table/components/ToolBar/index.scss +49 -3
- package/lib/table/index.js +466 -444
- package/lib/table/index.scss +9 -1
- package/lib/table/typing.d.ts +125 -6
- package/lib/table/utils/columnRender.d.ts +3 -3
- package/lib/table/utils/columnRender.js +39 -92
- package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
- package/lib/table/utils/genProColumnToColumn.js +13 -21
- package/lib/table/utils/getTableProps.js +0 -2
- package/lib/table/utils/getTableSortIcons.js +0 -5
- package/lib/table/utils/index.js +12 -55
- package/lib/table/utils/pureColumnRender.js +21 -64
- package/lib/table/utils/pureGenProColumnToColumn.d.ts +1 -1
- package/lib/table/utils/pureGenProColumnToColumn.js +2 -11
- package/lib/table/utils/useTableSelection.js +6 -35
- package/lib/table/utils/util.d.ts +5 -0
- package/lib/table/utils/util.js +25 -0
- package/lib/templates/Detail/index.js +0 -5
- package/lib/templates/Form/index.js +0 -5
- package/lib/templates/List/index.js +2 -19
- package/lib/templates/index.js +0 -6
- package/lib/timeline/ProTimeLineItem/index.js +25 -76
- package/lib/timeline/index.js +8 -33
- package/lib/timeline/typing.d.ts +1 -0
- package/lib/utils/index.js +0 -6
- package/lib/utils/message.d.ts +2 -2
- package/lib/utils/message.js +0 -10
- package/lib/xconsole.scss +503 -0
- package/package.json +2 -2
package/es/actions/request.js
CHANGED
@@ -1,53 +1,38 @@
|
|
1
1
|
var _excluded = ["method"],
|
2
|
-
|
3
|
-
|
2
|
+
_excluded2 = ["onFinish"];
|
4
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
5
|
-
|
6
4
|
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."); }
|
7
|
-
|
8
5
|
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); }
|
9
|
-
|
10
6
|
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; }
|
11
|
-
|
12
7
|
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; }
|
13
|
-
|
14
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
15
|
-
|
16
9
|
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; }
|
17
|
-
|
18
10
|
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; }
|
19
|
-
|
20
11
|
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; }
|
21
|
-
|
22
12
|
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; }
|
23
|
-
|
24
13
|
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; }
|
25
|
-
|
26
14
|
import { useState } from 'react';
|
27
|
-
import { useHistory } from 'react-router-dom';
|
15
|
+
// import { useHistory } from 'react-router-dom';
|
16
|
+
import { useRealHistory } from '@teamix/utils';
|
28
17
|
import { doCommonRequest } from '@teamix/utils';
|
29
|
-
import { eventHandler } from './base';
|
30
|
-
|
18
|
+
import { eventHandler } from './base';
|
19
|
+
// action 里的数据请求都默认是 post 类型
|
31
20
|
export function doRequest(action, context, history, extraParams) {
|
32
21
|
var _action$method = action.method,
|
33
|
-
|
34
|
-
|
35
|
-
|
22
|
+
method = _action$method === void 0 ? 'post' : _action$method,
|
23
|
+
others = _objectWithoutProperties(action, _excluded);
|
36
24
|
return doCommonRequest(_objectSpread({
|
37
25
|
method: method
|
38
26
|
}, others), context, history, extraParams);
|
39
27
|
}
|
40
28
|
export function useRequestAction(action, actionContext) {
|
41
29
|
var _useState = useState(false),
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
var history = useHistory();
|
47
|
-
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
31
|
+
loading = _useState2[0],
|
32
|
+
setLoading = _useState2[1];
|
33
|
+
var history = useRealHistory();
|
48
34
|
var onFinish = action.onFinish,
|
49
|
-
|
50
|
-
|
35
|
+
others = _objectWithoutProperties(action, _excluded2);
|
51
36
|
return _objectSpread(_objectSpread({}, eventHandler(action, actionContext, function (context) {
|
52
37
|
setLoading(true);
|
53
38
|
doRequest(_objectSpread({}, others), context, history).then(function () {
|
package/es/actions/utils.js
CHANGED
@@ -1,25 +1,17 @@
|
|
1
1
|
var _excluded = ["context"];
|
2
|
-
|
3
2
|
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; }
|
4
|
-
|
5
3
|
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; }
|
6
|
-
|
7
4
|
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; }
|
8
|
-
|
9
5
|
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; }
|
10
|
-
|
11
6
|
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; }
|
12
|
-
|
13
7
|
export function addContext(props, context) {
|
14
8
|
if (!props) {
|
15
9
|
return {
|
16
10
|
context: context
|
17
11
|
};
|
18
12
|
}
|
19
|
-
|
20
13
|
var propsContext = props.context,
|
21
|
-
|
22
|
-
|
14
|
+
others = _objectWithoutProperties(props, _excluded);
|
23
15
|
var mergedContext = Object.assign({}, propsContext, context);
|
24
16
|
return _objectSpread({
|
25
17
|
context: mergedContext
|
@@ -1,15 +1,11 @@
|
|
1
1
|
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; }
|
2
|
-
|
3
2
|
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; }
|
4
|
-
|
5
3
|
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; }
|
6
|
-
|
7
4
|
import React from 'react';
|
8
5
|
import { ProCard } from './index';
|
9
6
|
/**
|
10
7
|
* @deprecated 建议使用 ProCard 代替
|
11
8
|
*/
|
12
|
-
|
13
9
|
export var ProCardContainer = function ProCardContainer(props) {
|
14
10
|
return /*#__PURE__*/React.createElement(ProCard, _objectSpread({}, props));
|
15
11
|
};
|
@@ -20,5 +16,4 @@ ProCardContainer.defaultProps = {
|
|
20
16
|
/**
|
21
17
|
* @deprecated 建议使用 ProCardContainer 代替
|
22
18
|
*/
|
23
|
-
|
24
19
|
export var CardContainer = ProCardContainer;
|
package/es/card/divider.js
CHANGED
@@ -1,16 +1,11 @@
|
|
1
1
|
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; }
|
2
|
-
|
3
2
|
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; }
|
4
|
-
|
5
3
|
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; }
|
6
|
-
|
7
4
|
import React from 'react';
|
8
|
-
|
9
5
|
var ProCardDivider = function ProCardDivider(props) {
|
10
6
|
return /*#__PURE__*/React.createElement("div", _objectSpread({
|
11
7
|
className: "teamix-pro-card-divider"
|
12
8
|
}, props));
|
13
9
|
};
|
14
|
-
|
15
10
|
ProCardDivider.isProCardDivider = true;
|
16
11
|
export default ProCardDivider;
|
package/es/card/index.js
CHANGED
@@ -1,28 +1,16 @@
|
|
1
1
|
var _excluded = ["context"],
|
2
|
-
|
3
|
-
|
2
|
+
_excluded2 = ["children", "title", "subTitle", "tooltip", "tooltipIcon", "tags", "description", "extra", "actions", "message", "style", "className", "image", "hoveredShadow", "divider", "bordered", "compacted", "centered", "loading", "contentLoading", "empty", "borderColor", "backgroundColor", "contentClassName", "contentStyle", "direction", "wrap", "spacing", "split", "collapsible", "defaultCollapsed", "collapsed", "onCollapse", "context"];
|
4
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
5
|
-
|
6
4
|
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."); }
|
7
|
-
|
8
5
|
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); }
|
9
|
-
|
10
6
|
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; }
|
11
|
-
|
12
7
|
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; }
|
13
|
-
|
14
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
15
|
-
|
16
9
|
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; }
|
17
|
-
|
18
10
|
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; }
|
19
|
-
|
20
11
|
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; }
|
21
|
-
|
22
12
|
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; }
|
23
|
-
|
24
13
|
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; }
|
25
|
-
|
26
14
|
import React, { useEffect } from 'react';
|
27
15
|
import classnames from 'classnames';
|
28
16
|
import Result from '@teamix/result';
|
@@ -42,91 +30,78 @@ import ProField, { Ellipsis } from '@teamix/pro-field';
|
|
42
30
|
import ReactDOM from 'react-dom';
|
43
31
|
export * from './card-container';
|
44
32
|
var cls = usePrefixCls('teamix-pro-card');
|
45
|
-
|
46
33
|
var renderActionGroup = function renderActionGroup(extra, context) {
|
47
34
|
if (!extra) {
|
48
35
|
return null;
|
49
36
|
}
|
50
|
-
|
51
37
|
if (extra.actions instanceof Array) {
|
52
38
|
var userContext = extra.context,
|
53
|
-
|
54
|
-
|
39
|
+
others = _objectWithoutProperties(extra, _excluded);
|
55
40
|
var mergedContext = _objectSpread(_objectSpread({}, context), userContext);
|
56
|
-
|
57
41
|
return /*#__PURE__*/React.createElement(ProActionGroup, _objectSpread(_objectSpread({
|
58
42
|
context: mergedContext
|
59
43
|
}, others), {}, {
|
60
44
|
type: "text"
|
61
45
|
}));
|
62
46
|
}
|
63
|
-
|
64
47
|
return extra;
|
65
48
|
};
|
66
|
-
|
67
49
|
var getFlexDirectionClassName = function getFlexDirectionClassName(direction, split) {
|
68
50
|
if (split) {
|
69
51
|
return "flex-direction-".concat(split === 'horizontal' ? 'row' : 'column');
|
70
52
|
}
|
71
|
-
|
72
53
|
return "flex-direction-".concat(direction);
|
73
54
|
};
|
74
|
-
|
75
55
|
export var ProCard = function ProCard(props) {
|
76
56
|
var _classnames, _classnames2;
|
77
|
-
|
78
57
|
var children = props.children,
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
58
|
+
title = props.title,
|
59
|
+
subTitle = props.subTitle,
|
60
|
+
tooltip = props.tooltip,
|
61
|
+
tooltipIcon = props.tooltipIcon,
|
62
|
+
tags = props.tags,
|
63
|
+
description = props.description,
|
64
|
+
extra = props.extra,
|
65
|
+
actions = props.actions,
|
66
|
+
message = props.message,
|
67
|
+
style = props.style,
|
68
|
+
className = props.className,
|
69
|
+
image = props.image,
|
70
|
+
hoveredShadow = props.hoveredShadow,
|
71
|
+
divider = props.divider,
|
72
|
+
bordered = props.bordered,
|
73
|
+
compacted = props.compacted,
|
74
|
+
centered = props.centered,
|
75
|
+
loading = props.loading,
|
76
|
+
contentLoading = props.contentLoading,
|
77
|
+
empty = props.empty,
|
78
|
+
borderColor = props.borderColor,
|
79
|
+
backgroundColor = props.backgroundColor,
|
80
|
+
contentClassName = props.contentClassName,
|
81
|
+
contentStyle = props.contentStyle,
|
82
|
+
direction = props.direction,
|
83
|
+
wrap = props.wrap,
|
84
|
+
spacing = props.spacing,
|
85
|
+
split = props.split,
|
86
|
+
collapsible = props.collapsible,
|
87
|
+
defaultCollapsed = props.defaultCollapsed,
|
88
|
+
collapsed = props.collapsed,
|
89
|
+
onCollapse = props.onCollapse,
|
90
|
+
context = props.context,
|
91
|
+
others = _objectWithoutProperties(props, _excluded2);
|
114
92
|
var _React$useState = React.useState(defaultCollapsed !== undefined ? defaultCollapsed : false),
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
93
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
94
|
+
innerCollapseState = _React$useState2[0],
|
95
|
+
setInnerCollapseState = _React$useState2[1];
|
96
|
+
var cardRef = React.useRef();
|
97
|
+
// 表头 tooltip tags description 宽度
|
121
98
|
var _React$useState3 = React.useState(0),
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
99
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
100
|
+
headerWithoutTitleWidth = _React$useState4[0],
|
101
|
+
setHeaderWithoutTitleWidth = _React$useState4[1];
|
126
102
|
var _formatSpacing = formatSpacing(spacing),
|
127
|
-
|
128
|
-
|
129
|
-
|
103
|
+
horizonal = _formatSpacing.horizonal,
|
104
|
+
vertical = _formatSpacing.vertical;
|
130
105
|
useEffect(function () {
|
131
106
|
calculateHeaderWidth();
|
132
107
|
}, []);
|
@@ -134,17 +109,13 @@ export var ProCard = function ProCard(props) {
|
|
134
109
|
var hasCollapse = collapsible === true || defaultCollapsed !== undefined || collapsed !== undefined;
|
135
110
|
var collapseState = collapsed !== undefined ? collapsed : innerCollapseState;
|
136
111
|
var showContent = hasCollapse ? !collapseState : true;
|
137
|
-
|
138
112
|
var onCollapseChanged = function onCollapseChanged() {
|
139
113
|
onCollapse && onCollapse(!collapseState);
|
140
|
-
|
141
114
|
if (collapsed !== undefined) {
|
142
115
|
return;
|
143
116
|
}
|
144
|
-
|
145
117
|
setInnerCollapseState(!collapseState);
|
146
118
|
};
|
147
|
-
|
148
119
|
var childCardStyle = split ? {} : {
|
149
120
|
paddingRight: horizonal,
|
150
121
|
paddingLeft: horizonal,
|
@@ -161,34 +132,29 @@ export var ProCard = function ProCard(props) {
|
|
161
132
|
marginBottom: 20 - vertical,
|
162
133
|
marginLeft: horizonal,
|
163
134
|
marginRight: horizonal
|
164
|
-
};
|
165
|
-
|
166
|
-
var containProCard = false;
|
167
|
-
|
135
|
+
};
|
136
|
+
// 判断是否套了卡片,如果套了的话,为自身卡片内容区设置负间距,以适配栅格系统
|
137
|
+
var containProCard = false;
|
138
|
+
// 如果嵌套了 ProCard,为其添加一层栅格化的 col 和 padding
|
168
139
|
var childrenModified = React.Children.map(children, function (element, index) {
|
169
140
|
var _element$type, _element$type2;
|
170
|
-
|
171
141
|
if (element === null || element === void 0 ? void 0 : (_element$type = element.type) === null || _element$type === void 0 ? void 0 : _element$type.isProCard) {
|
172
142
|
containProCard = true;
|
173
143
|
var col = element.props.col;
|
174
|
-
|
175
144
|
var _getColClassAndStyle = getColClassAndStyle(col),
|
176
|
-
|
177
|
-
|
178
|
-
|
145
|
+
colClassName = _getColClassAndStyle.className,
|
146
|
+
colStyle = _getColClassAndStyle.style;
|
179
147
|
return /*#__PURE__*/React.createElement("div", {
|
180
148
|
style: _objectSpread(_objectSpread({}, childCardStyle), colStyle),
|
181
149
|
className: classnames(cls('col'), colClassName),
|
182
150
|
key: "pro-card-col-".concat(index)
|
183
151
|
}, /*#__PURE__*/React.cloneElement(element));
|
184
152
|
}
|
185
|
-
|
186
153
|
if (element === null || element === void 0 ? void 0 : (_element$type2 = element.type) === null || _element$type2 === void 0 ? void 0 : _element$type2.isProCardDivider) {
|
187
154
|
return /*#__PURE__*/React.cloneElement(element, {
|
188
155
|
style: dividerStyle
|
189
156
|
});
|
190
157
|
}
|
191
|
-
|
192
158
|
return element;
|
193
159
|
});
|
194
160
|
var cardClassName = classnames(cls(), className, backgroundColor, (_classnames = {
|
@@ -203,14 +169,11 @@ export var ProCard = function ProCard(props) {
|
|
203
169
|
marginTop: -vertical,
|
204
170
|
marginBottom: -vertical
|
205
171
|
} : {};
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
172
|
+
var cardContentStyle = _objectSpread(_objectSpread({}, cardContentMargin), contentStyle);
|
173
|
+
// 计算宽度
|
210
174
|
var calculateHeaderWidth = function calculateHeaderWidth() {
|
211
175
|
if (cardRef === null || cardRef === void 0 ? void 0 : cardRef.current) {
|
212
176
|
var _tooltipDom$clientWid, _tagsDom$clientWidth, _descriptionDom$clien;
|
213
|
-
|
214
177
|
var cardDom = ReactDOM.findDOMNode(cardRef.current);
|
215
178
|
var headerDom = cardDom === null || cardDom === void 0 ? void 0 : cardDom.querySelector('.teamix-pro-card-title');
|
216
179
|
var tooltipDom = headerDom === null || headerDom === void 0 ? void 0 : headerDom.querySelector('.teamix-pro-card-title-tooltip');
|
@@ -221,12 +184,11 @@ export var ProCard = function ProCard(props) {
|
|
221
184
|
});
|
222
185
|
var width = widthList.reduce(function (acc, cur) {
|
223
186
|
return acc + cur;
|
224
|
-
}, 0) + widthList.length * 8;
|
225
|
-
|
226
|
-
setHeaderWithoutTitleWidth(width - 1);
|
187
|
+
}, 0) + widthList.length * 8;
|
188
|
+
// 无法取出精准宽度,减去1作为阈值 10为右padding
|
189
|
+
setHeaderWithoutTitleWidth(width - 1 + 10);
|
227
190
|
}
|
228
191
|
};
|
229
|
-
|
230
192
|
var renderTitle = function renderTitle() {
|
231
193
|
var icon = tooltipIcon || 'info-circle-line';
|
232
194
|
var tooltipTrigger = typeof icon === 'string' ? /*#__PURE__*/React.createElement(TeamixIcon, {
|
@@ -245,20 +207,20 @@ export var ProCard = function ProCard(props) {
|
|
245
207
|
type: "down-fill"
|
246
208
|
}), /*#__PURE__*/React.createElement("div", {
|
247
209
|
className: cls('title-name')
|
248
|
-
}, /*#__PURE__*/React.createElement(ProField, {
|
210
|
+
}, typeof title === 'string' ? /*#__PURE__*/React.createElement(ProField, {
|
249
211
|
value: title,
|
250
212
|
type: "text",
|
251
213
|
render: {
|
252
214
|
ellipsis: true
|
253
215
|
}
|
254
|
-
}))), !hasCollapse && /*#__PURE__*/React.createElement("div", {
|
216
|
+
}) : title)), !hasCollapse && /*#__PURE__*/React.createElement("div", {
|
255
217
|
className: cls('title-name'),
|
256
218
|
style: {
|
257
219
|
maxWidth: "calc(100% - ".concat(headerWithoutTitleWidth, "px)")
|
258
220
|
}
|
259
|
-
}, /*#__PURE__*/React.createElement(Ellipsis, {
|
221
|
+
}, typeof title === 'string' ? /*#__PURE__*/React.createElement(Ellipsis, {
|
260
222
|
tooltip: title
|
261
|
-
}, title)), tooltip && /*#__PURE__*/React.createElement("div", {
|
223
|
+
}, title) : title), tooltip && /*#__PURE__*/React.createElement("div", {
|
262
224
|
className: cls('title-tooltip')
|
263
225
|
}, /*#__PURE__*/React.createElement(Balloon.Tooltip, {
|
264
226
|
align: "t",
|
@@ -273,7 +235,6 @@ export var ProCard = function ProCard(props) {
|
|
273
235
|
}
|
274
236
|
})));
|
275
237
|
};
|
276
|
-
|
277
238
|
return /*#__PURE__*/React.createElement(BasicCard, _objectSpread({
|
278
239
|
free: true,
|
279
240
|
className: cardClassName,
|
package/es/card/index.scss
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
@import "xconsole";
|
2
|
+
|
1
3
|
.teamix-pro-card {
|
2
4
|
width: 100%;
|
3
5
|
|
@@ -51,6 +53,12 @@
|
|
51
53
|
display: flex;
|
52
54
|
align-items: center;
|
53
55
|
|
56
|
+
.next-menu-btn.next-menu-btn.next-menu-btn.next-menu-btn.next-menu-btn.next-menu-btn {
|
57
|
+
i {
|
58
|
+
margin-right: 0;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
54
62
|
& > div {
|
55
63
|
display: flex;
|
56
64
|
align-items: center;
|
@@ -62,9 +70,15 @@
|
|
62
70
|
&-name {
|
63
71
|
flex-shrink: 0;
|
64
72
|
}
|
73
|
+
&-name > .teamix-pro-field {
|
74
|
+
width: calc(100% - 24px);
|
75
|
+
}
|
65
76
|
|
66
77
|
&-collapse {
|
67
78
|
cursor: pointer;
|
79
|
+
.teamix-pro-card-title-name {
|
80
|
+
width: 100%;
|
81
|
+
}
|
68
82
|
|
69
83
|
& > i {
|
70
84
|
transition: transform 0.2s;
|
@@ -295,4 +309,5 @@
|
|
295
309
|
&.transparent {
|
296
310
|
background: transparent;
|
297
311
|
}
|
312
|
+
|
298
313
|
}
|
package/es/card/selectable.js
CHANGED
@@ -1,29 +1,21 @@
|
|
1
1
|
var _excluded = ["selected", "onSelect", "className", "onClick"];
|
2
|
-
|
3
2
|
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; }
|
4
|
-
|
5
3
|
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; }
|
6
|
-
|
7
4
|
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; }
|
8
|
-
|
9
5
|
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; }
|
10
|
-
|
11
6
|
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; }
|
12
|
-
|
13
7
|
import React from 'react';
|
14
8
|
import classnames from 'classnames';
|
15
9
|
import TeamixIcon from '@teamix/icon';
|
16
10
|
import { usePrefixCls } from '@teamix/utils';
|
17
11
|
import { ProCard } from './index';
|
18
12
|
var cls = usePrefixCls('teamix-pro-card-selectable');
|
19
|
-
|
20
13
|
var ProCardSelectable = function ProCardSelectable(props) {
|
21
14
|
var selected = props.selected,
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
15
|
+
onSelect = props.onSelect,
|
16
|
+
className = props.className,
|
17
|
+
_onClick = props.onClick,
|
18
|
+
others = _objectWithoutProperties(props, _excluded);
|
27
19
|
return /*#__PURE__*/React.createElement(ProCard, _objectSpread({
|
28
20
|
className: classnames(cls(), className),
|
29
21
|
borderColor: selected ? 'blue' : 'grey',
|
@@ -37,7 +29,6 @@ var ProCardSelectable = function ProCardSelectable(props) {
|
|
37
29
|
}
|
38
30
|
}, others));
|
39
31
|
};
|
40
|
-
|
41
32
|
ProCardSelectable.defaultProps = {
|
42
33
|
hoveredShadow: true
|
43
34
|
};
|
package/es/card/tab.js
CHANGED
@@ -1,27 +1,18 @@
|
|
1
1
|
var _excluded = ["className"];
|
2
|
-
|
3
2
|
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; }
|
4
|
-
|
5
3
|
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; }
|
6
|
-
|
7
4
|
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; }
|
8
|
-
|
9
5
|
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; }
|
10
|
-
|
11
6
|
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; }
|
12
|
-
|
13
7
|
import React from 'react';
|
14
8
|
import classnames from 'classnames';
|
15
9
|
import { Tab } from '@alicloudfe/components';
|
16
|
-
|
17
10
|
var ProCardTab = function ProCardTab(props) {
|
18
11
|
var className = props.className,
|
19
|
-
|
20
|
-
|
12
|
+
others = _objectWithoutProperties(props, _excluded);
|
21
13
|
return /*#__PURE__*/React.createElement(Tab, _objectSpread({
|
22
14
|
className: classnames('teamix-pro-card-tab', className)
|
23
15
|
}, others));
|
24
16
|
};
|
25
|
-
|
26
17
|
ProCardTab.Item = Tab.Item;
|
27
18
|
export default ProCardTab;
|
package/es/card/utils.js
CHANGED