@kronor/dtv 0.4.3 → 0.5.1
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/README.md +26 -0
- package/dist/assets/{index-DMT2lDJd.js → index-DQGXfX0L.js} +98 -98
- package/dist/index.es.js +6740 -6713
- package/dist/index.html +1 -1
- package/dist/types/App.d.ts +11 -1
- package/dist/types/App.d.ts.map +1 -1
- package/dist/types/components/Table.d.ts +12 -2
- package/dist/types/components/Table.d.ts.map +1 -1
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/index.d.ts.map +1 -1
- package/dist/types/main.d.ts +7 -0
- package/dist/types/main.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/portal/static/assets/table-views/vite.svg" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
8
|
<title>Filters Demo</title>
|
|
9
|
-
<script type="module" crossorigin src="/portal/static/assets/table-views/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/portal/static/assets/table-views/assets/index-DQGXfX0L.js"></script>
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/portal/static/assets/table-views/assets/index-CKkrV_Rb.css">
|
|
11
11
|
</head>
|
|
12
12
|
|
package/dist/types/App.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RowSelectionAPI } from './components/Table';
|
|
1
2
|
import { Runtime } from './framework/runtime';
|
|
2
3
|
export interface AppProps {
|
|
3
4
|
graphqlHost: string;
|
|
@@ -7,11 +8,20 @@ export interface AppProps {
|
|
|
7
8
|
showViewsMenu: boolean;
|
|
8
9
|
rowsPerPage?: number;
|
|
9
10
|
showViewTitle: boolean;
|
|
11
|
+
showCsvExportButton?: boolean;
|
|
10
12
|
externalRuntime?: Runtime;
|
|
11
13
|
isOverlay?: boolean;
|
|
12
14
|
onCloseOverlay?: () => void;
|
|
13
15
|
syncFilterStateToUrl: boolean;
|
|
16
|
+
rowSelection?: {
|
|
17
|
+
/** Type of row selection. 'none' disables selection UI. 'multiple' enables checkbox multi-select. */
|
|
18
|
+
rowSelectionType: 'none' | 'multiple';
|
|
19
|
+
/** Callback invoked whenever the row selection changes */
|
|
20
|
+
onRowSelectionChange?: (selectedRows: any[]) => void;
|
|
21
|
+
/** React ref that will be populated with RowSelectionAPI (e.g. resetRowSelection) */
|
|
22
|
+
apiRef?: React.RefObject<RowSelectionAPI | null>;
|
|
23
|
+
};
|
|
14
24
|
}
|
|
15
|
-
declare function App({ graphqlHost, graphqlToken, geminiApiKey, showViewsMenu, rowsPerPage, showViewTitle, viewsJson, externalRuntime, isOverlay, onCloseOverlay, syncFilterStateToUrl }: AppProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function App({ graphqlHost, graphqlToken, geminiApiKey, showViewsMenu, rowsPerPage, showViewTitle, showCsvExportButton, viewsJson, externalRuntime, isOverlay, onCloseOverlay, syncFilterStateToUrl, rowSelection }: AppProps): import("react/jsx-runtime").JSX.Element;
|
|
16
26
|
export default App;
|
|
17
27
|
//# sourceMappingURL=App.d.ts.map
|
package/dist/types/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAsB5D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,MAAM,WAAW,QAAQ;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE;QACX,qGAAqG;QACrG,gBAAgB,EAAE,MAAM,GAAG,UAAU,CAAC;QACtC,0DAA0D;QAC1D,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;QACrD,qFAAqF;QACrF,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;KACpD,CAAC;CACL;AAID,iBAAS,GAAG,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,WAAgB,EAAE,aAAa,EAAE,mBAA2B,EAAE,SAAS,EAAE,eAAe,EAAE,SAAiB,EAAE,cAAc,EAAE,oBAA4B,EAAE,YAAY,EAAE,EAAE,QAAQ,2CAifzP;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { DataTable } from 'primereact/datatable';
|
|
3
3
|
import { ColumnDefinition } from '../framework/column-definition';
|
|
4
4
|
import { NoRowsComponent } from '../framework/view';
|
|
5
5
|
import { FilterState } from '../framework/state';
|
|
6
|
+
export interface RowSelectionAPI {
|
|
7
|
+
/** Reset (clear) the current selection */
|
|
8
|
+
resetRowSelection(): void;
|
|
9
|
+
}
|
|
6
10
|
type TableProps = {
|
|
7
11
|
viewId: string;
|
|
8
12
|
columns: ColumnDefinition[];
|
|
@@ -12,7 +16,13 @@ type TableProps = {
|
|
|
12
16
|
filterState: FilterState;
|
|
13
17
|
triggerRefetch: () => void;
|
|
14
18
|
ref?: React.Ref<DataTable<any>>;
|
|
19
|
+
rowSelection?: {
|
|
20
|
+
rowSelectionType: 'none' | 'multiple';
|
|
21
|
+
onRowSelectionChange?: (rows: any[]) => void;
|
|
22
|
+
/** Ref object populated by Table with RowSelectionAPI */
|
|
23
|
+
apiRef?: React.RefObject<RowSelectionAPI | null>;
|
|
24
|
+
};
|
|
15
25
|
};
|
|
16
|
-
declare function Table({ viewId, columns, data, noRowsComponent, setFilterState, filterState, triggerRefetch, ref }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function Table({ viewId, columns, data, noRowsComponent, setFilterState, filterState, triggerRefetch, ref, rowSelection }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
17
27
|
export default Table;
|
|
18
28
|
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAgC,MAAM,sBAAsB,CAAC;AAG/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMpD,OAAO,EAAE,WAAW,EAA0C,MAAM,oBAAoB,CAAC;AAGzF,MAAM,WAAW,eAAe;IAC5B,0CAA0C;IAC1C,iBAAiB,IAAI,IAAI,CAAC;CAC7B;AAED,KAAK,UAAU,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;IAClC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,cAAc,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;IACnD,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE;QACX,gBAAgB,EAAE,MAAM,GAAG,UAAU,CAAC;QACtC,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;QAC7C,yDAAyD;QACzD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;KACpD,CAAC;CACL,CAAC;AAEF,iBAAS,KAAK,CAAC,EACX,MAAM,EACN,OAAO,EACP,IAAI,EACJ,eAAe,EACf,cAAc,EACd,WAAW,EACX,cAAc,EACd,GAAG,EACH,YAAY,EACf,EAAE,UAAU,2CAqHZ;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -6,4 +6,5 @@ export type { Runtime } from '../framework/runtime';
|
|
|
6
6
|
export type { ColumnDefinition } from '../framework/column-definition';
|
|
7
7
|
export type { FilterState } from '../framework/state';
|
|
8
8
|
export type { FilterSchema } from '../framework/filters';
|
|
9
|
+
export type { RowSelectionAPI } from '../components/Table';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGvC,YAAY,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGvC,YAAY,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/types/main.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RowSelectionAPI } from './components/Table';
|
|
1
2
|
import './index.css';
|
|
2
3
|
import { Runtime } from './framework/runtime';
|
|
3
4
|
export interface RenderTableViewOptions {
|
|
@@ -7,7 +8,13 @@ export interface RenderTableViewOptions {
|
|
|
7
8
|
viewsJson: string;
|
|
8
9
|
showViewsMenu?: boolean;
|
|
9
10
|
showViewTitle?: boolean;
|
|
11
|
+
showCsvExportButton?: boolean;
|
|
10
12
|
externalRuntime?: Runtime;
|
|
11
13
|
syncFilterStateToUrl?: boolean;
|
|
14
|
+
rowSelection?: {
|
|
15
|
+
rowSelectionType: 'none' | 'multiple';
|
|
16
|
+
onRowSelectionChange?: (rows: any[]) => void;
|
|
17
|
+
apiRef?: React.RefObject<RowSelectionAPI | null>;
|
|
18
|
+
};
|
|
12
19
|
}
|
|
13
20
|
//# sourceMappingURL=main.d.ts.map
|
package/dist/types/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,aAAa,CAAA;AAGpB,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,MAAM,WAAW,sBAAsB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE;QACX,gBAAgB,EAAE,MAAM,GAAG,UAAU,CAAC;QACtC,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;QAC7C,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;KACpD,CAAC;CACL"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kronor/dtv",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"dev": "vite",
|
|
11
11
|
"build": "tsc -b && vite build",
|
|
12
12
|
"build:lib": "tsc -p tsconfig.lib.json && vite build --config vite.lib.config.ts",
|
|
13
|
+
"dev:playground": "npm run build:lib -- --watch & vite --config vite.playground.config.ts",
|
|
13
14
|
"clean": "rimraf dist",
|
|
14
15
|
"lint": "eslint .",
|
|
15
16
|
"preview": "vite preview",
|