[ACA-2182] ADF 3.3.0 alpha (#1126)

* upgrade to latest adf 3.0.0 alpha

* use ADF share dialog

* [ACA-2069] make sure toggles have the right color

* raise error popups for shared links

* update test

* use date only for sharing

* [ACA-2069] small improvement - make sure toggles have the right color

* remove old share dialog

* move toggle-shared component to common module
This commit is contained in:
Denys Vuika
2019-06-14 12:59:09 +01:00
committed by GitHub
parent ca5795fac0
commit 36043d1473
20 changed files with 78 additions and 928 deletions

View File

@@ -29,6 +29,7 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { GenericErrorModule } from '@alfresco/aca-shared';
import { LocationLinkComponent } from './location-link/location-link.component';
import { ToggleSharedComponent } from './toggle-shared/toggle-shared.component';
@NgModule({
imports: [
@@ -37,8 +38,13 @@ import { LocationLinkComponent } from './location-link/location-link.component';
ExtensionsModule,
GenericErrorModule
],
declarations: [LocationLinkComponent],
exports: [ExtensionsModule, LocationLinkComponent, GenericErrorModule],
entryComponents: [LocationLinkComponent]
declarations: [LocationLinkComponent, ToggleSharedComponent],
exports: [
ExtensionsModule,
LocationLinkComponent,
GenericErrorModule,
ToggleSharedComponent
],
entryComponents: [LocationLinkComponent, ToggleSharedComponent]
})
export class AppCommonModule {}

View File

@@ -1,92 +0,0 @@
<div class="adf-share-link__dialog-content">
<h1 data-automation-id="adf-share-dialog-title" class="adf-share-link__title">
{{ 'SHARE.DIALOG-TITLE' | translate }} {{ fileName }}
</h1>
<mat-dialog-content>
<p class="adf-share-link__info">{{ 'SHARE.DESCRIPTION' | translate }}</p>
<div class="adf-share-link--row">
<h1 class="adf-share-link__label">{{ 'SHARE.TITLE' | translate }}</h1>
<mat-slide-toggle
data-automation-id="adf-share-toggle"
[checked]="isFileShared"
[disabled]="isDisabled"
(change)="onSlideShareChange()"
>
</mat-slide-toggle>
</div>
<form [formGroup]="form">
<mat-form-field class="adf-full-width">
<input
#sharedLinkInput
data-automation-id="adf-share-link"
class="adf-share-link__input"
matInput
cdkFocusInitial
placeholder="{{ 'SHARE.PUBLIC-LINK' | translate }}"
formControlName="sharedUrl"
readonly="readonly"
/>
<mat-icon
class="adf-input-action"
matSuffix
[clipboard-notification]="'SHARE.CLIPBOARD-MESSAGE' | translate"
[adf-clipboard]="sharedLinkInput"
>
link
</mat-icon>
</mat-form-field>
<div class="adf-share-link--row">
<h1 class="adf-share-link__label">{{ 'SHARE.EXPIRES' | translate }}</h1>
<mat-slide-toggle
[disabled]="!canUpdate"
#slideToggleExpirationDate
data-automation-id="adf-expire-toggle"
[checked]="form.controls['time'].value"
(change)="onToggleExpirationDate($event)"
>
</mat-slide-toggle>
</div>
<mat-form-field class="adf-full-width">
<mat-datetimepicker-toggle
#matDatetimepickerToggle="matDatetimepickerToggle"
[for]="datetimePicker"
matSuffix
>
</mat-datetimepicker-toggle>
<mat-datetimepicker
#datetimePicker
(closed)="onDatetimepickerClosed()"
type="date"
openOnFocus="true"
timeInterval="1"
>
</mat-datetimepicker>
<input
class="adf-share-link__input"
#dateTimePickerInput
matInput
[min]="minDate"
formControlName="time"
[matDatetimepicker]="datetimePicker"
/>
</mat-form-field>
</form>
</mat-dialog-content>
<div mat-dialog-actions>
<button
data-automation-id="adf-share-dialog-close"
mat-button
color="primary"
mat-dialog-close
>
{{ 'SHARE.CLOSE' | translate }}
</button>
</div>
</div>

View File

@@ -1,64 +0,0 @@
@mixin adf-share-link-typography {
letter-spacing: -0.4px;
line-height: 2;
font-weight: normal;
font-style: normal;
font-stretch: normal;
font-size: 16px;
opacity: 0.87;
}
.adf-share-link-dialog {
.adf-share-link {
&__dialog-content {
display: flex;
flex-direction: column;
}
&__label {
@include adf-share-link-typography;
flex: 1 1 auto;
}
&__title {
@include adf-share-link-typography;
}
&__info {
@include adf-share-link-typography;
opacity: 0.54;
font-size: 13px;
}
&--row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
}
&__input {
opacity: 0.54;
}
}
.adf-input-action {
cursor: pointer;
}
.mat-form-field-infix {
border-top: unset;
}
.mat-dialog-actions {
justify-content: flex-end;
& > button {
text-transform: uppercase;
}
}
.mat-form-field-flex {
align-items: center;
}
}

