@tracktor/shared-module 0.15.10 → 0.15.11
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/CHANGELOG.md +2 -4
- package/dist/components/Utils/SentryConfig.d.ts +4 -0
- package/dist/main.js +92 -92
- package/dist/main.umd.cjs +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
# [Versions](https://github.com/Tracktor/shared-module/releases)
|
|
2
2
|
|
|
3
|
-
## v0.15.
|
|
4
|
-
- **[fix]** : `
|
|
5
|
-
- **[feat]** : `SentryConfig` improvement
|
|
6
|
-
- **[feat]** : `AxiosConfig` improvement
|
|
3
|
+
## v0.15.11
|
|
4
|
+
- **[fix]** : `SentryConfig` initialization
|
|
@@ -48,6 +48,10 @@ interface SentryConfigProps<T> {
|
|
|
48
48
|
* This function is used to instrument React Router v6.
|
|
49
49
|
*/
|
|
50
50
|
reactRouterV6Instrumentation: any;
|
|
51
|
+
/**
|
|
52
|
+
* Returns true if the SDK is already initialized.
|
|
53
|
+
*/
|
|
54
|
+
isInitialized: () => boolean;
|
|
51
55
|
};
|
|
52
56
|
/**
|
|
53
57
|
* Sentry DSN
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Le, { createContext as vr, useMemo as se, useContext as ue, useState as pr, useRef as gr, useLayoutEffect as mr, Suspense as hr, useEffect as Er, useCallback as X } from "react";
|
|
2
2
|
var ie = { exports: {} }, W = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
@@ -14,7 +14,7 @@ function yr() {
|
|
|
14
14
|
if ($e)
|
|
15
15
|
return W;
|
|
16
16
|
$e = 1;
|
|
17
|
-
var n =
|
|
17
|
+
var n = Le, o = Symbol.for("react.element"), s = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, a = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
18
|
function u(g, c, b) {
|
|
19
19
|
var h, C = {}, O = null, T = null;
|
|
20
20
|
b !== void 0 && (O = "" + b), c.key !== void 0 && (O = "" + c.key), c.ref !== void 0 && (T = c.ref);
|
|
@@ -23,7 +23,7 @@ function yr() {
|
|
|
23
23
|
if (g && g.defaultProps)
|
|
24
24
|
for (h in c = g.defaultProps, c)
|
|
25
25
|
C[h] === void 0 && (C[h] = c[h]);
|
|
26
|
-
return { $$typeof:
|
|
26
|
+
return { $$typeof: o, type: g, key: O, ref: T, props: C, _owner: a.current };
|
|
27
27
|
}
|
|
28
28
|
return W.Fragment = s, W.jsx = u, W.jsxs = u, W;
|
|
29
29
|
}
|
|
@@ -37,10 +37,10 @@ var M = {};
|
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
|
-
var
|
|
40
|
+
var Ie;
|
|
41
41
|
function Rr() {
|
|
42
|
-
return
|
|
43
|
-
var n =
|
|
42
|
+
return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
+
var n = Le, o = Symbol.for("react.element"), s = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), g = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), A = Symbol.iterator, D = "@@iterator";
|
|
44
44
|
function V(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
@@ -50,14 +50,14 @@ function Rr() {
|
|
|
50
50
|
var j = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
51
|
function R(e) {
|
|
52
52
|
{
|
|
53
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0),
|
|
54
|
-
t[
|
|
53
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
54
|
+
t[i - 1] = arguments[i];
|
|
55
55
|
_("error", e, t);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
function _(e, r, t) {
|
|
59
59
|
{
|
|
60
|
-
var
|
|
60
|
+
var i = j.ReactDebugCurrentFrame, p = i.getStackAddendum();
|
|
61
61
|
p !== "" && (r += "%s", t = t.concat([p]));
|
|
62
62
|
var m = t.map(function(d) {
|
|
63
63
|
return String(d);
|
|
@@ -75,9 +75,9 @@ function Rr() {
|
|
|
75
75
|
e.$$typeof === fe || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
77
|
function Ve(e, r, t) {
|
|
78
|
-
var
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
78
|
+
var i = e.displayName;
|
|
79
|
+
if (i)
|
|
80
|
+
return i;
|
|
81
81
|
var p = r.displayName || r.name || "";
|
|
82
82
|
return p !== "" ? t + "(" + p + ")" : t;
|
|
83
83
|
}
|
|
@@ -116,8 +116,8 @@ function Rr() {
|
|
|
116
116
|
case c:
|
|
117
117
|
return Ve(e, e.render, "ForwardRef");
|
|
118
118
|
case C:
|
|
119
|
-
var
|
|
120
|
-
return
|
|
119
|
+
var i = e.displayName || null;
|
|
120
|
+
return i !== null ? i : P(e.type) || "Memo";
|
|
121
121
|
case O: {
|
|
122
122
|
var p = e, m = p._payload, d = p._init;
|
|
123
123
|
try {
|
|
@@ -129,13 +129,13 @@ function Rr() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var F = Object.assign,
|
|
132
|
+
var F = Object.assign, L = 0, ve, pe, ge, me, he, Ee, ye;
|
|
133
133
|
function Re() {
|
|
134
134
|
}
|
|
135
135
|
Re.__reactDisabledLog = !0;
|
|
136
136
|
function Ye() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
138
|
+
if (L === 0) {
|
|
139
139
|
ve = console.log, pe = console.info, ge = console.warn, me = console.error, he = console.group, Ee = console.groupCollapsed, ye = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
@@ -153,12 +153,12 @@ function Rr() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
L++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
function qe() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (L--, L === 0) {
|
|
162
162
|
var e = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
@@ -188,7 +188,7 @@ function Rr() {
|
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
L < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
var K = j.ReactCurrentDispatcher, Z;
|
|
@@ -198,8 +198,8 @@ function Rr() {
|
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
200
|
} catch (p) {
|
|
201
|
-
var
|
|
202
|
-
Z =
|
|
201
|
+
var i = p.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
Z = i && i[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
205
|
` + Z + e;
|
|
@@ -218,7 +218,7 @@ function Rr() {
|
|
|
218
218
|
if (t !== void 0)
|
|
219
219
|
return t;
|
|
220
220
|
}
|
|
221
|
-
var
|
|
221
|
+
var i;
|
|
222
222
|
Q = !0;
|
|
223
223
|
var p = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
@@ -237,14 +237,14 @@ function Rr() {
|
|
|
237
237
|
try {
|
|
238
238
|
Reflect.construct(d, []);
|
|
239
239
|
} catch (x) {
|
|
240
|
-
|
|
240
|
+
i = x;
|
|
241
241
|
}
|
|
242
242
|
Reflect.construct(e, [], d);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
245
|
d.call();
|
|
246
246
|
} catch (x) {
|
|
247
|
-
|
|
247
|
+
i = x;
|
|
248
248
|
}
|
|
249
249
|
e.call(d.prototype);
|
|
250
250
|
}
|
|
@@ -252,14 +252,14 @@ function Rr() {
|
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
254
|
} catch (x) {
|
|
255
|
-
|
|
255
|
+
i = x;
|
|
256
256
|
}
|
|
257
257
|
e();
|
|
258
258
|
}
|
|
259
259
|
} catch (x) {
|
|
260
|
-
if (x &&
|
|
260
|
+
if (x && i && typeof x.stack == "string") {
|
|
261
261
|
for (var f = x.stack.split(`
|
|
262
|
-
`), w =
|
|
262
|
+
`), w = i.stack.split(`
|
|
263
263
|
`), E = f.length - 1, y = w.length - 1; E >= 1 && y >= 0 && f[E] !== w[y]; )
|
|
264
264
|
y--;
|
|
265
265
|
for (; E >= 1 && y >= 0; E--, y--)
|
|
@@ -278,7 +278,7 @@ function Rr() {
|
|
|
278
278
|
} finally {
|
|
279
279
|
Q = !1, K.current = m, qe(), Error.prepareStackTrace = p;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
281
|
+
var I = e ? e.displayName || e.name : "", Fe = I ? q(I) : "";
|
|
282
282
|
return typeof e == "function" && z.set(e, Fe), Fe;
|
|
283
283
|
}
|
|
284
284
|
function Ue(e, r, t) {
|
|
@@ -308,7 +308,7 @@ function Rr() {
|
|
|
308
308
|
case C:
|
|
309
309
|
return U(e.type, r, t);
|
|
310
310
|
case O: {
|
|
311
|
-
var
|
|
311
|
+
var i = e, p = i._payload, m = i._init;
|
|
312
312
|
try {
|
|
313
313
|
return U(m(p), r, t);
|
|
314
314
|
} catch {
|
|
@@ -325,7 +325,7 @@ function Rr() {
|
|
|
325
325
|
} else
|
|
326
326
|
we.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function Ge(e, r, t,
|
|
328
|
+
function Ge(e, r, t, i, p) {
|
|
329
329
|
{
|
|
330
330
|
var m = Function.call.bind(B);
|
|
331
331
|
for (var d in e)
|
|
@@ -333,14 +333,14 @@ function Rr() {
|
|
|
333
333
|
var f = void 0;
|
|
334
334
|
try {
|
|
335
335
|
if (typeof e[d] != "function") {
|
|
336
|
-
var w = Error((
|
|
336
|
+
var w = Error((i || "React class") + ": " + t + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
337
|
throw w.name = "Invariant Violation", w;
|
|
338
338
|
}
|
|
339
|
-
f = e[d](r, d,
|
|
339
|
+
f = e[d](r, d, i, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
340
|
} catch (E) {
|
|
341
341
|
f = E;
|
|
342
342
|
}
|
|
343
|
-
f && !(f instanceof Error) && (G(p), R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",
|
|
343
|
+
f && !(f instanceof Error) && (G(p), R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", i || "React class", t, d, typeof f), G(null)), f instanceof Error && !(f.message in _e) && (_e[f.message] = !0, G(p), R("Failed %s type: %s", t, f.message), G(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
@@ -419,10 +419,10 @@ function Rr() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var nr = function(e, r, t,
|
|
422
|
+
var nr = function(e, r, t, i, p, m, d) {
|
|
423
423
|
var f = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
|
-
$$typeof:
|
|
425
|
+
$$typeof: o,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
427
427
|
type: e,
|
|
428
428
|
key: r,
|
|
@@ -440,7 +440,7 @@ function Rr() {
|
|
|
440
440
|
configurable: !1,
|
|
441
441
|
enumerable: !1,
|
|
442
442
|
writable: !1,
|
|
443
|
-
value:
|
|
443
|
+
value: i
|
|
444
444
|
}), Object.defineProperty(f, "_source", {
|
|
445
445
|
configurable: !1,
|
|
446
446
|
enumerable: !1,
|
|
@@ -448,7 +448,7 @@ function Rr() {
|
|
|
448
448
|
value: p
|
|
449
449
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
450
450
|
};
|
|
451
|
-
function ar(e, r, t,
|
|
451
|
+
function ar(e, r, t, i, p) {
|
|
452
452
|
{
|
|
453
453
|
var m, d = {}, f = null, w = null;
|
|
454
454
|
t !== void 0 && (Te(t), f = "" + t), Qe(r) && (Te(r.key), f = "" + r.key), Ze(r) && (w = r.ref, er(r, p));
|
|
@@ -463,7 +463,7 @@ function Rr() {
|
|
|
463
463
|
var y = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
464
|
f && rr(d, y), w && tr(d, y);
|
|
465
465
|
}
|
|
466
|
-
return nr(e, f, w, p,
|
|
466
|
+
return nr(e, f, w, p, i, N.current, d);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
var te = j.ReactCurrentOwner, je = j.ReactDebugCurrentFrame;
|
|
@@ -477,7 +477,7 @@ function Rr() {
|
|
|
477
477
|
var ne;
|
|
478
478
|
ne = !1;
|
|
479
479
|
function ae(e) {
|
|
480
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
480
|
+
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
481
481
|
}
|
|
482
482
|
function Pe() {
|
|
483
483
|
{
|
|
@@ -524,8 +524,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
524
524
|
if (xe[t])
|
|
525
525
|
return;
|
|
526
526
|
xe[t] = !0;
|
|
527
|
-
var
|
|
528
|
-
e && e._owner && e._owner !== te.current && (
|
|
527
|
+
var i = "";
|
|
528
|
+
e && e._owner && e._owner !== te.current && (i = " It was passed a child from " + P(e._owner.type) + "."), $(e), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, i), $(null);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
function Ae(e, r) {
|
|
@@ -534,8 +534,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
534
534
|
return;
|
|
535
535
|
if (ee(e))
|
|
536
536
|
for (var t = 0; t < e.length; t++) {
|
|
537
|
-
var
|
|
538
|
-
ae(
|
|
537
|
+
var i = e[t];
|
|
538
|
+
ae(i) && ke(i, r);
|
|
539
539
|
}
|
|
540
540
|
else if (ae(e))
|
|
541
541
|
e._store && (e._store.validated = !0);
|
|
@@ -562,8 +562,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
562
562
|
else
|
|
563
563
|
return;
|
|
564
564
|
if (t) {
|
|
565
|
-
var
|
|
566
|
-
Ge(t, e.props, "prop",
|
|
565
|
+
var i = P(r);
|
|
566
|
+
Ge(t, e.props, "prop", i, e);
|
|
567
567
|
} else if (r.PropTypes !== void 0 && !ne) {
|
|
568
568
|
ne = !0;
|
|
569
569
|
var p = P(r);
|
|
@@ -575,16 +575,16 @@ Check the top-level render call using <` + t + ">.");
|
|
|
575
575
|
function ur(e) {
|
|
576
576
|
{
|
|
577
577
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
578
|
-
var
|
|
579
|
-
if (
|
|
580
|
-
$(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
578
|
+
var i = r[t];
|
|
579
|
+
if (i !== "children" && i !== "key") {
|
|
580
|
+
$(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", i), $(null);
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
e.ref !== null && ($(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
function De(e, r, t,
|
|
587
|
+
function De(e, r, t, i, p, m) {
|
|
588
588
|
{
|
|
589
589
|
var d = Me(e);
|
|
590
590
|
if (!d) {
|
|
@@ -593,7 +593,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
593
593
|
var w = or(p);
|
|
594
594
|
w ? f += w : f += Pe();
|
|
595
595
|
var E;
|
|
596
|
-
e === null ? E = "null" : ee(e) ? E = "array" : e !== void 0 && e.$$typeof ===
|
|
596
|
+
e === null ? E = "null" : ee(e) ? E = "array" : e !== void 0 && e.$$typeof === o ? (E = "<" + (P(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, f);
|
|
597
597
|
}
|
|
598
598
|
var y = ar(e, r, t, p, m);
|
|
599
599
|
if (y == null)
|
|
@@ -601,10 +601,10 @@ Check the top-level render call using <` + t + ">.");
|
|
|
601
601
|
if (d) {
|
|
602
602
|
var S = r.children;
|
|
603
603
|
if (S !== void 0)
|
|
604
|
-
if (
|
|
604
|
+
if (i)
|
|
605
605
|
if (ee(S)) {
|
|
606
|
-
for (var
|
|
607
|
-
Ae(S[
|
|
606
|
+
for (var I = 0; I < S.length; I++)
|
|
607
|
+
Ae(S[I], e);
|
|
608
608
|
Object.freeze && Object.freeze(S);
|
|
609
609
|
} else
|
|
610
610
|
R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
@@ -636,7 +636,7 @@ const H = vr({
|
|
|
636
636
|
useLocation: void 0
|
|
637
637
|
}), Or = ({
|
|
638
638
|
axios: n,
|
|
639
|
-
children:
|
|
639
|
+
children: o,
|
|
640
640
|
translate: s,
|
|
641
641
|
useAuth: l,
|
|
642
642
|
Outlet: a,
|
|
@@ -656,10 +656,10 @@ const H = vr({
|
|
|
656
656
|
}),
|
|
657
657
|
[v, a, n, s, l, g, u]
|
|
658
658
|
);
|
|
659
|
-
return /* @__PURE__ */ k.jsx(H.Provider, { value: c, children:
|
|
659
|
+
return /* @__PURE__ */ k.jsx(H.Provider, { value: c, children: o });
|
|
660
660
|
}, J = (n) => `RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Sr = ({
|
|
661
661
|
Fallback: n,
|
|
662
|
-
loginPath:
|
|
662
|
+
loginPath: o = "/login",
|
|
663
663
|
localStorageKey: s = "user",
|
|
664
664
|
redirect401Path: l = "/login",
|
|
665
665
|
...a
|
|
@@ -689,26 +689,26 @@ const H = vr({
|
|
|
689
689
|
return typeof _ == "object" && _ && "response" in _ && _.response && typeof _.response == "object" && "status" in _.response && _.response && typeof _.response == "object" && "status" in _.response && ((Y = _ == null ? void 0 : _.response) == null ? void 0 : Y.status) === 401 && (v.defaults.headers.common.Authorization = null, localStorage.removeItem(s), C(l)), Promise.reject(_);
|
|
690
690
|
}
|
|
691
691
|
));
|
|
692
|
-
}, [v == null ? void 0 : v.defaults.headers.common, v == null ? void 0 : v.interceptors.response, s, l]), O && !h ? /* @__PURE__ */ k.jsx(hr, { fallback: n, children: (V = (D = T.state) == null ? void 0 : D.from) != null && V.state && ((R = (j = T.state) == null ? void 0 : j.from) == null ? void 0 : R.pathname) ===
|
|
692
|
+
}, [v == null ? void 0 : v.defaults.headers.common, v == null ? void 0 : v.interceptors.response, s, l]), O && !h ? /* @__PURE__ */ k.jsx(hr, { fallback: n, children: (V = (D = T.state) == null ? void 0 : D.from) != null && V.state && ((R = (j = T.state) == null ? void 0 : j.from) == null ? void 0 : R.pathname) === o ? /* @__PURE__ */ k.jsx(b, { to: T.state.from.state.from.pathname + T.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ k.jsx(c, {}) }) : /* @__PURE__ */ k.jsx(b, { to: o, state: { from: T }, replace: !0 });
|
|
693
693
|
}, oe = (n) => `GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, jr = ({ ...n }) => {
|
|
694
694
|
const {
|
|
695
|
-
useLocation:
|
|
695
|
+
useLocation: o = n.useLocation,
|
|
696
696
|
Outlet: s = n.Outlet,
|
|
697
697
|
useGoogleTagManager: l = n.useGoogleTagManager
|
|
698
698
|
} = ue(H);
|
|
699
|
-
if (
|
|
699
|
+
if (o === void 0)
|
|
700
700
|
throw new Error(oe("useLocation"));
|
|
701
701
|
if (s === void 0)
|
|
702
702
|
throw new Error(oe("Outlet"));
|
|
703
703
|
if (l === void 0)
|
|
704
704
|
throw new Error(oe("useGoogleTagManager"));
|
|
705
|
-
const { pathname: a } =
|
|
705
|
+
const { pathname: a } = o(), { sendEvent: v } = l();
|
|
706
706
|
return Er(() => {
|
|
707
707
|
v({ event: "pageView", pathname: a });
|
|
708
708
|
}, [a, v]), /* @__PURE__ */ k.jsx(s, {});
|
|
709
709
|
}, Pr = ({
|
|
710
710
|
axios: n,
|
|
711
|
-
baseURL:
|
|
711
|
+
baseURL: o,
|
|
712
712
|
tokenTypeKey: s = "tokenType",
|
|
713
713
|
userLocalStorageKey: l = "user",
|
|
714
714
|
tokenKey: a = "accessToken",
|
|
@@ -717,15 +717,15 @@ const H = vr({
|
|
|
717
717
|
if (!n.defaults)
|
|
718
718
|
return null;
|
|
719
719
|
const u = localStorage.getItem(l), g = u ? JSON.parse(u) : null, c = g != null && g[s] ? g[s] : null, b = g != null && g[a] ? g[a] : null, h = u ? `${c} ${b}` : null;
|
|
720
|
-
return n.defaults.baseURL =
|
|
720
|
+
return n.defaults.baseURL = o, n.defaults.headers.post["Content-Type"] = v, h && (n.defaults.headers.common.Authorization = h), null;
|
|
721
721
|
}, xr = ({
|
|
722
722
|
i18n: n,
|
|
723
|
-
debug:
|
|
723
|
+
debug: o,
|
|
724
724
|
initReactI18next: s,
|
|
725
725
|
resources: l,
|
|
726
726
|
LanguageDetector: a
|
|
727
727
|
}) => (n != null && n.isInitialized || (n.use(a).use(s).init({
|
|
728
|
-
debug:
|
|
728
|
+
debug: o,
|
|
729
729
|
fallbackLng: "en",
|
|
730
730
|
interpolation: {
|
|
731
731
|
escapeValue: !1
|
|
@@ -743,7 +743,7 @@ const H = vr({
|
|
|
743
743
|
document.documentElement.setAttribute("lang", v);
|
|
744
744
|
})), null), kr = ({
|
|
745
745
|
dsn: n,
|
|
746
|
-
sentry:
|
|
746
|
+
sentry: o,
|
|
747
747
|
integrations: s,
|
|
748
748
|
tracesSampleRate: l,
|
|
749
749
|
routingInstrumentationDependencies: a,
|
|
@@ -751,12 +751,12 @@ const H = vr({
|
|
|
751
751
|
replaysOnErrorSampleRate: u,
|
|
752
752
|
tracePropagationTargets: g,
|
|
753
753
|
debug: c
|
|
754
|
-
}) => ((c || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") &&
|
|
754
|
+
}) => (o.isInitialized() || (c || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && o.init({
|
|
755
755
|
debug: c,
|
|
756
756
|
dsn: n,
|
|
757
757
|
integrations: [
|
|
758
|
-
new
|
|
759
|
-
routingInstrumentation:
|
|
758
|
+
new o.BrowserTracing({
|
|
759
|
+
routingInstrumentation: o.reactRouterV6Instrumentation(
|
|
760
760
|
a.useEffect,
|
|
761
761
|
a.useLocation,
|
|
762
762
|
a.useNavigationType,
|
|
@@ -764,23 +764,23 @@ const H = vr({
|
|
|
764
764
|
a.matchRoutes
|
|
765
765
|
)
|
|
766
766
|
}),
|
|
767
|
-
|
|
767
|
+
o.replayIntegration(),
|
|
768
768
|
...s || []
|
|
769
769
|
],
|
|
770
770
|
replaysOnErrorSampleRate: u || 1,
|
|
771
771
|
replaysSessionSampleRate: v || 0.1,
|
|
772
772
|
tracePropagationTargets: g,
|
|
773
773
|
tracesSampleRate: l || 1
|
|
774
|
-
}), null), Ar = ({ IMaskMixin: n, ...
|
|
774
|
+
}), null), Ar = ({ IMaskMixin: n, ...o }) => {
|
|
775
775
|
const s = se(
|
|
776
776
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
777
777
|
() => n(({ TextField: l, ...a }) => /* @__PURE__ */ k.jsx(l, { ...a })),
|
|
778
778
|
[n]
|
|
779
779
|
);
|
|
780
|
-
return /* @__PURE__ */ k.jsx(s, { ...
|
|
781
|
-
}, Dr = ({ mapbox: n, accessToken:
|
|
780
|
+
return /* @__PURE__ */ k.jsx(s, { ...o });
|
|
781
|
+
}, Dr = ({ mapbox: n, accessToken: o }) => (n && o && (n.accessToken = o), null), Fr = ({
|
|
782
782
|
children: n,
|
|
783
|
-
defaultOptions:
|
|
783
|
+
defaultOptions: o,
|
|
784
784
|
QueryClient: s,
|
|
785
785
|
QueryClientProvider: l
|
|
786
786
|
}) => {
|
|
@@ -789,24 +789,24 @@ const H = vr({
|
|
|
789
789
|
queries: {
|
|
790
790
|
refetchOnWindowFocus: !1,
|
|
791
791
|
retry: 3,
|
|
792
|
-
...
|
|
792
|
+
...o
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
795
|
});
|
|
796
796
|
return /* @__PURE__ */ k.jsx(l, { client: a, children: n });
|
|
797
797
|
}, $r = (n) => {
|
|
798
|
-
const { unknownErrorTranslationKey:
|
|
798
|
+
const { unknownErrorTranslationKey: o = "error.unknownError" } = n || {}, { translate: s = n == null ? void 0 : n.translate } = ue(H);
|
|
799
799
|
return { printError: X(
|
|
800
800
|
(a) => {
|
|
801
801
|
var g, c, b, h, C, O, T, A, D;
|
|
802
|
-
const v = s ? s(
|
|
802
|
+
const v = s ? s(o) : "Unknown error", { response: u } = a || {};
|
|
803
803
|
return a != null && a.reason ? String(a.reason) : (g = u == null ? void 0 : u.data) != null && g.reason ? String(u.data.reason) : (c = u == null ? void 0 : u.data) != null && c.message ? String(u.data.message) : (h = (b = u == null ? void 0 : u.data) == null ? void 0 : b.detail) != null && h.length && Array.isArray((C = u == null ? void 0 : u.data) == null ? void 0 : C.detail) && ((T = (O = u == null ? void 0 : u.data) == null ? void 0 : O.detail[0]) != null && T.msg) && typeof ((D = (A = u == null ? void 0 : u.data) == null ? void 0 : A.detail[0]) == null ? void 0 : D.msg) == "string" ? String(u.data.detail[0].msg) : v;
|
|
804
804
|
},
|
|
805
|
-
[s,
|
|
805
|
+
[s, o]
|
|
806
806
|
) };
|
|
807
|
-
},
|
|
807
|
+
}, Ir = ({
|
|
808
808
|
data: n,
|
|
809
|
-
fetchNextPage:
|
|
809
|
+
fetchNextPage: o,
|
|
810
810
|
isFetchingNextPage: s,
|
|
811
811
|
isInitialLoading: l,
|
|
812
812
|
isLoading: a,
|
|
@@ -814,9 +814,9 @@ const H = vr({
|
|
|
814
814
|
}) => {
|
|
815
815
|
const u = X(
|
|
816
816
|
async (c) => {
|
|
817
|
-
s || !v || await
|
|
817
|
+
s || !v || await o({ pageParam: (c == null ? void 0 : c.pageParam) || c.visibleRowsCount });
|
|
818
818
|
},
|
|
819
|
-
[v,
|
|
819
|
+
[v, o, s]
|
|
820
820
|
), g = se(() => {
|
|
821
821
|
if (n)
|
|
822
822
|
return n.pages.reduce((c, b) => [...c, ...b], []);
|
|
@@ -827,8 +827,8 @@ const H = vr({
|
|
|
827
827
|
loadingVariant: l ? "skeleton" : "linear",
|
|
828
828
|
rows: g
|
|
829
829
|
};
|
|
830
|
-
},
|
|
831
|
-
const
|
|
830
|
+
}, Lr = (n) => {
|
|
831
|
+
const o = X(
|
|
832
832
|
({ tokenType: l, accessToken: a }) => {
|
|
833
833
|
n.defaults.headers.common.Authorization = `${l} ${a}`;
|
|
834
834
|
},
|
|
@@ -838,30 +838,30 @@ const H = vr({
|
|
|
838
838
|
clearAuthenticationToken: X(() => {
|
|
839
839
|
n.defaults.headers.common.Authorization = null;
|
|
840
840
|
}, [n.defaults.headers.common]),
|
|
841
|
-
setAuthenticationToken:
|
|
841
|
+
setAuthenticationToken: o
|
|
842
842
|
};
|
|
843
843
|
}, br = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), _r = (n) => {
|
|
844
844
|
const l = n.split("/").filter((a) => a.length > 0).map((a) => a.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((c) => c.charAt(0).toUpperCase() + c.slice(1)).join("")).join("");
|
|
845
845
|
return l.charAt(0).toLowerCase() + l.slice(1);
|
|
846
|
-
}, wr = (n,
|
|
847
|
-
const l = _r(
|
|
846
|
+
}, wr = (n, o, s) => {
|
|
847
|
+
const l = _r(o), a = br(s);
|
|
848
848
|
return `${l}${a}`;
|
|
849
849
|
}, Cr = (n) => {
|
|
850
850
|
if (n)
|
|
851
|
-
return (n == null ? void 0 : n.reduce((
|
|
851
|
+
return (n == null ? void 0 : n.reduce((o, s) => (o[s] = {
|
|
852
852
|
query: {
|
|
853
853
|
useInfinite: !0,
|
|
854
854
|
useInfiniteQueryParam: "offset"
|
|
855
855
|
}
|
|
856
|
-
},
|
|
856
|
+
}, o), {})) || {};
|
|
857
857
|
}, Nr = (n) => {
|
|
858
|
-
const { input:
|
|
858
|
+
const { input: o = "./openapi.json", operationsToGenerateInfiniteQueryHook: s = void 0 } = n || {};
|
|
859
859
|
return {
|
|
860
860
|
api: {
|
|
861
861
|
hooks: {
|
|
862
862
|
afterAllFilesWrite: "prettier src/api/ --write"
|
|
863
863
|
},
|
|
864
|
-
input:
|
|
864
|
+
input: o,
|
|
865
865
|
output: {
|
|
866
866
|
client: "react-query",
|
|
867
867
|
mode: "tags-split",
|
|
@@ -899,7 +899,7 @@ export {
|
|
|
899
899
|
Sr as RequireAuth,
|
|
900
900
|
kr as SentryConfig,
|
|
901
901
|
Nr as getOrvalConfig,
|
|
902
|
-
|
|
903
|
-
|
|
902
|
+
Lr as useAuth,
|
|
903
|
+
Ir as useInfiniteDataGrid,
|
|
904
904
|
$r as useResponseError
|
|
905
905
|
};
|
package/dist/main.umd.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ue;function Le(){if(ue)return W;ue=1;var n=m,
|
|
9
|
+
*/var ue;function Le(){if(ue)return W;ue=1;var n=m,o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function u(g,c,C){var E,O={},j=null,S=null;C!==void 0&&(j=""+C),c.key!==void 0&&(j=""+c.key),c.ref!==void 0&&(S=c.ref);for(E in c)l.call(c,E)&&!v.hasOwnProperty(E)&&(O[E]=c[E]);if(g&&g.defaultProps)for(E in c=g.defaultProps,c)O[E]===void 0&&(O[E]=c[E]);return{$$typeof:o,type:g,key:j,ref:S,props:O,_owner:a.current}}return W.Fragment=s,W.jsx=u,W.jsxs=u,W}var V={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var le;function Me(){return le||(le=1,process.env.NODE_ENV!=="production"&&function(){var n=m,
|
|
18
|
-
`+re+e}}var te=!1,H;{var sr=typeof WeakMap=="function"?WeakMap:Map;H=new sr}function _e(e,r){if(!e||te)return"";{var t=H.get(e);if(t!==void 0)return t}var
|
|
19
|
-
`),T=
|
|
17
|
+
*/var le;function Me(){return le||(le=1,process.env.NODE_ENV!=="production"&&function(){var n=m,o=Symbol.for("react.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),g=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),F=Symbol.iterator,I="@@iterator";function G(e){if(e===null||typeof e!="object")return null;var r=F&&e[F]||e[I];return typeof r=="function"?r:null}var A=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),i=1;i<r;i++)t[i-1]=arguments[i];w("error",e,t)}}function w(e,r,t){{var i=A.ReactDebugCurrentFrame,p=i.getStackAddendum();p!==""&&(r+="%s",t=t.concat([p]));var h=t.map(function(d){return String(d)});h.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,h)}}var ce=!1,fe=!1,J=!1,rr=!1,tr=!1,de;de=Symbol.for("react.module.reference");function nr(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===v||tr||e===a||e===C||e===E||rr||e===S||ce||fe||J||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===O||e.$$typeof===u||e.$$typeof===g||e.$$typeof===c||e.$$typeof===de||e.getModuleId!==void 0))}function ar(e,r,t){var i=e.displayName;if(i)return i;var p=r.displayName||r.name||"";return p!==""?t+"("+p+")":t}function ve(e){return e.displayName||"Context"}function x(e){if(e==null)return null;if(typeof e.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case s:return"Portal";case v:return"Profiler";case a:return"StrictMode";case C:return"Suspense";case E:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g:var r=e;return ve(r)+".Consumer";case u:var t=e;return ve(t._context)+".Provider";case c:return ar(e,e.render,"ForwardRef");case O:var i=e.displayName||null;return i!==null?i:x(e.type)||"Memo";case j:{var p=e,h=p._payload,d=p._init;try{return x(d(h))}catch{return null}}}return null}var L=Object.assign,z=0,pe,ge,he,me,Ee,ye,Re;function be(){}be.__reactDisabledLog=!0;function or(){{if(z===0){pe=console.log,ge=console.info,he=console.warn,me=console.error,Ee=console.group,ye=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}}function ir(){{if(z--,z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},e,{value:pe}),info:L({},e,{value:ge}),warn:L({},e,{value:he}),error:L({},e,{value:me}),group:L({},e,{value:Ee}),groupCollapsed:L({},e,{value:ye}),groupEnd:L({},e,{value:Re})})}z<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ee=A.ReactCurrentDispatcher,re;function X(e,r,t){{if(re===void 0)try{throw Error()}catch(p){var i=p.stack.trim().match(/\n( *(at )?)/);re=i&&i[1]||""}return`
|
|
18
|
+
`+re+e}}var te=!1,H;{var sr=typeof WeakMap=="function"?WeakMap:Map;H=new sr}function _e(e,r){if(!e||te)return"";{var t=H.get(e);if(t!==void 0)return t}var i;te=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var h;h=ee.current,ee.current=null,or();try{if(r){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(D){i=D}Reflect.construct(e,[],d)}else{try{d.call()}catch(D){i=D}e.call(d.prototype)}}else{try{throw Error()}catch(D){i=D}e()}}catch(D){if(D&&i&&typeof D.stack=="string"){for(var f=D.stack.split(`
|
|
19
|
+
`),T=i.stack.split(`
|
|
20
20
|
`),y=f.length-1,b=T.length-1;y>=1&&b>=0&&f[y]!==T[b];)b--;for(;y>=1&&b>=0;y--,b--)if(f[y]!==T[b]){if(y!==1||b!==1)do if(y--,b--,b<0||f[y]!==T[b]){var P=`
|
|
21
|
-
`+f[y].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,P),P}while(y>=1&&b>=0);break}}}finally{te=!1,ee.current=h,ir(),Error.prepareStackTrace=p}var N=e?e.displayName||e.name:"",Ie=N?X(N):"";return typeof e=="function"&&H.set(e,Ie),Ie}function ur(e,r,t){return _e(e,!1)}function lr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return _e(e,lr(e));if(typeof e=="string")return X(e);switch(e){case C:return X("Suspense");case E:return X("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return ur(e.render);case O:return K(e.type,r,t);case j:{var
|
|
21
|
+
`+f[y].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,P),P}while(y>=1&&b>=0);break}}}finally{te=!1,ee.current=h,ir(),Error.prepareStackTrace=p}var N=e?e.displayName||e.name:"",Ie=N?X(N):"";return typeof e=="function"&&H.set(e,Ie),Ie}function ur(e,r,t){return _e(e,!1)}function lr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return _e(e,lr(e));if(typeof e=="string")return X(e);switch(e){case C:return X("Suspense");case E:return X("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return ur(e.render);case O:return K(e.type,r,t);case j:{var i=e,p=i._payload,h=i._init;try{return K(h(p),r,t)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,Ce={},we=A.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}function cr(e,r,t,i,p){{var h=Function.call.bind(q);for(var d in e)if(h(e,d)){var f=void 0;try{if(typeof e[d]!="function"){var T=Error((i||"React class")+": "+t+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}f=e[d](r,d,i,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(y){f=y}f&&!(f instanceof Error)&&(Z(p),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",i||"React class",t,d,typeof f),Z(null)),f instanceof Error&&!(f.message in Ce)&&(Ce[f.message]=!0,Z(p),_("Failed %s type: %s",t,f.message),Z(null))}}}var fr=Array.isArray;function ne(e){return fr(e)}function dr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function vr(e){try{return Te(e),!1}catch{return!0}}function Te(e){return""+e}function Oe(e){if(vr(e))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",dr(e)),Te(e)}var U=A.ReactCurrentOwner,pr={key:!0,ref:!0,__self:!0,__source:!0},Se,je,ae;ae={};function gr(e){if(q.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function hr(e){if(q.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function mr(e,r){if(typeof e.ref=="string"&&U.current&&r&&U.current.stateNode!==r){var t=x(U.current.type);ae[t]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',x(U.current.type),e.ref),ae[t]=!0)}}function Er(e,r){{var t=function(){Se||(Se=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function yr(e,r){{var t=function(){je||(je=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Rr=function(e,r,t,i,p,h,d){var f={$$typeof:o,type:e,key:r,ref:t,props:d,_owner:h};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function br(e,r,t,i,p){{var h,d={},f=null,T=null;t!==void 0&&(Oe(t),f=""+t),hr(r)&&(Oe(r.key),f=""+r.key),gr(r)&&(T=r.ref,mr(r,p));for(h in r)q.call(r,h)&&!pr.hasOwnProperty(h)&&(d[h]=r[h]);if(e&&e.defaultProps){var y=e.defaultProps;for(h in y)d[h]===void 0&&(d[h]=y[h])}if(f||T){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&Er(d,b),T&&yr(d,b)}return Rr(e,f,T,p,i,U.current,d)}}var oe=A.ReactCurrentOwner,Pe=A.ReactDebugCurrentFrame;function M(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}var ie;ie=!1;function se(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function ke(){{if(oe.current){var e=x(oe.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function _r(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+r+":"+t+"."}return""}}var Ae={};function Cr(e){{var r=ke();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Cr(r);if(Ae[t])return;Ae[t]=!0;var
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Cr(r);if(Ae[t])return;Ae[t]=!0;var i="";e&&e._owner&&e._owner!==oe.current&&(i=" It was passed a child from "+x(e._owner.type)+"."),M(e),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,i),M(null)}}function De(e,r){{if(typeof e!="object")return;if(ne(e))for(var t=0;t<e.length;t++){var i=e[t];se(i)&&xe(i,r)}else if(se(e))e._store&&(e._store.validated=!0);else if(e){var p=G(e);if(typeof p=="function"&&p!==e.entries)for(var h=p.call(e),d;!(d=h.next()).done;)se(d.value)&&xe(d.value,r)}}}function wr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===O))t=r.propTypes;else return;if(t){var i=x(r);cr(t,e.props,"prop",i,e)}else if(r.PropTypes!==void 0&&!ie){ie=!0;var p=x(r);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Tr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var i=r[t];if(i!=="children"&&i!=="key"){M(e),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),M(null);break}}e.ref!==null&&(M(e),_("Invalid attribute `ref` supplied to `React.Fragment`."),M(null))}}function Fe(e,r,t,i,p,h){{var d=nr(e);if(!d){var f="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(f+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T=_r(p);T?f+=T:f+=ke();var y;e===null?y="null":ne(e)?y="array":e!==void 0&&e.$$typeof===o?(y="<"+(x(e.type)||"Unknown")+" />",f=" Did you accidentally export a JSX literal instead of a component?"):y=typeof e,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",y,f)}var b=br(e,r,t,p,h);if(b==null)return b;if(d){var P=r.children;if(P!==void 0)if(i)if(ne(P)){for(var N=0;N<P.length;N++)De(P[N],e);Object.freeze&&Object.freeze(P)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else De(P,e)}return e===l?Tr(b):wr(b),b}}function Or(e,r,t){return Fe(e,r,t,!0)}function Sr(e,r,t){return Fe(e,r,t,!1)}var jr=Sr,Pr=Or;V.Fragment=l,V.jsx=jr,V.jsxs=Pr}()),V}process.env.NODE_ENV==="production"?$.exports=Le():$.exports=Me();var k=$.exports;const Y=m.createContext({axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),Ne=({axios:n,children:o,translate:s,useAuth:l,Outlet:a,Navigate:v,useLocation:u,useGoogleTagManager:g})=>{const c=m.useMemo(()=>({axios:n,Navigate:v,Outlet:a,translate:s,useAuth:l,useGoogleTagManager:g,useLocation:u}),[v,a,n,s,l,g,u]);return k.jsx(Y.Provider,{value:c,children:o})},B=n=>`RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,We=({Fallback:n,loginPath:o="/login",localStorageKey:s="user",redirect401Path:l="/login",...a})=>{var I,G,A,_;const{axios:v=a.axios,useLocation:u=a.useLocation,useAuth:g=a.useAuth,Outlet:c=a.Outlet,Navigate:C=a.Navigate}=m.useContext(Y);if(g===void 0)throw new Error(B("useAuth"));if(u===void 0)throw new Error(B("useLocation"));if(c===void 0)throw new Error(B("Outlet"));if(C===void 0)throw new Error(B("Navigate"));const[E,O]=m.useState(null),{isLogged:j}=g(),S=u(),F=m.useRef(!1);return m.useLayoutEffect(()=>{F.current||(F.current=!0,v==null||v.interceptors.response.use(w=>w,async w=>{var J;return typeof w=="object"&&w&&"response"in w&&w.response&&typeof w.response=="object"&&"status"in w.response&&w.response&&typeof w.response=="object"&&"status"in w.response&&((J=w==null?void 0:w.response)==null?void 0:J.status)===401&&(v.defaults.headers.common.Authorization=null,localStorage.removeItem(s),O(l)),Promise.reject(w)}))},[v==null?void 0:v.defaults.headers.common,v==null?void 0:v.interceptors.response,s,l]),j&&!E?k.jsx(m.Suspense,{fallback:n,children:(G=(I=S.state)==null?void 0:I.from)!=null&&G.state&&((_=(A=S.state)==null?void 0:A.from)==null?void 0:_.pathname)===o?k.jsx(C,{to:S.state.from.state.from.pathname+S.state.from.state.from.search,replace:!0}):k.jsx(c,{})}):k.jsx(C,{to:o,state:{from:S},replace:!0})},Q=n=>`GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ve=({...n})=>{const{useLocation:o=n.useLocation,Outlet:s=n.Outlet,useGoogleTagManager:l=n.useGoogleTagManager}=m.useContext(Y);if(o===void 0)throw new Error(Q("useLocation"));if(s===void 0)throw new Error(Q("Outlet"));if(l===void 0)throw new Error(Q("useGoogleTagManager"));const{pathname:a}=o(),{sendEvent:v}=l();return m.useEffect(()=>{v({event:"pageView",pathname:a})},[a,v]),k.jsx(s,{})},Ye=({axios:n,baseURL:o,tokenTypeKey:s="tokenType",userLocalStorageKey:l="user",tokenKey:a="accessToken",postContentType:v="application/json"})=>{if(!n.defaults)return null;const u=localStorage.getItem(l),g=u?JSON.parse(u):null,c=g!=null&&g[s]?g[s]:null,C=g!=null&&g[a]?g[a]:null,E=u?`${c} ${C}`:null;return n.defaults.baseURL=o,n.defaults.headers.post["Content-Type"]=v,E&&(n.defaults.headers.common.Authorization=E),null},ze=({i18n:n,debug:o,initReactI18next:s,resources:l,LanguageDetector:a})=>(n!=null&&n.isInitialized||(n.use(a).use(s).init({debug:o,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:l,returnNull:!1}).then(()=>{document.documentElement.lang!==n.resolvedLanguage&&n.resolvedLanguage&&document.documentElement.setAttribute("lang",n.resolvedLanguage)}),n.on("languageChanged",v=>{document.documentElement.setAttribute("lang",v)})),null),Ue=({dsn:n,sentry:o,integrations:s,tracesSampleRate:l,routingInstrumentationDependencies:a,replaysSessionSampleRate:v,replaysOnErrorSampleRate:u,tracePropagationTargets:g,debug:c})=>(o.isInitialized()||(c||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&o.init({debug:c,dsn:n,integrations:[new o.BrowserTracing({routingInstrumentation:o.reactRouterV6Instrumentation(a.useEffect,a.useLocation,a.useNavigationType,a.createRoutesFromChildren,a.matchRoutes)}),o.replayIntegration(),...s||[]],replaysOnErrorSampleRate:u||1,replaysSessionSampleRate:v||.1,tracePropagationTargets:g,tracesSampleRate:l||1}),null),Be=({IMaskMixin:n,...o})=>{const s=m.useMemo(()=>n(({TextField:l,...a})=>k.jsx(l,{...a})),[n]);return k.jsx(s,{...o})},Ge=({mapbox:n,accessToken:o})=>(n&&o&&(n.accessToken=o),null),Je=({children:n,defaultOptions:o,QueryClient:s,QueryClientProvider:l})=>{const a=new s({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...o}}});return k.jsx(l,{client:a,children:n})},Xe=n=>{const{unknownErrorTranslationKey:o="error.unknownError"}=n||{},{translate:s=n==null?void 0:n.translate}=m.useContext(Y);return{printError:m.useCallback(a=>{var g,c,C,E,O,j,S,F,I;const v=s?s(o):"Unknown error",{response:u}=a||{};return a!=null&&a.reason?String(a.reason):(g=u==null?void 0:u.data)!=null&&g.reason?String(u.data.reason):(c=u==null?void 0:u.data)!=null&&c.message?String(u.data.message):(E=(C=u==null?void 0:u.data)==null?void 0:C.detail)!=null&&E.length&&Array.isArray((O=u==null?void 0:u.data)==null?void 0:O.detail)&&((S=(j=u==null?void 0:u.data)==null?void 0:j.detail[0])!=null&&S.msg)&&typeof((I=(F=u==null?void 0:u.data)==null?void 0:F.detail[0])==null?void 0:I.msg)=="string"?String(u.data.detail[0].msg):v},[s,o])}},He=({data:n,fetchNextPage:o,isFetchingNextPage:s,isInitialLoading:l,isLoading:a,enabled:v=!0})=>{const u=m.useCallback(async c=>{s||!v||await o({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[v,o,s]),g=m.useMemo(()=>{if(n)return n.pages.reduce((c,C)=>[...c,...C],[])},[n]);return{fetchNextPageOnRowsScrollEnd:u,isLoading:s||a,loadingVariant:l?"skeleton":"linear",rows:g}},Ke=n=>{const o=m.useCallback(({tokenType:l,accessToken:a})=>{n.defaults.headers.common.Authorization=`${l} ${a}`},[n.defaults.headers.common]);return{clearAuthenticationToken:m.useCallback(()=>{n.defaults.headers.common.Authorization=null},[n.defaults.headers.common]),setAuthenticationToken:o}},qe=n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),Ze=n=>{const l=n.split("/").filter(a=>a.length>0).map(a=>a.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return l.charAt(0).toLowerCase()+l.slice(1)},$e=(n,o,s)=>{const l=Ze(o),a=qe(s);return`${l}${a}`},Qe=n=>{if(n)return(n==null?void 0:n.reduce((o,s)=>(o[s]={query:{useInfinite:!0,useInfiniteQueryParam:"offset"}},o),{}))||{}},er=n=>{const{input:o="./openapi.json",operationsToGenerateInfiniteQueryHook:s=void 0}=n||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:o,output:{client:"react-query",mode:"tags-split",override:{header:l=>["Generated by orval 🍺",...l.title?[l.title]:[],...l.description?[l.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:$e,...(s==null?void 0:s.length)&&{operations:Qe(s)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};R.AxiosConfig=Ye,R.GTMSendPageView=Ve,R.I18nConfig=ze,R.InjectDependenciesContext=Y,R.InjectDependenciesProvider=Ne,R.MapBoxConfig=Ge,R.MaskTextField=Be,R.QueryClientConfigProvider=Je,R.RequireAuth=We,R.SentryConfig=Ue,R.getOrvalConfig=er,R.useAuth=Ke,R.useInfiniteDataGrid=He,R.useResponseError=Xe,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|