@bigbinary/neeto-team-members-frontend 2.5.3 → 2.5.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 +2 -2
- package/dist/index.cjs.js +126 -53
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +128 -55
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -12,13 +12,13 @@ functioning of the package. Install all the peer dependencies using the below
|
|
|
12
12
|
command:
|
|
13
13
|
|
|
14
14
|
```zsh
|
|
15
|
-
yarn add @bigbinary/neeto-commons-frontend@2.0.
|
|
15
|
+
yarn add @bigbinary/neeto-commons-frontend@2.0.25 @bigbinary/neeto-icons@1.9.1 @bigbinary/neetoui@4.1.43 @honeybadger-io/js@4.8.2 @honeybadger-io/react@4.8.2 axios@1.2.2 classnames@2.3.2 formik@2.2.9 ramda@0.28.0 react-helmet@6.1.0 react-query@3.39.2 react-router-dom@5.3.3 react-toastify@8.2.0 yup@0.32.11
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
2. Now install the latest **neetoTeamMembers** package using the below command:
|
|
19
19
|
|
|
20
20
|
```zsh
|
|
21
|
-
yarn add @bigbinary/neeto-team-members-frontend@2.5.
|
|
21
|
+
yarn add @bigbinary/neeto-team-members-frontend@2.5.4
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Usage
|
package/dist/index.cjs.js
CHANGED
|
@@ -3715,6 +3715,7 @@ var buttons$1 = {
|
|
|
3715
3715
|
cancel: "Cancel",
|
|
3716
3716
|
changeRole: "Change role",
|
|
3717
3717
|
proceed: "Proceed",
|
|
3718
|
+
reset: "Reset",
|
|
3718
3719
|
saveChanges: "Save changes"
|
|
3719
3720
|
};
|
|
3720
3721
|
var columns$1 = {
|
|
@@ -3813,6 +3814,7 @@ var buttons = {
|
|
|
3813
3814
|
cancel: "Annuler",
|
|
3814
3815
|
changeRole: "Changer de rôle",
|
|
3815
3816
|
proceed: "Procéder",
|
|
3817
|
+
reset: "Réinitialiser",
|
|
3816
3818
|
saveChanges: "Sauvegarder les modifications"
|
|
3817
3819
|
};
|
|
3818
3820
|
var columns = {
|
|
@@ -4006,16 +4008,19 @@ const update$1 = (id, payload) => axios__default["default"].patch(`${BASE_URL}/o
|
|
|
4006
4008
|
const destroy = (id, payload) => axios__default["default"].delete(`${BASE_URL}/organization_roles/${id}`, {
|
|
4007
4009
|
data: payload
|
|
4008
4010
|
});
|
|
4011
|
+
const bulkUpdate$1 = payload => axios__default["default"].patch(`${BASE_URL}/organization_roles/bulk_update`, payload);
|
|
4009
4012
|
const organizationRolesApi = {
|
|
4010
|
-
|
|
4013
|
+
bulkUpdate: bulkUpdate$1,
|
|
4011
4014
|
create: create$1,
|
|
4012
|
-
|
|
4013
|
-
|
|
4015
|
+
destroy,
|
|
4016
|
+
fetch: fetch$1,
|
|
4017
|
+
update: update$1
|
|
4014
4018
|
};
|
|
4015
4019
|
|
|
4016
4020
|
const _excluded$2 = ["onSuccess"],
|
|
4017
4021
|
_excluded2$2 = ["onSuccess"],
|
|
4018
|
-
_excluded3$1 = ["onSuccess"]
|
|
4022
|
+
_excluded3$1 = ["onSuccess"],
|
|
4023
|
+
_excluded4 = ["onSuccess"];
|
|
4019
4024
|
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4020
4025
|
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4021
4026
|
const useFetchRoles = function () {
|
|
@@ -4087,6 +4092,19 @@ const useDestroyRole = _ref4 => {
|
|
|
4087
4092
|
}
|
|
4088
4093
|
}, options));
|
|
4089
4094
|
};
|
|
4095
|
+
const useBulkUpdateRoles = _ref6 => {
|
|
4096
|
+
let onSuccess = _ref6.onSuccess,
|
|
4097
|
+
options = _objectWithoutProperties(_ref6, _excluded4);
|
|
4098
|
+
return reactQuery.useMutation(organizationRolesApi.bulkUpdate, _objectSpread$7({
|
|
4099
|
+
onSuccess: response => {
|
|
4100
|
+
queryClient.invalidateQueries(QUERY_KEYS.TEAMS);
|
|
4101
|
+
queryClient.invalidateQueries(QUERY_KEYS.TEAMS_DEPENDENCIES);
|
|
4102
|
+
queryClient.invalidateQueries(QUERY_KEYS.ROLES);
|
|
4103
|
+
neetoui.Toastr.success(response.ntmNotice || response.data.ntmNotice);
|
|
4104
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
4105
|
+
}
|
|
4106
|
+
}, options));
|
|
4107
|
+
};
|
|
4090
4108
|
|
|
4091
4109
|
var distExports = {};
|
|
4092
4110
|
var dist = {
|
|
@@ -5466,22 +5484,6 @@ var dist = {
|
|
|
5466
5484
|
|
|
5467
5485
|
} (dist));
|
|
5468
5486
|
|
|
5469
|
-
const renderSearchProps = (searchString, setSearchString) => ({
|
|
5470
|
-
"data-cy": "ntm-search-roles-input",
|
|
5471
|
-
onChange: _ref => {
|
|
5472
|
-
let value = _ref.target.value;
|
|
5473
|
-
return setSearchString(value);
|
|
5474
|
-
},
|
|
5475
|
-
placeholder: instance.t("common.search_", {
|
|
5476
|
-
what: instance.t("common.role", PLURAL).toLocaleLowerCase()
|
|
5477
|
-
}),
|
|
5478
|
-
value: searchString
|
|
5479
|
-
});
|
|
5480
|
-
const renderBreadcrumbs = breadcrumbs => breadcrumbs !== null && breadcrumbs !== void 0 ? breadcrumbs : [{
|
|
5481
|
-
text: instance.t("metaNames.member", PLURAL),
|
|
5482
|
-
link: "/members"
|
|
5483
|
-
}];
|
|
5484
|
-
|
|
5485
5487
|
const AddRoleButton = _ref => {
|
|
5486
5488
|
var _permissions$create, _permissions$create2;
|
|
5487
5489
|
let onClick = _ref.onClick,
|
|
@@ -5502,9 +5504,28 @@ const AddRoleButton = _ref => {
|
|
|
5502
5504
|
})));
|
|
5503
5505
|
};
|
|
5504
5506
|
|
|
5507
|
+
const renderSearchProps = (searchString, setSearchString) => ({
|
|
5508
|
+
"data-cy": "ntm-search-roles-input",
|
|
5509
|
+
onChange: _ref => {
|
|
5510
|
+
let value = _ref.target.value;
|
|
5511
|
+
return setSearchString(value);
|
|
5512
|
+
},
|
|
5513
|
+
placeholder: instance.t("common.search_", {
|
|
5514
|
+
what: instance.t("common.role", PLURAL).toLocaleLowerCase()
|
|
5515
|
+
}),
|
|
5516
|
+
value: searchString
|
|
5517
|
+
});
|
|
5518
|
+
const renderBreadcrumbs = breadcrumbs => breadcrumbs !== null && breadcrumbs !== void 0 ? breadcrumbs : [{
|
|
5519
|
+
text: instance.t("metaNames.member", PLURAL),
|
|
5520
|
+
link: "/members"
|
|
5521
|
+
}];
|
|
5522
|
+
|
|
5505
5523
|
const Header$1 = _ref => {
|
|
5506
5524
|
var _config$header;
|
|
5507
5525
|
let config = _ref.config,
|
|
5526
|
+
handleReset = _ref.handleReset,
|
|
5527
|
+
handleSubmit = _ref.handleSubmit,
|
|
5528
|
+
isDirty = _ref.isDirty,
|
|
5508
5529
|
searchString = _ref.searchString,
|
|
5509
5530
|
setSearchString = _ref.setSearchString,
|
|
5510
5531
|
setIsNewRolePaneOpen = _ref.setIsNewRolePaneOpen;
|
|
@@ -5524,7 +5545,18 @@ const Header$1 = _ref => {
|
|
|
5524
5545
|
})),
|
|
5525
5546
|
breadcrumbs: renderBreadcrumbs(config === null || config === void 0 ? void 0 : (_config$header = config.header) === null || _config$header === void 0 ? void 0 : _config$header.breadcrumbs),
|
|
5526
5547
|
searchProps: renderSearchProps(searchString, setSearchString),
|
|
5527
|
-
actionBlock: /*#__PURE__*/e__default["default"].createElement(
|
|
5548
|
+
actionBlock: isDirty ? /*#__PURE__*/e__default["default"].createElement(e__default["default"].Fragment, null, /*#__PURE__*/e__default["default"].createElement(neetoui.Button, {
|
|
5549
|
+
"data-cy": "ntm-role-submission-button",
|
|
5550
|
+
onClick: handleSubmit,
|
|
5551
|
+
label: t("buttons.saveChanges"),
|
|
5552
|
+
type: "submit"
|
|
5553
|
+
}), /*#__PURE__*/e__default["default"].createElement(neetoui.Button, {
|
|
5554
|
+
"data-cy": "ntm-role-reset-button",
|
|
5555
|
+
label: t("buttons.reset"),
|
|
5556
|
+
onClick: handleReset,
|
|
5557
|
+
style: "text",
|
|
5558
|
+
type: "reset"
|
|
5559
|
+
})) : /*#__PURE__*/e__default["default"].createElement(AddRoleButton, {
|
|
5528
5560
|
onClick: () => setIsNewRolePaneOpen(true),
|
|
5529
5561
|
permissions: config === null || config === void 0 ? void 0 : config.permissions
|
|
5530
5562
|
}),
|
|
@@ -5532,17 +5564,6 @@ const Header$1 = _ref => {
|
|
|
5532
5564
|
});
|
|
5533
5565
|
};
|
|
5534
5566
|
|
|
5535
|
-
const getPermissionGroups = function () {
|
|
5536
|
-
let permissions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
5537
|
-
const groupedPermissions = ramda.groupBy(permission => permission === null || permission === void 0 ? void 0 : permission.category, permissions);
|
|
5538
|
-
const categories = Object.keys(groupedPermissions);
|
|
5539
|
-
categories.forEach(category => {
|
|
5540
|
-
groupedPermissions[category].permissions = groupedPermissions[category];
|
|
5541
|
-
groupedPermissions[category].isPermissionsVisible = true;
|
|
5542
|
-
});
|
|
5543
|
-
return groupedPermissions;
|
|
5544
|
-
};
|
|
5545
|
-
|
|
5546
5567
|
const transformObjectToDotNotation = function (object) {
|
|
5547
5568
|
let prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
5548
5569
|
let result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
@@ -5758,19 +5779,13 @@ const Row = _ref => {
|
|
|
5758
5779
|
config = _ref.config,
|
|
5759
5780
|
_ref$permission = _ref.permission,
|
|
5760
5781
|
permission = _ref$permission === void 0 ? null : _ref$permission,
|
|
5761
|
-
roles = _ref.roles
|
|
5762
|
-
|
|
5763
|
-
updateRole = _useUpdateRole.mutate;
|
|
5782
|
+
roles = _ref.roles,
|
|
5783
|
+
setModifiedRoles = _ref.setModifiedRoles;
|
|
5764
5784
|
const allPermissionIdsOfCategory = ramda.map(ramda.prop("id"), (allPermissionsOfCategory === null || allPermissionsOfCategory === void 0 ? void 0 : allPermissionsOfCategory.permissions) || []);
|
|
5765
5785
|
const handleSubmit = (role, checked) => {
|
|
5766
5786
|
const permissionIds = allPermissionIdsOfCategory.length > 0 ? allPermissionIdsOfCategory : [permission.id];
|
|
5767
5787
|
const modifiedRole = ramda.modify("permissionIds", () => checked ? removeDuplicates([...role.permissionIds, ...permissionIds]) : role.permissionIds.filter(id => !permissionIds.includes(id)), role);
|
|
5768
|
-
|
|
5769
|
-
id: role.id,
|
|
5770
|
-
payload: {
|
|
5771
|
-
organizationRole: modifiedRole
|
|
5772
|
-
}
|
|
5773
|
-
});
|
|
5788
|
+
setModifiedRoles(pure.replaceById(role.id, modifiedRole));
|
|
5774
5789
|
};
|
|
5775
5790
|
const isCheckboxChecked = role => !allPermissionsOfCategory ? ramda.includes(permission.id, role.permissionIds) : allPermissionIdsOfCategory.every(id => ramda.includes(id, role.permissionIds));
|
|
5776
5791
|
return /*#__PURE__*/e__default["default"].createElement("div", {
|
|
@@ -6004,6 +6019,7 @@ const Columns$1 = _ref => {
|
|
|
6004
6019
|
filteredGroupPermissions = _ref.filteredGroupPermissions,
|
|
6005
6020
|
filteredRoles = _ref.filteredRoles,
|
|
6006
6021
|
roles = _ref.roles,
|
|
6022
|
+
setModifiedRoles = _ref.setModifiedRoles,
|
|
6007
6023
|
setIsScrollPresent = _ref.setIsScrollPresent;
|
|
6008
6024
|
const _useState = e$1.useState(DEFAULT_MANAGE_ROLE_VALUES),
|
|
6009
6025
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -6030,11 +6046,13 @@ const Columns$1 = _ref => {
|
|
|
6030
6046
|
}, /*#__PURE__*/e__default["default"].createElement(Row, {
|
|
6031
6047
|
allPermissionsOfCategory: groupedPermissions,
|
|
6032
6048
|
config: config,
|
|
6049
|
+
setModifiedRoles: setModifiedRoles,
|
|
6033
6050
|
roles: filteredRoles
|
|
6034
6051
|
}), isPermissionsVisible && groupedPermissions.permissions.map((permission, permissionIndex) => /*#__PURE__*/e__default["default"].createElement(Row, {
|
|
6035
6052
|
config: config,
|
|
6036
6053
|
key: permissionIndex,
|
|
6037
6054
|
permission: permission,
|
|
6055
|
+
setModifiedRoles: setModifiedRoles,
|
|
6038
6056
|
roles: filteredRoles
|
|
6039
6057
|
})));
|
|
6040
6058
|
}))), /*#__PURE__*/e__default["default"].createElement(Edit, {
|
|
@@ -6158,6 +6176,7 @@ const Table = _ref => {
|
|
|
6158
6176
|
filteredRoles = _ref.filteredRoles,
|
|
6159
6177
|
permissionGroups = _ref.permissionGroups,
|
|
6160
6178
|
roles = _ref.roles,
|
|
6179
|
+
setModifiedRoles = _ref.setModifiedRoles,
|
|
6161
6180
|
setIsNewRolePaneOpen = _ref.setIsNewRolePaneOpen;
|
|
6162
6181
|
const _useTranslation = useTranslation(),
|
|
6163
6182
|
t = _useTranslation.t;
|
|
@@ -6215,12 +6234,36 @@ const Table = _ref => {
|
|
|
6215
6234
|
filteredGroupPermissions: filteredGroupPermissions,
|
|
6216
6235
|
filteredRoles: filteredRoles,
|
|
6217
6236
|
roles: roles,
|
|
6237
|
+
setModifiedRoles: setModifiedRoles,
|
|
6218
6238
|
setIsScrollPresent: setIsScrollPresent
|
|
6219
6239
|
}));
|
|
6220
6240
|
};
|
|
6221
6241
|
|
|
6242
|
+
const getPermissionGroups = function () {
|
|
6243
|
+
let permissions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
6244
|
+
const groupedPermissions = ramda.groupBy(permission => permission === null || permission === void 0 ? void 0 : permission.category, permissions);
|
|
6245
|
+
const categories = Object.keys(groupedPermissions);
|
|
6246
|
+
categories.forEach(category => {
|
|
6247
|
+
groupedPermissions[category].permissions = groupedPermissions[category];
|
|
6248
|
+
groupedPermissions[category].isPermissionsVisible = true;
|
|
6249
|
+
});
|
|
6250
|
+
return groupedPermissions;
|
|
6251
|
+
};
|
|
6252
|
+
const getModifiedPermissions = function () {
|
|
6253
|
+
let roles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
6254
|
+
let modifiedRoles = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
6255
|
+
return modifiedRoles.map(role => {
|
|
6256
|
+
const oldPermissions = pure.findById(role.id, roles).permissionIds;
|
|
6257
|
+
if (ramda.equals(oldPermissions, role.permissionIds)) return false;
|
|
6258
|
+
return {
|
|
6259
|
+
id: role.id,
|
|
6260
|
+
permissionIds: role.permissionIds
|
|
6261
|
+
};
|
|
6262
|
+
}).filter(Boolean);
|
|
6263
|
+
};
|
|
6264
|
+
|
|
6222
6265
|
const Roles = _ref => {
|
|
6223
|
-
var _config$permissions$v, _config$permissions, _config$permissions$v2, _config$permissions2;
|
|
6266
|
+
var _config$permissions$v, _config$permissions, _config$permissions$v2, _config$permissions2, _config$permissions$u, _config$permissions3;
|
|
6224
6267
|
let config = _ref.config;
|
|
6225
6268
|
const _useTranslation = useTranslation(),
|
|
6226
6269
|
t = _useTranslation.t;
|
|
@@ -6237,7 +6280,7 @@ const Roles = _ref => {
|
|
|
6237
6280
|
isNewRolePaneOpen = _useState6[0],
|
|
6238
6281
|
setIsNewRolePaneOpen = _useState6[1];
|
|
6239
6282
|
const _useFetchRoles = useFetchRoles({
|
|
6240
|
-
onSuccess: roles =>
|
|
6283
|
+
onSuccess: roles => setModifiedRoles(roles),
|
|
6241
6284
|
enabled: (_config$permissions$v = config === null || config === void 0 ? void 0 : (_config$permissions = config.permissions) === null || _config$permissions === void 0 ? void 0 : _config$permissions.view) !== null && _config$permissions$v !== void 0 ? _config$permissions$v : DEFAULT_PERMISSION
|
|
6242
6285
|
}),
|
|
6243
6286
|
roles = _useFetchRoles.data,
|
|
@@ -6247,13 +6290,31 @@ const Roles = _ref => {
|
|
|
6247
6290
|
}),
|
|
6248
6291
|
permissions = _useFetchPermissions.data,
|
|
6249
6292
|
isPermissionsLoading = _useFetchPermissions.isLoading;
|
|
6293
|
+
const _useBulkUpdateRoles = useBulkUpdateRoles({
|
|
6294
|
+
enabled: (_config$permissions$u = config === null || config === void 0 ? void 0 : (_config$permissions3 = config.permissions) === null || _config$permissions3 === void 0 ? void 0 : _config$permissions3.update) !== null && _config$permissions$u !== void 0 ? _config$permissions$u : DEFAULT_PERMISSION
|
|
6295
|
+
}),
|
|
6296
|
+
bulkUpdate = _useBulkUpdateRoles.mutate;
|
|
6297
|
+
const _useState7 = e$1.useState(roles),
|
|
6298
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
6299
|
+
modifiedRoles = _useState8[0],
|
|
6300
|
+
setModifiedRoles = _useState8[1];
|
|
6301
|
+
const isDirty = pure.isPresent(getModifiedPermissions(roles, modifiedRoles));
|
|
6250
6302
|
const permissionGroups = getPermissionGroups(permissions);
|
|
6251
6303
|
e$1.useEffect(() => {
|
|
6252
6304
|
setFilteredRoles(ramda.filter(_ref2 => {
|
|
6253
6305
|
let name = _ref2.name;
|
|
6254
6306
|
return ramda.includes(searchString.toLowerCase().trim(), name.toLowerCase().trim());
|
|
6255
|
-
},
|
|
6256
|
-
}, [
|
|
6307
|
+
}, modifiedRoles || []));
|
|
6308
|
+
}, [modifiedRoles, searchString]);
|
|
6309
|
+
const handleSubmit = () => {
|
|
6310
|
+
const updatedRoles = getModifiedPermissions(roles, modifiedRoles);
|
|
6311
|
+
bulkUpdate({
|
|
6312
|
+
organizationRoles: {
|
|
6313
|
+
updatedRoles
|
|
6314
|
+
}
|
|
6315
|
+
});
|
|
6316
|
+
};
|
|
6317
|
+
const handleReset = () => setModifiedRoles(roles);
|
|
6257
6318
|
if (isRolesLoading || isPermissionsLoading) {
|
|
6258
6319
|
return /*#__PURE__*/e__default["default"].createElement("div", {
|
|
6259
6320
|
className: "ntm-members-page-loader"
|
|
@@ -6263,6 +6324,9 @@ const Roles = _ref => {
|
|
|
6263
6324
|
isHeaderFixed: true
|
|
6264
6325
|
}, /*#__PURE__*/e__default["default"].createElement(Header$1, {
|
|
6265
6326
|
config: config,
|
|
6327
|
+
handleReset: handleReset,
|
|
6328
|
+
handleSubmit: handleSubmit,
|
|
6329
|
+
isDirty: isDirty,
|
|
6266
6330
|
searchString: searchString,
|
|
6267
6331
|
setSearchString: setSearchString,
|
|
6268
6332
|
setIsNewRolePaneOpen: setIsNewRolePaneOpen
|
|
@@ -6271,6 +6335,7 @@ const Roles = _ref => {
|
|
|
6271
6335
|
filteredRoles: filteredRoles,
|
|
6272
6336
|
permissionGroups: permissionGroups,
|
|
6273
6337
|
roles: roles,
|
|
6338
|
+
setModifiedRoles: setModifiedRoles,
|
|
6274
6339
|
setIsNewRolePaneOpen: setIsNewRolePaneOpen
|
|
6275
6340
|
}), (config === null || config === void 0 ? void 0 : config.helpUrl) && /*#__PURE__*/e__default["default"].createElement("div", {
|
|
6276
6341
|
className: "ntm-roles-help-url-wrapper"
|
|
@@ -7024,16 +7089,20 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
7024
7089
|
}
|
|
7025
7090
|
if (isMap(obj)) {
|
|
7026
7091
|
var mapParts = [];
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7092
|
+
if (mapForEach) {
|
|
7093
|
+
mapForEach.call(obj, function (value, key) {
|
|
7094
|
+
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
7095
|
+
});
|
|
7096
|
+
}
|
|
7030
7097
|
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
7031
7098
|
}
|
|
7032
7099
|
if (isSet(obj)) {
|
|
7033
7100
|
var setParts = [];
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7101
|
+
if (setForEach) {
|
|
7102
|
+
setForEach.call(obj, function (value) {
|
|
7103
|
+
setParts.push(inspect(value, obj));
|
|
7104
|
+
});
|
|
7105
|
+
}
|
|
7037
7106
|
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
7038
7107
|
}
|
|
7039
7108
|
if (isWeakMap(obj)) {
|
|
@@ -10016,7 +10085,11 @@ const TeamMembers = _ref => {
|
|
|
10016
10085
|
roles = _useFetchRoles.data,
|
|
10017
10086
|
isRolesLoading = _useFetchRoles.isLoading;
|
|
10018
10087
|
const _useUpdateMember = useUpdateMember({
|
|
10019
|
-
onSuccess: () =>
|
|
10088
|
+
onSuccess: () => {
|
|
10089
|
+
var _config$updateMember, _config$updateMember$;
|
|
10090
|
+
handleAlertClose();
|
|
10091
|
+
config === null || config === void 0 ? void 0 : (_config$updateMember = config.updateMember) === null || _config$updateMember === void 0 ? void 0 : (_config$updateMember$ = _config$updateMember.onSuccess) === null || _config$updateMember$ === void 0 ? void 0 : _config$updateMember$.callback();
|
|
10092
|
+
}
|
|
10020
10093
|
}),
|
|
10021
10094
|
updateMember = _useUpdateMember.mutate,
|
|
10022
10095
|
isUpdatingMember = _useUpdateMember.isLoading;
|
|
@@ -10225,7 +10298,7 @@ const VALIDATION_SCHEMA = {
|
|
|
10225
10298
|
|
|
10226
10299
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
10227
10300
|
|
|
10228
|
-
var css = ":root {\n --ntm-roles-table-default-scroll: 15px;\n --ntm-roles-table-cell-height: 68px;\n}\n\n.ntm-dropdown__button {\n border-radius: 0 !important;\n font-weight: var(--neeto-ui-font-normal);\n min-height: 34px;\n min-width: 150px;\n text-align: left;\n width: 100%;\n}\n\n.ntm-scrollbar__inner {\n width: 100%;\n height: 200px;\n}\n.ntm-scrollbar__outer {\n position: \"absolute\";\n top: 0px;\n left: 0px;\n width: 200px;\n height: 150px;\n overflow: \"hidden\";\n visibility: \"hidden\";\n}\n\n.ntm-empty-state {\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n width: 100%;\n}\n.ntm-empty-state__image {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 2rem;\n}\n.ntm-empty-state__title--with-action-block {\n margin-bottom: 1rem;\n}\n.ntm-empty-state__action-block {\n display: flex;\n justify-content: center;\n}\n\n.ntm-members {\n overflow: auto;\n width: 100%;\n}\n.ntm-members-wrapper {\n display: flex;\n}\n.ntm-members-page-loader {\n width: 100%;\n height: 100vh;\n}\n.ntm-members__table-wrapper {\n height: calc(100vh - 205px);\n width: 100%;\n}\n.ntm-members-table__column {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n.ntm-members-form__header {\n margin-bottom: 0.5rem;\n}\n.ntm-members-form__body {\n width: 100%;\n padding-bottom: 1rem;\n}\n.ntm-members-form__body > * + * {\n margin-top: 1rem;\n}\n.ntm-members-form__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-members-radio-group {\n width: 100%;\n}\n.ntm-members-radio-group .neeto-ui-radio__container--stacked {\n width: 100%;\n}\n.ntm-members-radio-group__label {\n padding-right: 4px;\n}\n.ntm-members-radio-group__icon {\n cursor: pointer;\n}\n\n.ntm-members-form-radio-item__wrapper {\n width: 100%;\n cursor: pointer;\n padding: 8px 0px !important;\n}\n.ntm-members-form-radio-item__wrapper:first-child {\n padding-top: 0px !important;\n}\n.ntm-members-form-radio-item__label {\n margin-bottom: 0 !important;\n}\n.ntm-members-form-radio-item__description {\n color: rgb(var(--neeto-ui-gray-700));\n}\n\n.ntm-roles-
|
|
10301
|
+
var css = ":root {\n --ntm-roles-table-default-scroll: 15px;\n --ntm-roles-table-cell-height: 68px;\n}\n\n.ntm-dropdown__button {\n border-radius: 0 !important;\n font-weight: var(--neeto-ui-font-normal);\n min-height: 34px;\n min-width: 150px;\n text-align: left;\n width: 100%;\n}\n\n.ntm-scrollbar__inner {\n width: 100%;\n height: 200px;\n}\n.ntm-scrollbar__outer {\n position: \"absolute\";\n top: 0px;\n left: 0px;\n width: 200px;\n height: 150px;\n overflow: \"hidden\";\n visibility: \"hidden\";\n}\n\n.ntm-empty-state {\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n width: 100%;\n}\n.ntm-empty-state__image {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 2rem;\n}\n.ntm-empty-state__title--with-action-block {\n margin-bottom: 1rem;\n}\n.ntm-empty-state__action-block {\n display: flex;\n justify-content: center;\n}\n\n.ntm-members {\n overflow: auto;\n width: 100%;\n}\n.ntm-members-wrapper {\n display: flex;\n}\n.ntm-members-page-loader {\n width: 100%;\n height: 100vh;\n}\n.ntm-members__table-wrapper {\n height: calc(100vh - 205px);\n width: 100%;\n}\n.ntm-members-table__column {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n.ntm-members-form__header {\n margin-bottom: 0.5rem;\n}\n.ntm-members-form__body {\n width: 100%;\n padding-bottom: 1rem;\n}\n.ntm-members-form__body > * + * {\n margin-top: 1rem;\n}\n.ntm-members-form__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-members-radio-group {\n width: 100%;\n}\n.ntm-members-radio-group .neeto-ui-radio__container--stacked {\n width: 100%;\n}\n.ntm-members-radio-group__label {\n padding-right: 4px;\n}\n.ntm-members-radio-group__icon {\n cursor: pointer;\n}\n\n.ntm-members-form-radio-item__wrapper {\n width: 100%;\n cursor: pointer;\n padding: 8px 0px !important;\n}\n.ntm-members-form-radio-item__wrapper:first-child {\n padding-top: 0px !important;\n}\n.ntm-members-form-radio-item__label {\n margin-bottom: 0 !important;\n}\n.ntm-members-form-radio-item__description {\n color: rgb(var(--neeto-ui-gray-700));\n}\n\n.ntm-roles-table__wrapper {\n width: 100%;\n height: calc(100vh - var(--neeto-ui-main-header-with-breadcrumbs-height));\n display: flex;\n padding: 0 1.5rem;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__sidebar {\n width: 396px;\n min-width: 396px;\n border-right: thin solid rgb(var(--neeto-ui-gray-300));\n border-left: thin solid rgb(var(--neeto-ui-gray-300));\n border-top: thin solid rgb(var(--neeto-ui-gray-300));\n}\n.ntm-roles-table__wrapper .ntm-roles-table__sidebar .ntm-roles-table-sidebar__search {\n padding: 20px 24px;\n height: 72px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__sidebar .ntm-roles-table-sidebar__list {\n height: calc(\n 100vh - var(--neeto-ui-main-header-with-breadcrumbs-height) - 72px -\n var(--ntm-roles-table-default-scroll)\n );\n overflow-y: auto;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__sidebar .ntm-roles-table-sidebar__list .ntm-roles-table-sidebar__list-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 24px;\n min-height: var(--ntm-roles-table-cell-height);\n}\n.ntm-roles-table__wrapper .ntm-roles-table__sidebar .ntm-roles-table-sidebar__list .ntm-roles-table-sidebar__list-item.ntm-roles-table-sidebar__list-item--highlighted {\n background-color: rgb(var(--neeto-ui-primary-100));\n padding: 12px 24px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__sidebar .ntm-roles-table-sidebar__list .ntm-roles-table-sidebar__list-item:not(.ntm-roles-table-sidebar__list-item--highlighted) {\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns {\n width: calc(\n 100vw - var(--neeto-ui-sidebar-width) - 396px - 24px\n );\n overflow: hidden;\n border-top: thin solid rgb(var(--neeto-ui-gray-300));\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__cell {\n width: 100%;\n min-width: 200px;\n height: var(--ntm-roles-table-cell-height);\n padding: 12px 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-right: thin solid rgb(var(--neeto-ui-gray-300));\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table-cell__checkbox-wrapper {\n position: absolute;\n height: 1rem;\n width: 1rem;\n margin: auto;\n z-index: 10;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table-cell__checkbox {\n z-index: 10;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__header {\n display: flex;\n align-items: center;\n overflow-x: auto;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__header .ntm-roles-table__cell {\n height: 72px;\n padding-left: 24px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__header .ntm-roles-table-header-cell__container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n gap: 1rem;\n overflow: hidden;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__header .ntm-roles-table-header__dropdown {\n margin: 3px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__header .ntm-roles-table-header__role-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows {\n width: 100%;\n height: calc(\n 100vh - var(--neeto-ui-main-header-with-breadcrumbs-height) - 72px -\n var(--ntm-roles-table-default-scroll)\n );\n overflow-y: auto;\n scrollbar-width: none;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows::-webkit-scrollbar {\n width: 0px;\n height: 0px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows::-webkit-scrollbar-thumb {\n background: rgb(var(--neeto-ui-gray-300));\n border-radius: 50px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows::-webkit-scrollbar-thumb:hover {\n border-radius: 50px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows::-webkit-scrollbar-track {\n background: rgb(var(--neeto-ui-gray-300));\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows .ntm-roles-table__row {\n display: flex;\n align-items: center;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows .ntm-roles-table__row .ntm-roles-table__cell {\n overflow: hidden;\n position: relative;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows .ntm-roles-table__row .ntm-roles-table__cell p {\n opacity: 0;\n width: 340px;\n min-width: 340px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows .ntm-roles-table__row.ntm-roles-table__row--highlighted .ntm-roles-table__cell {\n background-color: rgb(var(--neeto-ui-primary-100));\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows .ntm-roles-table__row:not(.ntm-roles-table__row--highlighted) .ntm-roles-table__cell {\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table-sidebar__drop-down-button {\n color: rgb(var(--neeto-ui-gray-600));\n cursor: pointer;\n}\n\n.ntm-roles-modal__body > * + * {\n margin-top: 1rem;\n}\n.ntm-roles-modal__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-roles-pane__body {\n width: 100%;\n margin-bottom: 1.5rem;\n}\n.ntm-roles-pane__body-wrapper > * + * {\n margin-top: 1rem;\n}\n.ntm-roles-pane__body > * + * {\n margin-top: 1.5rem;\n}\n.ntm-roles-pane__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-roles-permission > * + * {\n margin: 0.5rem 0;\n}\n.ntm-roles-permission__heading {\n color: rgb(var(--neeto-ui-gray-500));\n text-transform: uppercase;\n}\n.ntm-roles-permission__card {\n background-color: rgb(var(--neeto-ui-white));\n align-items: center;\n border-radius: var(--neeto-ui-rounded);\n border-width: 1px;\n border-color: rgb(var(--neeto-ui-gray-300));\n cursor: pointer;\n display: flex;\n gap: 0.75rem;\n padding: 1rem 0.75rem;\n}\n.ntm-roles-permission__card--description {\n flex-grow: 1;\n}\n.ntm-roles-permission__card--checkbox {\n padding: 0 0.5rem;\n}\n\n.ntm-roles-help-url-wrapper {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n padding: 1rem 0;\n}\n\n.neeto-ui-subheader .neeto-ui-subheader__left-wrapper .neeto-ui-subheader__left {\n max-width: none;\n}\n\ntd.ant-table-column-sort {\n background: transparent;\n}";
|
|
10229
10302
|
n(css,{});
|
|
10230
10303
|
|
|
10231
10304
|
exports.ManageMember = ManageMember;
|