@zydon/common 2.7.81 → 2.7.82

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 (57) hide show
  1. package/dist/{chunk-I5R4OVA5.js → chunk-4HWP7ZLZ.js} +2 -2
  2. package/dist/{chunk-HYJEAKVR.js → chunk-CYWFK4OE.js} +2 -2
  3. package/dist/{chunk-PSWJSHGP.js → chunk-EDUNXVYV.js} +2 -2
  4. package/dist/chunk-I4PPSW36.js +8 -0
  5. package/dist/chunk-I4PPSW36.js.map +1 -0
  6. package/dist/{chunk-PJR4CLOE.js → chunk-IPPNUP2X.js} +2 -2
  7. package/dist/chunk-KKVRDMSE.js +8 -0
  8. package/dist/chunk-KKVRDMSE.js.map +1 -0
  9. package/dist/components/Actions/index.js +2 -2
  10. package/dist/components/Autocomplete/index.d.ts +1 -1
  11. package/dist/components/AutocompleteDetailed/index.d.ts +1 -1
  12. package/dist/components/Avatar/index.d.ts +4 -2
  13. package/dist/components/BulkEditModal/index.js +1 -1
  14. package/dist/components/CustomAvatar/index.d.ts +1 -1
  15. package/dist/components/CustomAvatarGroup/index.d.ts +1 -1
  16. package/dist/components/DataView/index.d.ts +21 -7
  17. package/dist/components/DataView/index.js +2 -2
  18. package/dist/components/DragButton/index.d.ts +3 -1
  19. package/dist/components/DragContainer/index.d.ts +3 -1
  20. package/dist/components/DrawerActions/index.js +2 -2
  21. package/dist/components/DynamicDataView/index.js +4 -4
  22. package/dist/components/FieldMentions/index.js +2 -2
  23. package/dist/components/FieldMentions/index.js.map +1 -1
  24. package/dist/components/FrameSkeleton/index.js +3 -3
  25. package/dist/components/Icon/index.d.ts +1 -1
  26. package/dist/components/IconButton/index.d.ts +1 -1
  27. package/dist/components/Label/index.d.ts +1 -1
  28. package/dist/components/MaskedInput/index.d.ts +2 -2
  29. package/dist/components/ModalActions/index.js +2 -2
  30. package/dist/components/NumberInput/index.d.ts +1 -1
  31. package/dist/components/Portal/index.d.ts +2 -3
  32. package/dist/components/Portal/index.js +1 -1
  33. package/dist/components/Result/index.d.ts +1 -1
  34. package/dist/components/Scrollbar/index.d.ts +2 -2
  35. package/dist/components/TextMaxLine/index.d.ts +1 -1
  36. package/dist/components/carousel/index.d.ts +9 -3
  37. package/dist/components/form/Codes/index.js +3 -1
  38. package/dist/components/form/Codes/index.js.map +1 -1
  39. package/dist/hooks/useCollapseSidebarOnMount.js +3 -3
  40. package/dist/hooks/useEventListener.js +3 -1
  41. package/dist/hooks/useLocalStorage.js +2 -2
  42. package/dist/hooks/useOnClickOutside.js +3 -1
  43. package/dist/hooks/useOnClickOutside.js.map +1 -1
  44. package/dist/hooks/useSnackbar.d.ts +8 -8
  45. package/dist/index.d.ts +2 -2
  46. package/dist/theme/core/index.d.ts +1 -1
  47. package/dist/theme/styles/index.d.ts +12 -12
  48. package/package.json +11 -7
  49. package/dist/chunk-BLVCNBTJ.js +0 -7
  50. package/dist/chunk-BLVCNBTJ.js.map +0 -1
  51. package/dist/chunk-IN7SP2ND.js +0 -8
  52. package/dist/chunk-IN7SP2ND.js.map +0 -1
  53. package/dist/{chunk-I5R4OVA5.js.map → chunk-4HWP7ZLZ.js.map} +0 -0
  54. package/dist/{chunk-HYJEAKVR.js.map → chunk-CYWFK4OE.js.map} +0 -0
  55. package/dist/{chunk-PSWJSHGP.js.map → chunk-EDUNXVYV.js.map} +0 -0
  56. package/dist/{chunk-PJR4CLOE.js.map → chunk-IPPNUP2X.js.map} +0 -0
  57. package/dist/{index-c8f1e6e7.d.ts → index-5a5e5dc8.d.ts} +12 -12
@@ -3,7 +3,7 @@ import { a as a$5 } from './chunk-IJZCVZ32.js';
3
3
  import { a as a$8 } from './chunk-IDFJFFIV.js';
4
4
  import { a as a$6 } from './chunk-6U5LS7MP.js';
5
5
  import { i, j, a as a$2, b as b$2, c, d, f, e, g, h } from './chunk-TB4Y7LXN.js';
6
- import { a as a$9 } from './chunk-IN7SP2ND.js';
6
+ import { a as a$9 } from './chunk-I4PPSW36.js';
7
7
  import { a as a$3 } from './chunk-CO2KQFUN.js';
8
8
  import { a } from './chunk-VPG46WNM.js';
9
9
  import { a as a$7 } from './chunk-F65ZXAGV.js';
