react-luminus-components 1.3.260 → 1.3.262

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 (38) hide show
  1. package/dist/.vite/manifest.json +38 -38
  2. package/dist/{FormDisabledProvider-Co8n-oMB.js → FormDisabledProvider-Cst_3qXI.js} +1 -1
  3. package/dist/{FormDisabledProvider-fbIRIlsh.cjs → FormDisabledProvider-xZ_UUavG.cjs} +1 -1
  4. package/dist/components/Form/TextInput/TextInput.d.ts +1 -1
  5. package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +1 -1
  6. package/dist/components/common/Approval/Approval.d.ts +6 -0
  7. package/dist/components/common/index.d.ts +1 -0
  8. package/dist/contexts.cjs.js +1 -1
  9. package/dist/contexts.es.js +5 -5
  10. package/dist/hooks.cjs.js +1 -1
  11. package/dist/hooks.es.js +13 -13
  12. package/dist/layout.cjs.js +1 -1
  13. package/dist/layout.es.js +12 -12
  14. package/dist/main.cjs.js +30 -30
  15. package/dist/main.d.ts +1 -0
  16. package/dist/main.es-BHImI2xi.cjs +1939 -0
  17. package/dist/main.es-BcuFVoXb.js +159339 -0
  18. package/dist/main.es.js +2496 -2459
  19. package/dist/models/api/approval/ApprovalLevelModel.d.ts +10 -0
  20. package/dist/models/api/approval/ApprovalPersonModel.d.ts +11 -0
  21. package/dist/models/api/approval/ApprovalState.d.ts +7 -0
  22. package/dist/models/api/approval/ApprovalTimelineModel.d.ts +9 -0
  23. package/dist/models/api/employee/EmployeeSmallModel.d.ts +14 -0
  24. package/dist/models/index.d.ts +6 -0
  25. package/dist/models/prop-types/InputProps/TextInputProps.d.ts +3 -0
  26. package/dist/models/texts/ApprovalTexts.d.ts +10 -0
  27. package/dist/models/texts/ComponentsContextTexts.d.ts +2 -0
  28. package/dist/{useGetApiData-DIBn3rV8.js → useGetApiData-BZW_lLmt.js} +1 -1
  29. package/dist/{useGetApiData-CoqpPBp0.cjs → useGetApiData-nI4pESFM.cjs} +1 -1
  30. package/dist/useLocalStorageState-DXUUXO06.cjs +1 -0
  31. package/dist/{useRenderDraggableInPortal-DmwANWh2.cjs → useRenderDraggableInPortal-C6x8eb-g.cjs} +1 -1
  32. package/dist/utils/constants/CommonLuminusIconsArray.d.ts +1 -1
  33. package/dist/utils.cjs.js +1 -1
  34. package/dist/utils.es.js +24 -21
  35. package/package.json +1 -1
  36. package/dist/main.es-B5Xigdc7.js +0 -79634
  37. package/dist/main.es-DvZcUIu5.cjs +0 -943
  38. package/dist/useLocalStorageState-BFc8Gc8H.cjs +0 -1
