react-luminus-components 1.5.3 → 1.5.5

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 (27) hide show
  1. package/dist/.vite/manifest.json +26 -26
  2. package/dist/{FormDisabledProvider-BPet3cgR.cjs → FormDisabledProvider-6S4xKAVc.cjs} +1 -1
  3. package/dist/{FormDisabledProvider-aUfGn6S6.js → FormDisabledProvider-CgpUjxI0.js} +1 -1
  4. package/dist/{ShortcutLinksContext-CH9KdcxB.js → ShortcutLinksContext-CQY8nrGK.js} +2119 -2083
  5. package/dist/{ShortcutLinksContext-CFDCR0fQ.cjs → ShortcutLinksContext-DG4gWgPW.cjs} +46 -46
  6. package/dist/components/ShortcutLinks/ShortcutLinksSetup/comps/ShortcutLinkSetupItem/comps/ShortcutLinkItemEdit/ShortcutLinkItemEdit.d.ts +2 -1
  7. package/dist/components/UserSettings/FileDownloadUS/FileDownloadUS.d.ts +1 -3
  8. package/dist/components/common/SettingsFormPicker/SettingsFormPicker.d.ts +4 -3
  9. package/dist/contexts.cjs.js +1 -1
  10. package/dist/contexts.es.js +5 -5
  11. package/dist/hooks.cjs.js +1 -1
  12. package/dist/hooks.es.js +3 -3
  13. package/dist/layout.cjs.js +1 -1
  14. package/dist/layout.es.js +2 -2
  15. package/dist/main.cjs.js +31 -31
  16. package/dist/main.es.js +2344 -2337
  17. package/dist/models/index.d.ts +1 -1
  18. package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormGroup.d.ts +1 -1
  19. package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItem.d.ts +0 -1
  20. package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItemWithGroup.d.ts +6 -0
  21. package/dist/models/types/dynamicForms/index.d.ts +1 -0
  22. package/dist/{useLocalStorageState-CAHDOgis.cjs → useLocalStorageState--TbsAeFu.cjs} +1 -1
  23. package/dist/{useLocalStorageState-C-xR82iw.js → useLocalStorageState-KRZlwyU3.js} +1 -1
  24. package/dist/utils/file/fileUtils.d.ts +2 -0
  25. package/dist/utils.cjs.js +1 -1
  26. package/dist/utils.es.js +57 -55
  27. package/package.json +1 -1
@@ -86,7 +86,7 @@ export type { default as OnlyAttrExtending } from './types/common/OnlyAttrExtend
86
86
  export type { default as KeysExtendingType } from './types/common/KeysExtendingType';
87
87
  export type { default as ILocalizationContext } from './luminus-context-types/ILocalizationContext';
88
88
  export type { default as CommonLuminusIcons } from './luminus-context-types/CommonLuminusIcons';
89
- export type { DynamicFormFilters, DynamicFormIndexModel, SettingsFormItem, SettingsFormGroup, } from './types/dynamicForms';
89
+ export type { DynamicFormFilters, DynamicFormIndexModel, SettingsFormItem, SettingsFormItemWithGroup, SettingsFormGroup, } from './types/dynamicForms';
90
90
  export type { default as DocType } from './api/documents/DocType';
91
91
  export type { default as DocumentFileModel } from './api/documents/DocumentFileModel';
92
92
  export type { default as DocumentFolderModel } from './api/documents/DocumentFolderModel';
@@ -1,4 +1,4 @@
1
- import { default as FormItem } from './SettingsFormItem';
1
+ import { default as FormItem } from './SettingsFormItemWithGroup';
2
2
 
