@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.
Files changed (157) hide show
  1. package/README.md +74 -0
  2. package/dist/errorBoundary/errorBoundary.d.ts +18 -0
  3. package/dist/errorBoundary/errorService.d.ts +6 -0
  4. package/dist/errorBoundary/i18n/IErrorBoundaryStrings.d.ts +6 -0
  5. package/dist/errorBoundary/i18n/de.d.ts +3 -0
  6. package/dist/errorBoundary/i18n/en.d.ts +3 -0
  7. package/dist/errorBoundary/i18n/errorBoundaryStrings.d.ts +3 -0
  8. package/dist/errorBoundary/interfaces/IRepairError.d.ts +8 -0
  9. package/dist/i18n.d.ts +6 -0
  10. package/dist/index.d.ts +5 -0
  11. package/dist/index.esm.js +10690 -0
  12. package/dist/index.esm.js.map +1 -0
  13. package/dist/index.js +10712 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/richTextEditor/RichTextEditor.d.ts +41 -0
  16. package/dist/richTextEditor/RichTextEditorContext.d.ts +21 -0
  17. package/dist/richTextEditor/components/controls/CustomTool.d.ts +9 -0
  18. package/dist/richTextEditor/components/controls/ImagePickerControl.d.ts +3 -0
  19. package/dist/richTextEditor/components/controls/VideoPickerControl/ContainsValueChangedObserver.d.ts +1 -0
  20. package/dist/richTextEditor/components/controls/VideoPickerControl/VideoPickerControl.d.ts +4 -0
  21. package/dist/richTextEditor/components/controls/handleUpload.d.ts +3 -0
  22. package/dist/richTextEditor/components/dialogs/progressDialog.d.ts +4 -0
  23. package/dist/richTextEditor/components/filePicker/common/Constants.d.ts +39 -0
  24. package/dist/richTextEditor/components/filePicker/common/SPEntities.d.ts +178 -0
  25. package/dist/richTextEditor/components/filePicker/common/interfaces.d.ts +26 -0
  26. package/dist/richTextEditor/components/filePicker/components/dragDropFiles/DragDropFiles.d.ts +53 -0
  27. package/dist/richTextEditor/components/filePicker/components/dragDropFiles/IDragDropFiles.d.ts +28 -0
  28. package/dist/richTextEditor/components/filePicker/components/dragDropFiles/index.d.ts +2 -0
  29. package/dist/richTextEditor/components/filePicker/components/fields/fieldAttachmentsRenderer/FieldAttachmentsRenderer.d.ts +25 -0
  30. package/dist/richTextEditor/components/filePicker/components/fields/fieldAttachmentsRenderer/index.d.ts +2 -0
  31. package/dist/richTextEditor/components/filePicker/components/fields/fieldBaseTextRenderer/FieldBaseTextRenderer.d.ts +25 -0
  32. package/dist/richTextEditor/components/filePicker/components/fields/fieldBaseTextRenderer/index.d.ts +2 -0
  33. package/dist/richTextEditor/components/filePicker/components/fields/fieldCommon/IFieldRendererProps.d.ts +15 -0
  34. package/dist/richTextEditor/components/filePicker/components/fields/fieldCommon/index.d.ts +1 -0
  35. package/dist/richTextEditor/components/filePicker/components/fields/fieldDateRenderer/FieldDateRenderer.d.ts +22 -0
  36. package/dist/richTextEditor/components/filePicker/components/fields/fieldDateRenderer/index.d.ts +1 -0
  37. package/dist/richTextEditor/components/filePicker/components/fields/fieldFileTypeRenderer/FieldFileTypeRenderer.d.ts +26 -0
  38. package/dist/richTextEditor/components/filePicker/components/fields/fieldFileTypeRenderer/index.d.ts +2 -0
  39. package/dist/richTextEditor/components/filePicker/components/fields/fieldLookupRenderer/FieldLookupRenderer.d.ts +59 -0
  40. package/dist/richTextEditor/components/filePicker/components/fields/fieldLookupRenderer/index.d.ts +2 -0
  41. package/dist/richTextEditor/components/filePicker/components/fields/fieldNameRenderer/FieldNameRenderer.d.ts +60 -0
  42. package/dist/richTextEditor/components/filePicker/components/fields/fieldNameRenderer/index.d.ts +2 -0
  43. package/dist/richTextEditor/components/filePicker/components/fields/fieldTaxonomyRenderer/FieldTaxonomyRenderer.d.ts +23 -0
  44. package/dist/richTextEditor/components/filePicker/components/fields/fieldTaxonomyRenderer/index.d.ts +2 -0
  45. package/dist/richTextEditor/components/filePicker/components/fields/fieldTextRenderer/FieldTextRenderer.d.ts +35 -0
  46. package/dist/richTextEditor/components/filePicker/components/fields/fieldTextRenderer/index.d.ts +2 -0
  47. package/dist/richTextEditor/components/filePicker/components/fields/fieldTitleRenderer/FieldTitleRenderer.d.ts +50 -0
  48. package/dist/richTextEditor/components/filePicker/components/fields/fieldTitleRenderer/index.d.ts +1 -0
  49. package/dist/richTextEditor/components/filePicker/components/fields/fieldUrlRenderer/FieldUrlRenderer.d.ts +31 -0
  50. package/dist/richTextEditor/components/filePicker/components/fields/fieldUrlRenderer/index.d.ts +2 -0
  51. package/dist/richTextEditor/components/filePicker/components/fields/fieldUserRenderer/FieldUserHoverCard.d.ts +26 -0
  52. package/dist/richTextEditor/components/filePicker/components/fields/fieldUserRenderer/FieldUserRenderer.d.ts +103 -0
  53. package/dist/richTextEditor/components/filePicker/components/fields/fieldUserRenderer/index.d.ts +3 -0
  54. package/dist/richTextEditor/components/filePicker/components/filePicker/FilePicker.d.ts +45 -0
  55. package/dist/richTextEditor/components/filePicker/components/filePicker/FilePicker.themedStyles.d.ts +28 -0
  56. package/dist/richTextEditor/components/filePicker/components/filePicker/FilePicker.types.d.ts +46 -0
  57. package/dist/richTextEditor/components/filePicker/components/filePicker/IFilePickerProps.d.ts +147 -0
  58. package/dist/richTextEditor/components/filePicker/components/filePicker/IFilePickerState.d.ts +7 -0
  59. package/dist/richTextEditor/components/filePicker/components/filePicker/LinkFilePickerTab/ILinkFilePickerTabProps.d.ts +8 -0
  60. package/dist/richTextEditor/components/filePicker/components/filePicker/LinkFilePickerTab/ILinkFilePickerTabState.d.ts +5 -0
  61. package/dist/richTextEditor/components/filePicker/components/filePicker/LinkFilePickerTab/LinkFilePickerTab.d.ts +30 -0
  62. package/dist/richTextEditor/components/filePicker/components/filePicker/LinkFilePickerTab/index.d.ts +3 -0
  63. package/dist/richTextEditor/components/filePicker/components/filePicker/MultipleUploadFilePickerTab/IMultipleUploadFilePickerTabProps.d.ts +5 -0
  64. package/dist/richTextEditor/components/filePicker/components/filePicker/MultipleUploadFilePickerTab/IMultipleUploadFilePickerTabState.d.ts +5 -0
  65. package/dist/richTextEditor/components/filePicker/components/filePicker/MultipleUploadFilePickerTab/MultipleUploadFilePickerTab.d.ts +24 -0
  66. package/dist/richTextEditor/components/filePicker/components/filePicker/MultipleUploadFilePickerTab/MultipleUploadFilePickerTab.themedStyles.d.ts +9 -0
  67. package/dist/richTextEditor/components/filePicker/components/filePicker/MultipleUploadFilePickerTab/index.d.ts +3 -0
  68. package/dist/richTextEditor/components/filePicker/components/filePicker/OneDriveFilesTab/IOneDriveFilesTabProps.d.ts +5 -0
  69. package/dist/richTextEditor/components/filePicker/components/filePicker/OneDriveFilesTab/IOneDriveFilesTabState.d.ts +10 -0
  70. package/dist/richTextEditor/components/filePicker/components/filePicker/OneDriveFilesTab/OneDriveFilesTab.d.ts +29 -0
  71. package/dist/richTextEditor/components/filePicker/components/filePicker/OneDriveFilesTab/OneDriveFilesTab.types.d.ts +5 -0
  72. package/dist/richTextEditor/components/filePicker/components/filePicker/OneDriveFilesTab/index.d.ts +3 -0
  73. package/dist/richTextEditor/components/filePicker/components/filePicker/RecentFilesTab/IRecentFilesTabProps.d.ts +5 -0
  74. package/dist/richTextEditor/components/filePicker/components/filePicker/RecentFilesTab/IRecentFilesTabState.d.ts +7 -0
  75. package/dist/richTextEditor/components/filePicker/components/filePicker/RecentFilesTab/RecentFilesTab.d.ts +59 -0
  76. package/dist/richTextEditor/components/filePicker/components/filePicker/RecentFilesTab/RecentFilesTab.themedStyles.d.ts +24 -0
  77. package/dist/richTextEditor/components/filePicker/components/filePicker/RecentFilesTab/index.d.ts +3 -0
  78. package/dist/richTextEditor/components/filePicker/components/filePicker/SiteFilePickerTab/ISiteFilePickerTabProps.d.ts +19 -0
  79. package/dist/richTextEditor/components/filePicker/components/filePicker/SiteFilePickerTab/ISiteFilePickerTabState.d.ts +9 -0
  80. package/dist/richTextEditor/components/filePicker/components/filePicker/SiteFilePickerTab/SiteFilePickerTab.d.ts +36 -0
  81. package/dist/richTextEditor/components/filePicker/components/filePicker/SiteFilePickerTab/index.d.ts +3 -0
  82. package/dist/richTextEditor/components/filePicker/components/filePicker/StockImagesTab/IStockImagesProps.d.ts +8 -0
  83. package/dist/richTextEditor/components/filePicker/components/filePicker/StockImagesTab/StockImageSizeType.d.ts +1 -0
  84. package/dist/richTextEditor/components/filePicker/components/filePicker/StockImagesTab/StockImages.d.ts +17 -0
  85. package/dist/richTextEditor/components/filePicker/components/filePicker/StockImagesTab/StockImagesModel.d.ts +31 -0
  86. package/dist/richTextEditor/components/filePicker/components/filePicker/StockImagesTab/index.d.ts +3 -0
  87. package/dist/richTextEditor/components/filePicker/components/filePicker/UploadFilePickerTab/IUploadFilePickerTabProps.d.ts +5 -0
  88. package/dist/richTextEditor/components/filePicker/components/filePicker/UploadFilePickerTab/IUploadFilePickerTabState.d.ts +5 -0
  89. package/dist/richTextEditor/components/filePicker/components/filePicker/UploadFilePickerTab/UploadFilePickerTab.d.ts +20 -0
  90. package/dist/richTextEditor/components/filePicker/components/filePicker/UploadFilePickerTab/UploadFilePickerTab.themedStyles.d.ts +9 -0
  91. package/dist/richTextEditor/components/filePicker/components/filePicker/UploadFilePickerTab/index.d.ts +3 -0
  92. package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/IWebSearchTabProps.d.ts +7 -0
  93. package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/IWebSearchTabState.d.ts +12 -0
  94. package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/WebSearchTab.d.ts +91 -0
  95. package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/WebSearchTab.themedStyles.d.ts +35 -0
  96. package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/WebSearchTab.types.d.ts +21 -0
  97. package/dist/richTextEditor/components/filePicker/components/filePicker/WebSearchTab/index.d.ts +4 -0
  98. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentLibraryBrowser/DocumentLibraryBrowser.d.ts +38 -0
  99. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentLibraryBrowser/DocumentLibraryBrowser.themedStyles.d.ts +25 -0
  100. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentLibraryBrowser/IDocumentLibraryBrowserProps.d.ts +7 -0
  101. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentLibraryBrowser/IDocumentLibraryBrowserState.d.ts +5 -0
  102. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentLibraryBrowser/index.d.ts +3 -0
  103. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentTile/DocumentTile.d.ts +5 -0
  104. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentTile/IDocumentTileProps.d.ts +12 -0
  105. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/DocumentTile/index.d.ts +2 -0
  106. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FileBrowser/FileBrowser.d.ts +56 -0
  107. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FileBrowser/FileBrowser.types.d.ts +1 -0
  108. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FileBrowser/IFileBrowserProps.d.ts +11 -0
  109. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FileBrowser/IFileBrowserState.d.ts +17 -0
  110. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FileBrowser/index.d.ts +4 -0
  111. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FolderTile/FolderTile.d.ts +5 -0
  112. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FolderTile/FolderTile.themedStyles.d.ts +6 -0
  113. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FolderTile/IFolderTileProps.d.ts +10 -0
  114. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/FolderTile/index.d.ts +2 -0
  115. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/TilesList/ITilesListProps.d.ts +13 -0
  116. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/TilesList/TilesList.d.ts +30 -0
  117. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/TilesList/TilesList.themedStyles.d.ts +32 -0
  118. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/TilesList/index.d.ts +2 -0
  119. package/dist/richTextEditor/components/filePicker/components/filePicker/controls/index.d.ts +2 -0
  120. package/dist/richTextEditor/components/filePicker/components/filePicker/index.d.ts +4 -0
  121. package/dist/richTextEditor/components/filePicker/components/fileTypeIcon/FileTypeIcon.d.ts +44 -0
  122. package/dist/richTextEditor/components/filePicker/components/fileTypeIcon/IFileTypeIcon.d.ts +88 -0
  123. package/dist/richTextEditor/components/filePicker/components/fileTypeIcon/index.d.ts +2 -0
  124. package/dist/richTextEditor/components/filePicker/components/iFrameDialog/IFrameDialog.d.ts +78 -0
  125. package/dist/richTextEditor/components/filePicker/components/iFrameDialog/IFrameDialogContent.d.ts +17 -0
  126. package/dist/richTextEditor/components/filePicker/components/iFrameDialog/index.d.ts +3 -0
  127. package/dist/richTextEditor/components/filePicker/components/placeholder/IPlaceholderComponent.d.ts +41 -0
  128. package/dist/richTextEditor/components/filePicker/components/placeholder/PlaceholderComponent.d.ts +44 -0
  129. package/dist/richTextEditor/components/filePicker/components/placeholder/PlaceholderComponent.themedStyles.d.ts +16 -0
  130. package/dist/richTextEditor/components/filePicker/components/placeholder/index.d.ts +2 -0
  131. package/dist/richTextEditor/components/filePicker/index.d.ts +1 -0
  132. package/dist/richTextEditor/components/filePicker/services/FileBrowserService.d.ts +71 -0
  133. package/dist/richTextEditor/components/filePicker/services/FileBrowserService.types.d.ts +33 -0
  134. package/dist/richTextEditor/components/filePicker/services/FilesSearchService.d.ts +45 -0
  135. package/dist/richTextEditor/components/filePicker/services/FilesSearchService.types.d.ts +62 -0
  136. package/dist/richTextEditor/components/filePicker/services/IOneDriveService.d.ts +230 -0
  137. package/dist/richTextEditor/components/filePicker/services/OneDriveService.d.ts +38 -0
  138. package/dist/richTextEditor/components/filePicker/services/OrgAssetsService.d.ts +10 -0
  139. package/dist/richTextEditor/components/filePicker/utilities/FieldRendererHelper.d.ts +17 -0
  140. package/dist/richTextEditor/components/filePicker/utilities/GeneralHelper.d.ts +78 -0
  141. package/dist/richTextEditor/components/filePicker/utilities/LocalesHelper.d.ts +5 -0
  142. package/dist/richTextEditor/components/filePicker/utilities/SPHelper.d.ts +67 -0
  143. package/dist/richTextEditor/components/filePicker/utilities/index.d.ts +4 -0
  144. package/dist/richTextEditor/components/filePicker/utilities/utils.d.ts +3 -0
  145. package/dist/richTextEditor/components/hooks/useRange.d.ts +6 -0
  146. package/dist/richTextEditor/components/richTextEditor/RichTextEditorInner.d.ts +1 -0
  147. package/dist/richTextEditor/components/richTextEditor/rteContextProvider.d.ts +19 -0
  148. package/dist/richTextEditor/components/syncfusion/SyncFusionProvider.d.ts +7 -0
  149. package/dist/richTextEditor/components/syncfusion/licenseKey.d.ts +4 -0
  150. package/dist/richTextEditor/components/syncfusion/syncfusionRichText.d.ts +22 -0
  151. package/dist/richTextEditor/components/syncfusion/syncfusionSetup.d.ts +1 -0
  152. package/dist/richTextEditor/i18n/IRteStrings.d.ts +142 -0
  153. package/dist/richTextEditor/i18n/de.d.ts +3 -0
  154. package/dist/richTextEditor/i18n/en.d.ts +3 -0
  155. package/dist/richTextEditor/i18n/rteStrings.d.ts +3 -0
  156. package/dist/richTextEditor/themeProvider.d.ts +6 -0
  157. package/package.json +71 -0
