mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-10772] Move content services directives from core to content-services package (#7942)
* [AAE-10772] move CheckAllowableOperationDirective to content services * [AAE-10772] move LibraryFavoriteDirective to content services * [AAE-10772] move LibraryMembershipDirective to content services * [AAE-10772] move NodeDeleteDirective to content services * [AAE-10772] move NodeFavoriteDirective to content services * [AAE-10772] update imports on LibraryMembershipDirective * [AAE-10772] move NodeRestoreDirective to content services * [AAE-10772] move UserInfoModule to content services * Revert "[AAE-10772] move UserInfoModule to content services" This reverts commit ede1d5db3923859586d88646ca7826abd3d30cf1. * [AAE-10772] Remove barrel imports and move library membership interfaces into LibraryMembershipDirective because are only used in that directive * [AAE-10772] Remove barrel imports from spec files * [AAE-10772] Move directive md files from core to content-services * [AAE-10772] Fix files path into the docs files * [AAE-10772] Export library membership interfaces because are imported by the ACA ToggleJoinLibraryButtonComponent Co-authored-by: Diogo Bastos <diogo.bastos@hyland.com>
This commit is contained in:
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2019-02-13
|
||||
---
|
||||
|
||||
# [Check Allowable Operation directive](lib/core/src/lib/directives/check-allowable-operation.directive.ts "Defined in check-allowable-operation.directive.ts")
|
||||
# [Check Allowable Operation directive](../../../lib/content-services/src/lib/directives/check-allowable-operation.directive.ts "Defined in check-allowable-operation.directive.ts")
|
||||
|
||||
Selectively disables an HTML element or Angular component.
|
||||
|
||||
@@ -47,7 +47,7 @@ Selectively disables an HTML element or Angular component.
|
||||
|
||||
## Details
|
||||
|
||||
The [Check Allowable Operation Directive](check-allowable-operation.directive.md) lets you disable an HTML element or Angular component
|
||||
The [Check Allowable Operation Directive](../../../lib/content-services/src/lib/directives/check-allowable-operation.directive.ts) lets you disable an HTML element or Angular component
|
||||
by taking a collection of [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md) instances and checking their permissions.
|
||||
|
||||
The decorated element will be disabled if:
|
||||
@@ -57,7 +57,7 @@ The decorated element will be disabled if:
|
||||
|
||||
### HTML element example
|
||||
|
||||
A typical use case is to bind a [Document List](../../content-services/components/document-list.component.md)
|
||||
A typical use case is to bind a [Document List](../components/document-list.component.md)
|
||||
selection property to a toolbar button. In the following example, the "Delete" button should
|
||||
be disabled if no selection is present or if user does not have permission to delete at least one node in the selection:
|
||||
|
||||
@@ -80,8 +80,8 @@ one or more documents that they have permission to delete.
|
||||
|
||||
### Angular component example
|
||||
|
||||
You can add the directive to any Angular component that implements the [`NodeAllowableOperationSubject`](lib/core/src/lib/directives/check-allowable-operation.directive.ts)
|
||||
interface (the [Upload Drag Area component](../../content-services/components/upload-drag-area.component.md),
|
||||
You can add the directive to any Angular component that implements the [`NodeAllowableOperationSubject`](../../../lib/content-services/src/lib/interfaces/node-allowable-operation-subject.interface.ts)
|
||||
interface (the [Upload Drag Area component](../components/upload-drag-area.component.md),
|
||||
for example). You can also use it in much the same way as you would with an HTML element:
|
||||
|
||||
```html
|
||||
@@ -95,14 +95,14 @@ for example). You can also use it in much the same way as you would with an HTML
|
||||
```
|
||||
|
||||
To enable your own component to work with this directive, you need to implement the
|
||||
[`NodeAllowableOperationSubject`](lib/core/src/lib/directives/check-allowable-operation.directive.ts) interface and also define it as an
|
||||
[`EXTENDIBLE_COMPONENT`](lib/core/src/lib/interface/injection.tokens.ts)
|
||||
[`NodeAllowableOperationSubject`](../../../lib/content-services/src/lib/interfaces/node-allowable-operation-subject.interface.ts) interface and also define it as an
|
||||
[`EXTENDIBLE_COMPONENT`](../../../lib/core/src/lib/interface/injection.tokens.ts)
|
||||
parent component,
|
||||
as described in the following sections.
|
||||
|
||||
### Implementing the NodeAllowableOperationSubject interface
|
||||
|
||||
The component must implement the [`NodeAllowableOperationSubject`](lib/core/src/lib/directives/check-allowable-operation.directive.ts) interface which means it must have a
|
||||
The component must implement the [`NodeAllowableOperationSubject`](../../../lib/content-services/src/lib/interfaces/node-allowable-operation-subject.interface.ts) interface which means it must have a
|
||||
boolean `disabled` property. This is the property that will be set by the directive:
|
||||
|
||||
```js
|
||||
@@ -121,7 +121,7 @@ up to the `@Host()` component. The host component is typically the component tha
|
||||
the dependency. However, when this component is projected into a parent component, the
|
||||
parent becomes the host. This means you must provide your component with forward referencing
|
||||
as the
|
||||
[`EXTENDIBLE_COMPONENT`](lib/core/src/lib/interface/injection.tokens.ts)
|
||||
[`EXTENDIBLE_COMPONENT`](../../../lib/core/src/lib/interface/injection.tokens.ts)
|
||||
and also provide your component as a `viewProvider`:
|
||||
|
||||
```js
|
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2018-11-20
|
||||
---
|
||||
|
||||
# [Node Delete directive](lib/core/src/lib/directives/node-delete.directive.ts "Defined in node-delete.directive.ts")
|
||||
# [Node Delete directive](../../../lib/content-services/src/lib/directives/node-delete.directive.ts "Defined in node-delete.directive.ts")
|
||||
|
||||
Deletes multiple files and folders.
|
||||
|
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2018-11-13
|
||||
---
|
||||
|
||||
# [Node Favorite directive](lib/core/src/lib/directives/node-favorite.directive.ts "Defined in node-favorite.directive.ts")
|
||||
# [Node Favorite directive](../../../lib/content-services/src/lib/directives/node-favorite.directive.ts "Defined in node-favorite.directive.ts")
|
||||
|
||||
Selectively toggles nodes as favorites.
|
||||
|
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2019-01-16
|
||||
---
|
||||
|
||||
# [Node Restore directive](lib/core/src/lib/directives/node-restore.directive.ts "Defined in node-restore.directive.ts")
|
||||
# [Node Restore directive](../../../lib/content-services/src/lib/directives/node-restore.directive.ts "Defined in node-restore.directive.ts")
|
||||
|
||||
Restores deleted nodes to their original location.
|
||||
|
||||
@@ -56,7 +56,7 @@ Restores deleted nodes to their original location.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| restore | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`RestoreMessageModel`](../../../lib/core/directives/node-restore.directive.ts)`>` | Emitted when restoration is complete. |
|
||||
| restore | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`RestoreMessageModel`](../../../lib/content-services/src/lib/interfaces/restore-message-model.interface.ts)`>` | Emitted when restoration is complete. |
|
||||
|
||||
## Details
|
||||
|
Reference in New Issue
Block a user