Amedeo Lepore 933b59c54e
[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>
2022-11-18 09:49:17 +01:00

2.3 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Node Restore directive v2.0.0 Active 2019-01-16

Node Restore directive

Restores deleted nodes to their original location.

Basic Usage

<adf-toolbar title="toolbar example">
    <button mat-icon-button
        [adf-restore]="documentList.selection"
        (restore)="onRestore($event)">
        <mat-icon>restore</mat-icon>
    </button>
</adf-toolbar>

<adf-document-list #documentList
    currentFolderId="-trash-" ...>
    ...
</adf-document-list>
    onRestore(restoreMessage: RestoreMessageModel) {
        this.notificationService
            .openSnackMessageAction(
                restoreMessage.message,
                restoreMessage.action
            )
            .onAction()
            .subscribe(() => this.navigateLocation(restoreMessage.path));
        this.documentList.reload();
    }

    navigateLocation(path: PathInfoEntity) {
        const parent = path.elements[path.elements.length - 1];
        this.router.navigate(['files/', parent.id]);
    }

Class members

Properties

Name Type Default value Description
selection DeletedNodeEntry[] Array of deleted nodes to restore.

Events

Name Type Description
restore EventEmitter<RestoreMessageModel> Emitted when restoration is complete.

Details

The directive takes a selection of DeletedNodeEntry instances and restores them to their original locations. If the original location doesn't exist anymore then they remain in the trash list.

When you restore a single node, you can use the location property to show where the node has been restored. The property specifies the route path where the list of nodes are rendered.

See Also