@@ -23,4 +23,4 @@ var b="datagrid-actions";var Ao=({rowCount:t,page:e,rowsPerPage:r,onPaginationCh
23
23
 
24
24
  export { ao as a, so as b, co as c, xr as d };
25
25
  //# sourceMappingURL=out.js.map
26
- //# sourceMappingURL=chunk-I5R4OVA5.js.map
26
+ //# sourceMappingURL=chunk-4HWP7ZLZ.js.map
@@ -1,9 +1,9 @@
1
+ import { a as a$1 } from './chunk-KKVRDMSE.js';
1
2
  import { a } from './chunk-POTVACYB.js';
2
- import { a as a$1 } from './chunk-BLVCNBTJ.js';
3
3
  import { useCallback, useState, useEffect } from 'react';
4
4
 
5
5
  var h=typeof window>"u",p=(r,t,o={})=>{let{initializeWithValue:l=!0}=o,S=useCallback(e=>o.serializer?o.serializer(e):JSON.stringify(e),[o]),d=useCallback(e=>{if(o.deserializer)return o.deserializer(e);if(e==="undefined")return;let n=t instanceof Function?t():t,g;try{g=JSON.parse(e);}catch{return n}return g},[o,t]),a$2=useCallback(()=>{let e=t instanceof Function?t():t;if(h)return e;try{let n=window.localStorage.getItem(r);return n?d(n):e}catch{return e}},[t,r,d]),[w,s]=useState(()=>l?a$2():t instanceof Function?t():t),T=a(e=>{try{let n=e instanceof Function?e(a$2()):e;window.localStorage.setItem(r,S(n)),s(n),window.dispatchEvent(new StorageEvent("local-storage",{key:r}));}catch{}}),m=a(()=>{let e=t instanceof Function?t():t;window.localStorage.removeItem(r),s(e),window.dispatchEvent(new StorageEvent("local-storage",{key:r}));});useEffect(()=>{s(a$2());},[r]);let f=useCallback(e=>{e.key&&e.key!==r||s(a$2());},[r,a$2]);return a$1("storage",f),a$1("local-storage",f),[w,T,m]},I=p;
6
6
 
7
7
  export { I as a };
8
8
  //# sourceMappingURL=out.js.map
9
- //# sourceMappingURL=chunk-HYJEAKVR.js.map
9
+ //# sourceMappingURL=chunk-CYWFK4OE.js.map
@@ -1,8 +1,8 @@
1
1
  import { a as a$1 } from './chunk-XNKYJHNL.js';
2
- import { a } from './chunk-HYJEAKVR.js';
2
+ import { a } from './chunk-CYWFK4OE.js';
3
3
 
4
4
  var s=(t=!0)=>{let[,a$2]=a("isNavMini",!1);a$1(()=>{a$2(t);});},r=s;
5
5
 
6
6
  export { r as a };
7
7
  //# sourceMappingURL=out.js.map
8
- //# sourceMappingURL=chunk-PSWJSHGP.js.map
8
+ //# sourceMappingURL=chunk-EDUNXVYV.js.map
@@ -0,0 +1,8 @@
1
+ import { useState, useEffect } from 'react';
2
+ import { createPortal } from 'react-dom';
3
+
4
+ var c=({children:e,container:o,waitBeforeShow:t=50})=>{let[l,m]=useState(!1);return useEffect(()=>{let n=setTimeout(()=>m(!0),t);return ()=>clearTimeout(n)},[t]),t?l?createPortal(e,document.getElementById(o)||document.body):null:createPortal(e,document.getElementById(o)||document.body)},p=c;
5
+
6
+ export { p as a };
7
+ //# sourceMappingURL=out.js.map
8
+ //# sourceMappingURL=chunk-I4PPSW36.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Portal/index.tsx"],"names":["useEffect","useState","createPortal","Portal","children","container","waitBeforeShow","isShown","setIsShown","timer","Portal_default"],"mappings":"AAAA,OAAmC,aAAAA,EAAW,YAAAC,MAAgB,QAC9D,OAAS,gBAAAC,MAAoB,YAI7B,IAAMC,EAAS,CAAC,CACd,SAAAC,EACA,UAAAC,EACA,eAAAC,EAAiB,EACnB,IAAgE,CAC9D,GAAM,CAACC,EAASC,CAAU,EAAIP,EAAS,EAAK,EAO5C,OALAD,EAAU,IAAM,CACd,IAAMS,EAAQ,WAAW,IAAMD,EAAW,EAAI,EAAGF,CAAc,EAC/D,MAAO,IAAM,aAAaG,CAAK,CACjC,EAAG,CAACH,CAAc,CAAC,EAEdA,EAOEC,EACHL,EACEE,EACA,SAAS,eAAeC,CAAS,GAAK,SAAS,IACjD,EACA,KAXKH,EACLE,EACA,SAAS,eAAeC,CAAS,GAAK,SAAS,IACjD,CASJ,EAEOK,EAAQP","sourcesContent":["import React, { PropsWithChildren, useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { PortalProps } from './props';\n\nconst Portal = ({\n children,\n container,\n waitBeforeShow = 50,\n}: PropsWithChildren<PortalProps>): React.ReactPortal | null => {\n const [isShown, setIsShown] = useState(false);\n\n useEffect(() => {\n const timer = setTimeout(() => setIsShown(true), waitBeforeShow);\n return () => clearTimeout(timer);\n }, [waitBeforeShow]);\n\n if (!waitBeforeShow) {\n return createPortal(\n children,\n document.getElementById(container) || document.body,\n );\n }\n\n return isShown\n ? createPortal(\n children,\n document.getElementById(container) || document.body,\n )\n : null;\n};\n\nexport default Portal;\n"]}
@@ -1,8 +1,8 @@
1
- import { a } from './chunk-IN7SP2ND.js';
1
+ import { a } from './chunk-I4PPSW36.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
 
4
4
  var i=({children:r,id:t="actions"})=>jsx(a,{container:t,children:r}),s=i;
5
5
 
6
6
  export { s as a };
7
7
  //# sourceMappingURL=out.js.map
8
- //# sourceMappingURL=chunk-PJR4CLOE.js.map
8
+ //# sourceMappingURL=chunk-IPPNUP2X.js.map
@@ -0,0 +1,8 @@
1
+ import { a } from './chunk-POTVACYB.js';
2
+ import { useEffect } from 'react';
3
+
4
+ function l(n,s,t,o){let d=a(s);useEffect(()=>{let e=t?.current||window;if(!(e&&e.addEventListener))return;let i=E=>d(E);return e.addEventListener(n,i,o),()=>{e.removeEventListener(n,i);}},[t,n,o,d]);}var p=l;
5
+
6
+ export { p as a };
7
+ //# sourceMappingURL=out.js.map
8
+ //# sourceMappingURL=chunk-KKVRDMSE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hooks/useEventListener.ts"],"names":["useEffect","useEventListener","eventName","handler","element","options","stableHandler","useEventCallback_default","targetElement","eventListener","event","useEventListener_default"],"mappings":"wCAAA,OAAoB,aAAAA,MAAiB,QA+BrC,SAASC,EAKPC,EACAC,EAGAC,EACAC,EACA,CACA,IAAMC,EAAgBC,EAAiBJ,CAAO,EAE9CH,EAAU,IAAM,CACd,IAAMQ,EAA4BJ,GAAS,SAAW,OACtD,GAAI,EAAEI,GAAiBA,EAAc,kBACnC,OAGF,IAAMC,EAAgCC,GAASJ,EAAcI,CAAK,EAElE,OAAAF,EAAc,iBAAiBN,EAAWO,EAAeJ,CAAO,EAEzD,IAAM,CACXG,EAAc,oBAAoBN,EAAWO,CAAa,CAC5D,CACF,EAAG,CAACL,EAASF,EAAWG,EAASC,CAAa,CAAC,CACjD,CAEA,IAAOK,EAAQV","sourcesContent":["import { RefObject, useEffect } from 'react';\n\nimport useEventCallback from './useEventCallback';\n\n// Window Event based useEventListener interface\nfunction useEventListener<K extends keyof WindowEventMap>(\n eventName: K,\n handler: (event: WindowEventMap[K]) => void,\n element?: undefined,\n options?: boolean | AddEventListenerOptions,\n): void;\n\n// Element Event based useEventListener interface\nfunction useEventListener<\n K extends keyof HTMLElementEventMap,\n T extends HTMLElement = HTMLDivElement,\n>(\n eventName: K,\n handler: (event: HTMLElementEventMap[K]) => void,\n element: RefObject<T | null>,\n options?: boolean | AddEventListenerOptions,\n): void;\n\n// Document Event based useEventListener interface\nfunction useEventListener<K extends keyof DocumentEventMap>(\n eventName: K,\n handler: (event: DocumentEventMap[K]) => void,\n element: RefObject<Document | null>,\n options?: boolean | AddEventListenerOptions,\n): void;\n\nfunction useEventListener<\n KW extends keyof WindowEventMap,\n KH extends keyof HTMLElementEventMap,\n T extends HTMLElement | void = void,\n>(\n eventName: KW | KH,\n handler: (\n event: WindowEventMap[KW] | HTMLElementEventMap[KH] | Event,\n ) => void,\n element?: RefObject<T | null>,\n options?: boolean | AddEventListenerOptions,\n) {\n const stableHandler = useEventCallback(handler);\n\n useEffect(() => {\n const targetElement: T | Window = element?.current || window;\n if (!(targetElement && targetElement.addEventListener)) {\n return;\n }\n\n const eventListener: typeof handler = event => stableHandler(event);\n\n targetElement.addEventListener(eventName, eventListener, options);\n\n return () => {\n targetElement.removeEventListener(eventName, eventListener);\n };\n }, [element, eventName, options, stableHandler]);\n}\n\nexport default useEventListener;\n"]}
@@ -1,4 +1,4 @@
1
- export { a as default } from '../../chunk-PJR4CLOE.js';
2
- import '../../chunk-IN7SP2ND.js';
1
+ export { a as default } from '../../chunk-IPPNUP2X.js';
2
+ import '../../chunk-I4PPSW36.js';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -6,6 +6,6 @@ import '@mui/material/Autocomplete';
6
6
  import '../../types/option.js';
7
7
  import '../../types/icon.js';
8
8
 
9
- declare const Autocomplete: react.NamedExoticComponent<Omit<AutocompleteProps, "ref"> & react.RefAttributes<unknown>>;
9
+ declare const Autocomplete: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<AutocompleteProps, "ref"> & react.RefAttributes<unknown>>>;
10
10
 
11
11
  export { Autocomplete as default };
@@ -13,6 +13,6 @@ type AutocompleteDetailedProps = BaseAutoComplete & {
13
13
  showValueInLabel?: boolean;
14
14
  };
15
15
 
16
- declare const AutocompleteDetailed: react.NamedExoticComponent<Omit<AutocompleteDetailedProps, "ref"> & react.RefAttributes<unknown>>;
16
+ declare const AutocompleteDetailed: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<AutocompleteDetailedProps, "ref"> & react.RefAttributes<unknown>>>;
17
17
 
18
18
  export { AutocompleteDetailed as default };
@@ -9,8 +9,10 @@ interface ImageContainerProps {
9
9
  height?: string | number;
10
10
  }
11
11
 
12
- declare const Avatar: react.NamedExoticComponent<Omit<PropsWithChildren<ImageContainerProps & _mui_material_Avatar.AvatarOwnProps & _mui_material_Avatar.AvatarSlotsAndSlotProps & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "className" | "style" | "classes" | "sx" | "variant" | "slots" | "slotProps" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & {
12
+ declare const Avatar: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<PropsWithChildren<ImageContainerProps & _mui_material_Avatar.AvatarOwnProps & _mui_material_Avatar.AvatarSlotsAndSlotProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
13
+ ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
14
+ }, "children" | "className" | "style" | "classes" | "sx" | "variant" | "slots" | "slotProps" | "sizes" | "alt" | "src" | "srcSet" | "imgProps"> & {
13
15
  component?: react.ElementType<any, keyof react.JSX.IntrinsicElements> | undefined;
14
- }>, "ref"> & react.RefAttributes<HTMLDivElement>>;
16
+ }>, "ref"> & react.RefAttributes<HTMLDivElement>>>;
15
17
 
16
18
  export { Avatar as default };
@@ -2,7 +2,7 @@ import { a } from '../../chunk-LFZJKAV6.js';
2
2
  import { j as j$1 } from '../../chunk-TB4Y7LXN.js';
3
3
  import '../../chunk-UVPQR2Q2.js';
4
4
  import { a as a$1 } from '../../chunk-RBTYTONM.js';
5
- import { a as a$3 } from '../../chunk-IN7SP2ND.js';
5
+ import { a as a$3 } from '../../chunk-I4PPSW36.js';
6
6
  import '../../chunk-JWIITCIZ.js';
7
7
  import { a as a$2 } from '../../chunk-VPG46WNM.js';
8
8
  import '../../chunk-CIGSMWKF.js';
@@ -8,6 +8,6 @@ interface CustomAvatarProps extends AvatarProps {
8
8
  BadgeProps?: BadgeProps;
9
9
  }
10
10
 
11
- declare const CustomAvatar: react.NamedExoticComponent<Omit<CustomAvatarProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
11
+ declare const CustomAvatar: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<CustomAvatarProps, "ref"> & react.RefAttributes<HTMLDivElement>>>;
12
12
 
13
13
  export { CustomAvatar as default };
@@ -6,6 +6,6 @@ interface CustomAvatarGroupProps extends AvatarGroupProps {
6
6
  compact?: boolean;
7
7
  }
8
8
 
9
- declare const CustomAvatarGroup: react.NamedExoticComponent<Omit<CustomAvatarGroupProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
9
+ declare const CustomAvatarGroup: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<CustomAvatarGroupProps, "ref"> & react.RefAttributes<HTMLDivElement>>>;
10
10
 
11
11
  export { CustomAvatarGroup as default };
@@ -53,13 +53,27 @@ interface ContainerProps extends StackProps {
53
53
  breakpoint: Breakpoint | number;
54
54
  }
55
55
  declare const Container: _emotion_styled.StyledComponent<PanelProps & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & ContainerProps, {}, {}>;
56
- declare const Header: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & DefaultProps, {}, {}>;
57
- declare const ActionsContainer: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & DefaultProps, {}, {}>;
58
- declare const ActionsDivider: _emotion_styled.StyledComponent<_mui_material_Divider.DividerOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "light" | "children" | "className" | "style" | "classes" | "sx" | "variant" | "textAlign" | "absolute" | "orientation" | "flexItem"> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
59
- declare const ToolbarActionsDivider: _emotion_styled.StyledComponent<_mui_material_Divider.DividerOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "light" | "children" | "className" | "style" | "classes" | "sx" | "variant" | "textAlign" | "absolute" | "orientation" | "flexItem"> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
60
- declare const Topbar: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & DefaultProps, {}, {}>;
61
- declare const SearchContainer: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & DefaultProps, {}, {}>;
62
- declare const MobilePaginationContainer: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
56
+ declare const Header: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
57
+ ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
58
+ }, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & DefaultProps, {}, {}>;
59
+ declare const ActionsContainer: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
60
+ ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
61
+ }, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & DefaultProps, {}, {}>;
62
+ declare const ActionsDivider: _emotion_styled.StyledComponent<_mui_material_Divider.DividerOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
63
+ ref?: ((instance: HTMLHRElement | null) => void) | react.RefObject<HTMLHRElement> | null | undefined;
64
+ }, "light" | "children" | "className" | "style" | "classes" | "sx" | "variant" | "textAlign" | "absolute" | "orientation" | "flexItem"> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
65
+ declare const ToolbarActionsDivider: _emotion_styled.StyledComponent<_mui_material_Divider.DividerOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
66
+ ref?: ((instance: HTMLHRElement | null) => void) | react.RefObject<HTMLHRElement> | null | undefined;
67
+ }, "light" | "children" | "className" | "style" | "classes" | "sx" | "variant" | "textAlign" | "absolute" | "orientation" | "flexItem"> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
68
+ declare const Topbar: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
69
+ ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
70
+ }, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & DefaultProps, {}, {}>;
71
+ declare const SearchContainer: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
72
+ ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
73
+ }, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & DefaultProps, {}, {}>;
74
+ declare const MobilePaginationContainer: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
75
+ ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
76
+ }, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
63
77
 
