@memobit/libs 1.0.10 → 1.0.12

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/index.d.ts CHANGED
@@ -788,7 +788,7 @@ declare interface CountryWithFlagProps {
788
788
  className?: string;
789
789
  }
790
790
 
791
- declare function DataView_2<T>({ columns, data, rowKey, pinnedIds, selectable, onSelectionChange, selectedIds: controlledSelectedIds, pageSizeOptions, initialPageSize, showPageSize, card, actions, actionsWidth, timeline, onRowClick, rowHref, rowClassName, rowDetail, empty, initialSortKey, initialSortDirection, sortKey: controlledSortKey, sortDirection: controlledSortDirection, onSortChange, miniSort, showCardSortControls, desktopView, cardMaxWidth, className, onPageChange, onPageSizeChange, currentPage: controlledCurrentPage, totalItems: controlledTotalItems, group, showResultsCount, totalCount, itemNoun, }: DataViewProps<T>): JSX.Element;
791
+ declare function DataView_2<T>({ columns, data, rowKey, pinnedIds, selectable, onSelectionChange, selectedIds: controlledSelectedIds, pageSizeOptions, initialPageSize, showPageSize, card, actions, actionsWidth, timeline, onRowClick, rowHref, rowClassName, rowDetail, empty, initialSortKey, initialSortDirection, sortKey: controlledSortKey, sortDirection: controlledSortDirection, onSortChange, miniSort, showCardSortControls, desktopView, cardMaxWidth, className, onPageChange, onPageSizeChange, currentPage: controlledCurrentPage, totalItems: controlledTotalItems, group, showResultsCount, totalCount, itemNoun, columnSelector, }: DataViewProps<T>): JSX.Element;
792
792
  export { DataView_2 as DataView }
793
793
 
794
794
  export declare interface DataViewCardConfig<T> {
@@ -819,6 +819,19 @@ export declare interface DataViewColumn<T> {
819
819
  hideInMobile?: boolean;
820
820
  }
821
821
 
822
+ export declare interface DataViewColumnSelectorConfig {
823
+ options: DataViewColumnSelectorOption[];
824
+ selectedKeys: string[];
825
+ onChange: (selectedKeys: string[]) => void;
826
+ /** Trigger button label. Defaults to "Columns". */
827
+ label?: string;
828
+ }
829
+
830
+ export declare interface DataViewColumnSelectorOption {
831
+ key: string;
832
+ label: string;
833
+ }
834
+
822
835
  export declare type DataViewDisplayMode = 'table' | 'cards';
823
836
 
824
837
  export declare interface DataViewEmptyConfig {
@@ -883,7 +896,7 @@ export declare interface DataViewProps<T> {
883
896
  actions?: (row: T) => default_2.ReactNode;
884
897
  actionsWidth?: number;
885
898
  timeline?: DataViewTimelineConfig<T>;
886
- onRowClick?: (row: T) => void;
899
+ onRowClick?: (row: T, event?: default_2.MouseEvent) => void;
887
900
  /** Render an optional detail row spanning all columns directly below the matching row.
888
901
  * Return `null`/`undefined` to skip rendering for that row. Table mode only. */
889
902
  rowDetail?: (row: T) => default_2.ReactNode;
@@ -929,6 +942,8 @@ export declare interface DataViewProps<T> {
929
942
  totalCount?: number;
930
943
  /** Noun appended to the results-count label, e.g. "books". */
931
944
  itemNoun?: string;
945
+ /** Optional column-visibility selector rendered in the top controls. Hidden when `options` is empty. */
946
+ columnSelector?: DataViewColumnSelectorConfig;
932
947
  }
933
948
 
934
949
  export declare interface DataViewTimelineConfig<T> {