@bigbinary/neeto-team-members-frontend 2.5.16 → 2.5.18
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 +98 -58
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +98 -58
- 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",
|
|
@@ -5495,7 +5510,8 @@ var helpers$1 = {
|
|
|
5495
5510
|
selectedMembersCount: "{{count}} {{metaName}} selected of",
|
|
5496
5511
|
singleProductInvitation: "{{- emails, boldList}} will be invited to <strong>{{product}}</strong> with a role of <strong>{{role}}</strong>.",
|
|
5497
5512
|
themeSelector: "Theme selector",
|
|
5498
|
-
visitToKnowMoreAboutPermissions: "Visit to know more about permissions"
|
|
5513
|
+
visitToKnowMoreAboutPermissions: "Visit to know more about permissions",
|
|
5514
|
+
whyIsItDisabled: "Why is it disabled?"
|
|
5499
5515
|
};
|
|
5500
5516
|
var labels = {
|
|
5501
5517
|
neeto_: "neeto{{product}}"
|
|
@@ -5523,8 +5539,7 @@ var tooltips$1 = {
|
|
|
5523
5539
|
noPermissionToEditRoles: "Please ask the admin to permit you to edit roles.",
|
|
5524
5540
|
noPermissionToRemoveRoles: "Please ask the admin to permit you to remove roles.",
|
|
5525
5541
|
goBackToChangeRole: "Please go back to change the role.",
|
|
5526
|
-
hostAppisRequired: "This neeto product is required to continue."
|
|
5527
|
-
whyEmailsAreNotEditable: "Why can't the owner change another user's email?"
|
|
5542
|
+
hostAppisRequired: "This neeto product is required to continue."
|
|
5528
5543
|
};
|
|
5529
5544
|
var validations$1 = {
|
|
5530
5545
|
enterRoleName: "Please enter a valid role name.",
|
|
@@ -5586,9 +5601,13 @@ var common = {
|
|
|
5586
5601
|
edit_: "Modifier le {{what}}",
|
|
5587
5602
|
email_one: "E-mail",
|
|
5588
5603
|
email_other: "E-mails",
|
|
5604
|
+
invited: "Invité",
|
|
5605
|
+
inviteStatus: "Statut d'invitation",
|
|
5589
5606
|
manage_: "Gérer {{what}}",
|
|
5590
5607
|
name: "Nom",
|
|
5591
5608
|
notFound_: "Il n'y a pas de {{what}} à afficher",
|
|
5609
|
+
notInvited: "Non invité",
|
|
5610
|
+
pending: "En attente",
|
|
5592
5611
|
permission_one: "Autorisation",
|
|
5593
5612
|
permission_other: "Autorisations",
|
|
5594
5613
|
role_one: "Rôle",
|
|
@@ -5611,7 +5630,8 @@ var helpers = {
|
|
|
5611
5630
|
singleProductInvitation_one: "{{- emails, boldList}} sera invité à <strong>{{product}}</strong> avec un rôle de <strong>{{role}}</strong>.",
|
|
5612
5631
|
singleProductInvitation_other: "{{- emails, boldList}} seront invités à <strong>{{product}}</strong> avec un rôle de <strong>{{role}}</strong>.",
|
|
5613
5632
|
themeSelector: "Sélecteur de thème",
|
|
5614
|
-
visitToKnowMoreAboutPermissions: "Visitez pour en savoir plus sur les autorisations"
|
|
5633
|
+
visitToKnowMoreAboutPermissions: "Visitez pour en savoir plus sur les autorisations",
|
|
5634
|
+
whyIsItDisabled: "Pourquoi est-ce désactivé?"
|
|
5615
5635
|
};
|
|
5616
5636
|
var metaNames = {
|
|
5617
5637
|
member_one: "Membre",
|
|
@@ -5634,8 +5654,7 @@ var tooltips = {
|
|
|
5634
5654
|
noPermissionToEditRoles: "Veuillez demander à l'administrateur de vous autoriser à modifier les rôles.",
|
|
5635
5655
|
noPermissionToRemoveRoles: "Veuillez demander à l'administrateur de vous autoriser à supprimer des rôles.",
|
|
5636
5656
|
goBackToChangeRole: "Veuillez revenir en arrière pour modifier le rôle.",
|
|
5637
|
-
hostAppisRequired: "Ce produit neeto est nécessaire pour continuer."
|
|
5638
|
-
whyEmailsAreNotEditable: "Pourquoi le propriétaire ne peut-il pas modifier l'adresse e-mail d'un autre utilisateur?"
|
|
5657
|
+
hostAppisRequired: "Ce produit neeto est nécessaire pour continuer."
|
|
5639
5658
|
};
|
|
5640
5659
|
var validations = {
|
|
5641
5660
|
enterRoleName: "Veuillez entrer le nom du rôle",
|
|
@@ -11233,6 +11252,14 @@ const getDefaultAlertMessage = _ref4 => {
|
|
|
11233
11252
|
}
|
|
11234
11253
|
});
|
|
11235
11254
|
};
|
|
11255
|
+
const renderInvitedStatus = inviteStatus => {
|
|
11256
|
+
const statuses = {
|
|
11257
|
+
not_invited: instance.t("common.notInvited"),
|
|
11258
|
+
pending: instance.t("common.pending"),
|
|
11259
|
+
confirmed: instance.t("common.invited")
|
|
11260
|
+
};
|
|
11261
|
+
return statuses[inviteStatus];
|
|
11262
|
+
};
|
|
11236
11263
|
const getDefaultColumns = displayStatusTag => [{
|
|
11237
11264
|
dataIndex: "name",
|
|
11238
11265
|
key: "name",
|
|
@@ -11249,6 +11276,12 @@ const getDefaultColumns = displayStatusTag => [{
|
|
|
11249
11276
|
key: "organization_role",
|
|
11250
11277
|
sorter: true,
|
|
11251
11278
|
title: instance.t("common.role", SINGULAR)
|
|
11279
|
+
}, {
|
|
11280
|
+
dataIndex: "inviteStatus",
|
|
11281
|
+
key: "invite_status",
|
|
11282
|
+
sorter: true,
|
|
11283
|
+
title: instance.t("common.inviteStatus"),
|
|
11284
|
+
render: inviteStatus => renderInvitedStatus(inviteStatus)
|
|
11252
11285
|
}];
|
|
11253
11286
|
const getActionColumn = (handleUpdateRole, handleUpdateStatus, permissions) => ({
|
|
11254
11287
|
dataIndex: "actions",
|
|
@@ -11662,27 +11695,6 @@ const Confirmation = () => {
|
|
|
11662
11695
|
}));
|
|
11663
11696
|
};
|
|
11664
11697
|
|
|
11665
|
-
const LabelWithIcon = _ref => {
|
|
11666
|
-
let _ref$label = _ref.label,
|
|
11667
|
-
label = _ref$label === void 0 ? "" : _ref$label,
|
|
11668
|
-
_ref$tooltipProps = _ref.tooltipProps,
|
|
11669
|
-
tooltipProps = _ref$tooltipProps === void 0 ? {
|
|
11670
|
-
content: ""
|
|
11671
|
-
} : _ref$tooltipProps,
|
|
11672
|
-
_ref$iconProps = _ref.iconProps,
|
|
11673
|
-
iconProps = _ref$iconProps === void 0 ? {
|
|
11674
|
-
onClick: noop$1
|
|
11675
|
-
} : _ref$iconProps;
|
|
11676
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
11677
|
-
className: "ntm-members-radio-group__label"
|
|
11678
|
-
}, label), /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
11679
|
-
position: "right"
|
|
11680
|
-
}, tooltipProps), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Info, _extends({
|
|
11681
|
-
className: "ntm-members-radio-group__icon",
|
|
11682
|
-
size: 16
|
|
11683
|
-
}, iconProps)))));
|
|
11684
|
-
};
|
|
11685
|
-
|
|
11686
11698
|
const MultipleEmailInput = _ref => {
|
|
11687
11699
|
var _head;
|
|
11688
11700
|
let _ref$emails = _ref.emails,
|
|
@@ -11698,15 +11710,17 @@ const MultipleEmailInput = _ref => {
|
|
|
11698
11710
|
name: "emails",
|
|
11699
11711
|
size: "medium",
|
|
11700
11712
|
value: (_head = head(emails)) === null || _head === void 0 ? void 0 : _head.value,
|
|
11701
|
-
label: /*#__PURE__*/React.createElement(
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11713
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
11714
|
+
className: "neeto-ui-w-full neeto-ui-flex neeto-ui-justify-between"
|
|
11715
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
11716
|
+
component: "span",
|
|
11717
|
+
style: "body2"
|
|
11718
|
+
}, instance.t("common.email", SINGULAR)), /*#__PURE__*/React.createElement(Button, {
|
|
11719
|
+
href: OWNER_CANT_CHANGE_USER_EMAIL_KB_ARTICLE_URL,
|
|
11720
|
+
label: instance.t("helpers.whyIsItDisabled"),
|
|
11721
|
+
style: "link",
|
|
11722
|
+
target: "_blank"
|
|
11723
|
+
}))
|
|
11710
11724
|
}) : /*#__PURE__*/React.createElement(MultiEmailInput, {
|
|
11711
11725
|
counter: COUNTER_PROPS,
|
|
11712
11726
|
"data-cy": "ntm-manage-member-email-input",
|
|
@@ -11719,6 +11733,27 @@ const MultipleEmailInput = _ref => {
|
|
|
11719
11733
|
}));
|
|
11720
11734
|
};
|
|
11721
11735
|
|
|
11736
|
+
const LabelWithIcon = _ref => {
|
|
11737
|
+
let _ref$label = _ref.label,
|
|
11738
|
+
label = _ref$label === void 0 ? "" : _ref$label,
|
|
11739
|
+
_ref$tooltipProps = _ref.tooltipProps,
|
|
11740
|
+
tooltipProps = _ref$tooltipProps === void 0 ? {
|
|
11741
|
+
content: ""
|
|
11742
|
+
} : _ref$tooltipProps,
|
|
11743
|
+
_ref$iconProps = _ref.iconProps,
|
|
11744
|
+
iconProps = _ref$iconProps === void 0 ? {
|
|
11745
|
+
onClick: noop$1
|
|
11746
|
+
} : _ref$iconProps;
|
|
11747
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
11748
|
+
className: "ntm-members-radio-group__label"
|
|
11749
|
+
}, label), /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
11750
|
+
position: "right"
|
|
11751
|
+
}, tooltipProps), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Info, _extends({
|
|
11752
|
+
className: "ntm-members-radio-group__icon",
|
|
11753
|
+
size: 16
|
|
11754
|
+
}, iconProps)))));
|
|
11755
|
+
};
|
|
11756
|
+
|
|
11722
11757
|
const RolesRadioGroup = _ref => {
|
|
11723
11758
|
let _ref$role = _ref.role,
|
|
11724
11759
|
role = _ref$role === void 0 ? "" : _ref$role,
|
|
@@ -12154,6 +12189,11 @@ const TeamMembers = _ref => {
|
|
|
12154
12189
|
isFiltersPaneOpen = _useState4[0],
|
|
12155
12190
|
setIsFiltersPaneOpen = _useState4[1];
|
|
12156
12191
|
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);
|
|
12192
|
+
useEffect(() => {
|
|
12193
|
+
if (!localStorage.getItem("NTM_MEMBERS_TABLE_HIDDEN_COLUMNS")) {
|
|
12194
|
+
localStorage.setItem("NTM_MEMBERS_TABLE_HIDDEN_COLUMNS", JSON.stringify(["inviteStatus"]));
|
|
12195
|
+
}
|
|
12196
|
+
}, []);
|
|
12157
12197
|
const _useFilters = useFilters({
|
|
12158
12198
|
config
|
|
12159
12199
|
}),
|