react-luminus-components 1.2.71 → 1.2.73

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.
package/dist/main.es.js CHANGED
@@ -1,12 +1,12 @@
1
- import { j as s, t as re, c as ae, g as sr, T as ar, a as ir, b as x, s as vt, E as cr, d as lr, e as ur, f as dr, h as hr, u as V, i as ue, k as Ut, F as bt, l as mr, m as fr, n as pr, o as gr, p as wr, q as xr, r as yr, v as vr, w as at, x as it, y as br, z as _r, P as be, A as de, B as jr, C as kr, D as ct, S as _t, G as De, H as Pe, I as lt, J as Cr, K as zt, L as $e, M as Re, O as jt, N as Nr, Q as ie, R as $r, U as Ir, V as Kt, W as ut, X as dt, Y as Q, Z as Sr, _ as Qt, $ as Tr, a0 as Xt, a1 as Er, a2 as Or, a3 as Mr, a4 as Dr, a5 as Jt, a6 as je, a7 as Pr, a8 as Ar, a9 as Fr, aa as Wr, ab as Rr, ac as Xe, ad as Be, ae as Zt, af as we, ag as Lr } from "./NoInputContainer-BnAPYzCz.js";
2
- import { ai as il, ah as cl } from "./NoInputContainer-BnAPYzCz.js";
1
+ import { j as s, t as re, c as ae, g as sr, T as ar, a as ir, b as x, s as vt, E as cr, d as lr, e as ur, f as dr, h as hr, u as V, i as ue, k as Ut, F as bt, l as mr, m as fr, n as pr, o as gr, p as wr, q as xr, r as yr, v as vr, w as at, x as it, y as br, z as _r, P as be, A as de, B as jr, C as kr, D as ct, S as _t, G as De, H as Pe, I as lt, J as Cr, K as zt, L as $e, M as Re, O as jt, N as Nr, Q as ie, R as $r, U as Ir, V as Kt, W as ut, X as dt, Y as Q, Z as Sr, _ as Qt, $ as Tr, a0 as Xt, a1 as Er, a2 as Or, a3 as Mr, a4 as Dr, a5 as Jt, a6 as je, a7 as Pr, a8 as Ar, a9 as Fr, aa as Wr, ab as Rr, ac as Xe, ad as Be, ae as Zt, af as we, ag as Lr } from "./NoInputContainer-B6VOLjlx.js";
2
+ import { ai as il, ah as cl } from "./NoInputContainer-B6VOLjlx.js";
3
3
  import * as A from "react";
4
4
  import Z, { useCallback as O, useMemo as K, useEffect as D, useRef as Y, useState as P, useReducer as en, useContext as L, createElement as qr } from "react";
5
- import { d as Yr, C as Hr, a as tn, u as Br, q as kt, E as Ae, M as Fe, L as Gr } from "./EventType-CnIS_MxK.js";
5
+ import { d as Yr, C as Hr, a as tn, u as Br, q as kt, E as Ae, M as Fe, L as Gr } from "./EventType-CtFbVRB_.js";
6
6
  import { useFormContext as he, Controller as nn } from "react-hook-form";
7
7
  import { m as Vr, a as rn } from "./textUtils-BbxuIsKq.js";
8
8
  import { u as on, a as sn, b as an } from "./useFormControlType-BAFqxupC.js";
9
- import { S as ul } from "./SimpleTooltip-ty5BQkX3.js";
9
+ import { S as ul } from "./SimpleTooltip-AU3G1UCk.js";
10
10
  const Ic = ({ fileLoader: t, fileName: e, children: n }) => {
11
11
  const r = O(async () => {
12
12
  var l;
@@ -3863,10 +3863,13 @@ const $i = "_item_1dy8x_1", tr = {
3863
3863
  fullHeightNoOverflow: xc,
3864
3864
  disabled: yc
3865
3865
  }, nl = ({ eventKey: t, activeTab: e, fullHeightNoOverflow: n, disabled: r, className: o, children: a }) => t !== e ? null : /* @__PURE__ */ s.jsx("div", { className: x("luminus-tab-panel", nt.tabPanel, { [nt.fullHeightNoOverflow]: n }, { disabled: r }, { [nt.disabled]: r }, o), children: a }), rl = ({ activeTab: t, onSelect: e, children: n }) => /* @__PURE__ */ s.jsx("div", { className: x("luminus-tabs d-flex gap-1 mb-2"), children: n.map((r) => {
3866
- const o = r.type, a = r.props.eventKey, i = r.props.children, l = r.props.className, c = r.props.onClick;
3867
- return /* @__PURE__ */ qr(o, { ...r.props, key: r.props.eventKey, className: x({ active: t === a }, l), onClick: () => {
3868
- e(a), c && c(a);
3869
- } }, i);
3866
+ const o = r.type, a = r.props;
3867
+ if (!a)
3868
+ return null;
3869
+ const i = a.eventKey, l = a.children, c = a.className, u = a.onClick;
3870
+ return /* @__PURE__ */ qr(o, { ...a, key: a.eventKey, className: x({ active: t === i }, c), onClick: () => {
3871
+ e(i), u && u(i);
3872
+ } }, l);
3870
3873
  }) }), vc = "_tab_1hdhk_1", bc = "_disabled_1hdhk_8", Vt = {
3871
3874
  tab: vc,
3872
3875
  disabled: bc
@@ -2,5 +2,6 @@ type AxiosTexts = {
2
2
  validationError: string;
3
3
  networkError: string;
4
4
  unexpectedError: string;
5
+ forbiddenError: string;
5
6
  };
6
7
  export default AxiosTexts;
@@ -1,5 +1,5 @@
1
1
  import { useContext as u, useCallback as l } from "react";
2
- import { ak as p, al as h } from "./NoInputContainer-BnAPYzCz.js";
2
+ import { ak as p, al as h } from "./NoInputContainer-B6VOLjlx.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-CAwCEVT5.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-BMw6_o8g.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-CAwCEVT5.cjs");require("react-hook-form");const o=()=>{const{user:s}=r.useContext(t.UserContext);return{checkUserHasPermissions:r.useCallback(n=>n.every(i=>{var e;return(e=s==null?void 0:s.permissions)==null?void 0:e.includes(i)}),[s])}};exports.usePermissions=o;
1
+ "use strict";const r=require("react"),t=require("./NoInputContainer-BMw6_o8g.cjs");require("react-hook-form");const o=()=>{const{user:s}=r.useContext(t.UserContext);return{checkUserHasPermissions:r.useCallback(n=>n.every(i=>{var e;return(e=s==null?void 0:s.permissions)==null?void 0:e.includes(i)}),[s])}};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-BnAPYzCz.js";
2
+ import { aa as n } from "./NoInputContainer-B6VOLjlx.js";
3
3
  import "react-hook-form";
4
4
  const p = () => {
5
5
  const { user: s } = t(n);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-luminus-components",
3
- "version": "1.2.71",
3
+ "version": "1.2.73",
4
4
  "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
5
  "type": "module",
6
6
  "repository": {