@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,41 @@
|
|
|
1
|
+
import { DisplayMode } from '@microsoft/sp-core-library';
|
|
2
|
+
import { WebPartContext } from '@microsoft/sp-webpart-base';
|
|
3
|
+
import { ErrorService } from '../errorBoundary/errorService';
|
|
4
|
+
export interface IRichTextEditorProps {
|
|
5
|
+
/** The SPFx WebPartContext from the host web part. Required for file picker access. */
|
|
6
|
+
spfxContext: WebPartContext;
|
|
7
|
+
/** Current DisplayMode from @microsoft/sp-core-library. */
|
|
8
|
+
displayMode: DisplayMode;
|
|
9
|
+
/** HTML content to display / edit. */
|
|
10
|
+
value?: string;
|
|
11
|
+
/** Called whenever the HTML content changes. */
|
|
12
|
+
onChange?: (textContent: string) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Optional ErrorService instance. If omitted, a default instance is created.
|
|
15
|
+
* Register your own error handlers via errorService.register(...).
|
|
16
|
+
*/
|
|
17
|
+
errorService?: ErrorService;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Self-contained Rich Text Editor component.
|
|
21
|
+
*
|
|
22
|
+
* Wraps SyncFusion EJ2 RichTextEditor with SharePoint file pickers for images
|
|
23
|
+
* and videos. Provides its own SyncFusion provider and RTE context — simply
|
|
24
|
+
* drop it into your web part render output.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* import { RichTextEditor, ErrorService } from '@hansevision/tp-richtexteditor-control';
|
|
29
|
+
*
|
|
30
|
+
* const errorService = new ErrorService();
|
|
31
|
+
*
|
|
32
|
+
* <RichTextEditor
|
|
33
|
+
* spfxContext={this.context}
|
|
34
|
+
* displayMode={this.displayMode}
|
|
35
|
+
* value={this.properties.textContent}
|
|
36
|
+
* onChange={(html) => { this.properties.textContent = html; }}
|
|
37
|
+
* errorService={errorService}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function RichTextEditor({ spfxContext, displayMode, value, onChange, errorService }: IRichTextEditorProps): JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { WebPartContext } from '@microsoft/sp-webpart-base';
|
|
2
|
+
import { ErrorService } from '../errorBoundary/errorService';
|
|
3
|
+
import { DisplayMode } from '@microsoft/sp-core-library';
|
|
4
|
+
/**
|
|
5
|
+
* Props / context shape exposed by the RichTextEditor NPM package.
|
|
6
|
+
* Mirrors the IRichTextEditorContext that previously lived in RichTextEditorApp.tsx
|
|
7
|
+
* inside the SPFx web part project.
|
|
8
|
+
*/
|
|
9
|
+
export interface IRichTextEditorContext {
|
|
10
|
+
spfxContext: WebPartContext;
|
|
11
|
+
displayMode: DisplayMode;
|
|
12
|
+
errorService: ErrorService;
|
|
13
|
+
/** Current HTML content of the editor. */
|
|
14
|
+
value?: string;
|
|
15
|
+
onChange?: (textContent: string) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* React context consumed by all sub-components of RichTextEditor.
|
|
19
|
+
* Populated by the <RichTextEditor> component itself.
|
|
20
|
+
*/
|
|
21
|
+
export declare const RichTextEditorContext: import("react").Context<IRichTextEditorContext>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IToolbarItems } from '@syncfusion/ej2-react-richtexteditor';
|
|
2
|
+
interface IProps {
|
|
3
|
+
onClick: () => void;
|
|
4
|
+
icon: string;
|
|
5
|
+
toolTipText: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CustomToolbarItem: ({ icon, onClick, toolTipText, id }: IProps) => IToolbarItems;
|
|
9
|
+
export {};
|
package/dist/richTextEditor/components/controls/VideoPickerControl/ContainsValueChangedObserver.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ContainsValueChangedObserver(rteContentContainer: HTMLElement, onContainsValueChanged?: (containsValue: boolean) => void): MutationObserver;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ICultureInfo } from './SPEntities';
|
|
2
|
+
/**
|
|
3
|
+
* Key that is used to store loaded fields in sessionStorage
|
|
4
|
+
*/
|
|
5
|
+
export declare const LoadedViewFieldsKey = "LBLoadedViewFields";
|
|
6
|
+
/**
|
|
7
|
+
* Mapping between current field name and the name of the real field that contains the data
|
|
8
|
+
*/
|
|
9
|
+
export declare const FieldNamesMapping: {
|
|
10
|
+
Title: {
|
|
11
|
+
storedName: string;
|
|
12
|
+
};
|
|
13
|
+
LinkTitle: {
|
|
14
|
+
storedName: string;
|
|
15
|
+
};
|
|
16
|
+
LinkTitleNoMenu: {
|
|
17
|
+
storedName: string;
|
|
18
|
+
};
|
|
19
|
+
LinkFilename: {
|
|
20
|
+
storedName: string;
|
|
21
|
+
};
|
|
22
|
+
LinkFileNameNoMenu: {
|
|
23
|
+
storedName: string;
|
|
24
|
+
};
|
|
25
|
+
FileLeafRef: {
|
|
26
|
+
storedName: string;
|
|
27
|
+
};
|
|
28
|
+
URL: {
|
|
29
|
+
storedName: string;
|
|
30
|
+
};
|
|
31
|
+
URLwMenu: {
|
|
32
|
+
storedName: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Invariant Culture
|
|
37
|
+
*/
|
|
38
|
+
export declare const InvariantCulture: ICultureInfo;
|
|
39
|
+
export declare const EmptyGuid = "00000000-0000-0000-0000-000000000000";
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents SP ContentType Id
|
|
3
|
+
*/
|
|
4
|
+
export interface ISPContentTypeId {
|
|
5
|
+
StringValue: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Represents SP List ContentType
|
|
9
|
+
*/
|
|
10
|
+
export interface ISPListContentType {
|
|
11
|
+
Id: ISPContentTypeId;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Represents SP List
|
|
15
|
+
*/
|
|
16
|
+
export interface ISPList {
|
|
17
|
+
Id: string;
|
|
18
|
+
Title: string;
|
|
19
|
+
BaseTemplate: string;
|
|
20
|
+
ContentTypes?: ISPListContentType[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Replica of the returned value from the REST api
|
|
24
|
+
*/
|
|
25
|
+
export interface ISPLists {
|
|
26
|
+
value: ISPList[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Represents SP Field
|
|
30
|
+
*/
|
|
31
|
+
export interface ISPField {
|
|
32
|
+
Id: string;
|
|
33
|
+
Format?: string;
|
|
34
|
+
RichText?: boolean;
|
|
35
|
+
SchemaXml?: string;
|
|
36
|
+
LookupDisplayUrl?: string;
|
|
37
|
+
TypeAsString?: string;
|
|
38
|
+
ResultType?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Represents value of Lookup Field (single lookup)
|
|
42
|
+
*/
|
|
43
|
+
export interface ISPFieldLookupValue {
|
|
44
|
+
lookupId: string;
|
|
45
|
+
lookupValue: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Represents Term from Taxonomy Field value
|
|
49
|
+
*/
|
|
50
|
+
export interface ITerm {
|
|
51
|
+
Label: string;
|
|
52
|
+
TermID: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Represents a principal value as it is stored in People and Groups field
|
|
56
|
+
*/
|
|
57
|
+
export interface IPrincipal {
|
|
58
|
+
id: string;
|
|
59
|
+
email: string;
|
|
60
|
+
department: string;
|
|
61
|
+
jobTitle: string;
|
|
62
|
+
sip: string;
|
|
63
|
+
title: string;
|
|
64
|
+
value: string;
|
|
65
|
+
picture: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Custom interface to store user profile properties
|
|
69
|
+
*/
|
|
70
|
+
export interface IUserProfileProperties {
|
|
71
|
+
displayName?: string;
|
|
72
|
+
jobTitle?: string;
|
|
73
|
+
email?: string;
|
|
74
|
+
workPhone?: string;
|
|
75
|
+
cellPhone?: string;
|
|
76
|
+
department?: string;
|
|
77
|
+
pictureUrl?: string;
|
|
78
|
+
sip?: string;
|
|
79
|
+
userUrl?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* KeyValuePair returned by SP REST API
|
|
83
|
+
*/
|
|
84
|
+
export interface IODataKeyValuePair {
|
|
85
|
+
Key: string;
|
|
86
|
+
Value: string;
|
|
87
|
+
ValueType: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Replica of Microsoft's Calendar definition for CultureInfo object
|
|
91
|
+
*/
|
|
92
|
+
export interface ICultureCalendar {
|
|
93
|
+
AlgorithmType: number;
|
|
94
|
+
CalendarType: number;
|
|
95
|
+
Eras: number[];
|
|
96
|
+
IsReadOnly: boolean;
|
|
97
|
+
MaxSupportedDateTime: string;
|
|
98
|
+
MinSupportedDateTime: string;
|
|
99
|
+
TwoDigitYearMax: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Replica of Microsoft's DateTimeFormat definition for CultureInfo object
|
|
103
|
+
*/
|
|
104
|
+
export interface ICultureDateTimeFormat {
|
|
105
|
+
AMDesignator: string;
|
|
106
|
+
AbbreviatedDayNames: string[];
|
|
107
|
+
AbbreviatedMonthGenitiveNames: string[];
|
|
108
|
+
AbbreviatedMonthNames: string[];
|
|
109
|
+
Calendar: ICultureCalendar;
|
|
110
|
+
CalendarWeekRule: number;
|
|
111
|
+
DateSeparator: string;
|
|
112
|
+
DayNames: string[];
|
|
113
|
+
FirstDayOfWeek: number;
|
|
114
|
+
FullDateTimePattern: string;
|
|
115
|
+
IsReadOnly: boolean;
|
|
116
|
+
LongDatePattern: string;
|
|
117
|
+
LongTimePattern: string;
|
|
118
|
+
MonthDayPattern: string;
|
|
119
|
+
MonthGenitiveNames: string[];
|
|
120
|
+
MonthNames: string[];
|
|
121
|
+
NativeCalendarName: string;
|
|
122
|
+
PMDesignator: string;
|
|
123
|
+
RFC1123Pattern: string;
|
|
124
|
+
ShortDatePattern: string;
|
|
125
|
+
ShortTimePattern: string;
|
|
126
|
+
ShortestDayNames: string[];
|
|
127
|
+
SortableDateTimePattern: string;
|
|
128
|
+
TimeSeparator: string;
|
|
129
|
+
UniversalSortableDateTimePattern: string;
|
|
130
|
+
YearMonthPattern: string;
|
|
131
|
+
eras: any[];
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Replica of Microsoft's NumberFormat definition for CultureInfo object
|
|
135
|
+
*/
|
|
136
|
+
export interface ICultureNumberFormat {
|
|
137
|
+
CurrencyDecimalDigits: number;
|
|
138
|
+
CurrencyDecimalSeparator: string;
|
|
139
|
+
CurrencyGroupSeparator: string;
|
|
140
|
+
CurrencyGroupSizes: number[];
|
|
141
|
+
CurrencyNegativePattern: number;
|
|
142
|
+
CurrencyPositivePattern: number;
|
|
143
|
+
CurrencySymbol: string;
|
|
144
|
+
DigitSubstitution: number;
|
|
145
|
+
IsReadOnly: boolean;
|
|
146
|
+
NaNSymbol: string;
|
|
147
|
+
NativeDigits: string[];
|
|
148
|
+
NegativeInfinitySymbol: string;
|
|
149
|
+
NegativeSign: string;
|
|
150
|
+
NumberDecimalDigits: number;
|
|
151
|
+
NumberDecimalSeparator: string;
|
|
152
|
+
NumberGroupSeparator: string;
|
|
153
|
+
NumberGroupSizes: number[];
|
|
154
|
+
NumberNegativePattern: number;
|
|
155
|
+
PerMilleSymbol: string;
|
|
156
|
+
PercentDecimalDigits: number;
|
|
157
|
+
PercentDecimalSeparator: string;
|
|
158
|
+
PercentGroupSeparator: string;
|
|
159
|
+
PercentGroupSizes: number[];
|
|
160
|
+
PercentNegativePattern: number;
|
|
161
|
+
PercentPositivePattern: number;
|
|
162
|
+
PercentSymbol: string;
|
|
163
|
+
PositiveInfinitySymbol: string;
|
|
164
|
+
PositiveSign: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Replica of Microsoft's CultureInfo definition
|
|
168
|
+
*/
|
|
169
|
+
export interface ICultureInfo {
|
|
170
|
+
name: string;
|
|
171
|
+
dateTimeFormat: ICultureDateTimeFormat;
|
|
172
|
+
numberFormat: ICultureNumberFormat;
|
|
173
|
+
}
|
|
174
|
+
export interface IUploadImageResult {
|
|
175
|
+
Name: string;
|
|
176
|
+
ServerRelativeUrl: string;
|
|
177
|
+
UniqueId: string;
|
|
178
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SPHttpClient } from '@microsoft/sp-http';
|
|
2
|
+
import { ListViewAccessor } from '@microsoft/sp-listview-extensibility';
|
|
3
|
+
import { PageContext, SPField } from '@microsoft/sp-page-context';
|
|
4
|
+
import { ISPField } from './SPEntities';
|
|
5
|
+
/**
|
|
6
|
+
* Customizer context interface.
|
|
7
|
+
* Can be used in different types of customizers
|
|
8
|
+
*/
|
|
9
|
+
export interface IContext {
|
|
10
|
+
spHttpClient: SPHttpClient;
|
|
11
|
+
pageContext: PageContext;
|
|
12
|
+
listView?: ListViewAccessor | null;
|
|
13
|
+
field?: SPField | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Interface that represents dictionary of fields
|
|
17
|
+
*/
|
|
18
|
+
export interface IFields {
|
|
19
|
+
[id: string]: ISPField;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Parent of all props interfaces that needs context
|
|
23
|
+
*/
|
|
24
|
+
export interface IProps {
|
|
25
|
+
context: IContext;
|
|
26
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IDragDropFilesProps, IDragDropFilesState } from './IDragDropFiles';
|
|
3
|
+
/**
|
|
4
|
+
* DragDropFiles Class Control
|
|
5
|
+
*/
|
|
6
|
+
export declare class DragDropFiles extends React.Component<IDragDropFilesProps, IDragDropFilesState> {
|
|
7
|
+
private dragCounter;
|
|
8
|
+
private dropRef;
|
|
9
|
+
private _LabelMessage;
|
|
10
|
+
private _IconName;
|
|
11
|
+
private _dropEffect;
|
|
12
|
+
private _enable;
|
|
13
|
+
constructor(props: IDragDropFilesProps);
|
|
14
|
+
/**
|
|
15
|
+
* Lifecycle hook when component is mounted
|
|
16
|
+
*/
|
|
17
|
+
componentDidMount(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Stop listeners from onDragOver event.
|
|
20
|
+
* @param e
|
|
21
|
+
*/
|
|
22
|
+
private handleonDragOver;
|
|
23
|
+
/**
|
|
24
|
+
* Stop listeners from onDragEnter event, enable drag and drop view.
|
|
25
|
+
* @param e
|
|
26
|
+
*/
|
|
27
|
+
private handleonDragEnter;
|
|
28
|
+
/**
|
|
29
|
+
* Stop listeners from ondragenter event, disable drag and drop view.
|
|
30
|
+
* @param e
|
|
31
|
+
*/
|
|
32
|
+
private handleonDragLeave;
|
|
33
|
+
/**
|
|
34
|
+
* Stop listeners from onDrop event and load files to property onDrop.
|
|
35
|
+
* @param e
|
|
36
|
+
*/
|
|
37
|
+
private handleonDrop;
|
|
38
|
+
/**
|
|
39
|
+
* Add File to Array Files of type File[]
|
|
40
|
+
* https://www.meziantou.net/upload-files-and-directories-using-an-input-drag-and-drop-or-copy-and-paste-with.htm
|
|
41
|
+
* @param dataTransfer
|
|
42
|
+
*/
|
|
43
|
+
private getFilesAsync;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param entry
|
|
47
|
+
*/
|
|
48
|
+
private readEntryContentAsync;
|
|
49
|
+
/**
|
|
50
|
+
* Default React component render method
|
|
51
|
+
*/
|
|
52
|
+
render(): React.ReactElement<IDragDropFilesProps>;
|
|
53
|
+
}
|
package/dist/richTextEditor/components/filePicker/components/dragDropFiles/IDragDropFiles.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface IDragDropFilesProps {
|
|
3
|
+
/**
|
|
4
|
+
* Specifies the dropEffect, default is 'none'
|
|
5
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/dropEffect
|
|
6
|
+
*/
|
|
7
|
+
dropEffect?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the label of the file picker button
|
|
10
|
+
*/
|
|
11
|
+
labelMessage?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Specifies the icon to display
|
|
14
|
+
*/
|
|
15
|
+
iconName?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Handler to return the files from drag and drop.
|
|
18
|
+
**/
|
|
19
|
+
onDrop?: any;
|
|
20
|
+
/**
|
|
21
|
+
* Specify if drag and drop option is enable.
|
|
22
|
+
**/
|
|
23
|
+
enable?: boolean;
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export interface IDragDropFilesState {
|
|
27
|
+
dragStatus?: boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
|
|
3
|
+
/**
|
|
4
|
+
* Attachments renderer props
|
|
5
|
+
*/
|
|
6
|
+
export interface IFieldAttachmentsRendererProps extends IFieldRendererProps {
|
|
7
|
+
/**
|
|
8
|
+
* amount of attachments
|
|
9
|
+
*/
|
|
10
|
+
count?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* For future
|
|
14
|
+
*/
|
|
15
|
+
export interface IFieldAttahcmentsRendererState {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Attachments Renderer.
|
|
19
|
+
* Used for:
|
|
20
|
+
* - Attachments
|
|
21
|
+
*/
|
|
22
|
+
export declare class FieldAttachmentsRenderer extends React.Component<IFieldAttachmentsRendererProps, IFieldAttahcmentsRendererState> {
|
|
23
|
+
constructor(props: IFieldAttachmentsRendererProps, state: IFieldAttahcmentsRendererState);
|
|
24
|
+
render(): JSX.Element;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
|
|
3
|
+
export interface IFieldBaseTextRendererProps extends IFieldRendererProps {
|
|
4
|
+
/**
|
|
5
|
+
* text to be displayed
|
|
6
|
+
*/
|
|
7
|
+
text?: string;
|
|
8
|
+
/**
|
|
9
|
+
* true if no need to render span element with text content
|
|
10
|
+
*/
|
|
11
|
+
noTextRender?: boolean;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* For future
|
|
16
|
+
*/
|
|
17
|
+
export interface IFieldBaseTextRendererState {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Base renderer. Used to render text.
|
|
21
|
+
*/
|
|
22
|
+
export declare class FieldBaseTextRenderer extends React.Component<IFieldBaseTextRendererProps, IFieldBaseTextRendererState> {
|
|
23
|
+
constructor(props: IFieldBaseTextRendererProps, state: IFieldBaseTextRendererState);
|
|
24
|
+
render(): JSX.Element;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ICssInput } from '@fluentui/react/lib/Utilities';
|
|
3
|
+
/**
|
|
4
|
+
* base properties for field renderes
|
|
5
|
+
*/
|
|
6
|
+
export interface IFieldRendererProps {
|
|
7
|
+
/**
|
|
8
|
+
* CSS styles to apply to the renderer
|
|
9
|
+
*/
|
|
10
|
+
cssProps?: React.CSSProperties;
|
|
11
|
+
/**
|
|
12
|
+
* CSS classes to apply to the renderer
|
|
13
|
+
*/
|
|
14
|
+
className?: ICssInput;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IFieldRendererProps';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
|
|
3
|
+
export interface IFieldDateRendererProps extends IFieldRendererProps {
|
|
4
|
+
/**
|
|
5
|
+
* text to be rendered
|
|
6
|
+
*/
|
|
7
|
+
text?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* For future
|
|
11
|
+
*/
|
|
12
|
+
export interface IFieldDateRendererState {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Field Date Renderer.
|
|
16
|
+
* Used for:
|
|
17
|
+
* - Date Time
|
|
18
|
+
*/
|
|
19
|
+
export declare class FieldDateRenderer extends React.Component<IFieldDateRendererProps, IFieldDateRendererState> {
|
|
20
|
+
constructor(props: IFieldDateRendererProps, state: IFieldDateRendererState);
|
|
21
|
+
render(): JSX.Element;
|
|
22
|
+
}
|
package/dist/richTextEditor/components/filePicker/components/fields/fieldDateRenderer/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FieldDateRenderer';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
|
|
3
|
+
export interface IFieldFileTypeRendererProps extends IFieldRendererProps {
|
|
4
|
+
/**
|
|
5
|
+
* file/document path
|
|
6
|
+
*/
|
|
7
|
+
path: string;
|
|
8
|
+
/**
|
|
9
|
+
* true if the icon should be rendered for a folder, not file
|
|
10
|
+
*/
|
|
11
|
+
isFolder?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* For future
|
|
15
|
+
*/
|
|
16
|
+
export interface IFieldFileTypeRendererState {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* File Type Renderer.
|
|
20
|
+
* Used for:
|
|
21
|
+
* - File/Document Type
|
|
22
|
+
*/
|
|
23
|
+
export declare class FieldFileTypeRenderer extends React.Component<IFieldFileTypeRendererProps, IFieldFileTypeRendererState> {
|
|
24
|
+
constructor(props: IFieldFileTypeRendererProps, state: IFieldFileTypeRendererState);
|
|
25
|
+
render(): JSX.Element;
|
|
26
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IContext } from '../../../common/interfaces';
|
|
3
|
+
import { ISPFieldLookupValue } from '../../../common/SPEntities';
|
|
4
|
+
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
|
|
5
|
+
/**
|
|
6
|
+
* Field Lookup Renderer Props
|
|
7
|
+
* There are 3 options to provide the props:
|
|
8
|
+
* - [recommended, used in FieldRendererHelper] Provide fieldId and context. In that case request for DispUrl will be sent only if a user clicks on the value
|
|
9
|
+
* - Provide dispFormUrl: if you know this URL a priori you can provide it into the renderer
|
|
10
|
+
* - Provide onClick handler to handle value's click event outside the renderer
|
|
11
|
+
*/
|
|
12
|
+
export interface IFieldLookupRendererProps extends IFieldRendererProps {
|
|
13
|
+
/**
|
|
14
|
+
* lookup values
|
|
15
|
+
*/
|
|
16
|
+
lookups: ISPFieldLookupValue[];
|
|
17
|
+
/**
|
|
18
|
+
* url of Display form for the list that is referenced in the lookup
|
|
19
|
+
*/
|
|
20
|
+
dispFormUrl?: string;
|
|
21
|
+
/**
|
|
22
|
+
* custom event handler of lookup item click. If not set the dialog with Display Form will be shown
|
|
23
|
+
*/
|
|
24
|
+
onClick?: (args: IFieldLookupClickEventArgs) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Field's id.
|
|
27
|
+
*/
|
|
28
|
+
fieldId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Customizer context. Must be providede if fieldId is set
|
|
31
|
+
*/
|
|
32
|
+
context?: IContext;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Field Lookup Renderer State
|
|
36
|
+
*/
|
|
37
|
+
export interface IFieldLookupRendererState {
|
|
38
|
+
hideDialog?: boolean;
|
|
39
|
+
lookupDispFormUrl?: string;
|
|
40
|
+
dispFormUrl?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Lookup click event arguments
|
|
44
|
+
*/
|
|
45
|
+
export interface IFieldLookupClickEventArgs {
|
|
46
|
+
lookup?: ISPFieldLookupValue;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Field Lookup Renderer.
|
|
50
|
+
* Used for:
|
|
51
|
+
* - Lookup, LookupMulti
|
|
52
|
+
*/
|
|
53
|
+
export declare class FieldLookupRenderer extends React.Component<IFieldLookupRendererProps, IFieldLookupRendererState> {
|
|
54
|
+
constructor(props: IFieldLookupRendererProps, state: IFieldLookupRendererState);
|
|
55
|
+
render(): JSX.Element;
|
|
56
|
+
private _onClick;
|
|
57
|
+
private _onIframeLoaded;
|
|
58
|
+
private _onDialogDismiss;
|
|
59
|
+
}
|