@stenajs-webui/grid 23.21.7 → 23.21.8
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/features/standard-table/config/StandardTableColumnConfig.d.ts +1 -1
- package/dist/features/standard-table/context/StandardTableSelectionStoreContext.d.ts +11 -0
- package/dist/features/standard-table/hooks/UseCellBackground.d.ts +2 -2
- package/dist/index.es.js +975 -946
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -158,7 +158,7 @@ export interface StandardTableCellRendererArgObject<TItemValue, TItem> {
|
|
|
158
158
|
* Therefor, it can not know "value: TItemValue", since it has not been defined yet.
|
|
159
159
|
*/
|
|
160
160
|
export type DefaultStandardTableCellRenderer<TItem> = (arg: StandardTableCellRendererArgObject<unknown, TItem>) => ReactNode;
|
|
161
|
-
export type BackgroundResolver<TItem> = (item: TItem) => string | undefined;
|
|
161
|
+
export type BackgroundResolver<TItem> = (item: TItem, isSelected: boolean) => string | undefined;
|
|
162
162
|
export interface ItemValueResolver<TItem, TItemValue> {
|
|
163
163
|
itemValueResolver: (item: TItem) => TItemValue;
|
|
164
164
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscription-based access to row selection, so that cells can subscribe to
|
|
3
|
+
* the selection status of their own row only, instead of the entire table state.
|
|
4
|
+
*/
|
|
5
|
+
export interface StandardTableSelectionStore {
|
|
6
|
+
subscribe: (listener: () => void) => () => void;
|
|
7
|
+
getSelectedIdsSet: () => ReadonlySet<string>;
|
|
8
|
+
}
|
|
9
|
+
export declare const StandardTableSelectionStoreContext: import("react").Context<StandardTableSelectionStore>;
|
|
10
|
+
export declare const useStandardTableSelectionStore: (selectedIds: Array<string>) => StandardTableSelectionStore;
|
|
11
|
+
export declare const useIsRowSelected: (itemKey: string) => boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { StandardTableColumnConfig } from "../config/StandardTableColumnConfig";
|
|
2
|
-
export declare const useCellBackgroundByColumnId: <T>(columnId: string, item: T) => string | undefined;
|
|
3
|
-
export declare const useCellBackgroundByColumnConfig: <TItem, TItemValue, TColumnKey extends string>(columnConfig: StandardTableColumnConfig<TItem, TItemValue, TColumnKey> | undefined, item: TItem) => string | undefined;
|
|
2
|
+
export declare const useCellBackgroundByColumnId: <T>(columnId: string, item: T, isSelected: boolean) => string | undefined;
|
|
3
|
+
export declare const useCellBackgroundByColumnConfig: <TItem, TItemValue, TColumnKey extends string>(columnConfig: StandardTableColumnConfig<TItem, TItemValue, TColumnKey> | undefined, item: TItem, isSelected: boolean) => string | undefined;
|