@ahoo-wang/fetcher-viewer 3.8.1 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fetcher-viewer.css +1 -1
- package/dist/filter/panel/EditableFilterPanel.d.ts +2 -1
- package/dist/filter/panel/EditableFilterPanel.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1717 -1304
- 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 +2 -1
- package/dist/table/ViewTable.d.ts.map +1 -1
- package/dist/table/types.d.ts +5 -22
- package/dist/table/types.d.ts.map +1 -1
- package/dist/topbar/AutoRefreshBarItem.d.ts +10 -0
- package/dist/topbar/AutoRefreshBarItem.d.ts.map +1 -0
- package/dist/topbar/Delimiter.d.ts +2 -0
- package/dist/topbar/Delimiter.d.ts.map +1 -0
- package/dist/topbar/TopBar.d.ts +14 -2
- package/dist/topbar/TopBar.d.ts.map +1 -1
- package/dist/topbar/index.d.ts +7 -4
- package/dist/topbar/index.d.ts.map +1 -1
- package/dist/topbar/types.d.ts.map +1 -1
- package/dist/types.d.ts +5 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/viewer/Viewer.d.ts +20 -4
- package/dist/viewer/Viewer.d.ts.map +1 -1
- package/dist/viewer/ViewerSharedValueContext.d.ts +4 -7
- package/dist/viewer/ViewerSharedValueContext.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +1 -1
- package/dist/viewer/index.d.ts.map +1 -1
- package/dist/viewer/types.d.ts +15 -2
- package/dist/viewer/types.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViewTableProps } from './types';
|
|
2
|
+
import { TableRecordType } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Renders a view table using Ant Design's Table component with typed cell rendering.
|
|
4
5
|
*
|
|
@@ -84,5 +85,5 @@ import { ViewTableProps } from './types';
|
|
|
84
85
|
* />
|
|
85
86
|
* ```
|
|
86
87
|
*/
|
|
87
|
-
export declare function ViewTable<RecordType
|
|
88
|
+
export declare function ViewTable<RecordType extends TableRecordType<any>>(props: ViewTableProps<RecordType>): import("react/jsx-runtime").JSX.Element;
|
|
88
89
|
//# sourceMappingURL=ViewTable.d.ts.map
|
|
@@ -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;
|
|
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;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,wBAAgB,SAAS,CAAC,UAAU,SAAS,eAAe,CAAC,GAAG,CAAC,EAC/D,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,2CAkIlC"}
|
package/dist/table/types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AttributesCapable } from '../types';
|
|
2
2
|
import { ActionsData } from './cell';
|
|
3
|
-
import {
|
|
3
|
+
import { View, ViewDefinition } from '../viewer';
|
|
4
4
|
import { TableProps } from 'antd';
|
|
5
|
+
import { SorterResult } from 'antd/es/table/interface';
|
|
5
6
|
/**
|
|
6
7
|
* Configuration for a cell in a table column.
|
|
7
8
|
*
|
|
@@ -66,27 +67,6 @@ export interface ViewTableActionColumn<RecordType = any> {
|
|
|
66
67
|
configurable: boolean;
|
|
67
68
|
configurePanelTitle?: string;
|
|
68
69
|
}
|
|
69
|
-
/**
|
|
70
|
-
* Props for a view column with additional attributes capability.
|
|
71
|
-
*
|
|
72
|
-
* @interface ViewColumnProps
|
|
73
|
-
* @extends AttributesCapable<any>
|
|
74
|
-
* @extends ViewColumnDefinition
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* ```tsx
|
|
78
|
-
* const columnProps: ViewColumnProps = {
|
|
79
|
-
* title: 'Name',
|
|
80
|
-
* dataIndex: 'name',
|
|
81
|
-
* cell: { type: 'text' },
|
|
82
|
-
* primaryKey: false,
|
|
83
|
-
* attributes: { width: 200, sorter: true }
|
|
84
|
-
* };
|
|
85
|
-
* ```
|
|
86
|
-
*/
|
|
87
|
-
export interface ViewColumnProps extends ViewColumn {
|
|
88
|
-
columnDefinition: ViewColumnDefinition;
|
|
89
|
-
}
|
|
90
70
|
/**
|
|
91
71
|
* Props for the ViewTable component.
|
|
92
72
|
*
|
|
@@ -126,8 +106,11 @@ export interface ViewColumnProps extends ViewColumn {
|
|
|
126
106
|
* ```
|
|
127
107
|
*/
|
|
128
108
|
export interface ViewTableProps<RecordType = any, Attributes = Omit<TableProps<RecordType>, 'columns' | 'dataSource'>> extends AttributesCapable<Attributes> {
|
|
109
|
+
view: View;
|
|
129
110
|
viewDefinition: ViewDefinition;
|
|
130
111
|
dataSource: RecordType[];
|
|
131
112
|
actionColumn?: ViewTableActionColumn<RecordType>;
|
|
113
|
+
onSortChanged?: (sorter: SorterResult<RecordType> | SorterResult<RecordType>[]) => void;
|
|
114
|
+
onSelectChange?: (items: RecordType[]) => void;
|
|
132
115
|
}
|
|
133
116
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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,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AAU,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,EAAE,KAC1D,IAAI,CAAC;IACV,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAA;CAC/C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface AutoRefreshItem {
|
|
2
|
+
label: string;
|
|
3
|
+
key: string;
|
|
4
|
+
refreshInterval: number;
|
|
5
|
+
}
|
|
6
|
+
export interface AutoRefreshBarItemProps {
|
|
7
|
+
items?: AutoRefreshItem[];
|
|
8
|
+
}
|
|
9
|
+
export declare function AutoRefreshBarItem({ items, }: AutoRefreshBarItemProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=AutoRefreshBarItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoRefreshBarItem.d.ts","sourceRoot":"","sources":["../../src/topbar/AutoRefreshBarItem.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;CAC3B;AA0BD,wBAAgB,kBAAkB,CAAC,EACjC,KAA+B,GAChC,EAAE,uBAAuB,2CAsDzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Delimiter.d.ts","sourceRoot":"","sources":["../../src/topbar/Delimiter.tsx"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,4CAYxB"}
|
package/dist/topbar/TopBar.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { BarItemType } from './TypedBarItem';
|
|
2
|
-
|
|
2
|
+
import { TopBarActionItem } from '../viewer';
|
|
3
|
+
import { RefObject } from 'react';
|
|
4
|
+
export interface TopBarPropsCapable<RecordType> {
|
|
5
|
+
topBar: TopBarProps<RecordType>;
|
|
6
|
+
}
|
|
7
|
+
export interface TopBarProps<RecordType> {
|
|
3
8
|
barItems: BarItemType[];
|
|
9
|
+
fullscreenTarget?: RefObject<HTMLElement | null>;
|
|
10
|
+
enableFullscreen?: boolean;
|
|
11
|
+
bulkOperationName?: string;
|
|
12
|
+
bulkActions: TopBarActionItem<RecordType>[];
|
|
13
|
+
primaryAction?: TopBarActionItem<RecordType>;
|
|
14
|
+
secondaryActions?: TopBarActionItem<RecordType>[];
|
|
15
|
+
tableSelectedItems: RecordType[];
|
|
4
16
|
}
|
|
5
|
-
export declare function TopBar(props: TopBarProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function TopBar<RecordType>(props: TopBarProps<RecordType>): import("react/jsx-runtime").JSX.Element;
|
|
6
18
|
//# 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;
|
|
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,EAAwB,MAAM,WAAW,CAAC;AAYnE,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAI/C,MAAM,WAAW,kBAAkB,CAAC,UAAU;IAC5C,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,WAAW,CAAC,UAAU;IACrC,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;CAClC;AAwBD,wBAAgB,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,2CAuGhE"}
|
package/dist/topbar/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './types';
|
|
3
|
-
export * from './barItemRegistry';
|
|
4
|
-
export * from './TypedBarItem';
|
|
1
|
+
export * from './AutoRefreshBarItem';
|
|
5
2
|
export * from './BarItem';
|
|
3
|
+
export * from './barItemRegistry';
|
|
6
4
|
export * from './ColumnHeightBarItem';
|
|
5
|
+
export * from './Delimiter';
|
|
7
6
|
export * from './FilterBarItem';
|
|
8
7
|
export * from './RefreshDataBarItem';
|
|
8
|
+
export * from './ShareLinkBarItem';
|
|
9
|
+
export * from './TopBar';
|
|
10
|
+
export * from './TypedBarItem';
|
|
11
|
+
export * from './types';
|
|
9
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/topbar/index.ts"],"names":[],"mappings":"AAAA,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,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/topbar/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,eAAgB,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/topbar/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,eAAgB,SAAQ,YAAY;CAAG"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
1
|
+
import { default as React, Key } from 'react';
|
|
2
2
|
export type Optional<T = any> = T | undefined;
|
|
3
3
|
export interface DataSourceCapable<RecordType = any> {
|
|
4
4
|
list: RecordType[];
|
|
@@ -11,4 +11,8 @@ export interface StyleCapable {
|
|
|
11
11
|
export interface AttributesCapable<Attributes = any> {
|
|
12
12
|
attributes?: Attributes;
|
|
13
13
|
}
|
|
14
|
+
export interface KeyCapable {
|
|
15
|
+
key: Key;
|
|
16
|
+
}
|
|
17
|
+
export type TableRecordType<RecordType> = RecordType & KeyCapable;
|
|
14
18
|
//# 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,MAAM,OAAO,CAAC;
|
|
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,CAAC,UAAU,GAAG,GAAG;IACjD,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB,CAAC,UAAU,GAAG,GAAG;IACjD,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,GAAG,CAAC;CACV;AAED,MAAM,MAAM,eAAe,CAAC,UAAU,IAAI,UAAU,GAAG,UAAU,CAAC"}
|
package/dist/viewer/Viewer.d.ts
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { ViewTableActionColumn } from '../table';
|
|
2
2
|
import { PaginationProps } from 'antd';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { ActiveFilter } from '../filter';
|
|
4
|
+
import { View, ViewColumn, ViewDefinition } from './';
|
|
5
|
+
import { StyleCapable, TableRecordType } from '../types';
|
|
6
|
+
import { RefAttributes } from 'react';
|
|
7
|
+
import { Condition, FieldSort } from '@ahoo-wang/fetcher-wow';
|
|
8
|
+
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
|
+
export interface ViewerRef {
|
|
19
|
+
refreshData: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface ViewerProps<RecordType> extends TopBarPropsCapable<RecordType>, StyleCapable, RefAttributes<ViewerRef> {
|
|
6
22
|
name: string;
|
|
7
23
|
view: View;
|
|
8
24
|
definition: ViewDefinition;
|
|
9
|
-
actionColumn: ViewTableActionColumn<RecordType
|
|
25
|
+
actionColumn: ViewTableActionColumn<TableRecordType<RecordType>>;
|
|
10
26
|
paginationProps?: Omit<PaginationProps, 'total'>;
|
|
11
27
|
}
|
|
12
28
|
export declare function Viewer<RecordType>(props: ViewerProps<RecordType>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;AAClE,OAAO,EACL,YAAY,EAGb,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,IAAI,EACJ,UAAU,EACV,cAAc,EAEf,MAAM,IAAI,CAAC;AAEZ,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEzD,OAAO,EACL,aAAa,EAMd,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,SAAS,EACT,SAAS,EAKV,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAU,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAmB/D,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAC/C,mBAAmB,EAAE,CAAC,aAAa,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC7D,eAAe,EAAE,CAAC,SAAS,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC/C,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,eAAe,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;CAC1C;AAqBD,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,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,cAAc,CAAC;IAC3B,YAAY,EAAE,qBAAqB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;IAGjE,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;CAClD;AAED,wBAAgB,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,2CAiShE"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { View } from './types';
|
|
3
|
+
import { ViewActions } from './Viewer';
|
|
4
4
|
export interface ViewerSharedValue {
|
|
5
5
|
aggregateName: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
setViewColumns: (viewColumns: ViewColumn[]) => void;
|
|
6
|
+
view: View;
|
|
7
|
+
actions: ViewActions;
|
|
9
8
|
showFilterPanel: boolean;
|
|
10
9
|
setShowFilterPanel: (showFilterPanel: boolean) => void;
|
|
11
10
|
refreshData: () => void;
|
|
12
|
-
tableSize: SizeType;
|
|
13
|
-
setTableSize: (size: SizeType) => void;
|
|
14
11
|
}
|
|
15
12
|
export type ViewerSharedValueContext = ViewerSharedValue;
|
|
16
13
|
export declare const ViewerSharedValueContext: import('react').Context<ViewerSharedValue | undefined>;
|
|
@@ -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,
|
|
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;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAIvC,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,WAAW,CAAC;IAErB,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/viewer/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
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,CAAA"}
|
package/dist/viewer/types.d.ts
CHANGED
|
@@ -3,17 +3,22 @@ import { TypeCapable } from '../registry';
|
|
|
3
3
|
import { AttributesCapable } from '../types';
|
|
4
4
|
import { SortOrder } from 'antd/es/table/interface';
|
|
5
5
|
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
6
|
+
import { Condition, FieldSort } from '@ahoo-wang/fetcher-wow';
|
|
7
|
+
import { default as React } from 'react';
|
|
8
|
+
import { ButtonProps } from 'antd';
|
|
6
9
|
export interface ViewDefinition {
|
|
7
10
|
name: string;
|
|
8
11
|
columns: ViewColumnDefinition[];
|
|
9
12
|
availableFilters: AvailableFilterGroup[];
|
|
10
13
|
dataSourceUrl: string;
|
|
11
|
-
|
|
14
|
+
internalCondition?: Condition;
|
|
15
|
+
checkable?: boolean;
|
|
12
16
|
}
|
|
13
17
|
export interface ViewColumnDefinition extends TypeCapable, AttributesCapable {
|
|
14
18
|
title: string;
|
|
15
19
|
dataIndex: string;
|
|
16
20
|
primaryKey: boolean;
|
|
21
|
+
render?: (value: any, record: any, index: number) => React.ReactNode;
|
|
17
22
|
sorter: boolean | {
|
|
18
23
|
multiple: number;
|
|
19
24
|
};
|
|
@@ -21,9 +26,12 @@ export interface ViewColumnDefinition extends TypeCapable, AttributesCapable {
|
|
|
21
26
|
export interface View {
|
|
22
27
|
id: string;
|
|
23
28
|
name: string;
|
|
24
|
-
tableSize?: SizeType;
|
|
25
29
|
filters: ActiveFilter[];
|
|
26
30
|
columns: ViewColumn[];
|
|
31
|
+
tableSize: SizeType;
|
|
32
|
+
condition: Condition;
|
|
33
|
+
pageSize: number;
|
|
34
|
+
sort?: FieldSort[];
|
|
27
35
|
}
|
|
28
36
|
export interface ViewColumn {
|
|
29
37
|
dataIndex: string;
|
|
@@ -32,4 +40,9 @@ export interface ViewColumn {
|
|
|
32
40
|
width?: string;
|
|
33
41
|
sortOrder?: SortOrder;
|
|
34
42
|
}
|
|
43
|
+
export interface TopBarActionItem<RecordType> extends AttributesCapable<Omit<ButtonProps, 'onClick'>> {
|
|
44
|
+
title: string;
|
|
45
|
+
onClick?: (items: RecordType[]) => void;
|
|
46
|
+
render?: (items: RecordType[]) => React.ReactNode;
|
|
47
|
+
}
|
|
35
48
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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;
|
|
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,MA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,SAAS,CAAC,CAAC;IACnG,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ahoo-wang/fetcher-viewer",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.3",
|
|
4
4
|
"description": "A comprehensive React component library for API documentation viewing and data filtering, built on top of Ant Design and the Fetcher ecosystem. Provides reusable UI components for building rich data-driven applications with advanced filtering capabilities and remote data selection.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"@ahoo-wang/fetcher-react": "^3.0.0",
|
|
46
46
|
"@ahoo-wang/fetcher-storage": "^3.0.0",
|
|
47
47
|
"@ahoo-wang/fetcher-wow": "^3.0.0",
|
|
48
|
-
"antd": "^6.1.1",
|
|
49
48
|
"@ant-design/icons": "^6.0.0",
|
|
49
|
+
"antd": "^6.1.1",
|
|
50
|
+
"dayjs": "^1.11.19",
|
|
50
51
|
"react": "^19.2.3",
|
|
51
|
-
"react-dom": "^19.2.3"
|
|
52
|
-
"dayjs": "^1.11.19"
|
|
52
|
+
"react-dom": "^19.2.3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@eslint/js": "^9.39.2",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"@vitest/coverage-v8": "^3.2.4",
|
|
62
62
|
"@vitest/ui": "^3.2.4",
|
|
63
63
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
64
|
-
"eslint-plugin-react-compiler": "^19.1.0-rc.2",
|
|
65
|
-
"react-compiler-runtime": "^1.0.0",
|
|
66
64
|
"eslint": "^9.39.2",
|
|
65
|
+
"eslint-plugin-react-compiler": "^19.1.0-rc.2",
|
|
67
66
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
68
67
|
"globals": "^16.5.0",
|
|
69
68
|
"jsdom": "^27.3.0",
|
|
70
69
|
"prettier": "^3.7.4",
|
|
70
|
+
"react-compiler-runtime": "^1.0.0",
|
|
71
71
|
"typescript": "^5.9.3",
|
|
72
72
|
"typescript-eslint": "^8.50.0",
|
|
73
73
|
"unplugin-dts": "1.0.0-beta.6",
|