@bigbinary/neeto-team-members-frontend 2.5.5 → 2.5.6
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/README.md +2 -2
- package/dist/index.cjs.js +250 -167
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +251 -168
- package/dist/index.esm.js.map +1 -1
- package/package.json +15 -17
- package/types.d.ts +58 -33
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-team-members-frontend",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.6",
|
|
4
4
|
"description": "To manage team members across neeto products.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-team-members-frontend#readme",
|
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
"@babel/plugin-transform-runtime": "7.19.6",
|
|
48
48
|
"@babel/preset-env": "7.20.2",
|
|
49
49
|
"@babel/preset-react": "7.18.6",
|
|
50
|
-
"@babel/runtime": "7.20.
|
|
50
|
+
"@babel/runtime": "7.20.13",
|
|
51
51
|
"@bigbinary/eslint-plugin-neeto": "1.0.16",
|
|
52
|
-
"@bigbinary/neeto-commons-frontend": "2.0.
|
|
53
|
-
"@bigbinary/neeto-filters-frontend": "2.
|
|
54
|
-
"@bigbinary/neeto-icons": "1.9.
|
|
55
|
-
"@bigbinary/neetoui": "4.
|
|
52
|
+
"@bigbinary/neeto-commons-frontend": "2.0.27",
|
|
53
|
+
"@bigbinary/neeto-filters-frontend": "2.4.0",
|
|
54
|
+
"@bigbinary/neeto-icons": "1.9.2",
|
|
55
|
+
"@bigbinary/neetoui": "4.2.0",
|
|
56
56
|
"@faker-js/faker": "7.6.0",
|
|
57
|
-
"@honeybadger-io/js": "4.9.
|
|
58
|
-
"@honeybadger-io/react": "4.9.
|
|
59
|
-
"@rollup/plugin-alias": "4.0.
|
|
57
|
+
"@honeybadger-io/js": "4.9.3",
|
|
58
|
+
"@honeybadger-io/react": "4.9.3",
|
|
59
|
+
"@rollup/plugin-alias": "4.0.3",
|
|
60
60
|
"@rollup/plugin-babel": "6.0.3",
|
|
61
|
-
"@rollup/plugin-commonjs": "24.0.
|
|
61
|
+
"@rollup/plugin-commonjs": "24.0.1",
|
|
62
62
|
"@rollup/plugin-json": "6.0.0",
|
|
63
63
|
"@rollup/plugin-node-resolve": "15.0.1",
|
|
64
64
|
"@rollup/plugin-replace": "5.0.2",
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
"antd": "4.24.7",
|
|
68
68
|
"axios": "1.2.3",
|
|
69
69
|
"babel-plugin-macros": "3.1.0",
|
|
70
|
-
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
|
71
70
|
"classnames": "2.3.2",
|
|
72
71
|
"eslint": "8.32.0",
|
|
73
72
|
"eslint-config-prettier": "8.6.0",
|
|
@@ -89,7 +88,6 @@
|
|
|
89
88
|
"lint-staged": "13.1.0",
|
|
90
89
|
"pluralize": "8.0.0",
|
|
91
90
|
"prettier": "2.8.3",
|
|
92
|
-
"prop-types": "15.8.1",
|
|
93
91
|
"qs": "6.11.0",
|
|
94
92
|
"ramda": "0.28.0",
|
|
95
93
|
"react": "17.0.2",
|
|
@@ -113,11 +111,11 @@
|
|
|
113
111
|
"yup": "0.32.11"
|
|
114
112
|
},
|
|
115
113
|
"peerDependencies": {
|
|
116
|
-
"@bigbinary/neeto-commons-frontend": "2.0.
|
|
117
|
-
"@bigbinary/neeto-icons": "1.9.
|
|
118
|
-
"@bigbinary/neetoui": "4.
|
|
119
|
-
"@honeybadger-io/js": "4.9.
|
|
120
|
-
"@honeybadger-io/react": "4.9.
|
|
114
|
+
"@bigbinary/neeto-commons-frontend": "2.0.27",
|
|
115
|
+
"@bigbinary/neeto-icons": "1.9.2",
|
|
116
|
+
"@bigbinary/neetoui": "4.2.0",
|
|
117
|
+
"@honeybadger-io/js": "4.9.3",
|
|
118
|
+
"@honeybadger-io/react": "4.9.3",
|
|
121
119
|
"axios": "1.2.3",
|
|
122
120
|
"classnames": "2.3.2",
|
|
123
121
|
"formik": "2.2.9",
|
package/types.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ type Except<ObjectType, KeysType extends keyof ObjectType> = {
|
|
|
13
13
|
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
type Only<ObjectType> = Except<ObjectType,
|
|
16
|
+
type Only<ObjectType> = Except<ObjectType, never>
|
|
17
17
|
|
|
18
18
|
type Member = {
|
|
19
19
|
active: boolean;
|
|
@@ -56,17 +56,15 @@ type SelectedMember = {
|
|
|
56
56
|
role: string;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
type FilterProps = { [key: string]: string; }
|
|
60
|
-
|
|
61
59
|
type RowProps = { [key: string]: string[]; }
|
|
62
60
|
|
|
63
61
|
type TableProps = {
|
|
64
|
-
onRowSelect
|
|
62
|
+
onRowSelect?: (props: {
|
|
65
63
|
rows: RowProps;
|
|
66
64
|
resetSelectedRows: () => void;
|
|
67
65
|
rowData: object[];
|
|
68
66
|
}) => void;
|
|
69
|
-
onDropdownClick
|
|
67
|
+
onDropdownClick?: (props: {
|
|
70
68
|
handleUpdateRole: (props: { member: object }) => void;
|
|
71
69
|
handleUpdateStatus: (props: { member: object }) => void;
|
|
72
70
|
}) => void;
|
|
@@ -79,27 +77,54 @@ type MembersHeader = {
|
|
|
79
77
|
|
|
80
78
|
type DefaultBulkActions = "activate" | "deactivate" | "role"
|
|
81
79
|
|
|
80
|
+
type Categories = "ALL" | "ACTIVE" | "DEACTIVATED"
|
|
81
|
+
|
|
82
|
+
type SortDirection = "ascend" | "descend" | ""
|
|
83
|
+
|
|
84
|
+
type DefaultFilterValues = {
|
|
85
|
+
page?: number;
|
|
86
|
+
results?: number;
|
|
87
|
+
category?: Categories;
|
|
88
|
+
search?: string;
|
|
89
|
+
sortBy?: string;
|
|
90
|
+
sortDirection?: SortDirection;
|
|
91
|
+
neetoFilters?: object;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
type LabelValueObject = {
|
|
95
|
+
label: string;
|
|
96
|
+
value: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
type FilterColumns = {
|
|
100
|
+
key: string,
|
|
101
|
+
node: string,
|
|
102
|
+
label: string | (() => string),
|
|
103
|
+
type: string,
|
|
104
|
+
model: string,
|
|
105
|
+
values: LabelValueObject[] | (() => LabelValueObject[]),
|
|
106
|
+
};
|
|
107
|
+
|
|
82
108
|
type TeamMembersConfig = {
|
|
83
109
|
alert?: Only<Alert>;
|
|
84
110
|
bulkUpdateMembers?: Only<BulkUpdateMembers>;
|
|
85
111
|
createMember?: Only<CreateMember>;
|
|
86
|
-
defaultFilterValues?:
|
|
112
|
+
defaultFilterValues?: Only<DefaultFilterValues>;
|
|
87
113
|
fetchApiResponse?: (response: object) => void;
|
|
114
|
+
filterColumns?: FilterColumns[];
|
|
88
115
|
header?: Only<MembersHeader>;
|
|
89
116
|
hiddenBulkActions?: DefaultBulkActions[];
|
|
90
117
|
manageMember?: Only<ManageMember>;
|
|
91
118
|
otherBulkActions?: React.FC;
|
|
92
119
|
otherColumns?: object[];
|
|
93
|
-
otherFilterProps?: Only<FilterProps>;
|
|
94
|
-
otherMenuElements?: React.FC;
|
|
95
120
|
permissions: Except<Permission, "delete">;
|
|
96
|
-
rolesButtonProps
|
|
121
|
+
rolesButtonProps: ButtonProps;
|
|
97
122
|
table?: TableProps;
|
|
98
|
-
updateMember
|
|
123
|
+
updateMember?: Only<UpdateMember>;
|
|
99
124
|
};
|
|
100
125
|
|
|
101
126
|
type RolesConfig = {
|
|
102
|
-
header
|
|
127
|
+
header: Only<Header>;
|
|
103
128
|
helpUrl?: string;
|
|
104
129
|
permissions: Only<Permission>;
|
|
105
130
|
};
|
|
@@ -107,33 +132,33 @@ type RolesConfig = {
|
|
|
107
132
|
type PopupComponentProps = {
|
|
108
133
|
className?: string;
|
|
109
134
|
children?: React.ReactNode;
|
|
110
|
-
}
|
|
135
|
+
};
|
|
111
136
|
|
|
112
137
|
type Role = {
|
|
113
|
-
description
|
|
114
|
-
id: string
|
|
115
|
-
kind: string
|
|
116
|
-
name: string
|
|
117
|
-
organizationId: string
|
|
118
|
-
permissionIds: string[]
|
|
119
|
-
}
|
|
138
|
+
description?: string;
|
|
139
|
+
id: string;
|
|
140
|
+
kind: string;
|
|
141
|
+
name: string;
|
|
142
|
+
organizationId: string;
|
|
143
|
+
permissionIds: string[];
|
|
144
|
+
};
|
|
120
145
|
|
|
121
146
|
type ManageMemberComponentProps = PopupComponentProps | React.HTMLAttributes<HTMLDivElement>
|
|
122
147
|
|
|
123
148
|
type ManageMemberOverlayProps = {
|
|
124
|
-
type?: "pane" | "modal" | "page"
|
|
125
|
-
isOpen: boolean
|
|
126
|
-
className?: string
|
|
127
|
-
headerProps?: ManageMemberComponentProps
|
|
128
|
-
bodyProps?: ManageMemberComponentProps
|
|
129
|
-
footerProps?: ManageMemberComponentProps
|
|
149
|
+
type?: "pane" | "modal" | "page";
|
|
150
|
+
isOpen: boolean;
|
|
151
|
+
className?: string;
|
|
152
|
+
headerProps?: ManageMemberComponentProps;
|
|
153
|
+
bodyProps?: ManageMemberComponentProps;
|
|
154
|
+
footerProps?: ManageMemberComponentProps;
|
|
130
155
|
}
|
|
131
156
|
|
|
132
157
|
type ManageMemberFormProps = Omit<ManageMemberOverlayProps, "isOpen">;
|
|
133
158
|
|
|
134
159
|
export function TeamMembers(props: { config?: Only<TeamMembersConfig>; }): JSX.Element;
|
|
135
160
|
|
|
136
|
-
export function Roles(props: { config?: RolesConfig
|
|
161
|
+
export function Roles(props: { config?: Only<RolesConfig>; }): JSX.Element;
|
|
137
162
|
|
|
138
163
|
export function hasPermission(permissions: string[] | string): boolean;
|
|
139
164
|
|
|
@@ -145,11 +170,11 @@ export function MultipleEmailInput(props: {
|
|
|
145
170
|
}): JSX.Element;
|
|
146
171
|
|
|
147
172
|
export function ManageMember(props: {
|
|
148
|
-
config?: Only<TeamMembersConfig
|
|
149
|
-
onComplete: () => void
|
|
150
|
-
roles: Role[]
|
|
151
|
-
selectedMember
|
|
152
|
-
componentConfig
|
|
173
|
+
config?: Only<TeamMembersConfig>;
|
|
174
|
+
onComplete: () => void;
|
|
175
|
+
roles: Role[];
|
|
176
|
+
selectedMember?: SelectedMember;
|
|
177
|
+
componentConfig?: ManageMemberOverlayProps | ManageMemberFormProps;
|
|
153
178
|
}): JSX.Element;
|
|
154
179
|
|
|
155
180
|
export function RolesRadioGroup(props: {
|
|
@@ -158,6 +183,6 @@ export function RolesRadioGroup(props: {
|
|
|
158
183
|
}): JSX.Element;
|
|
159
184
|
|
|
160
185
|
export const VALIDATION_SCHEMA: {
|
|
161
|
-
MULTIPLE_EMAIL_INPUT: any
|
|
162
|
-
ROLES_RADIO_GROUP: any
|
|
186
|
+
MULTIPLE_EMAIL_INPUT: any;
|
|
187
|
+
ROLES_RADIO_GROUP: any;
|
|
163
188
|
};
|