@bigbinary/neeto-team-members-frontend 2.2.5 → 2.2.6
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 +851 -141
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +878 -168
- package/dist/index.esm.js.map +1 -1
- package/package.json +14 -15
package/dist/index.cjs.js
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _typeof = require('@babel/runtime/helpers/esm/typeof');
|
|
5
|
+
var _typeof$2 = require('@babel/runtime/helpers/esm/typeof');
|
|
6
6
|
var _classCallCheck = require('@babel/runtime/helpers/esm/classCallCheck');
|
|
7
7
|
var _createClass = require('@babel/runtime/helpers/esm/createClass');
|
|
8
8
|
var _assertThisInitialized = require('@babel/runtime/helpers/esm/assertThisInitialized');
|
|
9
9
|
var _inherits = require('@babel/runtime/helpers/esm/inherits');
|
|
10
10
|
var _possibleConstructorReturn = require('@babel/runtime/helpers/esm/possibleConstructorReturn');
|
|
11
11
|
var _getPrototypeOf = require('@babel/runtime/helpers/esm/getPrototypeOf');
|
|
12
|
-
var _defineProperty$
|
|
12
|
+
var _defineProperty$3 = require('@babel/runtime/helpers/esm/defineProperty');
|
|
13
13
|
var _toArray = require('@babel/runtime/helpers/esm/toArray');
|
|
14
14
|
var _objectWithoutProperties$1 = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
15
|
-
var _typeof$
|
|
16
|
-
var _defineProperty$
|
|
15
|
+
var _typeof$3 = require('@babel/runtime/helpers/typeof');
|
|
16
|
+
var _defineProperty$4 = require('@babel/runtime/helpers/defineProperty');
|
|
17
17
|
var React = require('react');
|
|
18
18
|
var _classCallCheck$1 = require('@babel/runtime/helpers/classCallCheck');
|
|
19
19
|
var _createClass$1 = require('@babel/runtime/helpers/createClass');
|
|
20
|
-
var _slicedToArray$
|
|
20
|
+
var _slicedToArray$4 = require('@babel/runtime/helpers/slicedToArray');
|
|
21
21
|
var _extends$1 = require('@babel/runtime/helpers/extends');
|
|
22
22
|
var _inheritsLoose = require('@babel/runtime/helpers/esm/inheritsLoose');
|
|
23
23
|
var _extends = require('@babel/runtime/helpers/esm/extends');
|
|
@@ -28,11 +28,11 @@ var neetoIcons = require('@bigbinary/neeto-icons');
|
|
|
28
28
|
var classnames = require('classnames');
|
|
29
29
|
var formik$1 = require('@bigbinary/neetoui/formik');
|
|
30
30
|
var axios = require('axios');
|
|
31
|
-
var pure = require('@bigbinary/neeto-commons-frontend/pure');
|
|
32
31
|
var ramda = require('ramda');
|
|
33
32
|
var layouts = require('@bigbinary/neetoui/layouts');
|
|
34
|
-
var
|
|
35
|
-
var
|
|
33
|
+
var Yup = require('yup');
|
|
34
|
+
var react = require('@honeybadger-io/react');
|
|
35
|
+
require('react-router-dom');
|
|
36
36
|
|
|
37
37
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
38
38
|
|
|
@@ -54,33 +54,33 @@ function _interopNamespace(e) {
|
|
|
54
54
|
return Object.freeze(n);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
57
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof$2);
|
|
58
58
|
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
59
59
|
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
60
60
|
var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized);
|
|
61
61
|
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
62
62
|
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
63
63
|
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
64
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$
|
|
64
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$3);
|
|
65
65
|
var _toArray__default = /*#__PURE__*/_interopDefaultLegacy(_toArray);
|
|
66
66
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties$1);
|
|
67
|
-
var _typeof__default$1 = /*#__PURE__*/_interopDefaultLegacy(_typeof$
|
|
68
|
-
var _defineProperty__default$1 = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$
|
|
67
|
+
var _typeof__default$1 = /*#__PURE__*/_interopDefaultLegacy(_typeof$3);
|
|
68
|
+
var _defineProperty__default$1 = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$4);
|
|
69
69
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
70
70
|
var _classCallCheck__default$1 = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck$1);
|
|
71
71
|
var _createClass__default$1 = /*#__PURE__*/_interopDefaultLegacy(_createClass$1);
|
|
72
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray$
|
|
72
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray$4);
|
|
73
73
|
var _extends__default$1 = /*#__PURE__*/_interopDefaultLegacy(_extends$1);
|
|
74
74
|
var _inheritsLoose__default = /*#__PURE__*/_interopDefaultLegacy(_inheritsLoose);
|
|
75
75
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
76
76
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
77
77
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
78
78
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
79
|
-
var
|
|
79
|
+
var Yup__namespace = /*#__PURE__*/_interopNamespace(Yup);
|
|
80
80
|
|
|
81
|
-
function ownKeys$
|
|
81
|
+
function ownKeys$d(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; }
|
|
82
82
|
|
|
83
|
-
function _objectSpread$
|
|
83
|
+
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$d(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
84
84
|
|
|
85
85
|
var consoleLogger = {
|
|
86
86
|
type: 'logger',
|
|
@@ -167,7 +167,7 @@ var Logger = function () {
|
|
|
167
167
|
}, {
|
|
168
168
|
key: "create",
|
|
169
169
|
value: function create(moduleName) {
|
|
170
|
-
return new Logger(this.logger, _objectSpread$
|
|
170
|
+
return new Logger(this.logger, _objectSpread$d(_objectSpread$d({}, {
|
|
171
171
|
prefix: "".concat(this.prefix, ":").concat(moduleName, ":")
|
|
172
172
|
}), this.options));
|
|
173
173
|
}
|
|
@@ -1939,6 +1939,8 @@ var Connector = function (_EventEmitter) {
|
|
|
1939
1939
|
_this.waitingReads = [];
|
|
1940
1940
|
_this.maxParallelReads = options.maxParallelReads || 10;
|
|
1941
1941
|
_this.readingCalls = 0;
|
|
1942
|
+
_this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;
|
|
1943
|
+
_this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;
|
|
1942
1944
|
_this.state = {};
|
|
1943
1945
|
_this.queue = [];
|
|
1944
1946
|
|
|
@@ -2045,7 +2047,7 @@ var Connector = function (_EventEmitter) {
|
|
|
2045
2047
|
var _this3 = this;
|
|
2046
2048
|
|
|
2047
2049
|
var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
2048
|
-
var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] :
|
|
2050
|
+
var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.retryTimeout;
|
|
2049
2051
|
var callback = arguments.length > 5 ? arguments[5] : undefined;
|
|
2050
2052
|
if (!lng.length) return callback(null, {});
|
|
2051
2053
|
|
|
@@ -2071,7 +2073,7 @@ var Connector = function (_EventEmitter) {
|
|
|
2071
2073
|
_this3.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);
|
|
2072
2074
|
}
|
|
2073
2075
|
|
|
2074
|
-
if (err && data && tried <
|
|
2076
|
+
if (err && data && tried < _this3.maxRetries) {
|
|
2075
2077
|
setTimeout(function () {
|
|
2076
2078
|
_this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);
|
|
2077
2079
|
}, wait);
|
|
@@ -2247,7 +2249,7 @@ function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeRefl
|
|
|
2247
2249
|
|
|
2248
2250
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2249
2251
|
|
|
2250
|
-
function noop$
|
|
2252
|
+
function noop$4() {}
|
|
2251
2253
|
|
|
2252
2254
|
function bindMemberFunctions(inst) {
|
|
2253
2255
|
var mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));
|
|
@@ -2313,7 +2315,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2313
2315
|
options = {};
|
|
2314
2316
|
}
|
|
2315
2317
|
|
|
2316
|
-
if (!options.defaultNS && options.ns) {
|
|
2318
|
+
if (!options.defaultNS && options.defaultNS !== false && options.ns) {
|
|
2317
2319
|
if (typeof options.ns === 'string') {
|
|
2318
2320
|
options.defaultNS = options.ns;
|
|
2319
2321
|
} else if (options.ns.indexOf('translation') < 0) {
|
|
@@ -2412,7 +2414,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2412
2414
|
}
|
|
2413
2415
|
|
|
2414
2416
|
this.format = this.options.interpolation.format;
|
|
2415
|
-
if (!callback) callback = noop$
|
|
2417
|
+
if (!callback) callback = noop$4;
|
|
2416
2418
|
|
|
2417
2419
|
if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
2418
2420
|
var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
@@ -2473,7 +2475,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2473
2475
|
value: function loadResources(language) {
|
|
2474
2476
|
var _this3 = this;
|
|
2475
2477
|
|
|
2476
|
-
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$
|
|
2478
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$4;
|
|
2477
2479
|
var usedCallback = callback;
|
|
2478
2480
|
var usedLng = typeof language === 'string' ? language : this.language;
|
|
2479
2481
|
if (typeof language === 'function') usedCallback = language;
|
|
@@ -2521,7 +2523,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2521
2523
|
var deferred = defer();
|
|
2522
2524
|
if (!lngs) lngs = this.languages;
|
|
2523
2525
|
if (!ns) ns = this.options.ns;
|
|
2524
|
-
if (!callback) callback = noop$
|
|
2526
|
+
if (!callback) callback = noop$4;
|
|
2525
2527
|
this.services.backendConnector.reload(lngs, ns, function (err) {
|
|
2526
2528
|
deferred.resolve();
|
|
2527
2529
|
callback(err);
|
|
@@ -2800,7 +2802,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2800
2802
|
var _this8 = this;
|
|
2801
2803
|
|
|
2802
2804
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2803
|
-
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$
|
|
2805
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$4;
|
|
2804
2806
|
|
|
2805
2807
|
var mergedOptions = _objectSpread$6$1(_objectSpread$6$1(_objectSpread$6$1({}, this.options), options), {
|
|
2806
2808
|
isClone: true
|
|
@@ -2890,12 +2892,12 @@ var serializeCookie = function serializeCookie(name, val, options) {
|
|
|
2890
2892
|
var opt = options || {};
|
|
2891
2893
|
opt.path = opt.path || '/';
|
|
2892
2894
|
var value = encodeURIComponent(val);
|
|
2893
|
-
var str = name
|
|
2895
|
+
var str = "".concat(name, "=").concat(value);
|
|
2894
2896
|
|
|
2895
2897
|
if (opt.maxAge > 0) {
|
|
2896
2898
|
var maxAge = opt.maxAge - 0;
|
|
2897
|
-
if (isNaN(maxAge)) throw new Error('maxAge should be a Number');
|
|
2898
|
-
str +=
|
|
2899
|
+
if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');
|
|
2900
|
+
str += "; Max-Age=".concat(Math.floor(maxAge));
|
|
2899
2901
|
}
|
|
2900
2902
|
|
|
2901
2903
|
if (opt.domain) {
|
|
@@ -2903,7 +2905,7 @@ var serializeCookie = function serializeCookie(name, val, options) {
|
|
|
2903
2905
|
throw new TypeError('option domain is invalid');
|
|
2904
2906
|
}
|
|
2905
2907
|
|
|
2906
|
-
str +=
|
|
2908
|
+
str += "; Domain=".concat(opt.domain);
|
|
2907
2909
|
}
|
|
2908
2910
|
|
|
2909
2911
|
if (opt.path) {
|
|
@@ -2911,7 +2913,7 @@ var serializeCookie = function serializeCookie(name, val, options) {
|
|
|
2911
2913
|
throw new TypeError('option path is invalid');
|
|
2912
2914
|
}
|
|
2913
2915
|
|
|
2914
|
-
str +=
|
|
2916
|
+
str += "; Path=".concat(opt.path);
|
|
2915
2917
|
}
|
|
2916
2918
|
|
|
2917
2919
|
if (opt.expires) {
|
|
@@ -2919,7 +2921,7 @@ var serializeCookie = function serializeCookie(name, val, options) {
|
|
|
2919
2921
|
throw new TypeError('option expires is invalid');
|
|
2920
2922
|
}
|
|
2921
2923
|
|
|
2922
|
-
str +=
|
|
2924
|
+
str += "; Expires=".concat(opt.expires.toUTCString());
|
|
2923
2925
|
}
|
|
2924
2926
|
|
|
2925
2927
|
if (opt.httpOnly) str += '; HttpOnly';
|
|
@@ -2969,7 +2971,7 @@ var cookie = {
|
|
|
2969
2971
|
document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);
|
|
2970
2972
|
},
|
|
2971
2973
|
read: function read(name) {
|
|
2972
|
-
var nameEQ = name
|
|
2974
|
+
var nameEQ = "".concat(name, "=");
|
|
2973
2975
|
var ca = document.cookie.split(';');
|
|
2974
2976
|
|
|
2975
2977
|
for (var i = 0; i < ca.length; i++) {
|
|
@@ -3179,21 +3181,16 @@ var path = {
|
|
|
3179
3181
|
var subdomain = {
|
|
3180
3182
|
name: 'subdomain',
|
|
3181
3183
|
lookup: function lookup(options) {
|
|
3182
|
-
|
|
3184
|
+
// If given get the subdomain index else 1
|
|
3185
|
+
var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1; // get all matches if window.location. is existing
|
|
3186
|
+
// first item of match is the match itself and the second is the first group macht which sould be the first subdomain match
|
|
3187
|
+
// is the hostname no public domain get the or option of localhost
|
|
3183
3188
|
|
|
3184
|
-
|
|
3185
|
-
var language = window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);
|
|
3189
|
+
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); // if there is no match (null) return undefined
|
|
3186
3190
|
|
|
3187
|
-
|
|
3188
|
-
if (typeof options.lookupFromSubdomainIndex === 'number') {
|
|
3189
|
-
found = language[options.lookupFromSubdomainIndex].replace('http://', '').replace('https://', '').replace('.', '');
|
|
3190
|
-
} else {
|
|
3191
|
-
found = language[0].replace('http://', '').replace('https://', '').replace('.', '');
|
|
3192
|
-
}
|
|
3193
|
-
}
|
|
3194
|
-
}
|
|
3191
|
+
if (!language) return undefined; // return the given group match
|
|
3195
3192
|
|
|
3196
|
-
return
|
|
3193
|
+
return language[lookupFromSubdomainIndex];
|
|
3197
3194
|
}
|
|
3198
3195
|
};
|
|
3199
3196
|
|
|
@@ -3206,8 +3203,8 @@ function getDefaults$1() {
|
|
|
3206
3203
|
lookupSessionStorage: 'i18nextLng',
|
|
3207
3204
|
// cache user language
|
|
3208
3205
|
caches: ['localStorage'],
|
|
3209
|
-
excludeCacheFor: ['cimode'] //cookieMinutes: 10,
|
|
3210
|
-
//cookieDomain: 'myDomain'
|
|
3206
|
+
excludeCacheFor: ['cimode'] // cookieMinutes: 10,
|
|
3207
|
+
// cookieDomain: 'myDomain'
|
|
3211
3208
|
|
|
3212
3209
|
};
|
|
3213
3210
|
}
|
|
@@ -3341,9 +3338,9 @@ var unescape = function unescape(text) {
|
|
|
3341
3338
|
return text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
3342
3339
|
};
|
|
3343
3340
|
|
|
3344
|
-
function ownKeys$
|
|
3341
|
+
function ownKeys$c(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; }
|
|
3345
3342
|
|
|
3346
|
-
function _objectSpread$
|
|
3343
|
+
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$c(Object(source), true).forEach(function (key) { _defineProperty__default$1["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3347
3344
|
var defaultOptions = {
|
|
3348
3345
|
bindI18n: 'languageChanged',
|
|
3349
3346
|
bindI18nStore: '',
|
|
@@ -3358,7 +3355,7 @@ var i18nInstance;
|
|
|
3358
3355
|
var I18nContext = React.createContext();
|
|
3359
3356
|
function setDefaults() {
|
|
3360
3357
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3361
|
-
defaultOptions = _objectSpread$
|
|
3358
|
+
defaultOptions = _objectSpread$c(_objectSpread$c({}, defaultOptions), options);
|
|
3362
3359
|
}
|
|
3363
3360
|
function getDefaults() {
|
|
3364
3361
|
return defaultOptions;
|
|
@@ -3485,9 +3482,9 @@ function hasLoadedNamespace(ns, i18n) {
|
|
|
3485
3482
|
var _excluded$4 = ["format"],
|
|
3486
3483
|
_excluded2$3 = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
|
|
3487
3484
|
|
|
3488
|
-
function ownKeys$
|
|
3485
|
+
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; }
|
|
3489
3486
|
|
|
3490
|
-
function _objectSpread$
|
|
3487
|
+
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__default$1["default"](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; }
|
|
3491
3488
|
|
|
3492
3489
|
function hasChildren(node, checkLength) {
|
|
3493
3490
|
if (!node) return false;
|
|
@@ -3498,7 +3495,7 @@ function hasChildren(node, checkLength) {
|
|
|
3498
3495
|
|
|
3499
3496
|
function getChildren(node) {
|
|
3500
3497
|
if (!node) return [];
|
|
3501
|
-
return node
|
|
3498
|
+
return node.props ? node.props.children : node.children;
|
|
3502
3499
|
}
|
|
3503
3500
|
|
|
3504
3501
|
function hasValidReactChildren(children) {
|
|
@@ -3513,7 +3510,7 @@ function getAsArray(data) {
|
|
|
3513
3510
|
}
|
|
3514
3511
|
|
|
3515
3512
|
function mergeProps(source, target) {
|
|
3516
|
-
var newTarget = _objectSpread$
|
|
3513
|
+
var newTarget = _objectSpread$b({}, target);
|
|
3517
3514
|
|
|
3518
3515
|
newTarget.props = Object.assign(source.props, target.props);
|
|
3519
3516
|
return newTarget;
|
|
@@ -3583,7 +3580,7 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
|
|
|
3583
3580
|
getData(children);
|
|
3584
3581
|
var ast = c.parse("<0>".concat(targetString, "</0>"));
|
|
3585
3582
|
|
|
3586
|
-
var opts = _objectSpread$
|
|
3583
|
+
var opts = _objectSpread$b(_objectSpread$b({}, data), combinedTOpts);
|
|
3587
3584
|
|
|
3588
3585
|
function renderInner(child, node, rootReactNode) {
|
|
3589
3586
|
var childs = getChildren(child);
|
|
@@ -3593,7 +3590,7 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
|
|
|
3593
3590
|
|
|
3594
3591
|
function pushTranslatedJSX(child, inner, mem, i, isVoid) {
|
|
3595
3592
|
if (child.dummy) child.children = inner;
|
|
3596
|
-
mem.push(React.cloneElement(child, _objectSpread$
|
|
3593
|
+
mem.push(React.cloneElement(child, _objectSpread$b(_objectSpread$b({}, child.props), {}, {
|
|
3597
3594
|
key: i
|
|
3598
3595
|
}), isVoid ? undefined : inner));
|
|
3599
3596
|
}
|
|
@@ -3625,7 +3622,7 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
|
|
|
3625
3622
|
} else if (isEmptyTransWithHTML) {
|
|
3626
3623
|
var _inner = mapAST(reactNodes, node.children, rootReactNode);
|
|
3627
3624
|
|
|
3628
|
-
mem.push(React.cloneElement(child, _objectSpread$
|
|
3625
|
+
mem.push(React.cloneElement(child, _objectSpread$b(_objectSpread$b({}, child.props), {}, {
|
|
3629
3626
|
key: i
|
|
3630
3627
|
}), _inner));
|
|
3631
3628
|
} else if (Number.isNaN(parseFloat(node.name))) {
|
|
@@ -3656,11 +3653,11 @@ function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, s
|
|
|
3656
3653
|
var content = node.children[0] ? translationContent : null;
|
|
3657
3654
|
if (content) mem.push(content);
|
|
3658
3655
|
} else if (node.children.length === 1 && translationContent) {
|
|
3659
|
-
mem.push(React.cloneElement(child, _objectSpread$
|
|
3656
|
+
mem.push(React.cloneElement(child, _objectSpread$b(_objectSpread$b({}, child.props), {}, {
|
|
3660
3657
|
key: i
|
|
3661
3658
|
}), translationContent));
|
|
3662
3659
|
} else {
|
|
3663
|
-
mem.push(React.cloneElement(child, _objectSpread$
|
|
3660
|
+
mem.push(React.cloneElement(child, _objectSpread$b(_objectSpread$b({}, child.props), {}, {
|
|
3664
3661
|
key: i
|
|
3665
3662
|
})));
|
|
3666
3663
|
}
|
|
@@ -3723,7 +3720,7 @@ function Trans(_ref) {
|
|
|
3723
3720
|
|
|
3724
3721
|
if (context) tOptions.context = context;
|
|
3725
3722
|
|
|
3726
|
-
var reactI18nextOptions = _objectSpread$
|
|
3723
|
+
var reactI18nextOptions = _objectSpread$b(_objectSpread$b({}, getDefaults()), i18n.options && i18n.options.react);
|
|
3727
3724
|
|
|
3728
3725
|
var namespaces = ns || t.ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
|
|
3729
3726
|
namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
|
|
@@ -3731,13 +3728,13 @@ function Trans(_ref) {
|
|
|
3731
3728
|
var hashTransKey = reactI18nextOptions.hashTransKey;
|
|
3732
3729
|
var key = i18nKey || (hashTransKey ? hashTransKey(defaultValue) : defaultValue);
|
|
3733
3730
|
var interpolationOverride = values ? tOptions.interpolation : {
|
|
3734
|
-
interpolation: _objectSpread$
|
|
3731
|
+
interpolation: _objectSpread$b(_objectSpread$b({}, tOptions.interpolation), {}, {
|
|
3735
3732
|
prefix: '#$?',
|
|
3736
3733
|
suffix: '?$#'
|
|
3737
3734
|
})
|
|
3738
3735
|
};
|
|
3739
3736
|
|
|
3740
|
-
var combinedTOpts = _objectSpread$
|
|
3737
|
+
var combinedTOpts = _objectSpread$b(_objectSpread$b(_objectSpread$b(_objectSpread$b({}, tOptions), {}, {
|
|
3741
3738
|
count: count
|
|
3742
3739
|
}, values), interpolationOverride), {}, {
|
|
3743
3740
|
defaultValue: defaultValue,
|
|
@@ -3750,9 +3747,9 @@ function Trans(_ref) {
|
|
|
3750
3747
|
return useAsParent ? React.createElement(useAsParent, additionalProps, content) : content;
|
|
3751
3748
|
}
|
|
3752
3749
|
|
|
3753
|
-
function ownKeys$
|
|
3750
|
+
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; }
|
|
3754
3751
|
|
|
3755
|
-
function _objectSpread$
|
|
3752
|
+
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__default$1["default"](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; }
|
|
3756
3753
|
|
|
3757
3754
|
var usePrevious = function usePrevious(value, ignore) {
|
|
3758
3755
|
var ref = React.useRef();
|
|
@@ -3789,7 +3786,7 @@ function useTranslation(ns) {
|
|
|
3789
3786
|
|
|
3790
3787
|
if (i18n.options.react && i18n.options.react.wait !== undefined) warnOnce('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
|
|
3791
3788
|
|
|
3792
|
-
var i18nOptions = _objectSpread$
|
|
3789
|
+
var i18nOptions = _objectSpread$a(_objectSpread$a(_objectSpread$a({}, getDefaults()), i18n.options.react), props);
|
|
3793
3790
|
|
|
3794
3791
|
var useSuspense = i18nOptions.useSuspense,
|
|
3795
3792
|
keyPrefix = i18nOptions.keyPrefix;
|
|
@@ -3850,7 +3847,7 @@ function useTranslation(ns) {
|
|
|
3850
3847
|
}
|
|
3851
3848
|
|
|
3852
3849
|
isInitial.current = false;
|
|
3853
|
-
}, [i18n]);
|
|
3850
|
+
}, [i18n, keyPrefix]);
|
|
3854
3851
|
var ret = [t, i18n, ready];
|
|
3855
3852
|
ret.t = t;
|
|
3856
3853
|
ret.i18n = i18n;
|
|
@@ -4142,7 +4139,7 @@ var Subscribable = /*#__PURE__*/function () {
|
|
|
4142
4139
|
// TYPES
|
|
4143
4140
|
// UTILS
|
|
4144
4141
|
var isServer = typeof window === 'undefined';
|
|
4145
|
-
function noop$
|
|
4142
|
+
function noop$3() {
|
|
4146
4143
|
return undefined;
|
|
4147
4144
|
}
|
|
4148
4145
|
function functionalUpdate(updater, input) {
|
|
@@ -5005,7 +5002,7 @@ var Query = /*#__PURE__*/function () {
|
|
|
5005
5002
|
|
|
5006
5003
|
var promise = this.promise;
|
|
5007
5004
|
(_this$retryer = this.retryer) == null ? void 0 : _this$retryer.cancel(options);
|
|
5008
|
-
return promise ? promise.then(noop$
|
|
5005
|
+
return promise ? promise.then(noop$3).catch(noop$3) : Promise.resolve();
|
|
5009
5006
|
};
|
|
5010
5007
|
|
|
5011
5008
|
_proto.destroy = function destroy() {
|
|
@@ -5579,7 +5576,7 @@ var Mutation = /*#__PURE__*/function () {
|
|
|
5579
5576
|
_proto.cancel = function cancel() {
|
|
5580
5577
|
if (this.retryer) {
|
|
5581
5578
|
this.retryer.cancel();
|
|
5582
|
-
return this.retryer.promise.then(noop$
|
|
5579
|
+
return this.retryer.promise.then(noop$3).catch(noop$3);
|
|
5583
5580
|
}
|
|
5584
5581
|
|
|
5585
5582
|
return Promise.resolve();
|
|
@@ -5868,7 +5865,7 @@ var MutationCache = /*#__PURE__*/function (_Subscribable) {
|
|
|
5868
5865
|
return notifyManager.batch(function () {
|
|
5869
5866
|
return pausedMutations.reduce(function (promise, mutation) {
|
|
5870
5867
|
return promise.then(function () {
|
|
5871
|
-
return mutation.continue().catch(noop$
|
|
5868
|
+
return mutation.continue().catch(noop$3);
|
|
5872
5869
|
});
|
|
5873
5870
|
}, Promise.resolve());
|
|
5874
5871
|
});
|
|
@@ -6151,7 +6148,7 @@ var QueryClient = /*#__PURE__*/function () {
|
|
|
6151
6148
|
return query.cancel(cancelOptions);
|
|
6152
6149
|
});
|
|
6153
6150
|
});
|
|
6154
|
-
return Promise.all(promises).then(noop$
|
|
6151
|
+
return Promise.all(promises).then(noop$3).catch(noop$3);
|
|
6155
6152
|
};
|
|
6156
6153
|
|
|
6157
6154
|
_proto.invalidateQueries = function invalidateQueries(arg1, arg2, arg3) {
|
|
@@ -6196,10 +6193,10 @@ var QueryClient = /*#__PURE__*/function () {
|
|
|
6196
6193
|
}));
|
|
6197
6194
|
});
|
|
6198
6195
|
});
|
|
6199
|
-
var promise = Promise.all(promises).then(noop$
|
|
6196
|
+
var promise = Promise.all(promises).then(noop$3);
|
|
6200
6197
|
|
|
6201
6198
|
if (!(options == null ? void 0 : options.throwOnError)) {
|
|
6202
|
-
promise = promise.catch(noop$
|
|
6199
|
+
promise = promise.catch(noop$3);
|
|
6203
6200
|
}
|
|
6204
6201
|
|
|
6205
6202
|
return promise;
|
|
@@ -6218,7 +6215,7 @@ var QueryClient = /*#__PURE__*/function () {
|
|
|
6218
6215
|
};
|
|
6219
6216
|
|
|
6220
6217
|
_proto.prefetchQuery = function prefetchQuery(arg1, arg2, arg3) {
|
|
6221
|
-
return this.fetchQuery(arg1, arg2, arg3).then(noop$
|
|
6218
|
+
return this.fetchQuery(arg1, arg2, arg3).then(noop$3).catch(noop$3);
|
|
6222
6219
|
};
|
|
6223
6220
|
|
|
6224
6221
|
_proto.fetchInfiniteQuery = function fetchInfiniteQuery(arg1, arg2, arg3) {
|
|
@@ -6228,7 +6225,7 @@ var QueryClient = /*#__PURE__*/function () {
|
|
|
6228
6225
|
};
|
|
6229
6226
|
|
|
6230
6227
|
_proto.prefetchInfiniteQuery = function prefetchInfiniteQuery(arg1, arg2, arg3) {
|
|
6231
|
-
return this.fetchInfiniteQuery(arg1, arg2, arg3).then(noop$
|
|
6228
|
+
return this.fetchInfiniteQuery(arg1, arg2, arg3).then(noop$3).catch(noop$3);
|
|
6232
6229
|
};
|
|
6233
6230
|
|
|
6234
6231
|
_proto.cancelMutations = function cancelMutations() {
|
|
@@ -6239,7 +6236,7 @@ var QueryClient = /*#__PURE__*/function () {
|
|
|
6239
6236
|
return mutation.cancel();
|
|
6240
6237
|
});
|
|
6241
6238
|
});
|
|
6242
|
-
return Promise.all(promises).then(noop$
|
|
6239
|
+
return Promise.all(promises).then(noop$3).catch(noop$3);
|
|
6243
6240
|
};
|
|
6244
6241
|
|
|
6245
6242
|
_proto.resumePausedMutations = function resumePausedMutations() {
|
|
@@ -6543,7 +6540,7 @@ var QueryObserver = /*#__PURE__*/function (_Subscribable) {
|
|
|
6543
6540
|
var promise = this.currentQuery.fetch(this.options, fetchOptions);
|
|
6544
6541
|
|
|
6545
6542
|
if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {
|
|
6546
|
-
promise = promise.catch(noop$
|
|
6543
|
+
promise = promise.catch(noop$3);
|
|
6547
6544
|
}
|
|
6548
6545
|
|
|
6549
6546
|
return promise;
|
|
@@ -7135,7 +7132,7 @@ function useMutation(arg1, arg2, arg3) {
|
|
|
7135
7132
|
};
|
|
7136
7133
|
}, []);
|
|
7137
7134
|
var mutate = React__default["default"].useCallback(function (variables, mutateOptions) {
|
|
7138
|
-
obsRef.current.mutate(variables, mutateOptions).catch(noop$
|
|
7135
|
+
obsRef.current.mutate(variables, mutateOptions).catch(noop$3);
|
|
7139
7136
|
}, []);
|
|
7140
7137
|
|
|
7141
7138
|
if (currentResult.error && shouldThrowError(undefined, obsRef.current.options.useErrorBoundary, [currentResult.error])) {
|
|
@@ -7790,31 +7787,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
7790
7787
|
return true;
|
|
7791
7788
|
};
|
|
7792
7789
|
|
|
7793
|
-
function _toConsumableArray$1(arr) { return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$
|
|
7790
|
+
function _toConsumableArray$1(arr) { return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$3(arr) || _nonIterableSpread$1(); }
|
|
7794
7791
|
|
|
7795
7792
|
function _nonIterableSpread$1() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7796
7793
|
|
|
7797
7794
|
function _iterableToArray$1(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7798
7795
|
|
|
7799
|
-
function _arrayWithoutHoles$1(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
7796
|
+
function _arrayWithoutHoles$1(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$3(arr); }
|
|
7800
7797
|
|
|
7801
|
-
function ownKeys$
|
|
7798
|
+
function ownKeys$9(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; }
|
|
7802
7799
|
|
|
7803
|
-
function _objectSpread$
|
|
7800
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7804
7801
|
|
|
7805
|
-
function _defineProperty$
|
|
7802
|
+
function _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7806
7803
|
|
|
7807
|
-
function _slicedToArray$
|
|
7804
|
+
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$3(); }
|
|
7808
7805
|
|
|
7809
|
-
function _nonIterableRest$
|
|
7806
|
+
function _nonIterableRest$3() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7810
7807
|
|
|
7811
|
-
function _unsupportedIterableToArray$
|
|
7808
|
+
function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$3(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$3(o, minLen); }
|
|
7812
7809
|
|
|
7813
|
-
function _arrayLikeToArray$
|
|
7810
|
+
function _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
7814
7811
|
|
|
7815
|
-
function _iterableToArrayLimit$
|
|
7812
|
+
function _iterableToArrayLimit$3(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
7816
7813
|
|
|
7817
|
-
function _arrayWithHoles$
|
|
7814
|
+
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
7818
7815
|
|
|
7819
7816
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
7820
7817
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -7894,11 +7891,11 @@ function allFilesAccepted(_ref) {
|
|
|
7894
7891
|
|
|
7895
7892
|
return files.every(function (file) {
|
|
7896
7893
|
var _fileAccepted = fileAccepted(file, accept),
|
|
7897
|
-
_fileAccepted2 = _slicedToArray$
|
|
7894
|
+
_fileAccepted2 = _slicedToArray$3(_fileAccepted, 1),
|
|
7898
7895
|
accepted = _fileAccepted2[0];
|
|
7899
7896
|
|
|
7900
7897
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
7901
|
-
_fileMatchSize2 = _slicedToArray$
|
|
7898
|
+
_fileMatchSize2 = _slicedToArray$3(_fileMatchSize, 1),
|
|
7902
7899
|
sizeMatch = _fileMatchSize2[0];
|
|
7903
7900
|
|
|
7904
7901
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -7995,7 +7992,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
7995
7992
|
function pickerOptionsFromAccept(accept) {
|
|
7996
7993
|
if (isDefined(accept)) {
|
|
7997
7994
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
7998
|
-
var _ref3 = _slicedToArray$
|
|
7995
|
+
var _ref3 = _slicedToArray$3(_ref2, 2),
|
|
7999
7996
|
mimeType = _ref3[0],
|
|
8000
7997
|
ext = _ref3[1];
|
|
8001
7998
|
|
|
@@ -8013,11 +8010,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
8013
8010
|
|
|
8014
8011
|
return ok;
|
|
8015
8012
|
}).reduce(function (agg, _ref4) {
|
|
8016
|
-
var _ref5 = _slicedToArray$
|
|
8013
|
+
var _ref5 = _slicedToArray$3(_ref4, 2),
|
|
8017
8014
|
mimeType = _ref5[0],
|
|
8018
8015
|
ext = _ref5[1];
|
|
8019
8016
|
|
|
8020
|
-
return _objectSpread$
|
|
8017
|
+
return _objectSpread$9(_objectSpread$9({}, agg), {}, _defineProperty$2({}, mimeType, ext));
|
|
8021
8018
|
}, {});
|
|
8022
8019
|
return [{
|
|
8023
8020
|
accept: acceptForPicker
|
|
@@ -8035,7 +8032,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
8035
8032
|
function acceptPropAsAcceptAttr(accept) {
|
|
8036
8033
|
if (isDefined(accept)) {
|
|
8037
8034
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
8038
|
-
var _ref7 = _slicedToArray$
|
|
8035
|
+
var _ref7 = _slicedToArray$3(_ref6, 2),
|
|
8039
8036
|
mimeType = _ref7[0],
|
|
8040
8037
|
ext = _ref7[1];
|
|
8041
8038
|
|
|
@@ -8108,31 +8105,31 @@ var _excluded$3 = ["children"],
|
|
|
8108
8105
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
8109
8106
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
8110
8107
|
|
|
8111
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8108
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$2(arr) || _nonIterableSpread(); }
|
|
8112
8109
|
|
|
8113
8110
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8114
8111
|
|
|
8115
8112
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8116
8113
|
|
|
8117
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8114
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$2(arr); }
|
|
8118
8115
|
|
|
8119
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8116
|
+
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$2(arr, i) || _nonIterableRest$2(); }
|
|
8120
8117
|
|
|
8121
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8118
|
+
function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8122
8119
|
|
|
8123
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8120
|
+
function _unsupportedIterableToArray$2(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }
|
|
8124
8121
|
|
|
8125
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8122
|
+
function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8126
8123
|
|
|
8127
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
8124
|
+
function _iterableToArrayLimit$2(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
8128
8125
|
|
|
8129
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8126
|
+
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
8130
8127
|
|
|
8131
|
-
function ownKeys$
|
|
8128
|
+
function ownKeys$8(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; }
|
|
8132
8129
|
|
|
8133
|
-
function _objectSpread$
|
|
8130
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8134
8131
|
|
|
8135
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8132
|
+
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8136
8133
|
|
|
8137
8134
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8138
8135
|
|
|
@@ -8166,7 +8163,7 @@ var Dropzone = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
8166
8163
|
};
|
|
8167
8164
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
8168
8165
|
|
|
8169
|
-
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, children(_objectSpread$
|
|
8166
|
+
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, children(_objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
8170
8167
|
open: open
|
|
8171
8168
|
})));
|
|
8172
8169
|
});
|
|
@@ -8539,7 +8536,7 @@ var initialState = {
|
|
|
8539
8536
|
function useDropzone() {
|
|
8540
8537
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8541
8538
|
|
|
8542
|
-
var _defaultProps$props = _objectSpread$
|
|
8539
|
+
var _defaultProps$props = _objectSpread$8(_objectSpread$8({}, defaultProps), props),
|
|
8543
8540
|
accept = _defaultProps$props.accept,
|
|
8544
8541
|
disabled = _defaultProps$props.disabled,
|
|
8545
8542
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -8572,10 +8569,10 @@ function useDropzone() {
|
|
|
8572
8569
|
return pickerOptionsFromAccept(accept);
|
|
8573
8570
|
}, [accept]);
|
|
8574
8571
|
var onFileDialogOpenCb = React.useMemo(function () {
|
|
8575
|
-
return typeof onFileDialogOpen === "function" ? onFileDialogOpen : noop$
|
|
8572
|
+
return typeof onFileDialogOpen === "function" ? onFileDialogOpen : noop$2;
|
|
8576
8573
|
}, [onFileDialogOpen]);
|
|
8577
8574
|
var onFileDialogCancelCb = React.useMemo(function () {
|
|
8578
|
-
return typeof onFileDialogCancel === "function" ? onFileDialogCancel : noop$
|
|
8575
|
+
return typeof onFileDialogCancel === "function" ? onFileDialogCancel : noop$2;
|
|
8579
8576
|
}, [onFileDialogCancel]);
|
|
8580
8577
|
/**
|
|
8581
8578
|
* @constant
|
|
@@ -8586,7 +8583,7 @@ function useDropzone() {
|
|
|
8586
8583
|
var inputRef = React.useRef(null);
|
|
8587
8584
|
|
|
8588
8585
|
var _useReducer = React.useReducer(reducer, initialState),
|
|
8589
|
-
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
8586
|
+
_useReducer2 = _slicedToArray$2(_useReducer, 2),
|
|
8590
8587
|
state = _useReducer2[0],
|
|
8591
8588
|
dispatch = _useReducer2[1];
|
|
8592
8589
|
|
|
@@ -8756,12 +8753,12 @@ function useDropzone() {
|
|
|
8756
8753
|
var fileRejections = [];
|
|
8757
8754
|
files.forEach(function (file) {
|
|
8758
8755
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
8759
|
-
_fileAccepted2 = _slicedToArray(_fileAccepted, 2),
|
|
8756
|
+
_fileAccepted2 = _slicedToArray$2(_fileAccepted, 2),
|
|
8760
8757
|
accepted = _fileAccepted2[0],
|
|
8761
8758
|
acceptError = _fileAccepted2[1];
|
|
8762
8759
|
|
|
8763
8760
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
8764
|
-
_fileMatchSize2 = _slicedToArray(_fileMatchSize, 2),
|
|
8761
|
+
_fileMatchSize2 = _slicedToArray$2(_fileMatchSize, 2),
|
|
8765
8762
|
sizeMatch = _fileMatchSize2[0],
|
|
8766
8763
|
sizeError = _fileMatchSize2[1];
|
|
8767
8764
|
|
|
@@ -8964,7 +8961,7 @@ function useDropzone() {
|
|
|
8964
8961
|
onDrop = _ref2.onDrop,
|
|
8965
8962
|
rest = _objectWithoutProperties(_ref2, _excluded3$1);
|
|
8966
8963
|
|
|
8967
|
-
return _objectSpread$
|
|
8964
|
+
return _objectSpread$8(_objectSpread$8(_defineProperty$1({
|
|
8968
8965
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
8969
8966
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
8970
8967
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -8991,7 +8988,7 @@ function useDropzone() {
|
|
|
8991
8988
|
onClick = _ref3.onClick,
|
|
8992
8989
|
rest = _objectWithoutProperties(_ref3, _excluded4);
|
|
8993
8990
|
|
|
8994
|
-
var inputProps = _defineProperty({
|
|
8991
|
+
var inputProps = _defineProperty$1({
|
|
8995
8992
|
accept: acceptAttr,
|
|
8996
8993
|
multiple: multiple,
|
|
8997
8994
|
type: "file",
|
|
@@ -9003,10 +9000,10 @@ function useDropzone() {
|
|
|
9003
9000
|
tabIndex: -1
|
|
9004
9001
|
}, refKey, inputRef);
|
|
9005
9002
|
|
|
9006
|
-
return _objectSpread$
|
|
9003
|
+
return _objectSpread$8(_objectSpread$8({}, inputProps), rest);
|
|
9007
9004
|
};
|
|
9008
9005
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
9009
|
-
return _objectSpread$
|
|
9006
|
+
return _objectSpread$8(_objectSpread$8({}, state), {}, {
|
|
9010
9007
|
isFocused: isFocused && !disabled,
|
|
9011
9008
|
getRootProps: getRootProps,
|
|
9012
9009
|
getInputProps: getInputProps,
|
|
@@ -9025,47 +9022,47 @@ function reducer(state, action) {
|
|
|
9025
9022
|
/* istanbul ignore next */
|
|
9026
9023
|
switch (action.type) {
|
|
9027
9024
|
case "focus":
|
|
9028
|
-
return _objectSpread$
|
|
9025
|
+
return _objectSpread$8(_objectSpread$8({}, state), {}, {
|
|
9029
9026
|
isFocused: true
|
|
9030
9027
|
});
|
|
9031
9028
|
|
|
9032
9029
|
case "blur":
|
|
9033
|
-
return _objectSpread$
|
|
9030
|
+
return _objectSpread$8(_objectSpread$8({}, state), {}, {
|
|
9034
9031
|
isFocused: false
|
|
9035
9032
|
});
|
|
9036
9033
|
|
|
9037
9034
|
case "openDialog":
|
|
9038
|
-
return _objectSpread$
|
|
9035
|
+
return _objectSpread$8(_objectSpread$8({}, initialState), {}, {
|
|
9039
9036
|
isFileDialogActive: true
|
|
9040
9037
|
});
|
|
9041
9038
|
|
|
9042
9039
|
case "closeDialog":
|
|
9043
|
-
return _objectSpread$
|
|
9040
|
+
return _objectSpread$8(_objectSpread$8({}, state), {}, {
|
|
9044
9041
|
isFileDialogActive: false
|
|
9045
9042
|
});
|
|
9046
9043
|
|
|
9047
9044
|
case "setDraggedFiles":
|
|
9048
|
-
return _objectSpread$
|
|
9045
|
+
return _objectSpread$8(_objectSpread$8({}, state), {}, {
|
|
9049
9046
|
isDragActive: action.isDragActive,
|
|
9050
9047
|
isDragAccept: action.isDragAccept,
|
|
9051
9048
|
isDragReject: action.isDragReject
|
|
9052
9049
|
});
|
|
9053
9050
|
|
|
9054
9051
|
case "setFiles":
|
|
9055
|
-
return _objectSpread$
|
|
9052
|
+
return _objectSpread$8(_objectSpread$8({}, state), {}, {
|
|
9056
9053
|
acceptedFiles: action.acceptedFiles,
|
|
9057
9054
|
fileRejections: action.fileRejections
|
|
9058
9055
|
});
|
|
9059
9056
|
|
|
9060
9057
|
case "reset":
|
|
9061
|
-
return _objectSpread$
|
|
9058
|
+
return _objectSpread$8({}, initialState);
|
|
9062
9059
|
|
|
9063
9060
|
default:
|
|
9064
9061
|
return state;
|
|
9065
9062
|
}
|
|
9066
9063
|
}
|
|
9067
9064
|
|
|
9068
|
-
function noop$
|
|
9065
|
+
function noop$2() {}
|
|
9069
9066
|
|
|
9070
9067
|
const Uploader = _ref => {
|
|
9071
9068
|
let sampleFileUrl = _ref.sampleFileUrl,
|
|
@@ -9380,19 +9377,243 @@ const QUERY_KEYS = {
|
|
|
9380
9377
|
PERMISSIONS: "permissions"
|
|
9381
9378
|
};
|
|
9382
9379
|
|
|
9383
|
-
function ownKeys$
|
|
9380
|
+
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9384
9381
|
|
|
9385
|
-
function _objectSpread$
|
|
9382
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty__default$1["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9386
9383
|
|
|
9387
9384
|
const useFetchPermissions = function () {
|
|
9388
9385
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9389
|
-
return useQuery(QUERY_KEYS.PERMISSIONS, permissionsApi.fetch, _objectSpread$
|
|
9386
|
+
return useQuery(QUERY_KEYS.PERMISSIONS, permissionsApi.fetch, _objectSpread$7({
|
|
9390
9387
|
staleTime: DEFAULT_STALE_TIME,
|
|
9391
9388
|
select: response => response.permissions || response.data.permissions,
|
|
9392
9389
|
enabled: hasPermission(MANAGE_MEMBER_PERMISSIONS)
|
|
9393
9390
|
}, options));
|
|
9394
9391
|
};
|
|
9395
9392
|
|
|
9393
|
+
function _arrayWithHoles$1(arr) {
|
|
9394
|
+
if (Array.isArray(arr)) return arr;
|
|
9395
|
+
}
|
|
9396
|
+
|
|
9397
|
+
function _iterableToArrayLimit$1(arr, i) {
|
|
9398
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
9399
|
+
|
|
9400
|
+
if (_i == null) return;
|
|
9401
|
+
var _arr = [];
|
|
9402
|
+
var _n = true;
|
|
9403
|
+
var _d = false;
|
|
9404
|
+
|
|
9405
|
+
var _s, _e;
|
|
9406
|
+
|
|
9407
|
+
try {
|
|
9408
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
9409
|
+
_arr.push(_s.value);
|
|
9410
|
+
|
|
9411
|
+
if (i && _arr.length === i) break;
|
|
9412
|
+
}
|
|
9413
|
+
} catch (err) {
|
|
9414
|
+
_d = true;
|
|
9415
|
+
_e = err;
|
|
9416
|
+
} finally {
|
|
9417
|
+
try {
|
|
9418
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
9419
|
+
} finally {
|
|
9420
|
+
if (_d) throw _e;
|
|
9421
|
+
}
|
|
9422
|
+
}
|
|
9423
|
+
|
|
9424
|
+
return _arr;
|
|
9425
|
+
}
|
|
9426
|
+
|
|
9427
|
+
function _arrayLikeToArray$1(arr, len) {
|
|
9428
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
9429
|
+
|
|
9430
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
9431
|
+
arr2[i] = arr[i];
|
|
9432
|
+
}
|
|
9433
|
+
|
|
9434
|
+
return arr2;
|
|
9435
|
+
}
|
|
9436
|
+
|
|
9437
|
+
function _unsupportedIterableToArray$1(o, minLen) {
|
|
9438
|
+
if (!o) return;
|
|
9439
|
+
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
|
9440
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9441
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9442
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
9443
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
|
9444
|
+
}
|
|
9445
|
+
|
|
9446
|
+
function _nonIterableRest$1() {
|
|
9447
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
9448
|
+
}
|
|
9449
|
+
|
|
9450
|
+
function _slicedToArray$1(arr, i) {
|
|
9451
|
+
return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
|
|
9452
|
+
}
|
|
9453
|
+
|
|
9454
|
+
function _typeof$1(obj) {
|
|
9455
|
+
"@babel/helpers - typeof";
|
|
9456
|
+
|
|
9457
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
9458
|
+
return typeof obj;
|
|
9459
|
+
} : function (obj) {
|
|
9460
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
9461
|
+
}, _typeof$1(obj);
|
|
9462
|
+
}
|
|
9463
|
+
var matches = ramda.curry(function (pattern, object) {
|
|
9464
|
+
var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
|
|
9465
|
+
|
|
9466
|
+
if (object === pattern) return true;
|
|
9467
|
+
if (typeof pattern === "function" && pattern(object, __parent)) return true;
|
|
9468
|
+
if (ramda.isNil(pattern) || ramda.isNil(object)) return false;
|
|
9469
|
+
if (_typeof$1(pattern) !== "object") return false;
|
|
9470
|
+
return Object.entries(pattern).every(function (_ref5) {
|
|
9471
|
+
var _ref6 = _slicedToArray$1(_ref5, 2),
|
|
9472
|
+
key = _ref6[0],
|
|
9473
|
+
value = _ref6[1];
|
|
9474
|
+
|
|
9475
|
+
return matches(value, object[key], __parent);
|
|
9476
|
+
});
|
|
9477
|
+
});
|
|
9478
|
+
|
|
9479
|
+
function _defineProperty(obj, key, value) {
|
|
9480
|
+
if (key in obj) {
|
|
9481
|
+
Object.defineProperty(obj, key, {
|
|
9482
|
+
value: value,
|
|
9483
|
+
enumerable: true,
|
|
9484
|
+
configurable: true,
|
|
9485
|
+
writable: true
|
|
9486
|
+
});
|
|
9487
|
+
} else {
|
|
9488
|
+
obj[key] = value;
|
|
9489
|
+
}
|
|
9490
|
+
|
|
9491
|
+
return obj;
|
|
9492
|
+
}
|
|
9493
|
+
|
|
9494
|
+
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; }
|
|
9495
|
+
|
|
9496
|
+
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; }
|
|
9497
|
+
ramda.curry(function (id, array) {
|
|
9498
|
+
return array.filter(function (item) {
|
|
9499
|
+
return item.id !== id;
|
|
9500
|
+
});
|
|
9501
|
+
});
|
|
9502
|
+
ramda.curry(function (id, array) {
|
|
9503
|
+
return array.find(function (item) {
|
|
9504
|
+
return item.id === id;
|
|
9505
|
+
});
|
|
9506
|
+
});
|
|
9507
|
+
ramda.curry(function (id, newItem, array) {
|
|
9508
|
+
return array.map(function (item) {
|
|
9509
|
+
return item.id === id ? newItem : item;
|
|
9510
|
+
});
|
|
9511
|
+
});
|
|
9512
|
+
ramda.curry(function (id, modifier, array) {
|
|
9513
|
+
return array.map(function (item) {
|
|
9514
|
+
return item.id === id ? modifier(item) : item;
|
|
9515
|
+
});
|
|
9516
|
+
});
|
|
9517
|
+
ramda.curry(function (pattern, array) {
|
|
9518
|
+
return array.find(matches(pattern));
|
|
9519
|
+
});
|
|
9520
|
+
ramda.curry(function (pattern, array) {
|
|
9521
|
+
return array.filter(ramda.complement(matches(pattern)));
|
|
9522
|
+
});
|
|
9523
|
+
ramda.curry(function (pattern, newItem, array) {
|
|
9524
|
+
return array.map(function (item) {
|
|
9525
|
+
return matches(pattern, item) ? newItem : item;
|
|
9526
|
+
});
|
|
9527
|
+
});
|
|
9528
|
+
ramda.curry(function (pattern, modifier, array) {
|
|
9529
|
+
return array.map(function (item) {
|
|
9530
|
+
return matches(pattern, item) ? modifier(item) : item;
|
|
9531
|
+
});
|
|
9532
|
+
});
|
|
9533
|
+
ramda.curry(function (id, array) {
|
|
9534
|
+
return array.some(function (item) {
|
|
9535
|
+
return item.id === id;
|
|
9536
|
+
});
|
|
9537
|
+
});
|
|
9538
|
+
ramda.curry(function (pattern, array) {
|
|
9539
|
+
return array.some(matches(pattern));
|
|
9540
|
+
});
|
|
9541
|
+
ramda.curry(function (pattern, array) {
|
|
9542
|
+
return ramda.findLast(matches(pattern), array);
|
|
9543
|
+
});
|
|
9544
|
+
ramda.curry(function (id, array) {
|
|
9545
|
+
return array.findIndex(function (item) {
|
|
9546
|
+
return item.id === id;
|
|
9547
|
+
});
|
|
9548
|
+
});
|
|
9549
|
+
ramda.curry(function (pattern, array) {
|
|
9550
|
+
return array.findIndex(matches(pattern));
|
|
9551
|
+
});
|
|
9552
|
+
ramda.curry(function (pattern, array) {
|
|
9553
|
+
return ramda.findLastIndex(matches(pattern), array);
|
|
9554
|
+
});
|
|
9555
|
+
ramda.curry(function (pattern, array) {
|
|
9556
|
+
return array.filter(matches(pattern));
|
|
9557
|
+
});
|
|
9558
|
+
ramda.curry(function (pattern, array) {
|
|
9559
|
+
return ramda.count(matches(pattern), array);
|
|
9560
|
+
});
|
|
9561
|
+
ramda.curry(function (keyMap, objectArray) {
|
|
9562
|
+
return objectArray.map(function (object) {
|
|
9563
|
+
var shallowCopy = _objectSpread$6({}, object);
|
|
9564
|
+
|
|
9565
|
+
for (var source in keyMap) {
|
|
9566
|
+
shallowCopy[keyMap[source]] = object[source];
|
|
9567
|
+
}
|
|
9568
|
+
|
|
9569
|
+
return shallowCopy;
|
|
9570
|
+
});
|
|
9571
|
+
});
|
|
9572
|
+
ramda.curry(function (keyMap, objectArray) {
|
|
9573
|
+
return objectArray.map(function (object) {
|
|
9574
|
+
var shallowCopy = _objectSpread$6({}, object);
|
|
9575
|
+
|
|
9576
|
+
for (var source in keyMap) {
|
|
9577
|
+
shallowCopy[keyMap[source]] = object[source];
|
|
9578
|
+
delete shallowCopy[source];
|
|
9579
|
+
}
|
|
9580
|
+
|
|
9581
|
+
return shallowCopy;
|
|
9582
|
+
});
|
|
9583
|
+
});
|
|
9584
|
+
ramda.curry(function (keyMap, objectArray) {
|
|
9585
|
+
var copyKeysSingleObject = function copyKeysSingleObject(object, keyMap) {
|
|
9586
|
+
var root = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
|
|
9587
|
+
return _objectSpread$6(_objectSpread$6({}, object), ramda.fromPairs(ramda.toPairs(keyMap).map(function (_ref) {
|
|
9588
|
+
var _ref2 = _slicedToArray$1(_ref, 2),
|
|
9589
|
+
destination = _ref2[0],
|
|
9590
|
+
source = _ref2[1];
|
|
9591
|
+
|
|
9592
|
+
if (typeof source === "function") {
|
|
9593
|
+
return [destination, source(object[destination], root)];
|
|
9594
|
+
} else if (Array.isArray(source)) {
|
|
9595
|
+
return [destination, ramda.path(source, root)];
|
|
9596
|
+
} else if (_typeof$1(source) === "object") {
|
|
9597
|
+
return [destination, copyKeysSingleObject(object[destination], source, root)];
|
|
9598
|
+
}
|
|
9599
|
+
|
|
9600
|
+
return [destination, object[source]];
|
|
9601
|
+
})));
|
|
9602
|
+
};
|
|
9603
|
+
|
|
9604
|
+
return objectArray.map(function (object) {
|
|
9605
|
+
return copyKeysSingleObject(object, keyMap);
|
|
9606
|
+
});
|
|
9607
|
+
});
|
|
9608
|
+
|
|
9609
|
+
var noop$1 = function noop() {};
|
|
9610
|
+
ramda.complement(ramda.isNil);
|
|
9611
|
+
ramda.complement(ramda.isEmpty);
|
|
9612
|
+
ramda.curry(function (x, y) {
|
|
9613
|
+
return x !== y;
|
|
9614
|
+
});
|
|
9615
|
+
ramda.complement(ramda.equals);
|
|
9616
|
+
|
|
9396
9617
|
const fetch$1 = () => axios__default["default"].get("".concat(BASE_URL, "/organization_roles"));
|
|
9397
9618
|
|
|
9398
9619
|
const create$1 = payload => axios__default["default"].post("".concat(BASE_URL, "/organization_roles"), payload);
|
|
@@ -9472,7 +9693,7 @@ const useUpdateRole = _ref2 => {
|
|
|
9472
9693
|
|
|
9473
9694
|
const useDestroyRole = _ref4 => {
|
|
9474
9695
|
let _ref4$onSuccess = _ref4.onSuccess,
|
|
9475
|
-
onSuccess = _ref4$onSuccess === void 0 ?
|
|
9696
|
+
onSuccess = _ref4$onSuccess === void 0 ? noop$1 : _ref4$onSuccess,
|
|
9476
9697
|
options = _objectWithoutProperties__default["default"](_ref4, _excluded3);
|
|
9477
9698
|
|
|
9478
9699
|
return useMutation(_ref5 => {
|
|
@@ -10938,9 +11159,9 @@ const ADD_ROLE_FORM_INITIAL_VALUES = {
|
|
|
10938
11159
|
description: "",
|
|
10939
11160
|
permissionIds: []
|
|
10940
11161
|
};
|
|
10941
|
-
const ADD_ROLE_FORM_VALIDATION_SCHEMA =
|
|
10942
|
-
name:
|
|
10943
|
-
description:
|
|
11162
|
+
const ADD_ROLE_FORM_VALIDATION_SCHEMA = Yup.object({
|
|
11163
|
+
name: Yup.string().trim().required(instance.t("validations.enterRoleName")),
|
|
11164
|
+
description: Yup.string().trim().max(255, instance.t("validations.limitExceeded", {
|
|
10944
11165
|
what: instance.t("common.description"),
|
|
10945
11166
|
count: 255
|
|
10946
11167
|
}))
|
|
@@ -11711,6 +11932,493 @@ Roles.defaultProps = {
|
|
|
11711
11932
|
};
|
|
11712
11933
|
var index$1 = withReactQuery(Roles);
|
|
11713
11934
|
|
|
11935
|
+
react.Honeybadger.beforeNotify(function (notice) {
|
|
11936
|
+
return !/ResizeObserver/.test(notice.message);
|
|
11937
|
+
});
|
|
11938
|
+
react.Honeybadger.configure({
|
|
11939
|
+
apiKey: globalProps.honeybadgerApiKey,
|
|
11940
|
+
environment: globalProps.nodeEnv,
|
|
11941
|
+
revision: globalProps.honeybadgerRevision,
|
|
11942
|
+
developmentEnvironments: ["development", "test"],
|
|
11943
|
+
enableUncaught: true,
|
|
11944
|
+
async: true,
|
|
11945
|
+
breadcrumbsEnabled: true,
|
|
11946
|
+
projectRoot: "webpack:///./"
|
|
11947
|
+
});
|
|
11948
|
+
|
|
11949
|
+
function _arrayWithHoles(arr) {
|
|
11950
|
+
if (Array.isArray(arr)) return arr;
|
|
11951
|
+
}
|
|
11952
|
+
|
|
11953
|
+
function _iterableToArrayLimit(arr, i) {
|
|
11954
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
11955
|
+
|
|
11956
|
+
if (_i == null) return;
|
|
11957
|
+
var _arr = [];
|
|
11958
|
+
var _n = true;
|
|
11959
|
+
var _d = false;
|
|
11960
|
+
|
|
11961
|
+
var _s, _e;
|
|
11962
|
+
|
|
11963
|
+
try {
|
|
11964
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
11965
|
+
_arr.push(_s.value);
|
|
11966
|
+
|
|
11967
|
+
if (i && _arr.length === i) break;
|
|
11968
|
+
}
|
|
11969
|
+
} catch (err) {
|
|
11970
|
+
_d = true;
|
|
11971
|
+
_e = err;
|
|
11972
|
+
} finally {
|
|
11973
|
+
try {
|
|
11974
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
11975
|
+
} finally {
|
|
11976
|
+
if (_d) throw _e;
|
|
11977
|
+
}
|
|
11978
|
+
}
|
|
11979
|
+
|
|
11980
|
+
return _arr;
|
|
11981
|
+
}
|
|
11982
|
+
|
|
11983
|
+
function _arrayLikeToArray(arr, len) {
|
|
11984
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
11985
|
+
|
|
11986
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
11987
|
+
arr2[i] = arr[i];
|
|
11988
|
+
}
|
|
11989
|
+
|
|
11990
|
+
return arr2;
|
|
11991
|
+
}
|
|
11992
|
+
|
|
11993
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
11994
|
+
if (!o) return;
|
|
11995
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
11996
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
11997
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
11998
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
11999
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
12000
|
+
}
|
|
12001
|
+
|
|
12002
|
+
function _nonIterableRest() {
|
|
12003
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
12004
|
+
}
|
|
12005
|
+
|
|
12006
|
+
function _slicedToArray(arr, i) {
|
|
12007
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
12008
|
+
}
|
|
12009
|
+
|
|
12010
|
+
function useDebounce(value) {
|
|
12011
|
+
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
12012
|
+
|
|
12013
|
+
var _useState = React.useState(value),
|
|
12014
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12015
|
+
debouncedValue = _useState2[0],
|
|
12016
|
+
setDebouncedValue = _useState2[1];
|
|
12017
|
+
|
|
12018
|
+
React.useEffect(function () {
|
|
12019
|
+
var handler = setTimeout(function () {
|
|
12020
|
+
setDebouncedValue(value);
|
|
12021
|
+
}, delay);
|
|
12022
|
+
return function () {
|
|
12023
|
+
clearTimeout(handler);
|
|
12024
|
+
};
|
|
12025
|
+
}, [value]);
|
|
12026
|
+
return debouncedValue;
|
|
12027
|
+
}
|
|
12028
|
+
|
|
12029
|
+
var regeneratorRuntime$1 = {exports: {}};
|
|
12030
|
+
|
|
12031
|
+
var _typeof = {exports: {}};
|
|
12032
|
+
|
|
12033
|
+
(function (module) {
|
|
12034
|
+
function _typeof(obj) {
|
|
12035
|
+
"@babel/helpers - typeof";
|
|
12036
|
+
|
|
12037
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
12038
|
+
return typeof obj;
|
|
12039
|
+
} : function (obj) {
|
|
12040
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
12041
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
12042
|
+
}
|
|
12043
|
+
|
|
12044
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
12045
|
+
} (_typeof));
|
|
12046
|
+
|
|
12047
|
+
(function (module) {
|
|
12048
|
+
var _typeof$1 = _typeof.exports["default"];
|
|
12049
|
+
|
|
12050
|
+
function _regeneratorRuntime() {
|
|
12051
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
12052
|
+
|
|
12053
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
12054
|
+
return exports;
|
|
12055
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
12056
|
+
var exports = {},
|
|
12057
|
+
Op = Object.prototype,
|
|
12058
|
+
hasOwn = Op.hasOwnProperty,
|
|
12059
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
12060
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
12061
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
12062
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
12063
|
+
|
|
12064
|
+
function define(obj, key, value) {
|
|
12065
|
+
return Object.defineProperty(obj, key, {
|
|
12066
|
+
value: value,
|
|
12067
|
+
enumerable: !0,
|
|
12068
|
+
configurable: !0,
|
|
12069
|
+
writable: !0
|
|
12070
|
+
}), obj[key];
|
|
12071
|
+
}
|
|
12072
|
+
|
|
12073
|
+
try {
|
|
12074
|
+
define({}, "");
|
|
12075
|
+
} catch (err) {
|
|
12076
|
+
define = function define(obj, key, value) {
|
|
12077
|
+
return obj[key] = value;
|
|
12078
|
+
};
|
|
12079
|
+
}
|
|
12080
|
+
|
|
12081
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
12082
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
12083
|
+
generator = Object.create(protoGenerator.prototype),
|
|
12084
|
+
context = new Context(tryLocsList || []);
|
|
12085
|
+
return generator._invoke = function (innerFn, self, context) {
|
|
12086
|
+
var state = "suspendedStart";
|
|
12087
|
+
return function (method, arg) {
|
|
12088
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
12089
|
+
|
|
12090
|
+
if ("completed" === state) {
|
|
12091
|
+
if ("throw" === method) throw arg;
|
|
12092
|
+
return doneResult();
|
|
12093
|
+
}
|
|
12094
|
+
|
|
12095
|
+
for (context.method = method, context.arg = arg;;) {
|
|
12096
|
+
var delegate = context.delegate;
|
|
12097
|
+
|
|
12098
|
+
if (delegate) {
|
|
12099
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
12100
|
+
|
|
12101
|
+
if (delegateResult) {
|
|
12102
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
12103
|
+
return delegateResult;
|
|
12104
|
+
}
|
|
12105
|
+
}
|
|
12106
|
+
|
|
12107
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
12108
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
12109
|
+
context.dispatchException(context.arg);
|
|
12110
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
12111
|
+
state = "executing";
|
|
12112
|
+
var record = tryCatch(innerFn, self, context);
|
|
12113
|
+
|
|
12114
|
+
if ("normal" === record.type) {
|
|
12115
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
12116
|
+
return {
|
|
12117
|
+
value: record.arg,
|
|
12118
|
+
done: context.done
|
|
12119
|
+
};
|
|
12120
|
+
}
|
|
12121
|
+
|
|
12122
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
12123
|
+
}
|
|
12124
|
+
};
|
|
12125
|
+
}(innerFn, self, context), generator;
|
|
12126
|
+
}
|
|
12127
|
+
|
|
12128
|
+
function tryCatch(fn, obj, arg) {
|
|
12129
|
+
try {
|
|
12130
|
+
return {
|
|
12131
|
+
type: "normal",
|
|
12132
|
+
arg: fn.call(obj, arg)
|
|
12133
|
+
};
|
|
12134
|
+
} catch (err) {
|
|
12135
|
+
return {
|
|
12136
|
+
type: "throw",
|
|
12137
|
+
arg: err
|
|
12138
|
+
};
|
|
12139
|
+
}
|
|
12140
|
+
}
|
|
12141
|
+
|
|
12142
|
+
exports.wrap = wrap;
|
|
12143
|
+
var ContinueSentinel = {};
|
|
12144
|
+
|
|
12145
|
+
function Generator() {}
|
|
12146
|
+
|
|
12147
|
+
function GeneratorFunction() {}
|
|
12148
|
+
|
|
12149
|
+
function GeneratorFunctionPrototype() {}
|
|
12150
|
+
|
|
12151
|
+
var IteratorPrototype = {};
|
|
12152
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
12153
|
+
return this;
|
|
12154
|
+
});
|
|
12155
|
+
var getProto = Object.getPrototypeOf,
|
|
12156
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
12157
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
12158
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
12159
|
+
|
|
12160
|
+
function defineIteratorMethods(prototype) {
|
|
12161
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
12162
|
+
define(prototype, method, function (arg) {
|
|
12163
|
+
return this._invoke(method, arg);
|
|
12164
|
+
});
|
|
12165
|
+
});
|
|
12166
|
+
}
|
|
12167
|
+
|
|
12168
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
12169
|
+
function invoke(method, arg, resolve, reject) {
|
|
12170
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
12171
|
+
|
|
12172
|
+
if ("throw" !== record.type) {
|
|
12173
|
+
var result = record.arg,
|
|
12174
|
+
value = result.value;
|
|
12175
|
+
return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
12176
|
+
invoke("next", value, resolve, reject);
|
|
12177
|
+
}, function (err) {
|
|
12178
|
+
invoke("throw", err, resolve, reject);
|
|
12179
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
12180
|
+
result.value = unwrapped, resolve(result);
|
|
12181
|
+
}, function (error) {
|
|
12182
|
+
return invoke("throw", error, resolve, reject);
|
|
12183
|
+
});
|
|
12184
|
+
}
|
|
12185
|
+
|
|
12186
|
+
reject(record.arg);
|
|
12187
|
+
}
|
|
12188
|
+
|
|
12189
|
+
var previousPromise;
|
|
12190
|
+
|
|
12191
|
+
this._invoke = function (method, arg) {
|
|
12192
|
+
function callInvokeWithMethodAndArg() {
|
|
12193
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
12194
|
+
invoke(method, arg, resolve, reject);
|
|
12195
|
+
});
|
|
12196
|
+
}
|
|
12197
|
+
|
|
12198
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
12199
|
+
};
|
|
12200
|
+
}
|
|
12201
|
+
|
|
12202
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
12203
|
+
var method = delegate.iterator[context.method];
|
|
12204
|
+
|
|
12205
|
+
if (undefined === method) {
|
|
12206
|
+
if (context.delegate = null, "throw" === context.method) {
|
|
12207
|
+
if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
12208
|
+
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
12209
|
+
}
|
|
12210
|
+
|
|
12211
|
+
return ContinueSentinel;
|
|
12212
|
+
}
|
|
12213
|
+
|
|
12214
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
12215
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
12216
|
+
var info = record.arg;
|
|
12217
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
12218
|
+
}
|
|
12219
|
+
|
|
12220
|
+
function pushTryEntry(locs) {
|
|
12221
|
+
var entry = {
|
|
12222
|
+
tryLoc: locs[0]
|
|
12223
|
+
};
|
|
12224
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
12225
|
+
}
|
|
12226
|
+
|
|
12227
|
+
function resetTryEntry(entry) {
|
|
12228
|
+
var record = entry.completion || {};
|
|
12229
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
12230
|
+
}
|
|
12231
|
+
|
|
12232
|
+
function Context(tryLocsList) {
|
|
12233
|
+
this.tryEntries = [{
|
|
12234
|
+
tryLoc: "root"
|
|
12235
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
12236
|
+
}
|
|
12237
|
+
|
|
12238
|
+
function values(iterable) {
|
|
12239
|
+
if (iterable) {
|
|
12240
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
12241
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
12242
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
12243
|
+
|
|
12244
|
+
if (!isNaN(iterable.length)) {
|
|
12245
|
+
var i = -1,
|
|
12246
|
+
next = function next() {
|
|
12247
|
+
for (; ++i < iterable.length;) {
|
|
12248
|
+
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
12249
|
+
}
|
|
12250
|
+
|
|
12251
|
+
return next.value = undefined, next.done = !0, next;
|
|
12252
|
+
};
|
|
12253
|
+
|
|
12254
|
+
return next.next = next;
|
|
12255
|
+
}
|
|
12256
|
+
}
|
|
12257
|
+
|
|
12258
|
+
return {
|
|
12259
|
+
next: doneResult
|
|
12260
|
+
};
|
|
12261
|
+
}
|
|
12262
|
+
|
|
12263
|
+
function doneResult() {
|
|
12264
|
+
return {
|
|
12265
|
+
value: undefined,
|
|
12266
|
+
done: !0
|
|
12267
|
+
};
|
|
12268
|
+
}
|
|
12269
|
+
|
|
12270
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
12271
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
12272
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
12273
|
+
}, exports.mark = function (genFun) {
|
|
12274
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
12275
|
+
}, exports.awrap = function (arg) {
|
|
12276
|
+
return {
|
|
12277
|
+
__await: arg
|
|
12278
|
+
};
|
|
12279
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
12280
|
+
return this;
|
|
12281
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
12282
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
12283
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
12284
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
12285
|
+
return result.done ? result.value : iter.next();
|
|
12286
|
+
});
|
|
12287
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
12288
|
+
return this;
|
|
12289
|
+
}), define(Gp, "toString", function () {
|
|
12290
|
+
return "[object Generator]";
|
|
12291
|
+
}), exports.keys = function (object) {
|
|
12292
|
+
var keys = [];
|
|
12293
|
+
|
|
12294
|
+
for (var key in object) {
|
|
12295
|
+
keys.push(key);
|
|
12296
|
+
}
|
|
12297
|
+
|
|
12298
|
+
return keys.reverse(), function next() {
|
|
12299
|
+
for (; keys.length;) {
|
|
12300
|
+
var key = keys.pop();
|
|
12301
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
12302
|
+
}
|
|
12303
|
+
|
|
12304
|
+
return next.done = !0, next;
|
|
12305
|
+
};
|
|
12306
|
+
}, exports.values = values, Context.prototype = {
|
|
12307
|
+
constructor: Context,
|
|
12308
|
+
reset: function reset(skipTempReset) {
|
|
12309
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
|
|
12310
|
+
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
12311
|
+
}
|
|
12312
|
+
},
|
|
12313
|
+
stop: function stop() {
|
|
12314
|
+
this.done = !0;
|
|
12315
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
12316
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
12317
|
+
return this.rval;
|
|
12318
|
+
},
|
|
12319
|
+
dispatchException: function dispatchException(exception) {
|
|
12320
|
+
if (this.done) throw exception;
|
|
12321
|
+
var context = this;
|
|
12322
|
+
|
|
12323
|
+
function handle(loc, caught) {
|
|
12324
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
12325
|
+
}
|
|
12326
|
+
|
|
12327
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
12328
|
+
var entry = this.tryEntries[i],
|
|
12329
|
+
record = entry.completion;
|
|
12330
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
12331
|
+
|
|
12332
|
+
if (entry.tryLoc <= this.prev) {
|
|
12333
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
12334
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
12335
|
+
|
|
12336
|
+
if (hasCatch && hasFinally) {
|
|
12337
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
12338
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
12339
|
+
} else if (hasCatch) {
|
|
12340
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
12341
|
+
} else {
|
|
12342
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
12343
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
12344
|
+
}
|
|
12345
|
+
}
|
|
12346
|
+
}
|
|
12347
|
+
},
|
|
12348
|
+
abrupt: function abrupt(type, arg) {
|
|
12349
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
12350
|
+
var entry = this.tryEntries[i];
|
|
12351
|
+
|
|
12352
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
12353
|
+
var finallyEntry = entry;
|
|
12354
|
+
break;
|
|
12355
|
+
}
|
|
12356
|
+
}
|
|
12357
|
+
|
|
12358
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
12359
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
12360
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
12361
|
+
},
|
|
12362
|
+
complete: function complete(record, afterLoc) {
|
|
12363
|
+
if ("throw" === record.type) throw record.arg;
|
|
12364
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
12365
|
+
},
|
|
12366
|
+
finish: function finish(finallyLoc) {
|
|
12367
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
12368
|
+
var entry = this.tryEntries[i];
|
|
12369
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
12370
|
+
}
|
|
12371
|
+
},
|
|
12372
|
+
"catch": function _catch(tryLoc) {
|
|
12373
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
12374
|
+
var entry = this.tryEntries[i];
|
|
12375
|
+
|
|
12376
|
+
if (entry.tryLoc === tryLoc) {
|
|
12377
|
+
var record = entry.completion;
|
|
12378
|
+
|
|
12379
|
+
if ("throw" === record.type) {
|
|
12380
|
+
var thrown = record.arg;
|
|
12381
|
+
resetTryEntry(entry);
|
|
12382
|
+
}
|
|
12383
|
+
|
|
12384
|
+
return thrown;
|
|
12385
|
+
}
|
|
12386
|
+
}
|
|
12387
|
+
|
|
12388
|
+
throw new Error("illegal catch attempt");
|
|
12389
|
+
},
|
|
12390
|
+
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
12391
|
+
return this.delegate = {
|
|
12392
|
+
iterator: values(iterable),
|
|
12393
|
+
resultName: resultName,
|
|
12394
|
+
nextLoc: nextLoc
|
|
12395
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
12396
|
+
}
|
|
12397
|
+
}, exports;
|
|
12398
|
+
}
|
|
12399
|
+
|
|
12400
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
12401
|
+
} (regeneratorRuntime$1));
|
|
12402
|
+
|
|
12403
|
+
// TODO(Babel 8): Remove this file.
|
|
12404
|
+
|
|
12405
|
+
var runtime = regeneratorRuntime$1.exports();
|
|
12406
|
+
|
|
12407
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
12408
|
+
try {
|
|
12409
|
+
regeneratorRuntime = runtime;
|
|
12410
|
+
} catch (accidentalStrictMode) {
|
|
12411
|
+
if (typeof globalThis === "object") {
|
|
12412
|
+
globalThis.regeneratorRuntime = runtime;
|
|
12413
|
+
} else {
|
|
12414
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
12415
|
+
}
|
|
12416
|
+
}
|
|
12417
|
+
Yup__namespace.object().shape({
|
|
12418
|
+
email: Yup__namespace.string().email("Please enter a valid email").required("Email is required"),
|
|
12419
|
+
password: Yup__namespace.string().required("Password is required")
|
|
12420
|
+
});
|
|
12421
|
+
|
|
11714
12422
|
const fetch = params => axios__default["default"].get("".concat(BASE_URL, "/teams"), {
|
|
11715
12423
|
params
|
|
11716
12424
|
});
|
|
@@ -11737,7 +12445,8 @@ const useFetchMembers = function () {
|
|
|
11737
12445
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11738
12446
|
return useQuery([QUERY_KEYS.TEAMS, params], () => teamsApi.fetch(params), _objectSpread$2({
|
|
11739
12447
|
staleTime: DEFAULT_STALE_TIME,
|
|
11740
|
-
select: response => response.data || response
|
|
12448
|
+
select: response => response.data || response,
|
|
12449
|
+
keepPreviousData: true
|
|
11741
12450
|
}, options));
|
|
11742
12451
|
};
|
|
11743
12452
|
|
|
@@ -12007,9 +12716,9 @@ const renderPaginationProps = size => ({
|
|
|
12007
12716
|
});
|
|
12008
12717
|
const getPerCategoryCount = (perCategoryCount, category) => ramda.isNil(perCategoryCount) ? MEMBER_FILTER[category].defaultCount : perCategoryCount[category === null || category === void 0 ? void 0 : category.toLowerCase()];
|
|
12009
12718
|
|
|
12010
|
-
const VALIDATION_SCHEMA =
|
|
12011
|
-
emails:
|
|
12012
|
-
role:
|
|
12719
|
+
const VALIDATION_SCHEMA = Yup__namespace.object().shape({
|
|
12720
|
+
emails: Yup__namespace.array().min(1, instance.t("validations.minOneEmail")).test("are-all-emails-valid", instance.t("validations.validEmail"), emails => emails.every(ramda.prop("valid"))).nullable(),
|
|
12721
|
+
role: Yup__namespace.string().required(instance.t("validations.roleRequired"))
|
|
12013
12722
|
});
|
|
12014
12723
|
const FILTER_INVALID_EMAILS = {
|
|
12015
12724
|
label: instance.t("validations.filterInvalidEmails")
|
|
@@ -12196,14 +12905,15 @@ const TeamMembers = _ref => {
|
|
|
12196
12905
|
selectedMember = _useState6[0],
|
|
12197
12906
|
setSelectedMember = _useState6[1];
|
|
12198
12907
|
|
|
12199
|
-
const debouncedSearch =
|
|
12908
|
+
const debouncedSearch = useDebounce(filters.search, 750);
|
|
12200
12909
|
|
|
12201
12910
|
const _useFetchMembers = useFetchMembers(_objectSpread(_objectSpread({}, filters), {}, {
|
|
12202
12911
|
search: debouncedSearch.trim(),
|
|
12203
12912
|
category: filters.category.toLowerCase()
|
|
12204
12913
|
})),
|
|
12205
12914
|
team = _useFetchMembers.data,
|
|
12206
|
-
isMembersLoading = _useFetchMembers.isLoading
|
|
12915
|
+
isMembersLoading = _useFetchMembers.isLoading,
|
|
12916
|
+
isMembersFetching = _useFetchMembers.isFetching;
|
|
12207
12917
|
|
|
12208
12918
|
const _useFetchRoles = useFetchRoles({
|
|
12209
12919
|
select: response => {
|
|
@@ -12271,14 +12981,14 @@ const TeamMembers = _ref => {
|
|
|
12271
12981
|
handlePageChange(setFilters, filter)(DEFAULT_PAGE_NUMBER, filters.results);
|
|
12272
12982
|
};
|
|
12273
12983
|
|
|
12274
|
-
const handleTableChange = (
|
|
12984
|
+
const handleTableChange = (_, __, sorter) => {
|
|
12275
12985
|
setFilters(ramda.mergeLeft({
|
|
12276
12986
|
sort_by: sorter.field,
|
|
12277
12987
|
sort_direction: sorter.order
|
|
12278
12988
|
}));
|
|
12279
12989
|
};
|
|
12280
12990
|
|
|
12281
|
-
if (isRolesLoading) {
|
|
12991
|
+
if (isRolesLoading || isMembersLoading) {
|
|
12282
12992
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
12283
12993
|
className: "ntm-members-page-loader"
|
|
12284
12994
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.PageLoader, null));
|
|
@@ -12319,7 +13029,7 @@ const TeamMembers = _ref => {
|
|
|
12319
13029
|
totalCount: team === null || team === void 0 ? void 0 : team.membersCount,
|
|
12320
13030
|
allowRowClick: false,
|
|
12321
13031
|
rowSelection: false,
|
|
12322
|
-
loading:
|
|
13032
|
+
loading: isMembersFetching,
|
|
12323
13033
|
defaultPageSize: parseInt(filters.results, DEFAULT_RADIX),
|
|
12324
13034
|
rowData: team === null || team === void 0 ? void 0 : team.members,
|
|
12325
13035
|
columnData: getColumnData({
|
|
@@ -12327,7 +13037,7 @@ const TeamMembers = _ref => {
|
|
|
12327
13037
|
handleUpdateStatus,
|
|
12328
13038
|
handleUpdateRole
|
|
12329
13039
|
}),
|
|
12330
|
-
onChange: (
|
|
13040
|
+
onChange: (_, __, sorter) => handleTableChange(_, __, sorter),
|
|
12331
13041
|
currentPageNumber: parseInt(filters.page, DEFAULT_RADIX),
|
|
12332
13042
|
paginationProps: renderPaginationProps(filters.results),
|
|
12333
13043
|
handlePageChange: handlePageChange(setFilters, filters.category)
|