react-luminus-components 1.2.113 → 1.2.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/.vite/manifest.json +42 -42
  2. package/dist/{NoInputContainer-CnWtqd6M.js → NoInputContainer-BAgsWdLH.js} +498 -498
  3. package/dist/{NoInputContainer-B2NLKTjL.cjs → NoInputContainer-BK9oG3tT.cjs} +16 -16
  4. package/dist/{PrimaryButton-DdX5Urwd.cjs → PrimaryButton-7SShR5CP.cjs} +1 -1
  5. package/dist/{PrimaryButton-JmPJBth0.js → PrimaryButton-DEmq1lC9.js} +1 -1
  6. package/dist/{SimpleTooltip-DAt21777.cjs → SimpleTooltip-4RS28Xw5.cjs} +1 -1
  7. package/dist/{SimpleTooltip-SJ7NFji7.js → SimpleTooltip-DcjdypSH.js} +1 -1
  8. package/dist/components/common/ImgApi/ImgApi.d.ts +4 -0
  9. package/dist/components/common/ImgApi/hooks/useGetImgData.d.ts +9 -0
  10. package/dist/components/common/ImgDirect/ImgDirect.d.ts +4 -0
  11. package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +6 -2
  12. package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +6 -2
  13. package/dist/components/common/index.d.ts +2 -0
  14. package/dist/contexts.cjs.js +1 -1
  15. package/dist/contexts.es.js +160 -148
  16. package/dist/hooks/useAxios/useAxios.d.ts +1 -0
  17. package/dist/hooks.cjs.js +1 -1
  18. package/dist/hooks.es.js +4 -4
  19. package/dist/layout.cjs.js +1 -1
  20. package/dist/layout.es.js +3 -3
  21. package/dist/main.cjs.js +1 -1
  22. package/dist/main.d.ts +1 -0
  23. package/dist/main.es.js +1206 -1177
  24. package/dist/models/index.d.ts +2 -0
  25. package/dist/models/prop-types/ImgProps.d.ts +7 -0
  26. package/dist/models/types/UserModel.d.ts +2 -1
  27. package/dist/{useConfirm-C4vc6fDa.js → useConfirm-D0XQit1K.js} +1 -1
  28. package/dist/{useConfirm-k8Kyrbnb.cjs → useConfirm-DnHLBOB6.cjs} +1 -1
  29. package/dist/{usePermissions-CJNbDDXa.cjs → usePermissions-CZ9GOCPf.cjs} +1 -1
  30. package/dist/{usePermissions-fMk86sJx.js → usePermissions-giXiX-A0.js} +1 -1
  31. package/package.json +1 -1
@@ -26,6 +26,7 @@ export type { default as FormNumericStepperInputProps } from './prop-types/FormI
26
26
  export type { default as HookFormNumericStepperInputProps } from './prop-types/HookFormInputProps/HookFormNumericStepperInputProps';
27
27
  export type { default as HookFormInputProps } from './prop-types/HookFormInputProps/HookFormInputProps';
28
28
  export type { default as ContainerProps } from './prop-types/ContainerProps';
29
+ export type { default as ImgProps } from './prop-types/ImgProps';
29
30
  export type { default as DashboardWidgetCommonProps } from './prop-types/DashboardWidgetCommonProps';
30
31
  export type { default as NameIdStringModel } from './types/NameIdStringModel';
31
32
  export type { default as NameIdIntModel } from './types/NameIdIntModel';
@@ -58,3 +59,4 @@ export type { default as WidgetTexts } from './texts/WidgetTexts';
58
59
  export type { default as ErrorBoundaryTexts } from './texts/ErrorBoundaryTexts';
59
60
  export type { default as PromptOptions } from './types/PromptOptions';
60
61
  export type { default as DropdownPickerOption } from './types/DropdownPickerOption';
62
+ export type { default as UserModel } from './types/UserModel';
@@ -0,0 +1,7 @@
1
+ import { HTMLProps } from 'react';
2
+ type ImgProps = Partial<HTMLProps<HTMLImageElement>> & Required<Pick<HTMLProps<HTMLImageElement>, 'src'>> & {
3
+ baseUrl?: string;
4
+ customToken?: string;
5
+ placeholder?: string;
6
+ };
7
+ export default ImgProps;
@@ -4,7 +4,8 @@ type UserModel = {
4
4
  kid: string | null;
5
5
  name: string | null;
6
6
  photoId: number | null;
7
- permissions: string[];
7
+ permissions: string[] | null;
8
8
  orgUnit: NameIdStringModel;
9
+ cafmToken: string | null;
9
10
  };
