@bigbinary/neeto-team-members-frontend 4.5.26 → 4.5.27
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/package.json +1 -1
- package/types.d.ts +51 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-team-members-frontend",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.27",
|
|
4
4
|
"description": "A repo acts as the source of truth for the new nano's structure, configs, data etc.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-team-members-nano",
|
package/types.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
2
|
import type { ButtonProps } from "@bigbinary/neetoui";
|
|
4
|
-
import { UseQueryResult } from "react-query";
|
|
5
|
-
import
|
|
3
|
+
import type { UseQueryResult } from "react-query";
|
|
4
|
+
import type { AxiosResponse } from "axios";
|
|
6
5
|
|
|
7
6
|
type Member = {
|
|
8
7
|
active: boolean;
|
|
@@ -10,6 +9,51 @@ type Member = {
|
|
|
10
9
|
name: string;
|
|
11
10
|
};
|
|
12
11
|
|
|
12
|
+
type Group = {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
userIds?: string[];
|
|
17
|
+
members?: Member[];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
type GroupDependency = {
|
|
21
|
+
isCheckEnabled?: boolean;
|
|
22
|
+
verificationStatus?: "successful" | "failed" | "pending";
|
|
23
|
+
isDependent?: boolean;
|
|
24
|
+
selectedGroup?: Group;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type GroupFormConfig = {
|
|
28
|
+
initialValues?: object;
|
|
29
|
+
validationSchema?: object;
|
|
30
|
+
otherPayloadData?: (values: object) => object;
|
|
31
|
+
otherElements?: (values: object) => JSX.Element;
|
|
32
|
+
otherElementsAtLast?: (values: object) => JSX.Element;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
type GroupTableConfig = {
|
|
36
|
+
columnsData?: () => object[];
|
|
37
|
+
deleteAlertMessage?: (group: Group) => string | JSX.Element;
|
|
38
|
+
onBeforeDelete?: (group: Group) => void;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
type GroupHeaderConfig = {
|
|
42
|
+
breadcrumbs?: Breadcrumb[];
|
|
43
|
+
titleHelpPopoverProps?: object;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
type GroupsConfig = {
|
|
47
|
+
header?: GroupHeaderConfig;
|
|
48
|
+
table?: GroupTableConfig;
|
|
49
|
+
form?: GroupFormConfig;
|
|
50
|
+
pane?: {
|
|
51
|
+
isLoading?: boolean;
|
|
52
|
+
};
|
|
53
|
+
groupDependency?: GroupDependency;
|
|
54
|
+
noDataProps?: object;
|
|
55
|
+
};
|
|
56
|
+
|
|
13
57
|
type Permission = {
|
|
14
58
|
create: boolean;
|
|
15
59
|
delete: boolean;
|
|
@@ -171,6 +215,8 @@ export function TeamMembers(props: { config?: TeamMembersConfig }): JSX.Element;
|
|
|
171
215
|
|
|
172
216
|
export function Roles(props: { config?: RolesConfig }): JSX.Element;
|
|
173
217
|
|
|
218
|
+
export function Groups(props: { config?: GroupsConfig }): JSX.Element;
|
|
219
|
+
|
|
174
220
|
export function refetchMembers(): void;
|
|
175
221
|
|
|
176
222
|
export function useFetchMembers(
|
|
@@ -224,20 +270,15 @@ export const MANAGE_ROLES_PERMISSION: string;
|
|
|
224
270
|
export const VIEW_MEMBERS_PERMISSION: string;
|
|
225
271
|
export const VIEW_ROLES_PERMISSION: string;
|
|
226
272
|
|
|
227
|
-
type
|
|
273
|
+
type PermissionRecord = {
|
|
228
274
|
category: string;
|
|
229
275
|
description: string;
|
|
230
276
|
id: string;
|
|
231
277
|
name: string;
|
|
232
278
|
};
|
|
233
279
|
|
|
234
|
-
type PermissionRelation = {
|
|
235
|
-
children: Array<string>;
|
|
236
|
-
uncheckOnSelect?: Array<string>;
|
|
237
|
-
};
|
|
238
|
-
|
|
239
280
|
export function Permissions(props: {
|
|
240
|
-
permissions: Array<
|
|
281
|
+
permissions: Array<PermissionRecord>;
|
|
241
282
|
isDisabled?: boolean;
|
|
242
283
|
permissionRelationConfig?: Object<PermissionRelation>;
|
|
243
284
|
});
|