@nokecy/qc-ui 0.1.16 → 0.1.18
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/package.json +2 -2
- package/dist/cjs/ag-grid-plus/_utils/boolSelect.d.ts +0 -4
- package/dist/cjs/ag-grid-plus/_utils/boolSelect.js +0 -61
- package/dist/cjs/ag-grid-plus/ag-gridPlus.d.ts +0 -7
- package/dist/cjs/ag-grid-plus/ag-gridPlus.js +0 -397
- package/dist/cjs/ag-grid-plus/global.scss +0 -23
- package/dist/cjs/ag-grid-plus/gridManager/index.d.ts +0 -8
- package/dist/cjs/ag-grid-plus/gridManager/index.js +0 -51
- package/dist/cjs/ag-grid-plus/index.d.ts +0 -4
- package/dist/cjs/ag-grid-plus/index.js +0 -67
- package/dist/cjs/ag-grid-plus/index.less +0 -7
- package/dist/cjs/ag-grid-plus/interface.d.ts +0 -37
- package/dist/cjs/ag-grid-plus/interface.js +0 -17
- package/dist/cjs/ag-grid-plus/queryForm/index.d.ts +0 -10
- package/dist/cjs/ag-grid-plus/queryForm/index.js +0 -222
- package/dist/cjs/ag-grid-plus/queryForm/index.less +0 -48
- package/dist/cjs/ag-grid-plus/queryForm/queryForm.d.ts +0 -3
- package/dist/cjs/ag-grid-plus/queryForm/queryForm.js +0 -112
- package/dist/cjs/ag-grid-plus/setting/index.d.ts +0 -8
- package/dist/cjs/ag-grid-plus/setting/index.js +0 -214
- package/dist/cjs/ag-grid-plus/settingItem/index.d.ts +0 -3
- package/dist/cjs/ag-grid-plus/settingItem/index.js +0 -27
- package/dist/cjs/ag-grid-plus/toolBar/index.d.ts +0 -20
- package/dist/cjs/ag-grid-plus/toolBar/index.js +0 -196
- package/dist/cjs/ag-grid-plus/toolBar/style.d.ts +0 -5
- package/dist/cjs/ag-grid-plus/toolBar/style.js +0 -142
- package/dist/cjs/ag-grid-plus/utils.d.ts +0 -9
- package/dist/cjs/ag-grid-plus/utils.js +0 -172
- package/dist/cjs/array-table/index.d.ts +0 -8
- package/dist/cjs/array-table/index.js +0 -201
- package/dist/cjs/array-table-index/index.d.ts +0 -3
- package/dist/cjs/array-table-index/index.js +0 -29
- package/dist/cjs/dashboard/dashboard/components/index.d.ts +0 -2
- package/dist/cjs/dashboard/dashboard/components/index.js +0 -15
- package/dist/cjs/dashboard/dashboard/components/modal/index.d.ts +0 -3
- package/dist/cjs/dashboard/dashboard/components/modal/index.js +0 -26
- package/dist/cjs/dashboard/dashboard/components/toolbar/index.d.ts +0 -11
- package/dist/cjs/dashboard/dashboard/components/toolbar/index.js +0 -37
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.d.ts +0 -1
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.js +0 -3
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +0 -49
- package/dist/cjs/dashboard/dashboard/index.d.ts +0 -62
- package/dist/cjs/dashboard/dashboard/index.js +0 -607
- package/dist/cjs/dashboard/dashboard/index.less +0 -173
- package/dist/cjs/dashboard/dashboard/service.d.ts +0 -8
- package/dist/cjs/dashboard/dashboard/service.js +0 -114
- package/dist/cjs/dashboard/dashboard/utils.d.ts +0 -9
- package/dist/cjs/dashboard/dashboard/utils.js +0 -125
- package/dist/cjs/dashboard/index.d.ts +0 -3
- package/dist/cjs/dashboard/index.js +0 -30
- package/dist/cjs/dashboard/utils.d.ts +0 -24
- package/dist/cjs/dashboard/utils.js +0 -162
- package/dist/cjs/dashboard/widget/index.d.ts +0 -13
- package/dist/cjs/dashboard/widget/index.js +0 -77
- package/dist/cjs/dashboard/widget/index.less +0 -7
- package/dist/cjs/dashboard/widget/selector/index.d.ts +0 -4
- package/dist/cjs/dashboard/widget/selector/index.js +0 -274
- package/dist/cjs/dashboard/widget/selector/index.less +0 -172
- package/dist/cjs/dashboard/widget/utils.d.ts +0 -4
- package/dist/cjs/dashboard/widget/utils.js +0 -114
- package/dist/cjs/elsa/components/finishNode.d.ts +0 -0
- package/dist/cjs/elsa/components/finishNode.js +0 -1
- package/dist/cjs/elsa/components/forkNode.d.ts +0 -0
- package/dist/cjs/elsa/components/forkNode.js +0 -1
- package/dist/cjs/elsa/components/ifNode.d.ts +0 -0
- package/dist/cjs/elsa/components/ifNode.js +0 -1
- package/dist/cjs/elsa/components/joinNode.d.ts +0 -0
- package/dist/cjs/elsa/components/joinNode.js +0 -1
- package/dist/cjs/elsa/components/setNameNode.d.ts +0 -0
- package/dist/cjs/elsa/components/setNameNode.js +0 -1
- package/dist/cjs/elsa/components/startNode.d.ts +0 -3
- package/dist/cjs/elsa/components/startNode.js +0 -24
- package/dist/cjs/elsa/components/switchNode.d.ts +0 -0
- package/dist/cjs/elsa/components/switchNode.js +0 -1
- package/dist/cjs/elsa/components/timerNode.d.ts +0 -0
- package/dist/cjs/elsa/components/timerNode.js +0 -1
- package/dist/cjs/elsa/components/userTaskNode/index.d.ts +0 -7
- package/dist/cjs/elsa/components/userTaskNode/index.js +0 -50
- package/dist/cjs/elsa/components/userTaskNode/index.less +0 -0
- package/dist/cjs/elsa/components/userTaskNode/register.d.ts +0 -1
- package/dist/cjs/elsa/components/userTaskNode/register.js +0 -54
- package/dist/cjs/elsa/elsa.design.d.ts +0 -4
- package/dist/cjs/elsa/elsa.design.js +0 -123
- package/dist/cjs/elsa/index.d.ts +0 -4
- package/dist/cjs/elsa/index.js +0 -40
- package/dist/cjs/elsa/index.less +0 -21
- package/dist/cjs/extensible-grid/index.d.ts +0 -4
- package/dist/cjs/extensible-grid/index.js +0 -39
- package/dist/cjs/extensible-grid/interface.d.ts +0 -14
- package/dist/cjs/extensible-grid/interface.js +0 -5
- package/dist/cjs/index.d.ts +0 -8
- package/dist/cjs/index.js +0 -67
- package/dist/cjs/xflow/components/Wrapper.d.ts +0 -3
- package/dist/cjs/xflow/components/Wrapper.js +0 -26
- package/dist/cjs/xflow/components/XFlow.d.ts +0 -3
- package/dist/cjs/xflow/components/XFlow.js +0 -47
- package/dist/cjs/xflow/components/XFlowGraph.d.ts +0 -4
- package/dist/cjs/xflow/components/XFlowGraph.js +0 -73
- package/dist/cjs/xflow/components/graph-toolbar/index.d.ts +0 -19
- package/dist/cjs/xflow/components/graph-toolbar/index.js +0 -60
- package/dist/cjs/xflow/components/graph-toolbar/index.less +0 -11
- package/dist/cjs/xflow/components/index.d.ts +0 -3
- package/dist/cjs/xflow/components/index.js +0 -31
- package/dist/cjs/xflow/components/keyboard/index.d.ts +0 -3
- package/dist/cjs/xflow/components/keyboard/index.js +0 -40
- package/dist/cjs/xflow/components/minimap/index.d.ts +0 -3
- package/dist/cjs/xflow/components/minimap/index.js +0 -53
- package/dist/cjs/xflow/components/scroller/index.d.ts +0 -4
- package/dist/cjs/xflow/components/scroller/index.js +0 -49
- package/dist/cjs/xflow/components/selection/index.d.ts +0 -3
- package/dist/cjs/xflow/components/selection/index.js +0 -40
- package/dist/cjs/xflow/components/snapline/index.d.ts +0 -3
- package/dist/cjs/xflow/components/snapline/index.js +0 -40
- package/dist/cjs/xflow/components/transform/index.d.ts +0 -3
- package/dist/cjs/xflow/components/transform/index.js +0 -38
- package/dist/cjs/xflow/context/GraphContext.d.ts +0 -10
- package/dist/cjs/xflow/context/GraphContext.js +0 -21
- package/dist/cjs/xflow/hooks/clipboard/index.d.ts +0 -2
- package/dist/cjs/xflow/hooks/clipboard/index.js +0 -34
- package/dist/cjs/xflow/hooks/dnd/index.d.ts +0 -2
- package/dist/cjs/xflow/hooks/dnd/index.js +0 -29
- package/dist/cjs/xflow/hooks/format/index.d.ts +0 -5
- package/dist/cjs/xflow/hooks/format/index.js +0 -60
- package/dist/cjs/xflow/hooks/graph/index.d.ts +0 -1
- package/dist/cjs/xflow/hooks/graph/index.js +0 -19
- package/dist/cjs/xflow/hooks/history/index.d.ts +0 -4
- package/dist/cjs/xflow/hooks/history/index.js +0 -63
- package/dist/cjs/xflow/hooks/keyboard/index.d.ts +0 -13
- package/dist/cjs/xflow/hooks/keyboard/index.js +0 -55
- package/dist/cjs/xflow/hooks/selection/index.d.ts +0 -3
- package/dist/cjs/xflow/hooks/selection/index.js +0 -41
- package/dist/cjs/xflow/hooks/snapline/index.d.ts +0 -2
- package/dist/cjs/xflow/hooks/snapline/index.js +0 -21
- package/dist/cjs/xflow/hooks/transform/index.d.ts +0 -2
- package/dist/cjs/xflow/hooks/transform/index.js +0 -21
- package/dist/cjs/xflow/index.d.ts +0 -3
- package/dist/cjs/xflow/index.js +0 -44
- package/dist/cjs/xflow/styles/index.less +0 -0
- package/dist/cjs/xflow/types/index.d.ts +0 -19
- package/dist/cjs/xflow/types/index.js +0 -5
- package/dist/cjs/xflow/util/algorithm.d.ts +0 -1
- package/dist/cjs/xflow/util/algorithm.js +0 -10
- package/dist/cjs/xflow/util/index.d.ts +0 -2
- package/dist/cjs/xflow/util/index.js +0 -16
- package/dist/cjs/xflow/util/main.d.ts +0 -2
- package/dist/cjs/xflow/util/main.js +0 -31
- package/dist/cjs/xflow/util/model.d.ts +0 -2
- package/dist/cjs/xflow/util/model.js +0 -29
- package/dist/esm/ag-grid-plus/_utils/boolSelect.d.ts +0 -4
- package/dist/esm/ag-grid-plus/_utils/boolSelect.js +0 -48
- package/dist/esm/ag-grid-plus/ag-gridPlus.d.ts +0 -7
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +0 -369
- package/dist/esm/ag-grid-plus/global.scss +0 -23
- package/dist/esm/ag-grid-plus/gridManager/index.d.ts +0 -8
- package/dist/esm/ag-grid-plus/gridManager/index.js +0 -44
- package/dist/esm/ag-grid-plus/index.d.ts +0 -4
- package/dist/esm/ag-grid-plus/index.js +0 -4
- package/dist/esm/ag-grid-plus/index.less +0 -7
- package/dist/esm/ag-grid-plus/interface.d.ts +0 -37
- package/dist/esm/ag-grid-plus/interface.js +0 -9
- package/dist/esm/ag-grid-plus/queryForm/index.d.ts +0 -10
- package/dist/esm/ag-grid-plus/queryForm/index.js +0 -200
- package/dist/esm/ag-grid-plus/queryForm/index.less +0 -48
- package/dist/esm/ag-grid-plus/queryForm/queryForm.d.ts +0 -3
- package/dist/esm/ag-grid-plus/queryForm/queryForm.js +0 -94
- package/dist/esm/ag-grid-plus/setting/index.d.ts +0 -8
- package/dist/esm/ag-grid-plus/setting/index.js +0 -196
- package/dist/esm/ag-grid-plus/settingItem/index.d.ts +0 -3
- package/dist/esm/ag-grid-plus/settingItem/index.js +0 -17
- package/dist/esm/ag-grid-plus/toolBar/index.d.ts +0 -20
- package/dist/esm/ag-grid-plus/toolBar/index.js +0 -176
- package/dist/esm/ag-grid-plus/toolBar/style.d.ts +0 -5
- package/dist/esm/ag-grid-plus/toolBar/style.js +0 -135
- package/dist/esm/ag-grid-plus/utils.d.ts +0 -9
- package/dist/esm/ag-grid-plus/utils.js +0 -151
- package/dist/esm/array-table/index.d.ts +0 -8
- package/dist/esm/array-table/index.js +0 -177
- package/dist/esm/array-table-index/index.d.ts +0 -3
- package/dist/esm/array-table-index/index.js +0 -10
- package/dist/esm/dashboard/dashboard/components/index.d.ts +0 -2
- package/dist/esm/dashboard/dashboard/components/index.js +0 -2
- package/dist/esm/dashboard/dashboard/components/modal/index.d.ts +0 -3
- package/dist/esm/dashboard/dashboard/components/modal/index.js +0 -17
- package/dist/esm/dashboard/dashboard/components/toolbar/index.d.ts +0 -11
- package/dist/esm/dashboard/dashboard/components/toolbar/index.js +0 -24
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.d.ts +0 -1
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.js +0 -1
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +0 -49
- package/dist/esm/dashboard/dashboard/index.d.ts +0 -62
- package/dist/esm/dashboard/dashboard/index.js +0 -574
- package/dist/esm/dashboard/dashboard/index.less +0 -173
- package/dist/esm/dashboard/dashboard/service.d.ts +0 -8
- package/dist/esm/dashboard/dashboard/service.js +0 -102
- package/dist/esm/dashboard/dashboard/utils.d.ts +0 -9
- package/dist/esm/dashboard/dashboard/utils.js +0 -106
- package/dist/esm/dashboard/index.d.ts +0 -3
- package/dist/esm/dashboard/index.js +0 -3
- package/dist/esm/dashboard/utils.d.ts +0 -24
- package/dist/esm/dashboard/utils.js +0 -142
- package/dist/esm/dashboard/widget/index.d.ts +0 -13
- package/dist/esm/dashboard/widget/index.js +0 -60
- package/dist/esm/dashboard/widget/index.less +0 -7
- package/dist/esm/dashboard/widget/selector/index.d.ts +0 -4
- package/dist/esm/dashboard/widget/selector/index.js +0 -252
- package/dist/esm/dashboard/widget/selector/index.less +0 -172
- package/dist/esm/dashboard/widget/utils.d.ts +0 -4
- package/dist/esm/dashboard/widget/utils.js +0 -87
- package/dist/esm/elsa/components/finishNode.d.ts +0 -0
- package/dist/esm/elsa/components/finishNode.js +0 -0
- package/dist/esm/elsa/components/forkNode.d.ts +0 -0
- package/dist/esm/elsa/components/forkNode.js +0 -0
- package/dist/esm/elsa/components/ifNode.d.ts +0 -0
- package/dist/esm/elsa/components/ifNode.js +0 -0
- package/dist/esm/elsa/components/joinNode.d.ts +0 -0
- package/dist/esm/elsa/components/joinNode.js +0 -0
- package/dist/esm/elsa/components/setNameNode.d.ts +0 -0
- package/dist/esm/elsa/components/setNameNode.js +0 -0
- package/dist/esm/elsa/components/startNode.d.ts +0 -3
- package/dist/esm/elsa/components/startNode.js +0 -14
- package/dist/esm/elsa/components/switchNode.d.ts +0 -0
- package/dist/esm/elsa/components/switchNode.js +0 -0
- package/dist/esm/elsa/components/timerNode.d.ts +0 -0
- package/dist/esm/elsa/components/timerNode.js +0 -0
- package/dist/esm/elsa/components/userTaskNode/index.d.ts +0 -7
- package/dist/esm/elsa/components/userTaskNode/index.js +0 -33
- package/dist/esm/elsa/components/userTaskNode/index.less +0 -0
- package/dist/esm/elsa/components/userTaskNode/register.d.ts +0 -1
- package/dist/esm/elsa/components/userTaskNode/register.js +0 -48
- package/dist/esm/elsa/elsa.design.d.ts +0 -4
- package/dist/esm/elsa/elsa.design.js +0 -105
- package/dist/esm/elsa/index.d.ts +0 -4
- package/dist/esm/elsa/index.js +0 -25
- package/dist/esm/elsa/index.less +0 -21
- package/dist/esm/extensible-grid/index.d.ts +0 -4
- package/dist/esm/extensible-grid/index.js +0 -28
- package/dist/esm/extensible-grid/interface.d.ts +0 -14
- package/dist/esm/extensible-grid/interface.js +0 -1
- package/dist/esm/index.d.ts +0 -8
- package/dist/esm/index.js +0 -8
- package/dist/esm/xflow/components/Wrapper.d.ts +0 -3
- package/dist/esm/xflow/components/Wrapper.js +0 -15
- package/dist/esm/xflow/components/XFlow.d.ts +0 -3
- package/dist/esm/xflow/components/XFlow.js +0 -32
- package/dist/esm/xflow/components/XFlowGraph.d.ts +0 -4
- package/dist/esm/xflow/components/XFlowGraph.js +0 -54
- package/dist/esm/xflow/components/graph-toolbar/index.d.ts +0 -19
- package/dist/esm/xflow/components/graph-toolbar/index.js +0 -44
- package/dist/esm/xflow/components/graph-toolbar/index.less +0 -11
- package/dist/esm/xflow/components/index.d.ts +0 -3
- package/dist/esm/xflow/components/index.js +0 -3
- package/dist/esm/xflow/components/keyboard/index.d.ts +0 -3
- package/dist/esm/xflow/components/keyboard/index.js +0 -22
- package/dist/esm/xflow/components/minimap/index.d.ts +0 -3
- package/dist/esm/xflow/components/minimap/index.js +0 -35
- package/dist/esm/xflow/components/scroller/index.d.ts +0 -4
- package/dist/esm/xflow/components/scroller/index.js +0 -28
- package/dist/esm/xflow/components/selection/index.d.ts +0 -3
- package/dist/esm/xflow/components/selection/index.js +0 -22
- package/dist/esm/xflow/components/snapline/index.d.ts +0 -3
- package/dist/esm/xflow/components/snapline/index.js +0 -22
- package/dist/esm/xflow/components/transform/index.d.ts +0 -3
- package/dist/esm/xflow/components/transform/index.js +0 -20
- package/dist/esm/xflow/context/GraphContext.d.ts +0 -10
- package/dist/esm/xflow/context/GraphContext.js +0 -9
- package/dist/esm/xflow/hooks/clipboard/index.d.ts +0 -2
- package/dist/esm/xflow/hooks/clipboard/index.js +0 -22
- package/dist/esm/xflow/hooks/dnd/index.d.ts +0 -2
- package/dist/esm/xflow/hooks/dnd/index.js +0 -17
- package/dist/esm/xflow/hooks/format/index.d.ts +0 -5
- package/dist/esm/xflow/hooks/format/index.js +0 -48
- package/dist/esm/xflow/hooks/graph/index.d.ts +0 -1
- package/dist/esm/xflow/hooks/graph/index.js +0 -8
- package/dist/esm/xflow/hooks/history/index.d.ts +0 -4
- package/dist/esm/xflow/hooks/history/index.js +0 -45
- package/dist/esm/xflow/hooks/keyboard/index.d.ts +0 -13
- package/dist/esm/xflow/hooks/keyboard/index.js +0 -40
- package/dist/esm/xflow/hooks/selection/index.d.ts +0 -3
- package/dist/esm/xflow/hooks/selection/index.js +0 -25
- package/dist/esm/xflow/hooks/snapline/index.d.ts +0 -2
- package/dist/esm/xflow/hooks/snapline/index.js +0 -9
- package/dist/esm/xflow/hooks/transform/index.d.ts +0 -2
- package/dist/esm/xflow/hooks/transform/index.js +0 -9
- package/dist/esm/xflow/index.d.ts +0 -3
- package/dist/esm/xflow/index.js +0 -3
- package/dist/esm/xflow/styles/index.less +0 -0
- package/dist/esm/xflow/types/index.d.ts +0 -19
- package/dist/esm/xflow/types/index.js +0 -1
- package/dist/esm/xflow/util/algorithm.d.ts +0 -1
- package/dist/esm/xflow/util/algorithm.js +0 -1
- package/dist/esm/xflow/util/index.d.ts +0 -2
- package/dist/esm/xflow/util/index.js +0 -2
- package/dist/esm/xflow/util/main.d.ts +0 -2
- package/dist/esm/xflow/util/main.js +0 -2
- package/dist/esm/xflow/util/model.d.ts +0 -2
- package/dist/esm/xflow/util/model.js +0 -19
- package/dist/umd/qc-ui.min.css +0 -1
- package/dist/umd/qc-ui.min.js +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
var SettingItem = function SettingItem(props) {
|
|
4
|
-
var onClick = props.onClick,
|
|
5
|
-
icon = props.icon;
|
|
6
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
7
|
-
style: {
|
|
8
|
-
margin: "0 4px",
|
|
9
|
-
color: "#000",
|
|
10
|
-
fontSize: 16,
|
|
11
|
-
cursor: "pointer"
|
|
12
|
-
},
|
|
13
|
-
onClick: onClick
|
|
14
|
-
}, icon);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default SettingItem;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { LabelTooltipType } from 'antd/es/form/FormItemLabel';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare type SettingPropType = React.ReactNode;
|
|
4
|
-
export declare type ListToolBarProps = {
|
|
5
|
-
prefixCls?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
style?: React.CSSProperties;
|
|
8
|
-
/** 标题 */
|
|
9
|
-
title?: React.ReactNode;
|
|
10
|
-
/** 副标题 */
|
|
11
|
-
subTitle?: React.ReactNode;
|
|
12
|
-
/** 标题提示 */
|
|
13
|
-
tooltip?: string | LabelTooltipType;
|
|
14
|
-
/** 工具栏右侧操作区 */
|
|
15
|
-
actions?: React.ReactNode[];
|
|
16
|
-
/** 工作栏右侧设置区 */
|
|
17
|
-
settings?: SettingPropType[];
|
|
18
|
-
};
|
|
19
|
-
declare const ListToolBar: React.FC<ListToolBarProps>;
|
|
20
|
-
export default ListToolBar;
|
|
@@ -1,176 +0,0 @@
|
|
|
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
|
-
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
|
-
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
|
-
import { LabelIconTip } from '@ant-design/pro-utils';
|
|
8
|
-
import { ConfigProvider, Tooltip } from 'antd';
|
|
9
|
-
import classNames from 'classnames';
|
|
10
|
-
import React, { useContext, useMemo } from 'react';
|
|
11
|
-
import { useStyle } from "./style";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 获取配置区域 DOM Item
|
|
15
|
-
*
|
|
16
|
-
* @param setting 配置项
|
|
17
|
-
*/
|
|
18
|
-
function getSettingItem(setting) {
|
|
19
|
-
if ( /*#__PURE__*/React.isValidElement(setting)) {
|
|
20
|
-
return setting;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (setting) {
|
|
24
|
-
var settingConfig = setting;
|
|
25
|
-
var icon = settingConfig.icon,
|
|
26
|
-
tooltip = settingConfig.tooltip,
|
|
27
|
-
_onClick = settingConfig.onClick,
|
|
28
|
-
key = settingConfig.key;
|
|
29
|
-
|
|
30
|
-
if (icon && tooltip) {
|
|
31
|
-
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
32
|
-
title: tooltip
|
|
33
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
34
|
-
key: key,
|
|
35
|
-
onClick: function onClick() {
|
|
36
|
-
if (_onClick) {
|
|
37
|
-
_onClick(key);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}, icon));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return icon;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
var ListToolBar = function ListToolBar(_ref) {
|
|
50
|
-
var customizePrefixCls = _ref.prefixCls,
|
|
51
|
-
title = _ref.title,
|
|
52
|
-
subTitle = _ref.subTitle,
|
|
53
|
-
tooltip = _ref.tooltip,
|
|
54
|
-
className = _ref.className,
|
|
55
|
-
style = _ref.style,
|
|
56
|
-
_ref$actions = _ref.actions,
|
|
57
|
-
actions = _ref$actions === void 0 ? [] : _ref$actions,
|
|
58
|
-
_ref$settings = _ref.settings,
|
|
59
|
-
settings = _ref$settings === void 0 ? [] : _ref$settings;
|
|
60
|
-
|
|
61
|
-
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
62
|
-
getPrefixCls = _useContext.getPrefixCls;
|
|
63
|
-
|
|
64
|
-
var prefixCls = getPrefixCls('pro-table-list-toolbar', customizePrefixCls);
|
|
65
|
-
|
|
66
|
-
var _useStyle = useStyle(prefixCls),
|
|
67
|
-
hashId = _useStyle.hashId;
|
|
68
|
-
/** 有没有 title,需要结合多个场景判断 */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var hasTitle = useMemo(function () {
|
|
72
|
-
return title || subTitle || tooltip;
|
|
73
|
-
}, [subTitle, title, tooltip]);
|
|
74
|
-
/** 没有 key 的时候帮忙加一下 key 不加的话很烦人 */
|
|
75
|
-
|
|
76
|
-
var actionDom = useMemo(function () {
|
|
77
|
-
if (!Array.isArray(actions)) {
|
|
78
|
-
return actions;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (actions.length < 1) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
86
|
-
style: {
|
|
87
|
-
display: 'flex',
|
|
88
|
-
alignItems: 'center',
|
|
89
|
-
gap: 8
|
|
90
|
-
}
|
|
91
|
-
}, actions.map(function (action, index) {
|
|
92
|
-
if (! /*#__PURE__*/React.isValidElement(action)) {
|
|
93
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
94
|
-
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
95
|
-
key: index
|
|
96
|
-
}, action);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return /*#__PURE__*/React.cloneElement(action, _objectSpread({
|
|
100
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
101
|
-
key: index
|
|
102
|
-
}, action === null || action === void 0 ? void 0 : action.props));
|
|
103
|
-
}));
|
|
104
|
-
}, [actions]);
|
|
105
|
-
var hasRight = useMemo(function () {
|
|
106
|
-
return hasTitle || actionDom || (settings === null || settings === void 0 ? void 0 : settings.length);
|
|
107
|
-
}, [actionDom, hasTitle, settings === null || settings === void 0 ? void 0 : settings.length]);
|
|
108
|
-
var hasLeft = useMemo(function () {
|
|
109
|
-
return tooltip || title || subTitle;
|
|
110
|
-
}, [hasTitle, subTitle, title, tooltip]);
|
|
111
|
-
var leftTitleDom = useMemo(function () {
|
|
112
|
-
// 保留dom是为了占位,不然 right 就变到左边了
|
|
113
|
-
if (!hasLeft && hasRight) {
|
|
114
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
115
|
-
className: "".concat(prefixCls, "-left ").concat(hashId)
|
|
116
|
-
});
|
|
117
|
-
} // 减少 space 的dom,渲染的时候能节省点性能
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (hasTitle) {
|
|
121
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
122
|
-
className: "".concat(prefixCls, "-left ").concat(hashId)
|
|
123
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
124
|
-
className: "".concat(prefixCls, "-title ").concat(hashId)
|
|
125
|
-
}, /*#__PURE__*/React.createElement(LabelIconTip, {
|
|
126
|
-
tooltip: tooltip,
|
|
127
|
-
label: title,
|
|
128
|
-
subTitle: subTitle
|
|
129
|
-
})));
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
133
|
-
className: "".concat(prefixCls, "-left ").concat(hashId)
|
|
134
|
-
}, hasTitle && /*#__PURE__*/React.createElement("div", {
|
|
135
|
-
className: "".concat(prefixCls, "-title ").concat(hashId)
|
|
136
|
-
}, /*#__PURE__*/React.createElement(LabelIconTip, {
|
|
137
|
-
tooltip: tooltip,
|
|
138
|
-
label: title,
|
|
139
|
-
subTitle: subTitle
|
|
140
|
-
})));
|
|
141
|
-
}, [hasLeft, hasRight, hasTitle, hashId, prefixCls, subTitle, title, tooltip]);
|
|
142
|
-
var rightTitleDom = useMemo(function () {
|
|
143
|
-
if (!hasRight) return null;
|
|
144
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
145
|
-
className: "".concat(prefixCls, "-right ").concat(hashId),
|
|
146
|
-
style: {
|
|
147
|
-
alignItems: 'center'
|
|
148
|
-
}
|
|
149
|
-
}, actionDom, settings !== null && settings !== void 0 && settings.length ? /*#__PURE__*/React.createElement("div", {
|
|
150
|
-
className: "".concat(prefixCls, "-setting-items ").concat(hashId)
|
|
151
|
-
}, settings.map(function (setting, index) {
|
|
152
|
-
var settingItem = getSettingItem(setting);
|
|
153
|
-
return (
|
|
154
|
-
/*#__PURE__*/
|
|
155
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
156
|
-
React.createElement("div", {
|
|
157
|
-
key: index,
|
|
158
|
-
className: "".concat(prefixCls, "-setting-item ").concat(hashId)
|
|
159
|
-
}, settingItem)
|
|
160
|
-
);
|
|
161
|
-
})) : null);
|
|
162
|
-
}, [hasRight, prefixCls, hashId, hasTitle, actionDom, settings]);
|
|
163
|
-
var titleNode = useMemo(function () {
|
|
164
|
-
if (!hasRight && !hasLeft) return null;
|
|
165
|
-
var containerClassName = classNames("".concat(prefixCls, "-container"), hashId, {});
|
|
166
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
167
|
-
className: containerClassName
|
|
168
|
-
}, leftTitleDom, rightTitleDom);
|
|
169
|
-
}, [hasLeft, hasRight, hashId, leftTitleDom, prefixCls, rightTitleDom]);
|
|
170
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
171
|
-
style: style,
|
|
172
|
-
className: classNames(prefixCls, hashId, className)
|
|
173
|
-
}, titleNode);
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export default ListToolBar;
|
|
@@ -1,135 +0,0 @@
|
|
|
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
|
-
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
|
-
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
|
-
import { useStyle as useAntdStyle } from '@ant-design/pro-provider';
|
|
8
|
-
|
|
9
|
-
var genProListStyle = function genProListStyle(token) {
|
|
10
|
-
var _token$componentCls;
|
|
11
|
-
|
|
12
|
-
return _defineProperty({}, token.componentCls, (_token$componentCls = {
|
|
13
|
-
lineHeight: '1',
|
|
14
|
-
'&-container': {
|
|
15
|
-
display: 'flex',
|
|
16
|
-
justifyContent: 'space-between',
|
|
17
|
-
paddingBlock: 8,
|
|
18
|
-
//token.padding,
|
|
19
|
-
paddingInline: 0,
|
|
20
|
-
'&-mobile': {
|
|
21
|
-
flexDirection: 'column'
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
'&-title': {
|
|
25
|
-
display: 'flex',
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
justifyContent: 'flex-start',
|
|
28
|
-
color: token.colorTextHeading,
|
|
29
|
-
fontWeight: '500',
|
|
30
|
-
fontSize: token.fontSizeLG
|
|
31
|
-
},
|
|
32
|
-
'&-search:not(:last-child)': {
|
|
33
|
-
display: 'flex',
|
|
34
|
-
alignItems: 'center',
|
|
35
|
-
justifyContent: 'flex-start'
|
|
36
|
-
},
|
|
37
|
-
'&-setting-item': {
|
|
38
|
-
marginBlock: 0,
|
|
39
|
-
marginInline: 4,
|
|
40
|
-
color: token.colorIconHover,
|
|
41
|
-
fontSize: token.fontSizeLG,
|
|
42
|
-
cursor: 'pointer',
|
|
43
|
-
'> span': {
|
|
44
|
-
display: 'block',
|
|
45
|
-
width: '100%',
|
|
46
|
-
height: '100%'
|
|
47
|
-
},
|
|
48
|
-
'&:hover': {
|
|
49
|
-
color: token.colorPrimary
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
'&-left': _defineProperty({
|
|
53
|
-
display: 'flex',
|
|
54
|
-
flexWrap: 'wrap',
|
|
55
|
-
alignItems: 'center',
|
|
56
|
-
gap: 8,
|
|
57
|
-
justifyContent: 'flex-start',
|
|
58
|
-
maxWidth: 'calc(100% - 200px)'
|
|
59
|
-
}, "".concat(token.antCls, "-tabs"), {
|
|
60
|
-
width: '100%'
|
|
61
|
-
}),
|
|
62
|
-
'&-right': {
|
|
63
|
-
display: 'flex',
|
|
64
|
-
flexWrap: 'wrap',
|
|
65
|
-
justifyContent: 'flex-end',
|
|
66
|
-
gap: 8
|
|
67
|
-
},
|
|
68
|
-
'&-extra-line': {
|
|
69
|
-
marginBlockEnd: token.margin
|
|
70
|
-
},
|
|
71
|
-
'&-setting-items': {
|
|
72
|
-
display: 'flex',
|
|
73
|
-
gap: 8,
|
|
74
|
-
lineHeight: '32px',
|
|
75
|
-
alignItems: 'center'
|
|
76
|
-
},
|
|
77
|
-
'&-filter': _defineProperty({
|
|
78
|
-
'&:not(:last-child)': {
|
|
79
|
-
marginInlineEnd: token.margin
|
|
80
|
-
},
|
|
81
|
-
display: 'flex',
|
|
82
|
-
alignItems: 'center'
|
|
83
|
-
}, "div.$".concat(token.antCls, "-pro-table-search"), {
|
|
84
|
-
marginBlock: 0,
|
|
85
|
-
marginInline: 0,
|
|
86
|
-
paddingBlock: 0,
|
|
87
|
-
paddingInline: 0
|
|
88
|
-
}),
|
|
89
|
-
'&-inline-menu-item': {
|
|
90
|
-
display: 'inline-block',
|
|
91
|
-
marginInlineEnd: token.marginLG,
|
|
92
|
-
cursor: 'pointer',
|
|
93
|
-
opacity: '0.75',
|
|
94
|
-
'&-active': {
|
|
95
|
-
fontWeight: 'bold',
|
|
96
|
-
opacity: '1'
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}, _defineProperty(_token$componentCls, "".concat(token.antCls, "-tabs-top > ").concat(token.antCls, "-tabs-nav"), _defineProperty({
|
|
100
|
-
marginBlockEnd: 0,
|
|
101
|
-
'&::before': {
|
|
102
|
-
borderBlockEnd: 0
|
|
103
|
-
}
|
|
104
|
-
}, "".concat(token.antCls, "-tabs-nav-list"), {
|
|
105
|
-
marginBlockStart: 0,
|
|
106
|
-
'${token.antCls}-tabs-tab': {
|
|
107
|
-
paddingBlockStart: 0
|
|
108
|
-
}
|
|
109
|
-
})), _defineProperty(_token$componentCls, '&-dropdownmenu-label', {
|
|
110
|
-
fontWeight: 'bold',
|
|
111
|
-
fontSize: token.fontSizeIcon,
|
|
112
|
-
textAlign: 'center',
|
|
113
|
-
cursor: 'pointer'
|
|
114
|
-
}), _defineProperty(_token$componentCls, '@media (max-width: 768px)', _defineProperty({}, token.componentCls, {
|
|
115
|
-
'&-container': {
|
|
116
|
-
display: 'flex',
|
|
117
|
-
flexWrap: 'wrap',
|
|
118
|
-
flexDirection: 'column'
|
|
119
|
-
},
|
|
120
|
-
'&-left': {
|
|
121
|
-
marginBlockEnd: '16px',
|
|
122
|
-
maxWidth: '100%'
|
|
123
|
-
}
|
|
124
|
-
})), _token$componentCls));
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export function useStyle(prefixCls) {
|
|
128
|
-
return useAntdStyle('ProTableListToolBar', function (token) {
|
|
129
|
-
var proListToken = _objectSpread(_objectSpread({}, token), {}, {
|
|
130
|
-
componentCls: ".".concat(prefixCls)
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
return [genProListStyle(proListToken)];
|
|
134
|
-
});
|
|
135
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ValueFormatterParams } from 'ag-grid-community';
|
|
2
|
-
declare const convertFilterModel: (filterModel: any) => string;
|
|
3
|
-
declare const convertSortModel: (sortModel: any[]) => string;
|
|
4
|
-
declare const dateValueFormatter: (params: ValueFormatterParams) => string;
|
|
5
|
-
declare const dateTimeValueFormatter: (params: ValueFormatterParams) => string;
|
|
6
|
-
declare const flatten: (arr: any[], parentPropName: any, parentref?: any[]) => any;
|
|
7
|
-
declare const toTree: (data: any[]) => any[];
|
|
8
|
-
declare const flattenTreeDeep: (treeData: any[], childrenName?: string) => any[];
|
|
9
|
-
export { dateValueFormatter, dateTimeValueFormatter, convertFilterModel, convertSortModel, flattenTreeDeep, toTree, flatten };
|
|
@@ -1,151 +0,0 @@
|
|
|
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
|
-
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
|
-
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
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
-
|
|
9
|
-
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."); }
|
|
10
|
-
|
|
11
|
-
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); }
|
|
12
|
-
|
|
13
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
14
|
-
|
|
15
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
-
|
|
17
|
-
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; }
|
|
18
|
-
|
|
19
|
-
import dayjs from 'dayjs';
|
|
20
|
-
|
|
21
|
-
var getFilter = function getFilter(objectKey, value) {
|
|
22
|
-
if (typeof value === 'string') {
|
|
23
|
-
return "".concat(objectKey, " =* ").concat(value);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (typeof value === 'number') {
|
|
27
|
-
return "".concat(objectKey, " = ").concat(value);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (typeof value === 'boolean') {
|
|
31
|
-
return "".concat(objectKey, " = ").concat(value);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (value instanceof Array) {
|
|
35
|
-
return "".concat(objectKey, " >= ").concat(dayjs(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat(dayjs(value[1]).add(1, 'days').format("YYYY-MM-DD"));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return getObjectFilter(value, objectKey);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var getObjectFilter = function getObjectFilter(obj, objKey) {
|
|
42
|
-
var key = Object.keys(obj)[0];
|
|
43
|
-
var value = obj[key];
|
|
44
|
-
var objectKey = "".concat(objKey, ".").concat(key);
|
|
45
|
-
|
|
46
|
-
if (typeof value === 'number') {
|
|
47
|
-
return "".concat(objectKey, " = ").concat(value);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (typeof value === 'string') {
|
|
51
|
-
return "".concat(objectKey, " =* ").concat(value);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (typeof value === 'boolean') {
|
|
55
|
-
return "".concat(objectKey, " = ").concat(value);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (value instanceof Array) {
|
|
59
|
-
return "".concat(objectKey, " >= ").concat(dayjs(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat(dayjs(value[1]).add(1, 'days').format("YYYY-MM-DD"));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return getObjectFilter(value, "".concat(objKey, ".").concat(key));
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
var convertFilterModel = function convertFilterModel(filterModel) {
|
|
66
|
-
var items = [];
|
|
67
|
-
Object.keys(filterModel).map(function (key) {
|
|
68
|
-
var value = filterModel[key];
|
|
69
|
-
|
|
70
|
-
if (value && value != "") {
|
|
71
|
-
items.push(getFilter(key, value));
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
return items.join(",");
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
var convertSortModel = function convertSortModel(sortModel) {
|
|
78
|
-
var sorter = sortModel.map(function (sort) {
|
|
79
|
-
var key = sort.colId;
|
|
80
|
-
var value = sort.sort;
|
|
81
|
-
return "".concat(key.replace(',', '.'), " ").concat(value == 'desc' ? 'desc' : 'asc');
|
|
82
|
-
}).join(' , ');
|
|
83
|
-
return sorter;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
var dateValueFormatter = function dateValueFormatter(params) {
|
|
87
|
-
return params.value ? dayjs(params.value).format("YYYY-MM-DD") : "";
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
var dateTimeValueFormatter = function dateTimeValueFormatter(params) {
|
|
91
|
-
return params.value ? dayjs(params.value).format("YYYY-MM-DD HH:mm:ss") : "";
|
|
92
|
-
}; //@ts-ignore
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
var flatten = function flatten(arr, parentPropName, parentref) {
|
|
96
|
-
var data = arr ? arr.reduce(function (result, item) {
|
|
97
|
-
return [].concat(_toConsumableArray(result), [_objectSpread(_objectSpread({}, item), {}, {
|
|
98
|
-
hierarchy: parentref ? [].concat(_toConsumableArray(parentref), [item[parentPropName]]) : [item[parentPropName]]
|
|
99
|
-
})], _toConsumableArray(flatten(item.children, parentPropName, parentref ? [].concat(_toConsumableArray(parentref), [item[parentPropName]]) : [item[parentPropName]])));
|
|
100
|
-
}, []) : [];
|
|
101
|
-
return data;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
var toTree = function toTree(data) {
|
|
105
|
-
// 删除 所有 children,以防止多次调用
|
|
106
|
-
data.forEach(function (item) {
|
|
107
|
-
delete item.children;
|
|
108
|
-
}); // 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
|
109
|
-
|
|
110
|
-
var map = {};
|
|
111
|
-
data.forEach(function (item) {
|
|
112
|
-
map[item.id] = item;
|
|
113
|
-
});
|
|
114
|
-
var val = [];
|
|
115
|
-
data.forEach(function (item) {
|
|
116
|
-
// 以当前遍历项,的pid,去map对象中找到索引的id
|
|
117
|
-
var parent = map[item.parentId]; // 好绕啊,如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
|
|
118
|
-
|
|
119
|
-
if (parent) {
|
|
120
|
-
(parent.children || (parent.children = [])).push(item);
|
|
121
|
-
} else {
|
|
122
|
-
//如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
|
|
123
|
-
val.push(item);
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
return val;
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
var flattenTreeDeep = function flattenTreeDeep(treeData) {
|
|
130
|
-
var childrenName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'childrens';
|
|
131
|
-
|
|
132
|
-
var flattenData = function flattenData(treeData, res) {
|
|
133
|
-
var childrenName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'childrens';
|
|
134
|
-
treeData.forEach(function (item) {
|
|
135
|
-
res.push(item);
|
|
136
|
-
|
|
137
|
-
if (item[childrenName] && item[childrenName].length !== 0) {
|
|
138
|
-
flattenData(item[childrenName], res);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
delete item[childrenName];
|
|
142
|
-
});
|
|
143
|
-
return res;
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
var res = [];
|
|
147
|
-
flattenData(treeData, res, childrenName);
|
|
148
|
-
return res;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
export { dateValueFormatter, dateTimeValueFormatter, convertFilterModel, convertSortModel, flattenTreeDeep, toTree, flatten };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AgGridReactProps, AgGridColumnProps } from 'ag-grid-react';
|
|
3
|
-
import { ArrayBaseMixins } from '@formily/antd';
|
|
4
|
-
declare type ComposedArrayTable = React.FC<React.PropsWithChildren<AgGridReactProps>> & ArrayBaseMixins & {
|
|
5
|
-
Column?: React.FC<React.PropsWithChildren<AgGridColumnProps>>;
|
|
6
|
-
};
|
|
7
|
-
export declare const ArrayTable: ComposedArrayTable;
|
|
8
|
-
export default ArrayTable;
|