mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2563] Upload new version information dialog (#3235)
* add majorVersion param move common part in base class * refactor upload queue * fix after refactoring * add comment functionality in versioning add minor and major option in versioning add animation in versioning add new functionality in demo shell * add animation test * add missing properties test and base upload class * fix reload after new version upload [ADF-2582] * update documentation * update doc and fix minor style issues * fix tslint error * change cachebuster * ADF-2672 version manager disable buttons * [ADF-2649] hide show actions in version list * fix tests
This commit is contained in:
@@ -29,7 +29,9 @@ Activates a file upload.
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
|
||||
| comment | `string` | | When you overwrite existing content, you can use the comment field to add a version comment that appears in the version history |
|
||||
| disabled | `boolean` | false | Toggles component disabled state (if there is no node permission checking). |
|
||||
| majorVersion | `boolean` | false | majorVersion boolean field to true to indicate a major version should be created. |
|
||||
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
|
||||
| multipleFiles | `boolean` | false | Allows/disallows multiple files |
|
||||
| rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
|
||||
@@ -44,7 +46,7 @@ Activates a file upload.
|
||||
| -- | -- | -- |
|
||||
| createFolder | `EventEmitter<Object>` | Emitted when a folder is created. |
|
||||
| error | `EventEmitter<Object>` | Emitted when an error occurs. |
|
||||
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. |
|
||||
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when create permission is missing. |
|
||||
| success | `EventEmitter<Object>` | Emitted when the file is uploaded successfully. |
|
||||
|
||||
## Details
|
||||
|
@@ -36,13 +36,18 @@ export class AppComponent {
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
|
||||
| disabled | `boolean` | false | Toggle component disabled state. |
|
||||
| parentId | `string` | | ID of parent folder node. |
|
||||
| versioning | `boolean` | false | When false, renames the file using an integer suffix if there is a name clash. Set to true to indicate that a major version should be created instead. |
|
||||
| comment | `string` | | When you overwrite existing content, you can use the comment field to add a version comment that appears in the version history |
|
||||
| disabled | `boolean` | false | Toggles component disabled state (if there is no node permission checking). |
|
||||
| majorVersion | `boolean` | false | majorVersion boolean field to true to indicate a major version should be created. |
|
||||
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
|
||||
| rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
|
||||
| versioning | `boolean` | false | Toggles versioning. |
|
||||
| parentId | `` | | |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| error | `EventEmitter<Object>` | Raised when the file upload goes in error. |
|
||||
| success | `EventEmitter<Object>` | Emitted when the file is uploaded. |
|
||||
| createFolder | `EventEmitter<Object>` | Emitted when a folder is created. |
|
||||
| error | `EventEmitter<Object>` | Emitted when an error occurs. |
|
||||
| success | `EventEmitter<Object>` | Emitted when the file is uploaded successfully. |
|
||||
|
@@ -22,7 +22,8 @@ Displays the version history of a node in a Version Manager component
|
||||
| allowDownload | `boolean` | true | Enable/disable possibility to download a version of the current node. |
|
||||
| id | `string` | | **Deprecated:** in 2.3.0 |
|
||||
| node | `MinimalNodeEntryEntity` | | |
|
||||
| showComments | `boolean` | true | |
|
||||
| showActions | `boolean` | true | show/hide version actions |
|
||||
| showComments | `boolean` | true | show/hide comments |
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -14,9 +14,12 @@ See it live: [Viewer Quickstart](https://embed.plnkr.co/iTuG1lFIXfsP95l6bDW6/)
|
||||
|
||||
- [Basic usage](#basic-usage)
|
||||
|
||||
- [Class members](#class-members)
|
||||
|
||||
- [Properties](#properties)
|
||||
- [Events](#events)
|
||||
- [Keyboard shortcuts](#keyboard-shortcuts)
|
||||
|
||||
- [Keyboard shortcuts](#keyboard-shortcuts)
|
||||
|
||||
- [Details](#details)
|
||||
|
||||
@@ -69,52 +72,55 @@ Note that if you have a URL which contains a shared link ID, you should extract
|
||||
ID portion and use it with the `sharedLinkId` property rather than using the whole
|
||||
URL with `urlFile`.
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| urlFile | `string` | `''` | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. |
|
||||
| urlFileViewer | `string` | `null` | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. |
|
||||
| blobFile | `Blob` | | Loads a Blob File |
|
||||
| fileNodeId | `string` | `null` | Node Id of the file to load. |
|
||||
| sharedLinkId | `string` | `null` | Shared link id (to display shared file). |
|
||||
| overlayMode | `boolean` | `false` | If `true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. |
|
||||
| showViewer | `boolean` | `true` | Hide or show the viewer |
|
||||
| showToolbar | `boolean` | `true` | Hide or show the toolbar |
|
||||
| displayName | `string` | | Specifies the name of the file when it is not available from the URL. |
|
||||
| allowGoBack | `boolean` | `true` | Allows `back` navigation |
|
||||
| allowDownload | `boolean` | `true` | Toggles downloading. |
|
||||
| allowPrint | `boolean` | `false` | Toggles printing. |
|
||||
| allowShare | `boolean` | `false` | Toggles sharing. |
|
||||
| allowFullScreen | `boolean` | `true` | Toggles the 'Full Screen' feature. |
|
||||
| allowNavigate | `boolean` | `false` | Toggles before/next navigation. You can use the arrow buttons to navigate between documents in the collection. |
|
||||
| canNavigateBefore | `boolean` | `true` | Toggles the "before" ("<") button. Requires `allowNavigate` to be enabled. |
|
||||
| canNavigateNext | `boolean` | `true` | Toggles the next (">") button. Requires `allowNavigate` to be enabled. |
|
||||
| allowSidebar | `boolean` | `false` | Toggles the sidebar. |
|
||||
| allowThumbnails | `boolean` | `true` | Toggles PDF thumbnails. |
|
||||
| showSidebar | `boolean` | `false` | Toggles sidebar visibility. Requires `allowSidebar` to be set to `true`. |
|
||||
| sidebarPosition | `string` | `'right'` | The position of the sidebar. Can be `left` or `right`. |
|
||||
| sidebarTemplate | `TemplateRef<any>` | `null` | The template for the sidebar. The template context contains the loaded node data. |
|
||||
| thumbnailsTemplate | `TemplateRef<any>` | `null` | The template for the pdf thumbnails. |
|
||||
| mimeType | `string` | | MIME type of the file content (when not determined by the filename extension). |
|
||||
| fileName | `string` | | Content filename. |
|
||||
| downloadUrl | `string` | `null` | URL to download. |
|
||||
| maxRetries | `number` | `5` | Number of times the Viewer will retry fetching content Rendition. There is a delay of at least one second between attempts. |
|
||||
| -- | -- | -- | -- |
|
||||
| allowDownload | `boolean` | true | Toggles downloading. |
|
||||
| allowFullScreen | `boolean` | true | Toggles the 'Full Screen' feature. |
|
||||
| allowGoBack | `boolean` | true | Allows `back` navigation |
|
||||
| allowNavigate | `boolean` | false | Toggles before/next navigation. You can use the arrow buttons to navigate between documents in the collection. |
|
||||
| allowPrint | `boolean` | false | Toggles printing. |
|
||||
| allowShare | `boolean` | false | Toggles sharing. |
|
||||
| allowSidebar | `boolean` | false | Toggles the sidebar. |
|
||||
| allowThumbnails | `boolean` | true | Toggles PDF thumbnails. |
|
||||
| blobFile | `Blob` | | Loads a Blob File |
|
||||
| canNavigateBefore | `boolean` | true | Toggles the "before" ("<") button. Requires `allowNavigate` to be enabled. |
|
||||
| canNavigateNext | `boolean` | true | Toggles the next (">") button. Requires `allowNavigate` to be enabled. |
|
||||
| displayName | `string` | | Specifies the name of the file when it is not available from the URL. |
|
||||
| downloadUrl | `string` | null | URL to download. |
|
||||
| fileName | `string` | | Content filename. |
|
||||
| maxRetries | `number` | 5 | Number of times the Viewer will retry fetching content Rendition. There is a delay of at least one second between attempts. |
|
||||
| mimeType | `string` | | MIME type of the file content (when not determined by the filename extension). |
|
||||
| nodeId | `string` | null | Node Id of the file to load. |
|
||||
| overlayMode | `boolean` | false | If `true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. |
|
||||
| sharedLinkId | `string` | null | Shared link id (to display shared file). |
|
||||
| showSidebar | `boolean` | false | Toggles sidebar visibility. Requires `allowSidebar` to be set to `true`. |
|
||||
| showToolbar | `boolean` | true | Hide or show the toolbar |
|
||||
| showViewer | `boolean` | true | Hide or show the viewer |
|
||||
| sidebarPosition | `string` | "right" | The position of the sidebar. Can be `left` or `right`. |
|
||||
| sidebarTemplate | `TemplateRef<any>` | null | The template for the sidebar. The template context contains the loaded node data. |
|
||||
| thumbnailsTemplate | `TemplateRef<any>` | null | The template for the pdf thumbnails. |
|
||||
| urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. |
|
||||
| urlFileViewer | `string` | null | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. |
|
||||
| fileNodeId | `` | | Node Id of the file to load. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| goBack | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Back' button. |
|
||||
| download | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Download' button. |
|
||||
| print | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Print' button. |
|
||||
| share | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Share' button. |
|
||||
| showViewerChange | `EventEmitter<boolean>` | Emitted when the viewer is shown or hidden. |
|
||||
| extensionChange | `EventEmitter<string>` | Emitted when the filename extension changes. |
|
||||
| navigateBefore | `EventEmitter<{}>` | Emitted when user clicks 'Navigate Before' ("<") button. |
|
||||
| navigateNext | `EventEmitter<{}>` | Emitted when user clicks 'Navigate Next' (">") button. |
|
||||
| -- | -- | -- |
|
||||
| download | `any` | Emitted when user clicks the 'Download' button. |
|
||||
| extensionChange | `any` | Emitted when the filename extension changes. |
|
||||
| goBack | `any` | Emitted when user clicks the 'Back' button. |
|
||||
| navigateBefore | `any` | Emitted when user clicks 'Navigate Before' ("<") button. |
|
||||
| navigateNext | `any` | Emitted when user clicks 'Navigate Next' (">") button. |
|
||||
| print | `any` | Emitted when user clicks the 'Print' button. |
|
||||
| share | `any` | Emitted when user clicks the 'Share' button. |
|
||||
| showViewerChange | `any` | Emitted when the viewer is shown or hidden. |
|
||||
|
||||
### Keyboard shortcuts
|
||||
## Keyboard shortcuts
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
@@ -467,4 +473,4 @@ You can define multiple `adf-viewer-extension` templates if required:
|
||||
|
||||
## See also
|
||||
|
||||
- [Document List component](../content-services/document-list.component.md)
|
||||
- [Document List component](../content-services/document-list.component.md)
|
||||
|
Reference in New Issue
Block a user