react-luminus-components 1.2.4 → 1.2.7

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 (52) hide show
  1. package/dist/.vite/manifest.json +67 -51
  2. package/dist/DataKey-BKjUrLwK.js +33 -0
  3. package/dist/DataKey-Bi3twEA-.cjs +1 -0
  4. package/dist/{SimpleTooltip-DxazAlXp.js → SimpleTooltip-CrxvDOBl.js} +1 -1
  5. package/dist/{SimpleTooltip-D6DtiDiF.cjs → SimpleTooltip-DVdVP6Q7.cjs} +1 -1
  6. package/dist/{Typography-ni7LYA_5.cjs → Typography-Dy2nkkxH.cjs} +1 -1
  7. package/dist/{Typography-CHfAgqP5.js → Typography-e-xJ0W5h.js} +1 -1
  8. package/dist/{UserAvatarToggle-B-BYsINz.js → UserAvatarToggle-B3sPIYPV.js} +19 -19
  9. package/dist/{UserAvatarToggle-cPWBMa9z.cjs → UserAvatarToggle-BHyn5qmy.cjs} +42 -42
  10. package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +4 -0
  11. package/dist/components/HookForm/index.d.ts +1 -0
  12. package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +30 -2
  13. package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +30 -2
  14. package/dist/components/NewTabs/Tab/Tab.d.ts +9 -0
  15. package/dist/components/NewTabs/TabPanel/TabPanel.d.ts +10 -0
  16. package/dist/components/NewTabs/Tabs/Tabs.d.ts +9 -0
  17. package/dist/components/NewTabs/index.d.ts +3 -0
  18. package/dist/components/common/SimplePicker/SimplePicker.d.ts +3 -2
  19. package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +2 -1
  20. package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +3 -2
  21. package/dist/contexts.cjs.js +1 -1
  22. package/dist/contexts.es.js +57 -55
  23. package/dist/hooks/index.d.ts +2 -0
  24. package/dist/hooks/useKeyPress/useKeyPress.d.ts +2 -0
  25. package/dist/hooks/usePermissions/usePermissions.d.ts +4 -0
  26. package/dist/hooks.cjs.js +1 -1
  27. package/dist/hooks.es.js +45 -42
  28. package/dist/layout/SideMenu/MenuItem/MenuItem.d.ts +2 -2
  29. package/dist/layout/SideMenu/SideMenu.d.ts +1 -1
  30. package/dist/layout.cjs.js +1 -1
  31. package/dist/layout.es.js +112 -89
  32. package/dist/main.cjs.js +1 -1
  33. package/dist/main.d.ts +2 -2
  34. package/dist/main.es.js +1593 -2122
  35. package/dist/models/index.d.ts +2 -0
  36. package/dist/models/prop-types/InputContainerProps.d.ts +2 -0
  37. package/dist/models/prop-types/InputProps/InputBaseProps.d.ts +2 -2
  38. package/dist/models/texts/CustomSelectTexts.d.ts +5 -0
  39. package/dist/models/types/MenuItemType.d.ts +2 -0
  40. package/dist/models/types/MenuItemTypeExtended.d.ts +6 -0
  41. package/dist/style.css +1 -1
  42. package/dist/{useConfirm-CkSyQrSF.js → useConfirm-Dl4SoYM1.js} +1 -1
  43. package/dist/{useConfirm-BC-OkqG0.cjs → useConfirm-JWnS5nMR.cjs} +1 -1
  44. package/dist/useKeyPress-BGQt3G6e.cjs +1 -0
  45. package/dist/useKeyPress-Chkukevp.js +19 -0
  46. package/dist/usePermissions-Dh8dRtOL.js +12 -0
  47. package/dist/usePermissions-DvUaQzJ1.cjs +1 -0
  48. package/package.json +1 -1
  49. package/dist/DataKey-CBMsR50b.cjs +0 -1
  50. package/dist/DataKey-CBV-NBJf.js +0 -37
  51. package/dist/useClickOutside-BjJyGTec.js +0 -14
  52. package/dist/useClickOutside-DsVG12Cs.cjs +0 -1
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { HookFormSelectInputProps } from '@models/index';
3
+ declare const CustomSelectInput: ({ InputContainer, options, formField, label, size, resetsFields, isNumber, required, hidden, disabled, withoutLabel, noSortOptions, }: HookFormSelectInputProps) => import("react").JSX.Element;
4
+ export default CustomSelectInput;
@@ -6,3 +6,4 @@ export { default as HookFormTextInput } from './TextInput/HookFormTextInput';
6
6
  export { default as HookFormDropdownPicker } from './DropdownPicker/HookFormDropdownPicker';
7
7
  export { default as HookFormFileInput } from './FileInput/HookFormFileInput';
8
8
  export { default as HookFormFloatingSubmit } from './FloatingSubmit/HookFormFloatingSubmit';
9
+ export { default as CustomSelectInput } from './CustomSelectInput/CustomSelectInput';
@@ -1,4 +1,32 @@
1
1
  /// <reference types="react" />
2
- import InputContainerProps from '@models/prop-types/InputContainerProps';
3
- declare const FloatingLabelInput: ({ hidden, children, isForCheckInput, className, inputContainerClassName, ...props }: InputContainerProps) => import("react").JSX.Element;
2
+ declare const FloatingLabelInput: import("react").ForwardRefExoticComponent<(Omit<{
3
+ hidden?: boolean | undefined;
4
+ children: import("react").ReactNode;
5
+ isInvalid?: boolean | undefined;
6
+ isForCheckInput?: boolean | undefined;
7
+ isForRadioInput?: boolean | undefined;
8
+ inputContainerClassName?: string | undefined;
9
+ className?: string | undefined;
10
+ } & {
11
+ ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
12
+ } & {
13
+ withoutLabel?: false | undefined;
14
+ label: string;
15
+ } & {
16
+ withoutLabel?: false | undefined;
17
+ }, "ref"> | Omit<{
18
+ hidden?: boolean | undefined;
19
+ children: import("react").ReactNode;
20
+ isInvalid?: boolean | undefined;
21
+ isForCheckInput?: boolean | undefined;
22
+ isForRadioInput?: boolean | undefined;
23
+ inputContainerClassName?: string | undefined;
24
+ className?: string | undefined;
25
+ } & {
26
+ ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
27
+ } & {
28
+ withoutLabel: true;
29
+ } & {
30
+ withoutLabel: true;
31
+ }, "ref">) & import("react").RefAttributes<HTMLDivElement>>;
4
32
  export default FloatingLabelInput;
@@ -1,4 +1,32 @@
1
1
  /// <reference types="react" />
2
- import InputContainerProps from '@models/prop-types/InputContainerProps';
3
- declare const RowLabelInput: ({ hidden, children, className, isInvalid, isForRadioInput, inputContainerClassName, ...props }: InputContainerProps) => import("react").JSX.Element;
2
+ declare const RowLabelInput: import("react").ForwardRefExoticComponent<(Omit<{
3
+ hidden?: boolean | undefined;
4
+ children: import("react").ReactNode;
5
+ isInvalid?: boolean | undefined;
6
+ isForCheckInput?: boolean | undefined;
7
+ isForRadioInput?: boolean | undefined;
8
+ inputContainerClassName?: string | undefined;
9
+ className?: string | undefined;
10
+ } & {
11
+ ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
12
+ } & {
13
+ withoutLabel?: false | undefined;
14
+ label: string;
15
+ } & {
16
+ withoutLabel?: false | undefined;
17
+ }, "ref"> | Omit<{
18
+ hidden?: boolean | undefined;
19
+ children: import("react").ReactNode;
20
+ isInvalid?: boolean | undefined;
21
+ isForCheckInput?: boolean | undefined;
22
+ isForRadioInput?: boolean | undefined;
23
+ inputContainerClassName?: string | undefined;
24
+ className?: string | undefined;
25
+ } & {
26
+ ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
27
+ } & {
28
+ withoutLabel: true;
29
+ } & {
30
+ withoutLabel: true;
31
+ }, "ref">) & import("react").RefAttributes<HTMLDivElement>>;
4
32
  export default RowLabelInput;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ eventKey: string | number;
