@dataverse-kit/grid-kit 0.4.0 → 0.5.0
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/hosts/ReadOnlyGrid.d.ts +10 -3
- package/dist/hosts/ReadOnlyGrid.d.ts.map +1 -1
- package/dist/index.esm.js +11 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +5 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ReadOnlyGridProps } from '../types';
|
|
3
3
|
/**
|
|
4
|
-
* Read-only grid: `<DataGrid>` with selection off
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Read-only grid: `<DataGrid>` with selection off and editing off. Mirrors the
|
|
5
|
+
* Grid Customizer's "Read-Only Grid" type — a presentation preset.
|
|
6
|
+
*
|
|
7
|
+
* The full `toolbar` config is forwarded (including `commands`) so a read-only
|
|
8
|
+
* grid can still host non-selection toolbar actions — New / Refresh / Export and
|
|
9
|
+
* the injected Filter / Columns. Selection-DEPENDENT commands (delete/activate)
|
|
10
|
+
* are inert here because `selectionMode` is forced to `"none"` (nothing can be
|
|
11
|
+
* selected); the consumer is expected to omit them. Previously this preset
|
|
12
|
+
* stripped `commands` entirely (search-only); forwarding them is what lets the
|
|
13
|
+
* read-only bar consolidate into a single host toolbar instead of an external one.
|
|
7
14
|
*/
|
|
8
15
|
export declare function ReadOnlyGrid<T extends Record<string, unknown>>(props: ReadOnlyGridProps<T>): JSX.Element;
|
|
9
16
|
//# sourceMappingURL=ReadOnlyGrid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadOnlyGrid.d.ts","sourceRoot":"","sources":["../../src/hosts/ReadOnlyGrid.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD
|
|
1
|
+
{"version":3,"file":"ReadOnlyGrid.d.ts","sourceRoot":"","sources":["../../src/hosts/ReadOnlyGrid.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAExG"}
|
package/dist/index.esm.js
CHANGED
|
@@ -2070,15 +2070,19 @@ function DataGrid(props) {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
|
|
2072
2072
|
/**
|
|
2073
|
-
* Read-only grid: `<DataGrid>` with selection off
|
|
2074
|
-
*
|
|
2075
|
-
*
|
|
2073
|
+
* Read-only grid: `<DataGrid>` with selection off and editing off. Mirrors the
|
|
2074
|
+
* Grid Customizer's "Read-Only Grid" type — a presentation preset.
|
|
2075
|
+
*
|
|
2076
|
+
* The full `toolbar` config is forwarded (including `commands`) so a read-only
|
|
2077
|
+
* grid can still host non-selection toolbar actions — New / Refresh / Export and
|
|
2078
|
+
* the injected Filter / Columns. Selection-DEPENDENT commands (delete/activate)
|
|
2079
|
+
* are inert here because `selectionMode` is forced to `"none"` (nothing can be
|
|
2080
|
+
* selected); the consumer is expected to omit them. Previously this preset
|
|
2081
|
+
* stripped `commands` entirely (search-only); forwarding them is what lets the
|
|
2082
|
+
* read-only bar consolidate into a single host toolbar instead of an external one.
|
|
2076
2083
|
*/
|
|
2077
2084
|
function ReadOnlyGrid(props) {
|
|
2078
|
-
|
|
2079
|
-
? { showSearch: props.toolbar.showSearch, searchPlaceholder: props.toolbar.searchPlaceholder, onSearch: props.toolbar.onSearch }
|
|
2080
|
-
: undefined;
|
|
2081
|
-
return jsx(DataGrid, { ...props, selectionMode: "none", editable: false, toolbar: toolbar });
|
|
2085
|
+
return jsx(DataGrid, { ...props, selectionMode: "none", editable: false });
|
|
2082
2086
|
}
|
|
2083
2087
|
|
|
2084
2088
|
// Shared card-layout primitives for the card hosts (`<CardGrid>` flat cards +
|