react-luminus-components 2.0.7 → 2.0.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.
@@ -0,0 +1 @@
1
+ "use strict";const w=require("./ShortcutLinksContext-Bn-HfyvV.cjs"),F=require("react-router");require("react/jsx-runtime");const q=require("react");require("@azure/msal-browser");require("@azure/msal-react");require("react-dom");const I=require("react-hook-form");require("react-flexmonster");const b=require("./queryStorage-Dk70bkj7.cjs"),x=()=>{const r=w.compilerRuntimeExports.c(6),[t,o]=F.useSearchParams();let e;r[0]!==t||r[1]!==o?(e=(n,u)=>{t.get(n)!==u&&o(l=>(u===null&&l.delete(n),l.get(n)===u||l.set(n,u??""),l),{replace:!0})},r[0]=t,r[1]=o,r[2]=e):e=r[2];const i=e;let s;return r[3]!==t||r[4]!==i?(s={searchParams:t,setSearch:i},r[3]=t,r[4]=i,r[5]=s):s=r[5],s},N="\0",Q=r=>t=>(window.addEventListener(`queryStorage_${r}`,t),()=>window.removeEventListener(`queryStorage_${r}`,t)),_=(r,t,o)=>{const e=r;if(e===N)return null;const i=e?Number(e):t;let s=Number.isNaN(i)?typeof t:"number";switch(s==="object"&&t instanceof Date&&(s="date"),o??s){case"number":return i;case"string":return e??t;case"boolean":return e==="true";case"object":return e?JSON.parse(e):t;case"date":return e?new Date(e):t;default:throw console.error(o,s),new Error(`useSearchQueryState is not implemented for type ${typeof(o??s)}.`)}},L=(r,t,o)=>{const e=w.compilerRuntimeExports.c(22),[i]=q.useState(t);let s;e[0]!==o?(s=c=>{if(typeof c=="object"){if(o&&o==="date"||!o&&c instanceof Date){if(!(c instanceof Date))throw new Error("Tried to setQueryState of type Date to non-date.");return c.toISOString()}return JSON.stringify(c)}return c.toString()},e[0]=o,e[1]=s):s=e[1];const n=s;let u;e[2]!==n||e[3]!==t?(u=n(t),e[2]=n,e[3]=t,e[4]=u):u=e[4];const l=u;let f;e[5]!==t?(f=JSON.stringify(t),e[5]=t,e[6]=f):f=e[6];const y=q.useRef(f),d=q.useRef(t);let S;e[7]!==r||e[8]!==i||e[9]!==o?(S=()=>{const c=b.queryStorage.getItem(r);return c!==y.current&&(y.current=c,d.current=_(c,i,o)),d.current},e[7]=r,e[8]=i,e[9]=o,e[10]=S):S=e[10];const g=S;let h;e[11]!==r?(h=Q(r),e[11]=r,e[12]=h):h=e[12];const R=h,E=q.useSyncExternalStore(R,g);let a;e[13]!==l||e[14]!==g||e[15]!==n||e[16]!==t||e[17]!==r?(a=c=>{const $=typeof c=="function"?c(g()):c,D=n($);if(t===$||D===l){b.queryStorage.removeItem(r),window.dispatchEvent(new Event(`queryStorage_${r}`));return}if($===null){b.queryStorage.setItem(r,N),window.dispatchEvent(new Event(`queryStorage_${r}`));return}b.queryStorage.setItem(r,D),window.dispatchEvent(new Event(`queryStorage_${r}`))},e[13]=l,e[14]=g,e[15]=n,e[16]=t,e[17]=r,e[18]=a):a=e[18];const P=a;let m;return e[19]!==P||e[20]!==E?(m=[E,P],e[19]=P,e[20]=E,e[21]=m):m=e[21],m},T=r=>{const t=w.compilerRuntimeExports.c(5),o=Math.floor(Math.random()*900)+100;let e;t[0]!==r?(e=btoa(r.toString()??""),t[0]=r,t[1]=e):e=t[1];const i=e,s=`employeePhotos?personalNumber=${o}${i}&small=false`,n=`employeePhotos?personalNumber=${o}${i}&small=true`;let u;return t[2]!==s||t[3]!==n?(u={photoPath:s,photoPathSm:n},t[2]=s,t[3]=n,t[4]=u):u=t[4],u},j=({control:r}={})=>{"use no memo";const{dirtyFields:t}=I.useFormState({control:r});return Object.keys(t).length>0};exports.useEmployeePhotoPath=T;exports.useIsFormDirty=j;exports.useSearchQuery=x;exports.useSearchQueryState=L;
@@ -1,4 +1,4 @@
1
- import { c as P } from "./nivo-bar-BkM6-FGM.js";
1
+ import { c as P } from "./ShortcutLinksContext-JzYprDew.js";
2
2
  import { useSearchParams as I } from "react-router";
