@tracktor/shared-module 0.18.3 → 0.19.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/dist/{src/context → context}/InjectDependenciesProvider.d.ts +6 -1
  3. package/dist/hooks/useAdapter/index.d.ts +3 -0
  4. package/dist/hooks/useAdapter/useAdapter.d.ts +8 -0
  5. package/dist/{src/main.d.ts → main.d.ts} +2 -0
  6. package/dist/main.js +450 -460
  7. package/dist/main.umd.cjs +10 -10
  8. package/dist/utils/adapter/filePathAdapter.d.ts +10 -0
  9. package/dist/utils/adapter/index.d.ts +7 -0
  10. package/package.json +3 -3
  11. package/dist/src/utils/adapter/filePathAdapter.d.ts +0 -7
  12. package/dist/src/utils/adapter/index.d.ts +0 -4
  13. /package/dist/{src/components → components}/Inputs/MaskTextField.d.ts +0 -0
  14. /package/dist/{src/components → components}/Utils/AxiosConfig.d.ts +0 -0
  15. /package/dist/{src/components → components}/Utils/GTMSendPageView.d.ts +0 -0
  16. /package/dist/{src/components → components}/Utils/I18nConfig.d.ts +0 -0
  17. /package/dist/{src/components → components}/Utils/MapBoxConfig.d.ts +0 -0
  18. /package/dist/{src/components → components}/Utils/RequireAuth.d.ts +0 -0
  19. /package/dist/{src/components → components}/Utils/SentryConfig.d.ts +0 -0
  20. /package/dist/{src/config → config}/orval/index.d.ts +0 -0
  21. /package/dist/{src/config → config}/orval/mutator/axiosCustomInstance.d.ts +0 -0
  22. /package/dist/{src/config → config}/orval/orval.d.ts +0 -0
  23. /package/dist/{src/config → config}/orval/orval.test.d.ts +0 -0
  24. /package/dist/{src/context → context}/QueryClientConfigProvider.d.ts +0 -0
  25. /package/dist/{src/hooks → hooks}/useAuth/index.d.ts +0 -0
  26. /package/dist/{src/hooks → hooks}/useAuth/useAuth.d.ts +0 -0
  27. /package/dist/{src/hooks → hooks}/useInfiniteDataGrid/index.d.ts +0 -0
  28. /package/dist/{src/hooks → hooks}/useInfiniteDataGrid/useInfiniteDataGrid.d.ts +0 -0
  29. /package/dist/{src/hooks → hooks}/useResponseError/index.d.ts +0 -0
  30. /package/dist/{src/hooks → hooks}/useResponseError/useResponseError.d.ts +0 -0
  31. /package/dist/{src/hooks → hooks}/useResponseError/useResponseError.test.d.ts +0 -0