4
+ className?: string;
5
+ onClick?: (key: string | number) => void;
6
+ children: string | React.ReactNode;
7
+ };
8
+ declare const Tab: ({ eventKey, className, onClick, children }: Props) => import("react").JSX.Element;
9
+ export default Tab;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ eventKey: string | number;
4
+ activeTab: string | number | null;
5
+ fullHeightNoOverflow?: boolean;
6
+ className?: string;
7
+ children?: React.ReactNode;
8
+ };
9
+ declare const TabPanel: ({ eventKey, activeTab, fullHeightNoOverflow, className, children }: Props) => import("react").JSX.Element | null;
10
+ export default TabPanel;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import Tab from '../Tab/Tab';
3
+ type Props = {
4
+ activeTab: number | string | null;
5
+ onSelect: (index: number | string | null) => void;
6
+ children: React.ReactElement<typeof Tab>[];
7
+ };
8
+ declare const Tabs: ({ activeTab, onSelect, children }: Props) => import("react").JSX.Element;
9
+ export default Tabs;
@@ -0,0 +1,3 @@
1
+ export { default as TabPanel } from './TabPanel/TabPanel';
2
+ export { default as Tabs } from './Tabs/Tabs';
3
+ export { default as Tab } from './Tab/Tab';
@@ -6,9 +6,10 @@ type Props = {
6
6
  items: DropdownPickerOption[];
7
7
  currentSelection: DropdownPickerOption | null;
8
8
  onSelectionChange: (item: DropdownPickerOption | null) => void;
9
- onClickSelectedItem: (item: DropdownPickerOption) => void;
9
+ onClickSelectedItem?: (item: DropdownPickerOption) => void;
10
10
  onSearchQueryChange: (query: string) => void;
11
11
  texts: DropdownPickerTexts;
12
+ inputRect?: DOMRect;
12
13
  additionalColumns?: {
13
14
  key: string;
14
15
  name: string;
@@ -16,5 +17,5 @@ type Props = {
16
17
  disabled?: boolean;
17
18
  isLoading?: boolean;
18
19
  };
19
- declare const SimplePicker: ({ show, onCancel, items, currentSelection, onSelectionChange, onClickSelectedItem, onSearchQueryChange, texts, additionalColumns, disabled, isLoading, }: Props) => import("react").JSX.Element;
20
+ declare const SimplePicker: ({ show, onCancel, items, currentSelection, onSelectionChange, onClickSelectedItem, onSearchQueryChange, texts, additionalColumns, disabled, isLoading, inputRect, }: Props) => import("react").JSX.Element;
20
21
  export default SimplePicker;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { AxiosInstance } from 'axios';
3
3
  import { LinkProps } from 'react-router-dom';
4
- import { AppSearchTexts, AxiosTexts, ConfirmTexts, FormSubmitTexts, FormValidationTexts, HomeDashboardTexts } from '@models/index';
4
+ import { AppSearchTexts, AxiosTexts, ConfirmTexts, CustomSelectTexts, FormSubmitTexts, FormValidationTexts, HomeDashboardTexts } from '@models/index';
5
5
  interface ILuminusComponentsContext {
6
6
  cookieDomain: string;
7
7
  axiosInstance: AxiosInstance;
@@ -13,6 +13,7 @@ interface ILuminusComponentsContext {
13
13
  homeDashboardTexts: HomeDashboardTexts;
14
14
  formSubmitTexts: FormSubmitTexts;
15
15
  appSearchTexts: AppSearchTexts;
16
+ customSelectTexts: CustomSelectTexts;
16
17
  }
17
18
  declare const LuminusComponentsContext: import("react").Context<ILuminusComponentsContext>;
18
19
  export default LuminusComponentsContext;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { LinkProps } from 'react-router-dom';
3
3
  import { AxiosInstance } from 'axios';
4
- import { AppSearchTexts, AxiosTexts, ConfirmTexts, FormSubmitTexts, FormValidationTexts, HomeDashboardTexts } from '@models/index';
4
+ import { AppSearchTexts, AxiosTexts, ConfirmTexts, CustomSelectTexts, FormSubmitTexts, FormValidationTexts, HomeDashboardTexts } from '@models/index';
5
5
  type Props = {
6
6
  cookieDomain: string;
7
7
  axiosInstance: AxiosInstance;
@@ -13,7 +13,8 @@ type Props = {
13
13
  homeDashboardTexts: HomeDashboardTexts;
14
14
  formSubmitTexts: FormSubmitTexts;
15
15
  appSearchTexts: AppSearchTexts;
16
+ customSelectTexts: CustomSelectTexts;
16
17
  children: React.ReactNode;
17
18
  };
18
- declare const LuminusComponentsProvider: ({ cookieDomain, axiosInstance, LinkComponent, language, axiosTexts, confirmTexts, formValidationTexts, homeDashboardTexts, formSubmitTexts, appSearchTexts, children, }: Props) => import("react").JSX.Element;
19
+ declare const LuminusComponentsProvider: ({ cookieDomain, axiosInstance, LinkComponent, language, axiosTexts, confirmTexts, formValidationTexts, homeDashboardTexts, formSubmitTexts, appSearchTexts, customSelectTexts, children, }: Props) => import("react").JSX.Element;
19
20
  export default LuminusComponentsProvider;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./UserAvatarToggle-cPWBMa9z.cjs"),a=require("react"),je=require("./useConfirm-BC-OkqG0.cjs"),De=require("./Typography-ni7LYA_5.cjs"),v=require("./DataKey-CBMsR50b.cjs"),Fe=require("react-dom");function Ie(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const n in s)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>s[n]})}}return t.default=s,Object.freeze(t)}const g=Ie(a),Pe=s=>g.forwardRef((t,n)=>e.jsxRuntimeExports.jsx("div",{...t,ref:n,className:e.classNames(t.className,s)})),Ue={"aria-label":e.PropTypes.string,onClick:e.PropTypes.func,variant:e.PropTypes.oneOf(["white"])},me=g.forwardRef(({className:s,variant:t,"aria-label":n="Close",...o},r)=>e.jsxRuntimeExports.jsx("button",{ref:r,type:"button",className:e.classNames("btn-close",t&&`btn-close-${t}`,s),"aria-label":n,...o}));me.displayName="CloseButton";me.propTypes=Ue;var J;function ge(s){if((!J&&J!==0||s)&&e.canUseDOM){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),J=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return J}function ce(s){s===void 0&&(s=e.ownerDocument());try{var t=s.activeElement;return!t||!t.nodeName?null:t}catch{return s.body}}function We(s=document){const t=s.defaultView;return Math.abs(t.innerWidth-s.documentElement.clientWidth)}const Ee=v.dataAttr("modal-open");class fe{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:o=!1}={}){this.handleContainerOverflow=n,this.isRTL=o,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return We(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},o=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();t.style={overflow:r.style.overflow,[o]:r.style[o]},t.scrollBarWidth&&(n[o]=`${parseInt(e.style(r,o)||"0",10)+t.scrollBarWidth}px`),r.setAttribute(Ee,""),e.style(r,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Ee),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const He=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function _e(s,t){if(s==null)return{};var n={},o=Object.keys(s),r,i;for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(n[r]=s[r]);return n}let ue;function $e(s){return ue||(ue=new fe({ownerDocument:s==null?void 0:s.document})),ue}function qe(s){const t=e.useWindow(),n=s||$e(t),o=a.useRef({dialog:null,backdrop:null});return Object.assign(o.current,{add:()=>n.add(o.current),remove:()=>n.remove(o.current),isTopModal:()=>n.isTopModal(o.current),setDialogRef:a.useCallback(r=>{o.current.dialog=r},[]),setBackdropRef:a.useCallback(r=>{o.current.backdrop=r},[])})}const Re=a.forwardRef((s,t)=>{let{show:n=!1,role:o="dialog",className:r,style:i,children:m,backdrop:c=!0,keyboard:f=!0,onBackdropClick:p,onEscapeKeyDown:u,transition:h,runTransition:C,backdropTransition:w,runBackdropTransition:Q,autoFocus:W=!0,enforceFocus:Z=!0,restoreFocus:N=!0,restoreFocusOptions:ee,renderDialog:H,renderBackdrop:te=d=>e.jsxRuntimeExports.jsx("div",Object.assign({},d)),manager:se,container:ne,onShow:_,onHide:A=()=>{},onExit:oe,onExited:D,onExiting:$,onEnter:q,onEntering:K,onEntered:z}=s,re=_e(s,He);const j=e.useWindow(),M=e.useWaitForDOMRef(ne),x=qe(se),ae=e.useMounted(),G=v.usePrevious(n),[y,T]=a.useState(!n),E=a.useRef(null);a.useImperativeHandle(t,()=>x,[x]),e.canUseDOM&&!G&&n&&(E.current=ce(j==null?void 0:j.document)),n&&y&&T(!1);const R=e.useEventCallback(()=>{if(x.add(),k.current=e.listen(document,"keydown",le),I.current=e.listen(document,"focus",()=>setTimeout(ie),!0),_&&_(),W){var d,Y;const U=ce((d=(Y=x.dialog)==null?void 0:Y.ownerDocument)!=null?d:j==null?void 0:j.document);x.dialog&&U&&!e.contains(x.dialog,U)&&(E.current=U,x.dialog.focus())}}),F=e.useEventCallback(()=>{if(x.remove(),k.current==null||k.current(),I.current==null||I.current(),N){var d;(d=E.current)==null||d.focus==null||d.focus(ee),E.current=null}});a.useEffect(()=>{!n||!M||R()},[n,M,R]),a.useEffect(()=>{y&&F()},[y,F]),e.useWillUnmount(()=>{F()});const ie=e.useEventCallback(()=>{if(!Z||!ae()||!x.isTopModal())return;const d=ce(j==null?void 0:j.document);x.dialog&&d&&!e.contains(x.dialog,d)&&x.dialog.focus()}),V=e.useEventCallback(d=>{d.target===d.currentTarget&&(p==null||p(d),c===!0&&A())}),le=e.useEventCallback(d=>{f&&e.isEscKey(d)&&x.isTopModal()&&(u==null||u(d),d.defaultPrevented||A())}),I=a.useRef(),k=a.useRef(),X=(...d)=>{T(!0),D==null||D(...d)};if(!M)return null;const S=Object.assign({role:o,ref:x.setDialogRef,"aria-modal":o==="dialog"?!0:void 0},re,{style:i,className:r,tabIndex:-1});let P=H?H(S):e.jsxRuntimeExports.jsx("div",Object.assign({},S,{children:g.cloneElement(m,{role:"document"})}));P=e.renderTransition(h,C,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:oe,onExiting:$,onExited:X,onEnter:q,onEntering:K,onEntered:z,children:P});let O=null;return c&&(O=te({ref:x.setBackdropRef,onClick:V}),O=e.renderTransition(w,Q,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:O})),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:Fe.createPortal(e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[O,P]}),M)})});Re.displayName="Modal";const Ke=Object.assign(Re,{Manager:fe});function ze(s,t){s.classList?s.classList.add(t):e.hasClass(s,t)||(typeof s.className=="string"?s.className=s.className+" "+t:s.setAttribute("class",(s.className&&s.className.baseVal||"")+" "+t))}function ve(s,t){return s.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Ge(s,t){s.classList?s.classList.remove(t):typeof s.className=="string"?s.className=ve(s.className,t):s.setAttribute("class",ve(s.className&&s.className.baseVal||"",t))}const B={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class Ve extends fe{adjustAndStore(t,n,o){const r=n.style[t];n.dataset[t]=r,e.style(n,{[t]:`${parseFloat(e.style(n,t))+o}px`})}restore(t,n){const o=n.dataset[t];o!==void 0&&(delete n.dataset[t],e.style(n,{[t]:o}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(ze(n,"modal-open"),!t.scrollBarWidth)return;const o=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";v.qsa(n,B.FIXED_CONTENT).forEach(i=>this.adjustAndStore(o,i,t.scrollBarWidth)),v.qsa(n,B.STICKY_CONTENT).forEach(i=>this.adjustAndStore(r,i,-t.scrollBarWidth)),v.qsa(n,B.NAVBAR_TOGGLER).forEach(i=>this.adjustAndStore(r,i,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();Ge(n,"modal-open");const o=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";v.qsa(n,B.FIXED_CONTENT).forEach(i=>this.restore(o,i)),v.qsa(n,B.STICKY_CONTENT).forEach(i=>this.restore(r,i)),v.qsa(n,B.NAVBAR_TOGGLER).forEach(i=>this.restore(r,i))}}let de;function Xe(s){return de||(de=new Ve(s)),de}const Ce=g.forwardRef(({className:s,bsPrefix:t,as:n="div",...o},r)=>(t=e.useBootstrapPrefix(t,"modal-body"),e.jsxRuntimeExports.jsx(n,{ref:r,className:e.classNames(s,t),...o})));Ce.displayName="ModalBody";const ye=g.createContext({onHide(){}}),pe=g.forwardRef(({bsPrefix:s,className:t,contentClassName:n,centered:o,size:r,fullscreen:i,children:m,scrollable:c,...f},p)=>{s=e.useBootstrapPrefix(s,"modal");const u=`${s}-dialog`,h=typeof i=="string"?`${s}-fullscreen-${i}`:`${s}-fullscreen`;return e.jsxRuntimeExports.jsx("div",{...f,ref:p,className:e.classNames(u,t,r&&`${s}-${r}`,o&&`${u}-centered`,c&&`${u}-scrollable`,i&&h),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames(`${s}-content`,n),children:m})})});pe.displayName="ModalDialog";const be=g.forwardRef(({className:s,bsPrefix:t,as:n="div",...o},r)=>(t=e.useBootstrapPrefix(t,"modal-footer"),e.jsxRuntimeExports.jsx(n,{ref:r,className:e.classNames(s,t),...o})));be.displayName="ModalFooter";const Ye=g.forwardRef(({closeLabel:s="Close",closeVariant:t,closeButton:n=!1,onHide:o,children:r,...i},m)=>{const c=a.useContext(ye),f=e.useEventCallback(()=>{c==null||c.onHide(),o==null||o()});return e.jsxRuntimeExports.jsxs("div",{ref:m,...i,children:[r,n&&e.jsxRuntimeExports.jsx(me,{"aria-label":s,variant:t,onClick:f})]})}),we=g.forwardRef(({bsPrefix:s,className:t,closeLabel:n="Close",closeButton:o=!1,...r},i)=>(s=e.useBootstrapPrefix(s,"modal-header"),e.jsxRuntimeExports.jsx(Ye,{ref:i,...r,className:e.classNames(t,s),closeLabel:n,closeButton:o})));we.displayName="ModalHeader";const Je=Pe("h4"),Ne=g.forwardRef(({className:s,bsPrefix:t,as:n=Je,...o},r)=>(t=e.useBootstrapPrefix(t,"modal-title"),e.jsxRuntimeExports.jsx(n,{ref:r,className:e.classNames(s,t),...o})));Ne.displayName="ModalTitle";function Qe(s){return e.jsxRuntimeExports.jsx(e.Fade,{...s,timeout:null})}function Ze(s){return e.jsxRuntimeExports.jsx(e.Fade,{...s,timeout:null})}const Me=g.forwardRef(({bsPrefix:s,className:t,style:n,dialogClassName:o,contentClassName:r,children:i,dialogAs:m=pe,"data-bs-theme":c,"aria-labelledby":f,"aria-describedby":p,"aria-label":u,show:h=!1,animation:C=!0,backdrop:w=!0,keyboard:Q=!0,onEscapeKeyDown:W,onShow:Z,onHide:N,container:ee,autoFocus:H=!0,enforceFocus:te=!0,restoreFocus:se=!0,restoreFocusOptions:ne,onEntered:_,onExit:A,onExiting:oe,onEnter:D,onEntering:$,onExited:q,backdropClassName:K,manager:z,...re},j)=>{const[M,x]=a.useState({}),[ae,G]=a.useState(!1),y=a.useRef(!1),T=a.useRef(!1),E=a.useRef(null),[R,F]=e.useCallbackRef(),ie=e.useMergedRefs(j,F),V=e.useEventCallback(N),le=e.useIsRTL();s=e.useBootstrapPrefix(s,"modal");const I=a.useMemo(()=>({onHide:V}),[V]);function k(){return z||Xe({isRTL:le})}function X(l){if(!e.canUseDOM)return;const L=k().getScrollbarWidth()>0,he=l.scrollHeight>e.ownerDocument(l).documentElement.clientHeight;x({paddingRight:L&&!he?ge():void 0,paddingLeft:!L&&he?ge():void 0})}const S=e.useEventCallback(()=>{R&&X(R.dialog)});e.useWillUnmount(()=>{e.removeEventListener(window,"resize",S),E.current==null||E.current()});const P=()=>{y.current=!0},O=l=>{y.current&&R&&l.target===R.dialog&&(T.current=!0),y.current=!1},d=()=>{G(!0),E.current=e.transitionEnd(R.dialog,()=>{G(!1)})},Y=l=>{l.target===l.currentTarget&&d()},U=l=>{if(w==="static"){Y(l);return}if(T.current||l.target!==l.currentTarget){T.current=!1;return}N==null||N()},Te=l=>{Q?W==null||W(l):(l.preventDefault(),w==="static"&&d())},ke=(l,L)=>{l&&X(l),D==null||D(l,L)},Se=l=>{E.current==null||E.current(),A==null||A(l)},Oe=(l,L)=>{$==null||$(l,L),e.addEventListener(window,"resize",S)},Le=l=>{l&&(l.style.display=""),q==null||q(l),e.removeEventListener(window,"resize",S)},Be=a.useCallback(l=>e.jsxRuntimeExports.jsx("div",{...l,className:e.classNames(`${s}-backdrop`,K,!C&&"show")}),[C,K,s]),xe={...n,...M};xe.display="block";const Ae=l=>e.jsxRuntimeExports.jsx("div",{role:"dialog",...l,style:xe,className:e.classNames(t,s,ae&&`${s}-static`,!C&&"show"),onClick:w?U:void 0,onMouseUp:O,"data-bs-theme":c,"aria-label":u,"aria-labelledby":f,"aria-describedby":p,children:e.jsxRuntimeExports.jsx(m,{...re,onMouseDown:P,className:o,contentClassName:r,children:i})});return e.jsxRuntimeExports.jsx(ye.Provider,{value:I,children:e.jsxRuntimeExports.jsx(Ke,{show:h,ref:ie,backdrop:w,container:ee,keyboard:!0,autoFocus:H,enforceFocus:te,restoreFocus:se,restoreFocusOptions:ne,onEscapeKeyDown:Te,onShow:Z,onHide:N,onEnter:ke,onEntering:Oe,onEntered:_,onExit:Se,onExiting:oe,onExited:Le,manager:k(),transition:C?Qe:void 0,backdropTransition:C?Ze:void 0,renderBackdrop:Be,renderDialog:Ae})})});Me.displayName="Modal";const b=Object.assign(Me,{Body:Ce,Header:we,Title:Ne,Footer:be,Dialog:pe,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),et=()=>{const{confirmTexts:s}=a.useContext(e.LuminusComponentsContext),{isShown:t,text:n,onFinish:o}=je.usePrompt(),{options:r}=a.useContext(e.PromptContext),[i,m]=a.useState(""),c=a.useCallback(()=>{o(null)},[o]),f=a.useCallback(()=>{o(i)},[o,i]);a.useEffect(()=>{t===!0&&m("")},[t]);const p=a.useMemo(()=>({value:i,onChange:u=>m(u.currentTarget.value),className:"w-100",autoFocus:!0,tabIndex:0}),[i]);return e.jsxRuntimeExports.jsxs(b,{show:t,size:"sm",centered:!0,onHide:c,children:[e.jsxRuntimeExports.jsx(b.Header,{children:e.jsxRuntimeExports.jsx(b.Title,{children:n})}),e.jsxRuntimeExports.jsxs(b.Body,{children:[r.input==="textarea"?e.jsxRuntimeExports.jsx("textarea",{...p,rows:5}):void 0,r.input==="input"?e.jsxRuntimeExports.jsx("input",{...p,type:r.type}):void 0]}),e.jsxRuntimeExports.jsxs(b.Footer,{children:[e.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-secondary",onClick:c,children:s.cancel}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-primary ml",onClick:f,disabled:r.required&&!i,children:s.confirm})]})]})},tt=({children:s})=>{const[t,n]=a.useState(!1),[o,r]=a.useState(""),[i,m]=a.useState({input:"textarea",type:"text"}),c=a.useRef(()=>{}),f=a.useCallback(h=>{r(h),n(!0),console.log("showprompt")},[]),p=a.useCallback(()=>{n(!1)},[]),u=a.useMemo(()=>({isShown:t,text:o,showPrompt:f,hidePrompt:p,resolveRef:c,options:i,setOptions:m}),[t,o,f,p,i]);return e.jsxRuntimeExports.jsxs(e.PromptContext.Provider,{value:u,children:[s,e.jsxRuntimeExports.jsx(et,{})]})},st=({children:s})=>{const[t,n]=a.useState(!1),[o,r]=a.useState(""),i=a.useCallback(f=>{n(!0),r(f)},[]),m=a.useCallback(()=>{n(!1)},[]),c=a.useMemo(()=>({show:t,text:o,showConfirm:i,hideConfirm:m}),[t,o,i,m]);return e.jsxRuntimeExports.jsxs(e.ConfirmContext.Provider,{value:c,children:[e.jsxRuntimeExports.jsx(at,{}),s]})},nt=({cookieDomain:s,axiosInstance:t,LinkComponent:n,language:o,axiosTexts:r,confirmTexts:i,formValidationTexts:m,homeDashboardTexts:c,formSubmitTexts:f,appSearchTexts:p,children:u})=>{const h=a.useMemo(()=>({axiosInstance:t,cookieDomain:s,LinkComponent:n,language:o,axiosTexts:r,confirmTexts:i,formValidationTexts:m,homeDashboardTexts:c,formSubmitTexts:f,appSearchTexts:p}),[t,s,n,o,r,i,m,c,f,p]);return e.jsxRuntimeExports.jsx(e.LuminusComponentsContext.Provider,{value:h,children:e.jsxRuntimeExports.jsx(st,{children:e.jsxRuntimeExports.jsxs(tt,{children:[e.jsxRuntimeExports.jsx(e.Ie,{}),u]})})})},ot=({children:s})=>{const[t,n]=a.useState(!1),[o]=a.useState(new Set),r=a.useCallback(c=>{o.add(c),n(!0)},[o]),i=a.useCallback(c=>{o.delete(c),o.size===0&&n(!1)},[o]),m=a.useMemo(()=>({isLoading:t,startLoading:r,stopLoading:i}),[t,r,i]);return e.jsxRuntimeExports.jsxs(e.LoadingContext.Provider,{value:m,children:[t&&e.jsxRuntimeExports.jsx(v.Loading,{}),s]})},rt=({children:s})=>{const t=e.useAxios(),n=a.useCallback(()=>{const u=localStorage.getItem("user")??null;return u?JSON.parse(u):null},[]),[o,r]=a.useState(n()),i=a.useCallback(async()=>{let u=null;return await t.get("/user/detail").then(h=>{u=h.data}).catch(()=>{u=null}),localStorage.setItem("user",JSON.stringify(u)),u},[t]),m=a.useCallback(()=>{localStorage.removeItem("user")},[]),c=a.useCallback(async()=>{const u=await i();return u?(r(u),!0):!1},[i]),f=a.useCallback(()=>{m(),r(null)},[m]),p=a.useMemo(()=>({user:o,loginUser:c,logoutUser:f}),[o,c,f]);return a.useEffect(()=>{r(n())},[n]),e.jsxRuntimeExports.jsx(e.UserContext.Provider,{value:p,children:s})},at=()=>{const{confirmTexts:s}=a.useContext(e.LuminusComponentsContext),{onConfirm:t,onCancel:n,text:o,show:r}=je.useConfirm();return e.jsxRuntimeExports.jsx(b,{show:r,size:"sm",centered:!0,onHide:n,children:e.jsxRuntimeExports.jsxs(b.Body,{children:[e.jsxRuntimeExports.jsx("div",{className:"mb-5 text-center",children:e.jsxRuntimeExports.jsx(De.Typography,{variant:"h6",children:o})}),e.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex gap-5",children:[e.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-secondary w-100",onClick:n,children:s.no}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-primary w-100 ml",onClick:t,children:s.yes})]})]})})};exports.LoadingContext=e.LoadingContext;exports.LuminusComponentsContext=e.LuminusComponentsContext;exports.UserContext=e.UserContext;exports.LoadingProvider=ot;exports.LuminusComponentsProvider=nt;exports.UserProvider=rt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./UserAvatarToggle-BHyn5qmy.cjs"),a=require("react"),je=require("./useConfirm-JWnS5nMR.cjs"),De=require("./Typography-Dy2nkkxH.cjs"),j=require("./DataKey-Bi3twEA-.cjs"),Fe=require("react-dom");function Ie(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const n in s)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>s[n]})}}return t.default=s,Object.freeze(t)}const g=Ie(a),Pe=s=>g.forwardRef((t,n)=>e.jsxRuntimeExports.jsx("div",{...t,ref:n,className:e.classNames(t.className,s)})),Ue={"aria-label":e.PropTypes.string,onClick:e.PropTypes.func,variant:e.PropTypes.oneOf(["white"])},me=g.forwardRef(({className:s,variant:t,"aria-label":n="Close",...o},r)=>e.jsxRuntimeExports.jsx("button",{ref:r,type:"button",className:e.classNames("btn-close",t&&`btn-close-${t}`,s),"aria-label":n,...o}));me.displayName="CloseButton";me.propTypes=Ue;var J;function ge(s){if((!J&&J!==0||s)&&e.canUseDOM){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),J=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return J}function ce(s){s===void 0&&(s=e.ownerDocument());try{var t=s.activeElement;return!t||!t.nodeName?null:t}catch{return s.body}}function We(s=document){const t=s.defaultView;return Math.abs(t.innerWidth-s.documentElement.clientWidth)}const Ee=j.dataAttr("modal-open");class fe{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:o=!1}={}){this.handleContainerOverflow=n,this.isRTL=o,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return We(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},o=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();t.style={overflow:r.style.overflow,[o]:r.style[o]},t.scrollBarWidth&&(n[o]=`${parseInt(e.style(r,o)||"0",10)+t.scrollBarWidth}px`),r.setAttribute(Ee,""),e.style(r,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Ee),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const He=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function _e(s,t){if(s==null)return{};var n={},o=Object.keys(s),r,i;for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(n[r]=s[r]);return n}let ue;function $e(s){return ue||(ue=new fe({ownerDocument:s==null?void 0:s.document})),ue}function qe(s){const t=e.useWindow(),n=s||$e(t),o=a.useRef({dialog:null,backdrop:null});return Object.assign(o.current,{add:()=>n.add(o.current),remove:()=>n.remove(o.current),isTopModal:()=>n.isTopModal(o.current),setDialogRef:a.useCallback(r=>{o.current.dialog=r},[]),setBackdropRef:a.useCallback(r=>{o.current.backdrop=r},[])})}const Re=a.forwardRef((s,t)=>{let{show:n=!1,role:o="dialog",className:r,style:i,children:m,backdrop:c=!0,keyboard:f=!0,onBackdropClick:p,onEscapeKeyDown:u,transition:h,runTransition:v,backdropTransition:w,runBackdropTransition:Q,autoFocus:W=!0,enforceFocus:Z=!0,restoreFocus:N=!0,restoreFocusOptions:ee,renderDialog:H,renderBackdrop:te=d=>e.jsxRuntimeExports.jsx("div",Object.assign({},d)),manager:se,container:ne,onShow:_,onHide:A=()=>{},onExit:oe,onExited:D,onExiting:$,onEnter:q,onEntering:K,onEntered:z}=s,re=_e(s,He);const R=e.useWindow(),M=e.useWaitForDOMRef(ne),x=qe(se),ae=e.useMounted(),G=j.usePrevious(n),[y,k]=a.useState(!n),E=a.useRef(null);a.useImperativeHandle(t,()=>x,[x]),e.canUseDOM&&!G&&n&&(E.current=ce(R==null?void 0:R.document)),n&&y&&k(!1);const C=e.useEventCallback(()=>{if(x.add(),T.current=e.listen(document,"keydown",le),I.current=e.listen(document,"focus",()=>setTimeout(ie),!0),_&&_(),W){var d,Y;const U=ce((d=(Y=x.dialog)==null?void 0:Y.ownerDocument)!=null?d:R==null?void 0:R.document);x.dialog&&U&&!e.contains(x.dialog,U)&&(E.current=U,x.dialog.focus())}}),F=e.useEventCallback(()=>{if(x.remove(),T.current==null||T.current(),I.current==null||I.current(),N){var d;(d=E.current)==null||d.focus==null||d.focus(ee),E.current=null}});a.useEffect(()=>{!n||!M||C()},[n,M,C]),a.useEffect(()=>{y&&F()},[y,F]),e.useWillUnmount(()=>{F()});const ie=e.useEventCallback(()=>{if(!Z||!ae()||!x.isTopModal())return;const d=ce(R==null?void 0:R.document);x.dialog&&d&&!e.contains(x.dialog,d)&&x.dialog.focus()}),V=e.useEventCallback(d=>{d.target===d.currentTarget&&(p==null||p(d),c===!0&&A())}),le=e.useEventCallback(d=>{f&&e.isEscKey(d)&&x.isTopModal()&&(u==null||u(d),d.defaultPrevented||A())}),I=a.useRef(),T=a.useRef(),X=(...d)=>{k(!0),D==null||D(...d)};if(!M)return null;const S=Object.assign({role:o,ref:x.setDialogRef,"aria-modal":o==="dialog"?!0:void 0},re,{style:i,className:r,tabIndex:-1});let P=H?H(S):e.jsxRuntimeExports.jsx("div",Object.assign({},S,{children:g.cloneElement(m,{role:"document"})}));P=e.renderTransition(h,v,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:oe,onExiting:$,onExited:X,onEnter:q,onEntering:K,onEntered:z,children:P});let O=null;return c&&(O=te({ref:x.setBackdropRef,onClick:V}),O=e.renderTransition(w,Q,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:O})),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:Fe.createPortal(e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[O,P]}),M)})});Re.displayName="Modal";const Ke=Object.assign(Re,{Manager:fe});function ze(s,t){s.classList?s.classList.add(t):e.hasClass(s,t)||(typeof s.className=="string"?s.className=s.className+" "+t:s.setAttribute("class",(s.className&&s.className.baseVal||"")+" "+t))}function ve(s,t){return s.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Ge(s,t){s.classList?s.classList.remove(t):typeof s.className=="string"?s.className=ve(s.className,t):s.setAttribute("class",ve(s.className&&s.className.baseVal||"",t))}const B={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class Ve extends fe{adjustAndStore(t,n,o){const r=n.style[t];n.dataset[t]=r,e.style(n,{[t]:`${parseFloat(e.style(n,t))+o}px`})}restore(t,n){const o=n.dataset[t];o!==void 0&&(delete n.dataset[t],e.style(n,{[t]:o}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(ze(n,"modal-open"),!t.scrollBarWidth)return;const o=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";j.qsa(n,B.FIXED_CONTENT).forEach(i=>this.adjustAndStore(o,i,t.scrollBarWidth)),j.qsa(n,B.STICKY_CONTENT).forEach(i=>this.adjustAndStore(r,i,-t.scrollBarWidth)),j.qsa(n,B.NAVBAR_TOGGLER).forEach(i=>this.adjustAndStore(r,i,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();Ge(n,"modal-open");const o=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";j.qsa(n,B.FIXED_CONTENT).forEach(i=>this.restore(o,i)),j.qsa(n,B.STICKY_CONTENT).forEach(i=>this.restore(r,i)),j.qsa(n,B.NAVBAR_TOGGLER).forEach(i=>this.restore(r,i))}}let de;function Xe(s){return de||(de=new Ve(s)),de}const Ce=g.forwardRef(({className:s,bsPrefix:t,as:n="div",...o},r)=>(t=e.useBootstrapPrefix(t,"modal-body"),e.jsxRuntimeExports.jsx(n,{ref:r,className:e.classNames(s,t),...o})));Ce.displayName="ModalBody";const ye=g.createContext({onHide(){}}),pe=g.forwardRef(({bsPrefix:s,className:t,contentClassName:n,centered:o,size:r,fullscreen:i,children:m,scrollable:c,...f},p)=>{s=e.useBootstrapPrefix(s,"modal");const u=`${s}-dialog`,h=typeof i=="string"?`${s}-fullscreen-${i}`:`${s}-fullscreen`;return e.jsxRuntimeExports.jsx("div",{...f,ref:p,className:e.classNames(u,t,r&&`${s}-${r}`,o&&`${u}-centered`,c&&`${u}-scrollable`,i&&h),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames(`${s}-content`,n),children:m})})});pe.displayName="ModalDialog";const be=g.forwardRef(({className:s,bsPrefix:t,as:n="div",...o},r)=>(t=e.useBootstrapPrefix(t,"modal-footer"),e.jsxRuntimeExports.jsx(n,{ref:r,className:e.classNames(s,t),...o})));be.displayName="ModalFooter";const Ye=g.forwardRef(({closeLabel:s="Close",closeVariant:t,closeButton:n=!1,onHide:o,children:r,...i},m)=>{const c=a.useContext(ye),f=e.useEventCallback(()=>{c==null||c.onHide(),o==null||o()});return e.jsxRuntimeExports.jsxs("div",{ref:m,...i,children:[r,n&&e.jsxRuntimeExports.jsx(me,{"aria-label":s,variant:t,onClick:f})]})}),we=g.forwardRef(({bsPrefix:s,className:t,closeLabel:n="Close",closeButton:o=!1,...r},i)=>(s=e.useBootstrapPrefix(s,"modal-header"),e.jsxRuntimeExports.jsx(Ye,{ref:i,...r,className:e.classNames(t,s),closeLabel:n,closeButton:o})));we.displayName="ModalHeader";const Je=Pe("h4"),Ne=g.forwardRef(({className:s,bsPrefix:t,as:n=Je,...o},r)=>(t=e.useBootstrapPrefix(t,"modal-title"),e.jsxRuntimeExports.jsx(n,{ref:r,className:e.classNames(s,t),...o})));Ne.displayName="ModalTitle";function Qe(s){return e.jsxRuntimeExports.jsx(e.Fade,{...s,timeout:null})}function Ze(s){return e.jsxRuntimeExports.jsx(e.Fade,{...s,timeout:null})}const Me=g.forwardRef(({bsPrefix:s,className:t,style:n,dialogClassName:o,contentClassName:r,children:i,dialogAs:m=pe,"data-bs-theme":c,"aria-labelledby":f,"aria-describedby":p,"aria-label":u,show:h=!1,animation:v=!0,backdrop:w=!0,keyboard:Q=!0,onEscapeKeyDown:W,onShow:Z,onHide:N,container:ee,autoFocus:H=!0,enforceFocus:te=!0,restoreFocus:se=!0,restoreFocusOptions:ne,onEntered:_,onExit:A,onExiting:oe,onEnter:D,onEntering:$,onExited:q,backdropClassName:K,manager:z,...re},R)=>{const[M,x]=a.useState({}),[ae,G]=a.useState(!1),y=a.useRef(!1),k=a.useRef(!1),E=a.useRef(null),[C,F]=e.useCallbackRef(),ie=e.useMergedRefs(R,F),V=e.useEventCallback(N),le=e.useIsRTL();s=e.useBootstrapPrefix(s,"modal");const I=a.useMemo(()=>({onHide:V}),[V]);function T(){return z||Xe({isRTL:le})}function X(l){if(!e.canUseDOM)return;const L=T().getScrollbarWidth()>0,he=l.scrollHeight>e.ownerDocument(l).documentElement.clientHeight;x({paddingRight:L&&!he?ge():void 0,paddingLeft:!L&&he?ge():void 0})}const S=e.useEventCallback(()=>{C&&X(C.dialog)});e.useWillUnmount(()=>{e.removeEventListener(window,"resize",S),E.current==null||E.current()});const P=()=>{y.current=!0},O=l=>{y.current&&C&&l.target===C.dialog&&(k.current=!0),y.current=!1},d=()=>{G(!0),E.current=e.transitionEnd(C.dialog,()=>{G(!1)})},Y=l=>{l.target===l.currentTarget&&d()},U=l=>{if(w==="static"){Y(l);return}if(k.current||l.target!==l.currentTarget){k.current=!1;return}N==null||N()},ke=l=>{Q?W==null||W(l):(l.preventDefault(),w==="static"&&d())},Te=(l,L)=>{l&&X(l),D==null||D(l,L)},Se=l=>{E.current==null||E.current(),A==null||A(l)},Oe=(l,L)=>{$==null||$(l,L),e.addEventListener(window,"resize",S)},Le=l=>{l&&(l.style.display=""),q==null||q(l),e.removeEventListener(window,"resize",S)},Be=a.useCallback(l=>e.jsxRuntimeExports.jsx("div",{...l,className:e.classNames(`${s}-backdrop`,K,!v&&"show")}),[v,K,s]),xe={...n,...M};xe.display="block";const Ae=l=>e.jsxRuntimeExports.jsx("div",{role:"dialog",...l,style:xe,className:e.classNames(t,s,ae&&`${s}-static`,!v&&"show"),onClick:w?U:void 0,onMouseUp:O,"data-bs-theme":c,"aria-label":u,"aria-labelledby":f,"aria-describedby":p,children:e.jsxRuntimeExports.jsx(m,{...re,onMouseDown:P,className:o,contentClassName:r,children:i})});return e.jsxRuntimeExports.jsx(ye.Provider,{value:I,children:e.jsxRuntimeExports.jsx(Ke,{show:h,ref:ie,backdrop:w,container:ee,keyboard:!0,autoFocus:H,enforceFocus:te,restoreFocus:se,restoreFocusOptions:ne,onEscapeKeyDown:ke,onShow:Z,onHide:N,onEnter:Te,onEntering:Oe,onEntered:_,onExit:Se,onExiting:oe,onExited:Le,manager:T(),transition:v?Qe:void 0,backdropTransition:v?Ze:void 0,renderBackdrop:Be,renderDialog:Ae})})});Me.displayName="Modal";const b=Object.assign(Me,{Body:Ce,Header:we,Title:Ne,Footer:be,Dialog:pe,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),et=()=>{const{confirmTexts:s}=a.useContext(e.LuminusComponentsContext),{isShown:t,text:n,onFinish:o}=je.usePrompt(),{options:r}=a.useContext(e.PromptContext),[i,m]=a.useState(""),c=a.useCallback(()=>{o(null)},[o]),f=a.useCallback(()=>{o(i)},[o,i]);a.useEffect(()=>{t===!0&&m("")},[t]);const p=a.useMemo(()=>({value:i,onChange:u=>m(u.currentTarget.value),className:"w-100",autoFocus:!0,tabIndex:0}),[i]);return e.jsxRuntimeExports.jsxs(b,{show:t,size:"sm",centered:!0,onHide:c,children:[e.jsxRuntimeExports.jsx(b.Header,{children:e.jsxRuntimeExports.jsx(b.Title,{children:n})}),e.jsxRuntimeExports.jsxs(b.Body,{children:[r.input==="textarea"?e.jsxRuntimeExports.jsx("textarea",{...p,rows:5}):void 0,r.input==="input"?e.jsxRuntimeExports.jsx("input",{...p,type:r.type}):void 0]}),e.jsxRuntimeExports.jsxs(b.Footer,{children:[e.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-secondary",onClick:c,children:s.cancel}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-primary ml",onClick:f,disabled:r.required&&!i,children:s.confirm})]})]})},tt=({children:s})=>{const[t,n]=a.useState(!1),[o,r]=a.useState(""),[i,m]=a.useState({input:"textarea",type:"text"}),c=a.useRef(()=>{}),f=a.useCallback(h=>{r(h),n(!0),console.log("showprompt")},[]),p=a.useCallback(()=>{n(!1)},[]),u=a.useMemo(()=>({isShown:t,text:o,showPrompt:f,hidePrompt:p,resolveRef:c,options:i,setOptions:m}),[t,o,f,p,i]);return e.jsxRuntimeExports.jsxs(e.PromptContext.Provider,{value:u,children:[s,e.jsxRuntimeExports.jsx(et,{})]})},st=({children:s})=>{const[t,n]=a.useState(!1),[o,r]=a.useState(""),i=a.useCallback(f=>{n(!0),r(f)},[]),m=a.useCallback(()=>{n(!1)},[]),c=a.useMemo(()=>({show:t,text:o,showConfirm:i,hideConfirm:m}),[t,o,i,m]);return e.jsxRuntimeExports.jsxs(e.ConfirmContext.Provider,{value:c,children:[e.jsxRuntimeExports.jsx(at,{}),s]})},nt=({cookieDomain:s,axiosInstance:t,LinkComponent:n,language:o,axiosTexts:r,confirmTexts:i,formValidationTexts:m,homeDashboardTexts:c,formSubmitTexts:f,appSearchTexts:p,customSelectTexts:u,children:h})=>{const v=a.useMemo(()=>({axiosInstance:t,cookieDomain:s,LinkComponent:n,language:o,axiosTexts:r,confirmTexts:i,formValidationTexts:m,homeDashboardTexts:c,formSubmitTexts:f,appSearchTexts:p,customSelectTexts:u}),[t,s,n,o,r,i,m,c,f,p,u]);return e.jsxRuntimeExports.jsx(e.LuminusComponentsContext.Provider,{value:v,children:e.jsxRuntimeExports.jsx(st,{children:e.jsxRuntimeExports.jsxs(tt,{children:[e.jsxRuntimeExports.jsx(e.Ie,{}),h]})})})},ot=({children:s})=>{const[t,n]=a.useState(!1),[o]=a.useState(new Set),r=a.useCallback(c=>{o.add(c),n(!0)},[o]),i=a.useCallback(c=>{o.delete(c),o.size===0&&n(!1)},[o]),m=a.useMemo(()=>({isLoading:t,startLoading:r,stopLoading:i}),[t,r,i]);return e.jsxRuntimeExports.jsxs(e.LoadingContext.Provider,{value:m,children:[t&&e.jsxRuntimeExports.jsx(j.Loading,{}),s]})},rt=({children:s})=>{const t=e.useAxios(),n=a.useCallback(()=>{const u=localStorage.getItem("user")??null;return u?JSON.parse(u):null},[]),[o,r]=a.useState(n()),i=a.useCallback(async()=>{let u=null;return await t.get("/user/detail").then(h=>{u=h.data}).catch(()=>{u=null}),localStorage.setItem("user",JSON.stringify(u)),u},[t]),m=a.useCallback(()=>{localStorage.removeItem("user")},[]),c=a.useCallback(async()=>{const u=await i();return u?(r(u),!0):!1},[i]),f=a.useCallback(()=>{m(),r(null)},[m]),p=a.useMemo(()=>({user:o,loginUser:c,logoutUser:f}),[o,c,f]);return a.useEffect(()=>{r(n())},[n]),e.jsxRuntimeExports.jsx(e.UserContext.Provider,{value:p,children:s})},at=()=>{const{confirmTexts:s}=a.useContext(e.LuminusComponentsContext),{onConfirm:t,onCancel:n,text:o,show:r}=je.useConfirm();return e.jsxRuntimeExports.jsx(b,{show:r,size:"sm",centered:!0,onHide:n,children:e.jsxRuntimeExports.jsxs(b.Body,{children:[e.jsxRuntimeExports.jsx("div",{className:"mb-5 text-center",children:e.jsxRuntimeExports.jsx(De.Typography,{variant:"h6",children:o})}),e.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex gap-5",children:[e.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-secondary w-100",onClick:n,children:s.no}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-primary w-100 ml",onClick:t,children:s.yes})]})]})})};exports.LoadingContext=e.LoadingContext;exports.LuminusComponentsContext=e.LuminusComponentsContext;exports.UserContext=e.UserContext;exports.LoadingProvider=ot;exports.LuminusComponentsProvider=nt;exports.UserProvider=rt;