64
78
  declare const Toolbar: ({ setFilterButtonEl }: ToolbarProps) => react_jsx_runtime.JSX.Element;
65
79
 
@@ -1,4 +1,4 @@
1
- export { a as DesktopFooter, b as EnhancedMoreActions, c as Toolbar, d as default } from '../../chunk-I5R4OVA5.js';
1
+ export { a as DesktopFooter, b as EnhancedMoreActions, c as Toolbar, d as default } from '../../chunk-4HWP7ZLZ.js';
2
2
  import '../../chunk-SHJKJLBQ.js';
3
3
  import '../../chunk-IJZCVZ32.js';
4
4
  import '../../chunk-IDFJFFIV.js';
@@ -8,7 +8,7 @@ import '../../chunk-NIQW2J3M.js';
8
8
  export { c as ActionsContainer, d as ActionsDivider, a as Container, b as Header, h as MobilePaginationContainer, g as SearchContainer, e as ToolbarActionsDivider, f as Topbar } from '../../chunk-TB4Y7LXN.js';
9
9
  import '../../chunk-UVPQR2Q2.js';
10
10
  import '../../chunk-RBTYTONM.js';
11
- import '../../chunk-IN7SP2ND.js';
11
+ import '../../chunk-I4PPSW36.js';
12
12
  import '../../chunk-CO2KQFUN.js';
