@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.cjs.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var ramda = require('ramda');
|
|
6
7
|
var ReactDOM = require('react-dom');
|
|
7
8
|
var axios = require('axios');
|
|
8
9
|
var neetoui = require('@bigbinary/neetoui');
|
|
9
|
-
var ramda = require('ramda');
|
|
10
10
|
var layouts = require('@bigbinary/neetoui/layouts');
|
|
11
11
|
var formik = require('formik');
|
|
12
12
|
var formik$1 = require('@bigbinary/neetoui/formik');
|
|
@@ -169,9 +169,9 @@ function _toArray(arr) {
|
|
|
169
169
|
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
function ownKeys$
|
|
172
|
+
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; }
|
|
173
173
|
|
|
174
|
-
function _objectSpread$
|
|
174
|
+
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; }
|
|
175
175
|
|
|
176
176
|
var consoleLogger = {
|
|
177
177
|
type: 'logger',
|
|
@@ -258,7 +258,7 @@ var Logger = function () {
|
|
|
258
258
|
}, {
|
|
259
259
|
key: "create",
|
|
260
260
|
value: function create(moduleName) {
|
|
261
|
-
return new Logger(this.logger, _objectSpread$
|
|
261
|
+
return new Logger(this.logger, _objectSpread$b(_objectSpread$b({}, {
|
|
262
262
|
prefix: "".concat(this.prefix, ":").concat(moduleName, ":")
|
|
263
263
|
}), this.options));
|
|
264
264
|
}
|
|
@@ -3030,103 +3030,80 @@ function defaults(obj) {
|
|
|
3030
3030
|
|
|
3031
3031
|
// eslint-disable-next-line no-control-regex
|
|
3032
3032
|
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
3033
|
-
|
|
3034
3033
|
var serializeCookie = function serializeCookie(name, val, options) {
|
|
3035
3034
|
var opt = options || {};
|
|
3036
3035
|
opt.path = opt.path || '/';
|
|
3037
3036
|
var value = encodeURIComponent(val);
|
|
3038
3037
|
var str = "".concat(name, "=").concat(value);
|
|
3039
|
-
|
|
3040
3038
|
if (opt.maxAge > 0) {
|
|
3041
3039
|
var maxAge = opt.maxAge - 0;
|
|
3042
3040
|
if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');
|
|
3043
3041
|
str += "; Max-Age=".concat(Math.floor(maxAge));
|
|
3044
3042
|
}
|
|
3045
|
-
|
|
3046
3043
|
if (opt.domain) {
|
|
3047
3044
|
if (!fieldContentRegExp.test(opt.domain)) {
|
|
3048
3045
|
throw new TypeError('option domain is invalid');
|
|
3049
3046
|
}
|
|
3050
|
-
|
|
3051
3047
|
str += "; Domain=".concat(opt.domain);
|
|
3052
3048
|
}
|
|
3053
|
-
|
|
3054
3049
|
if (opt.path) {
|
|
3055
3050
|
if (!fieldContentRegExp.test(opt.path)) {
|
|
3056
3051
|
throw new TypeError('option path is invalid');
|
|
3057
3052
|
}
|
|
3058
|
-
|
|
3059
3053
|
str += "; Path=".concat(opt.path);
|
|
3060
3054
|
}
|
|
3061
|
-
|
|
3062
3055
|
if (opt.expires) {
|
|
3063
3056
|
if (typeof opt.expires.toUTCString !== 'function') {
|
|
3064
3057
|
throw new TypeError('option expires is invalid');
|
|
3065
3058
|
}
|
|
3066
|
-
|
|
3067
3059
|
str += "; Expires=".concat(opt.expires.toUTCString());
|
|
3068
3060
|
}
|
|
3069
|
-
|
|
3070
3061
|
if (opt.httpOnly) str += '; HttpOnly';
|
|
3071
3062
|
if (opt.secure) str += '; Secure';
|
|
3072
|
-
|
|
3073
3063
|
if (opt.sameSite) {
|
|
3074
3064
|
var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
3075
|
-
|
|
3076
3065
|
switch (sameSite) {
|
|
3077
3066
|
case true:
|
|
3078
3067
|
str += '; SameSite=Strict';
|
|
3079
3068
|
break;
|
|
3080
|
-
|
|
3081
3069
|
case 'lax':
|
|
3082
3070
|
str += '; SameSite=Lax';
|
|
3083
3071
|
break;
|
|
3084
|
-
|
|
3085
3072
|
case 'strict':
|
|
3086
3073
|
str += '; SameSite=Strict';
|
|
3087
3074
|
break;
|
|
3088
|
-
|
|
3089
3075
|
case 'none':
|
|
3090
3076
|
str += '; SameSite=None';
|
|
3091
3077
|
break;
|
|
3092
|
-
|
|
3093
3078
|
default:
|
|
3094
3079
|
throw new TypeError('option sameSite is invalid');
|
|
3095
3080
|
}
|
|
3096
3081
|
}
|
|
3097
|
-
|
|
3098
3082
|
return str;
|
|
3099
3083
|
};
|
|
3100
|
-
|
|
3101
3084
|
var cookie = {
|
|
3102
3085
|
create: function create(name, value, minutes, domain) {
|
|
3103
3086
|
var cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
|
|
3104
3087
|
path: '/',
|
|
3105
3088
|
sameSite: 'strict'
|
|
3106
3089
|
};
|
|
3107
|
-
|
|
3108
3090
|
if (minutes) {
|
|
3109
3091
|
cookieOptions.expires = new Date();
|
|
3110
3092
|
cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);
|
|
3111
3093
|
}
|
|
3112
|
-
|
|
3113
3094
|
if (domain) cookieOptions.domain = domain;
|
|
3114
3095
|
document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);
|
|
3115
3096
|
},
|
|
3116
3097
|
read: function read(name) {
|
|
3117
3098
|
var nameEQ = "".concat(name, "=");
|
|
3118
3099
|
var ca = document.cookie.split(';');
|
|
3119
|
-
|
|
3120
3100
|
for (var i = 0; i < ca.length; i++) {
|
|
3121
3101
|
var c = ca[i];
|
|
3122
|
-
|
|
3123
3102
|
while (c.charAt(0) === ' ') {
|
|
3124
3103
|
c = c.substring(1, c.length);
|
|
3125
3104
|
}
|
|
3126
|
-
|
|
3127
3105
|
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
3128
3106
|
}
|
|
3129
|
-
|
|
3130
3107
|
return null;
|
|
3131
3108
|
},
|
|
3132
3109
|
remove: function remove(name) {
|
|
@@ -3137,12 +3114,10 @@ var cookie$1 = {
|
|
|
3137
3114
|
name: 'cookie',
|
|
3138
3115
|
lookup: function lookup(options) {
|
|
3139
3116
|
var found;
|
|
3140
|
-
|
|
3141
3117
|
if (options.lookupCookie && typeof document !== 'undefined') {
|
|
3142
3118
|
var c = cookie.read(options.lookupCookie);
|
|
3143
3119
|
if (c) found = c;
|
|
3144
3120
|
}
|
|
3145
|
-
|
|
3146
3121
|
return found;
|
|
3147
3122
|
},
|
|
3148
3123
|
cacheUserLanguage: function cacheUserLanguage(lng, options) {
|
|
@@ -3156,39 +3131,30 @@ var querystring = {
|
|
|
3156
3131
|
name: 'querystring',
|
|
3157
3132
|
lookup: function lookup(options) {
|
|
3158
3133
|
var found;
|
|
3159
|
-
|
|
3160
3134
|
if (typeof window !== 'undefined') {
|
|
3161
3135
|
var search = window.location.search;
|
|
3162
|
-
|
|
3163
3136
|
if (!window.location.search && window.location.hash && window.location.hash.indexOf('?') > -1) {
|
|
3164
3137
|
search = window.location.hash.substring(window.location.hash.indexOf('?'));
|
|
3165
3138
|
}
|
|
3166
|
-
|
|
3167
3139
|
var query = search.substring(1);
|
|
3168
3140
|
var params = query.split('&');
|
|
3169
|
-
|
|
3170
3141
|
for (var i = 0; i < params.length; i++) {
|
|
3171
3142
|
var pos = params[i].indexOf('=');
|
|
3172
|
-
|
|
3173
3143
|
if (pos > 0) {
|
|
3174
3144
|
var key = params[i].substring(0, pos);
|
|
3175
|
-
|
|
3176
3145
|
if (key === options.lookupQuerystring) {
|
|
3177
3146
|
found = params[i].substring(pos + 1);
|
|
3178
3147
|
}
|
|
3179
3148
|
}
|
|
3180
3149
|
}
|
|
3181
3150
|
}
|
|
3182
|
-
|
|
3183
3151
|
return found;
|
|
3184
3152
|
}
|
|
3185
3153
|
};
|
|
3186
3154
|
|
|
3187
3155
|
var hasLocalStorageSupport = null;
|
|
3188
|
-
|
|
3189
3156
|
var localStorageAvailable = function localStorageAvailable() {
|
|
3190
3157
|
if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;
|
|
3191
|
-
|
|
3192
3158
|
try {
|
|
3193
3159
|
hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;
|
|
3194
3160
|
var testKey = 'i18next.translate.boo';
|
|
@@ -3197,20 +3163,16 @@ var localStorageAvailable = function localStorageAvailable() {
|
|
|
3197
3163
|
} catch (e) {
|
|
3198
3164
|
hasLocalStorageSupport = false;
|
|
3199
3165
|
}
|
|
3200
|
-
|
|
3201
3166
|
return hasLocalStorageSupport;
|
|
3202
3167
|
};
|
|
3203
|
-
|
|
3204
3168
|
var localStorage$1 = {
|
|
3205
3169
|
name: 'localStorage',
|
|
3206
3170
|
lookup: function lookup(options) {
|
|
3207
3171
|
var found;
|
|
3208
|
-
|
|
3209
3172
|
if (options.lookupLocalStorage && localStorageAvailable()) {
|
|
3210
3173
|
var lng = window.localStorage.getItem(options.lookupLocalStorage);
|
|
3211
3174
|
if (lng) found = lng;
|
|
3212
3175
|
}
|
|
3213
|
-
|
|
3214
3176
|
return found;
|
|
3215
3177
|
},
|
|
3216
3178
|
cacheUserLanguage: function cacheUserLanguage(lng, options) {
|
|
@@ -3221,10 +3183,8 @@ var localStorage$1 = {
|
|
|
3221
3183
|
};
|
|
3222
3184
|
|
|
3223
3185
|
var hasSessionStorageSupport = null;
|
|
3224
|
-
|
|
3225
3186
|
var sessionStorageAvailable = function sessionStorageAvailable() {
|
|
3226
3187
|
if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;
|
|
3227
|
-
|
|
3228
3188
|
try {
|
|
3229
3189
|
hasSessionStorageSupport = window !== 'undefined' && window.sessionStorage !== null;
|
|
3230
3190
|
var testKey = 'i18next.translate.boo';
|
|
@@ -3233,20 +3193,16 @@ var sessionStorageAvailable = function sessionStorageAvailable() {
|
|
|
3233
3193
|
} catch (e) {
|
|
3234
3194
|
hasSessionStorageSupport = false;
|
|
3235
3195
|
}
|
|
3236
|
-
|
|
3237
3196
|
return hasSessionStorageSupport;
|
|
3238
3197
|
};
|
|
3239
|
-
|
|
3240
3198
|
var sessionStorage = {
|
|
3241
3199
|
name: 'sessionStorage',
|
|
3242
3200
|
lookup: function lookup(options) {
|
|
3243
3201
|
var found;
|
|
3244
|
-
|
|
3245
3202
|
if (options.lookupSessionStorage && sessionStorageAvailable()) {
|
|
3246
3203
|
var lng = window.sessionStorage.getItem(options.lookupSessionStorage);
|
|
3247
3204
|
if (lng) found = lng;
|
|
3248
3205
|
}
|
|
3249
|
-
|
|
3250
3206
|
return found;
|
|
3251
3207
|
},
|
|
3252
3208
|
cacheUserLanguage: function cacheUserLanguage(lng, options) {
|
|
@@ -3260,7 +3216,6 @@ var navigator$1 = {
|
|
|
3260
3216
|
name: 'navigator',
|
|
3261
3217
|
lookup: function lookup(options) {
|
|
3262
3218
|
var found = [];
|
|
3263
|
-
|
|
3264
3219
|
if (typeof navigator !== 'undefined') {
|
|
3265
3220
|
if (navigator.languages) {
|
|
3266
3221
|
// chrome only; not an array, so can't use .push.apply instead of iterating
|
|
@@ -3268,16 +3223,13 @@ var navigator$1 = {
|
|
|
3268
3223
|
found.push(navigator.languages[i]);
|
|
3269
3224
|
}
|
|
3270
3225
|
}
|
|
3271
|
-
|
|
3272
3226
|
if (navigator.userLanguage) {
|
|
3273
3227
|
found.push(navigator.userLanguage);
|
|
3274
3228
|
}
|
|
3275
|
-
|
|
3276
3229
|
if (navigator.language) {
|
|
3277
3230
|
found.push(navigator.language);
|
|
3278
3231
|
}
|
|
3279
3232
|
}
|
|
3280
|
-
|
|
3281
3233
|
return found.length > 0 ? found : undefined;
|
|
3282
3234
|
}
|
|
3283
3235
|
};
|
|
@@ -3287,11 +3239,9 @@ var htmlTag = {
|
|
|
3287
3239
|
lookup: function lookup(options) {
|
|
3288
3240
|
var found;
|
|
3289
3241
|
var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);
|
|
3290
|
-
|
|
3291
3242
|
if (htmlTag && typeof htmlTag.getAttribute === 'function') {
|
|
3292
3243
|
found = htmlTag.getAttribute('lang');
|
|
3293
3244
|
}
|
|
3294
|
-
|
|
3295
3245
|
return found;
|
|
3296
3246
|
}
|
|
3297
3247
|
};
|
|
@@ -3300,23 +3250,19 @@ var path = {
|
|
|
3300
3250
|
name: 'path',
|
|
3301
3251
|
lookup: function lookup(options) {
|
|
3302
3252
|
var found;
|
|
3303
|
-
|
|
3304
3253
|
if (typeof window !== 'undefined') {
|
|
3305
3254
|
var language = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
|
|
3306
|
-
|
|
3307
3255
|
if (language instanceof Array) {
|
|
3308
3256
|
if (typeof options.lookupFromPathIndex === 'number') {
|
|
3309
3257
|
if (typeof language[options.lookupFromPathIndex] !== 'string') {
|
|
3310
3258
|
return undefined;
|
|
3311
3259
|
}
|
|
3312
|
-
|
|
3313
3260
|
found = language[options.lookupFromPathIndex].replace('/', '');
|
|
3314
3261
|
} else {
|
|
3315
3262
|
found = language[0].replace('/', '');
|
|
3316
3263
|
}
|
|
3317
3264
|
}
|
|
3318
3265
|
}
|
|
3319
|
-
|
|
3320
3266
|
return found;
|
|
3321
3267
|
}
|
|
3322
3268
|
};
|
|
@@ -3325,14 +3271,15 @@ var subdomain = {
|
|
|
3325
3271
|
name: 'subdomain',
|
|
3326
3272
|
lookup: function lookup(options) {
|
|
3327
3273
|
// If given get the subdomain index else 1
|
|
3328
|
-
var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1;
|
|
3274
|
+
var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1;
|
|
3275
|
+
// get all matches if window.location. is existing
|
|
3329
3276
|
// first item of match is the match itself and the second is the first group macht which sould be the first subdomain match
|
|
3330
3277
|
// is the hostname no public domain get the or option of localhost
|
|
3278
|
+
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);
|
|
3331
3279
|
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3280
|
+
// if there is no match (null) return undefined
|
|
3281
|
+
if (!language) return undefined;
|
|
3282
|
+
// return the given group match
|
|
3336
3283
|
return language[lookupFromSubdomainIndex];
|
|
3337
3284
|
}
|
|
3338
3285
|
};
|
|
@@ -3346,31 +3293,28 @@ function getDefaults$1() {
|
|
|
3346
3293
|
lookupSessionStorage: 'i18nextLng',
|
|
3347
3294
|
// cache user language
|
|
3348
3295
|
caches: ['localStorage'],
|
|
3349
|
-
excludeCacheFor: ['cimode']
|
|
3296
|
+
excludeCacheFor: ['cimode']
|
|
3297
|
+
// cookieMinutes: 10,
|
|
3350
3298
|
// cookieDomain: 'myDomain'
|
|
3351
|
-
|
|
3352
3299
|
};
|
|
3353
3300
|
}
|
|
3354
|
-
|
|
3355
3301
|
var Browser = /*#__PURE__*/function () {
|
|
3356
3302
|
function Browser(services) {
|
|
3357
3303
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3358
|
-
|
|
3359
3304
|
_classCallCheck(this, Browser);
|
|
3360
|
-
|
|
3361
3305
|
this.type = 'languageDetector';
|
|
3362
3306
|
this.detectors = {};
|
|
3363
3307
|
this.init(services, options);
|
|
3364
3308
|
}
|
|
3365
|
-
|
|
3366
3309
|
_createClass(Browser, [{
|
|
3367
3310
|
key: "init",
|
|
3368
3311
|
value: function init(services) {
|
|
3369
3312
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3370
3313
|
var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
3371
3314
|
this.services = services;
|
|
3372
|
-
this.options = defaults(options, this.options || {}, getDefaults$1());
|
|
3315
|
+
this.options = defaults(options, this.options || {}, getDefaults$1());
|
|
3373
3316
|
|
|
3317
|
+
// backwards compatibility
|
|
3374
3318
|
if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;
|
|
3375
3319
|
this.i18nOptions = i18nOptions;
|
|
3376
3320
|
this.addDetector(cookie$1);
|
|
@@ -3391,26 +3335,22 @@ var Browser = /*#__PURE__*/function () {
|
|
|
3391
3335
|
key: "detect",
|
|
3392
3336
|
value: function detect(detectionOrder) {
|
|
3393
3337
|
var _this = this;
|
|
3394
|
-
|
|
3395
3338
|
if (!detectionOrder) detectionOrder = this.options.order;
|
|
3396
3339
|
var detected = [];
|
|
3397
3340
|
detectionOrder.forEach(function (detectorName) {
|
|
3398
3341
|
if (_this.detectors[detectorName]) {
|
|
3399
3342
|
var lookup = _this.detectors[detectorName].lookup(_this.options);
|
|
3400
|
-
|
|
3401
3343
|
if (lookup && typeof lookup === 'string') lookup = [lookup];
|
|
3402
3344
|
if (lookup) detected = detected.concat(lookup);
|
|
3403
3345
|
}
|
|
3404
3346
|
});
|
|
3405
3347
|
if (this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0
|
|
3406
|
-
|
|
3407
3348
|
return detected.length > 0 ? detected[0] : null; // a little backward compatibility
|
|
3408
3349
|
}
|
|
3409
3350
|
}, {
|
|
3410
3351
|
key: "cacheUserLanguage",
|
|
3411
3352
|
value: function cacheUserLanguage(lng, caches) {
|
|
3412
3353
|
var _this2 = this;
|
|
3413
|
-
|
|
3414
3354
|
if (!caches) caches = this.options.caches;
|
|
3415
3355
|
if (!caches) return;
|
|
3416
3356
|
if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;
|
|
@@ -3419,10 +3359,8 @@ var Browser = /*#__PURE__*/function () {
|
|
|
3419
3359
|
});
|
|
3420
3360
|
}
|
|
3421
3361
|
}]);
|
|
3422
|
-
|
|
3423
3362
|
return Browser;
|
|
3424
3363
|
}();
|
|
3425
|
-
|
|
3426
3364
|
Browser.type = 'languageDetector';
|
|
3427
3365
|
|
|
3428
3366
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -3456,6 +3394,30 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
3456
3394
|
|
|
3457
3395
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
3458
3396
|
|
|
3397
|
+
/**
|
|
3398
|
+
* This file automatically generated from `pre-publish.js`.
|
|
3399
|
+
* Do not manually edit.
|
|
3400
|
+
*/
|
|
3401
|
+
|
|
3402
|
+
var voidElements = {
|
|
3403
|
+
"area": true,
|
|
3404
|
+
"base": true,
|
|
3405
|
+
"br": true,
|
|
3406
|
+
"col": true,
|
|
3407
|
+
"embed": true,
|
|
3408
|
+
"hr": true,
|
|
3409
|
+
"img": true,
|
|
3410
|
+
"input": true,
|
|
3411
|
+
"link": true,
|
|
3412
|
+
"meta": true,
|
|
3413
|
+
"param": true,
|
|
3414
|
+
"source": true,
|
|
3415
|
+
"track": true,
|
|
3416
|
+
"wbr": true
|
|
3417
|
+
};
|
|
3418
|
+
|
|
3419
|
+
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)},"")}};
|
|
3420
|
+
|
|
3459
3421
|
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
3460
3422
|
var htmlEntities = {
|
|
3461
3423
|
'&': '&',
|
|
@@ -3488,9 +3450,9 @@ var unescape = function unescape(text) {
|
|
|
3488
3450
|
return text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
3489
3451
|
};
|
|
3490
3452
|
|
|
3491
|
-
function ownKeys$
|
|
3453
|
+
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; }
|
|
3492
3454
|
|
|
3493
|
-
function _objectSpread$
|
|
3455
|
+
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; }
|
|
3494
3456
|
var defaultOptions = {
|
|
3495
3457
|
bindI18n: 'languageChanged',
|
|
3496
3458
|
bindI18nStore: '',
|
|
@@ -3505,7 +3467,7 @@ var i18nInstance;
|
|
|
3505
3467
|
var I18nContext = React.createContext();
|
|
3506
3468
|
function setDefaults() {
|
|
3507
3469
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3508
|
-
defaultOptions = _objectSpread$
|
|
3470
|
+
defaultOptions = _objectSpread$a(_objectSpread$a({}, defaultOptions), options);
|
|
3509
3471
|
}
|
|
3510
3472
|
function getDefaults() {
|
|
3511
3473
|
return defaultOptions;
|
|
@@ -3629,6 +3591,274 @@ function hasLoadedNamespace(ns, i18n) {
|
|
|
3629
3591
|
});
|
|
3630
3592
|
}
|
|
3631
3593
|
|
|
3594
|
+
var _excluded$2 = ["format"],
|
|
3595
|
+
_excluded2$2 = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
|
|
3596
|
+
|
|
3597
|
+
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; }
|
|
3598
|
+
|
|
3599
|
+
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; }
|
|
3600
|
+
|
|
3601
|
+
function hasChildren(node, checkLength) {
|
|
3602
|
+
if (!node) return false;
|
|
3603
|
+
var base = node.props ? node.props.children : node.children;
|
|
3604
|
+
if (checkLength) return base.length > 0;
|
|
3605
|
+
return !!base;
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3608
|
+
function getChildren(node) {
|
|
3609
|
+
if (!node) return [];
|
|
3610
|
+
return node.props ? node.props.children : node.children;
|
|
3611
|
+
}
|
|
3612
|
+
|
|
3613
|
+
function hasValidReactChildren(children) {
|
|
3614
|
+
if (Object.prototype.toString.call(children) !== '[object Array]') return false;
|
|
3615
|
+
return children.every(function (child) {
|
|
3616
|
+
return React.isValidElement(child);
|
|
3617
|
+
});
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
function getAsArray(data) {
|
|
3621
|
+
return Array.isArray(data) ? data : [data];
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3624
|
+
function mergeProps(source, target) {
|
|
3625
|
+
var newTarget = _objectSpread$9({}, target);
|
|
3626
|
+
|
|
3627
|
+
newTarget.props = Object.assign(source.props, target.props);
|
|
3628
|
+
return newTarget;
|
|
3629
|
+
}
|
|
3630
|
+
|
|
3631
|
+
function nodesToString(children, i18nOptions) {
|
|
3632
|
+
if (!children) return '';
|
|
3633
|
+
var stringNode = '';
|
|
3634
|
+
var childrenArray = getAsArray(children);
|
|
3635
|
+
var keepArray = i18nOptions.transSupportBasicHtmlNodes && i18nOptions.transKeepBasicHtmlNodesFor ? i18nOptions.transKeepBasicHtmlNodesFor : [];
|
|
3636
|
+
childrenArray.forEach(function (child, childIndex) {
|
|
3637
|
+
if (typeof child === 'string') {
|
|
3638
|
+
stringNode += "".concat(child);
|
|
3639
|
+
} else if (React.isValidElement(child)) {
|
|
3640
|
+
var childPropsCount = Object.keys(child.props).length;
|
|
3641
|
+
var shouldKeepChild = keepArray.indexOf(child.type) > -1;
|
|
3642
|
+
var childChildren = child.props.children;
|
|
3643
|
+
|
|
3644
|
+
if (!childChildren && shouldKeepChild && childPropsCount === 0) {
|
|
3645
|
+
stringNode += "<".concat(child.type, "/>");
|
|
3646
|
+
} else if (!childChildren && (!shouldKeepChild || childPropsCount !== 0)) {
|
|
3647
|
+
stringNode += "<".concat(childIndex, "></").concat(childIndex, ">");
|
|
3648
|
+
} else if (child.props.i18nIsDynamicList) {
|
|
3649
|
+
stringNode += "<".concat(childIndex, "></").concat(childIndex, ">");
|
|
3650
|
+
} else if (shouldKeepChild && childPropsCount === 1 && typeof childChildren === 'string') {
|
|
3651
|
+
stringNode += "<".concat(child.type, ">").concat(childChildren, "</").concat(child.type, ">");
|
|
3652
|
+
} else {
|
|
3653
|
+
var content = nodesToString(childChildren, i18nOptions);
|
|
3654
|
+
stringNode += "<".concat(childIndex, ">").concat(content, "</").concat(childIndex, ">");
|
|
3655
|
+
}
|
|
3656
|
+
} else if (child === null) {
|
|
3657
|
+
warn("Trans: the passed in value is invalid - seems you passed in a null child.");
|
|
3658
|
+
} else if (_typeof(child) === 'object') {
|
|
3659
|
+
var format = child.format,
|
|
3660
|
+
clone = _objectWithoutProperties(child, _excluded$2);
|
|
3661
|
+
|
|
3662
|
+
var keys = Object.keys(clone);
|
|
3663
|
+
|
|
3664
|
+
if (keys.length === 1) {
|
|
3665
|
+
var value = format ? "".concat(keys[0], ", ").concat(format) : keys[0];
|
|
3666
|
+
stringNode += "{{".concat(value, "}}");
|
|
3667
|
+
} else {
|
|
3668
|
+
warn("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.", child);
|
|
3669
|
+
}
|
|
3670
|
+
} else {
|
|
3671
|
+
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);
|
|
3672
|
+
}
|
|
3673
|
+
});
|
|
3674
|
+
return stringNode;
|
|
3675
|
+
}
|
|
3676
|
+
|
|
3677
|
+
function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) {
|
|
3678
|
+
if (targetString === '') return [];
|
|
3679
|
+
var keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];
|
|
3680
|
+
var emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.join('|')).test(targetString);
|
|
3681
|
+
if (!children && !emptyChildrenButNeedsHandling) return [targetString];
|
|
3682
|
+
var data = {};
|
|
3683
|
+
|
|
3684
|
+
function getData(childs) {
|
|
3685
|
+
var childrenArray = getAsArray(childs);
|
|
3686
|
+
childrenArray.forEach(function (child) {
|
|
3687
|
+
if (typeof child === 'string') return;
|
|
3688
|
+
if (hasChildren(child)) getData(getChildren(child));else if (_typeof(child) === 'object' && !React.isValidElement(child)) Object.assign(data, child);
|
|
3689
|
+
});
|
|
3690
|
+
}
|
|
3691
|
+
|
|
3692
|
+
getData(children);
|
|
3693
|
+
var ast = c.parse("<0>".concat(targetString, "</0>"));
|
|
3694
|
+
|
|
3695
|
+
var opts = _objectSpread$9(_objectSpread$9({}, data), combinedTOpts);
|
|
3696
|
+
|
|
3697
|
+
function renderInner(child, node, rootReactNode) {
|
|
3698
|
+
var childs = getChildren(child);
|
|
3699
|
+
var mappedChildren = mapAST(childs, node.children, rootReactNode);
|
|
3700
|
+
return hasValidReactChildren(childs) && mappedChildren.length === 0 ? childs : mappedChildren;
|
|
3701
|
+
}
|
|
3702
|
+
|
|
3703
|
+
function pushTranslatedJSX(child, inner, mem, i, isVoid) {
|
|
3704
|
+
if (child.dummy) child.children = inner;
|
|
3705
|
+
mem.push(React.cloneElement(child, _objectSpread$9(_objectSpread$9({}, child.props), {}, {
|
|
3706
|
+
key: i
|
|
3707
|
+
}), isVoid ? undefined : inner));
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3710
|
+
function mapAST(reactNode, astNode, rootReactNode) {
|
|
3711
|
+
var reactNodes = getAsArray(reactNode);
|
|
3712
|
+
var astNodes = getAsArray(astNode);
|
|
3713
|
+
return astNodes.reduce(function (mem, node, i) {
|
|
3714
|
+
var translationContent = node.children && node.children[0] && node.children[0].content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
|
|
3715
|
+
|
|
3716
|
+
if (node.type === 'tag') {
|
|
3717
|
+
var tmp = reactNodes[parseInt(node.name, 10)];
|
|
3718
|
+
if (!tmp && rootReactNode.length === 1 && rootReactNode[0][node.name]) tmp = rootReactNode[0][node.name];
|
|
3719
|
+
if (!tmp) tmp = {};
|
|
3720
|
+
var child = Object.keys(node.attrs).length !== 0 ? mergeProps({
|
|
3721
|
+
props: node.attrs
|
|
3722
|
+
}, tmp) : tmp;
|
|
3723
|
+
var isElement = React.isValidElement(child);
|
|
3724
|
+
var isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
|
|
3725
|
+
var isEmptyTransWithHTML = emptyChildrenButNeedsHandling && _typeof(child) === 'object' && child.dummy && !isElement;
|
|
3726
|
+
var isKnownComponent = _typeof(children) === 'object' && children !== null && Object.hasOwnProperty.call(children, node.name);
|
|
3727
|
+
|
|
3728
|
+
if (typeof child === 'string') {
|
|
3729
|
+
var value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
|
|
3730
|
+
mem.push(value);
|
|
3731
|
+
} else if (hasChildren(child) || isValidTranslationWithChildren) {
|
|
3732
|
+
var inner = renderInner(child, node, rootReactNode);
|
|
3733
|
+
pushTranslatedJSX(child, inner, mem, i);
|
|
3734
|
+
} else if (isEmptyTransWithHTML) {
|
|
3735
|
+
var _inner = mapAST(reactNodes, node.children, rootReactNode);
|
|
3736
|
+
|
|
3737
|
+
mem.push(React.cloneElement(child, _objectSpread$9(_objectSpread$9({}, child.props), {}, {
|
|
3738
|
+
key: i
|
|
3739
|
+
}), _inner));
|
|
3740
|
+
} else if (Number.isNaN(parseFloat(node.name))) {
|
|
3741
|
+
if (isKnownComponent) {
|
|
3742
|
+
var _inner2 = renderInner(child, node, rootReactNode);
|
|
3743
|
+
|
|
3744
|
+
pushTranslatedJSX(child, _inner2, mem, i, node.voidElement);
|
|
3745
|
+
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
|
|
3746
|
+
if (node.voidElement) {
|
|
3747
|
+
mem.push(React.createElement(node.name, {
|
|
3748
|
+
key: "".concat(node.name, "-").concat(i)
|
|
3749
|
+
}));
|
|
3750
|
+
} else {
|
|
3751
|
+
var _inner3 = mapAST(reactNodes, node.children, rootReactNode);
|
|
3752
|
+
|
|
3753
|
+
mem.push(React.createElement(node.name, {
|
|
3754
|
+
key: "".concat(node.name, "-").concat(i)
|
|
3755
|
+
}, _inner3));
|
|
3756
|
+
}
|
|
3757
|
+
} else if (node.voidElement) {
|
|
3758
|
+
mem.push("<".concat(node.name, " />"));
|
|
3759
|
+
} else {
|
|
3760
|
+
var _inner4 = mapAST(reactNodes, node.children, rootReactNode);
|
|
3761
|
+
|
|
3762
|
+
mem.push("<".concat(node.name, ">").concat(_inner4, "</").concat(node.name, ">"));
|
|
3763
|
+
}
|
|
3764
|
+
} else if (_typeof(child) === 'object' && !isElement) {
|
|
3765
|
+
var content = node.children[0] ? translationContent : null;
|
|
3766
|
+
if (content) mem.push(content);
|
|
3767
|
+
} else if (node.children.length === 1 && translationContent) {
|
|
3768
|
+
mem.push(React.cloneElement(child, _objectSpread$9(_objectSpread$9({}, child.props), {}, {
|
|
3769
|
+
key: i
|
|
3770
|
+
}), translationContent));
|
|
3771
|
+
} else {
|
|
3772
|
+
mem.push(React.cloneElement(child, _objectSpread$9(_objectSpread$9({}, child.props), {}, {
|
|
3773
|
+
key: i
|
|
3774
|
+
})));
|
|
3775
|
+
}
|
|
3776
|
+
} else if (node.type === 'text') {
|
|
3777
|
+
var wrapTextNodes = i18nOptions.transWrapTextNodes;
|
|
3778
|
+
|
|
3779
|
+
var _content = shouldUnescape ? i18nOptions.unescape(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);
|
|
3780
|
+
|
|
3781
|
+
if (wrapTextNodes) {
|
|
3782
|
+
mem.push(React.createElement(wrapTextNodes, {
|
|
3783
|
+
key: "".concat(node.name, "-").concat(i)
|
|
3784
|
+
}, _content));
|
|
3785
|
+
} else {
|
|
3786
|
+
mem.push(_content);
|
|
3787
|
+
}
|
|
3788
|
+
}
|
|
3789
|
+
|
|
3790
|
+
return mem;
|
|
3791
|
+
}, []);
|
|
3792
|
+
}
|
|
3793
|
+
|
|
3794
|
+
var result = mapAST([{
|
|
3795
|
+
dummy: true,
|
|
3796
|
+
children: children || []
|
|
3797
|
+
}], ast, getAsArray(children || []));
|
|
3798
|
+
return getChildren(result[0]);
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
function Trans(_ref) {
|
|
3802
|
+
var children = _ref.children,
|
|
3803
|
+
count = _ref.count,
|
|
3804
|
+
parent = _ref.parent,
|
|
3805
|
+
i18nKey = _ref.i18nKey,
|
|
3806
|
+
context = _ref.context,
|
|
3807
|
+
_ref$tOptions = _ref.tOptions,
|
|
3808
|
+
tOptions = _ref$tOptions === void 0 ? {} : _ref$tOptions,
|
|
3809
|
+
values = _ref.values,
|
|
3810
|
+
defaults = _ref.defaults,
|
|
3811
|
+
components = _ref.components,
|
|
3812
|
+
ns = _ref.ns,
|
|
3813
|
+
i18nFromProps = _ref.i18n,
|
|
3814
|
+
tFromProps = _ref.t,
|
|
3815
|
+
shouldUnescape = _ref.shouldUnescape,
|
|
3816
|
+
additionalProps = _objectWithoutProperties(_ref, _excluded2$2);
|
|
3817
|
+
|
|
3818
|
+
var _ref2 = React.useContext(I18nContext) || {},
|
|
3819
|
+
i18nFromContext = _ref2.i18n,
|
|
3820
|
+
defaultNSFromContext = _ref2.defaultNS;
|
|
3821
|
+
|
|
3822
|
+
var i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
3823
|
+
|
|
3824
|
+
if (!i18n) {
|
|
3825
|
+
warnOnce('You will need to pass in an i18next instance by using i18nextReactModule');
|
|
3826
|
+
return children;
|
|
3827
|
+
}
|
|
3828
|
+
|
|
3829
|
+
var t = tFromProps || i18n.t.bind(i18n) || function (k) {
|
|
3830
|
+
return k;
|
|
3831
|
+
};
|
|
3832
|
+
|
|
3833
|
+
if (context) tOptions.context = context;
|
|
3834
|
+
|
|
3835
|
+
var reactI18nextOptions = _objectSpread$9(_objectSpread$9({}, getDefaults()), i18n.options && i18n.options.react);
|
|
3836
|
+
|
|
3837
|
+
var namespaces = ns || t.ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
|
|
3838
|
+
namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
|
|
3839
|
+
var defaultValue = defaults || nodesToString(children, reactI18nextOptions) || reactI18nextOptions.transEmptyNodeValue || i18nKey;
|
|
3840
|
+
var hashTransKey = reactI18nextOptions.hashTransKey;
|
|
3841
|
+
var key = i18nKey || (hashTransKey ? hashTransKey(defaultValue) : defaultValue);
|
|
3842
|
+
var interpolationOverride = values ? tOptions.interpolation : {
|
|
3843
|
+
interpolation: _objectSpread$9(_objectSpread$9({}, tOptions.interpolation), {}, {
|
|
3844
|
+
prefix: '#$?',
|
|
3845
|
+
suffix: '?$#'
|
|
3846
|
+
})
|
|
3847
|
+
};
|
|
3848
|
+
|
|
3849
|
+
var combinedTOpts = _objectSpread$9(_objectSpread$9(_objectSpread$9(_objectSpread$9({}, tOptions), {}, {
|
|
3850
|
+
count: count
|
|
3851
|
+
}, values), interpolationOverride), {}, {
|
|
3852
|
+
defaultValue: defaultValue,
|
|
3853
|
+
ns: namespaces
|
|
3854
|
+
});
|
|
3855
|
+
|
|
3856
|
+
var translation = key ? t(key, combinedTOpts) : defaultValue;
|
|
3857
|
+
var content = renderNodes(components || children, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
|
|
3858
|
+
var useAsParent = parent !== undefined ? parent : reactI18nextOptions.defaultTransParent;
|
|
3859
|
+
return useAsParent ? React.createElement(useAsParent, additionalProps, content) : content;
|
|
3860
|
+
}
|
|
3861
|
+
|
|
3632
3862
|
function _iterableToArrayLimit(arr, i) {
|
|
3633
3863
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3634
3864
|
if (_i == null) return;
|
|
@@ -3779,6 +4009,7 @@ var alerts$1 = {
|
|
|
3779
4009
|
};
|
|
3780
4010
|
var buttons$1 = {
|
|
3781
4011
|
cancel: "Cancel",
|
|
4012
|
+
changeRole: "Change role",
|
|
3782
4013
|
proceed: "Proceed",
|
|
3783
4014
|
saveChanges: "Save changes"
|
|
3784
4015
|
};
|
|
@@ -3819,7 +4050,10 @@ var common$1 = {
|
|
|
3819
4050
|
};
|
|
3820
4051
|
var helpers$1 = {
|
|
3821
4052
|
configPermissions: "Configure permissions for the modules.",
|
|
3822
|
-
enterMultipleEmails: "Please press space, tab or enter key after entering an email address."
|
|
4053
|
+
enterMultipleEmails: "Please press space, tab or enter key after entering an email address.",
|
|
4054
|
+
noRolesFound: "No roles found.",
|
|
4055
|
+
searchRoles: "Search roles",
|
|
4056
|
+
selectedMembersCount: "{{count}} {{metaName}} selected from {{totalCount}}"
|
|
3823
4057
|
};
|
|
3824
4058
|
var metaNames$1 = {
|
|
3825
4059
|
agent_one: "Agent",
|
|
@@ -3870,6 +4104,7 @@ var alerts = {
|
|
|
3870
4104
|
};
|
|
3871
4105
|
var buttons = {
|
|
3872
4106
|
cancel: "Annuler",
|
|
4107
|
+
changeRole: "Changer de rôle",
|
|
3873
4108
|
proceed: "Procéder",
|
|
3874
4109
|
saveChanges: "Sauvegarder les modifications"
|
|
3875
4110
|
};
|
|
@@ -3910,7 +4145,11 @@ var common = {
|
|
|
3910
4145
|
};
|
|
3911
4146
|
var helpers = {
|
|
3912
4147
|
configPermissions: "Configurez les autorisations pour les modules.",
|
|
3913
|
-
enterMultipleEmails: "Veuillez appuyer sur espace, tabulation ou entrée après avoir saisi une adresse e-mail."
|
|
4148
|
+
enterMultipleEmails: "Veuillez appuyer sur espace, tabulation ou entrée après avoir saisi une adresse e-mail.",
|
|
4149
|
+
noRolesFound: "Aucun rôle trouvé.",
|
|
4150
|
+
searchRoles: "Rechercher des rôles",
|
|
4151
|
+
selectedMembersCount_one: "{{count}} {{metaName}} sélectionné parmi {{totalCount}}",
|
|
4152
|
+
selectedMembersCount_other: "{{count}} {{metaName}} sélectionnés parmi {{totalCount}}"
|
|
3914
4153
|
};
|
|
3915
4154
|
var metaNames = {
|
|
3916
4155
|
member_one: "Membre",
|
|
@@ -4009,6 +4248,7 @@ const slugify = string => string.toString().toLowerCase().replace(/\s+/g, "-") /
|
|
|
4009
4248
|
.replace(/-+$/, ""); // Trim - from end of text
|
|
4010
4249
|
|
|
4011
4250
|
const capitalize = string => string.charAt(0).toUpperCase() + string.slice(1);
|
|
4251
|
+
const isNotEmpty$1 = ramda.complement(ramda.isEmpty);
|
|
4012
4252
|
|
|
4013
4253
|
const SINGULAR = {
|
|
4014
4254
|
count: 1
|
|
@@ -7262,7 +7502,7 @@ const organizationRolesApi = {
|
|
|
7262
7502
|
|
|
7263
7503
|
const _excluded$1 = ["onSuccess"],
|
|
7264
7504
|
_excluded2$1 = ["onSuccess"],
|
|
7265
|
-
_excluded3 = ["onSuccess"];
|
|
7505
|
+
_excluded3$1 = ["onSuccess"];
|
|
7266
7506
|
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; }
|
|
7267
7507
|
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; }
|
|
7268
7508
|
const useFetchRoles = function () {
|
|
@@ -7312,7 +7552,7 @@ const useUpdateRole = _ref2 => {
|
|
|
7312
7552
|
const useDestroyRole = _ref4 => {
|
|
7313
7553
|
let _ref4$onSuccess = _ref4.onSuccess,
|
|
7314
7554
|
onSuccess = _ref4$onSuccess === void 0 ? noop$1 : _ref4$onSuccess,
|
|
7315
|
-
options = _objectWithoutProperties(_ref4, _excluded3);
|
|
7555
|
+
options = _objectWithoutProperties(_ref4, _excluded3$1);
|
|
7316
7556
|
return useMutation(_ref5 => {
|
|
7317
7557
|
let id = _ref5.id,
|
|
7318
7558
|
payload = _ref5.payload;
|
|
@@ -9609,14 +9849,17 @@ const fetch = params => axios__default["default"].get(`${BASE_URL}/teams`, {
|
|
|
9609
9849
|
});
|
|
9610
9850
|
const create = payload => axios__default["default"].post(`${BASE_URL}/teams`, payload);
|
|
9611
9851
|
const update = (id, payload) => axios__default["default"].put(`${BASE_URL}/teams/${id}`, payload);
|
|
9852
|
+
const bulkUpdate = payload => axios__default["default"].patch(`${BASE_URL}/teams/bulk_update`, payload);
|
|
9612
9853
|
const teamsApi = {
|
|
9613
|
-
|
|
9854
|
+
bulkUpdate,
|
|
9614
9855
|
create,
|
|
9856
|
+
fetch,
|
|
9615
9857
|
update
|
|
9616
9858
|
};
|
|
9617
9859
|
|
|
9618
9860
|
const _excluded = ["onSuccess"],
|
|
9619
|
-
_excluded2 = ["onSuccess"]
|
|
9861
|
+
_excluded2 = ["onSuccess"],
|
|
9862
|
+
_excluded3 = ["onSuccess"];
|
|
9620
9863
|
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; }
|
|
9621
9864
|
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; }
|
|
9622
9865
|
const useFetchMembers = function () {
|
|
@@ -9654,6 +9897,17 @@ const useUpdateMember = _ref2 => {
|
|
|
9654
9897
|
}
|
|
9655
9898
|
}, options));
|
|
9656
9899
|
};
|
|
9900
|
+
const useBulkUpdateMembers = _ref4 => {
|
|
9901
|
+
let onSuccess = _ref4.onSuccess,
|
|
9902
|
+
options = _objectWithoutProperties(_ref4, _excluded3);
|
|
9903
|
+
return useMutation(teamsApi.bulkUpdate, _objectSpread$3({
|
|
9904
|
+
onSuccess: response => {
|
|
9905
|
+
queryClient.invalidateQueries(QUERY_KEYS.TEAMS);
|
|
9906
|
+
neetoui.Toastr.success(response.ntmNotice || response.data.ntmNotice);
|
|
9907
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
9908
|
+
}
|
|
9909
|
+
}, options));
|
|
9910
|
+
};
|
|
9657
9911
|
|
|
9658
9912
|
const useDebounce = function (value) {
|
|
9659
9913
|
let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
@@ -9727,7 +9981,7 @@ const removeBy = ramda.curry((pattern, array) => array.filter(ramda.complement(m
|
|
|
9727
9981
|
const removeFixedColumns = (fixedColumns, columnData) => removeBy({
|
|
9728
9982
|
dataIndex: ramda.includes(ramda.__, fixedColumns)
|
|
9729
9983
|
}, columnData);
|
|
9730
|
-
const filterBySearchTerm = (searchTerm, columns) => ramda.filter(_ref3 => {
|
|
9984
|
+
const filterBySearchTerm$1 = (searchTerm, columns) => ramda.filter(_ref3 => {
|
|
9731
9985
|
let title = _ref3.title;
|
|
9732
9986
|
return ramda.includes(ramda.trim(ramda.toLower(searchTerm)), ramda.trim(ramda.toLower(title)));
|
|
9733
9987
|
}, columns);
|
|
@@ -9765,7 +10019,7 @@ const Columns = _ref => {
|
|
|
9765
10019
|
searchTerm = _useState2[0],
|
|
9766
10020
|
setSearchTerm = _useState2[1];
|
|
9767
10021
|
const columns = removeFixedColumns(fixedColumns, columnData);
|
|
9768
|
-
const filteredColumns = filterBySearchTerm(searchTerm, columns);
|
|
10022
|
+
const filteredColumns = filterBySearchTerm$1(searchTerm, columns);
|
|
9769
10023
|
const handleChange = _ref2 => {
|
|
9770
10024
|
let _ref2$target = _ref2.target,
|
|
9771
10025
|
dataIndex = _ref2$target.name,
|
|
@@ -9833,44 +10087,70 @@ const MANAGE_ROLES_BUTTON_LABEL = instance.t("common.manage_", {
|
|
|
9833
10087
|
what: instance.t("common.role", PLURAL).toLocaleLowerCase()
|
|
9834
10088
|
});
|
|
9835
10089
|
|
|
9836
|
-
const
|
|
9837
|
-
let
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
|
|
9851
|
-
const
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
const
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
|
|
9862
|
-
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
|
|
9866
|
-
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
|
|
10090
|
+
const filterBySearchTerm = (searchTerm, roles) => ramda.filter(_ref => {
|
|
10091
|
+
let name = _ref.name;
|
|
10092
|
+
return ramda.includes(ramda.trim(ramda.toLower(searchTerm)), ramda.trim(ramda.toLower(name)));
|
|
10093
|
+
}, roles);
|
|
10094
|
+
const getActivateButtonVisible = selectedRows => selectedRows.active.some(active => active === false);
|
|
10095
|
+
const getDeactivatedButtonVisible = selectedRows => selectedRows.active.some(active => active === true);
|
|
10096
|
+
|
|
10097
|
+
const Menu$1 = neetoui.Dropdown.Menu,
|
|
10098
|
+
MenuItem = neetoui.Dropdown.MenuItem;
|
|
10099
|
+
const RolesDropdown = _ref => {
|
|
10100
|
+
let handleRoleChange = _ref.handleRoleChange,
|
|
10101
|
+
_ref$isSearchable = _ref.isSearchable,
|
|
10102
|
+
isSearchable = _ref$isSearchable === void 0 ? false : _ref$isSearchable,
|
|
10103
|
+
_ref$roles = _ref.roles,
|
|
10104
|
+
roles = _ref$roles === void 0 ? [] : _ref$roles;
|
|
10105
|
+
const _useState = React.useState(false),
|
|
10106
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
10107
|
+
isDropdownOpen = _useState2[0],
|
|
10108
|
+
setIsDropdownOpen = _useState2[1];
|
|
10109
|
+
const _useState3 = React.useState(""),
|
|
10110
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
10111
|
+
searchTerm = _useState4[0],
|
|
10112
|
+
setSearchTerm = _useState4[1];
|
|
10113
|
+
const filteredRoles = filterBySearchTerm(searchTerm, roles);
|
|
10114
|
+
const handleSearch = _ref2 => {
|
|
10115
|
+
let value = _ref2.target.value;
|
|
10116
|
+
return setSearchTerm(value);
|
|
10117
|
+
};
|
|
10118
|
+
const handleSelectRole = role => {
|
|
10119
|
+
handleRoleChange(role);
|
|
10120
|
+
setIsDropdownOpen(false);
|
|
10121
|
+
};
|
|
10122
|
+
const handleOnClose = () => {
|
|
10123
|
+
setSearchTerm("");
|
|
10124
|
+
setIsDropdownOpen(false);
|
|
10125
|
+
};
|
|
10126
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
|
|
10127
|
+
buttonSize: "small",
|
|
10128
|
+
buttonStyle: "secondary",
|
|
10129
|
+
closeOnSelect: false,
|
|
10130
|
+
"data-cy": "ntm-members-roles-update-dropdown",
|
|
10131
|
+
label: instance.t("buttons.changeRole"),
|
|
10132
|
+
isOpen: isDropdownOpen,
|
|
10133
|
+
onClick: () => setIsDropdownOpen(true),
|
|
10134
|
+
onClose: () => handleOnClose(),
|
|
10135
|
+
position: "bottom-end"
|
|
10136
|
+
}, /*#__PURE__*/React__default["default"].createElement(Menu$1, null, /*#__PURE__*/React__default["default"].createElement("div", null, isSearchable && /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
|
|
10137
|
+
className: "neeto-ui-px-3 neeto-ui-py-2",
|
|
10138
|
+
"data-cy": "ntm-members-roles-search-input",
|
|
10139
|
+
onChange: handleSearch,
|
|
10140
|
+
placeholder: instance.t("helpers.searchRoles"),
|
|
10141
|
+
prefix: /*#__PURE__*/React__default["default"].createElement(neetoIcons.Search, null),
|
|
10142
|
+
type: "search",
|
|
10143
|
+
value: searchTerm
|
|
10144
|
+
}), isNotEmpty$1(filteredRoles) ? filteredRoles.map(_ref3 => {
|
|
10145
|
+
let id = _ref3.id,
|
|
10146
|
+
name = _ref3.name;
|
|
10147
|
+
return /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, {
|
|
10148
|
+
key: id,
|
|
10149
|
+
onClick: () => handleSelectRole(name)
|
|
10150
|
+
}, name);
|
|
10151
|
+
}) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
10152
|
+
className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2"
|
|
10153
|
+
}, instance.t("helpers.noRolesFound")))));
|
|
9874
10154
|
};
|
|
9875
10155
|
|
|
9876
10156
|
var _URLSearchParams$get;
|
|
@@ -9913,6 +10193,105 @@ const DEFAULT_FILTER_VALUES = {
|
|
|
9913
10193
|
sort_by: "",
|
|
9914
10194
|
sort_direction: ""
|
|
9915
10195
|
};
|
|
10196
|
+
const DEFAULT_SELECTED_ROWS = {
|
|
10197
|
+
active: [],
|
|
10198
|
+
emails: [],
|
|
10199
|
+
keys: []
|
|
10200
|
+
};
|
|
10201
|
+
|
|
10202
|
+
const Left = _ref => {
|
|
10203
|
+
var _selectedRows$keys, _selectedRows$keys2;
|
|
10204
|
+
let filteredCount = _ref.filteredCount,
|
|
10205
|
+
metaName = _ref.metaName,
|
|
10206
|
+
selectedRows = _ref.selectedRows,
|
|
10207
|
+
totalCount = _ref.totalCount;
|
|
10208
|
+
const hasSelectedRows = isNotEmpty$1(selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.keys);
|
|
10209
|
+
const pluralizedByFilterCount = metaName({
|
|
10210
|
+
count: filteredCount
|
|
10211
|
+
}).toLocaleLowerCase();
|
|
10212
|
+
const selectedMembersCountValues = {
|
|
10213
|
+
count: selectedRows === null || selectedRows === void 0 ? void 0 : (_selectedRows$keys = selectedRows.keys) === null || _selectedRows$keys === void 0 ? void 0 : _selectedRows$keys.length,
|
|
10214
|
+
metaName: metaName({
|
|
10215
|
+
count: selectedRows === null || selectedRows === void 0 ? void 0 : (_selectedRows$keys2 = selectedRows.keys) === null || _selectedRows$keys2 === void 0 ? void 0 : _selectedRows$keys2.length
|
|
10216
|
+
}).toLocaleLowerCase(),
|
|
10217
|
+
totalCount
|
|
10218
|
+
};
|
|
10219
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
10220
|
+
"data-cy": "ntm-filtered-members-count",
|
|
10221
|
+
component: "h4",
|
|
10222
|
+
style: "h4"
|
|
10223
|
+
}, hasSelectedRows ? /*#__PURE__*/React__default["default"].createElement(Trans, {
|
|
10224
|
+
i18nKey: "helpers.selectedMembersCount",
|
|
10225
|
+
values: selectedMembersCountValues
|
|
10226
|
+
}) : `${filteredCount} ${pluralizedByFilterCount}`);
|
|
10227
|
+
};
|
|
10228
|
+
const Right = _ref2 => {
|
|
10229
|
+
let columns = _ref2.columns,
|
|
10230
|
+
roles = _ref2.roles,
|
|
10231
|
+
rolesButtonProps = _ref2.rolesButtonProps,
|
|
10232
|
+
selectedRows = _ref2.selectedRows,
|
|
10233
|
+
setColumnData = _ref2.setColumnData,
|
|
10234
|
+
setSelectedRows = _ref2.setSelectedRows;
|
|
10235
|
+
const isRolesButtonVisible = !!rolesButtonProps;
|
|
10236
|
+
const _useBulkUpdateMembers = useBulkUpdateMembers({
|
|
10237
|
+
onSuccess: () => setSelectedRows(DEFAULT_SELECTED_ROWS)
|
|
10238
|
+
}),
|
|
10239
|
+
bulkUpdateMember = _useBulkUpdateMembers.mutate;
|
|
10240
|
+
const handleDeactivateMembers = () => bulkUpdateMember({
|
|
10241
|
+
users: {
|
|
10242
|
+
active: false,
|
|
10243
|
+
emails: selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.emails
|
|
10244
|
+
}
|
|
10245
|
+
});
|
|
10246
|
+
const handleActivateMembers = () => bulkUpdateMember({
|
|
10247
|
+
users: {
|
|
10248
|
+
active: true,
|
|
10249
|
+
emails: selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.emails
|
|
10250
|
+
}
|
|
10251
|
+
});
|
|
10252
|
+
const handleRoleChange = role => {
|
|
10253
|
+
bulkUpdateMember({
|
|
10254
|
+
users: {
|
|
10255
|
+
active: true,
|
|
10256
|
+
emails: selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.emails,
|
|
10257
|
+
organization_role: role
|
|
10258
|
+
}
|
|
10259
|
+
});
|
|
10260
|
+
};
|
|
10261
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, getDeactivatedButtonVisible(selectedRows) && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
10262
|
+
"data-cy": "ntm-deactivate-members-button",
|
|
10263
|
+
label: instance.t("common.deactivate"),
|
|
10264
|
+
size: "small",
|
|
10265
|
+
style: "secondary",
|
|
10266
|
+
onClick: () => handleDeactivateMembers()
|
|
10267
|
+
}), getActivateButtonVisible(selectedRows) && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
10268
|
+
"data-cy": "ntm-activate-members-button",
|
|
10269
|
+
label: instance.t("common.activate"),
|
|
10270
|
+
size: "small",
|
|
10271
|
+
style: "secondary",
|
|
10272
|
+
onClick: () => handleActivateMembers()
|
|
10273
|
+
}), isNotEmpty$1(selectedRows.keys) && /*#__PURE__*/React__default["default"].createElement(RolesDropdown, {
|
|
10274
|
+
handleRoleChange: handleRoleChange,
|
|
10275
|
+
roles: roles
|
|
10276
|
+
}), /*#__PURE__*/React__default["default"].createElement(Columns, {
|
|
10277
|
+
columnData: columns,
|
|
10278
|
+
dropdownProps: COLUMNS_DROPDOWN_PROPS,
|
|
10279
|
+
fixedColumns: FIXED_COLUMNS,
|
|
10280
|
+
localStorageKey: "NTM_MEMBERS_TABLE_HIDDEN_COLUMNS",
|
|
10281
|
+
noColumnMessage: instance.t("columns.noColumnsFound"),
|
|
10282
|
+
onChange: setColumnData,
|
|
10283
|
+
searchProps: COLUMNS_SEARCH_PROPS
|
|
10284
|
+
}), isRolesButtonVisible ? /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
10285
|
+
"data-cy": "ntm-manage-roles-button",
|
|
10286
|
+
label: MANAGE_ROLES_BUTTON_LABEL,
|
|
10287
|
+
size: "small",
|
|
10288
|
+
style: "secondary"
|
|
10289
|
+
}, rolesButtonProps)) : null);
|
|
10290
|
+
};
|
|
10291
|
+
const SubHeader = {
|
|
10292
|
+
Left,
|
|
10293
|
+
Right
|
|
10294
|
+
};
|
|
9916
10295
|
|
|
9917
10296
|
function commonjsRequire(path) {
|
|
9918
10297
|
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.');
|
|
@@ -10652,6 +11031,13 @@ MultipleEmailInput.defaultProps = {
|
|
|
10652
11031
|
selectedMember: null
|
|
10653
11032
|
};
|
|
10654
11033
|
|
|
11034
|
+
const RoleLabel = /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
11035
|
+
className: "ntm-members-radio-group__label"
|
|
11036
|
+
}, instance.t("common.role", SINGULAR), "*"), /*#__PURE__*/React__default["default"].createElement(neetoIcons.Info, {
|
|
11037
|
+
className: "ntm-members-radio-group__icon",
|
|
11038
|
+
size: 16,
|
|
11039
|
+
onClick: () => window.location.pathname += "/roles"
|
|
11040
|
+
}));
|
|
10655
11041
|
const RolesRadioGroup = _ref => {
|
|
10656
11042
|
let role = _ref.role,
|
|
10657
11043
|
roles = _ref.roles;
|
|
@@ -10659,7 +11045,7 @@ const RolesRadioGroup = _ref => {
|
|
|
10659
11045
|
stacked: true,
|
|
10660
11046
|
className: "ntm-members-radio-group",
|
|
10661
11047
|
"data-cy": "ntm-manage-member-roles-group",
|
|
10662
|
-
label:
|
|
11048
|
+
label: RoleLabel,
|
|
10663
11049
|
name: "role"
|
|
10664
11050
|
}, roles.map(_ref2 => {
|
|
10665
11051
|
let description = _ref2.description,
|
|
@@ -10816,7 +11202,7 @@ const Menu = _ref => {
|
|
|
10816
11202
|
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; }
|
|
10817
11203
|
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; }
|
|
10818
11204
|
const TeamMembers = _ref => {
|
|
10819
|
-
var _config$permissions$v, _config$permissions, _config$permissions$v2, _config$permissions2;
|
|
11205
|
+
var _config$permissions$v, _config$permissions, _config$permissions$v2, _config$permissions2, _filters$category;
|
|
10820
11206
|
let config = _ref.config;
|
|
10821
11207
|
const metaName = getMetaName((config === null || config === void 0 ? void 0 : config.metaName) || "member");
|
|
10822
11208
|
const _useState = React.useState(DEFAULT_IS_OPEN_VALUES),
|
|
@@ -10836,6 +11222,10 @@ const TeamMembers = _ref => {
|
|
|
10836
11222
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
10837
11223
|
columnData = _useState8[0],
|
|
10838
11224
|
setColumnData = _useState8[1];
|
|
11225
|
+
const _useState9 = React.useState(DEFAULT_SELECTED_ROWS),
|
|
11226
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
11227
|
+
selectedRows = _useState10[0],
|
|
11228
|
+
setSelectedRows = _useState10[1];
|
|
10839
11229
|
const _useFetchMembers = useFetchMembers(_objectSpread(_objectSpread({}, filters), {}, {
|
|
10840
11230
|
search: debouncedSearch.trim(),
|
|
10841
11231
|
category: filters.category.toLowerCase()
|
|
@@ -10859,6 +11249,7 @@ const TeamMembers = _ref => {
|
|
|
10859
11249
|
}),
|
|
10860
11250
|
updateMember = _useUpdateMember.mutate,
|
|
10861
11251
|
isUpdatingMember = _useUpdateMember.isLoading;
|
|
11252
|
+
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()];
|
|
10862
11253
|
const searchProps = {
|
|
10863
11254
|
"data-cy": "ntm-search-members-input",
|
|
10864
11255
|
onChange: _ref3 => {
|
|
@@ -10923,6 +11314,13 @@ const TeamMembers = _ref => {
|
|
|
10923
11314
|
sort_direction: sorter.order
|
|
10924
11315
|
}));
|
|
10925
11316
|
};
|
|
11317
|
+
const handleRowSelect = (keys, rowData) => {
|
|
11318
|
+
setSelectedRows({
|
|
11319
|
+
active: ramda.pluck("active", rowData),
|
|
11320
|
+
emails: ramda.pluck("email", rowData),
|
|
11321
|
+
keys
|
|
11322
|
+
});
|
|
11323
|
+
};
|
|
10926
11324
|
if (isRolesLoading || isMembersLoading) {
|
|
10927
11325
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10928
11326
|
className: "ntm-members-page-loader"
|
|
@@ -10951,18 +11349,24 @@ const TeamMembers = _ref => {
|
|
|
10951
11349
|
})
|
|
10952
11350
|
}), /*#__PURE__*/React__default["default"].createElement(layouts.SubHeader, {
|
|
10953
11351
|
leftActionBlock: /*#__PURE__*/React__default["default"].createElement(SubHeader.Left, {
|
|
11352
|
+
filteredCount: team === null || team === void 0 ? void 0 : team.membersCount,
|
|
10954
11353
|
metaName: metaName,
|
|
10955
|
-
|
|
11354
|
+
selectedRows: selectedRows,
|
|
11355
|
+
totalCount: currentCategoryCount
|
|
10956
11356
|
}),
|
|
10957
11357
|
rightActionBlock: /*#__PURE__*/React__default["default"].createElement(SubHeader.Right, {
|
|
10958
11358
|
columns: columns,
|
|
11359
|
+
roles: roles,
|
|
10959
11360
|
rolesButtonProps: config.rolesButtonProps,
|
|
10960
|
-
|
|
11361
|
+
selectedRows: selectedRows,
|
|
11362
|
+
setColumnData: setColumnData,
|
|
11363
|
+
setSelectedRows: setSelectedRows
|
|
10961
11364
|
})
|
|
10962
11365
|
}), (team === null || team === void 0 ? void 0 : team.membersCount) !== 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10963
11366
|
className: "ntm-members__table-wrapper"
|
|
10964
11367
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Table, {
|
|
10965
11368
|
fixedHeight: true,
|
|
11369
|
+
rowSelection: true,
|
|
10966
11370
|
allowRowClick: false,
|
|
10967
11371
|
columnData: columnData,
|
|
10968
11372
|
currentPageNumber: parseInt(filters.page, DEFAULT_RADIX),
|
|
@@ -10970,10 +11374,11 @@ const TeamMembers = _ref => {
|
|
|
10970
11374
|
defaultPageSize: parseInt(filters.results, DEFAULT_RADIX),
|
|
10971
11375
|
handlePageChange: handlePageChange(setFilters, filters.category),
|
|
10972
11376
|
loading: isMembersFetching,
|
|
10973
|
-
onChange:
|
|
11377
|
+
onChange: handleTableChange,
|
|
11378
|
+
onRowSelect: handleRowSelect,
|
|
10974
11379
|
paginationProps: renderPaginationProps(filters.results),
|
|
10975
11380
|
rowData: team === null || team === void 0 ? void 0 : team.members,
|
|
10976
|
-
|
|
11381
|
+
selectedRowKeys: selectedRows.keys,
|
|
10977
11382
|
totalCount: team === null || team === void 0 ? void 0 : team.membersCount
|
|
10978
11383
|
})) : /*#__PURE__*/React__default["default"].createElement(EmptyState, {
|
|
10979
11384
|
title: instance.t("common.notFound_", {
|
|
@@ -11020,7 +11425,7 @@ const VALIDATION_SCHEMA = {
|
|
|
11020
11425
|
|
|
11021
11426
|
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}}
|
|
11022
11427
|
|
|
11023
|
-
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}";
|
|
11428
|
+
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}";
|
|
11024
11429
|
n(css,{});
|
|
11025
11430
|
|
|
11026
11431
|
exports.MultipleEmailInput = MultipleEmailInput;
|