identity-admin-ui 1.5.16 → 1.5.18
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 +2 -2
- package/lib/cjs/types/components/BulkActions/BulkActionDialogs.d.ts +2 -0
- package/lib/cjs/types/components/Buttons/NextPreviousButtons.d.ts +7 -5
- package/lib/cjs/types/context/Resource.d.ts +13 -16
- package/lib/cjs/types/context/ResourcesContext.d.ts +2 -0
- package/lib/cjs/types/helpers/CrudHelper/Show/ShowRecordProps.d.ts +2 -8
- package/lib/cjs/types/hooks/useResources.d.ts +1 -0
- package/lib/cjs/types/pages/IdentityEditPage.d.ts +2 -1
- package/lib/esm/index.js +2 -2
- package/lib/esm/types/components/BulkActions/BulkActionDialogs.d.ts +2 -0
- package/lib/esm/types/components/Buttons/NextPreviousButtons.d.ts +7 -5
- package/lib/esm/types/context/Resource.d.ts +13 -16
- package/lib/esm/types/context/ResourcesContext.d.ts +2 -0
- package/lib/esm/types/helpers/CrudHelper/Show/ShowRecordProps.d.ts +2 -8
- package/lib/esm/types/hooks/useResources.d.ts +1 -0
- package/lib/esm/types/pages/IdentityEditPage.d.ts +2 -1
- package/lib/index.d.ts +29 -27
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { ListParams } from '../dataGrid/GridTypes';
|
|
3
3
|
import { GridRowSelectionModel } from '@mui/x-data-grid';
|
|
4
4
|
import { IBulkActionComponent } from './IBulkActionComponent';
|
|
5
|
+
import { AlertColor } from '../../pages/IdentityListPage';
|
|
5
6
|
export interface IBulkActionsDialogState {
|
|
6
7
|
state: boolean;
|
|
7
8
|
modelName: string;
|
|
@@ -10,6 +11,7 @@ export interface IBulkActionsDialogState {
|
|
|
10
11
|
setSelected: (value: React.SetStateAction<GridRowSelectionModel>) => void;
|
|
11
12
|
documentIds: string[];
|
|
12
13
|
afterExecuteMessage: string;
|
|
14
|
+
severity: AlertColor;
|
|
13
15
|
}
|
|
14
16
|
interface BulkActionDialogProps {
|
|
15
17
|
bulkActionsDialogState: {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
export interface
|
|
2
|
-
recordId: string;
|
|
3
|
-
modelPath: string;
|
|
4
|
-
path?: any;
|
|
1
|
+
export interface INextpreviousExtras {
|
|
5
2
|
onNoNextText?: string;
|
|
6
3
|
onNoPreviousText?: string;
|
|
7
4
|
previousButtonTitle?: string;
|
|
@@ -9,4 +6,9 @@ export interface INextPrevious {
|
|
|
9
6
|
onClickNext?: (currentRecordId?: string) => void;
|
|
10
7
|
onClickPrevious?: (currentRecordId?: string) => void;
|
|
11
8
|
}
|
|
12
|
-
export
|
|
9
|
+
export interface INextPrevious extends INextpreviousExtras {
|
|
10
|
+
recordId: string;
|
|
11
|
+
modelPath: string;
|
|
12
|
+
navigateTo: (recordId: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function NextPreviousButtons({ modelPath, onNoNextText, onNoPreviousText, recordId, nextButtonTitle, previousButtonTitle, navigateTo, onClickNext, onClickPrevious, }: INextPrevious): import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,6 +27,9 @@ export interface IMainProperty {
|
|
|
27
27
|
model: {
|
|
28
28
|
[key: string]: ISchemaObject;
|
|
29
29
|
};
|
|
30
|
+
disableNextPreviousButtonsInShowPage?: boolean;
|
|
31
|
+
disableNextPreviousButtonsInEditPage?: boolean;
|
|
32
|
+
displayEditPageInShowPage?: boolean;
|
|
30
33
|
}
|
|
31
34
|
export interface IParent {
|
|
32
35
|
icon: string;
|
|
@@ -53,22 +56,8 @@ export interface IFilter {
|
|
|
53
56
|
};
|
|
54
57
|
}
|
|
55
58
|
export interface IAction {
|
|
56
|
-
bulkDelete:
|
|
57
|
-
|
|
58
|
-
confirmDeleteOption: string;
|
|
59
|
-
confirmationMessageBody: string;
|
|
60
|
-
confirmationMessageTitle: string;
|
|
61
|
-
isAccessible: boolean;
|
|
62
|
-
value: string;
|
|
63
|
-
};
|
|
64
|
-
delete: {
|
|
65
|
-
cancelDeleteOption: string;
|
|
66
|
-
confirmDeleteOption: string;
|
|
67
|
-
confirmationMessageBody: string;
|
|
68
|
-
confirmationMessageTitle: string;
|
|
69
|
-
isAccessible: boolean;
|
|
70
|
-
value: string;
|
|
71
|
-
};
|
|
59
|
+
bulkDelete: IDeleteActionMin;
|
|
60
|
+
delete: IDeleteActionMin;
|
|
72
61
|
edit: IActionMin;
|
|
73
62
|
new: IActionMin;
|
|
74
63
|
show: IActionMin;
|
|
@@ -91,11 +80,18 @@ export interface IExtarAction {
|
|
|
91
80
|
name: string;
|
|
92
81
|
severity?: Severity;
|
|
93
82
|
message?: string;
|
|
83
|
+
guardTitle?: string;
|
|
94
84
|
}
|
|
95
85
|
export interface IActionMin {
|
|
96
86
|
isAccessible: boolean;
|
|
97
87
|
value: string;
|
|
98
88
|
}
|
|
89
|
+
interface IDeleteActionMin extends IActionMin {
|
|
90
|
+
cancelDeleteOption: string;
|
|
91
|
+
confirmDeleteOption: string;
|
|
92
|
+
confirmationMessageBody: string;
|
|
93
|
+
confirmationMessageTitle: string;
|
|
94
|
+
}
|
|
99
95
|
export type orderTypes = 'asc' | 'desc';
|
|
100
96
|
export type Severity = 'success' | 'info' | 'warning' | 'error';
|
|
101
97
|
export interface ISchemaObject {
|
|
@@ -119,3 +115,4 @@ export interface ISchemaObject {
|
|
|
119
115
|
[key: string]: ISchemaObject;
|
|
120
116
|
};
|
|
121
117
|
}
|
|
118
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { RequestState } from '../hooks/RequetState';
|
|
2
3
|
import IResource from './Resource';
|
|
3
4
|
export type ResourceResponse = {
|
|
4
5
|
[key: string]: IResource | {
|
|
@@ -10,6 +11,7 @@ export type ResourceResponse = {
|
|
|
10
11
|
declare const ResourcesContext: import("react").Context<{
|
|
11
12
|
resources: ResourceResponse;
|
|
12
13
|
getResources: () => void;
|
|
14
|
+
state: RequestState;
|
|
13
15
|
}>;
|
|
14
16
|
export interface ResourcesContextConfig {
|
|
15
17
|
resourcesUrl: string;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { INextpreviousExtras } from '../../../components/Buttons/NextPreviousButtons';
|
|
3
|
+
export interface ShowRecordProps extends INextpreviousExtras {
|
|
3
4
|
key?: string;
|
|
4
5
|
path: string;
|
|
5
6
|
modelRoute: string;
|
|
6
|
-
enableNextPreviousButtons?: boolean;
|
|
7
|
-
previousButtonTitle?: string;
|
|
8
|
-
nextButtonTitle?: string;
|
|
9
|
-
onNoNextText?: string;
|
|
10
|
-
onNoPreviousText?: string;
|
|
11
|
-
onClickNext?: (currentRecordId?: string) => void;
|
|
12
|
-
onClickPrevious?: (currentRecordId?: string) => void;
|
|
13
7
|
Component?: (props: any) => JSX.Element;
|
|
14
8
|
HeadingView?: (props: any) => JSX.Element;
|
|
15
9
|
Actions?: (props: any) => JSX.Element;
|
package/lib/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { AxiosRequestConfig } from 'axios';
|
|
|
8
8
|
import * as notistack from 'notistack';
|
|
9
9
|
import { SnackbarOrigin } from 'notistack';
|
|
10
10
|
import * as _mui_material from '@mui/material';
|
|
11
|
-
import { AlertColor } from '@mui/material';
|
|
11
|
+
import { AlertColor as AlertColor$1 } from '@mui/material';
|
|
12
12
|
|
|
13
13
|
type TLink = {
|
|
14
14
|
href?: string;
|
|
@@ -69,6 +69,7 @@ interface IBulkActionsDialogState {
|
|
|
69
69
|
setSelected: (value: React.SetStateAction<GridRowSelectionModel>) => void;
|
|
70
70
|
documentIds: string[];
|
|
71
71
|
afterExecuteMessage: string;
|
|
72
|
+
severity: AlertColor;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
type IBulkActionComponent = (bulkActionsDialogState: {
|
|
@@ -91,19 +92,22 @@ interface IListRecordsProps extends IListProps {
|
|
|
91
92
|
bulkActionsComponents?: IBulkActionComponent;
|
|
92
93
|
}
|
|
93
94
|
|
|
95
|
+
type AlertColor = 'success' | 'info' | 'warning' | 'error';
|
|
94
96
|
declare function ListRecords(props: IListRecordsProps): react_jsx_runtime.JSX.Element;
|
|
95
97
|
|
|
96
|
-
interface
|
|
97
|
-
key?: string;
|
|
98
|
-
path: string;
|
|
99
|
-
modelRoute: string;
|
|
100
|
-
enableNextPreviousButtons?: boolean;
|
|
101
|
-
previousButtonTitle?: string;
|
|
102
|
-
nextButtonTitle?: string;
|
|
98
|
+
interface INextpreviousExtras {
|
|
103
99
|
onNoNextText?: string;
|
|
104
100
|
onNoPreviousText?: string;
|
|
101
|
+
previousButtonTitle?: string;
|
|
102
|
+
nextButtonTitle?: string;
|
|
105
103
|
onClickNext?: (currentRecordId?: string) => void;
|
|
106
104
|
onClickPrevious?: (currentRecordId?: string) => void;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface ShowRecordProps extends INextpreviousExtras {
|
|
108
|
+
key?: string;
|
|
109
|
+
path: string;
|
|
110
|
+
modelRoute: string;
|
|
107
111
|
Component?: (props: any) => JSX.Element;
|
|
108
112
|
HeadingView?: (props: any) => JSX.Element;
|
|
109
113
|
Actions?: (props: any) => JSX.Element;
|
|
@@ -113,7 +117,7 @@ interface ShowRecordProps {
|
|
|
113
117
|
|
|
114
118
|
declare function ShowRecord(props: ShowRecordProps): react_jsx_runtime.JSX.Element;
|
|
115
119
|
|
|
116
|
-
interface ICreateEdit {
|
|
120
|
+
interface ICreateEdit extends INextpreviousExtras {
|
|
117
121
|
isEdit: boolean;
|
|
118
122
|
modelRoute: string;
|
|
119
123
|
key?: string;
|
|
@@ -269,6 +273,9 @@ interface IMainProperty {
|
|
|
269
273
|
model: {
|
|
270
274
|
[key: string]: ISchemaObject;
|
|
271
275
|
};
|
|
276
|
+
disableNextPreviousButtonsInShowPage?: boolean;
|
|
277
|
+
disableNextPreviousButtonsInEditPage?: boolean;
|
|
278
|
+
displayEditPageInShowPage?: boolean;
|
|
272
279
|
}
|
|
273
280
|
interface IParent {
|
|
274
281
|
icon: string;
|
|
@@ -295,22 +302,8 @@ interface IFilter {
|
|
|
295
302
|
};
|
|
296
303
|
}
|
|
297
304
|
interface IAction {
|
|
298
|
-
bulkDelete:
|
|
299
|
-
|
|
300
|
-
confirmDeleteOption: string;
|
|
301
|
-
confirmationMessageBody: string;
|
|
302
|
-
confirmationMessageTitle: string;
|
|
303
|
-
isAccessible: boolean;
|
|
304
|
-
value: string;
|
|
305
|
-
};
|
|
306
|
-
delete: {
|
|
307
|
-
cancelDeleteOption: string;
|
|
308
|
-
confirmDeleteOption: string;
|
|
309
|
-
confirmationMessageBody: string;
|
|
310
|
-
confirmationMessageTitle: string;
|
|
311
|
-
isAccessible: boolean;
|
|
312
|
-
value: string;
|
|
313
|
-
};
|
|
305
|
+
bulkDelete: IDeleteActionMin;
|
|
306
|
+
delete: IDeleteActionMin;
|
|
314
307
|
edit: IActionMin;
|
|
315
308
|
new: IActionMin;
|
|
316
309
|
show: IActionMin;
|
|
@@ -333,11 +326,18 @@ interface IExtarAction {
|
|
|
333
326
|
name: string;
|
|
334
327
|
severity?: Severity;
|
|
335
328
|
message?: string;
|
|
329
|
+
guardTitle?: string;
|
|
336
330
|
}
|
|
337
331
|
interface IActionMin {
|
|
338
332
|
isAccessible: boolean;
|
|
339
333
|
value: string;
|
|
340
334
|
}
|
|
335
|
+
interface IDeleteActionMin extends IActionMin {
|
|
336
|
+
cancelDeleteOption: string;
|
|
337
|
+
confirmDeleteOption: string;
|
|
338
|
+
confirmationMessageBody: string;
|
|
339
|
+
confirmationMessageTitle: string;
|
|
340
|
+
}
|
|
341
341
|
type orderTypes = 'asc' | 'desc';
|
|
342
342
|
type Severity = 'success' | 'info' | 'warning' | 'error';
|
|
343
343
|
interface ISchemaObject {
|
|
@@ -372,6 +372,7 @@ type ResourceResponse = {
|
|
|
372
372
|
declare const ResourcesContext: react.Context<{
|
|
373
373
|
resources: ResourceResponse;
|
|
374
374
|
getResources: () => void;
|
|
375
|
+
state: RequestState;
|
|
375
376
|
}>;
|
|
376
377
|
interface ResourcesContextConfig {
|
|
377
378
|
resourcesUrl: string;
|
|
@@ -433,11 +434,11 @@ declare const CredentialsContextProvider: (props: CredentialProps) => react_jsx_
|
|
|
433
434
|
interface ISnackMessageProps {
|
|
434
435
|
state: boolean;
|
|
435
436
|
message?: string | undefined;
|
|
436
|
-
severity?: AlertColor | undefined;
|
|
437
|
+
severity?: AlertColor$1 | undefined;
|
|
437
438
|
position?: SnackbarOrigin;
|
|
438
439
|
}
|
|
439
440
|
declare const SnackAlertContext: react.Context<{
|
|
440
|
-
setAlert: (message: string, severity: AlertColor, position?: SnackbarOrigin) => void;
|
|
441
|
+
setAlert: (message: string, severity: AlertColor$1, position?: SnackbarOrigin) => void;
|
|
441
442
|
setErrorAlert: (message: string, position?: SnackbarOrigin) => void;
|
|
442
443
|
setSuccessAlert: (message: string, position?: SnackbarOrigin) => void;
|
|
443
444
|
}>;
|
|
@@ -449,6 +450,7 @@ declare function SnackAlertProvider({ children }: SnackAlertProviderProps): reac
|
|
|
449
450
|
declare const useResources: () => {
|
|
450
451
|
resources: ResourceResponse;
|
|
451
452
|
getResources: () => void;
|
|
453
|
+
state: RequestState;
|
|
452
454
|
};
|
|
453
455
|
|
|
454
456
|
declare const useCredentials: () => CredentialKeys;
|