[ADF-1873] Remove all deprecated code from ADF (#4145)

* remove deprecated code part 1

* remove deprecation step 2

* fix spellcheck

* fix

* fix lint

* fix not used import

* remove deprecation

* fix test first part after remove deprecation

* fix test

* fix sidebar demo shell
This commit is contained in:
Eugenio Romano
2019-01-15 15:36:01 +00:00
committed by GitHub
parent 24a7c939e6
commit 7d061b2c11
109 changed files with 351 additions and 1106 deletions
@@ -63,8 +63,6 @@ Displays the documents from a repository.
| currentFolderId | `string` | null | The ID of the folder node to display or a reserved string alias for special sources |
| display | `string` | DisplayMode.List | Change the display mode of the table. Can be "list" or "gallery". |
| emptyFolderImageUrl | `string` | | Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' |
| enableInfiniteScrolling | `boolean` | false | (**Deprecated:** 2.3.0) Set document list to work in infinite scrolling mode |
| folderNode | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | null | (**Deprecated:** 2.3.0 - use currentFolderId or node) Currently displayed folder node |
| imageResolver | `any \| null` | null | Custom image resolver |
| includeFields | `string[]` | | Include additional information about the node in the server request. For example: association, isLink, isLocked and others. |
| loading | `boolean` | false | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. |
@@ -80,7 +78,6 @@ Displays the documents from a repository.
| rowStyleClass | `string` | | The CSS class to apply to every row |
| selectionMode | `string` | "single" | Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| showHeader | `boolean` | true | Toggles the header |
| skipCount | `number` | 0 | (**Deprecated:** 2.3.0 - define it in pagination) Number of elements to skip over for pagination purposes |
| sorting | `string[]` | ['name', 'asc'] | Defines default sorting. The format is an array of 2 strings `[key, direction]` i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to override the default sorting detected by the component based on columns. |
| sortingMode | `string` | "client" | Defines sorting mode. Can be either `client` (items in the list are sorted client-side) or `server` (the ordering supplied by the server is used without further client-side sorting). Note that the `server` option _does not_ request the server to sort the data before delivering it. |
| thumbnails | `boolean` | false | Show document thumbnails rather than icons |
@@ -98,7 +95,7 @@ Displays the documents from a repository.
## Details
The properties `currentFolderId`, `folderNode` and `node` set the initial folder shown by
The properties `currentFolderId` and `node` set the initial folder shown by
the Document List. They cannot be used together, so choose the one that suits your use case
best.
Document list will automatically show special icons for : `Smart Folder`, `Link to a Folder` and `Folder with rules` as showed in the picture below :
@@ -175,12 +172,28 @@ Set the `[display]` property to "gallery" to enable card view mode:
### Pagination strategy
The Document List by default supports 2 types of pagination: **finite** and **infinite**:
The Document List by default supports 2 types of pagination: [Pagination component](../core/pagination.component.md) and [Infinite pagination component](../core/infinite-pagination.component.md)
- With **finite** pagination, the Document List needs 2 parameters: `maxItems` and `skipCount`. These set the maximum number of items shown in a single page and the start
offset of the first item in the page (ie, the number of items you need to skip to get there).
- You can enable **infinite** pagination by setting the same parameters plus an extra third
parameter: `enableInfiniteScrolling`.
#### Pagination component
```html
<adf-document-list #documentList ...></adf-document-list>
<adf-pagination
[target]="documentList"">
</adf-pagination>
```
#### Infinite pagination component
```html
<adf-document-list #documentList ...></adf-document-list>
<adf-infinite-pagination
[target]="documentList"
[loading]="documentList.infiniteLoading">
</adf-infinite-pagination>
```
### Data Sources
@@ -447,7 +460,7 @@ Now you can access Document List properties or call methods directly:
```ts
// print currently displayed folder node object to console
console.log(documentList.folderNode);
console.log(documentList.currentFolderId);
```
**Important note**:
@@ -660,7 +673,7 @@ actions you have defined in a context menu:
selector: 'my-view',
template: `
<adf-document-list [contextMenuActions]="true">...</adf-document-list>
<context-menu-holder></context-menu-holder>
<adf-context-menu-holder></context-menu-holder>
`
})
export class MyView {
@@ -54,11 +54,6 @@ Implements node operations used by the [Document List component](../content-serv
- _nodeId:_ `string` - ID of the target node
- _includeFields:_ `string[]` - Extra information to include (available options are "aspectNames", "isLink" and "association")
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`>` - Details of the folder
- **hasPermission**(node: `any`, permission: [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)`|string`): `boolean`<br/>
(**Deprecated:** 2.3.0 - use the equivalent in the content service) Checks if a node has the specified permission.
- _node:_ `any` - Target node
- _permission:_ [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)`|string` - Permission level to query
- **Returns** `boolean` - True if the node has the permission, false otherwise
- **moveNode**(nodeId: `string`, targetParentId: `string`): `any`<br/>
Moves a node to destination node.
- _nodeId:_ `string` - The id of the node to be moved
@@ -47,7 +47,6 @@ Some sample CSS to show the drag and drop area:
| Name | Type | Description |
| ---- | ---- | ----------- |
| filesDropped | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<File[]>` | Emitted when one or more files are dragged and dropped onto the draggable element. |
| filesEntityDropped | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | (**Deprecated:** in 2.4.0: use `filesDropped` instead) Emitted when one or more files are dragged and dropped onto the draggable element. |
| folderEntityDropped | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when a directory is dragged and dropped onto the draggable element. |
## Details
@@ -43,7 +43,6 @@ You can show your own custom template when no results are found for the search:
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| autocomplete | `boolean` | false | Toggles auto-completion of the search input field. |
| customQueryBody | `QueryBody` | | (**Deprecated:** in 2.1.0) |
| expandable | `boolean` | true | Toggles whether to use an expanding search control. If false then a regular input is used. |
| highlight | `boolean` | false | Toggles highlighting of the search term in the results. |
| inputType | `string` | "text" | Type of the input field to render, e.g. "search" or "text" (default). |
+1 -2
View File
@@ -38,7 +38,6 @@ Searches items for supplied search terms.
| ---- | ---- | ------------- | ----------- |
| displayWith | `Function \| null` | null | Function that maps an option's value to its display value in the trigger. |
| maxResults | `number` | 20 | Maximum number of results to show in the search. |
| queryBody | `QueryBody` | | (**Deprecated:** in 2.1.0) |
| searchTerm | `string` | "" | Search term to use when executing the search. Updating this value will run a new search and update the results. |
| skipResults | `number` | 0 | Number of results to skip from the results pagination. |
@@ -153,7 +152,7 @@ By doing this, you can get the results as the user types into the input text.
You can get finer control over the parameters of a search by defining them in a custom
[QueryBody](https://github.com/Alfresco/alfresco-js-api/blob/1.6.0/src/alfresco-search-rest-api/docs/QueryBody.md)
object. The recommended way to do this is with a custom implementation of the
[Search Configuration interface](../core/search-configuration.interface.md) (the `queryBody` parameter of the [`Search component`](../content-services/search.component.md) is now deprecated). The ADF source provides a standard implementation of this
. The ADF source provides a standard implementation of this
interface, [`SearchConfigurationService`](../core/search-configuration.service.md) that you can use as a base to adapt to your needs. See the
[Search Configuration interface](../core/search-configuration.interface.md) page for full details of how to
customize your search.
@@ -68,14 +68,13 @@ as the drag/drop target:
| nodeType | `string` | "cm:content" | Custom node type for uploaded file |
| 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 | `void` | | (**Deprecated:** 2.4.0 - use rootFolderId ID of parent folder node) ID of parent folder node |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| beginUpload | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UploadFilesEvent`](../../lib/content-services/upload/components/upload-files.event.ts)`>` | Emitted when the upload begins. |
| createFolder | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | (**Deprecated:** 2.4.0 No longer used by the framework) Emitted when a folder is created. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when an error occurs. |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when the file is uploaded successfully. |
@@ -22,7 +22,6 @@ Displays the version history of a node in a [Version Manager component](../conte
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| id | `string` | | (**Deprecated:** in 2.3.0) |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | The target node. |
| showActions | `boolean` | true | Toggles showing/hiding of version actions |
| showComments | `boolean` | true | Toggles showing/hiding of comments |