identity-admin-ui 1.5.12 → 1.5.13
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/lib/cjs/index.js +12 -12
- package/lib/cjs/types/components/dataGrid/DataGridd.d.ts +6 -0
- package/lib/cjs/types/components/dataGrid/GridSelectionActions.d.ts +3 -1
- package/lib/cjs/types/components/dataGrid/GridTypes.d.ts +2 -0
- package/lib/cjs/types/components/dataGrid/GridUIUtils.d.ts +2 -1
- package/lib/cjs/types/components/dataGrid/GridUtils.d.ts +2 -1
- package/lib/cjs/types/pages/IdentityEditPage.d.ts +2 -0
- package/lib/cjs/types/sections/dashboard/NewEditForm.d.ts +3 -1
- package/lib/cjs/types/utils/HelperFunctions.d.ts +2 -0
- package/lib/esm/index.js +11 -11
- package/lib/esm/types/components/dataGrid/DataGridd.d.ts +6 -0
- package/lib/esm/types/components/dataGrid/GridSelectionActions.d.ts +3 -1
- package/lib/esm/types/components/dataGrid/GridTypes.d.ts +2 -0
- package/lib/esm/types/components/dataGrid/GridUIUtils.d.ts +2 -1
- package/lib/esm/types/components/dataGrid/GridUtils.d.ts +2 -1
- package/lib/esm/types/pages/IdentityEditPage.d.ts +2 -0
- package/lib/esm/types/sections/dashboard/NewEditForm.d.ts +3 -1
- package/lib/esm/types/utils/HelperFunctions.d.ts +2 -0
- package/lib/index.d.ts +12 -4
- package/package.json +1 -1
|
@@ -3,6 +3,12 @@ import { ParamsState } from './GridTypes';
|
|
|
3
3
|
import { IBulkActionsDialogState } from '../BulkActions/BulkActionDialogs';
|
|
4
4
|
export interface IGridExtras {
|
|
5
5
|
noRowsText?: string;
|
|
6
|
+
bulkDeleteText?: string;
|
|
7
|
+
afterDeleteSnackBarText?: string;
|
|
8
|
+
afterBulkDeleteSnackBarText?: string;
|
|
9
|
+
itemsSelectedText?: string;
|
|
10
|
+
cancelText?: string;
|
|
11
|
+
confirmText?: string;
|
|
6
12
|
}
|
|
7
13
|
export interface GridProps {
|
|
8
14
|
resources: any;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
import { IGridExtras } from './DataGridd';
|
|
3
4
|
type Props = {
|
|
4
5
|
action?: React.ReactNode;
|
|
5
6
|
numSelected: number;
|
|
6
7
|
rowCount: number;
|
|
7
8
|
selected?: string[];
|
|
8
9
|
onSelectAllItems?: (checked: boolean) => void;
|
|
10
|
+
extras?: IGridExtras;
|
|
9
11
|
sx?: SxProps<Theme>;
|
|
10
12
|
};
|
|
11
|
-
export default function GridSelectionAction({ action, selected, rowCount, numSelected, onSelectAllItems, sx, ...other }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default function GridSelectionAction({ action, selected, rowCount, numSelected, extras, onSelectAllItems, sx, ...other }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GridSortDirection } from "@mui/x-data-grid";
|
|
2
2
|
import { Dispatch, SetStateAction } from "react";
|
|
3
|
+
import { IGridExtras } from "./DataGridd";
|
|
3
4
|
export interface ListProps {
|
|
4
5
|
value: string;
|
|
5
6
|
key: string;
|
|
@@ -53,4 +54,5 @@ export interface GridDialogProps {
|
|
|
53
54
|
onConfirm?: (data?: any) => void;
|
|
54
55
|
message?: string;
|
|
55
56
|
action?: () => Promise<any>;
|
|
57
|
+
extras?: IGridExtras;
|
|
56
58
|
}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import { GridRenderCellParams, GridRowSelectionModel } from '@mui/x-data-grid';
|
|
3
3
|
import { DialogState, ListProps, ParamsState } from './GridTypes';
|
|
4
4
|
import { IBulkActionsDialogState } from '../BulkActions/BulkActionDialogs';
|
|
5
|
+
import { IGridExtras } from './DataGridd';
|
|
5
6
|
export declare function handleExtraActionNavigation(data: any, userPath: {
|
|
6
7
|
[key: string]: any;
|
|
7
8
|
}): any;
|
|
8
|
-
export declare function ActionKababMenu(resources: any, params: GridRenderCellParams, resourceName: string, dialogState: DialogState, [gridParams, setParams]: ParamsState): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function ActionKababMenu(resources: any, params: GridRenderCellParams, resourceName: string, dialogState: DialogState, [gridParams, setParams]: ParamsState, extras?: IGridExtras): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export declare function getFieldType(model: string, property: ListProps, cellParams: GridRenderCellParams, resources: any, userPath: {
|
|
10
11
|
[key: string]: any;
|
|
11
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GridColDef, GridSortModel } from '@mui/x-data-grid';
|
|
2
2
|
import { PageInfo, ListParams, ParamsState, PageState, PageInfoState, GridMode, DialogState, ListProps } from './GridTypes';
|
|
3
|
+
import { IGridExtras } from './DataGridd';
|
|
3
4
|
export declare const rowsPerPageOptions: number[];
|
|
4
5
|
export declare const initialPageInfoState: PageInfo;
|
|
5
6
|
export declare const initialQueryParams: ListParams;
|
|
@@ -13,4 +14,4 @@ export declare function setGridMode(mode: GridMode): {
|
|
|
13
14
|
};
|
|
14
15
|
export declare function createColumns(listProperties: ListProps[], resources: any, resourceName: string, dialogState: DialogState, gridState: ParamsState, userPath: {
|
|
15
16
|
[key: string]: any;
|
|
16
|
-
}, baseApiRoute: string, isDesktop?: boolean): GridColDef[];
|
|
17
|
+
}, baseApiRoute: string, isDesktop?: boolean, extras?: IGridExtras): GridColDef[];
|
|
@@ -5,6 +5,8 @@ export interface ICreateEdit {
|
|
|
5
5
|
key?: string;
|
|
6
6
|
path: string;
|
|
7
7
|
removeHeaderBreadcrumbs?: boolean;
|
|
8
|
+
afterEditSnackText?: (recordName: string) => string;
|
|
9
|
+
afterCreateSnackText?: (recordName: string) => string;
|
|
8
10
|
onSubmitForm?: () => void;
|
|
9
11
|
Component?: (props: any) => JSX.Element;
|
|
10
12
|
Actions?: (props: any) => JSX.Element;
|
|
@@ -8,6 +8,8 @@ type Props = {
|
|
|
8
8
|
referencedMap?: any;
|
|
9
9
|
modelRoute: string;
|
|
10
10
|
redirectPath?: (record: any) => string;
|
|
11
|
+
afterEditSnackText?: (recordName: string) => string;
|
|
12
|
+
afterCreateSnackText?: (recordName: string) => string;
|
|
11
13
|
};
|
|
12
|
-
export default function NewEditForm({ isEdit, id, record, path, mediaUploaderFields, onSubmitForm, referencedMap, modelRoute, redirectPath }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default function NewEditForm({ isEdit, id, record, path, mediaUploaderFields, onSubmitForm, referencedMap, modelRoute, redirectPath, afterCreateSnackText, afterEditSnackText, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import dayjs, { Dayjs } from 'dayjs';
|
|
3
3
|
import { AlertColor } from '@mui/material';
|
|
4
|
+
import IResource from '../context/Resource';
|
|
4
5
|
export interface ISubmitProps {
|
|
5
6
|
name: string;
|
|
6
7
|
route: string;
|
|
@@ -40,5 +41,6 @@ export declare class HelperMethods {
|
|
|
40
41
|
static checkLocalizedString(resources: any, path: string, field: string): boolean;
|
|
41
42
|
static stringifyTime(time: Dayjs | null): string | undefined;
|
|
42
43
|
static convertToOriginal(time: string): dayjs.Dayjs;
|
|
44
|
+
static getRecordName(titleData: any, title: string, resource: IResource): any;
|
|
43
45
|
}
|
|
44
46
|
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -41,6 +41,16 @@ declare enum PageVariant {
|
|
|
41
41
|
|
|
42
42
|
declare const IdentityPage: (props: IdentityPageProps) => react_jsx_runtime.JSX.Element;
|
|
43
43
|
|
|
44
|
+
interface IGridExtras {
|
|
45
|
+
noRowsText?: string;
|
|
46
|
+
bulkDeleteText?: string;
|
|
47
|
+
afterDeleteSnackBarText?: string;
|
|
48
|
+
afterBulkDeleteSnackBarText?: string;
|
|
49
|
+
itemsSelectedText?: string;
|
|
50
|
+
cancelText?: string;
|
|
51
|
+
confirmText?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
44
54
|
interface ListParams {
|
|
45
55
|
page: number;
|
|
46
56
|
perPage: number;
|
|
@@ -64,10 +74,6 @@ type IBulkActionComponent = (bulkActionsDialogState: {
|
|
|
64
74
|
[key: string]: IBulkActionsDialogState;
|
|
65
75
|
} | undefined, onClose: (key: string) => void, onSubmit: (data: any, actionKey: string) => Promise<void>) => JSX.Element;
|
|
66
76
|
|
|
67
|
-
interface IGridExtras {
|
|
68
|
-
noRowsText?: string;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
77
|
interface IListProps {
|
|
72
78
|
apiRoute: string;
|
|
73
79
|
key?: string;
|
|
@@ -112,6 +118,8 @@ interface ICreateEdit {
|
|
|
112
118
|
key?: string;
|
|
113
119
|
path: string;
|
|
114
120
|
removeHeaderBreadcrumbs?: boolean;
|
|
121
|
+
afterEditSnackText?: (recordName: string) => string;
|
|
122
|
+
afterCreateSnackText?: (recordName: string) => string;
|
|
115
123
|
onSubmitForm?: () => void;
|
|
116
124
|
Component?: (props: any) => JSX.Element;
|
|
117
125
|
Actions?: (props: any) => JSX.Element;
|