@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,60 @@
1
+ import * as React from 'react';
2
+ import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
3
+ export interface IFieldNameRendererProps extends IFieldRendererProps {
4
+ /**
5
+ * text to display
6
+ */
7
+ text?: string;
8
+ /**
9
+ * if the Name should be rendered as link
10
+ */
11
+ isLink: boolean;
12
+ /**
13
+ * path to the document
14
+ */
15
+ filePath?: string;
16
+ /**
17
+ * true if the document is new
18
+ */
19
+ isNew?: boolean;
20
+ /**
21
+ * true if the document type has preview (true by default).
22
+ * The flag impacts on the link's href:
23
+ * if the flag is tru then the href is constructed like #id=${filePath}&parent=${filePath.substring(0, filePath.lastIndexOf('/'))},
24
+ * otherwise the href will contain filePath only.
25
+ */
26
+ hasPreview?: boolean;
27
+ /**
28
+ * custom handler for link click. If not set link click will lead to rendering document preview
29
+ */
30
+ onClick?: (args: IFieldNameClickEventArgs) => void;
31
+ /**
32
+ * custom handler for link double click. If not set link will use OOTB behavior.
33
+ */
34
+ onDoubleClick?: (args: IFieldNameClickEventArgs) => void;
35
+ }
36
+ /**
37
+ * For future
38
+ */
39
+ export interface IFieldNameRendererState {
40
+ }
41
+ /**
42
+ * Name click event arguments
43
+ */
44
+ export interface IFieldNameClickEventArgs {
45
+ filePath?: string;
46
+ }
47
+ /**
48
+ * Field Title Renderer.
49
+ * Used for:
50
+ * - Title
51
+ */
52
+ export declare class FieldNameRenderer extends React.Component<IFieldNameRendererProps, IFieldNameRendererState> {
53
+ private _button;
54
+ constructor(props: IFieldNameRendererProps, state: IFieldNameRendererState);
55
+ componentDidMount(): void;
56
+ componentWillUnmount(): void;
57
+ render(): JSX.Element;
58
+ private _onClick;
59
+ private _onDoubleClick;
60
+ }
@@ -0,0 +1,2 @@
1
+ export * from './FieldNameRenderer.module.scss';
2
+ export * from './FieldNameRenderer';
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { ITerm } from '../../../common/SPEntities';
3
+ import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
4
+ export interface IFieldTaxonomyRendererProps extends IFieldRendererProps {
5
+ /**
6
+ * terms to display
7
+ */
8
+ terms: ITerm | ITerm[];
9
+ }
10
+ /**
11
+ * For future
12
+ */
13
+ export interface IFieldTaxonomyRendererState {
14
+ }
15
+ /**
16
+ * Field Taxonomy Renderer.
17
+ * Used for:
18
+ * - Taxonomy
19
+ */
20
+ export declare class FieldTaxonomyRenderer extends React.Component<IFieldTaxonomyRendererProps, IFieldTaxonomyRendererState> {
21
+ constructor(props: IFieldTaxonomyRendererProps, state: IFieldTaxonomyRendererState);
22
+ render(): JSX.Element;
23
+ }
@@ -0,0 +1,2 @@
1
+ export * from './FieldTaxonomyRenderer.module.scss';
2
+ export * from './FieldTaxonomyRenderer';
@@ -0,0 +1,35 @@
1
+ import * as React from 'react';
2
+ import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
3
+ export interface IFieldTextRendererProps extends IFieldRendererProps {
4
+ /**
5
+ * text to be displayed
6
+ */
7
+ text?: string;
8
+ /**
9
+ * true if props.text can be inserted as innerHTML of the component
10
+ */
11
+ isSafeForInnerHTML?: boolean;
12
+ /**
13
+ * true if the text should be truncated
14
+ */
15
+ isTruncated?: boolean;
16
+ }
17
+ /**
18
+ * For future
19
+ */
20
+ export interface IFieldTextRendererState {
21
+ }
22
+ /**
23
+ * Field Text Renderer.
24
+ * Used for:
25
+ * - Single line of text
26
+ * - Multiline text
27
+ * - Choice
28
+ * - Checkbox
29
+ * - Number
30
+ * - Currency
31
+ */
32
+ export declare class FieldTextRenderer extends React.Component<IFieldTextRendererProps, IFieldTextRendererState> {
33
+ constructor(props: IFieldTextRendererProps, state: IFieldTextRendererState);
34
+ render(): JSX.Element;
35
+ }
@@ -0,0 +1,2 @@
1
+ export * from './FieldTextRenderer.module.scss';
2
+ export * from './FieldTextRenderer';
@@ -0,0 +1,50 @@
1
+ import * as React from 'react';
2
+ import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
3
+ export interface IFieldTitleRendererProps extends IFieldRendererProps {
4
+ /**
5
+ * text to be displayed
6
+ */
7
+ text?: string;
8
+ /**
9
+ * true if the Title should be rendered as link
10
+ */
11
+ isLink?: boolean;
12
+ /**
13
+ * web url
14
+ */
15
+ baseUrl?: string;
16
+ /**
17
+ * list id
18
+ */
19
+ listId?: string;
20
+ /**
21
+ * item id
22
+ */
23
+ id?: number;
24
+ /**
25
+ * custom title click event handler. If not set Display form for the item will be displaed
26
+ */
27
+ onClick?: (args: IFieldTitleClickEventArgs) => void;
28
+ }
29
+ /**
30
+ * For future
31
+ */
32
+ export interface IFieldTitleRendererState {
33
+ }
34
+ /**
35
+ * Title click event arguments
36
+ */
37
+ export interface IFieldTitleClickEventArgs {
38
+ listId?: string;
39
+ id?: string;
40
+ }
41
+ /**
42
+ * Field Title Renderer.
43
+ * Used for:
44
+ * - Title
45
+ */
46
+ export declare class FieldTitleRenderer extends React.Component<IFieldTitleRendererProps, IFieldTitleRendererState> {
47
+ constructor(props: IFieldTitleRendererProps, state: IFieldTitleRendererState);
48
+ render(): JSX.Element;
49
+ private _onClick;
50
+ }
@@ -0,0 +1 @@
1
+ export * from './FieldTitleRenderer';
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
3
+ export interface IFieldUrlRendererProps extends IFieldRendererProps {
4
+ /**
5
+ * text to be displayed
6
+ */
7
+ text?: string;
8
+ /**
9
+ * url
10
+ */
11
+ url: string;
12
+ /**
13
+ * if the field should be rendered as image
14
+ */
15
+ isImageUrl?: boolean;
16
+ }
17
+ /**
18
+ * For future
19
+ */
20
+ export interface IFieldUrlRendererState {
21
+ }
22
+ /**
23
+ * Field URL Renderer.
24
+ * Used for:
25
+ * - URL (Hyperlink, Image)
26
+ */
27
+ export declare class FieldUrlRenderer extends React.Component<IFieldUrlRendererProps, IFieldUrlRendererState> {
28
+ constructor(props: IFieldUrlRendererProps, state: IFieldUrlRendererState);
29
+ render(): JSX.Element;
30
+ private _onImgClick;
31
+ }
@@ -0,0 +1,2 @@
1
+ export * from './FieldUrlRenderer.module.scss';
2
+ export * from './FieldUrlRenderer';
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ import { IExpandingCardProps } from '@fluentui/react/lib/HoverCard';
3
+ export interface IFieldUserHoverCardProps {
4
+ /**
5
+ * IExpandingCardProps
6
+ */
7
+ expandingCardProps: IExpandingCardProps;
8
+ /**
9
+ * User display name
10
+ */
11
+ displayName: string;
12
+ /**
13
+ * CSS styles to apply to the renderer
14
+ */
15
+ cssProps?: React.CSSProperties;
16
+ }
17
+ export interface IFieldUserHoverCardState {
18
+ contentRendered?: HTMLDivElement;
19
+ }
20
+ /**
21
+ * Component to render User name with related Hover Card
22
+ */
23
+ export default class FieldUserHoverCard extends React.Component<IFieldUserHoverCardProps, IFieldUserHoverCardState> {
24
+ constructor(props: IFieldUserHoverCardProps);
25
+ render(): JSX.Element;
26
+ }
@@ -0,0 +1,103 @@
1
+ import * as React from 'react';
2
+ import { IContext } from '../../../common/interfaces';
3
+ import { IPrincipal } from '../../../common/SPEntities';
4
+ import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
5
+ export interface IFieldUserRendererProps extends IFieldRendererProps {
6
+ /**
7
+ * users to be displayed
8
+ */
9
+ users?: IPrincipal[];
10
+ /**
11
+ * Customizer context
12
+ */
13
+ context: IContext;
14
+ }
15
+ /**
16
+ * Internal interface to work with user profile
17
+ */
18
+ export interface IFieldUser {
19
+ /**
20
+ * display name
21
+ */
22
+ displayName?: string;
23
+ /**
24
+ * job title
25
+ */
26
+ jobTitle?: string;
27
+ /**
28
+ * department
29
+ */
30
+ department?: string;
31
+ /**
32
+ * user id
33
+ */
34
+ id?: string;
35
+ /**
36
+ * avatar url
37
+ */
38
+ imageUrl?: string;
39
+ /**
40
+ * email
41
+ */
42
+ email?: string;
43
+ /**
44
+ * skype for business username
45
+ */
46
+ sip?: string;
47
+ /**
48
+ * true if the user is current user
49
+ */
50
+ currentUser?: boolean;
51
+ /**
52
+ * work phone
53
+ */
54
+ workPhone?: string;
55
+ /**
56
+ * cell phone
57
+ */
58
+ cellPhone?: string;
59
+ /**
60
+ * url to edit user profile in Delve
61
+ */
62
+ userUrl?: string;
63
+ }
64
+ export interface IFieldUserRendererState {
65
+ users?: IFieldUser[];
66
+ }
67
+ /**
68
+ * Field User Renderer.
69
+ * Used for:
70
+ * - People and Groups
71
+ */
72
+ export declare class FieldUserRenderer extends React.Component<IFieldUserRendererProps, IFieldUserRendererState> {
73
+ private _loadedUserProfiles;
74
+ private _userUrlTemplate;
75
+ constructor(props: IFieldUserRendererProps, state: IFieldUserRendererState);
76
+ UNSAFE_componentWillReceiveProps(nextProps: IFieldUserRendererProps): void;
77
+ render(): JSX.Element;
78
+ /**
79
+ * Renders compact part of user Hover Card
80
+ * @param index user index in the list of users/groups in the People and Group field value
81
+ * @param user IUser
82
+ */
83
+ private _onRenderCompactCard;
84
+ /**
85
+ * Renders expanded part of user Hover Card
86
+ * @param user IUser
87
+ */
88
+ private _onRenderExpandedCard;
89
+ /**
90
+ * Merges data from IPrincipal object and IUserProfileProperties object to IUser object
91
+ * @param principal IPrincipal
92
+ * @param userProfileProperties IUserProfileProperties
93
+ */
94
+ private _getUserFromPrincipalAndProps;
95
+ /**
96
+ * Get the template of url for editing user profile in Delve
97
+ */
98
+ private _getUserUrlTemplate;
99
+ /**
100
+ * Requests User Profile Properties
101
+ */
102
+ private _requestUserProfile;
103
+ }
@@ -0,0 +1,3 @@
1
+ export * from './FieldUserRenderer.module.scss';
2
+ export * from './FieldUserHoverCard';
3
+ export * from './FieldUserRenderer';
@@ -0,0 +1,45 @@
1
+ import * as React from 'react';
2
+ import { IFilePickerProps } from './IFilePickerProps';
3
+ import { IFilePickerState } from './IFilePickerState';
4
+ export declare class FilePicker extends React.Component<IFilePickerProps, IFilePickerState> {
5
+ private fileBrowserService;
6
+ private oneDriveService;
7
+ private orgAssetsService;
8
+ private fileSearchService;
9
+ private readonly themed;
10
+ constructor(props: IFilePickerProps);
11
+ componentDidMount(): Promise<void>;
12
+ /**
13
+ * componentWillReceiveProps lifecycle hook
14
+ *
15
+ * @param nextProps
16
+ */
17
+ UNSAFE_componentWillReceiveProps(nextProps: IFilePickerProps): void;
18
+ render(): JSX.Element;
19
+ /**
20
+ * Renders the panel header
21
+ */
22
+ private _renderHeader;
23
+ /**
24
+ * Open the panel
25
+ */
26
+ private _handleOpenPanel;
27
+ /**
28
+ * Closes the panel
29
+ */
30
+ private _handleClosePanel;
31
+ /**
32
+ * On save action
33
+ */
34
+ private _handleSave;
35
+ private _handleOnChange;
36
+ /**
37
+ * Changes the selected tab when a link is selected
38
+ */
39
+ private _handleLinkClick;
40
+ /**
41
+ * Prepares navigation panel options
42
+ */
43
+ private _getNavPanelOptions;
44
+ private getDefaultSelectedTabKey;
45
+ }
@@ -0,0 +1,28 @@
1
+ import { IPalette } from '@fluentui/react/lib/Styling';
2
+ export declare const getThemedStyles: (palette: Partial<IPalette>) => import("@fluentui/merge-styles/lib/IStyleSet").IProcessedStyleSet<{
3
+ navLink: {
4
+ color: string;
5
+ };
6
+ navLinkSelected: {
7
+ color: string;
8
+ backgroundColor: string;
9
+ };
10
+ nav: {
11
+ color: string;
12
+ };
13
+ navInner: {
14
+ color: string;
15
+ };
16
+ tabHeaderContainer: {
17
+ color: string;
18
+ };
19
+ breadcrumbNavItem: {
20
+ color: string;
21
+ };
22
+ tabHeader: {
23
+ color: string;
24
+ };
25
+ actionButtonsContainer: {
26
+ backgroundColor: string;
27
+ };
28
+ }>;
@@ -0,0 +1,46 @@
1
+ import { BaseComponentContext } from '@microsoft/sp-component-base';
2
+ import { IBreadcrumbItem } from '@fluentui/react/lib/Breadcrumb';
3
+ import { IFolder, ILibrary } from '../../services/FileBrowserService.types';
4
+ export interface FilePickerBreadcrumbItem extends IBreadcrumbItem {
5
+ libraryData?: ILibrary;
6
+ folderData?: IFolder;
7
+ }
8
+ export interface IFilePickerTab {
9
+ context: BaseComponentContext;
10
+ accepts: string[];
11
+ onSave: (value: IFilePickerResult[]) => void;
12
+ onClose: () => void;
13
+ }
14
+ /**
15
+ * Represents the result of the FilePicker.
16
+ */
17
+ export interface IFilePickerResult {
18
+ /**
19
+ * Selected file name with extension.
20
+ */
21
+ fileName: string;
22
+ /**
23
+ * Selected file name without extension.
24
+ */
25
+ fileNameWithoutExtension: string;
26
+ /**
27
+ * Absolute file URL. Undefined in case of file upload.
28
+ */
29
+ fileAbsoluteUrl: string;
30
+ /**
31
+ * Size of a selected file (in bytes). Undefined in all cases but file upload
32
+ */
33
+ fileSize?: number;
34
+ /**
35
+ * Absolute not modified file SharePoint URL.
36
+ */
37
+ spItemUrl?: string;
38
+ /**
39
+ * Downloads file picker result content.
40
+ */
41
+ downloadFileContent: () => Promise<File>;
42
+ /**
43
+ * Preview
44
+ */
45
+ previewDataUrl?: string;
46
+ }
@@ -0,0 +1,147 @@
1
+ import { WebPartContext } from '@microsoft/sp-webpart-base';
2
+ import { IIconProps } from '@fluentui/react/lib/Icon';
3
+ import { IFilePickerResult } from './FilePicker.types';
4
+ export interface IFilePickerProps {
5
+ /**
6
+ * Specifies the text describing the file picker
7
+ */
8
+ label?: string;
9
+ /**
10
+ * Specifies the label of the file picker button
11
+ */
12
+ buttonLabel?: string;
13
+ /**
14
+ * Specifies the icon to be used to display Icon Button.
15
+ */
16
+ buttonIcon?: string;
17
+ /**
18
+ * Specifies props for icon to be used to display Icon Button.
19
+ */
20
+ buttonIconProps?: IIconProps;
21
+ /**
22
+ * Handler when the file has been selected
23
+ */
24
+ onSave: (filePickerResult: IFilePickerResult[]) => void;
25
+ /**
26
+ * Handler when file has been changed.
27
+ */
28
+ onChange?: (filePickerResult: IFilePickerResult[]) => void;
29
+ /**
30
+ * Current context.
31
+ */
32
+ context: WebPartContext;
33
+ /**
34
+ * ClassName to be applied to the opener button element.
35
+ */
36
+ buttonClassName?: string;
37
+ /**
38
+ * ClassName to be applied to the Panel root element.
39
+ */
40
+ panelClassName?: string;
41
+ /**
42
+ * File extensions to be displayed.
43
+ */
44
+ accepts?: string[];
45
+ /**
46
+ * Sets the label to inform that the value is required.
47
+ */
48
+ required?: boolean;
49
+ /**
50
+ * Used to execute WebSearch. If not provided SearchTab will not be available.
51
+ */
52
+ bingAPIKey?: string;
53
+ /**
54
+ * Specifies if the picker button is disabled
55
+ */
56
+ disabled?: boolean;
57
+ /**
58
+ * Specifies if the picker button is hidden (if hidden, panel visibility can still be controlled with isPanelOpen)
59
+ */
60
+ hidden?: boolean;
61
+ /**
62
+ * Number of itmes to obtain when executing REST queries. Default 100.
63
+ */
64
+ itemsCountQueryLimit?: number;
65
+ /**
66
+ * Specifies if RecentTab should be hidden.
67
+ */
68
+ hideRecentTab?: boolean;
69
+ /**
70
+ * Specifies if StockImagesTab should be hidden.
71
+ */
72
+ hideStockImages?: boolean;
73
+ /**
74
+ * Specifies if WebSearchTab should be hidden.
75
+ */
76
+ hideWebSearchTab?: boolean;
77
+ /**
78
+ * Specifies if OrganisationalAssetTab should be hidden.
79
+ */
80
+ hideOrganisationalAssetTab?: boolean;
81
+ /**
82
+ * Specifies if OneDriveTab should be hidden.
83
+ */
84
+ hideOneDriveTab?: boolean;
85
+ /**
86
+ * Specifies if SiteFilesTab should be hidden.
87
+ */
88
+ hideSiteFilesTab?: boolean;
89
+ /**
90
+ * Specifies if LocalUploadTab should be hidden.
91
+ */
92
+ hideLocalUploadTab?: boolean;
93
+ /**
94
+ * Specifies if LocalMultipleUploadTab should be hidden.
95
+ */
96
+ hideLocalMultipleUploadTab?: boolean;
97
+ /**
98
+ * Specifies if LinkUploadTab should be hidden.
99
+ */
100
+ hideLinkUploadTab?: boolean;
101
+ /**
102
+ * Specifies if last active tab will be stored after the Upload panel has been closed.
103
+ * Note: the value of selected tab is stored in the queryString hash.
104
+ * @default true
105
+ */
106
+ storeLastActiveTab?: boolean;
107
+ /**
108
+ * Specifies if the file picker panel is open by default or not
109
+ */
110
+ isPanelOpen?: boolean;
111
+ /**
112
+ * Handler when file picker has been cancelled.
113
+ */
114
+ onCancel?: () => void;
115
+ /**
116
+ * Optional additional renderer for Link tab
117
+ */
118
+ renderCustomLinkTabContent?: (filePickerResult: IFilePickerResult) => JSX.Element | null;
119
+ /**
120
+ * Optional additional renderer for Upload tab
121
+ */
122
+ renderCustomUploadTabContent?: (filePickerResult: IFilePickerResult) => JSX.Element | null;
123
+ /**
124
+ * Optional additional renderer for Multiple Upload tab
125
+ */
126
+ renderCustomMultipleUploadTabContent?: (filePickerResult: IFilePickerResult[]) => JSX.Element | null;
127
+ /**
128
+ * Specifies if Site Pages library to be visible on Sites tab
129
+ */
130
+ includePageLibraries?: boolean;
131
+ /**
132
+ * Specifies a default folder to be active in the Site Files tab
133
+ */
134
+ defaultFolderAbsolutePath?: string;
135
+ /**
136
+ * Specifies a default site in the Site Files tab
137
+ */
138
+ webAbsoluteUrl?: string;
139
+ /**
140
+ * Specifies if external links are allowed
141
+ */
142
+ allowExternalLinks?: boolean;
143
+ /**
144
+ * Specifies if file check should be done
145
+ */
146
+ checkIfFileExists?: boolean;
147
+ }
@@ -0,0 +1,7 @@
1
+ export interface IFilePickerState {
2
+ showFullNav?: boolean;
3
+ panelOpen?: boolean;
4
+ selectedTab?: string;
5
+ webTitle?: string;
6
+ organisationAssetsEnabled?: boolean;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { FilesSearchService } from '../../../services/FilesSearchService';
2
+ import { IFilePickerResult, IFilePickerTab } from '../FilePicker.types';
3
+ export interface ILinkFilePickerTabProps extends IFilePickerTab {
4
+ allowExternalLinks: boolean;
5
+ checkIfFileExists: boolean;
6
+ fileSearchService: FilesSearchService;
7
+ renderCustomLinkTabContent: (filePickerResult: IFilePickerResult) => JSX.Element | null;
8
+ }
@@ -0,0 +1,5 @@
1
+ import { IFilePickerResult } from '../FilePicker.types';
2
+ export interface ILinkFilePickerTabState {
3
+ filePickerResult?: IFilePickerResult;
4
+ isValid: boolean;
5
+ }
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+ import { ILinkFilePickerTabProps } from './ILinkFilePickerTabProps';
3
+ import { ILinkFilePickerTabState } from './ILinkFilePickerTabState';
4
+ export default class LinkFilePickerTab extends React.Component<ILinkFilePickerTabProps, ILinkFilePickerTabState> {
5
+ constructor(props: ILinkFilePickerTabProps);
6
+ render(): React.ReactElement<ILinkFilePickerTabProps>;
7
+ /**
8
+ * Called as user types in a new value
9
+ */
10
+ private _handleChange;
11
+ /**
12
+ * Verifies the url that was typed in
13
+ * @param value
14
+ */
15
+ private _getErrorMessagePromise;
16
+ /**
17
+ * Handles when user saves
18
+ */
19
+ private _handleSave;
20
+ /**
21
+ * HAndles when user closes without saving
22
+ */
23
+ private _handleClose;
24
+ /**
25
+ * Is this a URL ?
26
+ * (insert guy holding a butterfly meme)
27
+ */
28
+ private _isUrl;
29
+ private _isSameDomain;
30
+ }
@@ -0,0 +1,3 @@
1
+ export * from './LinkFilePickerTab';
2
+ export * from './ILinkFilePickerTabProps';
3
+ export * from './ILinkFilePickerTabState';