mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Changed ng version before material migration
This commit is contained in:
3
.eslintrc.json
Normal file
3
.eslintrc.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": ["./.eslintrc.js"]
|
||||||
|
}
|
@@ -21,7 +21,7 @@ import {
|
|||||||
PageTitleService
|
PageTitleService
|
||||||
} from '@alfresco/adf-core';
|
} from '@alfresco/adf-core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -73,7 +73,7 @@ import { FolderDirectiveModule } from './folder-directive';
|
|||||||
BrowserModule,
|
BrowserModule,
|
||||||
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
|
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
RouterModule.forRoot(appRoutes, { useHash: true, relativeLinkResolution: 'legacy' }),
|
RouterModule.forRoot(appRoutes, { useHash: true }),
|
||||||
AuthModule.forRoot({ useHash: true }),
|
AuthModule.forRoot({ useHash: true }),
|
||||||
FormsModule,
|
FormsModule,
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
|
@@ -19,7 +19,7 @@ import { EcmUserModel, PeopleContentService } from '@alfresco/adf-content-servic
|
|||||||
import { PeopleProcessService } from '@alfresco/adf-process-services';
|
import { PeopleProcessService } from '@alfresco/adf-process-services';
|
||||||
import { AuthenticationService, BasicAlfrescoAuthService, IdentityUserModel, IdentityUserService, UserInfoMode } from '@alfresco/adf-core';
|
import { AuthenticationService, BasicAlfrescoAuthService, IdentityUserModel, IdentityUserService, UserInfoMode } from '@alfresco/adf-core';
|
||||||
import { Component, OnInit, Input } from '@angular/core';
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
import { MenuPositionX, MenuPositionY } from '@angular/material/menu';
|
import { LegacyMenuPositionX as MenuPositionX, LegacyMenuPositionY as MenuPositionY } from '@angular/material/legacy-menu';
|
||||||
import { Observable, of } from 'rxjs';
|
import { Observable, of } from 'rxjs';
|
||||||
import { UserRepresentation } from '@alfresco/js-api';
|
import { UserRepresentation } from '@alfresco/js-api';
|
||||||
|
|
||||||
|
@@ -18,10 +18,10 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { CloudSettingsComponent } from './cloud-settings.component';
|
import { CloudSettingsComponent } from './cloud-settings.component';
|
||||||
import { MatDialogModule } from '@angular/material/dialog';
|
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
|
||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input';
|
||||||
import { MatSelectModule } from '@angular/material/select';
|
import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select';
|
||||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
import { MatLegacySlideToggleModule as MatSlideToggleModule } from '@angular/material/legacy-slide-toggle';
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@@ -28,7 +28,7 @@ import {
|
|||||||
Output,
|
Output,
|
||||||
ViewEncapsulation
|
ViewEncapsulation
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||||
import { NodeEntry, NodePaging, Pagination, Node, SearchEntry } from '@alfresco/js-api';
|
import { NodeEntry, NodePaging, Pagination, Node, SearchEntry } from '@alfresco/js-api';
|
||||||
import { NotificationService, UserPreferencesService, PaginationComponent, ShowHeaderMode, FormRenderingService } from '@alfresco/adf-core';
|
import { NotificationService, UserPreferencesService, PaginationComponent, ShowHeaderMode, FormRenderingService } from '@alfresco/adf-core';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Inject, ViewEncapsulation } from '@angular/core';
|
import { Component, Inject, ViewEncapsulation } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { Node } from '@alfresco/js-api';
|
import { Node } from '@alfresco/js-api';
|
||||||
import { PreviewService } from '../../services/preview.service';
|
import { PreviewService } from '../../services/preview.service';
|
||||||
import { NotificationService } from '@alfresco/adf-core';
|
import { NotificationService } from '@alfresco/adf-core';
|
||||||
|
@@ -19,7 +19,7 @@ import { Component, EventEmitter, Output, ViewEncapsulation, OnInit, Input } fro
|
|||||||
import { Validators, UntypedFormGroup, UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
|
import { Validators, UntypedFormGroup, UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
|
||||||
import { AppConfigService, AppConfigValues, StorageService, AlfrescoApiService, AuthenticationService } from '@alfresco/adf-core';
|
import { AppConfigService, AppConfigValues, StorageService, AlfrescoApiService, AuthenticationService } from '@alfresco/adf-core';
|
||||||
import { ENTER } from '@angular/cdk/keycodes';
|
import { ENTER } from '@angular/cdk/keycodes';
|
||||||
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
import { MAT_LEGACY_FORM_FIELD_DEFAULT_OPTIONS as MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/legacy-form-field';
|
||||||
|
|
||||||
export const HOST_REGEX = '^(http|https)://.*[^/]$';
|
export const HOST_REGEX = '^(http|https)://.*[^/]$';
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Subject, of } from 'rxjs';
|
import { Subject, of } from 'rxjs';
|
||||||
import { FolderCreateDirective } from './folder-create.directive';
|
import { FolderCreateDirective } from './folder-create.directive';
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
import { Directive, HostListener, Input, Output, EventEmitter } from '@angular/core';
|
import { Directive, HostListener, Input, Output, EventEmitter } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { Node } from '@alfresco/js-api';
|
import { Node } from '@alfresco/js-api';
|
||||||
import { ContentService, FolderDialogComponent } from '@alfresco/adf-content-services';
|
import { ContentService, FolderDialogComponent } from '@alfresco/adf-content-services';
|
||||||
|
|
||||||
|
@@ -16,17 +16,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { MatCardModule } from '@angular/material/card';
|
import { MatLegacyCardModule as MatCardModule } from '@angular/material/legacy-card';
|
||||||
import { MatDialogModule } from '@angular/material/dialog';
|
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
|
||||||
import { MatExpansionModule } from '@angular/material/expansion';
|
import { MatExpansionModule } from '@angular/material/expansion';
|
||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input';
|
||||||
import { MatListModule } from '@angular/material/list';
|
import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list';
|
||||||
import { MatMenuModule } from '@angular/material/menu';
|
import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu';
|
||||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar';
|
||||||
import { MatSelectModule } from '@angular/material/select';
|
import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select';
|
||||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
import { MatLegacySlideToggleModule as MatSlideToggleModule } from '@angular/material/legacy-slide-toggle';
|
||||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
import { MatLegacySnackBarModule as MatSnackBarModule } from '@angular/material/legacy-snack-bar';
|
||||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@@ -1,7 +1,16 @@
|
|||||||
@use '@angular/material' as mat;
|
@use '@angular/material' as mat;
|
||||||
@import '../../lib/core/src/lib/styles/index';
|
@import '../../lib/core/src/lib/styles/index';
|
||||||
@import '../../lib/core/src/lib/styles/typography';
|
@import '../../lib/core/src/lib/styles/typography';
|
||||||
@include mat.core;
|
// TODO(v15): As of v15 mat.legacy-core no longer includes default typography styles.
|
||||||
|
// The following line adds:
|
||||||
|
// 1. Default typography styles for all components
|
||||||
|
// 2. Styles for typography hierarchy classes (e.g. .mat-headline-1)
|
||||||
|
// If you specify typography styles for the components you use elsewhere, you should delete this line.
|
||||||
|
// If you don't need the default component typographies but still want the hierarchy styles,
|
||||||
|
// you can delete this line and instead use:
|
||||||
|
// `@include mat.legacy-typography-hierarchy(mat.define-legacy-typography-config());`
|
||||||
|
@include mat.all-legacy-component-typographies;
|
||||||
|
@include mat.legacy-core();
|
||||||
|
|
||||||
$primary: mat.define-palette($alfresco-accent-orange);
|
$primary: mat.define-palette($alfresco-accent-orange);
|
||||||
$accent: mat.define-palette($alfresco-accent-purple);
|
$accent: mat.define-palette($alfresco-accent-purple);
|
||||||
@@ -17,7 +26,7 @@ $theme: mat.define-light-theme(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@include mat.all-component-themes($theme);
|
@include mat.all-legacy-component-themes($theme);
|
||||||
@include alfresco-material-theme($theme);
|
@include alfresco-material-theme($theme);
|
||||||
|
|
||||||
$typography: map-get($theme, typography);
|
$typography: map-get($theme, typography);
|
||||||
|
@@ -1,6 +1,15 @@
|
|||||||
@use '@angular/material' as mat;
|
@use '@angular/material' as mat;
|
||||||
@import '~@alfresco/adf-core/theming';
|
@import '~@alfresco/adf-core/theming';
|
||||||
@include mat.core($alfresco-typography);
|
// TODO(v15): As of v15 mat.legacy-core no longer includes default typography styles.
|
||||||
|
// The following line adds:
|
||||||
|
// 1. Default typography styles for all components
|
||||||
|
// 2. Styles for typography hierarchy classes (e.g. .mat-headline-1)
|
||||||
|
// If you specify typography styles for the components you use elsewhere, you should delete this line.
|
||||||
|
// If you don't need the default component typographies but still want the hierarchy styles,
|
||||||
|
// you can delete this line and instead use:
|
||||||
|
// `@include mat.legacy-typography-hierarchy($alfresco-typography);`
|
||||||
|
@include mat.all-legacy-component-typographies($alfresco-typography);
|
||||||
|
@include mat.legacy-core();
|
||||||
|
|
||||||
$primary: mat.define-palette($alfresco-accent-orange);
|
$primary: mat.define-palette($alfresco-accent-orange);
|
||||||
$accent: mat.define-palette($alfresco-accent-purple);
|
$accent: mat.define-palette($alfresco-accent-purple);
|
||||||
@@ -14,7 +23,7 @@ $theme: mat.define-light-theme(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@include mat.all-component-themes($theme);
|
@include mat.all-legacy-component-themes($theme);
|
||||||
@include alfresco-material-theme($theme);
|
@include alfresco-material-theme($theme);
|
||||||
|
|
||||||
body,
|
body,
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogModule as MatDialogModule, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { AspectListDialogComponent } from './aspect-list-dialog.component';
|
import { AspectListDialogComponent } from './aspect-list-dialog.component';
|
||||||
import { of, Subject } from 'rxjs';
|
import { of, Subject } from 'rxjs';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { AspectListDialogComponentData } from './aspect-list-dialog-data.interface';
|
import { AspectListDialogComponentData } from './aspect-list-dialog-data.interface';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -25,9 +25,9 @@ import { AspectEntry } from '@alfresco/js-api';
|
|||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatExpansionPanelHarness } from '@angular/material/expansion/testing';
|
import { MatExpansionPanelHarness } from '@angular/material/expansion/testing';
|
||||||
import { MatTableHarness } from '@angular/material/table/testing';
|
import { MatLegacyTableHarness as MatTableHarness } from '@angular/material/legacy-table/testing';
|
||||||
import { MatCheckboxHarness } from '@angular/material/checkbox/testing';
|
import { MatLegacyCheckboxHarness as MatCheckboxHarness } from '@angular/material/legacy-checkbox/testing';
|
||||||
import { MatProgressSpinnerHarness } from '@angular/material/progress-spinner/testing';
|
import { MatLegacyProgressSpinnerHarness as MatProgressSpinnerHarness } from '@angular/material/legacy-progress-spinner/testing';
|
||||||
|
|
||||||
const aspectListMock: AspectEntry[] = [
|
const aspectListMock: AspectEntry[] = [
|
||||||
{
|
{
|
||||||
|
@@ -20,7 +20,7 @@ import { NodesApiService } from '../common/services/nodes-api.service';
|
|||||||
import { Observable, Subject, zip } from 'rxjs';
|
import { Observable, Subject, zip } from 'rxjs';
|
||||||
import { concatMap, map, takeUntil, tap } from 'rxjs/operators';
|
import { concatMap, map, takeUntil, tap } from 'rxjs/operators';
|
||||||
import { AspectListService } from './services/aspect-list.service';
|
import { AspectListService } from './services/aspect-list.service';
|
||||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
import { MatLegacyCheckboxChange as MatCheckboxChange } from '@angular/material/legacy-checkbox';
|
||||||
import { AspectEntry } from '@alfresco/js-api';
|
import { AspectEntry } from '@alfresco/js-api';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-aspect-list',
|
selector: 'adf-aspect-list',
|
||||||
|
@@ -18,16 +18,16 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { AspectListComponent } from './aspect-list.component';
|
import { AspectListComponent } from './aspect-list.component';
|
||||||
import { MatTableModule } from '@angular/material/table';
|
import { MatLegacyTableModule as MatTableModule } from '@angular/material/legacy-table';
|
||||||
import { MatExpansionModule } from '@angular/material/expansion';
|
import { MatExpansionModule } from '@angular/material/expansion';
|
||||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox';
|
||||||
import { PipeModule } from '@alfresco/adf-core';
|
import { PipeModule } from '@alfresco/adf-core';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { MatDialogModule } from '@angular/material/dialog';
|
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
|
||||||
import { AspectListDialogComponent } from './aspect-list-dialog.component';
|
import { AspectListDialogComponent } from './aspect-list-dialog.component';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
|
||||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip';
|
||||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
import { MatLegacyProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/legacy-progress-spinner';
|
||||||
import { ContentDirectiveModule } from '../directives/content-directive.module';
|
import { ContentDirectiveModule } from '../directives/content-directive.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { Observable, Subject } from 'rxjs';
|
import { Observable, Subject } from 'rxjs';
|
||||||
import { AspectListDialogComponentData } from '../aspect-list-dialog-data.interface';
|
import { AspectListDialogComponentData } from '../aspect-list-dialog-data.interface';
|
||||||
import { AspectListDialogComponent } from '../aspect-list-dialog.component';
|
import { AspectListDialogComponent } from '../aspect-list-dialog.component';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild, ViewEncapsulation, OnDestroy } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild, ViewEncapsulation, OnDestroy } from '@angular/core';
|
||||||
import { MatSelect } from '@angular/material/select';
|
import { MatLegacySelect as MatSelect } from '@angular/material/legacy-select';
|
||||||
import { Node, PathElement } from '@alfresco/js-api';
|
import { Node, PathElement } from '@alfresco/js-api';
|
||||||
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnChanges, ViewChild, ViewEncapsulation } from '@angular/core';
|
import { Component, OnChanges, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||||
import { MatSelect } from '@angular/material/select';
|
import { MatLegacySelect as MatSelect } from '@angular/material/legacy-select';
|
||||||
import { PathElement, Node } from '@alfresco/js-api';
|
import { PathElement, Node } from '@alfresco/js-api';
|
||||||
import { BreadcrumbComponent } from './breadcrumb.component';
|
import { BreadcrumbComponent } from './breadcrumb.component';
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ import { CategoryService } from '../services/category.service';
|
|||||||
import { CategoriesManagementComponent } from './categories-management.component';
|
import { CategoriesManagementComponent } from './categories-management.component';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatProgressSpinnerHarness } from '@angular/material/progress-spinner/testing';
|
import { MatLegacyProgressSpinnerHarness as MatProgressSpinnerHarness } from '@angular/material/legacy-progress-spinner/testing';
|
||||||
|
|
||||||
describe('CategoriesManagementComponent', () => {
|
describe('CategoriesManagementComponent', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { CardViewItem, CardViewSelectItemModel, CardViewSelectItemOption, CardViewTextItemModel } from '@alfresco/adf-core';
|
import { CardViewItem, CardViewSelectItemModel, CardViewSelectItemOption, CardViewTextItemModel } from '@alfresco/adf-core';
|
||||||
import { Observable, of, Subject, zip } from 'rxjs';
|
import { Observable, of, Subject, zip } from 'rxjs';
|
||||||
import { distinctUntilChanged, map } from 'rxjs/operators';
|
import { distinctUntilChanged, map } from 'rxjs/operators';
|
||||||
|
@@ -19,7 +19,7 @@ import { TestBed, fakeAsync, tick } from '@angular/core/testing';
|
|||||||
import { NodeEntry, Node, SitePaging, Site } from '@alfresco/js-api';
|
import { NodeEntry, Node, SitePaging, Site } from '@alfresco/js-api';
|
||||||
import { DocumentListService, NodeAction } from '../document-list';
|
import { DocumentListService, NodeAction } from '../document-list';
|
||||||
import { ContentNodeDialogService } from './content-node-dialog.service';
|
import { ContentNodeDialogService } from './content-node-dialog.service';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { Subject, of } from 'rxjs';
|
import { Subject, of } from 'rxjs';
|
||||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||||
import { SitesService } from '../common';
|
import { SitesService } from '../common';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { EventEmitter, Injectable, Output } from '@angular/core';
|
import { EventEmitter, Injectable, Output } from '@angular/core';
|
||||||
import { ThumbnailService, TranslationService } from '@alfresco/adf-core';
|
import { ThumbnailService, TranslationService } from '@alfresco/adf-core';
|
||||||
import { Subject, Observable, throwError } from 'rxjs';
|
import { Subject, Observable, throwError } from 'rxjs';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogModule as MatDialogModule, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA, EventEmitter } from '@angular/core';
|
import { CUSTOM_ELEMENTS_SCHEMA, EventEmitter } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { ContentNodeSelectorComponent } from './content-node-selector.component';
|
import { ContentNodeSelectorComponent } from './content-node-selector.component';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, Inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { TranslationService, NotificationService } from '@alfresco/adf-core';
|
import { TranslationService, NotificationService } from '@alfresco/adf-core';
|
||||||
import { Node } from '@alfresco/js-api';
|
import { Node } from '@alfresco/js-api';
|
||||||
import { AllowableOperationsEnum } from '../common/models/allowable-operations.enum';
|
import { AllowableOperationsEnum } from '../common/models/allowable-operations.enum';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { NotificationService } from '@alfresco/adf-core';
|
import { NotificationService } from '@alfresco/adf-core';
|
||||||
import { NodesApiService, RenditionService } from '../common';
|
import { NodesApiService, RenditionService } from '../common';
|
||||||
@@ -28,7 +28,7 @@ import { By } from '@angular/platform-browser';
|
|||||||
import { NodeEntry } from '@alfresco/js-api';
|
import { NodeEntry } from '@alfresco/js-api';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatSlideToggleHarness } from '@angular/material/slide-toggle/testing';
|
import { MatLegacySlideToggleHarness as MatSlideToggleHarness } from '@angular/material/legacy-slide-toggle/testing';
|
||||||
|
|
||||||
describe('ShareDialogComponent', () => {
|
describe('ShareDialogComponent', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
|
@@ -16,8 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Inject, OnInit, ViewEncapsulation, ViewChild, OnDestroy } from '@angular/core';
|
import { Component, Inject, OnInit, ViewEncapsulation, ViewChild, OnDestroy } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialog as MatDialog, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { MatSlideToggleChange } from '@angular/material/slide-toggle';
|
import { MatLegacySlideToggleChange as MatSlideToggleChange } from '@angular/material/legacy-slide-toggle';
|
||||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { ContentService } from '../common/services/content.service';
|
import { ContentService } from '../common/services/content.service';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Directive, Input, HostListener, OnChanges, NgZone, OnDestroy } from '@angular/core';
|
import { Directive, Input, HostListener, OnChanges, NgZone, OnDestroy } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { NodeEntry, NodesApi } from '@alfresco/js-api';
|
import { NodeEntry, NodesApi } from '@alfresco/js-api';
|
||||||
|
|
||||||
import { ShareDialogComponent } from './content-node-share.dialog';
|
import { ShareDialogComponent } from './content-node-share.dialog';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogModule as MatDialogModule, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { of, Subject } from 'rxjs';
|
import { of, Subject } from 'rxjs';
|
||||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { TypeEntry } from '@alfresco/js-api';
|
import { TypeEntry } from '@alfresco/js-api';
|
||||||
import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { ContentTypeDialogComponentData } from './content-type-metadata.interface';
|
import { ContentTypeDialogComponentData } from './content-type-metadata.interface';
|
||||||
import { ContentTypeService } from './content-type.service';
|
import { ContentTypeService } from './content-type.service';
|
||||||
|
|
||||||
|
@@ -17,12 +17,12 @@
|
|||||||
|
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { MatTableModule } from '@angular/material/table';
|
import { MatLegacyTableModule as MatTableModule } from '@angular/material/legacy-table';
|
||||||
import { MatExpansionModule } from '@angular/material/expansion';
|
import { MatExpansionModule } from '@angular/material/expansion';
|
||||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { MatDialogModule } from '@angular/material/dialog';
|
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
|
||||||
import { ContentTypeDialogComponent } from './content-type-dialog.component';
|
import { ContentTypeDialogComponent } from './content-type-dialog.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { CoreTestingModule, IdentityUserModel, InitialUsernamePipe, UserInfoMode } from '@alfresco/adf-core';
|
import { CoreTestingModule, IdentityUserModel, InitialUsernamePipe, UserInfoMode } from '@alfresco/adf-core';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { MatMenuModule } from '@angular/material/menu';
|
import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu';
|
||||||
import { By, DomSanitizer } from '@angular/platform-browser';
|
import { By, DomSanitizer } from '@angular/platform-browser';
|
||||||
import { fakeEcmEditedUser, fakeEcmUser, fakeEcmUserNoImage } from '../common/mocks/ecm-user.service.mock';
|
import { fakeEcmEditedUser, fakeEcmUser, fakeEcmUserNoImage } from '../common/mocks/ecm-user.service.mock';
|
||||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { IdentityUserModel, UserInfoMode } from '@alfresco/adf-core';
|
import { IdentityUserModel, UserInfoMode } from '@alfresco/adf-core';
|
||||||
import { Component, Input, OnDestroy, ViewChild, ViewEncapsulation } from '@angular/core';
|
import { Component, Input, OnDestroy, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||||
import { MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material/menu';
|
import { MatLegacyMenuTrigger as MatMenuTrigger, LegacyMenuPositionX as MenuPositionX, LegacyMenuPositionY as MenuPositionY } from '@angular/material/legacy-menu';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { EcmUserModel } from '../common/models/ecm-user.model';
|
import { EcmUserModel } from '../common/models/ecm-user.model';
|
||||||
import { PeopleContentService } from '../common/services/people-content.service';
|
import { PeopleContentService } from '../common/services/people-content.service';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog';
|
||||||
import { ConfirmDialogComponent } from './confirm.dialog';
|
import { ConfirmDialogComponent } from './confirm.dialog';
|
||||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Inject, ViewEncapsulation, SecurityContext } from '@angular/core';
|
import { Component, Inject, ViewEncapsulation, SecurityContext } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog';
|
||||||
import { DomSanitizer } from '@angular/platform-browser';
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
|
|
||||||
export interface ConfirmDialogComponentProps {
|
export interface ConfirmDialogComponentProps {
|
||||||
|
@@ -18,9 +18,9 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { DownloadZipDialogComponent } from './download-zip.dialog';
|
import { DownloadZipDialogComponent } from './download-zip.dialog';
|
||||||
import { PipeModule } from '@alfresco/adf-core';
|
import { PipeModule } from '@alfresco/adf-core';
|
||||||
import { MatDialogModule } from '@angular/material/dialog';
|
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
|
||||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog';
|
||||||
import { DownloadZipDialogComponent } from './download-zip.dialog';
|
import { DownloadZipDialogComponent } from './download-zip.dialog';
|
||||||
import { CoreTestingModule } from '@alfresco/adf-core';
|
import { CoreTestingModule } from '@alfresco/adf-core';
|
||||||
import { DownloadZipService } from './services/download-zip.service';
|
import { DownloadZipService } from './services/download-zip.service';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||||
import { MatDialogRef } from '@angular/material/dialog';
|
import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { NodesApiService } from '../common/services/nodes-api.service';
|
import { NodesApiService } from '../common/services/nodes-api.service';
|
||||||
|
|
||||||
import { FolderDialogComponent } from './folder.dialog';
|
import { FolderDialogComponent } from './folder.dialog';
|
||||||
|
@@ -19,7 +19,7 @@ import { Observable } from 'rxjs';
|
|||||||
|
|
||||||
import { Component, Inject, OnInit, Optional, EventEmitter, Output, ViewEncapsulation } from '@angular/core';
|
import { Component, Inject, OnInit, Optional, EventEmitter, Output, ViewEncapsulation } from '@angular/core';
|
||||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
|
|
||||||
import { Node } from '@alfresco/js-api';
|
import { Node } from '@alfresco/js-api';
|
||||||
import { TranslationService } from '@alfresco/adf-core';
|
import { TranslationService } from '@alfresco/adf-core';
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { LibraryDialogComponent } from './library.dialog';
|
import { LibraryDialogComponent } from './library.dialog';
|
||||||
import { TestBed, fakeAsync, tick, flush, ComponentFixture, flushMicrotasks } from '@angular/core/testing';
|
import { TestBed, fakeAsync, tick, flush, ComponentFixture, flushMicrotasks } from '@angular/core/testing';
|
||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { MatDialogRef } from '@angular/material/dialog';
|
import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||||
import { of, throwError } from 'rxjs';
|
import { of, throwError } from 'rxjs';
|
||||||
import { delay } from 'rxjs/operators';
|
import { delay } from 'rxjs/operators';
|
||||||
|
@@ -31,7 +31,7 @@ import {
|
|||||||
UntypedFormControl,
|
UntypedFormControl,
|
||||||
AbstractControl
|
AbstractControl
|
||||||
} from '@angular/forms';
|
} from '@angular/forms';
|
||||||
import { MatDialogRef } from '@angular/material/dialog';
|
import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { QueriesApi, SiteBodyCreate, SiteEntry, SitePaging } from '@alfresco/js-api';
|
import { QueriesApi, SiteBodyCreate, SiteEntry, SitePaging } from '@alfresco/js-api';
|
||||||
import { AlfrescoApiService, NotificationService } from '@alfresco/adf-core';
|
import { AlfrescoApiService, NotificationService } from '@alfresco/adf-core';
|
||||||
import { debounceTime, finalize, mergeMap, takeUntil } from 'rxjs/operators';
|
import { debounceTime, finalize, mergeMap, takeUntil } from 'rxjs/operators';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, fakeAsync, tick, ComponentFixture } from '@angular/core/testing';
|
import { TestBed, fakeAsync, tick, ComponentFixture } from '@angular/core/testing';
|
||||||
import { MatDialogRef } from '@angular/material/dialog';
|
import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { NodeLockDialogComponent } from './node-lock.dialog';
|
import { NodeLockDialogComponent } from './node-lock.dialog';
|
||||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||||
import { addMinutes } from 'date-fns';
|
import { addMinutes } from 'date-fns';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Inject, OnInit, Optional, ViewEncapsulation } from '@angular/core';
|
import { Component, Inject, OnInit, Optional, ViewEncapsulation } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||||
import { differenceInSeconds } from 'date-fns';
|
import { differenceInSeconds } from 'date-fns';
|
||||||
import { NodeBodyLock, Node, NodeEntry, NodesApi } from '@alfresco/js-api';
|
import { NodeBodyLock, Node, NodeEntry, NodesApi } from '@alfresco/js-api';
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { Component, DebugElement, ViewChild } from '@angular/core';
|
import { Component, DebugElement, ViewChild } from '@angular/core';
|
||||||
import { AlfrescoApiService, CoreTestingModule } from '@alfresco/adf-core';
|
import { AlfrescoApiService, CoreTestingModule } from '@alfresco/adf-core';
|
||||||
import { NodeDownloadDirective } from './node-download.directive';
|
import { NodeDownloadDirective } from './node-download.directive';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Directive, Input, HostListener } from '@angular/core';
|
import { Directive, Input, HostListener } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { AlfrescoApiService, DownloadService } from '@alfresco/adf-core';
|
import { AlfrescoApiService, DownloadService } from '@alfresco/adf-core';
|
||||||
import { DownloadZipDialogComponent } from '../dialogs/download-zip/download-zip.dialog';
|
import { DownloadZipDialogComponent } from '../dialogs/download-zip/download-zip.dialog';
|
||||||
import { ContentApi, NodeEntry, VersionEntry } from '@alfresco/js-api';
|
import { ContentApi, NodeEntry, VersionEntry } from '@alfresco/js-api';
|
||||||
|
@@ -60,10 +60,14 @@ import { ShareDataTableAdapter } from '../data/share-datatable-adapter';
|
|||||||
import { DocumentListModule } from '../document-list.module';
|
import { DocumentListModule } from '../document-list.module';
|
||||||
import { ContentActionModel } from '../models/content-action.model';
|
import { ContentActionModel } from '../models/content-action.model';
|
||||||
import { DocumentLoaderNode } from '../models/document-folder.model';
|
import { DocumentLoaderNode } from '../models/document-folder.model';
|
||||||
import { CustomResourcesService } from '../services/custom-resources.service';
|
import { matIconRegistryMock } from '../../testing/mat-icon-registry-mock';
|
||||||
import { DocumentListService } from '../services/document-list.service';
|
import { domSanitizerMock } from '../../testing/dom-sanitizer-mock';
|
||||||
import { DocumentListComponent } from './document-list.component';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { FileAutoDownloadComponent } from './file-auto-download/file-auto-download.component';
|
import { FileAutoDownloadComponent } from './file-auto-download/file-auto-download.component';
|
||||||
|
import { ShareDataTableAdapter } from '../data/share-datatable-adapter';
|
||||||
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
|
import { MatLegacyProgressSpinnerHarness as MatProgressSpinnerHarness } from '@angular/material/legacy-progress-spinner/testing';
|
||||||
|
|
||||||
const mockDialog = {
|
const mockDialog = {
|
||||||
open: jasmine.createSpy('open')
|
open: jasmine.createSpy('open')
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { FileAutoDownloadComponent } from './file-auto-download.component';
|
import { FileAutoDownloadComponent } from './file-auto-download.component';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { CoreTestingModule } from '@alfresco/adf-core';
|
import { CoreTestingModule } from '@alfresco/adf-core';
|
||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Inject } from '@angular/core';
|
import { Component, Inject } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog';
|
||||||
import { NodeEntry } from '@alfresco/js-api';
|
import { NodeEntry } from '@alfresco/js-api';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -21,7 +21,7 @@ import { DocumentListService } from './document-list.service';
|
|||||||
import { NodeActionsService } from './node-actions.service';
|
import { NodeActionsService } from './node-actions.service';
|
||||||
import { ContentNodeDialogService } from '../../content-node-selector/content-node-dialog.service';
|
import { ContentNodeDialogService } from '../../content-node-selector/content-node-dialog.service';
|
||||||
import { of, throwError } from 'rxjs';
|
import { of, throwError } from 'rxjs';
|
||||||
import { MatDialogRef } from '@angular/material/dialog';
|
import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||||
import { delay } from 'rxjs/operators';
|
import { delay } from 'rxjs/operators';
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ import { Injectable, Output, EventEmitter } from '@angular/core';
|
|||||||
import { Node, NodeEntry } from '@alfresco/js-api';
|
import { Node, NodeEntry } from '@alfresco/js-api';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { AlfrescoApiService, DownloadService } from '@alfresco/adf-core';
|
import { AlfrescoApiService, DownloadService } from '@alfresco/adf-core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { ContentService } from '../../common/services/content.service';
|
import { ContentService } from '../../common/services/content.service';
|
||||||
import { NodeDownloadDirective } from '../../directives/node-download.directive';
|
import { NodeDownloadDirective } from '../../directives/node-download.directive';
|
||||||
|
|
||||||
|
@@ -0,0 +1,110 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||||
|
*
|
||||||
|
* 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 } from '@angular/core';
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
|
import { By } from '@angular/platform-browser';
|
||||||
|
import { Subject, of } from 'rxjs';
|
||||||
|
import { FolderEditDirective } from './folder-edit.directive';
|
||||||
|
import { Node } from '@alfresco/js-api';
|
||||||
|
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||||
|
import { ContentService } from '../common/services/content.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<div [adf-edit-folder]="folder" (success)="success($event)" title="edit-title"></div>'
|
||||||
|
})
|
||||||
|
class TestComponent {
|
||||||
|
folder = {};
|
||||||
|
public successParameter: Node = null;
|
||||||
|
|
||||||
|
success(node: Node) {
|
||||||
|
this.successParameter = node;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('FolderEditDirective', () => {
|
||||||
|
let fixture: ComponentFixture<TestComponent>;
|
||||||
|
let element;
|
||||||
|
let dialog: MatDialog;
|
||||||
|
let contentService: ContentService;
|
||||||
|
let dialogRefMock;
|
||||||
|
|
||||||
|
const event = {
|
||||||
|
type: 'click',
|
||||||
|
preventDefault: () => null
|
||||||
|
};
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
imports: [ContentTestingModule],
|
||||||
|
declarations: [TestComponent]
|
||||||
|
});
|
||||||
|
fixture = TestBed.createComponent(TestComponent);
|
||||||
|
element = fixture.debugElement.query(By.directive(FolderEditDirective));
|
||||||
|
dialog = TestBed.inject(MatDialog);
|
||||||
|
contentService = TestBed.inject(ContentService);
|
||||||
|
|
||||||
|
dialogRefMock = {
|
||||||
|
afterClosed: (val) => of(val),
|
||||||
|
componentInstance: {
|
||||||
|
error: new Subject<any>(),
|
||||||
|
success: new Subject<Node>()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
spyOn(dialog, 'open').and.returnValue(dialogRefMock);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not emit folderEdit event when input value is undefined', async () => {
|
||||||
|
spyOn(dialogRefMock, 'afterClosed').and.returnValue(of(null));
|
||||||
|
spyOn(contentService.folderEdit, 'next');
|
||||||
|
|
||||||
|
fixture.detectChanges();
|
||||||
|
await fixture.whenStable();
|
||||||
|
|
||||||
|
element.nativeElement.click();
|
||||||
|
expect(contentService.folderEdit.next).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should emit success event with node if the folder creation was successful', async () => {
|
||||||
|
fixture.detectChanges();
|
||||||
|
const testNode: any = {};
|
||||||
|
|
||||||
|
element.triggerEventHandler('click', event);
|
||||||
|
dialogRefMock.componentInstance.success.next(testNode);
|
||||||
|
|
||||||
|
fixture.detectChanges();
|
||||||
|
await fixture.whenStable();
|
||||||
|
expect(fixture.componentInstance.successParameter).toBe(testNode);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should open the dialog with the proper title', async () => {
|
||||||
|
fixture.detectChanges();
|
||||||
|
element.triggerEventHandler('click', event);
|
||||||
|
|
||||||
|
await fixture.whenStable();
|
||||||
|
|
||||||
|
expect(dialog.open).toHaveBeenCalledWith(jasmine.any(Function), {
|
||||||
|
data: {
|
||||||
|
folder: jasmine.any(Object),
|
||||||
|
editTitle: 'edit-title'
|
||||||
|
},
|
||||||
|
width: jasmine.any(String)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@@ -0,0 +1,92 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* eslint-disable @angular-eslint/no-input-rename */
|
||||||
|
|
||||||
|
import { Directive, ElementRef, HostListener, Input, Output, EventEmitter } from '@angular/core';
|
||||||
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
|
import { Node } from '@alfresco/js-api';
|
||||||
|
import { FolderDialogComponent } from '../dialogs/folder.dialog';
|
||||||
|
import { ContentService } from '../common/services/content.service';
|
||||||
|
|
||||||
|
const DIALOG_WIDTH: number = 400;
|
||||||
|
|
||||||
|
@Directive({
|
||||||
|
selector: '[adf-edit-folder]'
|
||||||
|
})
|
||||||
|
export class FolderEditDirective {
|
||||||
|
/** Folder node to edit. */
|
||||||
|
@Input('adf-edit-folder')
|
||||||
|
folder: Node;
|
||||||
|
|
||||||
|
/** Emitted when an error occurs (eg, a folder with same name already exists). */
|
||||||
|
@Output()
|
||||||
|
error = new EventEmitter<any>();
|
||||||
|
|
||||||
|
/** Title of folder edit dialog. */
|
||||||
|
@Input()
|
||||||
|
title: string = null;
|
||||||
|
|
||||||
|
/** Emitted when the folder has been edited successfully. */
|
||||||
|
@Output()
|
||||||
|
success = new EventEmitter<Node>();
|
||||||
|
|
||||||
|
@HostListener('click', [ '$event' ])
|
||||||
|
onClick(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
if (this.folder) {
|
||||||
|
this.openDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
public dialogRef: MatDialog,
|
||||||
|
public elementRef: ElementRef,
|
||||||
|
public content: ContentService
|
||||||
|
) {}
|
||||||
|
|
||||||
|
private get dialogConfig() {
|
||||||
|
const { folder } = this;
|
||||||
|
|
||||||
|
return {
|
||||||
|
data: {
|
||||||
|
folder,
|
||||||
|
editTitle: this.title
|
||||||
|
},
|
||||||
|
width: `${DIALOG_WIDTH}px`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private openDialog(): void {
|
||||||
|
const { dialogRef, dialogConfig, content } = this;
|
||||||
|
const dialogInstance = dialogRef.open(FolderDialogComponent, dialogConfig);
|
||||||
|
|
||||||
|
dialogInstance.componentInstance.error.subscribe((error) => {
|
||||||
|
this.error.emit(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
dialogInstance.componentInstance.success.subscribe((node: Node) => {
|
||||||
|
this.success.emit(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
dialogInstance.afterClosed().subscribe((node: Node) => {
|
||||||
|
if (node) {
|
||||||
|
content.folderEdit.next(node);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@@ -16,25 +16,26 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
|
||||||
import { MatCardModule } from '@angular/material/card';
|
import { MatLegacyCardModule as MatCardModule } from '@angular/material/legacy-card';
|
||||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox';
|
||||||
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
import { MatLegacyAutocompleteModule as MatAutocompleteModule } from '@angular/material/legacy-autocomplete';
|
||||||
import { MatChipsModule } from '@angular/material/chips';
|
import { MatLegacyChipsModule as MatChipsModule } from '@angular/material/legacy-chips';
|
||||||
import { MatRippleModule, MatOptionModule } from '@angular/material/core';
|
import { MatRippleModule } from '@angular/material/core';
|
||||||
|
import { MatLegacyOptionModule as MatOptionModule } from '@angular/material/legacy-core';
|
||||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||||
import { MatDialogModule } from '@angular/material/dialog';
|
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
|
||||||
import { MatExpansionModule } from '@angular/material/expansion';
|
import { MatExpansionModule } from '@angular/material/expansion';
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input';
|
||||||
import { MatListModule } from '@angular/material/list';
|
import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list';
|
||||||
import { MatMenuModule } from '@angular/material/menu';
|
import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu';
|
||||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar';
|
||||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
import { MatLegacyProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/legacy-progress-spinner';
|
||||||
import { MatRadioModule } from '@angular/material/radio';
|
import { MatLegacyRadioModule as MatRadioModule } from '@angular/material/legacy-radio';
|
||||||
import { MatSelectModule } from '@angular/material/select';
|
import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select';
|
||||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
import { MatLegacySlideToggleModule as MatSlideToggleModule } from '@angular/material/legacy-slide-toggle';
|
||||||
import { MatSliderModule } from '@angular/material/slider';
|
import { MatLegacySliderModule as MatSliderModule } from '@angular/material/legacy-slider';
|
||||||
import { MatTreeModule } from '@angular/material/tree';
|
import { MatTreeModule } from '@angular/material/tree';
|
||||||
import { MatBadgeModule } from '@angular/material/badge';
|
import { MatBadgeModule } from '@angular/material/badge';
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Node } from '@alfresco/js-api';
|
import { Node } from '@alfresco/js-api';
|
||||||
import { Component, EventEmitter, Inject, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
import { Component, EventEmitter, Inject, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog';
|
||||||
import { NewVersionUploaderDialogData, NewVersionUploaderData, NewVersionUploaderDataAction } from './models';
|
import { NewVersionUploaderDialogData, NewVersionUploaderData, NewVersionUploaderDataAction } from './models';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog, MatLegacyDialogConfig as MatDialogConfig } from '@angular/material/legacy-dialog';
|
||||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||||
|
|
||||||
import { NewVersionUploaderDialogComponent } from './new-version-uploader.dialog';
|
import { NewVersionUploaderDialogComponent } from './new-version-uploader.dialog';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Node, PermissionElement } from '@alfresco/js-api';
|
import { Node, PermissionElement } from '@alfresco/js-api';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
@@ -27,7 +27,7 @@ import { AddPermissionDialogData } from './add-permission-dialog-data.interface'
|
|||||||
import { fakeAuthorityResults } from '../../../mock/add-permission.component.mock';
|
import { fakeAuthorityResults } from '../../../mock/add-permission.component.mock';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatSelectHarness } from '@angular/material/select/testing';
|
import { MatLegacySelectHarness as MatSelectHarness } from '@angular/material/legacy-select/testing';
|
||||||
|
|
||||||
describe('AddPermissionDialog', () => {
|
describe('AddPermissionDialog', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Inject, ViewEncapsulation } from '@angular/core';
|
import { Component, Inject, ViewEncapsulation } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
||||||
import { NodeEntry, PermissionElement } from '@alfresco/js-api';
|
import { NodeEntry, PermissionElement } from '@alfresco/js-api';
|
||||||
import { AddPermissionDialogData } from './add-permission-dialog-data.interface';
|
import { AddPermissionDialogData } from './add-permission-dialog-data.interface';
|
||||||
import { MemberModel } from '../../models/member.model';
|
import { MemberModel } from '../../models/member.model';
|
||||||
|
@@ -23,7 +23,7 @@ import { UntypedFormControl } from '@angular/forms';
|
|||||||
import { debounceTime } from 'rxjs/operators';
|
import { debounceTime } from 'rxjs/operators';
|
||||||
import { SearchPermissionConfigurationService } from './search-config-permission.service';
|
import { SearchPermissionConfigurationService } from './search-config-permission.service';
|
||||||
import { SearchComponent } from '../../../search/components/search.component';
|
import { SearchComponent } from '../../../search/components/search.component';
|
||||||
import { MatSelectionList } from '@angular/material/list';
|
import { MatLegacySelectionList as MatSelectionList } from '@angular/material/legacy-list';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-add-permission-panel',
|
selector: 'adf-add-permission-panel',
|
||||||
|
@@ -20,8 +20,8 @@ import { PermissionContainerComponent } from './permission-container.component';
|
|||||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatSelectHarness } from '@angular/material/select/testing';
|
import { MatLegacySelectHarness as MatSelectHarness } from '@angular/material/legacy-select/testing';
|
||||||
import { MatButtonHarness } from '@angular/material/button/testing';
|
import { MatLegacyButtonHarness as MatButtonHarness } from '@angular/material/legacy-button/testing';
|
||||||
|
|
||||||
describe('PermissionContainerComponent', () => {
|
describe('PermissionContainerComponent', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
|
@@ -36,8 +36,8 @@ import { Node } from '@alfresco/js-api';
|
|||||||
import { NodesApiService } from '../../../common/services/nodes-api.service';
|
import { NodesApiService } from '../../../common/services/nodes-api.service';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatSlideToggleHarness } from '@angular/material/slide-toggle/testing';
|
import { MatLegacySlideToggleHarness as MatSlideToggleHarness } from '@angular/material/legacy-slide-toggle/testing';
|
||||||
import { MatSelectHarness } from '@angular/material/select/testing';
|
import { MatLegacySelectHarness as MatSelectHarness } from '@angular/material/legacy-select/testing';
|
||||||
|
|
||||||
describe('PermissionListComponent', () => {
|
describe('PermissionListComponent', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { NotificationService } from '@alfresco/adf-core';
|
import { NotificationService } from '@alfresco/adf-core';
|
||||||
import { Node, PermissionElement } from '@alfresco/js-api';
|
import { Node, PermissionElement } from '@alfresco/js-api';
|
||||||
import { EventEmitter, Injectable } from '@angular/core';
|
import { EventEmitter, Injectable } from '@angular/core';
|
||||||
import { MatSlideToggleChange } from '@angular/material/slide-toggle';
|
import { MatLegacySlideToggleChange as MatSlideToggleChange } from '@angular/material/legacy-slide-toggle';
|
||||||
import { BehaviorSubject, forkJoin, Observable, of, Subject } from 'rxjs';
|
import { BehaviorSubject, forkJoin, Observable, of, Subject } from 'rxjs';
|
||||||
import { finalize, map, switchMap } from 'rxjs/operators';
|
import { finalize, map, switchMap } from 'rxjs/operators';
|
||||||
import { RoleModel } from '../../models/role.model';
|
import { RoleModel } from '../../models/role.model';
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { NodePermissionDialogService } from './node-permission-dialog.service';
|
import { NodePermissionDialogService } from './node-permission-dialog.service';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { of, Subject, throwError } from 'rxjs';
|
import { of, Subject, throwError } from 'rxjs';
|
||||||
import { ContentTestingModule } from '../../testing/content.testing.module';
|
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||||
import { NodePermissionService } from './node-permission.service';
|
import { NodePermissionService } from './node-permission.service';
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Node, PermissionElement } from '@alfresco/js-api';
|
import { Node, PermissionElement } from '@alfresco/js-api';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable, Subject, throwError } from 'rxjs';
|
import { Observable, Subject, throwError } from 'rxjs';
|
||||||
import { switchMap } from 'rxjs/operators';
|
import { switchMap } from 'rxjs/operators';
|
||||||
|
@@ -22,8 +22,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { sizeOptions, stepOne, stepThree } from '../../../mock';
|
import { sizeOptions, stepOne, stepThree } from '../../../mock';
|
||||||
import { HarnessLoader, TestKey } from '@angular/cdk/testing';
|
import { HarnessLoader, TestKey } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatCheckboxHarness } from '@angular/material/checkbox/testing';
|
import { MatLegacyCheckboxHarness as MatCheckboxHarness } from '@angular/material/legacy-checkbox/testing';
|
||||||
import { MatButtonHarness } from '@angular/material/button/testing';
|
import { MatLegacyButtonHarness as MatButtonHarness } from '@angular/material/legacy-button/testing';
|
||||||
|
|
||||||
describe('SearchCheckListComponent', () => {
|
describe('SearchCheckListComponent', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
import { MatLegacyCheckboxChange as MatCheckboxChange } from '@angular/material/legacy-checkbox';
|
||||||
import { SearchWidget } from '../../models/search-widget.interface';
|
import { SearchWidget } from '../../models/search-widget.interface';
|
||||||
import { SearchWidgetSettings } from '../../models/search-widget-settings.interface';
|
import { SearchWidgetSettings } from '../../models/search-widget-settings.interface';
|
||||||
import { SearchQueryBuilderService } from '../../services/search-query-builder.service';
|
import { SearchQueryBuilderService } from '../../services/search-query-builder.service';
|
||||||
|
@@ -30,8 +30,8 @@ import {
|
|||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { ENTER } from '@angular/cdk/keycodes';
|
import { ENTER } from '@angular/cdk/keycodes';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
import { MatLegacyAutocompleteSelectedEvent as MatAutocompleteSelectedEvent } from '@angular/material/legacy-autocomplete';
|
||||||
import { MatChipInputEvent } from '@angular/material/chips';
|
import { MatLegacyChipInputEvent as MatChipInputEvent } from '@angular/material/legacy-chips';
|
||||||
import { EMPTY, Observable, Subject, timer } from 'rxjs';
|
import { EMPTY, Observable, Subject, timer } from 'rxjs';
|
||||||
import { debounce, startWith, takeUntil, tap } from 'rxjs/operators';
|
import { debounce, startWith, takeUntil, tap } from 'rxjs/operators';
|
||||||
import { AutocompleteOption } from '../../models/autocomplete-option.interface';
|
import { AutocompleteOption } from '../../models/autocomplete-option.interface';
|
||||||
|
@@ -22,7 +22,7 @@ import { SearchFacetFiltersService } from '../../services/search-facet-filters.s
|
|||||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatChipHarness, MatChipRemoveHarness } from '@angular/material/chips/testing';
|
import { MatLegacyChipHarness as MatChipHarness, MatLegacyChipRemoveHarness as MatChipRemoveHarness } from '@angular/material/legacy-chips/testing';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-test-component',
|
selector: 'adf-test-component',
|
||||||
|
@@ -32,7 +32,7 @@ import {
|
|||||||
import { NodeEntry } from '@alfresco/js-api';
|
import { NodeEntry } from '@alfresco/js-api';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { SearchComponent } from './search.component';
|
import { SearchComponent } from './search.component';
|
||||||
import { MatListItem } from '@angular/material/list';
|
import { MatLegacyListItem as MatListItem } from '@angular/material/legacy-list';
|
||||||
import { EmptySearchResultComponent } from './empty-search-result.component';
|
import { EmptySearchResultComponent } from './empty-search-result.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Component, inject, Input, ViewEncapsulation } from '@angular/core';
|
import { Component, inject, Input, ViewEncapsulation } from '@angular/core';
|
||||||
import { FacetField } from '../../models/facet-field.interface';
|
import { FacetField } from '../../models/facet-field.interface';
|
||||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
import { MatLegacyCheckboxChange as MatCheckboxChange } from '@angular/material/legacy-checkbox';
|
||||||
import { FacetFieldBucket } from '../../models/facet-field-bucket.interface';
|
import { FacetFieldBucket } from '../../models/facet-field-bucket.interface';
|
||||||
import { SearchQueryBuilderService } from '../../services/search-query-builder.service';
|
import { SearchQueryBuilderService } from '../../services/search-query-builder.service';
|
||||||
import { SearchFacetFiltersService } from '../../services/search-facet-filters.service';
|
import { SearchFacetFiltersService } from '../../services/search-facet-filters.service';
|
||||||
|
@@ -24,7 +24,7 @@ import { FacetField } from '../../../models/facet-field.interface';
|
|||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { HarnessLoader, TestKey } from '@angular/cdk/testing';
|
import { HarnessLoader, TestKey } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatChipHarness } from '@angular/material/chips/testing';
|
import { MatLegacyChipHarness as MatChipHarness } from '@angular/material/legacy-chips/testing';
|
||||||
import { MatIconHarness } from '@angular/material/icon/testing';
|
import { MatIconHarness } from '@angular/material/icon/testing';
|
||||||
|
|
||||||
describe('SearchFacetChipTabbedComponent', () => {
|
describe('SearchFacetChipTabbedComponent', () => {
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { ChangeDetectorRef, Component, ElementRef, Input, ViewChild, ViewEncapsulation } from '@angular/core';
|
import { ChangeDetectorRef, Component, ElementRef, Input, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||||
import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
||||||
import { MatMenuTrigger } from '@angular/material/menu';
|
import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu';
|
||||||
import { TabbedFacetField } from '../../../models/tabbed-facet-field.interface';
|
import { TabbedFacetField } from '../../../models/tabbed-facet-field.interface';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
|
@@ -21,9 +21,9 @@ import { ContentTestingModule } from '../../../../testing/content.testing.module
|
|||||||
import { SearchQueryBuilderService } from '../../../services/search-query-builder.service';
|
import { SearchQueryBuilderService } from '../../../services/search-query-builder.service';
|
||||||
import { SearchFilterList } from '../../../models/search-filter-list.model';
|
import { SearchFilterList } from '../../../models/search-filter-list.model';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatMenuHarness } from '@angular/material/menu/testing';
|
import { MatLegacyMenuHarness as MatMenuHarness } from '@angular/material/legacy-menu/testing';
|
||||||
import { HarnessLoader, TestKey } from '@angular/cdk/testing';
|
import { HarnessLoader, TestKey } from '@angular/cdk/testing';
|
||||||
import { MatButtonHarness } from '@angular/material/button/testing';
|
import { MatLegacyButtonHarness as MatButtonHarness } from '@angular/material/legacy-button/testing';
|
||||||
import { MatIconHarness } from '@angular/material/icon/testing';
|
import { MatIconHarness } from '@angular/material/icon/testing';
|
||||||
|
|
||||||
describe('SearchFacetChipComponent', () => {
|
describe('SearchFacetChipComponent', () => {
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { Component, ElementRef, Input, ViewChild, ViewEncapsulation } from '@angular/core';
|
import { Component, ElementRef, Input, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||||
import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
||||||
import { FacetField } from '../../../models/facet-field.interface';
|
import { FacetField } from '../../../models/facet-field.interface';
|
||||||
import { MatMenuTrigger } from '@angular/material/menu';
|
import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu';
|
||||||
import { SearchFacetFieldComponent } from '../../search-facet-field/search-facet-field.component';
|
import { SearchFacetFieldComponent } from '../../search-facet-field/search-facet-field.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -19,12 +19,12 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { SearchWidgetChipComponent } from './search-widget-chip.component';
|
import { SearchWidgetChipComponent } from './search-widget-chip.component';
|
||||||
import { simpleCategories } from '../../../../mock';
|
import { simpleCategories } from '../../../../mock';
|
||||||
import { ContentTestingModule } from '../../../../testing/content.testing.module';
|
import { ContentTestingModule } from '../../../../testing/content.testing.module';
|
||||||
import { MatMenuModule } from '@angular/material/menu';
|
import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { SearchQueryBuilderService } from '../../../services/search-query-builder.service';
|
import { SearchQueryBuilderService } from '../../../services/search-query-builder.service';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatChipHarness } from '@angular/material/chips/testing';
|
import { MatLegacyChipHarness as MatChipHarness } from '@angular/material/legacy-chips/testing';
|
||||||
import { MatIconHarness } from '@angular/material/icon/testing';
|
import { MatIconHarness } from '@angular/material/icon/testing';
|
||||||
|
|
||||||
describe('SearchWidgetChipComponent', () => {
|
describe('SearchWidgetChipComponent', () => {
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { Component, ElementRef, Input, ViewChild, ViewEncapsulation } from '@angular/core';
|
import { Component, ElementRef, Input, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||||
import { SearchCategory } from '../../../models/search-category.interface';
|
import { SearchCategory } from '../../../models/search-category.interface';
|
||||||
import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
||||||
import { MatMenuTrigger } from '@angular/material/menu';
|
import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu';
|
||||||
import { SearchWidgetContainerComponent } from '../../search-widget-container/search-widget-container.component';
|
import { SearchWidgetContainerComponent } from '../../search-widget-container/search-widget-container.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -22,7 +22,7 @@ import { SearchWidgetContainerComponent } from '../search-widget-container/searc
|
|||||||
import { SearchHeaderQueryBuilderService } from '../../services/search-header-query-builder.service';
|
import { SearchHeaderQueryBuilderService } from '../../services/search-header-query-builder.service';
|
||||||
import { SearchCategory } from '../../models/search-category.interface';
|
import { SearchCategory } from '../../models/search-category.interface';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { MatMenuTrigger } from '@angular/material/menu';
|
import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu';
|
||||||
import { FilterSearch } from '../../models/filter-search.interface';
|
import { FilterSearch } from '../../models/filter-search.interface';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -42,9 +42,9 @@ import { SearchFacetFieldComponent } from '../search-facet-field/search-facet-fi
|
|||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatExpansionPanelHarness } from '@angular/material/expansion/testing';
|
import { MatExpansionPanelHarness } from '@angular/material/expansion/testing';
|
||||||
import { MatCheckboxHarness } from '@angular/material/checkbox/testing';
|
import { MatLegacyCheckboxHarness as MatCheckboxHarness } from '@angular/material/legacy-checkbox/testing';
|
||||||
import { MatButtonHarness } from '@angular/material/button/testing';
|
import { MatLegacyButtonHarness as MatButtonHarness } from '@angular/material/legacy-button/testing';
|
||||||
import { MatInputHarness } from '@angular/material/input/testing';
|
import { MatLegacyInputHarness as MatInputHarness } from '@angular/material/legacy-input/testing';
|
||||||
|
|
||||||
describe('SearchFilterComponent', () => {
|
describe('SearchFilterComponent', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
|
@@ -23,8 +23,8 @@ import { SearchForm } from '../../models/search-form.interface';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatMenuHarness } from '@angular/material/menu/testing';
|
import { MatLegacyMenuHarness as MatMenuHarness } from '@angular/material/legacy-menu/testing';
|
||||||
import { MatButtonHarness } from '@angular/material/button/testing';
|
import { MatLegacyButtonHarness as MatButtonHarness } from '@angular/material/legacy-button/testing';
|
||||||
|
|
||||||
describe('SearchFormComponent', () => {
|
describe('SearchFormComponent', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
|
@@ -22,7 +22,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { sizeOptions, stepOne, stepThree } from '../../../mock';
|
import { sizeOptions, stepOne, stepThree } from '../../../mock';
|
||||||
import { HarnessLoader, TestKey } from '@angular/cdk/testing';
|
import { HarnessLoader, TestKey } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatCheckboxHarness } from '@angular/material/checkbox/testing';
|
import { MatLegacyCheckboxHarness as MatCheckboxHarness } from '@angular/material/legacy-checkbox/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
|
|
||||||
describe('SearchCheckListComponent', () => {
|
describe('SearchCheckListComponent', () => {
|
||||||
|
@@ -19,7 +19,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { SearchPropertiesComponent } from './search-properties.component';
|
import { SearchPropertiesComponent } from './search-properties.component';
|
||||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { MatOption } from '@angular/material/core';
|
import { MatLegacyOption as MatOption } from '@angular/material/legacy-core';
|
||||||
import { SearchChipAutocompleteInputComponent, SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
import { SearchChipAutocompleteInputComponent, SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
||||||
import { FileSizeUnit } from './file-size-unit.enum';
|
import { FileSizeUnit } from './file-size-unit.enum';
|
||||||
import { FileSizeOperator } from './file-size-operator.enum';
|
import { FileSizeOperator } from './file-size-operator.enum';
|
||||||
|
@@ -21,7 +21,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatRadioButtonHarness, MatRadioGroupHarness } from '@angular/material/radio/testing';
|
import { MatLegacyRadioButtonHarness as MatRadioButtonHarness, MatLegacyRadioGroupHarness as MatRadioGroupHarness } from '@angular/material/legacy-radio/testing';
|
||||||
|
|
||||||
describe('SearchRadioComponent', () => {
|
describe('SearchRadioComponent', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { MatRadioChange } from '@angular/material/radio';
|
import { MatLegacyRadioChange as MatRadioChange } from '@angular/material/legacy-radio';
|
||||||
|
|
||||||
import { SearchWidget } from '../../models/search-widget.interface';
|
import { SearchWidget } from '../../models/search-widget.interface';
|
||||||
import { SearchWidgetSettings } from '../../models/search-widget-settings.interface';
|
import { SearchWidgetSettings } from '../../models/search-widget-settings.interface';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatSliderChange } from '@angular/material/slider';
|
import { MatLegacySliderChange as MatSliderChange } from '@angular/material/legacy-slider';
|
||||||
import { SearchSliderComponent } from './search-slider.component';
|
import { SearchSliderComponent } from './search-slider.component';
|
||||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
@@ -19,7 +19,7 @@ import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
|
|||||||
import { SearchWidget } from '../../models/search-widget.interface';
|
import { SearchWidget } from '../../models/search-widget.interface';
|
||||||
import { SearchWidgetSettings } from '../../models/search-widget-settings.interface';
|
import { SearchWidgetSettings } from '../../models/search-widget-settings.interface';
|
||||||
import { SearchQueryBuilderService } from '../../services/search-query-builder.service';
|
import { SearchQueryBuilderService } from '../../services/search-query-builder.service';
|
||||||
import { MatSliderChange } from '@angular/material/slider';
|
import { MatLegacySliderChange as MatSliderChange } from '@angular/material/legacy-slider';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -20,8 +20,8 @@ import { ContentTestingModule } from '../../../testing/content.testing.module';
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatInputHarness } from '@angular/material/input/testing';
|
import { MatLegacyInputHarness as MatInputHarness } from '@angular/material/legacy-input/testing';
|
||||||
import { MatButtonHarness } from '@angular/material/button/testing';
|
import { MatLegacyButtonHarness as MatButtonHarness } from '@angular/material/legacy-button/testing';
|
||||||
|
|
||||||
describe('SearchTextComponent', () => {
|
describe('SearchTextComponent', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
|
@@ -30,7 +30,7 @@ import { ContentTestingModule } from '../testing/content.testing.module';
|
|||||||
import { SitesService } from '../common/services/sites.service';
|
import { SitesService } from '../common/services/sites.service';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatSelectHarness } from '@angular/material/select/testing';
|
import { MatLegacySelectHarness as MatSelectHarness } from '@angular/material/legacy-select/testing';
|
||||||
import { SiteEntry } from '@alfresco/js-api';
|
import { SiteEntry } from '@alfresco/js-api';
|
||||||
|
|
||||||
const customSiteList = {
|
const customSiteList = {
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
||||||
import { InfiniteSelectScrollDirective, AuthenticationService } from '@alfresco/adf-core';
|
import { InfiniteSelectScrollDirective, AuthenticationService } from '@alfresco/adf-core';
|
||||||
import { SitePaging, SiteEntry, Site } from '@alfresco/js-api';
|
import { SitePaging, SiteEntry, Site } from '@alfresco/js-api';
|
||||||
import { MatSelectChange } from '@angular/material/select';
|
import { MatLegacySelectChange as MatSelectChange } from '@angular/material/legacy-select';
|
||||||
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { SitesService } from '../common/services/sites.service';
|
import { SitesService } from '../common/services/sites.service';
|
||||||
|
@@ -24,7 +24,7 @@ import { MatIconModule } from '@angular/material/icon';
|
|||||||
import { MatError, MatFormFieldModule } from '@angular/material/form-field';
|
import { MatError, MatFormFieldModule } from '@angular/material/form-field';
|
||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatInputModule } from '@angular/material/input';
|
||||||
import { ReactiveFormsModule } from '@angular/forms';
|
import { ReactiveFormsModule } from '@angular/forms';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
|
||||||
import { ContentDirectiveModule, TagsCreatorMode, TagService } from '@alfresco/adf-content-services';
|
import { ContentDirectiveModule, TagsCreatorMode, TagService } from '@alfresco/adf-content-services';
|
||||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||||
import { EMPTY, of, throwError } from 'rxjs';
|
import { EMPTY, of, throwError } from 'rxjs';
|
||||||
|
@@ -34,7 +34,7 @@ import { TreeService } from '../services/tree.service';
|
|||||||
import { PaginationModel, UserPreferencesService } from '@alfresco/adf-core';
|
import { PaginationModel, UserPreferencesService } from '@alfresco/adf-core';
|
||||||
import { SelectionChange, SelectionModel } from '@angular/cdk/collections';
|
import { SelectionChange, SelectionModel } from '@angular/cdk/collections';
|
||||||
import { TreeResponse } from '../models/tree-response.interface';
|
import { TreeResponse } from '../models/tree-response.interface';
|
||||||
import { MatCheckbox } from '@angular/material/checkbox';
|
import { MatLegacyCheckbox as MatCheckbox } from '@angular/material/legacy-checkbox';
|
||||||
import { TreeContextMenuResult } from '../models/tree-context-menu-result.interface';
|
import { TreeContextMenuResult } from '../models/tree-context-menu-result.interface';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ import { SpyLocation } from '@angular/common/testing';
|
|||||||
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { AppExtensionService, ViewerExtensionRef } from '@alfresco/adf-extensions';
|
import { AppExtensionService, ViewerExtensionRef } from '@alfresco/adf-extensions';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { ContentInfo, Node, NodeEntry, VersionEntry } from '@alfresco/js-api';
|
import { ContentInfo, Node, NodeEntry, VersionEntry } from '@alfresco/js-api';
|
||||||
import { AlfrescoViewerComponent, NodeActionsService, RenditionService } from '@alfresco/adf-content-services';
|
import { AlfrescoViewerComponent, NodeActionsService, RenditionService } from '@alfresco/adf-content-services';
|
||||||
|
@@ -44,7 +44,7 @@ import {
|
|||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { ContentApi, Node, NodeEntry, NodesApi, RenditionEntry, SharedlinksApi, Version, VersionEntry, VersionsApi } from '@alfresco/js-api';
|
import { ContentApi, Node, NodeEntry, NodesApi, RenditionEntry, SharedlinksApi, Version, VersionEntry, VersionsApi } from '@alfresco/js-api';
|
||||||
import { RenditionService } from '../../common/services/rendition.service';
|
import { RenditionService } from '../../common/services/rendition.service';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { filter, takeUntil } from 'rxjs/operators';
|
import { filter, takeUntil } from 'rxjs/operators';
|
||||||
import { ContentService } from '../../common/services/content.service';
|
import { ContentService } from '../../common/services/content.service';
|
||||||
import { NodesApiService } from '../../common/services/nodes-api.service';
|
import { NodesApiService } from '../../common/services/nodes-api.service';
|
||||||
|
@@ -16,8 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Meta, moduleMetadata, Story } from '@storybook/angular';
|
import { Meta, moduleMetadata, Story } from '@storybook/angular';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
|
||||||
import { MatMenuModule } from '@angular/material/menu';
|
import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu';
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { BreadcrumbComponent } from '../components/breadcrumb/breadcrumb.component';
|
import { BreadcrumbComponent } from '../components/breadcrumb/breadcrumb.component';
|
||||||
import { BreadcrumbItemComponent } from '../components/breadcrumb-item/breadcrumb-item.component';
|
import { BreadcrumbItemComponent } from '../components/breadcrumb-item/breadcrumb-item.component';
|
||||||
|
@@ -17,9 +17,9 @@
|
|||||||
|
|
||||||
import { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, EventEmitter, Input, OnChanges, Output, QueryList, SimpleChanges, TemplateRef, ViewChildren } from '@angular/core';
|
import { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, EventEmitter, Input, OnChanges, Output, QueryList, SimpleChanges, TemplateRef, ViewChildren } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip';
|
||||||
import { map, startWith } from 'rxjs/operators';
|
import { map, startWith } from 'rxjs/operators';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
@import '../variables/font-family';
|
@import '../variables/font-family';
|
||||||
|
|
||||||
@function get-mat-typography($base-font-size, $font-family) {
|
@function get-mat-typography($base-font-size, $font-family) {
|
||||||
$custom-typography: mat.define-typography-config(
|
$custom-typography: mat.define-legacy-typography-configmat.define-legacy-typography-config(
|
||||||
$font-family: $default-font-family,
|
$font-family: $default-font-family,
|
||||||
$display-4: mat.define-typography-level(112px, 112px, 300),
|
$display-4: mat.define-typography-level(112px, 112px, 300),
|
||||||
$display-3: mat.define-typography-level(56px, 56px, 400),
|
$display-3: mat.define-typography-level(56px, 56px, 400),
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
@if $base-font-size {
|
@if $base-font-size {
|
||||||
$custom-typography: mat.define-typography-config(
|
$custom-typography: mat.define-legacy-typography-configmat.define-legacy-typography-config(
|
||||||
$display-4: mat.define-typography-level(8rem, 8rem, 300),
|
$display-4: mat.define-typography-level(8rem, 8rem, 300),
|
||||||
$display-3: mat.define-typography-level(4rem, 4rem, 400),
|
$display-3: mat.define-typography-level(4rem, 4rem, 400),
|
||||||
$display-2: mat.define-typography-level(3.21rem, 3.21rem, 400),
|
$display-2: mat.define-typography-level(3.21rem, 3.21rem, 400),
|
||||||
|
@@ -19,7 +19,7 @@ import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanAc
|
|||||||
import { AuthenticationService } from '../services/authentication.service';
|
import { AuthenticationService } from '../services/authentication.service';
|
||||||
import { AppConfigService, AppConfigValues } from '../../app-config/app-config.service';
|
import { AppConfigService, AppConfigValues } from '../../app-config/app-config.service';
|
||||||
import { OauthConfigModel } from '../models/oauth-config.model';
|
import { OauthConfigModel } from '../models/oauth-config.model';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { StorageService } from '../../common/services/storage.service';
|
import { StorageService } from '../../common/services/storage.service';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
||||||
|
@@ -20,7 +20,7 @@ import { ActivatedRouteSnapshot, Router, UrlTree } from '@angular/router';
|
|||||||
import { AppConfigService } from '../../app-config/app-config.service';
|
import { AppConfigService } from '../../app-config/app-config.service';
|
||||||
import { AuthenticationService } from '../services/authentication.service';
|
import { AuthenticationService } from '../services/authentication.service';
|
||||||
import { AuthGuardBase } from './auth-guard-base';
|
import { AuthGuardBase } from './auth-guard-base';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { StorageService } from '../../common/services/storage.service';
|
import { StorageService } from '../../common/services/storage.service';
|
||||||
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
||||||
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
||||||
|
@@ -20,7 +20,7 @@ import { ActivatedRouteSnapshot, Router, UrlTree } from '@angular/router';
|
|||||||
import { AuthenticationService } from '../services/authentication.service';
|
import { AuthenticationService } from '../services/authentication.service';
|
||||||
import { AppConfigService } from '../../app-config/app-config.service';
|
import { AppConfigService } from '../../app-config/app-config.service';
|
||||||
import { AuthGuardBase } from './auth-guard-base';
|
import { AuthGuardBase } from './auth-guard-base';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { StorageService } from '../../common/services/storage.service';
|
import { StorageService } from '../../common/services/storage.service';
|
||||||
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
||||||
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router';
|
import { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||||
import { UserAccessService } from '../services/user-access.service';
|
import { UserAccessService } from '../services/user-access.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user