@@ -0,0 +1,71 @@
1
+ import { WebPartContext } from '@microsoft/sp-webpart-base';
2
+ import { FilesQueryResult, IFile, ILibrary } from './FileBrowserService.types';
3
+ export declare class FileBrowserService {
4
+ protected itemsToDownloadCount: number;
5
+ protected context: WebPartContext;
6
+ protected siteAbsoluteUrl: string;
7
+ protected driveAccessToken: string;
8
+ protected mediaBaseUrl: string;
9
+ protected callerStack: string;
10
+ constructor(context: WebPartContext, itemsToDownloadCount?: number, siteAbsoluteUrl?: string);
11
+ /**
12
+ * Gets files from current sites library
13
+ * @param listUrl web-relative url of the list
14
+ * @param folderPath
15
+ * @param acceptedFilesExtensions
16
+ */
17
+ getListItems: (listUrl: string, folderPath: string, acceptedFilesExtensions?: string[], nextPageQueryStringParams?: string, sortBy?: string, isDesc?: boolean) => Promise<FilesQueryResult>;
18
+ /**
19
+ * Provides the URL for file preview.
20
+ */
21
+ getFileThumbnailUrl: (file: IFile, thumbnailWidth: number, thumbnailHeight: number) => string;
22
+ /**
23
+ * Gets document and media libraries from the site
24
+ */
25
+ getSiteMediaLibraries: (includePageLibraries?: boolean) => Promise<ILibrary[]>;
26
+ /**
27
+ * Gets document and media libraries from the site
28
+ */
29
+ getLibraryNameByInternalName: (internalName: string) => Promise<string>;
30
+ /**
31
+ * Downloads document content from SP location.
32
+ */
33
+ downloadSPFileContent: (absoluteFileUrl: string, fileName: string) => Promise<File>;
34
+ /**
35
+ * Maps IFile property name to SharePoint item field name
36
+ * @param filePropertyName File Property
37
+ * @returns SharePoint Field Name
38
+ */
39
+ getSPFieldNameForFileProperty(filePropertyName: string): string;
40
+ /**
41
+ * Gets the Title of the current Web
42
+ * @returns SharePoint Site Title
43
+ */
44
+ getSiteTitle: () => Promise<string>;
45
+ /**
46
+ * Executes query to load files with possible extension filtering
47
+ * @param restApi
48
+ * @param folderPath
49
+ * @param acceptedFilesExtensions
50
+ */
51
+ protected _getListDataAsStream: (restApi: string, folderPath: string, acceptedFilesExtensions?: string[], sortBy?: string, isDesc?: boolean) => Promise<FilesQueryResult>;
52
+ /**
53
+ * Generates CamlQuery files filter.
54
+ * @param accepts
55
+ */
56
+ protected getFileTypeFilter(accepts: string[]): string;
57
+ /**
58
+ * Generates Files CamlQuery ViewXml
59
+ */
60
+ protected getFilesCamlQueryViewXml: (accepts: string[], sortBy: string, isDesc: boolean) => string;
61
+ /**
62
+ * Converts REST call results to IFile
63
+ */
64
+ protected parseFileItem: (fileItem: any) => IFile;
65
+ protected parseLibItem: (libItem: any, webUrl: string) => ILibrary;
66
+ /**
67
+ * Creates an absolute URL
68
+ */
69
+ protected buildAbsoluteUrl: (relativeUrl: string) => string;
70
+ protected processResponse: (fileResponse: any) => void;
71
+ }
@@ -0,0 +1,33 @@
1
+ import { IDimensions } from './IOneDriveService';
2
+ export interface IFile {
3
+ name: string;
4
+ absoluteUrl: string;
5
+ serverRelativeUrl: string;
6
+ isFolder: boolean;
7
+ modified: string;
8
+ modifiedDate: Date;
9
+ modifiedBy?: string;
10
+ fileIcon: string;
11
+ fileType: string;
12
+ fileSize?: number;
13
+ totalFileCount?: number;
14
+ isShared?: boolean;
15
+ dimensions?: IDimensions;
16
+ thumbnail?: string;
17
+ key?: string;
18
+ spItemUrl: string;
19
+ supportsThumbnail: boolean;
20
+ }
21
+ export interface IFolder extends Pick<IFile, 'name' | 'absoluteUrl' | 'serverRelativeUrl'> {
22
+ }
23
+ export interface ILibrary {
24
+ title: string;
25
+ absoluteUrl: string;
26
+ serverRelativeUrl: string;
27
+ webRelativeUrl?: string;
28
+ iconPath?: string;
29
+ }
30
+ export interface FilesQueryResult {
31
+ nextHref: string;
32
+ items: IFile[];
33
+ }
@@ -0,0 +1,45 @@
1
+ import { WebPartContext } from '@microsoft/sp-webpart-base';
2
+ import { BingQuerySearchParams, IRecentFile, ISearchResult } from './FilesSearchService.types';
3
+ export declare class FilesSearchService {
4
+ private context;
5
+ private bingAPIKey;
6
+ constructor(context: WebPartContext, bingAPIKey: string);
7
+ /**
8
+ * Checks if file exists
9
+ */
10
+ checkFileExists: (fileUrl: string) => Promise<boolean>;
11
+ /**
12
+ * Executes Recent files search.
13
+ */
14
+ executeRecentSearch: (accepts?: string[]) => Promise<IRecentFile[]>;
15
+ /**
16
+ * Executes bing search for a file.
17
+ */
18
+ executeBingSearch: (queryParams: BingQuerySearchParams) => Promise<ISearchResult[]>;
19
+ /**
20
+ * Downloads document content from SP location.
21
+ */
22
+ downloadSPFileContent: (absoluteFileUrl: string, fileName: string) => Promise<File>;
23
+ /**
24
+ * Downloads document content from Remote location.
25
+ */
26
+ downloadBingContent: (absoluteFileUrl: string, fileName: string) => Promise<File>;
27
+ /**
28
+ * Parses Recent Search results.
29
+ */
30
+ private parseRecentSearchResult;
31
+ /**
32
+ * Parses Bing search results.
33
+ */
34
+ private parseBingSearchResult;
35
+ /**
36
+ * Builds a file filter using the accepted file extensions
37
+ */
38
+ private _getFileFilter;
39
+ /**
40
+ * Removes protocol and retrieves only the domain, just like Bing search results does
41
+ * in the SharePoint file picker
42
+ * @param url The display url as provided by Bing
43
+ */
44
+ private getDisplayUrl;
45
+ }
@@ -0,0 +1,62 @@
1
+ export interface IRecentFile {
2
+ fileUrl: string;
3
+ key: string;
4
+ name: string;
5
+ editedBy: string;
6
+ isFolder: boolean;
7
+ }
8
+ export interface BingQuerySearchParams {
9
+ aspect: string;
10
+ size: string;
11
+ license: string;
12
+ query: string;
13
+ maxFileSize?: number;
14
+ maxResults?: number;
15
+ }
16
+ export interface IBingSearchResult {
17
+ webSearchUrl: string;
18
+ webSearchUrlPingSuffix: string;
19
+ name: string;
20
+ thumbnailUrl: string;
21
+ datePublished: string;
22
+ isFamilyFriendly: boolean;
23
+ creativeCommons: string;
24
+ contentUrl: string;
25
+ contentUrlPingSuffix: string;
26
+ hostPageUrl: string;
27
+ hostPageUrlPingSuffix: string;
28
+ contentSize: string;
29
+ encodingFormat: string;
30
+ hostPageDisplayUrl: string;
31
+ width: number;
32
+ height: number;
33
+ thumbnail: Thumbnail;
34
+ imageInsightsToken: string;
35
+ insightsMetadata: InsightsMetadata;
36
+ imageId: string;
37
+ accentColor: string;
38
+ }
39
+ export interface ISearchResult {
40
+ thumbnailUrl: string;
41
+ contentUrl: string;
42
+ displayUrl: string;
43
+ key: string;
44
+ width: number;
45
+ height: number;
46
+ }
47
+ export interface InsightsMetadata {
48
+ pagesIncludingCount: number;
49
+ availableSizesCount: number;
50
+ recipeSourcesCount?: number;
51
+ bestRepresentativeQuery?: BestRepresentativeQuery;
52
+ }
53
+ export interface BestRepresentativeQuery {
54
+ text: string;
55
+ displayText: string;
56
+ webSearchUrl: string;
57
+ webSearchUrlPingSuffix: string;
58
+ }
59
+ export interface Thumbnail {
60
+ width: number;
61
+ height: number;
62
+ }
@@ -0,0 +1,230 @@
1
+ export interface IGetListDataAsStreamResult {
2
+ wpq: string;
3
+ Templates: ITemplates;
4
+ ListData: IListData;
5
+ ListSchema: IListSchema;
6
+ ViewMetadata: IViewMetadata;
7
+ BaseViewID: string;
8
+ ListTemplateType: string;
9
+ listBaseType: number;
10
+ noGroupCollapse: boolean;
11
+ InlineEdit: boolean;
12
+ NavigateForFormsPages: boolean;
13
+ BasePermissions: IBasePermissions;
14
+ CurrentUserIsSiteAdmin: boolean;
15
+ IsAppWeb: boolean;
16
+ AllowGridMode: boolean;
17
+ inGridMode: boolean;
18
+ listTemplate: string;
19
+ listName: string;
20
+ rootFolder: string;
21
+ view: string;
22
+ viewTitle: string;
23
+ listUrlDir: string;
24
+ HttpPath: string;
25
+ HttpRoot: string;
26
+ NoScriptEnabled: boolean;
27
+ imagesPath: string;
28
+ PortalUrl: null;
29
+ SendToLocationName: string;
30
+ SendToLocationUrl: string;
31
+ RecycleBinEnabled: number;
32
+ OfficialFileName: string;
33
+ OfficialFileNames: string;
34
+ WriteSecurity: string;
35
+ SiteTitle: string;
36
+ ListTitle: string;
37
+ displayFormUrl: string;
38
+ newFormUrl: string;
39
+ editFormUrl: string;
40
+ ctxId: number;
41
+ isXslView: boolean;
42
+ IsClientRendering: boolean;
43
+ CurrentUserId: number;
44
+ isModerated: boolean;
45
+ EnableRequestSignOff: boolean;
46
+ isForceCheckout: boolean;
47
+ EnableMinorVersions: boolean;
48
+ verEnabled: boolean;
49
+ recursiveView: boolean;
50
+ WorkflowsAssociated: boolean;
51
+ ContentTypesEnabled: boolean;
52
+ DocumentLibraryCalloutOfficeWebAppPreviewersDisabled: boolean;
53
+ RegionalSettingsTimeZoneBias: number;
54
+ NewWOPIDocumentEnabled: boolean;
55
+ NewWOPIDocumentUrl: string;
56
+ NewWOPIDocumentTypes: number;
57
+ canUserCreateMicrosoftForm: boolean;
58
+ AllowCreateFolder: boolean;
59
+ CanShareLinkForNewDocument: boolean;
60
+ VisioDrawingCreationEnabled: boolean;
61
+ SiteTemplateId: number;
62
+ TenantTagPolicyEnabled: boolean;
63
+ WebExcludeFromOfflineClient: boolean;
64
+ ExcludeFromOfflineClient: boolean;
65
+ ParentInfo: IParentInfo;
66
+ }
67
+ export interface IBasePermissions {
68
+ ManageLists: boolean;
69
+ ManagePersonalViews: boolean;
70
+ OpenItems: boolean;
71
+ UseClientIntegration: boolean;
72
+ }
73
+ export interface IListData {
74
+ Row: IRow[];
75
+ FirstRow: number;
76
+ FolderPermissions: string;
77
+ LastRow: number;
78
+ RowLimit: number;
79
+ FilterLink: string;
80
+ ForceNoHierarchy: string;
81
+ HierarchyHasIndention: string;
82
+ FolderId: string;
83
+ CurrentFolderProgId: string;
84
+ }
85
+ export interface IRow {
86
+ ID: string;
87
+ PermMask: string;
88
+ FSObjType: string;
89
+ HTML_x0020_File_x0020_Type: string;
90
+ UniqueId: string;
91
+ ProgId: string;
92
+ NoExecute: string;
93
+ File_x0020_Type: string;
94
+ 'File_x0020_Type.mapapp': string;
95
+ 'HTML_x0020_File_x0020_Type.File_x0020_Type.mapcon': string;
96
+ 'HTML_x0020_File_x0020_Type.File_x0020_Type.mapico': string;
97
+ 'serverurl.progid': string;
98
+ ServerRedirectedEmbedUrl: string;
99
+ 'File_x0020_Type.progid': string;
100
+ 'File_x0020_Type.url': string;
101
+ FileRef: string;
102
+ FileLeafRef: string;
103
+ CheckoutUser: string;
104
+ CheckedOutUserId: string;
105
+ IsCheckedoutToLocal: string;
106
+ _ComplianceFlags: string;
107
+ _ShortcutUrl: string;
108
+ '_ShortcutUrl.desc': string;
109
+ _ShortcutSiteId: string;
110
+ _ShortcutWebId: string;
111
+ _ShortcutUniqueId: string;
112
+ 'Created_x0020_Date.ifnew': string;
113
+ ContentTypeId: string;
114
+ Modified: string;
115
+ 'Modified.FriendlyDisplay': string;
116
+ Editor: IEditor[];
117
+ File_x0020_Size: string;
118
+ PrincipalCount: string;
119
+ MediaServiceFastMetadata: string;
120
+ MediaServiceOCR: string;
121
+ ItemChildCount: string;
122
+ FolderChildCount: string;
123
+ SMTotalFileCount: string;
124
+ SMTotalSize: string;
125
+ SortBehavior: string;
126
+ FileSizeDisplay: string;
127
+ _ComplianceTag: string;
128
+ ContentVersion: string;
129
+ DocConcurrencyNumber: string;
130
+ _VirusStatus: string;
131
+ '.spItemUrl': string;
132
+ '.fileType': string;
133
+ '.hasThumbnail': string;
134
+ '.hasVideoManifest': string;
135
+ '.hasPdf': string;
136
+ '.hasOfficePreview': string;
137
+ '.hasBxf': string;
138
+ '.hasGlb': string;
139
+ '.hasHtml': string;
140
+ '.ctag': string;
141
+ '.etag': string;
142
+ }
143
+ export interface IEditor {
144
+ id: string;
145
+ title: string;
146
+ email: string;
147
+ sip: string;
148
+ picture: string;
149
+ }
150
+ export interface IListSchema {
151
+ Field: {
152
+ [key: string]: string;
153
+ }[];
154
+ RequiredFields: any[];
155
+ JSLink: any[];
156
+ LCID: string;
157
+ Userid: string;
158
+ PagePath: string;
159
+ ShowWebPart: string;
160
+ View: string;
161
+ RootFolderParam: string;
162
+ FieldSortParam: string;
163
+ HttpVDir: string;
164
+ IsDocLib: string;
165
+ UIVersion: string;
166
+ NoListItem: string;
167
+ NoListItemHowTo: string;
168
+ DefaultItemOpen: string;
169
+ ForceCheckout: string;
170
+ Direction: string;
171
+ TabularView: string;
172
+ ItemCount: string;
173
+ EffectivePresenceEnabled: string;
174
+ PresenceAlt: string;
175
+ UserDispUrl: string;
176
+ SelectedID: string;
177
+ ListRight_AddListItems: string;
178
+ FolderRight_AddListItems: string;
179
+ InplaceSearchEnabled: string;
180
+ RenderViewSelectorPivotMenuAsync: string;
181
+ ViewSelector_ViewParameters: string;
182
+ RenderSaveAsNewViewButton: string;
183
+ Toolbar: string;
184
+ '.accessToken': string;
185
+ '.driveAccessToken': string;
186
+ '.driveUrl': string;
187
+ '.driveAccessTokenV21': string;
188
+ '.driveUrlV21': string;
189
+ '.mediaBaseUrl': string;
190
+ '.mediaBaseUrlSecondary': string;
191
+ '.pushChannelBaseUrl': string;
192
+ '.callerStack': string;
193
+ '.correlationId': string;
194
+ '.transformUrl': string;
195
+ '.thumbnailUrl': string;
196
+ '.videoManifestUrl': string;
197
+ '.pdfConversionUrl': string;
198
+ '.officeBundleGenerate': string;
199
+ '.officeBundleGetFragment': string;
200
+ }
201
+ export interface IParentInfo {
202
+ ParentFolderInfo: IParentFolderInfo[];
203
+ }
204
+ export interface IParentFolderInfo {
205
+ ServerRelativeUrl: string;
206
+ Permissions: string;
207
+ }
208
+ export interface ITemplates {
209
+ }
210
+ export interface IViewMetadata {
211
+ Id: string;
212
+ ListViewXml: string;
213
+ Paged: boolean;
214
+ RowLimit: number;
215
+ ServerRelativeUrl: string;
216
+ Title: string;
217
+ TabularView: boolean;
218
+ ViewType: string;
219
+ }
220
+ export interface IGetListDataAsStreamRequest {
221
+ parameters: {
222
+ RenderOptions: number;
223
+ ViewXml: string;
224
+ AllowMultipleValueFilterForTaxonomyFields: boolean;
225
+ };
226
+ }
227
+ export interface IDimensions {
228
+ width: number;
229
+ height: number;
230
+ }
@@ -0,0 +1,38 @@
1
+ import { WebPartContext } from '@microsoft/sp-webpart-base';
2
+ import { FileBrowserService } from './FileBrowserService';
3
+ import { FilesQueryResult } from './FileBrowserService.types';
4
+ export declare class OneDriveService extends FileBrowserService {
5
+ protected oneDrivePersonalUrl: string;
6
+ protected oneDriveRootFolderRelativeUrl: string;
7
+ protected oneDriveRootFolderAbsoluteUrl: string;
8
+ protected oneDrivePersonalLibraryTitle: string;
9
+ constructor(context: WebPartContext, itemsToDownloadCount?: number);
10
+ /**
11
+ * Gets files from OneDrive personal library
12
+ */
13
+ getListItems: (listUrl: string, folderPath?: string, acceptedFilesExtensions?: string[], nextPageQueryStringParams?: string) => Promise<FilesQueryResult>;
14
+ /**
15
+ * Downloads document content from OneDrive location.
16
+ */
17
+ downloadSPFileContent: (absoluteFileUrl: string, fileName: string) => Promise<File>;
18
+ /**
19
+ * Gets users one drive personal documents library path
20
+ */
21
+ getOneDriveRootFolderFullUrl: () => Promise<string>;
22
+ /**
23
+ * Gets OneDrive RootFolder server relative URL.
24
+ */
25
+ getOneDriveRootFolderRelativeUrl: () => Promise<string>;
26
+ /**
27
+ * Gets OneDrive personal library Title
28
+ */
29
+ getOneDrivePersonalLibraryTitle: () => Promise<string>;
30
+ /**
31
+ * Gets personal site path.
32
+ */
33
+ private getOneDrivePersonalUrl;
34
+ /**
35
+ * Creates an absolute URL
36
+ */
37
+ protected buildAbsoluteUrl: (relativeUrl: string) => string;
38
+ }
@@ -0,0 +1,10 @@
1
+ import { WebPartContext } from '@microsoft/sp-webpart-base';
2
+ import { FileBrowserService } from './FileBrowserService';
3
+ import { FilesQueryResult, ILibrary } from './FileBrowserService.types';
4
+ export declare class OrgAssetsService extends FileBrowserService {
5
+ private _orgAssetsLibraryServerRelativeSiteUrl;
6
+ constructor(context: WebPartContext, itemsToDownloadCount?: number);
7
+ getListItems: (listUrl: string, folderPath: string, acceptedFilesExtensions?: string[], nextPageQueryStringParams?: string) => Promise<FilesQueryResult>;
8
+ getSiteMediaLibraries: () => Promise<ILibrary[]>;
9
+ private _parseOrgAssetsLibraryItem;
10
+ }
@@ -0,0 +1,17 @@
1
+ import { ListItemAccessor } from '@microsoft/sp-listview-extensibility';
2
+ import { IContext } from '../common/interfaces';
3
+ import { IFieldRendererProps } from '../components/fields/fieldCommon/IFieldRendererProps';
4
+ /**
5
+ * Field Renderer Helper.
6
+ * Helps to render fields similarly to OOTB SharePoint rendering
7
+ */
8
+ export declare class FieldRendererHelper {
9
+ /**
10
+ * Returns JSX.Element with OOTB rendering and applied additional props
11
+ * @param fieldValue Value of the field
12
+ * @param props IFieldRendererProps (CSS classes and CSS styles)
13
+ * @param listItem Current list item
14
+ * @param context Customizer context
15
+ */
16
+ static getFieldRenderer(fieldValue: any, props: IFieldRendererProps, listItem: ListItemAccessor, context: IContext): Promise<JSX.Element>;
17
+ }
@@ -0,0 +1,78 @@
1
+ import { StockImageSizeType } from './../components/filePicker/StockImagesTab/StockImageSizeType';
2
+ export declare const IMG_SUPPORTED_EXTENSIONS = ".gif,.jpg,.jpeg,.bmp,.dib,.tif,.tiff,.ico,.png,.jxr,.svg";
3
+ /**
4
+ * Helper with general methods to simplify some routines
5
+ */
6
+ export declare class GeneralHelper {
7
+ /**
8
+ * Does parse the stock image url to given stock image size
9
+ * @param url
10
+ * @param stockImageSize
11
+ */
12
+ static parseAbsoluteImageUrl(url: string, stockImageSize: StockImageSizeType): string;
13
+ /**
14
+ * Trims slash at the end of URL if needed
15
+ * @param url URL
16
+ */
17
+ static trimSlash(url: string): string;
18
+ /**
19
+ * Encodes text
20
+ * @param text text to encode
21
+ */
22
+ static encodeText(text: string): string;
23
+ /**
24
+ * Copy of Microsoft's GetRelativeDateTimeString from SP.dateTimeUtil
25
+ */
26
+ static getRelativeDateTimeString(format: string): string;
27
+ /**
28
+ * Copy of Microsoft's GetLocalizedCountValue from SP.dateTimeUtil.
29
+ * I've tried to rename all the vars to have meaningful names... but some were too unclear
30
+ */
31
+ static getLocalizedCountValue(format: string, first: string, second: number): string;
32
+ /**
33
+ * Extracts text from HTML strings without creating HTML elements
34
+ * @param html HTML string
35
+ */
36
+ static getTextFromHTML(html: string): string;
37
+ /**
38
+ * Checks if value is defined (not null and not undefined)
39
+ * @param value value
40
+ */
41
+ static isDefined(value: any): boolean;
42
+ /**
43
+ * Creates Document element based on Xml string
44
+ * @param xmlString XML string to parse
45
+ */
46
+ static parseXml(xmlString: any): Document;
47
+ /**
48
+ * Returns absoulute domain URL.
49
+ * @param url
50
+ */
51
+ static getAbsoluteDomainUrl(url: string): string;
52
+ static getDomain(url: string, includeProtocol?: boolean): string;
53
+ /**
54
+ * To support IE11 that has no support for File constructor
55
+ * @param blob
56
+ */
57
+ static getFileFromBlob(blob: Blob, fileName: string): File;
58
+ static formatBytes(bytes: any, decimals: any): string;
59
+ /**
60
+ * Returns file name without extension.
61
+ */
62
+ static getFileNameWithoutExtension(itemUrl: string): string;
63
+ /**
64
+ * Returns file name with the extension
65
+ */
66
+ static getFileNameFromUrl(itemUrl: string): string;
67
+ static isImage(fileName: string): boolean;
68
+ /**
69
+ * Returns extension of the file
70
+ */
71
+ static getFileExtension(fileName: any): string;
72
+ private static _getEncodedChar;
73
+ }
74
+ export declare function urlCombine(urlStart: string, urlFinish: string, escapeFinish?: boolean): string;
75
+ export declare const toRelativeUrl: (absoluteUrl: string) => string;
76
+ export declare function sortString(a: string, b: string, isDesc: boolean): number;
77
+ export declare function sortDate(a: string | number | Date, b: string | number | Date, isDesc: boolean): number;
78
+ export declare function dateToNumber(date: string | number | Date): number;
@@ -0,0 +1,5 @@
1
+ export declare class LocalesHelper {
2
+ private static locales;
3
+ static getLocaleId(localeName: string): number;
4
+ static getLocaleName(localeId: number): string;
5
+ }
@@ -0,0 +1,67 @@
1
+ import { ListItemAccessor } from '@microsoft/sp-listview-extensibility';
2
+ import { IContext } from '../common/interfaces';
3
+ /**
4
+ * Helper class to work with SharePoint objects and entities
5
+ */
6
+ export declare class SPHelper {
7
+ /**
8
+ * Gets field's Real Name from FieldNamesMapping
9
+ * @param columnName current field name
10
+ */
11
+ static getStoredFieldName(columnName: string): string;
12
+ /**
13
+ * Gets Field's text
14
+ * @param fieldValue field value as it appears in Field Customizer's onRenderCell event
15
+ * @param listItem List Item accessor
16
+ * @param context Customizer's context
17
+ */
18
+ static getFieldText(fieldValue: any, listItem: ListItemAccessor, context: IContext): Promise<string>;
19
+ /**
20
+ * Gets property of the Field by Field's ID and Property Name
21
+ * @param fieldId Field's ID
22
+ * @param propertyName Property name
23
+ * @param context SPFx context
24
+ * @param fromSchemaXml true if the field should be read from Field Schema Xml
25
+ */
26
+ static getFieldProperty(fieldId: string, propertyName: string, context: IContext, fromSchemaXml: boolean): Promise<any>;
27
+ /**
28
+ * Asynchronously gets the Diplay Form Url for the Lookup field
29
+ * @param fieldId Field Id
30
+ * @param context SPFx Context
31
+ */
32
+ static getLookupFieldListDispFormUrl(fieldId: string, context: IContext): Promise<any>;
33
+ /**
34
+ * Gets column's value for the row using List Item Accessor.
35
+ * This method works with private property _values of List Item Accessor to get such values as FriendlyDisplay text for Date, and more.
36
+ * @param listItem List Item Accessor
37
+ * @param itemName column name
38
+ */
39
+ static getRowItemValueByName(listItem: ListItemAccessor, itemName: string): any;
40
+ /**
41
+ * Gets SchemaXml for the field by List Title and Field Id
42
+ * @param fieldId Field's Id
43
+ * @param listTitle List Title
44
+ * @param context Customizer's context
45
+ */
46
+ static getFieldSchemaXmlById(fieldId: string, listTitle: string, context: IContext): Promise<string>;
47
+ /**
48
+ * Gets correct view id from the page
49
+ * @param context SPFx Context
50
+ */
51
+ static getPageViewId(context: IContext): string;
52
+ /**
53
+ * Returns the user corresponding to the specified member identifier for the current site
54
+ * @param id user id
55
+ * @param context SPFx context
56
+ */
57
+ static getUserById(id: number, context: IContext): Promise<any>;
58
+ /**
59
+ * Returns user profile properties
60
+ * @param loginName User's login name
61
+ * @param context SPFx context
62
+ */
63
+ static getUserProperties(loginName: string, context: IContext): Promise<any>;
64
+ private static _updateFieldInSessionStorage;
65
+ private static _updateSessionStorageLoadedViewFields;
66
+ private static _getLoadedViewFieldsFromStorage;
67
+ }
@@ -0,0 +1,4 @@
1
+ export * from './FieldRendererHelper';
2
+ export * from './GeneralHelper';
3
+ export * from './SPHelper';
4
+ export * from './LocalesHelper';
@@ -0,0 +1,3 @@
1
+ export declare const userPhotoUrl = "/_layouts/15/userphoto.aspx";
2
+ export declare const removeClaim: (username: string) => string;
3
+ export declare const createImageUrl: (webServerAbsoluteUrl: string, loginName: string) => string;
@@ -0,0 +1,6 @@
1
+ import { IRichTextEditor, NodeSelection } from '@syncfusion/ej2-react-richtexteditor';
2
+ export declare const useRange: (RTE: IRichTextEditor) => {
3
+ rangeRef: React.MutableRefObject<Range>;
4
+ selectionRef: React.MutableRefObject<NodeSelection>;
5
+ selectParentRef: React.MutableRefObject<Node[]>;
6
+ };
@@ -0,0 +1 @@
1
+ export default function RichTextEditorInner(): JSX.Element;