@hansevision/tp-richtexteditor-control 1.0.0
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/README.md +74 -0
- package/dist/errorBoundary/errorBoundary.d.ts +18 -0
- package/dist/errorBoundary/errorService.d.ts +6 -0
- package/dist/errorBoundary/i18n/IErrorBoundaryStrings.d.ts +6 -0
- package/dist/errorBoundary/i18n/de.d.ts +3 -0
- package/dist/errorBoundary/i18n/en.d.ts +3 -0
- package/dist/errorBoundary/i18n/errorBoundaryStrings.d.ts +3 -0
- package/dist/errorBoundary/interfaces/IRepairError.d.ts +8 -0
- package/dist/i18n.d.ts +6 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.esm.js +10690 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +10712 -0
- package/dist/index.js.map +1 -0
- package/dist/richTextEditor/RichTextEditor.d.ts +41 -0
- package/dist/richTextEditor/RichTextEditorContext.d.ts +21 -0
- package/dist/richTextEditor/components/controls/CustomTool.d.ts +9 -0
- package/dist/richTextEditor/components/controls/ImagePickerControl.d.ts +3 -0
- package/dist/richTextEditor/components/controls/VideoPickerControl/ContainsValueChangedObserver.d.ts +1 -0
- package/dist/richTextEditor/components/controls/VideoPickerControl/VideoPickerControl.d.ts +4 -0
- package/dist/richTextEditor/components/controls/handleUpload.d.ts +3 -0
- package/dist/richTextEditor/components/dialogs/progressDialog.d.ts +4 -0
- package/dist/richTextEditor/components/filePicker/common/Constants.d.ts +39 -0
- package/dist/richTextEditor/components/filePicker/common/SPEntities.d.ts +178 -0
- package/dist/richTextEditor/components/filePicker/common/interfaces.d.ts +26 -0
- package/dist/richTextEditor/components/filePicker/components/dragDropFiles/DragDropFiles.d.ts +53 -0
- package/dist/richTextEditor/components/filePicker/components/dragDropFiles/IDragDropFiles.d.ts +28 -0
- package/dist/richTextEditor/components/filePicker/components/dragDropFiles/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldAttachmentsRenderer/FieldAttachmentsRenderer.d.ts +25 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldAttachmentsRenderer/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldBaseTextRenderer/FieldBaseTextRenderer.d.ts +25 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldBaseTextRenderer/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldCommon/IFieldRendererProps.d.ts +15 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldCommon/index.d.ts +1 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldDateRenderer/FieldDateRenderer.d.ts +22 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldDateRenderer/index.d.ts +1 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldFileTypeRenderer/FieldFileTypeRenderer.d.ts +26 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldFileTypeRenderer/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldLookupRenderer/FieldLookupRenderer.d.ts +59 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldLookupRenderer/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldNameRenderer/FieldNameRenderer.d.ts +60 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldNameRenderer/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldTaxonomyRenderer/FieldTaxonomyRenderer.d.ts +23 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldTaxonomyRenderer/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldTextRenderer/FieldTextRenderer.d.ts +35 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldTextRenderer/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldTitleRenderer/FieldTitleRenderer.d.ts +50 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldTitleRenderer/index.d.ts +1 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldUrlRenderer/FieldUrlRenderer.d.ts +31 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldUrlRenderer/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldUserRenderer/FieldUserHoverCard.d.ts +26 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldUserRenderer/FieldUserRenderer.d.ts +103 -0
- package/dist/richTextEditor/components/filePicker/components/fields/fieldUserRenderer/index.d.ts +3 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/FilePicker.d.ts +45 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/FilePicker.themedStyles.d.ts +28 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/FilePicker.types.d.ts +46 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/IFilePickerProps.d.ts +147 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/IFilePickerState.d.ts +7 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/LinkFilePickerTab/ILinkFilePickerTabProps.d.ts +8 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/LinkFilePickerTab/ILinkFilePickerTabState.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/LinkFilePickerTab/LinkFilePickerTab.d.ts +30 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/LinkFilePickerTab/index.d.ts +3 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/MultipleUploadFilePickerTab/IMultipleUploadFilePickerTabProps.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/MultipleUploadFilePickerTab/IMultipleUploadFilePickerTabState.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/MultipleUploadFilePickerTab/MultipleUploadFilePickerTab.d.ts +24 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/MultipleUploadFilePickerTab/MultipleUploadFilePickerTab.themedStyles.d.ts +9 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/MultipleUploadFilePickerTab/index.d.ts +3 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/OneDriveFilesTab/IOneDriveFilesTabProps.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/OneDriveFilesTab/IOneDriveFilesTabState.d.ts +10 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/OneDriveFilesTab/OneDriveFilesTab.d.ts +29 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/OneDriveFilesTab/OneDriveFilesTab.types.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/OneDriveFilesTab/index.d.ts +3 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/RecentFilesTab/IRecentFilesTabProps.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/RecentFilesTab/IRecentFilesTabState.d.ts +7 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/RecentFilesTab/RecentFilesTab.d.ts +59 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/RecentFilesTab/RecentFilesTab.themedStyles.d.ts +24 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/RecentFilesTab/index.d.ts +3 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/SiteFilePickerTab/ISiteFilePickerTabProps.d.ts +19 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/SiteFilePickerTab/ISiteFilePickerTabState.d.ts +9 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/SiteFilePickerTab/SiteFilePickerTab.d.ts +36 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/SiteFilePickerTab/index.d.ts +3 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/StockImagesTab/IStockImagesProps.d.ts +8 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/StockImagesTab/StockImageSizeType.d.ts +1 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/StockImagesTab/StockImages.d.ts +17 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/StockImagesTab/StockImagesModel.d.ts +31 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/StockImagesTab/index.d.ts +3 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/UploadFilePickerTab/IUploadFilePickerTabProps.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/UploadFilePickerTab/IUploadFilePickerTabState.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/UploadFilePickerTab/UploadFilePickerTab.d.ts +20 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/UploadFilePickerTab/UploadFilePickerTab.themedStyles.d.ts +9 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/UploadFilePickerTab/index.d.ts +3 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/IWebSearchTabProps.d.ts +7 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/IWebSearchTabState.d.ts +12 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/WebSearchTab.d.ts +91 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/WebSearchTab.themedStyles.d.ts +35 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/WebSearchTab.types.d.ts +21 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/index.d.ts +4 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentLibraryBrowser/DocumentLibraryBrowser.d.ts +38 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentLibraryBrowser/DocumentLibraryBrowser.themedStyles.d.ts +25 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentLibraryBrowser/IDocumentLibraryBrowserProps.d.ts +7 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentLibraryBrowser/IDocumentLibraryBrowserState.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentLibraryBrowser/index.d.ts +3 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentTile/DocumentTile.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentTile/IDocumentTileProps.d.ts +12 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentTile/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FileBrowser/FileBrowser.d.ts +56 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FileBrowser/FileBrowser.types.d.ts +1 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FileBrowser/IFileBrowserProps.d.ts +11 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FileBrowser/IFileBrowserState.d.ts +17 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FileBrowser/index.d.ts +4 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FolderTile/FolderTile.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FolderTile/FolderTile.themedStyles.d.ts +6 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FolderTile/IFolderTileProps.d.ts +10 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FolderTile/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/TilesList/ITilesListProps.d.ts +13 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/TilesList/TilesList.d.ts +30 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/TilesList/TilesList.themedStyles.d.ts +32 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/TilesList/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/controls/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/filePicker/index.d.ts +4 -0
- package/dist/richTextEditor/components/filePicker/components/fileTypeIcon/FileTypeIcon.d.ts +44 -0
- package/dist/richTextEditor/components/filePicker/components/fileTypeIcon/IFileTypeIcon.d.ts +88 -0
- package/dist/richTextEditor/components/filePicker/components/fileTypeIcon/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/components/iFrameDialog/IFrameDialog.d.ts +78 -0
- package/dist/richTextEditor/components/filePicker/components/iFrameDialog/IFrameDialogContent.d.ts +17 -0
- package/dist/richTextEditor/components/filePicker/components/iFrameDialog/index.d.ts +3 -0
- package/dist/richTextEditor/components/filePicker/components/placeholder/IPlaceholderComponent.d.ts +41 -0
- package/dist/richTextEditor/components/filePicker/components/placeholder/PlaceholderComponent.d.ts +44 -0
- package/dist/richTextEditor/components/filePicker/components/placeholder/PlaceholderComponent.themedStyles.d.ts +16 -0
- package/dist/richTextEditor/components/filePicker/components/placeholder/index.d.ts +2 -0
- package/dist/richTextEditor/components/filePicker/index.d.ts +1 -0
- package/dist/richTextEditor/components/filePicker/services/FileBrowserService.d.ts +71 -0
- package/dist/richTextEditor/components/filePicker/services/FileBrowserService.types.d.ts +33 -0
- package/dist/richTextEditor/components/filePicker/services/FilesSearchService.d.ts +45 -0
- package/dist/richTextEditor/components/filePicker/services/FilesSearchService.types.d.ts +62 -0
- package/dist/richTextEditor/components/filePicker/services/IOneDriveService.d.ts +230 -0
- package/dist/richTextEditor/components/filePicker/services/OneDriveService.d.ts +38 -0
- package/dist/richTextEditor/components/filePicker/services/OrgAssetsService.d.ts +10 -0
- package/dist/richTextEditor/components/filePicker/utilities/FieldRendererHelper.d.ts +17 -0
- package/dist/richTextEditor/components/filePicker/utilities/GeneralHelper.d.ts +78 -0
- package/dist/richTextEditor/components/filePicker/utilities/LocalesHelper.d.ts +5 -0
- package/dist/richTextEditor/components/filePicker/utilities/SPHelper.d.ts +67 -0
- package/dist/richTextEditor/components/filePicker/utilities/index.d.ts +4 -0
- package/dist/richTextEditor/components/filePicker/utilities/utils.d.ts +3 -0
- package/dist/richTextEditor/components/hooks/useRange.d.ts +6 -0
- package/dist/richTextEditor/components/richTextEditor/RichTextEditorInner.d.ts +1 -0
- package/dist/richTextEditor/components/richTextEditor/rteContextProvider.d.ts +19 -0
- package/dist/richTextEditor/components/syncfusion/SyncFusionProvider.d.ts +7 -0
- package/dist/richTextEditor/components/syncfusion/licenseKey.d.ts +4 -0
- package/dist/richTextEditor/components/syncfusion/syncfusionRichText.d.ts +22 -0
- package/dist/richTextEditor/components/syncfusion/syncfusionSetup.d.ts +1 -0
- package/dist/richTextEditor/i18n/IRteStrings.d.ts +142 -0
- package/dist/richTextEditor/i18n/de.d.ts +3 -0
- package/dist/richTextEditor/i18n/en.d.ts +3 -0
- package/dist/richTextEditor/i18n/rteStrings.d.ts +3 -0
- package/dist/richTextEditor/themeProvider.d.ts +6 -0
- package/package.json +71 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IFilePickerResult, IFilePickerTab } from '../FilePicker.types';
|
|
2
|
+
export interface IMultipleUploadFilePickerTabProps extends IFilePickerTab {
|
|
3
|
+
onChange: (value: IFilePickerResult[]) => void;
|
|
4
|
+
renderCustomMultipleUploadTabContent: (filePickerResult: IFilePickerResult[]) => JSX.Element | null;
|
|
5
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IMultipleUploadFilePickerTabProps } from './IMultipleUploadFilePickerTabProps';
|
|
3
|
+
import { IMultipleUploadFilePickerTabState } from './IMultipleUploadFilePickerTabState';
|
|
4
|
+
export default class MultipleUploadFilePickerTab extends React.Component<IMultipleUploadFilePickerTabProps, IMultipleUploadFilePickerTabState> {
|
|
5
|
+
constructor(props: IMultipleUploadFilePickerTabProps);
|
|
6
|
+
private displayFileNames;
|
|
7
|
+
render(): React.ReactElement<IMultipleUploadFilePickerTabProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Gets called when files are uploaded via drag and drop
|
|
10
|
+
*/
|
|
11
|
+
private _handleFileUpload;
|
|
12
|
+
/**
|
|
13
|
+
* Gets called when files are uploaded via file explorer
|
|
14
|
+
*/
|
|
15
|
+
private _handleFileUploadExplorer;
|
|
16
|
+
/**
|
|
17
|
+
* Saves base64 encoded image back to property pane file picker
|
|
18
|
+
*/
|
|
19
|
+
private _handleSave;
|
|
20
|
+
/**
|
|
21
|
+
* Closes tab without saving
|
|
22
|
+
*/
|
|
23
|
+
private _handleClose;
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IPalette } from '@fluentui/react/lib/Styling';
|
|
2
|
+
export declare const getThemedStyles: (palette: Partial<IPalette>) => import("@fluentui/merge-styles/lib/IStyleSet").IProcessedStyleSet<{
|
|
3
|
+
localTabFilename: {
|
|
4
|
+
color: string;
|
|
5
|
+
};
|
|
6
|
+
localTabLabel: {
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OneDriveFilesBreadcrumbItem } from './OneDriveFilesTab.types';
|
|
2
|
+
import { IFilePickerResult } from '../FilePicker.types';
|
|
3
|
+
export interface IOneDriveFilesTabState {
|
|
4
|
+
filePickerResults: IFilePickerResult[];
|
|
5
|
+
libraryAbsolutePath: string;
|
|
6
|
+
libraryUrl: string;
|
|
7
|
+
folderPath: string;
|
|
8
|
+
folderName: string;
|
|
9
|
+
breadcrumbItems: OneDriveFilesBreadcrumbItem[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IOneDriveFilesTabProps } from './IOneDriveFilesTabProps';
|
|
3
|
+
import { IOneDriveFilesTabState } from './IOneDriveFilesTabState';
|
|
4
|
+
export declare class OneDriveFilesTab extends React.Component<IOneDriveFilesTabProps, IOneDriveFilesTabState> {
|
|
5
|
+
constructor(props: IOneDriveFilesTabProps);
|
|
6
|
+
componentDidMount(): Promise<void>;
|
|
7
|
+
render(): React.ReactElement<IOneDriveFilesTabProps>;
|
|
8
|
+
private renderBreadcrumbItem;
|
|
9
|
+
/**
|
|
10
|
+
* Handles breadcrump item click
|
|
11
|
+
*/
|
|
12
|
+
private onBreadcrumpItemClick;
|
|
13
|
+
/**
|
|
14
|
+
* Is called when user selects a different file
|
|
15
|
+
*/
|
|
16
|
+
private _handleSelectionChange;
|
|
17
|
+
/**
|
|
18
|
+
* Called when user saves
|
|
19
|
+
*/
|
|
20
|
+
private _handleSave;
|
|
21
|
+
/**
|
|
22
|
+
* Called when user closes tab
|
|
23
|
+
*/
|
|
24
|
+
private _handleClose;
|
|
25
|
+
/**
|
|
26
|
+
* Triggered when user opens a file folder
|
|
27
|
+
*/
|
|
28
|
+
private _handleOpenFolder;
|
|
29
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IRecentFile } from '../../../services/FilesSearchService.types';
|
|
2
|
+
import { IFilePickerResult } from '../FilePicker.types';
|
|
3
|
+
export interface IRecentFilesTabState {
|
|
4
|
+
results: IRecentFile[];
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
filePickerResults: IFilePickerResult[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IRecentFilesTabProps } from './IRecentFilesTabProps';
|
|
3
|
+
import { IRecentFilesTabState } from './IRecentFilesTabState';
|
|
4
|
+
export default class RecentFilesTab extends React.Component<IRecentFilesTabProps, IRecentFilesTabState> {
|
|
5
|
+
private _columnCount;
|
|
6
|
+
private readonly themed;
|
|
7
|
+
private _columnWidth;
|
|
8
|
+
private _rowHeight;
|
|
9
|
+
private _selection;
|
|
10
|
+
private _listElem;
|
|
11
|
+
constructor(props: IRecentFilesTabProps);
|
|
12
|
+
/**
|
|
13
|
+
* Gets the most recently used files
|
|
14
|
+
*/
|
|
15
|
+
componentDidMount(): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Render the tab
|
|
18
|
+
*/
|
|
19
|
+
render(): React.ReactElement<IRecentFilesTabProps>;
|
|
20
|
+
private _onSelectionChanged;
|
|
21
|
+
/**
|
|
22
|
+
* Calculates how many items there should be in the page
|
|
23
|
+
*/
|
|
24
|
+
private _getItemCountForPage;
|
|
25
|
+
/** Calculates the list "page" height (a.k.a. row) */
|
|
26
|
+
private _getPageHeight;
|
|
27
|
+
/**
|
|
28
|
+
* Renders a "please wait" spinner while we're loading
|
|
29
|
+
*/
|
|
30
|
+
private _renderSpinner;
|
|
31
|
+
/**
|
|
32
|
+
* Renders a message saying that there are no recent files
|
|
33
|
+
*/
|
|
34
|
+
private _renderPlaceholder;
|
|
35
|
+
/**
|
|
36
|
+
* Renders a grid list containing results
|
|
37
|
+
*/
|
|
38
|
+
private _renderGridList;
|
|
39
|
+
/**
|
|
40
|
+
* Renders each result in its own cell
|
|
41
|
+
*/
|
|
42
|
+
private _onRenderCell;
|
|
43
|
+
/**
|
|
44
|
+
* Gets called what a file is selected.
|
|
45
|
+
*/
|
|
46
|
+
private _handleItemInvoked;
|
|
47
|
+
/**
|
|
48
|
+
* Gets called when it is time to save the currently selected item
|
|
49
|
+
*/
|
|
50
|
+
private _handleSave;
|
|
51
|
+
/**
|
|
52
|
+
* Gets called when it is time to close (without saving)
|
|
53
|
+
*/
|
|
54
|
+
private _handleClose;
|
|
55
|
+
/**
|
|
56
|
+
* Creates a ref to the list
|
|
57
|
+
*/
|
|
58
|
+
private _linkElement;
|
|
59
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IPalette } from '@fluentui/react/lib/Styling';
|
|
2
|
+
export declare const getThemedStyles: (palette: Partial<IPalette>) => import("@fluentui/merge-styles/lib/IStyleSet").IProcessedStyleSet<{
|
|
3
|
+
itemTileFileBackground: {
|
|
4
|
+
backgroundColor: string;
|
|
5
|
+
};
|
|
6
|
+
itemTileFocusAfter: {
|
|
7
|
+
borderColor: string;
|
|
8
|
+
boxShadow: string;
|
|
9
|
+
};
|
|
10
|
+
itemTileFileContainerBorder: {
|
|
11
|
+
borderColor: string;
|
|
12
|
+
};
|
|
13
|
+
itemTileFileContainer: {
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
borderColor: string;
|
|
16
|
+
};
|
|
17
|
+
itemTileNamePlate: {
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
color: string;
|
|
20
|
+
};
|
|
21
|
+
itemTileNamePlateBorder: {
|
|
22
|
+
borderTopColor: string;
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IBreadcrumbItem } from '@fluentui/react/lib/Breadcrumb';
|
|
2
|
+
import { FileBrowserService } from '../../../services/FileBrowserService';
|
|
3
|
+
import { IFilePickerTab } from '../FilePicker.types';
|
|
4
|
+
export interface ISiteFilePickerTabProps extends IFilePickerTab {
|
|
5
|
+
fileBrowserService: FileBrowserService;
|
|
6
|
+
/**
|
|
7
|
+
* Represents the base node in the breadrumb navigation
|
|
8
|
+
*/
|
|
9
|
+
breadcrumbFirstNode?: IBreadcrumbItem;
|
|
10
|
+
/**
|
|
11
|
+
* Specifies a default folder to be active in the Site Files tab
|
|
12
|
+
*/
|
|
13
|
+
defaultFolderAbsolutePath?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Title of the default site
|
|
16
|
+
*/
|
|
17
|
+
webTitle?: string;
|
|
18
|
+
includePageLibraries?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IFilePickerResult, FilePickerBreadcrumbItem } from '../FilePicker.types';
|
|
2
|
+
export interface ISiteFilePickerTabState {
|
|
3
|
+
filePickerResults: IFilePickerResult[];
|
|
4
|
+
libraryAbsolutePath: string;
|
|
5
|
+
libraryUrl: string;
|
|
6
|
+
libraryPath: string;
|
|
7
|
+
folderName: string;
|
|
8
|
+
breadcrumbItems: FilePickerBreadcrumbItem[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ISiteFilePickerTabProps } from './ISiteFilePickerTabProps';
|
|
3
|
+
import { ISiteFilePickerTabState } from './ISiteFilePickerTabState';
|
|
4
|
+
export default class SiteFilePickerTab extends React.Component<ISiteFilePickerTabProps, ISiteFilePickerTabState> {
|
|
5
|
+
private _defaultLibraryNamePromise;
|
|
6
|
+
constructor(props: ISiteFilePickerTabProps);
|
|
7
|
+
private _parseInitialLocationState;
|
|
8
|
+
private parseBreadcrumbsFromPaths;
|
|
9
|
+
componentDidMount(): void;
|
|
10
|
+
render(): React.ReactElement<ISiteFilePickerTabProps>;
|
|
11
|
+
private renderBreadcrumbItem;
|
|
12
|
+
/**
|
|
13
|
+
* Handles breadcrump item click
|
|
14
|
+
*/
|
|
15
|
+
private onBreadcrumpItemClick;
|
|
16
|
+
/**
|
|
17
|
+
* Is called when user selects a different file
|
|
18
|
+
*/
|
|
19
|
+
private _handleSelectionChange;
|
|
20
|
+
/**
|
|
21
|
+
* Called when user saves
|
|
22
|
+
*/
|
|
23
|
+
private _handleSave;
|
|
24
|
+
/**
|
|
25
|
+
* Called when user closes tab
|
|
26
|
+
*/
|
|
27
|
+
private _handleClose;
|
|
28
|
+
/**
|
|
29
|
+
* Triggered when user opens a file folder
|
|
30
|
+
*/
|
|
31
|
+
private _handleOpenFolder;
|
|
32
|
+
/**
|
|
33
|
+
* Triggered when user opens a top-level document library
|
|
34
|
+
*/
|
|
35
|
+
private _handleOpenLibrary;
|
|
36
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FilesSearchService } from '../../../services/FilesSearchService';
|
|
2
|
+
import { IFilePickerTab } from '../FilePicker.types';
|
|
3
|
+
import { StockImageSizeType } from './StockImageSizeType';
|
|
4
|
+
export interface IStockImagesProps extends IFilePickerTab {
|
|
5
|
+
language: string;
|
|
6
|
+
fileSearchService: FilesSearchService;
|
|
7
|
+
stockImageSize: StockImageSizeType;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type StockImageSizeType = 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IStockImagesProps } from './IStockImagesProps';
|
|
3
|
+
export declare class StockImages extends React.Component<IStockImagesProps> {
|
|
4
|
+
componentDidMount(): void;
|
|
5
|
+
componentWillUnmount(): void;
|
|
6
|
+
render(): React.ReactElement<IStockImagesProps>;
|
|
7
|
+
private _handleImageIframeEvent;
|
|
8
|
+
/**
|
|
9
|
+
* Called when user saves
|
|
10
|
+
*/
|
|
11
|
+
private _handleSave;
|
|
12
|
+
/**
|
|
13
|
+
* Called when user closes tab
|
|
14
|
+
*/
|
|
15
|
+
private _handleClose;
|
|
16
|
+
private getCurrentThemeConfiguration;
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface EventFlags {
|
|
2
|
+
dataCategories: number;
|
|
3
|
+
diagnosticLevel: number;
|
|
4
|
+
}
|
|
5
|
+
export interface DataField {
|
|
6
|
+
name: string;
|
|
7
|
+
dataType: number;
|
|
8
|
+
value: string;
|
|
9
|
+
classification: number;
|
|
10
|
+
}
|
|
11
|
+
export interface TelemetryProperties {
|
|
12
|
+
ariaTenantToken: string;
|
|
13
|
+
nexusTenantToken: number;
|
|
14
|
+
}
|
|
15
|
+
export interface EventValue {
|
|
16
|
+
eventName: string;
|
|
17
|
+
eventFlags: EventFlags;
|
|
18
|
+
dataFields: DataField[];
|
|
19
|
+
telemetryProperties: TelemetryProperties;
|
|
20
|
+
}
|
|
21
|
+
export interface SubmitValue {
|
|
22
|
+
action: string;
|
|
23
|
+
contenttype: string;
|
|
24
|
+
sourceUrl: string;
|
|
25
|
+
caption: string;
|
|
26
|
+
}
|
|
27
|
+
export interface StockImagesEvent {
|
|
28
|
+
MessageId: string;
|
|
29
|
+
Values: EventValue | SubmitValue[];
|
|
30
|
+
SendTime: number;
|
|
31
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IFilePickerResult, IFilePickerTab } from '../FilePicker.types';
|
|
2
|
+
export interface IUploadFilePickerTabProps extends IFilePickerTab {
|
|
3
|
+
onChange: (value: IFilePickerResult[]) => void;
|
|
4
|
+
renderCustomUploadTabContent: (filePickerResult: IFilePickerResult) => JSX.Element | null;
|
|
5
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IUploadFilePickerTabProps } from './IUploadFilePickerTabProps';
|
|
3
|
+
import { IUploadFilePickerTabState } from './IUploadFilePickerTabState';
|
|
4
|
+
export default class UploadFilePickerTab extends React.Component<IUploadFilePickerTabProps, IUploadFilePickerTabState> {
|
|
5
|
+
constructor(props: IUploadFilePickerTabProps);
|
|
6
|
+
render(): React.ReactElement<IUploadFilePickerTabProps>;
|
|
7
|
+
private _loadPreiview;
|
|
8
|
+
/**
|
|
9
|
+
* Gets called when a file is uploaded
|
|
10
|
+
*/
|
|
11
|
+
private _handleFileUpload;
|
|
12
|
+
/**
|
|
13
|
+
* Saves base64 encoded image back to property pane file picker
|
|
14
|
+
*/
|
|
15
|
+
private _handleSave;
|
|
16
|
+
/**
|
|
17
|
+
* Closes tab without saving
|
|
18
|
+
*/
|
|
19
|
+
private _handleClose;
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IPalette } from '@fluentui/react/lib/Styling';
|
|
2
|
+
export declare const getThemedStyles: (palette: Partial<IPalette>) => import("@fluentui/merge-styles/lib/IStyleSet").IProcessedStyleSet<{
|
|
3
|
+
localTabFilename: {
|
|
4
|
+
color: string;
|
|
5
|
+
};
|
|
6
|
+
localTabLabel: {
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FilesSearchService } from '../../../services/FilesSearchService';
|
|
2
|
+
import { IFilePickerTab } from '../FilePicker.types';
|
|
3
|
+
import { ISearchSuggestion } from './WebSearchTab.types';
|
|
4
|
+
export interface IWebSearchTabProps extends IFilePickerTab {
|
|
5
|
+
bingSearchService: FilesSearchService;
|
|
6
|
+
suggestions?: ISearchSuggestion[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ISearchResult } from '../../../services/FilesSearchService.types';
|
|
2
|
+
import { IFilePickerResult } from '../FilePicker.types';
|
|
3
|
+
import { ImageAspect, ImageLicense, ImageSize } from './WebSearchTab.types';
|
|
4
|
+
export interface IWebSearchTabState {
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
query?: string;
|
|
7
|
+
size?: ImageSize;
|
|
8
|
+
aspect?: ImageAspect;
|
|
9
|
+
license?: ImageLicense;
|
|
10
|
+
results: ISearchResult[];
|
|
11
|
+
filePickerResult: IFilePickerResult;
|
|
12
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IWebSearchTabProps } from './IWebSearchTabProps';
|
|
3
|
+
import { IWebSearchTabState } from './IWebSearchTabState';
|
|
4
|
+
/**
|
|
5
|
+
* Renders search suggestions and performs seach queries
|
|
6
|
+
*/
|
|
7
|
+
export default class WebSearchTab extends React.Component<IWebSearchTabProps, IWebSearchTabState> {
|
|
8
|
+
private _columnCount;
|
|
9
|
+
private _columnWidth;
|
|
10
|
+
private _rowHeight;
|
|
11
|
+
private _selection;
|
|
12
|
+
private _listElem;
|
|
13
|
+
constructor(props: IWebSearchTabProps);
|
|
14
|
+
/**
|
|
15
|
+
* Render the tab
|
|
16
|
+
*/
|
|
17
|
+
render(): React.ReactElement<IWebSearchTabProps>;
|
|
18
|
+
private _onSelectionChanged;
|
|
19
|
+
/**
|
|
20
|
+
* Resets state of the control to the default one
|
|
21
|
+
*/
|
|
22
|
+
private _clearSearch;
|
|
23
|
+
/**
|
|
24
|
+
* Renders the returned search results
|
|
25
|
+
*/
|
|
26
|
+
private _renderSearchResults;
|
|
27
|
+
/**
|
|
28
|
+
* Show an individual search result item
|
|
29
|
+
*/
|
|
30
|
+
private _onRenderSearchResultsCell;
|
|
31
|
+
/**
|
|
32
|
+
* Renders suggestions when there aren't any queries
|
|
33
|
+
*/
|
|
34
|
+
private _renderSearchSuggestions;
|
|
35
|
+
/**
|
|
36
|
+
* Gets search results from Bing
|
|
37
|
+
*/
|
|
38
|
+
private _getSearchResults;
|
|
39
|
+
/**
|
|
40
|
+
* Calculates how many items there should be in the page
|
|
41
|
+
*/
|
|
42
|
+
private _getItemCountForPage;
|
|
43
|
+
/**
|
|
44
|
+
* Gets the height of a list "page"
|
|
45
|
+
*/
|
|
46
|
+
private _getPageHeight;
|
|
47
|
+
/**
|
|
48
|
+
* Renders a cell for search suggestions
|
|
49
|
+
*/
|
|
50
|
+
private _onRenderSuggestionCell;
|
|
51
|
+
/**
|
|
52
|
+
* Renders the search box
|
|
53
|
+
*/
|
|
54
|
+
private _renderSearchBox;
|
|
55
|
+
/**
|
|
56
|
+
* Handles when a user changes the size drop down.
|
|
57
|
+
* Resubmits search query
|
|
58
|
+
*/
|
|
59
|
+
private _handleChangeSize;
|
|
60
|
+
/**
|
|
61
|
+
* Handles when user selects a new layout from the drop down.
|
|
62
|
+
* Resubmits search query.
|
|
63
|
+
*/
|
|
64
|
+
private _handleChangeLayout;
|
|
65
|
+
/**
|
|
66
|
+
* Handles when a user changes the license from the drop down
|
|
67
|
+
* Resubits search query
|
|
68
|
+
*/
|
|
69
|
+
private _handleChangeLicense;
|
|
70
|
+
/**
|
|
71
|
+
* Renders the drop down placeholders
|
|
72
|
+
*/
|
|
73
|
+
private _renderFilterPlaceholder;
|
|
74
|
+
/**
|
|
75
|
+
* Handles when user triggers search query
|
|
76
|
+
*/
|
|
77
|
+
private _handleSearch;
|
|
78
|
+
/**
|
|
79
|
+
* Handles when user closes search pane
|
|
80
|
+
*/
|
|
81
|
+
private _handleClose;
|
|
82
|
+
/**
|
|
83
|
+
* Handes when user saves selection
|
|
84
|
+
* Calls property pane file picker's save function
|
|
85
|
+
*/
|
|
86
|
+
private _handleSave;
|
|
87
|
+
/**
|
|
88
|
+
* Creates a reference to the list
|
|
89
|
+
*/
|
|
90
|
+
private _linkElement;
|
|
91
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IPalette } from '@fluentui/react/lib/Styling';
|
|
2
|
+
export declare const getThemedStyles: (palette: Partial<IPalette>) => import("@fluentui/merge-styles/lib/IStyleSet").IProcessedStyleSet<{
|
|
3
|
+
filePickerFolderCardImage: {
|
|
4
|
+
color: string;
|
|
5
|
+
};
|
|
6
|
+
filePickerFolderCardLabel: {
|
|
7
|
+
color: string;
|
|
8
|
+
selectors: {
|
|
9
|
+
'&:hover': {
|
|
10
|
+
color: string;
|
|
11
|
+
};
|
|
12
|
+
'&:active': {
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
color: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
filePickerFolderCardTileFocusAfter: {
|
|
19
|
+
borderColor: string;
|
|
20
|
+
};
|
|
21
|
+
bingTileFocusAfter: {
|
|
22
|
+
borderColor: string;
|
|
23
|
+
boxShadow: string;
|
|
24
|
+
};
|
|
25
|
+
bingTileContent: {
|
|
26
|
+
borderColor: string;
|
|
27
|
+
};
|
|
28
|
+
bingTileFrame: {
|
|
29
|
+
boxShadow: string;
|
|
30
|
+
};
|
|
31
|
+
bingTileNamePlate: {
|
|
32
|
+
backgroundColor: string;
|
|
33
|
+
color: string;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ISearchSuggestion {
|
|
2
|
+
topic: string;
|
|
3
|
+
backgroundUrl: string;
|
|
4
|
+
}
|
|
5
|
+
export type ImageSize = 'All' | 'Small' | 'Medium' | 'Large' | 'Wallpaper';
|
|
6
|
+
export type ImageAspect = 'All' | 'Square' | 'Wide' | 'Tall';
|
|
7
|
+
export type ImageLicense = 'All' | 'Any';
|
|
8
|
+
/**
|
|
9
|
+
* Rows per page
|
|
10
|
+
*/
|
|
11
|
+
export declare const ROWS_PER_PAGE = 3;
|
|
12
|
+
/**
|
|
13
|
+
* Maximum row height
|
|
14
|
+
*/
|
|
15
|
+
export declare const MAX_ROW_HEIGHT = 250;
|
|
16
|
+
/**
|
|
17
|
+
* This is the default search suggestions as of Jan 2019.
|
|
18
|
+
* I have no idea where Bing gets them.
|
|
19
|
+
* But you can provide your own when calling this component
|
|
20
|
+
*/
|
|
21
|
+
export declare const DEFAULT_SUGGESTIONS: ISearchSuggestion[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IDocumentLibraryBrowserProps } from './IDocumentLibraryBrowserProps';
|
|
3
|
+
import { IDocumentLibraryBrowserState } from './IDocumentLibraryBrowserState';
|
|
4
|
+
/**
|
|
5
|
+
* Rows per page
|
|
6
|
+
*/
|
|
7
|
+
export declare const ROWS_PER_PAGE = 3;
|
|
8
|
+
/**
|
|
9
|
+
* Maximum row height
|
|
10
|
+
*/
|
|
11
|
+
export declare const MAX_ROW_HEIGHT = 250;
|
|
12
|
+
/**
|
|
13
|
+
* This would have been better done as an Office Fabric TileList, but it isn't available yet for production use
|
|
14
|
+
*/
|
|
15
|
+
export declare class DocumentLibraryBrowser extends React.Component<IDocumentLibraryBrowserProps, IDocumentLibraryBrowserState> {
|
|
16
|
+
private _columnCount;
|
|
17
|
+
private _columnWidth;
|
|
18
|
+
private _rowHeight;
|
|
19
|
+
constructor(props: IDocumentLibraryBrowserProps);
|
|
20
|
+
componentDidMount(): Promise<void>;
|
|
21
|
+
render(): React.ReactElement<IDocumentLibraryBrowserProps>;
|
|
22
|
+
/**
|
|
23
|
+
* Calculates how many items there should be in the page
|
|
24
|
+
*/
|
|
25
|
+
private _getItemCountForPage;
|
|
26
|
+
/**
|
|
27
|
+
* Gets the height of a list "page"
|
|
28
|
+
*/
|
|
29
|
+
private _getPageHeight;
|
|
30
|
+
/**
|
|
31
|
+
* Renders a cell for search suggestions
|
|
32
|
+
*/
|
|
33
|
+
private _onRenderLibraryTile;
|
|
34
|
+
/**
|
|
35
|
+
* Calls parent when library is opened
|
|
36
|
+
*/
|
|
37
|
+
private _handleOpenLibrary;
|
|
38
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IPalette } from '@fluentui/react/lib/Styling';
|
|
2
|
+
export declare const getThemedStyles: (palette: Partial<IPalette>) => import("@fluentui/merge-styles/lib/IStyleSet").IProcessedStyleSet<{
|
|
3
|
+
filePickerFolderCardTileFocus: {
|
|
4
|
+
selectors: {
|
|
5
|
+
':global(.ms-Fabric--isFocusVisible) &:focus:after': {
|
|
6
|
+
borderColor: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
filePickerFolderCardImage: {
|
|
11
|
+
color: string;
|
|
12
|
+
};
|
|
13
|
+
filePickerFolderCardLabel: {
|
|
14
|
+
color: string;
|
|
15
|
+
selectors: {
|
|
16
|
+
'&:hover': {
|
|
17
|
+
color: string;
|
|
18
|
+
};
|
|
19
|
+
'&:active': {
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
color: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}>;
|