ACS-8227: remove internal mime type icon pipe (#10142)

This commit is contained in:
Denys Vuika
2024-09-10 10:07:18 -04:00
committed by GitHub
parent b1260e06ea
commit b1abe2c8a6
16 changed files with 31 additions and 123 deletions

View File

@@ -74,7 +74,6 @@ See the [Custom layout](#custom-layout) section for full details of all availabl
| canNavigateNext | `boolean` | true | Toggles the next (">") button. Requires `allowNavigate` to be enabled. |
| fileName | `string` | | Override Content filename. |
| mimeType | `string` | | Overload mimeType |
| originalMimeType | `string` | | Overload originalMimeType |
| overlayMode | `boolean` | false | If `true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. |
| readOnly | `boolean` | true | Enable when where is possible the editing functionalities |
| allowedEditActions | `{ [key: string]: boolean }` | `{ rotate: true, crop: true }` | Controls which editing actions are enabled when not in read-only mode. Allows granular control over actions like rotation and cropping. |
@@ -121,7 +120,6 @@ You can provide custom file parameters, for example a value for the `mimeType` o
[fileName]="fileName"
[allowGoBack]="false"
[mimeType]="mimeType"
[originalMimeType]="originalMimeType"
[urlFile]="fileUrl">
</adf-viewer>
```

View File

@@ -1,30 +0,0 @@
---
Title: Mime Type Icon pipe
Added: v2.0.0
Status: Active
---
# [Mime Type Icon pipe](../../../lib/core/src/lib/pipes/mime-type-icon.pipe.ts "Defined in mime-type-icon.pipe.ts")
Retrieves an icon to represent a MIME type.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
<img src='{{ "image/jpeg" | adfMimeTypeIcon }}' />
</div>
```
<!-- {% endraw %} -->
## 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](../services/thumbnail.service.md) for the mapping between types and icons). The pipe will return a "miscellaneous" icon when no specific mapping is defined.
## See also
- [Thumbnail service](../services/thumbnail.service.md)

View File

@@ -49,11 +49,14 @@ and icons is shown in the table below:
All the ADF icons for MIME types are now registered into the [`MatIconRegistry`](https://material.angular.io/components/icon/api), so you can use all
the icons via the &lt;mat-icon> tag:
```javascript
```typescript
import { ThumbnailService } from '@alfresco/adf-core';
constructor(public thumbnailService: ThumbnailService) {
}
class MyComponent {
constructor(public thumbnailService: ThumbnailService) {
}
}
```
```html
@@ -62,7 +65,3 @@ PDF <mat-icon svgIcon="application/pdf"></mat-icon>
GIF <mat-icon svgIcon="image/gif"></mat-icon>
.....
```
## See also
- [Mime type icon pipe](../pipes/mime-type-icon.pipe.md)