@teamix/pro 1.4.25-bugfix → 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 +78506 -59443
- 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.js +57 -95
- 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 +11 -26
- 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/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 +9 -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 +66 -119
- 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 +2 -0
- 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 +25 -58
- 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 +455 -423
- package/es/table/index.scss +8 -0
- 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.js +55 -112
- 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 +11 -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/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 +9 -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 +66 -134
- 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 +2 -0
- 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 +25 -68
- 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 +454 -445
- package/lib/table/index.scss +8 -0
- 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 +1 -1
package/lib/actions/index.js
CHANGED
@@ -3,212 +3,172 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
+
var _exportNames = {
|
7
|
+
registerActionHandler: true,
|
8
|
+
useAction: true,
|
9
|
+
ProActionButton: true,
|
10
|
+
ProActionMenuButton: true,
|
11
|
+
ProActionGroup: true,
|
12
|
+
ActionGroup: true,
|
13
|
+
ActionButton: true,
|
14
|
+
ActionMenuButton: true
|
15
|
+
};
|
6
16
|
exports.ProActionButton = exports.ActionMenuButton = exports.ActionGroup = exports.ActionButton = void 0;
|
7
17
|
exports.ProActionGroup = ProActionGroup;
|
8
18
|
exports.default = exports.ProActionMenuButton = void 0;
|
9
19
|
exports.registerActionHandler = registerActionHandler;
|
10
20
|
exports.useAction = useAction;
|
11
|
-
|
12
21
|
var _react = _interopRequireDefault(require("react"));
|
13
|
-
|
14
22
|
var _classnames = _interopRequireDefault(require("classnames"));
|
15
|
-
|
16
23
|
var _components = require("@alicloudfe/components");
|
17
|
-
|
18
24
|
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
19
|
-
|
20
25
|
var _utils = require("@teamix/utils");
|
21
|
-
|
22
26
|
var _link = require("./link");
|
23
|
-
|
24
27
|
var _request = require("./request");
|
25
|
-
|
26
28
|
var _dialog = require("./dialog");
|
27
|
-
|
28
29
|
var _confirm = require("./confirm");
|
29
|
-
|
30
30
|
var _dangerConfirm = require("./danger-confirm");
|
31
|
-
|
32
31
|
var _notice = require("./notice");
|
33
|
-
|
34
32
|
var _error = require("./error");
|
35
|
-
|
36
33
|
var _dialogForm = require("./dialog-form");
|
37
|
-
|
38
34
|
var _dialogTable = require("./dialog-table");
|
39
|
-
|
40
35
|
var _dialogInfo = require("./dialog-info");
|
41
|
-
|
42
36
|
var _drawer = require("./drawer");
|
43
|
-
|
44
37
|
var _drawerForm = require("./drawer-form");
|
45
|
-
|
46
38
|
var _drawerTable = require("./drawer-table");
|
47
|
-
|
48
39
|
var _drawerInfo = require("./drawer-info");
|
49
|
-
|
50
40
|
var _popConfirm = require("./pop-confirm");
|
51
|
-
|
52
41
|
var _dangerPopConfirm = require("./danger-pop-confirm");
|
53
|
-
|
54
42
|
require("./index.scss");
|
55
|
-
|
43
|
+
var _quick = require("./quick");
|
44
|
+
Object.keys(_quick).forEach(function (key) {
|
45
|
+
if (key === "default" || key === "__esModule") return;
|
46
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
47
|
+
if (key in exports && exports[key] === _quick[key]) return;
|
48
|
+
Object.defineProperty(exports, key, {
|
49
|
+
enumerable: true,
|
50
|
+
get: function get() {
|
51
|
+
return _quick[key];
|
52
|
+
}
|
53
|
+
});
|
54
|
+
});
|
56
55
|
var _excluded = ["type"],
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
56
|
+
_excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "disabled", "onClick", "tooltip", "disabledTooltip", "tooltipProps", "data-teamix-spm"],
|
57
|
+
_excluded3 = ["loading"],
|
58
|
+
_excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type", "className", "noArrow"],
|
59
|
+
_excluded5 = ["context", "text"],
|
60
|
+
_excluded6 = ["key", "actions"],
|
61
|
+
_excluded7 = ["key", "config"],
|
62
|
+
_excluded8 = ["type", "divider", "max", "moreText", "more", "context", "actions", "className", "data-teamix-spm"];
|
65
63
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
66
|
-
|
67
64
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
68
|
-
|
69
65
|
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."); }
|
70
|
-
|
71
66
|
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); }
|
72
|
-
|
73
67
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
74
|
-
|
75
68
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
76
|
-
|
77
69
|
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; }
|
78
|
-
|
79
70
|
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; }
|
80
|
-
|
81
71
|
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; }
|
82
|
-
|
83
72
|
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; }
|
84
|
-
|
85
73
|
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; }
|
86
|
-
|
87
74
|
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; }
|
88
|
-
|
89
75
|
var RegistedActions = new Map();
|
90
|
-
|
91
76
|
function registerActionHandler(id, extendActionId, defaultConfig) {
|
92
77
|
RegistedActions.set(id, {
|
93
78
|
extendActionId: extendActionId,
|
94
79
|
defaultConfig: defaultConfig
|
95
80
|
});
|
96
81
|
}
|
97
|
-
|
98
82
|
function useAction(config, context) {
|
99
83
|
if (!config) {
|
100
84
|
return {};
|
101
85
|
}
|
102
|
-
|
103
86
|
var type = config.type,
|
104
|
-
|
105
|
-
|
87
|
+
others = _objectWithoutProperties(config, _excluded);
|
106
88
|
if (type === 'request') {
|
107
89
|
return (0, _request.useRequestAction)(others, context);
|
108
90
|
}
|
109
|
-
|
110
91
|
if (type === 'link') {
|
111
92
|
return (0, _link.useLinkAction)(others, context);
|
112
93
|
}
|
113
|
-
|
114
94
|
if (type === 'dialog') {
|
115
95
|
return (0, _dialog.useDialogAction)(others, context);
|
116
96
|
}
|
117
|
-
|
118
97
|
if (type === 'confirm') {
|
119
98
|
return (0, _confirm.useConfirmAction)(others, context);
|
120
99
|
}
|
121
|
-
|
122
100
|
if (type === 'danger-confirm') {
|
123
101
|
return (0, _dangerConfirm.useDangerConfirmAction)(others, context);
|
124
102
|
}
|
125
|
-
|
126
103
|
if (type === 'notice') {
|
127
104
|
return (0, _notice.useNoticeAction)(others, context);
|
128
105
|
}
|
129
|
-
|
130
106
|
if (type === 'error') {
|
131
107
|
return (0, _error.useErrorAction)(others, context);
|
132
108
|
}
|
133
|
-
|
134
109
|
if (type === 'dialog-form') {
|
135
110
|
return (0, _dialogForm.useDialogFormAction)(others, context);
|
136
111
|
}
|
137
|
-
|
138
112
|
if (type === 'dialog-table') {
|
139
113
|
return (0, _dialogTable.useDialogTableAction)(others, context);
|
140
114
|
}
|
141
|
-
|
142
115
|
if (type === 'dialog-info') {
|
143
116
|
return (0, _dialogInfo.useDialogInfoAction)(others, context);
|
144
117
|
}
|
145
|
-
|
146
118
|
if (type === 'drawer') {
|
147
119
|
return (0, _drawer.useDrawerAction)(others, context);
|
148
120
|
}
|
149
|
-
|
150
121
|
if (type === 'drawer-form') {
|
151
122
|
return (0, _drawerForm.useDrawerFormAction)(others, context);
|
152
123
|
}
|
153
|
-
|
154
124
|
if (type === 'drawer-table') {
|
155
125
|
return (0, _drawerTable.useDrawerTableAction)(others, context);
|
156
126
|
}
|
157
|
-
|
158
127
|
if (type === 'drawer-info') {
|
159
128
|
return (0, _drawerInfo.useDrawerInfoAction)(others, context);
|
160
129
|
}
|
161
|
-
|
162
130
|
if (type === 'pop-confirm') {
|
163
131
|
return (0, _popConfirm.usePopConfirmAction)(others, context);
|
164
132
|
}
|
165
|
-
|
166
133
|
if (type === 'danger-pop-confirm') {
|
167
134
|
return (0, _dangerPopConfirm.useDangerPopConfirmAction)(others, context);
|
168
135
|
}
|
169
|
-
|
170
136
|
var registedAction = RegistedActions.get(type);
|
171
|
-
|
172
137
|
if (!registedAction) {
|
173
138
|
return {};
|
174
139
|
}
|
175
|
-
|
176
140
|
return useAction(_objectSpread(_objectSpread({
|
177
141
|
type: registedAction.extendActionId
|
178
142
|
}, registedAction.defaultConfig), others), context);
|
179
143
|
}
|
180
|
-
|
181
144
|
var buttonContent = function buttonContent(content, iconType, iconSize, context) {
|
182
145
|
var renderedContent = typeof content === 'function' ? content(context) : content;
|
183
|
-
|
184
146
|
if (!iconType) {
|
185
147
|
return renderedContent;
|
186
148
|
}
|
187
|
-
|
188
149
|
return [/*#__PURE__*/_react.default.createElement(_icon.default, {
|
189
150
|
type: iconType,
|
190
151
|
size: iconSize,
|
191
152
|
key: "teamix-button-icon"
|
192
153
|
}), renderedContent];
|
193
154
|
};
|
194
|
-
|
195
155
|
var ProActionButton = function ProActionButton(props) {
|
196
156
|
var config = props.config,
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
157
|
+
icon = props.icon,
|
158
|
+
_props$iconSize = props.iconSize,
|
159
|
+
iconSize = _props$iconSize === void 0 ? 'medium' : _props$iconSize,
|
160
|
+
_props$type = props.type,
|
161
|
+
type = _props$type === void 0 ? 'primary' : _props$type,
|
162
|
+
context = props.context,
|
163
|
+
children = props.children,
|
164
|
+
visible = props.visible,
|
165
|
+
disabled = props.disabled,
|
166
|
+
_onClick = props.onClick,
|
167
|
+
tooltip = props.tooltip,
|
168
|
+
disabledTooltip = props.disabledTooltip,
|
169
|
+
tooltipProps = props.tooltipProps,
|
170
|
+
dataTeamixSpm = props['data-teamix-spm'],
|
171
|
+
others = _objectWithoutProperties(props, _excluded2);
|
212
172
|
var actionProps = useAction(config, context);
|
213
173
|
var buttonProps = _onClick ? _objectSpread(_objectSpread(_objectSpread({
|
214
174
|
disabled: disabled
|
@@ -219,17 +179,17 @@ var ProActionButton = function ProActionButton(props) {
|
|
219
179
|
}) : _objectSpread(_objectSpread({
|
220
180
|
disabled: disabled
|
221
181
|
}, actionProps), others);
|
222
|
-
|
182
|
+
if (dataTeamixSpm) {
|
183
|
+
buttonProps['data-teamix-spm'] = dataTeamixSpm;
|
184
|
+
}
|
223
185
|
var content = /*#__PURE__*/_react.default.createElement(_components.Button, _objectSpread({
|
224
186
|
type: type
|
225
187
|
}, buttonProps), buttonContent(children, icon, iconSize, context));
|
226
|
-
|
227
188
|
var baseToolTipProps = _objectSpread({
|
228
189
|
triggerType: 'hover',
|
229
190
|
align: 't',
|
230
191
|
trigger: content
|
231
192
|
}, tooltipProps);
|
232
|
-
|
233
193
|
if (tooltip || disabledTooltip) {
|
234
194
|
if (tooltip && !disabledTooltip) {
|
235
195
|
if (!disabled) {
|
@@ -244,24 +204,22 @@ var ProActionButton = function ProActionButton(props) {
|
|
244
204
|
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), showToolTip);
|
245
205
|
}
|
246
206
|
}
|
247
|
-
|
248
207
|
return content;
|
249
208
|
};
|
250
|
-
|
251
209
|
exports.ProActionButton = ProActionButton;
|
252
|
-
|
253
210
|
var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
|
254
211
|
var action = props.action,
|
255
|
-
|
212
|
+
context = props.context,
|
213
|
+
dataTeamixSpm = props['data-teamix-spm'];
|
256
214
|
var config = action.config,
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
215
|
+
btnContext = action.context,
|
216
|
+
_onClick2 = action.onClick,
|
217
|
+
children = action.children,
|
218
|
+
icon = action.icon,
|
219
|
+
disabled = action.disabled,
|
220
|
+
tooltip = action.tooltip,
|
221
|
+
disabledTooltip = action.disabledTooltip,
|
222
|
+
tooltipProps = action.tooltipProps;
|
265
223
|
var basePrefix = (0, _utils.usePrefixCls)('', {
|
266
224
|
base: true
|
267
225
|
});
|
@@ -269,24 +227,23 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
|
|
269
227
|
var menuItemActionConfig = Object.assign({}, config, {
|
270
228
|
trigger: 'onClick'
|
271
229
|
});
|
272
|
-
|
273
230
|
var _useAction = useAction(menuItemActionConfig, btnContext || context),
|
274
|
-
|
275
|
-
|
276
|
-
|
231
|
+
loading = _useAction.loading,
|
232
|
+
menuItemProps = _objectWithoutProperties(_useAction, _excluded3);
|
277
233
|
var buttonProps = disabled ? {} : _onClick2 ? _objectSpread(_objectSpread({}, menuItemProps), {}, {
|
278
234
|
onClick: function onClick(e) {
|
279
235
|
return _onClick2(e, context);
|
280
236
|
}
|
281
237
|
}) : _objectSpread({}, menuItemProps);
|
238
|
+
if (dataTeamixSpm) {
|
239
|
+
buttonProps['data-teamix-spm'] = dataTeamixSpm;
|
240
|
+
}
|
282
241
|
var content = buttonContent(children, icon, undefined, context);
|
283
|
-
|
284
242
|
var baseToolTipProps = _objectSpread({
|
285
243
|
triggerType: 'hover',
|
286
244
|
align: 't',
|
287
245
|
trigger: content
|
288
246
|
}, tooltipProps);
|
289
|
-
|
290
247
|
if (tooltip || disabledTooltip) {
|
291
248
|
if (tooltip && !disabledTooltip) {
|
292
249
|
if (!disabled) {
|
@@ -301,50 +258,44 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
|
|
301
258
|
content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), showToolTip);
|
302
259
|
}
|
303
260
|
}
|
304
|
-
|
305
261
|
return /*#__PURE__*/_react.default.createElement("div", _objectSpread({
|
306
262
|
className: (0, _classnames.default)(_defineProperty({}, basePrefix('disabled'), disabled), basePrefix('menu-item'), prefixCls('menu-item'))
|
307
263
|
}, buttonProps), content);
|
308
264
|
};
|
309
|
-
|
310
|
-
function renderCommonActionButtonMenuItem(action, key, context) {
|
265
|
+
function renderCommonActionButtonMenuItem(action, key, context, dataTeamixSpm) {
|
311
266
|
if (action.type === 'divider') {
|
312
267
|
return /*#__PURE__*/_react.default.createElement(_components.Menu.Divider, {
|
313
268
|
key: key
|
314
269
|
});
|
315
270
|
}
|
316
|
-
|
317
271
|
var menuBtn = action;
|
318
|
-
|
319
272
|
if (menuBtn.actions && menuBtn.actions.length && menuBtn.disabled !== true) {
|
320
273
|
return /*#__PURE__*/_react.default.createElement(_components.Menu.SubMenu, {
|
321
274
|
key: key,
|
322
275
|
label: menuBtn.label || menuBtn.children
|
323
276
|
}, menuBtn.actions.map(function (a) {
|
324
|
-
return renderCommonActionButtonMenuItem(a, a.key, context);
|
277
|
+
return renderCommonActionButtonMenuItem(a, a.key, context, a['data-teamix-spm']);
|
325
278
|
}));
|
326
279
|
}
|
327
|
-
|
328
280
|
return /*#__PURE__*/_react.default.createElement(ProActionMenuButtonItem, {
|
329
281
|
key: key,
|
330
282
|
action: action,
|
331
|
-
context: context
|
283
|
+
context: context,
|
284
|
+
"data-teamix-spm": "".concat(dataTeamixSpm, "-").concat(key)
|
332
285
|
});
|
333
286
|
}
|
334
|
-
|
335
287
|
var ProActionMenuButton = function ProActionMenuButton(props) {
|
336
288
|
var icon = props.icon,
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
289
|
+
iconSize = props.iconSize,
|
290
|
+
label = props.label,
|
291
|
+
actions = props.actions,
|
292
|
+
children = props.children,
|
293
|
+
context = props.context,
|
294
|
+
_props$type2 = props.type,
|
295
|
+
type = _props$type2 === void 0 ? 'primary' : _props$type2,
|
296
|
+
className = props.className,
|
297
|
+
noArrow = props.noArrow,
|
298
|
+
others = _objectWithoutProperties(props, _excluded4);
|
348
299
|
return /*#__PURE__*/_react.default.createElement(_components.MenuButton, _objectSpread({
|
349
300
|
popupTriggerType: "hover",
|
350
301
|
autoWidth: false,
|
@@ -361,66 +312,57 @@ var ProActionMenuButton = function ProActionMenuButton(props) {
|
|
361
312
|
'teamix-pro-actions-text-menu-btn-no-arrow': noArrow
|
362
313
|
})
|
363
314
|
}, others), actions.map(function (action, i) {
|
364
|
-
return renderCommonActionButtonMenuItem(action, action.key || i, context);
|
315
|
+
return renderCommonActionButtonMenuItem(action, action.key || i, context, others === null || others === void 0 ? void 0 : others['data-teamix-spm']);
|
365
316
|
}));
|
366
|
-
};
|
367
|
-
|
368
|
-
|
317
|
+
};
|
318
|
+
// 超出 max,则折叠起来
|
369
319
|
exports.ProActionMenuButton = ProActionMenuButton;
|
370
|
-
|
371
320
|
function foldExtraActions(actions, max, moreConfig) {
|
372
321
|
if (actions.length <= max) {
|
373
322
|
return actions;
|
374
323
|
}
|
375
|
-
|
376
324
|
return [].concat(_toConsumableArray(actions.slice(0, max - 1)), [_objectSpread(_objectSpread({
|
377
325
|
key: '__teamix_pro_action_group_more_btn'
|
378
326
|
}, moreConfig), {}, {
|
379
327
|
actions: actions.slice(max - 1)
|
380
328
|
})]);
|
381
|
-
}
|
329
|
+
}
|
330
|
+
// 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
|
382
331
|
// divider 不计数
|
383
|
-
|
384
|
-
|
385
332
|
function formatGroupActions(actions, max, moreConfig) {
|
386
333
|
var MAX = max < 1 ? MAX_ACTTIONS : max;
|
387
334
|
var count = 0;
|
388
335
|
var index = 0;
|
389
|
-
|
390
336
|
for (; index < actions.length && count < MAX; index++) {
|
391
337
|
if (actions[index].type !== 'divider') {
|
392
338
|
count += 1;
|
393
339
|
}
|
394
340
|
}
|
395
|
-
|
396
341
|
return foldExtraActions(actions, Math.max(index, MAX), moreConfig);
|
397
|
-
}
|
398
|
-
|
399
|
-
|
400
|
-
function renderCommonActionButton(button, context, isTypeText) {
|
342
|
+
}
|
343
|
+
// 渲染一个 button 或者 menu button
|
344
|
+
function renderCommonActionButton(button, context, isTypeText, dataTeamixSpm) {
|
401
345
|
if (button.type === 'divider') {
|
402
346
|
return /*#__PURE__*/_react.default.createElement(_components.Divider, {
|
403
347
|
key: button.key,
|
404
348
|
direction: "ver"
|
405
349
|
});
|
406
350
|
}
|
407
|
-
|
408
351
|
var buttonContext = button.context,
|
409
|
-
|
410
|
-
|
411
|
-
|
352
|
+
text = button.text,
|
353
|
+
others = _objectWithoutProperties(button, _excluded5);
|
412
354
|
var buttonProps = _objectSpread({
|
413
355
|
context: Object.assign({}, context, buttonContext),
|
414
356
|
text: text || isTypeText
|
415
357
|
}, others);
|
416
|
-
|
358
|
+
if (dataTeamixSpm) {
|
359
|
+
buttonProps['data-teamix-spm'] = dataTeamixSpm;
|
360
|
+
}
|
417
361
|
if (!button.actions) {
|
418
362
|
return /*#__PURE__*/_react.default.createElement(ProActionButton, _objectSpread({}, buttonProps));
|
419
363
|
}
|
420
|
-
|
421
364
|
return /*#__PURE__*/_react.default.createElement(ProActionMenuButton, _objectSpread({}, buttonProps));
|
422
365
|
}
|
423
|
-
|
424
366
|
function getDefaultMoreButton(type, more) {
|
425
367
|
var defaultConfig = type === 'button' ? {
|
426
368
|
children: (0, _utils.getMessage)('more')
|
@@ -429,38 +371,29 @@ function getDefaultMoreButton(type, more) {
|
|
429
371
|
autoWidth: false,
|
430
372
|
noArrow: true
|
431
373
|
};
|
432
|
-
|
433
374
|
if (!more) {
|
434
375
|
return defaultConfig;
|
435
376
|
}
|
436
|
-
|
437
377
|
var moreConfig = typeof more === 'string' ? {
|
438
378
|
children: more
|
439
379
|
} : more;
|
440
|
-
|
441
380
|
if (type === 'button') {
|
442
381
|
return Object.assign(defaultConfig, moreConfig);
|
443
382
|
}
|
444
|
-
|
445
383
|
return moreConfig;
|
446
384
|
}
|
447
|
-
|
448
385
|
var MAX_ACTTIONS = 4;
|
449
|
-
|
450
386
|
function getKey(index, key) {
|
451
387
|
if (key !== undefined) {
|
452
388
|
return key;
|
453
389
|
}
|
454
|
-
|
455
390
|
return "__teamix_pro_action_key_".concat(index);
|
456
391
|
}
|
457
|
-
|
458
392
|
function getActionConfig(action, index, context) {
|
459
393
|
if (action.actions) {
|
460
394
|
var _key = action.key,
|
461
|
-
|
462
|
-
|
463
|
-
|
395
|
+
actions = action.actions,
|
396
|
+
_others = _objectWithoutProperties(action, _excluded6);
|
464
397
|
return _objectSpread({
|
465
398
|
key: getKey(index, _key),
|
466
399
|
actions: actions.map(function (a, j) {
|
@@ -470,32 +403,29 @@ function getActionConfig(action, index, context) {
|
|
470
403
|
})
|
471
404
|
}, (0, _utils.getTargetValue)(_others, context));
|
472
405
|
}
|
473
|
-
|
474
406
|
var key = action.key,
|
475
|
-
|
476
|
-
|
477
|
-
|
407
|
+
config = action.config,
|
408
|
+
others = _objectWithoutProperties(action, _excluded7);
|
478
409
|
return _objectSpread({
|
479
410
|
key: getKey(index, key),
|
480
411
|
config: config
|
481
412
|
}, (0, _utils.getTargetValue)(others, context));
|
482
413
|
}
|
483
|
-
|
484
414
|
function ProActionGroup(props) {
|
485
415
|
var _props$type3 = props.type,
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
416
|
+
type = _props$type3 === void 0 ? 'button' : _props$type3,
|
417
|
+
_props$divider = props.divider,
|
418
|
+
divider = _props$divider === void 0 ? true : _props$divider,
|
419
|
+
_props$max = props.max,
|
420
|
+
max = _props$max === void 0 ? MAX_ACTTIONS : _props$max,
|
421
|
+
moreText = props.moreText,
|
422
|
+
more = props.more,
|
423
|
+
context = props.context,
|
424
|
+
_props$actions = props.actions,
|
425
|
+
actions = _props$actions === void 0 ? [] : _props$actions,
|
426
|
+
className = props.className,
|
427
|
+
dataTeamixSpm = props['data-teamix-spm'],
|
428
|
+
containerProps = _objectWithoutProperties(props, _excluded8);
|
499
429
|
var isTypeText = type === 'text';
|
500
430
|
var filteredActions = actions.map(function (action, index) {
|
501
431
|
return getActionConfig(action, index, context);
|
@@ -509,35 +439,36 @@ function ProActionGroup(props) {
|
|
509
439
|
})
|
510
440
|
}, containerProps), formatedActions.map(function (actionBtn, i) {
|
511
441
|
var isLastOne = i === formatedActions.length - 1;
|
512
|
-
|
442
|
+
if (dataTeamixSpm) {
|
443
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
444
|
+
key: actionBtn.key
|
445
|
+
}, renderCommonActionButton(actionBtn, context, isTypeText, "".concat(dataTeamixSpm, "-").concat(actionBtn.key || i)), isTypeText && divider && !isLastOne && /*#__PURE__*/_react.default.createElement(_components.Divider, {
|
446
|
+
direction: "ver"
|
447
|
+
}));
|
448
|
+
} else return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
513
449
|
key: actionBtn.key
|
514
450
|
}, renderCommonActionButton(actionBtn, context, isTypeText), isTypeText && divider && !isLastOne && /*#__PURE__*/_react.default.createElement(_components.Divider, {
|
515
451
|
direction: "ver"
|
516
452
|
}));
|
517
453
|
}));
|
518
454
|
}
|
519
|
-
|
520
455
|
var ProAction = function ProAction(props) {
|
521
456
|
return renderCommonActionButton(props);
|
522
457
|
};
|
523
|
-
|
524
458
|
var _default = ProAction;
|
459
|
+
exports.default = _default;
|
525
460
|
/**
|
526
461
|
* @deprecated 建议使用 ProActionGroup 代替
|
527
462
|
*/
|
528
|
-
|
529
|
-
exports.default = _default;
|
530
463
|
var ActionGroup = ProActionGroup;
|
531
464
|
/**
|
532
465
|
* @deprecated 建议使用 ProActionButton 代替
|
533
466
|
*/
|
534
|
-
|
535
467
|
exports.ActionGroup = ActionGroup;
|
536
468
|
var ActionButton = ProActionButton;
|
537
469
|
/**
|
538
470
|
* @deprecated 建议使用 ProActionMenuButton 代替
|
539
471
|
*/
|
540
|
-
|
541
472
|
exports.ActionButton = ActionButton;
|
542
473
|
var ActionMenuButton = ProActionMenuButton;
|
543
474
|
exports.ActionMenuButton = ActionMenuButton;
|
package/lib/actions/index.scss
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
}
|
11
11
|
|
12
12
|
&.teamix-pro-actions-type-button {
|
13
|
-
& > button {
|
13
|
+
& > button,& > span {
|
14
14
|
&:not(:last-child) {
|
15
15
|
margin-right: var(--s-2);
|
16
16
|
}
|
@@ -110,15 +110,20 @@
|
|
110
110
|
|
111
111
|
.next-dialog-body {
|
112
112
|
.teamix-pro-info {
|
113
|
+
padding-right: 16px;
|
113
114
|
.next-card-content-container {
|
114
115
|
margin-top: 10px;
|
115
116
|
padding-bottom: 10px;
|
117
|
+
padding-right: 0;
|
116
118
|
.next-col.next-col-24:last-child {
|
117
119
|
.teamix-pro-info-item:last-child {
|
118
120
|
padding-bottom: 0px;
|
119
121
|
}
|
120
122
|
}
|
121
123
|
}
|
124
|
+
.teamix-pro-info-item-value {
|
125
|
+
padding-right: 0px;
|
126
|
+
}
|
122
127
|
}
|
123
128
|
}
|
124
129
|
|
package/lib/actions/link.js
CHANGED
@@ -5,26 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
7
|
exports.useLinkAction = useLinkAction;
|
8
|
-
|
9
8
|
var _utils = require("@teamix/utils");
|
10
|
-
|
11
|
-
var _reactRouterDom = require("react-router-dom");
|
12
|
-
|
13
9
|
var _base = require("./base");
|
14
|
-
|
15
10
|
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; }
|
16
|
-
|
17
11
|
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; }
|
18
|
-
|
19
12
|
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; }
|
20
|
-
|
21
13
|
function useLinkAction(action, actionContext) {
|
22
|
-
var history = (0,
|
14
|
+
var history = (0, _utils.useRealHistory)();
|
23
15
|
return _objectSpread({}, (0, _base.eventHandler)(action, actionContext, function (context) {
|
24
16
|
var linkAction = (0, _utils.getTargetValue)(action, context);
|
25
17
|
(0, _utils.goToLink)(linkAction, history);
|
26
18
|
}));
|
27
19
|
}
|
28
|
-
|
29
20
|
var _default = useLinkAction;
|
30
21
|
exports.default = _default;
|