@@ -0,0 +1,10 @@
1
+ import { default as ApprovalPersonModel } from './ApprovalPersonModel';
2
+ import { default as ApprovalState } from './ApprovalState';
3
+
4
+ export default interface ApprovalLevelModel {
5
+ id: number;
6
+ threshold: number;
7
+ approvers: ApprovalPersonModel[] | null;
8
+ state: ApprovalState;
9
+ index: number;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { default as EmployeeSmallModel } from '../employee/EmployeeSmallModel';
2
+ import { default as ApprovalState } from './ApprovalState';
3
+
4
+ export default interface ApprovalPersonModel {
5
+ id: number;
6
+ approver: EmployeeSmallModel;
7
+ delegatedApprover: EmployeeSmallModel;
8
+ state: ApprovalState;
9
+ responseDate: string | null;
10
+ automaticApproval: boolean;
11
+ }
@@ -0,0 +1,7 @@
1
+ declare enum ApprovalState {
2
+ Odebrano = -2,
3
+ Zamitnuto = -1,
4
+ Nevyrizeno = 0,
5
+ Schvaleno = 1
6
+ }
7
+ export default ApprovalState;
@@ -0,0 +1,9 @@
1
+ import { default as ApprovalLevelModel } from './ApprovalLevelModel';
2
+ import { default as ApprovalState } from './ApprovalState';
3
+
4
+ export default interface ApprovalTimelineModel {
5
+ id: number;
6
+ state: ApprovalState;
7
+ approvalLevels: ApprovalLevelModel[] | null;
8
+ currentApprovalLevelId: number;
9
+ }
@@ -0,0 +1,14 @@
1
+ export default interface EmployeeSmallModel {
2
+ id: number | null;
3
+ name: string | null;
4
+ fullName: string | null;
5
+ kid: string | null;
6
+ photoId: number | null;
7
+ cardNumber: string | null;
8
+ orgUnitId: string | null;
9
+ orgUnitName: string | null;
10
+ costCenterId: string | null;
11
+ costCenterName: string | null;
12
+ email: string | null;
13
+ archive: boolean;
14
+ }
@@ -64,6 +64,7 @@ export type { default as WidgetTexts } from './texts/WidgetTexts';
64
64
  export type { default as ErrorBoundaryTexts } from './texts/ErrorBoundaryTexts';
65
65
  export type { default as ComponentsContextTexts } from './texts/ComponentsContextTexts';
66
66
  export type { default as DateTexts } from './texts/DateTexts';
67
+ export type { default as ApprovalTexts } from './texts/ApprovalTexts';
67
68
  export type { default as PromptOptions } from './types/PromptOptions';
68
69
  export type { default as UseGetApiDataOptions } from './types/UseGetApiDataOptions';
69
70
  export type { default as DropdownPickerOption } from './types/DropdownPickerOption';
@@ -104,4 +105,9 @@ export type { default as MiniDetailComponentProps } from './prop-types/MiniDetai
104
105
  export type { default as PermissionSubstituteModel } from './api/substitutions/PermissionSubstituteModel';
105
106
  export type { default as PermissionRoleModel } from './api/substitutions/PermissionRoleModel';
106
107
  export type { default as PermissionUserModel } from './api/substitutions/PermissionUserModel';
108
+ export type { default as ApprovalLevelModel } from './api/approval/ApprovalLevelModel';
109
+ export type { default as ApprovalPersonModel } from './api/approval/ApprovalPersonModel';
110
+ export { default as ApprovalState } from './api/approval/ApprovalState';
111
+ export type { default as ApprovalTimelineModel } from './api/approval/ApprovalTimelineModel';
112
+ export type { default as EmployeeSmallModel } from './api/employee/EmployeeSmallModel';
107
113
  export type { default as AuthToken } from './types/auth/AuthToken';
@@ -1,3 +1,5 @@
1
+ import { ComponentProps } from 'react';
2
+ import { Form } from 'react-bootstrap';
1
3
  import { default as InputBaseProps } from './InputBaseProps';
2
4
 
3
5
  type TextInputProps = InputBaseProps & {
@@ -9,5 +11,6 @@ type TextInputProps = InputBaseProps & {
9
11
  minLength?: number;
10
12
  maxLength?: number;
11
13
  hint?: string;
14
+ autoComplete?: ComponentProps<typeof Form.Control>['autoComplete'];
12
15
  };
13
16
  export default TextInputProps;
@@ -0,0 +1,10 @@
1
+ type ApprovalTexts = {
2
+ stateRejected: string;
3
+ stateApproved: string;
4
+ stateRemoved: string;
5
+ stateUnrealized: string;
6
+ autoApproved: string;
7
+ getLevelText: (level: number) => string;
8
+ getThresholdText: (threshold: number) => string;
9
+ };
10
+ export default ApprovalTexts;
@@ -1,3 +1,4 @@
1
+ import { default as ApprovalTexts } from './ApprovalTexts';
1
2
  import { default as AppSearchTexts } from './AppSearchTexts';
2
3
  import { default as AxiosTexts } from './AxiosTexts';
3
4
  import { default as ClipboardTexts } from './ClipboardTexts';
@@ -36,5 +37,6 @@ type ComponentsContextTexts = {
36
37
  shortcutLinks: ShortcutLinkTexts;
37
38
  container: ContainerTexts;
38
39
  substitutions: SubstitutionsTexts;
40
+ approval: ApprovalTexts;
39
41
  };
40
42
  export default ComponentsContextTexts;
@@ -1,4 +1,4 @@
1
- import { aj as k, al as B, b2 as I } from "./main.es-B5Xigdc7.js";
1
+ import { aj as k, al as B, b2 as I } from "./main.es-BcuFVoXb.js";
2
2
  import { useState as A, useContext as R, useRef as j, useCallback as i, useEffect as v } from "react";
3
3
  import "react-router-dom";
4
4
  import "react-dom";
@@ -1 +1 @@
1
- "use strict";const i=require("./main.es-DvZcUIu5.cjs"),e=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 a={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},O=(n,{loadOnInit:c=a.loadOnInit,enabled:d=a.enabled,silent:s=a.silent,nullStateBeforeLoad:f=a.nullStateBeforeLoad,nullStateOnFail:g=a.nullStateOnFail,customApiUrl:h,customBearerToken:k,dataTransformer:l}=a)=>{const L=i.useAxios({silent:s,customToken:k,differentBaseUrl:h}),[S,C]=e.useState(!1),{startLoading:q,stopLoading:D}=e.useContext(i.LoadingContext),$=e.useRef(0),{isAuthenticated:b}=i.useAuth(),p=e.useCallback(t=>{q(t),C(()=>!0)},[q]),x=e.useCallback(t=>{D(t),C(()=>!1)},[D]),[w,o]=e.useState(null),u=e.useCallback(async(t,A)=>{if(b()&&d!==!1){!s&&p(`loadData-${n}-${A}`),f&&o(null);try{const r=await L.get(n,{signal:t}),y=l?l(r.data):r.data;o(y)}catch(r){throw g&&o(null),r}finally{!s&&x(`loadData-${n}-${A}`)}}},[b,d,s,p,n,f,L,l,g,x]);return e.useEffect(()=>{if(c===!1)return;const t=new AbortController;return u(t.signal,++$.current),()=>{t.abort()}},[u,c]),{data:w,setData:o,reloadData:u,isLoading:S}};exports.useGetApiData=O;
1
+ "use strict";const i=require("./main.es-BHImI2xi.cjs"),e=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 a={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},O=(n,{loadOnInit:c=a.loadOnInit,enabled:d=a.enabled,silent:s=a.silent,nullStateBeforeLoad:f=a.nullStateBeforeLoad,nullStateOnFail:g=a.nullStateOnFail,customApiUrl:h,customBearerToken:k,dataTransformer:l}=a)=>{const L=i.useAxios({silent:s,customToken:k,differentBaseUrl:h}),[S,C]=e.useState(!1),{startLoading:q,stopLoading:D}=e.useContext(i.LoadingContext),$=e.useRef(0),{isAuthenticated:b}=i.useAuth(),p=e.useCallback(t=>{q(t),C(()=>!0)},[q]),x=e.useCallback(t=>{D(t),C(()=>!1)},[D]),[w,o]=e.useState(null),u=e.useCallback(async(t,A)=>{if(b()&&d!==!1){!s&&p(`loadData-${n}-${A}`),f&&o(null);try{const r=await L.get(n,{signal:t}),y=l?l(r.data):r.data;o(y)}catch(r){throw g&&o(null),r}finally{!s&&x(`loadData-${n}-${A}`)}}},[b,d,s,p,n,f,L,l,g,x]);return e.useEffect(()=>{if(c===!1)return;const t=new AbortController;return u(t.signal,++$.current),()=>{t.abort()}},[u,c]),{data:w,setData:o,reloadData:u,isLoading:S}};exports.useGetApiData=O;
@@ -0,0 +1 @@
1
+ "use strict";const a=require("react"),l=(t,r)=>{const s=a.useCallback(()=>{const e=localStorage.getItem(t);return e!=null&&e!=="undefined"?JSON.parse(e):r},[r,t]),[o,c]=a.useState(s);a.useEffect(()=>{localStorage.setItem(t,JSON.stringify(o))},[t,o]);const n=a.useCallback(()=>{c(s)},[s]);return[o,c,n]};exports.useLocalStorageState=l;
@@ -1 +1 @@
1
- "use strict";const n=require("react"),P=require("react-router-dom"),S=require("react-dom"),b=()=>{const[o,e]=P.useSearchParams(),r=n.useCallback((u,s)=>{o.get(u)!==s&&e(c=>(s===null&&c.delete(u),c.get(u)===s||c.set(u,s??""),c),{replace:!0})},[e,o]);return{searchParams:o,setSearch:r}},f="\0",y=(o,e,r)=>{const{searchParams:u,setSearch:s}=b(),c=n.useCallback(t=>{if(typeof t=="object"){if(r&&r==="date"||!r&&t instanceof Date){if(!(t instanceof Date))throw new Error("Tried to setQueryState of type Date to non-date.");return t.toISOString()}return JSON.stringify(t)}return t.toString()},[r]),l=n.useMemo(()=>c(e),[e,c]),m=n.useMemo(()=>u.get(o),[o,u]),h=n.useMemo(()=>{const t=m;if(t===f)return null;const a=t?Number(t):e;let i=Number.isNaN(a)?typeof e:"number";switch(i==="object"&&e instanceof Date&&(i="date"),r??i){case"number":return a;case"string":return t??e;case"boolean":return t==="true";case"object":return t?JSON.parse(t):e;case"date":return t?new Date(t):e;default:throw console.error(r,i),new Error(`useSearchQueryState is not implemented for type ${typeof(r??i)}.`)}},[e,m,r]),g=n.useCallback(t=>{let a;typeof t=="function"?a=t(h):a=t;const i=c(a);if(e===a||i===l){s(o,null);return}if(a===null){s(o,f);return}s(o,i)},[e,l,c,o,s,h]);return[h,g]},M=o=>{const e=n.useMemo(()=>Math.floor(Math.random()*900)+100,[]),r=n.useMemo(()=>btoa(o.toString()??""),[o]),u=n.useMemo(()=>`employeePhotos?personalNumber=${e}${r}&small=false`,[e,r]),s=n.useMemo(()=>`employeePhotos?personalNumber=${e}${r}&small=true`,[e,r]);return{photoPath:u,photoPathSm:s}},N=()=>{const o=n.useRef({}).current;return n.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%",o.elt=e,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[o]),e=>(r,...u)=>{const s=e(r,...u);return r.draggableProps.style.position==="fixed"?S.createPortal(s,o.elt):s}};exports.useEmployeePhotoPath=M;exports.useRenderDraggableInPortal=N;exports.useSearchQuery=b;exports.useSearchQueryState=y;
1
+ "use strict";const n=require("react"),P=require("react-router-dom"),S=require("react-dom"),b=()=>{const[o,e]=P.useSearchParams(),r=n.useCallback((u,s)=>{o.get(u)!==s&&e(c=>(s===null&&c.delete(u),c.get(u)===s||c.set(u,s??""),c),{replace:!0})},[e,o]);return{searchParams:o,setSearch:r}},f="\0",y=(o,e,r)=>{const{searchParams:u,setSearch:s}=b(),c=n.useCallback(t=>{if(typeof t=="object"){if(r&&r==="date"||!r&&t instanceof Date){if(!(t instanceof Date))throw new Error("Tried to setQueryState of type Date to non-date.");return t.toISOString()}return JSON.stringify(t)}return t.toString()},[r]),l=n.useMemo(()=>c(e),[e,c]),m=n.useMemo(()=>u.get(o),[o,u]),h=n.useMemo(()=>{const t=m;if(t===f)return null;const i=t?Number(t):e;let a=Number.isNaN(i)?typeof e:"number";switch(a==="object"&&e instanceof Date&&(a="date"),r??a){case"number":return i;case"string":return t??e;case"boolean":return t==="true";case"object":return t?JSON.parse(t):e;case"date":return t?new Date(t):e;default:throw console.error(r,a),new Error(`useSearchQueryState is not implemented for type ${typeof(r??a)}.`)}},[e,m,r]),g=n.useCallback(t=>{let i;typeof t=="function"?i=t(h):i=t;const a=c(i);if(e===i||a===l){s(o,null);return}if(i===null){s(o,f);return}s(o,a)},[e,l,c,o,s,h]);return[h,g]},M=o=>{const e=n.useMemo(()=>Math.floor(Math.random()*900)+100,[]),r=n.useMemo(()=>btoa(o.toString()??""),[o]),u=n.useMemo(()=>`employeePhotos?personalNumber=${e}${r}&small=false`,[e,r]),s=n.useMemo(()=>`employeePhotos?personalNumber=${e}${r}&small=true`,[e,r]);return{photoPath:u,photoPathSm:s}},N=()=>{const o=n.useRef({}).current;return n.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%",o.elt=e,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[o]),e=>(r,...u)=>{const s=e(r,...u);return r.draggableProps.style.position==="fixed"?S.createPortal(s,o.elt):s}};exports.useEmployeePhotoPath=M;exports.useRenderDraggableInPortal=N;exports.useSearchQuery=b;exports.useSearchQueryState=y;
@@ -1,2 +1,2 @@
1
- declare const CommonLuminusIconsArray: readonly ["edit", "delete", "info", "warning", "check", "add", "cancel", "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"];
1
+ declare const CommonLuminusIconsArray: readonly ["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"];
2
2
  export default CommonLuminusIconsArray;
package/dist/utils.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main.es-DvZcUIu5.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 f=require("./numberUtils-BY7ziQF8.cjs"),g=({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")}),d=({cell:{value:t}})=>{const i=e.format(new Date(t),"dd.MM.yyyy");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t?i:""})},S=(t,i)=>{let n=!1,a=t;t[0]==="#"&&(a=t.slice(1),n=!0);let r=parseInt(a.substring(0,2),16),s=parseInt(a.substring(2,4),16),o=parseInt(a.substring(4,6),16);r+=i,s+=i,o+=i,r>255?r=255:r<0&&(r=0),s>255?s=255:s<0&&(s=0),o>255?o=255:o<0&&(o=0);const m=r.toString(16).length===1?"0"+r.toString(16):r.toString(16),u=s.toString(16).length===1?"0"+s.toString(16):s.toString(16),c=o.toString(16).length===1?"0"+o.toString(16):o.toString(16);return(n?"#":"")+m+u+c},D=t=>{const i=t.slice(3),n=[];for(let r=0;r<i.length;r+=2)n.push(i.slice(r,r+2));return`#${n.reverse().join("")}`};function l(t,i){t.setValue(i,null)}function p(t,i){i.forEach(n=>{l(t,n)})}const x=["edit","delete","info","warning","check","add","cancel","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"];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.limitNumber=f.limitNumber;exports.CommonLuminusIconsArray=x;exports.adjustBrightness=S;exports.dateValueFormat=d;exports.hookFormSetNull=l;exports.hookFormSetNulls=p;exports.numFormat=h;exports.valueTooltip=g;exports.vclToHex=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main.es-BHImI2xi.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 f=require("./numberUtils-BY7ziQF8.cjs"),g=({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")}),d=({cell:{value:t}})=>{const i=e.format(new Date(t),"dd.MM.yyyy");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t?i:""})},S=(t,i)=>{let n=!1,a=t;t[0]==="#"&&(a=t.slice(1),n=!0);let r=parseInt(a.substring(0,2),16),s=parseInt(a.substring(2,4),16),o=parseInt(a.substring(4,6),16);r+=i,s+=i,o+=i,r>255?r=255:r<0&&(r=0),s>255?s=255:s<0&&(s=0),o>255?o=255:o<0&&(o=0);const m=r.toString(16).length===1?"0"+r.toString(16):r.toString(16),c=s.toString(16).length===1?"0"+s.toString(16):s.toString(16),u=o.toString(16).length===1?"0"+o.toString(16):o.toString(16);return(n?"#":"")+m+c+u},p=t=>{const i=t.slice(3),n=[];for(let r=0;r<i.length;r+=2)n.push(i.slice(r,r+2));return`#${n.reverse().join("")}`};function l(t,i){t.setValue(i,null)}function D(t,i){i.forEach(n=>{l(t,n)})}const 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"];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.limitNumber=f.limitNumber;exports.CommonLuminusIconsArray=x;exports.adjustBrightness=S;exports.dateValueFormat=d;exports.hookFormSetNull=l;exports.hookFormSetNulls=D;exports.numFormat=h;exports.valueTooltip=g;exports.vclToHex=p;
package/dist/utils.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { j as i, aA as m, X as g } from "./main.es-B5Xigdc7.js";
2
- import { cb as V, c9 as w, ca as L, c8 as M, c7 as k, bS as E, bT as P, bd as B, b_ as W, bP as A, c1 as G, bi as U, c6 as Y, cd as z, bZ as X, bU as Z, b6 as $, bW as H, b7 as Q, bV as _, bX as q, bY as J, c2 as K, bt as tt, bQ as et, c0 as st, bR as rt, ce as at, bI as ot, c3 as it, b$ as nt, bc as lt, cg as ct, c4 as ft, af as mt, c5 as gt, b5 as ut, cc as bt, cf as dt } from "./main.es-B5Xigdc7.js";
1
+ import { j as i, aA as f, X as g } from "./main.es-BcuFVoXb.js";
2
+ import { cc as V, ca as k, cb as w, c9 as L, c8 as M, bT as E, bU as B, bd as P, b$ as W, bQ as A, c2 as G, bi as U, c7 as Y, ce as z, b_ as X, bV as Z, b6 as $, bX as H, b7 as J, bW as Q, bY as _, bZ as q, c3 as K, bu as tt, bR as et, c1 as st, bS as rt, cf as at, bJ as ot, c4 as it, c0 as nt, bc as lt, ch as ct, c5 as mt, af as ft, c6 as gt, b5 as ut, cd as ht, cg as dt } from "./main.es-BcuFVoXb.js";
3
3
  import "react";
4
4
  import "@azure/msal-browser";
5
5
  import "@azure/msal-react";
@@ -8,7 +8,7 @@ import "react-dom";
8
8
  import "react-hook-form";
9
9
  import "react-flexmonster";
10
10
  import { l as pt } from "./numberUtils-Bwf8nio8.js";
11
- const F = ({ cell: { value: t } }) => /* @__PURE__ */ i.jsx(m, { 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 } }) => {
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
12
  const s = g(new Date(t), "dd.MM.yyyy");
13
13
  return /* @__PURE__ */ i.jsx(i.Fragment, { children: t ? s : "" });
14
14
  }, j = (t, s) => {
@@ -16,8 +16,8 @@ const F = ({ cell: { value: t } }) => /* @__PURE__ */ i.jsx(m, { text: t, placem
16
16
  t[0] === "#" && (n = t.slice(1), o = !0);
17
17
  let e = parseInt(n.substring(0, 2), 16), r = parseInt(n.substring(2, 4), 16), a = parseInt(n.substring(4, 6), 16);
18
18
  e += s, r += s, a += s, e > 255 ? e = 255 : e < 0 && (e = 0), r > 255 ? r = 255 : r < 0 && (r = 0), a > 255 ? a = 255 : a < 0 && (a = 0);
19
- const l = e.toString(16).length === 1 ? "0" + e.toString(16) : e.toString(16), c = r.toString(16).length === 1 ? "0" + r.toString(16) : r.toString(16), f = a.toString(16).length === 1 ? "0" + a.toString(16) : a.toString(16);
20
- return (o ? "#" : "") + l + c + f;
19
+ const l = e.toString(16).length === 1 ? "0" + e.toString(16) : e.toString(16), c = r.toString(16).length === 1 ? "0" + r.toString(16) : r.toString(16), m = a.toString(16).length === 1 ? "0" + a.toString(16) : a.toString(16);
20
+ return (o ? "#" : "") + l + c + m;
21
21
  }, v = (t) => {
22
22
  const s = t.slice(3), o = [];
23
23
  for (let e = 0; e < s.length; e += 2)
@@ -32,14 +32,16 @@ function T(t, s) {
32
32
  u(t, o);
33
33
  });
34
34
  }
35
- const I = [
35
+ const R = [
36
36
  "edit",
37
37
  "delete",
38
38
  "info",
39
39
  "warning",
40
40
  "check",
41
+ "check-simple",
41
42
  "add",
42
43
  "cancel",
44
+ "cancel-simple",
43
45
  "danger",
44
46
  "chevron-left",
45
47
  "chevron-right",
@@ -53,20 +55,21 @@ const I = [
53
55
  "file-upload",
54
56
  "star-outline",
55
57
  "save",
56
- "link"
58
+ "link",
59
+ "pending"
57
60
  ];
58
61
  export {
59
- I as CommonLuminusIconsArray,
62
+ R as CommonLuminusIconsArray,
60
63
  j as adjustBrightness,
61
64
  V as atobUtf8,
62
- w as buildEmployeeNameString,
63
- L as buildOrgUnitString,
64
- M as buildVehicleNameString,
65
- k as capitalizeFirstLetter,
65
+ k as buildEmployeeNameString,
66
+ w as buildOrgUnitString,
67
+ L as buildVehicleNameString,
68
+ M as capitalizeFirstLetter,
66
69
  E as compareDate,
67
- P as compareDateTime,
70
+ B as compareDateTime,
68
71
  N as dateValueFormat,
69
- B as extractErrorsFromResponse,
72
+ P as extractErrorsFromResponse,
70
73
  W as extractFilename,
71
74
  A as extractPermissionsFromResponse,
72
75
  G as fixNameIdNulls,
@@ -77,10 +80,10 @@ export {
77
80
  Z as getDaysDifference,
78
81
  $ as getFirstDayOfMonth,
79
82
  H as getFirstDayOfOffsetMonth,
80
- Q as getFirstDayOfYear,
81
- _ as getLastDayOfMonth,
82
- q as getLastDayOfOffsetMonth,
83
- J as getLastDayOfYear,
83
+ J as getFirstDayOfYear,
84
+ Q as getLastDayOfMonth,
85
+ _ as getLastDayOfOffsetMonth,
86
+ q as getLastDayOfYear,
84
87
  K as hasOnlyNullValues,
85
88
  u as hookFormSetNull,
86
89
  T as hookFormSetNulls,
@@ -96,11 +99,11 @@ export {
96
99
  nt as saveFile,
97
100
  lt as saveFileFromResponse,
98
101
  ct as shortenText,
99
- ft as stringContains,
100
- mt as stringSearchWithin,
102
+ mt as stringContains,
103
+ ft as stringSearchWithin,
101
104
  gt as stringStartsWith,
102
105
  ut as trimIsoDate,
103
- bt as truncateText,
106
+ ht as truncateText,
104
107
  dt as urlfyArray,
105
108
  F as valueTooltip,
106
109
  v as vclToHex
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-luminus-components",
3
- "version": "1.3.260",
3
+ "version": "1.3.262",
4
4
  "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
5
  "type": "module",
6
6
  "repository": {