@bigbinary/neeto-team-members-frontend 2.4.5 → 2.4.7
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 +537 -132
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +539 -134
- package/dist/index.esm.js.map +1 -1
- package/package.json +20 -20
package/dist/index.esm.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React, { createContext, useContext, useState, useRef, useEffect, useMemo, useCallback } from 'react';
|
|
1
|
+
import React, { createContext, useContext, createElement, isValidElement, cloneElement, useState, useRef, useEffect, useMemo, useCallback } from 'react';
|
|
2
|
+
import { complement, isEmpty, modifyPath, prepend, assocPath, findIndex, propEq, dissocPath, groupBy, is, prop, keys, map, identical, modify, includes, fromPairs, toPairs, filter, isNil, curry, __, trim, toLower, identity, without, append, clamp, mergeLeft, pluck, head, reverse, assoc } from 'ramda';
|
|
2
3
|
import ReactDOM from 'react-dom';
|
|
3
4
|
import axios from 'axios';
|
|
4
5
|
import { Toastr, Tooltip, Button, Typography, Checkbox, Pane, Dropdown, Alert, Input as Input$1, PageLoader, Label, Avatar, Tag, Table as Table$1 } from '@bigbinary/neetoui';
|
|
5
|
-
import { modifyPath, prepend, assocPath, findIndex, propEq, dissocPath, groupBy, is, prop, keys, map, identical, modify, includes, fromPairs, toPairs, filter, isEmpty, isNil, curry, complement, __, trim, toLower, identity, without, append, clamp, mergeLeft, pluck, head, reverse, assoc } from 'ramda';
|
|
6
6
|
import { Header as Header$2, Container, MenuBar, SubHeader as SubHeader$1 } from '@bigbinary/neetoui/layouts';
|
|
7
7
|
import { useFormikContext, Formik, Form } from 'formik';
|
|
8
8
|
import { Input, Textarea, EmailInput, Radio } from '@bigbinary/neetoui/formik';
|
|
9
9
|
import * as yup from 'yup';
|
|
10
10
|
import { object, string } from 'yup';
|
|
11
11
|
import classnames from 'classnames';
|
|
12
|
-
import { MenuHorizontal, Up, Down, Search } from '@bigbinary/neeto-icons';
|
|
12
|
+
import { MenuHorizontal, Up, Down, Search, Info } from '@bigbinary/neeto-icons';
|
|
13
13
|
|
|
14
14
|
function _typeof(obj) {
|
|
15
15
|
"@babel/helpers - typeof";
|
|
@@ -140,9 +140,9 @@ function _toArray(arr) {
|
|
|
140
140
|
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
function ownKeys$
|
|
143
|
+
function ownKeys$b(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
144
144
|
|
|
145
|
-
function _objectSpread$
|
|
145
|
+
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$b(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$b(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
146
146
|
|
|
147
147
|
var consoleLogger = {
|
|
148
148
|
type: 'logger',
|
|
@@ -229,7 +229,7 @@ var Logger = function () {
|
|
|
229
229
|
}, {
|
|
230
230
|
key: "create",
|
|
231
231
|
value: function create(moduleName) {
|
|
232
|
-
return new Logger(this.logger, _objectSpread$
|
|
232
|
+
return new Logger(this.logger, _objectSpread$b(_objectSpread$b({}, {
|
|
233
233
|
prefix: "".concat(this.prefix, ":").concat(moduleName, ":")
|
|
234
234
|
}), this.options));
|
|
235
235
|
}
|
|
@@ -3001,103 +3001,80 @@ function defaults(obj) {
|
|
|
3001
3001
|
|
|
3002
3002
|
// eslint-disable-next-line no-control-regex
|
|
3003
3003
|
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
3004
|
-
|
|
3005
3004
|
var serializeCookie = function serializeCookie(name, val, options) {
|
|
3006
3005
|
var opt = options || {};
|
|
3007
3006
|
opt.path = opt.path || '/';
|
|
3008
3007
|
var value = encodeURIComponent(val);
|
|
3009
3008
|
var str = "".concat(name, "=").concat(value);
|
|
3010
|
-
|
|
3011
3009
|
if (opt.maxAge > 0) {
|
|
3012
3010
|
var maxAge = opt.maxAge - 0;
|
|
3013
3011
|
if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');
|
|
3014
3012
|
str += "; Max-Age=".concat(Math.floor(maxAge));
|
|
3015
3013
|
}
|
|
3016
|
-
|
|
3017
3014
|
if (opt.domain) {
|
|
3018
3015
|
if (!fieldContentRegExp.test(opt.domain)) {
|
|
3019
3016
|
throw new TypeError('option domain is invalid');
|
|
3020
3017
|
}
|
|
3021
|
-
|
|
3022
3018
|
str += "; Domain=".concat(opt.domain);
|
|
3023
3019
|
}
|
|
3024
|
-
|
|
3025
3020
|
if (opt.path) {
|
|
3026
3021
|
if (!fieldContentRegExp.test(opt.path)) {
|
|
3027
3022
|
throw new TypeError('option path is invalid');
|
|
3028
3023
|
}
|
|
3029
|
-
|
|
3030
3024
|
str += "; Path=".concat(opt.path);
|
|
3031
3025
|
}
|
|
3032
|
-
|
|
3033
3026
|
if (opt.expires) {
|
|
3034
3027
|
if (typeof opt.expires.toUTCString !== 'function') {
|
|
3035
3028
|
throw new TypeError('option expires is invalid');
|
|
3036
3029
|
}
|
|
3037
|
-
|
|
3038
3030
|
str += "; Expires=".concat(opt.expires.toUTCString());
|
|
3039
3031
|
}
|
|
3040
|
-
|
|
3041
3032
|
if (opt.httpOnly) str += '; HttpOnly';
|
|
3042
3033
|
if (opt.secure) str += '; Secure';
|
|
3043
|
-
|
|
3044
3034
|
if (opt.sameSite) {
|
|
3045
3035
|
var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
3046
|
-
|
|
3047
3036
|
switch (sameSite) {
|
|
3048
3037
|
case true:
|
|
3049
3038
|
str += '; SameSite=Strict';
|
|
3050
3039
|
break;
|
|
3051
|
-
|
|
3052
3040
|
case 'lax':
|
|
3053
3041
|
str += '; SameSite=Lax';
|
|
3054
3042
|
break;
|
|
3055
|
-
|
|
3056
3043
|
case 'strict':
|
|
3057
3044
|
str += '; SameSite=Strict';
|
|
3058
3045
|
break;
|
|
3059
|
-
|
|
3060
3046
|
case 'none':
|
|
3061
3047
|
str += '; SameSite=None';
|
|
3062
3048
|
break;
|
|
3063
|
-
|
|
3064
3049
|
default:
|
|
3065
3050
|
throw new TypeError('option sameSite is invalid');
|
|
3066
3051
|
}
|
|
3067
3052
|
}
|
|
3068
|
-
|
|
3069
3053
|
return str;
|
|
3070
3054
|
};
|
|
3071
|
-
|
|
3072
3055
|
var cookie = {
|
|
3073
3056
|
create: function create(name, value, minutes, domain) {
|
|
3074
3057
|
var cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
|
|
3075
3058
|
path: '/',
|
|
3076
3059
|
sameSite: 'strict'
|
|
3077
3060
|
};
|
|
3078
|
-
|
|
3079
3061
|
if (minutes) {
|
|
3080
3062
|
cookieOptions.expires = new Date();
|
|
3081
3063
|
cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);
|
|
3082
3064
|
}
|
|
3083
|
-
|
|
3084
3065
|
if (domain) cookieOptions.domain = domain;
|
|
3085
3066
|
document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);
|
|
3086
3067
|
},
|
|
3087
3068
|
read: function read(name) {
|
|
3088
3069
|
var nameEQ = "".concat(name, "=");
|
|
3089
3070
|
var ca = document.cookie.split(';');
|
|
3090
|
-
|
|
3091
3071
|
for (var i = 0; i < ca.length; i++) {
|
|
3092
3072
|
var c = ca[i];
|
|
3093
|
-
|
|
3094
3073
|
while (c.charAt(0) === ' ') {
|
|
3095
3074
|
c = c.substring(1, c.length);
|
|
3096
3075
|
}
|
|
3097
|
-
|
|
3098
3076
|
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
3099
3077
|
}
|
|
3100
|
-
|
|
3101
3078
|
return null;
|
|
3102
3079
|
},
|
|
3103
3080
|
remove: function remove(name) {
|
|
@@ -3108,12 +3085,10 @@ var cookie$1 = {
|
|
|
3108
3085
|
name: 'cookie',
|
|
3109
3086
|
lookup: function lookup(options) {
|
|
3110
3087
|
var found;
|
|
3111
|
-
|
|
3112
3088
|
if (options.lookupCookie && typeof document !== 'undefined') {
|
|
3113
3089
|
var c = cookie.read(options.lookupCookie);
|
|
3114
3090
|
if (c) found = c;
|
|
3115
3091
|
}
|
|
3116
|
-
|
|
3117
3092
|
return found;
|
|
3118
3093
|
},
|
|
3119
3094
|
cacheUserLanguage: function cacheUserLanguage(lng, options) {
|
|
@@ -3127,39 +3102,30 @@ var querystring = {
|
|
|
3127
3102
|
name: 'querystring',
|
|
3128
3103
|
lookup: function lookup(options) {
|
|
3129
3104
|
var found;
|
|
3130
|
-
|
|
3131
3105
|
if (typeof window !== 'undefined') {
|
|
3132
3106
|
var search = window.location.search;
|
|
3133
|
-
|
|
3134
3107
|
if (!window.location.search && window.location.hash && window.location.hash.indexOf('?') > -1) {
|
|
3135
3108
|
search = window.location.hash.substring(window.location.hash.indexOf('?'));
|
|
3136
3109
|
}
|
|
3137
|
-
|
|
3138
3110
|
var query = search.substring(1);
|
|
3139
3111
|
var params = query.split('&');
|
|
3140
|
-
|
|
3141
3112
|
for (var i = 0; i < params.length; i++) {
|
|
3142
3113
|
var pos = params[i].indexOf('=');
|
|
3143
|
-
|
|
3144
3114
|
if (pos > 0) {
|
|
3145
3115
|
var key = params[i].substring(0, pos);
|
|
3146
|
-
|
|
3147
3116
|
if (key === options.lookupQuerystring) {
|
|
3148
3117
|
found = params[i].substring(pos + 1);
|
|
3149
3118
|
}
|
|
3150
3119
|
}
|
|
3151
3120
|
}
|
|
3152
3121
|
}
|
|
3153
|
-
|
|
3154
3122
|
return found;
|
|
3155
3123
|
}
|
|
3156
3124
|
};
|
|
3157
3125
|
|
|
3158
3126
|
var hasLocalStorageSupport = null;
|
|
3159
|
-
|
|
3160
3127
|
var localStorageAvailable = function localStorageAvailable() {
|
|
3161
3128
|
if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;
|
|
3162
|
-
|
|
3163
3129
|
try {
|
|
3164
3130
|
hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;
|
|
3165
3131
|
var testKey = 'i18next.translate.boo';
|
|
@@ -3168,20 +3134,16 @@ var localStorageAvailable = function localStorageAvailable() {
|
|
|
3168
3134
|
} catch (e) {
|
|
3169
3135
|
hasLocalStorageSupport = false;
|
|
3170
3136
|
}
|
|
3171
|
-
|
|
3172
3137
|
return hasLocalStorageSupport;
|
|
3173
3138
|
};
|
|
3174
|
-
|
|
3175
3139
|
var localStorage$1 = {
|
|
3176
3140
|
name: 'localStorage',
|
|
3177
3141
|
lookup: function lookup(options) {
|
|
3178
3142
|
var found;
|
|
3179
|
-
|
|
3180
3143
|
if (options.lookupLocalStorage && localStorageAvailable()) {
|
|
3181
3144
|
var lng = window.localStorage.getItem(options.lookupLocalStorage);
|
|
3182
3145
|
if (lng) found = lng;
|
|
3183
3146
|
}
|
|
3184
|
-
|
|
3185
3147
|
return found;
|
|
3186
3148
|
},
|
|
3187
3149
|
cacheUserLanguage: function cacheUserLanguage(lng, options) {
|
|
@@ -3192,10 +3154,8 @@ var localStorage$1 = {
|
|
|
3192
3154
|
};
|
|
3193
3155
|
|
|
3194
3156
|
var hasSessionStorageSupport = null;
|
|
3195
|
-
|
|
3196
3157
|
var sessionStorageAvailable = function sessionStorageAvailable() {
|
|
3197
3158
|
if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;
|
|
3198
|
-
|
|
3199
3159
|
try {
|
|
3200
3160
|
hasSessionStorageSupport = window !== 'undefined' && window.sessionStorage !== null;
|
|
3201
3161
|
var testKey = 'i18next.translate.boo';
|
|
@@ -3204,20 +3164,16 @@ var sessionStorageAvailable = function sessionStorageAvailable() {
|
|
|
3204
3164
|
} catch (e) {
|
|
3205
3165
|
hasSessionStorageSupport = false;
|
|
3206
3166
|
}
|
|
3207
|
-
|
|
3208
3167
|
return hasSessionStorageSupport;
|
|
3209
3168
|
};
|
|
3210
|
-
|
|
3211
3169
|
var sessionStorage = {
|
|
3212
3170
|
name: 'sessionStorage',
|
|
3213
3171
|
lookup: function lookup(options) {
|
|
3214
3172
|
var found;
|
|
3215
|
-
|
|
3216
3173
|
if (options.lookupSessionStorage && sessionStorageAvailable()) {
|
|
3217
3174
|
var lng = window.sessionStorage.getItem(options.lookupSessionStorage);
|
|
3218
3175
|
if (lng) found = lng;
|
|
3219
3176
|
}
|
|
3220
|
-
|
|
3221
3177
|
return found;
|
|
3222
3178
|
},
|
|
3223
3179
|
cacheUserLanguage: function cacheUserLanguage(lng, options) {
|
|
@@ -3231,7 +3187,6 @@ var navigator$1 = {
|
|
|
3231
3187
|
name: 'navigator',
|
|
3232
3188
|
lookup: function lookup(options) {
|
|
3233
3189
|
var found = [];
|
|
3234
|
-
|
|
3235
3190
|
if (typeof navigator !== 'undefined') {
|
|
3236
3191
|
if (navigator.languages) {
|
|
3237
3192
|
// chrome only; not an array, so can't use .push.apply instead of iterating
|
|
@@ -3239,16 +3194,13 @@ var navigator$1 = {
|
|
|
3239
3194
|
found.push(navigator.languages[i]);
|
|
3240
3195
|
}
|
|
3241
3196
|
}
|
|
3242
|
-
|
|
3243
3197
|
if (navigator.userLanguage) {
|
|
3244
3198
|
found.push(navigator.userLanguage);
|
|
3245
3199
|
}
|
|
3246
|
-
|
|
3247
3200
|
if (navigator.language) {
|
|
3248
3201
|
found.push(navigator.language);
|
|
3249
3202
|
}
|
|
3250
3203
|
}
|
|
3251
|
-
|
|
3252
3204
|
return found.length > 0 ? found : undefined;
|
|
3253
3205
|
}
|
|
3254
3206
|
};
|
|
@@ -3258,11 +3210,9 @@ var htmlTag = {
|
|
|
3258
3210
|
lookup: function lookup(options) {
|
|
3259
3211
|
var found;
|
|
3260
3212
|
var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);
|
|
3261
|
-
|
|
3262
3213
|
if (htmlTag && typeof htmlTag.getAttribute === 'function') {
|
|
3263
3214
|
found = htmlTag.getAttribute('lang');
|
|
3264
3215
|
}
|
|
3265
|
-
|
|
3266
3216
|
return found;
|
|
3267
3217
|
}
|
|
3268
3218
|
};
|
|
@@ -3271,23 +3221,19 @@ var path = {
|
|
|
3271
3221
|
name: 'path',
|
|
3272
3222
|
lookup: function lookup(options) {
|
|
3273
3223
|
var found;
|
|
3274
|
-
|
|
3275
3224
|
if (typeof window !== 'undefined') {
|
|
3276
3225
|
var language = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
|
|
3277
|
-
|
|
3278
3226
|
if (language instanceof Array) {
|
|
3279
3227
|
if (typeof options.lookupFromPathIndex === 'number') {
|
|
3280
3228
|
if (typeof language[options.lookupFromPathIndex] !== 'string') {
|
|
3281
3229
|
return undefined;
|
|
3282
3230
|
}
|
|
3283
|
-
|
|
3284
3231
|
found = language[options.lookupFromPathIndex].replace('/', '');
|
|
3285
3232
|
} else {
|
|
3286
3233
|
found = language[0].replace('/', '');
|
|
3287
3234
|
}
|
|
3288
3235
|
}
|
|
3289
3236
|
}
|
|
3290
|
-
|
|
3291
3237
|
return found;
|
|
3292
3238
|
}
|
|
3293
3239
|
};
|
|
@@ -3296,14 +3242,15 @@ var subdomain = {
|
|
|
3296
3242
|
name: 'subdomain',
|
|
3297
3243
|
lookup: function lookup(options) {
|
|
3298
3244
|
// If given get the subdomain index else 1
|
|
3299
|
-
var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1;
|
|
3245
|
+
var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1;
|
|
3246
|
+
// get all matches if window.location. is existing
|
|
3300
3247
|
// first item of match is the match itself and the second is the first group macht which sould be the first subdomain match
|
|
3301
3248
|
// is the hostname no public domain get the or option of localhost
|
|
3249
|
+
var language = typeof window !== 'undefined' && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
|
|
3302
3250
|
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3251
|
+
// if there is no match (null) return undefined
|
|
3252
|
+
if (!language) return undefined;
|
|
3253
|
+
// return the given group match
|
|
3307
3254
|
return language[lookupFromSubdomainIndex];
|
|
3308
3255
|
}
|
|
3309
3256
|
};
|
|
@@ -3317,31 +3264,28 @@ function getDefaults$1() {
|
|
|
3317
3264
|
lookupSessionStorage: 'i18nextLng',
|
|
3318
3265
|
// cache user language
|
|
3319
3266
|
caches: ['localStorage'],
|
|
3320
|
-
excludeCacheFor: ['cimode']
|
|
3267
|
+
excludeCacheFor: ['cimode']
|
|
3268
|
+
// cookieMinutes: 10,
|
|
3321
3269
|
// cookieDomain: 'myDomain'
|
|
3322
|
-
|
|
3323
3270
|
};
|
|
3324
3271
|
}
|
|
3325
|
-
|
|
3326
3272
|
var Browser = /*#__PURE__*/function () {
|
|
3327
3273
|
function Browser(services) {
|
|
3328
3274
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3329
|
-
|
|
3330
3275
|
_classCallCheck(this, Browser);
|
|
3331
|
-
|
|
3332
3276
|
this.type = 'languageDetector';
|
|
3333
3277
|
this.detectors = {};
|
|
3334
3278
|
this.init(services, options);
|
|
3335
3279
|
}
|
|
3336
|
-
|
|
3337
3280
|
_createClass(Browser, [{
|
|
3338
3281
|
key: "init",
|
|
3339
3282
|
value: function init(services) {
|
|
3340
3283
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3341
3284
|
var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
3342
3285
|
this.services = services;
|
|
3343
|
-
this.options = defaults(options, this.options || {}, getDefaults$1());
|
|
3286
|
+
this.options = defaults(options, this.options || {}, getDefaults$1());
|
|
3344
3287
|
|
|
3288
|
+
// backwards compatibility
|
|
3345
3289
|
if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;
|
|
3346
3290
|
this.i18nOptions = i18nOptions;
|
|
3347
3291
|
this.addDetector(cookie$1);
|
|
@@ -3362,26 +3306,22 @@ var Browser = /*#__PURE__*/function () {
|
|
|
3362
3306
|
key: "detect",
|
|
3363
3307
|
value: function detect(detectionOrder) {
|
|
3364
3308
|
var _this = this;
|
|
3365
|
-
|
|
3366
3309
|
if (!detectionOrder) detectionOrder = this.options.order;
|
|
3367
3310
|
var detected = [];
|
|
3368
3311
|
detectionOrder.forEach(function (detectorName) {
|
|
3369
3312
|
if (_this.detectors[detectorName]) {
|
|
3370
3313
|
var lookup = _this.detectors[detectorName].lookup(_this.options);
|
|
3371
|
-
|
|
3372
3314
|
if (lookup && typeof lookup === 'string') lookup = [lookup];
|
|
3373
3315
|
if (lookup) detected = detected.concat(lookup);
|
|
3374
3316
|
}
|
|
3375
3317
|
});
|
|
3376
3318
|
if (this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0
|
|
3377
|
-
|
|
3378
3319
|
return detected.length > 0 ? detected[0] : null; // a little backward compatibility
|
|
3379
3320
|
}
|
|
3380
3321
|
}, {
|
|
3381
3322
|
key: "cacheUserLanguage",
|
|
3382
3323
|
value: function cacheUserLanguage(lng, caches) {
|
|
3383
3324
|
var _this2 = this;
|
|
3384
|
-
|
|
3385
3325
|
if (!caches) caches = this.options.caches;
|
|
3386
3326
|
if (!caches) return;
|
|
3387
3327
|
if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;
|
|
@@ -3390,10 +3330,8 @@ var Browser = /*#__PURE__*/function () {
|
|
|
3390
3330
|
});
|
|
3391
3331
|
}
|
|
3392
3332
|
}]);
|
|
3393
|
-
|
|
3394
3333
|
return Browser;
|
|
3395
3334
|
}();
|
|
3396
|
-
|
|
3397
3335
|
Browser.type = 'languageDetector';
|
|
3398
3336
|
|
|
3399
3337
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -3427,6 +3365,30 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
3427
3365
|
|
|
3428
3366
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
3429
3367
|
|
|
3368
|
+
/**
|
|
3369
|
+
* This file automatically generated from `pre-publish.js`.
|
|
3370
|
+
* Do not manually edit.
|
|
3371
|
+
*/
|
|
3372
|
+
|
|
3373
|
+
var voidElements = {
|
|
3374
|
+
"area": true,
|
|
3375
|
+
"base": true,
|
|
3376
|
+
"br": true,
|
|
3377
|
+
"col": true,
|
|
3378
|
+
"embed": true,
|
|
3379
|
+
"hr": true,
|
|
3380
|
+
"img": true,
|
|
3381
|
+
"input": true,
|
|
3382
|
+
"link": true,
|
|
3383
|
+
"meta": true,
|
|
3384
|
+
"param": true,
|
|
3385
|
+
"source": true,
|
|
3386
|
+
"track": true,
|
|
3387
|
+
"wbr": true
|
|
3388
|
+
};
|
|
3389
|
+
|
|
3390
|
+
var t$1=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function n$1(n){var r={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=n.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(r.name=i[1],(voidElements[i[1]]||"/"===n.charAt(n.length-2))&&(r.voidElement=!0),r.name.startsWith("!--"))){var s=n.indexOf("--\x3e");return {type:"comment",comment:-1!==s?n.slice(4,s):""}}for(var a=new RegExp(t$1),c=null;null!==(c=a.exec(n));)if(c[0].trim())if(c[1]){var o=c[1].trim(),l=[o,""];o.indexOf("=")>-1&&(l=o.split("=")),r.attrs[l[0]]=l[1],a.lastIndex--;}else c[2]&&(r.attrs[c[2]]=c[3].trim().substring(1,c[3].length-1));return r}var r=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,i=/^\s*$/,s=Object.create(null);function a(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(a,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var c={parse:function(e,t){t||(t={}),t.components||(t.components=s);var a,c=[],o=[],l=-1,m=!1;if(0!==e.indexOf("<")){var u=e.indexOf("<");c.push({type:"text",content:-1===u?e:e.substring(0,u)});}return e.replace(r,function(r,s){if(m){if(r!=="</"+a.name+">")return;m=!1;}var u,f="/"!==r.charAt(1),h=r.startsWith("\x3c!--"),p=s+r.length,d=e.charAt(p);if(h){var v=n$1(r);return l<0?(c.push(v),c):((u=o[l]).children.push(v),c)}if(f&&(l++,"tag"===(a=n$1(r)).type&&t.components[a.name]&&(a.type="component",m=!0),a.voidElement||m||!d||"<"===d||a.children.push({type:"text",content:e.slice(p,e.indexOf("<",p))}),0===l&&c.push(a),(u=o[l-1])&&u.children.push(a),o[l]=a),(!f||a.voidElement)&&(l>-1&&(a.voidElement||a.name===r.slice(2,-1))&&(l--,a=-1===l?c:o[l]),!m&&"<"!==d&&d)){u=-1===l?c:o[l].children;var x=e.indexOf("<",p),g=e.slice(p,-1===x?void 0:x);i.test(g)&&(g=" "),(x>-1&&l+u.length>=0||" "!==g)&&u.push({type:"text",content:g});}}),c},stringify:function(e){return e.reduce(function(e,t){return e+a("",t)},"")}};
|
|
3391
|
+
|
|
3430
3392
|
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
3431
3393
|
var htmlEntities = {
|
|
3432
3394
|
'&': '&',
|
|
@@ -3459,9 +3421,9 @@ var unescape = function unescape(text) {
|
|
|
3459
3421
|
return text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
3460
3422
|
};
|
|
3461
3423
|
|
|
3462
|
-
function ownKeys$
|
|
3424
|
+
function ownKeys$a(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
3463
3425
|
|
|
3464
|
-
function _objectSpread$
|
|
3426
|
+
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$a(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3465
3427
|
var defaultOptions = {
|
|
3466
3428
|
bindI18n: 'languageChanged',
|
|
3467
3429
|
bindI18nStore: '',
|
|
@@ -3476,7 +3438,7 @@ var i18nInstance;
|
|
|
3476
3438
|
var I18nContext = createContext();
|
|
3477
3439
|
function setDefaults() {
|
|
3478
3440
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3479
|
-
defaultOptions = _objectSpread$
|
|
3441
|
+
defaultOptions = _objectSpread$a(_objectSpread$a({}, defaultOptions), options);
|
|
3480
3442
|
}
|
|
3481
3443
|
function getDefaults() {
|
|
3482
3444
|
return defaultOptions;
|
|
@@ -3600,6 +3562,274 @@ function hasLoadedNamespace(ns, i18n) {
|
|
|
3600
3562
|
});
|
|
3601
3563
|
}
|
|
3602
3564
|
|
|
3565
|
+
var _excluded$2 = ["format"],
|
|
3566
|
+
_excluded2$2 = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
|
|
3567
|
+
|
|
3568
|
+
function ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
3569
|
+
|
|
3570
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$9(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3571
|
+
|
|
3572
|
+
function hasChildren(node, checkLength) {
|
|
3573
|
+
if (!node) return false;
|
|
3574
|
+
var base = node.props ? node.props.children : node.children;
|
|
3575
|
+
if (checkLength) return base.length > 0;
|
|
3576
|
+
return !!base;
|
|
3577
|
+
}
|
|
3578
|
+
|
|
3579
|
+
function getChildren(node) {
|
|
3580
|
+
if (!node) return [];
|
|
3581
|
+
return node.props ? node.props.children : node.children;
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
function hasValidReactChildren(children) {
|
|
3585
|
+
if (Object.prototype.toString.call(children) !== '[object Array]') return false;
|
|
3586
|
+
return children.every(function (child) {
|
|
3587
|
+
return isValidElement(child);
|
|
3588
|
+
});
|
|
3589
|
+
}
|
|
3590
|
+
|
|
3591
|
+
function getAsArray(data) {
|
|
3592
|
+
return Array.isArray(data) ? data : [data];
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
function mergeProps(source, target) {
|
|
3596
|
+
var newTarget = _objectSpread$9({}, target);
|
|
3597
|
+
|
|
3598
|
+
newTarget.props = Object.assign(source.props, target.props);
|
|
3599
|
+
return newTarget;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3602
|
+
function nodesToString(children, i18nOptions) {
|
|
3603
|
+
if (!children) return '';
|
|
3604
|
+
var stringNode = '';
|
|
3605
|
+
var childrenArray = getAsArray(children);
|
|
3606
|
+
var keepArray = i18nOptions.transSupportBasicHtmlNodes && i18nOptions.transKeepBasicHtmlNodesFor ? i18nOptions.transKeepBasicHtmlNodesFor : [];
|
|
3607
|
+
childrenArray.forEach(function (child, childIndex) {
|
|
3608
|
+
if (typeof child === 'string') {
|
|
3609
|
+
stringNode += "".concat(child);
|
|
3610
|
+
} else if (isValidElement(child)) {
|
|
3611
|
+
var childPropsCount = Object.keys(child.props).length;
|
|
3612
|
+
var shouldKeepChild = keepArray.indexOf(child.type) > -1;
|
|
3613
|
+
var childChildren = child.props.children;
|
|
3614
|
+
|
|
3615
|
+
if (!childChildren && shouldKeepChild && childPropsCount === 0) {
|
|
3616
|
+
stringNode += "<".concat(child.type, "/>");
|
|
3617
|
+
} else if (!childChildren && (!shouldKeepChild || childPropsCount !== 0)) {
|
|
3618
|
+
stringNode += "<".concat(childIndex, "></").concat(childIndex, ">");
|
|
3619
|
+
} else if (child.props.i18nIsDynamicList) {
|
|
3620
|
+
stringNode += "<".concat(childIndex, "></").concat(childIndex, ">");
|
|
3621
|
+
} else if (shouldKeepChild && childPropsCount === 1 && typeof childChildren === 'string') {
|
|
3622
|
+
stringNode += "<".concat(child.type, ">").concat(childChildren, "</").concat(child.type, ">");
|
|
3623
|
+
} else {
|
|
3624
|
+
var content = nodesToString(childChildren, i18nOptions);
|
|
3625
|
+
stringNode += "<".concat(childIndex, ">").concat(content, "</").concat(childIndex, ">");
|
|
3626
|
+
}
|
|
3627
|
+
} else if (child === null) {
|
|
3628
|
+
warn("Trans: the passed in value is invalid - seems you passed in a null child.");
|
|
3629
|
+
} else if (_typeof(child) === 'object') {
|
|
3630
|
+
var format = child.format,
|
|
3631
|
+
clone = _objectWithoutProperties(child, _excluded$2);
|
|
3632
|
+
|
|
3633
|
+
var keys = Object.keys(clone);
|
|
3634
|
+
|
|
3635
|
+
if (keys.length === 1) {
|
|
3636
|
+
var value = format ? "".concat(keys[0], ", ").concat(format) : keys[0];
|
|
3637
|
+
stringNode += "{{".concat(value, "}}");
|
|
3638
|
+
} else {
|
|
3639
|
+
warn("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.", child);
|
|
3640
|
+
}
|
|
3641
|
+
} else {
|
|
3642
|
+
warn("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.", child);
|
|
3643
|
+
}
|
|
3644
|
+
});
|
|
3645
|
+
return stringNode;
|
|
3646
|
+
}
|
|
3647
|
+
|
|
3648
|
+
function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) {
|
|
3649
|
+
if (targetString === '') return [];
|
|
3650
|
+
var keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];
|
|
3651
|
+
var emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.join('|')).test(targetString);
|
|
3652
|
+
if (!children && !emptyChildrenButNeedsHandling) return [targetString];
|
|
3653
|
+
var data = {};
|
|
3654
|
+
|
|
3655
|
+
function getData(childs) {
|
|
3656
|
+
var childrenArray = getAsArray(childs);
|
|
3657
|
+
childrenArray.forEach(function (child) {
|
|
3658
|
+
if (typeof child === 'string') return;
|
|
3659
|
+
if (hasChildren(child)) getData(getChildren(child));else if (_typeof(child) === 'object' && !isValidElement(child)) Object.assign(data, child);
|
|
3660
|
+
});
|
|
3661
|
+
}
|
|
3662
|
+
|
|
3663
|
+
getData(children);
|
|
3664
|
+
var ast = c.parse("<0>".concat(targetString, "</0>"));
|
|
3665
|
+
|
|
3666
|
+
var opts = _objectSpread$9(_objectSpread$9({}, data), combinedTOpts);
|
|
3667
|
+
|
|
3668
|
+
function renderInner(child, node, rootReactNode) {
|
|
3669
|
+
var childs = getChildren(child);
|
|
3670
|
+
var mappedChildren = mapAST(childs, node.children, rootReactNode);
|
|
3671
|
+
return hasValidReactChildren(childs) && mappedChildren.length === 0 ? childs : mappedChildren;
|
|
3672
|
+
}
|
|
3673
|
+
|
|
3674
|
+
function pushTranslatedJSX(child, inner, mem, i, isVoid) {
|
|
3675
|
+
if (child.dummy) child.children = inner;
|
|
3676
|
+
mem.push(cloneElement(child, _objectSpread$9(_objectSpread$9({}, child.props), {}, {
|
|
3677
|
+
key: i
|
|
3678
|
+
}), isVoid ? undefined : inner));
|
|
3679
|
+
}
|
|
3680
|
+
|
|
3681
|
+
function mapAST(reactNode, astNode, rootReactNode) {
|
|
3682
|
+
var reactNodes = getAsArray(reactNode);
|
|
3683
|
+
var astNodes = getAsArray(astNode);
|
|
3684
|
+
return astNodes.reduce(function (mem, node, i) {
|
|
3685
|
+
var translationContent = node.children && node.children[0] && node.children[0].content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
|
|
3686
|
+
|
|
3687
|
+
if (node.type === 'tag') {
|
|
3688
|
+
var tmp = reactNodes[parseInt(node.name, 10)];
|
|
3689
|
+
if (!tmp && rootReactNode.length === 1 && rootReactNode[0][node.name]) tmp = rootReactNode[0][node.name];
|
|
3690
|
+
if (!tmp) tmp = {};
|
|
3691
|
+
var child = Object.keys(node.attrs).length !== 0 ? mergeProps({
|
|
3692
|
+
props: node.attrs
|
|
3693
|
+
}, tmp) : tmp;
|
|
3694
|
+
var isElement = isValidElement(child);
|
|
3695
|
+
var isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
|
|
3696
|
+
var isEmptyTransWithHTML = emptyChildrenButNeedsHandling && _typeof(child) === 'object' && child.dummy && !isElement;
|
|
3697
|
+
var isKnownComponent = _typeof(children) === 'object' && children !== null && Object.hasOwnProperty.call(children, node.name);
|
|
3698
|
+
|
|
3699
|
+
if (typeof child === 'string') {
|
|
3700
|
+
var value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
|
|
3701
|
+
mem.push(value);
|
|
3702
|
+
} else if (hasChildren(child) || isValidTranslationWithChildren) {
|
|
3703
|
+
var inner = renderInner(child, node, rootReactNode);
|
|
3704
|
+
pushTranslatedJSX(child, inner, mem, i);
|
|
3705
|
+
} else if (isEmptyTransWithHTML) {
|
|
3706
|
+
var _inner = mapAST(reactNodes, node.children, rootReactNode);
|
|
3707
|
+
|
|
3708
|
+
mem.push(cloneElement(child, _objectSpread$9(_objectSpread$9({}, child.props), {}, {
|
|
3709
|
+
key: i
|
|
3710
|
+
}), _inner));
|
|
3711
|
+
} else if (Number.isNaN(parseFloat(node.name))) {
|
|
3712
|
+
if (isKnownComponent) {
|
|
3713
|
+
var _inner2 = renderInner(child, node, rootReactNode);
|
|
3714
|
+
|
|
3715
|
+
pushTranslatedJSX(child, _inner2, mem, i, node.voidElement);
|
|
3716
|
+
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
|
|
3717
|
+
if (node.voidElement) {
|
|
3718
|
+
mem.push(createElement(node.name, {
|
|
3719
|
+
key: "".concat(node.name, "-").concat(i)
|
|
3720
|
+
}));
|
|
3721
|
+
} else {
|
|
3722
|
+
var _inner3 = mapAST(reactNodes, node.children, rootReactNode);
|
|
3723
|
+
|
|
3724
|
+
mem.push(createElement(node.name, {
|
|
3725
|
+
key: "".concat(node.name, "-").concat(i)
|
|
3726
|
+
}, _inner3));
|
|
3727
|
+
}
|
|
3728
|
+
} else if (node.voidElement) {
|
|
3729
|
+
mem.push("<".concat(node.name, " />"));
|
|
3730
|
+
} else {
|
|
3731
|
+
var _inner4 = mapAST(reactNodes, node.children, rootReactNode);
|
|
3732
|
+
|
|
3733
|
+
mem.push("<".concat(node.name, ">").concat(_inner4, "</").concat(node.name, ">"));
|
|
3734
|
+
}
|
|
3735
|
+
} else if (_typeof(child) === 'object' && !isElement) {
|
|
3736
|
+
var content = node.children[0] ? translationContent : null;
|
|
3737
|
+
if (content) mem.push(content);
|
|
3738
|
+
} else if (node.children.length === 1 && translationContent) {
|
|
3739
|
+
mem.push(cloneElement(child, _objectSpread$9(_objectSpread$9({}, child.props), {}, {
|
|
3740
|
+
key: i
|
|
3741
|
+
}), translationContent));
|
|
3742
|
+
} else {
|
|
3743
|
+
mem.push(cloneElement(child, _objectSpread$9(_objectSpread$9({}, child.props), {}, {
|
|
3744
|
+
key: i
|
|
3745
|
+
})));
|
|
3746
|
+
}
|
|
3747
|
+
} else if (node.type === 'text') {
|
|
3748
|
+
var wrapTextNodes = i18nOptions.transWrapTextNodes;
|
|
3749
|
+
|
|
3750
|
+
var _content = shouldUnescape ? i18nOptions.unescape(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);
|
|
3751
|
+
|
|
3752
|
+
if (wrapTextNodes) {
|
|
3753
|
+
mem.push(createElement(wrapTextNodes, {
|
|
3754
|
+
key: "".concat(node.name, "-").concat(i)
|
|
3755
|
+
}, _content));
|
|
3756
|
+
} else {
|
|
3757
|
+
mem.push(_content);
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3761
|
+
return mem;
|
|
3762
|
+
}, []);
|
|
3763
|
+
}
|
|
3764
|
+
|
|
3765
|
+
var result = mapAST([{
|
|
3766
|
+
dummy: true,
|
|
3767
|
+
children: children || []
|
|
3768
|
+
}], ast, getAsArray(children || []));
|
|
3769
|
+
return getChildren(result[0]);
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3772
|
+
function Trans(_ref) {
|
|
3773
|
+
var children = _ref.children,
|
|
3774
|
+
count = _ref.count,
|
|
3775
|
+
parent = _ref.parent,
|
|
3776
|
+
i18nKey = _ref.i18nKey,
|
|
3777
|
+
context = _ref.context,
|
|
3778
|
+
_ref$tOptions = _ref.tOptions,
|
|
3779
|
+
tOptions = _ref$tOptions === void 0 ? {} : _ref$tOptions,
|
|
3780
|
+
values = _ref.values,
|
|
3781
|
+
defaults = _ref.defaults,
|
|
3782
|
+
components = _ref.components,
|
|
3783
|
+
ns = _ref.ns,
|
|
3784
|
+
i18nFromProps = _ref.i18n,
|
|
3785
|
+
tFromProps = _ref.t,
|
|
3786
|
+
shouldUnescape = _ref.shouldUnescape,
|
|
3787
|
+
additionalProps = _objectWithoutProperties(_ref, _excluded2$2);
|
|
3788
|
+
|
|
3789
|
+
var _ref2 = useContext(I18nContext) || {},
|
|
3790
|
+
i18nFromContext = _ref2.i18n,
|
|
3791
|
+
defaultNSFromContext = _ref2.defaultNS;
|
|
3792
|
+
|
|
3793
|
+
var i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
3794
|
+
|
|
3795
|
+
if (!i18n) {
|
|
3796
|
+
warnOnce('You will need to pass in an i18next instance by using i18nextReactModule');
|
|
3797
|
+
return children;
|
|
3798
|
+
}
|
|
3799
|
+
|
|
3800
|
+
var t = tFromProps || i18n.t.bind(i18n) || function (k) {
|
|
3801
|
+
return k;
|
|
3802
|
+
};
|
|
3803
|
+
|
|
3804
|
+
if (context) tOptions.context = context;
|
|
3805
|
+
|
|
3806
|
+
var reactI18nextOptions = _objectSpread$9(_objectSpread$9({}, getDefaults()), i18n.options && i18n.options.react);
|
|
3807
|
+
|
|
3808
|
+
var namespaces = ns || t.ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
|
|
3809
|
+
namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
|
|
3810
|
+
var defaultValue = defaults || nodesToString(children, reactI18nextOptions) || reactI18nextOptions.transEmptyNodeValue || i18nKey;
|
|
3811
|
+
var hashTransKey = reactI18nextOptions.hashTransKey;
|
|
3812
|
+
var key = i18nKey || (hashTransKey ? hashTransKey(defaultValue) : defaultValue);
|
|
3813
|
+
var interpolationOverride = values ? tOptions.interpolation : {
|
|
3814
|
+
interpolation: _objectSpread$9(_objectSpread$9({}, tOptions.interpolation), {}, {
|
|
3815
|
+
prefix: '#$?',
|
|
3816
|
+
suffix: '?$#'
|
|
3817
|
+
})
|
|
3818
|
+
};
|
|
3819
|
+
|
|
3820
|
+
var combinedTOpts = _objectSpread$9(_objectSpread$9(_objectSpread$9(_objectSpread$9({}, tOptions), {}, {
|
|
3821
|
+
count: count
|
|
3822
|
+
}, values), interpolationOverride), {}, {
|
|
3823
|
+
defaultValue: defaultValue,
|
|
3824
|
+
ns: namespaces
|
|
3825
|
+
});
|
|
3826
|
+
|
|
3827
|
+
var translation = key ? t(key, combinedTOpts) : defaultValue;
|
|
3828
|
+
var content = renderNodes(components || children, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
|
|
3829
|
+
var useAsParent = parent !== undefined ? parent : reactI18nextOptions.defaultTransParent;
|
|
3830
|
+
return useAsParent ? createElement(useAsParent, additionalProps, content) : content;
|
|
3831
|
+
}
|
|
3832
|
+
|
|
3603
3833
|
function _iterableToArrayLimit(arr, i) {
|
|
3604
3834
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3605
3835
|
if (_i == null) return;
|
|
@@ -3750,6 +3980,7 @@ var alerts$1 = {
|
|
|
3750
3980
|
};
|
|
3751
3981
|
var buttons$1 = {
|
|
3752
3982
|
cancel: "Cancel",
|
|
3983
|
+
changeRole: "Change role",
|
|
3753
3984
|
proceed: "Proceed",
|
|
3754
3985
|
saveChanges: "Save changes"
|
|
3755
3986
|
};
|
|
@@ -3790,7 +4021,10 @@ var common$1 = {
|
|
|
3790
4021
|
};
|
|
3791
4022
|
var helpers$1 = {
|
|
3792
4023
|
configPermissions: "Configure permissions for the modules.",
|
|
3793
|
-
enterMultipleEmails: "Please press space, tab or enter key after entering an email address."
|
|
4024
|
+
enterMultipleEmails: "Please press space, tab or enter key after entering an email address.",
|
|
4025
|
+
noRolesFound: "No roles found.",
|
|
4026
|
+
searchRoles: "Search roles",
|
|
4027
|
+
selectedMembersCount: "{{count}} {{metaName}} selected from {{totalCount}}"
|
|
3794
4028
|
};
|
|
3795
4029
|
var metaNames$1 = {
|
|
3796
4030
|
agent_one: "Agent",
|
|
@@ -3841,6 +4075,7 @@ var alerts = {
|
|
|
3841
4075
|
};
|
|
3842
4076
|
var buttons = {
|
|
3843
4077
|
cancel: "Annuler",
|
|
4078
|
+
changeRole: "Changer de rôle",
|
|
3844
4079
|
proceed: "Procéder",
|
|
3845
4080
|
saveChanges: "Sauvegarder les modifications"
|
|
3846
4081
|
};
|
|
@@ -3881,7 +4116,11 @@ var common = {
|
|
|
3881
4116
|
};
|
|
3882
4117
|
var helpers = {
|
|
3883
4118
|
configPermissions: "Configurez les autorisations pour les modules.",
|
|
3884
|
-
enterMultipleEmails: "Veuillez appuyer sur espace, tabulation ou entrée après avoir saisi une adresse e-mail."
|
|
4119
|
+
enterMultipleEmails: "Veuillez appuyer sur espace, tabulation ou entrée après avoir saisi une adresse e-mail.",
|
|
4120
|
+
noRolesFound: "Aucun rôle trouvé.",
|
|
4121
|
+
searchRoles: "Rechercher des rôles",
|
|
4122
|
+
selectedMembersCount_one: "{{count}} {{metaName}} sélectionné parmi {{totalCount}}",
|
|
4123
|
+
selectedMembersCount_other: "{{count}} {{metaName}} sélectionnés parmi {{totalCount}}"
|
|
3885
4124
|
};
|
|
3886
4125
|
var metaNames = {
|
|
3887
4126
|
member_one: "Membre",
|
|
@@ -3980,6 +4219,7 @@ const slugify = string => string.toString().toLowerCase().replace(/\s+/g, "-") /
|
|
|
3980
4219
|
.replace(/-+$/, ""); // Trim - from end of text
|
|
3981
4220
|
|
|
3982
4221
|
const capitalize = string => string.charAt(0).toUpperCase() + string.slice(1);
|
|
4222
|
+
const isNotEmpty$1 = complement(isEmpty);
|
|
3983
4223
|
|
|
3984
4224
|
const SINGULAR = {
|
|
3985
4225
|
count: 1
|
|
@@ -7233,7 +7473,7 @@ const organizationRolesApi = {
|
|
|
7233
7473
|
|
|
7234
7474
|
const _excluded$1 = ["onSuccess"],
|
|
7235
7475
|
_excluded2$1 = ["onSuccess"],
|
|
7236
|
-
_excluded3 = ["onSuccess"];
|
|
7476
|
+
_excluded3$1 = ["onSuccess"];
|
|
7237
7477
|
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; }
|
|
7238
7478
|
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(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; }
|
|
7239
7479
|
const useFetchRoles = function () {
|
|
@@ -7283,7 +7523,7 @@ const useUpdateRole = _ref2 => {
|
|
|
7283
7523
|
const useDestroyRole = _ref4 => {
|
|
7284
7524
|
let _ref4$onSuccess = _ref4.onSuccess,
|
|
7285
7525
|
onSuccess = _ref4$onSuccess === void 0 ? noop$1 : _ref4$onSuccess,
|
|
7286
|
-
options = _objectWithoutProperties(_ref4, _excluded3);
|
|
7526
|
+
options = _objectWithoutProperties(_ref4, _excluded3$1);
|
|
7287
7527
|
return useMutation(_ref5 => {
|
|
7288
7528
|
let id = _ref5.id,
|
|
7289
7529
|
payload = _ref5.payload;
|
|
@@ -9580,14 +9820,17 @@ const fetch = params => axios.get(`${BASE_URL}/teams`, {
|
|
|
9580
9820
|
});
|
|
9581
9821
|
const create = payload => axios.post(`${BASE_URL}/teams`, payload);
|
|
9582
9822
|
const update = (id, payload) => axios.put(`${BASE_URL}/teams/${id}`, payload);
|
|
9823
|
+
const bulkUpdate = payload => axios.patch(`${BASE_URL}/teams/bulk_update`, payload);
|
|
9583
9824
|
const teamsApi = {
|
|
9584
|
-
|
|
9825
|
+
bulkUpdate,
|
|
9585
9826
|
create,
|
|
9827
|
+
fetch,
|
|
9586
9828
|
update
|
|
9587
9829
|
};
|
|
9588
9830
|
|
|
9589
9831
|
const _excluded = ["onSuccess"],
|
|
9590
|
-
_excluded2 = ["onSuccess"]
|
|
9832
|
+
_excluded2 = ["onSuccess"],
|
|
9833
|
+
_excluded3 = ["onSuccess"];
|
|
9591
9834
|
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; }
|
|
9592
9835
|
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(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; }
|
|
9593
9836
|
const useFetchMembers = function () {
|
|
@@ -9625,6 +9868,17 @@ const useUpdateMember = _ref2 => {
|
|
|
9625
9868
|
}
|
|
9626
9869
|
}, options));
|
|
9627
9870
|
};
|
|
9871
|
+
const useBulkUpdateMembers = _ref4 => {
|
|
9872
|
+
let onSuccess = _ref4.onSuccess,
|
|
9873
|
+
options = _objectWithoutProperties(_ref4, _excluded3);
|
|
9874
|
+
return useMutation(teamsApi.bulkUpdate, _objectSpread$3({
|
|
9875
|
+
onSuccess: response => {
|
|
9876
|
+
queryClient.invalidateQueries(QUERY_KEYS.TEAMS);
|
|
9877
|
+
Toastr.success(response.ntmNotice || response.data.ntmNotice);
|
|
9878
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
9879
|
+
}
|
|
9880
|
+
}, options));
|
|
9881
|
+
};
|
|
9628
9882
|
|
|
9629
9883
|
const useDebounce = function (value) {
|
|
9630
9884
|
let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
@@ -9698,7 +9952,7 @@ const removeBy = curry((pattern, array) => array.filter(complement(matches(patte
|
|
|
9698
9952
|
const removeFixedColumns = (fixedColumns, columnData) => removeBy({
|
|
9699
9953
|
dataIndex: includes(__, fixedColumns)
|
|
9700
9954
|
}, columnData);
|
|
9701
|
-
const filterBySearchTerm = (searchTerm, columns) => filter(_ref3 => {
|
|
9955
|
+
const filterBySearchTerm$1 = (searchTerm, columns) => filter(_ref3 => {
|
|
9702
9956
|
let title = _ref3.title;
|
|
9703
9957
|
return includes(trim(toLower(searchTerm)), trim(toLower(title)));
|
|
9704
9958
|
}, columns);
|
|
@@ -9736,7 +9990,7 @@ const Columns = _ref => {
|
|
|
9736
9990
|
searchTerm = _useState2[0],
|
|
9737
9991
|
setSearchTerm = _useState2[1];
|
|
9738
9992
|
const columns = removeFixedColumns(fixedColumns, columnData);
|
|
9739
|
-
const filteredColumns = filterBySearchTerm(searchTerm, columns);
|
|
9993
|
+
const filteredColumns = filterBySearchTerm$1(searchTerm, columns);
|
|
9740
9994
|
const handleChange = _ref2 => {
|
|
9741
9995
|
let _ref2$target = _ref2.target,
|
|
9742
9996
|
dataIndex = _ref2$target.name,
|
|
@@ -9804,44 +10058,70 @@ const MANAGE_ROLES_BUTTON_LABEL = instance.t("common.manage_", {
|
|
|
9804
10058
|
what: instance.t("common.role", PLURAL).toLocaleLowerCase()
|
|
9805
10059
|
});
|
|
9806
10060
|
|
|
9807
|
-
const
|
|
9808
|
-
let
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
const
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
const
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
|
|
10061
|
+
const filterBySearchTerm = (searchTerm, roles) => filter(_ref => {
|
|
10062
|
+
let name = _ref.name;
|
|
10063
|
+
return includes(trim(toLower(searchTerm)), trim(toLower(name)));
|
|
10064
|
+
}, roles);
|
|
10065
|
+
const getActivateButtonVisible = selectedRows => selectedRows.active.some(active => active === false);
|
|
10066
|
+
const getDeactivatedButtonVisible = selectedRows => selectedRows.active.some(active => active === true);
|
|
10067
|
+
|
|
10068
|
+
const Menu$1 = Dropdown.Menu,
|
|
10069
|
+
MenuItem = Dropdown.MenuItem;
|
|
10070
|
+
const RolesDropdown = _ref => {
|
|
10071
|
+
let handleRoleChange = _ref.handleRoleChange,
|
|
10072
|
+
_ref$isSearchable = _ref.isSearchable,
|
|
10073
|
+
isSearchable = _ref$isSearchable === void 0 ? false : _ref$isSearchable,
|
|
10074
|
+
_ref$roles = _ref.roles,
|
|
10075
|
+
roles = _ref$roles === void 0 ? [] : _ref$roles;
|
|
10076
|
+
const _useState = useState(false),
|
|
10077
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
10078
|
+
isDropdownOpen = _useState2[0],
|
|
10079
|
+
setIsDropdownOpen = _useState2[1];
|
|
10080
|
+
const _useState3 = useState(""),
|
|
10081
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
10082
|
+
searchTerm = _useState4[0],
|
|
10083
|
+
setSearchTerm = _useState4[1];
|
|
10084
|
+
const filteredRoles = filterBySearchTerm(searchTerm, roles);
|
|
10085
|
+
const handleSearch = _ref2 => {
|
|
10086
|
+
let value = _ref2.target.value;
|
|
10087
|
+
return setSearchTerm(value);
|
|
10088
|
+
};
|
|
10089
|
+
const handleSelectRole = role => {
|
|
10090
|
+
handleRoleChange(role);
|
|
10091
|
+
setIsDropdownOpen(false);
|
|
10092
|
+
};
|
|
10093
|
+
const handleOnClose = () => {
|
|
10094
|
+
setSearchTerm("");
|
|
10095
|
+
setIsDropdownOpen(false);
|
|
10096
|
+
};
|
|
10097
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
10098
|
+
buttonSize: "small",
|
|
10099
|
+
buttonStyle: "secondary",
|
|
10100
|
+
closeOnSelect: false,
|
|
10101
|
+
"data-cy": "ntm-members-roles-update-dropdown",
|
|
10102
|
+
label: instance.t("buttons.changeRole"),
|
|
10103
|
+
isOpen: isDropdownOpen,
|
|
10104
|
+
onClick: () => setIsDropdownOpen(true),
|
|
10105
|
+
onClose: () => handleOnClose(),
|
|
10106
|
+
position: "bottom-end"
|
|
10107
|
+
}, /*#__PURE__*/React.createElement(Menu$1, null, /*#__PURE__*/React.createElement("div", null, isSearchable && /*#__PURE__*/React.createElement(Input$1, {
|
|
10108
|
+
className: "neeto-ui-px-3 neeto-ui-py-2",
|
|
10109
|
+
"data-cy": "ntm-members-roles-search-input",
|
|
10110
|
+
onChange: handleSearch,
|
|
10111
|
+
placeholder: instance.t("helpers.searchRoles"),
|
|
10112
|
+
prefix: /*#__PURE__*/React.createElement(Search, null),
|
|
10113
|
+
type: "search",
|
|
10114
|
+
value: searchTerm
|
|
10115
|
+
}), isNotEmpty$1(filteredRoles) ? filteredRoles.map(_ref3 => {
|
|
10116
|
+
let id = _ref3.id,
|
|
10117
|
+
name = _ref3.name;
|
|
10118
|
+
return /*#__PURE__*/React.createElement(MenuItem.Button, {
|
|
10119
|
+
key: id,
|
|
10120
|
+
onClick: () => handleSelectRole(name)
|
|
10121
|
+
}, name);
|
|
10122
|
+
}) : /*#__PURE__*/React.createElement("span", {
|
|
10123
|
+
className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2"
|
|
10124
|
+
}, instance.t("helpers.noRolesFound")))));
|
|
9845
10125
|
};
|
|
9846
10126
|
|
|
9847
10127
|
var _URLSearchParams$get;
|
|
@@ -9884,6 +10164,105 @@ const DEFAULT_FILTER_VALUES = {
|
|
|
9884
10164
|
sort_by: "",
|
|
9885
10165
|
sort_direction: ""
|
|
9886
10166
|
};
|
|
10167
|
+
const DEFAULT_SELECTED_ROWS = {
|
|
10168
|
+
active: [],
|
|
10169
|
+
emails: [],
|
|
10170
|
+
keys: []
|
|
10171
|
+
};
|
|
10172
|
+
|
|
10173
|
+
const Left = _ref => {
|
|
10174
|
+
var _selectedRows$keys, _selectedRows$keys2;
|
|
10175
|
+
let filteredCount = _ref.filteredCount,
|
|
10176
|
+
metaName = _ref.metaName,
|
|
10177
|
+
selectedRows = _ref.selectedRows,
|
|
10178
|
+
totalCount = _ref.totalCount;
|
|
10179
|
+
const hasSelectedRows = isNotEmpty$1(selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.keys);
|
|
10180
|
+
const pluralizedByFilterCount = metaName({
|
|
10181
|
+
count: filteredCount
|
|
10182
|
+
}).toLocaleLowerCase();
|
|
10183
|
+
const selectedMembersCountValues = {
|
|
10184
|
+
count: selectedRows === null || selectedRows === void 0 ? void 0 : (_selectedRows$keys = selectedRows.keys) === null || _selectedRows$keys === void 0 ? void 0 : _selectedRows$keys.length,
|
|
10185
|
+
metaName: metaName({
|
|
10186
|
+
count: selectedRows === null || selectedRows === void 0 ? void 0 : (_selectedRows$keys2 = selectedRows.keys) === null || _selectedRows$keys2 === void 0 ? void 0 : _selectedRows$keys2.length
|
|
10187
|
+
}).toLocaleLowerCase(),
|
|
10188
|
+
totalCount
|
|
10189
|
+
};
|
|
10190
|
+
return /*#__PURE__*/React.createElement(Typography, {
|
|
10191
|
+
"data-cy": "ntm-filtered-members-count",
|
|
10192
|
+
component: "h4",
|
|
10193
|
+
style: "h4"
|
|
10194
|
+
}, hasSelectedRows ? /*#__PURE__*/React.createElement(Trans, {
|
|
10195
|
+
i18nKey: "helpers.selectedMembersCount",
|
|
10196
|
+
values: selectedMembersCountValues
|
|
10197
|
+
}) : `${filteredCount} ${pluralizedByFilterCount}`);
|
|
10198
|
+
};
|
|
10199
|
+
const Right = _ref2 => {
|
|
10200
|
+
let columns = _ref2.columns,
|
|
10201
|
+
roles = _ref2.roles,
|
|
10202
|
+
rolesButtonProps = _ref2.rolesButtonProps,
|
|
10203
|
+
selectedRows = _ref2.selectedRows,
|
|
10204
|
+
setColumnData = _ref2.setColumnData,
|
|
10205
|
+
setSelectedRows = _ref2.setSelectedRows;
|
|
10206
|
+
const isRolesButtonVisible = !!rolesButtonProps;
|
|
10207
|
+
const _useBulkUpdateMembers = useBulkUpdateMembers({
|
|
10208
|
+
onSuccess: () => setSelectedRows(DEFAULT_SELECTED_ROWS)
|
|
10209
|
+
}),
|
|
10210
|
+
bulkUpdateMember = _useBulkUpdateMembers.mutate;
|
|
10211
|
+
const handleDeactivateMembers = () => bulkUpdateMember({
|
|
10212
|
+
users: {
|
|
10213
|
+
active: false,
|
|
10214
|
+
emails: selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.emails
|
|
10215
|
+
}
|
|
10216
|
+
});
|
|
10217
|
+
const handleActivateMembers = () => bulkUpdateMember({
|
|
10218
|
+
users: {
|
|
10219
|
+
active: true,
|
|
10220
|
+
emails: selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.emails
|
|
10221
|
+
}
|
|
10222
|
+
});
|
|
10223
|
+
const handleRoleChange = role => {
|
|
10224
|
+
bulkUpdateMember({
|
|
10225
|
+
users: {
|
|
10226
|
+
active: true,
|
|
10227
|
+
emails: selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.emails,
|
|
10228
|
+
organization_role: role
|
|
10229
|
+
}
|
|
10230
|
+
});
|
|
10231
|
+
};
|
|
10232
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, getDeactivatedButtonVisible(selectedRows) && /*#__PURE__*/React.createElement(Button, {
|
|
10233
|
+
"data-cy": "ntm-deactivate-members-button",
|
|
10234
|
+
label: instance.t("common.deactivate"),
|
|
10235
|
+
size: "small",
|
|
10236
|
+
style: "secondary",
|
|
10237
|
+
onClick: () => handleDeactivateMembers()
|
|
10238
|
+
}), getActivateButtonVisible(selectedRows) && /*#__PURE__*/React.createElement(Button, {
|
|
10239
|
+
"data-cy": "ntm-activate-members-button",
|
|
10240
|
+
label: instance.t("common.activate"),
|
|
10241
|
+
size: "small",
|
|
10242
|
+
style: "secondary",
|
|
10243
|
+
onClick: () => handleActivateMembers()
|
|
10244
|
+
}), isNotEmpty$1(selectedRows.keys) && /*#__PURE__*/React.createElement(RolesDropdown, {
|
|
10245
|
+
handleRoleChange: handleRoleChange,
|
|
10246
|
+
roles: roles
|
|
10247
|
+
}), /*#__PURE__*/React.createElement(Columns, {
|
|
10248
|
+
columnData: columns,
|
|
10249
|
+
dropdownProps: COLUMNS_DROPDOWN_PROPS,
|
|
10250
|
+
fixedColumns: FIXED_COLUMNS,
|
|
10251
|
+
localStorageKey: "NTM_MEMBERS_TABLE_HIDDEN_COLUMNS",
|
|
10252
|
+
noColumnMessage: instance.t("columns.noColumnsFound"),
|
|
10253
|
+
onChange: setColumnData,
|
|
10254
|
+
searchProps: COLUMNS_SEARCH_PROPS
|
|
10255
|
+
}), isRolesButtonVisible ? /*#__PURE__*/React.createElement(Button, _extends({
|
|
10256
|
+
"data-cy": "ntm-manage-roles-button",
|
|
10257
|
+
label: MANAGE_ROLES_BUTTON_LABEL,
|
|
10258
|
+
size: "small",
|
|
10259
|
+
style: "secondary"
|
|
10260
|
+
}, rolesButtonProps)) : null);
|
|
10261
|
+
};
|
|
10262
|
+
const SubHeader = {
|
|
10263
|
+
Left,
|
|
10264
|
+
Right
|
|
10265
|
+
};
|
|
9887
10266
|
|
|
9888
10267
|
function commonjsRequire(path) {
|
|
9889
10268
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
@@ -10623,6 +11002,13 @@ MultipleEmailInput.defaultProps = {
|
|
|
10623
11002
|
selectedMember: null
|
|
10624
11003
|
};
|
|
10625
11004
|
|
|
11005
|
+
const RoleLabel = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
11006
|
+
className: "ntm-members-radio-group__label"
|
|
11007
|
+
}, instance.t("common.role", SINGULAR), "*"), /*#__PURE__*/React.createElement(Info, {
|
|
11008
|
+
className: "ntm-members-radio-group__icon",
|
|
11009
|
+
size: 16,
|
|
11010
|
+
onClick: () => window.location.pathname += "/roles"
|
|
11011
|
+
}));
|
|
10626
11012
|
const RolesRadioGroup = _ref => {
|
|
10627
11013
|
let role = _ref.role,
|
|
10628
11014
|
roles = _ref.roles;
|
|
@@ -10630,7 +11016,7 @@ const RolesRadioGroup = _ref => {
|
|
|
10630
11016
|
stacked: true,
|
|
10631
11017
|
className: "ntm-members-radio-group",
|
|
10632
11018
|
"data-cy": "ntm-manage-member-roles-group",
|
|
10633
|
-
label:
|
|
11019
|
+
label: RoleLabel,
|
|
10634
11020
|
name: "role"
|
|
10635
11021
|
}, roles.map(_ref2 => {
|
|
10636
11022
|
let description = _ref2.description,
|
|
@@ -10787,7 +11173,7 @@ const Menu = _ref => {
|
|
|
10787
11173
|
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; }
|
|
10788
11174
|
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(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; }
|
|
10789
11175
|
const TeamMembers = _ref => {
|
|
10790
|
-
var _config$permissions$v, _config$permissions, _config$permissions$v2, _config$permissions2;
|
|
11176
|
+
var _config$permissions$v, _config$permissions, _config$permissions$v2, _config$permissions2, _filters$category;
|
|
10791
11177
|
let config = _ref.config;
|
|
10792
11178
|
const metaName = getMetaName((config === null || config === void 0 ? void 0 : config.metaName) || "member");
|
|
10793
11179
|
const _useState = useState(DEFAULT_IS_OPEN_VALUES),
|
|
@@ -10807,6 +11193,10 @@ const TeamMembers = _ref => {
|
|
|
10807
11193
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
10808
11194
|
columnData = _useState8[0],
|
|
10809
11195
|
setColumnData = _useState8[1];
|
|
11196
|
+
const _useState9 = useState(DEFAULT_SELECTED_ROWS),
|
|
11197
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
11198
|
+
selectedRows = _useState10[0],
|
|
11199
|
+
setSelectedRows = _useState10[1];
|
|
10810
11200
|
const _useFetchMembers = useFetchMembers(_objectSpread(_objectSpread({}, filters), {}, {
|
|
10811
11201
|
search: debouncedSearch.trim(),
|
|
10812
11202
|
category: filters.category.toLowerCase()
|
|
@@ -10830,6 +11220,7 @@ const TeamMembers = _ref => {
|
|
|
10830
11220
|
}),
|
|
10831
11221
|
updateMember = _useUpdateMember.mutate,
|
|
10832
11222
|
isUpdatingMember = _useUpdateMember.isLoading;
|
|
11223
|
+
const currentCategoryCount = team === null || team === void 0 ? void 0 : team.perCategoryCount[filters === null || filters === void 0 ? void 0 : (_filters$category = filters.category) === null || _filters$category === void 0 ? void 0 : _filters$category.toLowerCase()];
|
|
10833
11224
|
const searchProps = {
|
|
10834
11225
|
"data-cy": "ntm-search-members-input",
|
|
10835
11226
|
onChange: _ref3 => {
|
|
@@ -10894,6 +11285,13 @@ const TeamMembers = _ref => {
|
|
|
10894
11285
|
sort_direction: sorter.order
|
|
10895
11286
|
}));
|
|
10896
11287
|
};
|
|
11288
|
+
const handleRowSelect = (keys, rowData) => {
|
|
11289
|
+
setSelectedRows({
|
|
11290
|
+
active: pluck("active", rowData),
|
|
11291
|
+
emails: pluck("email", rowData),
|
|
11292
|
+
keys
|
|
11293
|
+
});
|
|
11294
|
+
};
|
|
10897
11295
|
if (isRolesLoading || isMembersLoading) {
|
|
10898
11296
|
return /*#__PURE__*/React.createElement("div", {
|
|
10899
11297
|
className: "ntm-members-page-loader"
|
|
@@ -10922,18 +11320,24 @@ const TeamMembers = _ref => {
|
|
|
10922
11320
|
})
|
|
10923
11321
|
}), /*#__PURE__*/React.createElement(SubHeader$1, {
|
|
10924
11322
|
leftActionBlock: /*#__PURE__*/React.createElement(SubHeader.Left, {
|
|
11323
|
+
filteredCount: team === null || team === void 0 ? void 0 : team.membersCount,
|
|
10925
11324
|
metaName: metaName,
|
|
10926
|
-
|
|
11325
|
+
selectedRows: selectedRows,
|
|
11326
|
+
totalCount: currentCategoryCount
|
|
10927
11327
|
}),
|
|
10928
11328
|
rightActionBlock: /*#__PURE__*/React.createElement(SubHeader.Right, {
|
|
10929
11329
|
columns: columns,
|
|
11330
|
+
roles: roles,
|
|
10930
11331
|
rolesButtonProps: config.rolesButtonProps,
|
|
10931
|
-
|
|
11332
|
+
selectedRows: selectedRows,
|
|
11333
|
+
setColumnData: setColumnData,
|
|
11334
|
+
setSelectedRows: setSelectedRows
|
|
10932
11335
|
})
|
|
10933
11336
|
}), (team === null || team === void 0 ? void 0 : team.membersCount) !== 0 ? /*#__PURE__*/React.createElement("div", {
|
|
10934
11337
|
className: "ntm-members__table-wrapper"
|
|
10935
11338
|
}, /*#__PURE__*/React.createElement(Table$1, {
|
|
10936
11339
|
fixedHeight: true,
|
|
11340
|
+
rowSelection: true,
|
|
10937
11341
|
allowRowClick: false,
|
|
10938
11342
|
columnData: columnData,
|
|
10939
11343
|
currentPageNumber: parseInt(filters.page, DEFAULT_RADIX),
|
|
@@ -10941,10 +11345,11 @@ const TeamMembers = _ref => {
|
|
|
10941
11345
|
defaultPageSize: parseInt(filters.results, DEFAULT_RADIX),
|
|
10942
11346
|
handlePageChange: handlePageChange(setFilters, filters.category),
|
|
10943
11347
|
loading: isMembersFetching,
|
|
10944
|
-
onChange:
|
|
11348
|
+
onChange: handleTableChange,
|
|
11349
|
+
onRowSelect: handleRowSelect,
|
|
10945
11350
|
paginationProps: renderPaginationProps(filters.results),
|
|
10946
11351
|
rowData: team === null || team === void 0 ? void 0 : team.members,
|
|
10947
|
-
|
|
11352
|
+
selectedRowKeys: selectedRows.keys,
|
|
10948
11353
|
totalCount: team === null || team === void 0 ? void 0 : team.membersCount
|
|
10949
11354
|
})) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
10950
11355
|
title: instance.t("common.notFound_", {
|
|
@@ -10991,7 +11396,7 @@ const VALIDATION_SCHEMA = {
|
|
|
10991
11396
|
|
|
10992
11397
|
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}}
|
|
10993
11398
|
|
|
10994
|
-
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 padding-bottom: 1rem;\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-members-radio-group {\n width: 100%;\n}\n.ntm-members-radio-group .neeto-ui-radio__container--stacked {\n width: 100%;\n}\n\n.ntm-members-pane-radio-item__wrapper {\n width: 100%;\n cursor: pointer;\n padding: 16px 0px !important;\n border-bottom: 1px solid rgb(var(--neeto-ui-gray-200));\n}\n.ntm-members-pane-radio-item__wrapper:first-child {\n padding-top: 0px !important;\n}\n.ntm-members-pane-radio-item__label {\n margin-bottom: 0 !important;\n}\n.ntm-members-pane-radio-item__description {\n color: rgb(var(--neeto-ui-gray-700));\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 align-items: center;\n border-radius: var(--neeto-ui-rounded);\n border-width: 1px;\n border-color: rgb(var(--neeto-ui-gray-300));\n cursor: pointer;\n display: flex;\n gap: 0.75rem;\n padding: 1rem 0.75rem;\n}\n.ntm-roles-permission__card--description {\n flex-grow: 1;\n}\n.ntm-roles-permission__card--checkbox {\n padding: 0 0.5rem;\n}\n\ntd.ant-table-column-sort {\n background: transparent;\n}";
|
|
11399
|
+
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 padding-bottom: 1rem;\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-members-radio-group {\n width: 100%;\n}\n.ntm-members-radio-group .neeto-ui-radio__container--stacked {\n width: 100%;\n}\n.ntm-members-radio-group__label {\n padding-right: 4px;\n}\n.ntm-members-radio-group__icon {\n cursor: pointer;\n}\n\n.ntm-members-pane-radio-item__wrapper {\n width: 100%;\n cursor: pointer;\n padding: 16px 0px !important;\n border-bottom: 1px solid rgb(var(--neeto-ui-gray-200));\n}\n.ntm-members-pane-radio-item__wrapper:first-child {\n padding-top: 0px !important;\n}\n.ntm-members-pane-radio-item__label {\n margin-bottom: 0 !important;\n}\n.ntm-members-pane-radio-item__description {\n color: rgb(var(--neeto-ui-gray-700));\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 align-items: center;\n border-radius: var(--neeto-ui-rounded);\n border-width: 1px;\n border-color: rgb(var(--neeto-ui-gray-300));\n cursor: pointer;\n display: flex;\n gap: 0.75rem;\n padding: 1rem 0.75rem;\n}\n.ntm-roles-permission__card--description {\n flex-grow: 1;\n}\n.ntm-roles-permission__card--checkbox {\n padding: 0 0.5rem;\n}\n\ntd.ant-table-column-sort {\n background: transparent;\n}";
|
|
10995
11400
|
n(css,{});
|
|
10996
11401
|
|
|
10997
11402
|
export { MultipleEmailInput, index$1 as Roles, RolesRadioGroup, index as TeamMembers, VALIDATION_SCHEMA, hasPermission };
|