mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-5146] Upgrade to Angular 10 (#5834)
* remove useless module * upgrade to angular 8 * upgrade material to v8 * upgrade adf libs * migrate demo shell to v8 * upgrade to angular 9 * upgrade material to v9 * remove hammer * upgrade nx * upgrade datetime picker * upgrade flex layout * update core api * remove entry components * code fixes * upgrade testbed usage * code fixes * remove unnecessary core-js from tests * upgrade CLI * ts config fixes * fix builds * fix testing config * compile fixes * fix demo shell dev setup * fix core tests * fix card view import * upgrade nx * disable smart builds for now * remove fdescribe * restore smart builds * fix issues * unify tsconfigs and fix newly found issues * fix configuration and cleanup package scripts * improved production build from the same config * use ADF libs directly instead of node_modules * disable smart build * single app configuration (angular) * fix core build * fix build scripts * lint fixes * fix linting setup * fix linting rules * various fixes * disable affected libs for unit tests * cleanup insights package.json * simplify smart-build * fix content tests * fix tests * test fixes * fix tests * fix test * fix tests * disable AppExtensionsModule (monaco example) * remove monaco extension module * upgrade bundle check rules * fix insights tests and karma config * fix protractor config * e2e workaround * upgrade puppeteer and split linting and build * reusable resources config * update protractor config * fix after rebase * fix protractor config * fix e2e tsconfig * update e2e setup * Save demoshell artifact on S3 and remove travis cache * Push the libs on S3 and fetch before releasing it * Add deps * Add dependencies among libs and run only affected unit test and build * fix the travis stage name * fix after renaming dev to demoshell * force the order of the projects * remove unused dependencies * fix content e2e script * exit codes fix * add extra exit codes to core e2e * postinstall hook and package cleanup * cleanup packages * remove deprecated code and dependency on router * improve bundle analyzer script * minor code fixes * update spec * fix code after rebase * upgrade protractor after rebase * fix e2e mapping lib * Update tsconfig.e2e.json * update e2e tsconfig * fix angular config * fix protractor runs * cache dist folder for libs * update material selectors for dropdowns * selector fixes * remove duplicated e2e that have unit tests already * fix login selector * fix e2e * fix test * fix import issues * fix selector * cleanup old monaco extension files * cleanup demo shell login * add protractor max retries * disable customisations of protractor * fix login validation * fix after rebase * fix after rebase, disable latest versions of libs * Hide the report tab and rollback the localstorage * rename protractor config back to js * restore lint as part of build * cleanup code * do not copy anything to node_modules on dist test * fix unit tests * config fixes * fix code * fix code after rebase * fix tests * remove existing words from spellcheck * remove useless directive decorators * update package.json after rebase * add js-api back * code fixes * add missing export * update configs * fix code * try fix the sso login test * fix * remove puppeteer unit * fix e2e script * fix * make provider easy * fix routes module before upgrade * fix unit tests * upgrade angular cli * upgrade to angular 10 Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com> Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com> Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
co-authored by
maurizio vitale
Eugenio Romano
Eugenio Romano
parent
2f0a585273
commit
cd2b489100
@@ -39,8 +39,8 @@ describe('AboutProductVersionComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AboutProductVersionComponent);
|
||||
authenticationService = TestBed.get(AuthenticationService);
|
||||
discoveryApiService = TestBed.get(DiscoveryApiService);
|
||||
authenticationService = TestBed.inject(AuthenticationService);
|
||||
discoveryApiService = TestBed.inject(DiscoveryApiService);
|
||||
spyOn(discoveryApiService, 'getEcmProductInfo').and.returnValue(of(mockModules));
|
||||
spyOn(authenticationService, 'isBpmLoggedIn').and.returnValue(true);
|
||||
spyOn(authenticationService, 'isEcmLoggedIn').and.returnValue(true);
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('AboutServerSettingsComponent', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AboutServerSettingsComponent);
|
||||
component = fixture.componentInstance;
|
||||
appConfigService = TestBed.get(AppConfigService);
|
||||
appConfigService = TestBed.inject(AppConfigService);
|
||||
appConfigService.config = Object.assign(appConfigService.config, {
|
||||
'ecmHost': aboutGithubDetails.ecmHost,
|
||||
'bpmHost': aboutGithubDetails.bpmHost
|
||||
|
||||
@@ -24,7 +24,7 @@ import { AppConfigService } from './app-config.service';
|
||||
export class AppConfigPipe implements PipeTransform {
|
||||
constructor(private config: AppConfigService) {}
|
||||
|
||||
transform(value: string, fallback: any): any {
|
||||
transform(value: string, fallback?: any): any {
|
||||
return this.config.get(value, fallback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, ContentChildren, QueryList, AfterContentInit } from '@angular/core';
|
||||
import { MatMenuItem } from '@angular/material';
|
||||
import { MatMenuItem } from '@angular/material/menu';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-buttons-action-menu',
|
||||
|
||||
@@ -18,21 +18,19 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import {
|
||||
MatButtonModule,
|
||||
MatDatepickerModule,
|
||||
MatTableModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatCheckboxModule,
|
||||
MatNativeDateModule,
|
||||
MatSelectModule,
|
||||
MatChipsModule,
|
||||
MatMenuModule,
|
||||
MatCardModule,
|
||||
MatTooltipModule,
|
||||
MatSlideToggleModule
|
||||
} from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { MatChipsModule } from '@angular/material/chips';
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { MatDatetimepickerModule, MatNativeDatetimeModule } from '@mat-datetimepicker/core';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -82,15 +80,6 @@ import { CardViewArrayItemComponent } from './components/card-view-arrayitem/car
|
||||
CardViewContentProxyDirective,
|
||||
CardViewArrayItemComponent
|
||||
],
|
||||
entryComponents: [
|
||||
CardViewBoolItemComponent,
|
||||
CardViewDateItemComponent,
|
||||
CardViewMapItemComponent,
|
||||
CardViewTextItemComponent,
|
||||
CardViewSelectItemComponent,
|
||||
CardViewKeyValuePairsItemComponent,
|
||||
CardViewArrayItemComponent
|
||||
],
|
||||
exports: [
|
||||
CardViewComponent,
|
||||
CardViewBoolItemComponent,
|
||||
|
||||
@@ -15,13 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Input, OnDestroy } from '@angular/core';
|
||||
import { CardViewUpdateService } from '../services/card-view.services';
|
||||
import { Input, OnDestroy, Directive } from '@angular/core';
|
||||
import { CardViewUpdateService } from '../services/card-view-update.service';
|
||||
import { CardViewItem } from '../interfaces/card-view.interfaces';
|
||||
import { CardViewBaseItemModel } from '../models/card-view-baseitem.model';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
@Directive()
|
||||
// tslint:disable-next-line: directive-class-suffix
|
||||
export abstract class BaseCardView<T extends CardViewItem> implements OnDestroy {
|
||||
|
||||
@Input()
|
||||
|
||||
+3
-3
@@ -17,7 +17,7 @@
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { MatCheckbox, MatCheckboxChange } from '@angular/material';
|
||||
import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CardViewUpdateService } from '../../services/card-view-update.service';
|
||||
import { CardViewBoolItemComponent } from './card-view-boolitem.component';
|
||||
@@ -180,7 +180,7 @@ describe('CardViewBoolItemComponent', () => {
|
||||
});
|
||||
|
||||
it('should trigger the update event when changing the checkbox', () => {
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
spyOn(cardViewUpdateService, 'update');
|
||||
const property = { ... component.property };
|
||||
|
||||
@@ -200,7 +200,7 @@ describe('CardViewBoolItemComponent', () => {
|
||||
}));
|
||||
|
||||
it('should trigger an update event on the CardViewUpdateService [integration]', (done) => {
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
component.property.value = false;
|
||||
fixture.detectChanges();
|
||||
const property = { ...component.property };
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { MatCheckboxChange } from '@angular/material';
|
||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
||||
import { CardViewBoolItemModel } from '../../models/card-view-boolitem.model';
|
||||
import { CardViewUpdateService } from '../../services/card-view-update.service';
|
||||
import { BaseCardView } from '../base-card-view';
|
||||
|
||||
+4
-4
@@ -41,7 +41,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
appConfigService = TestBed.get(AppConfigService);
|
||||
appConfigService = TestBed.inject(AppConfigService);
|
||||
appConfigService.config.dateValues = {
|
||||
defaultDateFormat: 'shortDate',
|
||||
defaultDateTimeFormat: 'M/d/yy, h:mm a',
|
||||
@@ -191,7 +191,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
it('should trigger an update event on the CardViewUpdateService', (done) => {
|
||||
component.editable = true;
|
||||
component.property.editable = true;
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
const expectedDate = moment('Jul 10 2017', 'MMM DD YY');
|
||||
fixture.detectChanges();
|
||||
const property = { ...component.property };
|
||||
@@ -225,7 +225,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
}));
|
||||
|
||||
it('should copy value to clipboard on double click', () => {
|
||||
const clipboardService = TestBed.get(ClipboardService);
|
||||
const clipboardService = TestBed.inject(ClipboardService);
|
||||
spyOn(clipboardService, 'copyContentToClipboard');
|
||||
|
||||
component.editable = false;
|
||||
@@ -306,7 +306,7 @@ describe('CardViewDateItemComponent', () => {
|
||||
component.property.default = 'Jul 10 2017';
|
||||
component.property.value = 'Jul 10 2017';
|
||||
fixture.detectChanges();
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
const property = { ...component.property };
|
||||
|
||||
const disposableUpdate = cardViewUpdateService.itemUpdated$.subscribe(
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
import { DatetimeAdapter, MAT_DATETIME_FORMATS, MatDatetimepicker } from '@mat-datetimepicker/core';
|
||||
import { MAT_MOMENT_DATETIME_FORMATS, MomentDatetimeAdapter } from '@mat-datetimepicker/moment';
|
||||
import moment from 'moment-es6';
|
||||
|
||||
-7
@@ -20,7 +20,6 @@
|
||||
import { Component, Input, SimpleChange } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
|
||||
import { CardViewItem } from '../../interfaces/card-view-item.interface';
|
||||
import { CardItemTypeService } from '../../services/card-item-types.service';
|
||||
import { CardViewContentProxyDirective } from '../../directives/card-view-content-proxy.directive';
|
||||
@@ -54,12 +53,6 @@ describe('CardViewItemDispatcherComponent', () => {
|
||||
providers: [ { provide: CardItemTypeService, useValue: cardItemTypeService } ]
|
||||
});
|
||||
|
||||
// entryComponents are not supported yet on TestBed, that is why this ugly workaround:
|
||||
// https://github.com/angular/angular/issues/10760
|
||||
TestBed.overrideModule(BrowserDynamicTestingModule, {
|
||||
set: { entryComponents: [ CardViewShinyCustomElementItemComponent ] }
|
||||
});
|
||||
|
||||
TestBed.compileComponents();
|
||||
}));
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ export class CardViewItemDispatcherComponent implements OnChanges {
|
||||
@Input()
|
||||
multiValueSeparator: string = DEFAULT_SEPARATOR;
|
||||
|
||||
@ViewChild(CardViewContentProxyDirective)
|
||||
@ViewChild(CardViewContentProxyDirective, { static: true })
|
||||
private content: CardViewContentProxyDirective;
|
||||
|
||||
private loaded: boolean = false;
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ describe('CardViewKeyValuePairsItemComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CardViewKeyValuePairsItemComponent);
|
||||
cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
component = fixture.componentInstance;
|
||||
component.property = new CardViewKeyValuePairsItemModel({
|
||||
label: 'Key Value Pairs',
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { CardViewUpdateService } from '../../services/card-view-update.service';
|
||||
import { CardViewKeyValuePairsItemModel } from '../../models/card-view.models';
|
||||
import { CardViewKeyValuePairsItemType } from '../../interfaces/card-view.interfaces';
|
||||
import { MatTableDataSource } from '@angular/material';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { BaseCardView } from '../base-card-view';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -42,7 +42,7 @@ describe('CardViewMapItemComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CardViewMapItemComponent);
|
||||
service = TestBed.get(CardViewUpdateService);
|
||||
service = TestBed.inject(CardViewUpdateService);
|
||||
component = fixture.componentInstance;
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ describe('CardViewSelectItemComponent', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CardViewSelectItemComponent);
|
||||
component = fixture.componentInstance;
|
||||
overlayContainer = TestBed.get(OverlayContainer);
|
||||
overlayContainer = TestBed.inject(OverlayContainer);
|
||||
component.property = new CardViewSelectItemModel(mockDefaultProps);
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import { CardViewSelectItemModel } from '../../models/card-view-selectitem.model
|
||||
import { CardViewUpdateService } from '../../services/card-view-update.service';
|
||||
import { Observable } from 'rxjs';
|
||||
import { CardViewSelectItemOption } from '../../interfaces/card-view.interfaces';
|
||||
import { MatSelectChange } from '@angular/material';
|
||||
import { MatSelectChange } from '@angular/material/select';
|
||||
import { BaseCardView } from '../base-card-view';
|
||||
|
||||
@Component({
|
||||
|
||||
+12
-12
@@ -23,7 +23,7 @@ import { CardViewTextItemComponent } from './card-view-textitem.component';
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { CardViewItemFloatValidator, CardViewItemIntValidator, CardViewIntItemModel, CardViewFloatItemModel } from '@alfresco/adf-core';
|
||||
import { MatChipsModule } from '@angular/material';
|
||||
import { MatChipsModule } from '@angular/material/chips';
|
||||
import { ClipboardService } from '../../../clipboard/clipboard.service';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -323,7 +323,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
});
|
||||
|
||||
it('should click event to the event stream when clickable property enabled', async () => {
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
spyOn(cardViewUpdateService, 'clicked').and.stub();
|
||||
|
||||
component.property.clickable = true;
|
||||
@@ -340,7 +340,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
});
|
||||
|
||||
it('should update input the value on input updated', async (done) => {
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
|
||||
component.property.clickable = true;
|
||||
component.property.editable = true;
|
||||
@@ -369,7 +369,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
});
|
||||
|
||||
it('should copy value to clipboard on double click', async () => {
|
||||
const clipboardService = TestBed.get(ClipboardService);
|
||||
const clipboardService = TestBed.inject(ClipboardService);
|
||||
spyOn(clipboardService, 'copyContentToClipboard');
|
||||
|
||||
component.property.value = 'myValueToCopy';
|
||||
@@ -419,7 +419,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
const property = { ...component.property };
|
||||
|
||||
spyOn(cardViewUpdateService, 'update');
|
||||
@@ -433,7 +433,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
|
||||
spyOn(cardViewUpdateService, 'update');
|
||||
updateTextField(component.property.key, 'updated-value');
|
||||
@@ -486,7 +486,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
|
||||
it('should trigger an update event on the CardViewUpdateService [integration]', async (done) => {
|
||||
component.property.isValid = () => true;
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
const expectedText = 'changed text';
|
||||
component.ngOnChanges();
|
||||
fixture.detectChanges();
|
||||
@@ -506,7 +506,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
|
||||
it('should update the value using the updateItem$ subject', async(async () => {
|
||||
component.property.isValid = () => true;
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
const expectedText = 'changed text';
|
||||
component.ngOnChanges();
|
||||
fixture.detectChanges();
|
||||
@@ -516,7 +516,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
expect(value).toEqual('Lorem ipsum');
|
||||
expect(component.property.value).toBe('Lorem ipsum');
|
||||
|
||||
cardViewUpdateService.updateElement({ key: component.property.key, value: expectedText });
|
||||
cardViewUpdateService.updateElement({ key: component.property.key, value: expectedText } as any);
|
||||
component.ngOnChanges();
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
@@ -531,7 +531,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
component.property.multiline = true;
|
||||
const expectedText = 'changed text';
|
||||
spyOn(component, 'update').and.callThrough();
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
component.ngOnChanges();
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
@@ -557,7 +557,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
let cardViewUpdateService: CardViewUpdateService;
|
||||
|
||||
beforeEach(() => {
|
||||
cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
component.property = new CardViewIntItemModel({
|
||||
label: 'Text label',
|
||||
value: 10,
|
||||
@@ -669,7 +669,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
const floatValue = 77.33;
|
||||
|
||||
beforeEach(() => {
|
||||
cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
component.property = new CardViewFloatItemModel({
|
||||
label: 'Text label',
|
||||
value: floatValue,
|
||||
|
||||
@@ -19,7 +19,7 @@ import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { CardViewTextItemModel } from '../../models/card-view-textitem.model';
|
||||
import { CardViewUpdateService } from '../../services/card-view-update.service';
|
||||
import { BaseCardView } from '../base-card-view';
|
||||
import { MatChipInputEvent } from '@angular/material';
|
||||
import { MatChipInputEvent } from '@angular/material/chips';
|
||||
import { ClipboardService } from '../../../clipboard/clipboard.service';
|
||||
import { TranslationService } from '../../../services/translation.service';
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './base-card-view';
|
||||
export * from './card-view/card-view.component';
|
||||
export * from './card-view-boolitem/card-view-boolitem.component';
|
||||
export * from './card-view-dateitem/card-view-dateitem.component';
|
||||
@@ -23,4 +24,4 @@ export * from './card-view-mapitem/card-view-mapitem.component';
|
||||
export * from './card-view-textitem/card-view-textitem.component';
|
||||
export * from './card-view-selectitem/card-view-selectitem.component';
|
||||
export * from './card-view-keyvaluepairsitem/card-view-keyvaluepairsitem.component';
|
||||
export * from './card-view-arrayitem/card-view-arrayitem.component';
|
||||
export * from './card-view-arrayitem/card-view-arrayitem.component';
|
||||
|
||||
@@ -59,7 +59,7 @@ describe('CardViewUpdateService', () => {
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
});
|
||||
|
||||
it('should send updated message with proper parameters', async(() => {
|
||||
|
||||
@@ -53,7 +53,7 @@ describe('ClipboardDirective', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TestTargetClipboardComponent);
|
||||
clipboardService = TestBed.get(ClipboardService);
|
||||
clipboardService = TestBed.inject(ClipboardService);
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
|
||||
@@ -31,8 +31,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
],
|
||||
exports: [
|
||||
ClipboardDirective
|
||||
],
|
||||
entryComponents: [ClipboardComponent]
|
||||
]
|
||||
})
|
||||
|
||||
export class ClipboardModule {}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
import { NotificationService } from '../notifications/services/notification.service';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { ClipboardService } from './clipboard.service';
|
||||
import { MatSnackBarModule } from '@angular/material';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -37,8 +37,8 @@ describe('ClipboardService', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
clipboardService = TestBed.get(ClipboardService);
|
||||
notificationService = TestBed.get(NotificationService);
|
||||
clipboardService = TestBed.inject(ClipboardService);
|
||||
notificationService = TestBed.inject(NotificationService);
|
||||
inputElement = document.createElement('input');
|
||||
});
|
||||
|
||||
|
||||
@@ -120,10 +120,10 @@ describe('CommentListComponent', () => {
|
||||
});
|
||||
|
||||
beforeEach(async(() => {
|
||||
ecmUserService = TestBed.get(EcmUserService);
|
||||
ecmUserService = TestBed.inject(EcmUserService);
|
||||
spyOn(ecmUserService, 'getUserProfileImage').and.returnValue('alfresco-logo.svg');
|
||||
|
||||
peopleProcessService = TestBed.get(PeopleProcessService);
|
||||
peopleProcessService = TestBed.inject(PeopleProcessService);
|
||||
spyOn(peopleProcessService, 'getUserImage').and.returnValue('alfresco-logo.svg');
|
||||
|
||||
fixture = TestBed.createComponent(CommentListComponent);
|
||||
|
||||
@@ -74,7 +74,7 @@ describe('ContextMenuHolderComponent', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ContextMenuHolderComponent);
|
||||
component = fixture.componentInstance;
|
||||
contextMenuService = TestBed.get(ContextMenuService);
|
||||
contextMenuService = TestBed.inject(ContextMenuService);
|
||||
|
||||
component.ngOnDestroy = () => {};
|
||||
fixture.detectChanges();
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
import { OverlayContainer } from '@angular/cdk/overlay';
|
||||
import { ViewportRuler } from '@angular/cdk/scrolling';
|
||||
import { Component, HostListener, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
|
||||
import { MatMenuTrigger } from '@angular/material';
|
||||
import { MatMenuTrigger } from '@angular/material/menu';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
|
||||
@@ -51,7 +51,7 @@ export class ContextMenuHolderComponent implements OnInit, OnDestroy {
|
||||
@Input()
|
||||
showIcons: boolean = false;
|
||||
|
||||
@ViewChild(MatMenuTrigger)
|
||||
@ViewChild(MatMenuTrigger, { static: true })
|
||||
menuTrigger: MatMenuTrigger;
|
||||
|
||||
@HostListener('contextmenu', ['$event'])
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
import { trigger } from '@angular/animations';
|
||||
import { DOWN_ARROW, UP_ARROW } from '@angular/cdk/keycodes';
|
||||
import { FocusKeyManager } from '@angular/cdk/a11y';
|
||||
import { MatMenuItem } from '@angular/material';
|
||||
import { MatMenuItem } from '@angular/material/menu';
|
||||
import { ContextMenuOverlayRef } from './context-menu-overlay';
|
||||
import { contextMenuAnimation } from './animations';
|
||||
import { CONTEXT_MENU_DATA } from './context-menu.tokens';
|
||||
|
||||
@@ -44,8 +44,8 @@ describe('ContextMenuService', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
overlay = TestBed.get(Overlay);
|
||||
injector = TestBed.get(Injector);
|
||||
overlay = TestBed.inject(Overlay);
|
||||
injector = TestBed.inject(Injector);
|
||||
});
|
||||
|
||||
describe('Overlay', () => {
|
||||
|
||||
@@ -38,9 +38,6 @@ import { ContextMenuListComponent } from './context-menu-list.component';
|
||||
exports: [
|
||||
ContextMenuHolderComponent,
|
||||
ContextMenuDirective
|
||||
],
|
||||
entryComponents: [
|
||||
ContextMenuListComponent
|
||||
]
|
||||
})
|
||||
export class ContextMenuModule {}
|
||||
|
||||
@@ -131,7 +131,7 @@ import { VersionCompatibilityService } from './services/version-compatibility.se
|
||||
]
|
||||
})
|
||||
export class CoreModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
static forRoot(): ModuleWithProviders<CoreModule> {
|
||||
return {
|
||||
ngModule: CoreModule,
|
||||
providers: [
|
||||
@@ -162,7 +162,7 @@ export class CoreModule {
|
||||
};
|
||||
}
|
||||
|
||||
static forChild(): ModuleWithProviders {
|
||||
static forChild(): ModuleWithProviders<CoreModule> {
|
||||
return {
|
||||
ngModule: CoreModule
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
import { SimpleChange, NO_ERRORS_SCHEMA, QueryList, Component, TemplateRef, ViewChild } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
|
||||
import { MatCheckboxChange } from '@angular/material';
|
||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
||||
import { DataColumn } from '../../data/data-column.model';
|
||||
import { DataRow } from '../../data/data-row.model';
|
||||
import { DataSorting } from '../../data/data-sorting.model';
|
||||
@@ -34,7 +34,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
<ng-template #tmplRef></ng-template>
|
||||
`})
|
||||
class CustomColumnTemplateComponent {
|
||||
@ViewChild('tmplRef') templateRef: TemplateRef<any>;
|
||||
@ViewChild('tmplRef', { static: true }) templateRef: TemplateRef<any>;
|
||||
}
|
||||
|
||||
class FakeDataRow implements DataRow {
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
IterableDiffers, OnChanges, Output, SimpleChange, SimpleChanges, TemplateRef, ViewEncapsulation, OnDestroy
|
||||
} from '@angular/core';
|
||||
import { FocusKeyManager } from '@angular/cdk/a11y';
|
||||
import { MatCheckboxChange } from '@angular/material';
|
||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
||||
import { Subscription, Observable, Observer } from 'rxjs';
|
||||
import { DataColumnListComponent } from '../../../data-column/data-column-list.component';
|
||||
import { DataColumn } from '../../data/data-column.model';
|
||||
@@ -548,7 +548,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
|
||||
this.emitSortingChangedEvent(column.key, newDirection);
|
||||
}
|
||||
|
||||
this.keyManager.updateActiveItemIndex(0);
|
||||
this.keyManager.updateActiveItem(0);
|
||||
}
|
||||
|
||||
onSelectAllClick(matCheckboxChange: MatCheckboxChange) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation, Input } from '@angular/core';
|
||||
import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { EditJsonDialogComponent, EditJsonDialogSettings } from '../../../dialogs/edit-json/edit-json.dialog';
|
||||
import { AlfrescoApiService } from '../../../services/alfresco-api.service';
|
||||
|
||||
|
||||
@@ -15,15 +15,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ContentChild, Input } from '@angular/core';
|
||||
import { ContentChild, Input, Directive } from '@angular/core';
|
||||
import { AppConfigService } from '../../app-config/app-config.service';
|
||||
import { DataColumnListComponent } from '../../data-column/data-column-list.component';
|
||||
import { DataColumn } from './data-column.model';
|
||||
import { ObjectDataColumn } from './object-datacolumn.model';
|
||||
|
||||
@Directive()
|
||||
// tslint:disable-next-line: directive-class-suffix
|
||||
export abstract class DataTableSchema {
|
||||
|
||||
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
|
||||
@ContentChild(DataColumnListComponent)
|
||||
columnList: DataColumnListComponent;
|
||||
|
||||
/** Custom preset column schema in JSON format. */
|
||||
@Input()
|
||||
|
||||
@@ -29,12 +29,14 @@ export * from './data/object-datacolumn.model';
|
||||
export * from './components/data-cell.event';
|
||||
export * from './components/data-row-action.event';
|
||||
export * from './directives/drop-zone.directive';
|
||||
|
||||
export * from './components/datatable/datatable.component';
|
||||
export * from './components/datatable-cell/datatable-cell.component';
|
||||
export * from './components/datatable-row/datatable-row.component';
|
||||
export * from './components/datatable/datatable.component';
|
||||
export * from './components/date-cell/date-cell.component';
|
||||
export * from './components/empty-list/empty-list.component';
|
||||
export * from './components/filesize-cell/filesize-cell.component';
|
||||
export * from './components/json-cell/json-cell.component';
|
||||
export * from './components/location-cell/location-cell.component';
|
||||
export * from './data/data-table.schema';
|
||||
|
||||
|
||||
@@ -35,9 +35,6 @@ import { PipeModule } from '../pipes/pipe.module';
|
||||
],
|
||||
exports: [
|
||||
DownloadZipDialogComponent
|
||||
],
|
||||
entryComponents: [
|
||||
DownloadZipDialogComponent
|
||||
]
|
||||
})
|
||||
export class DialogModule {}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { DownloadZipDialogComponent } from './download-zip.dialog';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
@@ -54,7 +54,7 @@ describe('DownloadZipDialogComponent', () => {
|
||||
beforeEach(() => {
|
||||
dialogRef.close.calls.reset();
|
||||
fixture = TestBed.createComponent(DownloadZipDialogComponent);
|
||||
downloadZipService = TestBed.get(DownloadZipService);
|
||||
downloadZipService = TestBed.inject(DownloadZipService);
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { DownloadEntry, NodeEntry } from '@alfresco/js-api';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { DownloadZipService } from '../../services/download-zip.service';
|
||||
|
||||
@@ -37,9 +37,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
],
|
||||
exports: [
|
||||
EditJsonDialogComponent
|
||||
],
|
||||
entryComponents: [
|
||||
EditJsonDialogComponent
|
||||
]
|
||||
})
|
||||
export class EditJsonDialogModule {}
|
||||
|
||||
@@ -101,7 +101,7 @@ describe('CheckAllowableOperationDirective', () => {
|
||||
});
|
||||
|
||||
it('enables element when all nodes have expected permission', () => {
|
||||
const contentService = TestBed.get(ContentService);
|
||||
const contentService = TestBed.inject(ContentService);
|
||||
spyOn(contentService, 'hasAllowableOperations').and.returnValue(true);
|
||||
|
||||
const directive = new CheckAllowableOperationDirective(null, null, contentService, changeDetectorMock);
|
||||
@@ -114,7 +114,7 @@ describe('CheckAllowableOperationDirective', () => {
|
||||
});
|
||||
|
||||
it('disables element when one of the nodes have no permission', () => {
|
||||
const contentService = TestBed.get(ContentService);
|
||||
const contentService = TestBed.inject(ContentService);
|
||||
spyOn(contentService, 'hasAllowableOperations').and.returnValue(false);
|
||||
|
||||
const directive = new CheckAllowableOperationDirective(null, null, contentService, changeDetectorMock);
|
||||
@@ -130,7 +130,7 @@ describe('CheckAllowableOperationDirective', () => {
|
||||
describe('Angular component as subject', () => {
|
||||
|
||||
it('disables decorated component', () => {
|
||||
const contentService = TestBed.get(ContentService);
|
||||
const contentService = TestBed.inject(ContentService);
|
||||
spyOn(contentService, 'hasAllowableOperations').and.returnValue(false);
|
||||
spyOn(changeDetectorMock, 'detectChanges');
|
||||
|
||||
@@ -146,7 +146,7 @@ describe('CheckAllowableOperationDirective', () => {
|
||||
});
|
||||
|
||||
it('enables decorated component', () => {
|
||||
const contentService = TestBed.get(ContentService);
|
||||
const contentService = TestBed.inject(ContentService);
|
||||
spyOn(contentService, 'hasAllowableOperations').and.returnValue(true);
|
||||
spyOn(changeDetectorMock, 'detectChanges');
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('HighlightDirective', () => {
|
||||
});
|
||||
|
||||
it('should NOT reinsert the same text to the innerText if there was no change at all (search string is not found)', () => {
|
||||
const highlighter = TestBed.get(HighlightTransformService);
|
||||
const highlighter = TestBed.inject(HighlightTransformService);
|
||||
spyOn(highlighter, 'highlight').and.returnValue({ changed: false, text: 'Modified text' });
|
||||
component.highlightDirectives.first.highlight('salana-eyong-aysis');
|
||||
fixture.detectChanges();
|
||||
@@ -104,7 +104,7 @@ describe('HighlightDirective', () => {
|
||||
});
|
||||
|
||||
it('should do the search only if there is a search string presented', () => {
|
||||
const highlighter = TestBed.get(HighlightTransformService);
|
||||
const highlighter = TestBed.inject(HighlightTransformService);
|
||||
spyOn(highlighter, 'highlight').and.callThrough();
|
||||
component.highlightDirectives.first.highlight('');
|
||||
fixture.detectChanges();
|
||||
@@ -113,7 +113,7 @@ describe('HighlightDirective', () => {
|
||||
});
|
||||
|
||||
it('should do the search only if there is a node selector string presented', () => {
|
||||
const highlighter = TestBed.get(HighlightTransformService);
|
||||
const highlighter = TestBed.inject(HighlightTransformService);
|
||||
spyOn(highlighter, 'highlight').and.callThrough();
|
||||
|
||||
const callback = function() {
|
||||
|
||||
@@ -53,8 +53,8 @@ describe('LogoutDirective', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
router = TestBed.get(Router);
|
||||
authService = TestBed.get(AuthenticationService);
|
||||
router = TestBed.inject(Router);
|
||||
authService = TestBed.inject(AuthenticationService);
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
fixture.detectChanges();
|
||||
});
|
||||
@@ -108,8 +108,8 @@ describe('LogoutDirective', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
router = TestBed.get(Router);
|
||||
authService = TestBed.get(AuthenticationService);
|
||||
router = TestBed.inject(Router);
|
||||
authService = TestBed.inject(AuthenticationService);
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
fixture.detectChanges();
|
||||
});
|
||||
@@ -152,8 +152,8 @@ describe('LogoutDirective', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
router = TestBed.get(Router);
|
||||
authService = TestBed.get(AuthenticationService);
|
||||
router = TestBed.inject(Router);
|
||||
authService = TestBed.inject(AuthenticationService);
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
@@ -33,7 +33,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
class TestComponent {
|
||||
selection = [];
|
||||
|
||||
@ViewChild(NodeDeleteDirective)
|
||||
@ViewChild(NodeDeleteDirective, { static: true })
|
||||
deleteDirective: NodeDeleteDirective;
|
||||
|
||||
onDelete() {
|
||||
@@ -50,7 +50,7 @@ class TestComponent {
|
||||
class TestWithPermissionsComponent {
|
||||
selection = [];
|
||||
|
||||
@ViewChild(NodeDeleteDirective)
|
||||
@ViewChild(NodeDeleteDirective, { static: true })
|
||||
deleteDirective: NodeDeleteDirective;
|
||||
|
||||
onDelete = jasmine.createSpy('onDelete');
|
||||
@@ -68,7 +68,7 @@ class TestWithPermissionsComponent {
|
||||
class TestDeletePermanentComponent {
|
||||
selection = [];
|
||||
|
||||
@ViewChild(NodeDeleteDirective)
|
||||
@ViewChild(NodeDeleteDirective, { static: true })
|
||||
deleteDirective: NodeDeleteDirective;
|
||||
|
||||
permanent = true;
|
||||
@@ -103,7 +103,7 @@ describe('NodeDeleteDirective', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
alfrescoApi = TestBed.get(AlfrescoApiService);
|
||||
alfrescoApi = TestBed.inject(AlfrescoApiService);
|
||||
nodeApi = alfrescoApi.nodesApi;
|
||||
deleteNodeSpy = spyOn(nodeApi, 'deleteNode').and.returnValue(Promise.resolve());
|
||||
purgeDeletedNodeSpy = spyOn(nodeApi, 'purgeDeletedNode').and.returnValue(Promise.resolve());
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { Component, DebugElement } from '@angular/core';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
@@ -55,8 +55,8 @@ describe('NodeDownloadDirective', () => {
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.debugElement.query(By.directive(NodeDownloadDirective));
|
||||
dialog = TestBed.get(MatDialog);
|
||||
apiService = TestBed.get(AlfrescoApiService);
|
||||
dialog = TestBed.inject(MatDialog);
|
||||
apiService = TestBed.inject(AlfrescoApiService);
|
||||
contentService = apiService.getInstance().content;
|
||||
dialogSpy = spyOn(dialog, 'open');
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Directive, Input, HostListener } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { DownloadZipDialogComponent } from '../dialogs/download-zip/download-zip.dialog';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
|
||||
@@ -64,7 +64,7 @@ describe('NodeRestoreDirective', () => {
|
||||
element = fixture.debugElement.query(By.directive(NodeRestoreDirective));
|
||||
directiveInstance = element.injector.get(NodeRestoreDirective);
|
||||
|
||||
alfrescoService = TestBed.get(AlfrescoApiService);
|
||||
alfrescoService = TestBed.inject(AlfrescoApiService);
|
||||
nodesService = alfrescoService.getInstance().nodes;
|
||||
coreApi = alfrescoService.getInstance().core;
|
||||
|
||||
@@ -73,7 +73,7 @@ describe('NodeRestoreDirective', () => {
|
||||
list: { entries: [] }
|
||||
}));
|
||||
|
||||
translationService = TestBed.get(TranslationService);
|
||||
translationService = TestBed.inject(TranslationService);
|
||||
spyOn(translationService, 'instant').and.callFake((key) => { return key; });
|
||||
});
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ describe('VersionCompatibilityDirective', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
versionCompatibilityService = TestBed.get(VersionCompatibilityService);
|
||||
versionCompatibilityService = TestBed.inject(VersionCompatibilityService);
|
||||
spyOn(versionCompatibilityService, 'getAcsVersion').and.returnValue(acsResponceMock);
|
||||
});
|
||||
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
*/
|
||||
|
||||
import { FormOutcomeModel, FormFieldValidator, FormFieldModel, FormOutcomeEvent, FormModel } from './widgets';
|
||||
import { EventEmitter, Input, Output } from '@angular/core';
|
||||
import { EventEmitter, Input, Output, Directive } from '@angular/core';
|
||||
|
||||
@Directive()
|
||||
// tslint:disable-next-line: directive-class-suffix
|
||||
export abstract class FormBaseComponent {
|
||||
|
||||
static SAVE_OUTCOME_ID: string = '$save';
|
||||
|
||||
@@ -52,7 +52,7 @@ declare var adf: any;
|
||||
})
|
||||
export class FormFieldComponent implements OnInit, OnDestroy {
|
||||
|
||||
@ViewChild('container', { read: ViewContainerRef })
|
||||
@ViewChild('container', { read: ViewContainerRef, static: true })
|
||||
container: ViewContainerRef;
|
||||
|
||||
/** Contains all the necessary data needed to determine what UI Widget
|
||||
@@ -145,15 +145,12 @@ export class FormFieldComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
private createComponentFactorySync(compiler: Compiler, metadata: Component, componentClass: any): ComponentFactory<any> {
|
||||
const cmpClass = componentClass || class RuntimeComponent {
|
||||
};
|
||||
const cmpClass = componentClass || class RuntimeComponent {};
|
||||
const decoratedCmp = Component(metadata)(cmpClass);
|
||||
const moduleClass = class RuntimeComponentModule {};
|
||||
const decoratedNgModule = NgModule({ imports: [], declarations: [decoratedCmp] })(moduleClass);
|
||||
const module: ModuleWithComponentFactories<any> = compiler.compileModuleAndAllComponentsSync(decoratedNgModule);
|
||||
|
||||
@NgModule({ imports: [], declarations: [decoratedCmp] })
|
||||
class RuntimeComponentModule {
|
||||
}
|
||||
|
||||
const module: ModuleWithComponentFactories<any> = compiler.compileModuleAndAllComponentsSync(RuntimeComponentModule);
|
||||
return module.componentFactories.find((x) => x.componentType === decoratedCmp);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ describe('TaskAttachmentList', () => {
|
||||
fixture = TestBed.createComponent(FormListComponent);
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.debugElement.nativeElement;
|
||||
service = TestBed.get(FormService);
|
||||
service = TestBed.inject(FormService);
|
||||
|
||||
}));
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ describe('Form Renderer Component', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FormRendererComponent);
|
||||
formRendererComponent = fixture.componentInstance;
|
||||
formService = TestBed.get(FormService);
|
||||
formService = TestBed.inject(FormService);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -24,7 +24,7 @@ import { setupTestBed } from '../../../../testing/setup-test-bed';
|
||||
import { FormBaseModule } from 'core/form/form-base.module';
|
||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { TranslateLoaderService } from 'core/services';
|
||||
import { MatCheckboxModule } from '@angular/material';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { CoreTestingModule } from '../../../../testing';
|
||||
|
||||
describe('CheckboxWidgetComponent', () => {
|
||||
|
||||
@@ -70,8 +70,8 @@ describe('ContentWidgetComponent', () => {
|
||||
});
|
||||
|
||||
beforeEach(async(() => {
|
||||
serviceContent = TestBed.get(ContentService);
|
||||
processContentService = TestBed.get(ProcessContentService);
|
||||
serviceContent = TestBed.inject(ContentService);
|
||||
processContentService = TestBed.inject(ProcessContentService);
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/* tslint:disable:component-selector */
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation, OnDestroy } from '@angular/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
import { DatetimeAdapter, MAT_DATETIME_FORMATS } from '@mat-datetimepicker/core';
|
||||
import { MomentDatetimeAdapter, MAT_MOMENT_DATETIME_FORMATS } from '@mat-datetimepicker/moment';
|
||||
import moment from 'moment-es6';
|
||||
|
||||
@@ -21,7 +21,7 @@ import { UserPreferencesService, UserPreferenceValues } from '../../../../servic
|
||||
import { MomentDateAdapter } from '../../../../utils/moment-date-adapter';
|
||||
import { MOMENT_DATE_FORMATS } from '../../../../utils/moment-date-formats.model';
|
||||
import { Component, OnInit, ViewEncapsulation, OnDestroy } from '@angular/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
import moment from 'moment-es6';
|
||||
import { Moment } from 'moment';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
||||
@@ -38,9 +38,8 @@ describe('DropdownWidgetComponent', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
function openSelect() {
|
||||
const dropdown = fixture.debugElement.query(By.css('[class="mat-select-trigger"]'));
|
||||
dropdown.triggerEventHandler('click', null);
|
||||
fixture.detectChanges();
|
||||
const dropdown = fixture.debugElement.nativeElement.querySelector('.mat-select-trigger');
|
||||
dropdown.click();
|
||||
}
|
||||
|
||||
const fakeOptionList: FormFieldOption[] = [
|
||||
@@ -59,8 +58,8 @@ describe('DropdownWidgetComponent', () => {
|
||||
fixture = TestBed.createComponent(DropdownWidgetComponent);
|
||||
widget = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
formService = TestBed.get(FormService);
|
||||
visibilityService = TestBed.get(WidgetVisibilityService);
|
||||
formService = TestBed.inject(FormService);
|
||||
visibilityService = TestBed.inject(WidgetVisibilityService);
|
||||
widget.field = new FormFieldModel(new FormModel());
|
||||
}));
|
||||
|
||||
@@ -315,12 +314,15 @@ describe('DropdownWidgetComponent', () => {
|
||||
|
||||
openSelect();
|
||||
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable()
|
||||
.then(() => {
|
||||
fixture.detectChanges();
|
||||
expect(element.querySelector('#dropdown-id')).not.toBeNull();
|
||||
const option = fixture.debugElement.query(By.css('.mat-option')).nativeElement;
|
||||
expect(option.innerText.trim()).toEqual('FakeValue');
|
||||
const options = fixture.debugElement.queryAll(By.css('.mat-option-text'));
|
||||
expect(options.length).toBe(1);
|
||||
|
||||
const option = options[0].nativeElement;
|
||||
expect(option.innerText).toEqual('FakeValue');
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -86,8 +86,8 @@ describe('DynamicTableWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
const field = new FormFieldModel(new FormModel());
|
||||
logService = TestBed.get(LogService);
|
||||
formService = TestBed.get(FormService);
|
||||
logService = TestBed.inject(LogService);
|
||||
formService = TestBed.inject(FormService);
|
||||
table = new DynamicTableModel(field, formService);
|
||||
const changeDetectorSpy = jasmine.createSpyObj('cd', ['detectChanges']);
|
||||
const nativeElementSpy = jasmine.createSpyObj('nativeElement', ['querySelector']);
|
||||
|
||||
@@ -23,7 +23,7 @@ import { DynamicTableModel } from './../../dynamic-table.widget.model';
|
||||
import { DateEditorComponent } from './date.editor';
|
||||
import { setupTestBed } from '../../../../../../testing/setup-test-bed';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { MatDatepickerInputEvent } from '@angular/material';
|
||||
import { MatDatepickerInputEvent } from '@angular/material/datepicker';
|
||||
import { CoreTestingModule } from '../../../../../../testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ import { UserPreferencesService, UserPreferenceValues } from '../../../../../../
|
||||
import { MomentDateAdapter } from '../../../../../../utils/moment-date-adapter';
|
||||
import { MOMENT_DATE_FORMATS } from '../../../../../../utils/moment-date-formats.model';
|
||||
import { Component, Input, OnInit, OnDestroy } from '@angular/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS, MatDatepickerInputEvent } from '@angular/material';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
import { MatDatepickerInputEvent } from '@angular/material/datepicker';
|
||||
import moment from 'moment-es6';
|
||||
import { Moment } from 'moment';
|
||||
import { DynamicTableColumn } from './../../dynamic-table-column.model';
|
||||
|
||||
@@ -21,7 +21,7 @@ import { UserPreferencesService, UserPreferenceValues } from '../../../../../../
|
||||
import { MomentDateAdapter } from '../../../../../../utils/moment-date-adapter';
|
||||
import { MOMENT_DATE_FORMATS } from '../../../../../../utils/moment-date-formats.model';
|
||||
import { Component, Input, OnInit, OnDestroy } from '@angular/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
import moment from 'moment-es6';
|
||||
import { Moment } from 'moment';
|
||||
import { DynamicTableColumn } from './../../dynamic-table-column.model';
|
||||
|
||||
@@ -45,9 +45,9 @@ describe('PeopleWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PeopleWidgetComponent);
|
||||
formService = TestBed.get(FormService);
|
||||
formService = TestBed.inject(FormService);
|
||||
|
||||
translationService = TestBed.get(TranslateService);
|
||||
translationService = TestBed.inject(TranslateService);
|
||||
spyOn(translationService, 'instant').and.callFake((key) => {
|
||||
return key;
|
||||
});
|
||||
|
||||
@@ -52,7 +52,7 @@ import {
|
||||
})
|
||||
export class PeopleWidgetComponent extends WidgetComponent implements OnInit {
|
||||
|
||||
@ViewChild('inputValue')
|
||||
@ViewChild('inputValue', { static: true })
|
||||
input: ElementRef;
|
||||
|
||||
@Output()
|
||||
|
||||
@@ -25,7 +25,8 @@ import { FormFieldModel } from './../core/form-field.model';
|
||||
import { FormModel } from './../core/form.model';
|
||||
import { RadioButtonsWidgetComponent } from './radio-buttons.widget';
|
||||
import { setupTestBed } from '../../../../testing/setup-test-bed';
|
||||
import { MatIconModule, MatRadioModule } from '@angular/material';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { CoreTestingModule } from '../../../../testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@@ -22,7 +22,8 @@ import { FormModel } from '../core/form.model';
|
||||
import { TextWidgetComponent } from './text.widget';
|
||||
import { setupTestBed } from '../../../../testing/setup-test-bed';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { MatInputModule, MatIconModule } from '@angular/material';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { CoreTestingModule } from '../../../../testing';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@@ -145,29 +146,32 @@ describe('TextWidgetComponent', () => {
|
||||
});
|
||||
fixture.detectChanges();
|
||||
enterValueInTextField(element.querySelector('#text-id'), 'TEXT');
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
errorWidget = element.querySelector('error-widget div[class="adf-error-text"]');
|
||||
|
||||
await fixture.whenStable();
|
||||
errorWidget = element.querySelector('.adf-error-text');
|
||||
expect(errorWidget).toBeDefined();
|
||||
expect(errorWidget.innerHTML).toBe('FORM.FIELD.VALIDATOR.AT_LEAST_LONG');
|
||||
|
||||
expect(widget.field.isValid).toBe(false);
|
||||
|
||||
enterValueInTextField(element.querySelector('#text-id'), 'TEXT VALUE');
|
||||
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
errorWidget = element.querySelector('error-widget div[class="adf-error-text"]');
|
||||
expect(errorWidget).toBeNull();
|
||||
|
||||
errorWidget = element.querySelector('.adf-error-text');
|
||||
|
||||
expect(widget.field.isValid).toBe(true);
|
||||
|
||||
enterValueInTextField(element.querySelector('#text-id'), 'TEXT VALUE TOO LONG');
|
||||
await fixture.whenStable();
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(widget.field.isValid).toBe(false);
|
||||
errorWidget = element.querySelector('error-widget div[class="adf-error-text"]');
|
||||
expect(errorWidget).toBeDefined();
|
||||
|
||||
errorWidget = element.querySelector('.adf-error-text');
|
||||
expect(errorWidget.innerHTML).toBe('FORM.FIELD.VALIDATOR.NO_LONGER_THAN');
|
||||
});
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('TypeaheadWidgetComponent', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
translationService = TestBed.get(TranslateService);
|
||||
translationService = TestBed.inject(TranslateService);
|
||||
spyOn(translationService, 'instant').and.callFake((key) => { return key; });
|
||||
spyOn(translationService, 'get').and.callFake((key) => { return of(key); });
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('UploadWidgetComponent', () => {
|
||||
uploadWidgetComponent = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
debugElement = fixture.debugElement;
|
||||
contentService = TestBed.get(ProcessContentService);
|
||||
contentService = TestBed.inject(ProcessContentService);
|
||||
}));
|
||||
|
||||
it('should setup with field data', () => {
|
||||
@@ -147,7 +147,7 @@ describe('UploadWidgetComponent', () => {
|
||||
type: FormFieldTypes.UPLOAD,
|
||||
readOnly: false
|
||||
});
|
||||
formServiceInstance = TestBed.get(FormService);
|
||||
formServiceInstance = TestBed.inject(FormService);
|
||||
uploadWidgetComponent.field.value = [];
|
||||
});
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { FormEvent } from './form.event';
|
||||
export { FormErrorEvent } from './form-error.event';
|
||||
export { FormFieldEvent } from './form-field.event';
|
||||
export { ValidateFormFieldEvent } from './validate-form-field.event';
|
||||
export { ValidateFormEvent } from './validate-form.event';
|
||||
export { ValidateDynamicTableRowEvent } from './validate-dynamic-table-row.event';
|
||||
export * from './form.event';
|
||||
export * from './form-error.event';
|
||||
export * from './form-field.event';
|
||||
export * from './validate-form-field.event';
|
||||
export * from './validate-form.event';
|
||||
export * from './validate-dynamic-table-row.event';
|
||||
|
||||
@@ -67,9 +67,6 @@ import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
...MASK_DIRECTIVE,
|
||||
WidgetComponent
|
||||
],
|
||||
entryComponents: [
|
||||
...WIDGET_DIRECTIVES
|
||||
],
|
||||
exports: [
|
||||
ContentWidgetComponent,
|
||||
FormFieldComponent,
|
||||
|
||||
@@ -37,7 +37,7 @@ describe('EcmModelService', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
service = TestBed.get(EcmModelService);
|
||||
service = TestBed.inject(EcmModelService);
|
||||
jasmine.Ajax.install();
|
||||
});
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ describe('Form service', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
service = TestBed.get(FormService);
|
||||
apiService = TestBed.get(AlfrescoApiService);
|
||||
service = TestBed.inject(FormService);
|
||||
apiService = TestBed.inject(AlfrescoApiService);
|
||||
jasmine.Ajax.install();
|
||||
});
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ describe('NodeService', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
service = TestBed.get(NodeService);
|
||||
service = TestBed.inject(NodeService);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('ProcessContentService', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
service = TestBed.get(ProcessContentService);
|
||||
service = TestBed.inject(ProcessContentService);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -51,7 +51,7 @@ describe('WidgetVisibilityCloudService', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
service = TestBed.get(WidgetVisibilityService);
|
||||
service = TestBed.inject(WidgetVisibilityService);
|
||||
jasmine.Ajax.install();
|
||||
});
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ describe('WidgetVisibilityService', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
service = TestBed.get(WidgetVisibilityService);
|
||||
service = TestBed.inject(WidgetVisibilityService);
|
||||
jasmine.Ajax.install();
|
||||
});
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
ViewEncapsulation,
|
||||
ChangeDetectionStrategy
|
||||
} from '@angular/core';
|
||||
import { ThemePalette } from '@angular/material';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-icon',
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IconComponent } from './icon.component';
|
||||
import { MatIconModule } from '@angular/material';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
@NgModule({
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MatTabChangeEvent } from '@angular/material';
|
||||
import { MatTabChangeEvent } from '@angular/material/tabs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { InfoDrawerComponent } from './info-drawer.component';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
@@ -39,7 +39,7 @@ describe('InfoDrawerComponent', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
translateService = TestBed.get(TranslateService);
|
||||
translateService = TestBed.inject(TranslateService);
|
||||
spyOn(translateService, 'get').and.callFake((key) => of(key));
|
||||
|
||||
fixture = TestBed.createComponent(InfoDrawerComponent);
|
||||
@@ -70,8 +70,7 @@ describe('InfoDrawerComponent', () => {
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<adf-info-drawer [selectedIndex]="tabIndex">
|
||||
<div info-drawer-title>Fake Title Custom</div>
|
||||
<adf-info-drawer [selectedIndex]="tabIndex" title="Fake Title Custom">
|
||||
<adf-info-drawer-tab label="Tab1">
|
||||
</adf-info-drawer-tab>
|
||||
<adf-info-drawer-tab label="Tab2">
|
||||
@@ -101,7 +100,7 @@ describe('Custom InfoDrawer', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
translateService = TestBed.get(TranslateService);
|
||||
translateService = TestBed.inject(TranslateService);
|
||||
spyOn(translateService, 'get').and.callFake((key) => of(key));
|
||||
|
||||
fixture = TestBed.createComponent(CustomInfoDrawerComponent);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, ContentChildren, EventEmitter, Input, Output, QueryList, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { MatTabChangeEvent } from '@angular/material';
|
||||
import { MatTabChangeEvent } from '@angular/material/tabs';
|
||||
@Component({
|
||||
selector: 'adf-info-drawer-tab',
|
||||
template: '<ng-template><ng-content></ng-content></ng-template>'
|
||||
@@ -30,7 +30,7 @@ export class InfoDrawerTabComponent {
|
||||
@Input()
|
||||
icon: string = null;
|
||||
|
||||
@ViewChild(TemplateRef)
|
||||
@ViewChild(TemplateRef, { static: true })
|
||||
content: TemplateRef<any>;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '../../',
|
||||
@@ -10,9 +8,6 @@ module.exports = function (config) {
|
||||
{pattern: 'node_modules/core-js/client/core.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/tslib/tslib.js', included: true, watched: false},
|
||||
|
||||
{pattern: 'node_modules/hammerjs/hammer.min.js', included: true, watched: false},
|
||||
{pattern: 'node_modules/hammerjs/hammer.min.js.map', included: false, watched: false},
|
||||
|
||||
// pdf-js
|
||||
{pattern: 'node_modules/pdfjs-dist/build/pdf.js.map', included: false, watched: false},
|
||||
{pattern: 'node_modules/pdfjs-dist/build/pdf.js', included: true, watched: false},
|
||||
|
||||
@@ -56,8 +56,8 @@ describe('LanguageMenuComponent', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LanguageMenuComponent);
|
||||
component = fixture.componentInstance;
|
||||
appConfig = TestBed.get(AppConfigService);
|
||||
userPreferencesService = TestBed.get(UserPreferencesService);
|
||||
appConfig = TestBed.inject(AppConfigService);
|
||||
userPreferencesService = TestBed.inject(UserPreferencesService);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -20,7 +20,7 @@ import { HeaderLayoutComponent } from './header.component';
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { LayoutModule } from '../..';
|
||||
import { SidenavLayoutModule } from '../../layout.module';
|
||||
import { Component } from '@angular/core';
|
||||
import { MaterialModule } from './../../../material.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -189,7 +189,7 @@ describe('HeaderLayoutComponent', () => {
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule,
|
||||
LayoutModule,
|
||||
SidenavLayoutModule,
|
||||
MaterialModule
|
||||
],
|
||||
declarations: [HeaderLayoutTesterComponent]
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, Input, ViewChild, OnInit, OnDestroy, ViewEncapsulation, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { MatSidenav } from '@angular/material';
|
||||
import { MatSidenav } from '@angular/material/sidenav';
|
||||
import { sidenavAnimation, contentAnimation } from '../../helpers/animations';
|
||||
import { Direction } from '@angular/cdk/bidi';
|
||||
|
||||
@@ -43,7 +43,7 @@ export class LayoutContainerComponent implements OnInit, OnDestroy, OnChanges {
|
||||
/** Layout text orientation 'ltr' | 'rtl' */
|
||||
@Input() direction: Direction = 'ltr';
|
||||
|
||||
@ViewChild(MatSidenav) sidenav: MatSidenav;
|
||||
@ViewChild(MatSidenav, { static: true }) sidenav: MatSidenav;
|
||||
|
||||
sidenavAnimationState: any;
|
||||
contentAnimationState: any;
|
||||
|
||||
@@ -111,7 +111,7 @@ describe('SidenavLayoutComponent', () => {
|
||||
removeListener: () => {}
|
||||
};
|
||||
|
||||
mediaMatcher = TestBed.get(MediaMatcher);
|
||||
mediaMatcher = TestBed.inject(MediaMatcher);
|
||||
spyOn(mediaMatcher, 'matchMedia').and.callFake((mediaQuery) => {
|
||||
mediaQueryList.originalMediaQueryPassed = mediaQuery;
|
||||
spyOn(mediaQueryList, 'addListener').and.callThrough();
|
||||
@@ -258,7 +258,7 @@ describe('Template transclusion', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
mediaMatcher = TestBed.get(MediaMatcher);
|
||||
mediaMatcher = TestBed.inject(MediaMatcher);
|
||||
spyOn(mediaMatcher, 'matchMedia').and.callFake(() => {
|
||||
spyOn(mediaQueryList, 'addListener').and.stub();
|
||||
spyOn(mediaQueryList, 'removeListener').and.stub();
|
||||
|
||||
@@ -71,15 +71,20 @@ export class SidenavLayoutComponent implements OnInit, AfterViewInit, OnDestroy
|
||||
/** Emitted when the menu toggle and the collapsed/expanded state of the sideNav changes. */
|
||||
@Output() expanded = new EventEmitter<boolean>();
|
||||
|
||||
@ContentChild(SidenavLayoutHeaderDirective) headerDirective: SidenavLayoutHeaderDirective;
|
||||
@ContentChild(SidenavLayoutNavigationDirective) navigationDirective: SidenavLayoutNavigationDirective;
|
||||
@ContentChild(SidenavLayoutContentDirective) contentDirective: SidenavLayoutContentDirective;
|
||||
@ContentChild(SidenavLayoutHeaderDirective)
|
||||
headerDirective: SidenavLayoutHeaderDirective;
|
||||
|
||||
@ContentChild(SidenavLayoutNavigationDirective)
|
||||
navigationDirective: SidenavLayoutNavigationDirective;
|
||||
|
||||
@ContentChild(SidenavLayoutContentDirective)
|
||||
contentDirective: SidenavLayoutContentDirective;
|
||||
|
||||
private menuOpenStateSubject: BehaviorSubject<boolean>;
|
||||
public menuOpenState$: Observable<boolean>;
|
||||
|
||||
@ViewChild('container') container: any;
|
||||
@ViewChild('emptyTemplate') emptyTemplate: any;
|
||||
@ViewChild('container', { static: true }) container: any;
|
||||
@ViewChild('emptyTemplate', { static: true }) emptyTemplate: any;
|
||||
|
||||
mediaQueryList: MediaQueryList;
|
||||
_isMenuMinimized;
|
||||
|
||||
@@ -60,5 +60,4 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
HeaderLayoutComponent
|
||||
]
|
||||
})
|
||||
export class LayoutModule {}
|
||||
export { LayoutModule as SidenavLayoutModule };
|
||||
export class SidenavLayoutModule {}
|
||||
|
||||
@@ -41,7 +41,7 @@ describe('LoginDialogPanelComponent', () => {
|
||||
fixture = TestBed.createComponent(LoginDialogPanelComponent);
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
authService = TestBed.get(AuthenticationService);
|
||||
authService = TestBed.inject(AuthenticationService);
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
usernameInput = element.querySelector('#username');
|
||||
|
||||
@@ -30,7 +30,7 @@ export class LoginDialogPanelComponent {
|
||||
@Output()
|
||||
success = new EventEmitter<LoginSuccessEvent>();
|
||||
|
||||
@ViewChild('adfLogin')
|
||||
@ViewChild('adfLogin', { static: true })
|
||||
login: LoginComponent;
|
||||
|
||||
submitForm(): void {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, Inject, ViewEncapsulation, ViewChild } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { LoginDialogComponentData } from './login-dialog-component-data.interface';
|
||||
import { LoginDialogPanelComponent } from './login-dialog-panel.component';
|
||||
@Component({
|
||||
@@ -27,7 +27,7 @@ import { LoginDialogPanelComponent } from './login-dialog-panel.component';
|
||||
})
|
||||
export class LoginDialogComponent {
|
||||
|
||||
@ViewChild('adfLoginPanel')
|
||||
@ViewChild('adfLoginPanel', { static: true })
|
||||
loginPanel: LoginDialogPanelComponent;
|
||||
|
||||
buttonActionName = '';
|
||||
|
||||
@@ -76,11 +76,11 @@ describe('LoginComponent', () => {
|
||||
component.showRememberMe = true;
|
||||
component.showLoginActions = true;
|
||||
|
||||
authService = TestBed.get(AuthenticationService);
|
||||
router = TestBed.get(Router);
|
||||
userPreferences = TestBed.get(UserPreferencesService);
|
||||
appConfigService = TestBed.get(AppConfigService);
|
||||
alfrescoApiService = TestBed.get(AlfrescoApiService);
|
||||
authService = TestBed.inject(AuthenticationService);
|
||||
router = TestBed.inject(Router);
|
||||
userPreferences = TestBed.inject(UserPreferencesService);
|
||||
appConfigService = TestBed.inject(AppConfigService);
|
||||
alfrescoApiService = TestBed.inject(AlfrescoApiService);
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
@@ -281,18 +281,6 @@ describe('LoginComponent', () => {
|
||||
expect(element.querySelector('#login-action-register')).toBe(null);
|
||||
});
|
||||
|
||||
it('should not render a validation min-length as default', () => {
|
||||
usernameInput.value = '1';
|
||||
usernameInput.dispatchEvent(new Event('input'));
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.formError).toBeDefined();
|
||||
expect(component.formError.username).toBeDefined();
|
||||
expect(component.formError.username).toBe('');
|
||||
expect(element.querySelector('#username-error')).toBeNull();
|
||||
});
|
||||
|
||||
describe('Error', () => {
|
||||
|
||||
it('should render validation min-length error when the username is just 1 character with a custom validation Validators.minLength(3)', () => {
|
||||
|
||||
@@ -131,12 +131,6 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
private _message: { [id: string]: { [id: string]: ValidationMessage } };
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param _fb
|
||||
* @param authService
|
||||
* @param translate
|
||||
*/
|
||||
constructor(
|
||||
private _fb: FormBuilder,
|
||||
private authService: AuthenticationService,
|
||||
@@ -148,12 +142,13 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
private location: Location,
|
||||
private route: ActivatedRoute,
|
||||
private sanitizer: DomSanitizer
|
||||
) {
|
||||
this.initFormError();
|
||||
this.initFormFieldsMessages();
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.initFormError();
|
||||
this.initFormFieldsDefault();
|
||||
this.initFormFieldsMessages();
|
||||
|
||||
if (this.authService.isOauth()) {
|
||||
const oauth: OauthConfigModel = this.appConfig.get<OauthConfigModel>(AppConfigValues.OAUTHCONFIG, null);
|
||||
if (oauth && oauth.implicitFlow) {
|
||||
@@ -172,12 +167,10 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
if (this.hasCustomFieldsValidation()) {
|
||||
if (this.fieldsValidation) {
|
||||
this.form = this._fb.group(this.fieldsValidation);
|
||||
} else {
|
||||
this.initFormFieldsDefault();
|
||||
this.initFormFieldsMessagesDefault();
|
||||
}
|
||||
|
||||
this.form.valueChanges
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(data => this.onValueChanged(data));
|
||||
@@ -368,27 +361,15 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
* Init form fields messages
|
||||
*/
|
||||
private initFormFieldsMessages() {
|
||||
this._message = {
|
||||
username: {},
|
||||
password: {}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Default form fields messages
|
||||
*/
|
||||
private initFormFieldsMessagesDefault() {
|
||||
this._message = {
|
||||
username: {
|
||||
required: {
|
||||
value: 'LOGIN.MESSAGES.USERNAME-REQUIRED'
|
||||
},
|
||||
minLength: {
|
||||
minlength: {
|
||||
value: 'LOGIN.MESSAGES.USERNAME-MIN',
|
||||
params: {
|
||||
get minLength() {
|
||||
return this.minLength;
|
||||
}
|
||||
minLength: this.minLength
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,7 +384,7 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
|
||||
private initFormFieldsDefault() {
|
||||
this.form = this._fb.group({
|
||||
username: ['', Validators.required],
|
||||
username: ['', Validators.compose([Validators.required, Validators.minLength(this.minLength)])],
|
||||
password: ['', Validators.required]
|
||||
});
|
||||
}
|
||||
@@ -415,8 +396,4 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
this.isError = false;
|
||||
this.initFormError();
|
||||
}
|
||||
|
||||
private hasCustomFieldsValidation(): boolean {
|
||||
return this.fieldsValidation !== undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ import { LoginDialogPanelComponent } from './components/login-dialog-panel.compo
|
||||
LoginDialogComponent,
|
||||
LoginDialogPanelComponent
|
||||
],
|
||||
entryComponents: [LoginDialogComponent, LoginDialogPanelComponent],
|
||||
exports: [
|
||||
LoginComponent,
|
||||
LoginFooterDirective,
|
||||
|
||||
+36
-16
@@ -18,28 +18,48 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { MatDatetimepickerModule, MatNativeDatetimeModule } from '@mat-datetimepicker/core';
|
||||
|
||||
import {
|
||||
MatAutocompleteModule, MatButtonModule, MatCardModule, MatCheckboxModule,
|
||||
MatChipsModule, MatDatepickerModule, MatDialogModule, MatGridListModule, MatIconModule,
|
||||
MatInputModule, MatListModule, MatNativeDateModule, MatOptionModule, MatProgressSpinnerModule, MatRadioModule,
|
||||
MatRippleModule, MatSelectModule, MatSlideToggleModule, MatTableModule, MatTabsModule,
|
||||
MatMenuModule, MatProgressBarModule, MatSidenavModule, MatSnackBarModule, MatToolbarModule,
|
||||
MatTooltipModule, MatExpansionModule
|
||||
} from '@angular/material';
|
||||
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { MatChipsModule } from '@angular/material/chips';
|
||||
import { MatNativeDateModule, MatOptionModule, MatRippleModule } from '@angular/material/core';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatExpansionModule } from '@angular/material/expansion';
|
||||
import { MatGridListModule } from '@angular/material/grid-list';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
|
||||
export function modules() {
|
||||
return [
|
||||
@NgModule({
|
||||
imports: [
|
||||
MatAutocompleteModule, MatButtonModule, MatCardModule, MatCheckboxModule,
|
||||
MatChipsModule, MatDatepickerModule, MatDialogModule, MatGridListModule, MatIconModule,
|
||||
MatInputModule, MatListModule, MatNativeDateModule, MatOptionModule, MatProgressSpinnerModule, MatRadioModule,
|
||||
MatRippleModule, MatSelectModule, MatSlideToggleModule, MatTableModule, MatTabsModule,
|
||||
MatMenuModule, MatProgressBarModule, MatSidenavModule, MatSnackBarModule, MatToolbarModule,
|
||||
MatTooltipModule, MatDatetimepickerModule, MatNativeDatetimeModule, MatExpansionModule
|
||||
];
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
imports: modules(),
|
||||
exports: modules()
|
||||
],
|
||||
exports: [
|
||||
MatAutocompleteModule, MatButtonModule, MatCardModule, MatCheckboxModule,
|
||||
MatChipsModule, MatDatepickerModule, MatDialogModule, MatGridListModule, MatIconModule,
|
||||
MatInputModule, MatListModule, MatNativeDateModule, MatOptionModule, MatProgressSpinnerModule, MatRadioModule,
|
||||
MatRippleModule, MatSelectModule, MatSlideToggleModule, MatTableModule, MatTabsModule,
|
||||
MatMenuModule, MatProgressBarModule, MatSidenavModule, MatSnackBarModule, MatToolbarModule,
|
||||
MatTooltipModule, MatDatetimepickerModule, MatNativeDatetimeModule, MatExpansionModule
|
||||
]
|
||||
})
|
||||
export class MaterialModule {}
|
||||
|
||||
@@ -1,42 +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 } from '@angular/core';
|
||||
import {
|
||||
AmountWidgetComponent,
|
||||
ContainerWidgetComponent,
|
||||
DateWidgetComponent,
|
||||
DropdownWidgetComponent,
|
||||
NumberWidgetComponent,
|
||||
RadioButtonsWidgetComponent,
|
||||
TextWidgetComponent
|
||||
} from '../../form/components/widgets/index';
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
entryComponents: [
|
||||
ContainerWidgetComponent,
|
||||
TextWidgetComponent,
|
||||
NumberWidgetComponent,
|
||||
DateWidgetComponent,
|
||||
DropdownWidgetComponent,
|
||||
RadioButtonsWidgetComponent,
|
||||
AmountWidgetComponent
|
||||
]
|
||||
})
|
||||
|
||||
export class EntryComponentMockModule {}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../dist/core/",
|
||||
"lib": {
|
||||
"entryFile": "./public-api.ts",
|
||||
@@ -8,20 +8,12 @@
|
||||
"@alfresco/js-api": "@alfresco/js-api",
|
||||
"@alfresco/adf-extensions": "@alfresco/adf-extensions",
|
||||
"minimatch": "minimatch-browser",
|
||||
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
||||
"@angular/material": "@angular/material",
|
||||
"@mat-datetimepicker/core": "@mat-datetimepicker/core",
|
||||
"@mat-datetimepicker/moment": "@mat-datetimepicker/moment",
|
||||
"@angular/flex-layout": "@angular/flex-layout",
|
||||
"@angular/material-moment-adapter": "@angular/material-moment-adapter",
|
||||
"@angular/animations": "@angular/animations",
|
||||
"@angular/cdk/platform": "@angular/cdk/platform",
|
||||
"@angular/material/core": "@angular/material/core",
|
||||
"moment": "moment",
|
||||
"moment-es6": "moment-es6",
|
||||
"moment/src/moment": "moment/src/moment",
|
||||
"@ngx-translate/core": "@ngx-translate/core",
|
||||
"rxjs": "rxjs"
|
||||
"@ngx-translate/core": "@ngx-translate/core"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ describe('Notification History Component', () => {
|
||||
fixture = TestBed.createComponent(NotificationHistoryComponent);
|
||||
element = fixture.nativeElement;
|
||||
|
||||
storage = TestBed.get(StorageService);
|
||||
notificationService = TestBed.get(NotificationService);
|
||||
storage = TestBed.inject(StorageService);
|
||||
notificationService = TestBed.inject(NotificationService);
|
||||
}));
|
||||
|
||||
beforeEach(inject([OverlayContainer], (oc: OverlayContainer) => {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
import { Component, Input, ViewChild, OnDestroy } from '@angular/core';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
import { NotificationModel } from '../models/notification.model';
|
||||
import { MatMenuTrigger } from '@angular/material';
|
||||
import { MatMenuTrigger } from '@angular/material/menu';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { Subject } from 'rxjs';
|
||||
import { StorageService } from '../../services/storage.service';
|
||||
@@ -36,7 +36,7 @@ export class NotificationHistoryComponent implements OnDestroy {
|
||||
|
||||
MAX_NOTIFICATION_STACK_LENGTH = 100;
|
||||
|
||||
@ViewChild(MatMenuTrigger)
|
||||
@ViewChild(MatMenuTrigger, { static: true })
|
||||
trigger: MatMenuTrigger;
|
||||
|
||||
/** Custom choice for opening the menu at the bottom. Can be `before` or `after`. */
|
||||
|
||||
@@ -20,7 +20,7 @@ import { OverlayModule } from '@angular/cdk/overlay';
|
||||
import { Component } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MatSnackBar, MatSnackBarModule, MatSnackBarConfig } from '@angular/material';
|
||||
import { MatSnackBar, MatSnackBarModule, MatSnackBarConfig } from '@angular/material/snack-bar';
|
||||
import { NotificationService } from './notification.service';
|
||||
import { TranslationService } from '../../services/translation.service';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
@@ -91,7 +91,7 @@ describe('NotificationService', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
translationService = TestBed.get(TranslationService);
|
||||
translationService = TestBed.inject(TranslationService);
|
||||
fixture = TestBed.createComponent(ProvidesNotificationServiceComponent);
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatSnackBar, MatSnackBarRef, MatSnackBarConfig } from '@angular/material';
|
||||
import { MatSnackBar, MatSnackBarRef, MatSnackBarConfig } from '@angular/material/snack-bar';
|
||||
import { TranslationService } from '../../services/translation.service';
|
||||
import { AppConfigService, AppConfigValues } from '../../app-config/app-config.service';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
+15
-22
@@ -12,30 +12,23 @@
|
||||
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/animations": ">=7.0.3",
|
||||
"@angular/cdk": ">=7.0.3",
|
||||
"@angular/common": ">=7.0.3",
|
||||
"@angular/compiler": ">=7.0.3",
|
||||
"@angular/core": ">=7.0.3",
|
||||
"@angular/flex-layout": ">=7.0.0-beta.19",
|
||||
"@angular/forms": ">=7.0.3",
|
||||
"@angular/material": ">=7.0.3",
|
||||
"@angular/material-moment-adapter": ">=7.0.3",
|
||||
"@angular/platform-browser": ">=7.0.3",
|
||||
"@angular/platform-browser-dynamic": ">=7.0.3",
|
||||
"@angular/router": ">=7.0.3",
|
||||
"@mat-datetimepicker/core": ">=2.0.1",
|
||||
"@mat-datetimepicker/moment": ">=2.0.1",
|
||||
"@alfresco/js-api": "3.9.0",
|
||||
"rxjs": ">=6.2.2",
|
||||
"@ngx-translate/core": ">=11.0.0",
|
||||
"core-js": ">=2.5.4",
|
||||
"hammerjs": ">=2.0.8",
|
||||
"@angular/animations": ">=9.1.9",
|
||||
"@angular/cdk": ">=9.2.4",
|
||||
"@angular/common": ">=9.1.9",
|
||||
"@angular/core": ">=9.1.9",
|
||||
"@angular/flex-layout": ">=9.0.0-beta.31",
|
||||
"@angular/forms": ">=9.1.9",
|
||||
"@angular/material": ">=9.2.4",
|
||||
"@angular/material-moment-adapter": ">=9.2.4",
|
||||
"@angular/router": ">=9.1.9",
|
||||
"@mat-datetimepicker/core": ">=4.1.0",
|
||||
"@mat-datetimepicker/moment": ">=4.1.0",
|
||||
"@alfresco/js-api": ">=3.8.0",
|
||||
"@alfresco/adf-extensions": ">=3.8.0",
|
||||
"@ngx-translate/core": ">=12.1.2",
|
||||
"minimatch-browser": ">=1.0.0",
|
||||
"moment": ">=2.22.2",
|
||||
"pdfjs-dist": ">=2.3.200",
|
||||
"reflect-metadata": ">=0.1.12",
|
||||
"zone.js": ">=0.8.26"
|
||||
"pdfjs-dist": ">=2.3.200"
|
||||
},
|
||||
"keywords": [
|
||||
"core",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user