@tracktor/shared-module 0.5.3 → 0.6.1
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 -2
- package/dist/components/Inputs/MaskTextField.d.ts +9 -0
- package/dist/components/{utils → Utils}/RequireAuth.d.ts +1 -1
- package/dist/context/InjectDependenciesProvider.d.ts +1 -1
- package/dist/main.d.ts +12 -10
- package/dist/main.js +133 -125
- package/dist/main.umd.cjs +8 -8
- package/package.json +1 -1
- /package/dist/components/{utils → Utils}/AxiosConfig.d.ts +0 -0
- /package/dist/components/{utils → Utils}/GTMSendPageView.d.ts +0 -0
- /package/dist/components/{utils → Utils}/I18nConfig.d.ts +0 -0
- /package/dist/components/{utils → Utils}/SentryConfig.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps, ComponentType } from "react";
|
|
2
|
+
interface MaskTextFieldProps<T> {
|
|
3
|
+
mask?: unknown;
|
|
4
|
+
definitions?: unknown;
|
|
5
|
+
TextField: T;
|
|
6
|
+
IMaskMixin: (param: (props: any) => any) => any;
|
|
7
|
+
}
|
|
8
|
+
declare const MaskTextField: <T extends ComponentType<{}>>({ IMaskMixin, ...props }: MaskTextFieldProps<T> & ComponentProps<T>) => JSX.Element;
|
|
9
|
+
export default MaskTextField;
|
|
@@ -52,7 +52,7 @@ export interface InjectDependenciesContextProps {
|
|
|
52
52
|
}
|
|
53
53
|
export declare const InjectDependenciesContext: import("react").Context<InjectDependenciesContextProps>;
|
|
54
54
|
/**
|
|
55
|
-
* This provider is used to inject dependencies
|
|
55
|
+
* This provider is used to inject major dependencies
|
|
56
56
|
* @param axios
|
|
57
57
|
* @param children
|
|
58
58
|
* @param translate
|
package/dist/main.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
export { default as RequireAuth } from './components/
|
|
2
|
-
export * from './components/
|
|
3
|
-
export { default as GTMSendPageView } from './components/
|
|
4
|
-
export * from './components/
|
|
5
|
-
export { default as AxiosConfig } from './components/
|
|
6
|
-
export * from './components/
|
|
7
|
-
export { default as I18nConfig } from './components/
|
|
8
|
-
export * from './components/
|
|
9
|
-
export { default as SentryConfig } from './components/
|
|
10
|
-
export * from './components/
|
|
1
|
+
export { default as RequireAuth } from './components/Utils/RequireAuth';
|
|
2
|
+
export * from './components/Utils/RequireAuth';
|
|
3
|
+
export { default as GTMSendPageView } from './components/Utils/GTMSendPageView';
|
|
4
|
+
export * from './components/Utils/GTMSendPageView';
|
|
5
|
+
export { default as AxiosConfig } from './components/Utils/AxiosConfig';
|
|
6
|
+
export * from './components/Utils/AxiosConfig';
|
|
7
|
+
export { default as I18nConfig } from './components/Utils/I18nConfig';
|
|
8
|
+
export * from './components/Utils/I18nConfig';
|
|
9
|
+
export { default as SentryConfig } from './components/Utils/SentryConfig';
|
|
10
|
+
export * from './components/Utils/SentryConfig';
|
|
11
|
+
export { default as MaskTextField } from './components/Inputs/MaskTextField';
|
|
12
|
+
export * from './components/Inputs/MaskTextField';
|
|
11
13
|
export { default as InjectDependenciesProvider } from './context/InjectDependenciesProvider';
|
|
12
14
|
export * from './context/InjectDependenciesProvider';
|
|
13
15
|
export { default as QueryClientConfigProvider } from './context/QueryClientConfigProvider';
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Ie, { createContext as
|
|
1
|
+
import Ie, { createContext as vr, useMemo as Le, useContext as oe, useState as pr, useLayoutEffect as ie, Suspense as gr, useEffect as hr, useCallback as mr } from "react";
|
|
2
2
|
var ae = {}, Er = {
|
|
3
3
|
get exports() {
|
|
4
4
|
return ae;
|
|
@@ -21,7 +21,7 @@ function yr() {
|
|
|
21
21
|
if (De)
|
|
22
22
|
return N;
|
|
23
23
|
De = 1;
|
|
24
|
-
var n = Ie, d = Symbol.for("react.element"), g = Symbol.for("react.fragment"), h = Object.prototype.hasOwnProperty,
|
|
24
|
+
var n = Ie, d = Symbol.for("react.element"), g = Symbol.for("react.fragment"), h = Object.prototype.hasOwnProperty, l = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
25
25
|
function i(y, p, T) {
|
|
26
26
|
var b, _ = {}, O = null, w = null;
|
|
27
27
|
T !== void 0 && (O = "" + T), p.key !== void 0 && (O = "" + p.key), p.ref !== void 0 && (w = p.ref);
|
|
@@ -30,7 +30,7 @@ function yr() {
|
|
|
30
30
|
if (y && y.defaultProps)
|
|
31
31
|
for (b in p = y.defaultProps, p)
|
|
32
32
|
_[b] === void 0 && (_[b] = p[b]);
|
|
33
|
-
return { $$typeof: d, type: y, key: O, ref: w, props: _, _owner:
|
|
33
|
+
return { $$typeof: d, type: y, key: O, ref: w, props: _, _owner: l.current };
|
|
34
34
|
}
|
|
35
35
|
return N.Fragment = g, N.jsx = i, N.jsxs = i, N;
|
|
36
36
|
}
|
|
@@ -47,15 +47,15 @@ var W = {};
|
|
|
47
47
|
var Fe;
|
|
48
48
|
function br() {
|
|
49
49
|
return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
-
var n = Ie, d = Symbol.for("react.element"), g = Symbol.for("react.portal"), h = Symbol.for("react.fragment"),
|
|
50
|
+
var n = Ie, d = Symbol.for("react.element"), g = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), y = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), x = Symbol.iterator, A = "@@iterator";
|
|
51
51
|
function Y(e) {
|
|
52
52
|
if (e === null || typeof e != "object")
|
|
53
53
|
return null;
|
|
54
|
-
var r =
|
|
54
|
+
var r = x && e[x] || e[A];
|
|
55
55
|
return typeof r == "function" ? r : null;
|
|
56
56
|
}
|
|
57
57
|
var S = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
58
|
-
function
|
|
58
|
+
function c(e) {
|
|
59
59
|
{
|
|
60
60
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
61
61
|
t[a - 1] = arguments[a];
|
|
@@ -64,29 +64,29 @@ function br() {
|
|
|
64
64
|
}
|
|
65
65
|
function ue(e, r, t) {
|
|
66
66
|
{
|
|
67
|
-
var a = S.ReactDebugCurrentFrame,
|
|
68
|
-
|
|
67
|
+
var a = S.ReactDebugCurrentFrame, f = a.getStackAddendum();
|
|
68
|
+
f !== "" && (r += "%s", t = t.concat([f]));
|
|
69
69
|
var v = t.map(function(s) {
|
|
70
70
|
return String(s);
|
|
71
71
|
});
|
|
72
72
|
v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
var se = !1, M = !1,
|
|
75
|
+
var se = !1, M = !1, $e = !1, Ne = !1, We = !1, le;
|
|
76
76
|
le = Symbol.for("react.module.reference");
|
|
77
|
-
function
|
|
78
|
-
return !!(typeof e == "string" || typeof e == "function" || e === h || e === u ||
|
|
77
|
+
function Ye(e) {
|
|
78
|
+
return !!(typeof e == "string" || typeof e == "function" || e === h || e === u || We || e === l || e === T || e === b || Ne || e === w || se || M || $e || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === _ || e.$$typeof === i || e.$$typeof === y || e.$$typeof === p || // This needs to include all possible module reference object
|
|
79
79
|
// types supported by any Flight configuration anywhere since
|
|
80
80
|
// we don't know which Flight build this will end up being used
|
|
81
81
|
// with.
|
|
82
82
|
e.$$typeof === le || e.getModuleId !== void 0));
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function Me(e, r, t) {
|
|
85
85
|
var a = e.displayName;
|
|
86
86
|
if (a)
|
|
87
87
|
return a;
|
|
88
|
-
var
|
|
89
|
-
return
|
|
88
|
+
var f = r.displayName || r.name || "";
|
|
89
|
+
return f !== "" ? t + "(" + f + ")" : t;
|
|
90
90
|
}
|
|
91
91
|
function ce(e) {
|
|
92
92
|
return e.displayName || "Context";
|
|
@@ -94,7 +94,7 @@ function br() {
|
|
|
94
94
|
function P(e) {
|
|
95
95
|
if (e == null)
|
|
96
96
|
return null;
|
|
97
|
-
if (typeof e.tag == "number" &&
|
|
97
|
+
if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
98
98
|
return e.displayName || e.name || null;
|
|
99
99
|
if (typeof e == "string")
|
|
100
100
|
return e;
|
|
@@ -105,7 +105,7 @@ function br() {
|
|
|
105
105
|
return "Portal";
|
|
106
106
|
case u:
|
|
107
107
|
return "Profiler";
|
|
108
|
-
case
|
|
108
|
+
case l:
|
|
109
109
|
return "StrictMode";
|
|
110
110
|
case T:
|
|
111
111
|
return "Suspense";
|
|
@@ -121,12 +121,12 @@ function br() {
|
|
|
121
121
|
var t = e;
|
|
122
122
|
return ce(t._context) + ".Provider";
|
|
123
123
|
case p:
|
|
124
|
-
return
|
|
124
|
+
return Me(e, e.render, "ForwardRef");
|
|
125
125
|
case _:
|
|
126
126
|
var a = e.displayName || null;
|
|
127
127
|
return a !== null ? a : P(e.type) || "Memo";
|
|
128
128
|
case O: {
|
|
129
|
-
var
|
|
129
|
+
var f = e, v = f._payload, s = f._init;
|
|
130
130
|
try {
|
|
131
131
|
return P(s(v));
|
|
132
132
|
} catch {
|
|
@@ -136,11 +136,11 @@ function br() {
|
|
|
136
136
|
}
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
|
-
var
|
|
139
|
+
var D = Object.assign, L = 0, fe, de, ve, pe, ge, he, me;
|
|
140
140
|
function Ee() {
|
|
141
141
|
}
|
|
142
142
|
Ee.__reactDisabledLog = !0;
|
|
143
|
-
function
|
|
143
|
+
function Ve() {
|
|
144
144
|
{
|
|
145
145
|
if (L === 0) {
|
|
146
146
|
fe = console.log, de = console.info, ve = console.warn, pe = console.error, ge = console.group, he = console.groupCollapsed, me = console.groupEnd;
|
|
@@ -163,7 +163,7 @@ function br() {
|
|
|
163
163
|
L++;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Ue() {
|
|
167
167
|
{
|
|
168
168
|
if (L--, L === 0) {
|
|
169
169
|
var e = {
|
|
@@ -172,30 +172,30 @@ function br() {
|
|
|
172
172
|
writable: !0
|
|
173
173
|
};
|
|
174
174
|
Object.defineProperties(console, {
|
|
175
|
-
log:
|
|
175
|
+
log: D({}, e, {
|
|
176
176
|
value: fe
|
|
177
177
|
}),
|
|
178
|
-
info:
|
|
178
|
+
info: D({}, e, {
|
|
179
179
|
value: de
|
|
180
180
|
}),
|
|
181
|
-
warn:
|
|
181
|
+
warn: D({}, e, {
|
|
182
182
|
value: ve
|
|
183
183
|
}),
|
|
184
|
-
error:
|
|
184
|
+
error: D({}, e, {
|
|
185
185
|
value: pe
|
|
186
186
|
}),
|
|
187
|
-
group:
|
|
187
|
+
group: D({}, e, {
|
|
188
188
|
value: ge
|
|
189
189
|
}),
|
|
190
|
-
groupCollapsed:
|
|
190
|
+
groupCollapsed: D({}, e, {
|
|
191
191
|
value: he
|
|
192
192
|
}),
|
|
193
|
-
groupEnd:
|
|
193
|
+
groupEnd: D({}, e, {
|
|
194
194
|
value: me
|
|
195
195
|
})
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
L < 0 &&
|
|
198
|
+
L < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
var H = S.ReactCurrentDispatcher, K;
|
|
@@ -204,8 +204,8 @@ function br() {
|
|
|
204
204
|
if (K === void 0)
|
|
205
205
|
try {
|
|
206
206
|
throw Error();
|
|
207
|
-
} catch (
|
|
208
|
-
var a =
|
|
207
|
+
} catch (f) {
|
|
208
|
+
var a = f.stack.trim().match(/\n( *(at )?)/);
|
|
209
209
|
K = a && a[1] || "";
|
|
210
210
|
}
|
|
211
211
|
return `
|
|
@@ -214,8 +214,8 @@ function br() {
|
|
|
214
214
|
}
|
|
215
215
|
var X = !1, U;
|
|
216
216
|
{
|
|
217
|
-
var
|
|
218
|
-
U = new
|
|
217
|
+
var qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
218
|
+
U = new qe();
|
|
219
219
|
}
|
|
220
220
|
function ye(e, r) {
|
|
221
221
|
if (!e || X)
|
|
@@ -227,10 +227,10 @@ function br() {
|
|
|
227
227
|
}
|
|
228
228
|
var a;
|
|
229
229
|
X = !0;
|
|
230
|
-
var
|
|
230
|
+
var f = Error.prepareStackTrace;
|
|
231
231
|
Error.prepareStackTrace = void 0;
|
|
232
232
|
var v;
|
|
233
|
-
v = H.current, H.current = null,
|
|
233
|
+
v = H.current, H.current = null, Ve();
|
|
234
234
|
try {
|
|
235
235
|
if (r) {
|
|
236
236
|
var s = function() {
|
|
@@ -283,15 +283,15 @@ function br() {
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
} finally {
|
|
286
|
-
X = !1, H.current = v,
|
|
286
|
+
X = !1, H.current = v, Ue(), Error.prepareStackTrace = f;
|
|
287
287
|
}
|
|
288
288
|
var I = e ? e.displayName || e.name : "", Ae = I ? V(I) : "";
|
|
289
289
|
return typeof e == "function" && U.set(e, Ae), Ae;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Be(e, r, t) {
|
|
292
292
|
return ye(e, !1);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Ge(e) {
|
|
295
295
|
var r = e.prototype;
|
|
296
296
|
return !!(r && r.isReactComponent);
|
|
297
297
|
}
|
|
@@ -299,7 +299,7 @@ function br() {
|
|
|
299
299
|
if (e == null)
|
|
300
300
|
return "";
|
|
301
301
|
if (typeof e == "function")
|
|
302
|
-
return ye(e,
|
|
302
|
+
return ye(e, Ge(e));
|
|
303
303
|
if (typeof e == "string")
|
|
304
304
|
return V(e);
|
|
305
305
|
switch (e) {
|
|
@@ -311,13 +311,13 @@ function br() {
|
|
|
311
311
|
if (typeof e == "object")
|
|
312
312
|
switch (e.$$typeof) {
|
|
313
313
|
case p:
|
|
314
|
-
return
|
|
314
|
+
return Be(e.render);
|
|
315
315
|
case _:
|
|
316
316
|
return q(e.type, r, t);
|
|
317
317
|
case O: {
|
|
318
|
-
var a = e,
|
|
318
|
+
var a = e, f = a._payload, v = a._init;
|
|
319
319
|
try {
|
|
320
|
-
return q(v(
|
|
320
|
+
return q(v(f), r, t);
|
|
321
321
|
} catch {
|
|
322
322
|
}
|
|
323
323
|
}
|
|
@@ -332,7 +332,7 @@ function br() {
|
|
|
332
332
|
} else
|
|
333
333
|
Re.setExtraStackFrame(null);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function ze(e, r, t, a, f) {
|
|
336
336
|
{
|
|
337
337
|
var v = Function.call.bind(B);
|
|
338
338
|
for (var s in e)
|
|
@@ -347,21 +347,21 @@ function br() {
|
|
|
347
347
|
} catch (m) {
|
|
348
348
|
o = m;
|
|
349
349
|
}
|
|
350
|
-
o && !(o instanceof Error) && (G(
|
|
350
|
+
o && !(o instanceof Error) && (G(f), c("%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).", a || "React class", t, s, typeof o), G(null)), o instanceof Error && !(o.message in be) && (be[o.message] = !0, G(f), c("Failed %s type: %s", t, o.message), G(null));
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
var
|
|
354
|
+
var Je = Array.isArray;
|
|
355
355
|
function Q(e) {
|
|
356
|
-
return
|
|
356
|
+
return Je(e);
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function He(e) {
|
|
359
359
|
{
|
|
360
360
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
361
361
|
return t;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Ke(e) {
|
|
365
365
|
try {
|
|
366
366
|
return _e(e), !1;
|
|
367
367
|
} catch {
|
|
@@ -372,17 +372,17 @@ function br() {
|
|
|
372
372
|
return "" + e;
|
|
373
373
|
}
|
|
374
374
|
function Te(e) {
|
|
375
|
-
if (
|
|
376
|
-
return
|
|
375
|
+
if (Ke(e))
|
|
376
|
+
return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), _e(e);
|
|
377
377
|
}
|
|
378
|
-
var $ = S.ReactCurrentOwner,
|
|
378
|
+
var $ = S.ReactCurrentOwner, Xe = {
|
|
379
379
|
key: !0,
|
|
380
380
|
ref: !0,
|
|
381
381
|
__self: !0,
|
|
382
382
|
__source: !0
|
|
383
383
|
}, we, Oe, Z;
|
|
384
384
|
Z = {};
|
|
385
|
-
function
|
|
385
|
+
function Qe(e) {
|
|
386
386
|
if (B.call(e, "ref")) {
|
|
387
387
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
388
388
|
if (r && r.isReactWarning)
|
|
@@ -390,7 +390,7 @@ function br() {
|
|
|
390
390
|
}
|
|
391
391
|
return e.ref !== void 0;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Ze(e) {
|
|
394
394
|
if (B.call(e, "key")) {
|
|
395
395
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
396
396
|
if (r && r.isReactWarning)
|
|
@@ -398,16 +398,16 @@ function br() {
|
|
|
398
398
|
}
|
|
399
399
|
return e.key !== void 0;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function er(e, r) {
|
|
402
402
|
if (typeof e.ref == "string" && $.current && r && $.current.stateNode !== r) {
|
|
403
403
|
var t = P($.current.type);
|
|
404
|
-
Z[t] || (
|
|
404
|
+
Z[t] || (c('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', P($.current.type), e.ref), Z[t] = !0);
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function rr(e, r) {
|
|
408
408
|
{
|
|
409
409
|
var t = function() {
|
|
410
|
-
we || (we = !0,
|
|
410
|
+
we || (we = !0, c("%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));
|
|
411
411
|
};
|
|
412
412
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
413
413
|
get: t,
|
|
@@ -415,10 +415,10 @@ function br() {
|
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function tr(e, r) {
|
|
419
419
|
{
|
|
420
420
|
var t = function() {
|
|
421
|
-
Oe || (Oe = !0,
|
|
421
|
+
Oe || (Oe = !0, c("%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));
|
|
422
422
|
};
|
|
423
423
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
424
424
|
get: t,
|
|
@@ -426,7 +426,7 @@ function br() {
|
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
var
|
|
429
|
+
var nr = function(e, r, t, a, f, v, s) {
|
|
430
430
|
var o = {
|
|
431
431
|
// This tag allows us to uniquely identify this as a React Element
|
|
432
432
|
$$typeof: d,
|
|
@@ -452,15 +452,15 @@ function br() {
|
|
|
452
452
|
configurable: !1,
|
|
453
453
|
enumerable: !1,
|
|
454
454
|
writable: !1,
|
|
455
|
-
value:
|
|
455
|
+
value: f
|
|
456
456
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
457
457
|
};
|
|
458
|
-
function
|
|
458
|
+
function ar(e, r, t, a, f) {
|
|
459
459
|
{
|
|
460
460
|
var v, s = {}, o = null, R = null;
|
|
461
|
-
t !== void 0 && (Te(t), o = "" + t),
|
|
461
|
+
t !== void 0 && (Te(t), o = "" + t), Ze(r) && (Te(r.key), o = "" + r.key), Qe(r) && (R = r.ref, er(r, f));
|
|
462
462
|
for (v in r)
|
|
463
|
-
B.call(r, v) && !
|
|
463
|
+
B.call(r, v) && !Xe.hasOwnProperty(v) && (s[v] = r[v]);
|
|
464
464
|
if (e && e.defaultProps) {
|
|
465
465
|
var m = e.defaultProps;
|
|
466
466
|
for (v in m)
|
|
@@ -468,9 +468,9 @@ function br() {
|
|
|
468
468
|
}
|
|
469
469
|
if (o || R) {
|
|
470
470
|
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
471
|
-
o &&
|
|
471
|
+
o && rr(s, E), R && tr(s, E);
|
|
472
472
|
}
|
|
473
|
-
return
|
|
473
|
+
return nr(e, o, R, f, a, $.current, s);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
var ee = S.ReactCurrentOwner, Ce = S.ReactDebugCurrentFrame;
|
|
@@ -498,7 +498,7 @@ Check the render method of \`` + e + "`.";
|
|
|
498
498
|
return "";
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function or(e) {
|
|
502
502
|
{
|
|
503
503
|
if (e !== void 0) {
|
|
504
504
|
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
|
|
@@ -510,7 +510,7 @@ Check your code at ` + r + ":" + t + ".";
|
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
var Pe = {};
|
|
513
|
-
function
|
|
513
|
+
function ir(e) {
|
|
514
514
|
{
|
|
515
515
|
var r = Se();
|
|
516
516
|
if (!r) {
|
|
@@ -527,12 +527,12 @@ Check the top-level render call using <` + t + ">.");
|
|
|
527
527
|
if (!e._store || e._store.validated || e.key != null)
|
|
528
528
|
return;
|
|
529
529
|
e._store.validated = !0;
|
|
530
|
-
var t =
|
|
530
|
+
var t = ir(r);
|
|
531
531
|
if (Pe[t])
|
|
532
532
|
return;
|
|
533
533
|
Pe[t] = !0;
|
|
534
534
|
var a = "";
|
|
535
|
-
e && e._owner && e._owner !== ee.current && (a = " It was passed a child from " + P(e._owner.type) + "."), F(e),
|
|
535
|
+
e && e._owner && e._owner !== ee.current && (a = " It was passed a child from " + P(e._owner.type) + "."), F(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), F(null);
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
function ke(e, r) {
|
|
@@ -547,14 +547,14 @@ Check the top-level render call using <` + t + ">.");
|
|
|
547
547
|
else if (te(e))
|
|
548
548
|
e._store && (e._store.validated = !0);
|
|
549
549
|
else if (e) {
|
|
550
|
-
var
|
|
551
|
-
if (typeof
|
|
552
|
-
for (var v =
|
|
550
|
+
var f = Y(e);
|
|
551
|
+
if (typeof f == "function" && f !== e.entries)
|
|
552
|
+
for (var v = f.call(e), s; !(s = v.next()).done; )
|
|
553
553
|
te(s.value) && je(s.value, r);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function ur(e) {
|
|
558
558
|
{
|
|
559
559
|
var r = e.type;
|
|
560
560
|
if (r == null || typeof r == "string")
|
|
@@ -570,39 +570,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
570
570
|
return;
|
|
571
571
|
if (t) {
|
|
572
572
|
var a = P(r);
|
|
573
|
-
|
|
573
|
+
ze(t, e.props, "prop", a, e);
|
|
574
574
|
} else if (r.PropTypes !== void 0 && !re) {
|
|
575
575
|
re = !0;
|
|
576
|
-
var
|
|
577
|
-
|
|
576
|
+
var f = P(r);
|
|
577
|
+
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
|
|
578
578
|
}
|
|
579
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
579
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
-
function
|
|
582
|
+
function sr(e) {
|
|
583
583
|
{
|
|
584
584
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
585
585
|
var a = r[t];
|
|
586
586
|
if (a !== "children" && a !== "key") {
|
|
587
|
-
F(e),
|
|
587
|
+
F(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), F(null);
|
|
588
588
|
break;
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
|
-
e.ref !== null && (F(e),
|
|
591
|
+
e.ref !== null && (F(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
-
function xe(e, r, t, a,
|
|
594
|
+
function xe(e, r, t, a, f, v) {
|
|
595
595
|
{
|
|
596
|
-
var s =
|
|
596
|
+
var s = Ye(e);
|
|
597
597
|
if (!s) {
|
|
598
598
|
var o = "";
|
|
599
599
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
600
|
-
var R =
|
|
600
|
+
var R = or(f);
|
|
601
601
|
R ? o += R : o += Se();
|
|
602
602
|
var m;
|
|
603
|
-
e === null ? m = "null" : Q(e) ? m = "array" : e !== void 0 && e.$$typeof === d ? (m = "<" + (P(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : m = typeof e,
|
|
603
|
+
e === null ? m = "null" : Q(e) ? m = "array" : e !== void 0 && e.$$typeof === d ? (m = "<" + (P(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : m = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", m, o);
|
|
604
604
|
}
|
|
605
|
-
var E =
|
|
605
|
+
var E = ar(e, r, t, f, v);
|
|
606
606
|
if (E == null)
|
|
607
607
|
return E;
|
|
608
608
|
if (s) {
|
|
@@ -614,27 +614,27 @@ Check the top-level render call using <` + t + ">.");
|
|
|
614
614
|
ke(C[I], e);
|
|
615
615
|
Object.freeze && Object.freeze(C);
|
|
616
616
|
} else
|
|
617
|
-
|
|
617
|
+
c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
618
618
|
else
|
|
619
619
|
ke(C, e);
|
|
620
620
|
}
|
|
621
|
-
return e === h ?
|
|
621
|
+
return e === h ? sr(E) : ur(E), E;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function lr(e, r, t) {
|
|
625
625
|
return xe(e, r, t, !0);
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function cr(e, r, t) {
|
|
628
628
|
return xe(e, r, t, !1);
|
|
629
629
|
}
|
|
630
|
-
var
|
|
631
|
-
W.Fragment = h, W.jsx =
|
|
630
|
+
var fr = cr, dr = lr;
|
|
631
|
+
W.Fragment = h, W.jsx = fr, W.jsxs = dr;
|
|
632
632
|
}()), W;
|
|
633
633
|
}
|
|
634
634
|
(function(n) {
|
|
635
635
|
process.env.NODE_ENV === "production" ? n.exports = yr() : n.exports = br();
|
|
636
636
|
})(Er);
|
|
637
|
-
const
|
|
637
|
+
const k = ae.jsx, J = vr({
|
|
638
638
|
axios: void 0,
|
|
639
639
|
children: void 0,
|
|
640
640
|
Navigate: void 0,
|
|
@@ -647,38 +647,38 @@ const D = ae.jsx, J = dr({
|
|
|
647
647
|
children: d,
|
|
648
648
|
translate: g,
|
|
649
649
|
useAuth: h,
|
|
650
|
-
Outlet:
|
|
650
|
+
Outlet: l,
|
|
651
651
|
Navigate: u,
|
|
652
652
|
useLocation: i,
|
|
653
653
|
useGoogleTagManager: y
|
|
654
654
|
}) => {
|
|
655
|
-
const p =
|
|
655
|
+
const p = Le(
|
|
656
656
|
() => ({
|
|
657
657
|
axios: n,
|
|
658
658
|
Navigate: u,
|
|
659
|
-
Outlet:
|
|
659
|
+
Outlet: l,
|
|
660
660
|
translate: g,
|
|
661
661
|
useAuth: h,
|
|
662
662
|
useGoogleTagManager: y,
|
|
663
663
|
useLocation: i
|
|
664
664
|
}),
|
|
665
|
-
[u,
|
|
665
|
+
[u, l, n, g, h, y, i]
|
|
666
666
|
);
|
|
667
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ k(J.Provider, { value: p, children: d });
|
|
668
668
|
}, z = (n) => `RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Tr = ({
|
|
669
669
|
Fallback: n,
|
|
670
670
|
loginPath: d = "/login",
|
|
671
671
|
localStorageKey: g = "user",
|
|
672
672
|
redirect401Path: h = "/login",
|
|
673
|
-
...
|
|
673
|
+
...l
|
|
674
674
|
}) => {
|
|
675
|
-
var
|
|
675
|
+
var x, A, Y, S;
|
|
676
676
|
const {
|
|
677
|
-
axios: u =
|
|
678
|
-
useLocation: i =
|
|
679
|
-
useAuth: y =
|
|
680
|
-
Outlet: p =
|
|
681
|
-
Navigate: T =
|
|
677
|
+
axios: u = l.axios,
|
|
678
|
+
useLocation: i = l.useLocation,
|
|
679
|
+
useAuth: y = l.useAuth,
|
|
680
|
+
Outlet: p = l.Outlet,
|
|
681
|
+
Navigate: T = l.Navigate
|
|
682
682
|
} = oe(J);
|
|
683
683
|
if (y === void 0)
|
|
684
684
|
throw new Error(z("useAuth"));
|
|
@@ -691,13 +691,13 @@ const D = ae.jsx, J = dr({
|
|
|
691
691
|
const [b, _] = pr(null), { isLogged: O } = y(), w = i();
|
|
692
692
|
return ie(() => {
|
|
693
693
|
u == null || u.interceptors.response.use(
|
|
694
|
-
(
|
|
695
|
-
async (
|
|
694
|
+
(c) => c,
|
|
695
|
+
async (c) => {
|
|
696
696
|
var M;
|
|
697
|
-
return typeof
|
|
697
|
+
return typeof c == "object" && c && "response" in c && c.response && typeof c.response == "object" && "status" in c.response && c.response && typeof c.response == "object" && "status" in c.response && ((M = c == null ? void 0 : c.response) == null ? void 0 : M.status) === 401 && (u.defaults.headers.common.Authorization = null, localStorage.removeItem(g), _(h)), Promise.reject(c);
|
|
698
698
|
}
|
|
699
699
|
);
|
|
700
|
-
}, [u == null ? void 0 : u.defaults, u == null ? void 0 : u.interceptors.response, g, h]), O && !b ? /* @__PURE__ */
|
|
700
|
+
}, [u == null ? void 0 : u.defaults, u == null ? void 0 : u.interceptors.response, g, h]), O && !b ? /* @__PURE__ */ k(gr, { fallback: n, children: (A = (x = w.state) == null ? void 0 : x.from) != null && A.state && ((S = (Y = w.state) == null ? void 0 : Y.from) == null ? void 0 : S.pathname) === d ? /* @__PURE__ */ k(T, { to: w.state.from.state.from.pathname + w.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ k(p, {}) }) : /* @__PURE__ */ k(T, { to: d, state: { from: w }, replace: !0 });
|
|
701
701
|
}, ne = (n) => `GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, wr = ({ ...n }) => {
|
|
702
702
|
const {
|
|
703
703
|
useLocation: d = n.useLocation,
|
|
@@ -710,10 +710,10 @@ const D = ae.jsx, J = dr({
|
|
|
710
710
|
throw new Error(ne("Outlet"));
|
|
711
711
|
if (h === void 0)
|
|
712
712
|
throw new Error(ne("useGoogleTagManager"));
|
|
713
|
-
const { pathname:
|
|
713
|
+
const { pathname: l } = d(), { sendEvent: u } = h();
|
|
714
714
|
return hr(() => {
|
|
715
|
-
u({ event: "pageView", pathname:
|
|
716
|
-
}, [
|
|
715
|
+
u({ event: "pageView", pathname: l });
|
|
716
|
+
}, [l, u]), /* @__PURE__ */ k(g, {});
|
|
717
717
|
}, Or = ({
|
|
718
718
|
axios: n,
|
|
719
719
|
baseURL: d,
|
|
@@ -722,7 +722,7 @@ const D = ae.jsx, J = dr({
|
|
|
722
722
|
}) => (ie(() => {
|
|
723
723
|
if (!n.defaults)
|
|
724
724
|
return;
|
|
725
|
-
const
|
|
725
|
+
const l = localStorage.getItem(g), u = l ? JSON.parse(l) : null, i = u && typeof u == "object" && "tokenType" in u && u.tokenType ? u.tokenType : null, y = u && typeof u == "object" && "accessToken" in u && u.accessToken ? u.accessToken : null, p = l ? `${i} ${y}` : null;
|
|
726
726
|
n.defaults.baseURL = d, n.defaults.headers.post["Content-Type"] = h, p && (n.defaults.headers.common.Authorization = p);
|
|
727
727
|
}, [
|
|
728
728
|
n.defaults,
|
|
@@ -751,21 +751,28 @@ const D = ae.jsx, J = dr({
|
|
|
751
751
|
returnNull: !1
|
|
752
752
|
}).then(() => {
|
|
753
753
|
document.documentElement.lang !== n.resolvedLanguage && n.resolvedLanguage && document.documentElement.setAttribute("lang", n.resolvedLanguage);
|
|
754
|
-
}), n.on("languageChanged", (
|
|
755
|
-
document.documentElement.setAttribute("lang",
|
|
754
|
+
}), n.on("languageChanged", (l) => {
|
|
755
|
+
document.documentElement.setAttribute("lang", l);
|
|
756
756
|
}), null), Sr = ({ dsn: n, sentry: d }) => (ie(() => {
|
|
757
757
|
d && process.env.NODE_ENV !== "development" && d.init({
|
|
758
758
|
dsn: n,
|
|
759
759
|
integrations: [new d.BrowserTracing()],
|
|
760
760
|
tracesSampleRate: 1
|
|
761
761
|
});
|
|
762
|
-
}, [n, d]), null), Pr = ({
|
|
762
|
+
}, [n, d]), null), Pr = ({ IMaskMixin: n, ...d }) => {
|
|
763
|
+
const g = Le(
|
|
764
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
765
|
+
() => n(({ TextField: h, ...l }) => /* @__PURE__ */ k(h, { ...l })),
|
|
766
|
+
[n]
|
|
767
|
+
);
|
|
768
|
+
return /* @__PURE__ */ k(g, { ...d });
|
|
769
|
+
}, jr = ({
|
|
763
770
|
children: n,
|
|
764
771
|
defaultOptions: d,
|
|
765
772
|
QueryClient: g,
|
|
766
773
|
QueryClientProvider: h
|
|
767
774
|
}) => {
|
|
768
|
-
const
|
|
775
|
+
const l = new g({
|
|
769
776
|
defaultOptions: {
|
|
770
777
|
queries: {
|
|
771
778
|
refetchOnWindowFocus: !1,
|
|
@@ -774,14 +781,14 @@ const D = ae.jsx, J = dr({
|
|
|
774
781
|
}
|
|
775
782
|
}
|
|
776
783
|
});
|
|
777
|
-
return /* @__PURE__ */
|
|
778
|
-
},
|
|
784
|
+
return /* @__PURE__ */ k(h, { client: l, children: n });
|
|
785
|
+
}, kr = (n) => {
|
|
779
786
|
const { unknownErrorTranslationKey: d = "error.unknownError" } = n || {}, { translate: g = n == null ? void 0 : n.translate } = oe(J);
|
|
780
787
|
return { printError: mr(
|
|
781
|
-
(
|
|
782
|
-
var y, p, T, b, _, O, w,
|
|
783
|
-
const u = g ? g(d) : "Unknown error", { response: i } =
|
|
784
|
-
return
|
|
788
|
+
(l) => {
|
|
789
|
+
var y, p, T, b, _, O, w, x, A;
|
|
790
|
+
const u = g ? g(d) : "Unknown error", { response: i } = l || {};
|
|
791
|
+
return l != null && l.reason ? String(l.reason) : (y = i == null ? void 0 : i.data) != null && y.reason ? String(i.data.reason) : (p = i == null ? void 0 : i.data) != null && p.message ? String(i.data.message) : (b = (T = i == null ? void 0 : i.data) == null ? void 0 : T.detail) != null && b.length && Array.isArray((_ = i == null ? void 0 : i.data) == null ? void 0 : _.detail) && ((w = (O = i == null ? void 0 : i.data) == null ? void 0 : O.detail[0]) != null && w.msg) && typeof ((A = (x = i == null ? void 0 : i.data) == null ? void 0 : x.detail[0]) == null ? void 0 : A.msg) == "string" ? String(i.data.detail[0].msg) : u;
|
|
785
792
|
},
|
|
786
793
|
[g, d]
|
|
787
794
|
) };
|
|
@@ -792,8 +799,9 @@ export {
|
|
|
792
799
|
Cr as I18nConfig,
|
|
793
800
|
J as InjectDependenciesContext,
|
|
794
801
|
_r as InjectDependenciesProvider,
|
|
795
|
-
Pr as
|
|
802
|
+
Pr as MaskTextField,
|
|
803
|
+
jr as QueryClientConfigProvider,
|
|
796
804
|
Tr as RequireAuth,
|
|
797
805
|
Sr as SentryConfig,
|
|
798
|
-
|
|
806
|
+
kr as useResponseError
|
|
799
807
|
};
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(_,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],y):(_=typeof globalThis<"u"?globalThis:_||self,y(_["@tracktor/shared-module"]={},_.React))})(this,function(_,y){"use strict";var
|
|
1
|
+
(function(_,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],y):(_=typeof globalThis<"u"?globalThis:_||self,y(_["@tracktor/shared-module"]={},_.React))})(this,function(_,y){"use strict";var q={},Ie={get exports(){return q},set exports(n){q=n}},N={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -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 N;ue=1;var n=y,d=Symbol.for("react.element"),g=Symbol.for("react.fragment"),h=Object.prototype.hasOwnProperty,
|
|
9
|
+
*/var ue;function Le(){if(ue)return N;ue=1;var n=y,d=Symbol.for("react.element"),g=Symbol.for("react.fragment"),h=Object.prototype.hasOwnProperty,c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function i(b,p,C){var R,w={},S=null,O=null;C!==void 0&&(S=""+C),p.key!==void 0&&(S=""+p.key),p.ref!==void 0&&(O=p.ref);for(R in p)h.call(p,R)&&!u.hasOwnProperty(R)&&(w[R]=p[R]);if(b&&b.defaultProps)for(R in p=b.defaultProps,p)w[R]===void 0&&(w[R]=p[R]);return{$$typeof:d,type:b,key:S,ref:O,props:w,_owner:c.current}}return N.Fragment=g,N.jsx=i,N.jsxs=i,N}var W={};/**
|
|
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 se;function Me(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var n=y,d=Symbol.for("react.element"),g=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),
|
|
18
|
-
`+ee+e}}var re=!1,H;{var
|
|
17
|
+
*/var se;function Me(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var n=y,d=Symbol.for("react.element"),g=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),b=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),D=Symbol.iterator,F="@@iterator";function B(e){if(e===null||typeof e!="object")return null;var r=D&&e[D]||e[F];return typeof r=="function"?r:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function l(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];ce("error",e,t)}}function ce(e,r,t){{var a=k.ReactDebugCurrentFrame,f=a.getStackAddendum();f!==""&&(r+="%s",t=t.concat([f]));var v=t.map(function(s){return String(s)});v.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,v)}}var le=!1,z=!1,He=!1,Ke=!1,Xe=!1,fe;fe=Symbol.for("react.module.reference");function Qe(e){return!!(typeof e=="string"||typeof e=="function"||e===h||e===u||Xe||e===c||e===C||e===R||Ke||e===O||le||z||He||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===w||e.$$typeof===i||e.$$typeof===b||e.$$typeof===p||e.$$typeof===fe||e.getModuleId!==void 0))}function qe(e,r,t){var a=e.displayName;if(a)return a;var f=r.displayName||r.name||"";return f!==""?t+"("+f+")":t}function de(e){return e.displayName||"Context"}function x(e){if(e==null)return null;if(typeof e.tag=="number"&&l("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 h:return"Fragment";case g:return"Portal";case u:return"Profiler";case c:return"StrictMode";case C:return"Suspense";case R:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b:var r=e;return de(r)+".Consumer";case i:var t=e;return de(t._context)+".Provider";case p:return qe(e,e.render,"ForwardRef");case w:var a=e.displayName||null;return a!==null?a:x(e.type)||"Memo";case S:{var f=e,v=f._payload,s=f._init;try{return x(s(v))}catch{return null}}}return null}var I=Object.assign,V=0,ve,pe,ge,he,me,Ee,ye;function be(){}be.__reactDisabledLog=!0;function Ze(){{if(V===0){ve=console.log,pe=console.info,ge=console.warn,he=console.error,me=console.group,Ee=console.groupCollapsed,ye=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})}V++}}function $e(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:ve}),info:I({},e,{value:pe}),warn:I({},e,{value:ge}),error:I({},e,{value:he}),group:I({},e,{value:me}),groupCollapsed:I({},e,{value:Ee}),groupEnd:I({},e,{value:ye})})}V<0&&l("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=k.ReactCurrentDispatcher,ee;function J(e,r,t){{if(ee===void 0)try{throw Error()}catch(f){var a=f.stack.trim().match(/\n( *(at )?)/);ee=a&&a[1]||""}return`
|
|
18
|
+
`+ee+e}}var re=!1,H;{var er=typeof WeakMap=="function"?WeakMap:Map;H=new er}function Re(e,r){if(!e||re)return"";{var t=H.get(e);if(t!==void 0)return t}var a;re=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var v;v=$.current,$.current=null,Ze();try{if(r){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(A){a=A}Reflect.construct(e,[],s)}else{try{s.call()}catch(A){a=A}e.call(s.prototype)}}else{try{throw Error()}catch(A){a=A}e()}}catch(A){if(A&&a&&typeof A.stack=="string"){for(var o=A.stack.split(`
|
|
19
19
|
`),T=a.stack.split(`
|
|
20
20
|
`),m=o.length-1,E=T.length-1;m>=1&&E>=0&&o[m]!==T[E];)E--;for(;m>=1&&E>=0;m--,E--)if(o[m]!==T[E]){if(m!==1||E!==1)do if(m--,E--,E<0||o[m]!==T[E]){var P=`
|
|
21
|
-
`+o[m].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(m>=1&&E>=0);break}}}finally{re=!1
|
|
21
|
+
`+o[m].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(m>=1&&E>=0);break}}}finally{re=!1,$.current=v,$e(),Error.prepareStackTrace=f}var M=e?e.displayName||e.name:"",Fe=M?J(M):"";return typeof e=="function"&&H.set(e,Fe),Fe}function rr(e,r,t){return Re(e,!1)}function tr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return Re(e,tr(e));if(typeof e=="string")return J(e);switch(e){case C:return J("Suspense");case R:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return rr(e.render);case w:return K(e.type,r,t);case S:{var a=e,f=a._payload,v=a._init;try{return K(v(f),r,t)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,_e={},Te=k.ReactDebugCurrentFrame;function Q(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}function nr(e,r,t,a,f){{var v=Function.call.bind(X);for(var s in e)if(v(e,s)){var o=void 0;try{if(typeof e[s]!="function"){var T=Error((a||"React class")+": "+t+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}o=e[s](r,s,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){o=m}o&&!(o instanceof Error)&&(Q(f),l("%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).",a||"React class",t,s,typeof o),Q(null)),o instanceof Error&&!(o.message in _e)&&(_e[o.message]=!0,Q(f),l("Failed %s type: %s",t,o.message),Q(null))}}}var ar=Array.isArray;function te(e){return ar(e)}function or(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ir(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Ce(e){if(ir(e))return l("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",or(e)),we(e)}var U=k.ReactCurrentOwner,ur={key:!0,ref:!0,__self:!0,__source:!0},Oe,Se,ne;ne={};function sr(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function cr(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function lr(e,r){if(typeof e.ref=="string"&&U.current&&r&&U.current.stateNode!==r){var t=x(U.current.type);ne[t]||(l('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),ne[t]=!0)}}function fr(e,r){{var t=function(){Oe||(Oe=!0,l("%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 dr(e,r){{var t=function(){Se||(Se=!0,l("%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 vr=function(e,r,t,a,f,v,s){var o={$$typeof:d,type:e,key:r,ref:t,props:s,_owner:v};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function pr(e,r,t,a,f){{var v,s={},o=null,T=null;t!==void 0&&(Ce(t),o=""+t),cr(r)&&(Ce(r.key),o=""+r.key),sr(r)&&(T=r.ref,lr(r,f));for(v in r)X.call(r,v)&&!ur.hasOwnProperty(v)&&(s[v]=r[v]);if(e&&e.defaultProps){var m=e.defaultProps;for(v in m)s[v]===void 0&&(s[v]=m[v])}if(o||T){var E=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&fr(s,E),T&&dr(s,E)}return vr(e,o,T,f,a,U.current,s)}}var ae=k.ReactCurrentOwner,Pe=k.ReactDebugCurrentFrame;function L(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 oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===d}function je(){{if(ae.current){var e=x(ae.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function gr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+r+":"+t+"."}return""}}var ke={};function
|
|
25
|
+
Check your code at `+r+":"+t+"."}return""}}var ke={};function hr(e){{var r=je();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
|
|
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=hr(r);if(ke[t])return;ke[t]=!0;var a="";e&&e._owner&&e._owner!==ae.current&&(a=" It was passed a child from "+x(e._owner.type)+"."),L(e),l('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),L(null)}}function Ae(e,r){{if(typeof e!="object")return;if(te(e))for(var t=0;t<e.length;t++){var a=e[t];ie(a)&&xe(a,r)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var f=B(e);if(typeof f=="function"&&f!==e.entries)for(var v=f.call(e),s;!(s=v.next()).done;)ie(s.value)&&xe(s.value,r)}}}function mr(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===p||r.$$typeof===w))t=r.propTypes;else return;if(t){var a=x(r);nr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!oe){oe=!0;var f=x(r);l("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&l("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Er(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){L(e),l("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),L(null);break}}e.ref!==null&&(L(e),l("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}function De(e,r,t,a,f,v){{var s=Qe(e);if(!s){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" 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=gr(f);T?o+=T:o+=je();var m;e===null?m="null":te(e)?m="array":e!==void 0&&e.$$typeof===d?(m="<"+(x(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,l("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,o)}var E=pr(e,r,t,f,v);if(E==null)return E;if(s){var P=r.children;if(P!==void 0)if(a)if(te(P)){for(var M=0;M<P.length;M++)Ae(P[M],e);Object.freeze&&Object.freeze(P)}else l("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 Ae(P,e)}return e===h?Er(E):mr(E),E}}function yr(e,r,t){return De(e,r,t,!0)}function br(e,r,t){return De(e,r,t,!1)}var Rr=br,_r=yr;W.Fragment=h,W.jsx=Rr,W.jsxs=_r}()),W}(function(n){process.env.NODE_ENV==="production"?n.exports=Le():n.exports=Me()})(Ie);const j=q.jsx,Y=y.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:d,translate:g,useAuth:h,Outlet:c,Navigate:u,useLocation:i,useGoogleTagManager:b})=>{const p=y.useMemo(()=>({axios:n,Navigate:u,Outlet:c,translate:g,useAuth:h,useGoogleTagManager:b,useLocation:i}),[u,c,n,g,h,b,i]);return j(Y.Provider,{value:p,children:d})},G=n=>`RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,We=({Fallback:n,loginPath:d="/login",localStorageKey:g="user",redirect401Path:h="/login",...c})=>{var D,F,B,k;const{axios:u=c.axios,useLocation:i=c.useLocation,useAuth:b=c.useAuth,Outlet:p=c.Outlet,Navigate:C=c.Navigate}=y.useContext(Y);if(b===void 0)throw new Error(G("useAuth"));if(i===void 0)throw new Error(G("useLocation"));if(p===void 0)throw new Error(G("Outlet"));if(C===void 0)throw new Error(G("Navigate"));const[R,w]=y.useState(null),{isLogged:S}=b(),O=i();return y.useLayoutEffect(()=>{u==null||u.interceptors.response.use(l=>l,async l=>{var z;return typeof l=="object"&&l&&"response"in l&&l.response&&typeof l.response=="object"&&"status"in l.response&&l.response&&typeof l.response=="object"&&"status"in l.response&&((z=l==null?void 0:l.response)==null?void 0:z.status)===401&&(u.defaults.headers.common.Authorization=null,localStorage.removeItem(g),w(h)),Promise.reject(l)})},[u==null?void 0:u.defaults,u==null?void 0:u.interceptors.response,g,h]),S&&!R?j(y.Suspense,{fallback:n,children:(F=(D=O.state)==null?void 0:D.from)!=null&&F.state&&((k=(B=O.state)==null?void 0:B.from)==null?void 0:k.pathname)===d?j(C,{to:O.state.from.state.from.pathname+O.state.from.state.from.search,replace:!0}):j(p,{})}):j(C,{to:d,state:{from:O},replace:!0})},Z=n=>`GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ye=({...n})=>{const{useLocation:d=n.useLocation,Outlet:g=n.Outlet,useGoogleTagManager:h=n.useGoogleTagManager}=y.useContext(Y);if(d===void 0)throw new Error(Z("useLocation"));if(g===void 0)throw new Error(Z("Outlet"));if(h===void 0)throw new Error(Z("useGoogleTagManager"));const{pathname:c}=d(),{sendEvent:u}=h();return y.useEffect(()=>{u({event:"pageView",pathname:c})},[c,u]),j(g,{})},Ve=({axios:n,baseURL:d,userLocalStorageKey:g="user",postContentType:h="application/json"})=>(y.useLayoutEffect(()=>{if(!n.defaults)return;const c=localStorage.getItem(g),u=c?JSON.parse(c):null,i=u&&typeof u=="object"&&"tokenType"in u&&u.tokenType?u.tokenType:null,b=u&&typeof u=="object"&&"accessToken"in u&&u.accessToken?u.accessToken:null,p=c?`${i} ${b}`:null;n.defaults.baseURL=d,n.defaults.headers.post["Content-Type"]=h,p&&(n.defaults.headers.common.Authorization=p)},[n.defaults,n.defaults.baseURL,n.defaults.headers.common,n.defaults.headers.post,d,h,g]),null),Ue=({i18n:n,initReactI18next:d,resources:g,LanguageDetector:h})=>(n.use(h).use(d).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:g,returnNull:!1}).then(()=>{document.documentElement.lang!==n.resolvedLanguage&&n.resolvedLanguage&&document.documentElement.setAttribute("lang",n.resolvedLanguage)}),n.on("languageChanged",c=>{document.documentElement.setAttribute("lang",c)}),null),Ge=({dsn:n,sentry:d})=>(y.useLayoutEffect(()=>{d&&process.env.NODE_ENV!=="development"&&d.init({dsn:n,integrations:[new d.BrowserTracing],tracesSampleRate:1})},[n,d]),null),Be=({IMaskMixin:n,...d})=>{const g=y.useMemo(()=>n(({TextField:h,...c})=>j(h,{...c})),[n]);return j(g,{...d})},ze=({children:n,defaultOptions:d,QueryClient:g,QueryClientProvider:h})=>{const c=new g({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...d}}});return j(h,{client:c,children:n})},Je=n=>{const{unknownErrorTranslationKey:d="error.unknownError"}=n||{},{translate:g=n==null?void 0:n.translate}=y.useContext(Y);return{printError:y.useCallback(c=>{var b,p,C,R,w,S,O,D,F;const u=g?g(d):"Unknown error",{response:i}=c||{};return c!=null&&c.reason?String(c.reason):(b=i==null?void 0:i.data)!=null&&b.reason?String(i.data.reason):(p=i==null?void 0:i.data)!=null&&p.message?String(i.data.message):(R=(C=i==null?void 0:i.data)==null?void 0:C.detail)!=null&&R.length&&Array.isArray((w=i==null?void 0:i.data)==null?void 0:w.detail)&&((O=(S=i==null?void 0:i.data)==null?void 0:S.detail[0])!=null&&O.msg)&&typeof((F=(D=i==null?void 0:i.data)==null?void 0:D.detail[0])==null?void 0:F.msg)=="string"?String(i.data.detail[0].msg):u},[g,d])}};_.AxiosConfig=Ve,_.GTMSendPageView=Ye,_.I18nConfig=Ue,_.InjectDependenciesContext=Y,_.InjectDependenciesProvider=Ne,_.MaskTextField=Be,_.QueryClientConfigProvider=ze,_.RequireAuth=We,_.SentryConfig=Ge,_.useResponseError=Je,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|