@@ -1,15 +1,15 @@
1
- import { j as r, c as w, e as ye, f as Ee, o as Fe, s as G, g as De, h as tt, i as nt, k as b, l as ke, m as Oe, n as We, p as ot, r as Se, q as st, t as U, v as rt, w as at, x as it, y as Be, F as Ue, z as lt, A as dt, L as be, P as He, C as ct, I as ut, B as ft, b as ht, U as mt } from "./UserAvatarToggle-B-BYsINz.js";
1
+ import { j as r, c as w, e as ye, f as Ee, o as Fe, s as G, g as De, h as tt, i as nt, k as j, l as ke, m as Oe, n as We, p as ot, r as Se, q as st, t as U, v as rt, w as at, x as it, y as Be, F as Ue, z as lt, A as dt, L as be, P as He, C as ct, I as ut, B as ft, b as ht, U as mt } from "./UserAvatarToggle-B3sPIYPV.js";
2
2
  import * as y from "react";
3
- import { forwardRef as gt, useState as p, useRef as j, useImperativeHandle as pt, useEffect as re, useCallback as g, useContext as ae, useMemo as R } from "react";
4
- import { a as vt, u as yt } from "./useConfirm-CkSyQrSF.js";
5
- import { T as xt } from "./Typography-CHfAgqP5.js";
6
- import { d as wt, u as Ct, q as D, L as Et } from "./DataKey-CBV-NBJf.js";
3
+ import { forwardRef as gt, useState as p, useRef as N, useImperativeHandle as pt, useEffect as re, useCallback as g, useContext as ae, useMemo as R } from "react";
4
+ import { a as vt, u as yt } from "./useConfirm-Dl4SoYM1.js";
5
+ import { T as xt } from "./Typography-e-xJ0W5h.js";
6
+ import { d as wt, u as Ct, q as D, L as Et } from "./DataKey-BKjUrLwK.js";
7
7
  import bt from "react-dom";