13
13
  import '../../chunk-VPG46WNM.js';
14
14
  import '../../chunk-CIGSMWKF.js';
@@ -4,7 +4,9 @@ import * as _mui_material_OverridableComponent from '@mui/material/OverridableCo
4
4
  import * as _mui_material from '@mui/material';
5
5
  import * as _mui_material_IconButton from '@mui/material/IconButton';
6
6
 
7
- declare const DragButton: ({ disableDrag, ...props }: _mui_material_IconButton.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "disabled" | "className" | "style" | "classes" | "sx" | "color" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "size" | "disableFocusRipple" | "edge"> & {
7
+ declare const DragButton: ({ disableDrag, ...props }: _mui_material_IconButton.IconButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
8
+ ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
9
+ }, "children" | "disabled" | "className" | "style" | "classes" | "sx" | "color" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "size" | "disableFocusRipple" | "edge"> & {
8
10
  component?: react.ElementType<any, keyof react.JSX.IntrinsicElements> | undefined;
9
11
  } & {
10
12
  disableDrag?: boolean | undefined;
@@ -18,6 +18,8 @@ interface SortableStyleProps extends BoxProps {
18
18
  'aria-roledescription'?: string;
19
19
  }
20
20
 
21
- declare const DragContainer: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material_styles.Theme> & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material_styles.Theme>> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & SortableStyleProps & Partial<DraggableAttributes>, {}, {}>;
21
+ declare const DragContainer: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material_styles.Theme> & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
22
+ ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
23
+ }, keyof _mui_system.BoxOwnProps<_mui_material_styles.Theme>> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme> & SortableStyleProps & Partial<DraggableAttributes>, {}, {}>;
22
24
 
23
25
  export { DragContainer as default };
@@ -1,4 +1,4 @@
1
- export { a as default } from '../../chunk-PJR4CLOE.js';
2
- import '../../chunk-IN7SP2ND.js';
1
+ export { a as default } from '../../chunk-IPPNUP2X.js';
2
+ import '../../chunk-I4PPSW36.js';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  import { d, c as c$1 } from '../../chunk-N7IK5EUP.js';
2
2
  import { a } from '../../chunk-AVPFUSEB.js';
3
3
  import { h, a as a$3 } from '../../chunk-OF6623HG.js';
4
- import { d as d$1 } from '../../chunk-I5R4OVA5.js';
4
+ import { d as d$1 } from '../../chunk-4HWP7ZLZ.js';
5
5
  import '../../chunk-SHJKJLBQ.js';
6
6
  import '../../chunk-IJZCVZ32.js';
7
7
  import { a as a$2 } from '../../chunk-6RC5O2YL.js';
@@ -13,7 +13,7 @@ import '../../chunk-NIQW2J3M.js';
13
13
  import '../../chunk-TB4Y7LXN.js';
14
14
  import '../../chunk-UVPQR2Q2.js';
15
15
  import '../../chunk-RBTYTONM.js';
16
- import '../../chunk-IN7SP2ND.js';
16
+ import '../../chunk-I4PPSW36.js';
17
17
  import '../../chunk-CO2KQFUN.js';
18
18
  import { a as a$1 } from '../../chunk-VPG46WNM.js';
19
19
  import '../../chunk-CIGSMWKF.js';
@@ -22,9 +22,9 @@ import '../../chunk-LQRRMVFN.js';
22
22
  import '../../chunk-RPO7AI5K.js';
23
23
  import '../../chunk-IAOMC4C4.js';
24
24
  import '../../chunk-GLRLKFPS.js';
25
- import { a as a$4 } from '../../chunk-HYJEAKVR.js';
25
+ import { a as a$4 } from '../../chunk-CYWFK4OE.js';
26
+ import '../../chunk-KKVRDMSE.js';
26
27
  import '../../chunk-POTVACYB.js';
27
- import '../../chunk-BLVCNBTJ.js';
28
28
  import '../../chunk-ET3WPQIO.js';
29
29
  import '../../chunk-CFNATBO2.js';
30
30
  import { memo, useMemo, useCallback } from 'react';
@@ -13,8 +13,8 @@ import Qe from '@mui/material/Popper';
13
13
  import ze from '@mui/material/Stack';
14
14
  import _e from '@mui/material/ListItemButton';
15
15
 
16
- var Pe=({display:e,color:t,backgroundColor:n})=>jsx(A,{component:"span",sx:{color:t||"inherit",bgcolor:n},children:e}),ae=Pe;function G(e){return typeof e=="number"}function Le(e){let t=/^\/(.+)\/(\w+)?$/;return new RegExp(e.map(n=>{let[,o,s]=t.exec(n.toString())||[];return z(!s,`RegExp flags are not supported. Change /${o}/${s} into /${o}/`),`(${o})`}).join("|"),"g")}function ce(e){let t=0;return e.indexOf("__id__")>=0&&t++,e.indexOf("__display__")>=0&&t++,t}function le(e,t){z(t==="id"||t==="display",`Second arg must be either "id" or "display", got: "${t}"`);let n=e.indexOf("__display__"),o=e.indexOf("__id__");return z(n>=0||o>=0,`The markup '${e}' does not contain at least one of the placeholders '__id__' or '__display__'`),n>=0&&o>=0?t==="id"&&o<=n||t==="display"&&n<=o?0:1:0}function H(e,t,n,o,s){let l=Le(t.map(i=>i.regex?Ie(i.regex,i.markup||b):ke(i.markup||b))),f=2,u=t.map(({markup:i})=>{let p=f;return f+=ce(i||b)+1,p}),a,g=0,c$1=0;for(;(a=l.exec(e))!==null;){let i=u.find(O=>!!a?.[O]);if(i===void 0)continue;let p=u.indexOf(i),{markup:T,displayTransform:d}=t[p],b$1=i+le(T||b,"id"),y=i+le(T||b,"display"),S=a[b$1],R=d?d(S,a[y]):c(S,a[y],s),E=e.substring(g,a.index);o?.(E,g,c$1),c$1+=E.length,n(a[0],a.index,c$1,S,R,p,g),c$1+=R.length,g=l.lastIndex;}g<e.length&&o?.(e.substring(g),g,c$1);}function $(e,t,n){let o="";return H(e,t,(s,l,f,u,a)=>{o+=a;},s=>{o+=s;},n),o}var Ie=(e,t)=>{let n=(new RegExp(e.toString()+"|").exec("")?.length||0)-1,o=ce(t);return z(n===o,`Number of capturing groups in RegExp ${e.toString()} (${n}) does not match the number of placeholders in the markup '${t}' (${o})`),e},ke=e=>{let t=Q(e),n=e[e.indexOf("__display__")+11],o=e[e.indexOf("__id__")+6];return new RegExp(t.replace("__display__",`([^${Q(n||"")}]+?)`).replace("__id__",`([^${Q(o||"")}]+?)`))},Q=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");function ge(e,t,n,o,s,l,f){let u=$(e,l,f),a=u.length-t.length;n===null&&(n=s+a),o===null&&(o=n),n===o&&o===s&&u.length===t.length&&(n=n-1);let g=t.slice(n,s),c=Math.min(n,s),i=o;n===s&&(i=Math.max(o,n+a));let p=I(e,l,c,"START"),T=I(e,l,i,"END"),d=I(e,l,c,"NULL"),b=I(e,l,i,"NULL"),y=d===null||b===null,S=V(e,p||0,T||0,g);if(!y){let R=$(S,l,f);if(R!==t){for(c=0;t[c]===R[c];)c++;g=t.slice(c,s),i=u.lastIndexOf(t.substring(s)),p=I(e,l,c,"START"),T=I(e,l,i,"END"),S=V(e,p||0,T||0,g);}}return S}function I(e,t,n,o="START"){if(typeof n!="number")return n;let s;return H(e,t,(u,a,g,c,i)=>{s===void 0&&g+i.length>n&&(o==="NULL"?s=null:s=a+(o==="END"?u.length:0));},(u,a,g)=>{s===void 0&&g+u.length>=n&&(s=a+n-g);}),s===void 0?e.length:s}function V(e,t,n,o){return e.substring(0,t)+o+e.substring(n)}function pe(e,t,n){let o;return H(e,t,(l,f,u,a,g)=>{u<=n&&u+g.length>n&&(o=u);}),o}function J(e,t){let n=[];return H(e,t,(o,s,l,f,u,a)=>{n.push({id:f,display:u,dataSourceIndex:a,index:s,plainTextIndex:l});}),n}function de(e){return Object.values(e).reduce((t,{results:n})=>t+n.length,0)}function fe(e,t){let n=J(e,t),o=n[n.length-1];return o?o.plainTextIndex+o.display.length:0}function me(e,t){if(e instanceof RegExp)return e;{let n=Q(e);return new RegExp(`(?:^|\\s)(${n}([^${t?"":"\\s"}${n}]*))$`)}}function he(e,t){return e instanceof Array?async function(n){let o=[];for(let s=0,l=e.length;s<l;++s){let f=e[s].display||e[s].id;Ce(f,n,t)>=0&&o.push(e[s]);}return o}:e}var Ce=(e,t,n)=>n?ue(e).indexOf(ue(t)):e.toLowerCase().indexOf(t.toLowerCase()),Oe=e=>{let t=e;return a$1.forEach(n=>{t=t.replace(n.letters,n.base);}),t},ue=e=>Oe(e).toLowerCase(),Se=(e,t,n)=>e.replace("__id__",t).replace("__display__",n||t);function ve(e){let t={x:0,y:0,width:0,height:0};if(!e)return t;let n=getComputedStyle(e);return t.width=e.clientWidth,t.width-=parseFloat(n.paddingLeft),t.width-=parseFloat(n.paddingRight),t.height=e.clientHeight,t.height-=parseFloat(n.paddingTop),t.height-=parseFloat(n.paddingBottom),t.x=e.offsetLeft,t.x+=parseFloat(n.paddingLeft),t.x+=parseFloat(n.borderLeft),t.y=e.offsetTop,t.y+=parseFloat(n.paddingTop),t.y+=parseFloat(n.borderTop),t}var Be=e=>{let{highlighterRef:t,cursorRef:n,selectionEnd:o,selectionStart:s,value:l,dataSources:f,multiline:u}=e,a=[];H(l,f,(p,T,d,b,y,S)=>{let R=f[S];a.push(jsx(ae,{display:y,color:R?.color,backgroundColor:R?.backgroundColor},`${b}-${T}`));},(p,T,d)=>{if(u||(p=p.replaceAll(`
17
- `,"")),!(s&&s===o&&s>=d&&s<=d+p.length))a.push(jsx(A,{component:"span",sx:{color:y=>y.palette.text.primary},children:p},`${T}-${d}`));else {let y=s-d,S=p.substring(0,y),R=p.substring(y);S&&a.push(jsx(A,{component:"span",sx:{color:E=>E.palette.text.primary},children:S},`${T}-${d}-precursor`)),a.push(jsx(A,{ref:n,component:"span",visibility:"hidden"},"cursor")),R&&a.push(jsx(A,{component:"span",sx:{color:E=>E.palette.text.primary},children:R},`${T}-${d}-postcursor`));}},u);let i=ve(e.inputRef);return jsx($e,{container:()=>e.inputRef?.parentElement||null,children:jsxs(A,{ref:t,sx:{position:"absolute",top:`${i.y}px`,left:`${i.x}px`,width:`${i.width}px`,height:`${i.height}px`,whiteSpace:u?"pre-wrap":"pre",overflow:"hidden",overscrollBehavior:"none",zIndex:1,pointerEvents:"none"},children:[a,jsx(A,{component:"span",visibility:"hidden",children:" "})]})})},xe=Be;var He=e=>{let{renderSuggestion:t,suggestion:n,focused:o,onClick:s,onMouseEnter:l}=e;if(t)return t(e);let f=c(n.id,n.display);return jsx(_e,{role:"option","aria-selected":o,selected:o,onClick:s,onMouseEnter:l,children:f})},Te=He;var Ge=e=>{let{value:t,dataSources:n,selectionStart:o,selectionEnd:s,cursorRef:l,onSelect:f,onMouseDown:u}=e,a$1=useRef(null),[g,c]=useState({}),[i,p]=useState(0),[T,d]=useState(!1),[b,y]=useState(!1);useEffect(()=>{let m=a$1.current;if(!T||!m||m.children.length===0)return;let r=m.scrollTop,{top:h,bottom:x}=m.children[i].getBoundingClientRect(),{top:D}=m.getBoundingClientRect();h=h-D+r,x=x-D+r,h<r?m.scrollTop=h:x>m.offsetHeight+r&&(m.scrollTop=x-m.offsetHeight),d(!1);},[T,a$1,i,d]);let S=useCallback(async(m,r,h,x,D,P)=>{try{let w=he(m.data,m.ignoreAccents);y(!0);let L=await w(r);c(M=>({...M,[h]:{queryInfo:{childIndex:h,query:r,querySequenceStart:x,querySequenceEnd:D,plainTextValue:P},results:L}}));}catch(w){console.error(w);}finally{y(!1);}},[]),R=useRef(n);useEffect(()=>{R.current=n;},[n]),useEffect(()=>{if(c({}),!o||o!==s)return;let m=R.current,r=$(t,m),h=I(r,m,o,"NULL");if(!h)return;let x=fe(r.substring(0,h),m),D=r.substring(x,o);m.forEach((P,w)=>{if(!P)return;let L=me(P.trigger||a,P.allowSpaceInQuery),M=D.match(L);if(M){let F=x+D.indexOf(M[1],M.index);S(P,M[2],w,F,F+M[1].length,r);}});},[o,s,t,S]);let E=useCallback(()=>{c({}),p(0);},[c,p]),O=useCallback((m,r)=>{f(m,r),E();},[f,E]),U=useCallback(m=>{p(m);},[p]),N=useMemo(()=>Object.values(g).reduce((m,{results:r,queryInfo:h})=>[...m,...r.map((x,D)=>jsx(Te,{id:x.id,query:h.query,index:D,suggestion:x,focused:D===i,onClick:()=>O(x,h),onMouseEnter:()=>U(D)},x.id))],[]),[g,O,U,i]);return o===null||o!==s||!b&&N.length===0?null:jsxs(Fragment,{children:[jsx(Je,{suggestions:g,clearSuggestions:E,onSelect:O,focusIndex:i,setFocusIndex:p,setScrollFocusedIntoView:d,loading:b}),jsx(Qe,{placement:"bottom-start",...e.slotProps?.popper,sx:{zIndex:2,...e.slotProps?.popper?.sx},open:!0,anchorEl:l.current,children:jsx(Ke,{elevation:8,onMouseDown:u,children:jsx(Ue,{ref:a$1,sx:{width:"300px",maxHeight:"40vh",overflow:"auto"},children:N.length>0?N:b&&jsx(ze,{justifyContent:"center",alignItems:"center",height:"40vh",children:jsx(Ve,{})})})})})]})},ye=Ge;var Je=e=>{let{suggestions:t,clearSuggestions:n,focusIndex:o,setFocusIndex:s,setScrollFocusedIntoView:l,onSelect:f,loading:u}=e;return useEffect(()=>{let a=i=>{if(u)return;let p=de(t);s((p+o+i)%p),l(!0);},g=()=>{if(u)return;let{result:i,queryInfo:p}=Object.values(t).reduce((T,{results:d,queryInfo:b})=>[...T,...d.map(y=>({result:y,queryInfo:b}))],[])[o];f(i,p);},c=i=>{switch(i.key){case"Escape":{n();break}case"ArrowDown":{a(1);break}case"ArrowUp":{a(-1);break}case"Enter":case"Tab":{g();break}default:return}i.preventDefault(),i.stopPropagation();};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[t,n,o,s,f,l,u]),null};var qe=e=>{let[t,n]=useState(e.defaultValue||""),[o,s]=useState(null),l=useRef(null),f=useRef(null),u=useRef(!1),[a,g]=useState(null),[c$1,i]=useState(null),p=r=>{if(s(r),b$1){if(typeof b$1=="function")b$1(r);else if(b$1&&"current"in b$1&&typeof b$1!="function"){let h=b$1;h.current=r;}}};useEffect(()=>{let r=o,h=()=>{!l.current||!r||(l.current.scrollLeft=r.scrollLeft,l.current.scrollTop=r.scrollTop);};return r?.addEventListener("scroll",h),()=>r?.removeEventListener("scroll",h)},[o,l]),useEffect(()=>{let r=o;!r||r.selectionStart===a&&r.selectionEnd===c$1||r.setSelectionRange(a,c$1);},[a,c$1,o]);let{value:T,dataSources:d,inputRef:b$1,...y}=e,S=T!==void 0?T:t,R=()=>{u.current||(g(null),i(null)),u.current=!1;},E=()=>{u.current=!0;},O=(r,{childIndex:h,querySequenceStart:x,querySequenceEnd:D,plainTextValue:P})=>{let w=d[h],{markup:L,displayTransform:M,appendSpaceOnAdd:F,onAdd:te}=w,k=I(S,d,x,"START");if(!G(k))return;let K=k+D-x,ne=Se(L||b,r.id,r.display),Y=(M||c)(r.id,r.display);F&&(ne+=" ",Y+=" ");let oe=x+Y.length;g(oe),i(oe);let re=V(S,k,K,ne),Re=J(re,d),Me=V(P,x,D,Y);(e.onChange||n)(re,Me,Re),te?.(r,k,K);},U=r=>{let h=r.target.value,x=a;G(x)||(x=r.target.selectionStart);let D=c$1;G(D)||(D=r.target.selectionEnd);let P=ge(S,h,x,D,r.target.selectionEnd||0,d,e.multiline);h=$(P,d);let w=r.target.selectionStart,L=r.target.selectionEnd,M=pe(S,d,r.target.selectionStart||0);if(M!==void 0&&L!==null&&L>M){let k=r.nativeEvent,K="data"in k&&typeof k.data=="string"?k.data.length:0;w=M+K,L=w;}g(w),i(L);let F=J(P,d);(e.onChange||n)(P,h,F);},N=r=>{g(r.target.selectionStart),i(r.target.selectionEnd),e.onSelect?.(r);},m={...y,value:$(S,d,e.multiline),onChange:U,onSelect:N,onBlur:R,InputProps:{sx:{overscrollBehavior:"none",color:"transparent",caretColor:r=>r.palette.text.primary}}};return jsxs(Fragment,{children:[jsx(xe,{highlighterRef:l,cursorRef:f,selectionStart:a,selectionEnd:c$1,value:S,dataSources:d,inputRef:o,multiline:m.multiline}),jsx(We,{inputRef:p,...m}),jsx(ye,{value:S,dataSources:d,selectionStart:a,selectionEnd:c$1,cursorRef:f,loading:!1,onSelect:O,onMouseDown:E,slotProps:e.slotProps?.suggestionsOverlay})]})},en=qe;
16
+ var Pe=({display:e,color:t,backgroundColor:n})=>jsx(A,{component:"span",sx:{color:t||"inherit",bgcolor:n},children:e}),ae=Pe;function G(e){return typeof e=="number"}function Le(e){let t=/^\/(.+)\/(\w+)?$/;return new RegExp(e.map(n=>{let[,o,s]=t.exec(n.toString())||[];return z(!s,`RegExp flags are not supported. Change /${o}/${s} into /${o}/`),`(${o})`}).join("|"),"g")}function ce(e){let t=0;return e.indexOf("__id__")>=0&&t++,e.indexOf("__display__")>=0&&t++,t}function le(e,t){z(t==="id"||t==="display",`Second arg must be either "id" or "display", got: "${t}"`);let n=e.indexOf("__display__"),o=e.indexOf("__id__");return z(n>=0||o>=0,`The markup '${e}' does not contain at least one of the placeholders '__id__' or '__display__'`),n>=0&&o>=0?t==="id"&&o<=n||t==="display"&&n<=o?0:1:0}function H(e,t,n,o,s){let l=Le(t.map(i=>i.regex?Ie(i.regex,i.markup||b):ke(i.markup||b))),f=2,u=t.map(({markup:i})=>{let p=f;return f+=ce(i||b)+1,p}),a,g=0,c$1=0;for(;(a=l.exec(e))!==null;){let i=u.find(O=>!!a?.[O]);if(i===void 0)continue;let p=u.indexOf(i),{markup:T,displayTransform:d}=t[p],b$1=i+le(T||b,"id"),y=i+le(T||b,"display"),S=a[b$1],M=d?d(S,a[y]):c(S,a[y],s),E=e.substring(g,a.index);o?.(E,g,c$1),c$1+=E.length,n(a[0],a.index,c$1,S,M,p,g),c$1+=M.length,g=l.lastIndex;}g<e.length&&o?.(e.substring(g),g,c$1);}function $(e,t,n){let o="";return H(e,t,(s,l,f,u,a)=>{o+=a;},s=>{o+=s;},n),o}var Ie=(e,t)=>{let n=(new RegExp(e.toString()+"|").exec("")?.length||0)-1,o=ce(t);return z(n===o,`Number of capturing groups in RegExp ${e.toString()} (${n}) does not match the number of placeholders in the markup '${t}' (${o})`),e},ke=e=>{let t=Q(e),n=e[e.indexOf("__display__")+11],o=e[e.indexOf("__id__")+6];return new RegExp(t.replace("__display__",`([^${Q(n||"")}]+?)`).replace("__id__",`([^${Q(o||"")}]+?)`))},Q=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");function ge(e,t,n,o,s,l,f){let u=$(e,l,f),a=u.length-t.length;n===null&&(n=s+a),o===null&&(o=n),n===o&&o===s&&u.length===t.length&&(n=n-1);let g=t.slice(n,s),c=Math.min(n,s),i=o;n===s&&(i=Math.max(o,n+a));let p=I(e,l,c,"START"),T=I(e,l,i,"END"),d=I(e,l,c,"NULL"),b=I(e,l,i,"NULL"),y=d===null||b===null,S=V(e,p||0,T||0,g);if(!y){let M=$(S,l,f);if(M!==t){for(c=0;t[c]===M[c];)c++;g=t.slice(c,s),i=u.lastIndexOf(t.substring(s)),p=I(e,l,c,"START"),T=I(e,l,i,"END"),S=V(e,p||0,T||0,g);}}return S}function I(e,t,n,o="START"){if(typeof n!="number")return n;let s;return H(e,t,(u,a,g,c,i)=>{s===void 0&&g+i.length>n&&(o==="NULL"?s=null:s=a+(o==="END"?u.length:0));},(u,a,g)=>{s===void 0&&g+u.length>=n&&(s=a+n-g);}),s===void 0?e.length:s}function V(e,t,n,o){return e.substring(0,t)+o+e.substring(n)}function pe(e,t,n){let o;return H(e,t,(l,f,u,a,g)=>{u<=n&&u+g.length>n&&(o=u);}),o}function J(e,t){let n=[];return H(e,t,(o,s,l,f,u,a)=>{n.push({id:f,display:u,dataSourceIndex:a,index:s,plainTextIndex:l});}),n}function de(e){return Object.values(e).reduce((t,{results:n})=>t+n.length,0)}function fe(e,t){let n=J(e,t),o=n[n.length-1];return o?o.plainTextIndex+o.display.length:0}function me(e,t){if(e instanceof RegExp)return e;{let n=Q(e);return new RegExp(`(?:^|\\s)(${n}([^${t?"":"\\s"}${n}]*))$`)}}function he(e,t){return e instanceof Array?async function(n){let o=[];for(let s=0,l=e.length;s<l;++s){let f=e[s].display||e[s].id;Ce(f,n,t)>=0&&o.push(e[s]);}return o}:e}var Ce=(e,t,n)=>n?ue(e).indexOf(ue(t)):e.toLowerCase().indexOf(t.toLowerCase()),Oe=e=>{let t=e;return a$1.forEach(n=>{t=t.replace(n.letters,n.base);}),t},ue=e=>Oe(e).toLowerCase(),Se=(e,t,n)=>e.replace("__id__",t).replace("__display__",n||t);function ve(e){let t={x:0,y:0,width:0,height:0};if(!e)return t;let n=getComputedStyle(e);return t.width=e.clientWidth,t.width-=parseFloat(n.paddingLeft),t.width-=parseFloat(n.paddingRight),t.height=e.clientHeight,t.height-=parseFloat(n.paddingTop),t.height-=parseFloat(n.paddingBottom),t.x=e.offsetLeft,t.x+=parseFloat(n.paddingLeft),t.x+=parseFloat(n.borderLeft),t.y=e.offsetTop,t.y+=parseFloat(n.paddingTop),t.y+=parseFloat(n.borderTop),t}var Be=e=>{let{highlighterRef:t,cursorRef:n,selectionEnd:o,selectionStart:s,value:l,dataSources:f,multiline:u}=e,a=[];H(l,f,(p,T,d,b,y,S)=>{let M=f[S];a.push(jsx(ae,{display:y,color:M?.color,backgroundColor:M?.backgroundColor},`${b}-${T}`));},(p,T,d)=>{if(u||(p=p.replaceAll(`
17
+ `,"")),!(s&&s===o&&s>=d&&s<=d+p.length))a.push(jsx(A,{component:"span",sx:{color:y=>y.palette.text.primary},children:p},`${T}-${d}`));else {let y=s-d,S=p.substring(0,y),M=p.substring(y);S&&a.push(jsx(A,{component:"span",sx:{color:E=>E.palette.text.primary},children:S},`${T}-${d}-precursor`)),a.push(jsx(A,{ref:n,component:"span",visibility:"hidden"},"cursor")),M&&a.push(jsx(A,{component:"span",sx:{color:E=>E.palette.text.primary},children:M},`${T}-${d}-postcursor`));}},u);let i=ve(e.inputRef);return jsx($e,{container:()=>e.inputRef?.parentElement||null,children:jsxs(A,{ref:t,sx:{position:"absolute",top:`${i.y}px`,left:`${i.x}px`,width:`${i.width}px`,height:`${i.height}px`,whiteSpace:u?"pre-wrap":"pre",overflow:"hidden",overscrollBehavior:"none",zIndex:1,pointerEvents:"none"},children:[a,jsx(A,{component:"span",visibility:"hidden",children:" "})]})})},xe=Be;var He=e=>{let{renderSuggestion:t,suggestion:n,focused:o,onClick:s,onMouseEnter:l}=e;if(t)return t(e);let f=c(n.id,n.display);return jsx(_e,{role:"option","aria-selected":o,selected:o,onClick:s,onMouseEnter:l,children:f})},Te=He;var Ge=e=>{let{value:t,dataSources:n,selectionStart:o,selectionEnd:s,cursorRef:l,onSelect:f,onMouseDown:u}=e,a$1=useRef(null),[g,c]=useState({}),[i,p]=useState(0),[T,d]=useState(!1),[b,y]=useState(!1);useEffect(()=>{let m=a$1.current;if(!T||!m||m.children.length===0)return;let r=m.scrollTop,{top:h,bottom:x}=m.children[i].getBoundingClientRect(),{top:D}=m.getBoundingClientRect();h=h-D+r,x=x-D+r,h<r?m.scrollTop=h:x>m.offsetHeight+r&&(m.scrollTop=x-m.offsetHeight),d(!1);},[T,a$1,i,d]);let S=useCallback(async(m,r,h,x,D,P)=>{try{let w=he(m.data,m.ignoreAccents);y(!0);let L=await w(r);c(R=>({...R,[h]:{queryInfo:{childIndex:h,query:r,querySequenceStart:x,querySequenceEnd:D,plainTextValue:P},results:L}}));}catch(w){console.error(w);}finally{y(!1);}},[]),M=useRef(n);useEffect(()=>{M.current=n;},[n]),useEffect(()=>{if(c({}),!o||o!==s)return;let m=M.current,r=$(t,m),h=I(r,m,o,"NULL");if(!h)return;let x=fe(r.substring(0,h),m),D=r.substring(x,o);m.forEach((P,w)=>{if(!P)return;let L=me(P.trigger||a,P.allowSpaceInQuery),R=D.match(L);if(R){let F=x+D.indexOf(R[1],R.index);S(P,R[2],w,F,F+R[1].length,r);}});},[o,s,t,S]);let E=useCallback(()=>{c({}),p(0);},[c,p]),O=useCallback((m,r)=>{f(m,r),E();},[f,E]),U=useCallback(m=>{p(m);},[p]),N=useMemo(()=>Object.values(g).reduce((m,{results:r,queryInfo:h})=>[...m,...r.map((x,D)=>jsx(Te,{id:x.id,query:h.query,index:D,suggestion:x,focused:D===i,onClick:()=>O(x,h),onMouseEnter:()=>U(D)},x.id))],[]),[g,O,U,i]);return o===null||o!==s||!b&&N.length===0?null:jsxs(Fragment,{children:[jsx(Je,{suggestions:g,clearSuggestions:E,onSelect:O,focusIndex:i,setFocusIndex:p,setScrollFocusedIntoView:d,loading:b}),jsx(Qe,{placement:"bottom-start",...e.slotProps?.popper,sx:{zIndex:2,...e.slotProps?.popper?.sx},open:!0,anchorEl:l.current,children:jsx(Ke,{elevation:8,onMouseDown:u,children:jsx(Ue,{ref:a$1,sx:{width:"300px",maxHeight:"40vh",overflow:"auto"},children:N.length>0?N:b&&jsx(ze,{justifyContent:"center",alignItems:"center",height:"40vh",children:jsx(Ve,{})})})})})]})},ye=Ge;var Je=e=>{let{suggestions:t,clearSuggestions:n,focusIndex:o,setFocusIndex:s,setScrollFocusedIntoView:l,onSelect:f,loading:u}=e;return useEffect(()=>{let a=i=>{if(u)return;let p=de(t);s((p+o+i)%p),l(!0);},g=()=>{if(u)return;let{result:i,queryInfo:p}=Object.values(t).reduce((T,{results:d,queryInfo:b})=>[...T,...d.map(y=>({result:y,queryInfo:b}))],[])[o];f(i,p);},c=i=>{switch(i.key){case"Escape":{n();break}case"ArrowDown":{a(1);break}case"ArrowUp":{a(-1);break}case"Enter":case"Tab":{g();break}default:return}i.preventDefault(),i.stopPropagation();};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[t,n,o,s,f,l,u]),null};var qe=e=>{let[t,n]=useState(e.defaultValue||""),[o,s]=useState(null),l=useRef(null),f=useRef(null),u=useRef(!1),[a,g]=useState(null),[c$1,i]=useState(null),p=r=>{if(s(r),b$1){if(typeof b$1=="function")b$1(r);else if(b$1&&"current"in b$1&&typeof b$1!="function"){let h=b$1;h.current=r;}}};useEffect(()=>{let r=o,h=()=>{!l.current||!r||(l.current.scrollLeft=r.scrollLeft,l.current.scrollTop=r.scrollTop);};return r?.addEventListener("scroll",h),()=>r?.removeEventListener("scroll",h)},[o,l]),useEffect(()=>{let r=o;!r||r.selectionStart===a&&r.selectionEnd===c$1||r.setSelectionRange(a,c$1);},[a,c$1,o]);let{value:T,dataSources:d,inputRef:b$1,...y}=e,S=T!==void 0?T:t,M=()=>{u.current||(g(null),i(null)),u.current=!1;},E=()=>{u.current=!0;},O=(r,{childIndex:h,querySequenceStart:x,querySequenceEnd:D,plainTextValue:P})=>{let w=d[h],{markup:L,displayTransform:R,appendSpaceOnAdd:F,onAdd:te}=w,k=I(S,d,x,"START");if(!G(k))return;let K=k+D-x,ne=Se(L||b,r.id,r.display),Y=(R||c)(r.id,r.display);F&&(ne+=" ",Y+=" ");let oe=x+Y.length;g(oe),i(oe);let re=V(S,k,K,ne),Me=J(re,d),Re=V(P,x,D,Y);(e.onChange||n)(re,Re,Me),te?.(r,k,K);},U=r=>{let h=r.target.value,x=a;G(x)||(x=r.target.selectionStart);let D=c$1;G(D)||(D=r.target.selectionEnd);let P=ge(S,h,x,D,r.target.selectionEnd||0,d,e.multiline);h=$(P,d);let w=r.target.selectionStart,L=r.target.selectionEnd,R=pe(S,d,r.target.selectionStart||0);if(R!==void 0&&L!==null&&L>R){let k=r.nativeEvent,K="data"in k&&typeof k.data=="string"?k.data.length:0;w=R+K,L=w;}g(w),i(L);let F=J(P,d);(e.onChange||n)(P,h,F);},N=r=>{g(r.target.selectionStart),i(r.target.selectionEnd),e.onSelect?.(r);},m={...y,value:$(S,d,e.multiline),onChange:U,onSelect:N,onBlur:M,InputProps:{sx:{overscrollBehavior:"none",color:"transparent",caretColor:r=>r.palette.text.primary}}};return jsxs(Fragment,{children:[jsx(xe,{highlighterRef:l,cursorRef:f,selectionStart:a,selectionEnd:c$1,value:S,dataSources:d,inputRef:o,multiline:m.multiline}),jsx(We,{inputRef:p,...m}),jsx(ye,{value:S,dataSources:d,selectionStart:a,selectionEnd:c$1,cursorRef:f,loading:!1,onSelect:O,onMouseDown:E,slotProps:e.slotProps?.suggestionsOverlay})]})},en=qe;
18
18
 
19
19
  export { en as default };
20
20
  //# sourceMappingURL=out.js.map