3
3
  import "react/jsx-runtime";
4
4
  import { useState as _, useRef as p, useSyncExternalStore as F } from "react";
@@ -110,8 +110,8 @@ const A = () => {
110
110
  return Object.keys(e).length > 0;
111
111
  };
112
112
  export {
113
- A as a,
114
- B as b,
115
- H as c,
116
- W as u
113
+ B as a,
114
+ H as b,
115
+ W as c,
116
+ A as u
117
117
  };
@@ -1,4 +1,4 @@
1
- import { ao as E, aq as F, bg as G, c as J } from "./nivo-bar-BkM6-FGM.js";
1
+ import { az as E, aZ as F, au as G, c as J } from "./ShortcutLinksContext-JzYprDew.js";
2
2
  import "react/jsx-runtime";
3
3
  import { useState as C, useContext as N, useRef as O, useCallback as L, useEffect as R } from "react";
4
4
  import "react-router";
@@ -13,18 +13,18 @@ const p = {
13
13
  enabled: !0,
14
14
  nullStateBeforeLoad: !0,
15
15
  nullStateOnFail: !1
16
- }, Q = (e, {
16
+ }, P = (e, {
17
17
  loadOnInit: l = p.loadOnInit,
18
18
  enabled: t = p.enabled,
19
- silent: a = p.silent,
19
+ silent: o = p.silent,
20
20
  nullStateBeforeLoad: i = p.nullStateBeforeLoad,
21
- nullStateOnFail: o = p.nullStateOnFail,
21
+ nullStateOnFail: a = p.nullStateOnFail,
22
22
  customApiUrl: m,
23
23
  customBearerToken: d,
24
24
  dataTransformer: s
25
25
  } = p) => {
26
26
  const n = E({
27
- silent: a,
27
+ silent: o,
28
28
  customToken: d,
29
29
  differentBaseUrl: m
30
30
  }), [g, c] = C(0), {
@@ -35,7 +35,7 @@ const p = {
35
35
  } = G(), [w, S] = C(null), h = O(l ?? !1), f = L(async (D, A) => {
36
36
  if (!b() || t === !1)
37
37
  return null;
38
- c((r) => r + 1), !a && u(`loadData-${e}-${A}`), i && S(null);
38
+ c((r) => r + 1), !o && u(`loadData-${e}-${A}`), i && S(null);
39
39
  let $;
40
40
  try {
41
41
  const r = await n.get(e, {
@@ -43,12 +43,12 @@ const p = {
43
43
  }), I = s ? s(r.data) : r.data;
44
44
  S(I), $ = I;
45
45
  } catch (r) {
46
- throw o && S(null), r;
46
+ throw a && S(null), r;
47
47
  } finally {
48
- h.current = !1, c((r) => r - 1), !a && x(`loadData-${e}-${A}`);
48
+ h.current = !1, c((r) => r - 1), !o && x(`loadData-${e}-${A}`);
49
49
  }
50
50
  return $;
51
- }, [b, t, a, u, e, i, n, s, o, x]), U = L(async () => {
51
+ }, [b, t, o, u, e, i, n, s, a, x]), U = L(async () => {
52
52
  f();
53
53
  }, [f]), B = L(async () => f(), [f]);
54
54
  return R(() => {
@@ -69,27 +69,27 @@ const p = {
69
69
  isLoading: h.current || g > 0,
70
70
  reloadDataWithReturn: B
71
71
  };
72
- }, X = (e, l) => {
72
+ }, Q = (e, l) => {
73
73
  const t = J.c(12);
74
- let a;
75
- t[0] !== l || t[1] !== e ? (a = () => {
74
+ let o;
75
+ t[0] !== l || t[1] !== e ? (o = () => {
76
76
  const u = localStorage.getItem(e);
77
77
  return u != null && u !== "undefined" ? JSON.parse(u) : l;
78
- }, t[0] = l, t[1] = e, t[2] = a) : a = t[2];
79
- const i = a, [o, m] = C(i);
78
+ }, t[0] = l, t[1] = e, t[2] = o) : o = t[2];
79
+ const i = o, [a, m] = C(i);
80
80
  let d, s;
81
- t[3] !== e || t[4] !== o ? (d = () => {
82
- localStorage.setItem(e, JSON.stringify(o));
83
- }, s = [e, o], t[3] = e, t[4] = o, t[5] = d, t[6] = s) : (d = t[5], s = t[6]), R(d, s);
81
+ t[3] !== e || t[4] !== a ? (d = () => {
82
+ localStorage.setItem(e, JSON.stringify(a));
83
+ }, s = [e, a], t[3] = e, t[4] = a, t[5] = d, t[6] = s) : (d = t[5], s = t[6]), R(d, s);
84
84
  let n;
85
85
  t[7] !== i ? (n = () => {
86
86
  m(i);
87
87
  }, t[7] = i, t[8] = n) : n = t[8];
88
88
  const g = n;
89
89
  let c;
90
- return t[9] !== g || t[10] !== o ? (c = [o, m, g], t[9] = g, t[10] = o, t[11] = c) : c = t[11], c;
90
+ return t[9] !== g || t[10] !== a ? (c = [a, m, g], t[9] = g, t[10] = a, t[11] = c) : c = t[11], c;
91
91
  };
92
92
  export {
93
- X as a,
94
- Q as u
93
+ Q as a,
94
+ P as u
95
95
  };
@@ -0,0 +1 @@
1
+ "use strict";const q=require("./ShortcutLinksContext-Bn-HfyvV.cjs");require("react/jsx-runtime");const a=require("react");require("react-router");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-react");require("@azure/msal-browser");const S={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},w=(e,{loadOnInit:u=S.loadOnInit,enabled:t=S.enabled,silent:o=S.silent,nullStateBeforeLoad:c=S.nullStateBeforeLoad,nullStateOnFail:s=S.nullStateOnFail,customApiUrl:C,customBearerToken:f,dataTransformer:r}=S)=>{const n=q.useAxios({silent:o,customToken:f,differentBaseUrl:C}),[p,i]=a.useState(0),{startLoading:d,stopLoading:b}=a.useContext(q.LoadingContext),m=a.useRef(0),{isAuthenticated:x}=q.useAuth(),[I,L]=a.useState(null),h=a.useRef(u??!1),g=a.useCallback(async(D,A)=>{if(!x()||t===!1)return null;i(l=>l+1),!o&&d(`loadData-${e}-${A}`),c&&L(null);let R;try{const l=await n.get(e,{signal:D}),$=r?r(l.data):l.data;L($),R=$}catch(l){throw s&&L(null),l}finally{h.current=!1,i(l=>l-1),!o&&b(`loadData-${e}-${A}`)}return R},[x,t,o,d,e,c,n,r,s,b]),O=a.useCallback(async()=>{g()},[g]),v=a.useCallback(async()=>g(),[g]);return a.useEffect(()=>{if(u===!1)return;if(n.interceptorsUsed===!1){console.error("useGetApiData: could not load data because interceptors are not used");return}const D=new AbortController;return g(D.signal,++m.current),()=>{D.abort()}},[g,u,n.interceptorsUsed]),{data:I,setData:L,reloadData:O,isLoading:h.current||p>0,reloadDataWithReturn:v}},E=(e,u)=>{const t=q.compilerRuntimeExports.c(12);let o;t[0]!==u||t[1]!==e?(o=()=>{const d=localStorage.getItem(e);return d!=null&&d!=="undefined"?JSON.parse(d):u},t[0]=u,t[1]=e,t[2]=o):o=t[2];const c=o,[s,C]=a.useState(c);let f,r;t[3]!==e||t[4]!==s?(f=()=>{localStorage.setItem(e,JSON.stringify(s))},r=[e,s],t[3]=e,t[4]=s,t[5]=f,t[6]=r):(f=t[5],r=t[6]),a.useEffect(f,r);let n;t[7]!==c?(n=()=>{C(c)},t[7]=c,t[8]=n):n=t[8];const p=n;let i;return t[9]!==p||t[10]!==s?(i=[s,C,p],t[9]=p,t[10]=s,t[11]=i):i=t[11],i};exports.useGetApiData=w;exports.useLocalStorageState=E;
@@ -1,4 +1,5 @@
1
1
  export declare const isISODate: (dateString: string) => boolean;
2
+ export declare const isISODateInValidRange: (dateString: string) => boolean;
2
3
  export declare function msToStartOfNextDay(): number;
3
4
  export declare function isValidDate(d: object): d is Date;
4
5
  /**
package/dist/utils.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nivo-bar-CMNxTtSc.cjs"),l=require("react/jsx-runtime");require("react");require("@azure/msal-browser");require("@azure/msal-react");require("react-router");require("react-dom");require("react-hook-form");require("react-flexmonster");const u=require("./localStorageUtils-CkZslzIU.cjs"),S=require("./queryStorage-Dk70bkj7.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())??""})})},h=t=>{var r;return l.jsx(l.Fragment,{children:(r=t.getValue())==null?void 0:r.toLocaleString("cs-CZ")})},p=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:""})},y=(t,r)=>{let i=!1,s=t;t[0]==="#"&&(s=t.slice(1),i=!0);let o=parseInt(s.substring(0,2),16),a=parseInt(s.substring(2,4),16),n=parseInt(s.substring(4,6),16);o+=r,a+=r,n+=r,o>255?o=255:o<0&&(o=0),a>255?a=255:a<0&&(a=0),n>255?n=255:n<0&&(n=0);const c=o.toString(16).length===1?"0"+o.toString(16):o.toString(16),g=a.toString(16).length===1?"0"+a.toString(16):a.toString(16),f=n.toString(16).length===1?"0"+n.toString(16):n.toString(16);return(i?"#":"")+c+g+f},b=t=>{const r=t.slice(3),i=[];for(let o=0;o<r.length;o+=2)i.push(r.slice(o,o+2));return`#${i.reverse().join("")}`},O=t=>typeof t.directoryName=="string"&&typeof t.directoryPath=="string"&&typeof t.directoryTranslationKey=="string"&&Array.isArray(t.files),F=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{rowPinning:{top:[],bottom:[]},columnOrder:t.columnsOrder??[],columnVisibility:Object.fromEntries((t.hiddenColumns??[]).map(o=>[o,!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(o=>[o.column,o.width]))??[]),grouping:[],expanding:{},isFullScreen:!1}},D=(t,r)=>{const i=new URLSearchParams;return Object.keys(t).forEach(s=>{i.append(`BnfTable-${r||"Universal"}.${s}`,JSON.stringify(t[s]))}),i.toString()},T=(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 o=localStorage.getItem(s);if(!o)return;const a=JSON.parse(o);if(!a||Object.keys(a).length<1)return;const n=m(a);Object.keys(n).forEach(c=>{localStorage.setItem(`BnfTable-${s}.${c}`,JSON.stringify(n[c]))})}),localStorage.setItem("BnfTable-SettingsMigration",JSON.stringify({done:!0,version:r}))},x=["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.extractErrorsFromBlobResponse=e.extractErrorsFromBlobResponse;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.queryStorage=S.queryStorage;exports.CommonLuminusIconsArray=x;exports.adjustBrightness=y;exports.buildTableSearchQuery=D;exports.configToTanstackTableState=m;exports.dateValueFormat=p;exports.isFileStructureDirectory=O;exports.migrateBnfTableSettings=T;exports.numFormat=h;exports.responsePromiseWrapper=F;exports.valueTooltip=d;exports.vclToHex=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-Bn-HfyvV.cjs"),l=require("react/jsx-runtime");require("react");require("@azure/msal-browser");require("@azure/msal-react");require("react-router");require("react-dom");require("react-hook-form");require("react-flexmonster");const u=require("./localStorageUtils-CkZslzIU.cjs"),S=require("./queryStorage-Dk70bkj7.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())??""})})},h=t=>{var r;return l.jsx(l.Fragment,{children:(r=t.getValue())==null?void 0:r.toLocaleString("cs-CZ")})},p=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:""})},y=(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},b=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("")}`},O=t=>typeof t.directoryName=="string"&&typeof t.directoryPath=="string"&&typeof t.directoryTranslationKey=="string"&&Array.isArray(t.files),F=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{rowPinning:{top:[],bottom:[]},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}},D=(t,r)=>{const i=new URLSearchParams;return Object.keys(t).forEach(s=>{i.append(`BnfTable-${r||"Universal"}.${s}`,JSON.stringify(t[s]))}),i.toString()},x=(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.extractErrorsFromBlobResponse=e.extractErrorsFromBlobResponse;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.isISODateInValidRange=e.isISODateInValidRange;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.queryStorage=S.queryStorage;exports.CommonLuminusIconsArray=T;exports.adjustBrightness=y;exports.buildTableSearchQuery=D;exports.configToTanstackTableState=m;exports.dateValueFormat=p;exports.isFileStructureDirectory=O;exports.migrateBnfTableSettings=x;exports.numFormat=h;exports.responsePromiseWrapper=F;exports.valueTooltip=d;exports.vclToHex=b;
package/dist/utils.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { aF as g, X as f } from "./nivo-bar-BkM6-FGM.js";
2
- import { ci as j, cg as L, ch as z, cf as R, ce as W, bZ as $, b_ as A, bV as G, bs as J, c5 as U, bW as q, bE as Y, a_ as X, cd as Z, ck as _, c4 as H, b$ as K, bk as Q, c1 as ee, bl as te, c0 as re, c2 as se, c3 as ae, c9 as oe, bC as ne, c7 as ie, c6 as le, bX as ce, c8 as me, bY as ue, a0 as ge, bP as fe, ca as de, bn as pe, br as he, cm as Se, cb as be, ak as ye, cc as Oe, bj as Fe, cj as xe, cl as De } from "./nivo-bar-BkM6-FGM.js";
1
+ import { ar as g, X as d } from "./ShortcutLinksContext-JzYprDew.js";
2
+ import { cj as L, ch as R, ci as j, cg as z, cf as $, b_ as W, b$ as A, bV as G, b0 as J, c6 as U, bW as q, br as Y, b6 as K, ce as X, cl as Z, c5 as H, c0 as Q, aL as _, c2 as ee, aM as te, c1 as re, c3 as se, c4 as ae, ca as oe, bp as ne, c8 as ie, c7 as le, bX as ce, bY as me, c9 as ue, bZ as ge, a9 as de, bP as fe, cb as pe, aU as Se, a$ as he, cn as be, cc as ye, a3 as Oe, cd as Fe, aK as xe, ck as De, cm as Te } from "./ShortcutLinksContext-JzYprDew.js";
3
3
  import { jsx as l, Fragment as c } from "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@azure/msal-browser";
@@ -8,8 +8,8 @@ import "react-router";
8
8
  import "react-dom";
9
9
  import "react-hook-form";
10
10
  import "react-flexmonster";
11
- import { d as Ne, g as ve, a as Ce, h as we, l as Me, r as ke } from "./localStorageUtils-D2opn367.js";
12
- import { q as Pe } from "./queryStorage-C8e71gxx.js";
11
+ import { d as ve, g as Ce, h as we, a as Ie, l as Me, r as Pe } from "./localStorageUtils-CZ4HDRzi.js";
12
+ import { q as Be } from "./queryStorage-C8e71gxx.js";
13
13
  const T = (e) => {
14
14
  var t, r;
15
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()) ?? "" }) });
@@ -18,7 +18,7 @@ const T = (e) => {
18
18
  return /* @__PURE__ */ l(c, { children: (t = e.getValue()) == null ? void 0 : t.toLocaleString("cs-CZ") });
19
19
  }, v = (e) => {
20
20
  var a;
21
- const t = ((a = e.getValue()) == null ? void 0 : a.toString()) ?? "", r = f(new Date(t), "dd.MM.yyyy");
21
+ const t = ((a = e.getValue()) == null ? void 0 : a.toString()) ?? "", r = d(new Date(t), "dd.MM.yyyy");
22
22
  return /* @__PURE__ */ l(c, { children: t ? r : "" });
23
23
  }, C = (e, t) => {
24
24
  let r = !1, a = e;
@@ -32,7 +32,7 @@ const T = (e) => {
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
- }, M = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files), k = async (e) => {
35
+ }, I = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files), M = async (e) => {
36
36
  let t = {
37
37
  status: "pending"
38
38
  };
@@ -48,7 +48,7 @@ const T = (e) => {
48
48
  };
49
49
  }
50
50
  return t;
51
- }, d = (e) => {
51
+ }, f = (e) => {
52
52
  var t, r, a;
53
53
  return {
54
54
  rowPinning: {
@@ -79,12 +79,12 @@ const T = (e) => {
79
79
  expanding: {},
80
80
  isFullScreen: !1
81
81
  };
82
- }, I = (e, t) => {
82
+ }, P = (e, t) => {
83
83
  const r = new URLSearchParams();
84
84
  return Object.keys(e).forEach((a) => {
85
85
  r.append(`BnfTable-${t || "Universal"}.${a}`, JSON.stringify(e[a]));
86
86
  }), r.toString();
87
- }, P = (e, t) => {
87
+ }, V = (e, t) => {
88
88
  const r = localStorage.getItem("BnfTable-SettingsMigration");
89
89
  if (r) {
90
90
  const a = JSON.parse(r);
@@ -96,7 +96,7 @@ const T = (e) => {
96
96
  if (!s) return;
97
97
  const o = JSON.parse(s);
98
98
  if (!o || Object.keys(o).length < 1) return;
99
- const n = d(o);
99
+ const n = f(o);
100
100
  Object.keys(n).forEach((i) => {
101
101
  localStorage.setItem(`BnfTable-${a}.${i}`, JSON.stringify(n[i]));
102
102
  });
@@ -108,62 +108,63 @@ const T = (e) => {
108
108
  export {
109
109
  B as CommonLuminusIconsArray,
110
110
  C as adjustBrightness,
111
- j as atobUtf8,
112
- L as buildEmployeeNameString,
113
- z as buildOrgUnitString,
114
- I as buildTableSearchQuery,
115
- R as buildVehicleNameString,
116
- W as capitalizeFirstLetter,
117
- $ as compareDate,
111
+ L as atobUtf8,
112
+ R as buildEmployeeNameString,
113
+ j as buildOrgUnitString,
114
+ P as buildTableSearchQuery,
115
+ z as buildVehicleNameString,
116
+ $ as capitalizeFirstLetter,
117
+ W as compareDate,
118
118
  A as compareDateTime,
119
- d as configToTanstackTableState,
119
+ f as configToTanstackTableState,
120
120
  v as dateValueFormat,
121
- Ne as dumpLocalStorage,
121
+ ve as dumpLocalStorage,
122
122
  G as extractErrorsFromBlobResponse,
123
123
  J as extractErrorsFromResponse,
124
124
  U as extractFilename,
125
125
  q as extractPermissionsFromResponse,
126
126
  Y as fixNameIdNulls,
127
- X as formatDate,
128
- Z as formatDateTime,
129
- _ as formatFileSize,
130
- ve as generateApiPath,
127
+ K as formatDate,
128
+ X as formatDateTime,
129
+ Z as formatFileSize,
130
+ Ce as generateApiPath,
131
131
  H as getDateString,
132
- K as getDaysDifference,
133
- Q as getFirstDayOfMonth,
132
+ Q as getDaysDifference,
133
+ _ as getFirstDayOfMonth,
134
134
  ee as getFirstDayOfOffsetMonth,
135
135
  te as getFirstDayOfYear,
136
136
  re as getLastDayOfMonth,
137
137
  se as getLastDayOfOffsetMonth,
138
138
  ae as getLastDayOfYear,
139
139
  oe as hasOnlyNullValues,
140
- Ce as hookFormSetNull,
141
- we as hookFormSetNulls,
140
+ we as hookFormSetNull,
141
+ Ie as hookFormSetNulls,
142
142
  ne as hookFormSetServerErrors,
143
143
  ie as isExtensionOpenable,
144
144
  le as isFileOpenable,
145
- M as isFileStructureDirectory,
145
+ I as isFileStructureDirectory,
146
146
  ce as isISODate,
147
- me as isPrimitive,
148
- ue as isValidDate,
149
- ge as joinStrings,
147
+ me as isISODateInValidRange,
148
+ ue as isPrimitive,
149
+ ge as isValidDate,
150
+ de as joinStrings,
150
151
  Me as limitNumber,
151
- P as migrateBnfTableSettings,
152
+ V as migrateBnfTableSettings,
152
153
  fe as msToStartOfNextDay,
153
154
  N as numFormat,
154
- Pe as queryStorage,
155
- de as replaceNullValuesOnlyObjectsWithNulls,
156
- k as responsePromiseWrapper,
157
- ke as restoreLocalStorage,
158
- pe as saveFile,
155
+ Be as queryStorage,
156
+ pe as replaceNullValuesOnlyObjectsWithNulls,
157
+ M as responsePromiseWrapper,
158
+ Pe as restoreLocalStorage,
159
+ Se as saveFile,
159
160
  he as saveFileFromResponse,
160
- Se as shortenText,
161
- be as stringContains,
162
- ye as stringSearchWithin,
163
- Oe as stringStartsWith,
164
- Fe as trimIsoDate,
165
- xe as truncateText,
166
- De as urlfyArray,
161
+ be as shortenText,
162
+ ye as stringContains,
163
+ Oe as stringSearchWithin,
164
+ Fe as stringStartsWith,
165
+ xe as trimIsoDate,
166
+ De as truncateText,
167
+ Te as urlfyArray,
167
168
  T as valueTooltip,
168
169
  w as vclToHex
169
170
  };