@mcurros2/microm 1.1.444-0 → 1.1.446-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/index.d.ts CHANGED
@@ -872,6 +872,7 @@ export type DataGridSelectionChangedCallback = (selection: GridSelection, keys:
872
872
  export interface DataGridProps extends UseEntityUIProps {
873
873
  viewName?: string;
874
874
  search?: string[];
875
+ retainSearch?: string;
875
876
  limit?: DataViewLimit;
876
877
  refreshOnInit?: boolean;
877
878
  selectionMode: GridSelectionMode;
@@ -932,6 +933,20 @@ export interface DataGridColumnsMenuProps {
932
933
  setOpened: (opened: boolean) => void;
933
934
  }
934
935
  export function DataGridColumnsMenu(props: DataGridColumnsMenuProps): JSX.Element;
936
+ export type SearchCallback = (search: string[] | undefined) => void;
937
+ interface UseRetainedSearchOptions {
938
+ retainSearch?: string;
939
+ search?: string[];
940
+ onSearch?: SearchCallback;
941
+ onSearchTextChange?: SearchCallback;
942
+ }
943
+ interface UseRetainedSearchResult {
944
+ search?: string[];
945
+ executeRetainedSearch: boolean;
946
+ onSearch?: SearchCallback;
947
+ onSearchTextChange?: SearchCallback;
948
+ }
949
+ export function useRetainedSearch({ retainSearch, search, onSearch, onSearchTextChange }: UseRetainedSearchOptions): UseRetainedSearchResult;
935
950
  export const DataGridDefaultProps: Partial<DataGridProps>;
936
951
  export function DataGrid(props: DataGridProps): JSX.Element;
937
952
  export interface DataGridFormProps extends DataGridProps {
@@ -978,26 +993,9 @@ export interface UseResolvedEntityBuilderResult<TResult> {
978
993
  ready: boolean;
979
994
  }
980
995
  export function useResolvedEntityBuilder<TResult>(client: MicroMClient, parentKeys: ValuesObject | undefined, source: EntitySource<TResult>): UseResolvedEntityBuilderResult<TResult>;
981
- export type SearchCallback = (search: string[] | undefined) => void;
982
- interface UseRetainedSearchOptions {
983
- retainSearch?: string;
984
- search?: string[];
985
- refreshOnInit?: boolean;
986
- onSearch?: SearchCallback;
987
- onSearchTextChange?: SearchCallback;
988
- }
989
- interface UseRetainedSearchResult {
990
- search?: string[];
991
- refreshOnInit?: boolean;
992
- onSearch?: SearchCallback;
993
- onSearchTextChange?: SearchCallback;
994
- }
995
- export function useRetainedSearch({ retainSearch, search, refreshOnInit, onSearch, onSearchTextChange }: UseRetainedSearchOptions): UseRetainedSearchResult;
996
996
  type DataGridPanelBaseProps = Omit<DataGridProps, "entity" | "title"> & {
997
997
  client: MicroMClient;
998
998
  parentKeys?: ValuesObject;
999
- retainSearch?: string;
1000
- onSearchTextChange?: DataGridProps["onSearch"];
1001
999
  bgLight?: DefaultMantineColor;
1002
1000
  bgDark?: DefaultMantineColor;
1003
1001
  /** Props for the wrapping Card. Replaces the default object entirely when set per instance */
@@ -1072,6 +1070,7 @@ export interface DataViewLabels extends EntityUILabels {
1072
1070
  export interface DataViewProps extends Omit<UseEntityUIProps, 'labels'> {
1073
1071
  viewName: string;
1074
1072
  search?: string[];
1073
+ retainSearch?: string;
1075
1074
  limit?: DataViewLimit;
1076
1075
  refreshOnInit?: boolean;
1077
1076
  selectionMode: DataViewSelectionMode;
@@ -2496,8 +2495,6 @@ type DataViewPanelBaseProps = Omit<DataViewProps, "entity" | "title" | "viewName
2496
2495
  client: MicroMClient;
2497
2496
  parentKeys?: ValuesObject;
2498
2497
  Card?: DataViewProps["Card"];
2499
- retainSearch?: string;
2500
- onSearchTextChange?: DataViewProps["onSearch"];
2501
2498
  bgLight?: DefaultMantineColor;
2502
2499
  bgDark?: DefaultMantineColor;
2503
2500
  rowsContainerProps?: SimpleGridProps;
@@ -3760,6 +3757,7 @@ export function useMultiDataMapGrid({ dataMapView, viewState, selectionMode, map
3760
3757
  showSelectRowsButton: boolean;
3761
3758
  limit: "0" | "50" | "100" | "500" | "1000" | "10000" | undefined;
3762
3759
  viewName: string;
3760
+ retainSearch: string;
3763
3761
  refreshOnInit: boolean;
3764
3762
  onDataRefresh: (result: _OperationStatus1<_DataResult1[]>) => void;
3765
3763
  onSearch: _DataViewSearchCallback1;