3
3
  type SettingsFormGroup = {
4
4
  id: number;
@@ -3,6 +3,5 @@ type SettingsFormItem = {
3
3
  id: number | string;
4
4
  name: string | null;
5
5
  description: string | null;
6
- group: number;
7
6
  };
8
7
  export default SettingsFormItem;
@@ -0,0 +1,6 @@
1
+ import { default as SettingsFormItem } from './SettingsFormItem';
2
+
3
+ type SettingsFormItemWithGroup = SettingsFormItem & {
4
+ group: number;
5
+ };
6
+ export default SettingsFormItemWithGroup;
@@ -5,4 +5,5 @@ export type { default as DynamicFormIndexModel } from './types/DynamicFormIndexM
5
5
  export type { default as DynamicFormSchemaModel } from './types/DynamicFormSchemaModel';
6
6
  export type { ApiDataItemType, DataItemType, ItemValueType, ValueType, KnownDataType, } from './types/DynamicFormValueTypes';
7
7
  export type { default as SettingsFormItem } from './formPickerTypes/SettingsFormItem';
8
+ export type { default as SettingsFormItemWithGroup } from './formPickerTypes/SettingsFormItemWithGroup';
8
9
  export type { default as SettingsFormGroup } from './formPickerTypes/SettingsFormGroup';
@@ -1 +1 @@
1
- "use strict";const S=require("./ShortcutLinksContext-CFDCR0fQ.cjs"),t=require("react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const r={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},m=(e,{loadOnInit:u=r.loadOnInit,enabled:n=r.enabled,silent:a=r.silent,nullStateBeforeLoad:c=r.nullStateBeforeLoad,nullStateOnFail:i=r.nullStateOnFail,customApiUrl:o,customBearerToken:I,dataTransformer:g}=r)=>{const C=S.useAxios({silent:a,customToken:I,differentBaseUrl:o}),[O,L]=t.useState(!1),{startLoading:b,stopLoading:D}=t.useContext(S.LoadingContext),R=t.useRef(0),{isAuthenticated:q}=S.useAuth(),p=t.useCallback(s=>{b(s),L(()=>!0)},[b]),x=t.useCallback(s=>{D(s),L(()=>!1)},[D]),[$,d]=t.useState(null),l=t.useCallback(async(s,h)=>{if(!q()||n===!1)return null;!a&&p(`loadData-${e}-${h}`),c&&d(null);let k;try{const f=await C.get(e,{signal:s}),A=g?g(f.data):f.data;d(A),k=A}catch(f){throw i&&d(null),f}finally{!a&&x(`loadData-${e}-${h}`)}return k},[q,n,a,p,e,c,C,g,i,x]),w=t.useCallback(async()=>{l()},[l]),y=t.useCallback(async()=>l(),[l]);return t.useEffect(()=>{if(u===!1)return;const s=new AbortController;return l(s.signal,++R.current),()=>{s.abort()}},[l,u]),{data:$,setData:d,reloadData:w,isLoading:O,reloadDataWithReturn:y}},v=(e,u)=>{const n=t.useCallback(()=>{const o=localStorage.getItem(e);return o!=null&&o!=="undefined"?JSON.parse(o):u},[u,e]),[a,c]=t.useState(n);t.useEffect(()=>{localStorage.setItem(e,JSON.stringify(a))},[e,a]);const i=t.useCallback(()=>{c(n)},[n]);return[a,c,i]};exports.useGetApiData=m;exports.useLocalStorageState=v;
1
+ "use strict";const S=require("./ShortcutLinksContext-DG4gWgPW.cjs"),t=require("react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const r={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},m=(e,{loadOnInit:u=r.loadOnInit,enabled:n=r.enabled,silent:a=r.silent,nullStateBeforeLoad:c=r.nullStateBeforeLoad,nullStateOnFail:i=r.nullStateOnFail,customApiUrl:o,customBearerToken:I,dataTransformer:g}=r)=>{const C=S.useAxios({silent:a,customToken:I,differentBaseUrl:o}),[O,L]=t.useState(!1),{startLoading:b,stopLoading:D}=t.useContext(S.LoadingContext),R=t.useRef(0),{isAuthenticated:q}=S.useAuth(),p=t.useCallback(s=>{b(s),L(()=>!0)},[b]),x=t.useCallback(s=>{D(s),L(()=>!1)},[D]),[$,d]=t.useState(null),l=t.useCallback(async(s,h)=>{if(!q()||n===!1)return null;!a&&p(`loadData-${e}-${h}`),c&&d(null);let k;try{const f=await C.get(e,{signal:s}),A=g?g(f.data):f.data;d(A),k=A}catch(f){throw i&&d(null),f}finally{!a&&x(`loadData-${e}-${h}`)}return k},[q,n,a,p,e,c,C,g,i,x]),w=t.useCallback(async()=>{l()},[l]),y=t.useCallback(async()=>l(),[l]);return t.useEffect(()=>{if(u===!1)return;const s=new AbortController;return l(s.signal,++R.current),()=>{s.abort()}},[l,u]),{data:$,setData:d,reloadData:w,isLoading:O,reloadDataWithReturn:y}},v=(e,u)=>{const n=t.useCallback(()=>{const o=localStorage.getItem(e);return o!=null&&o!=="undefined"?JSON.parse(o):u},[u,e]),[a,c]=t.useState(n);t.useEffect(()=>{localStorage.setItem(e,JSON.stringify(a))},[e,a]);const i=t.useCallback(()=>{c(n)},[n]);return[a,c,i]};exports.useGetApiData=m;exports.useLocalStorageState=v;
@@ -1,4 +1,4 @@
1
- import { aw as J, aX as N, ar as E } from "./ShortcutLinksContext-CH9KdcxB.js";
1
+ import { aw as J, aX as N, ar as E } from "./ShortcutLinksContext-CQY8nrGK.js";
2
2
  import { useState as p, useContext as F, useRef as G, useCallback as e, useEffect as O } from "react";
3
3
  import "react-router-dom";
4
4
  import "react-dom";
@@ -3,6 +3,8 @@ import { AxiosResponse } from 'axios';
3
3
 
4
4
  export declare function extractFilename(contentDisposition: string): string | null;
5
5
  export declare function saveFile(blob: Blob, fileName: string, tryToOpen?: boolean): void;
6
+ export declare const isFileOpenable: (blob: Blob) => boolean;
7
+ export declare const isExtensionOpenable: (extension: string) => boolean;
6
8
  /**
7
9
  * @param response that contains the blob data. Make sure it has Access-Control-Allow-Headers: Content-disposition to infer name correctly.
8
10
  */
package/dist/utils.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-CFDCR0fQ.cjs");require("react");require("@azure/msal-browser");require("@azure/msal-react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");const l=require("./localStorageUtils-DUQHXXBp.cjs"),f=({cell:{value:t}})=>e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:t,placement:"bottom",children:e.jsxRuntimeExports.jsx("div",{className:"w-100 text-truncate",children:t})}),h=({cell:{value:t}})=>e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t==null?void 0:t.toLocaleString("cs-CZ")}),p=({cell:{value:t}})=>{const r=e.format(new Date(t),"dd.MM.yyyy");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t?r:""})},d=(t,r)=>{let i=!1,n=t;t[0]==="#"&&(n=t.slice(1),i=!0);let s=parseInt(n.substring(0,2),16),o=parseInt(n.substring(2,4),16),a=parseInt(n.substring(4,6),16);s+=r,o+=r,a+=r,s>255?s=255:s<0&&(s=0),o>255?o=255:o<0&&(o=0),a>255?a=255:a<0&&(a=0);const u=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),g=a.toString(16).length===1?"0"+a.toString(16):a.toString(16);return(i?"#":"")+u+m+g},S=t=>{const r=t.slice(3),i=[];for(let s=0;s<r.length;s+=2)i.push(r.slice(s,s+2));return`#${i.reverse().join("")}`};function c(t,r){t.setValue(r,null)}function y(t,r){r.forEach(i=>{c(t,i)})}const D=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},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"];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.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=l.dumpLocalStorage;exports.generateApiPath=l.generateApiPath;exports.limitNumber=l.limitNumber;exports.restoreLocalStorage=l.restoreLocalStorage;exports.CommonLuminusIconsArray=x;exports.adjustBrightness=d;exports.dateValueFormat=p;exports.hookFormSetNull=c;exports.hookFormSetNulls=y;exports.isFileStructureDirectory=D;exports.numFormat=h;exports.responsePromiseWrapper=F;exports.valueTooltip=f;exports.vclToHex=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-DG4gWgPW.cjs");require("react");require("@azure/msal-browser");require("@azure/msal-react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");const l=require("./localStorageUtils-DUQHXXBp.cjs"),f=({cell:{value:t}})=>e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:t,placement:"bottom",children:e.jsxRuntimeExports.jsx("div",{className:"w-100 text-truncate",children:t})}),p=({cell:{value:t}})=>e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t==null?void 0:t.toLocaleString("cs-CZ")}),h=({cell:{value:t}})=>{const r=e.format(new Date(t),"dd.MM.yyyy");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t?r:""})},d=(t,r)=>{let i=!1,a=t;t[0]==="#"&&(a=t.slice(1),i=!0);let s=parseInt(a.substring(0,2),16),o=parseInt(a.substring(2,4),16),n=parseInt(a.substring(4,6),16);s+=r,o+=r,n+=r,s>255?s=255:s<0&&(s=0),o>255?o=255:o<0&&(o=0),n>255?n=255:n<0&&(n=0);const u=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),g=n.toString(16).length===1?"0"+n.toString(16):n.toString(16);return(i?"#":"")+u+m+g},S=t=>{const r=t.slice(3),i=[];for(let s=0;s<r.length;s+=2)i.push(r.slice(s,s+2));return`#${i.reverse().join("")}`};function c(t,r){t.setValue(r,null)}function y(t,r){r.forEach(i=>{c(t,i)})}const F=t=>typeof t.directoryName=="string"&&typeof t.directoryPath=="string"&&typeof t.directoryTranslationKey=="string"&&Array.isArray(t.files),x=async t=>{let r={status:"pending"};try{r={status:"success",data:(await t).data}}catch(i){r={status:"error",error:i}}return r},D=["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"];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=l.dumpLocalStorage;exports.generateApiPath=l.generateApiPath;exports.limitNumber=l.limitNumber;exports.restoreLocalStorage=l.restoreLocalStorage;exports.CommonLuminusIconsArray=D;exports.adjustBrightness=d;exports.dateValueFormat=h;exports.hookFormSetNull=c;exports.hookFormSetNulls=y;exports.isFileStructureDirectory=F;exports.numFormat=p;exports.responsePromiseWrapper=x;exports.valueTooltip=f;exports.vclToHex=S;
package/dist/utils.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { j as i, ao as f, U as g } from "./ShortcutLinksContext-CH9KdcxB.js";
2
- import { ca as C, c8 as V, c9 as k, c7 as M, c6 as A, bS as E, bT as W, a_ as z, b_ as B, bP as U, c0 as G, b6 as Y, c5 as Z, cc as _, bZ as H, bU as $, aI as q, bW as J, aJ as K, bV as Q, bX as X, bY as tt, c1 as et, bl as rt, bQ as st, b$ as at, bR as ot, cd as it, bI as nt, c2 as lt, aT as ct, aZ as mt, cf as ft, c3 as gt, _ as ut, c4 as pt, aH as dt, cb as ht, ce as yt } from "./ShortcutLinksContext-CH9KdcxB.js";
1
+ import { j as i, ao as f, U as g } from "./ShortcutLinksContext-CQY8nrGK.js";
2
+ import { cc as C, ca as V, cb as k, c9 as E, c8 as M, bS as A, bT as W, a_ as z, b_ as B, bP as U, c2 as G, b6 as Y, c7 as Z, ce as _, bZ as H, bU as $, aI as q, bW as J, aJ as K, bV as Q, bX as X, bY as ee, c3 as te, bl as se, c0 as re, b$ as ae, bQ as oe, c1 as ie, bR as ne, cf as le, bI as ce, c4 as me, aT as fe, aZ as ge, ch as ue, c5 as pe, _ as de, c6 as he, aH as ye, cd as be, cg as Se } from "./ShortcutLinksContext-CQY8nrGK.js";
3
3
  import "react";
4
4
  import "@azure/msal-browser";
5
5
  import "@azure/msal-react";
@@ -7,39 +7,39 @@ import "react-router-dom";
7
7
  import "react-dom";
8
8
  import "react-hook-form";
9
9
  import "react-flexmonster";
10
- import { d as bt, g as xt, l as Dt, r as Ft } from "./localStorageUtils-CHdu9Xvf.js";
11
- const F = ({ cell: { value: t } }) => /* @__PURE__ */ i.jsx(f, { text: t, placement: "bottom", children: /* @__PURE__ */ i.jsx("div", { className: "w-100 text-truncate", children: t }) }), O = ({ cell: { value: t } }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: t == null ? void 0 : t.toLocaleString("cs-CZ") }), N = ({ cell: { value: t } }) => {
12
- const e = g(new Date(t), "dd.MM.yyyy");
13
- return /* @__PURE__ */ i.jsx(i.Fragment, { children: t ? e : "" });
14
- }, v = (t, e) => {
15
- let s = !1, n = t;
16
- t[0] === "#" && (n = t.slice(1), s = !0);
17
- let r = parseInt(n.substring(0, 2), 16), a = parseInt(n.substring(2, 4), 16), o = parseInt(n.substring(4, 6), 16);
18
- r += e, a += e, o += e, r > 255 ? r = 255 : r < 0 && (r = 0), a > 255 ? a = 255 : a < 0 && (a = 0), o > 255 ? o = 255 : o < 0 && (o = 0);
19
- const l = r.toString(16).length === 1 ? "0" + r.toString(16) : r.toString(16), c = a.toString(16).length === 1 ? "0" + a.toString(16) : a.toString(16), m = o.toString(16).length === 1 ? "0" + o.toString(16) : o.toString(16);
20
- return (s ? "#" : "") + l + c + m;
21
- }, T = (t) => {
22
- const e = t.slice(3), s = [];
23
- for (let r = 0; r < e.length; r += 2)
24
- s.push(e.slice(r, r + 2));
25
- return `#${s.reverse().join("")}`;
10
+ import { d as Fe, g as De, l as Oe, r as Ne } from "./localStorageUtils-CHdu9Xvf.js";
11
+ const D = ({ cell: { value: e } }) => /* @__PURE__ */ i.jsx(f, { text: e, placement: "bottom", children: /* @__PURE__ */ i.jsx("div", { className: "w-100 text-truncate", children: e }) }), O = ({ cell: { value: e } }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e == null ? void 0 : e.toLocaleString("cs-CZ") }), N = ({ cell: { value: e } }) => {
12
+ const t = g(new Date(e), "dd.MM.yyyy");
13
+ return /* @__PURE__ */ i.jsx(i.Fragment, { children: e ? t : "" });
14
+ }, v = (e, t) => {
15
+ let r = !1, n = e;
16
+ e[0] === "#" && (n = e.slice(1), r = !0);
17
+ let s = parseInt(n.substring(0, 2), 16), a = parseInt(n.substring(2, 4), 16), o = parseInt(n.substring(4, 6), 16);
18
+ s += t, a += t, o += t, s > 255 ? s = 255 : s < 0 && (s = 0), a > 255 ? a = 255 : a < 0 && (a = 0), o > 255 ? o = 255 : o < 0 && (o = 0);
19
+ const l = s.toString(16).length === 1 ? "0" + s.toString(16) : s.toString(16), c = a.toString(16).length === 1 ? "0" + a.toString(16) : a.toString(16), m = o.toString(16).length === 1 ? "0" + o.toString(16) : o.toString(16);
20
+ return (r ? "#" : "") + l + c + m;
21
+ }, T = (e) => {
22
+ const t = e.slice(3), r = [];
23
+ for (let s = 0; s < t.length; s += 2)
24
+ r.push(t.slice(s, s + 2));
25
+ return `#${r.reverse().join("")}`;
26
26
  };
27
- function u(t, e) {
28
- t.setValue(e, null);
27
+ function u(e, t) {
28
+ e.setValue(t, null);
29
29
  }
30
- function I(t, e) {
31
- e.forEach((s) => {
32
- u(t, s);
30
+ function I(e, t) {
31
+ t.forEach((r) => {
32
+ u(e, r);
33
33
  });
34
34
  }
35
- const L = (t) => typeof t.directoryName == "string" && typeof t.directoryPath == "string" && typeof t.directoryTranslationKey == "string" && Array.isArray(t.files), P = async (t) => {
36
- let e = { status: "pending" };
35
+ const L = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files), P = async (e) => {
36
+ let t = { status: "pending" };
37
37
  try {
38
- e = { status: "success", data: (await t).data };
39
- } catch (s) {
40
- e = { status: "error", error: s };
38
+ t = { status: "success", data: (await e).data };
39
+ } catch (r) {
40
+ t = { status: "error", error: r };
41
41
  }
42
- return e;
42
+ return t;
43
43
  }, R = [
44
44
  "edit",
45
45
  "delete",
@@ -84,12 +84,12 @@ export {
84
84
  C as atobUtf8,
85
85
  V as buildEmployeeNameString,
86
86
  k as buildOrgUnitString,
87
- M as buildVehicleNameString,
88
- A as capitalizeFirstLetter,
89
- E as compareDate,
87
+ E as buildVehicleNameString,
88
+ M as capitalizeFirstLetter,
89
+ A as compareDate,
90
90
  W as compareDateTime,
91
91
  N as dateValueFormat,
92
- bt as dumpLocalStorage,
92
+ Fe as dumpLocalStorage,
93
93
  z as extractErrorsFromResponse,
94
94
  B as extractFilename,
95
95
  U as extractPermissionsFromResponse,
@@ -97,7 +97,7 @@ export {
97
97
  Y as formatDate,
98
98
  Z as formatDateTime,
99
99
  _ as formatFileSize,
100
- xt as generateApiPath,
100
+ De as generateApiPath,
101
101
  H as getDateString,
102
102
  $ as getDaysDifference,
103
103
  q as getFirstDayOfMonth,
@@ -105,31 +105,33 @@ export {
105
105
  K as getFirstDayOfYear,
106
106
  Q as getLastDayOfMonth,
107
107
  X as getLastDayOfOffsetMonth,
108
- tt as getLastDayOfYear,
109
- et as hasOnlyNullValues,
108
+ ee as getLastDayOfYear,
109
+ te as hasOnlyNullValues,
110
110
  u as hookFormSetNull,
111
111
  I as hookFormSetNulls,
112
- rt as hookFormSetServerErrors,
112
+ se as hookFormSetServerErrors,
113
+ re as isExtensionOpenable,
114
+ ae as isFileOpenable,
113
115
  L as isFileStructureDirectory,
114
- st as isISODate,
115
- at as isPrimitive,
116
- ot as isValidDate,
117
- it as joinStrings,
118
- Dt as limitNumber,
119
- nt as msToStartOfNextDay,
116
+ oe as isISODate,
117
+ ie as isPrimitive,
118
+ ne as isValidDate,
119
+ le as joinStrings,
120
+ Oe as limitNumber,
121
+ ce as msToStartOfNextDay,
120
122
  O as numFormat,
121
- lt as replaceNullValuesOnlyObjectsWithNulls,
123
+ me as replaceNullValuesOnlyObjectsWithNulls,
122
124
  P as responsePromiseWrapper,
123
- Ft as restoreLocalStorage,
124
- ct as saveFile,
125
- mt as saveFileFromResponse,
126
- ft as shortenText,
127
- gt as stringContains,
128
- ut as stringSearchWithin,
129
- pt as stringStartsWith,
130
- dt as trimIsoDate,
131
- ht as truncateText,
132
- yt as urlfyArray,
133
- F as valueTooltip,
125
+ Ne as restoreLocalStorage,
126
+ fe as saveFile,
127
+ ge as saveFileFromResponse,
128
+ ue as shortenText,
129
+ pe as stringContains,
130
+ de as stringSearchWithin,
131
+ he as stringStartsWith,
132
+ ye as trimIsoDate,
133
+ be as truncateText,
134
+ Se as urlfyArray,
135
+ D as valueTooltip,
134
136
  T as vclToHex
135
137
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-luminus-components",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
5
  "type": "module",
6
6
  "repository": {