8
8
  const jt = (t) => /* @__PURE__ */ y.forwardRef((e, n) => /* @__PURE__ */ r.jsx("div", {
9
9
  ...e,
10
10
  ref: n,
11
11
  className: w(e.className, t)
12
- })), Tt = {
12
+ })), Nt = {
13
13
  /** An accessible label indicating the relevant information about the Close Button. */
14
14
  "aria-label": ye.string,
15
15
  /** A callback fired after the Close Button is clicked. */
@@ -33,7 +33,7 @@ const jt = (t) => /* @__PURE__ */ y.forwardRef((e, n) => /* @__PURE__ */ r.jsx("
33
33
  ...o
34
34
  }));
35
35
  je.displayName = "CloseButton";
36
- je.propTypes = Tt;
36
+ je.propTypes = Nt;
37
37
  var se;
38
38
  function Ae(t) {
39
39
  if ((!se && se !== 0 || t) && Ee) {
@@ -51,12 +51,12 @@ function xe(t) {
51
51
  return t.body;
52
52
  }
53
53
  }
54
- function Nt(t = document) {
54
+ function Tt(t = document) {
55
55
  const e = t.defaultView;
56
56
  return Math.abs(e.innerWidth - t.documentElement.clientWidth);
57
57
  }
58
58
  const Le = wt("modal-open");
59
- class Te {
59
+ class Ne {
60
60
  constructor({
61
61
  ownerDocument: e,
62
62
  handleContainerOverflow: n = !0,
@@ -65,7 +65,7 @@ class Te {
65
65
  this.handleContainerOverflow = n, this.isRTL = o, this.modals = [], this.ownerDocument = e;
66
66
  }
67
67
  getScrollbarWidth() {
68
- return Nt(this.ownerDocument);
68
+ return Tt(this.ownerDocument);
69
69
  }
70
70
  getElement() {
71
71
  return (this.ownerDocument || document).body;
@@ -116,12 +116,12 @@ function Rt(t, e) {
116
116
  }
117
117
  let we;
118
118
  function kt(t) {
119
- return we || (we = new Te({
119
+ return we || (we = new Ne({
120
120
  ownerDocument: t == null ? void 0 : t.document
121
121
  })), we;
122
122
  }
123
123
  function Ot(t) {
124
- const e = De(), n = t || kt(e), o = j({
124
+ const e = De(), n = t || kt(e), o = N({
125
125
  dialog: null,
126
126
  backdrop: null
127
127
  });
@@ -149,7 +149,7 @@ const $e = /* @__PURE__ */ gt((t, e) => {
149
149
  onBackdropClick: h,
150
150
  onEscapeKeyDown: d,
151
151
  transition: v,
152
- runTransition: T,
152
+ runTransition: C,
153
153
  backdropTransition: k,
154
154
  runBackdropTransition: ie,
155
155
  autoFocus: V = !0,
@@ -170,9 +170,9 @@ const $e = /* @__PURE__ */ gt((t, e) => {
170
170
  onEntering: Q,
171
171
  onEntered: Z
172
172
  } = t, me = Rt(t, Mt);
173
- const C = De(), S = tt(fe), m = Ot(ue), ge = nt(), ee = Ct(n), [N, B] = p(!n), x = j(null);
174
- pt(e, () => m, [m]), Ee && !ee && n && (x.current = xe(C == null ? void 0 : C.document)), n && N && B(!1);
175
- const E = b(() => {
173
+ const E = De(), S = tt(fe), m = Ot(ue), ge = nt(), ee = Ct(n), [T, B] = p(!n), x = N(null);
174
+ pt(e, () => m, [m]), Ee && !ee && n && (x.current = xe(E == null ? void 0 : E.document)), n && T && B(!1);
175
+ const b = j(() => {
176
176
  if (m.add(), A.current = ke(document, "keydown", ve), _.current = ke(
177
177
  document,
178
178
  "focus",
@@ -182,37 +182,37 @@ const $e = /* @__PURE__ */ gt((t, e) => {
182
182
  !0
183
183
  ), X && X(), V) {
184
184
  var c, oe;
185
- const z = xe((c = (oe = m.dialog) == null ? void 0 : oe.ownerDocument) != null ? c : C == null ? void 0 : C.document);
185
+ const z = xe((c = (oe = m.dialog) == null ? void 0 : oe.ownerDocument) != null ? c : E == null ? void 0 : E.document);
186
186
  m.dialog && z && !Oe(m.dialog, z) && (x.current = z, m.dialog.focus());
187
187
  }
188
- }), P = b(() => {
188
+ }), P = j(() => {
189
189
  if (m.remove(), A.current == null || A.current(), _.current == null || _.current(), O) {
190
190
  var c;
191
191
  (c = x.current) == null || c.focus == null || c.focus(de), x.current = null;
192
192
  }
193
193
  });
194
194
  re(() => {
195
- !n || !S || E();
195
+ !n || !S || b();
196
196
  }, [
197
197
  n,
198
198
  S,
199
199
  /* should never change: */
200
- E
200
+ b
201
201
  ]), re(() => {
202
- N && P();
203
- }, [N, P]), We(() => {
202
+ T && P();
203
+ }, [T, P]), We(() => {
204
204
  P();
205
205
  });
206
- const pe = b(() => {
206
+ const pe = j(() => {
207
207
  if (!le || !ge() || !m.isTopModal())
208
208
  return;
209
- const c = xe(C == null ? void 0 : C.document);
209
+ const c = xe(E == null ? void 0 : E.document);
210
210
  m.dialog && c && !Oe(m.dialog, c) && m.dialog.focus();
211
- }), te = b((c) => {
211
+ }), te = j((c) => {
212
212
  c.target === c.currentTarget && (h == null || h(c), l === !0 && H());
213
- }), ve = b((c) => {
213
+ }), ve = j((c) => {
214
214
  f && ot(c) && m.isTopModal() && (d == null || d(c), c.defaultPrevented || H());
215
- }), _ = j(), A = j(), ne = (...c) => {
215
+ }), _ = N(), A = N(), ne = (...c) => {
216
216
  B(!0), $ == null || $(...c);
217
217
  };
218
218
  if (!S)
@@ -232,7 +232,7 @@ const $e = /* @__PURE__ */ gt((t, e) => {
232
232
  role: "document"
233
233
  })
234
234
  }));
235
- K = Se(v, T, {
235
+ K = Se(v, C, {
236
236
  unmountOnExit: !0,
237
237
  mountOnEnter: !0,
238
238
  appear: !0,
@@ -263,7 +263,7 @@ const $e = /* @__PURE__ */ gt((t, e) => {
263
263
  });
264
264
  $e.displayName = "Modal";
265
265
  const St = Object.assign($e, {
266
- Manager: Te
266
+ Manager: Ne
267
267
  });
268
268
  function Bt(t, e) {
269
269
  t.classList ? t.classList.add(e) : st(t, e) || (typeof t.className == "string" ? t.className = t.className + " " + e : t.setAttribute("class", (t.className && t.className.baseVal || "") + " " + e));
@@ -279,7 +279,7 @@ const W = {
279
279
  STICKY_CONTENT: ".sticky-top",
280
280
  NAVBAR_TOGGLER: ".navbar-toggler"
281
281
  };
282
- class Lt extends Te {
282
+ class Lt extends Ne {
283
283
  adjustAndStore(e, n, o) {
284
284
  const s = n.style[e];
285
285
  n.dataset[e] = s, G(n, {
@@ -327,7 +327,7 @@ const _e = /* @__PURE__ */ y.createContext({
327
327
  // eslint-disable-next-line @typescript-eslint/no-empty-function
328
328
  onHide() {
329
329
  }
330
- }), Ne = /* @__PURE__ */ y.forwardRef(({
330
+ }), Te = /* @__PURE__ */ y.forwardRef(({
331
331
  bsPrefix: t,
332
332
  className: e,
333
333
  contentClassName: n,
@@ -350,7 +350,7 @@ const _e = /* @__PURE__ */ y.createContext({
350
350
  })
351
351
  });
352
352
  });
353
- Ne.displayName = "ModalDialog";
353
+ Te.displayName = "ModalDialog";
354
354
  const Ke = /* @__PURE__ */ y.forwardRef(({
355
355
  className: t,
356
356
  bsPrefix: e,
@@ -370,7 +370,7 @@ const Ft = /* @__PURE__ */ y.forwardRef(({
370
370
  children: s,
371
371
  ...a
372
372
  }, u) => {
373
- const l = ae(_e), f = b(() => {
373
+ const l = ae(_e), f = j(() => {
374
374
  l == null || l.onHide(), o == null || o();
375
375
  });
376
376
  return /* @__PURE__ */ r.jsxs("div", {
@@ -426,14 +426,14 @@ const Ve = /* @__PURE__ */ y.forwardRef(({
426
426
  dialogClassName: o,
427
427
  contentClassName: s,
428
428
  children: a,
429
- dialogAs: u = Ne,
429
+ dialogAs: u = Te,
430
430
  "data-bs-theme": l,
431
431
  "aria-labelledby": f,
432
432
  "aria-describedby": h,
433
433
  "aria-label": d,
434
434
  /* BaseModal props */
435
435
  show: v = !1,
436
- animation: T = !0,
436
+ animation: C = !0,
437
437
  backdrop: k = !0,
438
438
  keyboard: ie = !0,
439
439
  onEscapeKeyDown: V,
@@ -453,8 +453,8 @@ const Ve = /* @__PURE__ */ y.forwardRef(({
453
453
  backdropClassName: Q,
454
454
  manager: Z,
455
455
  ...me
456
- }, C) => {
457
- const [S, m] = p({}), [ge, ee] = p(!1), N = j(!1), B = j(!1), x = j(null), [E, P] = rt(), pe = at(C, P), te = b(O), ve = it();
456
+ }, E) => {
457
+ const [S, m] = p({}), [ge, ee] = p(!1), T = N(!1), B = N(!1), x = N(null), [b, P] = rt(), pe = at(E, P), te = j(O), ve = it();
458
458
  t = U(t, "modal");
459
459
  const _ = R(() => ({
460
460
  onHide: te
@@ -473,18 +473,18 @@ const Ve = /* @__PURE__ */ y.forwardRef(({
473
473
  paddingLeft: !F && Re ? Ae() : void 0
474
474
  });
475
475
  }
476
- const L = b(() => {
477
- E && ne(E.dialog);
476
+ const L = j(() => {
477
+ b && ne(b.dialog);
478
478
  });
479
479
  We(() => {
480
480
  Be(window, "resize", L), x.current == null || x.current();
481
481
  });
482
482
  const K = () => {
483
- N.current = !0;
483
+ T.current = !0;
484
484
  }, I = (i) => {
485
- N.current && E && i.target === E.dialog && (B.current = !0), N.current = !1;
485
+ T.current && b && i.target === b.dialog && (B.current = !0), T.current = !1;
486
486
  }, c = () => {
487
- ee(!0), x.current = dt(E.dialog, () => {
487
+ ee(!0), x.current = dt(b.dialog, () => {
488
488
  ee(!1);
489
489
  });
490
490
  }, oe = (i) => {
@@ -511,8 +511,8 @@ const Ve = /* @__PURE__ */ y.forwardRef(({
511
511
  i && (i.style.display = ""), J == null || J(i), Be(window, "resize", L);
512
512
  }, Ze = g((i) => /* @__PURE__ */ r.jsx("div", {
513
513
  ...i,
514
- className: w(`${t}-backdrop`, Q, !T && "show")
515
- }), [T, Q, t]), Me = {
514
+ className: w(`${t}-backdrop`, Q, !C && "show")
515
+ }), [C, Q, t]), Me = {
516
516
  ...n,
517
517
  ...S
518
518
  };
@@ -521,7 +521,7 @@ const Ve = /* @__PURE__ */ y.forwardRef(({
521
521
  role: "dialog",
522
522
  ...i,
523
523
  style: Me,
524
- className: w(e, t, ge && `${t}-static`, !T && "show"),
524
+ className: w(e, t, ge && `${t}-static`, !C && "show"),
525
525
  onClick: k ? z : void 0,
526
526
  onMouseUp: I,
527
527
  "data-bs-theme": l,
@@ -558,8 +558,8 @@ const Ve = /* @__PURE__ */ y.forwardRef(({
558
558
  onExiting: he,
559
559
  onExited: Qe,
560
560
  manager: A(),
561
- transition: T ? Wt : void 0,
562
- backdropTransition: T ? Ut : void 0,
561
+ transition: C ? Wt : void 0,
562
+ backdropTransition: C ? Ut : void 0,
563
563
  renderBackdrop: Ze,
564
564
  renderDialog: et
565
565
  })
@@ -571,7 +571,7 @@ const M = Object.assign(Ve, {
571
571
  Header: ze,
572
572
  Title: Ge,
573
573
  Footer: Ke,
574
- Dialog: Ne,
574
+ Dialog: Te,
575
575
  TRANSITION_DURATION: 300,
576
576
  BACKDROP_TRANSITION_DURATION: 150
577
577
  }), Ht = () => {
@@ -608,7 +608,7 @@ const M = Object.assign(Ve, {
608
608
  ] })
609
609
  ] });
610
610
  }, $t = ({ children: t }) => {
611
- const [e, n] = p(!1), [o, s] = p(""), [a, u] = p({ input: "textarea", type: "text" }), l = j(() => {
611
+ const [e, n] = p(!1), [o, s] = p(""), [a, u] = p({ input: "textarea", type: "text" }), l = N(() => {
612
612
  }), f = g((v) => {
613
613
  s(v), n(!0), console.log("showprompt");
614
614
  }, []), h = g(() => {
@@ -636,8 +636,8 @@ const M = Object.assign(Ve, {
636
636
  /* @__PURE__ */ r.jsx(_t, {}),
637
637
  t
638
638
  ] });
639
- }, Yt = ({ cookieDomain: t, axiosInstance: e, LinkComponent: n, language: o, axiosTexts: s, confirmTexts: a, formValidationTexts: u, homeDashboardTexts: l, formSubmitTexts: f, appSearchTexts: h, children: d }) => {
640
- const v = R(() => ({
639
+ }, Yt = ({ cookieDomain: t, axiosInstance: e, LinkComponent: n, language: o, axiosTexts: s, confirmTexts: a, formValidationTexts: u, homeDashboardTexts: l, formSubmitTexts: f, appSearchTexts: h, customSelectTexts: d, children: v }) => {
640
+ const C = R(() => ({
641
641
  axiosInstance: e,
642
642
  cookieDomain: t,
643
643
  LinkComponent: n,
@@ -647,7 +647,8 @@ const M = Object.assign(Ve, {
647
647
  formValidationTexts: u,
648
648
  homeDashboardTexts: l,
649
649
  formSubmitTexts: f,
650
- appSearchTexts: h
650
+ appSearchTexts: h,
651
+ customSelectTexts: d
651
652
  }), [
652
653
  e,
653
654
  t,
@@ -658,11 +659,12 @@ const M = Object.assign(Ve, {
658
659
  u,
659
660
  l,
660
661
  f,
661
- h
662
+ h,
663
+ d
662
664
  ]);
663
- return /* @__PURE__ */ r.jsx(be.Provider, { value: v, children: /* @__PURE__ */ r.jsx(Pt, { children: /* @__PURE__ */ r.jsxs($t, { children: [
665
+ return /* @__PURE__ */ r.jsx(be.Provider, { value: C, children: /* @__PURE__ */ r.jsx(Pt, { children: /* @__PURE__ */ r.jsxs($t, { children: [
664
666
  /* @__PURE__ */ r.jsx(ut, {}),
665
- d
667
+ v
666
668
  ] }) }) });
667
669
  }, Jt = ({ children: t }) => {
668
670
  const [e, n] = p(!1), [o] = p(/* @__PURE__ */ new Set()), s = g((l) => {
@@ -5,3 +5,5 @@ export { default as useConfirm } from './useConfirm/useConfirm';
5
5
  export { default as usePrompt } from './usePrompt/usePrompt';
6
6
  export { default as useZodSchemaTypes } from './useZodSchemaTypes/useZodSchemaTypes';
7
7
  export { default as useClickOutside } from './useClickOutside/useClickOutside';
8
+ export { default as usePermissions } from './usePermissions/usePermissions';
9
+ export { default as useKeyPress } from './useKeyPress/useKeyPress';
@@ -0,0 +1,2 @@
1
+ declare const useKeyPress: (handleKeyPress: (e: KeyboardEvent) => void) => void;
2
+ export default useKeyPress;
@@ -0,0 +1,4 @@
1
+ declare const usePermissions: () => {
2
+ checkUserHasPermissions: (permissions: string[]) => boolean;
3
+ };
4
+ export default usePermissions;