@bigbinary/neeto-team-members-frontend 2.5.15 → 2.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.cjs.js +65 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +65 -25
- package/dist/index.esm.js.map +1 -1
- package/package.json +16 -16
package/dist/index.esm.js
CHANGED
|
@@ -2489,14 +2489,24 @@ var Translator = function (_EventEmitter) {
|
|
|
2489
2489
|
if (appendNamespaceToCIMode) {
|
|
2490
2490
|
var nsSeparator = options.nsSeparator || this.options.nsSeparator;
|
|
2491
2491
|
if (returnDetails) {
|
|
2492
|
-
|
|
2493
|
-
|
|
2492
|
+
return {
|
|
2493
|
+
res: "".concat(namespace).concat(nsSeparator).concat(key),
|
|
2494
|
+
usedKey: key,
|
|
2495
|
+
exactUsedKey: key,
|
|
2496
|
+
usedLng: lng,
|
|
2497
|
+
usedNS: namespace
|
|
2498
|
+
};
|
|
2494
2499
|
}
|
|
2495
2500
|
return "".concat(namespace).concat(nsSeparator).concat(key);
|
|
2496
2501
|
}
|
|
2497
2502
|
if (returnDetails) {
|
|
2498
|
-
|
|
2499
|
-
|
|
2503
|
+
return {
|
|
2504
|
+
res: key,
|
|
2505
|
+
usedKey: key,
|
|
2506
|
+
exactUsedKey: key,
|
|
2507
|
+
usedLng: lng,
|
|
2508
|
+
usedNS: namespace
|
|
2509
|
+
};
|
|
2500
2510
|
}
|
|
2501
2511
|
return key;
|
|
2502
2512
|
}
|
|
@@ -3295,7 +3305,7 @@ var Interpolator = function () {
|
|
|
3295
3305
|
if (typeof missingInterpolationHandler === 'function') {
|
|
3296
3306
|
var temp = missingInterpolationHandler(str, match, options);
|
|
3297
3307
|
value = typeof temp === 'string' ? temp : '';
|
|
3298
|
-
} else if (options &&
|
|
3308
|
+
} else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
|
|
3299
3309
|
value = '';
|
|
3300
3310
|
} else if (skipOnVariables) {
|
|
3301
3311
|
value = match[0];
|
|
@@ -3444,34 +3454,34 @@ var Formatter = function () {
|
|
|
3444
3454
|
this.logger = baseLogger.create('formatter');
|
|
3445
3455
|
this.options = options;
|
|
3446
3456
|
this.formats = {
|
|
3447
|
-
number: createCachedFormatter(function (lng,
|
|
3448
|
-
var formatter = new Intl.NumberFormat(lng,
|
|
3457
|
+
number: createCachedFormatter(function (lng, opt) {
|
|
3458
|
+
var formatter = new Intl.NumberFormat(lng, _objectSpread$2$1({}, opt));
|
|
3449
3459
|
return function (val) {
|
|
3450
3460
|
return formatter.format(val);
|
|
3451
3461
|
};
|
|
3452
3462
|
}),
|
|
3453
|
-
currency: createCachedFormatter(function (lng,
|
|
3454
|
-
var formatter = new Intl.NumberFormat(lng, _objectSpread$2$1(_objectSpread$2$1({},
|
|
3463
|
+
currency: createCachedFormatter(function (lng, opt) {
|
|
3464
|
+
var formatter = new Intl.NumberFormat(lng, _objectSpread$2$1(_objectSpread$2$1({}, opt), {}, {
|
|
3455
3465
|
style: 'currency'
|
|
3456
3466
|
}));
|
|
3457
3467
|
return function (val) {
|
|
3458
3468
|
return formatter.format(val);
|
|
3459
3469
|
};
|
|
3460
3470
|
}),
|
|
3461
|
-
datetime: createCachedFormatter(function (lng,
|
|
3462
|
-
var formatter = new Intl.DateTimeFormat(lng, _objectSpread$2$1({},
|
|
3471
|
+
datetime: createCachedFormatter(function (lng, opt) {
|
|
3472
|
+
var formatter = new Intl.DateTimeFormat(lng, _objectSpread$2$1({}, opt));
|
|
3463
3473
|
return function (val) {
|
|
3464
3474
|
return formatter.format(val);
|
|
3465
3475
|
};
|
|
3466
3476
|
}),
|
|
3467
|
-
relativetime: createCachedFormatter(function (lng,
|
|
3468
|
-
var formatter = new Intl.RelativeTimeFormat(lng, _objectSpread$2$1({},
|
|
3477
|
+
relativetime: createCachedFormatter(function (lng, opt) {
|
|
3478
|
+
var formatter = new Intl.RelativeTimeFormat(lng, _objectSpread$2$1({}, opt));
|
|
3469
3479
|
return function (val) {
|
|
3470
|
-
return formatter.format(val,
|
|
3480
|
+
return formatter.format(val, opt.range || 'day');
|
|
3471
3481
|
};
|
|
3472
3482
|
}),
|
|
3473
|
-
list: createCachedFormatter(function (lng,
|
|
3474
|
-
var formatter = new Intl.ListFormat(lng, _objectSpread$2$1({},
|
|
3483
|
+
list: createCachedFormatter(function (lng, opt) {
|
|
3484
|
+
var formatter = new Intl.ListFormat(lng, _objectSpread$2$1({}, opt));
|
|
3475
3485
|
return function (val) {
|
|
3476
3486
|
return formatter.format(val);
|
|
3477
3487
|
};
|
|
@@ -3500,8 +3510,9 @@ var Formatter = function () {
|
|
|
3500
3510
|
}
|
|
3501
3511
|
}, {
|
|
3502
3512
|
key: "format",
|
|
3503
|
-
value: function format(value, _format, lng
|
|
3513
|
+
value: function format(value, _format, lng) {
|
|
3504
3514
|
var _this = this;
|
|
3515
|
+
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
3505
3516
|
var formats = _format.split(this.formatSeparator);
|
|
3506
3517
|
var result = formats.reduce(function (mem, f) {
|
|
3507
3518
|
var _parseFormatStr = parseFormatStr(f),
|
|
@@ -3630,8 +3641,8 @@ var Connector = function (_EventEmitter) {
|
|
|
3630
3641
|
if (!loaded[l]) loaded[l] = {};
|
|
3631
3642
|
var loadedKeys = q.loaded[l];
|
|
3632
3643
|
if (loadedKeys.length) {
|
|
3633
|
-
loadedKeys.forEach(function (
|
|
3634
|
-
if (loaded[l][
|
|
3644
|
+
loadedKeys.forEach(function (n) {
|
|
3645
|
+
if (loaded[l][n] === undefined) loaded[l][n] = true;
|
|
3635
3646
|
});
|
|
3636
3647
|
}
|
|
3637
3648
|
});
|
|
@@ -4285,7 +4296,7 @@ var I18n = function (_EventEmitter) {
|
|
|
4285
4296
|
var _this7 = this;
|
|
4286
4297
|
var deferred = defer();
|
|
4287
4298
|
if (!this.options.ns) {
|
|
4288
|
-
callback
|
|
4299
|
+
if (callback) callback();
|
|
4289
4300
|
return Promise.resolve();
|
|
4290
4301
|
}
|
|
4291
4302
|
if (typeof ns === 'string') ns = [ns];
|
|
@@ -4550,7 +4561,7 @@ var localStorageAvailable = function localStorageAvailable() {
|
|
|
4550
4561
|
}
|
|
4551
4562
|
return hasLocalStorageSupport;
|
|
4552
4563
|
};
|
|
4553
|
-
var localStorage = {
|
|
4564
|
+
var localStorage$1 = {
|
|
4554
4565
|
name: 'localStorage',
|
|
4555
4566
|
lookup: function lookup(options) {
|
|
4556
4567
|
var found;
|
|
@@ -4704,7 +4715,7 @@ var Browser = /*#__PURE__*/function () {
|
|
|
4704
4715
|
this.i18nOptions = i18nOptions;
|
|
4705
4716
|
this.addDetector(cookie$1);
|
|
4706
4717
|
this.addDetector(querystring);
|
|
4707
|
-
this.addDetector(localStorage);
|
|
4718
|
+
this.addDetector(localStorage$1);
|
|
4708
4719
|
this.addDetector(sessionStorage);
|
|
4709
4720
|
this.addDetector(navigator$1);
|
|
4710
4721
|
this.addDetector(htmlTag);
|
|
@@ -5473,9 +5484,13 @@ var common$1 = {
|
|
|
5473
5484
|
edit_: "Edit {{what}}",
|
|
5474
5485
|
email_one: "Email",
|
|
5475
5486
|
email_other: "Emails",
|
|
5487
|
+
invited: "Invited",
|
|
5488
|
+
inviteStatus: "Invite status",
|
|
5476
5489
|
manage_: "Manage {{what}}",
|
|
5477
5490
|
name: "Name",
|
|
5478
5491
|
notFound_: "There are no {{what}} to show",
|
|
5492
|
+
notInvited: "Not invited",
|
|
5493
|
+
pending: "Pending",
|
|
5479
5494
|
permission_one: "Permission",
|
|
5480
5495
|
permission_other: "Permissions",
|
|
5481
5496
|
role_one: "Role",
|
|
@@ -11233,6 +11248,14 @@ const getDefaultAlertMessage = _ref4 => {
|
|
|
11233
11248
|
}
|
|
11234
11249
|
});
|
|
11235
11250
|
};
|
|
11251
|
+
const renderInvitedStatus = inviteStatus => {
|
|
11252
|
+
const statuses = {
|
|
11253
|
+
not_invited: instance.t("common.notInvited"),
|
|
11254
|
+
pending: instance.t("common.pending"),
|
|
11255
|
+
confirmed: instance.t("common.invited")
|
|
11256
|
+
};
|
|
11257
|
+
return statuses[inviteStatus];
|
|
11258
|
+
};
|
|
11236
11259
|
const getDefaultColumns = displayStatusTag => [{
|
|
11237
11260
|
dataIndex: "name",
|
|
11238
11261
|
key: "name",
|
|
@@ -11249,6 +11272,12 @@ const getDefaultColumns = displayStatusTag => [{
|
|
|
11249
11272
|
key: "organization_role",
|
|
11250
11273
|
sorter: true,
|
|
11251
11274
|
title: instance.t("common.role", SINGULAR)
|
|
11275
|
+
}, {
|
|
11276
|
+
dataIndex: "inviteStatus",
|
|
11277
|
+
key: "invite_status",
|
|
11278
|
+
sorter: true,
|
|
11279
|
+
title: instance.t("common.inviteStatus"),
|
|
11280
|
+
render: inviteStatus => renderInvitedStatus(inviteStatus)
|
|
11252
11281
|
}];
|
|
11253
11282
|
const getActionColumn = (handleUpdateRole, handleUpdateStatus, permissions) => ({
|
|
11254
11283
|
dataIndex: "actions",
|
|
@@ -11382,11 +11411,17 @@ const AppList = _ref => {
|
|
|
11382
11411
|
const selectedEmail = pluck("value", emails);
|
|
11383
11412
|
useEffect(() => {
|
|
11384
11413
|
if (savedStateRef.current.isAppListEnabled !== isAppListEnabled) {
|
|
11385
|
-
appRoles.forEach((
|
|
11414
|
+
appRoles.forEach((appRole, index) => {
|
|
11415
|
+
var _globalProps$appName;
|
|
11416
|
+
if ((appRole === null || appRole === void 0 ? void 0 : appRole.appName) === ((_globalProps$appName = globalProps.appName) === null || _globalProps$appName === void 0 ? void 0 : _globalProps$appName.substring(5))) {
|
|
11417
|
+
setFieldValue(`appRoles[${index}].isEnabled`, true);
|
|
11418
|
+
return;
|
|
11419
|
+
}
|
|
11386
11420
|
setFieldValue(`appRoles[${index}].isEnabled`, isAppListEnabled);
|
|
11387
11421
|
});
|
|
11388
11422
|
}
|
|
11389
11423
|
savedStateRef.current.isAppListEnabled = isAppListEnabled;
|
|
11424
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11390
11425
|
}, [isAppListEnabled]);
|
|
11391
11426
|
const buildRoleOptions = roles => roles.map(role => toLabelAndValue(role.name));
|
|
11392
11427
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -11410,10 +11445,10 @@ const AppList = _ref => {
|
|
|
11410
11445
|
})), /*#__PURE__*/React.createElement("div", {
|
|
11411
11446
|
className: "neeto-ui-w-full"
|
|
11412
11447
|
}, appRoles.map((_ref2, index) => {
|
|
11413
|
-
var _globalProps$
|
|
11448
|
+
var _globalProps$appName2;
|
|
11414
11449
|
let appName = _ref2.appName,
|
|
11415
11450
|
isEnabled = _ref2.isEnabled;
|
|
11416
|
-
const isCurrentApp = appName === ((_globalProps$
|
|
11451
|
+
const isCurrentApp = appName === ((_globalProps$appName2 = globalProps.appName) === null || _globalProps$appName2 === void 0 ? void 0 : _globalProps$appName2.substring(5));
|
|
11417
11452
|
const isAppRoleSelectionChecked = isCurrentApp || isEnabled && isAppListEnabled;
|
|
11418
11453
|
return /*#__PURE__*/React.createElement("div", {
|
|
11419
11454
|
className: "ntm-manage-members__app-roles",
|
|
@@ -12148,6 +12183,11 @@ const TeamMembers = _ref => {
|
|
|
12148
12183
|
isFiltersPaneOpen = _useState4[0],
|
|
12149
12184
|
setIsFiltersPaneOpen = _useState4[1];
|
|
12150
12185
|
const hasCreatePermission = (_config$permissions$c = config === null || config === void 0 ? void 0 : (_config$permissions = config.permissions) === null || _config$permissions === void 0 ? void 0 : _config$permissions.create) !== null && _config$permissions$c !== void 0 ? _config$permissions$c : hasPermission(MANAGE_MEMBER_PERMISSIONS);
|
|
12186
|
+
useEffect(() => {
|
|
12187
|
+
if (!localStorage.getItem("NTM_MEMBERS_TABLE_HIDDEN_COLUMNS")) {
|
|
12188
|
+
localStorage.setItem("NTM_MEMBERS_TABLE_HIDDEN_COLUMNS", JSON.stringify(["inviteStatus"]));
|
|
12189
|
+
}
|
|
12190
|
+
}, []);
|
|
12151
12191
|
const _useFilters = useFilters({
|
|
12152
12192
|
config
|
|
12153
12193
|
}),
|