@bigbinary/neeto-team-members-frontend 2.2.11 → 2.3.2
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 +30 -70
- package/dist/index.cjs.js +414 -959
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +411 -956
- package/dist/index.esm.js.map +1 -1
- package/package.json +20 -18
- package/types.d.ts +59 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-team-members-frontend",
|
|
3
|
-
"version": "2.2
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "To manage team members across neeto products.",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-team-members-frontend#readme",
|
|
7
7
|
"bugs": {
|
|
8
8
|
"url": "https://github.com/bigbinary/neeto-team-members-frontend/issues"
|
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
"repository": "github:bigbinary/neeto-team-members-frontend",
|
|
11
11
|
"author": "BigBinary",
|
|
12
12
|
"files": [
|
|
13
|
-
"dist"
|
|
13
|
+
"dist",
|
|
14
|
+
"types.d.ts"
|
|
14
15
|
],
|
|
15
16
|
"main": "dist/index.cjs.js",
|
|
16
17
|
"module": "dist/index.esm.js",
|
|
18
|
+
"types": "types.d.ts",
|
|
17
19
|
"scripts": {
|
|
18
20
|
"build": "NODE_ENV=production rollup -c --environment production",
|
|
19
21
|
"dev": "(trap 'kill 0' SIGINT; yarn start & yarn server)",
|
|
@@ -40,16 +42,16 @@
|
|
|
40
42
|
"@babel/core": "7.18.13",
|
|
41
43
|
"@babel/eslint-parser": "7.18.9",
|
|
42
44
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
45
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
|
|
46
|
+
"@babel/plugin-proposal-numeric-separator": "7.18.6",
|
|
43
47
|
"@babel/plugin-transform-runtime": "7.18.10",
|
|
44
48
|
"@babel/preset-env": "7.18.10",
|
|
45
49
|
"@babel/preset-react": "7.18.6",
|
|
46
50
|
"@babel/runtime": "7.18.9",
|
|
47
|
-
"@bigbinary/eslint-plugin-neeto": "1.0.
|
|
48
|
-
"@bigbinary/neeto-commons-frontend": "2.0.5",
|
|
51
|
+
"@bigbinary/eslint-plugin-neeto": "1.0.12",
|
|
49
52
|
"@bigbinary/neeto-icons": "1.8.37",
|
|
50
|
-
"@bigbinary/neetoui": "3.5.
|
|
51
|
-
"@faker-js/faker": "7.
|
|
52
|
-
"@honeybadger-io/react": "2.1.0",
|
|
53
|
+
"@bigbinary/neetoui": "3.5.17",
|
|
54
|
+
"@faker-js/faker": "7.5.0",
|
|
53
55
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.7",
|
|
54
56
|
"@rollup/plugin-alias": "3.1.9",
|
|
55
57
|
"@rollup/plugin-babel": "5.3.1",
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
59
61
|
"@rollup/plugin-replace": "4.0.0",
|
|
60
62
|
"@svgr/rollup": "6.3.1",
|
|
61
|
-
"antd": "4.22.
|
|
63
|
+
"antd": "4.22.8",
|
|
62
64
|
"axios": "0.27.2",
|
|
63
65
|
"babel-loader": "8.2.5",
|
|
64
66
|
"babel-plugin-macros": "3.1.0",
|
|
@@ -66,16 +68,16 @@
|
|
|
66
68
|
"classnames": "2.3.1",
|
|
67
69
|
"clean-webpack-plugin": "4.0.0",
|
|
68
70
|
"css-loader": "6.7.1",
|
|
69
|
-
"dotenv": "16.0.
|
|
70
|
-
"eslint": "8.
|
|
71
|
+
"dotenv": "16.0.2",
|
|
72
|
+
"eslint": "8.23.0",
|
|
71
73
|
"eslint-config-prettier": "8.5.0",
|
|
72
74
|
"eslint-plugin-cypress": "2.12.1",
|
|
73
75
|
"eslint-plugin-import": "2.26.0",
|
|
74
76
|
"eslint-plugin-jam3": "0.2.3",
|
|
75
77
|
"eslint-plugin-json": "3.1.0",
|
|
76
78
|
"eslint-plugin-prettier": "4.2.1",
|
|
77
|
-
"eslint-plugin-promise": "6.0.
|
|
78
|
-
"eslint-plugin-react": "7.
|
|
79
|
+
"eslint-plugin-promise": "6.0.1",
|
|
80
|
+
"eslint-plugin-react": "7.31.1",
|
|
79
81
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
80
82
|
"eslint-plugin-unicorn": "43.0.2",
|
|
81
83
|
"eslint-plugin-unused-imports": "2.0.0",
|
|
@@ -99,7 +101,7 @@
|
|
|
99
101
|
"react": "17.0.2",
|
|
100
102
|
"react-dom": "17.0.2",
|
|
101
103
|
"react-dropzone": "14.2.2",
|
|
102
|
-
"react-i18next": "11.18.
|
|
104
|
+
"react-i18next": "11.18.5",
|
|
103
105
|
"react-query": "3.39.2",
|
|
104
106
|
"react-refresh": "0.14.0",
|
|
105
107
|
"react-router-dom": "5.3.3",
|
|
@@ -107,23 +109,23 @@
|
|
|
107
109
|
"react-scroll-sync": "0.11.0",
|
|
108
110
|
"react-timer-hook": "3.0.5",
|
|
109
111
|
"react-toastify": "9.0.8",
|
|
110
|
-
"rollup": "2.
|
|
112
|
+
"rollup": "2.79.0",
|
|
111
113
|
"rollup-plugin-analyzer": "4.0.0",
|
|
112
114
|
"rollup-plugin-cleaner": "1.0.0",
|
|
113
115
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
114
116
|
"rollup-plugin-styles": "4.0.0",
|
|
115
|
-
"sass": "1.54.
|
|
117
|
+
"sass": "1.54.8",
|
|
116
118
|
"sass-loader": "13.0.2",
|
|
117
119
|
"style-loader": "3.3.1",
|
|
118
120
|
"uuid": "8.3.2",
|
|
119
121
|
"webpack": "5.74.0",
|
|
120
122
|
"webpack-cli": "4.10.0",
|
|
121
|
-
"webpack-dev-server": "4.10.
|
|
123
|
+
"webpack-dev-server": "4.10.1",
|
|
122
124
|
"yup": "0.32.11"
|
|
123
125
|
},
|
|
124
126
|
"peerDependencies": {
|
|
125
127
|
"@bigbinary/neeto-icons": "1.8.37",
|
|
126
|
-
"@bigbinary/neetoui": "3.5.
|
|
128
|
+
"@bigbinary/neetoui": "3.5.17",
|
|
127
129
|
"axios": "0.27.2",
|
|
128
130
|
"classnames": "2.3.1",
|
|
129
131
|
"formik": "2.2.9",
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ButtonProps } from "@bigbinary/neetoui";
|
|
2
|
+
|
|
3
|
+
type IsEqual<T, U> =
|
|
4
|
+
(<G>() => G extends T ? 1 : 2) extends
|
|
5
|
+
(<G>() => G extends U ? 1 : 2) ? true : false;
|
|
6
|
+
|
|
7
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ?
|
|
8
|
+
never : (KeyType extends ExcludeType ? never : KeyType);
|
|
9
|
+
|
|
10
|
+
type Except<ObjectType, KeysType extends keyof ObjectType> = {
|
|
11
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type Only<ObjectType> = Except<ObjectType, null>;
|
|
15
|
+
|
|
16
|
+
type Member = {
|
|
17
|
+
name: string;
|
|
18
|
+
active: boolean;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
type Permission = {
|
|
22
|
+
create: boolean;
|
|
23
|
+
delete: boolean;
|
|
24
|
+
update: boolean;
|
|
25
|
+
view: boolean;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
interface Alert {
|
|
29
|
+
message?: (member: Only<Member>) => string;
|
|
30
|
+
title?: (member: Only<Member>) => string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type Breadcrumb = {
|
|
34
|
+
text: string;
|
|
35
|
+
link: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type Header = { breadcrumbs: Breadcrumb[]; };
|
|
39
|
+
|
|
40
|
+
type TeamMembersConfig = {
|
|
41
|
+
alert?: Only<Alert>;
|
|
42
|
+
permissions: Except<Permission, "delete">;
|
|
43
|
+
rolesButtonProps?: ButtonProps;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
type RolesConfig = {
|
|
47
|
+
header?: Only<Header>;
|
|
48
|
+
permissions: Only<Permission>;
|
|
49
|
+
membersPageUrl?: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export function TeamMembers(props: {
|
|
53
|
+
config?: Only<TeamMembersConfig>;
|
|
54
|
+
metaName?: "metaNames.member" | "metaNames.agent";
|
|
55
|
+
}): JSX.Element;
|
|
56
|
+
|
|
57
|
+
export function Roles(props: { config?: RolesConfig; }): JSX.Element;
|
|
58
|
+
|
|
59
|
+
export function hasPermission(permissions: string[] | string): boolean;
|