@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
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # @hansevision/tp-richtexteditor-control
2
+
3
+ A standalone, reusable React component for rendering the Syncfusion Richtext Editor in SharePoint Framework (SPFx) solutions.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @hansevision/tp-richtexteditor-control
9
+ ```
10
+
11
+ ## Peer Dependencies
12
+
13
+ | Package | Version |
14
+ | ----------- | ---------- |
15
+ | `react` | `>=16.8.0` |
16
+ | `react-dom` | `>=16.8.0` |
17
+
18
+ ## Usage
19
+
20
+ ### In an SPFx web part
21
+
22
+ ```tsx
23
+ import { DisplayMode } from '@microsoft/sp-core-library';
24
+ import { RichTextEditor, ErrorService } from '@hansevision/tp-richtexteditor-control';
25
+
26
+ const errorService = new ErrorService();
27
+
28
+ <RichTextEditor
29
+ spfxContext={this.context}
30
+ displayMode={this.displayMode}
31
+ value={this.properties.textContent}
32
+ onChange={(html) => {
33
+ this.properties.textContent = html;
34
+ }}
35
+ errorService={errorService}
36
+ />;
37
+ ```
38
+
39
+ ## Development
40
+
41
+ For static testing:
42
+
43
+ ```bash
44
+ # Install dependencies (in TP Richtext Editor Controls Project)
45
+ npm ci
46
+
47
+ # Build the package (in TP Richtext Editor Controls Project)
48
+ npm run build
49
+
50
+ # Create Package: hansevision-tp-richtexteditor-control-1.0.0.tgz (in TP Richtext Editor Controls Project)
51
+ npm pack
52
+
53
+ # in the consuming project
54
+ npm install ../your-custom-folder/hansevision-tp-richtexteditor-control-1.0.0.tgz
55
+ ```
56
+
57
+ For live-reloading testing:
58
+
59
+ ```bash
60
+ # In TP Richtext Editor Controls Project
61
+ npm link
62
+
63
+ # In the consuming project
64
+ npm link @hansevision/tp-richtexteditor-control
65
+
66
+ # In TP Richtext Editor Controls Project
67
+ npm run build:watch
68
+ ```
69
+
70
+ The build outputs to `dist/`:
71
+
72
+ - `dist/index.js` — CommonJS bundle
73
+ - `dist/index.esm.js` — ES module bundle
74
+ - `dist/index.d.ts` — TypeScript declarations
@@ -0,0 +1,18 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { IHandleErrorConfig } from './interfaces/IRepairError';
3
+ import { ErrorService } from './errorService';
4
+ interface IErrorBoundaryComponentProps {
5
+ children: ReactNode;
6
+ errorService: ErrorService;
7
+ }
8
+ interface IErrorBoundaryComponentState {
9
+ childHasError: boolean;
10
+ config?: IHandleErrorConfig;
11
+ }
12
+ export declare class ErrorBoundary extends React.Component<IErrorBoundaryComponentProps, IErrorBoundaryComponentState> {
13
+ static getDerivedStateFromError(): IErrorBoundaryComponentState;
14
+ constructor(props: IErrorBoundaryComponentProps);
15
+ componentDidCatch(error: Error): void;
16
+ render(): JSX.Element;
17
+ }
18
+ export {};
@@ -0,0 +1,6 @@
1
+ import { IHandleErrorConfig } from './interfaces/IRepairError';
2
+ export declare class ErrorService {
3
+ private handlers;
4
+ register(fn: (error: Error, config?: IHandleErrorConfig) => void): void;
5
+ handleError(error: Error, config?: IHandleErrorConfig): void;
6
+ }
@@ -0,0 +1,6 @@
1
+ export interface IErrorBoundaryStrings {
2
+ Title: string;
3
+ AnErrorOccurred: string;
4
+ WebServiceError: string;
5
+ TryAgainButton: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ import { IErrorBoundaryStrings } from './IErrorBoundaryStrings';
2
+ declare const deErrorBoundary: IErrorBoundaryStrings;
3
+ export default deErrorBoundary;
@@ -0,0 +1,3 @@
1
+ import { IErrorBoundaryStrings } from './IErrorBoundaryStrings';
2
+ declare const enErrorBoundary: IErrorBoundaryStrings;
3
+ export default enErrorBoundary;
@@ -0,0 +1,3 @@
1
+ import { IErrorBoundaryStrings } from './IErrorBoundaryStrings';
2
+ declare const strings: IErrorBoundaryStrings;
3
+ export default strings;
@@ -0,0 +1,8 @@
1
+ export interface IRepairError {
2
+ message?: string;
3
+ callback: () => void;
4
+ }
5
+ export interface IHandleErrorConfig {
6
+ errorDescription?: string;
7
+ repair?: IRepairError;
8
+ }
package/dist/i18n.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Dedicated i18next instance for the WebPartTitle component.
3
+ * Uses a separate instance to avoid conflicts with the host application's i18n setup.
4
+ */
5
+ declare const i18n: import("i18next").i18n;
6
+ export default i18n;
@@ -0,0 +1,5 @@
1
+ export { ErrorBoundary } from './errorBoundary/errorBoundary';
2
+ export { ErrorService } from './errorBoundary/errorService';
3
+ export type { IHandleErrorConfig, IRepairError } from './errorBoundary/interfaces/IRepairError';
4
+ export { RichTextEditor } from './richTextEditor/RichTextEditor';
5
+ export type { IRichTextEditorProps } from './richTextEditor/RichTextEditor';