identity-admin-ui 1.5.15 → 1.5.17

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.
@@ -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;
@@ -9,6 +10,8 @@ export interface IBulkActionsDialogState {
9
10
  fullScreen: boolean;
10
11
  setSelected: (value: React.SetStateAction<GridRowSelectionModel>) => void;
11
12
  documentIds: string[];
13
+ afterExecuteMessage: string;
14
+ severity: AlertColor;
12
15
  }
13
16
  interface BulkActionDialogProps {
14
17
  bulkActionsDialogState: {
@@ -1,7 +1,4 @@
1
- export interface INextPrevious {
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
  }
9
+ export interface INextPrevious extends INextpreviousExtras {
10
+ recordId: string;
11
+ modelPath: string;
12
+ path?: any;
13
+ }
12
14
  export declare function NextPreviousButtons({ path, modelPath, onNoNextText, onNoPreviousText, recordId, nextButtonTitle, previousButtonTitle, 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
- cancelDeleteOption: string;
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
- export interface ShowRecordProps {
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;
@@ -1,4 +1,5 @@
1
1
  export declare const useResources: () => {
2
2
  resources: import("../context").ResourceResponse;
3
3
  getResources: () => void;
4
+ state: import("./RequetState").RequestState;
4
5
  };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- export interface ICreateEdit {
2
+ import { INextpreviousExtras } from '../components/Buttons/NextPreviousButtons';
3
+ export interface ICreateEdit extends INextpreviousExtras {
3
4
  isEdit: boolean;
4
5
  modelRoute: string;
5
6
  key?: string;
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;
@@ -68,6 +68,8 @@ interface IBulkActionsDialogState {
68
68
  fullScreen: boolean;
69
69
  setSelected: (value: React.SetStateAction<GridRowSelectionModel>) => void;
70
70
  documentIds: string[];
71
+ afterExecuteMessage: string;
72
+ severity: AlertColor;
71
73
  }
72
74
 
73
75
  type IBulkActionComponent = (bulkActionsDialogState: {
@@ -90,19 +92,22 @@ interface IListRecordsProps extends IListProps {
90
92
  bulkActionsComponents?: IBulkActionComponent;
91
93
  }
92
94
 
95
+ type AlertColor = 'success' | 'info' | 'warning' | 'error';
93
96
  declare function ListRecords(props: IListRecordsProps): react_jsx_runtime.JSX.Element;
94
97
 
95
- interface ShowRecordProps {
96
- key?: string;
97
- path: string;
98
- modelRoute: string;
99
- enableNextPreviousButtons?: boolean;
100
- previousButtonTitle?: string;
101
- nextButtonTitle?: string;
98
+ interface INextpreviousExtras {
102
99
  onNoNextText?: string;
103
100
  onNoPreviousText?: string;
101
+ previousButtonTitle?: string;
102
+ nextButtonTitle?: string;
104
103
  onClickNext?: (currentRecordId?: string) => void;
105
104
  onClickPrevious?: (currentRecordId?: string) => void;
105
+ }
106
+
107
+ interface ShowRecordProps extends INextpreviousExtras {
108
+ key?: string;
109
+ path: string;
110
+ modelRoute: string;
106
111
  Component?: (props: any) => JSX.Element;
107
112
  HeadingView?: (props: any) => JSX.Element;
108
113
  Actions?: (props: any) => JSX.Element;
@@ -112,7 +117,7 @@ interface ShowRecordProps {
112
117
 
113
118
  declare function ShowRecord(props: ShowRecordProps): react_jsx_runtime.JSX.Element;
114
119
 
115
- interface ICreateEdit {
120
+ interface ICreateEdit extends INextpreviousExtras {
116
121
  isEdit: boolean;
117
122
  modelRoute: string;
118
123
  key?: string;
@@ -268,6 +273,9 @@ interface IMainProperty {
268
273
  model: {
269
274
  [key: string]: ISchemaObject;
270
275
  };
276
+ disableNextPreviousButtonsInShowPage?: boolean;
277
+ disableNextPreviousButtonsInEditPage?: boolean;
278
+ displayEditPageInShowPage?: boolean;
271
279
  }
272
280
  interface IParent {
273
281
  icon: string;
@@ -294,22 +302,8 @@ interface IFilter {
294
302
  };
295
303
  }
296
304
  interface IAction {
297
- bulkDelete: {
298
- cancelDeleteOption: string;
299
- confirmDeleteOption: string;
300
- confirmationMessageBody: string;
301
- confirmationMessageTitle: string;
302
- isAccessible: boolean;
303
- value: string;
304
- };
305
- delete: {
306
- cancelDeleteOption: string;
307
- confirmDeleteOption: string;
308
- confirmationMessageBody: string;
309
- confirmationMessageTitle: string;
310
- isAccessible: boolean;
311
- value: string;
312
- };
305
+ bulkDelete: IDeleteActionMin;
306
+ delete: IDeleteActionMin;
313
307
  edit: IActionMin;
314
308
  new: IActionMin;
315
309
  show: IActionMin;
@@ -332,11 +326,18 @@ interface IExtarAction {
332
326
  name: string;
333
327
  severity?: Severity;
334
328
  message?: string;
329
+ guardTitle?: string;
335
330
  }
336
331
  interface IActionMin {
337
332
  isAccessible: boolean;
338
333
  value: string;
339
334
  }
335
+ interface IDeleteActionMin extends IActionMin {
336
+ cancelDeleteOption: string;
337
+ confirmDeleteOption: string;
338
+ confirmationMessageBody: string;
339
+ confirmationMessageTitle: string;
340
+ }
340
341
  type orderTypes = 'asc' | 'desc';
341
342
  type Severity = 'success' | 'info' | 'warning' | 'error';
342
343
  interface ISchemaObject {
@@ -371,6 +372,7 @@ type ResourceResponse = {
371
372
  declare const ResourcesContext: react.Context<{
372
373
  resources: ResourceResponse;
373
374
  getResources: () => void;
375
+ state: RequestState;
374
376
  }>;
375
377
  interface ResourcesContextConfig {
376
378
  resourcesUrl: string;
@@ -432,11 +434,11 @@ declare const CredentialsContextProvider: (props: CredentialProps) => react_jsx_
432
434
  interface ISnackMessageProps {
433
435
  state: boolean;
434
436
  message?: string | undefined;
435
- severity?: AlertColor | undefined;
437
+ severity?: AlertColor$1 | undefined;
436
438
  position?: SnackbarOrigin;
437
439
  }
438
440
  declare const SnackAlertContext: react.Context<{
439
- setAlert: (message: string, severity: AlertColor, position?: SnackbarOrigin) => void;
441
+ setAlert: (message: string, severity: AlertColor$1, position?: SnackbarOrigin) => void;
440
442
  setErrorAlert: (message: string, position?: SnackbarOrigin) => void;
441
443
  setSuccessAlert: (message: string, position?: SnackbarOrigin) => void;
442
444
  }>;
@@ -448,6 +450,7 @@ declare function SnackAlertProvider({ children }: SnackAlertProviderProps): reac
448
450
  declare const useResources: () => {
449
451
  resources: ResourceResponse;
450
452
  getResources: () => void;
453
+ state: RequestState;
451
454
  };
452
455
 
453
456
  declare const useCredentials: () => CredentialKeys;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "identity-admin-ui",
3
- "version": "1.5.15",
3
+ "version": "1.5.17",
4
4
  "description": "Identity solutions UI package using for identity-admin dashboard",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/esm/index.js",