@sito/dashboard-app 0.0.3 → 0.0.4

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.
@@ -1,7 +1,7 @@
1
1
  import { MutationFunction, QueryKey } from '@tanstack/react-query';
2
2
  import { DefaultValues, FieldValues } from 'react-hook-form';
3
3
  import { Action } from '@sito/dashboard';
4
- import { BaseEntityDto, ValidationError } from '../../lib';
4
+ import { BaseEntityDto, ImportDto, ValidationError } from '../../lib';
5
5
  import { UseConfirmationPropsType } from '../forms';
6
6
  import { FormDialogPropsType } from '../../components';
7
7
  export interface UseDeleteDialogPropsType extends UseConfirmationPropsType<number, ValidationError> {
@@ -25,8 +25,8 @@ export interface TriggerFormDialogPropsType<TFormType extends FieldValues, TErro
25
25
  export interface UseActionDialog<TRow extends BaseEntityDto, TFormType extends FieldValues> extends TriggerFormDialogPropsType<TFormType, ValidationError> {
26
26
  action: (record: TRow) => Action<TRow>;
27
27
  }
28
- export type UseImportDialogPropsType<TMutationOutputDto, TMutationDto> = {
29
- mutationFn: MutationFunction<TMutationOutputDto, TMutationDto>;
28
+ export type UseImportDialogPropsType = {
29
+ mutationFn: MutationFunction<number, ImportDto>;
30
30
  queryKey: QueryKey;
31
31
  entity: string;
32
32
  };
@@ -1,6 +1,5 @@
1
1
  import { UseImportDialogPropsType } from './types';
2
- import { ImportDto } from '../../lib';
3
- export declare function useImportDialog(props: UseImportDialogPropsType<number, ImportDto>): {
2
+ export declare function useImportDialog(props: UseImportDialogPropsType): {
4
3
  open: boolean;
5
4
  title: string;
6
5
  handleClose: () => void;
@@ -1,4 +1,5 @@
1
1
  export type ImportDto = {
2
2
  file: string;
3
+ entity: string;
3
4
  override: boolean;
4
5
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sito/dashboard-app",
3
3
  "private": false,
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "type": "module",
6
6
  "description": "UI Library with prefab components",
7
7
  "main": "dist/dashboard-app.cjs",