@spteck/react-controls-v2 2.0.6 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -48,4 +48,5 @@ export * from './components/userCard';
48
48
  export * from './components/StackedUsers';
49
49
  export * from './components/ListItemActivityMessage';
50
50
  export * from './components/appDashboard';
51
+ export * from './models/IAppCardContainer';
51
52
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGjF,OAAO,EACL,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAGjB,cAAc,SAAS,CAAC;AAGxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAIxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,cAAc,0BAA0B,CAAC;AAIzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,cAAc,iCAAiC,CAAC;AAGhD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sCAAsC,CAAC;AAGrD,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGjF,OAAO,EACL,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAGjB,cAAc,SAAS,CAAC;AAGxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAIxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,cAAc,0BAA0B,CAAC;AAIzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,cAAc,iCAAiC,CAAC;AAGhD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sCAAsC,CAAC;AAGrD,cAAc,2BAA2B,CAAC;AAG1C,cAAc,4BAA4B,CAAC"}
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@
14
14
  &::-webkit-scrollbar-thumb:hover {
15
15
  background: ${p.tokens.colorBrandBackgroundHover};
16
16
  }
17
- `,xn=L.forwardRef((e,t)=>{const{columns:n,items:r,enableSorting:o=!1,enableResizing:i=!1,selectionMode:a="none",onSelectionChange:s,defaultSelectedItems:l=[],defaultSortState:u,onSortChange:d,columnSizingOptions:h,resizableColumnsOptions:m,noItemsMessage:f,isLoadingData:g,isLoadingDataMessage:y,dataGridBodyClassName:v,dataGridBodyStyles:b,refreshData:x,enableInfiniteScroll:C,onLoadMore:w,infiniteScrollPageSize:S,hasNextPage:P,isLoadingMore:E,autoShowLastPage:A=!0,virtualizedHeight:I=600,virtualizedItemSize:_=44,startIndex:T,onRowClick:j}=e,M=L.useMemo(()=>n.map(e=>p.createTableColumn({columnId:e.column,renderHeaderCell:()=>c.jsx(p.Body1Strong,{children:e.header}),renderCell:t=>c.jsx(p.TableCellLayout,{media:e.media?e.media(t):void 0,className:null==e?void 0:e.className,style:null==e?void 0:e.style,children:e.onRender?e.onRender(t):String(t[e.column]??"")}),compare:e.order})),[n]),N=L.useCallback(e=>r.findIndex(t=>t===e),[r]),[D,V]=L.useState(new Set(l.map(e=>N(e)))),[O,B]=L.useState(0);L.useEffect(()=>{l.length&&V(new Set(l.map(e=>N(e))))},[l,r,N]),L.useEffect(()=>{x&&V(new Set)},[x]);const[R,z]=L.useState(null),H=L.useMemo(()=>new Map(r.map((e,t)=>[e,t])),[r]);L.useEffect(()=>{"row"===a&&null!=R&&R>=r.length&&z(null)},[r,R,a]),L.useEffect(()=>{x&&"row"===a&&z(null)},[x,a]);const F=L.useRef(null),W=L.useRef(r.length),$=L.useRef(!1),U=L.useRef(!1),J=L.useRef(!1);L.useImperativeHandle(t,()=>({scrollToIndex:(e,t="auto")=>{const n=F.current;n&&"scrollToItem"in n&&n.scrollToItem(Math.max(0,e),t)},resetGrid:()=>{B(e=>e+1),W.current=0,$.current=!1,U.current=!1,J.current=!1,G.current=-1,V(new Set),z(null)},getSelectedRow:()=>null!==R&&R<r.length?{item:r[R],index:R}:null,setSelectedRow:e=>{const t=r.findIndex(t=>t===e);-1!==t&&(z(t),null==s||s([e]))}})),L.useEffect(()=>{if(!$.current&&"number"==typeof T&&F.current){const e=F.current;"scrollToItem"in e&&e.scrollToItem(Math.min(T,Math.max(r.length-1,0)),"start"),$.current=!0}},[T,r.length]),L.useEffect(()=>{const e=W.current,t=r.length,n=t>e;if(W.current=t,!A||!n||0===e)return;const o=F.current;o&&"scrollToItem"in o&&o.scrollToItem(Math.max(t-1,0),"end")},[r.length,A]);const G=L.useRef(-1),q=L.useCallback(({visibleStopIndex:e})=>{if(!C||!w)return;if(E||J.current)return;if(!U.current)return void(U.current=!0);const t=S??20;if(r.length<t)return;const n=Math.max(5,Math.ceil(t/5));e>=r.length-n&&P&&G.current!==r.length&&(G.current=r.length,J.current=!0,w())},[C,w,P,E,r.length,S]);L.useEffect(()=>{J.current&&r.length>G.current&&(J.current=!1)},[r.length]);const X=L.useMemo(()=>({overflowX:"auto",overflowY:"hidden",position:"relative"}),[]);return c.jsxs("div",{style:X,className:bn,children:[g&&c.jsx("div",{style:{display:"flex",gap:8,alignItems:"center",padding:8},children:L.isValidElement(y)?y:c.jsxs(p.Spinner,{size:"extra-tiny",children:[" ",y??"Loading data..."," "]})}),!g&&r.length?c.jsxs(k.DataGrid,{items:r,columns:M,sortable:o,onSortChange:o?(e,t)=>{d&&d(t)}:void 0,selectionMode:"none"===a||"row"===a?void 0:"multiple"===a?"multiselect":"single"===a?"single":void 0,selectedItems:D,onSelectionChange:(e,t)=>{const n=new Set;t.selectedItems.forEach(e=>{const t=Number(e);isNaN(t)||n.add(t)}),V(n),s&&s(Array.from(n).map(e=>r[e]))},defaultSortState:u,resizableColumns:i,columnSizingOptions:h,resizableColumnsOptions:m,focusMode:"cell",className:v,style:b,children:[c.jsx(k.DataGridHeader,{children:c.jsx(k.DataGridRow,{children:({renderHeaderCell:e})=>c.jsx(k.DataGridHeaderCell,{children:e()})})}),c.jsx("div",{className:p.mergeClasses(bn),children:c.jsx(k.DataGridBody,{itemSize:_,height:I,width:"100%",listProps:{onItemsRendered:q},children:(e,t)=>(()=>{const n=e.item,o=H.get(n)??r.indexOf(n),i="row"===a,l=i&&R===o;return c.jsx(k.DataGridRow,{style:{...t,cursor:i?"pointer":void 0,background:l?p.tokens.colorSubtleBackgroundSelected:void 0},onClick:e=>{z(o),null==s||s([n]),null==j||j(n,o)},"aria-selected":l||void 0,children:({renderCell:e})=>c.jsx(k.DataGridCell,{children:e(n)})})})()})})]},O):g||r.length?null:c.jsx("div",{children:f})]})});xn.displayName="DataGridV2";const Cn=p.makeStyles({dialog:{width:"100%",height:"100%",overflow:"hidden",maxHeight:"600px",padding:0},dialogBody:{height:"calc(100% - 200px)"}}),wn=e=>{const{isOpen:t,dialogTitle:n,dialogActions:r,children:o,maxWidth:i,className:a,minHeight:s,minWidth:l,maxHeight:u}=e,d=Cn();return t?c.jsx(p.Dialog,{open:t,modalType:"modal",children:c.jsxs(p.DialogSurface,{className:p.mergeClasses(d.dialog,a),style:{maxWidth:i,minWidth:l??200,minHeight:s??200,height:"fit-content",maxHeight:u??""},children:[c.jsx(p.DialogTitle,{children:n}),c.jsx(p.DialogBody,{className:d.dialogBody,children:c.jsx(p.DialogContent,{children:o})}),c.jsx(p.DialogActions,{fluid:!0,position:"end",children:r})]})}):c.jsx(c.Fragment,{})},Sn=()=>({closeButton:g.css({marginLeft:"auto",position:"absolute",top:"10px",right:"10px",zIndex:99999}),divider:g.css({width:"100%",height:"1px",backgroundColor:p.tokens.colorNeutralStroke1,marginTop:"6px"}),renderHeaderContent:g.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"stretch",width:"100%"}),renderHeaderHeader:g.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",padding:"10px",gap:"20px"}),renderHeaderFooter:g.css({display:"flex",flexDirection:"row",justifyContent:"flex-start",padding:"20px",gap:"20px"}),renderHeaderBody:g.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",padding:"20px",gap:"20px"}),renderHeaderTitleContainer:g.css({display:"flex",flexDirection:"row",justifyContent:"flex-start",alignContent:"center",alignItems:"center",width:"100%"}),renderHeaderTitle:g.css({display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",textAlign:"start",textOverflow:"ellipsis",paddingTop:0,wordBreak:"break-word"}),renderHeaderDescription:g.css({display:"-webkit-box",WebkitLineClamp:"4",WebkitBoxOrient:"vertical",textAlign:"start",textOverflow:"ellipsis",wordBreak:"break-word"}),dialogTitleAndDescriptionContainer:g.css({display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",paddingLeft:"10px",paddingRight:"20px",width:"100%"})}),kn=()=>u.useMemo(()=>({container:g.css({display:"flex",alignItems:"center",justifyContent:"center",minHeight:"200px",textAlign:"center",backgroundColor:p.tokens.colorNeutralBackground1,border:`1px solid ${p.tokens.colorNeutralStroke2}`,borderRadius:p.tokens.borderRadiusLarge,padding:`${p.tokens.spacingVerticalXXL} ${p.tokens.spacingHorizontalXXL}`,boxShadow:p.tokens.shadow4,maxWidth:"500px",margin:"20px auto"}),icon:g.css({fontSize:"48px",color:p.tokens.colorPaletteRedForeground1,animation:"pulse 2s infinite","@keyframes pulse":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.05)"},"100%":{transform:"scale(1)"}}}),title:g.css({color:p.tokens.colorNeutralForeground1,fontWeight:p.tokens.fontWeightSemibold,textAlign:"center"}),message:g.css({color:p.tokens.colorNeutralForeground2,textAlign:"center",lineHeight:p.tokens.lineHeightBase400})}),[]),Pn=p.makeStyles({root:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",...p.shorthands.padding("10px"),gap:"10px"},iconClass:{width:"32px",height:"32px"},errorContainer:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",gap:"10px",...p.shorthands.padding("10px"),backgroundColor:p.tokens.colorStatusDangerBackground1},errorIcon:{height:"100%"}}),En=e=>{const{messageType:t,children:n,message:r}=e,o=Pn(),[i,a]=L.useState(null),s=L.useCallback(()=>c.jsx(c.Fragment,{children:c.jsxs("div",{className:o.errorContainer,children:[c.jsx("div",{className:o.errorIcon,children:c.jsx(x.Icon,{icon:"fluent:error-circle-12-regular",width:"32",height:"32",color:p.tokens.colorStatusDangerForeground1})}),c.jsx(p.Body1,{children:r})]})}),[r,o.errorContainer,o.errorIcon]);return L.useEffect(()=>{switch(t){case U.SUCCESS:a(c.jsx(v.CheckmarkCircle32Regular,{primaryFill:p.tokens.colorStatusSuccessForeground1}));break;case U.INFO:a(c.jsx(v.Info32Regular,{primaryFill:p.tokens.colorStatusWarningForeground1}))}},[t]),t===U.ERROR?c.jsx(s,{}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:o.root,children:[i,c.jsx(p.Body1Strong,{children:r}),n]})})},An=({item:e,onSelectedItem:t})=>p.useIsOverflowItemVisible(e.id)?null:c.jsx(p.MenuItem,{icon:e.icon,onClick:()=>t(e.id),children:c.jsx("div",{children:e.name})},e.id),In=({items:e,onSelectedItem:t,theme:n})=>{const{ref:r,overflowCount:o,isOverflowing:i}=p.useOverflowMenu(),a=L.useMemo(()=>v.bundleIcon(v.MoreHorizontalFilled,v.MoreHorizontalRegular),[]);return i?c.jsx(p.IdPrefixProvider,{value:"menu-over-",children:c.jsx(p.FluentProvider,{theme:n,children:c.jsxs(p.Menu,{children:[c.jsx(p.MenuTrigger,{disableButtonEnhancement:!0,children:c.jsx(p.MenuButton,{appearance:"transparent",ref:r,icon:c.jsx(a,{}),"aria-label":`${o} more options`,role:"button"})}),c.jsx(p.MenuPopover,{children:c.jsx(p.MenuList,{children:e.map(e=>c.jsx(An,{item:e,onSelectedItem:t},e.id))})})]})})}):null},_n=({id:e,children:t})=>p.useIsOverflowItemVisible(e)?null:c.jsx(p.MenuItem,{children:t}),Tn=e=>({videoPlayerContainer:g.css({position:"relative",width:e.width,height:e.height}),reactPlayer:g.css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}),playButton:g.css({position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",fontSize:"64px",cursor:"pointer",zIndex:1,userSelect:"none",color:"white",border:"none",borderRadius:"50%",padding:"10px 20px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.7)"}})});var jn=(e=>(e[e.SharePoint=0]="SharePoint",e[e.Teams=1]="Teams",e[e.TeamsDark=2]="TeamsDark",e[e.TeamsHighContrast=3]="TeamsHighContrast",e))(jn||{});const Mn=e=>new A.HostConfig({fontFamily:e.fontFamilyBase,separator:{lineThickness:1,lineColor:e.colorNeutralStroke2},containerStyles:{default:{backgroundColor:e.colorNeutralBackground1,foregroundColors:{default:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},dark:{default:e.colorNeutralForeground3,subtle:e.colorNeutralForeground4},light:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},accent:{default:e.colorBrandForeground1,subtle:e.colorBrandForeground2},attention:{default:e.colorPaletteRedBackground3,subtle:e.colorPaletteRedBackground2},good:{default:e.colorPaletteGreenBackground3,subtle:e.colorPaletteGreenBackground2},warning:{default:e.colorPaletteYellowBackground3,subtle:e.colorPaletteYellowBackground2}}},emphasis:{backgroundColor:e.colorNeutralBackground3,foregroundColors:{default:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},dark:{default:e.colorNeutralForeground3,subtle:e.colorNeutralForeground4},light:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},accent:{default:e.colorBrandForeground1,subtle:e.colorBrandForeground2},attention:{default:e.colorPaletteRedBackground3,subtle:e.colorPaletteRedBackground2},good:{default:e.colorPaletteGreenBackground3,subtle:e.colorPaletteGreenBackground2},warning:{default:e.colorPaletteYellowBackground3,subtle:e.colorPaletteYellowBackground2}}}},inputs:{label:{requiredInputs:{weight:"bold"},optionalInputs:{weight:"bold"}},errorMessage:{color:"attention",weight:"bold"}},actions:{buttonSpacing:10,actionAlignment:"right"}}),Nn="fluentUITheme",Dn=e=>{let t=e.hostCapabilities.getCustomProperty(Nn);return t||(t=p.webLightTheme),t},Vn=(e,t)=>{let n;switch(e){case jn.SharePoint:n={theme:t,hostConfig:Mn(t)};break;case jn.Teams:n={theme:p.teamsLightTheme,hostConfig:Mn(p.teamsLightTheme)};break;case jn.TeamsDark:n={theme:p.teamsDarkTheme,hostConfig:Mn(p.teamsDarkTheme)};break;case jn.TeamsHighContrast:n={theme:p.teamsHighContrastTheme,hostConfig:Mn(p.teamsHighContrastTheme)};break;default:n={theme:t,hostConfig:Mn(t)}}var r,o;return n.hostConfig.cssClassNamePrefix=`ach${Math.random().toString().replace(/\./g,"")}`,r=n.hostConfig,o=n.theme,r.hostCapabilities.setCustomProperty(Nn,o),((e,t)=>{const n=I.create();n.put(`.${t}-ac-container:focus`,{outline:"none !important"}),n.put(`.${t}-ac-adaptiveCard:focus`,{outline:"none !important"}),n.put(`.${t}-ac-pushButton`,{overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",verticalAlign:"middle",cursor:"pointer",fontFamily:"inherit",fontSize:"14px",fontWeight:"600",padding:"4px 10px 5px 10px",WebkitUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",userSelect:"none",height:"32px",borderRadius:"2px",border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground1,color:e.colorNeutralForeground1}),n.put(`.${t}-ac-pushButton:hover`,{border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground2,color:e.colorNeutralForeground2}),n.put(`.${t}-ac-pushButton:active`,{border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground3,color:e.colorNeutralForeground3}),n.put(`.${t}-ac-pushButton-disabled`,{overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",verticalAlign:"middle",cursor:"pointer",fontFamily:"inherit",fontSize:"14px",fontWeight:"600",padding:"4px 10px 5px 10px",WebkitUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",userSelect:"none",height:"32px",borderRadius:"2px",border:`1px solid ${e.colorNeutralStrokeDisabled}`,backgroundColor:e.colorNeutralBackgroundDisabled,color:e.colorNeutralForegroundDisabled}),n.put(`.${t}-ac-ctrl-overlay`,{fontFamily:e.fontFamilyBase,position:"absolute",left:"0",top:"0",zIndex:"10000"}),n.put(`.${t}-ac-ctrl`,{boxSizing:"border-box",fontSize:"14px",fontWeight:"normal"}),n.put(`.${t}-ac-ctrl-popup-container`,{backgroundColor:e.colorNeutralBackground1,position:"absolute",overflowY:"auto",boxShadow:"0px 3.2px 7.2px rgba(0,0,0,0.13), 0px 0.6px 1.8px rgba(0,0,0,0.11)",borderRadius:"2px"}),n.put(`.${t}-ac-ctrl-popup-container:focus`,{outline:"0"}),n.put(`.${t}-ac-ctrl-slide`,{animationDuration:"0.5s",animationTimingFunction:"cubic-bezier(0.1, 0.9, 0.2, 1)"}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideTopToBottom`,{animationName:"fadeIn, slideTopToBottom"}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideBottomToTop`,{animationName:"fadeIn, slideBottomToTop"}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideLeftToRight`,{animationName:"fadeIn, slideLeftToRight"}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideRightToLeft`,{animationName:"fadeIn, slideRightToLeft"}),n.put(`.${t}-ac-ctrl-dropdown-item`,{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",padding:"0px 12px",lineHeight:"30px",cursor:"pointer",backgroundColor:e.colorNeutralBackground1,color:e.colorNeutralForeground1}),n.put(`.${t}-ac-ctrl-dropdown-item:hover`,{backgroundColor:e.colorNeutralBackground2,color:e.colorNeutralForeground2}),n.put(`.${t}-ac-ctrl-dropdown-item:focus`,{outline:"0",backgroundColor:e.colorNeutralBackground3,color:e.colorNeutralForeground3}),n.put(`.${t}-ac-ctrl-dropdown-item-disabled`,{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",padding:"0px 12px",lineHeight:"30px",cursor:"pointer",backgroundColor:e.colorNeutralBackgroundDisabled,color:e.colorNeutralForegroundDisabled})})(n.theme,n.hostConfig.cssClassNamePrefix),n};var On="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Bn={},Rn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ActionRole=e.CarouselInteractionEvent=e.LogLevel=e.RefreshMode=e.TypeErrorType=e.ContainerFitStatus=e.ValidationEvent=e.ValidationPhase=e.InputLabelPosition=e.InputTextStyle=e.ActionIconPlacement=e.FillMode=e.Orientation=e.ShowCardActionMode=e.ImageStyle=e.ActionAlignment=e.VerticalAlignment=e.HorizontalAlignment=e.TextColor=e.Spacing=e.FontType=e.TextWeight=e.InputStyle=e.TextSize=e.SizeUnit=e.ImageSetPresentationStyle=e.ImageSize=e.Size=e.ActionMode=e.ActionStyle=e.ContainerStyle=void 0;var t=function(){function e(){}return e.Default="default",e.Emphasis="emphasis",e.Accent="accent",e.Good="good",e.Attention="attention",e.Warning="warning",e}();e.ContainerStyle=t;var n=function(){function e(){}return e.Default="default",e.Positive="positive",e.Destructive="destructive",e}();e.ActionStyle=n;var r,o,i,a,s,l,c,u,d,p,h,m,f,g,y,v,b,x,C,w,S,k,P,E,A,I,_,T,j=function(){function e(){}return e.Primary="primary",e.Secondary="secondary",e}();e.ActionMode=j,(r=e.Size||(e.Size={}))[r.Auto=0]="Auto",r[r.Stretch=1]="Stretch",r[r.Small=2]="Small",r[r.Medium=3]="Medium",r[r.Large=4]="Large",(o=e.ImageSize||(e.ImageSize={}))[o.Small=0]="Small",o[o.Medium=1]="Medium",o[o.Large=2]="Large",(i=e.ImageSetPresentationStyle||(e.ImageSetPresentationStyle={}))[i.Default=0]="Default",i[i.Stacked=1]="Stacked",(a=e.SizeUnit||(e.SizeUnit={}))[a.Weight=0]="Weight",a[a.Pixel=1]="Pixel",(s=e.TextSize||(e.TextSize={}))[s.Small=0]="Small",s[s.Default=1]="Default",s[s.Medium=2]="Medium",s[s.Large=3]="Large",s[s.ExtraLarge=4]="ExtraLarge",(l=e.InputStyle||(e.InputStyle={}))[l.RevealOnHover=0]="RevealOnHover",l[l.Default=1]="Default",(c=e.TextWeight||(e.TextWeight={}))[c.Lighter=0]="Lighter",c[c.Default=1]="Default",c[c.Bolder=2]="Bolder",(u=e.FontType||(e.FontType={}))[u.Default=0]="Default",u[u.Monospace=1]="Monospace",(d=e.Spacing||(e.Spacing={}))[d.None=0]="None",d[d.Small=1]="Small",d[d.Default=2]="Default",d[d.Medium=3]="Medium",d[d.Large=4]="Large",d[d.ExtraLarge=5]="ExtraLarge",d[d.Padding=6]="Padding",(p=e.TextColor||(e.TextColor={}))[p.Default=0]="Default",p[p.Dark=1]="Dark",p[p.Light=2]="Light",p[p.Accent=3]="Accent",p[p.Good=4]="Good",p[p.Warning=5]="Warning",p[p.Attention=6]="Attention",(h=e.HorizontalAlignment||(e.HorizontalAlignment={}))[h.Left=0]="Left",h[h.Center=1]="Center",h[h.Right=2]="Right",(m=e.VerticalAlignment||(e.VerticalAlignment={}))[m.Top=0]="Top",m[m.Center=1]="Center",m[m.Bottom=2]="Bottom",(f=e.ActionAlignment||(e.ActionAlignment={}))[f.Left=0]="Left",f[f.Center=1]="Center",f[f.Right=2]="Right",f[f.Stretch=3]="Stretch",(g=e.ImageStyle||(e.ImageStyle={}))[g.Default=0]="Default",g[g.Person=1]="Person",(y=e.ShowCardActionMode||(e.ShowCardActionMode={}))[y.Inline=0]="Inline",y[y.Popup=1]="Popup",(v=e.Orientation||(e.Orientation={}))[v.Horizontal=0]="Horizontal",v[v.Vertical=1]="Vertical",(b=e.FillMode||(e.FillMode={}))[b.Cover=0]="Cover",b[b.RepeatHorizontally=1]="RepeatHorizontally",b[b.RepeatVertically=2]="RepeatVertically",b[b.Repeat=3]="Repeat",(x=e.ActionIconPlacement||(e.ActionIconPlacement={}))[x.LeftOfTitle=0]="LeftOfTitle",x[x.AboveTitle=1]="AboveTitle",(C=e.InputTextStyle||(e.InputTextStyle={}))[C.Text=0]="Text",C[C.Tel=1]="Tel",C[C.Url=2]="Url",C[C.Email=3]="Email",C[C.Password=4]="Password",(w=e.InputLabelPosition||(e.InputLabelPosition={}))[w.Inline=0]="Inline",w[w.Above=1]="Above",(S=e.ValidationPhase||(e.ValidationPhase={}))[S.Parse=0]="Parse",S[S.ToJSON=1]="ToJSON",S[S.Validation=2]="Validation",(k=e.ValidationEvent||(e.ValidationEvent={}))[k.Hint=0]="Hint",k[k.ActionTypeNotAllowed=1]="ActionTypeNotAllowed",k[k.CollectionCantBeEmpty=2]="CollectionCantBeEmpty",k[k.Deprecated=3]="Deprecated",k[k.ElementTypeNotAllowed=4]="ElementTypeNotAllowed",k[k.InteractivityNotAllowed=5]="InteractivityNotAllowed",k[k.InvalidPropertyValue=6]="InvalidPropertyValue",k[k.MissingCardType=7]="MissingCardType",k[k.PropertyCantBeNull=8]="PropertyCantBeNull",k[k.TooManyActions=9]="TooManyActions",k[k.UnknownActionType=10]="UnknownActionType",k[k.UnknownElementType=11]="UnknownElementType",k[k.UnsupportedCardVersion=12]="UnsupportedCardVersion",k[k.DuplicateId=13]="DuplicateId",k[k.UnsupportedProperty=14]="UnsupportedProperty",k[k.RequiredInputsShouldHaveLabel=15]="RequiredInputsShouldHaveLabel",k[k.RequiredInputsShouldHaveErrorMessage=16]="RequiredInputsShouldHaveErrorMessage",k[k.Other=17]="Other",(P=e.ContainerFitStatus||(e.ContainerFitStatus={}))[P.FullyInContainer=0]="FullyInContainer",P[P.Overflowing=1]="Overflowing",P[P.FullyOutOfContainer=2]="FullyOutOfContainer",(E=e.TypeErrorType||(e.TypeErrorType={}))[E.UnknownType=0]="UnknownType",E[E.ForbiddenType=1]="ForbiddenType",(A=e.RefreshMode||(e.RefreshMode={}))[A.Disabled=0]="Disabled",A[A.Manual=1]="Manual",A[A.Automatic=2]="Automatic",(I=e.LogLevel||(e.LogLevel={}))[I.Info=0]="Info",I[I.Warning=1]="Warning",I[I.Error=2]="Error",(_=e.CarouselInteractionEvent||(e.CarouselInteractionEvent={}))[_.NavigationNext=0]="NavigationNext",_[_.NavigationPrevious=1]="NavigationPrevious",_[_.Pagination=2]="Pagination",_[_.Autoplay=3]="Autoplay",(T=e.ActionRole||(e.ActionRole={}))[T.Button=0]="Button",T[T.Link=1]="Link",T[T.Tab=2]="Tab",T[T.Menu=3]="Menu",T[T.MenuItem=4]="MenuItem"}(Rn);var zn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UUID=e.SizeAndUnit=e.PaddingDefinition=e.SpacingDefinition=e.StringWithSubstitutions=e.ContentTypes=e.GlobalSettings=void 0;var t=Rn,n=function(){function e(){}return e.useAdvancedTextBlockTruncation=!0,e.useAdvancedCardBottomTruncation=!1,e.useMarkdownInRadioButtonAndCheckbox=!0,e.allowMarkForTextHighlighting=!1,e.alwaysBleedSeparators=!1,e.enableFullJsonRoundTrip=!1,e.displayInputValidationErrors=!0,e.allowPreProcessingPropertyValues=!1,e.setTabIndexAtCardRoot=!0,e.enableFallback=!0,e.useWebkitLineClamp=!0,e.allowMoreThanMaxActionsInOverflowMenu=!1,e.removePaddingFromContainersWithBackgroundImage=!1,e.resetInputsDirtyStateAfterActionExecution=!0,e.applets={logEnabled:!0,logLevel:t.LogLevel.Error,maximumRetryAttempts:3,defaultTimeBetweenRetryAttempts:3e3,authPromptWidth:400,authPromptHeight:600,refresh:{mode:t.RefreshMode.Manual,timeBetweenAutomaticRefreshes:3e3,maximumConsecutiveAutomaticRefreshes:3,allowManualRefreshesAfterAutomaticRefreshes:!0}},e}();e.GlobalSettings=n,e.ContentTypes={applicationJson:"application/json",applicationXWwwFormUrlencoded:"application/x-www-form-urlencoded"};var r=function(){function t(){this._isProcessed=!1}return t.prototype.getReferencedInputs=function(e,t){if(!t)throw new Error("The referencedInputs parameter cannot be null.");if(this._original)for(var n=0,r=e;n<r.length;n++){var o=r[n];null!=new RegExp("\\{{2}("+o.id+").value\\}{2}","gi").exec(this._original)&&o.id&&(t[o.id]=o)}},t.prototype.substituteInputValues=function(t,n){if(this._processed=this._original,this._original)for(var r=/\{{2}([a-z0-9_$@]+).value\}{2}/gi,o=void 0;null!==(o=r.exec(this._original))&&this._processed;)for(var i=0,a=Object.keys(t);i<a.length;i++){var s=a[i];if(s.toLowerCase()===o[1].toLowerCase()){var l=t[s],c="";l.value&&(c=l.value),n===e.ContentTypes.applicationJson?c=(c=JSON.stringify(c)).slice(1,-1):n===e.ContentTypes.applicationXWwwFormUrlencoded&&(c=encodeURIComponent(c)),this._processed=this._processed.replace(o[0],c);break}}this._isProcessed=!0},t.prototype.getOriginal=function(){return this._original},t.prototype.get=function(){return this._isProcessed?this._processed:this._original},t.prototype.set=function(e){this._original=e,this._isProcessed=!1},t}();e.StringWithSubstitutions=r;var o=function(){return function(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),this.left=0,this.top=0,this.right=0,this.bottom=0,this.top=e,this.right=t,this.bottom=n,this.left=r}}();e.SpacingDefinition=o;var i=function(){return function(e,n,r,o){void 0===e&&(e=t.Spacing.None),void 0===n&&(n=t.Spacing.None),void 0===r&&(r=t.Spacing.None),void 0===o&&(o=t.Spacing.None),this.top=t.Spacing.None,this.right=t.Spacing.None,this.bottom=t.Spacing.None,this.left=t.Spacing.None,this.top=e,this.right=n,this.bottom=r,this.left=o}}();e.PaddingDefinition=i;var a=function(){function e(e,t){this.physicalSize=e,this.unit=t}return e.parse=function(n,r){void 0===r&&(r=!1);var o=new e(0,t.SizeUnit.Weight);if("number"==typeof n)return o.physicalSize=n,o;if("string"==typeof n){var i=/^([0-9]+)(px|\*)?$/g.exec(n),a=r?3:2;if(i&&i.length>=a)return o.physicalSize=parseInt(i[1]),3===i.length&&"px"===i[2]&&(o.unit=t.SizeUnit.Pixel),o}throw new Error("Invalid size: "+n)},e}();e.SizeAndUnit=a;
17
+ `,xn=L.forwardRef((e,t)=>{const{columns:n,items:r,enableSorting:o=!1,enableResizing:i=!1,selectionMode:a="none",onSelectionChange:s,defaultSelectedItems:l=[],defaultSortState:u,onSortChange:d,columnSizingOptions:h,resizableColumnsOptions:m,noItemsMessage:f,isLoadingData:g,isLoadingDataMessage:y,dataGridBodyClassName:v,dataGridBodyStyles:b,refreshData:x,enableInfiniteScroll:C,onLoadMore:w,infiniteScrollPageSize:S,hasNextPage:P,isLoadingMore:E,autoShowLastPage:A=!0,virtualizedHeight:I=600,virtualizedItemSize:_=44,startIndex:T,onRowClick:j}=e,M=L.useMemo(()=>n.map(e=>p.createTableColumn({columnId:e.column,renderHeaderCell:()=>c.jsx(p.Body1Strong,{children:e.header}),renderCell:t=>c.jsx(p.TableCellLayout,{media:e.media?e.media(t):void 0,className:null==e?void 0:e.className,style:null==e?void 0:e.style,children:e.onRender?e.onRender(t):String(t[e.column]??"")}),compare:e.order})),[n]),N=L.useCallback(e=>r.findIndex(t=>t===e),[r]),[D,V]=L.useState(new Set(l.map(e=>N(e)))),[O,B]=L.useState(0);L.useEffect(()=>{l.length&&V(new Set(l.map(e=>N(e))))},[l,r,N]),L.useEffect(()=>{x&&V(new Set)},[x]);const[R,z]=L.useState(null),H=L.useMemo(()=>new Map(r.map((e,t)=>[e,t])),[r]);L.useEffect(()=>{"row"===a&&null!=R&&R>=r.length&&z(null)},[r,R,a]),L.useEffect(()=>{x&&"row"===a&&z(null)},[x,a]);const F=L.useRef(null),W=L.useRef(r.length),$=L.useRef(!1),U=L.useRef(!1),J=L.useRef(!1);L.useImperativeHandle(t,()=>({scrollToIndex:(e,t="auto")=>{const n=F.current;n&&"scrollToItem"in n&&n.scrollToItem(Math.max(0,e),t)},resetGrid:()=>{B(e=>e+1),W.current=0,$.current=!1,U.current=!1,J.current=!1,G.current=-1,V(new Set),z(null)},getSelectedRow:()=>null!==R&&R<r.length?{item:r[R],index:R}:null,setSelectedRow:e=>{const t=r.findIndex(t=>t===e);-1!==t&&(z(t),null==s||s([e]))}})),L.useEffect(()=>{if(!$.current&&"number"==typeof T&&F.current){const e=F.current;"scrollToItem"in e&&e.scrollToItem(Math.min(T,Math.max(r.length-1,0)),"start"),$.current=!0}},[T,r.length]),L.useEffect(()=>{const e=W.current,t=r.length,n=t>e;if(W.current=t,!A||!n||0===e)return;const o=F.current;o&&"scrollToItem"in o&&o.scrollToItem(Math.max(t-1,0),"end")},[r.length,A]);const G=L.useRef(-1),q=L.useCallback(({visibleStopIndex:e})=>{if(!C||!w)return;if(E||J.current)return;if(!U.current)return void(U.current=!0);const t=S??20;if(r.length<t)return;const n=Math.max(5,Math.ceil(t/5));e>=r.length-n&&P&&G.current!==r.length&&(G.current=r.length,J.current=!0,w())},[C,w,P,E,r.length,S]);L.useEffect(()=>{J.current&&r.length>G.current&&(J.current=!1)},[r.length]);const X=L.useMemo(()=>({overflowX:"auto",overflowY:"hidden",position:"relative"}),[]);return c.jsxs("div",{style:X,className:bn,children:[g&&c.jsx("div",{style:{display:"flex",gap:8,alignItems:"center",padding:8},children:L.isValidElement(y)?y:c.jsxs(p.Spinner,{size:"extra-tiny",children:[" ",y??"Loading data..."," "]})}),!g&&r.length?c.jsxs(k.DataGrid,{items:r,columns:M,sortable:o,onSortChange:o?(e,t)=>{d&&d(t)}:void 0,selectionMode:"none"===a||"row"===a?void 0:"multiple"===a?"multiselect":"single"===a?"single":void 0,selectedItems:D,onSelectionChange:(e,t)=>{const n=new Set;t.selectedItems.forEach(e=>{const t=Number(e);isNaN(t)||n.add(t)}),V(n),s&&s(Array.from(n).map(e=>r[e]))},defaultSortState:u,resizableColumns:i,columnSizingOptions:h,resizableColumnsOptions:m,focusMode:"cell",className:v,style:b,children:[c.jsx(k.DataGridHeader,{children:c.jsx(k.DataGridRow,{children:({renderHeaderCell:e})=>c.jsx(k.DataGridHeaderCell,{children:e()})})}),c.jsx(k.DataGridBody,{itemSize:_,height:I,width:"100%",listProps:{onItemsRendered:q},children:(e,t)=>(()=>{const n=e.item,o=H.get(n)??r.indexOf(n),i="row"===a,l=i&&R===o;return c.jsx(k.DataGridRow,{style:{...t,cursor:i?"pointer":void 0,background:l?p.tokens.colorSubtleBackgroundSelected:void 0},onClick:e=>{z(o),null==s||s([n]),null==j||j(n,o)},"aria-selected":l||void 0,children:({renderCell:e})=>c.jsx(k.DataGridCell,{children:e(n)})})})()})]},O):g||r.length?null:c.jsx("div",{children:f})]})});xn.displayName="DataGridV2";const Cn=p.makeStyles({dialog:{width:"100%",height:"100%",overflow:"hidden",maxHeight:"600px",padding:0},dialogBody:{height:"calc(100% - 200px)"}}),wn=e=>{const{isOpen:t,dialogTitle:n,dialogActions:r,children:o,maxWidth:i,className:a,minHeight:s,minWidth:l,maxHeight:u}=e,d=Cn();return t?c.jsx(p.Dialog,{open:t,modalType:"modal",children:c.jsxs(p.DialogSurface,{className:p.mergeClasses(d.dialog,a),style:{maxWidth:i,minWidth:l??200,minHeight:s??200,height:"fit-content",maxHeight:u??""},children:[c.jsx(p.DialogTitle,{children:n}),c.jsx(p.DialogBody,{className:d.dialogBody,children:c.jsx(p.DialogContent,{children:o})}),c.jsx(p.DialogActions,{fluid:!0,position:"end",children:r})]})}):c.jsx(c.Fragment,{})},Sn=()=>({closeButton:g.css({marginLeft:"auto",position:"absolute",top:"10px",right:"10px",zIndex:99999}),divider:g.css({width:"100%",height:"1px",backgroundColor:p.tokens.colorNeutralStroke1,marginTop:"6px"}),renderHeaderContent:g.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"stretch",width:"100%"}),renderHeaderHeader:g.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",padding:"10px",gap:"20px"}),renderHeaderFooter:g.css({display:"flex",flexDirection:"row",justifyContent:"flex-start",padding:"20px",gap:"20px"}),renderHeaderBody:g.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",padding:"20px",gap:"20px"}),renderHeaderTitleContainer:g.css({display:"flex",flexDirection:"row",justifyContent:"flex-start",alignContent:"center",alignItems:"center",width:"100%"}),renderHeaderTitle:g.css({display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",textAlign:"start",textOverflow:"ellipsis",paddingTop:0,wordBreak:"break-word"}),renderHeaderDescription:g.css({display:"-webkit-box",WebkitLineClamp:"4",WebkitBoxOrient:"vertical",textAlign:"start",textOverflow:"ellipsis",wordBreak:"break-word"}),dialogTitleAndDescriptionContainer:g.css({display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",paddingLeft:"10px",paddingRight:"20px",width:"100%"})}),kn=()=>u.useMemo(()=>({container:g.css({display:"flex",alignItems:"center",justifyContent:"center",minHeight:"200px",textAlign:"center",backgroundColor:p.tokens.colorNeutralBackground1,border:`1px solid ${p.tokens.colorNeutralStroke2}`,borderRadius:p.tokens.borderRadiusLarge,padding:`${p.tokens.spacingVerticalXXL} ${p.tokens.spacingHorizontalXXL}`,boxShadow:p.tokens.shadow4,maxWidth:"500px",margin:"20px auto"}),icon:g.css({fontSize:"48px",color:p.tokens.colorPaletteRedForeground1,animation:"pulse 2s infinite","@keyframes pulse":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.05)"},"100%":{transform:"scale(1)"}}}),title:g.css({color:p.tokens.colorNeutralForeground1,fontWeight:p.tokens.fontWeightSemibold,textAlign:"center"}),message:g.css({color:p.tokens.colorNeutralForeground2,textAlign:"center",lineHeight:p.tokens.lineHeightBase400})}),[]),Pn=p.makeStyles({root:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",...p.shorthands.padding("10px"),gap:"10px"},iconClass:{width:"32px",height:"32px"},errorContainer:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",gap:"10px",...p.shorthands.padding("10px"),backgroundColor:p.tokens.colorStatusDangerBackground1},errorIcon:{height:"100%"}}),En=e=>{const{messageType:t,children:n,message:r}=e,o=Pn(),[i,a]=L.useState(null),s=L.useCallback(()=>c.jsx(c.Fragment,{children:c.jsxs("div",{className:o.errorContainer,children:[c.jsx("div",{className:o.errorIcon,children:c.jsx(x.Icon,{icon:"fluent:error-circle-12-regular",width:"32",height:"32",color:p.tokens.colorStatusDangerForeground1})}),c.jsx(p.Body1,{children:r})]})}),[r,o.errorContainer,o.errorIcon]);return L.useEffect(()=>{switch(t){case U.SUCCESS:a(c.jsx(v.CheckmarkCircle32Regular,{primaryFill:p.tokens.colorStatusSuccessForeground1}));break;case U.INFO:a(c.jsx(v.Info32Regular,{primaryFill:p.tokens.colorStatusWarningForeground1}))}},[t]),t===U.ERROR?c.jsx(s,{}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:o.root,children:[i,c.jsx(p.Body1Strong,{children:r}),n]})})},An=({item:e,onSelectedItem:t})=>p.useIsOverflowItemVisible(e.id)?null:c.jsx(p.MenuItem,{icon:e.icon,onClick:()=>t(e.id),children:c.jsx("div",{children:e.name})},e.id),In=({items:e,onSelectedItem:t,theme:n})=>{const{ref:r,overflowCount:o,isOverflowing:i}=p.useOverflowMenu(),a=L.useMemo(()=>v.bundleIcon(v.MoreHorizontalFilled,v.MoreHorizontalRegular),[]);return i?c.jsx(p.IdPrefixProvider,{value:"menu-over-",children:c.jsx(p.FluentProvider,{theme:n,children:c.jsxs(p.Menu,{children:[c.jsx(p.MenuTrigger,{disableButtonEnhancement:!0,children:c.jsx(p.MenuButton,{appearance:"transparent",ref:r,icon:c.jsx(a,{}),"aria-label":`${o} more options`,role:"button"})}),c.jsx(p.MenuPopover,{children:c.jsx(p.MenuList,{children:e.map(e=>c.jsx(An,{item:e,onSelectedItem:t},e.id))})})]})})}):null},_n=({id:e,children:t})=>p.useIsOverflowItemVisible(e)?null:c.jsx(p.MenuItem,{children:t}),Tn=e=>({videoPlayerContainer:g.css({position:"relative",width:e.width,height:e.height}),reactPlayer:g.css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}),playButton:g.css({position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",fontSize:"64px",cursor:"pointer",zIndex:1,userSelect:"none",color:"white",border:"none",borderRadius:"50%",padding:"10px 20px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.7)"}})});var jn=(e=>(e[e.SharePoint=0]="SharePoint",e[e.Teams=1]="Teams",e[e.TeamsDark=2]="TeamsDark",e[e.TeamsHighContrast=3]="TeamsHighContrast",e))(jn||{});const Mn=e=>new A.HostConfig({fontFamily:e.fontFamilyBase,separator:{lineThickness:1,lineColor:e.colorNeutralStroke2},containerStyles:{default:{backgroundColor:e.colorNeutralBackground1,foregroundColors:{default:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},dark:{default:e.colorNeutralForeground3,subtle:e.colorNeutralForeground4},light:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},accent:{default:e.colorBrandForeground1,subtle:e.colorBrandForeground2},attention:{default:e.colorPaletteRedBackground3,subtle:e.colorPaletteRedBackground2},good:{default:e.colorPaletteGreenBackground3,subtle:e.colorPaletteGreenBackground2},warning:{default:e.colorPaletteYellowBackground3,subtle:e.colorPaletteYellowBackground2}}},emphasis:{backgroundColor:e.colorNeutralBackground3,foregroundColors:{default:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},dark:{default:e.colorNeutralForeground3,subtle:e.colorNeutralForeground4},light:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},accent:{default:e.colorBrandForeground1,subtle:e.colorBrandForeground2},attention:{default:e.colorPaletteRedBackground3,subtle:e.colorPaletteRedBackground2},good:{default:e.colorPaletteGreenBackground3,subtle:e.colorPaletteGreenBackground2},warning:{default:e.colorPaletteYellowBackground3,subtle:e.colorPaletteYellowBackground2}}}},inputs:{label:{requiredInputs:{weight:"bold"},optionalInputs:{weight:"bold"}},errorMessage:{color:"attention",weight:"bold"}},actions:{buttonSpacing:10,actionAlignment:"right"}}),Nn="fluentUITheme",Dn=e=>{let t=e.hostCapabilities.getCustomProperty(Nn);return t||(t=p.webLightTheme),t},Vn=(e,t)=>{let n;switch(e){case jn.SharePoint:n={theme:t,hostConfig:Mn(t)};break;case jn.Teams:n={theme:p.teamsLightTheme,hostConfig:Mn(p.teamsLightTheme)};break;case jn.TeamsDark:n={theme:p.teamsDarkTheme,hostConfig:Mn(p.teamsDarkTheme)};break;case jn.TeamsHighContrast:n={theme:p.teamsHighContrastTheme,hostConfig:Mn(p.teamsHighContrastTheme)};break;default:n={theme:t,hostConfig:Mn(t)}}var r,o;return n.hostConfig.cssClassNamePrefix=`ach${Math.random().toString().replace(/\./g,"")}`,r=n.hostConfig,o=n.theme,r.hostCapabilities.setCustomProperty(Nn,o),((e,t)=>{const n=I.create();n.put(`.${t}-ac-container:focus`,{outline:"none !important"}),n.put(`.${t}-ac-adaptiveCard:focus`,{outline:"none !important"}),n.put(`.${t}-ac-pushButton`,{overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",verticalAlign:"middle",cursor:"pointer",fontFamily:"inherit",fontSize:"14px",fontWeight:"600",padding:"4px 10px 5px 10px",WebkitUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",userSelect:"none",height:"32px",borderRadius:"2px",border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground1,color:e.colorNeutralForeground1}),n.put(`.${t}-ac-pushButton:hover`,{border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground2,color:e.colorNeutralForeground2}),n.put(`.${t}-ac-pushButton:active`,{border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground3,color:e.colorNeutralForeground3}),n.put(`.${t}-ac-pushButton-disabled`,{overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",verticalAlign:"middle",cursor:"pointer",fontFamily:"inherit",fontSize:"14px",fontWeight:"600",padding:"4px 10px 5px 10px",WebkitUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",userSelect:"none",height:"32px",borderRadius:"2px",border:`1px solid ${e.colorNeutralStrokeDisabled}`,backgroundColor:e.colorNeutralBackgroundDisabled,color:e.colorNeutralForegroundDisabled}),n.put(`.${t}-ac-ctrl-overlay`,{fontFamily:e.fontFamilyBase,position:"absolute",left:"0",top:"0",zIndex:"10000"}),n.put(`.${t}-ac-ctrl`,{boxSizing:"border-box",fontSize:"14px",fontWeight:"normal"}),n.put(`.${t}-ac-ctrl-popup-container`,{backgroundColor:e.colorNeutralBackground1,position:"absolute",overflowY:"auto",boxShadow:"0px 3.2px 7.2px rgba(0,0,0,0.13), 0px 0.6px 1.8px rgba(0,0,0,0.11)",borderRadius:"2px"}),n.put(`.${t}-ac-ctrl-popup-container:focus`,{outline:"0"}),n.put(`.${t}-ac-ctrl-slide`,{animationDuration:"0.5s",animationTimingFunction:"cubic-bezier(0.1, 0.9, 0.2, 1)"}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideTopToBottom`,{animationName:"fadeIn, slideTopToBottom"}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideBottomToTop`,{animationName:"fadeIn, slideBottomToTop"}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideLeftToRight`,{animationName:"fadeIn, slideLeftToRight"}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideRightToLeft`,{animationName:"fadeIn, slideRightToLeft"}),n.put(`.${t}-ac-ctrl-dropdown-item`,{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",padding:"0px 12px",lineHeight:"30px",cursor:"pointer",backgroundColor:e.colorNeutralBackground1,color:e.colorNeutralForeground1}),n.put(`.${t}-ac-ctrl-dropdown-item:hover`,{backgroundColor:e.colorNeutralBackground2,color:e.colorNeutralForeground2}),n.put(`.${t}-ac-ctrl-dropdown-item:focus`,{outline:"0",backgroundColor:e.colorNeutralBackground3,color:e.colorNeutralForeground3}),n.put(`.${t}-ac-ctrl-dropdown-item-disabled`,{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",padding:"0px 12px",lineHeight:"30px",cursor:"pointer",backgroundColor:e.colorNeutralBackgroundDisabled,color:e.colorNeutralForegroundDisabled})})(n.theme,n.hostConfig.cssClassNamePrefix),n};var On="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Bn={},Rn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ActionRole=e.CarouselInteractionEvent=e.LogLevel=e.RefreshMode=e.TypeErrorType=e.ContainerFitStatus=e.ValidationEvent=e.ValidationPhase=e.InputLabelPosition=e.InputTextStyle=e.ActionIconPlacement=e.FillMode=e.Orientation=e.ShowCardActionMode=e.ImageStyle=e.ActionAlignment=e.VerticalAlignment=e.HorizontalAlignment=e.TextColor=e.Spacing=e.FontType=e.TextWeight=e.InputStyle=e.TextSize=e.SizeUnit=e.ImageSetPresentationStyle=e.ImageSize=e.Size=e.ActionMode=e.ActionStyle=e.ContainerStyle=void 0;var t=function(){function e(){}return e.Default="default",e.Emphasis="emphasis",e.Accent="accent",e.Good="good",e.Attention="attention",e.Warning="warning",e}();e.ContainerStyle=t;var n=function(){function e(){}return e.Default="default",e.Positive="positive",e.Destructive="destructive",e}();e.ActionStyle=n;var r,o,i,a,s,l,c,u,d,p,h,m,f,g,y,v,b,x,C,w,S,k,P,E,A,I,_,T,j=function(){function e(){}return e.Primary="primary",e.Secondary="secondary",e}();e.ActionMode=j,(r=e.Size||(e.Size={}))[r.Auto=0]="Auto",r[r.Stretch=1]="Stretch",r[r.Small=2]="Small",r[r.Medium=3]="Medium",r[r.Large=4]="Large",(o=e.ImageSize||(e.ImageSize={}))[o.Small=0]="Small",o[o.Medium=1]="Medium",o[o.Large=2]="Large",(i=e.ImageSetPresentationStyle||(e.ImageSetPresentationStyle={}))[i.Default=0]="Default",i[i.Stacked=1]="Stacked",(a=e.SizeUnit||(e.SizeUnit={}))[a.Weight=0]="Weight",a[a.Pixel=1]="Pixel",(s=e.TextSize||(e.TextSize={}))[s.Small=0]="Small",s[s.Default=1]="Default",s[s.Medium=2]="Medium",s[s.Large=3]="Large",s[s.ExtraLarge=4]="ExtraLarge",(l=e.InputStyle||(e.InputStyle={}))[l.RevealOnHover=0]="RevealOnHover",l[l.Default=1]="Default",(c=e.TextWeight||(e.TextWeight={}))[c.Lighter=0]="Lighter",c[c.Default=1]="Default",c[c.Bolder=2]="Bolder",(u=e.FontType||(e.FontType={}))[u.Default=0]="Default",u[u.Monospace=1]="Monospace",(d=e.Spacing||(e.Spacing={}))[d.None=0]="None",d[d.Small=1]="Small",d[d.Default=2]="Default",d[d.Medium=3]="Medium",d[d.Large=4]="Large",d[d.ExtraLarge=5]="ExtraLarge",d[d.Padding=6]="Padding",(p=e.TextColor||(e.TextColor={}))[p.Default=0]="Default",p[p.Dark=1]="Dark",p[p.Light=2]="Light",p[p.Accent=3]="Accent",p[p.Good=4]="Good",p[p.Warning=5]="Warning",p[p.Attention=6]="Attention",(h=e.HorizontalAlignment||(e.HorizontalAlignment={}))[h.Left=0]="Left",h[h.Center=1]="Center",h[h.Right=2]="Right",(m=e.VerticalAlignment||(e.VerticalAlignment={}))[m.Top=0]="Top",m[m.Center=1]="Center",m[m.Bottom=2]="Bottom",(f=e.ActionAlignment||(e.ActionAlignment={}))[f.Left=0]="Left",f[f.Center=1]="Center",f[f.Right=2]="Right",f[f.Stretch=3]="Stretch",(g=e.ImageStyle||(e.ImageStyle={}))[g.Default=0]="Default",g[g.Person=1]="Person",(y=e.ShowCardActionMode||(e.ShowCardActionMode={}))[y.Inline=0]="Inline",y[y.Popup=1]="Popup",(v=e.Orientation||(e.Orientation={}))[v.Horizontal=0]="Horizontal",v[v.Vertical=1]="Vertical",(b=e.FillMode||(e.FillMode={}))[b.Cover=0]="Cover",b[b.RepeatHorizontally=1]="RepeatHorizontally",b[b.RepeatVertically=2]="RepeatVertically",b[b.Repeat=3]="Repeat",(x=e.ActionIconPlacement||(e.ActionIconPlacement={}))[x.LeftOfTitle=0]="LeftOfTitle",x[x.AboveTitle=1]="AboveTitle",(C=e.InputTextStyle||(e.InputTextStyle={}))[C.Text=0]="Text",C[C.Tel=1]="Tel",C[C.Url=2]="Url",C[C.Email=3]="Email",C[C.Password=4]="Password",(w=e.InputLabelPosition||(e.InputLabelPosition={}))[w.Inline=0]="Inline",w[w.Above=1]="Above",(S=e.ValidationPhase||(e.ValidationPhase={}))[S.Parse=0]="Parse",S[S.ToJSON=1]="ToJSON",S[S.Validation=2]="Validation",(k=e.ValidationEvent||(e.ValidationEvent={}))[k.Hint=0]="Hint",k[k.ActionTypeNotAllowed=1]="ActionTypeNotAllowed",k[k.CollectionCantBeEmpty=2]="CollectionCantBeEmpty",k[k.Deprecated=3]="Deprecated",k[k.ElementTypeNotAllowed=4]="ElementTypeNotAllowed",k[k.InteractivityNotAllowed=5]="InteractivityNotAllowed",k[k.InvalidPropertyValue=6]="InvalidPropertyValue",k[k.MissingCardType=7]="MissingCardType",k[k.PropertyCantBeNull=8]="PropertyCantBeNull",k[k.TooManyActions=9]="TooManyActions",k[k.UnknownActionType=10]="UnknownActionType",k[k.UnknownElementType=11]="UnknownElementType",k[k.UnsupportedCardVersion=12]="UnsupportedCardVersion",k[k.DuplicateId=13]="DuplicateId",k[k.UnsupportedProperty=14]="UnsupportedProperty",k[k.RequiredInputsShouldHaveLabel=15]="RequiredInputsShouldHaveLabel",k[k.RequiredInputsShouldHaveErrorMessage=16]="RequiredInputsShouldHaveErrorMessage",k[k.Other=17]="Other",(P=e.ContainerFitStatus||(e.ContainerFitStatus={}))[P.FullyInContainer=0]="FullyInContainer",P[P.Overflowing=1]="Overflowing",P[P.FullyOutOfContainer=2]="FullyOutOfContainer",(E=e.TypeErrorType||(e.TypeErrorType={}))[E.UnknownType=0]="UnknownType",E[E.ForbiddenType=1]="ForbiddenType",(A=e.RefreshMode||(e.RefreshMode={}))[A.Disabled=0]="Disabled",A[A.Manual=1]="Manual",A[A.Automatic=2]="Automatic",(I=e.LogLevel||(e.LogLevel={}))[I.Info=0]="Info",I[I.Warning=1]="Warning",I[I.Error=2]="Error",(_=e.CarouselInteractionEvent||(e.CarouselInteractionEvent={}))[_.NavigationNext=0]="NavigationNext",_[_.NavigationPrevious=1]="NavigationPrevious",_[_.Pagination=2]="Pagination",_[_.Autoplay=3]="Autoplay",(T=e.ActionRole||(e.ActionRole={}))[T.Button=0]="Button",T[T.Link=1]="Link",T[T.Tab=2]="Tab",T[T.Menu=3]="Menu",T[T.MenuItem=4]="MenuItem"}(Rn);var zn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UUID=e.SizeAndUnit=e.PaddingDefinition=e.SpacingDefinition=e.StringWithSubstitutions=e.ContentTypes=e.GlobalSettings=void 0;var t=Rn,n=function(){function e(){}return e.useAdvancedTextBlockTruncation=!0,e.useAdvancedCardBottomTruncation=!1,e.useMarkdownInRadioButtonAndCheckbox=!0,e.allowMarkForTextHighlighting=!1,e.alwaysBleedSeparators=!1,e.enableFullJsonRoundTrip=!1,e.displayInputValidationErrors=!0,e.allowPreProcessingPropertyValues=!1,e.setTabIndexAtCardRoot=!0,e.enableFallback=!0,e.useWebkitLineClamp=!0,e.allowMoreThanMaxActionsInOverflowMenu=!1,e.removePaddingFromContainersWithBackgroundImage=!1,e.resetInputsDirtyStateAfterActionExecution=!0,e.applets={logEnabled:!0,logLevel:t.LogLevel.Error,maximumRetryAttempts:3,defaultTimeBetweenRetryAttempts:3e3,authPromptWidth:400,authPromptHeight:600,refresh:{mode:t.RefreshMode.Manual,timeBetweenAutomaticRefreshes:3e3,maximumConsecutiveAutomaticRefreshes:3,allowManualRefreshesAfterAutomaticRefreshes:!0}},e}();e.GlobalSettings=n,e.ContentTypes={applicationJson:"application/json",applicationXWwwFormUrlencoded:"application/x-www-form-urlencoded"};var r=function(){function t(){this._isProcessed=!1}return t.prototype.getReferencedInputs=function(e,t){if(!t)throw new Error("The referencedInputs parameter cannot be null.");if(this._original)for(var n=0,r=e;n<r.length;n++){var o=r[n];null!=new RegExp("\\{{2}("+o.id+").value\\}{2}","gi").exec(this._original)&&o.id&&(t[o.id]=o)}},t.prototype.substituteInputValues=function(t,n){if(this._processed=this._original,this._original)for(var r=/\{{2}([a-z0-9_$@]+).value\}{2}/gi,o=void 0;null!==(o=r.exec(this._original))&&this._processed;)for(var i=0,a=Object.keys(t);i<a.length;i++){var s=a[i];if(s.toLowerCase()===o[1].toLowerCase()){var l=t[s],c="";l.value&&(c=l.value),n===e.ContentTypes.applicationJson?c=(c=JSON.stringify(c)).slice(1,-1):n===e.ContentTypes.applicationXWwwFormUrlencoded&&(c=encodeURIComponent(c)),this._processed=this._processed.replace(o[0],c);break}}this._isProcessed=!0},t.prototype.getOriginal=function(){return this._original},t.prototype.get=function(){return this._isProcessed?this._processed:this._original},t.prototype.set=function(e){this._original=e,this._isProcessed=!1},t}();e.StringWithSubstitutions=r;var o=function(){return function(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),this.left=0,this.top=0,this.right=0,this.bottom=0,this.top=e,this.right=t,this.bottom=n,this.left=r}}();e.SpacingDefinition=o;var i=function(){return function(e,n,r,o){void 0===e&&(e=t.Spacing.None),void 0===n&&(n=t.Spacing.None),void 0===r&&(r=t.Spacing.None),void 0===o&&(o=t.Spacing.None),this.top=t.Spacing.None,this.right=t.Spacing.None,this.bottom=t.Spacing.None,this.left=t.Spacing.None,this.top=e,this.right=n,this.bottom=r,this.left=o}}();e.PaddingDefinition=i;var a=function(){function e(e,t){this.physicalSize=e,this.unit=t}return e.parse=function(n,r){void 0===r&&(r=!1);var o=new e(0,t.SizeUnit.Weight);if("number"==typeof n)return o.physicalSize=n,o;if("string"==typeof n){var i=/^([0-9]+)(px|\*)?$/g.exec(n),a=r?3:2;if(i&&i.length>=a)return o.physicalSize=parseInt(i[1]),3===i.length&&"px"===i[2]&&(o.unit=t.SizeUnit.Pixel),o}throw new Error("Invalid size: "+n)},e}();e.SizeAndUnit=a;
18
18
  /**
19
19
  * Fast UUID generator, RFC4122 version 4 compliant.
20
20
  * @author Jeff Ward (jcward.com).