@ahoo-wang/fetcher-viewer 3.8.3 → 3.8.5
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/fetcher-viewer.css +1 -1
- package/dist/filter/panel/EditableFilterPanel.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +2022 -1748
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/table/ViewTable.d.ts +73 -56
- package/dist/table/ViewTable.d.ts.map +1 -1
- package/dist/table/setting/TableFieldItem.d.ts.map +1 -1
- package/dist/table/setting/TableSettingPanel.d.ts +22 -0
- package/dist/table/setting/TableSettingPanel.d.ts.map +1 -1
- package/dist/table/types.d.ts +1 -2
- package/dist/table/types.d.ts.map +1 -1
- package/dist/topbar/Point.d.ts +2 -0
- package/dist/topbar/Point.d.ts.map +1 -0
- package/dist/topbar/RefreshDataBarItem.d.ts.map +1 -1
- package/dist/topbar/TopBar.d.ts +5 -1
- package/dist/topbar/TopBar.d.ts.map +1 -1
- package/dist/topbar/index.d.ts +1 -0
- package/dist/topbar/index.d.ts.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +31 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/viewer/FilterStateContext.d.ts +10 -0
- package/dist/viewer/FilterStateContext.d.ts.map +1 -0
- package/dist/viewer/TableStateContext.d.ts +12 -0
- package/dist/viewer/TableStateContext.d.ts.map +1 -0
- package/dist/viewer/Viewer.d.ts +3 -13
- package/dist/viewer/Viewer.d.ts.map +1 -1
- package/dist/viewer/ViewerSharedValueContext.d.ts +0 -2
- package/dist/viewer/ViewerSharedValueContext.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +5 -0
- package/dist/viewer/index.d.ts.map +1 -1
- package/dist/viewer/panel/ViewItem.d.ts +8 -0
- package/dist/viewer/panel/ViewItem.d.ts.map +1 -0
- package/dist/viewer/panel/ViewItemGroup.d.ts +9 -0
- package/dist/viewer/panel/ViewItemGroup.d.ts.map +1 -0
- package/dist/viewer/panel/ViewPanel.d.ts +12 -0
- package/dist/viewer/panel/ViewPanel.d.ts.map +1 -0
- package/dist/viewer/panel/index.d.ts +4 -0
- package/dist/viewer/panel/index.d.ts.map +1 -0
- package/dist/viewer/types.d.ts +7 -0
- package/dist/viewer/types.d.ts.map +1 -1
- package/dist/viewer/useFilterStateReducer.d.ts +21 -0
- package/dist/viewer/useFilterStateReducer.d.ts.map +1 -0
- package/dist/viewer/useTableStateReducer.d.ts +18 -0
- package/dist/viewer/useTableStateReducer.d.ts.map +1 -0
- package/package.json +3 -2
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { ViewTableProps } from './types';
|
|
2
2
|
import { TableRecordType } from '../types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* ViewTable Component
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* A comprehensive table component that provides advanced data display capabilities
|
|
7
|
+
* with column management, sorting, selection, and customizable actions. It integrates
|
|
8
|
+
* with the viewer's table state context for dynamic column visibility and configuration.
|
|
9
9
|
*
|
|
10
|
-
* @template RecordType - The type of
|
|
11
|
-
*
|
|
12
|
-
* @param props
|
|
13
|
-
* @param props.
|
|
14
|
-
* @param props.
|
|
15
|
-
* @param props.actionColumn - Optional action column configuration
|
|
16
|
-
* @
|
|
10
|
+
* @template RecordType - The type of records displayed in the table, must extend TableRecordType
|
|
11
|
+
*
|
|
12
|
+
* @param props - The properties for configuring the table
|
|
13
|
+
* @param props.viewDefinition - Defines the table structure, columns, and behavior
|
|
14
|
+
* @param props.dataSource - Array of records to display in the table
|
|
15
|
+
* @param props.actionColumn - Optional action column configuration for row-level actions
|
|
16
|
+
* @param props.onSortChanged - Callback fired when table sorting changes
|
|
17
|
+
* @param props.onSelectChange - Callback fired when row selection changes
|
|
18
|
+
* @param props.attributes - Additional Ant Design Table props
|
|
17
19
|
*
|
|
18
20
|
* @example
|
|
19
21
|
* ```tsx
|
|
@@ -21,68 +23,83 @@ import { TableRecordType } from '../types';
|
|
|
21
23
|
* id: number;
|
|
22
24
|
* name: string;
|
|
23
25
|
* email: string;
|
|
24
|
-
* status:
|
|
26
|
+
* status: 'active' | 'inactive';
|
|
25
27
|
* }
|
|
26
28
|
*
|
|
27
|
-
* const
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
29
|
+
* const viewDefinition: ViewDefinition = {
|
|
30
|
+
* name: 'Users',
|
|
31
|
+
* columns: [
|
|
32
|
+
* {
|
|
33
|
+
* title: 'ID',
|
|
34
|
+
* dataIndex: 'id',
|
|
35
|
+
* type: 'number',
|
|
36
|
+
* primaryKey: true,
|
|
37
|
+
* sorter: true
|
|
38
|
+
* },
|
|
39
|
+
* {
|
|
40
|
+
* title: 'Name',
|
|
41
|
+
* dataIndex: 'name',
|
|
42
|
+
* type: 'text',
|
|
43
|
+
* sorter: true
|
|
44
|
+
* },
|
|
45
|
+
* {
|
|
46
|
+
* title: 'Email',
|
|
47
|
+
* dataIndex: 'email',
|
|
48
|
+
* type: 'link',
|
|
49
|
+
* attributes: { target: '_blank' }
|
|
50
|
+
* },
|
|
51
|
+
* {
|
|
52
|
+
* title: 'Status',
|
|
53
|
+
* dataIndex: 'status',
|
|
54
|
+
* type: 'tag',
|
|
55
|
+
* sorter: true
|
|
56
|
+
* }
|
|
57
|
+
* ],
|
|
58
|
+
* availableFilters: [],
|
|
59
|
+
* dataSourceUrl: '/api/users',
|
|
60
|
+
* countUrl: '/api/users/count',
|
|
61
|
+
* checkable: true
|
|
62
|
+
* };
|
|
58
63
|
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```tsx
|
|
61
|
-
* // With action column
|
|
62
64
|
* const actionColumn: ViewTableActionColumn<User> = {
|
|
63
65
|
* title: 'Actions',
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* primaryKey: false,
|
|
66
|
+
* configurable: true,
|
|
67
|
+
* configurePanelTitle: 'Table Settings',
|
|
67
68
|
* actions: (record) => ({
|
|
68
69
|
* primaryAction: {
|
|
69
70
|
* data: { value: 'Edit', record, index: 0 },
|
|
70
|
-
* attributes: { onClick: () =>
|
|
71
|
+
* attributes: { onClick: () => handleEdit(record.id) }
|
|
71
72
|
* },
|
|
72
73
|
* secondaryActions: [
|
|
73
74
|
* {
|
|
74
75
|
* data: { value: 'Delete', record, index: 0 },
|
|
75
|
-
* attributes: { onClick: () =>
|
|
76
|
+
* attributes: { onClick: () => handleDelete(record.id), danger: true }
|
|
76
77
|
* }
|
|
77
78
|
* ]
|
|
78
79
|
* })
|
|
79
80
|
* };
|
|
80
81
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
82
|
+
* function UserTable() {
|
|
83
|
+
* const [data, setData] = useState<User[]>([]);
|
|
84
|
+
*
|
|
85
|
+
* return (
|
|
86
|
+
* <ViewTable
|
|
87
|
+
* viewDefinition={viewDefinition}
|
|
88
|
+
* dataSource={data}
|
|
89
|
+
* actionColumn={actionColumn}
|
|
90
|
+
* onSortChanged={(sorter) => {
|
|
91
|
+
* console.log('Sort changed:', sorter);
|
|
92
|
+
* }}
|
|
93
|
+
* onSelectChange={(selectedUsers) => {
|
|
94
|
+
* console.log('Selected users:', selectedUsers);
|
|
95
|
+
* }}
|
|
96
|
+
* attributes={{
|
|
97
|
+
* pagination: { pageSize: 20 },
|
|
98
|
+
* loading: false
|
|
99
|
+
* }}
|
|
100
|
+
* />
|
|
101
|
+
* );
|
|
102
|
+
* }
|
|
86
103
|
* ```
|
|
87
104
|
*/
|
|
88
105
|
export declare function ViewTable<RecordType extends TableRecordType<any>>(props: ViewTableProps<RecordType>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewTable.d.ts","sourceRoot":"","sources":["../../src/table/ViewTable.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAOzC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ViewTable.d.ts","sourceRoot":"","sources":["../../src/table/ViewTable.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAOzC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqGG;AACH,wBAAgB,SAAS,CAAC,UAAU,SAAS,eAAe,CAAC,GAAG,CAAC,EAC/D,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,2CA6LlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFieldItem.d.ts","sourceRoot":"","sources":["../../../src/table/setting/TableFieldItem.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,mBAAmB;IAClC,iEAAiE;IACjE,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,uDAAuD;IACvD,KAAK,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"TableFieldItem.d.ts","sourceRoot":"","sources":["../../../src/table/setting/TableFieldItem.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,mBAAmB;IAClC,iEAAiE;IACjE,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,uDAAuD;IACvD,KAAK,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAaxD"}
|
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
import { ViewDefinition } from '../../viewer';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the TableSettingPanel component.
|
|
4
|
+
* This component provides a UI for managing table column settings including
|
|
5
|
+
* visibility toggles and drag-and-drop reordering.
|
|
6
|
+
*/
|
|
2
7
|
export interface TableSettingPanelProps {
|
|
8
|
+
/** The view definition containing column metadata and configuration */
|
|
3
9
|
viewDefinition: ViewDefinition;
|
|
10
|
+
/** Optional CSS class name for additional styling */
|
|
4
11
|
className?: string;
|
|
5
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Table Setting Panel Component
|
|
15
|
+
*
|
|
16
|
+
* A comprehensive UI component for managing table column settings. It provides:
|
|
17
|
+
* - Column visibility toggles via checkboxes
|
|
18
|
+
* - Drag-and-drop reordering of columns
|
|
19
|
+
* - Fixed column management (up to 3 fixed columns)
|
|
20
|
+
* - Visual grouping of columns by state (fixed, visible, hidden)
|
|
21
|
+
*
|
|
22
|
+
* The component integrates with the table state context to persist changes
|
|
23
|
+
* and works within the broader Viewer ecosystem for data table management.
|
|
24
|
+
*
|
|
25
|
+
* @param props - The component props
|
|
26
|
+
* @returns A React element representing the table settings panel
|
|
27
|
+
*/
|
|
6
28
|
export declare function TableSettingPanel(props: TableSettingPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
7
29
|
//# sourceMappingURL=TableSettingPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableSettingPanel.d.ts","sourceRoot":"","sources":["../../../src/table/setting/TableSettingPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableSettingPanel.d.ts","sourceRoot":"","sources":["../../../src/table/setting/TableSettingPanel.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAoC,cAAc,EAAE,MAAM,cAAc,CAAC;AAEhF;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,uEAAuE;IACvE,cAAc,EAAE,cAAc,CAAC;IAC/B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CA8O9D"}
|
package/dist/table/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AttributesCapable } from '../types';
|
|
2
2
|
import { ActionsData } from './cell';
|
|
3
|
-
import {
|
|
3
|
+
import { ViewDefinition } from '../viewer';
|
|
4
4
|
import { TableProps } from 'antd';
|
|
5
5
|
import { SorterResult } from 'antd/es/table/interface';
|
|
6
6
|
/**
|
|
@@ -106,7 +106,6 @@ export interface ViewTableActionColumn<RecordType = any> {
|
|
|
106
106
|
* ```
|
|
107
107
|
*/
|
|
108
108
|
export interface ViewTableProps<RecordType = any, Attributes = Omit<TableProps<RecordType>, 'columns' | 'dataSource'>> extends AttributesCapable<Attributes> {
|
|
109
|
-
view: View;
|
|
110
109
|
viewDefinition: ViewDefinition;
|
|
111
110
|
dataSource: RecordType[];
|
|
112
111
|
actionColumn?: ViewTableActionColumn<RecordType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/table/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/table/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,WAAW,qBAAqB,CAAC,UAAU,GAAG,GAAG;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,WAAW,CAAC,UAAU,CAAC,CAAC;IACzD,YAAY,EAAE,OAAO,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,WAAW,cAAc,CAC7B,UAAU,GAAG,GAAG,EAChB,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC,CACnE,SAAQ,iBAAiB,CAAC,UAAU,CAAC;IACrC,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC;IACjD,aAAa,CAAC,EAAE,CACd,MAAM,EAAE,YAAY,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,EAAE,KAC1D,IAAI,CAAC;IACV,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../src/topbar/Point.tsx"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,4CASpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RefreshDataBarItem.d.ts","sourceRoot":"","sources":["../../src/topbar/RefreshDataBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAK1C,eAAO,MAAM,0BAA0B,EAAE,MAAuB,CAAC;AAEjE,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"RefreshDataBarItem.d.ts","sourceRoot":"","sources":["../../src/topbar/RefreshDataBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAK1C,eAAO,MAAM,0BAA0B,EAAE,MAAuB,CAAC;AAEjE,MAAM,WAAW,uBAAwB,SAAQ,eAAe;CAAG;AAEnE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAchE"}
|
package/dist/topbar/TopBar.d.ts
CHANGED
|
@@ -2,9 +2,11 @@ import { BarItemType } from './TypedBarItem';
|
|
|
2
2
|
import { TopBarActionItem } from '../viewer';
|
|
3
3
|
import { RefObject } from 'react';
|
|
4
4
|
export interface TopBarPropsCapable<RecordType> {
|
|
5
|
-
topBar: TopBarProps<RecordType>;
|
|
5
|
+
topBar: Omit<TopBarProps<RecordType>, 'aggregateName' | 'viewName'>;
|
|
6
6
|
}
|
|
7
7
|
export interface TopBarProps<RecordType> {
|
|
8
|
+
aggregateName: string;
|
|
9
|
+
viewName: string;
|
|
8
10
|
barItems: BarItemType[];
|
|
9
11
|
fullscreenTarget?: RefObject<HTMLElement | null>;
|
|
10
12
|
enableFullscreen?: boolean;
|
|
@@ -13,6 +15,8 @@ export interface TopBarProps<RecordType> {
|
|
|
13
15
|
primaryAction?: TopBarActionItem<RecordType>;
|
|
14
16
|
secondaryActions?: TopBarActionItem<RecordType>[];
|
|
15
17
|
tableSelectedItems: RecordType[];
|
|
18
|
+
showViewPanel: boolean;
|
|
19
|
+
onViewPanelUnfold: () => void;
|
|
16
20
|
}
|
|
17
21
|
export declare function TopBar<RecordType>(props: TopBarProps<RecordType>): import("react/jsx-runtime").JSX.Element;
|
|
18
22
|
//# sourceMappingURL=TopBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../../src/topbar/TopBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAgB,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../../src/topbar/TopBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAgB,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAa7C,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAK/C,MAAM,WAAW,kBAAkB,CAAC,UAAU;IAC5C,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,eAAe,GAAG,UAAU,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,WAAW,CAAC,UAAU;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACjD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC;IAE5C,aAAa,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC;IAElD,kBAAkB,EAAE,UAAU,EAAE,CAAC;IAEjC,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B;AA4BD,wBAAgB,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,2CAyHhE"}
|
package/dist/topbar/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './barItemRegistry';
|
|
|
4
4
|
export * from './ColumnHeightBarItem';
|
|
5
5
|
export * from './Delimiter';
|
|
6
6
|
export * from './FilterBarItem';
|
|
7
|
+
export * from './Point';
|
|
7
8
|
export * from './RefreshDataBarItem';
|
|
8
9
|
export * from './ShareLinkBarItem';
|
|
9
10
|
export * from './TopBar';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/topbar/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/topbar/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -14,5 +14,9 @@ export interface AttributesCapable<Attributes = any> {
|
|
|
14
14
|
export interface KeyCapable {
|
|
15
15
|
key: Key;
|
|
16
16
|
}
|
|
17
|
+
export interface ReducerActionCapable<TYPE = any> {
|
|
18
|
+
type: TYPE;
|
|
19
|
+
payload: any;
|
|
20
|
+
}
|
|
17
21
|
export type TableRecordType<RecordType> = RecordType & KeyCapable;
|
|
18
22
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEnC,MAAM,MAAM,QAAQ,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;AAE9C,MAAM,WAAW,iBAAiB,CA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
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TableRecordType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Performs a deep equality comparison between two values.
|
|
4
|
+
*
|
|
5
|
+
* This function recursively compares the structure and values of two objects or arrays,
|
|
6
|
+
* ensuring that they are identical in both content and structure. It handles primitive
|
|
7
|
+
* types, objects, arrays, and nested combinations thereof.
|
|
8
|
+
*
|
|
9
|
+
* @param left - The first value to compare. Can be of any type.
|
|
10
|
+
* @param right - The second value to compare. Can be of any type.
|
|
11
|
+
* @returns true if the values are deeply equal, false otherwise.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* deepEqual(1, 1) // true
|
|
15
|
+
* deepEqual({a: 1}, {a: 1}) // true
|
|
16
|
+
* deepEqual([1, 2], [1, 2]) // true
|
|
17
|
+
* deepEqual({a: 1}, {a: 2}) // false
|
|
18
|
+
* deepEqual([1, 2], [1, 2, 3]) // false
|
|
19
|
+
*
|
|
20
|
+
* @note
|
|
21
|
+
* - Uses strict equality (===) for primitive comparisons.
|
|
22
|
+
* - Handles null and undefined as unequal unless both are the same.
|
|
23
|
+
* - For arrays, compares lengths first, then recursively compares each element.
|
|
24
|
+
* - For objects, compares constructors, then keys, then recursively compares values.
|
|
25
|
+
* - Does not handle circular references (would cause infinite recursion).
|
|
26
|
+
* - Does not consider object prototypes beyond constructor comparison.
|
|
27
|
+
* - Performance may be poor for very large or deeply nested structures.
|
|
28
|
+
*/
|
|
29
|
+
export declare function deepEqual(left: any, right: any): boolean;
|
|
30
|
+
export declare function mapToTableRecord<RecordType = any>(dataSource: RecordType[] | undefined): TableRecordType<RecordType>[];
|
|
31
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CA6CxD;AAED,wBAAgB,gBAAgB,CAAC,UAAU,GAAG,GAAG,EAC/C,UAAU,EAAE,UAAU,EAAE,GAAG,SAAS,GACnC,eAAe,CAAC,UAAU,CAAC,EAAE,CAQ/B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FilterStateReducerReturn } from './useFilterStateReducer';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type FilterStateContext = FilterStateReducerReturn;
|
|
4
|
+
export declare const FilterStateContext: import('react').Context<FilterStateReducerReturn | undefined>;
|
|
5
|
+
export interface FilterStateContextOptions extends FilterStateContext {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function FilterStateContextProvider({ children, ...options }: FilterStateContextOptions): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function useFilterStateContext(): FilterStateContext;
|
|
10
|
+
//# sourceMappingURL=FilterStateContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterStateContext.d.ts","sourceRoot":"","sources":["../../src/viewer/FilterStateContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAiB,SAAS,EAAc,MAAM,OAAO,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AAE1D,eAAO,MAAM,kBAAkB,+DAE9B,CAAC;AAEF,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IACnE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,GAAG,OAAO,EACX,EAAE,yBAAyB,2CAM3B;AAED,wBAAgB,qBAAqB,IAAI,kBAAkB,CAQ1D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UseTableStateReducerReturn } from './useTableStateReducer';
|
|
3
|
+
export type TableStateContext = UseTableStateReducerReturn & {
|
|
4
|
+
refreshData: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const TableStateContext: import('react').Context<TableStateContext | undefined>;
|
|
7
|
+
export interface TableStateContextOptions extends TableStateContext {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function TableStateContextProvider({ children, ...options }: TableStateContextOptions): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useTableStateContext(): TableStateContext;
|
|
12
|
+
//# sourceMappingURL=TableStateContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableStateContext.d.ts","sourceRoot":"","sources":["../../src/viewer/TableStateContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAc,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEpE,MAAM,MAAM,iBAAiB,GAAG,0BAA0B,GAAG;IAC3D,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,wDAE7B,CAAC;AAEF,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,GAAG,OAAO,EACX,EAAE,wBAAwB,2CAM1B;AAED,wBAAgB,oBAAoB,IAAI,iBAAiB,CAQxD"}
|
package/dist/viewer/Viewer.d.ts
CHANGED
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
import { ViewTableActionColumn } from '../table';
|
|
2
2
|
import { PaginationProps } from 'antd';
|
|
3
|
-
import {
|
|
4
|
-
import { View, ViewColumn, ViewDefinition } from './';
|
|
3
|
+
import { View, ViewDefinition } from './';
|
|
5
4
|
import { StyleCapable, TableRecordType } from '../types';
|
|
6
5
|
import { RefAttributes } from 'react';
|
|
7
|
-
import { Condition, FieldSort } from '@ahoo-wang/fetcher-wow';
|
|
8
6
|
import { TopBarPropsCapable } from '../topbar';
|
|
9
|
-
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
10
|
-
export interface ViewActions {
|
|
11
|
-
updateColumns: (columns: ViewColumn[]) => void;
|
|
12
|
-
updateActiveFilters: (activeFilters: ActiveFilter[]) => void;
|
|
13
|
-
updateTableSize: (tableSize: SizeType) => void;
|
|
14
|
-
updatePageSize: (pageSize: number) => void;
|
|
15
|
-
updateCondition: (condition: Condition) => void;
|
|
16
|
-
updateSort: (sort?: FieldSort[]) => void;
|
|
17
|
-
}
|
|
18
7
|
export interface ViewerRef {
|
|
19
8
|
refreshData: () => void;
|
|
20
9
|
}
|
|
21
10
|
export interface ViewerProps<RecordType> extends TopBarPropsCapable<RecordType>, StyleCapable, RefAttributes<ViewerRef> {
|
|
22
11
|
name: string;
|
|
23
|
-
|
|
12
|
+
views: View[];
|
|
13
|
+
defaultViewId?: string;
|
|
24
14
|
definition: ViewDefinition;
|
|
25
15
|
actionColumn: ViewTableActionColumn<TableRecordType<RecordType>>;
|
|
26
16
|
paginationProps?: Omit<PaginationProps, 'total'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Viewer.d.ts","sourceRoot":"","sources":["../../src/viewer/Viewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAsB,eAAe,EAAS,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Viewer.d.ts","sourceRoot":"","sources":["../../src/viewer/Viewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAsB,eAAe,EAAS,MAAM,MAAM,CAAC;AAElE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAa,MAAM,IAAI,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACL,aAAa,EAKd,MAAM,OAAO,CAAC;AAYf,OAAO,EAAU,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAWvD,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,WAAW,CAAC,UAAU,CACrC,SACE,kBAAkB,CAAC,UAAU,CAAC,EAC9B,YAAY,EACZ,aAAa,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,cAAc,CAAC;IAC3B,YAAY,EAAE,qBAAqB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjE,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;CAClD;AAED,wBAAgB,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,2CAsThE"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { View } from './types';
|
|
3
|
-
import { ViewActions } from './Viewer';
|
|
4
3
|
export interface ViewerSharedValue {
|
|
5
4
|
aggregateName: string;
|
|
6
5
|
view: View;
|
|
7
|
-
actions: ViewActions;
|
|
8
6
|
showFilterPanel: boolean;
|
|
9
7
|
setShowFilterPanel: (showFilterPanel: boolean) => void;
|
|
10
8
|
refreshData: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewerSharedValueContext.d.ts","sourceRoot":"","sources":["../../src/viewer/ViewerSharedValueContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAc,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ViewerSharedValueContext.d.ts","sourceRoot":"","sources":["../../src/viewer/ViewerSharedValueContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAc,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC;IAEX,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvD,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;AAEzD,eAAO,MAAM,wBAAwB,wDAEzB,CAAC;AAEb,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,GAAG,OAAO,EACX,EAAE,wBAAwB,2CAM1B;AAED,wBAAgB,oBAAoB,IAAI,wBAAwB,CAM/D"}
|
package/dist/viewer/index.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
export * from './panel';
|
|
2
|
+
export * from './FilterStateContext';
|
|
3
|
+
export * from './TableStateContext';
|
|
1
4
|
export * from './types';
|
|
5
|
+
export * from './useFilterStateReducer';
|
|
6
|
+
export * from './useTableStateReducer';
|
|
2
7
|
export * from './Viewer';
|
|
3
8
|
export * from './ViewerSharedValueContext';
|
|
4
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/viewer/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/viewer/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewItem.d.ts","sourceRoot":"","sources":["../../../src/viewer/panel/ViewItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAMhC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA8B5C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { View } from '../types';
|
|
2
|
+
export interface ViewItemGroupProps {
|
|
3
|
+
views: View[];
|
|
4
|
+
activeView: View;
|
|
5
|
+
countUrl: string;
|
|
6
|
+
onViewChange: (view: View) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function ViewItemGroup(props: ViewItemGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=ViewItemGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewItemGroup.d.ts","sourceRoot":"","sources":["../../../src/viewer/panel/ViewItemGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIhC,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CACpC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAgBtD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { View } from '../types';
|
|
2
|
+
export interface ViewPanelProps {
|
|
3
|
+
aggregateName: string;
|
|
4
|
+
views: View[];
|
|
5
|
+
activeView: View;
|
|
6
|
+
countUrl: string;
|
|
7
|
+
onViewChange: (view: View) => void;
|
|
8
|
+
showViewPanel: boolean;
|
|
9
|
+
onViewPanelFold: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function ViewPanel(props: ViewPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=ViewPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewPanel.d.ts","sourceRoot":"","sources":["../../../src/viewer/panel/ViewPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKhC,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAEnC,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CAiD9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/viewer/panel/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
package/dist/viewer/types.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface ViewDefinition {
|
|
|
11
11
|
columns: ViewColumnDefinition[];
|
|
12
12
|
availableFilters: AvailableFilterGroup[];
|
|
13
13
|
dataSourceUrl: string;
|
|
14
|
+
countUrl: string;
|
|
14
15
|
internalCondition?: Condition;
|
|
15
16
|
checkable?: boolean;
|
|
16
17
|
}
|
|
@@ -23,15 +24,21 @@ export interface ViewColumnDefinition extends TypeCapable, AttributesCapable {
|
|
|
23
24
|
multiple: number;
|
|
24
25
|
};
|
|
25
26
|
}
|
|
27
|
+
export type ViewType = 'PERSONAL' | 'PUBLIC';
|
|
28
|
+
export type ViewSource = 'SYSTEM' | 'CUSTOM';
|
|
26
29
|
export interface View {
|
|
27
30
|
id: string;
|
|
28
31
|
name: string;
|
|
32
|
+
viewType: ViewType;
|
|
33
|
+
viewSource: ViewSource;
|
|
34
|
+
isDefault: boolean;
|
|
29
35
|
filters: ActiveFilter[];
|
|
30
36
|
columns: ViewColumn[];
|
|
31
37
|
tableSize: SizeType;
|
|
32
38
|
condition: Condition;
|
|
33
39
|
pageSize: number;
|
|
34
40
|
sort?: FieldSort[];
|
|
41
|
+
sortId: number;
|
|
35
42
|
}
|
|
36
43
|
export interface ViewColumn {
|
|
37
44
|
dataIndex: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/viewer/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CA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AAE,SAAQ,iBAAiB,CACrE,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAC7B;IACC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC;CACnD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ActiveFilter } from '../filter';
|
|
2
|
+
import { ReducerActionCapable } from '../types';
|
|
3
|
+
import { Condition } from '@ahoo-wang/fetcher-wow';
|
|
4
|
+
export interface FilterState {
|
|
5
|
+
activeFilters: ActiveFilter[];
|
|
6
|
+
queryCondition: Condition;
|
|
7
|
+
showFilterPanel: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type FilterStateReducerActionType = 'UPDATE_ACTIVE_FILTERS' | 'UPDATE_SHOW_FILTER_PANEL' | 'UPDATE_QUERY_CONDITION';
|
|
10
|
+
export interface FilterStateReducerAction extends ReducerActionCapable<FilterStateReducerActionType> {
|
|
11
|
+
}
|
|
12
|
+
export interface FilterStateReducerReturn {
|
|
13
|
+
activeFilters: ActiveFilter[];
|
|
14
|
+
showFilterPanel: boolean;
|
|
15
|
+
queryCondition: Condition;
|
|
16
|
+
updateActiveFilters: (activeFilters: ActiveFilter[]) => void;
|
|
17
|
+
updateShowFilterPanel: (showFilterPanel: boolean) => void;
|
|
18
|
+
updateQueryCondition: (condition: Condition) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function useFilterStateReducer(state: FilterState): FilterStateReducerReturn;
|
|
21
|
+
//# sourceMappingURL=useFilterStateReducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilterStateReducer.d.ts","sourceRoot":"","sources":["../../src/viewer/useFilterStateReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,cAAc,EAAE,SAAS,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,MAAM,4BAA4B,GACpC,uBAAuB,GACvB,0BAA0B,GAC1B,wBAAwB,CAAC;AAE7B,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB,CAAC,4BAA4B,CAAC;CAAG;AAEvG,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,SAAS,CAAC;IAC1B,mBAAmB,EAAE,CAAC,aAAa,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC7D,qBAAqB,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,oBAAoB,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CACtD;AAkBD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,WAAW,GACjB,wBAAwB,CA0B1B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ViewColumn } from './types';
|
|
2
|
+
import { ReducerActionCapable } from '../types';
|
|
3
|
+
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
4
|
+
export interface TableState {
|
|
5
|
+
columns: ViewColumn[];
|
|
6
|
+
tableSize: SizeType;
|
|
7
|
+
}
|
|
8
|
+
export type TableStateReducerActionType = 'UPDATE_COLUMNS' | 'UPDATE_TABLE_SIZE';
|
|
9
|
+
export interface TableStateReducerAction extends ReducerActionCapable<TableStateReducerActionType> {
|
|
10
|
+
}
|
|
11
|
+
export interface UseTableStateReducerReturn {
|
|
12
|
+
columns: ViewColumn[];
|
|
13
|
+
tableSize: SizeType;
|
|
14
|
+
updateColumns: (columns: ViewColumn[]) => void;
|
|
15
|
+
updateTableSize: (tableSize: SizeType) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function useTableStateReducer(state: TableState): UseTableStateReducerReturn;
|
|
18
|
+
//# sourceMappingURL=useTableStateReducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableStateReducer.d.ts","sourceRoot":"","sources":["../../src/viewer/useTableStateReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE/D,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,SAAS,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,MAAM,2BAA2B,GACnC,gBAAgB,GAChB,mBAAmB,CAAC;AAExB,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB,CAAC,2BAA2B,CAAC;CAAG;AAErG,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,SAAS,EAAE,QAAQ,CAAC;IACpB,aAAa,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAC/C,eAAe,EAAE,CAAC,SAAS,EAAE,QAAQ,KAAK,IAAI,CAAC;CAChD;AAgBD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,UAAU,GAChB,0BAA0B,CAoB5B"}
|