[ADF-1586] Added docs for Thumbnail and Mime type (#2537)
@ -194,9 +194,9 @@ for more information about installing and using the source code.
|
||||
|
||||
- [Form rendering service](form-rendering.service.md)
|
||||
- [Form service](form.service.md)
|
||||
- [*Process content service](../ng2-components/ng2-activiti-form/src/services/process-content.service.ts)
|
||||
- [*Activiti alfresco service](../ng2-components/ng2-activiti-form/src/services/activiti-alfresco.service.ts)
|
||||
- [*Node service](../ng2-components/ng2-activiti-form/src/services/node.service.ts)
|
||||
- [*Process content service](../ng2-components/ng2-activiti-form/src/services/process-content.service.ts)
|
||||
- [*Widget visibility service](../ng2-components/ng2-activiti-form/src/services/widget-visibility.service.ts)
|
||||
|
||||
### Widgets
|
||||
@ -289,7 +289,6 @@ for more information about installing and using the source code.
|
||||
### Directives
|
||||
|
||||
- [Task audit directive](task-audit.directive.md)
|
||||
- [*No task detail template directive](../ng2-components/ng2-activiti-tasklist/src/components/no-task-detail-template.directive.ts)
|
||||
|
||||
### Models
|
||||
|
||||
@ -335,14 +334,13 @@ for more information about installing and using the source code.
|
||||
- [Node permission directive](node-permission.directive.md)
|
||||
- [Node restore directive](node-restore.directive.md)
|
||||
- [Upload directive](upload.directive.md)
|
||||
- [*Card view content proxy directive](../ng2-components/ng2-alfresco-core/src/components/view/card-view-content-proxy.directive.ts)
|
||||
|
||||
### Pipes
|
||||
|
||||
- [Mime type icon pipe](mime-type-icon.pipe.md)
|
||||
- [Node name tooltip pipe](node-name-tooltip.pipe.md)
|
||||
- [Text highlight pipe](text-highlight.pipe.md)
|
||||
- [*File size pipe](../ng2-components/ng2-alfresco-core/src/pipes/file-size.pipe.ts)
|
||||
- [*Mime type icon pipe](../ng2-components/ng2-alfresco-core/src/pipes/mime-type-icon.pipe.ts)
|
||||
- [*Time ago pipe](../ng2-components/ng2-alfresco-core/src/pipes/time-ago.pipe.ts)
|
||||
- [*User initial pipe](../ng2-components/ng2-alfresco-core/src/pipes/user-initial.pipe.ts)
|
||||
|
||||
@ -356,6 +354,7 @@ for more information about installing and using the source code.
|
||||
- [Log service](log.service.md)
|
||||
- [Notification service](notification.service.md)
|
||||
- [Renditions service](renditions.service.md)
|
||||
- [Thumbnail service](thumbnail.service.md)
|
||||
- [Translation service](translation.service.md)
|
||||
- [Upload service](upload.service.md)
|
||||
- [User preferences service](user-preferences.service.md)
|
||||
@ -381,7 +380,6 @@ for more information about installing and using the source code.
|
||||
- [*Shared links api service](../ng2-components/ng2-alfresco-core/src/services/shared-links-api.service.ts)
|
||||
- [*Sites api service](../ng2-components/ng2-alfresco-core/src/services/sites-api.service.ts)
|
||||
- [*Storage service](../ng2-components/ng2-alfresco-core/src/services/storage.service.ts)
|
||||
- [*Thumbnail service](../ng2-components/ng2-alfresco-core/src/services/thumbnail.service.ts)
|
||||
- [*Translate loader service](../ng2-components/ng2-alfresco-core/src/services/translate-loader.service.ts)
|
||||
<!-- ng2-alfresco-core end -->
|
||||
|
||||
@ -450,11 +448,6 @@ for more information about installing and using the source code.
|
||||
### Components
|
||||
|
||||
- [Login component](login.component.md)
|
||||
|
||||
### Directives
|
||||
|
||||
- [*Login footer directive](../ng2-components/ng2-alfresco-login/src/directives/login-footer.directive.ts)
|
||||
- [*Login header directive](../ng2-components/ng2-alfresco-login/src/directives/login-header.directive.ts)
|
||||
<!-- ng2-alfresco-login end -->
|
||||
|
||||
[(Back to Contents)](#contents)
|
||||
@ -571,6 +564,8 @@ for more information about installing and using the source code.
|
||||
- [*TxtViewer component](../ng2-components/ng2-alfresco-viewer/src/components/txtViewer.component.ts)
|
||||
- [*Unknown format component](../ng2-components/ng2-alfresco-viewer/src/components/unknown-format/unknown-format.component.ts)
|
||||
- [*Viewer info drawer component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-info-drawer.component.ts)
|
||||
- [*Viewer more actions component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-more-actions.component.ts)
|
||||
- [*Viewer open with component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-open-with.component.ts)
|
||||
- [*Viewer toolbar component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-toolbar.component.ts)
|
||||
|
||||
### Directives
|
||||
|
BIN
docs/docassets/images/ft_ic_archive.png
Normal file
After Width: | Height: | Size: 315 B |
BIN
docs/docassets/images/ft_ic_document.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
docs/docassets/images/ft_ic_folder.png
Normal file
After Width: | Height: | Size: 264 B |
BIN
docs/docassets/images/ft_ic_folder_disable.png
Normal file
After Width: | Height: | Size: 228 B |
BIN
docs/docassets/images/ft_ic_ms_excel.png
Normal file
After Width: | Height: | Size: 720 B |
BIN
docs/docassets/images/ft_ic_ms_powerpoint.png
Normal file
After Width: | Height: | Size: 578 B |
BIN
docs/docassets/images/ft_ic_ms_word.png
Normal file
After Width: | Height: | Size: 632 B |
BIN
docs/docassets/images/ft_ic_pdf.png
Normal file
After Width: | Height: | Size: 382 B |
BIN
docs/docassets/images/ft_ic_presentation.png
Normal file
After Width: | Height: | Size: 265 B |
BIN
docs/docassets/images/ft_ic_raster_image.png
Normal file
After Width: | Height: | Size: 422 B |
BIN
docs/docassets/images/ft_ic_spreadsheet.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
docs/docassets/images/ft_ic_vector_image.png
Normal file
After Width: | Height: | Size: 381 B |
BIN
docs/docassets/images/ft_ic_video.png
Normal file
After Width: | Height: | Size: 219 B |
BIN
docs/docassets/images/ft_ic_website.png
Normal file
After Width: | Height: | Size: 360 B |
23
docs/mime-type-icon.pipe.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Mime Type Icon pipe
|
||||
|
||||
Retrieves an icon to represent a MIME type.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```HTML
|
||||
<div>
|
||||
<img src='{{ "image/jpeg" | adfMimeTypeIcon }}' />
|
||||
</div>
|
||||
```
|
||||
|
||||
## Details
|
||||
|
||||
The pipe takes a MIME type as input and returns the URL of an SVG file that
|
||||
symbolizes that type (see the [Thumbnail service](thumbnail.service.md) for the mapping between types and icons). The pipe will return a "miscellaneous" icon when no specific mapping is defined.
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
<!-- seealso start -->
|
||||
## See also
|
||||
|
||||
- [Thumbnail service](thumbnail.service.md)
|
||||
<!-- seealso end -->
|
@ -57,6 +57,7 @@
|
||||
"login.component": ["logout.directive"],
|
||||
"logout.directive": [],
|
||||
"metadata-indicators": [],
|
||||
"mime-type-icon.pipe": [],
|
||||
"node-permission.directive": [],
|
||||
"notification.service": [],
|
||||
"pagination.component": [],
|
||||
@ -91,6 +92,7 @@
|
||||
"task-list.component": [],
|
||||
"text-highlight.pipe": [],
|
||||
"theming": [],
|
||||
"thumbnail.service": ["mime-type-icon.pipe"],
|
||||
"toolbar-divider.component": [],
|
||||
"toolbar-title.component": [],
|
||||
"toolbar.component": ["toolbar-divider.component", "toolbar-title.component"],
|
||||
|
47
docs/thumbnail.service.md
Normal file
@ -0,0 +1,47 @@
|
||||
# Thumbnail service
|
||||
|
||||
Retrieves an SVG thumbnail image to represent a document type.
|
||||
|
||||
## Methods
|
||||
|
||||
`public getDocumentThumbnailUrl(document: any): string`<br/>
|
||||
Gets a thumbnail URL for a document node.
|
||||
|
||||
`public getMimeTypeIcon(mimeType: string): string`<br/>
|
||||
Gets a thumbnail URL for a MIME type.
|
||||
|
||||
`public getDefaultMimeTypeIcon(): string`<br/>
|
||||
Gets a "miscellaneous" thumbnail URL for types with no other icon defined.
|
||||
|
||||
## Details
|
||||
|
||||
The service can locate a thumbnail icon (in SVG format) for either
|
||||
a document node or a MIME type. The default mapping between types
|
||||
and icons is shown in the table below:
|
||||
|
||||
| Document | Icon | Types |
|
||||
| --- | --- | --- |
|
||||
| Compressed archive |  | 'application/x-compressed', 'application/x-zip-compressed', 'application/zip' |
|
||||
| Text |  | 'text/plain', 'application/json', 'application/x-javascript', 'application/vnd.apple.pages' |
|
||||
| Bitmap/raster image |  | 'image/png', 'image/jpeg', 'image/gif' |
|
||||
| MP4 video |  | 'video/mp4' |
|
||||
| SVG vector image|  | 'image/svg+xml' |
|
||||
| HTML file |  | 'text/html' |
|
||||
| PDF file |  | 'application/pdf' |
|
||||
| Folder |  | |
|
||||
| Disabled folder |  | |
|
||||
| Excel spreadsheet |  | 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' |
|
||||
| PowerPoint slideshow |  | 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.presentationml.template', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' |
|
||||
| Word document |  | 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' |
|
||||
| Keynote presentation |  | 'application/vnd.apple.keynote' |
|
||||
| Numbers spreadsheet |  | 'application/vnd.apple.numbers' |
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
<!-- seealso start -->
|
||||
## See also
|
||||
|
||||
- [Mime type icon pipe](mime-type-icon.pipe.md)
|
||||
<!-- seealso end -->
|
||||
|
||||
|
||||
|
@ -9,5 +9,9 @@
|
||||
"empty-folder-content",
|
||||
"empty-list",
|
||||
"loading-template",
|
||||
"no-content-template"
|
||||
"no-content-template",
|
||||
"card-view-content-proxy",
|
||||
"login-footer.directive",
|
||||
"login-header.directive",
|
||||
"no-task-detail-template"
|
||||
]
|