@tap-payments/os-micro-frontend-shared 0.3.288 → 0.3.289-test.1794846776
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_chunks/{chunk-E2Z6V4OE.js → chunk-7ZL5XSW5.js} +1 -1
- package/build/_chunks/{chunk-64OLTOQM.js → chunk-EA5PYN5W.js} +1 -1
- package/build/_chunks/chunk-IOXXKK24.js +1 -0
- package/build/_chunks/chunk-RK4UGNRY.js +1 -0
- package/build/_chunks/{chunk-PL5M3LK2.js → chunk-WLHB45KP.js} +1 -1
- package/build/components/ActionMenu/ActionMenu.d.ts +4 -0
- package/build/components/ActionMenu/ActionMenuFlyoutRow.d.ts +4 -0
- package/build/components/ActionMenu/ActionMenuLeafRow.d.ts +10 -0
- package/build/components/ActionMenu/ActionMenuPanelContext.d.ts +4 -0
- package/build/components/ActionMenu/ActionMenuRow.d.ts +7 -0
- package/build/components/ActionMenu/ActionMenuRowLeading.d.ts +4 -0
- package/build/components/ActionMenu/ActionMenuRowTrailing.d.ts +6 -0
- package/build/components/ActionMenu/constants.d.ts +47 -0
- package/build/components/ActionMenu/index.d.ts +4 -0
- package/build/components/ActionMenu/index.js +1 -0
- package/build/components/ActionMenu/style.d.ts +48 -0
- package/build/components/ActionMenu/type.d.ts +141 -0
- package/build/components/ActionMenu/utils.d.ts +27 -0
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/ExportReportButton/ExportReportButton.d.ts +4 -0
- package/build/components/ExportReportButton/ReportFileRow.d.ts +10 -0
- package/build/components/ExportReportButton/ReportLoadingRow.d.ts +8 -0
- package/build/components/ExportReportButton/ReportRequestRow.d.ts +11 -0
- package/build/components/ExportReportButton/constants.d.ts +51 -0
- package/build/components/ExportReportButton/hooks/useReportDownload.d.ts +21 -0
- package/build/components/ExportReportButton/index.d.ts +6 -0
- package/build/components/ExportReportButton/index.js +1 -0
- package/build/components/ExportReportButton/style.d.ts +67 -0
- package/build/components/ExportReportButton/type.d.ts +147 -0
- package/build/components/ExportReportButton/utils.d.ts +10 -0
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/index.d.ts +2 -3
- package/build/components/index.js +1 -1
- package/build/components/modules/JSONViewWindow/index.js +1 -1
- package/build/components/modules/WindowShell/index.js +1 -1
- package/build/components/modules/index.js +1 -1
- package/build/datetime/components/index.js +1 -1
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-P6WIYEZX.js +0 -1
- package/build/_chunks/chunk-S3BFBCVM.js +0 -1
- package/build/components/ActionsDropdownMenu/ActionsDropdownMenu.d.ts +0 -3
- package/build/components/ActionsDropdownMenu/AppMenuItem.d.ts +0 -15
- package/build/components/ActionsDropdownMenu/constants.d.ts +0 -1
- package/build/components/ActionsDropdownMenu/index.d.ts +0 -3
- package/build/components/ActionsDropdownMenu/index.js +0 -1
- package/build/components/ActionsDropdownMenu/style.d.ts +0 -16
- package/build/components/ActionsDropdownMenu/types.d.ts +0 -42
- package/build/components/TableReports/DownloadIconButton.d.ts +0 -7
- package/build/components/TableReports/Downloads.d.ts +0 -10
- package/build/components/TableReports/RecordLoading.d.ts +0 -2
- package/build/components/TableReports/TableReports.d.ts +0 -5
- package/build/components/TableReports/components/DownloadButton/DownloadButton.d.ts +0 -8
- package/build/components/TableReports/components/DownloadButton/index.d.ts +0 -2
- package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -263
- package/build/components/TableReports/hooks/index.d.ts +0 -1
- package/build/components/TableReports/hooks/useDownloadReport.d.ts +0 -11
- package/build/components/TableReports/index.d.ts +0 -7
- package/build/components/TableReports/index.js +0 -1
- package/build/components/TableReports/style.d.ts +0 -324
- package/build/components/TableReports/type.d.ts +0 -37
- package/build/components/TableReports/utils.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b,h as h$1,c,e,d,j as j$1,i}from'./chunk-OCHPXIEK.js';import {h,b as b$1,f as f$1}from'./chunk-TXLFAI3O.js';import {g as g$1,f,h as h$2}from'./chunk-ISC5KT5E.js';import {H as H$1,j}from'./chunk-4NLQZJVN.js';import {a}from'./chunk-OSXKJYUX.js';import {g,mc,nc}from'./chunk-EP5VELEJ.js';import {Wd,ta,el,fl,xi,Jk,A,ye,xe as xe$1,sa,qa,ra}from'./chunk-XTJZTHR6.js';import {forwardRef,memo,createContext,useState,useRef,useMemo,useContext,useEffect,useCallback,useId}from'react';import ie from'@mui/material/Box';import it from'@mui/material/Typography';import P from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';var O="os-shared-JSONViewWindow",m={root:`${O}-root`,body:`${O}-body`,requestPane:`${O}-requestPane`,responsePane:`${O}-responsePane`,section:`${O}-section`,title:`${O}-title`,actions:`${O}-actions`,scroll:`${O}-scroll`,footer:`${O}-footer`,count:`${O}-count`},N=400,B=545,Z=.5,co=20,mo=30,Ne="Items",We="JSON Response",be="JSON Request & Response",fo="rgb(231, 231, 231)";var uo=styled("span")({display:"inline-flex",alignItems:"center",gap:"6px"}),xo=styled("span")({margin:"0px",fontStyle:"normal",fontStretch:"normal",color:"rgb(32, 35, 43)",letterSpacing:"0px",fontSize:"9px",fontWeight:400,lineHeight:"10.8px"}),go=styled("span")({margin:"0px",fontStyle:"normal",fontStretch:"normal",color:"rgb(32, 35, 43)",letterSpacing:"0px",fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px",textAlign:"right"});var ho=forwardRef(function({totalCount:o,id:n,className:t,sx:r},i){return jsx(h,{ref:i,id:n,"data-testid":n??"Footer",className:nc(g$1,m.footer,t),sx:mc({justifyContent:"flex-start",cursor:"move"},r),children:o!=null?jsx(H$1,{variant:"text",className:m.count,sx:{cursor:"text",borderWidth:.75},children:jsxs(uo,{children:[jsx(xo,{children:Ne}),jsx(go,{children:g(o??0)})]})}):null})});ho.displayName="Footer";var H=memo(ho);var yo=styled("button")(({theme:e})=>({outline:"none",cursor:"pointer",border:"1px solid transparent","&:hover":{boxShadow:e.shadows[8]},borderRadius:"0.25rem",position:"relative",backgroundColor:e.palette.background.transparent,display:"inline-flex",alignItems:"center",justifyContent:"center"})),Ie=styled(motion.img)({height:"14px",width:"14px"});function oe({"data-copied":e,style:o,onClick:n},{keyName:t}){return t?jsxs(yo,{style:o,onClick:r=>{n?.(r);},children:[jsx(AnimatePresence,{children:e&&jsx(Ie,{initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ta,alt:"icon"},"copied-icon")}),jsx(AnimatePresence,{children:!e&&jsx(Ie,{initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ra,alt:"icon"},"copy-icon")})]}):jsx("span",{})}var No=styled("button")(({theme:e})=>({padding:"0rem",borderRadius:"0.25rem",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",color:e.palette.text.primary,fontSize:"0.625rem",fontWeight:e.typography.fontWeightBold,outline:"none",cursor:"pointer",border:`1px solid ${e.palette.grey[100]}`,"&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark};`},position:"relative",overflow:"hidden",transition:"all 0.2s ease-in-out",width:"24px",height:"24px",flexShrink:0}));function Wo({onClick:e,icon:o,label:n,disableAnimation:t,...r}){let[i,s]=useState(false),{t:c}=useTranslation();return jsxs(No,{...r,onClick:p=>{e?.(p),!t&&(s(true),setTimeout(()=>{s(false);},2e3));},children:[jsxs(ie,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:ta,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:o,alt:"icon"},"id-icon")})]}),n&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:c("copied")})}),jsx(AnimatePresence,{children:!i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:n})})]})]})}Wo.displayName="IconButton";var T=memo(Wo);var bo=styled("div")(()=>({display:"flex",alignItems:"center",position:"relative",flexShrink:0,width:"24px",height:"24px"})),Co=styled("button")(({theme:e,isActive:o})=>({width:"24px",height:"24px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",border:`1px solid ${o?e.palette.info.dark:e.palette.grey[100]}`,backgroundColor:e.palette.background.paper,cursor:"pointer",outline:"none",padding:0,position:"relative",zIndex:11,transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`}})),Io=styled(motion.div)(()=>({position:"absolute",right:0,top:0,height:"24px",display:"flex",alignItems:"center",zIndex:20,background:"transparent"})),Oo=styled(motion.input)(({theme:e})=>({width:"177px",height:"24px",borderRadius:"4px",color:e.palette.text.primary,fontSize:"10px",outline:0,background:e.palette.background.paper,boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`,paddingLeft:"8px",boxSizing:"border-box","::placeholder":{color:"#D5D5D5"}})),Te={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:2,userSelect:"none"},To={...Te,background:"none",border:"none",padding:0,margin:0,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",outline:"none","&:disabled":{opacity:.3,cursor:"default"}},Po=styled("button")(()=>({...To,right:53})),_o=styled("button")(()=>({...To,right:39})),vo=styled(motion.img)(()=>({...Te,right:24,width:10,height:10,cursor:"pointer"})),Jo=styled(motion.img)(()=>({...Te,right:8,width:11,height:11,cursor:"default"})),Pe=styled("img")(()=>({width:10,height:10})),Eo=styled("img")(()=>({width:12,height:12})),Vo=styled("span")(({theme:e})=>({position:"absolute",right:67,top:"50%",transform:"translateY(-50%)",fontSize:"9px",lineHeight:1,color:e.palette.text.secondary,whiteSpace:"nowrap",userSelect:"none",zIndex:2,pointerEvents:"none"}));function Ht({value:e,onChange:o,currentIndex:n,totalCount:t,onPrev:r,onNext:i,onOpen:s,placeholder:c="Search..."}){let[a,p]=useState(false),u=useRef(null),f=e.trim().length>0,y=t>0,S=f,b=()=>{s?.(),p(true),requestAnimationFrame(()=>u.current?.focus());},C=()=>{o(""),p(false);};return jsxs(bo,{children:[jsx(AnimatePresence,{children:a&&jsxs(Io,{initial:{clipPath:"inset(0 0 0 100%)",opacity:0},animate:{clipPath:"inset(0 0 0 0%)",opacity:1},exit:{clipPath:"inset(0 0 0 100%)",opacity:0},transition:{duration:.22,ease:[.4,0,.2,1]},children:[jsx(Oo,{ref:u,initial:false,animate:{paddingRight:S?"98px":"24px"},transition:{duration:.15},placeholder:c,value:e,onChange:I=>o(I.target.value),onKeyDown:I=>{I.key==="Enter"&&(I.shiftKey?r():i()),I.key==="Escape"&&C();},onBlur:()=>{f||p(false);}}),S&&jsx(Po,{onClick:r,disabled:!y,title:"Previous match (Shift+Enter)",children:jsx(Pe,{src:el,alt:"prev"})}),S&&jsx(_o,{onClick:i,disabled:!y,title:"Next match (Enter)",children:jsx(Pe,{src:fl,alt:"next"})}),S&&jsx(vo,{src:xi,alt:"clear",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:C}),jsx(Jo,{src:Jk,alt:"search",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),S&&jsx(Vo,{children:y?`${n+1}/${t}`:"0/0"})]},"input-area")}),jsx(AnimatePresence,{children:!a&&jsx(motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsx(Co,{isActive:false,onClick:b,title:"Search",children:jsx(Eo,{src:A,alt:"search"})})})})]})}var M=memo(Ht);function Do(e,o){let n=[],t=o.length,r=0,i=e.indexOf(o,r);for(;i!==-1;){let s=i+t;n.push([i,s]),r=s,i=e.indexOf(o,r);}return n}var Mt={padding:0,outline:"none"};function Ao({text:e,queryLength:o,ranges:n,idPrefix:t}){let r=[],i=0;return n.forEach(([s,c],a)=>{s>i&&r.push(e.slice(i,s)),r.push(jsx("mark",{style:Mt,children:e.slice(s,s+o)},`${t}-${a}`)),i=c;}),i<e.length&&r.push(e.slice(i)),jsx(Fragment,{children:r})}function R({text:e,query:o}){let n=useId(),t=useMemo(()=>o.trim().toLowerCase(),[o]),r=useMemo(()=>{if(!t)return e;let i=e.toLowerCase(),s=Do(i,t);return s.length===0?e:jsx(Ao,{text:e,queryLength:o.length,ranges:s,idPrefix:n})},[e,o.length,t,n]);return jsx(Fragment,{children:r})}var Lo={overflow:"visible",boxShadow:"none",filter:"drop-shadow(0 0 20px rgba(0, 0, 0, 0.15))"},_e={"--w-rjv-color":"#9cdcfe","--w-rjv-key-string":"#357fb9","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ffffff","--w-rjv-arrow-color":"#116e6bed","--w-rjv-edit-color":"#9cdcfe","--w-rjv-info-color":"#9c9c9c7a","--w-rjv-update-color":"#FFE20B","--w-rjv-copied-color":"#9cdcfe","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#000000","--w-rjv-colon-color":"#000000","--w-rjv-brackets-color":"#000000","--w-rjv-quotes-color":"#9cdcfe","--w-rjv-quotes-string-color":"#c27c46","--w-rjv-type-string-color":"#c27c46","--w-rjv-type-int-color":"#956ea5","--w-rjv-type-float-color":"#956ea5","--w-rjv-type-bigint-color":"#956ea5","--w-rjv-type-boolean-color":"#357fb9","--w-rjv-type-date-color":"#956ea5","--w-rjv-type-url-color":"#3b89cf","--w-rjv-type-null-color":"#956ea5","--w-rjv-type-nan-color":"#956ea5","--w-rjv-type-undefined-color":"#956ea5",padding:"1rem",height:"100%",overflow:"auto"},zo={..._e,background:"transparent","--w-rjv-line-color":"transparent"},ve=styled(j)(()=>({border:"1px solid rgba(242, 242, 242, 0.70);",display:"inline-flex",height:"24px",minWidth:"73px",padding:"0px 8px",justifyContent:"center",alignItems:"center",gap:"6px",borderRadius:"37.5px",backgroundColor:"#fff",fontSize:"9px",lineHeight:"15px",fontWeight:400})),Je=styled(ie)(()=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:"4px",paddingBlock:"8px",paddingInlineStart:"12px",paddingInlineEnd:"12px",position:"sticky",left:0,right:0,top:0,background:"#fff",zIndex:5,flexShrink:0,minHeight:44})),Ee=styled(ie)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",flexShrink:0,marginLeft:"auto"})),Fo=styled(ie)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",width:"100%",background:"transparent",position:"relative",overflow:"visible"})),Ve=styled(ie)(()=>({display:"flex",flexDirection:"column",flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden"})),qo=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:o})=>({width:"100%",height:"100%",minHeight:0,overflow:"hidden",background:"#fff",zIndex:20,position:"relative",left:0,display:"flex",flexDirection:"column",flex:1,minWidth:0,borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...o&&{borderBottomLeftRadius:0,borderBottomRightRadius:0}})),$o=styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:o})=>({backgroundColor:fo,backdropFilter:"blur(24px)",height:"100%",overflowY:"auto",overflowX:"hidden",position:"absolute",width:e?"100%":o,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px",top:0,bottom:0})),Ko=styled("span")(()=>({color:"#032F62"})),Uo=styled("span")(()=>({color:"#357fb9"}));function se(e,o){return e.toLowerCase().includes(o)}function ae(e){return e.trim().toLowerCase()}function le(e){let o=ae(e);return (n,{keyName:t})=>{if(!o||!t)return;let r=String(t);if(se(r,o))return jsx(Uo,{children:jsx(R,{text:String(t),query:e})})}}function pe(e){let o=ae(e);return (n,{value:t})=>{if(!o)return;let r=String(t??"");if(se(r,o))return jsxs(Ko,{children:['"',jsx(R,{text:String(t??""),query:e}),'"']})}}function Qo(e,o){return e==null?String(e).includes(o):typeof e=="string"?e.toLowerCase().includes(o):typeof e=="number"||typeof e=="boolean"?String(e).includes(o):false}function Yo(e,o){if(Array.isArray(e)){let n=e.map(t=>Yo(t,o)).filter(t=>t!=null);return n.length>0?n:null}return typeof e=="object"&&e!==null?Xo(e,o):Qo(e,o)?e:null}function Xo(e,o){let n={};for(let[t,r]of Object.entries(e))if(t.toLowerCase().includes(o))n[t]=r;else if(typeof r=="object"&&r!==null){let i=Yo(r,o);i!==null&&(n[t]=i);}else Qo(r,o)&&(n[t]=r);return Object.keys(n).length>0?n:null}function Re(e,o){return o.trim()?Xo(e,o.toLowerCase()):e}function Zo(e,o,n){return {x:e/2-N/4+n*co,y:o/2-B/2+n*mo}}var nt="#FFE20B";function z(e,o){let[n,t]=useState(0),[r,i]=useState(0);useEffect(()=>{if(!o.trim()){i(0),t(0);return}let a=setTimeout(()=>{let p=e.current?.querySelectorAll("mark")??[];i(p.length),t(0);},50);return ()=>clearTimeout(a)},[o,e]),useEffect(()=>{if(!e.current||!o.trim())return;let a=Array.from(e.current.querySelectorAll("mark"));a.forEach((p,u)=>{let f=u===n;p.style.backgroundColor=f?nt:"transparent",p.style.outline=f?`1px solid ${nt}`:"none",p.style.borderRadius="2px";}),a[n]?.scrollIntoView({behavior:"smooth",block:"nearest"});},[n,r,o,e]);let s=useCallback(()=>{r!==0&&t(a=>(a+1)%r);},[r]),c=useCallback(()=>{r!==0&&t(a=>(a-1+r)%r);},[r]);return {currentIndex:n,totalCount:r,goNext:s,goPrev:c}}function st({json:e,requestJson:o={},onJsonSearch:n,onJsonCopy:t,onJsonIdCopy:r,onJsonNodesMinimize:i,onJsonNodesMaximize:s,isRequestShown:c,isToolbarAnimationDisabled:a}){let{isMaximized:p,size:u,isResizing:f}=b$1(),[y,S]=useState(false),[b,C]=useState(true),[x,g]=useState(""),[h,I]=useState(""),D=useRef(null),A=useRef(null),U=z(D,x),G=z(A,h),Wt=useMemo(()=>Object.keys(e??{})?.length??0,[e]),Ae=u.width||N,He=_=>{setTimeout(()=>{navigator.clipboard.writeText(_||"").then(()=>{});},10);},bt=useMemo(()=>Object.keys(o??{})?.length??0,[o]),Me=useMemo(()=>Re(e,x),[e,x]),je=useMemo(()=>Re(o,h),[o,h]);return jsxs(Fo,{"data-testid":"Pane",className:nc(m.root,m.body),children:[jsx(AnimatePresence,{children:c&&jsx($o,{className:nc(m.requestPane),initial:{left:0},animate:{left:p?0:-Ae},exit:{left:0},transition:{duration:Z,...a&&{duration:0},...f&&{duration:0}},isMaximized:p,currentRequestWidth:Ae,children:jsxs(ie,{ref:A,sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[jsxs(Je,{className:nc(m.section),sx:{background:"transparent"},children:[jsx(ve,{variant:"subtitle1",className:nc(m.title),children:"API Request"}),jsxs(Ee,{className:nc(m.actions),children:[jsx(M,{value:h,onChange:I,onOpen:()=>n?.(),currentIndex:G.currentIndex,totalCount:G.totalCount,onPrev:G.goPrev,onNext:G.goNext}),jsx(T,{disableAnimation:true,onClick:()=>{b?s?.():i?.(),C(_=>!_);},icon:b?ye:xe$1}),jsx(T,{onClick:()=>{t?.(),navigator.clipboard.writeText(JSON.stringify(o,null,2)).then(()=>{});},icon:sa}),jsx(T,{onClick:()=>{r?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),h.trim()&&je===null?jsx(ie,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(it,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsx(Ve,{className:nc(m.scroll),children:jsxs(P,{value:je??o,style:zo,displayDataTypes:false,collapsed:h.trim()?void 0:b?1:void 0,onCopied:(_,v)=>{typeof v=="string"&&He(v);},enableClipboard:false,children:[jsx(P.String,{render:pe(h)}),jsx(P.KeyName,{render:le(h)}),jsx(P.CountInfo,{render:(_,{keyName:v})=>{if(!v)return jsx("span",{})}}),jsx(P.Copied,{render:oe})]})}),jsx(H,{totalCount:bt,sx:{borderBottomRightRadius:0,background:"#f8f9fb"}})]})},"request-pane")}),jsxs(qo,{ref:D,className:nc(m.responsePane),isMaximized:p,isRequestShown:c,initial:{...p&&{width:"100vw",left:0}},animate:{...p&&{position:"absolute",left:c?"50vw":"0"}},transition:{duration:Z,...a&&{duration:0},...f&&{duration:0}},children:[jsxs(Je,{className:nc(m.section),children:[jsx(ve,{variant:"subtitle1",className:nc(m.title),children:"API Response"}),jsxs(Ee,{className:nc(m.actions),children:[jsx(M,{value:x,onChange:g,onOpen:()=>n?.(),currentIndex:U.currentIndex,totalCount:U.totalCount,onPrev:U.goPrev,onNext:U.goNext}),jsx(T,{disableAnimation:true,onClick:()=>{y?s?.():i?.(),S(_=>!_);},icon:y?ye:xe$1}),jsx(T,{onClick:()=>{t?.(),navigator.clipboard.writeText(JSON.stringify(e,null,2)).then(()=>{});},icon:sa}),jsx(T,{onClick:()=>{r?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),x.trim()&&Me===null?jsx(ie,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(it,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsx(Ve,{className:nc(m.scroll),children:jsxs(P,{value:Me??e,style:_e,displayDataTypes:false,collapsed:x.trim()?void 0:y?1:void 0,onCopied:(_,v)=>{typeof v=="string"&&He(v);},children:[jsx(P.String,{render:pe(x)}),jsx(P.KeyName,{render:le(x)}),jsx(P.CountInfo,{render:(_,{keyName:v})=>{if(!v)return jsx("span",{})}}),jsx(P.Copied,{render:oe})]})}),jsx(H,{totalCount:Wt,sx:{borderBottomLeftRadius:c?0:"12px",background:"#f8f9fb"}})]})]})}st.displayName="Pane";var me=memo(st);var Ut="os-shared-JSONViewWindowToolbar",F={root:`${Ut}-root`};var lt=forwardRef(function({title:o,onClose:n,onMaximize:t,maximized:r=false,onRequestClick:i$1,requestDirection:s="left",showRequestIcon:c$1=false,id:a,className:p,sx:u},f$1){return jsxs(b,{ref:f$1,id:a??f,"data-testid":a??"Toolbar",sx:mc({backgroundColor:"#f9f9f9",backdropFilter:"none"},u),className:nc(F.root,p),children:[jsxs(h$1,{children:[jsx(c,{onClick:n}),jsx(e,{isMaximized:r,onClick:t}),c$1&&jsx(d,{onClick:i$1,direction:s,children:"Request"})]}),jsx(j$1,{title:o,icon:Wd}),jsx(i,{})]})});lt.displayName="Toolbar";var $=memo(lt);var Yt="os-shared-JSONViewWindowContent",pt={root:`${Yt}-root`};var dt=styled(motion.div)({flexShrink:0}),mt=styled("div")({display:"contents"});function en({requestJson:e={},onClose:o,onJsonRequestOpen:n,isRequestShown:t,setIsRequestShown:r,isToolbarAnimationDisabled:i,setIsToolbarAnimationDisabled:s,className:c,...a}){let{isMaximized:p,setIsMaximized:u,setSize:f,size:y,isResizing:S}=b$1(),b=Object.keys(e??{})?.length,C=y.width||N;return jsxs(Fragment,{children:[jsx(dt,{animate:{width:p?"100%":t?C*2:C,x:!p&&t?-C:0},transition:{duration:S||i?0:h$2},children:jsx($,{title:t?be:We,onClose:()=>o(),onMaximize:()=>{u(x=>!x),s(true),setTimeout(()=>{s(false);},h$2*1e3);},maximized:p,onRequestClick:()=>{r(x=>!x),s(false),t||(n?.(),f({width:N,height:B}));},requestDirection:t?"right":"left",showRequestIcon:!!b})}),jsx(mt,{className:nc(pt.root,c),children:jsx(me,{...a,requestJson:e,onClose:o,onJsonRequestOpen:n,isRequestShown:t,isToolbarAnimationDisabled:i})})]})}var K=memo(en);var k=createContext({windows:[],open:()=>{},close:()=>{},closeAll:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{},registerJSONViewWindowEvents:()=>{},containerRef:{current:null}});function ut({list:e,events:o,onClose:n,isWindowMinimized:t,windowOrder:r}){return e?.length?jsx(Fragment,{children:e.map((i,s)=>jsx(xe,{index:s,...o,...i,onClose:()=>{n(s);},isWindowMinimized:t,windowOrder:r},i.json.id))}):null}ut.displayName="List";var ue=memo(ut);var gt=({children:e,containerRef:o})=>{let[n,t]=useState([]),[r,i]=useState(false),[s,c]=useState(1),a=useRef({}),p=useCallback(g=>{if(n.length===7){alert("Maximum allowed active JSON View Window is 7 per table.");return}if(n.some(A=>A.json.id===g.json.id))return;let h=structuredClone(g.json),I=h.request_body,D={...g,json:h,requestJson:g.requestJson||I||void 0};delete D.json.request_body,t(A=>[...A,D]);},[n]),u=useCallback(g=>{t(h=>h.filter((I,D)=>g!==D));},[]),f=useCallback(()=>{t([]);},[]),y=useCallback(g=>{i(g);},[]),S=useCallback(g=>{c(g);},[]),b=useCallback(g=>{a.current=g;},[]),C=useMemo(()=>({onJsonRequestOpen:()=>a.current.onJsonRequestOpen?.(),onJsonSearch:()=>a.current.onJsonSearch?.(),onJsonCopy:()=>a.current.onJsonCopy?.(),onJsonIdCopy:()=>a.current.onJsonIdCopy?.(),onJsonNodesMinimize:()=>a.current.onJsonNodesMinimize?.(),onJsonNodesMaximize:()=>a.current.onJsonNodesMaximize?.()}),[]),x=useMemo(()=>({windows:n,open:p,close:u,closeAll:f,handleWindowMinimize:y,handleWindowOrder:S,registerJSONViewWindowEvents:b,containerRef:o}),[n,p,u,f,y,S,b,o]);return jsxs(k.Provider,{value:x,children:[e,jsx(ue,{list:n,events:C,onClose:u,isWindowMinimized:r,windowOrder:s})]})};function yt(e){let{containerRef:o}=useContext(k),{height:n,width:t}=a(),[r,i]=useState(false),[s,c]=useState(false);return jsx(f$1,{isOpen:true,onClose:e.onClose,containerRef:o,defaultSize:{width:N,height:B},minSize:{width:N,height:300},defaultPosition:Zo(t,n,e.index),order:e.windowOrder,isMinimized:e.isWindowMinimized,id:"json-view-window",className:nc(m.root,e.className),sx:Lo,children:jsx(K,{...e,isRequestShown:r,setIsRequestShown:i,isToolbarAnimationDisabled:s,setIsToolbarAnimationDisabled:c})})}yt.displayName="JSONViewWindow";var xe=memo(yt);var Nt=({isWindowMinimized:e,windowOrder:o,...n}={})=>{let{windows:t,open:r,close:i,closeAll:s,handleWindowMinimize:c,handleWindowOrder:a,registerJSONViewWindowEvents:p}=useContext(k),u=useCallback(()=>{c(e??false);},[c,e]),f=useCallback(()=>{a(o??1);},[a,o]);return useEffect(()=>{f();},[f]),useEffect(()=>{u();},[u]),useEffect(()=>{p(n);},[p,n]),{open:r,close:i,closeAll:s,windows:t,count:t.length}};var Ts=xe;export{m as a,N as b,B as c,Z as d,Ne as e,We as f,be as g,H as h,T as i,M as j,R as k,z as l,me as m,F as n,$ as o,K as p,k as q,ue as r,gt as s,Nt as t,Ts as u};
|
|
1
|
+
import {h,b as b$1,f as f$1}from'./chunk-TXLFAI3O.js';import {b,h as h$1,c,e,d,j as j$1,i}from'./chunk-OCHPXIEK.js';import {g as g$1,f,h as h$2}from'./chunk-ISC5KT5E.js';import {H as H$1,j}from'./chunk-4NLQZJVN.js';import {a}from'./chunk-OSXKJYUX.js';import {g,mc,nc}from'./chunk-EP5VELEJ.js';import {Wd,ta,el,fl,xi,Jk,A,ye,xe as xe$1,sa,qa,ra}from'./chunk-XTJZTHR6.js';import {forwardRef,memo,createContext,useState,useRef,useMemo,useContext,useEffect,useCallback,useId}from'react';import ie from'@mui/material/Box';import it from'@mui/material/Typography';import P from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';var O="os-shared-JSONViewWindow",m={root:`${O}-root`,body:`${O}-body`,requestPane:`${O}-requestPane`,responsePane:`${O}-responsePane`,section:`${O}-section`,title:`${O}-title`,actions:`${O}-actions`,scroll:`${O}-scroll`,footer:`${O}-footer`,count:`${O}-count`},N=400,B=545,Z=.5,co=20,mo=30,Ne="Items",We="JSON Response",be="JSON Request & Response",fo="rgb(231, 231, 231)";var uo=styled("span")({display:"inline-flex",alignItems:"center",gap:"6px"}),xo=styled("span")({margin:"0px",fontStyle:"normal",fontStretch:"normal",color:"rgb(32, 35, 43)",letterSpacing:"0px",fontSize:"9px",fontWeight:400,lineHeight:"10.8px"}),go=styled("span")({margin:"0px",fontStyle:"normal",fontStretch:"normal",color:"rgb(32, 35, 43)",letterSpacing:"0px",fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px",textAlign:"right"});var ho=forwardRef(function({totalCount:o,id:n,className:t,sx:r},i){return jsx(h,{ref:i,id:n,"data-testid":n??"Footer",className:nc(g$1,m.footer,t),sx:mc({justifyContent:"flex-start",cursor:"move"},r),children:o!=null?jsx(H$1,{variant:"text",className:m.count,sx:{cursor:"text",borderWidth:.75},children:jsxs(uo,{children:[jsx(xo,{children:Ne}),jsx(go,{children:g(o??0)})]})}):null})});ho.displayName="Footer";var H=memo(ho);var yo=styled("button")(({theme:e})=>({outline:"none",cursor:"pointer",border:"1px solid transparent","&:hover":{boxShadow:e.shadows[8]},borderRadius:"0.25rem",position:"relative",backgroundColor:e.palette.background.transparent,display:"inline-flex",alignItems:"center",justifyContent:"center"})),Ie=styled(motion.img)({height:"14px",width:"14px"});function oe({"data-copied":e,style:o,onClick:n},{keyName:t}){return t?jsxs(yo,{style:o,onClick:r=>{n?.(r);},children:[jsx(AnimatePresence,{children:e&&jsx(Ie,{initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ta,alt:"icon"},"copied-icon")}),jsx(AnimatePresence,{children:!e&&jsx(Ie,{initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ra,alt:"icon"},"copy-icon")})]}):jsx("span",{})}var No=styled("button")(({theme:e})=>({padding:"0rem",borderRadius:"0.25rem",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",color:e.palette.text.primary,fontSize:"0.625rem",fontWeight:e.typography.fontWeightBold,outline:"none",cursor:"pointer",border:`1px solid ${e.palette.grey[100]}`,"&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark};`},position:"relative",overflow:"hidden",transition:"all 0.2s ease-in-out",width:"24px",height:"24px",flexShrink:0}));function Wo({onClick:e,icon:o,label:n,disableAnimation:t,...r}){let[i,s]=useState(false),{t:c}=useTranslation();return jsxs(No,{...r,onClick:p=>{e?.(p),!t&&(s(true),setTimeout(()=>{s(false);},2e3));},children:[jsxs(ie,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:ta,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:o,alt:"icon"},"id-icon")})]}),n&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:c("copied")})}),jsx(AnimatePresence,{children:!i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:n})})]})]})}Wo.displayName="IconButton";var T=memo(Wo);var bo=styled("div")(()=>({display:"flex",alignItems:"center",position:"relative",flexShrink:0,width:"24px",height:"24px"})),Co=styled("button")(({theme:e,isActive:o})=>({width:"24px",height:"24px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",border:`1px solid ${o?e.palette.info.dark:e.palette.grey[100]}`,backgroundColor:e.palette.background.paper,cursor:"pointer",outline:"none",padding:0,position:"relative",zIndex:11,transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`}})),Io=styled(motion.div)(()=>({position:"absolute",right:0,top:0,height:"24px",display:"flex",alignItems:"center",zIndex:20,background:"transparent"})),Oo=styled(motion.input)(({theme:e})=>({width:"177px",height:"24px",borderRadius:"4px",color:e.palette.text.primary,fontSize:"10px",outline:0,background:e.palette.background.paper,boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`,paddingLeft:"8px",boxSizing:"border-box","::placeholder":{color:"#D5D5D5"}})),Te={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:2,userSelect:"none"},To={...Te,background:"none",border:"none",padding:0,margin:0,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",outline:"none","&:disabled":{opacity:.3,cursor:"default"}},Po=styled("button")(()=>({...To,right:53})),_o=styled("button")(()=>({...To,right:39})),vo=styled(motion.img)(()=>({...Te,right:24,width:10,height:10,cursor:"pointer"})),Jo=styled(motion.img)(()=>({...Te,right:8,width:11,height:11,cursor:"default"})),Pe=styled("img")(()=>({width:10,height:10})),Eo=styled("img")(()=>({width:12,height:12})),Vo=styled("span")(({theme:e})=>({position:"absolute",right:67,top:"50%",transform:"translateY(-50%)",fontSize:"9px",lineHeight:1,color:e.palette.text.secondary,whiteSpace:"nowrap",userSelect:"none",zIndex:2,pointerEvents:"none"}));function Ht({value:e,onChange:o,currentIndex:n,totalCount:t,onPrev:r,onNext:i,onOpen:s,placeholder:c="Search..."}){let[a,p]=useState(false),u=useRef(null),f=e.trim().length>0,y=t>0,S=f,b=()=>{s?.(),p(true),requestAnimationFrame(()=>u.current?.focus());},C=()=>{o(""),p(false);};return jsxs(bo,{children:[jsx(AnimatePresence,{children:a&&jsxs(Io,{initial:{clipPath:"inset(0 0 0 100%)",opacity:0},animate:{clipPath:"inset(0 0 0 0%)",opacity:1},exit:{clipPath:"inset(0 0 0 100%)",opacity:0},transition:{duration:.22,ease:[.4,0,.2,1]},children:[jsx(Oo,{ref:u,initial:false,animate:{paddingRight:S?"98px":"24px"},transition:{duration:.15},placeholder:c,value:e,onChange:I=>o(I.target.value),onKeyDown:I=>{I.key==="Enter"&&(I.shiftKey?r():i()),I.key==="Escape"&&C();},onBlur:()=>{f||p(false);}}),S&&jsx(Po,{onClick:r,disabled:!y,title:"Previous match (Shift+Enter)",children:jsx(Pe,{src:el,alt:"prev"})}),S&&jsx(_o,{onClick:i,disabled:!y,title:"Next match (Enter)",children:jsx(Pe,{src:fl,alt:"next"})}),S&&jsx(vo,{src:xi,alt:"clear",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:C}),jsx(Jo,{src:Jk,alt:"search",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),S&&jsx(Vo,{children:y?`${n+1}/${t}`:"0/0"})]},"input-area")}),jsx(AnimatePresence,{children:!a&&jsx(motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsx(Co,{isActive:false,onClick:b,title:"Search",children:jsx(Eo,{src:A,alt:"search"})})})})]})}var M=memo(Ht);function Do(e,o){let n=[],t=o.length,r=0,i=e.indexOf(o,r);for(;i!==-1;){let s=i+t;n.push([i,s]),r=s,i=e.indexOf(o,r);}return n}var Mt={padding:0,outline:"none"};function Ao({text:e,queryLength:o,ranges:n,idPrefix:t}){let r=[],i=0;return n.forEach(([s,c],a)=>{s>i&&r.push(e.slice(i,s)),r.push(jsx("mark",{style:Mt,children:e.slice(s,s+o)},`${t}-${a}`)),i=c;}),i<e.length&&r.push(e.slice(i)),jsx(Fragment,{children:r})}function R({text:e,query:o}){let n=useId(),t=useMemo(()=>o.trim().toLowerCase(),[o]),r=useMemo(()=>{if(!t)return e;let i=e.toLowerCase(),s=Do(i,t);return s.length===0?e:jsx(Ao,{text:e,queryLength:o.length,ranges:s,idPrefix:n})},[e,o.length,t,n]);return jsx(Fragment,{children:r})}var Lo={overflow:"visible",boxShadow:"none",filter:"drop-shadow(0 0 20px rgba(0, 0, 0, 0.15))"},_e={"--w-rjv-color":"#9cdcfe","--w-rjv-key-string":"#357fb9","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ffffff","--w-rjv-arrow-color":"#116e6bed","--w-rjv-edit-color":"#9cdcfe","--w-rjv-info-color":"#9c9c9c7a","--w-rjv-update-color":"#FFE20B","--w-rjv-copied-color":"#9cdcfe","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#000000","--w-rjv-colon-color":"#000000","--w-rjv-brackets-color":"#000000","--w-rjv-quotes-color":"#9cdcfe","--w-rjv-quotes-string-color":"#c27c46","--w-rjv-type-string-color":"#c27c46","--w-rjv-type-int-color":"#956ea5","--w-rjv-type-float-color":"#956ea5","--w-rjv-type-bigint-color":"#956ea5","--w-rjv-type-boolean-color":"#357fb9","--w-rjv-type-date-color":"#956ea5","--w-rjv-type-url-color":"#3b89cf","--w-rjv-type-null-color":"#956ea5","--w-rjv-type-nan-color":"#956ea5","--w-rjv-type-undefined-color":"#956ea5",padding:"1rem",height:"100%",overflow:"auto"},zo={..._e,background:"transparent","--w-rjv-line-color":"transparent"},ve=styled(j)(()=>({border:"1px solid rgba(242, 242, 242, 0.70);",display:"inline-flex",height:"24px",minWidth:"73px",padding:"0px 8px",justifyContent:"center",alignItems:"center",gap:"6px",borderRadius:"37.5px",backgroundColor:"#fff",fontSize:"9px",lineHeight:"15px",fontWeight:400})),Je=styled(ie)(()=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:"4px",paddingBlock:"8px",paddingInlineStart:"12px",paddingInlineEnd:"12px",position:"sticky",left:0,right:0,top:0,background:"#fff",zIndex:5,flexShrink:0,minHeight:44})),Ee=styled(ie)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",flexShrink:0,marginLeft:"auto"})),Fo=styled(ie)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",width:"100%",background:"transparent",position:"relative",overflow:"visible"})),Ve=styled(ie)(()=>({display:"flex",flexDirection:"column",flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden"})),qo=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:o})=>({width:"100%",height:"100%",minHeight:0,overflow:"hidden",background:"#fff",zIndex:20,position:"relative",left:0,display:"flex",flexDirection:"column",flex:1,minWidth:0,borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...o&&{borderBottomLeftRadius:0,borderBottomRightRadius:0}})),$o=styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:o})=>({backgroundColor:fo,backdropFilter:"blur(24px)",height:"100%",overflowY:"auto",overflowX:"hidden",position:"absolute",width:e?"100%":o,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px",top:0,bottom:0})),Ko=styled("span")(()=>({color:"#032F62"})),Uo=styled("span")(()=>({color:"#357fb9"}));function se(e,o){return e.toLowerCase().includes(o)}function ae(e){return e.trim().toLowerCase()}function le(e){let o=ae(e);return (n,{keyName:t})=>{if(!o||!t)return;let r=String(t);if(se(r,o))return jsx(Uo,{children:jsx(R,{text:String(t),query:e})})}}function pe(e){let o=ae(e);return (n,{value:t})=>{if(!o)return;let r=String(t??"");if(se(r,o))return jsxs(Ko,{children:['"',jsx(R,{text:String(t??""),query:e}),'"']})}}function Qo(e,o){return e==null?String(e).includes(o):typeof e=="string"?e.toLowerCase().includes(o):typeof e=="number"||typeof e=="boolean"?String(e).includes(o):false}function Yo(e,o){if(Array.isArray(e)){let n=e.map(t=>Yo(t,o)).filter(t=>t!=null);return n.length>0?n:null}return typeof e=="object"&&e!==null?Xo(e,o):Qo(e,o)?e:null}function Xo(e,o){let n={};for(let[t,r]of Object.entries(e))if(t.toLowerCase().includes(o))n[t]=r;else if(typeof r=="object"&&r!==null){let i=Yo(r,o);i!==null&&(n[t]=i);}else Qo(r,o)&&(n[t]=r);return Object.keys(n).length>0?n:null}function Re(e,o){return o.trim()?Xo(e,o.toLowerCase()):e}function Zo(e,o,n){return {x:e/2-N/4+n*co,y:o/2-B/2+n*mo}}var nt="#FFE20B";function z(e,o){let[n,t]=useState(0),[r,i]=useState(0);useEffect(()=>{if(!o.trim()){i(0),t(0);return}let a=setTimeout(()=>{let p=e.current?.querySelectorAll("mark")??[];i(p.length),t(0);},50);return ()=>clearTimeout(a)},[o,e]),useEffect(()=>{if(!e.current||!o.trim())return;let a=Array.from(e.current.querySelectorAll("mark"));a.forEach((p,u)=>{let f=u===n;p.style.backgroundColor=f?nt:"transparent",p.style.outline=f?`1px solid ${nt}`:"none",p.style.borderRadius="2px";}),a[n]?.scrollIntoView({behavior:"smooth",block:"nearest"});},[n,r,o,e]);let s=useCallback(()=>{r!==0&&t(a=>(a+1)%r);},[r]),c=useCallback(()=>{r!==0&&t(a=>(a-1+r)%r);},[r]);return {currentIndex:n,totalCount:r,goNext:s,goPrev:c}}function st({json:e,requestJson:o={},onJsonSearch:n,onJsonCopy:t,onJsonIdCopy:r,onJsonNodesMinimize:i,onJsonNodesMaximize:s,isRequestShown:c,isToolbarAnimationDisabled:a}){let{isMaximized:p,size:u,isResizing:f}=b$1(),[y,S]=useState(false),[b,C]=useState(true),[x,g]=useState(""),[h,I]=useState(""),D=useRef(null),A=useRef(null),U=z(D,x),G=z(A,h),Wt=useMemo(()=>Object.keys(e??{})?.length??0,[e]),Ae=u.width||N,He=_=>{setTimeout(()=>{navigator.clipboard.writeText(_||"").then(()=>{});},10);},bt=useMemo(()=>Object.keys(o??{})?.length??0,[o]),Me=useMemo(()=>Re(e,x),[e,x]),je=useMemo(()=>Re(o,h),[o,h]);return jsxs(Fo,{"data-testid":"Pane",className:nc(m.root,m.body),children:[jsx(AnimatePresence,{children:c&&jsx($o,{className:nc(m.requestPane),initial:{left:0},animate:{left:p?0:-Ae},exit:{left:0},transition:{duration:Z,...a&&{duration:0},...f&&{duration:0}},isMaximized:p,currentRequestWidth:Ae,children:jsxs(ie,{ref:A,sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[jsxs(Je,{className:nc(m.section),sx:{background:"transparent"},children:[jsx(ve,{variant:"subtitle1",className:nc(m.title),children:"API Request"}),jsxs(Ee,{className:nc(m.actions),children:[jsx(M,{value:h,onChange:I,onOpen:()=>n?.(),currentIndex:G.currentIndex,totalCount:G.totalCount,onPrev:G.goPrev,onNext:G.goNext}),jsx(T,{disableAnimation:true,onClick:()=>{b?s?.():i?.(),C(_=>!_);},icon:b?ye:xe$1}),jsx(T,{onClick:()=>{t?.(),navigator.clipboard.writeText(JSON.stringify(o,null,2)).then(()=>{});},icon:sa}),jsx(T,{onClick:()=>{r?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),h.trim()&&je===null?jsx(ie,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(it,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsx(Ve,{className:nc(m.scroll),children:jsxs(P,{value:je??o,style:zo,displayDataTypes:false,collapsed:h.trim()?void 0:b?1:void 0,onCopied:(_,v)=>{typeof v=="string"&&He(v);},enableClipboard:false,children:[jsx(P.String,{render:pe(h)}),jsx(P.KeyName,{render:le(h)}),jsx(P.CountInfo,{render:(_,{keyName:v})=>{if(!v)return jsx("span",{})}}),jsx(P.Copied,{render:oe})]})}),jsx(H,{totalCount:bt,sx:{borderBottomRightRadius:0,background:"#f8f9fb"}})]})},"request-pane")}),jsxs(qo,{ref:D,className:nc(m.responsePane),isMaximized:p,isRequestShown:c,initial:{...p&&{width:"100vw",left:0}},animate:{...p&&{position:"absolute",left:c?"50vw":"0"}},transition:{duration:Z,...a&&{duration:0},...f&&{duration:0}},children:[jsxs(Je,{className:nc(m.section),children:[jsx(ve,{variant:"subtitle1",className:nc(m.title),children:"API Response"}),jsxs(Ee,{className:nc(m.actions),children:[jsx(M,{value:x,onChange:g,onOpen:()=>n?.(),currentIndex:U.currentIndex,totalCount:U.totalCount,onPrev:U.goPrev,onNext:U.goNext}),jsx(T,{disableAnimation:true,onClick:()=>{y?s?.():i?.(),S(_=>!_);},icon:y?ye:xe$1}),jsx(T,{onClick:()=>{t?.(),navigator.clipboard.writeText(JSON.stringify(e,null,2)).then(()=>{});},icon:sa}),jsx(T,{onClick:()=>{r?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),x.trim()&&Me===null?jsx(ie,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(it,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsx(Ve,{className:nc(m.scroll),children:jsxs(P,{value:Me??e,style:_e,displayDataTypes:false,collapsed:x.trim()?void 0:y?1:void 0,onCopied:(_,v)=>{typeof v=="string"&&He(v);},children:[jsx(P.String,{render:pe(x)}),jsx(P.KeyName,{render:le(x)}),jsx(P.CountInfo,{render:(_,{keyName:v})=>{if(!v)return jsx("span",{})}}),jsx(P.Copied,{render:oe})]})}),jsx(H,{totalCount:Wt,sx:{borderBottomLeftRadius:c?0:"12px",background:"#f8f9fb"}})]})]})}st.displayName="Pane";var me=memo(st);var Ut="os-shared-JSONViewWindowToolbar",F={root:`${Ut}-root`};var lt=forwardRef(function({title:o,onClose:n,onMaximize:t,maximized:r=false,onRequestClick:i$1,requestDirection:s="left",showRequestIcon:c$1=false,id:a,className:p,sx:u},f$1){return jsxs(b,{ref:f$1,id:a??f,"data-testid":a??"Toolbar",sx:mc({backgroundColor:"#f9f9f9",backdropFilter:"none"},u),className:nc(F.root,p),children:[jsxs(h$1,{children:[jsx(c,{onClick:n}),jsx(e,{isMaximized:r,onClick:t}),c$1&&jsx(d,{onClick:i$1,direction:s,children:"Request"})]}),jsx(j$1,{title:o,icon:Wd}),jsx(i,{})]})});lt.displayName="Toolbar";var $=memo(lt);var Yt="os-shared-JSONViewWindowContent",pt={root:`${Yt}-root`};var dt=styled(motion.div)({flexShrink:0}),mt=styled("div")({display:"contents"});function en({requestJson:e={},onClose:o,onJsonRequestOpen:n,isRequestShown:t,setIsRequestShown:r,isToolbarAnimationDisabled:i,setIsToolbarAnimationDisabled:s,className:c,...a}){let{isMaximized:p,setIsMaximized:u,setSize:f,size:y,isResizing:S}=b$1(),b=Object.keys(e??{})?.length,C=y.width||N;return jsxs(Fragment,{children:[jsx(dt,{animate:{width:p?"100%":t?C*2:C,x:!p&&t?-C:0},transition:{duration:S||i?0:h$2},children:jsx($,{title:t?be:We,onClose:()=>o(),onMaximize:()=>{u(x=>!x),s(true),setTimeout(()=>{s(false);},h$2*1e3);},maximized:p,onRequestClick:()=>{r(x=>!x),s(false),t||(n?.(),f({width:N,height:B}));},requestDirection:t?"right":"left",showRequestIcon:!!b})}),jsx(mt,{className:nc(pt.root,c),children:jsx(me,{...a,requestJson:e,onClose:o,onJsonRequestOpen:n,isRequestShown:t,isToolbarAnimationDisabled:i})})]})}var K=memo(en);var k=createContext({windows:[],open:()=>{},close:()=>{},closeAll:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{},registerJSONViewWindowEvents:()=>{},containerRef:{current:null}});function ut({list:e,events:o,onClose:n,isWindowMinimized:t,windowOrder:r}){return e?.length?jsx(Fragment,{children:e.map((i,s)=>jsx(xe,{index:s,...o,...i,onClose:()=>{n(s);},isWindowMinimized:t,windowOrder:r},i.json.id))}):null}ut.displayName="List";var ue=memo(ut);var gt=({children:e,containerRef:o})=>{let[n,t]=useState([]),[r,i]=useState(false),[s,c]=useState(1),a=useRef({}),p=useCallback(g=>{if(n.length===7){alert("Maximum allowed active JSON View Window is 7 per table.");return}if(n.some(A=>A.json.id===g.json.id))return;let h=structuredClone(g.json),I=h.request_body,D={...g,json:h,requestJson:g.requestJson||I||void 0};delete D.json.request_body,t(A=>[...A,D]);},[n]),u=useCallback(g=>{t(h=>h.filter((I,D)=>g!==D));},[]),f=useCallback(()=>{t([]);},[]),y=useCallback(g=>{i(g);},[]),S=useCallback(g=>{c(g);},[]),b=useCallback(g=>{a.current=g;},[]),C=useMemo(()=>({onJsonRequestOpen:()=>a.current.onJsonRequestOpen?.(),onJsonSearch:()=>a.current.onJsonSearch?.(),onJsonCopy:()=>a.current.onJsonCopy?.(),onJsonIdCopy:()=>a.current.onJsonIdCopy?.(),onJsonNodesMinimize:()=>a.current.onJsonNodesMinimize?.(),onJsonNodesMaximize:()=>a.current.onJsonNodesMaximize?.()}),[]),x=useMemo(()=>({windows:n,open:p,close:u,closeAll:f,handleWindowMinimize:y,handleWindowOrder:S,registerJSONViewWindowEvents:b,containerRef:o}),[n,p,u,f,y,S,b,o]);return jsxs(k.Provider,{value:x,children:[e,jsx(ue,{list:n,events:C,onClose:u,isWindowMinimized:r,windowOrder:s})]})};function yt(e){let{containerRef:o}=useContext(k),{height:n,width:t}=a(),[r,i]=useState(false),[s,c]=useState(false);return jsx(f$1,{isOpen:true,onClose:e.onClose,containerRef:o,defaultSize:{width:N,height:B},minSize:{width:N,height:300},defaultPosition:Zo(t,n,e.index),order:e.windowOrder,isMinimized:e.isWindowMinimized,id:"json-view-window",className:nc(m.root,e.className),sx:Lo,children:jsx(K,{...e,isRequestShown:r,setIsRequestShown:i,isToolbarAnimationDisabled:s,setIsToolbarAnimationDisabled:c})})}yt.displayName="JSONViewWindow";var xe=memo(yt);var Nt=({isWindowMinimized:e,windowOrder:o,...n}={})=>{let{windows:t,open:r,close:i,closeAll:s,handleWindowMinimize:c,handleWindowOrder:a,registerJSONViewWindowEvents:p}=useContext(k),u=useCallback(()=>{c(e??false);},[c,e]),f=useCallback(()=>{a(o??1);},[a,o]);return useEffect(()=>{f();},[f]),useEffect(()=>{u();},[u]),useEffect(()=>{p(n);},[p,n]),{open:r,close:i,closeAll:s,windows:t,count:t.length}};var Ts=xe;export{m as a,N as b,B as c,Z as d,Ne as e,We as f,be as g,H as h,T as i,M as j,R as k,z as l,me as m,F as n,$ as o,K as p,k as q,ue as r,gt as s,Nt as t,Ts as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {B as B$1,p as p$1}from'./chunk-4NLQZJVN.js';import {nc,cc}from'./chunk-EP5VELEJ.js';import {xb,Ei,Ak,ja,Xd,Vj,E,ol}from'./chunk-XTJZTHR6.js';import {createContext,forwardRef,useMemo,Fragment,memo,useState,useCallback,useContext,createElement}from'react';import m from'@mui/material/Box';import ue from'@mui/material/Popper';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var D=createContext({});function te(){return useContext(D)}var l="os-shared-ActionMenu",o={root:`${l}-root`,popper:`${l}-popper`,panel:`${l}-panel`,sectionHeader:`${l}-sectionHeader`,sectionDivider:`${l}-sectionDivider`,item:`${l}-item`,itemContent:`${l}-itemContent`,itemLabel:`${l}-itemLabel`,itemIcon:`${l}-itemIcon`,startAdornment:`${l}-startAdornment`,rowEnd:`${l}-rowEnd`,endAdornment:`${l}-endAdornment`,arrow:`${l}-arrow`,trailingDot:`${l}-trailingDot`,flyoutHost:`${l}-flyoutHost`,flyoutPopper:`${l}-flyoutPopper`},Be={refund:ol,flag:E,viewReceipt:Vj,viewApi:Xd,capture:ja,void:Ak,clipboard:Ei},U=360,k=280,oe=148,ie=32,re=27,le=8,p=16,F=12,W=5,ae="#D9D9D9",se="drop-shadow(0px 8px 30px rgba(0, 0, 0, 0.16))",ce=1e3,de=1301;var pe={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},me=styled(m)({display:"contents"}),Ae=styled(ue)({zIndex:ce}),fe=styled(ue)({zIndex:de}),C=styled(m,{shouldForwardProp:e=>e!=="$isFlyout"&&e!=="$maxWidth"&&e!=="$maxHeight"})(({theme:e,$isFlyout:n=false,$maxWidth:t,$maxHeight:i})=>({background:e.v2.palette.base.white,borderRadius:e.v2.radius(4),filter:se,minWidth:oe,maxWidth:t??k,maxHeight:i??U,width:"max-content",marginTop:n?0:e.v2.spacing(le),overflowY:"auto",overflowX:"hidden"})),T=styled(m,{shouldForwardProp:e=>e!=="$open"&&e!=="$disabled"})(({theme:e,$open:n=false,$disabled:t=false})=>{let{foreground:i}=e.v2.palette,c={boxShadow:e.v2.elevation[200],zIndex:1};return {...e.v2.typography.textVariants.body.small.medium,position:"relative",display:"flex",alignItems:"center",justifyContent:"space-between",height:ie,padding:`${e.v2.spacing(8)} ${e.v2.spacing(8)} ${e.v2.spacing(8)} ${e.v2.spacing(12)}`,cursor:t?"default":"pointer",color:t?i.disabled:i.primary,...!t&&{"&:hover":c},...n&&!t&&c}}),R=styled(m)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),flex:1,minWidth:0,overflow:"hidden"})),w=styled("span")({minWidth:0,...pe}),Me=styled(m)(({theme:e})=>({...e.v2.typography.textVariants.body.small.medium,...pe,height:re,display:"flex",alignItems:"center",padding:`0 ${e.v2.spacing(12)}`,lineHeight:"100%",color:e.v2.palette.foreground.secondary,pointerEvents:"none",userSelect:"none",flexShrink:0,minWidth:0})),Ne=styled(m)(({theme:e})=>({borderTop:`1px solid ${e.v2.palette.border.default}`})),Ie=styled(m)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(6),flexShrink:0})),ye=styled("span")({display:"inline-flex",lineHeight:0}),ge=styled(m,{shouldForwardProp:e=>e!=="$color"})(({$color:e})=>({width:W,height:W,borderRadius:"50%",backgroundColor:e,flexShrink:0,cursor:"default"})),Se={filter:"grayscale(1)",opacity:.4},_e=styled("span",{shouldForwardProp:e=>e!=="$disabled"})(({$disabled:e=false})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& img, & svg":{display:"block",maxWidth:p,maxHeight:p},[`& .${o.itemIcon}`]:{width:p,height:p,objectFit:"contain"},...e&&Se})),xe=styled("span",{shouldForwardProp:e=>e!=="$disabled"})(({$disabled:e=false})=>({display:"inline-flex",alignItems:"center",flexShrink:0,...e&&Se})),Ee=styled("img")({width:F,height:F,display:"block"});function b({startAdornment:e,disabled:n=false}){return e==null||e===false?null:jsx(_e,{className:o.startAdornment,$disabled:n,children:e})}function v(){return jsx(Ee,{className:o.arrow,src:xb,alt:""})}function h({trailingHint:e,endAdornment:n,disabled:t=false}){let i=n!=null&&n!==false;return !e&&!i?null:jsxs(Ie,{className:o.rowEnd,children:[e&&jsx(p$1,{title:e.tooltip,placement:"top",children:jsx(ye,{children:jsx(ge,{className:o.trailingDot,$color:e.color??ae})})}),i&&jsx(xe,{className:o.endAdornment,$disabled:t,children:n})]})}function Ce(e,n=false){return n||!!e.trailingHint}function B(e){return createElement("img",{src:e,alt:"",width:p,height:p,className:o.itemIcon})}function O(e,n){return e===void 0?n:e}function Te(e){return e.isVisible!==false}function L(e){return e?.length?e.filter(Te):[]}function ze(e){return e.isVisible!==false}function Ve(e){return e?.length?e.filter(ze).map(n=>({label:n.label,startAdornment:n.icon?B(n.icon):void 0,disabled:n.disabled,trailingHint:n.trailingHint,onClick:n.onClick?t=>{n.onClick?.(t);}:void 0,onRightClick:n.onContextMenu?t=>{t.preventDefault(),n.onContextMenu?.(t);}:void 0})):[]}function Ye(e,n){let t=Ve(e.menuItems);if(!t.length)return;let i=n(e.appCode),c=i?.iconUrl??e.appIcon;return {label:cc(i?.name)??e.appName??e.appCode,startAdornment:c?B(c):void 0,items:t}}function Re(e){return e.map(n=>({...n,items:n.items.filter(Te)})).filter(n=>n.items.length>0)}function we(...e){return e.filter(n=>n===false||n==null?false:n.items.length>0)}function be(e){if(e.length)return {items:e}}function ve(e,n,t){if(n.length)return {title:e,hasDividerBefore:t?.hasDividerBefore??false,isLinked:t?.isLinked??false,items:n}}function qe(e,n,t){return we(be(e),ve(t,n,{hasDividerBefore:e.length>0,isLinked:true}))}function Oe({item:e,onClose:n}){let{label:t,startAdornment:i,endAdornment:c,items:A,trailingHint:y,disabled:r=false}=e,{panelMaxWidth:f,panelMaxHeight:d}=te(),[g,u]=useState(null),M=!!g&&!r,_=useCallback(x=>{r||u(x.currentTarget.firstElementChild);},[r]),s=useCallback(()=>{u(null);},[]),S=useMemo(()=>L(A),[A]);return S.length?jsxs(m,{className:o.flyoutHost,onMouseEnter:_,onMouseLeave:s,children:[jsxs(T,{role:"menuitem","aria-haspopup":"menu","aria-expanded":M,"aria-disabled":r||void 0,className:o.item,$open:M,$disabled:r,children:[jsxs(R,{className:o.itemContent,children:[jsx(b,{startAdornment:i,disabled:r}),jsx(w,{className:o.itemLabel,children:t})]}),jsx(h,{trailingHint:y,endAdornment:O(c,r?null:jsx(v,{})),disabled:r})]}),jsx(fe,{className:o.flyoutPopper,open:M,anchorEl:g,placement:"left-start",children:jsx(C,{role:"menu",$isFlyout:true,className:o.panel,$maxWidth:f,$maxHeight:d,children:S.map((x,$)=>jsx(P,{item:x,isNested:true,onClose:n},`flyout-${$}`))})})]}):null}function Pe({item:e,isInLinkedSection:n=false,isNested:t=false,onClose:i}){let{label:c,startAdornment:A,endAdornment:y,disabled:r=false,onClick:f,onRightClick:d,trailingHint:g}=e,u=!t&&Ce(e,n),M=s=>{r||(s.stopPropagation(),f?.(s),u&&i());},_=r||!d?void 0:s=>{s.preventDefault(),d(s);};return jsxs(T,{role:"menuitem","aria-disabled":r||void 0,className:o.item,$disabled:r,onClick:M,onContextMenu:_,children:[jsxs(R,{className:o.itemContent,children:[jsx(b,{startAdornment:A,disabled:r}),jsx(w,{className:o.itemLabel,children:c})]}),jsx(h,{trailingHint:g,endAdornment:O(y,u?jsx(v,{}):null),disabled:r})]})}function P({item:e,isInLinkedSection:n=false,isNested:t=false,onClose:i}){return e.items!==void 0?L(e.items).length?jsx(Oe,{item:e,onClose:i}):null:jsx(Pe,{item:e,isInLinkedSection:n,isNested:t,onClose:i})}var Ue=forwardRef(({id:e,className:n,sx:t,popperSx:i,anchorEl:c,onClose:A,sections:y,placement:r="bottom-end",panelMaxWidth:f,panelMaxHeight:d},g)=>{let u=!!c,M=useMemo(()=>Re(y),[y]),_=useMemo(()=>({panelMaxWidth:f,panelMaxHeight:d}),[f,d]);return u?jsx(D.Provider,{value:_,children:jsxs(me,{className:o.root,children:[jsx(B$1,{onClick:A}),jsx(Ae,{open:u,anchorEl:c,placement:r,className:o.popper,sx:i,children:jsx(C,{ref:g,id:e,role:"menu",className:nc(o.panel,n),sx:t,"data-testid":e??"ActionMenu",$maxWidth:f,$maxHeight:d,children:M.map((s,S)=>jsxs(Fragment,{children:[s.hasDividerBefore&&S>0?jsx(Ne,{role:"separator",className:o.sectionDivider}):null,s.title?jsx(Me,{role:"presentation",className:o.sectionHeader,children:s.title}):null,s.items.map((x,$)=>jsx(P,{item:x,isInLinkedSection:s.isLinked,onClose:A},`${S}-${$}`))]},`section-${S}`))})})]})}):null});Ue.displayName="ActionMenu";var ke=memo(Ue);export{o as a,Be as b,U as c,k as d,B as e,Ye as f,we as g,be as h,ve as i,qe as j,ke as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b,E,d,j,n as n$1,F,p,B,R as R$1,r}from'./chunk-4NLQZJVN.js';import {nc,_b,Mb}from'./chunk-EP5VELEJ.js';import {$e,af,Lj,_e}from'./chunk-XTJZTHR6.js';import {memo,forwardRef,useState,useCallback,useMemo,useReducer,useEffect}from'react';import $ from'dayjs';import Je from'dayjs/plugin/relativeTime';import R from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var n="os-shared-ExportReportButton",t={root:`${n}-root`,trigger:`${n}-trigger`,triggerIcon:`${n}-triggerIcon`,triggerLabel:`${n}-triggerLabel`,triggerProgress:`${n}-triggerProgress`,requestRow:`${n}-requestRow`,requestRowIcon:`${n}-requestRowIcon`,requestRowLabel:`${n}-requestRowLabel`,fileList:`${n}-fileList`,fileRow:`${n}-fileRow`,fileRowIcon:`${n}-fileRowIcon`,fileRowInfo:`${n}-fileRowInfo`,fileRowName:`${n}-fileRowName`,fileRowTime:`${n}-fileRowTime`,fileRowAction:`${n}-fileRowAction`,menuFooter:`${n}-menuFooter`,loadingRow:`${n}-loadingRow`},f={trigger:$e,ready:af,failed:Lj,download:_e};$.extend(Je);var oe=e=>{let o=$(e);return o.isValid()?$().diff(o,"day")<1?o.fromNow():o.format(o.isSame($(),"year")?"DD MMM":"DD MMM, YYYY"):""},Ze=/\.(xlx|xlsx|csv|txt|doc|docx|pdf|jpg|png|gif|zip|rar)$/i,te=(e,o)=>{let p=o??`file_${new Date().toISOString().split("T")[0]}`,d=Ze.exec(e)?.[0]??".csv";return `${p}${d}`};var re={state:"idle"},ro=(e,o)=>{switch(o.type){case "LOADING":return {state:"loading"};case "SUCCESS":return {state:"success"};case "ERROR":return {state:"error"};case "RESET":return re;default:return e}},q=({onDownload:e,onError:o,fileNameFallback:p})=>{let[d,c]=useReducer(ro,re),{state:i}=d;useEffect(()=>{if(i!=="success"&&i!=="error")return;let l=setTimeout(()=>c({type:"RESET"}),3e3);return ()=>clearTimeout(l)},[i]);let m=useCallback(()=>{!e||i==="loading"||(c({type:"LOADING"}),e().then(l=>{c({type:"SUCCESS"}),Mb({type:"url",url:l.url},te(l.fileName,l.downloadName??p));}).catch(l=>{c({type:"ERROR"}),o?.(l);}));},[e,o,p,i]);return {state:i,handleDownload:m}};var ie=e=>typeof e=="string"&&!e.startsWith("$")&&e!=="sx"&&e!=="theme"&&e!=="ownerState"&&e!=="as",le=styled(R)(()=>({position:"relative",display:"inline-block"})),se=styled(b,{shouldForwardProp:ie})(({theme:e,$status:o,$badge:p})=>{let{base:d,border:c,brand:i,error:m,grey:l,success:S}=e.v2.palette;return {position:"relative",height:32,minWidth:0,padding:`0 ${e.v2.spacing(8)}`,border:`1px solid ${c.default}`,borderRadius:e.v2.radius(4),backgroundColor:d.white,color:l[900],fontSize:"11px",fontWeight:500,overflow:"hidden",cursor:"pointer",...o!=="idle"&&{borderBottomColor:"transparent"},...o!=="idle"&&{borderBottomLeftRadius:0,borderBottomRightRadius:0},"&.Mui-disabled":{opacity:1,border:`1px solid ${c.default}`,backgroundColor:d.white,color:l[900]},...p&&{"&:after":{content:'""',width:7,height:7,borderRadius:"50%",position:"absolute",top:5,right:6,border:`1px solid ${d.white}`,backgroundColor:p==="failed"?m[500]:S[700]}},'&[aria-expanded="true"]':{borderColor:i[500],boxShadow:`0px 0px 4px 0px ${alpha(i[500],.5)}`}}}),P=styled(R,{shouldForwardProp:ie})(({theme:e,$status:o})=>({position:"absolute",bottom:0,right:0,left:0,overflow:"hidden",lineHeight:0,[`& .${E.root}`]:{height:2,minHeight:2,minWidth:0,padding:0,borderRadius:0,background:"transparent",display:"block"},[`& .${E.fill}`]:{height:2,minHeight:2,minWidth:0,maxWidth:"none",padding:0,borderRadius:0,display:"block",backgroundColor:o==="ready"?e.v2.palette.success[700]:o==="failed"?e.v2.palette.error[500]:e.v2.palette.brand[500]},[`& .${E.text}`]:{display:"none"}})),ae=styled(R)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),height:32,padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,borderBottom:`1px solid ${e.v2.palette.border.default}`,cursor:"pointer","&:hover":{boxShadow:e.v2.elevation[200]}})),pe=styled(d)(()=>({width:16,height:16,objectFit:"contain",flexShrink:0,display:"block"})),de=styled(j)(()=>({fontSize:"11px",fontWeight:400,lineHeight:1.1,textTransform:"uppercase"})),ce=styled(R)(({theme:e})=>({borderTop:`2px solid ${e.v2.palette.border.default}`})),ue=styled(R)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),padding:"5.5px 8px",minHeight:48,height:"auto",borderBottom:`1px solid ${e.v2.palette.border.default}`,cursor:"pointer","&:hover":{boxShadow:e.v2.elevation[200]}})),Re=styled(d)(()=>({width:16,height:16,objectFit:"contain",flexShrink:0,display:"block"})),me=styled(R)(()=>({display:"flex",flexDirection:"column",gap:"2px",minWidth:0,flex:1})),fe=styled(j)(({theme:e})=>({fontSize:"11px",fontWeight:500,lineHeight:1.2,color:e.v2.palette.grey[900],wordBreak:"break-all",paddingInlineEnd:e.v2.spacing(8)})),ge=styled(j)(({theme:e})=>({fontSize:"9px",fontWeight:600,lineHeight:1.2,color:e.v2.palette.grey[500]})),xe=styled(R)(()=>({display:"flex",alignItems:"center",flexShrink:0})),we=styled(R)(({theme:e})=>({backgroundColor:alpha(e.v2.palette.grey[100],.5),backdropFilter:e.v2.blur[2],color:e.v2.palette.grey[900],fontSize:"11px",fontWeight:500,height:31,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",overflow:"hidden",borderBottomLeftRadius:e.v2.radius(4),borderBottomRightRadius:e.v2.radius(4)})),ye=styled(R)(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",gap:e.v2.spacing(8),padding:e.v2.spacing(8)}));function io({item:e,onDownloadReport:o,onDownloadError:p,renderIcon:d$1,formatDate:c}){let{state:i,handleDownload:m}=q({onDownload:o?()=>o(e.id):void 0,onError:p,fileNameFallback:e.id}),l=i==="loading"?jsx(n$1,{size:14}):i==="success"?jsx(d,{src:f.ready,alt:"downloaded"}):i==="error"?jsx(d,{src:f.failed,alt:"download failed"}):jsx(d,{src:f.download,alt:"download report",onClick:m});return jsxs(ue,{className:t.fileRow,children:[d$1?d$1(e):jsx(Re,{src:e.fileIconSrc??_b(e.fileName),alt:"report file",className:t.fileRowIcon}),jsxs(me,{className:t.fileRowInfo,children:[jsx(fe,{className:t.fileRowName,children:e.fileName}),jsx(ge,{className:t.fileRowTime,children:(c??oe)(e.createdAt)})]}),jsx(xe,{className:t.fileRowAction,children:l})]})}var he=memo(io);function so(){return jsxs(ye,{className:t.loadingRow,children:[jsx(r,{width:"16px",height:"16px",variant:"rectangular"}),jsx(r,{width:"100%",variant:"text"}),jsx(r,{width:"12px",height:"12px",variant:"circular"})]})}var A=memo(so);function co({row:e,onSelect:o}){let p=e.icon===void 0?jsx(pe,{src:_b(`file.${e.id}`),alt:`${e.id} file`,className:t.requestRowIcon}):e.icon;return jsxs(ae,{onClick:o,className:t.requestRow,children:[p,jsx(de,{className:t.requestRowLabel,children:e.label})]})}var be=memo(co);var go=[{id:"csv",label:"CSV"}],ve=forwardRef(({status:e="idle",progress:o=0,badge:p$1=null,reports:d$1,isLoadingReports:c=false,triggerIcon:i,loadingLabel:m,readyLabel:l,failedLabel:S,requestRows:Ne,renderMenuHeader:O,onDownloadReport:Fe,onDownloadError:Ie,renderReportIcon:Ce,formatReportDate:$e,footer:h,menuPlacement:Pe="bottom-end",menuProps:De,onMenuOpen:W,tooltipTitle:k,id:H,className:Te,sx:ke,...Le},qe)=>{let[z,U]=useState(null),E=!!z,Me=useCallback(s=>{e==="loading"||e==="ready"||(W?.(),U(s.currentTarget));},[e,W]),x=useCallback(()=>{U(null);},[]),Ae=useCallback(s=>{x(),s.onSelect?.();},[x]),Oe=useCallback(s=>{s.stopPropagation(),h?.onClick?.(),x();},[x,h]),{placement:We,sx:b,modifiers:y,...He}=De??{},ze=We??Pe,Ue=useMemo(()=>[{width:208,boxShadow:"0px 8px 30px 0px rgba(0, 0, 0, 0.16)"},...Array.isArray(b)?b:[b]],[b]),_e=useMemo(()=>{let s=[{name:"offset",options:{offset:[0,8]}}];if(!y)return s;let L=Array.isArray(y)?y:[y];return L.some(Qe=>Qe?.name==="offset")?L:[...s,...L]},[y]),Ge=Math.min(100,Math.max(0,o)),Ye=i===void 0?jsx(d,{src:f.trigger,alt:"reports"}):i,Ve=Ne??go,je=e==="loading"?jsxs(Fragment,{children:[jsx(n$1,{size:14}),m!=null?jsx("span",{className:t.triggerLabel,children:m}):null,jsx(P,{$status:e,className:t.triggerProgress,children:jsx(F,{value:Ge})})]}):e==="ready"?jsxs(Fragment,{children:[jsx(d,{src:f.ready,alt:"ready"}),l!=null?jsx("span",{className:t.triggerLabel,children:l}):null,jsx(P,{$status:e,className:t.triggerProgress,children:jsx(F,{value:100})})]}):e==="failed"?jsxs(Fragment,{children:[jsx(d,{src:f.failed,alt:"failed"}),S!=null?jsx("span",{className:t.triggerLabel,children:S}):null,jsx(P,{$status:e,className:t.triggerProgress,children:jsx(F,{value:100})})]}):Ye,_=jsx(se,{variant:"secondary",onClick:Me,"aria-haspopup":"menu","aria-expanded":E,$status:e,$badge:e==="idle"?p$1:void 0,className:t.trigger,children:je}),Xe=k!=null&&k!==false?jsx(p,{title:k,...E?{open:false}:{},children:_}):_,Ke=c||(d$1?.length??0)>0;return jsxs(le,{ref:qe,id:H,"data-testid":H??"ExportReportButton",className:nc(t.root,Te),sx:ke,...Le,children:[Xe,E&&jsx(B,{onClose:x}),jsxs(R$1,{open:E,anchorEl:z,placement:ze,sx:Ue,modifiers:_e,...He,children:[O?O({closeMenu:x}):Ve.map(s=>jsx(be,{row:s,onSelect:()=>Ae(s)},s.id)),Ke?jsx(ce,{className:t.fileList,children:c?jsxs(Fragment,{children:[jsx(A,{}),jsx(A,{})]}):d$1?.map(s=>jsx(he,{item:s,onDownloadReport:Fe,onDownloadError:Ie,renderIcon:Ce,formatDate:$e},s.id))}):null,h!=null?jsx(we,{onClick:Oe,className:t.menuFooter,children:h.label}):null]})]})});ve.displayName="ExportReportButton";var xo=memo(ve);export{t as a,q as b,xo as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-OCHPXIEK.js';import {f,g,h as h$2,i as i$1,b}from'./chunk-TXLFAI3O.js';import {d,c as c$1}from'./chunk-5KGT5D5O.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {mc,nc}from'./chunk-EP5VELEJ.js';import'./chunk-XTJZTHR6.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:nc(d,o.className),"data-testid":i,...l,sx:mc({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,initial:false,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,initial:false,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:nc(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:nc(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:mc({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:nc(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:mc({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?mc(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
|
|
1
|
+
import {f,g,h as h$2,i as i$1,b}from'./chunk-TXLFAI3O.js';import {d,c as c$1}from'./chunk-5KGT5D5O.js';import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-OCHPXIEK.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {mc,nc}from'./chunk-EP5VELEJ.js';import'./chunk-XTJZTHR6.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:nc(d,o.className),"data-testid":i,...l,sx:mc({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,initial:false,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,initial:false,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:nc(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:nc(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:mc({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:nc(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:mc({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?mc(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuProps } from './type';
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ActionMenuProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuFlyoutRowProps } from './type';
|
|
3
|
+
/** Row with a hover flyout submenu; nested rows go back through `ActionMenuRow`, so flyouts can nest. */
|
|
4
|
+
export declare function ActionMenuFlyoutRow({ item, onClose }: ActionMenuFlyoutRowProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuLeafRowProps } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* Clickable row.
|
|
5
|
+
* - Direct (top level): no default end; menu stays open.
|
|
6
|
+
* - Linked (top level): trailing dot + arrow (default `endAdornment`), closes the menu after a click.
|
|
7
|
+
* - Nested (inside a flyout): trailing dot, no default end; menu stays open.
|
|
8
|
+
* `endAdornment` replaces the default end when set (`null` hides it).
|
|
9
|
+
*/
|
|
10
|
+
export declare function ActionMenuLeafRow({ item, isInLinkedSection, isNested, onClose }: ActionMenuLeafRowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuRowProps } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* Picks the row kind at any depth: a row with `items` is a flyout parent (omitted when no nested
|
|
5
|
+
* item is visible); every other row is a leaf.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ActionMenuRow({ item, isInLinkedSection, isNested, onClose }: ActionMenuRowProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuRowLeadingProps } from './type';
|
|
3
|
+
/** Leading slot: renders `startAdornment`; nothing when it is omitted, `null`, or `false`. */
|
|
4
|
+
export declare function ActionMenuRowLeading({ startAdornment, disabled }: ActionMenuRowLeadingProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ActionMenuRowTrailingProps } from './type';
|
|
3
|
+
/** Default `endAdornment` for linked and flyout rows. */
|
|
4
|
+
export declare function ActionMenuArrow(): import("react").JSX.Element;
|
|
5
|
+
/** Trailing group: `trailingHint` dot, then the resolved end adornment (default arrow or caller content). */
|
|
6
|
+
export declare function ActionMenuRowTrailing({ trailingHint, endAdornment, disabled }: ActionMenuRowTrailingProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const actionMenuClassNamePrefix: "os-shared-ActionMenu";
|
|
2
|
+
export declare const actionMenuClassNames: {
|
|
3
|
+
readonly root: "os-shared-ActionMenu-root";
|
|
4
|
+
readonly popper: "os-shared-ActionMenu-popper";
|
|
5
|
+
readonly panel: "os-shared-ActionMenu-panel";
|
|
6
|
+
readonly sectionHeader: "os-shared-ActionMenu-sectionHeader";
|
|
7
|
+
readonly sectionDivider: "os-shared-ActionMenu-sectionDivider";
|
|
8
|
+
readonly item: "os-shared-ActionMenu-item";
|
|
9
|
+
readonly itemContent: "os-shared-ActionMenu-itemContent";
|
|
10
|
+
readonly itemLabel: "os-shared-ActionMenu-itemLabel";
|
|
11
|
+
readonly itemIcon: "os-shared-ActionMenu-itemIcon";
|
|
12
|
+
readonly startAdornment: "os-shared-ActionMenu-startAdornment";
|
|
13
|
+
readonly rowEnd: "os-shared-ActionMenu-rowEnd";
|
|
14
|
+
readonly endAdornment: "os-shared-ActionMenu-endAdornment";
|
|
15
|
+
readonly arrow: "os-shared-ActionMenu-arrow";
|
|
16
|
+
readonly trailingDot: "os-shared-ActionMenu-trailingDot";
|
|
17
|
+
readonly flyoutHost: "os-shared-ActionMenu-flyoutHost";
|
|
18
|
+
readonly flyoutPopper: "os-shared-ActionMenu-flyoutPopper";
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Legacy direct-action icon keys → URLs, kept as data for callers converting `ActionCell`-style
|
|
22
|
+
* actions (`icon: 'refund'`). `ActionMenu` itself does not read it: pass `actionMenuIcon(ACTION_ICONS_MAPPER[key])`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const ACTION_ICONS_MAPPER: Record<string, string>;
|
|
25
|
+
/** Default scroll cap for the root menu and flyout lists (px). */
|
|
26
|
+
export declare const DEFAULT_ACTION_MENU_MAX_HEIGHT = 360;
|
|
27
|
+
/** Row labels truncate with an ellipsis above this panel width (px). */
|
|
28
|
+
export declare const ACTION_MENU_MAX_WIDTH = 280;
|
|
29
|
+
/** Panel minimum width (px). */
|
|
30
|
+
export declare const ACTION_MENU_MIN_WIDTH = 148;
|
|
31
|
+
/** Row height (px). */
|
|
32
|
+
export declare const ACTION_MENU_ROW_HEIGHT = 32;
|
|
33
|
+
/** Section header height (px). */
|
|
34
|
+
export declare const ACTION_MENU_SECTION_HEADER_HEIGHT = 27;
|
|
35
|
+
/** Gap between the anchor and the root panel (px). */
|
|
36
|
+
export declare const ACTION_MENU_ANCHOR_GAP = 8;
|
|
37
|
+
/** Row / trailing icon sizes (px). */
|
|
38
|
+
export declare const ACTION_MENU_ICON_SIZE = 16;
|
|
39
|
+
export declare const ACTION_MENU_ARROW_SIZE = 12;
|
|
40
|
+
export declare const ACTION_MENU_TRAILING_DOT_SIZE = 5;
|
|
41
|
+
/** Default trailing dot fill — no v2 token matches this grey; frozen. */
|
|
42
|
+
export declare const ACTION_MENU_TRAILING_DOT_DEFAULT_COLOR = "#D9D9D9";
|
|
43
|
+
/** Panel shadow — `drop-shadow` (not an elevation token) so it follows the rounded panel; frozen. */
|
|
44
|
+
export declare const ACTION_MENU_PANEL_SHADOW = "drop-shadow(0px 8px 30px rgba(0, 0, 0, 0.16))";
|
|
45
|
+
/** Root popper sits above the invisible `Backdrop` (999); flyouts above MUI modals (1300). */
|
|
46
|
+
export declare const ACTION_MENU_POPPER_Z_INDEX = 1000;
|
|
47
|
+
export declare const ACTION_MENU_FLYOUT_POPPER_Z_INDEX = 1301;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default, default as ActionMenu } from './ActionMenu';
|
|
2
|
+
export { ACTION_ICONS_MAPPER, ACTION_MENU_MAX_WIDTH, DEFAULT_ACTION_MENU_MAX_HEIGHT, actionMenuClassNames } from './constants';
|
|
3
|
+
export { actionMenuIcon, buildRowActionMenuSections, compactSections, directSection, navigationAppMenuItem, titledSection } from './utils';
|
|
4
|
+
export type { ActionMenuItem, ActionMenuProps, ActionMenuSection, ActionMenuTrailingHint, ActionNavigationItem } from './type';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as ACTION_ICONS_MAPPER,d as ACTION_MENU_MAX_WIDTH,k as ActionMenu,c as DEFAULT_ACTION_MENU_MAX_HEIGHT,a as actionMenuClassNames,e as actionMenuIcon,j as buildRowActionMenuSections,g as compactSections,k as default,h as directSection,f as navigationAppMenuItem,i as titledSection}from'../../_chunks/chunk-IOXXKK24.js';import'../../_chunks/chunk-4NLQZJVN.js';import'../../_chunks/chunk-EP5VELEJ.js';import'../../_chunks/chunk-XTJZTHR6.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ActionMenuRootStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
5
|
+
export declare const ActionMenuPopperStyled: import("@emotion/styled").StyledComponent<import("@mui/material/Popper").PopperProps & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
6
|
+
export declare const ActionMenuFlyoutPopperStyled: import("@emotion/styled").StyledComponent<import("@mui/material/Popper").PopperProps & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
7
|
+
/** Scrollable panel (root menu and flyouts). */
|
|
8
|
+
export declare const ActionMenuListStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
11
|
+
$isFlyout?: boolean | undefined;
|
|
12
|
+
$maxWidth?: number | undefined;
|
|
13
|
+
$maxHeight?: number | undefined;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export declare const ActionMenuRowStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
16
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
17
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
18
|
+
$open?: boolean | undefined;
|
|
19
|
+
$disabled?: boolean | undefined;
|
|
20
|
+
}, {}, {}>;
|
|
21
|
+
export declare const ActionMenuRowContentStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
22
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
23
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
24
|
+
export declare const ActionMenuLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
25
|
+
export declare const ActionMenuSectionHeaderStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
26
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
27
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
28
|
+
export declare const ActionMenuSectionDividerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
29
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
30
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
31
|
+
export declare const ActionMenuRowEndStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
32
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
33
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
34
|
+
export declare const ActionMenuTrailingDotHostStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
35
|
+
export declare const ActionMenuTrailingDotStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
36
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
37
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
38
|
+
$color: string;
|
|
39
|
+
}, {}, {}>;
|
|
40
|
+
/** Leading slot: caps nested media at the icon size so a large node cannot stretch the 32px row. */
|
|
41
|
+
export declare const ActionMenuStartAdornmentStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
42
|
+
$disabled?: boolean | undefined;
|
|
43
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
44
|
+
/** Trailing slot: default arrow or caller content. */
|
|
45
|
+
export declare const ActionMenuEndAdornmentStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
46
|
+
$disabled?: boolean | undefined;
|
|
47
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
48
|
+
export declare const ActionMenuArrowStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { PopperProps } from '@mui/material/Popper';
|
|
4
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
5
|
+
/** Status or navigation hint shown as a dot (and optional arrow) at the end of a row. */
|
|
6
|
+
export interface ActionMenuTrailingHint {
|
|
7
|
+
/** Already-translated tooltip shown when the user hovers the dot. */
|
|
8
|
+
tooltip: string;
|
|
9
|
+
/**
|
|
10
|
+
* Dot fill. Defaults to `#D9D9D9` (grey) — use for open-in-new-window hints and inactive/no-activity states.
|
|
11
|
+
* Callers pass a brand color when the dot encodes status (e.g. portfolio activity classification).
|
|
12
|
+
*/
|
|
13
|
+
color?: string;
|
|
14
|
+
}
|
|
15
|
+
/** One row in the menu — direct action, linked row (with arrow), or flyout parent when `items` is set. */
|
|
16
|
+
export interface ActionMenuItem {
|
|
17
|
+
/** Already-translated row label; ellipsizes when the panel is narrower than the text. */
|
|
18
|
+
label?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Leading content: `actionMenuIcon(url)` for an image, or any node (SVG component, avatar, flag…).
|
|
21
|
+
* Omit (or `null`) for no leading content. Display only — clicks inside it still trigger the row.
|
|
22
|
+
*/
|
|
23
|
+
startAdornment?: ReactNode;
|
|
24
|
+
/** When `false`, the row is omitted. Defaults to visible. */
|
|
25
|
+
isVisible?: boolean;
|
|
26
|
+
/** When `true`, the row is greyed out and does not fire `onClick` or open flyouts. */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Primary click handler for direct, linked, and flyout leaf rows; linked rows also call `onClose` on the menu. */
|
|
29
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
30
|
+
/** Right-click handler (direct, linked, and flyout leaf rows). The browser context menu is suppressed when set. */
|
|
31
|
+
onRightClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
32
|
+
/** Optional dot (and tooltip) before the trailing arrow. Setting it on a top-level row also makes the row linked. */
|
|
33
|
+
trailingHint?: ActionMenuTrailingHint;
|
|
34
|
+
/**
|
|
35
|
+
* Trailing content after the `trailingHint` dot. Defaults to the arrow on linked and flyout rows (nothing on
|
|
36
|
+
* direct rows); a node replaces the arrow, `null` hides it. Display only — clicks inside it still trigger the row.
|
|
37
|
+
*/
|
|
38
|
+
endAdornment?: ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* When set, the row opens a hover flyout submenu instead of behaving as a single action.
|
|
41
|
+
* A row whose `items` are empty (or all hidden) is omitted.
|
|
42
|
+
*/
|
|
43
|
+
items?: ActionMenuItem[];
|
|
44
|
+
}
|
|
45
|
+
/** A titled or untitled block of rows; multiple sections render in order with optional dividers. */
|
|
46
|
+
export interface ActionMenuSection {
|
|
47
|
+
/** Already-translated section heading. Omit for an untitled block. */
|
|
48
|
+
title?: string;
|
|
49
|
+
/** Renders a divider above this section. Ignored for the first visible section. */
|
|
50
|
+
hasDividerBefore?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Rows in this section are linked rows: trailing arrow (default `endAdornment`), and the menu closes after a click. `buildRowActionMenuSections` sets it on the linked section.
|
|
53
|
+
*/
|
|
54
|
+
isLinked?: boolean;
|
|
55
|
+
/** Rows in this section, in display order (invisible rows are filtered out). */
|
|
56
|
+
items: ActionMenuItem[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Sectioned row-actions menu. `className` and `sx` land on the scrollable panel;
|
|
60
|
+
* `ref` lands on the same panel. Pass `id` explicitly — no id is generated.
|
|
61
|
+
* The optional DOM `id` also becomes the `data-testid` when passed.
|
|
62
|
+
*/
|
|
63
|
+
export interface ActionMenuProps {
|
|
64
|
+
/** Optional DOM id; also used as `data-testid` when provided. */
|
|
65
|
+
id?: string;
|
|
66
|
+
/** Merged onto the scrollable panel (`actionMenuClassNames.panel`). */
|
|
67
|
+
className?: string;
|
|
68
|
+
/** MUI sx overrides applied to the scrollable action panel. */
|
|
69
|
+
sx?: SxProps<Theme>;
|
|
70
|
+
/** MUI sx overrides applied to the root MUI Popper (placement layer). */
|
|
71
|
+
popperSx?: SxProps<Theme>;
|
|
72
|
+
/** Element the menu anchors to; when `null`, nothing is rendered. */
|
|
73
|
+
anchorEl: HTMLElement | null;
|
|
74
|
+
/** Called when the menu should close (backdrop click, after linked-row clicks). */
|
|
75
|
+
onClose: () => void;
|
|
76
|
+
/** Section list built with `compactSections`, `directSection`, `titledSection`, or by hand. */
|
|
77
|
+
sections: ActionMenuSection[];
|
|
78
|
+
/** Popper placement relative to `anchorEl`. Defaults to `bottom-end`. */
|
|
79
|
+
placement?: PopperProps['placement'];
|
|
80
|
+
/** Panel max width in px. Defaults to `ACTION_MENU_MAX_WIDTH` (280). Flyouts inherit the same value. */
|
|
81
|
+
panelMaxWidth?: number;
|
|
82
|
+
/** Panel max height in px before vertical scroll. Defaults to `DEFAULT_ACTION_MENU_MAX_HEIGHT` (360). */
|
|
83
|
+
panelMaxHeight?: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Input shape for `navigationAppMenuItem` — maps table cross-app navigation into flyout rows
|
|
87
|
+
* (`onContextMenu` on leaves for open-in-new-window).
|
|
88
|
+
*/
|
|
89
|
+
export interface ActionNavigationItem {
|
|
90
|
+
/** Already-translated row label. */
|
|
91
|
+
label?: string | null;
|
|
92
|
+
/** App or action icon URL; `navigationAppMenuItem` turns it into the row's `startAdornment`. */
|
|
93
|
+
icon?: string;
|
|
94
|
+
/** When `false`, the row is omitted from the flyout. */
|
|
95
|
+
isVisible?: boolean;
|
|
96
|
+
/** Non-interactive row styling when `true`. */
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
/** Leaf click handler (optional event for navigation helpers). */
|
|
99
|
+
onClick?: (e?: React.MouseEvent<HTMLElement>) => void;
|
|
100
|
+
/** Right-click handler on flyout leaves (e.g. open in new window). */
|
|
101
|
+
onContextMenu?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
102
|
+
/** Trailing status dot on the navigation row. */
|
|
103
|
+
trailingHint?: ActionMenuTrailingHint;
|
|
104
|
+
}
|
|
105
|
+
/** Panel size limits shared with flyouts through `ActionMenuPanelContext` (internal). */
|
|
106
|
+
export interface ActionMenuPanelSize {
|
|
107
|
+
panelMaxWidth?: number;
|
|
108
|
+
panelMaxHeight?: number;
|
|
109
|
+
}
|
|
110
|
+
/** Row dispatcher props (internal): flyout parent, leaf, or nothing when a flyout has no visible items. */
|
|
111
|
+
export interface ActionMenuRowProps {
|
|
112
|
+
item: ActionMenuItem;
|
|
113
|
+
/** Row sits in an `isLinked` section. */
|
|
114
|
+
isInLinkedSection?: boolean;
|
|
115
|
+
/** Row is rendered inside a flyout. */
|
|
116
|
+
isNested?: boolean;
|
|
117
|
+
onClose: () => void;
|
|
118
|
+
}
|
|
119
|
+
/** Leaf row props (internal). */
|
|
120
|
+
export interface ActionMenuLeafRowProps {
|
|
121
|
+
item: ActionMenuItem;
|
|
122
|
+
isInLinkedSection?: boolean;
|
|
123
|
+
isNested?: boolean;
|
|
124
|
+
onClose: () => void;
|
|
125
|
+
}
|
|
126
|
+
/** Flyout parent row props (internal). */
|
|
127
|
+
export interface ActionMenuFlyoutRowProps {
|
|
128
|
+
item: ActionMenuItem;
|
|
129
|
+
onClose: () => void;
|
|
130
|
+
}
|
|
131
|
+
/** Leading slot props (internal). */
|
|
132
|
+
export interface ActionMenuRowLeadingProps {
|
|
133
|
+
startAdornment?: ReactNode;
|
|
134
|
+
disabled?: boolean;
|
|
135
|
+
}
|
|
136
|
+
/** Trailing slot props (internal): `trailingHint` dot, then the resolved end adornment. */
|
|
137
|
+
export interface ActionMenuRowTrailingProps {
|
|
138
|
+
trailingHint?: ActionMenuTrailingHint;
|
|
139
|
+
endAdornment?: ReactNode;
|
|
140
|
+
disabled?: boolean;
|
|
141
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { TextAndLang } from '../../types/index.js';
|
|
3
|
+
import type { ActionMenuItem, ActionMenuSection, ActionNavigationItem } from './type';
|
|
4
|
+
/** Linked rows: rows of an `isLinked` section, or top-level rows carrying a `trailingHint`. */
|
|
5
|
+
export declare function isLinkedMenuRow(item: ActionMenuItem, isSectionLinked?: boolean): boolean;
|
|
6
|
+
/** Image `startAdornment` for an icon URL, sized for the leading slot. */
|
|
7
|
+
export declare function actionMenuIcon(src: string): ReactNode;
|
|
8
|
+
/** `undefined` keeps the default slot content; any other value (including `null`) replaces it. */
|
|
9
|
+
export declare function resolveAdornment(value: ReactNode | undefined, fallback: ReactNode): ReactNode;
|
|
10
|
+
export declare function visibleNestedItems(items: ActionMenuItem[] | undefined): ActionMenuItem[];
|
|
11
|
+
export declare function navigationAppMenuItem(section: {
|
|
12
|
+
appCode: string;
|
|
13
|
+
appName?: string;
|
|
14
|
+
appIcon?: string;
|
|
15
|
+
menuItems: ActionNavigationItem[];
|
|
16
|
+
}, getAppInfo: (appCode: string) => {
|
|
17
|
+
iconUrl?: string;
|
|
18
|
+
name?: TextAndLang[];
|
|
19
|
+
} | undefined): ActionMenuItem | undefined;
|
|
20
|
+
export declare function visibleSections(sections: ActionMenuSection[]): ActionMenuSection[];
|
|
21
|
+
export declare function compactSections(...sections: Array<ActionMenuSection | undefined | null | false>): ActionMenuSection[];
|
|
22
|
+
export declare function directSection(items: ActionMenuItem[]): ActionMenuSection | undefined;
|
|
23
|
+
export declare function titledSection(title: string, items: ActionMenuItem[], options?: {
|
|
24
|
+
hasDividerBefore?: boolean;
|
|
25
|
+
isLinked?: boolean;
|
|
26
|
+
}): ActionMenuSection | undefined;
|
|
27
|
+
export declare function buildRowActionMenuSections(directActions: ActionMenuItem[], linkedItems: ActionMenuItem[], linkedSectionTitle: string): ActionMenuSection[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{pc as ColumnViewsPicker,rc as CreateViewDialog,nc as CustomViews,oc as DefaultViews,qc as ViewsDropdown,Jb as areAllColumnsSelected,Pb as areAllCurrentColumnsSelected,Sb as areColumnsEqual,Kb as areSomeColumnsSelected,Qb as areSomeCurrentColumnsSelected,ic as buildFullTemplateLayouts,gc as buildRequiredColumnView,qb as convertColumnsToLayoutSection,$b as convertTemplateToColumnsView,ac as convertTemplatesToColumnsView,yb as countCustomTemplates,zb as countCustomViewMenuItems,sb as createCustomViewMenuItem,Mb as deepCloneColumns,Fb as getColumnCheckState,Yb as getColumnOrder,pb as getColumnsByMode,ec as getLayoutCodesForMode,rb as getLayoutDataFromTemplates,fc as getOtherModeSectionCode,Xb as getSubmenuFromTemplateLayout,Cb as getSubmenuItems,Eb as getSubmenuItemsForDisplay,ub as getTemplateRole,Zb as handleTemplateUpdate,hc as hasLayoutSectionForMode,Db as hasSubmenu,Vb as initializeCreateColumns,Wb as initializeCreateColumnsWithCurrentState,Ub as initializeEditingColumns,dc as isCheckboxInteractionTarget,xb as isCustomTemplate,wb as isCustomView,mb as isDateColumn,nb as isIndexColumn,vb as isPresetView,Lb as isValidTemplateName,Bb as mapTemplatesToMenuItems,Rb as normalizeColumnsSelected,bc as replaceTemplateInList,Tb as resetColumnsToDefault,tb as setViewAsDefault,_b as templateToViewMenuItem,Ib as toggleAllColumns,Ob as toggleAllCurrentColumns,Gb as toggleColumn,Nb as toggleSingleColumn,Hb as toggleSubItem,ob as transformLayoutToColumns,Ab as transformTemplatesToViewMenuItems,cc as updateCurrentTemplate,mc as useCustomTableViews,lc as useSubmenuHover,jc as useViewsManager,kc as useViewsMenu}from'../../_chunks/chunk-
|
|
1
|
+
export{pc as ColumnViewsPicker,rc as CreateViewDialog,nc as CustomViews,oc as DefaultViews,qc as ViewsDropdown,Jb as areAllColumnsSelected,Pb as areAllCurrentColumnsSelected,Sb as areColumnsEqual,Kb as areSomeColumnsSelected,Qb as areSomeCurrentColumnsSelected,ic as buildFullTemplateLayouts,gc as buildRequiredColumnView,qb as convertColumnsToLayoutSection,$b as convertTemplateToColumnsView,ac as convertTemplatesToColumnsView,yb as countCustomTemplates,zb as countCustomViewMenuItems,sb as createCustomViewMenuItem,Mb as deepCloneColumns,Fb as getColumnCheckState,Yb as getColumnOrder,pb as getColumnsByMode,ec as getLayoutCodesForMode,rb as getLayoutDataFromTemplates,fc as getOtherModeSectionCode,Xb as getSubmenuFromTemplateLayout,Cb as getSubmenuItems,Eb as getSubmenuItemsForDisplay,ub as getTemplateRole,Zb as handleTemplateUpdate,hc as hasLayoutSectionForMode,Db as hasSubmenu,Vb as initializeCreateColumns,Wb as initializeCreateColumnsWithCurrentState,Ub as initializeEditingColumns,dc as isCheckboxInteractionTarget,xb as isCustomTemplate,wb as isCustomView,mb as isDateColumn,nb as isIndexColumn,vb as isPresetView,Lb as isValidTemplateName,Bb as mapTemplatesToMenuItems,Rb as normalizeColumnsSelected,bc as replaceTemplateInList,Tb as resetColumnsToDefault,tb as setViewAsDefault,_b as templateToViewMenuItem,Ib as toggleAllColumns,Ob as toggleAllCurrentColumns,Gb as toggleColumn,Nb as toggleSingleColumn,Hb as toggleSubItem,ob as transformLayoutToColumns,Ab as transformTemplatesToViewMenuItems,cc as updateCurrentTemplate,mc as useCustomTableViews,lc as useSubmenuHover,jc as useViewsManager,kc as useViewsMenu}from'../../_chunks/chunk-7ZL5XSW5.js';import'../../_chunks/chunk-HPDPFVUQ.js';import'../../_chunks/chunk-EA5PYN5W.js';import'../../_chunks/chunk-WLHB45KP.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-DKBPLNEE.js';import'../../_chunks/chunk-72FD3NW2.js';import'../../_chunks/chunk-TXLFAI3O.js';import'../../_chunks/chunk-5KGT5D5O.js';import'../../_chunks/chunk-A2SC5BOB.js';import'../../_chunks/chunk-OCHPXIEK.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-AE4JYS7U.js';import'../../_chunks/chunk-OHN7F4WA.js';import'../../_chunks/chunk-TCI6NIBC.js';import'../../_chunks/chunk-HRQGL7NO.js';import'../../_chunks/chunk-UVU4YIMS.js';import'../../_chunks/chunk-7GJ5PPIY.js';import'../../_chunks/chunk-AMOFAS7L.js';import'../../_chunks/chunk-C2RHW4FN.js';import'../../_chunks/chunk-SO6E7CJM.js';import'../../_chunks/chunk-L42ISYQY.js';import'../../_chunks/chunk-GVXTYXRO.js';import'../../_chunks/chunk-XHFDGV2F.js';import'../../_chunks/chunk-JUEXC7Z2.js';import'../../_chunks/chunk-RFA33XQQ.js';import'../../_chunks/chunk-KFBXVUQ5.js';import'../../_chunks/chunk-2M6UER6N.js';import'../../_chunks/chunk-V5NBU5TE.js';import'../../_chunks/chunk-RYHHS7S3.js';import'../../_chunks/chunk-MLZ63M2D.js';import'../../_chunks/chunk-6WI5CW2I.js';import'../../_chunks/chunk-6YAUL2OM.js';import'../../_chunks/chunk-PUI6B7OY.js';import'../../_chunks/chunk-D52IZHFQ.js';import'../../_chunks/chunk-JMPFZOV3.js';import'../../_chunks/chunk-W3DEOBBE.js';import'../../_chunks/chunk-BQ46OLDY.js';import'../../_chunks/chunk-XLFVCH5I.js';import'../../_chunks/chunk-47BHPSSP.js';import'../../_chunks/chunk-HZYY6NMO.js';import'../../_chunks/chunk-7UCD3KUZ.js';import'../../_chunks/chunk-TQIWHM5B.js';import'../../_chunks/chunk-RK4UGNRY.js';import'../../_chunks/chunk-7VUU5WEU.js';import'../../_chunks/chunk-XEYCTDD3.js';import'../../_chunks/chunk-AXJZMO7Q.js';import'../../_chunks/chunk-U5M6TIFS.js';import'../../_chunks/chunk-MSEBSRXG.js';import'../../_chunks/chunk-LECTWR74.js';import'../../_chunks/chunk-MTACYUU3.js';import'../../_chunks/chunk-DN33IHNY.js';import'../../_chunks/chunk-IOXXKK24.js';import'../../_chunks/chunk-ZGY3RIKJ.js';import'../../_chunks/chunk-NDRHRXAO.js';import'../../_chunks/chunk-NHAXRGPW.js';import'../../_chunks/chunk-WNQ3ONG2.js';import'../../_chunks/chunk-RTKA6K5L.js';import'../../_chunks/chunk-UGX2ZY27.js';import'../../_chunks/chunk-PNRVZNL7.js';import'../../_chunks/chunk-CIB4WTBC.js';import'../../_chunks/chunk-CNYQ4OI5.js';import'../../_chunks/chunk-4NLQZJVN.js';import'../../_chunks/chunk-OSXKJYUX.js';export{Db as CUSTOM_VIEW,yb as DATE_COLUMN_CONFIG,Cb as DEFAULT_VIEW,Eb as DEFAULT_VIEW_OPTIONS,tb as DIALOG_HEIGHT,sb as DIALOG_WIDTH,xb as INDEX_COLUMN_CONFIG,ub as MAX_CUSTOM_VIEWS,vb as TEMPLATE_NAME_MAX_LENGTH,wb as TableViewColumnNames}from'../../_chunks/chunk-EP5VELEJ.js';import'../../_chunks/chunk-XTJZTHR6.js';import'../../_chunks/chunk-LS57WE6K.js';
|