@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,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 {};
@@ -0,0 +1,3 @@
1
+ export default function ImagePickerControl({ onClose }: {
2
+ onClose: () => void;
3
+ }): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ContainsValueChangedObserver(rteContentContainer: HTMLElement, onContainsValueChanged?: (containsValue: boolean) => void): MutationObserver;
@@ -0,0 +1,4 @@
1
+ export declare const VideoPickerControl: ({ onClose }: {
2
+ onClose: () => void;
3
+ }) => JSX.Element;
4
+ export default VideoPickerControl;
@@ -0,0 +1,3 @@
1
+ import { WebPartContext } from '@microsoft/sp-webpart-base';
2
+ import { IFilePickerResult } from '../filePicker';
3
+ export declare const handleFileUpload: (spfxContext: WebPartContext, file: IFilePickerResult) => Promise<string>;
@@ -0,0 +1,4 @@
1
+ export declare const showProgressDialog: (title: string, message: string) => {
2
+ close: () => void;
3
+ updateProgress: (newProgress: number) => void;
4
+ };
@@ -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
+ }
@@ -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,2 @@
1
+ export * from './IDragDropFiles';
2
+ export * from './DragDropFiles';
@@ -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,2 @@
1
+ export * from './FieldAttachmentsRenderer.module.scss';
2
+ export * from './FieldAttachmentsRenderer';
@@ -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,2 @@
1
+ export * from './FieldBaseTextRenderer.module.scss';
2
+ export * from './FieldBaseTextRenderer';
@@ -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
+ }
@@ -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,2 @@
1
+ export * from './FieldFileTypeRenderer.module.scss';
2
+ export * from './FieldFileTypeRenderer';
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ export * from './FieldLookupRenderer.module.scss';
2
+ export * from './FieldLookupRenderer';