@bigbinary/neeto-team-members-frontend 2.3.6 → 2.4.1
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 +6 -5
- package/dist/index.cjs.js +363 -538
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +364 -539
- package/dist/index.esm.js.map +1 -1
- package/package.json +25 -25
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import React, { createContext, useContext, createElement, isValidElement, cloneE
|
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
3
|
import { useFormikContext, Formik, Form } from 'formik';
|
|
4
4
|
import { Typography, Button, Table as Table$1, Modal, Toastr, Tooltip, Checkbox, Pane, Dropdown, Alert, Input as Input$1, PageLoader, Avatar, Tag } from '@bigbinary/neetoui';
|
|
5
|
-
import { Download, File, LeftArrow,
|
|
5
|
+
import { Download, File, LeftArrow, MenuHorizontal, Up, Down, Search } from '@bigbinary/neeto-icons';
|
|
6
6
|
import classnames from 'classnames';
|
|
7
7
|
import { EmailInput, Input, Textarea, Select } from '@bigbinary/neetoui/formik';
|
|
8
8
|
import axios from 'axios';
|
|
@@ -36,7 +36,6 @@ function _defineProperties(target, props) {
|
|
|
36
36
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
|
|
40
39
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
41
40
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
42
41
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
@@ -50,7 +49,6 @@ function _assertThisInitialized(self) {
|
|
|
50
49
|
if (self === void 0) {
|
|
51
50
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
52
51
|
}
|
|
53
|
-
|
|
54
52
|
return self;
|
|
55
53
|
}
|
|
56
54
|
|
|
@@ -66,7 +64,6 @@ function _inherits(subClass, superClass) {
|
|
|
66
64
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
67
65
|
throw new TypeError("Super expression must either be null or a function");
|
|
68
66
|
}
|
|
69
|
-
|
|
70
67
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
71
68
|
constructor: {
|
|
72
69
|
value: subClass,
|
|
@@ -86,7 +83,6 @@ function _possibleConstructorReturn(self, call) {
|
|
|
86
83
|
} else if (call !== void 0) {
|
|
87
84
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
88
85
|
}
|
|
89
|
-
|
|
90
86
|
return _assertThisInitialized(self);
|
|
91
87
|
}
|
|
92
88
|
|
|
@@ -108,7 +104,6 @@ function _defineProperty$2(obj, key, value) {
|
|
|
108
104
|
} else {
|
|
109
105
|
obj[key] = value;
|
|
110
106
|
}
|
|
111
|
-
|
|
112
107
|
return obj;
|
|
113
108
|
}
|
|
114
109
|
|
|
@@ -122,11 +117,9 @@ function _iterableToArray$2(iter) {
|
|
|
122
117
|
|
|
123
118
|
function _arrayLikeToArray$2(arr, len) {
|
|
124
119
|
if (len == null || len > arr.length) len = arr.length;
|
|
125
|
-
|
|
126
120
|
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
127
121
|
arr2[i] = arr[i];
|
|
128
122
|
}
|
|
129
|
-
|
|
130
123
|
return arr2;
|
|
131
124
|
}
|
|
132
125
|
|
|
@@ -1897,6 +1890,21 @@ function parseFormatStr(formatStr) {
|
|
|
1897
1890
|
};
|
|
1898
1891
|
}
|
|
1899
1892
|
|
|
1893
|
+
function createCachedFormatter(fn) {
|
|
1894
|
+
var cache = {};
|
|
1895
|
+
return function invokeFormatter(val, lng, options) {
|
|
1896
|
+
var key = lng + JSON.stringify(options);
|
|
1897
|
+
var formatter = cache[key];
|
|
1898
|
+
|
|
1899
|
+
if (!formatter) {
|
|
1900
|
+
formatter = fn(lng, options);
|
|
1901
|
+
cache[key] = formatter;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
return formatter(val);
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1900
1908
|
var Formatter = function () {
|
|
1901
1909
|
function Formatter() {
|
|
1902
1910
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1906,23 +1914,38 @@ var Formatter = function () {
|
|
|
1906
1914
|
this.logger = baseLogger.create('formatter');
|
|
1907
1915
|
this.options = options;
|
|
1908
1916
|
this.formats = {
|
|
1909
|
-
number: function
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1917
|
+
number: createCachedFormatter(function (lng, options) {
|
|
1918
|
+
var formatter = new Intl.NumberFormat(lng, options);
|
|
1919
|
+
return function (val) {
|
|
1920
|
+
return formatter.format(val);
|
|
1921
|
+
};
|
|
1922
|
+
}),
|
|
1923
|
+
currency: createCachedFormatter(function (lng, options) {
|
|
1924
|
+
var formatter = new Intl.NumberFormat(lng, _objectSpread$4$1(_objectSpread$4$1({}, options), {}, {
|
|
1914
1925
|
style: 'currency'
|
|
1915
|
-
}))
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
},
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
}
|
|
1926
|
+
}));
|
|
1927
|
+
return function (val) {
|
|
1928
|
+
return formatter.format(val);
|
|
1929
|
+
};
|
|
1930
|
+
}),
|
|
1931
|
+
datetime: createCachedFormatter(function (lng, options) {
|
|
1932
|
+
var formatter = new Intl.DateTimeFormat(lng, _objectSpread$4$1({}, options));
|
|
1933
|
+
return function (val) {
|
|
1934
|
+
return formatter.format(val);
|
|
1935
|
+
};
|
|
1936
|
+
}),
|
|
1937
|
+
relativetime: createCachedFormatter(function (lng, options) {
|
|
1938
|
+
var formatter = new Intl.RelativeTimeFormat(lng, _objectSpread$4$1({}, options));
|
|
1939
|
+
return function (val) {
|
|
1940
|
+
return formatter.format(val, options.range || 'day');
|
|
1941
|
+
};
|
|
1942
|
+
}),
|
|
1943
|
+
list: createCachedFormatter(function (lng, options) {
|
|
1944
|
+
var formatter = new Intl.ListFormat(lng, _objectSpread$4$1({}, options));
|
|
1945
|
+
return function (val) {
|
|
1946
|
+
return formatter.format(val);
|
|
1947
|
+
};
|
|
1948
|
+
})
|
|
1926
1949
|
};
|
|
1927
1950
|
this.init(options);
|
|
1928
1951
|
}
|
|
@@ -1941,6 +1964,11 @@ var Formatter = function () {
|
|
|
1941
1964
|
value: function add(name, fc) {
|
|
1942
1965
|
this.formats[name.toLowerCase().trim()] = fc;
|
|
1943
1966
|
}
|
|
1967
|
+
}, {
|
|
1968
|
+
key: "addCached",
|
|
1969
|
+
value: function addCached(name, fc) {
|
|
1970
|
+
this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);
|
|
1971
|
+
}
|
|
1944
1972
|
}, {
|
|
1945
1973
|
key: "format",
|
|
1946
1974
|
value: function format(value, _format, lng, options) {
|
|
@@ -3373,13 +3401,11 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
|
3373
3401
|
var target = {};
|
|
3374
3402
|
var sourceKeys = Object.keys(source);
|
|
3375
3403
|
var key, i;
|
|
3376
|
-
|
|
3377
3404
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
3378
3405
|
key = sourceKeys[i];
|
|
3379
3406
|
if (excluded.indexOf(key) >= 0) continue;
|
|
3380
3407
|
target[key] = source[key];
|
|
3381
3408
|
}
|
|
3382
|
-
|
|
3383
3409
|
return target;
|
|
3384
3410
|
}
|
|
3385
3411
|
|
|
@@ -3387,10 +3413,8 @@ function _objectWithoutProperties$1(source, excluded) {
|
|
|
3387
3413
|
if (source == null) return {};
|
|
3388
3414
|
var target = _objectWithoutPropertiesLoose$1(source, excluded);
|
|
3389
3415
|
var key, i;
|
|
3390
|
-
|
|
3391
3416
|
if (Object.getOwnPropertySymbols) {
|
|
3392
3417
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
3393
|
-
|
|
3394
3418
|
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
3395
3419
|
key = sourceSymbolKeys[i];
|
|
3396
3420
|
if (excluded.indexOf(key) >= 0) continue;
|
|
@@ -3398,7 +3422,6 @@ function _objectWithoutProperties$1(source, excluded) {
|
|
|
3398
3422
|
target[key] = source[key];
|
|
3399
3423
|
}
|
|
3400
3424
|
}
|
|
3401
|
-
|
|
3402
3425
|
return target;
|
|
3403
3426
|
}
|
|
3404
3427
|
|
|
@@ -3871,18 +3894,14 @@ function Trans(_ref) {
|
|
|
3871
3894
|
|
|
3872
3895
|
function _iterableToArrayLimit$2(arr, i) {
|
|
3873
3896
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3874
|
-
|
|
3875
3897
|
if (_i == null) return;
|
|
3876
3898
|
var _arr = [];
|
|
3877
3899
|
var _n = true;
|
|
3878
3900
|
var _d = false;
|
|
3879
|
-
|
|
3880
3901
|
var _s, _e;
|
|
3881
|
-
|
|
3882
3902
|
try {
|
|
3883
3903
|
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
3884
3904
|
_arr.push(_s.value);
|
|
3885
|
-
|
|
3886
3905
|
if (i && _arr.length === i) break;
|
|
3887
3906
|
}
|
|
3888
3907
|
} catch (err) {
|
|
@@ -3895,7 +3914,6 @@ function _iterableToArrayLimit$2(arr, i) {
|
|
|
3895
3914
|
if (_d) throw _e;
|
|
3896
3915
|
}
|
|
3897
3916
|
}
|
|
3898
|
-
|
|
3899
3917
|
return _arr;
|
|
3900
3918
|
}
|
|
3901
3919
|
|
|
@@ -4024,11 +4042,12 @@ var alerts$1 = {
|
|
|
4024
4042
|
};
|
|
4025
4043
|
var buttons$1 = {
|
|
4026
4044
|
cancel: "Cancel",
|
|
4027
|
-
copyLink: "Copy
|
|
4028
|
-
createLink: "Create
|
|
4029
|
-
inviteFrom: "Invite
|
|
4045
|
+
copyLink: "Copy link",
|
|
4046
|
+
createLink: "Create link",
|
|
4047
|
+
inviteFrom: "Invite from",
|
|
4030
4048
|
proceed: "Proceed",
|
|
4031
|
-
|
|
4049
|
+
saveChanges: "Save changes",
|
|
4050
|
+
sendInvites: "Send invites"
|
|
4032
4051
|
};
|
|
4033
4052
|
var common$1 = {
|
|
4034
4053
|
activate: "Activate",
|
|
@@ -4095,13 +4114,12 @@ var placeholders$1 = {
|
|
|
4095
4114
|
};
|
|
4096
4115
|
var tooltips$1 = {
|
|
4097
4116
|
activateUserToEdit: "Please activate the user to edit their role.",
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
noPermissionToRemoveRoles: "Sorry, you do not have permission to remove roles."
|
|
4117
|
+
adminMustHaveAccess: "Admins should have access to this feature.",
|
|
4118
|
+
noPermissionToAddMember: "Please ask the admin to permit you to add members.",
|
|
4119
|
+
noPermissionToAddRole: "Please ask the admin to permit you to add roles.",
|
|
4120
|
+
noPermissionToEditMembers: "Please ask the admin to permit you to edit members.",
|
|
4121
|
+
noPermissionToEditRoles: "Please ask the admin to permit you to edit roles.",
|
|
4122
|
+
noPermissionToRemoveRoles: "Please ask the admin to permit you to remove roles."
|
|
4105
4123
|
};
|
|
4106
4124
|
var validations$1 = {
|
|
4107
4125
|
enterRoleName: "Please enter a valid role name.",
|
|
@@ -4132,6 +4150,7 @@ var buttons = {
|
|
|
4132
4150
|
createLink: "Créer un lien",
|
|
4133
4151
|
inviteFrom: "Inviter de",
|
|
4134
4152
|
proceed: "Procéder",
|
|
4153
|
+
saveChanges: "Sauvegarder les modifications",
|
|
4135
4154
|
sendInvites: "Envoie des invitations"
|
|
4136
4155
|
};
|
|
4137
4156
|
var common = {
|
|
@@ -4141,7 +4160,7 @@ var common = {
|
|
|
4141
4160
|
active_: "{{what}} actifs",
|
|
4142
4161
|
add_: "Ajouter {{what}}",
|
|
4143
4162
|
all: "Tous",
|
|
4144
|
-
all_: "
|
|
4163
|
+
all_: "tous les {{what}}",
|
|
4145
4164
|
deactivate: "Désactiver",
|
|
4146
4165
|
deactivate_: "Désactiver le {{what}}",
|
|
4147
4166
|
deactivated: "Désactivé",
|
|
@@ -4197,13 +4216,12 @@ var placeholders = {
|
|
|
4197
4216
|
};
|
|
4198
4217
|
var tooltips = {
|
|
4199
4218
|
activateUserToEdit: "Veuillez activer l'utilisateur pour modifier son rôle.",
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
noPermissionToRemoveRoles: "Désolé, vous n'avez pas la permission de supprimer des rôles."
|
|
4219
|
+
adminMustHaveAccess: "Les administrateurs doivent avoir accès à cette fonctionnalité.",
|
|
4220
|
+
noPermissionToAddMember: "Veuillez demander à l'administrateur de vous autoriser à ajouter des membres.",
|
|
4221
|
+
noPermissionToAddRole: "Veuillez demander à l'administrateur de vous autoriser à ajouter des rôles.",
|
|
4222
|
+
noPermissionToEditMembers: "Veuillez demander à l'administrateur de vous autoriser à modifier les membres.",
|
|
4223
|
+
noPermissionToEditRoles: "Veuillez demander à l'administrateur de vous autoriser à modifier les rôles.",
|
|
4224
|
+
noPermissionToRemoveRoles: "Veuillez demander à l'administrateur de vous autoriser à supprimer des rôles."
|
|
4207
4225
|
};
|
|
4208
4226
|
var validations = {
|
|
4209
4227
|
filterInvalidEmails: "Cliquez ici pour supprimer les e-mails invalides.",
|
|
@@ -4239,24 +4257,21 @@ instance.use(Browser).use(initReactI18next).init({
|
|
|
4239
4257
|
|
|
4240
4258
|
const hasPermission = function () {
|
|
4241
4259
|
var _window$globalProps$p, _window$globalProps;
|
|
4242
|
-
|
|
4243
4260
|
let permissions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
4244
4261
|
const type = typeof permissions;
|
|
4245
4262
|
const userPermissions = (_window$globalProps$p = (_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 ? void 0 : _window$globalProps.permissions) !== null && _window$globalProps$p !== void 0 ? _window$globalProps$p : [];
|
|
4246
|
-
|
|
4247
4263
|
if (Object.is(type, "string")) {
|
|
4248
4264
|
return userPermissions.includes(permissions);
|
|
4249
4265
|
} else if (Array.isArray(permissions)) {
|
|
4250
4266
|
return permissions.some(permission => userPermissions.includes(permission));
|
|
4251
4267
|
}
|
|
4252
|
-
|
|
4253
4268
|
return false;
|
|
4254
4269
|
};
|
|
4255
4270
|
const isOverflown = _ref => {
|
|
4256
4271
|
let clientWidth = _ref.clientWidth,
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4272
|
+
clientHeight = _ref.clientHeight,
|
|
4273
|
+
scrollWidth = _ref.scrollWidth,
|
|
4274
|
+
scrollHeight = _ref.scrollHeight;
|
|
4260
4275
|
return scrollHeight > clientHeight || scrollWidth > clientWidth;
|
|
4261
4276
|
};
|
|
4262
4277
|
const getScrollBarWidth = () => {
|
|
@@ -4279,14 +4294,12 @@ function _extends() {
|
|
|
4279
4294
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
4280
4295
|
for (var i = 1; i < arguments.length; i++) {
|
|
4281
4296
|
var source = arguments[i];
|
|
4282
|
-
|
|
4283
4297
|
for (var key in source) {
|
|
4284
4298
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4285
4299
|
target[key] = source[key];
|
|
4286
4300
|
}
|
|
4287
4301
|
}
|
|
4288
4302
|
}
|
|
4289
|
-
|
|
4290
4303
|
return target;
|
|
4291
4304
|
};
|
|
4292
4305
|
return _extends.apply(this, arguments);
|
|
@@ -7485,7 +7498,6 @@ const withReactQuery = Component => {
|
|
|
7485
7498
|
initialIsOpen: false,
|
|
7486
7499
|
position: "bottom-right"
|
|
7487
7500
|
}));
|
|
7488
|
-
|
|
7489
7501
|
return QueryWrapper;
|
|
7490
7502
|
};
|
|
7491
7503
|
|
|
@@ -9276,12 +9288,12 @@ function noop() {}
|
|
|
9276
9288
|
|
|
9277
9289
|
const Uploader = _ref => {
|
|
9278
9290
|
let sampleFileUrl = _ref.sampleFileUrl,
|
|
9279
|
-
|
|
9291
|
+
csvColumns = _ref.csvColumns;
|
|
9280
9292
|
return /*#__PURE__*/React.createElement(Dropzone$1, {
|
|
9281
9293
|
onDrop: noop$2
|
|
9282
9294
|
}, _ref2 => {
|
|
9283
9295
|
let getRootProps = _ref2.getRootProps,
|
|
9284
|
-
|
|
9296
|
+
getInputProps = _ref2.getInputProps;
|
|
9285
9297
|
return /*#__PURE__*/React.createElement("div", _extends({}, getRootProps(), {
|
|
9286
9298
|
className: "ntm-invitations__dnd"
|
|
9287
9299
|
}), /*#__PURE__*/React.createElement("input", getInputProps()), /*#__PURE__*/React.createElement(Typography, {
|
|
@@ -9298,7 +9310,6 @@ const Uploader = _ref => {
|
|
|
9298
9310
|
})), /*#__PURE__*/React.createElement(Typography, {
|
|
9299
9311
|
style: "body2"
|
|
9300
9312
|
}, instance.t("helpers.uploadInstruction3")), /*#__PURE__*/React.createElement(Button, {
|
|
9301
|
-
size: "large",
|
|
9302
9313
|
style: "link",
|
|
9303
9314
|
type: "submit",
|
|
9304
9315
|
icon: Download,
|
|
@@ -9337,8 +9348,8 @@ const COLUMN_DATA = [{
|
|
|
9337
9348
|
key: "status",
|
|
9338
9349
|
render: status => /*#__PURE__*/React.createElement("p", {
|
|
9339
9350
|
className: classnames("ntm-invitations__table-status", {
|
|
9340
|
-
"neeto-ui-text-error": status === "failed",
|
|
9341
|
-
"neeto-ui-text-success": status === "processed"
|
|
9351
|
+
"neeto-ui-text-error-500": status === "failed",
|
|
9352
|
+
"neeto-ui-text-success-500": status === "processed"
|
|
9342
9353
|
})
|
|
9343
9354
|
}, status)
|
|
9344
9355
|
}, {
|
|
@@ -9407,10 +9418,11 @@ const Uploads = () => /*#__PURE__*/React.createElement("div", {
|
|
|
9407
9418
|
|
|
9408
9419
|
const Csv = _ref => {
|
|
9409
9420
|
let label = _ref.label,
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9421
|
+
sampleFileUrl = _ref.sampleFileUrl,
|
|
9422
|
+
csvColumns = _ref.csvColumns,
|
|
9423
|
+
setIsCSVInviteSelected = _ref.setIsCSVInviteSelected;
|
|
9413
9424
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal.Header, null, /*#__PURE__*/React.createElement(Button, {
|
|
9425
|
+
size: "small",
|
|
9414
9426
|
style: "text",
|
|
9415
9427
|
icon: LeftArrow,
|
|
9416
9428
|
onClick: () => setIsCSVInviteSelected(false)
|
|
@@ -9435,11 +9447,8 @@ const INVITATIONS_URL = "neeto_invitations";
|
|
|
9435
9447
|
const fetch$3 = params => axios.get(`${INVITATIONS_URL}/invite_links`, {
|
|
9436
9448
|
params
|
|
9437
9449
|
});
|
|
9438
|
-
|
|
9439
9450
|
const create$2 = payload => axios.post(`${INVITATIONS_URL}/invite_links`, payload);
|
|
9440
|
-
|
|
9441
9451
|
const destroy$1 = (id, payload) => axios.delete(`${INVITATIONS_URL}/invite_links/${id}`, payload);
|
|
9442
|
-
|
|
9443
9452
|
const inviteLinksApi = {
|
|
9444
9453
|
fetch: fetch$3,
|
|
9445
9454
|
create: create$2,
|
|
@@ -9447,7 +9456,6 @@ const inviteLinksApi = {
|
|
|
9447
9456
|
};
|
|
9448
9457
|
|
|
9449
9458
|
const DEFAULT_STALE_TIME = 300000; // 5 minutes
|
|
9450
|
-
|
|
9451
9459
|
const INVITATIONS_STALE_TIME = 3600000; //1 hour
|
|
9452
9460
|
|
|
9453
9461
|
const QUERY_KEYS = {
|
|
@@ -9458,9 +9466,7 @@ const QUERY_KEYS = {
|
|
|
9458
9466
|
};
|
|
9459
9467
|
|
|
9460
9468
|
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; }
|
|
9461
|
-
|
|
9462
9469
|
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$2(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; }
|
|
9463
|
-
|
|
9464
9470
|
const useFetchInviteLink = function () {
|
|
9465
9471
|
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9466
9472
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -9470,12 +9476,11 @@ const useFetchInviteLink = function () {
|
|
|
9470
9476
|
retry: false
|
|
9471
9477
|
}, options));
|
|
9472
9478
|
};
|
|
9473
|
-
|
|
9474
9479
|
const useCreateInviteLink = () => useMutation(inviteLinksApi.create, {
|
|
9475
9480
|
onSuccess: _ref => {
|
|
9476
9481
|
let inviteLink = _ref.inviteLink;
|
|
9477
9482
|
const resourceType = inviteLink.resourceType,
|
|
9478
|
-
|
|
9483
|
+
resourceId = inviteLink.resourceId;
|
|
9479
9484
|
queryClient.setQueryData([QUERY_KEYS.INVITE_LINKS, {
|
|
9480
9485
|
resource_type: resourceType,
|
|
9481
9486
|
resource_id: resourceId
|
|
@@ -9484,12 +9489,11 @@ const useCreateInviteLink = () => useMutation(inviteLinksApi.create, {
|
|
|
9484
9489
|
});
|
|
9485
9490
|
}
|
|
9486
9491
|
});
|
|
9487
|
-
|
|
9488
9492
|
const useDestroyInviteLink = () => useMutation(inviteLinksApi.destroy, {
|
|
9489
9493
|
onSuccess: _ref2 => {
|
|
9490
9494
|
let inviteLink = _ref2.inviteLink;
|
|
9491
9495
|
const resourceType = inviteLink.resourceType,
|
|
9492
|
-
|
|
9496
|
+
resourceId = inviteLink.resourceId;
|
|
9493
9497
|
queryClient.invalidateQueries([QUERY_KEYS.INVITE_LINKS, {
|
|
9494
9498
|
resource_type: resourceType,
|
|
9495
9499
|
resource_id: resourceId
|
|
@@ -9510,15 +9514,13 @@ const renderTime = time => {
|
|
|
9510
9514
|
|
|
9511
9515
|
const Timer = _ref => {
|
|
9512
9516
|
let expiresAt = _ref.expiresAt;
|
|
9513
|
-
|
|
9514
9517
|
const _useTimer = dist$1.exports.useTimer({
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9518
|
+
expiryTimestamp: new Date(expiresAt)
|
|
9519
|
+
}),
|
|
9520
|
+
seconds = _useTimer.seconds,
|
|
9521
|
+
minutes = _useTimer.minutes,
|
|
9522
|
+
hours = _useTimer.hours,
|
|
9523
|
+
days = _useTimer.days;
|
|
9522
9524
|
return /*#__PURE__*/React.createElement(Typography, {
|
|
9523
9525
|
style: "body3"
|
|
9524
9526
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, instance.t("helpers.expiresIn"), renderTime({
|
|
@@ -9531,30 +9533,24 @@ const Timer = _ref => {
|
|
|
9531
9533
|
|
|
9532
9534
|
const InviteLink = _ref => {
|
|
9533
9535
|
let resourceType = _ref.resourceType,
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
+
resourceId = _ref.resourceId;
|
|
9536
9537
|
const _useFetchInviteLink = useFetchInviteLink({
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9538
|
+
resource_type: resourceType,
|
|
9539
|
+
resource_id: resourceId
|
|
9540
|
+
}),
|
|
9541
|
+
inviteLink = _useFetchInviteLink.data,
|
|
9542
|
+
isLoading = _useFetchInviteLink.isLoading;
|
|
9543
9543
|
const _useCreateInviteLink = useCreateInviteLink(),
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9544
|
+
createInviteLink = _useCreateInviteLink.mutate,
|
|
9545
|
+
isCreating = _useCreateInviteLink.isLoading;
|
|
9547
9546
|
const _useDestroyInviteLink = useDestroyInviteLink(),
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9547
|
+
deleteInviteLink = _useDestroyInviteLink.mutate,
|
|
9548
|
+
isDeleting = _useDestroyInviteLink.isLoading;
|
|
9551
9549
|
const showInviteLink = inviteLink && new Date(inviteLink.expiresAt) > new Date();
|
|
9552
|
-
|
|
9553
9550
|
const handleCopyInviteLink = () => {
|
|
9554
9551
|
navigator.clipboard.writeText(`${window.location.host}/neeto_invitations/${inviteLink.id}`);
|
|
9555
9552
|
Toastr.info(instance.t("helpers.copiedToClipboard"));
|
|
9556
9553
|
};
|
|
9557
|
-
|
|
9558
9554
|
return /*#__PURE__*/React.createElement("div", {
|
|
9559
9555
|
className: "ntm-invitations__invite-link"
|
|
9560
9556
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -9568,19 +9564,16 @@ const InviteLink = _ref => {
|
|
|
9568
9564
|
}, /*#__PURE__*/React.createElement(Timer, {
|
|
9569
9565
|
expiresAt: inviteLink.expiresAt
|
|
9570
9566
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
9571
|
-
size: "large",
|
|
9572
9567
|
style: "danger-text",
|
|
9573
9568
|
label: instance.t("common.delete"),
|
|
9574
9569
|
loading: isDeleting,
|
|
9575
9570
|
disabled: isDeleting,
|
|
9576
9571
|
onClick: () => deleteInviteLink(inviteLink.id)
|
|
9577
9572
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
9578
|
-
size: "large",
|
|
9579
9573
|
style: "primary",
|
|
9580
9574
|
label: instance.t("buttons.copyLink"),
|
|
9581
9575
|
onClick: handleCopyInviteLink
|
|
9582
9576
|
})) : /*#__PURE__*/React.createElement(Button, {
|
|
9583
|
-
size: "large",
|
|
9584
9577
|
style: "secondary",
|
|
9585
9578
|
loading: isLoading || isCreating,
|
|
9586
9579
|
disabled: isLoading || isCreating,
|
|
@@ -9596,18 +9589,16 @@ const InviteLink = _ref => {
|
|
|
9596
9589
|
|
|
9597
9590
|
const Normal = _ref => {
|
|
9598
9591
|
let label = _ref.label,
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9592
|
+
children = _ref.children,
|
|
9593
|
+
submitButtonProps = _ref.submitButtonProps,
|
|
9594
|
+
setIsCSVInviteSelected = _ref.setIsCSVInviteSelected,
|
|
9595
|
+
isCSVInviteEnabled = _ref.isCSVInviteEnabled,
|
|
9596
|
+
isInviteLinkEnabled = _ref.isInviteLinkEnabled,
|
|
9597
|
+
_ref$inviteLinkProps = _ref.inviteLinkProps,
|
|
9598
|
+
inviteLinkProps = _ref$inviteLinkProps === void 0 ? {} : _ref$inviteLinkProps;
|
|
9607
9599
|
const _useFormikContext = useFormikContext(),
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9600
|
+
isSubmitting = _useFormikContext.isSubmitting,
|
|
9601
|
+
dirty = _useFormikContext.dirty;
|
|
9611
9602
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal.Header, null, /*#__PURE__*/React.createElement("div", {
|
|
9612
9603
|
className: "ntm-invitations__header"
|
|
9613
9604
|
})), /*#__PURE__*/React.createElement(Modal.Body, {
|
|
@@ -9621,7 +9612,6 @@ const Normal = _ref => {
|
|
|
9621
9612
|
})), isCSVInviteEnabled && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Typography, {
|
|
9622
9613
|
style: "body2"
|
|
9623
9614
|
}, instance.t("buttons.inviteFrom")), /*#__PURE__*/React.createElement(Button, {
|
|
9624
|
-
size: "large",
|
|
9625
9615
|
style: "secondary",
|
|
9626
9616
|
icon: File,
|
|
9627
9617
|
onClick: () => setIsCSVInviteSelected(true),
|
|
@@ -9634,7 +9624,6 @@ const Normal = _ref => {
|
|
|
9634
9624
|
label: null,
|
|
9635
9625
|
placeholder: instance.t("placeholders.email")
|
|
9636
9626
|
}), /*#__PURE__*/React.createElement(Button, _extends({
|
|
9637
|
-
size: "large",
|
|
9638
9627
|
type: "submit",
|
|
9639
9628
|
label: instance.t("buttons.sendInvites"),
|
|
9640
9629
|
className: "ntm-invitations__submit-btn",
|
|
@@ -9648,39 +9637,35 @@ const Normal = _ref => {
|
|
|
9648
9637
|
};
|
|
9649
9638
|
|
|
9650
9639
|
const _excluded$2 = ["label", "isOpen", "onClose", "submitButtonProps", "csvColumns", "sampleFileUrl", "isCSVInviteEnabled", "isInviteLinkEnabled", "inviteLinkProps", "children"];
|
|
9651
|
-
|
|
9652
9640
|
const Invitations = _ref => {
|
|
9653
9641
|
let _ref$label = _ref.label,
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9642
|
+
label = _ref$label === void 0 ? instance.t("metaNames.member", PLURAL) : _ref$label,
|
|
9643
|
+
_ref$isOpen = _ref.isOpen,
|
|
9644
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
9645
|
+
_ref$onClose = _ref.onClose,
|
|
9646
|
+
onClose = _ref$onClose === void 0 ? noop$2 : _ref$onClose,
|
|
9647
|
+
_ref$submitButtonProp = _ref.submitButtonProps,
|
|
9648
|
+
submitButtonProps = _ref$submitButtonProp === void 0 ? {} : _ref$submitButtonProp,
|
|
9649
|
+
_ref$csvColumns = _ref.csvColumns,
|
|
9650
|
+
csvColumns = _ref$csvColumns === void 0 ? [] : _ref$csvColumns,
|
|
9651
|
+
_ref$sampleFileUrl = _ref.sampleFileUrl,
|
|
9652
|
+
sampleFileUrl = _ref$sampleFileUrl === void 0 ? "" : _ref$sampleFileUrl,
|
|
9653
|
+
_ref$isCSVInviteEnabl = _ref.isCSVInviteEnabled,
|
|
9654
|
+
isCSVInviteEnabled = _ref$isCSVInviteEnabl === void 0 ? true : _ref$isCSVInviteEnabl,
|
|
9655
|
+
_ref$isInviteLinkEnab = _ref.isInviteLinkEnabled,
|
|
9656
|
+
isInviteLinkEnabled = _ref$isInviteLinkEnab === void 0 ? true : _ref$isInviteLinkEnab,
|
|
9657
|
+
_ref$inviteLinkProps = _ref.inviteLinkProps,
|
|
9658
|
+
inviteLinkProps = _ref$inviteLinkProps === void 0 ? {} : _ref$inviteLinkProps,
|
|
9659
|
+
children = _ref.children,
|
|
9660
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$2);
|
|
9674
9661
|
const _useState = useState(false),
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9662
|
+
_useState2 = _slicedToArray$2(_useState, 2),
|
|
9663
|
+
isCSVInviteSelected = _useState2[0],
|
|
9664
|
+
setIsCSVInviteSelected = _useState2[1];
|
|
9679
9665
|
const handleClose = () => {
|
|
9680
9666
|
onClose();
|
|
9681
9667
|
setIsCSVInviteSelected(false);
|
|
9682
9668
|
};
|
|
9683
|
-
|
|
9684
9669
|
return /*#__PURE__*/React.createElement(Formik, {
|
|
9685
9670
|
initialValues: {
|
|
9686
9671
|
emails: []
|
|
@@ -9689,7 +9674,7 @@ const Invitations = _ref => {
|
|
|
9689
9674
|
}, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(Modal, _extends({
|
|
9690
9675
|
isOpen: isOpen,
|
|
9691
9676
|
onClose: handleClose,
|
|
9692
|
-
size: "
|
|
9677
|
+
size: "large"
|
|
9693
9678
|
}, otherProps), /*#__PURE__*/React.createElement("div", {
|
|
9694
9679
|
className: "ntm-invitations__wrapper"
|
|
9695
9680
|
}, isCSVInviteSelected ? /*#__PURE__*/React.createElement(Csv, {
|
|
@@ -9706,19 +9691,15 @@ const Invitations = _ref => {
|
|
|
9706
9691
|
inviteLinkProps: inviteLinkProps
|
|
9707
9692
|
}, children)))));
|
|
9708
9693
|
};
|
|
9709
|
-
|
|
9710
9694
|
var index$2 = withReactQuery(Invitations);
|
|
9711
9695
|
|
|
9712
9696
|
const fetch$2 = () => axios.get(`${BASE_URL}/permissions`);
|
|
9713
|
-
|
|
9714
9697
|
const permissionsApi = {
|
|
9715
9698
|
fetch: fetch$2
|
|
9716
9699
|
};
|
|
9717
9700
|
|
|
9718
9701
|
function ownKeys$6(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; }
|
|
9719
|
-
|
|
9720
9702
|
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9721
|
-
|
|
9722
9703
|
const useFetchPermissions = function () {
|
|
9723
9704
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9724
9705
|
return useQuery(QUERY_KEYS.PERMISSIONS, permissionsApi.fetch, _objectSpread$6({
|
|
@@ -9728,15 +9709,11 @@ const useFetchPermissions = function () {
|
|
|
9728
9709
|
};
|
|
9729
9710
|
|
|
9730
9711
|
const fetch$1 = () => axios.get(`${BASE_URL}/organization_roles`);
|
|
9731
|
-
|
|
9732
9712
|
const create$1 = payload => axios.post(`${BASE_URL}/organization_roles`, payload);
|
|
9733
|
-
|
|
9734
9713
|
const update$1 = (id, payload) => axios.patch(`${BASE_URL}/organization_roles/${id}`, payload);
|
|
9735
|
-
|
|
9736
9714
|
const destroy = (id, payload) => axios.delete(`${BASE_URL}/organization_roles/${id}`, {
|
|
9737
9715
|
data: payload
|
|
9738
9716
|
});
|
|
9739
|
-
|
|
9740
9717
|
const organizationRolesApi = {
|
|
9741
9718
|
fetch: fetch$1,
|
|
9742
9719
|
create: create$1,
|
|
@@ -9745,13 +9722,10 @@ const organizationRolesApi = {
|
|
|
9745
9722
|
};
|
|
9746
9723
|
|
|
9747
9724
|
const _excluded$1 = ["onSuccess"],
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9725
|
+
_excluded2$1 = ["onSuccess"],
|
|
9726
|
+
_excluded3 = ["onSuccess"];
|
|
9751
9727
|
function ownKeys$5(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; }
|
|
9752
|
-
|
|
9753
9728
|
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9754
|
-
|
|
9755
9729
|
const useFetchRoles = function () {
|
|
9756
9730
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9757
9731
|
return useQuery(QUERY_KEYS.ROLES, organizationRolesApi.fetch, _objectSpread$5({
|
|
@@ -9759,18 +9733,15 @@ const useFetchRoles = function () {
|
|
|
9759
9733
|
select: response => response.organizationRoles || response.data.organizationRoles
|
|
9760
9734
|
}, options));
|
|
9761
9735
|
};
|
|
9762
|
-
|
|
9763
9736
|
const useCreateRole = _ref => {
|
|
9764
9737
|
let onSuccess = _ref.onSuccess,
|
|
9765
|
-
|
|
9766
|
-
|
|
9738
|
+
options = _objectWithoutProperties$1(_ref, _excluded$1);
|
|
9767
9739
|
return useMutation(organizationRolesApi.create, _objectSpread$5({
|
|
9768
9740
|
onSuccess: response => {
|
|
9769
9741
|
queryClient.setQueriesData(QUERY_KEYS.ROLES, cachedData => {
|
|
9770
9742
|
if (!!cachedData.data && !!cachedData.data.organizationRoles) {
|
|
9771
9743
|
return modifyPath(["data", "organizationRoles"], prepend(response.data.organizationRole), cachedData);
|
|
9772
9744
|
}
|
|
9773
|
-
|
|
9774
9745
|
return modifyPath(["organizationRoles"], prepend(response.organizationRole), cachedData);
|
|
9775
9746
|
});
|
|
9776
9747
|
Toastr.success(response.ntmNotice || response.data.ntmNotice);
|
|
@@ -9778,14 +9749,12 @@ const useCreateRole = _ref => {
|
|
|
9778
9749
|
}
|
|
9779
9750
|
}, options));
|
|
9780
9751
|
};
|
|
9781
|
-
|
|
9782
9752
|
const useUpdateRole = _ref2 => {
|
|
9783
9753
|
let onSuccess = _ref2.onSuccess,
|
|
9784
|
-
|
|
9785
|
-
|
|
9754
|
+
options = _objectWithoutProperties$1(_ref2, _excluded2$1);
|
|
9786
9755
|
return useMutation(_ref3 => {
|
|
9787
9756
|
let id = _ref3.id,
|
|
9788
|
-
|
|
9757
|
+
payload = _ref3.payload;
|
|
9789
9758
|
return organizationRolesApi.update(id, payload);
|
|
9790
9759
|
}, _objectSpread$5({
|
|
9791
9760
|
onSuccess: response => {
|
|
@@ -9794,7 +9763,6 @@ const useUpdateRole = _ref2 => {
|
|
|
9794
9763
|
if (!!cachedData.data && !!cachedData.data.organizationRoles) {
|
|
9795
9764
|
return assocPath(["data", "organizationRoles", findIndex(propEq("id", response.data.organizationRole.id), cachedData.data.organizationRoles)], response.data.organizationRole, cachedData);
|
|
9796
9765
|
}
|
|
9797
|
-
|
|
9798
9766
|
return assocPath(["organizationRoles", findIndex(propEq("id", response.organizationRole.id), cachedData.organizationRoles)], response.organizationRole, cachedData);
|
|
9799
9767
|
});
|
|
9800
9768
|
Toastr.success(response.ntmNotice || response.data.ntmNotice);
|
|
@@ -9802,15 +9770,13 @@ const useUpdateRole = _ref2 => {
|
|
|
9802
9770
|
}
|
|
9803
9771
|
}, options));
|
|
9804
9772
|
};
|
|
9805
|
-
|
|
9806
9773
|
const useDestroyRole = _ref4 => {
|
|
9807
9774
|
let _ref4$onSuccess = _ref4.onSuccess,
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9775
|
+
onSuccess = _ref4$onSuccess === void 0 ? noop$2 : _ref4$onSuccess,
|
|
9776
|
+
options = _objectWithoutProperties$1(_ref4, _excluded3);
|
|
9811
9777
|
return useMutation(_ref5 => {
|
|
9812
9778
|
let id = _ref5.id,
|
|
9813
|
-
|
|
9779
|
+
payload = _ref5.payload;
|
|
9814
9780
|
return organizationRolesApi.destroy(id, payload);
|
|
9815
9781
|
}, _objectSpread$5({
|
|
9816
9782
|
onSuccess: response => {
|
|
@@ -9818,7 +9784,6 @@ const useDestroyRole = _ref4 => {
|
|
|
9818
9784
|
if (!!cachedData.data && !!cachedData.data.organizationRoles) {
|
|
9819
9785
|
return dissocPath(["data", "organizationRoles", findIndex(propEq("id", response.data.id), cachedData.data.organizationRoles)], cachedData);
|
|
9820
9786
|
}
|
|
9821
|
-
|
|
9822
9787
|
return dissocPath(["organizationRoles", findIndex(propEq("id", response.id), cachedData.organizationRoles)], cachedData);
|
|
9823
9788
|
});
|
|
9824
9789
|
Toastr.success(response.ntmNotice || response.data.ntmNotice);
|
|
@@ -11218,20 +11183,15 @@ const renderBreadcrumbs = (breadcrumbs, membersPageUrl) => breadcrumbs !== null
|
|
|
11218
11183
|
|
|
11219
11184
|
const AddRoleButton = _ref => {
|
|
11220
11185
|
var _permissions$create, _permissions$create2;
|
|
11221
|
-
|
|
11222
11186
|
let onClick = _ref.onClick,
|
|
11223
|
-
|
|
11224
|
-
|
|
11187
|
+
permissions = _ref.permissions;
|
|
11225
11188
|
const _useTranslation = useTranslation(),
|
|
11226
|
-
|
|
11227
|
-
|
|
11189
|
+
t = _useTranslation.t;
|
|
11228
11190
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
11229
11191
|
content: t("tooltips.noPermissionToAddRole"),
|
|
11230
11192
|
disabled: (_permissions$create = permissions === null || permissions === void 0 ? void 0 : permissions.create) !== null && _permissions$create !== void 0 ? _permissions$create : hasPermission(MANAGE_MEMBER_PERMISSIONS),
|
|
11231
11193
|
position: "bottom"
|
|
11232
11194
|
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Button, {
|
|
11233
|
-
icon: Plus,
|
|
11234
|
-
size: "large",
|
|
11235
11195
|
label: t("common.add_", {
|
|
11236
11196
|
what: t("common.role", SINGULAR).toLocaleLowerCase()
|
|
11237
11197
|
}),
|
|
@@ -11243,15 +11203,12 @@ const AddRoleButton = _ref => {
|
|
|
11243
11203
|
|
|
11244
11204
|
const Header$1 = _ref => {
|
|
11245
11205
|
var _config$header;
|
|
11246
|
-
|
|
11247
11206
|
let config = _ref.config,
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11207
|
+
searchString = _ref.searchString,
|
|
11208
|
+
setSearchString = _ref.setSearchString,
|
|
11209
|
+
setIsNewRolePaneOpen = _ref.setIsNewRolePaneOpen;
|
|
11252
11210
|
const _useTranslation = useTranslation(),
|
|
11253
|
-
|
|
11254
|
-
|
|
11211
|
+
t = _useTranslation.t;
|
|
11255
11212
|
return /*#__PURE__*/React.createElement(Header$2, {
|
|
11256
11213
|
title: t("common.role", PLURAL),
|
|
11257
11214
|
breadcrumbs: renderBreadcrumbs(config === null || config === void 0 ? void 0 : (_config$header = config.header) === null || _config$header === void 0 ? void 0 : _config$header.breadcrumbs, config === null || config === void 0 ? void 0 : config.membersPageUrl),
|
|
@@ -11290,22 +11247,17 @@ const ADD_ROLE_FORM_VALIDATION_SCHEMA = object({
|
|
|
11290
11247
|
|
|
11291
11248
|
const Permissions = _ref => {
|
|
11292
11249
|
let permissions = _ref.permissions;
|
|
11293
|
-
|
|
11294
11250
|
const _useTranslation = useTranslation(),
|
|
11295
|
-
|
|
11296
|
-
|
|
11251
|
+
t = _useTranslation.t;
|
|
11297
11252
|
const _useFormikContext = useFormikContext(),
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11253
|
+
setFieldValue = _useFormikContext.setFieldValue,
|
|
11254
|
+
values = _useFormikContext.values;
|
|
11301
11255
|
const _values$permissionIds = values.permissionIds,
|
|
11302
|
-
|
|
11303
|
-
|
|
11256
|
+
permissionIds = _values$permissionIds === void 0 ? [] : _values$permissionIds;
|
|
11304
11257
|
const handleTogglePermission = permissionId => {
|
|
11305
11258
|
const nextPermissionIds = permissionIds.includes(permissionId) ? permissionIds.filter(id => id !== permissionId) : [...permissionIds, permissionId];
|
|
11306
11259
|
setFieldValue("permissionIds", nextPermissionIds);
|
|
11307
11260
|
};
|
|
11308
|
-
|
|
11309
11261
|
const groupedPermissions = useMemo(() => groupBy(prop("category"))(permissions), [permissions]);
|
|
11310
11262
|
return /*#__PURE__*/React.createElement("div", {
|
|
11311
11263
|
className: "ntm-roles-pane__body-wrapper"
|
|
@@ -11327,7 +11279,7 @@ const Permissions = _ref => {
|
|
|
11327
11279
|
className: "ntm-roles-permission__heading"
|
|
11328
11280
|
}, category), groupedPermissions[category].map(_ref2 => {
|
|
11329
11281
|
let id = _ref2.id,
|
|
11330
|
-
|
|
11282
|
+
description = _ref2.description;
|
|
11331
11283
|
return /*#__PURE__*/React.createElement("div", {
|
|
11332
11284
|
key: id,
|
|
11333
11285
|
onClick: () => handleTogglePermission(id),
|
|
@@ -11346,33 +11298,26 @@ const Permissions = _ref => {
|
|
|
11346
11298
|
};
|
|
11347
11299
|
|
|
11348
11300
|
function ownKeys$4(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; }
|
|
11349
|
-
|
|
11350
11301
|
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11351
|
-
|
|
11352
11302
|
const New = _ref => {
|
|
11353
11303
|
let isOpen = _ref.isOpen,
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11304
|
+
onClose = _ref.onClose,
|
|
11305
|
+
permissions = _ref.permissions;
|
|
11357
11306
|
const _useTranslation = useTranslation(),
|
|
11358
|
-
|
|
11359
|
-
|
|
11307
|
+
t = _useTranslation.t;
|
|
11360
11308
|
const _useCreateRole = useCreateRole({
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11309
|
+
onSuccess: onClose
|
|
11310
|
+
}),
|
|
11311
|
+
createRole = _useCreateRole.mutate,
|
|
11312
|
+
isSubmitting = _useCreateRole.isLoading;
|
|
11366
11313
|
const handleFormSubmit = formValues => {
|
|
11367
11314
|
const modifiedFormValues = _objectSpread$4(_objectSpread$4({}, formValues), {}, {
|
|
11368
11315
|
description: formValues.description.trim()
|
|
11369
11316
|
});
|
|
11370
|
-
|
|
11371
11317
|
createRole({
|
|
11372
11318
|
organizationRole: modifiedFormValues
|
|
11373
11319
|
});
|
|
11374
11320
|
};
|
|
11375
|
-
|
|
11376
11321
|
return /*#__PURE__*/React.createElement(Pane, {
|
|
11377
11322
|
isOpen: isOpen,
|
|
11378
11323
|
onClose: onClose
|
|
@@ -11396,7 +11341,6 @@ const New = _ref => {
|
|
|
11396
11341
|
className: "ntm-roles-pane__body-wrapper"
|
|
11397
11342
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
11398
11343
|
required: true,
|
|
11399
|
-
autoFocus: true,
|
|
11400
11344
|
maxLength: 40,
|
|
11401
11345
|
name: "name",
|
|
11402
11346
|
label: t("common.name"),
|
|
@@ -11414,13 +11358,11 @@ const New = _ref => {
|
|
|
11414
11358
|
}))), /*#__PURE__*/React.createElement(Pane.Footer, null, /*#__PURE__*/React.createElement("div", {
|
|
11415
11359
|
className: "ntm-roles-pane__footer"
|
|
11416
11360
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
11417
|
-
|
|
11418
|
-
label: t("buttons.proceed"),
|
|
11361
|
+
label: t("buttons.saveChanges"),
|
|
11419
11362
|
disabled: !dirty || isSubmitting,
|
|
11420
11363
|
type: "submit",
|
|
11421
11364
|
loading: isSubmitting
|
|
11422
11365
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
11423
|
-
size: "large",
|
|
11424
11366
|
style: "text",
|
|
11425
11367
|
label: t("buttons.cancel"),
|
|
11426
11368
|
onClick: onClose
|
|
@@ -11525,9 +11467,9 @@ const EmptyStateSVG = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
11525
11467
|
|
|
11526
11468
|
const EmptyState = _ref => {
|
|
11527
11469
|
let title = _ref.title,
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11470
|
+
className = _ref.className,
|
|
11471
|
+
_ref$actionBlock = _ref.actionBlock,
|
|
11472
|
+
actionBlock = _ref$actionBlock === void 0 ? null : _ref$actionBlock;
|
|
11531
11473
|
return /*#__PURE__*/React.createElement("div", {
|
|
11532
11474
|
"data-cy": "empty-state-container",
|
|
11533
11475
|
className: classnames(["ntm-empty-state", className])
|
|
@@ -11550,22 +11492,19 @@ const DEFAULT_MANAGE_ROLE_VALUES = {
|
|
|
11550
11492
|
selectedRole: {}
|
|
11551
11493
|
};
|
|
11552
11494
|
|
|
11553
|
-
const renderRolesTooltipContent = roleName => Object.is(roleName, "Admin") ? instance.t("tooltips.
|
|
11495
|
+
const renderRolesTooltipContent = roleName => Object.is(roleName, "Admin") ? instance.t("tooltips.adminMustHaveAccess") : instance.t("tooltips.noPermissionToEditRoles");
|
|
11554
11496
|
const removeDuplicates = array => [...new Set(array)];
|
|
11555
11497
|
|
|
11556
11498
|
const Row = _ref => {
|
|
11557
11499
|
let _ref$allPermissionsOf = _ref.allPermissionsOfCategory,
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
11500
|
+
allPermissionsOfCategory = _ref$allPermissionsOf === void 0 ? null : _ref$allPermissionsOf,
|
|
11501
|
+
config = _ref.config,
|
|
11502
|
+
_ref$permission = _ref.permission,
|
|
11503
|
+
permission = _ref$permission === void 0 ? null : _ref$permission,
|
|
11504
|
+
roles = _ref.roles;
|
|
11564
11505
|
const _useUpdateRole = useUpdateRole({}),
|
|
11565
|
-
|
|
11566
|
-
|
|
11506
|
+
updateRole = _useUpdateRole.mutate;
|
|
11567
11507
|
const allPermissionIdsOfCategory = map(prop("id"), (allPermissionsOfCategory === null || allPermissionsOfCategory === void 0 ? void 0 : allPermissionsOfCategory.permissions) || []);
|
|
11568
|
-
|
|
11569
11508
|
const handleSubmit = (role, checked) => {
|
|
11570
11509
|
const permissionIds = allPermissionIdsOfCategory.length > 0 ? allPermissionIdsOfCategory : [permission.id];
|
|
11571
11510
|
const modifiedRole = modify("permissionIds", () => checked ? removeDuplicates([...role.permissionIds, ...permissionIds]) : role.permissionIds.filter(id => !permissionIds.includes(id)), role);
|
|
@@ -11576,16 +11515,13 @@ const Row = _ref => {
|
|
|
11576
11515
|
}
|
|
11577
11516
|
});
|
|
11578
11517
|
};
|
|
11579
|
-
|
|
11580
11518
|
const isCheckboxChecked = role => !allPermissionsOfCategory ? includes(permission.id, role.permissionIds) : allPermissionIdsOfCategory.every(id => includes(id, role.permissionIds));
|
|
11581
|
-
|
|
11582
11519
|
return /*#__PURE__*/React.createElement("div", {
|
|
11583
11520
|
className: classnames("ntm-roles-table__row", {
|
|
11584
11521
|
"ntm-roles-table__row--highlighted": !!allPermissionsOfCategory
|
|
11585
11522
|
})
|
|
11586
11523
|
}, roles.map((role, index) => {
|
|
11587
11524
|
var _config$permissions$u, _config$permissions, _config$permissions$u2, _config$permissions2;
|
|
11588
|
-
|
|
11589
11525
|
return /*#__PURE__*/React.createElement("div", {
|
|
11590
11526
|
key: index,
|
|
11591
11527
|
className: "ntm-roles-table__cell"
|
|
@@ -11612,14 +11548,14 @@ const Row = _ref => {
|
|
|
11612
11548
|
|
|
11613
11549
|
const TableHeader = _ref => {
|
|
11614
11550
|
let config = _ref.config,
|
|
11615
|
-
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11551
|
+
roles = _ref.roles,
|
|
11552
|
+
setManageRole = _ref.setManageRole,
|
|
11553
|
+
setIsScrollPresent = _ref.setIsScrollPresent;
|
|
11619
11554
|
const _useTranslation = useTranslation(),
|
|
11620
|
-
|
|
11621
|
-
|
|
11555
|
+
t = _useTranslation.t;
|
|
11622
11556
|
const scrollSyncElement = useRef(null);
|
|
11557
|
+
const Menu = Dropdown.Menu,
|
|
11558
|
+
MenuItem = Dropdown.MenuItem;
|
|
11623
11559
|
const getOverflowStatus = useCallback(() => {
|
|
11624
11560
|
if (scrollSyncElement.current) {
|
|
11625
11561
|
const headerElement = scrollSyncElement.current.node;
|
|
@@ -11635,7 +11571,6 @@ const TableHeader = _ref => {
|
|
|
11635
11571
|
className: "ntm-roles-table__header"
|
|
11636
11572
|
}, roles === null || roles === void 0 ? void 0 : roles.map((role, index) => {
|
|
11637
11573
|
var _config$permissions$u, _config$permissions, _config$permissions$u2, _config$permissions2, _config$permissions$d, _config$permissions3, _config$permissions$d2, _config$permissions4;
|
|
11638
|
-
|
|
11639
11574
|
const hasSystemRole = Object.is(role.kind, "system");
|
|
11640
11575
|
return /*#__PURE__*/React.createElement("div", {
|
|
11641
11576
|
key: `ntm-roles-${index}`,
|
|
@@ -11648,17 +11583,18 @@ const TableHeader = _ref => {
|
|
|
11648
11583
|
lineHeight: "normal",
|
|
11649
11584
|
className: "ntm-roles-table-header__role-name"
|
|
11650
11585
|
}, role.name), !hasSystemRole && /*#__PURE__*/React.createElement(Dropdown, {
|
|
11586
|
+
buttonProps: {
|
|
11587
|
+
className: "ntm-roles-table-header__dropdown"
|
|
11588
|
+
},
|
|
11651
11589
|
autoWidth: true,
|
|
11652
11590
|
buttonStyle: "text",
|
|
11653
11591
|
icon: MenuHorizontal
|
|
11654
|
-
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
11592
|
+
}, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
11655
11593
|
content: t("tooltips.noPermissionToEditRoles"),
|
|
11656
11594
|
disabled: (_config$permissions$u = config === null || config === void 0 ? void 0 : (_config$permissions = config.permissions) === null || _config$permissions === void 0 ? void 0 : _config$permissions.update) !== null && _config$permissions$u !== void 0 ? _config$permissions$u : DEFAULT_PERMISSION,
|
|
11657
|
-
position: "
|
|
11658
|
-
}, /*#__PURE__*/React.createElement("
|
|
11659
|
-
|
|
11660
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
11661
|
-
label: t("common.edit"),
|
|
11595
|
+
position: "left"
|
|
11596
|
+
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(MenuItem.Button, {
|
|
11597
|
+
size: "small",
|
|
11662
11598
|
onClick: () => setManageRole({
|
|
11663
11599
|
isEdit: true,
|
|
11664
11600
|
selectedRole: role
|
|
@@ -11666,43 +11602,37 @@ const TableHeader = _ref => {
|
|
|
11666
11602
|
disabled: !((_config$permissions$u2 = config === null || config === void 0 ? void 0 : (_config$permissions2 = config.permissions) === null || _config$permissions2 === void 0 ? void 0 : _config$permissions2.update) !== null && _config$permissions$u2 !== void 0 ? _config$permissions$u2 : DEFAULT_PERMISSION),
|
|
11667
11603
|
style: "text",
|
|
11668
11604
|
className: "ntm-dropdown__button"
|
|
11669
|
-
}))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
11605
|
+
}, t("common.edit")))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
11670
11606
|
content: t("tooltips.noPermissionToRemoveRoles"),
|
|
11671
11607
|
disabled: (_config$permissions$d = config === null || config === void 0 ? void 0 : (_config$permissions3 = config.permissions) === null || _config$permissions3 === void 0 ? void 0 : _config$permissions3.delete) !== null && _config$permissions$d !== void 0 ? _config$permissions$d : DEFAULT_PERMISSION,
|
|
11672
|
-
position: "
|
|
11673
|
-
}, /*#__PURE__*/React.createElement("
|
|
11674
|
-
|
|
11675
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
11676
|
-
label: t("common.delete"),
|
|
11608
|
+
position: "left"
|
|
11609
|
+
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(MenuItem.Button, {
|
|
11610
|
+
size: "small",
|
|
11677
11611
|
onClick: () => setManageRole({
|
|
11678
11612
|
isDelete: true,
|
|
11679
11613
|
selectedRole: role
|
|
11680
11614
|
}),
|
|
11681
11615
|
disabled: !((_config$permissions$d2 = config === null || config === void 0 ? void 0 : (_config$permissions4 = config.permissions) === null || _config$permissions4 === void 0 ? void 0 : _config$permissions4.delete) !== null && _config$permissions$d2 !== void 0 ? _config$permissions$d2 : DEFAULT_PERMISSION),
|
|
11682
|
-
style: "danger
|
|
11616
|
+
style: "danger",
|
|
11683
11617
|
className: "ntm-dropdown__button"
|
|
11684
|
-
}))))));
|
|
11618
|
+
}, t("common.delete"))))))));
|
|
11685
11619
|
})));
|
|
11686
11620
|
};
|
|
11687
11621
|
|
|
11688
11622
|
const Delete = _ref => {
|
|
11689
11623
|
let isOpen = _ref.isOpen,
|
|
11690
|
-
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11624
|
+
onClose = _ref.onClose,
|
|
11625
|
+
selectedRole = _ref.selectedRole,
|
|
11626
|
+
roles = _ref.roles;
|
|
11694
11627
|
const _useTranslation = useTranslation(),
|
|
11695
|
-
|
|
11696
|
-
|
|
11628
|
+
t = _useTranslation.t;
|
|
11697
11629
|
const _useDestroyRole = useDestroyRole({
|
|
11698
|
-
|
|
11699
|
-
|
|
11700
|
-
|
|
11701
|
-
|
|
11702
|
-
|
|
11630
|
+
onSuccess: onClose
|
|
11631
|
+
}),
|
|
11632
|
+
deleteRole = _useDestroyRole.mutate,
|
|
11633
|
+
isDeleting = _useDestroyRole.isLoading;
|
|
11703
11634
|
const handleDelete = () => {
|
|
11704
11635
|
var _roles$find;
|
|
11705
|
-
|
|
11706
11636
|
const id = selectedRole.id;
|
|
11707
11637
|
const payload = {
|
|
11708
11638
|
newRoleId: (_roles$find = roles.find(role => role.id !== id)) === null || _roles$find === void 0 ? void 0 : _roles$find.id
|
|
@@ -11712,7 +11642,6 @@ const Delete = _ref => {
|
|
|
11712
11642
|
payload
|
|
11713
11643
|
});
|
|
11714
11644
|
};
|
|
11715
|
-
|
|
11716
11645
|
return /*#__PURE__*/React.createElement(Alert, {
|
|
11717
11646
|
isOpen: isOpen,
|
|
11718
11647
|
onClose: onClose,
|
|
@@ -11730,28 +11659,22 @@ const Delete = _ref => {
|
|
|
11730
11659
|
};
|
|
11731
11660
|
|
|
11732
11661
|
function ownKeys$3(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; }
|
|
11733
|
-
|
|
11734
11662
|
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11735
|
-
|
|
11736
11663
|
const Edit = _ref => {
|
|
11737
11664
|
let isOpen = _ref.isOpen,
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11665
|
+
onClose = _ref.onClose,
|
|
11666
|
+
selectedRole = _ref.selectedRole;
|
|
11741
11667
|
const _useTranslation = useTranslation(),
|
|
11742
|
-
|
|
11743
|
-
|
|
11668
|
+
t = _useTranslation.t;
|
|
11744
11669
|
const _useUpdateRole = useUpdateRole({
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11670
|
+
onSuccess: onClose
|
|
11671
|
+
}),
|
|
11672
|
+
updateRole = _useUpdateRole.mutate,
|
|
11673
|
+
isSubmitting = _useUpdateRole.isLoading;
|
|
11750
11674
|
const initialValues = {
|
|
11751
11675
|
name: selectedRole === null || selectedRole === void 0 ? void 0 : selectedRole.name,
|
|
11752
11676
|
description: selectedRole === null || selectedRole === void 0 ? void 0 : selectedRole.description
|
|
11753
11677
|
};
|
|
11754
|
-
|
|
11755
11678
|
const handleFormSubmit = formValues => {
|
|
11756
11679
|
const payload = {
|
|
11757
11680
|
organizationRole: _objectSpread$3(_objectSpread$3(_objectSpread$3({}, selectedRole), formValues), {}, {
|
|
@@ -11763,7 +11686,6 @@ const Edit = _ref => {
|
|
|
11763
11686
|
payload
|
|
11764
11687
|
});
|
|
11765
11688
|
};
|
|
11766
|
-
|
|
11767
11689
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
11768
11690
|
isOpen: isOpen,
|
|
11769
11691
|
onClose: onClose
|
|
@@ -11783,7 +11705,6 @@ const Edit = _ref => {
|
|
|
11783
11705
|
className: "ntm-roles-modal__body"
|
|
11784
11706
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
11785
11707
|
required: true,
|
|
11786
|
-
autoFocus: true,
|
|
11787
11708
|
name: "name",
|
|
11788
11709
|
label: t("common.name"),
|
|
11789
11710
|
placeholder: t("placeholders.enterRoleName"),
|
|
@@ -11796,12 +11717,10 @@ const Edit = _ref => {
|
|
|
11796
11717
|
className: "ntm-roles-modal__footer"
|
|
11797
11718
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
11798
11719
|
type: "submit",
|
|
11799
|
-
size: "large",
|
|
11800
11720
|
disabled: !dirty || isSubmitting,
|
|
11801
|
-
label: t("buttons.
|
|
11721
|
+
label: t("buttons.saveChanges"),
|
|
11802
11722
|
loading: isSubmitting
|
|
11803
11723
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
11804
|
-
size: "large",
|
|
11805
11724
|
style: "text",
|
|
11806
11725
|
label: t("buttons.cancel"),
|
|
11807
11726
|
onClick: onClose
|
|
@@ -11811,20 +11730,16 @@ const Edit = _ref => {
|
|
|
11811
11730
|
|
|
11812
11731
|
const Columns = _ref => {
|
|
11813
11732
|
let config = _ref.config,
|
|
11814
|
-
|
|
11815
|
-
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11733
|
+
filteredGroupPermissions = _ref.filteredGroupPermissions,
|
|
11734
|
+
filteredRoles = _ref.filteredRoles,
|
|
11735
|
+
roles = _ref.roles,
|
|
11736
|
+
setIsScrollPresent = _ref.setIsScrollPresent;
|
|
11819
11737
|
const _useState = useState(DEFAULT_MANAGE_ROLE_VALUES),
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11738
|
+
_useState2 = _slicedToArray$2(_useState, 2),
|
|
11739
|
+
manageRole = _useState2[0],
|
|
11740
|
+
setManageRole = _useState2[1];
|
|
11824
11741
|
const categories = Object.keys(filteredGroupPermissions);
|
|
11825
|
-
|
|
11826
11742
|
const onClose = () => setManageRole(DEFAULT_MANAGE_ROLE_VALUES);
|
|
11827
|
-
|
|
11828
11743
|
return /*#__PURE__*/React.createElement("div", {
|
|
11829
11744
|
className: "ntm-roles-table__columns"
|
|
11830
11745
|
}, /*#__PURE__*/React.createElement(TableHeader, {
|
|
@@ -11865,7 +11780,7 @@ const Columns = _ref => {
|
|
|
11865
11780
|
|
|
11866
11781
|
const renderDescription = permissions => permissions === null || permissions === void 0 ? void 0 : permissions.map(_ref => {
|
|
11867
11782
|
let id = _ref.id,
|
|
11868
|
-
|
|
11783
|
+
description = _ref.description;
|
|
11869
11784
|
return /*#__PURE__*/React.createElement("div", {
|
|
11870
11785
|
key: id,
|
|
11871
11786
|
className: "ntm-roles-table-sidebar__list-item"
|
|
@@ -11884,7 +11799,7 @@ const getSearchWrapperStyle = () => {
|
|
|
11884
11799
|
|
|
11885
11800
|
const ToggleDropdown = _ref => {
|
|
11886
11801
|
let isVisible = _ref.isVisible,
|
|
11887
|
-
|
|
11802
|
+
onClick = _ref.onClick;
|
|
11888
11803
|
return isVisible ? /*#__PURE__*/React.createElement(Up, {
|
|
11889
11804
|
size: 16,
|
|
11890
11805
|
strokeWidth: 2,
|
|
@@ -11900,14 +11815,12 @@ const ToggleDropdown = _ref => {
|
|
|
11900
11815
|
|
|
11901
11816
|
const Sidebar = _ref => {
|
|
11902
11817
|
let searchTerm = _ref.searchTerm,
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11818
|
+
setSearchTerm = _ref.setSearchTerm,
|
|
11819
|
+
filteredGroupPermissions = _ref.filteredGroupPermissions,
|
|
11820
|
+
toggleDropdown = _ref.toggleDropdown,
|
|
11821
|
+
isScrollPresent = _ref.isScrollPresent;
|
|
11908
11822
|
const _useTranslation = useTranslation(),
|
|
11909
|
-
|
|
11910
|
-
|
|
11823
|
+
t = _useTranslation.t;
|
|
11911
11824
|
const categories = Object.keys(filteredGroupPermissions);
|
|
11912
11825
|
const searchWrapperStyle = isScrollPresent ? getSearchWrapperStyle() : {};
|
|
11913
11826
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -11950,39 +11863,32 @@ const Sidebar = _ref => {
|
|
|
11950
11863
|
|
|
11951
11864
|
const Table = _ref => {
|
|
11952
11865
|
let config = _ref.config,
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11866
|
+
filteredRoles = _ref.filteredRoles,
|
|
11867
|
+
permissionGroups = _ref.permissionGroups,
|
|
11868
|
+
roles = _ref.roles,
|
|
11869
|
+
setIsNewRolePaneOpen = _ref.setIsNewRolePaneOpen;
|
|
11958
11870
|
const _useTranslation = useTranslation(),
|
|
11959
|
-
|
|
11960
|
-
|
|
11871
|
+
t = _useTranslation.t;
|
|
11961
11872
|
const _useState = useState(""),
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11873
|
+
_useState2 = _slicedToArray$2(_useState, 2),
|
|
11874
|
+
searchTerm = _useState2[0],
|
|
11875
|
+
setSearchTerm = _useState2[1];
|
|
11966
11876
|
const _useState3 = useState(permissionGroups),
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11877
|
+
_useState4 = _slicedToArray$2(_useState3, 2),
|
|
11878
|
+
filteredGroupPermissions = _useState4[0],
|
|
11879
|
+
setFilteredGroupPermissions = _useState4[1];
|
|
11971
11880
|
const _useState5 = useState(false),
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11881
|
+
_useState6 = _slicedToArray$2(_useState5, 2),
|
|
11882
|
+
isScrollPresent = _useState6[0],
|
|
11883
|
+
setIsScrollPresent = _useState6[1];
|
|
11976
11884
|
const toggleDropdown = category => {
|
|
11977
11885
|
setFilteredGroupPermissions(modifyPath([category, "isPermissionsVisible"], visible => !visible));
|
|
11978
11886
|
};
|
|
11979
|
-
|
|
11980
11887
|
useEffect(() => {
|
|
11981
11888
|
setFilteredGroupPermissions(fromPairs(toPairs(permissionGroups).map(_ref2 => {
|
|
11982
11889
|
let _ref3 = _slicedToArray$2(_ref2, 2),
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11890
|
+
category = _ref3[0],
|
|
11891
|
+
options = _ref3[1];
|
|
11986
11892
|
return [category, modify("permissions", filter(_ref4 => {
|
|
11987
11893
|
let description = _ref4.description;
|
|
11988
11894
|
return includes(searchTerm.toLowerCase().trim(), description === null || description === void 0 ? void 0 : description.toLowerCase().trim());
|
|
@@ -12016,37 +11922,30 @@ const Table = _ref => {
|
|
|
12016
11922
|
|
|
12017
11923
|
const Roles = _ref => {
|
|
12018
11924
|
var _config$permissions$v, _config$permissions, _config$permissions$v2, _config$permissions2;
|
|
12019
|
-
|
|
12020
11925
|
let config = _ref.config;
|
|
12021
|
-
|
|
12022
11926
|
const _useState = useState(""),
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
11927
|
+
_useState2 = _slicedToArray$2(_useState, 2),
|
|
11928
|
+
searchString = _useState2[0],
|
|
11929
|
+
setSearchString = _useState2[1];
|
|
12027
11930
|
const _useState3 = useState([]),
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
11931
|
+
_useState4 = _slicedToArray$2(_useState3, 2),
|
|
11932
|
+
filteredRoles = _useState4[0],
|
|
11933
|
+
setFilteredRoles = _useState4[1];
|
|
12032
11934
|
const _useState5 = useState(false),
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
11935
|
+
_useState6 = _slicedToArray$2(_useState5, 2),
|
|
11936
|
+
isNewRolePaneOpen = _useState6[0],
|
|
11937
|
+
setIsNewRolePaneOpen = _useState6[1];
|
|
12037
11938
|
const _useFetchRoles = useFetchRoles({
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
11939
|
+
onSuccess: roles => setFilteredRoles(roles),
|
|
11940
|
+
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
|
|
11941
|
+
}),
|
|
11942
|
+
roles = _useFetchRoles.data,
|
|
11943
|
+
isRolesLoading = _useFetchRoles.isLoading;
|
|
12044
11944
|
const _useFetchPermissions = useFetchPermissions({
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
11945
|
+
enabled: (_config$permissions$v2 = config === null || config === void 0 ? void 0 : (_config$permissions2 = config.permissions) === null || _config$permissions2 === void 0 ? void 0 : _config$permissions2.view) !== null && _config$permissions$v2 !== void 0 ? _config$permissions$v2 : DEFAULT_PERMISSION
|
|
11946
|
+
}),
|
|
11947
|
+
permissions = _useFetchPermissions.data,
|
|
11948
|
+
isPermissionsLoading = _useFetchPermissions.isLoading;
|
|
12050
11949
|
const permissionGroups = getPermissionGroups(permissions);
|
|
12051
11950
|
useEffect(() => {
|
|
12052
11951
|
setFilteredRoles(filter(_ref2 => {
|
|
@@ -12054,13 +11953,11 @@ const Roles = _ref => {
|
|
|
12054
11953
|
return includes(searchString.toLowerCase().trim(), name.toLowerCase().trim());
|
|
12055
11954
|
}, roles || []));
|
|
12056
11955
|
}, [roles, searchString]);
|
|
12057
|
-
|
|
12058
11956
|
if (isRolesLoading || isPermissionsLoading) {
|
|
12059
11957
|
return /*#__PURE__*/React.createElement("div", {
|
|
12060
11958
|
className: "ntm-members-page-loader"
|
|
12061
11959
|
}, /*#__PURE__*/React.createElement(PageLoader, null));
|
|
12062
11960
|
}
|
|
12063
|
-
|
|
12064
11961
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(dist.exports.ScrollSync, null, /*#__PURE__*/React.createElement(Container, {
|
|
12065
11962
|
isHeaderFixed: true
|
|
12066
11963
|
}, /*#__PURE__*/React.createElement(Header$1, {
|
|
@@ -12080,7 +11977,6 @@ const Roles = _ref => {
|
|
|
12080
11977
|
permissions: permissions
|
|
12081
11978
|
}));
|
|
12082
11979
|
};
|
|
12083
|
-
|
|
12084
11980
|
Roles.defaultProps = {
|
|
12085
11981
|
config: {
|
|
12086
11982
|
membersPageUrl: "/members"
|
|
@@ -12091,11 +11987,8 @@ var index$1 = withReactQuery(Roles);
|
|
|
12091
11987
|
const fetch = params => axios.get(`${BASE_URL}/teams`, {
|
|
12092
11988
|
params
|
|
12093
11989
|
});
|
|
12094
|
-
|
|
12095
11990
|
const create = payload => axios.post(`${BASE_URL}/teams`, payload);
|
|
12096
|
-
|
|
12097
11991
|
const update = (id, payload) => axios.put(`${BASE_URL}/teams/${id}`, payload);
|
|
12098
|
-
|
|
12099
11992
|
const teamsApi = {
|
|
12100
11993
|
fetch,
|
|
12101
11994
|
create,
|
|
@@ -12103,12 +11996,9 @@ const teamsApi = {
|
|
|
12103
11996
|
};
|
|
12104
11997
|
|
|
12105
11998
|
const _excluded = ["onSuccess"],
|
|
12106
|
-
|
|
12107
|
-
|
|
11999
|
+
_excluded2 = ["onSuccess"];
|
|
12108
12000
|
function ownKeys$2(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; }
|
|
12109
|
-
|
|
12110
12001
|
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12111
|
-
|
|
12112
12002
|
const useFetchMembers = function () {
|
|
12113
12003
|
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12114
12004
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -12118,11 +12008,9 @@ const useFetchMembers = function () {
|
|
|
12118
12008
|
keepPreviousData: true
|
|
12119
12009
|
}, options));
|
|
12120
12010
|
};
|
|
12121
|
-
|
|
12122
12011
|
const useCreateMember = _ref => {
|
|
12123
12012
|
let onSuccess = _ref.onSuccess,
|
|
12124
|
-
|
|
12125
|
-
|
|
12013
|
+
options = _objectWithoutProperties$1(_ref, _excluded);
|
|
12126
12014
|
return useMutation(teamsApi.create, _objectSpread$2({
|
|
12127
12015
|
onSuccess: response => {
|
|
12128
12016
|
queryClient.invalidateQueries(QUERY_KEYS.TEAMS);
|
|
@@ -12131,14 +12019,12 @@ const useCreateMember = _ref => {
|
|
|
12131
12019
|
}
|
|
12132
12020
|
}, options));
|
|
12133
12021
|
};
|
|
12134
|
-
|
|
12135
12022
|
const useUpdateMember = _ref2 => {
|
|
12136
12023
|
let onSuccess = _ref2.onSuccess,
|
|
12137
|
-
|
|
12138
|
-
|
|
12024
|
+
options = _objectWithoutProperties$1(_ref2, _excluded2);
|
|
12139
12025
|
return useMutation(_ref3 => {
|
|
12140
12026
|
let id = _ref3.id,
|
|
12141
|
-
|
|
12027
|
+
payload = _ref3.payload;
|
|
12142
12028
|
return teamsApi.update(id, payload);
|
|
12143
12029
|
}, _objectSpread$2({
|
|
12144
12030
|
onSuccess: response => {
|
|
@@ -12151,12 +12037,10 @@ const useUpdateMember = _ref2 => {
|
|
|
12151
12037
|
|
|
12152
12038
|
const useDebounce = function (value) {
|
|
12153
12039
|
let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
12154
|
-
|
|
12155
12040
|
const _useState = useState(value),
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12041
|
+
_useState2 = _slicedToArray$2(_useState, 2),
|
|
12042
|
+
debouncedValue = _useState2[0],
|
|
12043
|
+
setDebouncedValue = _useState2[1];
|
|
12160
12044
|
useEffect(() => {
|
|
12161
12045
|
const handler = setTimeout(() => setDebouncedValue(value), delay);
|
|
12162
12046
|
return () => clearTimeout(handler);
|
|
@@ -12166,19 +12050,16 @@ const useDebounce = function (value) {
|
|
|
12166
12050
|
|
|
12167
12051
|
const Header = _ref => {
|
|
12168
12052
|
var _permissions$create, _permissions$create2;
|
|
12169
|
-
|
|
12170
12053
|
let _ref$metaName = _ref.metaName,
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12054
|
+
metaName = _ref$metaName === void 0 ? "" : _ref$metaName,
|
|
12055
|
+
_ref$onClick = _ref.onClick,
|
|
12056
|
+
onClick = _ref$onClick === void 0 ? noop$2 : _ref$onClick,
|
|
12057
|
+
permissions = _ref.permissions;
|
|
12175
12058
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
12176
12059
|
content: instance.t("tooltips.noPermissionToAddMember"),
|
|
12177
12060
|
disabled: (_permissions$create = permissions === null || permissions === void 0 ? void 0 : permissions.create) !== null && _permissions$create !== void 0 ? _permissions$create : hasPermission(MANAGE_MEMBER_PERMISSIONS),
|
|
12178
12061
|
position: "bottom"
|
|
12179
12062
|
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Button, {
|
|
12180
|
-
icon: Plus,
|
|
12181
|
-
size: "large",
|
|
12182
12063
|
label: instance.t("common.add_", {
|
|
12183
12064
|
what: instance.t(metaName, SINGULAR).toLocaleLowerCase()
|
|
12184
12065
|
}),
|
|
@@ -12189,7 +12070,7 @@ const Header = _ref => {
|
|
|
12189
12070
|
|
|
12190
12071
|
const Left = _ref => {
|
|
12191
12072
|
let metaName = _ref.metaName,
|
|
12192
|
-
|
|
12073
|
+
count = _ref.count;
|
|
12193
12074
|
return /*#__PURE__*/React.createElement(Typography, {
|
|
12194
12075
|
style: "h4",
|
|
12195
12076
|
component: "h4"
|
|
@@ -12197,24 +12078,23 @@ const Left = _ref => {
|
|
|
12197
12078
|
count
|
|
12198
12079
|
}).toLocaleLowerCase());
|
|
12199
12080
|
};
|
|
12200
|
-
|
|
12201
12081
|
Left.defaultProps = {
|
|
12202
12082
|
metaName: "metaNames.member",
|
|
12203
12083
|
count: 0
|
|
12204
12084
|
};
|
|
12205
|
-
|
|
12206
12085
|
const Right = _ref2 => {
|
|
12207
12086
|
let rolesButtonProps = _ref2.rolesButtonProps;
|
|
12208
12087
|
const isVisible = !!rolesButtonProps;
|
|
12209
12088
|
const permissions = window.globalProps.permissions;
|
|
12210
12089
|
const hasRequiredPermissions = permissions && hasPermission(MANAGE_MEMBER_PERMISSIONS);
|
|
12211
12090
|
return isVisible && hasRequiredPermissions ? /*#__PURE__*/React.createElement(Button, _extends({
|
|
12091
|
+
size: "small",
|
|
12092
|
+
style: "secondary",
|
|
12212
12093
|
label: instance.t("common.manage_", {
|
|
12213
12094
|
what: instance.t("common.role", PLURAL).toLocaleLowerCase()
|
|
12214
12095
|
})
|
|
12215
12096
|
}, rolesButtonProps)) : null;
|
|
12216
12097
|
};
|
|
12217
|
-
|
|
12218
12098
|
const SubHeader = {
|
|
12219
12099
|
Left,
|
|
12220
12100
|
Right
|
|
@@ -12244,7 +12124,7 @@ const DEFAULT_MEMBER_FILTER = MEMBER_FILTER.ACTIVE.value;
|
|
|
12244
12124
|
const DEFAULT_PAGE_NUMBER = 1;
|
|
12245
12125
|
const DEFAULT_PAGE_SIZE = 10;
|
|
12246
12126
|
const DROPDOWN_BUTTON_PROPS = {
|
|
12247
|
-
size: "
|
|
12127
|
+
size: "medium"
|
|
12248
12128
|
};
|
|
12249
12129
|
const DEFAULT_IS_OPEN_VALUES = {
|
|
12250
12130
|
menuBar: false,
|
|
@@ -12261,100 +12141,84 @@ const DEFAULT_FILTER_VALUES = {
|
|
|
12261
12141
|
};
|
|
12262
12142
|
|
|
12263
12143
|
function ownKeys$1(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; }
|
|
12264
|
-
|
|
12265
12144
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12266
|
-
|
|
12267
12145
|
const renderNameColumn = (_ref, diplayStatusTag) => {
|
|
12268
12146
|
let displayName = _ref.displayName,
|
|
12269
|
-
|
|
12270
|
-
|
|
12147
|
+
imageUrl = _ref.profileImageUrl,
|
|
12148
|
+
active = _ref.active;
|
|
12271
12149
|
return /*#__PURE__*/React.createElement("div", {
|
|
12272
12150
|
className: "ntm-members-table__column"
|
|
12273
12151
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
12274
12152
|
user: {
|
|
12275
|
-
displayName,
|
|
12153
|
+
name: displayName,
|
|
12276
12154
|
imageUrl
|
|
12277
12155
|
},
|
|
12278
12156
|
size: "medium"
|
|
12279
12157
|
}), displayName, diplayStatusTag && /*#__PURE__*/React.createElement(Tag, {
|
|
12280
|
-
|
|
12281
|
-
|
|
12158
|
+
type: "outline",
|
|
12159
|
+
style: active ? "primary" : "secondary",
|
|
12282
12160
|
label: active ? MEMBER_FILTER.ACTIVE.label : MEMBER_FILTER.DEACTIVATED.label
|
|
12283
12161
|
}));
|
|
12284
12162
|
};
|
|
12285
|
-
|
|
12286
|
-
const isCurrentUserEmail = email => {
|
|
12287
|
-
const user = window.globalProps.user;
|
|
12288
|
-
return (user === null || user === void 0 ? void 0 : user.email) === email;
|
|
12289
|
-
};
|
|
12290
|
-
|
|
12291
|
-
const isDropDownButtonDisabled = (email, permissions) => {
|
|
12163
|
+
const isDropDownButtonDisabled = permissions => {
|
|
12292
12164
|
var _permissions$update;
|
|
12293
|
-
|
|
12294
|
-
return !((_permissions$update = permissions === null || permissions === void 0 ? void 0 : permissions.update) !== null && _permissions$update !== void 0 ? _permissions$update : hasPermission(MANAGE_MEMBER_PERMISSIONS)) || isCurrentUserEmail(email);
|
|
12165
|
+
return !((_permissions$update = permissions === null || permissions === void 0 ? void 0 : permissions.update) !== null && _permissions$update !== void 0 ? _permissions$update : hasPermission(MANAGE_MEMBER_PERMISSIONS));
|
|
12295
12166
|
};
|
|
12296
|
-
|
|
12297
|
-
const getDropDownTooltipContent = email => isCurrentUserEmail(email) ? instance.t("tooltips.editCurrentUserNotAllowed") : instance.t("tooltips.noPermissionToEditMembers");
|
|
12298
|
-
|
|
12299
12167
|
const renderDropdownButton = (_ref2, handleUpdateStatus, handleUpdateRole, permissions) => {
|
|
12300
12168
|
let displayName = _ref2.displayName,
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12169
|
+
id = _ref2.id,
|
|
12170
|
+
active = _ref2.active,
|
|
12171
|
+
email = _ref2.email,
|
|
12172
|
+
role = _ref2.role;
|
|
12173
|
+
const Menu = Dropdown.Menu,
|
|
12174
|
+
MenuItem = Dropdown.MenuItem;
|
|
12305
12175
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
12306
|
-
content:
|
|
12307
|
-
disabled: !isDropDownButtonDisabled(
|
|
12176
|
+
content: instance.t("tooltips.noPermissionToEditMembers"),
|
|
12177
|
+
disabled: !isDropDownButtonDisabled(permissions),
|
|
12308
12178
|
position: "top"
|
|
12309
12179
|
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
12310
12180
|
icon: MenuHorizontal,
|
|
12311
12181
|
buttonStyle: "text",
|
|
12312
12182
|
buttonProps: DROPDOWN_BUTTON_PROPS,
|
|
12313
12183
|
strategy: "fixed",
|
|
12314
|
-
disabled: isDropDownButtonDisabled(
|
|
12315
|
-
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
12184
|
+
disabled: isDropDownButtonDisabled(permissions)
|
|
12185
|
+
}, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
12316
12186
|
content: instance.t("tooltips.activateUserToEdit"),
|
|
12317
12187
|
disabled: active,
|
|
12318
12188
|
position: "top"
|
|
12319
|
-
}, /*#__PURE__*/React.createElement("
|
|
12320
|
-
|
|
12189
|
+
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(MenuItem.Button, {
|
|
12190
|
+
size: "small",
|
|
12191
|
+
className: "ntm-dropdown__button",
|
|
12321
12192
|
onClick: () => active && handleUpdateRole({
|
|
12322
12193
|
id,
|
|
12323
12194
|
email,
|
|
12324
12195
|
role
|
|
12325
|
-
})
|
|
12326
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
12327
|
-
className: "ntm-dropdown__button",
|
|
12328
|
-
label: instance.t("common.edit"),
|
|
12196
|
+
}),
|
|
12329
12197
|
disabled: !active,
|
|
12330
12198
|
style: "text"
|
|
12331
|
-
}))), /*#__PURE__*/React.createElement(
|
|
12332
|
-
|
|
12199
|
+
}, instance.t("common.edit")))), /*#__PURE__*/React.createElement(MenuItem.Button, {
|
|
12200
|
+
size: "small",
|
|
12201
|
+
className: "ntm-dropdown__button",
|
|
12333
12202
|
onClick: () => handleUpdateStatus({
|
|
12334
12203
|
id,
|
|
12335
12204
|
name: displayName,
|
|
12336
12205
|
active
|
|
12337
|
-
})
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
label: active ? instance.t("common.deactivate") : instance.t("common.activate"),
|
|
12341
|
-
style: active ? "danger-text" : "text"
|
|
12342
|
-
})))));
|
|
12206
|
+
}),
|
|
12207
|
+
style: active && "danger"
|
|
12208
|
+
}, active ? instance.t("common.deactivate") : instance.t("common.activate"))))));
|
|
12343
12209
|
};
|
|
12344
|
-
|
|
12345
12210
|
const getDefaultAlertTitle = _ref3 => {
|
|
12346
12211
|
let member = _ref3.member,
|
|
12347
|
-
|
|
12212
|
+
metaName = _ref3.metaName;
|
|
12348
12213
|
return member !== null && member !== void 0 && member.active ? instance.t("common.deactivate_", {
|
|
12349
12214
|
what: instance.t(metaName, SINGULAR).toLocaleLowerCase()
|
|
12350
12215
|
}) : instance.t("common.activate_", {
|
|
12351
12216
|
what: instance.t(metaName, SINGULAR).toLocaleLowerCase()
|
|
12352
12217
|
});
|
|
12353
12218
|
};
|
|
12354
|
-
|
|
12355
12219
|
const getDefaultAlertMessage = _ref4 => {
|
|
12356
12220
|
let member = _ref4.member,
|
|
12357
|
-
|
|
12221
|
+
metaName = _ref4.metaName;
|
|
12358
12222
|
return member !== null && member !== void 0 && member.active ? instance.t("alerts.deactivating_", {
|
|
12359
12223
|
what: instance.t(metaName, SINGULAR).toLocaleLowerCase(),
|
|
12360
12224
|
person: member === null || member === void 0 ? void 0 : member.name
|
|
@@ -12363,12 +12227,11 @@ const getDefaultAlertMessage = _ref4 => {
|
|
|
12363
12227
|
person: member === null || member === void 0 ? void 0 : member.name
|
|
12364
12228
|
});
|
|
12365
12229
|
};
|
|
12366
|
-
|
|
12367
12230
|
const getColumnData = _ref5 => {
|
|
12368
12231
|
let memberFilter = _ref5.memberFilter,
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12232
|
+
handleUpdateStatus = _ref5.handleUpdateStatus,
|
|
12233
|
+
handleUpdateRole = _ref5.handleUpdateRole,
|
|
12234
|
+
permissions = _ref5.permissions;
|
|
12372
12235
|
const diplayStatusTag = identical(memberFilter, MEMBER_FILTER.ALL.value);
|
|
12373
12236
|
return [{
|
|
12374
12237
|
title: instance.t("common.name"),
|
|
@@ -12400,20 +12263,16 @@ const renderHeaderTitle = (filterStatus, metaName) => instance.t(`common.${toLow
|
|
|
12400
12263
|
});
|
|
12401
12264
|
const renderUpdateAlert = (field, props) => {
|
|
12402
12265
|
var _config$alert;
|
|
12403
|
-
|
|
12404
12266
|
const config = props.config,
|
|
12405
|
-
|
|
12406
|
-
|
|
12267
|
+
member = props.member;
|
|
12407
12268
|
if (config !== null && config !== void 0 && (_config$alert = config.alert) !== null && _config$alert !== void 0 && _config$alert[field]) {
|
|
12408
12269
|
var _config$alert2;
|
|
12409
|
-
|
|
12410
12270
|
return (_config$alert2 = config.alert) === null || _config$alert2 === void 0 ? void 0 : _config$alert2[field]({
|
|
12411
12271
|
active: member === null || member === void 0 ? void 0 : member.active,
|
|
12412
12272
|
id: member === null || member === void 0 ? void 0 : member.id,
|
|
12413
12273
|
name: member === null || member === void 0 ? void 0 : member.name
|
|
12414
12274
|
});
|
|
12415
12275
|
}
|
|
12416
|
-
|
|
12417
12276
|
return field === "title" ? getDefaultAlertTitle(props) : getDefaultAlertMessage(props);
|
|
12418
12277
|
};
|
|
12419
12278
|
const getSearchParams = (page, filter) => new URLSearchParams(_objectSpread$1(_objectSpread$1({}, page), {}, {
|
|
@@ -12454,7 +12313,7 @@ const renderInitialValues = selectedMember => ({
|
|
|
12454
12313
|
});
|
|
12455
12314
|
const renderPayload = function (_ref) {
|
|
12456
12315
|
let role = _ref.role,
|
|
12457
|
-
|
|
12316
|
+
emails = _ref.emails;
|
|
12458
12317
|
let selectedMember = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
12459
12318
|
return selectedMember ? {
|
|
12460
12319
|
active: true,
|
|
@@ -12469,25 +12328,21 @@ const renderPayload = function (_ref) {
|
|
|
12469
12328
|
|
|
12470
12329
|
const ManageMember = _ref => {
|
|
12471
12330
|
var _config$manageMember;
|
|
12472
|
-
|
|
12473
12331
|
let config = _ref.config,
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12332
|
+
isOpen = _ref.isOpen,
|
|
12333
|
+
metaName = _ref.metaName,
|
|
12334
|
+
onClose = _ref.onClose,
|
|
12335
|
+
_ref$roles = _ref.roles,
|
|
12336
|
+
roles = _ref$roles === void 0 ? [] : _ref$roles,
|
|
12337
|
+
selectedMember = _ref.selectedMember;
|
|
12481
12338
|
const _useState = useState(false),
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
|
|
12485
|
-
|
|
12339
|
+
_useState2 = _slicedToArray$2(_useState, 2),
|
|
12340
|
+
hasSubmitted = _useState2[0],
|
|
12341
|
+
setHasSubmitted = _useState2[1];
|
|
12486
12342
|
const onPaneClose = () => {
|
|
12487
12343
|
onClose();
|
|
12488
12344
|
setHasSubmitted(false);
|
|
12489
12345
|
};
|
|
12490
|
-
|
|
12491
12346
|
const manageMemberProps = {
|
|
12492
12347
|
hasSubmitted,
|
|
12493
12348
|
onPaneClose,
|
|
@@ -12495,31 +12350,26 @@ const ManageMember = _ref => {
|
|
|
12495
12350
|
selectedMember,
|
|
12496
12351
|
queryClient
|
|
12497
12352
|
};
|
|
12498
|
-
|
|
12499
12353
|
const _useCreateMember = useCreateMember({
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
}
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
isCreatingMember = _useCreateMember.isLoading;
|
|
12509
|
-
|
|
12354
|
+
onSuccess: () => {
|
|
12355
|
+
var _config$createMember, _config$createMember$;
|
|
12356
|
+
onPaneClose();
|
|
12357
|
+
config === null || config === void 0 ? void 0 : (_config$createMember = config.createMember) === null || _config$createMember === void 0 ? void 0 : (_config$createMember$ = _config$createMember.onSuccess) === null || _config$createMember$ === void 0 ? void 0 : _config$createMember$.callback();
|
|
12358
|
+
}
|
|
12359
|
+
}),
|
|
12360
|
+
createMember = _useCreateMember.mutate,
|
|
12361
|
+
isCreatingMember = _useCreateMember.isLoading;
|
|
12510
12362
|
const _useUpdateMember = useUpdateMember({
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12363
|
+
onSuccess: onPaneClose
|
|
12364
|
+
}),
|
|
12365
|
+
updateMember = _useUpdateMember.mutate,
|
|
12366
|
+
isUpdatingMember = _useUpdateMember.isLoading;
|
|
12516
12367
|
const handleAddMember = values => {
|
|
12517
12368
|
selectedMember ? updateMember({
|
|
12518
12369
|
id: selectedMember.id,
|
|
12519
12370
|
payload: renderPayload(values, selectedMember)
|
|
12520
12371
|
}) : createMember(renderPayload(values));
|
|
12521
12372
|
};
|
|
12522
|
-
|
|
12523
12373
|
const isSubmitting = isCreatingMember || isUpdatingMember;
|
|
12524
12374
|
return /*#__PURE__*/React.createElement(Pane, {
|
|
12525
12375
|
isOpen: isOpen,
|
|
@@ -12541,10 +12391,10 @@ const ManageMember = _ref => {
|
|
|
12541
12391
|
enableReinitialize: true
|
|
12542
12392
|
}, _ref2 => {
|
|
12543
12393
|
let values = _ref2.values,
|
|
12544
|
-
|
|
12545
|
-
|
|
12394
|
+
setFieldValue = _ref2.setFieldValue,
|
|
12395
|
+
dirty = _ref2.dirty;
|
|
12546
12396
|
const emails = values.emails,
|
|
12547
|
-
|
|
12397
|
+
role = values.role;
|
|
12548
12398
|
const roleValue = role && {
|
|
12549
12399
|
label: role,
|
|
12550
12400
|
value: role
|
|
@@ -12554,12 +12404,11 @@ const ManageMember = _ref => {
|
|
|
12554
12404
|
}, selectedMember ? /*#__PURE__*/React.createElement(Input, {
|
|
12555
12405
|
name: "emails",
|
|
12556
12406
|
"data-cy": "add-member-email-text-field",
|
|
12557
|
-
size: "
|
|
12407
|
+
size: "medium",
|
|
12558
12408
|
label: instance.t("common.email", SINGULAR),
|
|
12559
12409
|
value: head(emails).value,
|
|
12560
12410
|
disabled: selectedMember
|
|
12561
12411
|
}) : /*#__PURE__*/React.createElement(EmailInput, {
|
|
12562
|
-
autoFocus: true,
|
|
12563
12412
|
name: "emails",
|
|
12564
12413
|
"data-cy": "add-member-email-input",
|
|
12565
12414
|
counter: COUNTER_PROPS,
|
|
@@ -12572,11 +12421,10 @@ const ManageMember = _ref => {
|
|
|
12572
12421
|
required: true,
|
|
12573
12422
|
name: "role",
|
|
12574
12423
|
"data-cy": "add-member-role-select",
|
|
12575
|
-
size: "
|
|
12424
|
+
size: "medium",
|
|
12576
12425
|
label: instance.t("common.role", SINGULAR),
|
|
12577
12426
|
placeholder: instance.t("placeholders.role"),
|
|
12578
12427
|
value: roleValue,
|
|
12579
|
-
autoFocus: !!selectedMember,
|
|
12580
12428
|
onChange: _ref3 => {
|
|
12581
12429
|
let value = _ref3.value;
|
|
12582
12430
|
return setFieldValue("role", value);
|
|
@@ -12590,15 +12438,13 @@ const ManageMember = _ref => {
|
|
|
12590
12438
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
12591
12439
|
type: "submit",
|
|
12592
12440
|
"data-cy": "add-member-submit-button",
|
|
12593
|
-
size: "large",
|
|
12594
12441
|
style: "primary",
|
|
12595
|
-
label: instance.t("buttons.
|
|
12442
|
+
label: instance.t("buttons.saveChanges"),
|
|
12596
12443
|
onClick: () => setHasSubmitted(true),
|
|
12597
12444
|
disabled: !dirty || isSubmitting,
|
|
12598
12445
|
loading: isSubmitting
|
|
12599
12446
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
12600
12447
|
"data-cy": "add-member-cancel-button",
|
|
12601
|
-
size: "large",
|
|
12602
12448
|
style: "text",
|
|
12603
12449
|
label: instance.t("buttons.cancel"),
|
|
12604
12450
|
onClick: onPaneClose
|
|
@@ -12608,10 +12454,10 @@ const ManageMember = _ref => {
|
|
|
12608
12454
|
|
|
12609
12455
|
const Menu = _ref => {
|
|
12610
12456
|
let isMenuOpen = _ref.isMenuOpen,
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12457
|
+
metaName = _ref.metaName,
|
|
12458
|
+
filterCounts = _ref.filterCounts,
|
|
12459
|
+
memberFilter = _ref.memberFilter,
|
|
12460
|
+
handleMemberFilterChange = _ref.handleMemberFilterChange;
|
|
12615
12461
|
const memberFilterKeys = keys(MEMBER_FILTER);
|
|
12616
12462
|
return /*#__PURE__*/React.createElement(MenuBar, {
|
|
12617
12463
|
showMenu: isMenuOpen,
|
|
@@ -12626,58 +12472,47 @@ const Menu = _ref => {
|
|
|
12626
12472
|
};
|
|
12627
12473
|
|
|
12628
12474
|
function ownKeys(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; }
|
|
12629
|
-
|
|
12630
12475
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12631
|
-
|
|
12632
12476
|
const TeamMembers = _ref => {
|
|
12633
12477
|
var _config$permissions$v, _config$permissions, _config$permissions$v2, _config$permissions2;
|
|
12634
|
-
|
|
12635
12478
|
let metaName = _ref.metaName,
|
|
12636
|
-
|
|
12637
|
-
|
|
12479
|
+
config = _ref.config;
|
|
12638
12480
|
const _useState = useState(DEFAULT_IS_OPEN_VALUES),
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12481
|
+
_useState2 = _slicedToArray$2(_useState, 2),
|
|
12482
|
+
isOpen = _useState2[0],
|
|
12483
|
+
setIsOpen = _useState2[1];
|
|
12643
12484
|
const _useState3 = useState(DEFAULT_FILTER_VALUES),
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12485
|
+
_useState4 = _slicedToArray$2(_useState3, 2),
|
|
12486
|
+
filters = _useState4[0],
|
|
12487
|
+
setFilters = _useState4[1];
|
|
12648
12488
|
const _useState5 = useState(null),
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12489
|
+
_useState6 = _slicedToArray$2(_useState5, 2),
|
|
12490
|
+
selectedMember = _useState6[0],
|
|
12491
|
+
setSelectedMember = _useState6[1];
|
|
12653
12492
|
const debouncedSearch = useDebounce(filters.search, 750);
|
|
12654
|
-
|
|
12655
12493
|
const _useFetchMembers = useFetchMembers(_objectSpread(_objectSpread({}, filters), {}, {
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12494
|
+
search: debouncedSearch.trim(),
|
|
12495
|
+
category: filters.category.toLowerCase()
|
|
12496
|
+
}), {
|
|
12497
|
+
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
|
|
12498
|
+
}),
|
|
12499
|
+
team = _useFetchMembers.data,
|
|
12500
|
+
isMembersLoading = _useFetchMembers.isLoading,
|
|
12501
|
+
isMembersFetching = _useFetchMembers.isFetching;
|
|
12665
12502
|
const _useFetchRoles = useFetchRoles({
|
|
12666
|
-
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
|
|
12670
|
-
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
|
|
12503
|
+
select: response => {
|
|
12504
|
+
const roles = response.organizationRoles || response.data.organizationRoles;
|
|
12505
|
+
return pluck("name", roles).sort((a, b) => a.localeCompare(b));
|
|
12506
|
+
},
|
|
12507
|
+
enabled: (_config$permissions$v2 = config === null || config === void 0 ? void 0 : (_config$permissions2 = config.permissions) === null || _config$permissions2 === void 0 ? void 0 : _config$permissions2.view) !== null && _config$permissions$v2 !== void 0 ? _config$permissions$v2 : DEFAULT_PERMISSION
|
|
12508
|
+
}),
|
|
12509
|
+
roles = _useFetchRoles.data,
|
|
12510
|
+
isRolesLoading = _useFetchRoles.isLoading;
|
|
12675
12511
|
const _useUpdateMember = useUpdateMember({
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
|
|
12512
|
+
onSuccess: () => handleAlertClose()
|
|
12513
|
+
}),
|
|
12514
|
+
updateMember = _useUpdateMember.mutate,
|
|
12515
|
+
isUpdatingMember = _useUpdateMember.isLoading;
|
|
12681
12516
|
const searchProps = {
|
|
12682
12517
|
placeholder: instance.t("common.search_", {
|
|
12683
12518
|
what: instance.t(metaName, PLURAL).toLocaleLowerCase()
|
|
@@ -12696,10 +12531,9 @@ const TeamMembers = _ref => {
|
|
|
12696
12531
|
metaName,
|
|
12697
12532
|
config
|
|
12698
12533
|
};
|
|
12699
|
-
|
|
12700
12534
|
const handleUpdateMember = async () => {
|
|
12701
12535
|
const id = selectedMember.id,
|
|
12702
|
-
|
|
12536
|
+
active = selectedMember.active;
|
|
12703
12537
|
const payload = {
|
|
12704
12538
|
active: !active
|
|
12705
12539
|
};
|
|
@@ -12708,45 +12542,37 @@ const TeamMembers = _ref => {
|
|
|
12708
12542
|
payload
|
|
12709
12543
|
});
|
|
12710
12544
|
};
|
|
12711
|
-
|
|
12712
12545
|
const handleUpdateStatus = user => {
|
|
12713
12546
|
setSelectedMember(user);
|
|
12714
12547
|
setIsOpen(assoc("alert", true));
|
|
12715
12548
|
};
|
|
12716
|
-
|
|
12717
12549
|
const handleUpdateRole = user => {
|
|
12718
12550
|
setSelectedMember(user);
|
|
12719
12551
|
setIsOpen(assoc("manageMember", true));
|
|
12720
12552
|
};
|
|
12721
|
-
|
|
12722
12553
|
const handleAlertClose = () => {
|
|
12723
12554
|
setIsOpen(assoc("alert", false));
|
|
12724
12555
|
setSelectedMember(null);
|
|
12725
12556
|
};
|
|
12726
|
-
|
|
12727
12557
|
const handleModalClose = () => {
|
|
12728
12558
|
setIsOpen(assoc("manageMember", false));
|
|
12729
12559
|
setSelectedMember(null);
|
|
12730
12560
|
};
|
|
12731
|
-
|
|
12732
12561
|
const handleMemberFilterChange = filter => {
|
|
12733
12562
|
setFilters(assoc("category", filter));
|
|
12734
12563
|
handlePageChange(setFilters, filter)(DEFAULT_PAGE_NUMBER, filters.results);
|
|
12735
12564
|
};
|
|
12736
|
-
|
|
12737
12565
|
const handleTableChange = (_, __, sorter) => {
|
|
12738
12566
|
setFilters(mergeLeft({
|
|
12739
12567
|
sort_by: sorter.field,
|
|
12740
12568
|
sort_direction: sorter.order
|
|
12741
12569
|
}));
|
|
12742
12570
|
};
|
|
12743
|
-
|
|
12744
12571
|
if (isRolesLoading || isMembersLoading) {
|
|
12745
12572
|
return /*#__PURE__*/React.createElement("div", {
|
|
12746
12573
|
className: "ntm-members-page-loader"
|
|
12747
12574
|
}, /*#__PURE__*/React.createElement(PageLoader, null));
|
|
12748
12575
|
}
|
|
12749
|
-
|
|
12750
12576
|
return /*#__PURE__*/React.createElement("div", {
|
|
12751
12577
|
className: "ntm-members"
|
|
12752
12578
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -12822,7 +12648,6 @@ const TeamMembers = _ref => {
|
|
|
12822
12648
|
isSubmitting: isUpdatingMember
|
|
12823
12649
|
})));
|
|
12824
12650
|
};
|
|
12825
|
-
|
|
12826
12651
|
TeamMembers.defaultProps = {
|
|
12827
12652
|
metaName: "metaNames.member",
|
|
12828
12653
|
config: {
|
|
@@ -12837,7 +12662,7 @@ var index = withReactQuery(TeamMembers);
|
|
|
12837
12662
|
|
|
12838
12663
|
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}}
|
|
12839
12664
|
|
|
12840
|
-
var css = ":root {\n --ntm-roles-table-default-scroll: 15px;\n}\n\n.ntm-dropdown__item {\n background-color: transparent !important;\n padding: 0 !important;\n}\n\n.ntm-dropdown__button {\n border-radius: 0 !important;\n font-weight: 400;\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 background-color: #ffffff;\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-pane__header {\n margin-bottom: 0.5rem;\n}\n.ntm-members-pane__body {\n width: 100%;\n}\n.ntm-members-pane__body > * + * {\n margin-top: 1rem;\n}\n.ntm-members-pane__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-roles-header {\n border-bottom: 1px solid #d8dcde;\n}\n\n.ntm-roles-table__wrapper {\n width: 100%;\n height: calc(100vh - 80px);\n display: flex;\n background-color: #ffffff;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__sidebar {\n width: 396px;\n min-width: 396px;\n border-right: thin solid #d8dcde;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__sidebar .ntm-roles-table-sidebar__search {\n padding: 24px 24px 16px;\n height: 72px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__sidebar .ntm-roles-table-sidebar__list {\n height: calc(\n 100vh - 80px - 72px -\n var(--ntm-roles-table-default-scroll)\n );\n overflow-y: auto;\n padding-left: 24px;\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 8px;\n min-height: 48px;\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: #eaf3fc;\n padding: 12px 8px;\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 #d8dcde;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns {\n width: calc(\n 100vw - 64px - 396px - 24px\n );\n overflow: hidden;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__cell {\n width: 100%;\n min-width: 200px;\n min-height: 48px;\n padding: 12px 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-right: thin solid #d8dcde;\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__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 - 80px - 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: #d8dcde;\n border-radius: 50px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows::-webkit-scrollbar-thumb:hover {\n background: #939ea4;\n border-radius: 50px;\n}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__rows::-webkit-scrollbar-track {\n background: #d8dcde;\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: #eaf3fc;\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 #d8dcde;\n}\n\n.ntm-roles-table-sidebar__drop-down-button {\n color: #68737d;\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;\n}\n.ntm-roles-permission__heading {\n color: #87929d;\n text-transform: uppercase;\n}\n.ntm-roles-permission__card {\n background-color: white;\n box-shadow: 0px 3px 12px -1px rgba(28, 52, 84, 0.12), 0px 2px 4px -1px rgba(28, 55, 90, 0.08);\n border-radius: 0.125rem;\n border-width: 1px;\n border-color: #d8dcde;\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-invitations__wrapper .ntm-invitations__header {\n height: 28px;\n}\n.ntm-invitations__wrapper .ntm-invitations__body {\n display: flex;\n flex-direction: column;\n}\n.ntm-invitations__wrapper .ntm-invitations__body > * {\n margin-bottom: 8px;\n}\n.ntm-invitations__wrapper .ntm-invitations__body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.ntm-invitations__wrapper .ntm-invitations__body-header div {\n display: flex;\n align-items: center;\n}\n.ntm-invitations__wrapper .ntm-invitations__body-header div p {\n margin-right: 8px;\n}\n.ntm-invitations__wrapper .ntm-invitations__body .ntm-invitations__dnd {\n color: #49545c;\n background: #f8f9f9;\n padding: 20px 40px;\n border: 1px dashed;\n border-radius: 6px;\n cursor: pointer;\n counter-reset: dnd-counter;\n}\n.ntm-invitations__wrapper .ntm-invitations__body .ntm-invitations__dnd h3 {\n margin-bottom: 8px;\n text-align: center !important;\n}\n.ntm-invitations__wrapper .ntm-invitations__body .ntm-invitations__dnd p::before {\n counter-increment: dnd-counter;\n content: counter(dnd-counter) \". \";\n}\n.ntm-invitations__wrapper .ntm-invitations__body .ntm-invitations__submit-btn {\n align-self: end !important;\n margin-top: 16px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer {\n background: #f8f9f9;\n margin-top: 24px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link-instructions {\n display: flex;\n flex-direction: column;\n width: 50%;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link-instructions h4 {\n margin-bottom: 8px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link-btns {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n font-weight: bold;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link-btns > button:first-child {\n margin-right: 8px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link-btns p {\n font-weight: normal;\n color: #49545c;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__table {\n max-height: 192px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__table-filename {\n display: flex;\n align-items: center;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__table-filename svg {\n margin-right: 4px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__table-status {\n text-transform: capitalize;\n}";
|
|
12665
|
+
var css = ":root {\n --ntm-roles-table-default-scroll: 15px;\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-pane__header {\n margin-bottom: 0.5rem;\n}\n.ntm-members-pane__body {\n width: 100%;\n}\n.ntm-members-pane__body > * + * {\n margin-top: 1rem;\n}\n.ntm-members-pane__footer {\n display: flex;\n gap: 0.5rem;\n}\n\n.ntm-roles-header {\n border-bottom: 1px solid rgb(var(--neeto-ui-gray-300));\n}\n\n.ntm-roles-table__wrapper {\n width: 100%;\n height: calc(100vh - var(--neeto-ui-main-header-height));\n display: flex;\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}\n.ntm-roles-table__wrapper .ntm-roles-table__sidebar .ntm-roles-table-sidebar__search {\n padding: 24px 24px 16px;\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-height) - 72px -\n var(--ntm-roles-table-default-scroll)\n );\n overflow-y: auto;\n padding-left: 24px;\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 8px;\n min-height: 48px;\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 8px;\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}\n.ntm-roles-table__wrapper .ntm-roles-table__columns .ntm-roles-table__cell {\n width: 100%;\n min-width: 200px;\n min-height: 48px;\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-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;\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 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-invitations__wrapper .ntm-invitations__header {\n height: 28px;\n}\n.ntm-invitations__wrapper .ntm-invitations__body {\n display: flex;\n flex-direction: column;\n}\n.ntm-invitations__wrapper .ntm-invitations__body > * {\n margin-bottom: 8px;\n}\n.ntm-invitations__wrapper .ntm-invitations__body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.ntm-invitations__wrapper .ntm-invitations__body-header div {\n display: flex;\n align-items: center;\n}\n.ntm-invitations__wrapper .ntm-invitations__body-header div p {\n margin-right: 8px;\n}\n.ntm-invitations__wrapper .ntm-invitations__body .ntm-invitations__dnd {\n color: rgb(var(--neeto-ui-gray-700));\n background: rgb(var(--neeto-ui-gray-100));\n padding: 20px 40px;\n border: 1px dashed;\n border-radius: 6px;\n cursor: pointer;\n counter-reset: dnd-counter;\n}\n.ntm-invitations__wrapper .ntm-invitations__body .ntm-invitations__dnd h3 {\n margin-bottom: 8px;\n text-align: center !important;\n}\n.ntm-invitations__wrapper .ntm-invitations__body .ntm-invitations__dnd p::before {\n counter-increment: dnd-counter;\n content: counter(dnd-counter) \". \";\n}\n.ntm-invitations__wrapper .ntm-invitations__body .ntm-invitations__submit-btn {\n align-self: end !important;\n margin-top: 16px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer {\n background: rgb(var(--neeto-ui-gray-100));\n margin-top: 24px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link-instructions {\n display: flex;\n flex-direction: column;\n width: 50%;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link-instructions h4 {\n margin-bottom: 8px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link-btns {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n font-weight: bold;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link-btns > button:first-child {\n margin-right: 8px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__invite-link-btns p {\n font-weight: normal;\n color: rgb(var(--neeto-ui-gray-700));\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__table {\n max-height: 192px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__table-filename {\n display: flex;\n align-items: center;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__table-filename svg {\n margin-right: 4px;\n}\n.ntm-invitations__wrapper .ntm-invitations__footer .ntm-invitations__table-status {\n text-transform: capitalize;\n}";
|
|
12841
12666
|
n(css,{});
|
|
12842
12667
|
|
|
12843
12668
|
export { index$2 as Invitations, index$1 as Roles, index as TeamMembers, hasPermission };
|