react-luminus-components 2.0.3-beta.r19-7 → 2.0.3-beta.r19-8

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.
@@ -13,6 +13,7 @@ export { default as useFormControlType } from './useFormControlType/useFormContr
13
13
  export { default as useLocalStorageState } from './useLocalStorageState/useLocalStorageState';
14
14
  export { default as useSearchQuery } from './useSearchQuery/useSearchQuery';
15
15
  export { default as useSearchQueryState } from './useSearchQueryState/useSearchQueryState';
16
+ export { default as usePersistentState } from './usePersistentState/usePersistentState';
16
17
  export { default as useEmployeePhotoPath } from './useEmployeePhotoPath/useEmployeePhotoPath';
17
18
  export { default as useClipboard } from './useClipboard/useClipboard';
18
19
  export { default as useGetApiDataBound } from './useGetApiDataBound/useGetApiDataBound';
@@ -0,0 +1,2 @@
1
+ declare const usePersistentState: <T>(key: string, initialValue: T, storage?: Storage) => readonly [T, (newValue: T) => void];
2
+ export default usePersistentState;
package/dist/hooks.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./nivo-bar-DIm4VsOp.cjs"),b=require("./useLocalStorageState-DrNytfl8.cjs"),T=require("@tanstack/react-query"),C=require("./useEmployeePhotoPath-Q0EhpWOh.cjs");require("react/jsx-runtime");const a=require("react");require("react-router");const k=require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");function x(t,e){const o=r.useAxios({silent:!0,differentBaseUrl:e==null?void 0:e.customBaseUrl,customToken:e==null?void 0:e.customToken}),{data:n}=T.useSuspenseQuery({queryKey:[t],queryFn:()=>o.get(t).then(s=>s.data)});return n}const I=(t,e,o)=>{let n="pending",s;const f=t.then(l=>{n="success",s=l},l=>{const c=l==null?void 0:l.response;(c==null?void 0:c.status)===404&&o?(n="error-404",s=l):(n="error",s=l)});return()=>{switch(n){case"pending":throw f;case"success":return s;case"error":if(s.code==="ERR_CANCELED")return null;throw s;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},m={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},L=(t,{loadOnInit:e=m.loadOnInit,enabled:o=m.enabled,silent:n=m.silent,nullStateBeforeLoad:s=m.nullStateBeforeLoad,nullStateOnFail:f=m.nullStateOnFail,customApiUrl:l,customBearerToken:c,dataTransformer:d,errorBoundaryOn404:u}=m)=>{const i=r.useAxios({silent:n,customToken:c,differentBaseUrl:l,noToastOnStatus:u?[404]:void 0}),{startLoading:S,stopLoading:v}=a.useContext(r.LoadingContext),q=a.useRef(0),{isAuthenticated:w}=r.useAuth(),[A,y]=a.useState(null),p=a.useCallback(async(h,D)=>{if(!w()||o===!1)return;!n&&S(`loadData-${t}-${D}`),s&&y(null);const E=i.get(t,{signal:h}).then(P=>d?d(P.data):P.data).finally(()=>!n&&v(`loadData-${t}-${D}`));y(I(E,f??!1,u??!1))},[w,o,n,S,t,s,i,d,v,f,u]);return a.useEffect(()=>{if(e===!1)return;const h=new AbortController;return p(h.signal,++q.current),()=>{h.abort()}},[p,e]),{data:A,setData:y,reloadData:p}},B=()=>{const t=a.useRef({}).current;return a.useEffect(()=>{const e=document.createElement("div");return e.style.position="absolute",e.style.pointerEvents="none",e.style.top="0",e.style.width="100%",e.style.height="100%",t.elt=e,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[t]),e=>(o,...n)=>{const s=e(o,...n);return o.draggableProps.style.position==="fixed"?k.createPortal(s,t.elt):s}},g={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},O=(t,{storageKey:e=g.storageKey,requiredHeight:o=g.requiredHeight,retryInterval:n=g.retryInterval}=g)=>{const[s,f]=a.useState(!1),l=a.useRef(null),c=a.useCallback(()=>{const u=localStorage.getItem(e);return localStorage.removeItem(e),u===null?null:Number(u)},[e]),d=a.useCallback(u=>{localStorage.setItem(e,u)},[e]);return a.useEffect(()=>{const u=window.setInterval(()=>{if(!s&&t.current!==null&&t.current.getBoundingClientRect().height>o){f(!0);const i=c();i!==null&&t.current.scrollTo({top:i}),window.clearInterval(u)}},n);return()=>{window.clearTimeout(u)}},[s,o,c,n,t]),a.useEffect(()=>{var i;const u=new AbortController;return(i=t.current)==null||i.addEventListener("scrollend",()=>{var S;l.current=((S=t.current)==null?void 0:S.scrollTop)??0,d((l.current??0).toString())},{signal:u.signal}),()=>u.abort()},[d,t]),{saveValue:d,retrieveValue:c}};exports.cancelToken=r.cancelToken;exports.useAuth=r.useAuth;exports.useAxios=r.useAxios;exports.useClickOutside=r.useClickOutside;exports.useClipboard=r.useClipboard;exports.useConfirm=r.useConfirm;exports.useFormControlType=r.useFormControlType;exports.useKeyPress=r.useKeyPress;exports.useNotifications=r.useNotifications;exports.usePermissions=r.usePermissions;exports.usePrompt=r.usePrompt;exports.useWindowSize=r.useWindowSize;exports.useZodSchemaTypes=r.useZodSchemaTypes;exports.useGetApiData=b.useGetApiData;exports.useLocalStorageState=b.useLocalStorageState;exports.useEmployeePhotoPath=C.useEmployeePhotoPath;exports.useSearchQuery=C.useSearchQuery;exports.useSearchQueryState=C.useSearchQueryState;exports.useGetApiDataBound=L;exports.useGetDataBound=x;exports.useRenderDraggableInPortal=B;exports.useScrollSave=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./nivo-bar-DIm4VsOp.cjs"),E=require("./useLocalStorageState-DrNytfl8.cjs"),I=require("@tanstack/react-query"),w=require("./useEmployeePhotoPath-Q0EhpWOh.cjs"),r=require("react");require("react/jsx-runtime");require("react-router");const T=require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");function L(t,e){const u=o.useAxios({silent:!0,differentBaseUrl:e==null?void 0:e.customBaseUrl,customToken:e==null?void 0:e.customToken}),{data:n}=I.useSuspenseQuery({queryKey:[t],queryFn:()=>u.get(t).then(s=>s.data)});return n}const O=t=>e=>(window.addEventListener(`storage_${t}`,e),()=>window.removeEventListener(`storage_${t}`,e)),x=(t,e,u=localStorage)=>{const[n]=r.useState(e),s=r.useRef(JSON.stringify(e)),S=r.useRef(e),l=r.useCallback(()=>{const d=u.getItem(t);return d!==s.current&&(s.current=d,S.current=s.current?JSON.parse(s.current):n),S.current},[t,u,n]),c=r.useMemo(()=>O(t),[t]),i=r.useSyncExternalStore(c,l),a=r.useCallback(d=>{u.setItem(t,JSON.stringify(d)),window.dispatchEvent(new Event(`storage_${t}`))},[t,u]);return r.useMemo(()=>[i,a],[i,a])},R=(t,e,u)=>{let n="pending",s;const S=t.then(l=>{n="success",s=l},l=>{const c=l==null?void 0:l.response;(c==null?void 0:c.status)===404&&u?(n="error-404",s=l):(n="error",s=l)});return()=>{switch(n){case"pending":throw S;case"success":return s;case"error":if(s.code==="ERR_CANCELED")return null;throw s;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},m={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},V=(t,{loadOnInit:e=m.loadOnInit,enabled:u=m.enabled,silent:n=m.silent,nullStateBeforeLoad:s=m.nullStateBeforeLoad,nullStateOnFail:S=m.nullStateOnFail,customApiUrl:l,customBearerToken:c,dataTransformer:i,errorBoundaryOn404:a}=m)=>{const f=o.useAxios({silent:n,customToken:c,differentBaseUrl:l,noToastOnStatus:a?[404]:void 0}),{startLoading:d,stopLoading:C}=r.useContext(o.LoadingContext),D=r.useRef(0),{isAuthenticated:b}=o.useAuth(),[q,p]=r.useState(null),v=r.useCallback(async(g,y)=>{if(!b()||u===!1)return;!n&&d(`loadData-${t}-${y}`),s&&p(null);const A=f.get(t,{signal:g}).then(P=>i?i(P.data):P.data).finally(()=>!n&&C(`loadData-${t}-${y}`));p(R(A,S??!1,a??!1))},[b,u,n,d,t,s,f,i,C,S,a]);return r.useEffect(()=>{if(e===!1)return;const g=new AbortController;return v(g.signal,++D.current),()=>{g.abort()}},[v,e]),{data:q,setData:p,reloadData:v}},B=()=>{const t=r.useRef({}).current;return r.useEffect(()=>{const e=document.createElement("div");return e.style.position="absolute",e.style.pointerEvents="none",e.style.top="0",e.style.width="100%",e.style.height="100%",t.elt=e,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[t]),e=>(u,...n)=>{const s=e(u,...n);return u.draggableProps.style.position==="fixed"?T.createPortal(s,t.elt):s}},h={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},N=(t,{storageKey:e=h.storageKey,requiredHeight:u=h.requiredHeight,retryInterval:n=h.retryInterval}=h)=>{const[s,S]=r.useState(!1),l=r.useRef(null),c=r.useCallback(()=>{const a=localStorage.getItem(e);return localStorage.removeItem(e),a===null?null:Number(a)},[e]),i=r.useCallback(a=>{localStorage.setItem(e,a)},[e]);return r.useEffect(()=>{const a=window.setInterval(()=>{if(!s&&t.current!==null&&t.current.getBoundingClientRect().height>u){S(!0);const f=c();f!==null&&t.current.scrollTo({top:f}),window.clearInterval(a)}},n);return()=>{window.clearTimeout(a)}},[s,u,c,n,t]),r.useEffect(()=>{var f;const a=new AbortController;return(f=t.current)==null||f.addEventListener("scrollend",()=>{var d;l.current=((d=t.current)==null?void 0:d.scrollTop)??0,i((l.current??0).toString())},{signal:a.signal}),()=>a.abort()},[i,t]),{saveValue:i,retrieveValue:c}};exports.cancelToken=o.cancelToken;exports.useAuth=o.useAuth;exports.useAxios=o.useAxios;exports.useClickOutside=o.useClickOutside;exports.useClipboard=o.useClipboard;exports.useConfirm=o.useConfirm;exports.useFormControlType=o.useFormControlType;exports.useKeyPress=o.useKeyPress;exports.useNotifications=o.useNotifications;exports.usePermissions=o.usePermissions;exports.usePrompt=o.usePrompt;exports.useWindowSize=o.useWindowSize;exports.useZodSchemaTypes=o.useZodSchemaTypes;exports.useGetApiData=E.useGetApiData;exports.useLocalStorageState=E.useLocalStorageState;exports.useEmployeePhotoPath=w.useEmployeePhotoPath;exports.useSearchQuery=w.useSearchQuery;exports.useSearchQueryState=w.useSearchQueryState;exports.useGetApiDataBound=V;exports.useGetDataBound=L;exports.usePersistentState=x;exports.useRenderDraggableInPortal=B;exports.useScrollSave=N;
package/dist/hooks.es.js CHANGED
@@ -1,155 +1,164 @@
1
- import { an as x, ap as I, bc as k } from "./nivo-bar-BOjrASSM.js";
2
- import { bR as X, aQ as Y, bT as ee, am as te, bS as se, b6 as ae, aq as ne, bv as re, al as oe, aF as ue, aT as le } from "./nivo-bar-BOjrASSM.js";
3
- import { u as ie, a as de } from "./useLocalStorageState-DVcgyVda.js";
4
- import { useSuspenseQuery as L } from "@tanstack/react-query";
5
- import { b as fe, u as pe, a as ge } from "./useEmployeePhotoPath-DdMmh1qU.js";
1
+ import { an as I, ap as V, bc as A } from "./nivo-bar-BOjrASSM.js";
2
+ import { bR as nt, aQ as rt, bT as st, am as at, bS as ot, b6 as ut, aq as lt, bv as ct, al as it, aF as dt, aT as mt } from "./nivo-bar-BOjrASSM.js";
3
+ import { u as gt, a as pt } from "./useLocalStorageState-DVcgyVda.js";
4
+ import { useSuspenseQuery as O } from "@tanstack/react-query";
5
+ import { b as vt, u as wt, a as ht } from "./useEmployeePhotoPath-DdMmh1qU.js";
6
+ import { useState as b, useRef as f, useCallback as g, useMemo as x, useSyncExternalStore as $, useContext as N, useEffect as v } from "react";
6
7
  import "react/jsx-runtime";
7
- import { useContext as B, useRef as w, useState as T, useCallback as v, useEffect as g } from "react";
8
8
  import "react-router";
9
- import { createPortal as F } from "react-dom";
9
+ import { createPortal as B } from "react-dom";
10
10
  import "react-hook-form";
11
11
  import "react-flexmonster";
12
12
  import "@azure/msal-browser";
13
13
  import "@azure/msal-react";
14
- function Z(t, e) {
15
- const r = x({
14
+ function j(e, t) {
15
+ const s = I({
16
16
  silent: !0,
17
- differentBaseUrl: e == null ? void 0 : e.customBaseUrl,
18
- customToken: e == null ? void 0 : e.customToken
19
- }), { data: a } = L({
20
- queryKey: [t],
21
- queryFn: () => r.get(t).then((s) => s.data)
17
+ differentBaseUrl: t == null ? void 0 : t.customBaseUrl,
18
+ customToken: t == null ? void 0 : t.customToken
19
+ }), { data: r } = O({
20
+ queryKey: [e],
21
+ queryFn: () => s.get(e).then((n) => n.data)
22
22
  });
23
- return a;
23
+ return r;
24
24
  }
25
- const O = (t, e, r) => {
26
- let a = "pending", s;
27
- const i = t.then((o) => {
28
- a = "success", s = o;
25
+ const F = (e) => (t) => (window.addEventListener(`storage_${e}`, t), () => window.removeEventListener(`storage_${e}`, t)), K = (e, t, s = localStorage) => {
26
+ const [r] = b(t), n = f(JSON.stringify(t)), i = f(t), o = g(() => {
27
+ const c = s.getItem(e);
28
+ return c !== n.current && (n.current = c, i.current = n.current ? JSON.parse(n.current) : r), i.current;
29
+ }, [e, s, r]), u = x(() => F(e), [e]), l = $(u, o), a = g((c) => {
30
+ s.setItem(e, JSON.stringify(c)), window.dispatchEvent(new Event(`storage_${e}`));
31
+ }, [e, s]);
32
+ return x(() => [l, a], [l, a]);
33
+ }, q = (e, t, s) => {
34
+ let r = "pending", n;
35
+ const i = e.then((o) => {
36
+ r = "success", n = o;
29
37
  }, (o) => {
30
38
  const u = o == null ? void 0 : o.response;
31
- (u == null ? void 0 : u.status) === 404 && r ? (a = "error-404", s = o) : (a = "error", s = o);
39
+ (u == null ? void 0 : u.status) === 404 && s ? (r = "error-404", n = o) : (r = "error", n = o);
32
40
  });
33
41
  return () => {
34
- switch (a) {
42
+ switch (r) {
35
43
  case "pending":
36
44
  throw i;
37
45
  case "success":
38
- return s;
46
+ return n;
39
47
  case "error":
40
- if (s.code === "ERR_CANCELED")
48
+ if (n.code === "ERR_CANCELED")
41
49
  return null;
42
- throw s;
50
+ throw n;
43
51
  case "error-404":
44
52
  throw new Error("404");
45
53
  default:
46
54
  throw new Error("Unknown status");
47
55
  }
48
56
  };
49
- }, d = {
57
+ }, m = {
50
58
  loadOnInit: !0,
51
59
  silent: !1,
52
60
  enabled: !0,
53
61
  nullStateBeforeLoad: !0,
54
62
  nullStateOnFail: !1
55
- }, _ = (t, { loadOnInit: e = d.loadOnInit, enabled: r = d.enabled, silent: a = d.silent, nullStateBeforeLoad: s = d.nullStateBeforeLoad, nullStateOnFail: i = d.nullStateOnFail, customApiUrl: o, customBearerToken: u, dataTransformer: c, errorBoundaryOn404: n } = d) => {
56
- const l = x({
57
- silent: a,
63
+ }, X = (e, { loadOnInit: t = m.loadOnInit, enabled: s = m.enabled, silent: r = m.silent, nullStateBeforeLoad: n = m.nullStateBeforeLoad, nullStateOnFail: i = m.nullStateOnFail, customApiUrl: o, customBearerToken: u, dataTransformer: l, errorBoundaryOn404: a } = m) => {
64
+ const d = I({
65
+ silent: r,
58
66
  customToken: u,
59
67
  differentBaseUrl: o,
60
- noToastOnStatus: n ? [404] : void 0
61
- }), { startLoading: m, stopLoading: b } = B(I), E = w(0), { isAuthenticated: y } = k(), [P, h] = T(null), S = v(async (f, C) => {
62
- if (!y() || r === !1)
68
+ noToastOnStatus: a ? [404] : void 0
69
+ }), { startLoading: c, stopLoading: C } = N(V), P = f(0), { isAuthenticated: E } = A(), [T, w] = b(null), h = g(async (p, D) => {
70
+ if (!E() || s === !1)
63
71
  return;
64
- !a && m(`loadData-${t}-${C}`), s && h(null);
65
- const A = l.get(t, {
66
- signal: f
67
- }).then((D) => c ? c(D.data) : D.data).finally(() => !a && b(`loadData-${t}-${C}`));
68
- h(O(A, i ?? !1, n ?? !1));
72
+ !r && c(`loadData-${e}-${D}`), n && w(null);
73
+ const L = d.get(e, {
74
+ signal: p
75
+ }).then((y) => l ? l(y.data) : y.data).finally(() => !r && C(`loadData-${e}-${D}`));
76
+ w(q(L, i ?? !1, a ?? !1));
69
77
  }, [
70
- y,
71
- r,
72
- a,
73
- m,
74
- t,
78
+ E,
75
79
  s,
76
- l,
80
+ r,
77
81
  c,
78
- b,
82
+ e,
83
+ n,
84
+ d,
85
+ l,
86
+ C,
79
87
  i,
80
- n
88
+ a
81
89
  ]);
82
- return g(() => {
83
- if (e === !1)
90
+ return v(() => {
91
+ if (t === !1)
84
92
  return;
85
- const f = new AbortController();
86
- return S(f.signal, ++E.current), () => {
87
- f.abort();
93
+ const p = new AbortController();
94
+ return h(p.signal, ++P.current), () => {
95
+ p.abort();
88
96
  };
89
- }, [S, e]), { data: P, setData: h, reloadData: S };
90
- }, j = () => {
91
- const t = w({}).current;
92
- return g(() => {
93
- const e = document.createElement("div");
94
- return e.style.position = "absolute", e.style.pointerEvents = "none", e.style.top = "0", e.style.width = "100%", e.style.height = "100%", t.elt = e, document.body.appendChild(e), () => {
95
- document.body.removeChild(e);
97
+ }, [h, t]), { data: T, setData: w, reloadData: h };
98
+ }, Y = () => {
99
+ const e = f({}).current;
100
+ return v(() => {
101
+ const t = document.createElement("div");
102
+ return t.style.position = "absolute", t.style.pointerEvents = "none", t.style.top = "0", t.style.width = "100%", t.style.height = "100%", e.elt = t, document.body.appendChild(t), () => {
103
+ document.body.removeChild(t);
96
104
  };
97
- }, [t]), (e) => (r, ...a) => {
98
- const s = e(r, ...a);
99
- return r.draggableProps.style.position === "fixed" ? F(s, t.elt) : s;
105
+ }, [e]), (t) => (s, ...r) => {
106
+ const n = t(s, ...r);
107
+ return s.draggableProps.style.position === "fixed" ? B(n, e.elt) : n;
100
108
  };
101
- }, p = {
109
+ }, S = {
102
110
  storageKey: "--tmp-scroll-save--",
103
111
  requiredHeight: 100,
104
112
  retryInterval: 50
105
- }, J = (t, { storageKey: e = p.storageKey, requiredHeight: r = p.requiredHeight, retryInterval: a = p.retryInterval } = p) => {
106
- const [s, i] = T(!1), o = w(null), u = v(() => {
107
- const n = localStorage.getItem(e);
108
- return localStorage.removeItem(e), n === null ? null : Number(n);
109
- }, [e]), c = v((n) => {
110
- localStorage.setItem(e, n);
111
- }, [e]);
112
- return g(() => {
113
- const n = window.setInterval(() => {
114
- if (!s && t.current !== null && t.current.getBoundingClientRect().height > r) {
113
+ }, k = (e, { storageKey: t = S.storageKey, requiredHeight: s = S.requiredHeight, retryInterval: r = S.retryInterval } = S) => {
114
+ const [n, i] = b(!1), o = f(null), u = g(() => {
115
+ const a = localStorage.getItem(t);
116
+ return localStorage.removeItem(t), a === null ? null : Number(a);
117
+ }, [t]), l = g((a) => {
118
+ localStorage.setItem(t, a);
119
+ }, [t]);
120
+ return v(() => {
121
+ const a = window.setInterval(() => {
122
+ if (!n && e.current !== null && e.current.getBoundingClientRect().height > s) {
115
123
  i(!0);
116
- const l = u();
117
- l !== null && t.current.scrollTo({ top: l }), window.clearInterval(n);
124
+ const d = u();
125
+ d !== null && e.current.scrollTo({ top: d }), window.clearInterval(a);
118
126
  }
119
- }, a);
127
+ }, r);
120
128
  return () => {
121
- window.clearTimeout(n);
129
+ window.clearTimeout(a);
122
130
  };
123
- }, [s, r, u, a, t]), g(() => {
124
- var l;
125
- const n = new AbortController();
126
- return (l = t.current) == null || l.addEventListener("scrollend", () => {
127
- var m;
128
- o.current = ((m = t.current) == null ? void 0 : m.scrollTop) ?? 0, c((o.current ?? 0).toString());
129
- }, { signal: n.signal }), () => n.abort();
130
- }, [c, t]), { saveValue: c, retrieveValue: u };
131
+ }, [n, s, u, r, e]), v(() => {
132
+ var d;
133
+ const a = new AbortController();
134
+ return (d = e.current) == null || d.addEventListener("scrollend", () => {
135
+ var c;
136
+ o.current = ((c = e.current) == null ? void 0 : c.scrollTop) ?? 0, l((o.current ?? 0).toString());
137
+ }, { signal: a.signal }), () => a.abort();
138
+ }, [l, e]), { saveValue: l, retrieveValue: u };
131
139
  };
132
140
  export {
133
- X as cancelToken,
134
- k as useAuth,
135
- x as useAxios,
136
- Y as useClickOutside,
137
- ee as useClipboard,
138
- te as useConfirm,
139
- fe as useEmployeePhotoPath,
140
- se as useFormControlType,
141
- ie as useGetApiData,
142
- _ as useGetApiDataBound,
143
- Z as useGetDataBound,
144
- ae as useKeyPress,
145
- de as useLocalStorageState,
146
- ne as useNotifications,
147
- re as usePermissions,
148
- oe as usePrompt,
149
- j as useRenderDraggableInPortal,
150
- J as useScrollSave,
151
- pe as useSearchQuery,
152
- ge as useSearchQueryState,
153
- ue as useWindowSize,
154
- le as useZodSchemaTypes
141
+ nt as cancelToken,
142
+ A as useAuth,
143
+ I as useAxios,
144
+ rt as useClickOutside,
145
+ st as useClipboard,
146
+ at as useConfirm,
147
+ vt as useEmployeePhotoPath,
148
+ ot as useFormControlType,
149
+ gt as useGetApiData,
150
+ X as useGetApiDataBound,
151
+ j as useGetDataBound,
152
+ ut as useKeyPress,
153
+ pt as useLocalStorageState,
154
+ lt as useNotifications,
155
+ ct as usePermissions,
156
+ K as usePersistentState,
157
+ it as usePrompt,
158
+ Y as useRenderDraggableInPortal,
159
+ k as useScrollSave,
160
+ wt as useSearchQuery,
161
+ ht as useSearchQueryState,
162
+ dt as useWindowSize,
163
+ mt as useZodSchemaTypes
155
164
  };
@@ -14,4 +14,5 @@ export * from './localizationUtils/localizationUtils';
14
14
  export * from './apiUtils/apiUtils';
15
15
  export * from './localStorage/localStorageUtils';
16
16
  export * from './bnfTable/bnfTableUtils';
17
+ export { default as queryStorage } from './storages/queryStorage';
17
18
  export { default as CommonLuminusIconsArray } from './constants/CommonLuminusIconsArray';
@@ -0,0 +1,3 @@
1
+ type QueryStorageType = Storage;
2
+ declare const queryStorage: QueryStorageType;
3
+ export default queryStorage;
package/dist/utils.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar-DIm4VsOp.cjs"),l=require("react/jsx-runtime");require("react");require("@azure/msal-browser");require("@azure/msal-react");require("react-router");require("@tanstack/react-query");require("react-dom");require("react-hook-form");require("react-flexmonster");const u=require("./localStorageUtils-CkZslzIU.cjs"),d=t=>{var r,i;return l.jsx(e.SimpleTooltip,{text:((r=t.getValue())==null?void 0:r.toString())??"",placement:"bottom",children:l.jsx("div",{className:"w-100 text-truncate",children:((i=t.getValue())==null?void 0:i.toString())??""})})},S=t=>{var r;return l.jsx(l.Fragment,{children:(r=t.getValue())==null?void 0:r.toLocaleString("cs-CZ")})},h=t=>{var s;const r=((s=t.getValue())==null?void 0:s.toString())??"",i=e.format(new Date(r),"dd.MM.yyyy");return l.jsx(l.Fragment,{children:r?i:""})},p=(t,r)=>{let i=!1,s=t;t[0]==="#"&&(s=t.slice(1),i=!0);let a=parseInt(s.substring(0,2),16),o=parseInt(s.substring(2,4),16),n=parseInt(s.substring(4,6),16);a+=r,o+=r,n+=r,a>255?a=255:a<0&&(a=0),o>255?o=255:o<0&&(o=0),n>255?n=255:n<0&&(n=0);const c=a.toString(16).length===1?"0"+a.toString(16):a.toString(16),g=o.toString(16).length===1?"0"+o.toString(16):o.toString(16),f=n.toString(16).length===1?"0"+n.toString(16):n.toString(16);return(i?"#":"")+c+g+f},y=t=>{const r=t.slice(3),i=[];for(let a=0;a<r.length;a+=2)i.push(r.slice(a,a+2));return`#${i.reverse().join("")}`},b=t=>typeof t.directoryName=="string"&&typeof t.directoryPath=="string"&&typeof t.directoryTranslationKey=="string"&&Array.isArray(t.files),O=async t=>{let r={status:"pending"};try{r={status:"success",data:(await t).data}}catch(i){r={status:"error",error:i}}return r},m=t=>{var r,i,s;return{columnOrder:t.columnsOrder??[],columnVisibility:Object.fromEntries((t.hiddenColumns??[]).map(a=>[a,!1])),pageIndex:0,pageSize:t.defaultPageSize??50,columnSorting:t.defaultSort?[t.defaultSort]:[],columnFilters:t.defaultFilters??[],columnPinning:t.fixedColumns?{left:t.fixedColumns.left?[t.fixedColumns.left]:[],right:t.fixedColumns.right?[t.fixedColumns.right]:[]}:{left:[],right:[]},size:t.isDense?"sm":"md",mobileDisplayGroup:((r=t.onMobile)==null?void 0:r.defaultDisplayGroup)??"",mobileFilter:{globalFilter:""},mobileShowColumnNames:((i=t.onMobile)==null?void 0:i.showColumnNames)??!1,columnSizing:Object.fromEntries(((s=t.columnWidths)==null?void 0:s.map(a=>[a.column,a.width]))??[]),grouping:[],expanding:{},isFullScreen:!1}},F=(t,r)=>{const i=new URLSearchParams;return Object.keys(t).forEach(s=>{i.append(`BnfTable-${r||"Universal"}.${s}`,JSON.stringify(t[s]))}),i.toString()},D=(t,r)=>{const i=localStorage.getItem("BnfTable-SettingsMigration");if(i){const s=JSON.parse(i);if(s.done&&s.version>=r)return}console.log("Migrating BnfTable settings to Tanstack Table format..."),t.forEach(s=>{const a=localStorage.getItem(s);if(!a)return;const o=JSON.parse(a);if(!o||Object.keys(o).length<1)return;const n=m(o);Object.keys(n).forEach(c=>{localStorage.setItem(`BnfTable-${s}.${c}`,JSON.stringify(n[c]))})}),localStorage.setItem("BnfTable-SettingsMigration",JSON.stringify({done:!0,version:r}))},T=["edit","delete","info","warning","check","check-simple","add","cancel","cancel-simple","danger","chevron-left","chevron-right","chevron-up","chevron-down","chevron-double-left","chevron-double-right","folder","folder-filled","file-download","file-upload","star-outline","save","link","pending","resizer-horizontal","qr-code","phone","mail","mail-envelope","dashboard","user","role","close","search","plus","minus","menu","arrow-right"];exports.atobUtf8=e.atobUtf8;exports.buildEmployeeNameString=e.buildEmployeeNameString;exports.buildOrgUnitString=e.buildOrgUnitString;exports.buildVehicleNameString=e.buildVehicleNameString;exports.capitalizeFirstLetter=e.capitalizeFirstLetter;exports.compareDate=e.compareDate;exports.compareDateTime=e.compareDateTime;exports.extractErrorsFromResponse=e.extractErrorsFromResponse;exports.extractFilename=e.extractFilename;exports.extractPermissionsFromResponse=e.extractPermissionsFromResponse;exports.fixNameIdNulls=e.fixNameIdNulls;exports.formatDate=e.formatDate;exports.formatDateTime=e.formatDateTime;exports.formatFileSize=e.formatFileSize;exports.getDateString=e.getDateString;exports.getDaysDifference=e.getDaysDifference;exports.getFirstDayOfMonth=e.getFirstDayOfMonth;exports.getFirstDayOfOffsetMonth=e.getFirstDayOfOffsetMonth;exports.getFirstDayOfYear=e.getFirstDayOfYear;exports.getLastDayOfMonth=e.getLastDayOfMonth;exports.getLastDayOfOffsetMonth=e.getLastDayOfOffsetMonth;exports.getLastDayOfYear=e.getLastDayOfYear;exports.hasOnlyNullValues=e.hasOnlyNullValues;exports.hookFormSetServerErrors=e.hookFormSetServerErrors;exports.isExtensionOpenable=e.isExtensionOpenable;exports.isFileOpenable=e.isFileOpenable;exports.isISODate=e.isISODate;exports.isPrimitive=e.isPrimitive;exports.isValidDate=e.isValidDate;exports.joinStrings=e.joinStrings;exports.msToStartOfNextDay=e.msToStartOfNextDay;exports.replaceNullValuesOnlyObjectsWithNulls=e.replaceNullValuesOnlyObjectsWithNulls;exports.saveFile=e.saveFile;exports.saveFileFromResponse=e.saveFileFromResponse;exports.shortenText=e.shortenText;exports.stringContains=e.stringContains;exports.stringSearchWithin=e.stringSearchWithin;exports.stringStartsWith=e.stringStartsWith;exports.trimIsoDate=e.trimIsoDate;exports.truncateText=e.truncateText;exports.urlfyArray=e.urlfyArray;exports.dumpLocalStorage=u.dumpLocalStorage;exports.generateApiPath=u.generateApiPath;exports.hookFormSetNull=u.hookFormSetNull;exports.hookFormSetNulls=u.hookFormSetNulls;exports.limitNumber=u.limitNumber;exports.restoreLocalStorage=u.restoreLocalStorage;exports.CommonLuminusIconsArray=T;exports.adjustBrightness=p;exports.buildTableSearchQuery=F;exports.configToTanstackTableState=m;exports.dateValueFormat=h;exports.isFileStructureDirectory=b;exports.migrateBnfTableSettings=D;exports.numFormat=S;exports.responsePromiseWrapper=O;exports.valueTooltip=d;exports.vclToHex=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./nivo-bar-DIm4VsOp.cjs"),l=require("react/jsx-runtime");require("react");require("@azure/msal-browser");require("@azure/msal-react");require("react-router");require("@tanstack/react-query");require("react-dom");require("react-hook-form");require("react-flexmonster");const u=require("./localStorageUtils-CkZslzIU.cjs"),h=e=>{var r,a;return l.jsx(t.SimpleTooltip,{text:((r=e.getValue())==null?void 0:r.toString())??"",placement:"bottom",children:l.jsx("div",{className:"w-100 text-truncate",children:((a=e.getValue())==null?void 0:a.toString())??""})})},p=e=>{var r;return l.jsx(l.Fragment,{children:(r=e.getValue())==null?void 0:r.toLocaleString("cs-CZ")})},y=e=>{var n;const r=((n=e.getValue())==null?void 0:n.toString())??"",a=t.format(new Date(r),"dd.MM.yyyy");return l.jsx(l.Fragment,{children:r?a:""})},b=(e,r)=>{let a=!1,n=e;e[0]==="#"&&(n=e.slice(1),a=!0);let s=parseInt(n.substring(0,2),16),o=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16);s+=r,o+=r,i+=r,s>255?s=255:s<0&&(s=0),o>255?o=255:o<0&&(o=0),i>255?i=255:i<0&&(i=0);const m=s.toString(16).length===1?"0"+s.toString(16):s.toString(16),S=o.toString(16).length===1?"0"+o.toString(16):o.toString(16),d=i.toString(16).length===1?"0"+i.toString(16):i.toString(16);return(a?"#":"")+m+S+d},O=e=>{const r=e.slice(3),a=[];for(let s=0;s<r.length;s+=2)a.push(r.slice(s,s+2));return`#${a.reverse().join("")}`},F=e=>typeof e.directoryName=="string"&&typeof e.directoryPath=="string"&&typeof e.directoryTranslationKey=="string"&&Array.isArray(e.files),D=async e=>{let r={status:"pending"};try{r={status:"success",data:(await e).data}}catch(a){r={status:"error",error:a}}return r},f=e=>{var r,a,n;return{columnOrder:e.columnsOrder??[],columnVisibility:Object.fromEntries((e.hiddenColumns??[]).map(s=>[s,!1])),pageIndex:0,pageSize:e.defaultPageSize??50,columnSorting:e.defaultSort?[e.defaultSort]:[],columnFilters:e.defaultFilters??[],columnPinning:e.fixedColumns?{left:e.fixedColumns.left?[e.fixedColumns.left]:[],right:e.fixedColumns.right?[e.fixedColumns.right]:[]}:{left:[],right:[]},size:e.isDense?"sm":"md",mobileDisplayGroup:((r=e.onMobile)==null?void 0:r.defaultDisplayGroup)??"",mobileFilter:{globalFilter:""},mobileShowColumnNames:((a=e.onMobile)==null?void 0:a.showColumnNames)??!1,columnSizing:Object.fromEntries(((n=e.columnWidths)==null?void 0:n.map(s=>[s.column,s.width]))??[]),grouping:[],expanding:{},isFullScreen:!1}},T=(e,r)=>{const a=new URLSearchParams;return Object.keys(e).forEach(n=>{a.append(`BnfTable-${r||"Universal"}.${n}`,JSON.stringify(e[n]))}),a.toString()},x=(e,r)=>{const a=localStorage.getItem("BnfTable-SettingsMigration");if(a){const n=JSON.parse(a);if(n.done&&n.version>=r)return}console.log("Migrating BnfTable settings to Tanstack Table format..."),e.forEach(n=>{const s=localStorage.getItem(n);if(!s)return;const o=JSON.parse(s);if(!o||Object.keys(o).length<1)return;const i=f(o);Object.keys(i).forEach(m=>{localStorage.setItem(`BnfTable-${n}.${m}`,JSON.stringify(i[m]))})}),localStorage.setItem("BnfTable-SettingsMigration",JSON.stringify({done:!0,version:r}))},c=()=>new URLSearchParams(window.location.search),g=e=>{const r=window.location.pathname+(e.toString()?`?${e.toString()}`:"")+window.location.hash;window.history.replaceState(null,"",r)},N={get length(){return Array.from(c().keys()).length},key(e){const r=c();return Array.from(r.keys())[e]??null},getItem(e){const a=c().get(e);return a??null},setItem(e,r){const a=c();a.set(e,r),g(a)},removeItem(e){const r=c();r.delete(e),g(r)},clear(){g(new URLSearchParams)}},v=["edit","delete","info","warning","check","check-simple","add","cancel","cancel-simple","danger","chevron-left","chevron-right","chevron-up","chevron-down","chevron-double-left","chevron-double-right","folder","folder-filled","file-download","file-upload","star-outline","save","link","pending","resizer-horizontal","qr-code","phone","mail","mail-envelope","dashboard","user","role","close","search","plus","minus","menu","arrow-right"];exports.atobUtf8=t.atobUtf8;exports.buildEmployeeNameString=t.buildEmployeeNameString;exports.buildOrgUnitString=t.buildOrgUnitString;exports.buildVehicleNameString=t.buildVehicleNameString;exports.capitalizeFirstLetter=t.capitalizeFirstLetter;exports.compareDate=t.compareDate;exports.compareDateTime=t.compareDateTime;exports.extractErrorsFromResponse=t.extractErrorsFromResponse;exports.extractFilename=t.extractFilename;exports.extractPermissionsFromResponse=t.extractPermissionsFromResponse;exports.fixNameIdNulls=t.fixNameIdNulls;exports.formatDate=t.formatDate;exports.formatDateTime=t.formatDateTime;exports.formatFileSize=t.formatFileSize;exports.getDateString=t.getDateString;exports.getDaysDifference=t.getDaysDifference;exports.getFirstDayOfMonth=t.getFirstDayOfMonth;exports.getFirstDayOfOffsetMonth=t.getFirstDayOfOffsetMonth;exports.getFirstDayOfYear=t.getFirstDayOfYear;exports.getLastDayOfMonth=t.getLastDayOfMonth;exports.getLastDayOfOffsetMonth=t.getLastDayOfOffsetMonth;exports.getLastDayOfYear=t.getLastDayOfYear;exports.hasOnlyNullValues=t.hasOnlyNullValues;exports.hookFormSetServerErrors=t.hookFormSetServerErrors;exports.isExtensionOpenable=t.isExtensionOpenable;exports.isFileOpenable=t.isFileOpenable;exports.isISODate=t.isISODate;exports.isPrimitive=t.isPrimitive;exports.isValidDate=t.isValidDate;exports.joinStrings=t.joinStrings;exports.msToStartOfNextDay=t.msToStartOfNextDay;exports.replaceNullValuesOnlyObjectsWithNulls=t.replaceNullValuesOnlyObjectsWithNulls;exports.saveFile=t.saveFile;exports.saveFileFromResponse=t.saveFileFromResponse;exports.shortenText=t.shortenText;exports.stringContains=t.stringContains;exports.stringSearchWithin=t.stringSearchWithin;exports.stringStartsWith=t.stringStartsWith;exports.trimIsoDate=t.trimIsoDate;exports.truncateText=t.truncateText;exports.urlfyArray=t.urlfyArray;exports.dumpLocalStorage=u.dumpLocalStorage;exports.generateApiPath=u.generateApiPath;exports.hookFormSetNull=u.hookFormSetNull;exports.hookFormSetNulls=u.hookFormSetNulls;exports.limitNumber=u.limitNumber;exports.restoreLocalStorage=u.restoreLocalStorage;exports.CommonLuminusIconsArray=v;exports.adjustBrightness=b;exports.buildTableSearchQuery=T;exports.configToTanstackTableState=f;exports.dateValueFormat=y;exports.isFileStructureDirectory=F;exports.migrateBnfTableSettings=x;exports.numFormat=p;exports.queryStorage=N;exports.responsePromiseWrapper=D;exports.valueTooltip=h;exports.vclToHex=O;
package/dist/utils.es.js CHANGED
@@ -1,6 +1,6 @@
1
- import { aD as g, W as f } from "./nivo-bar-BOjrASSM.js";
2
- import { cg as L, ce as z, cf as W, cd as R, cc as $, bX as A, bY as G, bo as J, c3 as U, bU as Y, bD as Z, aW as q, cb as H, ci as K, c2 as Q, bZ as X, bg as _, b$ as ee, bh as te, b_ as re, c0 as se, c1 as ae, c7 as oe, bB as ie, c5 as ne, c4 as le, bV as ce, c6 as me, bW as ue, $ as ge, bO as fe, c8 as de, bk as pe, bn as he, ck as Se, c9 as be, aj as ye, ca as Oe, bf as De, ch as Fe, cj as xe } from "./nivo-bar-BOjrASSM.js";
3
- import { jsx as l, Fragment as c } from "react/jsx-runtime";
1
+ import { aD as f, W as p } from "./nivo-bar-BOjrASSM.js";
2
+ import { cg as U, ce as W, cf as $, cd as A, cc as G, bX as J, bY as Q, bo as Y, c3 as q, bU as Z, bD as H, aW as K, cb as X, ci as _, c2 as ee, bZ as te, bg as re, b$ as se, bh as ae, b_ as oe, c0 as ne, c1 as ie, c7 as le, bB as ce, c5 as me, c4 as ue, bV as ge, c6 as de, bW as fe, $ as pe, bO as he, c8 as Se, bk as be, bn as ye, ck as Oe, c9 as we, aj as De, ca as Fe, bf as ve, ch as xe, cj as Te } from "./nivo-bar-BOjrASSM.js";
3
+ import { jsx as c, Fragment as u } from "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@azure/msal-browser";
6
6
  import "@azure/msal-react";
@@ -9,30 +9,30 @@ import "@tanstack/react-query";
9
9
  import "react-dom";
10
10
  import "react-hook-form";
11
11
  import "react-flexmonster";
12
- import { d as Ne, g as ve, h as Ce, a as we, l as Me, r as Ie } from "./localStorageUtils-B7BmbR_u.js";
12
+ import { d as ke, g as Ce, h as Ie, a as Pe, l as Me, r as Be } from "./localStorageUtils-B7BmbR_u.js";
13
13
  const N = (e) => {
14
14
  var t, r;
15
- return /* @__PURE__ */ l(g, { text: ((t = e.getValue()) == null ? void 0 : t.toString()) ?? "", placement: "bottom", children: /* @__PURE__ */ l("div", { className: "w-100 text-truncate", children: ((r = e.getValue()) == null ? void 0 : r.toString()) ?? "" }) });
16
- }, v = (e) => {
15
+ return /* @__PURE__ */ c(f, { text: ((t = e.getValue()) == null ? void 0 : t.toString()) ?? "", placement: "bottom", children: /* @__PURE__ */ c("div", { className: "w-100 text-truncate", children: ((r = e.getValue()) == null ? void 0 : r.toString()) ?? "" }) });
16
+ }, k = (e) => {
17
17
  var t;
18
- return /* @__PURE__ */ l(c, { children: (t = e.getValue()) == null ? void 0 : t.toLocaleString("cs-CZ") });
18
+ return /* @__PURE__ */ c(u, { children: (t = e.getValue()) == null ? void 0 : t.toLocaleString("cs-CZ") });
19
19
  }, C = (e) => {
20
20
  var a;
21
- const t = ((a = e.getValue()) == null ? void 0 : a.toString()) ?? "", r = f(new Date(t), "dd.MM.yyyy");
22
- return /* @__PURE__ */ l(c, { children: t ? r : "" });
23
- }, w = (e, t) => {
21
+ const t = ((a = e.getValue()) == null ? void 0 : a.toString()) ?? "", r = p(new Date(t), "dd.MM.yyyy");
22
+ return /* @__PURE__ */ c(u, { children: t ? r : "" });
23
+ }, I = (e, t) => {
24
24
  let r = !1, a = e;
25
25
  e[0] === "#" && (a = e.slice(1), r = !0);
26
- let s = parseInt(a.substring(0, 2), 16), o = parseInt(a.substring(2, 4), 16), i = parseInt(a.substring(4, 6), 16);
27
- s += t, o += t, i += t, s > 255 ? s = 255 : s < 0 && (s = 0), o > 255 ? o = 255 : o < 0 && (o = 0), i > 255 ? i = 255 : i < 0 && (i = 0);
28
- const n = s.toString(16).length === 1 ? "0" + s.toString(16) : s.toString(16), m = o.toString(16).length === 1 ? "0" + o.toString(16) : o.toString(16), u = i.toString(16).length === 1 ? "0" + i.toString(16) : i.toString(16);
29
- return (r ? "#" : "") + n + m + u;
30
- }, M = (e) => {
26
+ let s = parseInt(a.substring(0, 2), 16), o = parseInt(a.substring(2, 4), 16), n = parseInt(a.substring(4, 6), 16);
27
+ s += t, o += t, n += t, s > 255 ? s = 255 : s < 0 && (s = 0), o > 255 ? o = 255 : o < 0 && (o = 0), n > 255 ? n = 255 : n < 0 && (n = 0);
28
+ const l = s.toString(16).length === 1 ? "0" + s.toString(16) : s.toString(16), g = o.toString(16).length === 1 ? "0" + o.toString(16) : o.toString(16), d = n.toString(16).length === 1 ? "0" + n.toString(16) : n.toString(16);
29
+ return (r ? "#" : "") + l + g + d;
30
+ }, P = (e) => {
31
31
  const t = e.slice(3), r = [];
32
32
  for (let s = 0; s < t.length; s += 2)
33
33
  r.push(t.slice(s, s + 2));
34
34
  return `#${r.reverse().join("")}`;
35
- }, I = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files), k = async (e) => {
35
+ }, M = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files), B = async (e) => {
36
36
  let t = { status: "pending" };
37
37
  try {
38
38
  t = { status: "success", data: (await e).data };
@@ -40,7 +40,7 @@ const N = (e) => {
40
40
  t = { status: "error", error: r };
41
41
  }
42
42
  return t;
43
- }, d = (e) => {
43
+ }, h = (e) => {
44
44
  var t, r, a;
45
45
  return {
46
46
  columnOrder: e.columnsOrder ?? [],
@@ -62,7 +62,7 @@ const N = (e) => {
62
62
  expanding: {},
63
63
  isFullScreen: !1
64
64
  };
65
- }, B = (e, t) => {
65
+ }, L = (e, t) => {
66
66
  const r = new URLSearchParams();
67
67
  return Object.keys(e).forEach((a) => {
68
68
  r.append(`BnfTable-${t || "Universal"}.${a}`, JSON.stringify(e[a]));
@@ -81,15 +81,41 @@ const N = (e) => {
81
81
  const o = JSON.parse(s);
82
82
  if (!o || Object.keys(o).length < 1)
83
83
  return;
84
- const i = d(o);
85
- Object.keys(i).forEach((n) => {
86
- localStorage.setItem(`BnfTable-${a}.${n}`, JSON.stringify(i[n]));
84
+ const n = h(o);
85
+ Object.keys(n).forEach((l) => {
86
+ localStorage.setItem(`BnfTable-${a}.${l}`, JSON.stringify(n[l]));
87
87
  });
88
88
  }), localStorage.setItem("BnfTable-SettingsMigration", JSON.stringify({
89
89
  done: !0,
90
90
  version: t
91
91
  }));
92
- }, P = [
92
+ }, i = () => new URLSearchParams(window.location.search), m = (e) => {
93
+ const t = window.location.pathname + (e.toString() ? `?${e.toString()}` : "") + window.location.hash;
94
+ window.history.replaceState(null, "", t);
95
+ }, j = {
96
+ get length() {
97
+ return Array.from(i().keys()).length;
98
+ },
99
+ key(e) {
100
+ const t = i();
101
+ return Array.from(t.keys())[e] ?? null;
102
+ },
103
+ getItem(e) {
104
+ const r = i().get(e);
105
+ return r ?? null;
106
+ },
107
+ setItem(e, t) {
108
+ const r = i();
109
+ r.set(e, t), m(r);
110
+ },
111
+ removeItem(e) {
112
+ const t = i();
113
+ t.delete(e), m(t);
114
+ },
115
+ clear() {
116
+ m(new URLSearchParams());
117
+ }
118
+ }, E = [
93
119
  "edit",
94
120
  "delete",
95
121
  "info",
@@ -130,62 +156,63 @@ const N = (e) => {
130
156
  "arrow-right"
131
157
  ];
132
158
  export {
133
- P as CommonLuminusIconsArray,
134
- w as adjustBrightness,
135
- L as atobUtf8,
136
- z as buildEmployeeNameString,
137
- W as buildOrgUnitString,
138
- B as buildTableSearchQuery,
139
- R as buildVehicleNameString,
140
- $ as capitalizeFirstLetter,
141
- A as compareDate,
142
- G as compareDateTime,
143
- d as configToTanstackTableState,
159
+ E as CommonLuminusIconsArray,
160
+ I as adjustBrightness,
161
+ U as atobUtf8,
162
+ W as buildEmployeeNameString,
163
+ $ as buildOrgUnitString,
164
+ L as buildTableSearchQuery,
165
+ A as buildVehicleNameString,
166
+ G as capitalizeFirstLetter,
167
+ J as compareDate,
168
+ Q as compareDateTime,
169
+ h as configToTanstackTableState,
144
170
  C as dateValueFormat,
145
- Ne as dumpLocalStorage,
146
- J as extractErrorsFromResponse,
147
- U as extractFilename,
148
- Y as extractPermissionsFromResponse,
149
- Z as fixNameIdNulls,
150
- q as formatDate,
151
- H as formatDateTime,
152
- K as formatFileSize,
153
- ve as generateApiPath,
154
- Q as getDateString,
155
- X as getDaysDifference,
156
- _ as getFirstDayOfMonth,
157
- ee as getFirstDayOfOffsetMonth,
158
- te as getFirstDayOfYear,
159
- re as getLastDayOfMonth,
160
- se as getLastDayOfOffsetMonth,
161
- ae as getLastDayOfYear,
162
- oe as hasOnlyNullValues,
163
- Ce as hookFormSetNull,
164
- we as hookFormSetNulls,
165
- ie as hookFormSetServerErrors,
166
- ne as isExtensionOpenable,
167
- le as isFileOpenable,
168
- I as isFileStructureDirectory,
169
- ce as isISODate,
170
- me as isPrimitive,
171
- ue as isValidDate,
172
- ge as joinStrings,
171
+ ke as dumpLocalStorage,
172
+ Y as extractErrorsFromResponse,
173
+ q as extractFilename,
174
+ Z as extractPermissionsFromResponse,
175
+ H as fixNameIdNulls,
176
+ K as formatDate,
177
+ X as formatDateTime,
178
+ _ as formatFileSize,
179
+ Ce as generateApiPath,
180
+ ee as getDateString,
181
+ te as getDaysDifference,
182
+ re as getFirstDayOfMonth,
183
+ se as getFirstDayOfOffsetMonth,
184
+ ae as getFirstDayOfYear,
185
+ oe as getLastDayOfMonth,
186
+ ne as getLastDayOfOffsetMonth,
187
+ ie as getLastDayOfYear,
188
+ le as hasOnlyNullValues,
189
+ Ie as hookFormSetNull,
190
+ Pe as hookFormSetNulls,
191
+ ce as hookFormSetServerErrors,
192
+ me as isExtensionOpenable,
193
+ ue as isFileOpenable,
194
+ M as isFileStructureDirectory,
195
+ ge as isISODate,
196
+ de as isPrimitive,
197
+ fe as isValidDate,
198
+ pe as joinStrings,
173
199
  Me as limitNumber,
174
200
  V as migrateBnfTableSettings,
175
- fe as msToStartOfNextDay,
176
- v as numFormat,
177
- de as replaceNullValuesOnlyObjectsWithNulls,
178
- k as responsePromiseWrapper,
179
- Ie as restoreLocalStorage,
180
- pe as saveFile,
181
- he as saveFileFromResponse,
182
- Se as shortenText,
183
- be as stringContains,
184
- ye as stringSearchWithin,
185
- Oe as stringStartsWith,
186
- De as trimIsoDate,
187
- Fe as truncateText,
188
- xe as urlfyArray,
201
+ he as msToStartOfNextDay,
202
+ k as numFormat,
203
+ j as queryStorage,
204
+ Se as replaceNullValuesOnlyObjectsWithNulls,
205
+ B as responsePromiseWrapper,
206
+ Be as restoreLocalStorage,
207
+ be as saveFile,
208
+ ye as saveFileFromResponse,
209
+ Oe as shortenText,
210
+ we as stringContains,
211
+ De as stringSearchWithin,
212
+ Fe as stringStartsWith,
213
+ ve as trimIsoDate,
214
+ xe as truncateText,
215
+ Te as urlfyArray,
189
216
  N as valueTooltip,
190
- M as vclToHex
217
+ P as vclToHex
191
218
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-luminus-components",
3
- "version": "2.0.3-beta.r19-7",
3
+ "version": "2.0.3-beta.r19-8",
4
4
  "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
5
  "type": "module",
6
6
  "repository": {