@bigbinary/neeto-team-members-frontend 2.2.4

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 ADDED
@@ -0,0 +1,150 @@
1
+ # @bigbinary/neeto-team-members-frontend
2
+
3
+ ![npm](https://img.shields.io/npm/v/@bigbinary/neeto-team-members-frontend?color=greenyellow)
4
+ ![npm](https://img.shields.io/npm/dw/@bigbinary/neeto-team-members-frontend?color=greenyellow)
5
+
6
+ neetoTeamMembers is the library that manages team members across neeto products.
7
+
8
+ ## Installation
9
+
10
+ 1. **neetoTeamMembers** has a few peer dependencies that are required for the proper
11
+ functioning of the package. Install all the peer dependencies using the below
12
+ command:
13
+
14
+ ```zsh
15
+ yarn add @bigbinary/neeto-commons-frontend@2.0.1 @bigbinary/neeto-icons@1.8.37 @bigbinary/neetoui@3.5.15 axios@0.27.2 classnames@2.3.1 formik@2.2.9 ramda@0.28.0 react-router-dom@5.3.3 react-toastify@9.0.8 yup@0.32.11
16
+ ```
17
+
18
+ 2. Now install the latest **neetoTeamMembers** package using the below command:
19
+
20
+ ```zsh
21
+ yarn add @bigbinary/neeto-team-members-frontend@2.2.4
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ ```jsx
27
+ import React from "react";
28
+
29
+ import { Roles, TeamMembers } from "@bigbinary/neeto-team-members-frontend";
30
+ import { BrowserRouter, Redirect, Route, Switch } from "react-router-dom";
31
+ import { ToastContainer } from "react-toastify";
32
+
33
+ import SideBar from "./components/Common/SideBar";
34
+
35
+ const App = () => (
36
+ <BrowserRouter>
37
+ <div className="flex">
38
+ <SideBar />
39
+ <Switch>
40
+ <Route exact path="/members">
41
+ <TeamMembers config={MEMBERS_CONFIG} />
42
+ </Route>
43
+ <Route exact path="/roles">
44
+ <Roles config={ROLES_CONFIG} />
45
+ </Route>
46
+ </Switch>
47
+ </div>
48
+ <ToastContainer />
49
+ </BrowserRouter>
50
+ );
51
+
52
+ export default App;
53
+ ```
54
+
55
+ By default `TeamMembers` and `Roles` component will render without the config prop.
56
+
57
+ ## Configurations
58
+
59
+ ### `TeamMembers` component
60
+
61
+ Some of the configurations that are available for `TeamMembers` components are:
62
+
63
+ - To toggle the `Manage Roles` button visibility in the right sub-header, please provide the roles button props as below. It uses the same props as neetoUI `Button` component.
64
+
65
+ ```js
66
+ const MEMBERS_CONFIG = {
67
+ rolesButtonProps: {
68
+ to: "/roles",
69
+ },
70
+ };
71
+ ```
72
+
73
+ - To override the activation and deactivation alert box title or message, please use the below configuration.
74
+
75
+ ```js
76
+ const MEMBERS_CONFIG = {
77
+ alert: {
78
+ title: member =>
79
+ member.active ? "Deactivate member" : "Activate member",
80
+ message: member =>
81
+ member.active
82
+ ? `You are deactivating member ${member?.name}. Are you sure you want to proceed?`
83
+ : `You are activating member ${member?.name}. Are you sure you want to proceed?`,
84
+ },
85
+ }
86
+ ```
87
+
88
+ ### `Roles` component
89
+
90
+ Some of the configurations that are available for `Roles` components are:
91
+
92
+ - (Deprecated) To specify the location for the members page in the neetoUI Header component's breadcrumb, use the below configuration.
93
+
94
+ ```js
95
+ const ROLES_CONFIG = {
96
+ membersPageUrl: "/members",
97
+ };
98
+ ```
99
+
100
+ - To specify the neetoUI Header component's breadcrumb, use the below configuration.
101
+
102
+ ```js
103
+ const ROLES_CONFIG = {
104
+ header: {
105
+ breadcrumbs: [
106
+ {
107
+ text: "Settings",
108
+ link: "/settings",
109
+ },
110
+ ],
111
+ },
112
+ };
113
+ ```
114
+
115
+ ## Development
116
+
117
+ 1. Install all the dependencies by executing the following command
118
+
119
+ ```zsh
120
+ yarn install
121
+ ```
122
+
123
+ 2. See the changes in the example app by executing the following command:
124
+
125
+ ```zsh
126
+ yarn dev
127
+ ```
128
+
129
+ ## Building
130
+
131
+ The neetoTeamMembers package gets auto-published to NPM for every new merge to the
132
+ master branch. You can checkout the `publish` workflow in GitHub Actions to get a
133
+ live update.
134
+
135
+ ## Integrations
136
+
137
+ | Projects | Integrated | Projects | Integrated |
138
+ |--------------------| :----------------: |-----------------| :----------------: |
139
+ | neetoAnalytics | :white_check_mark: | neetoQuiz | :white_check_mark: |
140
+ | neetoCal | :white_check_mark: | neetoReplay | :white_check_mark: |
141
+ | neetoChangelog | :white_check_mark: | neetoRunner | :white_check_mark: |
142
+ | neetoCourse | :white_check_mark: | neetoStore | :white_check_mark: |
143
+ | neetoCRM | :white_check_mark: | neetoTestify | :white_check_mark: |
144
+ | neetoEngage | :white_check_mark: | neetoWheel | :white_check_mark: |
145
+ | neetoForm | :white_check_mark: | neetoWireframe | :white_check_mark: |
146
+ | neetoGrow | :white_check_mark: | neetoAuth | :x: |
147
+ | neetoInvisible | :white_check_mark: | neetoChat | :x: |
148
+ | neetoKB | :white_check_mark: | neetoDesk | :x: |
149
+ | neetoPlanner | :white_check_mark: | neetoInvoice | :x: |
150
+ | neetoPopups | :white_check_mark: | | |