10
11
  export default UserModel;
@@ -1,5 +1,5 @@
1
1
  import { useContext as u, useCallback as l } from "react";
2
- import { am as p, al as h } from "./NoInputContainer-CnWtqd6M.js";
2
+ import { am as p, al as h } from "./NoInputContainer-BAgsWdLH.js";
3
3
  const P = () => {
4
4
  const { isShown: e, text: s, showPrompt: t, hidePrompt: r, resolveRef: o, setOptions: c } = u(p), C = l((n) => {
5
5
  r(), o.current(n);
@@ -1 +1 @@
1
- "use strict";const r=require("react"),f=require("./NoInputContainer-B2NLKTjL.cjs"),p=()=>{const{isShown:s,text:c,showPrompt:e,hidePrompt:t,resolveRef:n,setOptions:i}=r.useContext(f.PromptContext),a=r.useCallback(o=>{t(),n.current(o)},[t,n]),l=r.useCallback(async(o,u)=>(i(m=>({...m,...u})),e(o),new Promise(m=>{n.current=m})),[n,i,e]);return{isShown:s,text:c,prompt:l,onFinish:a}};let C;const h=()=>{const{show:s,text:c,showConfirm:e,hideConfirm:t}=r.useContext(f.ConfirmContext),n=()=>{t()};return{confirm:async o=>(e(o),new Promise(u=>{C=u})),onConfirm:()=>{n(),C(!0)},onCancel:()=>{n(),C(!1)},show:s,text:c}};exports.useConfirm=h;exports.usePrompt=p;
1
+ "use strict";const r=require("react"),f=require("./NoInputContainer-BK9oG3tT.cjs"),p=()=>{const{isShown:s,text:c,showPrompt:e,hidePrompt:t,resolveRef:n,setOptions:i}=r.useContext(f.PromptContext),a=r.useCallback(o=>{t(),n.current(o)},[t,n]),l=r.useCallback(async(o,u)=>(i(m=>({...m,...u})),e(o),new Promise(m=>{n.current=m})),[n,i,e]);return{isShown:s,text:c,prompt:l,onFinish:a}};let C;const h=()=>{const{show:s,text:c,showConfirm:e,hideConfirm:t}=r.useContext(f.ConfirmContext),n=()=>{t()};return{confirm:async o=>(e(o),new Promise(u=>{C=u})),onConfirm:()=>{n(),C(!0)},onCancel:()=>{n(),C(!1)},show:s,text:c}};exports.useConfirm=h;exports.usePrompt=p;
@@ -1 +1 @@
1
- "use strict";const r=require("react"),t=require("./NoInputContainer-B2NLKTjL.cjs");require("./latinize-DaqzUOla.cjs");require("react-hook-form");const o=()=>{const{user:e}=r.useContext(t.UserContext);return{checkUserHasPermissions:r.useCallback(n=>n.every(i=>{var s;return(s=e==null?void 0:e.permissions)==null?void 0:s.includes(i)}),[e])}};exports.usePermissions=o;
1
+ "use strict";const r=require("react"),t=require("./NoInputContainer-BK9oG3tT.cjs");require("./latinize-DaqzUOla.cjs");require("react-hook-form");const o=()=>{const{user:e}=r.useContext(t.UserContext);return{checkUserHasPermissions:r.useCallback(n=>n.every(i=>{var s;return(s=e==null?void 0:e.permissions)==null?void 0:s.includes(i)}),[e])}};exports.usePermissions=o;
@@ -1,5 +1,5 @@
1
1
  import { useContext as t, useCallback as i } from "react";
2
- import { aa as n } from "./NoInputContainer-CnWtqd6M.js";
2
+ import { aa as n } from "./NoInputContainer-BAgsWdLH.js";
3
3
  import "./latinize-BQrinury.js";
4
4
  import "react-hook-form";
5
5
  const k = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-luminus-components",
3
- "version": "1.2.113",
3
+ "version": "1.2.114",
4
4
  "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
5
  "type": "module",
6
6
  "repository": {