package/dist/main.umd.cjs CHANGED
@@ -1,4 +1,4 @@
1
- (function(R,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(R=typeof globalThis<"u"?globalThis:R||self,E(R["@tracktor/shared-module"]={},R.React))})(this,function(R,E){"use strict";var Q={exports:{}},Y={};/**
1
+ (function(b,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],h):(b=typeof globalThis<"u"?globalThis:b||self,h(b["@tracktor/shared-module"]={},b.React))})(this,function(b,h){"use strict";var q={exports:{}},Y={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -6,17 +6,17 @@
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 ce;function We(){return ce||(ce=1,process.env.NODE_ENV!=="production"&&function(){var a=E,i=Symbol.for("react.element"),o=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),t=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),I=Symbol.iterator,F="@@iterator";function L(e){if(e===null||typeof e!="object")return null;var r=I&&e[I]||e[F];return typeof r=="function"?r:null}var A=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];w("error",e,n)}}function w(e,r,n){{var s=A.ReactDebugCurrentFrame,p=s.getStackAddendum();p!==""&&(r+="%s",n=n.concat([p]));var g=n.map(function(d){return String(d)});g.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,g)}}var de=!1,ve=!1,$=!1,ir=!1,ur=!1,pe;pe=Symbol.for("react.module.reference");function sr(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===v||ur||e===c||e===y||e===h||ir||e===S||de||ve||$||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===O||e.$$typeof===m||e.$$typeof===t||e.$$typeof===l||e.$$typeof===pe||e.getModuleId!==void 0))}function cr(e,r,n){var s=e.displayName;if(s)return s;var p=r.displayName||r.name||"";return p!==""?n+"("+p+")":n}function ge(e){return e.displayName||"Context"}function x(e){if(e==null)return null;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")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case o:return"Portal";case v:return"Profiler";case c:return"StrictMode";case y:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case t:var r=e;return ge(r)+".Consumer";case m:var n=e;return ge(n._context)+".Provider";case l:return cr(e,e.render,"ForwardRef");case O:var s=e.displayName||null;return s!==null?s:x(e.type)||"Memo";case j:{var p=e,g=p._payload,d=p._init;try{return x(d(g))}catch{return null}}}return null}var M=Object.assign,B=0,me,he,Ee,ye,Re,_e,be;function Ce(){}Ce.__reactDisabledLog=!0;function lr(){{if(B===0){me=console.log,he=console.info,Ee=console.warn,ye=console.error,Re=console.group,_e=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}B++}}function fr(){{if(B--,B===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:me}),info:M({},e,{value:he}),warn:M({},e,{value:Ee}),error:M({},e,{value:ye}),group:M({},e,{value:Re}),groupCollapsed:M({},e,{value:_e}),groupEnd:M({},e,{value:be})})}B<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=A.ReactCurrentDispatcher,te;function X(e,r,n){{if(te===void 0)try{throw Error()}catch(p){var s=p.stack.trim().match(/\n( *(at )?)/);te=s&&s[1]||""}return`
10
- `+te+e}}var ne=!1,H;{var dr=typeof WeakMap=="function"?WeakMap:Map;H=new dr}function we(e,r){if(!e||ne)return"";{var n=H.get(e);if(n!==void 0)return n}var s;ne=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=re.current,re.current=null,lr();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){s=D}Reflect.construct(e,[],d)}else{try{d.call()}catch(D){s=D}e.call(d.prototype)}}else{try{throw Error()}catch(D){s=D}e()}}catch(D){if(D&&s&&typeof D.stack=="string"){for(var f=D.stack.split(`
11
- `),T=s.stack.split(`
12
- `),_=f.length-1,b=T.length-1;_>=1&&b>=0&&f[_]!==T[b];)b--;for(;_>=1&&b>=0;_--,b--)if(f[_]!==T[b]){if(_!==1||b!==1)do if(_--,b--,b<0||f[_]!==T[b]){var P=`
13
- `+f[_].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(_>=1&&b>=0);break}}}finally{ne=!1,re.current=g,fr(),Error.prepareStackTrace=p}var V=e?e.displayName||e.name:"",Me=V?X(V):"";return typeof e=="function"&&H.set(e,Me),Me}function vr(e,r,n){return we(e,!1)}function pr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,n){if(e==null)return"";if(typeof e=="function")return we(e,pr(e));if(typeof e=="string")return X(e);switch(e){case y:return X("Suspense");case h:return X("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return vr(e.render);case O:return K(e.type,r,n);case j:{var s=e,p=s._payload,g=s._init;try{return K(g(p),r,n)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Te={},Oe=A.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,n=K(e.type,e._source,r?r.type:null);Oe.setExtraStackFrame(n)}else Oe.setExtraStackFrame(null)}function gr(e,r,n,s,p){{var g=Function.call.bind(Z);for(var d in e)if(g(e,d)){var f=void 0;try{if(typeof e[d]!="function"){var T=Error((s||"React class")+": "+n+" 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,s,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){f=_}f&&!(f instanceof Error)&&(q(p),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).",s||"React class",n,d,typeof f),q(null)),f instanceof Error&&!(f.message in Te)&&(Te[f.message]=!0,q(p),C("Failed %s type: %s",n,f.message),q(null))}}}var mr=Array.isArray;function ae(e){return mr(e)}function hr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function Er(e){try{return Se(e),!1}catch{return!0}}function Se(e){return""+e}function je(e){if(Er(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",hr(e)),Se(e)}var G=A.ReactCurrentOwner,yr={key:!0,ref:!0,__self:!0,__source:!0},Pe,ke,oe;oe={};function Rr(e){if(Z.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function _r(e){if(Z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function br(e,r){if(typeof e.ref=="string"&&G.current&&r&&G.current.stateNode!==r){var n=x(G.current.type);oe[n]||(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',x(G.current.type),e.ref),oe[n]=!0)}}function Cr(e,r){{var n=function(){Pe||(Pe=!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))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function wr(e,r){{var n=function(){ke||(ke=!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))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var Tr=function(e,r,n,s,p,g,d){var f={$$typeof:i,type:e,key:r,ref:n,props:d,_owner:g};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:s}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function Or(e,r,n,s,p){{var g,d={},f=null,T=null;n!==void 0&&(je(n),f=""+n),_r(r)&&(je(r.key),f=""+r.key),Rr(r)&&(T=r.ref,br(r,p));for(g in r)Z.call(r,g)&&!yr.hasOwnProperty(g)&&(d[g]=r[g]);if(e&&e.defaultProps){var _=e.defaultProps;for(g in _)d[g]===void 0&&(d[g]=_[g])}if(f||T){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&Cr(d,b),T&&wr(d,b)}return Tr(e,f,T,p,s,G.current,d)}}var ie=A.ReactCurrentOwner,Ae=A.ReactDebugCurrentFrame;function N(e){if(e){var r=e._owner,n=K(e.type,e._source,r?r.type:null);Ae.setExtraStackFrame(n)}else Ae.setExtraStackFrame(null)}var ue;ue=!1;function se(e){return typeof e=="object"&&e!==null&&e.$$typeof===i}function xe(){{if(ie.current){var e=x(ie.current.type);if(e)return`
9
+ */var ce;function Ne(){return ce||(ce=1,process.env.NODE_ENV!=="production"&&function(){var t=h,u=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),n=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),y=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 L(e){if(e===null||typeof e!="object")return null;var r=F&&e[F]||e[I];return typeof r=="function"?r:null}var k=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var r=arguments.length,a=new Array(r>1?r-1:0),c=1;c<r;c++)a[c-1]=arguments[c];w("error",e,a)}}function w(e,r,a){{var c=k.ReactDebugCurrentFrame,p=c.getStackAddendum();p!==""&&(r+="%s",a=a.concat([p]));var g=a.map(function(v){return String(v)});g.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,g)}}var fe=!1,de=!1,$=!1,nr=!1,ar=!1,ve;ve=Symbol.for("react.module.reference");function or(e){return!!(typeof e=="string"||typeof e=="function"||e===o||e===f||ar||e===s||e===m||e===y||nr||e===S||fe||de||$||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===O||e.$$typeof===E||e.$$typeof===n||e.$$typeof===l||e.$$typeof===ve||e.getModuleId!==void 0))}function ir(e,r,a){var c=e.displayName;if(c)return c;var p=r.displayName||r.name||"";return p!==""?a+"("+p+")":a}function pe(e){return e.displayName||"Context"}function x(e){if(e==null)return null;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")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case o:return"Fragment";case i:return"Portal";case f:return"Profiler";case s:return"StrictMode";case m:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case n:var r=e;return pe(r)+".Consumer";case E:var a=e;return pe(a._context)+".Provider";case l:return ir(e,e.render,"ForwardRef");case O:var c=e.displayName||null;return c!==null?c:x(e.type)||"Memo";case j:{var p=e,g=p._payload,v=p._init;try{return x(v(g))}catch{return null}}}return null}var N=Object.assign,z=0,ge,me,he,Ee,ye,be,Re;function _e(){}_e.__reactDisabledLog=!0;function ur(){{if(z===0){ge=console.log,me=console.info,he=console.warn,Ee=console.error,ye=console.group,be=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}}function sr(){{if(z--,z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:ge}),info:N({},e,{value:me}),warn:N({},e,{value:he}),error:N({},e,{value:Ee}),group:N({},e,{value:ye}),groupCollapsed:N({},e,{value:be}),groupEnd:N({},e,{value:Re})})}z<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=k.ReactCurrentDispatcher,te;function J(e,r,a){{if(te===void 0)try{throw Error()}catch(p){var c=p.stack.trim().match(/\n( *(at )?)/);te=c&&c[1]||""}return`
10
+ `+te+e}}var ne=!1,X;{var cr=typeof WeakMap=="function"?WeakMap:Map;X=new cr}function Ce(e,r){if(!e||ne)return"";{var a=X.get(e);if(a!==void 0)return a}var c;ne=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=re.current,re.current=null,ur();try{if(r){var v=function(){throw Error()};if(Object.defineProperty(v.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(v,[])}catch(D){c=D}Reflect.construct(e,[],v)}else{try{v.call()}catch(D){c=D}e.call(v.prototype)}}else{try{throw Error()}catch(D){c=D}e()}}catch(D){if(D&&c&&typeof D.stack=="string"){for(var d=D.stack.split(`
11
+ `),T=c.stack.split(`
12
+ `),R=d.length-1,_=T.length-1;R>=1&&_>=0&&d[R]!==T[_];)_--;for(;R>=1&&_>=0;R--,_--)if(d[R]!==T[_]){if(R!==1||_!==1)do if(R--,_--,_<0||d[R]!==T[_]){var P=`
13
+ `+d[R].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&X.set(e,P),P}while(R>=1&&_>=0);break}}}finally{ne=!1,re.current=g,sr(),Error.prepareStackTrace=p}var V=e?e.displayName||e.name:"",Le=V?J(V):"";return typeof e=="function"&&X.set(e,Le),Le}function lr(e,r,a){return Ce(e,!1)}function fr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function H(e,r,a){if(e==null)return"";if(typeof e=="function")return Ce(e,fr(e));if(typeof e=="string")return J(e);switch(e){case m:return J("Suspense");case y:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return lr(e.render);case O:return H(e.type,r,a);case j:{var c=e,p=c._payload,g=c._init;try{return H(g(p),r,a)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,we={},Te=k.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,a=H(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(a)}else Te.setExtraStackFrame(null)}function dr(e,r,a,c,p){{var g=Function.call.bind(K);for(var v in e)if(g(e,v)){var d=void 0;try{if(typeof e[v]!="function"){var T=Error((c||"React class")+": "+a+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}d=e[v](r,v,c,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){d=R}d&&!(d instanceof Error)&&(Z(p),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).",c||"React class",a,v,typeof d),Z(null)),d instanceof Error&&!(d.message in we)&&(we[d.message]=!0,Z(p),C("Failed %s type: %s",a,d.message),Z(null))}}}var vr=Array.isArray;function ae(e){return vr(e)}function pr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,a=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function gr(e){try{return Oe(e),!1}catch{return!0}}function Oe(e){return""+e}function Se(e){if(gr(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",pr(e)),Oe(e)}var B=k.ReactCurrentOwner,mr={key:!0,ref:!0,__self:!0,__source:!0},je,Pe,oe;oe={};function hr(e){if(K.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Er(e){if(K.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function yr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var a=x(B.current.type);oe[a]||(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',x(B.current.type),e.ref),oe[a]=!0)}}function br(e,r){{var a=function(){je||(je=!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))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function Rr(e,r){{var a=function(){Pe||(Pe=!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))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var _r=function(e,r,a,c,p,g,v){var d={$$typeof:u,type:e,key:r,ref:a,props:v,_owner:g};return d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(d,"_self",{configurable:!1,enumerable:!1,writable:!1,value:c}),Object.defineProperty(d,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d};function Cr(e,r,a,c,p){{var g,v={},d=null,T=null;a!==void 0&&(Se(a),d=""+a),Er(r)&&(Se(r.key),d=""+r.key),hr(r)&&(T=r.ref,yr(r,p));for(g in r)K.call(r,g)&&!mr.hasOwnProperty(g)&&(v[g]=r[g]);if(e&&e.defaultProps){var R=e.defaultProps;for(g in R)v[g]===void 0&&(v[g]=R[g])}if(d||T){var _=typeof e=="function"?e.displayName||e.name||"Unknown":e;d&&br(v,_),T&&Rr(v,_)}return _r(e,d,T,p,c,B.current,v)}}var ie=k.ReactCurrentOwner,Ae=k.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,a=H(e.type,e._source,r?r.type:null);Ae.setExtraStackFrame(a)}else Ae.setExtraStackFrame(null)}var ue;ue=!1;function se(e){return typeof e=="object"&&e!==null&&e.$$typeof===u}function ke(){{if(ie.current){var e=x(ie.current.type);if(e)return`
14
14
 
15
- Check the render method of \``+e+"`."}return""}}function Sr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
15
+ Check the render method of \``+e+"`."}return""}}function wr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),a=e.lineNumber;return`
16
16
 
17
- Check your code at `+r+":"+n+"."}return""}}var De={};function jr(e){{var r=xe();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
17
+ Check your code at `+r+":"+a+"."}return""}}var xe={};function Tr(e){{var r=ke();if(!r){var a=typeof e=="string"?e:e.displayName||e.name;a&&(r=`
18
18
 
19
- Check the top-level render call using <`+n+">.")}return r}}function Ie(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=jr(r);if(De[n])return;De[n]=!0;var s="";e&&e._owner&&e._owner!==ie.current&&(s=" It was passed a child from "+x(e._owner.type)+"."),N(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.',n,s),N(null)}}function Fe(e,r){{if(typeof e!="object")return;if(ae(e))for(var n=0;n<e.length;n++){var s=e[n];se(s)&&Ie(s,r)}else if(se(e))e._store&&(e._store.validated=!0);else if(e){var p=L(e);if(typeof p=="function"&&p!==e.entries)for(var g=p.call(e),d;!(d=g.next()).done;)se(d.value)&&Ie(d.value,r)}}}function Pr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===O))n=r.propTypes;else return;if(n){var s=x(r);gr(n,e.props,"prop",s,e)}else if(r.PropTypes!==void 0&&!ue){ue=!0;var p=x(r);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function kr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var s=r[n];if(s!=="children"&&s!=="key"){N(e),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),N(null);break}}e.ref!==null&&(N(e),C("Invalid attribute `ref` supplied to `React.Fragment`."),N(null))}}function Le(e,r,n,s,p,g){{var d=sr(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=Sr(p);T?f+=T:f+=xe();var _;e===null?_="null":ae(e)?_="array":e!==void 0&&e.$$typeof===i?(_="<"+(x(e.type)||"Unknown")+" />",f=" Did you accidentally export a JSX literal instead of a component?"):_=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",_,f)}var b=Or(e,r,n,p,g);if(b==null)return b;if(d){var P=r.children;if(P!==void 0)if(s)if(ae(P)){for(var V=0;V<P.length;V++)Fe(P[V],e);Object.freeze&&Object.freeze(P)}else 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.");else Fe(P,e)}return e===u?kr(b):Pr(b),b}}function Ar(e,r,n){return Le(e,r,n,!0)}function xr(e,r,n){return Le(e,r,n,!1)}var Dr=xr,Ir=Ar;Y.Fragment=u,Y.jsx=Dr,Y.jsxs=Ir}()),Y}var U={};/**
19
+ Check the top-level render call using <`+a+">.")}return r}}function De(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=Tr(r);if(xe[a])return;xe[a]=!0;var c="";e&&e._owner&&e._owner!==ie.current&&(c=" It was passed a child from "+x(e._owner.type)+"."),W(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.',a,c),W(null)}}function Fe(e,r){{if(typeof e!="object")return;if(ae(e))for(var a=0;a<e.length;a++){var c=e[a];se(c)&&De(c,r)}else if(se(e))e._store&&(e._store.validated=!0);else if(e){var p=L(e);if(typeof p=="function"&&p!==e.entries)for(var g=p.call(e),v;!(v=g.next()).done;)se(v.value)&&De(v.value,r)}}}function Or(e){{var r=e.type;if(r==null||typeof r=="string")return;var a;if(typeof r=="function")a=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===O))a=r.propTypes;else return;if(a){var c=x(r);dr(a,e.props,"prop",c,e)}else if(r.PropTypes!==void 0&&!ue){ue=!0;var p=x(r);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Sr(e){{for(var r=Object.keys(e.props),a=0;a<r.length;a++){var c=r[a];if(c!=="children"&&c!=="key"){W(e),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c),W(null);break}}e.ref!==null&&(W(e),C("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Ie(e,r,a,c,p,g){{var v=or(e);if(!v){var d="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(d+=" 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=wr(p);T?d+=T:d+=ke();var R;e===null?R="null":ae(e)?R="array":e!==void 0&&e.$$typeof===u?(R="<"+(x(e.type)||"Unknown")+" />",d=" Did you accidentally export a JSX literal instead of a component?"):R=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",R,d)}var _=Cr(e,r,a,p,g);if(_==null)return _;if(v){var P=r.children;if(P!==void 0)if(c)if(ae(P)){for(var V=0;V<P.length;V++)Fe(P[V],e);Object.freeze&&Object.freeze(P)}else 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.");else Fe(P,e)}return e===o?Sr(_):Or(_),_}}function jr(e,r,a){return Ie(e,r,a,!0)}function Pr(e,r,a){return Ie(e,r,a,!1)}var Ar=Pr,kr=jr;Y.Fragment=o,Y.jsx=Ar,Y.jsxs=kr}()),Y}var U={};/**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
22
22
  *
@@ -24,4 +24,4 @@ Check the top-level render call using <`+n+">.")}return r}}function Ie(e,r){{if(
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */var le;function Ne(){if(le)return U;le=1;var a=E,i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,c=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function m(t,l,y){var h,O={},j=null,S=null;y!==void 0&&(j=""+y),l.key!==void 0&&(j=""+l.key),l.ref!==void 0&&(S=l.ref);for(h in l)u.call(l,h)&&!v.hasOwnProperty(h)&&(O[h]=l[h]);if(t&&t.defaultProps)for(h in l=t.defaultProps,l)O[h]===void 0&&(O[h]=l[h]);return{$$typeof:i,type:t,key:j,ref:S,props:O,_owner:c.current}}return U.Fragment=o,U.jsx=m,U.jsxs=m,U}process.env.NODE_ENV==="production"?Q.exports=Ne():Q.exports=We();var k=Q.exports;const z=E.createContext({axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),Ve=({axios:a,children:i,translate:o,useAuth:u,Outlet:c,Navigate:v,useLocation:m,useGoogleTagManager:t})=>{const l=E.useMemo(()=>({axios:a,Navigate:v,Outlet:c,translate:o,useAuth:u,useGoogleTagManager:t,useLocation:m}),[v,c,a,o,u,t,m]);return k.jsx(z.Provider,{value:l,children:i})},J=a=>`RequireAuth require « ${a} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ye=({Fallback:a,loginPath:i="/login",localStorageKey:o="user",redirect401Path:u="/login",...c})=>{var F,L,A,C;const{axios:v=c.axios,useLocation:m=c.useLocation,useAuth:t=c.useAuth,Outlet:l=c.Outlet,Navigate:y=c.Navigate}=E.useContext(z);if(t===void 0)throw new Error(J("useAuth"));if(m===void 0)throw new Error(J("useLocation"));if(l===void 0)throw new Error(J("Outlet"));if(y===void 0)throw new Error(J("Navigate"));const[h,O]=E.useState(null),{isLogged:j}=t(),S=m(),I=E.useRef(!1);return E.useLayoutEffect(()=>{I.current||(I.current=!0,v==null||v.interceptors.response.use(w=>w,async w=>{var $;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&&(($=w==null?void 0:w.response)==null?void 0:$.status)===401&&(v.defaults.headers.common.Authorization=null,localStorage.removeItem(o),O(u)),Promise.reject(w)}))},[v==null?void 0:v.defaults.headers.common,v==null?void 0:v.interceptors.response,o,u]),j&&!h?k.jsx(E.Suspense,{fallback:a,children:(L=(F=S.state)==null?void 0:F.from)!=null&&L.state&&((C=(A=S.state)==null?void 0:A.from)==null?void 0:C.pathname)===i?k.jsx(y,{to:S.state.from.state.from.pathname+S.state.from.state.from.search,replace:!0}):k.jsx(l,{})}):k.jsx(y,{to:i,state:{from:S},replace:!0})},ee=a=>`GTMSendPageView require « ${a} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ue=({...a})=>{const{useLocation:i=a.useLocation,Outlet:o=a.Outlet,useGoogleTagManager:u=a.useGoogleTagManager}=E.useContext(z);if(i===void 0)throw new Error(ee("useLocation"));if(o===void 0)throw new Error(ee("Outlet"));if(u===void 0)throw new Error(ee("useGoogleTagManager"));const{pathname:c}=i(),{sendEvent:v}=u();return E.useEffect(()=>{v({event:"pageView",pathname:c})},[c,v]),k.jsx(o,{})},ze=({axios:a,baseURL:i,tokenTypeKey:o="tokenType",userLocalStorageKey:u="user",tokenKey:c="accessToken",postContentType:v="application/json"})=>{if(!a.defaults)return null;const m=localStorage.getItem(u),t=m?JSON.parse(m):null,l=t!=null&&t[o]?t[o]:null,y=t!=null&&t[c]?t[c]:null,h=m?`${l} ${y}`:null;return a.defaults.baseURL=i,a.defaults.headers.post["Content-Type"]=v,h&&(a.defaults.headers.common.Authorization=h),null},Be=({i18n:a,debug:i,initReactI18next:o,resources:u,LanguageDetector:c})=>(a!=null&&a.isInitialized||(a.use(c).use(o).init({debug:i,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:u,returnNull:!1}).then(()=>{document.documentElement.lang!==a.resolvedLanguage&&a.resolvedLanguage&&document.documentElement.setAttribute("lang",a.resolvedLanguage)}),a.on("languageChanged",v=>{document.documentElement.setAttribute("lang",v)})),null),Ge=({dsn:a,sentry:i,integrations:o,tracesSampleRate:u,routingInstrumentationDependencies:c,replaysSessionSampleRate:v,replaysOnErrorSampleRate:m,tracePropagationTargets:t,ignoreErrors:l,debug:y})=>(i.isInitialized()||(y||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&i.init({debug:y,dsn:a,ignoreErrors:l||[/Failed to fetch dynamically imported module/],integrations:[new i.BrowserTracing({routingInstrumentation:i.reactRouterV6Instrumentation(c.useEffect,c.useLocation,c.useNavigationType,c.createRoutesFromChildren,c.matchRoutes)}),i.replayIntegration(),...o||[]],replaysOnErrorSampleRate:m||1,replaysSessionSampleRate:v||.1,tracePropagationTargets:t,tracesSampleRate:u||1}),null),Je=({IMaskMixin:a,...i})=>{const o=E.useMemo(()=>a(({TextField:u,...c})=>k.jsx(u,{...c})),[a]);return k.jsx(o,{...i})},$e=({mapbox:a,accessToken:i})=>(a&&i&&(a.accessToken=i),null),Xe=({children:a,defaultOptions:i,QueryClient:o,QueryClientProvider:u})=>{const c=new o({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...i}}});return k.jsx(u,{client:c,children:a})},He=a=>{const{unknownErrorTranslationKey:i="error.unknownError"}=a||{},{translate:o=a==null?void 0:a.translate}=E.useContext(z),u=o?o(i):"Unknown error",c=E.useCallback(m=>{var l,y,h,O,j,S,I,F,L;const{response:t}=m||{};return t!=null&&t.reason?String(t.reason):(l=t==null?void 0:t.data)!=null&&l.reason?String(t.data.reason):(y=t==null?void 0:t.data)!=null&&y.message?String(t.data.message):(O=(h=t==null?void 0:t.data)==null?void 0:h.detail)!=null&&O.length&&Array.isArray((j=t==null?void 0:t.data)==null?void 0:j.detail)&&((I=(S=t==null?void 0:t.data)==null?void 0:S.detail[0])!=null&&I.msg)&&typeof((L=(F=t==null?void 0:t.data)==null?void 0:F.detail[0])==null?void 0:L.msg)=="string"?String(t.data.detail[0].msg):u},[u]),v=E.useCallback(m=>{var l,y,h;const{response:t}=m||{};return o&&(t!=null&&t.error_code)?o(t==null?void 0:t.error_code):o&&((l=t==null?void 0:t.data)!=null&&l.error_code)?o((y=t==null?void 0:t.data)==null?void 0:y.error_code):t!=null&&t.error_code?String(t==null?void 0:t.error_code):(h=t==null?void 0:t.data)!=null&&h.error_code?String(t.data.error_code):u},[u,o]);return{printError:c,printErrorCode:v}},Ke=({data:a,fetchNextPage:i,isFetchingNextPage:o,isInitialLoading:u,isLoading:c,enabled:v=!0})=>{const m=E.useCallback(async l=>{o||!v||await i({pageParam:(l==null?void 0:l.pageParam)||l.visibleRowsCount})},[v,i,o]),t=E.useMemo(()=>{if(a)return a.pages.reduce((l,y)=>[...l,...y],[])},[a]);return{fetchNextPageOnRowsScrollEnd:m,isLoading:o||c,loadingVariant:u?"skeleton":"linear",rows:t}},Ze=a=>{const i=E.useCallback(({tokenType:u,accessToken:c})=>{a.defaults.headers.common.Authorization=`${u} ${c}`},[a.defaults.headers.common]);return{clearAuthenticationToken:E.useCallback(()=>{a.defaults.headers.common.Authorization=null},[a.defaults.headers.common]),setAuthenticationToken:i}},qe=a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase(),Qe=a=>{const u=a.split("/").filter(c=>c.length>0).map(c=>c.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},er=(a,i,o)=>{const u=Qe(i),c=qe(o);return`${u}${c}`},rr=a=>{if(a)return(a==null?void 0:a.reduce((i,o)=>(i[o]={query:{useInfinite:!0,useInfiniteQueryParam:"offset"}},i),{}))||{}},tr=a=>{const{input:i="./openapi.json",operationsToGenerateInfiniteQueryHook:o=void 0}=a||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:i,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:er,...(o==null?void 0:o.length)&&{operations:rr(o)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}},W={react:"^18.2.0","react-dom":"^18.2.0"},fe={"@testing-library/jest-dom":"^5.17.0","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.5.1","@types/react":"^18.2.30","@types/react-dom":"^18.2.14","@vitejs/plugin-react":"^4.2.1","eslint-config-react-tracktor":"^1.7.1",husky:"^8.0.3",jsdom:"^22.1.0",typescript:"^5.3.3",vite:"^5.1.5","vite-plugin-dts":"^3.7.3","vite-plugin-static-copy":"^0.17.1",vitest:"^1.3.1"};var nr={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const ar=()=>"react-native"in W&&W["react-native"]&&"expo"in W&&W.expo?process.env.EXPO_PUBLIC_API_URL:"react"in W&&W.react&&"vite"in fe&&fe.vite?nr.VITE_API_URL:"",or=(a,i)=>{if(!a)return"";const o=a.startsWith("/")?a:`/${a}`,u=ar();return typeof i=="number"?`${u}${o.replace("/files",`/thumbs/${i}`)}`:`${u}${o}`};R.AxiosConfig=ze,R.GTMSendPageView=Ue,R.I18nConfig=Be,R.InjectDependenciesContext=z,R.InjectDependenciesProvider=Ve,R.MapBoxConfig=$e,R.MaskTextField=Je,R.QueryClientConfigProvider=Xe,R.RequireAuth=Ye,R.SentryConfig=Ge,R.filePathAdapter=or,R.getOrvalConfig=tr,R.useAuth=Ze,R.useInfiniteDataGrid=Ke,R.useResponseError=He,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
27
+ */var le;function Me(){if(le)return U;le=1;var t=h,u=Symbol.for("react.element"),i=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function E(n,l,m){var y,O={},j=null,S=null;m!==void 0&&(j=""+m),l.key!==void 0&&(j=""+l.key),l.ref!==void 0&&(S=l.ref);for(y in l)o.call(l,y)&&!f.hasOwnProperty(y)&&(O[y]=l[y]);if(n&&n.defaultProps)for(y in l=n.defaultProps,l)O[y]===void 0&&(O[y]=l[y]);return{$$typeof:u,type:n,key:j,ref:S,props:O,_owner:s.current}}return U.Fragment=i,U.jsx=E,U.jsxs=E,U}process.env.NODE_ENV==="production"?q.exports=Me():q.exports=Ne();var A=q.exports;const M=h.createContext({apiURL:void 0,axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),We=({axios:t,children:u,translate:i,useAuth:o,Outlet:s,Navigate:f,useLocation:E,useGoogleTagManager:n,apiURL:l})=>{const m=h.useMemo(()=>({apiURL:l,axios:t,Navigate:f,Outlet:s,translate:i,useAuth:o,useGoogleTagManager:n,useLocation:E}),[f,s,l,t,i,o,n,E]);return A.jsx(M.Provider,{value:m,children:u})},G=t=>`RequireAuth require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ve=({Fallback:t,loginPath:u="/login",localStorageKey:i="user",redirect401Path:o="/login",...s})=>{var I,L,k,C;const{axios:f=s.axios,useLocation:E=s.useLocation,useAuth:n=s.useAuth,Outlet:l=s.Outlet,Navigate:m=s.Navigate}=h.useContext(M);if(n===void 0)throw new Error(G("useAuth"));if(E===void 0)throw new Error(G("useLocation"));if(l===void 0)throw new Error(G("Outlet"));if(m===void 0)throw new Error(G("Navigate"));const[y,O]=h.useState(null),{isLogged:j}=n(),S=E(),F=h.useRef(!1);return h.useLayoutEffect(()=>{F.current||(F.current=!0,f==null||f.interceptors.response.use(w=>w,async w=>{var $;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&&(($=w==null?void 0:w.response)==null?void 0:$.status)===401&&(f.defaults.headers.common.Authorization=null,localStorage.removeItem(i),O(o)),Promise.reject(w)}))},[f==null?void 0:f.defaults.headers.common,f==null?void 0:f.interceptors.response,i,o]),j&&!y?A.jsx(h.Suspense,{fallback:t,children:(L=(I=S.state)==null?void 0:I.from)!=null&&L.state&&((C=(k=S.state)==null?void 0:k.from)==null?void 0:C.pathname)===u?A.jsx(m,{to:S.state.from.state.from.pathname+S.state.from.state.from.search,replace:!0}):A.jsx(l,{})}):A.jsx(m,{to:u,state:{from:S},replace:!0})},Q=t=>`GTMSendPageView require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ye=({...t})=>{const{useLocation:u=t.useLocation,Outlet:i=t.Outlet,useGoogleTagManager:o=t.useGoogleTagManager}=h.useContext(M);if(u===void 0)throw new Error(Q("useLocation"));if(i===void 0)throw new Error(Q("Outlet"));if(o===void 0)throw new Error(Q("useGoogleTagManager"));const{pathname:s}=u(),{sendEvent:f}=o();return h.useEffect(()=>{f({event:"pageView",pathname:s})},[s,f]),A.jsx(i,{})},Ue=({axios:t,baseURL:u,tokenTypeKey:i="tokenType",userLocalStorageKey:o="user",tokenKey:s="accessToken",postContentType:f="application/json"})=>{if(!t.defaults)return null;const E=localStorage.getItem(o),n=E?JSON.parse(E):null,l=n!=null&&n[i]?n[i]:null,m=n!=null&&n[s]?n[s]:null,y=E?`${l} ${m}`:null;return t.defaults.baseURL=u,t.defaults.headers.post["Content-Type"]=f,y&&(t.defaults.headers.common.Authorization=y),null},ze=({i18n:t,debug:u,initReactI18next:i,resources:o,LanguageDetector:s})=>(t!=null&&t.isInitialized||(t.use(s).use(i).init({debug:u,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:o,returnNull:!1}).then(()=>{document.documentElement.lang!==t.resolvedLanguage&&t.resolvedLanguage&&document.documentElement.setAttribute("lang",t.resolvedLanguage)}),t.on("languageChanged",f=>{document.documentElement.setAttribute("lang",f)})),null),Be=({dsn:t,sentry:u,integrations:i,tracesSampleRate:o,routingInstrumentationDependencies:s,replaysSessionSampleRate:f,replaysOnErrorSampleRate:E,tracePropagationTargets:n,ignoreErrors:l,debug:m})=>(u.isInitialized()||(m||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&u.init({debug:m,dsn:t,ignoreErrors:l||[/Failed to fetch dynamically imported module/],integrations:[new u.BrowserTracing({routingInstrumentation:u.reactRouterV6Instrumentation(s.useEffect,s.useLocation,s.useNavigationType,s.createRoutesFromChildren,s.matchRoutes)}),u.replayIntegration(),...i||[]],replaysOnErrorSampleRate:E||1,replaysSessionSampleRate:f||.1,tracePropagationTargets:n,tracesSampleRate:o||1}),null),Ge=({IMaskMixin:t,...u})=>{const i=h.useMemo(()=>t(({TextField:o,...s})=>A.jsx(o,{...s})),[t]);return A.jsx(i,{...u})},$e=({mapbox:t,accessToken:u})=>(t&&u&&(t.accessToken=u),null),Je=({children:t,defaultOptions:u,QueryClient:i,QueryClientProvider:o})=>{const s=new i({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...u}}});return A.jsx(o,{client:s,children:t})},Xe=t=>{const{unknownErrorTranslationKey:u="error.unknownError"}=t||{},{translate:i=t==null?void 0:t.translate}=h.useContext(M),o=i?i(u):"Unknown error",s=h.useCallback(E=>{var l,m,y,O,j,S,F,I,L;const{response:n}=E||{};return n!=null&&n.reason?String(n.reason):(l=n==null?void 0:n.data)!=null&&l.reason?String(n.data.reason):(m=n==null?void 0:n.data)!=null&&m.message?String(n.data.message):(O=(y=n==null?void 0:n.data)==null?void 0:y.detail)!=null&&O.length&&Array.isArray((j=n==null?void 0:n.data)==null?void 0:j.detail)&&((F=(S=n==null?void 0:n.data)==null?void 0:S.detail[0])!=null&&F.msg)&&typeof((L=(I=n==null?void 0:n.data)==null?void 0:I.detail[0])==null?void 0:L.msg)=="string"?String(n.data.detail[0].msg):o},[o]),f=h.useCallback(E=>{var l,m,y;const{response:n}=E||{};return i&&(n!=null&&n.error_code)?i(n==null?void 0:n.error_code):i&&((l=n==null?void 0:n.data)!=null&&l.error_code)?i((m=n==null?void 0:n.data)==null?void 0:m.error_code):n!=null&&n.error_code?String(n==null?void 0:n.error_code):(y=n==null?void 0:n.data)!=null&&y.error_code?String(n.data.error_code):o},[o,i]);return{printError:s,printErrorCode:f}},He=({data:t,fetchNextPage:u,isFetchingNextPage:i,isInitialLoading:o,isLoading:s,enabled:f=!0})=>{const E=h.useCallback(async l=>{i||!f||await u({pageParam:(l==null?void 0:l.pageParam)||l.visibleRowsCount})},[f,u,i]),n=h.useMemo(()=>{if(t)return t.pages.reduce((l,m)=>[...l,...m],[])},[t]);return{fetchNextPageOnRowsScrollEnd:E,isLoading:i||s,loadingVariant:o?"skeleton":"linear",rows:n}},Ke=t=>{const u=h.useCallback(({tokenType:o,accessToken:s})=>{t.defaults.headers.common.Authorization=`${o} ${s}`},[t.defaults.headers.common]);return{clearAuthenticationToken:h.useCallback(()=>{t.defaults.headers.common.Authorization=null},[t.defaults.headers.common]),setAuthenticationToken:u}},ee=(t,u)=>{if(!t)return"";const i=typeof t=="object"&&"pathname"in t?`${t.origin}${t.pathname}`:t,o=i.startsWith("/")?i:`/${i}`;return typeof u=="number"?`${t}${o.replace("/files",`/thumbs/${u}`)}`:`${t}${o}`},Ze=()=>{const{apiURL:t}=h.useContext(M);return{distanceAdapter:(o,s="km")=>{const f=Number(o);return Number.isNaN(f)?`0 ${s}`:`${f.toFixed(2)} ${s}`},filePathAdapter:(o,s)=>ee(t&&typeof o=="string"?{origin:t,pathname:o}:o,s)}},qe=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),Qe=t=>{const o=t.split("/").filter(s=>s.length>0).map(s=>s.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join("")).join("");return o.charAt(0).toLowerCase()+o.slice(1)},er=(t,u,i)=>{const o=Qe(u),s=qe(i);return`${o}${s}`},rr=t=>{if(t)return(t==null?void 0:t.reduce((u,i)=>(u[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset"}},u),{}))||{}},tr=t=>{const{input:u="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=t||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:u,output:{client:"react-query",mode:"tags-split",override:{header:o=>["Generated by orval 🍺",...o.title?[o.title]:[],...o.description?[o.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:er,...(i==null?void 0:i.length)&&{operations:rr(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};b.AxiosConfig=Ue,b.GTMSendPageView=Ye,b.I18nConfig=ze,b.InjectDependenciesContext=M,b.InjectDependenciesProvider=We,b.MapBoxConfig=$e,b.MaskTextField=Ge,b.QueryClientConfigProvider=Je,b.RequireAuth=Ve,b.SentryConfig=Be,b.filePathAdapter=ee,b.getOrvalConfig=tr,b.useAdapter=Ze,b.useAuth=Ke,b.useInfiniteDataGrid=He,b.useResponseError=Xe,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Adapt file path from server to display file on client
3
+ * @param href
4
+ * @param size - full or number for thumbs
5
+ */
6
+ declare const filePathAdapter: (href?: string | null | {
7
+ pathname: string;
8
+ origin: string;
9
+ }, size?: number | "full") => string;
10
+ export default filePathAdapter;
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ useInfiniteDataGrid: (href?: string | {
3
+ pathname: string;
4
+ origin: string;
5
+ } | null | undefined, size?: number | "full" | undefined) => string;
6
+ };
7
+ export default _default;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@tracktor/shared-module",
3
- "version": "0.18.3",
3
+ "version": "0.19.1",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
- "types": "./dist/src/main.d.ts",
6
+ "types": "./dist/main.d.ts",
7
7
  "main": "./dist/main.umd.cjs",
8
8
  "module": "./dist/main.js",
9
9
  "engines": {
@@ -16,7 +16,7 @@
16
16
  ".": {
17
17
  "import": "./dist/main.js",
18
18
  "require": "./dist/main.umd.cjs",
19
- "types": "./dist/src/main.d.ts"
19
+ "types": "./dist/main.d.ts"
20
20
  }
21
21
  },
22
22
  "repository": {
@@ -1,7 +0,0 @@
1
- /**
2
- * Adapt file path from server to display file on client
3
- * @param path
4
- * @param size - full or number for thumbs
5
- */
6
- declare const filePathAdapter: (path?: string | null, size?: number | "full") => string;
7
- export default filePathAdapter;
@@ -1,4 +0,0 @@
1
- declare const _default: {
2
- useInfiniteDataGrid: (path?: string | null | undefined, size?: number | "full" | undefined) => string;
3
- };
4
- export default _default;
File without changes
File without changes
File without changes
File without changes