View File

@@ -1,350 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { TestBed, fakeAsync, async, tick } from '@angular/core/testing';
import {
MatDialogRef,
MAT_DIALOG_DATA,
MatDialog
} from '@angular/material/dialog';
import { of } from 'rxjs';
import {
setupTestBed,
CoreModule,
SharedLinksApiService,
NodesApiService,
NotificationService
} from '@alfresco/adf-core';
import { ContentNodeShareModule } from './content-node-share.module';
import { ShareDialogComponent } from './content-node-share.dialog';
import * as moment from 'moment';
import { Store } from '@ngrx/store';
describe('ShareDialogComponent', () => {
let node;
let matDialog: MatDialog;
const notificationServiceMock = {
openSnackMessage: jasmine.createSpy('openSnackMessage')
};
let sharedLinksApiService: SharedLinksApiService;
let nodesApiService: NodesApiService;
let fixture;
let component;
const storeMock = {
dispatch: jasmine.createSpy('dispatch')
};
setupTestBed({
imports: [
NoopAnimationsModule,
CoreModule.forRoot(),
ContentNodeShareModule
],
providers: [
NodesApiService,
SharedLinksApiService,
{ provide: Store, useValue: storeMock },
{ provide: NotificationService, useValue: notificationServiceMock },
{ provide: MatDialogRef, useValue: {} },
{ provide: MAT_DIALOG_DATA, useValue: {} }
]
});
beforeEach(() => {
fixture = TestBed.createComponent(ShareDialogComponent);
matDialog = TestBed.get(MatDialog);
sharedLinksApiService = TestBed.get(SharedLinksApiService);
nodesApiService = TestBed.get(NodesApiService);
component = fixture.componentInstance;
});
beforeEach(() => {
node = {
entry: {
id: 'nodeId',
allowableOperations: ['update'],
isFile: true,
properties: {}
}
};
});
afterEach(() => {
fixture.destroy();
});
it(`should toggle share action when property 'sharedId' does not exists`, fakeAsync(() => {
spyOn(sharedLinksApiService, 'createSharedLinks').and.returnValue(
of({
entry: { id: 'sharedId', sharedId: 'sharedId' }
})
);
component.data = {
node,
permission: true,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
tick(500);
expect(sharedLinksApiService.createSharedLinks).toHaveBeenCalled();
expect(
fixture.nativeElement.querySelector('input[formcontrolname="sharedUrl"]')
.value
).toBe('some-url/sharedId');
expect(
fixture.nativeElement.querySelector(
'.mat-slide-toggle[data-automation-id="adf-share-toggle"'
).classList
).toContain('mat-checked');
}));
it(`should not toggle share action when file has 'sharedId' property`, fakeAsync(() => {
spyOn(sharedLinksApiService, 'createSharedLinks');
node.entry.properties['qshare:sharedId'] = 'sharedId';
component.data = {
node,
permission: true,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
tick(500);
expect(sharedLinksApiService.createSharedLinks).not.toHaveBeenCalled();
expect(
fixture.nativeElement.querySelector('input[formcontrolname="sharedUrl"]')
.value
).toBe('some-url/sharedId');
expect(
fixture.nativeElement.querySelector(
'.mat-slide-toggle[data-automation-id="adf-share-toggle"'
).classList
).toContain('mat-checked');
}));
xit(`should copy shared link and notify on button event`, async(() => {
node.entry.properties['qshare:sharedId'] = 'sharedId';
spyOn(document, 'execCommand').and.callThrough();
component.data = {
node,
permission: true,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
fixture.nativeElement
.querySelector('.adf-input-action')
.dispatchEvent(new MouseEvent('click'));
fixture.detectChanges();
expect(document.execCommand).toHaveBeenCalledWith('copy');
expect(notificationServiceMock.openSnackMessage).toHaveBeenCalledWith(
'SHARE.CLIPBOARD-MESSAGE'
);
});
}));
it('should open a confirmation dialog when unshare button is triggered', () => {
spyOn(matDialog, 'open').and.returnValue({ beforeClose: () => of(false) });
spyOn(sharedLinksApiService, 'deleteSharedLink');
node.entry.properties['qshare:sharedId'] = 'sharedId';
component.data = {
node,
permission: true,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
fixture.nativeElement
.querySelector(
'.mat-slide-toggle[data-automation-id="adf-share-toggle"] label'
)
.dispatchEvent(new MouseEvent('click'));
fixture.detectChanges();
expect(matDialog.open).toHaveBeenCalled();
});
it('should unshare file when confirmation dialog returns true', fakeAsync(() => {
spyOn(matDialog, 'open').and.returnValue({ beforeClose: () => of(true) });
spyOn(sharedLinksApiService, 'deleteSharedLink').and.returnValue(of(null));
node.entry.properties['qshare:sharedId'] = 'sharedId';
component.data = {
node,
permission: true,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
fixture.nativeElement
.querySelector(
'.mat-slide-toggle[data-automation-id="adf-share-toggle"] label'
)
.dispatchEvent(new MouseEvent('click'));
fixture.detectChanges();
expect(sharedLinksApiService.deleteSharedLink).toHaveBeenCalled();
}));
it('should not unshare file when confirmation dialog returns false', fakeAsync(() => {
spyOn(matDialog, 'open').and.returnValue({ beforeClose: () => of(false) });
spyOn(sharedLinksApiService, 'deleteSharedLink');
node.entry.properties['qshare:sharedId'] = 'sharedId';
component.data = {
node,
permission: true,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
fixture.nativeElement
.querySelector(
'.mat-slide-toggle[data-automation-id="adf-share-toggle"] label'
)
.dispatchEvent(new MouseEvent('click'));
fixture.detectChanges();
expect(sharedLinksApiService.deleteSharedLink).not.toHaveBeenCalled();
}));
it('should reset expiration date when toggle is unchecked', () => {
spyOn(nodesApiService, 'updateNode').and.returnValue(of({}));
node.entry.properties['qshare:sharedId'] = 'sharedId';
node.entry.properties['qshare:sharedId'] = '2017-04-15T18:31:37+00:00';
component.data = {
node,
permission: true,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
component.form.controls['time'].setValue(moment());
fixture.detectChanges();
fixture.nativeElement
.querySelector(
'.mat-slide-toggle[data-automation-id="adf-expire-toggle"] label'
)
.dispatchEvent(new MouseEvent('click'));
fixture.detectChanges();
expect(nodesApiService.updateNode).toHaveBeenCalledWith('nodeId', {
properties: { 'qshare:expiryDate': null }
});
expect(
fixture.nativeElement.querySelector('input[formcontrolname="time"]').value
).toBe('');
});
it('should not allow expiration date action when node has no update permission', () => {
node.entry.properties['qshare:sharedId'] = 'sharedId';
component.data = {
node,
permission: false,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
expect(
fixture.nativeElement.querySelector('input[formcontrolname="time"]')
.disabled
).toBe(true);
expect(
fixture.nativeElement.querySelector(
'.mat-slide-toggle[data-automation-id="adf-expire-toggle"]'
).classList
).toContain('mat-disabled');
});
it('should show permission error notification on un-share action', () => {
node.entry.properties['qshare:sharedId'] = 'sharedId';
spyOn(matDialog, 'open').and.returnValue({ beforeClose: () => of(true) });
spyOn(sharedLinksApiService, 'deleteSharedLink').and.returnValue(
of(new Error('{"error": { "statusCode": 403 } }'))
);
component.data = {
node,
permission: false,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
fixture.nativeElement
.querySelector(
'.mat-slide-toggle[data-automation-id="adf-share-toggle"] label'
)
.dispatchEvent(new MouseEvent('click'));
expect(storeMock.dispatch).toHaveBeenCalled();
});
it('should update node expiration date with selected date and time', () => {
const date = moment();
node.entry.properties['qshare:sharedId'] = 'sharedId';
spyOn(nodesApiService, 'updateNode').and.returnValue(of({}));
fixture.componentInstance.form.controls['time'].setValue(null);
component.data = {
node,
permission: true,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
fixture.nativeElement
.querySelector(
'mat-slide-toggle[data-automation-id="adf-expire-toggle"] label'
)
.dispatchEvent(new MouseEvent('click'));
fixture.componentInstance.form.controls['time'].setValue(date);
fixture.detectChanges();
expect(nodesApiService.updateNode).toHaveBeenCalledWith('nodeId', {
properties: { 'qshare:expiryDate': date }
});
});
});

View File

@@ -1,255 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
Component,
Inject,
OnInit,
ViewEncapsulation,
ViewChild,
OnDestroy
} from '@angular/core';
import {
MAT_DIALOG_DATA,
MatDialogRef,
MatDialog
} from '@angular/material/dialog';
import { FormGroup, FormControl } from '@angular/forms';
import { Subscription, Observable, throwError } from 'rxjs';
import { AppStore, SnackbarErrorAction } from '@alfresco/aca-shared/store';
import { Store } from '@ngrx/store';
import {
skip,
mergeMap,
catchError,
distinctUntilChanged
} from 'rxjs/operators';
import { SharedLinksApiService, NodesApiService } from '@alfresco/adf-core';
import { SharedLinkEntry, MinimalNodeEntryEntity } from '@alfresco/js-api';
import { ConfirmDialogComponent } from '@alfresco/adf-content-services';
import * as moment from 'moment';
@Component({
selector: 'aca-share-dialog',
templateUrl: './content-node-share.dialog.html',
styleUrls: ['./content-node-share.dialog.scss'],
host: { class: 'adf-share-dialog' },
encapsulation: ViewEncapsulation.None
})
export class ShareDialogComponent implements OnInit, OnDestroy {
private subscriptions: Subscription[] = [];
minDate = moment().add(1, 'd');
sharedId: string;
fileName: string;
baseShareUrl: string;
isFileShared = false;
isDisabled = false;
form: FormGroup = new FormGroup({
sharedUrl: new FormControl(''),
time: new FormControl({ value: '', disabled: false })
});
@ViewChild('matDatetimepickerToggle')
matDatetimepickerToggle;
@ViewChild('slideToggleExpirationDate')
slideToggleExpirationDate;
@ViewChild('dateTimePickerInput')
dateTimePickerInput;
constructor(
private sharedLinksApiService: SharedLinksApiService,
private dialogRef: MatDialogRef<ShareDialogComponent>,
private dialog: MatDialog,
private nodesApiService: NodesApiService,
private store: Store<AppStore>,
@Inject(MAT_DIALOG_DATA) public data: any
) {}
ngOnInit() {
if (!this.canUpdate) {
this.form.controls['time'].disable();
}
this.subscriptions.push(
this.form.controls.time.valueChanges
.pipe(
skip(1),
distinctUntilChanged(),
mergeMap(
updates => this.updateNode(updates),
formUpdates => formUpdates
),
catchError(error => {
return throwError(error);
})
)
.subscribe(updates => {
this.updateEntryExpiryDate(updates);
})
);
if (this.data.node && this.data.node.entry) {
this.fileName = this.data.node.entry.name;
this.baseShareUrl = this.data.baseShareUrl;
const properties = this.data.node.entry.properties;
if (!properties || !properties['qshare:sharedId']) {
this.createSharedLinks(this.data.node.entry.id);
} else {
this.sharedId = properties['qshare:sharedId'];
this.isFileShared = true;
this.updateForm();
}
}
}
ngOnDestroy() {
this.subscriptions.forEach(subscription => subscription.unsubscribe);
}
onSlideShareChange() {
this.openConfirmationDialog();
}
get canUpdate() {
return this.data.permission;
}
onToggleExpirationDate(slideToggle) {
if (slideToggle.checked) {
this.matDatetimepickerToggle.datetimepicker.open();
} else {
this.matDatetimepickerToggle.datetimepicker.close();
this.form.controls.time.setValue(null);
}
}
onDatetimepickerClosed() {
this.dateTimePickerInput.nativeElement.blur();
if (!this.form.controls.time.value) {
this.slideToggleExpirationDate.checked = false;
}
}
private openConfirmationDialog() {
this.isFileShared = false;
this.dialog
.open(ConfirmDialogComponent, {
data: {
title: 'SHARE.CONFIRMATION.DIALOG-TITLE',
message: 'SHARE.CONFIRMATION.MESSAGE',
yesLabel: 'SHARE.CONFIRMATION.REMOVE',
noLabel: 'SHARE.CONFIRMATION.CANCEL'
},
minWidth: '250px',
closeOnNavigation: true
})
.beforeClose()
.subscribe(deleteSharedLink => {
if (deleteSharedLink) {
this.deleteSharedLink(this.sharedId);
} else {
this.isFileShared = true;
}
});
}
private createSharedLinks(nodeId: string) {
this.isDisabled = true;
this.sharedLinksApiService.createSharedLinks(nodeId).subscribe(
(sharedLink: SharedLinkEntry) => {
if (sharedLink.entry) {
this.sharedId = sharedLink.entry.id;
if (this.data.node.entry.properties) {
this.data.node.entry.properties['qshare:sharedId'] = this.sharedId;
} else {
this.data.node.entry.properties = {
'qshare:sharedId': this.sharedId
};
}
this.isDisabled = false;
this.isFileShared = true;
this.updateForm();
}
},
() => {
this.isDisabled = false;
this.isFileShared = false;
}
);
}
private deleteSharedLink(sharedId: string) {
this.isDisabled = true;
this.sharedLinksApiService
.deleteSharedLink(sharedId)
.subscribe((response: any) => {
if (response instanceof Error) {
this.isDisabled = false;
this.isFileShared = true;
this.showError(response);
} else {
this.data.node.entry.properties['qshare:sharedId'] = null;
this.data.node.entry.properties['qshare:expiryDate'] = null;
this.dialogRef.close(this.data.node);
}
});
}
private updateForm() {
const { entry } = this.data.node;
const expiryDate = entry.properties['qshare:expiryDate'];
this.form.setValue({
sharedUrl: `${this.baseShareUrl}${this.sharedId}`,
time: expiryDate ? expiryDate : null
});
}
private updateNode(date: moment.Moment): Observable<MinimalNodeEntryEntity> {
return this.nodesApiService.updateNode(this.data.node.entry.id, {
properties: {
'qshare:expiryDate': date ? date.endOf('day') : null
}
});
}
private updateEntryExpiryDate(date: moment.Moment) {
const { properties } = this.data.node.entry;
properties['qshare:expiryDate'] = date ? date.toDate() : null;
}
private showError(response: { message: any }) {
let message;
const statusCode = JSON.parse(response.message).error.statusCode;
if (statusCode === 403) {
message = 'SHARED_LINK.UNSHARE_PERMISSION_ERROR';
}
this.store.dispatch(new SnackbarErrorAction(message));
}
}

View File

@@ -1,41 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { ShareDialogComponent } from './content-node-share.dialog';
@NgModule({
imports: [CoreModule.forChild(), CommonModule],
declarations: [ShareDialogComponent],
exports: [ShareDialogComponent],
entryComponents: [ShareDialogComponent]
})
export class ContentNodeShareModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: ContentNodeShareModule
};
}
static forChild(): ModuleWithProviders {
return {
ngModule: ContentNodeShareModule
};
}
}

View File

@@ -1,44 +0,0 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2019 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { ExtensionsModule } from '@alfresco/adf-extensions';
import { ToggleSharedModule } from './toggle-shared/toggle-shared.module';
import { ContentNodeShareModule } from './content-node-share/content-node-share.module';
import { ShareDialogComponent } from './content-node-share/content-node-share.dialog';
@NgModule({
imports: [
CommonModule,
CoreModule.forChild(),
ExtensionsModule,
ContentNodeShareModule,
ToggleSharedModule
],
entryComponents: [ShareDialogComponent]
})
export class AppSharedModule {}

View File

@@ -1,48 +0,0 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2019 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { ContentNodeShareModule } from '@alfresco/adf-content-services';
import { ExtensionsModule } from '@alfresco/adf-extensions';
import { ToggleSharedComponent } from './toggle-shared.component';
export function components() {
return [ToggleSharedComponent];
}
@NgModule({
imports: [
CommonModule,
CoreModule.forChild(),
ExtensionsModule,
ContentNodeShareModule
],
declarations: components(),
exports: components(),
entryComponents: components()
})
export class ToggleSharedModule {}