@sito/dashboard-app 0.0.10 → 0.0.11
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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActionType } from '@sito/dashboard';
|
|
2
2
|
import { BaseEntityDto } from '../../lib';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
export type ActionsContainerPropsType<TRow extends BaseEntityDto> = {
|
|
@@ -7,7 +7,7 @@ export type ActionsContainerPropsType<TRow extends BaseEntityDto> = {
|
|
|
7
7
|
showActionTexts?: boolean;
|
|
8
8
|
showTooltips?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export interface ActionPropsType<TRow extends BaseEntityDto> extends
|
|
10
|
+
export interface ActionPropsType<TRow extends BaseEntityDto> extends ActionType<TRow> {
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
showText?: boolean;
|
|
13
13
|
showTooltips?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
2
2
|
import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
|
|
3
|
-
import {
|
|
3
|
+
import { ActionType, BaseDto } from '@sito/dashboard';
|
|
4
4
|
export type EmptyPropsType<TRow extends BaseDto> = {
|
|
5
5
|
message?: string;
|
|
6
6
|
messageProps?: DetailedHTMLProps<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
|
|
7
|
-
action?:
|
|
7
|
+
action?: ActionType<TRow>;
|
|
8
8
|
iconProps?: FontAwesomeIconProps;
|
|
9
9
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ActionType } from '@sito/dashboard';
|
|
3
3
|
import { BaseEntityDto } from '../../lib';
|
|
4
4
|
export type PagePropsType<TRow extends BaseEntityDto> = {
|
|
5
5
|
title?: string;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
isLoading?: boolean;
|
|
8
|
-
addOptions?: Partial<
|
|
9
|
-
filterOptions?: Partial<
|
|
8
|
+
addOptions?: Partial<ActionType<TRow>>;
|
|
9
|
+
filterOptions?: Partial<ActionType<TRow>>;
|
|
10
10
|
isAnimated?: boolean;
|
|
11
|
-
actions?:
|
|
11
|
+
actions?: ActionType<TRow>[];
|
|
12
12
|
showBackButton?: boolean;
|
|
13
13
|
queryKey?: string[];
|
|
14
14
|
};
|
|
15
15
|
export type PageHeaderPropsType<TRow extends BaseEntityDto> = {
|
|
16
16
|
title?: string;
|
|
17
|
-
actions?:
|
|
17
|
+
actions?: ActionType<TRow>[];
|
|
18
18
|
showBackButton?: boolean;
|
|
19
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActionType } from '@sito/dashboard';
|
|
2
2
|
import { UseSingleActionPropTypes } from '..';
|
|
3
3
|
import { BaseEntityDto } from '../../lib';
|
|
4
4
|
export declare const useEditAction: <TRow extends BaseEntityDto>(props: UseSingleActionPropTypes<number>) => {
|
|
5
|
-
action: (record: TRow) =>
|
|
5
|
+
action: (record: TRow) => ActionType<TRow>;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MutationFunction, QueryKey } from '@tanstack/react-query';
|
|
2
2
|
import { DefaultValues, FieldValues } from 'react-hook-form';
|
|
3
|
-
import {
|
|
3
|
+
import { ActionType } from '@sito/dashboard';
|
|
4
4
|
import { BaseEntityDto, ImportDto, ValidationError } from '../../lib';
|
|
5
5
|
import { UseConfirmationPropsType } from '../forms';
|
|
6
6
|
import { FormDialogPropsType } from '../../components';
|
|
@@ -23,7 +23,7 @@ export interface TriggerFormDialogPropsType<TFormType extends FieldValues, TErro
|
|
|
23
23
|
openDialog: (id?: number) => void;
|
|
24
24
|
}
|
|
25
25
|
export interface UseActionDialog<TRow extends BaseEntityDto, TFormType extends FieldValues> extends TriggerFormDialogPropsType<TFormType, ValidationError> {
|
|
26
|
-
action: (record: TRow) =>
|
|
26
|
+
action: (record: TRow) => ActionType<TRow>;
|
|
27
27
|
}
|
|
28
28
|
export type UseImportDialogPropsType = {
|
|
29
29
|
mutationFn: MutationFunction<number, ImportDto>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sito/dashboard-app",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.11",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "UI Library with prefab components",
|
|
7
7
|
"main": "dist/dashboard-app.cjs",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@fortawesome/free-regular-svg-icons": "7.0.0",
|
|
52
52
|
"@fortawesome/free-solid-svg-icons": "7.0.0",
|
|
53
53
|
"@fortawesome/react-fontawesome": "0.2.3",
|
|
54
|
-
"@sito/dashboard": "0.0.
|
|
54
|
+
"@sito/dashboard": "0.0.53",
|
|
55
55
|
"@tanstack/react-query": "5.83.0",
|
|
56
56
|
"react": "18.3.1",
|
|
57
57
|
"react-dom": "18.3.1",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@fortawesome/free-regular-svg-icons": "7.0.0",
|
|
65
65
|
"@fortawesome/free-solid-svg-icons": "7.0.0",
|
|
66
66
|
"@fortawesome/react-fontawesome": "0.2.3",
|
|
67
|
-
"@sito/dashboard": "0.0.
|
|
67
|
+
"@sito/dashboard": "0.0.53",
|
|
68
68
|
"@storybook/addon-a11y": "8.4.7",
|
|
69
69
|
"@storybook/addon-essentials": "8.4.7",
|
|
70
70
|
"@storybook/addon-interactions": "8.4.7",
|