mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20:15 +01:00
* feat(sharepoint): integrate SharePoint file picker and download workflow Introduces end‑to‑end SharePoint import support: * Token exchange with Microsoft Graph and scope management (`useSharePointToken`) * Re‑usable hooks: `useSharePointPicker`, `useSharePointDownload`, `useSharePointFileHandling` * FileSearch dropdown now offers **From Local Machine** / **From SharePoint** sources and gracefully falls back when SharePoint is disabled * Agent upload model, `AttachFileMenu`, and `DropdownPopup` extended for SharePoint files and sub‑menus * Blurry overlay with progress indicator and `maxSelectionCount` limit during downloads * Cache‑flush utility (`config/flush-cache.js`) supporting Redis & filesystem, with dry‑run and npm script * Updated `SharePointIcon` (uses `currentColor`) and new i18n keys * Bug fixes: placeholder syntax in progress message, picker event‑listener cleanup * Misc style and performance optimizations * Fix ESLint warnings --------- Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
24 lines
672 B
TypeScript
24 lines
672 B
TypeScript
export type RenderProp<
|
|
P = React.HTMLAttributes<any> & {
|
|
ref?: React.Ref<any>;
|
|
},
|
|
> = (props: P) => React.ReactNode;
|
|
|
|
export interface MenuItemProps {
|
|
id?: string;
|
|
label?: string;
|
|
onClick?: (e: React.MouseEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
|
icon?: React.ReactNode;
|
|
kbd?: string;
|
|
show?: boolean;
|
|
disabled?: boolean;
|
|
separate?: boolean;
|
|
hideOnClick?: boolean;
|
|
dialog?: React.ReactElement;
|
|
ref?: React.Ref<any>;
|
|
render?:
|
|
| RenderProp<React.HTMLAttributes<any> & { ref?: React.Ref<any> | undefined }>
|
|
| React.ReactElement<any, string | React.JSXElementConstructor<any>>
|
|
| undefined;
|
|
subItems?: MenuItemProps[];
|
|
}
|