@bigbinary/neeto-team-members-frontend 2.5.5 → 2.5.7
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 +262 -171
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +263 -172
- package/dist/index.esm.js.map +1 -1
- package/package.json +19 -21
- package/types.d.ts +59 -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.7",
|
|
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,27 +47,26 @@
|
|
|
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.1
|
|
52
|
+
"@bigbinary/neeto-commons-frontend": "2.0.28",
|
|
53
|
+
"@bigbinary/neeto-filters-frontend": "2.4.0",
|
|
54
|
+
"@bigbinary/neeto-icons": "1.9.3",
|
|
55
|
+
"@bigbinary/neetoui": "4.2.1",
|
|
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",
|
|
65
65
|
"@svgr/rollup": "6.5.1",
|
|
66
66
|
"@vitejs/plugin-react": "3.0.1",
|
|
67
67
|
"antd": "4.24.7",
|
|
68
|
-
"axios": "1.2.
|
|
68
|
+
"axios": "1.2.5",
|
|
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,14 +88,13 @@
|
|
|
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",
|
|
96
94
|
"react-dom": "17.0.2",
|
|
97
95
|
"react-helmet": "6.1.0",
|
|
98
96
|
"react-i18next": "12.1.4",
|
|
99
|
-
"react-query": "3.39.
|
|
97
|
+
"react-query": "3.39.3",
|
|
100
98
|
"react-router-dom": "5.3.4",
|
|
101
99
|
"react-router-nav-prompt": "0.4.1",
|
|
102
100
|
"react-scroll-sync": "0.11.0",
|
|
@@ -113,19 +111,19 @@
|
|
|
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.1
|
|
119
|
-
"@honeybadger-io/js": "4.9.
|
|
120
|
-
"@honeybadger-io/react": "4.9.
|
|
121
|
-
"axios": "1.2.
|
|
114
|
+
"@bigbinary/neeto-commons-frontend": "2.0.28",
|
|
115
|
+
"@bigbinary/neeto-icons": "1.9.3",
|
|
116
|
+
"@bigbinary/neetoui": "4.2.1",
|
|
117
|
+
"@honeybadger-io/js": "4.9.3",
|
|
118
|
+
"@honeybadger-io/react": "4.9.3",
|
|
119
|
+
"axios": "1.2.5",
|
|
122
120
|
"classnames": "2.3.2",
|
|
123
121
|
"formik": "2.2.9",
|
|
124
122
|
"ramda": "0.28.0",
|
|
125
123
|
"react": "17.0.2",
|
|
126
124
|
"react-dom": "17.0.2",
|
|
127
125
|
"react-helmet": "6.1.0",
|
|
128
|
-
"react-query": "3.39.
|
|
126
|
+
"react-query": "3.39.3",
|
|
129
127
|
"react-router-dom": "5.3.4",
|
|
130
128
|
"react-toastify": "8.2.0",
|
|
131
129
|
"yup": "0.32.11"
|
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,55 @@ 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>;
|
|
113
|
+
excludedRoles?: string[];
|
|
87
114
|
fetchApiResponse?: (response: object) => void;
|
|
115
|
+
filterColumns?: FilterColumns[];
|
|
88
116
|
header?: Only<MembersHeader>;
|
|
89
117
|
hiddenBulkActions?: DefaultBulkActions[];
|
|
90
118
|
manageMember?: Only<ManageMember>;
|
|
91
119
|
otherBulkActions?: React.FC;
|
|
92
120
|
otherColumns?: object[];
|
|
93
|
-
otherFilterProps?: Only<FilterProps>;
|
|
94
|
-
otherMenuElements?: React.FC;
|
|
95
121
|
permissions: Except<Permission, "delete">;
|
|
96
|
-
rolesButtonProps
|
|
122
|
+
rolesButtonProps: ButtonProps;
|
|
97
123
|
table?: TableProps;
|
|
98
|
-
updateMember
|
|
124
|
+
updateMember?: Only<UpdateMember>;
|
|
99
125
|
};
|
|
100
126
|
|
|
101
127
|
type RolesConfig = {
|
|
102
|
-
header
|
|
128
|
+
header: Only<Header>;
|
|
103
129
|
helpUrl?: string;
|
|
104
130
|
permissions: Only<Permission>;
|
|
105
131
|
};
|
|
@@ -107,33 +133,33 @@ type RolesConfig = {
|
|
|
107
133
|
type PopupComponentProps = {
|
|
108
134
|
className?: string;
|
|
109
135
|
children?: React.ReactNode;
|
|
110
|
-
}
|
|
136
|
+
};
|
|
111
137
|
|
|
112
138
|
type Role = {
|
|
113
|
-
description
|
|
114
|
-
id: string
|
|
115
|
-
kind: string
|
|
116
|
-
name: string
|
|
117
|
-
organizationId: string
|
|
118
|
-
permissionIds: string[]
|
|
119
|
-
}
|
|
139
|
+
description?: string;
|
|
140
|
+
id: string;
|
|
141
|
+
kind: string;
|
|
142
|
+
name: string;
|
|
143
|
+
organizationId: string;
|
|
144
|
+
permissionIds: string[];
|
|
145
|
+
};
|
|
120
146
|
|
|
121
147
|
type ManageMemberComponentProps = PopupComponentProps | React.HTMLAttributes<HTMLDivElement>
|
|
122
148
|
|
|
123
149
|
type ManageMemberOverlayProps = {
|
|
124
|
-
type?: "pane" | "modal" | "page"
|
|
125
|
-
isOpen: boolean
|
|
126
|
-
className?: string
|
|
127
|
-
headerProps?: ManageMemberComponentProps
|
|
128
|
-
bodyProps?: ManageMemberComponentProps
|
|
129
|
-
footerProps?: ManageMemberComponentProps
|
|
150
|
+
type?: "pane" | "modal" | "page";
|
|
151
|
+
isOpen: boolean;
|
|
152
|
+
className?: string;
|
|
153
|
+
headerProps?: ManageMemberComponentProps;
|
|
154
|
+
bodyProps?: ManageMemberComponentProps;
|
|
155
|
+
footerProps?: ManageMemberComponentProps;
|
|
130
156
|
}
|
|
131
157
|
|
|
132
158
|
type ManageMemberFormProps = Omit<ManageMemberOverlayProps, "isOpen">;
|
|
133
159
|
|
|
134
160
|
export function TeamMembers(props: { config?: Only<TeamMembersConfig>; }): JSX.Element;
|
|
135
161
|
|
|
136
|
-
export function Roles(props: { config?: RolesConfig
|
|
162
|
+
export function Roles(props: { config?: Only<RolesConfig>; }): JSX.Element;
|
|
137
163
|
|
|
138
164
|
export function hasPermission(permissions: string[] | string): boolean;
|
|
139
165
|
|
|
@@ -145,11 +171,11 @@ export function MultipleEmailInput(props: {
|
|
|
145
171
|
}): JSX.Element;
|
|
146
172
|
|
|
147
173
|
export function ManageMember(props: {
|
|
148
|
-
config?: Only<TeamMembersConfig
|
|
149
|
-
onComplete: () => void
|
|
150
|
-
roles: Role[]
|
|
151
|
-
selectedMember
|
|
152
|
-
componentConfig
|
|
174
|
+
config?: Only<TeamMembersConfig>;
|
|
175
|
+
onComplete: () => void;
|
|
176
|
+
roles: Role[];
|
|
177
|
+
selectedMember?: SelectedMember;
|
|
178
|
+
componentConfig?: ManageMemberOverlayProps | ManageMemberFormProps;
|
|
153
179
|
}): JSX.Element;
|
|
154
180
|
|
|
155
181
|
export function RolesRadioGroup(props: {
|
|
@@ -158,6 +184,6 @@ export function RolesRadioGroup(props: {
|
|
|
158
184
|
}): JSX.Element;
|
|
159
185
|
|
|
160
186
|
export const VALIDATION_SCHEMA: {
|
|
161
|
-
MULTIPLE_EMAIL_INPUT: any
|
|
162
|
-
ROLES_RADIO_GROUP: any
|
|
187
|
+
MULTIPLE_EMAIL_INPUT: any;
|
|
188
|
+
ROLES_RADIO_GROUP: any;
|
|
163
189
|
};
|