mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1968] [IE11] The login page is not loading and import fix (#2679)
* fix viewer script export insights and diagram remove requires svg fix new data adapter path dist working with diagrams commented out change use of minimatch fix unused import remove unused component fix test new import moment es6 and throw rxjs fix import analytics test fix imports rxjs new pacakging * fix after rebase * fix test upload services * exclude temporarily button event test * restore commented demo shell files * fix process spy
This commit is contained in:
@@ -30,7 +30,6 @@ describe('Breadcrumb', () => {
|
||||
|
||||
let component: BreadcrumbComponent;
|
||||
let fixture: ComponentFixture<BreadcrumbComponent>;
|
||||
let element: HTMLElement;
|
||||
let documentList: DocumentListComponent;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -55,7 +54,6 @@ describe('Breadcrumb', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BreadcrumbComponent);
|
||||
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
|
||||
documentList = TestBed.createComponent<DocumentListComponent>(DocumentListComponent).componentInstance;
|
||||
|
@@ -28,7 +28,6 @@ describe('DropdownBreadcrumb', () => {
|
||||
|
||||
let component: DropdownBreadcrumbComponent;
|
||||
let fixture: ComponentFixture<DropdownBreadcrumbComponent>;
|
||||
let element: HTMLElement;
|
||||
let documentList: DocumentListComponent;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -52,7 +51,6 @@ describe('DropdownBreadcrumb', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DropdownBreadcrumbComponent);
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
|
||||
documentList = TestBed.createComponent<DocumentListComponent>(DocumentListComponent).componentInstance;
|
||||
|
@@ -17,5 +17,3 @@
|
||||
|
||||
export * from './breadcrumb.component';
|
||||
export * from './dropdown-breadcrumb.component';
|
||||
|
||||
export * from './breadcrumb.module';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { CardViewItem, CardViewUpdateService, FileSizePipe, NodesApiService } from '@alfresco/adf-core';
|
||||
import { ContentMetadataService } from './content-metadata.service';
|
||||
|
||||
|
@@ -17,5 +17,3 @@
|
||||
|
||||
export * from './content-metadata.component';
|
||||
export * from './content-metadata.service';
|
||||
|
||||
export * from './content-metadata.module';
|
||||
|
@@ -0,0 +1,29 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { EventEmitter } from '@angular/core';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
|
||||
export interface ContentNodeSelectorComponentData {
|
||||
title: string;
|
||||
currentFolderId?: string;
|
||||
dropdownHideMyFiles?: boolean;
|
||||
dropdownSiteList?: any[];
|
||||
rowFilter?: any;
|
||||
imageResolver?: any;
|
||||
select: EventEmitter<MinimalNodeEntryEntity[]>;
|
||||
}
|
@@ -15,14 +15,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, DebugElement, EventEmitter } from '@angular/core';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, EventEmitter } from '@angular/core';
|
||||
import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { AlfrescoApiService, ContentService, TranslationService, SearchService, SiteModel, SitesApiService, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { DataTableModule } from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { EmptyFolderContentDirective, DocumentListComponent, DocumentListService } from '../document-list';
|
||||
import { DropdownSitesComponent } from '../site-dropdown';
|
||||
@@ -50,13 +50,11 @@ const ONE_FOLDER_RESULT = {
|
||||
describe('ContentNodeSelectorComponent', () => {
|
||||
let component: ContentNodeSelectorComponent;
|
||||
let fixture: ComponentFixture<ContentNodeSelectorComponent>;
|
||||
let element: DebugElement;
|
||||
let data: any;
|
||||
let searchService: SearchService;
|
||||
let searchSpy: jasmine.Spy;
|
||||
|
||||
let _resolve: Function;
|
||||
let _reject: Function;
|
||||
|
||||
function typeToSearchBox(searchTerm = 'string-to-search') {
|
||||
let searchInput = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-input"]'));
|
||||
@@ -119,7 +117,6 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ContentNodeSelectorComponent);
|
||||
element = fixture.debugElement;
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
@@ -198,15 +195,13 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ContentNodeSelectorComponent);
|
||||
element = fixture.debugElement;
|
||||
component = fixture.componentInstance;
|
||||
|
||||
searchService = TestBed.get(SearchService);
|
||||
searchSpy = spyOn(searchService, 'getQueryNodesPromise').and.callFake(() => {
|
||||
return new Promise((resolve, reject) => {
|
||||
_resolve = resolve;
|
||||
_reject = reject;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -23,18 +23,9 @@ import { DocumentListComponent, PaginationStrategy } from '../document-list/com
|
||||
import { RowFilter } from '../document-list/data/row-filter.model';
|
||||
import { ImageResolver } from '../document-list/data/image-resolver.model';
|
||||
|
||||
import { ContentNodeSelectorComponentData } from './content-node-selector.component-data.interface';
|
||||
import { ContentNodeSelectorService } from './content-node-selector.service';
|
||||
|
||||
export interface ContentNodeSelectorComponentData {
|
||||
title: string;
|
||||
currentFolderId?: string;
|
||||
dropdownHideMyFiles?: boolean;
|
||||
dropdownSiteList?: any[];
|
||||
rowFilter?: RowFilter;
|
||||
imageResolver?: ImageResolver;
|
||||
select: EventEmitter<MinimalNodeEntryEntity[]>;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'adf-content-node-selector',
|
||||
styleUrls: ['./content-node-selector.component.scss'],
|
||||
|
@@ -22,10 +22,10 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { ContentNodeSelectorComponent } from './content-node-selector.component';
|
||||
import { ContentNodeSelectorService } from './content-node-selector.service';
|
||||
import { SitesDropdownModule } from '../site-dropdown';
|
||||
import { BreadcrumbModule } from '../breadcrumb';
|
||||
import { SitesDropdownModule } from '../site-dropdown/sites-dropdown.module';
|
||||
import { BreadcrumbModule } from '../breadcrumb/breadcrumb.module';
|
||||
import { PaginationModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { DocumentListModule } from '../document-list';
|
||||
import { DocumentListModule } from '../document-list/document-list.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { SearchOptions, SearchService } from '@alfresco/adf-core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NodePaging } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* Internal service used by ContentNodeSelector component.
|
||||
|
@@ -17,5 +17,3 @@
|
||||
|
||||
export * from './content-node-selector.component';
|
||||
export * from './content-node-selector.service';
|
||||
|
||||
export * from './content-node-selector.module';
|
||||
|
@@ -23,19 +23,19 @@ import { CoreModule, TRANSLATION_PROVIDER } from '@alfresco/adf-core';
|
||||
|
||||
import { MaterialModule } from './material.module';
|
||||
|
||||
import { SocialModule } from './social';
|
||||
import { TagModule } from './tag';
|
||||
import { WebScriptModule } from './webscript';
|
||||
import { DocumentListModule } from './document-list';
|
||||
import { UploadModule } from './upload';
|
||||
import { SearchModule } from './search';
|
||||
import { SitesDropdownModule } from './site-dropdown';
|
||||
import { BreadcrumbModule } from './breadcrumb';
|
||||
import { VersionManagerModule } from './version-manager';
|
||||
import { ContentNodeSelectorModule } from './content-node-selector';
|
||||
import { DialogModule } from './dialogs';
|
||||
import { DirectiveModule } from './directive';
|
||||
import { ContentMetadataModule } from './content-metadata';
|
||||
import { SocialModule } from './social/social.module';
|
||||
import { TagModule } from './tag/tag.module';
|
||||
import { WebScriptModule } from './webscript/webscript.module';
|
||||
import { DocumentListModule } from './document-list/document-list.module';
|
||||
import { UploadModule } from './upload/upload.module';
|
||||
import { SearchModule } from './search/search.module';
|
||||
import { SitesDropdownModule } from './site-dropdown/sites-dropdown.module';
|
||||
import { BreadcrumbModule } from './breadcrumb/breadcrumb.module';
|
||||
import { VersionManagerModule } from './version-manager/version-manager.module';
|
||||
import { ContentNodeSelectorModule } from './content-node-selector/content-node-selector.module';
|
||||
import { DialogModule } from './dialogs/dialog.module';
|
||||
import { FolderDirectiveModule } from './folder-directive/folder-directive.module';
|
||||
import { ContentMetadataModule } from './content-metadata/content-metadata.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -57,7 +57,7 @@ import { ContentMetadataModule } from './content-metadata';
|
||||
ContentNodeSelectorModule,
|
||||
ContentMetadataModule,
|
||||
DialogModule,
|
||||
DirectiveModule
|
||||
FolderDirectiveModule
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
@@ -83,7 +83,8 @@ import { ContentMetadataModule } from './content-metadata';
|
||||
ContentNodeSelectorModule,
|
||||
ContentMetadataModule,
|
||||
DialogModule,
|
||||
DirectiveModule
|
||||
FolderDirectiveModule,
|
||||
MaterialModule
|
||||
]
|
||||
})
|
||||
export class ContentModule {
|
||||
|
@@ -21,7 +21,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatDialogRef } from '@angular/material';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { NodesApiService, NotificationService, TranslationService } from '@alfresco/adf-core';
|
||||
import { FolderDialogComponent } from './folder.dialog';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { Component, Inject, OnInit, Optional } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
|
@@ -17,5 +17,3 @@
|
||||
|
||||
export * from './download-zip.dialog';
|
||||
export * from './folder.dialog';
|
||||
|
||||
export * from './dialog.module';
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { EventEmitter } from '@angular/core';
|
||||
import { async, TestBed } from '@angular/core/testing';
|
||||
import { ContentService, TranslationService, NotificationService } from '@alfresco/adf-core';
|
||||
import { ContentService } from '@alfresco/adf-core';
|
||||
import { DataTableModule } from '@alfresco/adf-core';
|
||||
import { MaterialModule } from '../../../material.module';
|
||||
|
||||
@@ -40,8 +40,6 @@ describe('ContentAction', () => {
|
||||
let folderActions: FolderActionsService;
|
||||
|
||||
let contentService: ContentService;
|
||||
let translateService: TranslationService;
|
||||
let notificationService: NotificationService;
|
||||
let nodeActionsService: NodeActionsService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -64,9 +62,7 @@ describe('ContentAction', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
contentService = TestBed.get(ContentService);
|
||||
translateService = <TranslationService> { addTranslationFolder: () => {}};
|
||||
nodeActionsService = new NodeActionsService(null, null, null);
|
||||
notificationService = new NotificationService(null);
|
||||
documentActions = new DocumentActionsService(nodeActionsService);
|
||||
folderActions = new FolderActionsService(nodeActionsService, null, contentService);
|
||||
|
||||
|
@@ -20,7 +20,8 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AlfrescoApiService, TranslationService } from '@alfresco/adf-core';
|
||||
import { DataColumn, DataTableComponent } from '@alfresco/adf-core';
|
||||
import { DataTableModule } from '@alfresco/adf-core';
|
||||
import { Observable, Subject } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { FileNode, FolderNode } from '../../mock';
|
||||
import {
|
||||
fakeNodeAnswerWithEntries,
|
||||
|
@@ -36,10 +36,9 @@ import {
|
||||
PersonEntry,
|
||||
SitePaging
|
||||
} from 'alfresco-js-api';
|
||||
import { Observable, Subject } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { presetsDefaultModel } from '../models/preset.model';
|
||||
import { ImageResolver } from './../data/image-resolver.model';
|
||||
import { RowFilter } from './../data/row-filter.model';
|
||||
import { ShareDataRow } from './../data/share-data-row.model';
|
||||
import { ShareDataTableAdapter } from './../data/share-datatable-adapter';
|
||||
|
||||
@@ -48,8 +47,6 @@ import { PermissionStyleModel } from './../models/permissions-style.model';
|
||||
import { DocumentListService } from './../services/document-list.service';
|
||||
import { NodeEntityEvent, NodeEntryEvent } from './node.event';
|
||||
|
||||
declare var require: any;
|
||||
|
||||
export enum PaginationStrategy {
|
||||
Finite,
|
||||
Infinite
|
||||
@@ -100,7 +97,7 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni
|
||||
contextMenuActions: boolean = false;
|
||||
|
||||
@Input()
|
||||
emptyFolderImageUrl: string = require('../../assets/images/empty_doc_lib.svg');
|
||||
emptyFolderImageUrl: string = './assets/images/empty_doc_lib.svg';
|
||||
|
||||
@Input()
|
||||
allowDropFiles: boolean = false;
|
||||
@@ -118,10 +115,10 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni
|
||||
loading: boolean = false;
|
||||
|
||||
@Input()
|
||||
rowFilter: RowFilter | null = null;
|
||||
rowFilter: any | null = null;
|
||||
|
||||
@Input()
|
||||
imageResolver: ImageResolver | null = null;
|
||||
imageResolver: any | null = null;
|
||||
|
||||
// The identifier of a node. You can also use one of these well-known aliases: -my- | -shared- | -root-
|
||||
@Input()
|
||||
|
@@ -19,6 +19,11 @@ import { BaseEvent } from '@alfresco/adf-core';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
|
||||
export class NodeEntityEvent extends BaseEvent<MinimalNodeEntity> {
|
||||
|
||||
value: MinimalNodeEntity;
|
||||
|
||||
defaultPrevented: boolean;
|
||||
|
||||
constructor(entity: MinimalNodeEntity) {
|
||||
super();
|
||||
this.value = entity;
|
||||
@@ -26,6 +31,11 @@ export class NodeEntityEvent extends BaseEvent<MinimalNodeEntity> {
|
||||
}
|
||||
|
||||
export class NodeEntryEvent extends BaseEvent<MinimalNodeEntryEntity> {
|
||||
|
||||
value: MinimalNodeEntryEntity;
|
||||
|
||||
defaultPrevented: boolean;
|
||||
|
||||
constructor(entity: MinimalNodeEntryEntity) {
|
||||
super();
|
||||
this.value = entity;
|
||||
|
@@ -21,8 +21,6 @@ import { DatePipe } from '@angular/common';
|
||||
import { NodePaging } from 'alfresco-js-api';
|
||||
import { PermissionStyleModel } from './../models/permissions-style.model';
|
||||
import { DocumentListService } from './../services/document-list.service';
|
||||
import { ImageResolver } from './image-resolver.model';
|
||||
import { RowFilter } from './row-filter.model';
|
||||
import { ShareDataRow } from './share-data-row.model';
|
||||
|
||||
export class ShareDataTableAdapter implements DataTableAdapter {
|
||||
@@ -33,10 +31,9 @@ export class ShareDataTableAdapter implements DataTableAdapter {
|
||||
private sorting: DataSorting;
|
||||
private rows: DataRow[];
|
||||
private columns: DataColumn[];
|
||||
private page: NodePaging;
|
||||
|
||||
private filter: RowFilter;
|
||||
private imageResolver: ImageResolver;
|
||||
private filter: any;
|
||||
private imageResolver: any;
|
||||
|
||||
thumbnails: boolean = false;
|
||||
permissionsStyle: PermissionStyleModel[];
|
||||
@@ -169,11 +166,11 @@ export class ShareDataTableAdapter implements DataTableAdapter {
|
||||
this.setSorting(sorting);
|
||||
}
|
||||
|
||||
setFilter(filter: RowFilter) {
|
||||
setFilter(filter: any) {
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
setImageResolver(resolver: ImageResolver) {
|
||||
setImageResolver(resolver: any) {
|
||||
this.imageResolver = resolver;
|
||||
}
|
||||
|
||||
@@ -213,8 +210,6 @@ export class ShareDataTableAdapter implements DataTableAdapter {
|
||||
}
|
||||
|
||||
public loadPage(page: NodePaging, merge: boolean = false) {
|
||||
this.page = page;
|
||||
|
||||
let rows = [];
|
||||
|
||||
if (page && page.list) {
|
||||
|
@@ -22,7 +22,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
import { DataTableModule, PaginationModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { UploadModule } from '../upload';
|
||||
import { UploadModule } from '../upload/upload.module';
|
||||
|
||||
import { ContentActionListComponent } from './components/content-action/content-action-list.component';
|
||||
import { ContentActionComponent } from './components/content-action/content-action.component';
|
||||
|
@@ -34,7 +34,6 @@ export let presetsDefaultModel = {
|
||||
key: 'path',
|
||||
type: 'location',
|
||||
title: 'ADF-DOCUMENT-LIST.LAYOUT.LOCATION',
|
||||
format: this.locationFormat,
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
@@ -117,7 +116,6 @@ export let presetsDefaultModel = {
|
||||
key: 'path',
|
||||
type: 'location',
|
||||
title: 'ADF-DOCUMENT-LIST.LAYOUT.LOCATION',
|
||||
format: this.locationFormat,
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
@@ -159,7 +157,6 @@ export let presetsDefaultModel = {
|
||||
type: 'location',
|
||||
title: 'ADF-DOCUMENT-LIST.LAYOUT.LOCATION',
|
||||
cssClass: 'ellipsis-cell',
|
||||
format: this.locationFormat,
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
@@ -195,7 +192,6 @@ export let presetsDefaultModel = {
|
||||
type: 'location',
|
||||
title: 'ADF-DOCUMENT-LIST.LAYOUT.LOCATION',
|
||||
cssClass: 'ellipsis-cell',
|
||||
format: this.locationFormat,
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
|
@@ -41,5 +41,3 @@ export * from './models/content-action.model';
|
||||
export * from './models/document-library.model';
|
||||
export * from './models/permissions.model';
|
||||
export * from './models/permissions-style.model';
|
||||
|
||||
export * from './document-list.module';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ContentService, TranslationService, NotificationService } from '@alfresco/adf-core';
|
||||
import { ContentService } from '@alfresco/adf-core';
|
||||
import { FileNode, FolderNode, DocumentListServiceMock } from '../../mock';
|
||||
import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { DocumentActionsService } from './document-actions.service';
|
||||
@@ -27,16 +27,12 @@ describe('DocumentActionsService', () => {
|
||||
let service: DocumentActionsService;
|
||||
let documentListService: DocumentListService;
|
||||
let contentService: ContentService;
|
||||
let translateService: TranslationService;
|
||||
let notificationService: NotificationService;
|
||||
let nodeActionsService: NodeActionsService;
|
||||
|
||||
beforeEach(() => {
|
||||
documentListService = new DocumentListServiceMock();
|
||||
contentService = new ContentService(null, null, null, null);
|
||||
translateService = <TranslationService> { addTranslationFolder: () => {}};
|
||||
nodeActionsService = new NodeActionsService(null, null, null);
|
||||
notificationService = new NotificationService(null);
|
||||
service = new DocumentActionsService(nodeActionsService, documentListService, contentService);
|
||||
});
|
||||
|
||||
|
@@ -19,11 +19,12 @@ import { ContentService } from '@alfresco/adf-core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Rx';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { PermissionModel } from '../models/permissions.model';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
import { NodeActionsService } from './node-actions.service';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class DocumentActionsService {
|
||||
|
@@ -19,7 +19,8 @@ import { AlfrescoApiService, AuthenticationService, ContentService, LogService,
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Response } from '@angular/http';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class DocumentListService {
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { async, TestBed } from '@angular/core/testing';
|
||||
import { TranslationService, AppConfigService, NotificationService } from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { FileNode, FolderNode } from '../../mock';
|
||||
import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
|
@@ -18,11 +18,13 @@
|
||||
import { ContentService } from '@alfresco/adf-core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||
import { Observable, Subject } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { PermissionModel } from '../models/permissions.model';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
import { NodeActionsService } from './node-actions.service';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class FolderActionsService {
|
||||
|
@@ -20,8 +20,9 @@ import { ContentService } from '@alfresco/adf-core';
|
||||
import { EventEmitter, Injectable } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { Subject } from 'rxjs/Rx';
|
||||
import { ContentNodeSelectorComponent, ContentNodeSelectorComponentData } from '../../content-node-selector/content-node-selector.component';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { ContentNodeSelectorComponent } from '../../content-node-selector/content-node-selector.component';
|
||||
import { ContentNodeSelectorComponentData } from '../../content-node-selector/content-node-selector.component-data.interface';
|
||||
import { ShareDataRow } from '../data/share-data-row.model';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
|
||||
|
@@ -22,7 +22,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatDialog, MatDialogModule } from '@angular/material';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { AppConfigService, DirectiveModule, ContentService, TranslateLoaderService } from '@alfresco/adf-core';
|
||||
import { FolderCreateDirective } from './folder-create.directive';
|
@@ -36,4 +36,4 @@ import { FolderEditDirective } from './folder-edit.directive';
|
||||
FolderEditDirective
|
||||
]
|
||||
})
|
||||
export class DirectiveModule {}
|
||||
export class FolderDirectiveModule {}
|
@@ -23,7 +23,7 @@ import { By } from '@angular/platform-browser';
|
||||
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { AppConfigService, ContentService, TranslateLoaderService, DirectiveModule } from '@alfresco/adf-core';
|
||||
import { FolderEditDirective } from './folder-edit.directive';
|
@@ -17,5 +17,3 @@
|
||||
|
||||
export * from './folder-create.directive';
|
||||
export * from './folder-edit.directive';
|
||||
|
||||
export * from './directive.module';
|
@@ -15,6 +15,22 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './content.module';
|
||||
|
||||
export * from './social/social.module';
|
||||
export * from './tag/tag.module';
|
||||
export * from './webscript/webscript.module';
|
||||
export * from './document-list/document-list.module';
|
||||
export * from './upload/upload.module';
|
||||
export * from './search/search.module';
|
||||
export * from './site-dropdown/sites-dropdown.module';
|
||||
export * from './breadcrumb/breadcrumb.module';
|
||||
export * from './version-manager/version-manager.module';
|
||||
export * from './content-node-selector/content-node-selector.module';
|
||||
export * from './dialogs/dialog.module';
|
||||
export * from './folder-directive/folder-directive.module';
|
||||
export * from './content-metadata/content-metadata.module';
|
||||
|
||||
export * from './social';
|
||||
export * from './tag';
|
||||
export * from './webscript';
|
||||
@@ -26,9 +42,5 @@ export * from './breadcrumb';
|
||||
export * from './version-manager';
|
||||
export * from './content-node-selector';
|
||||
export * from './dialogs';
|
||||
export * from './directive';
|
||||
export * from './folder-directive';
|
||||
export * from './content-metadata';
|
||||
|
||||
export * from './mock';
|
||||
|
||||
export * from './content.module';
|
||||
|
@@ -23,7 +23,7 @@ import {
|
||||
LogService,
|
||||
ThumbnailService
|
||||
} from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { NodePaging, DocumentListService } from '../document-list';
|
||||
import { PageNode } from './document-library.model.mock';
|
||||
|
||||
|
@@ -44,7 +44,7 @@ export let fakeSearch = {
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeError = {
|
||||
export let mockError = {
|
||||
error: {
|
||||
errorKey: 'Search failed',
|
||||
statusCode: 400,
|
||||
@@ -54,7 +54,7 @@ export let fakeError = {
|
||||
}
|
||||
};
|
||||
|
||||
export let fakeApi = {
|
||||
export let searchMockApi = {
|
||||
core: {
|
||||
queriesApi: {
|
||||
findNodes: (term, opts) => Promise.resolve(fakeSearch)
|
||||
|
18
lib/content-services/public-api.ts
Normal file
18
lib/content-services/public-api.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './index';
|
@@ -21,6 +21,7 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewEncapsul
|
||||
import { MinimalNodeEntity, QueryBody } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import 'rxjs/add/operator/distinctUntilChanged';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-search-control',
|
||||
|
@@ -18,5 +18,3 @@
|
||||
export * from './components/search.component';
|
||||
export * from './components/search-control.component';
|
||||
export * from './components/search-trigger.directive';
|
||||
|
||||
export * from './search.module';
|
||||
|
@@ -16,5 +16,3 @@
|
||||
*/
|
||||
|
||||
export * from './sites-dropdown.component';
|
||||
|
||||
export * from './sites-dropdown.module';
|
||||
|
@@ -19,5 +19,3 @@ export * from './rating.component';
|
||||
export * from './like.component';
|
||||
|
||||
export * from './services/rating.service';
|
||||
|
||||
export * from './social.module';
|
||||
|
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RatingComponent } from './rating.component';
|
||||
import { MaterialModule } from '../material.module';
|
||||
@@ -27,7 +26,6 @@ describe('Rating component', () => {
|
||||
|
||||
let component: any;
|
||||
let fixture: ComponentFixture<RatingComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -47,7 +45,6 @@ describe('Rating component', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RatingComponent);
|
||||
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
component.nodeId = 'test-id';
|
||||
|
@@ -19,7 +19,8 @@ import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Response } from '@angular/http';
|
||||
import { RatingBody } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
export class RatingService {
|
||||
|
@@ -20,5 +20,3 @@ export * from './tag-list.component';
|
||||
export * from './tag-node-list.component';
|
||||
|
||||
export * from './services/tag.service';
|
||||
|
||||
export * from './tag.module';
|
||||
|
@@ -17,7 +17,8 @@
|
||||
|
||||
import { AlfrescoApiService, LogService } from '@alfresco/adf-core';
|
||||
import { EventEmitter, Injectable, Output } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
/**
|
||||
* @returns {TagService}
|
||||
|
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AppConfigService, CoreModule } from '@alfresco/adf-core';
|
||||
import { TagActionsComponent } from './tag-actions.component';
|
||||
@@ -28,7 +27,6 @@ describe('TagActionsComponent', () => {
|
||||
|
||||
let component: any;
|
||||
let fixture: ComponentFixture<TagActionsComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -52,7 +50,6 @@ describe('TagActionsComponent', () => {
|
||||
|
||||
fixture = TestBed.createComponent(TagActionsComponent);
|
||||
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
|
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AppConfigService, CoreModule } from '@alfresco/adf-core';
|
||||
import { TagService } from './services/tag.service';
|
||||
@@ -45,7 +44,6 @@ describe('TagList', () => {
|
||||
|
||||
let component: any;
|
||||
let fixture: ComponentFixture<TagListComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -69,7 +67,6 @@ describe('TagList', () => {
|
||||
|
||||
fixture = TestBed.createComponent(TagListComponent);
|
||||
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
|
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AppConfigService, CoreModule } from '@alfresco/adf-core';
|
||||
import { TagNodeListComponent } from './tag-node-list.component';
|
||||
@@ -45,7 +44,6 @@ describe('TagNodeList', () => {
|
||||
|
||||
let component: any;
|
||||
let fixture: ComponentFixture<TagNodeListComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -69,7 +67,6 @@ describe('TagNodeList', () => {
|
||||
|
||||
fixture = TestBed.createComponent(TagNodeListComponent);
|
||||
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
|
@@ -18,8 +18,10 @@
|
||||
import { FileModel, FileUploadCompleteEvent, FileUploadDeleteEvent,
|
||||
FileUploadErrorEvent, FileUploadStatus, UploadService } from '@alfresco/adf-core';
|
||||
import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import { Observable, Subscription } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { FileUploadingListComponent } from './file-uploading-list.component';
|
||||
import 'rxjs/add/observable/merge';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-file-uploading-dialog, file-uploading-dialog',
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { TranslationService, FileUploadStatus, NodesApiService, NotificationService, UploadService } from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { UploadModule } from '../upload.module';
|
||||
import { FileUploadingListComponent } from './file-uploading-list.component';
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { FileModel, FileUploadStatus, NodesApiService, NotificationService, TranslationService, UploadService } from '@alfresco/adf-core';
|
||||
import { Component, ContentChild, Input, TemplateRef } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-file-uploading-list',
|
||||
|
@@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement, SimpleChange } from '@angular/core';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MaterialModule } from '../../material.module';
|
||||
import { ContentService, UploadService, TranslationService } from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { UploadButtonComponent } from './upload-button.component';
|
||||
import { TranslationMock } from '@alfresco/adf-core';
|
||||
|
||||
@@ -54,8 +54,6 @@ describe('UploadButtonComponent', () => {
|
||||
|
||||
let component: UploadButtonComponent;
|
||||
let fixture: ComponentFixture<UploadButtonComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
let uploadService: UploadService;
|
||||
let contentService: ContentService;
|
||||
|
||||
@@ -79,8 +77,6 @@ describe('UploadButtonComponent', () => {
|
||||
uploadService = TestBed.get(UploadService);
|
||||
contentService = TestBed.get(ContentService);
|
||||
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
@@ -38,8 +38,10 @@ import {
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { Observable, Subject } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { PermissionModel } from '../../document-list/models/permissions.model';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-upload-button',
|
||||
|
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { FileModel, LogService, UploadService } from '@alfresco/adf-core';
|
||||
|
||||
@@ -59,10 +58,7 @@ describe('UploadDragAreaComponent', () => {
|
||||
|
||||
let component: UploadDragAreaComponent;
|
||||
let fixture: ComponentFixture<UploadDragAreaComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
let uploadService: UploadService;
|
||||
let logService: LogService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -79,12 +75,9 @@ describe('UploadDragAreaComponent', () => {
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
logService = TestBed.get(LogService);
|
||||
fixture = TestBed.createComponent(UploadDragAreaComponent);
|
||||
uploadService = TestBed.get(UploadService);
|
||||
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
@@ -22,5 +22,3 @@ export * from './components/file-uploading-list.component';
|
||||
export * from './components/file-uploading-list-row.component';
|
||||
|
||||
export * from './directives/file-draggable.directive';
|
||||
|
||||
export * from './upload.module';
|
||||
|
@@ -18,5 +18,3 @@
|
||||
export * from './version-list.component';
|
||||
export * from './version-manager.component';
|
||||
export * from './version-upload.component';
|
||||
|
||||
export * from './version-manager.module';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, DebugElement } from '@angular/core';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { MaterialModule } from '../material.module';
|
||||
@@ -25,7 +25,6 @@ import { AlfrescoApiService, CoreModule } from '@alfresco/adf-core';
|
||||
describe('VersionListComponent', () => {
|
||||
let component: VersionListComponent;
|
||||
let fixture: ComponentFixture<VersionListComponent>;
|
||||
let element: DebugElement;
|
||||
|
||||
const nodeId = 'test-id';
|
||||
const versionId = '1.0';
|
||||
@@ -53,7 +52,7 @@ describe('VersionListComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(VersionListComponent);
|
||||
element = fixture.debugElement;
|
||||
|
||||
component = fixture.componentInstance;
|
||||
component.id = nodeId;
|
||||
});
|
||||
|
@@ -23,7 +23,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
import { VersionUploadComponent } from './version-upload.component';
|
||||
import { VersionManagerComponent } from './version-manager.component';
|
||||
import { VersionListComponent } from './version-list.component';
|
||||
import { UploadModule } from '../upload';
|
||||
import { UploadModule } from '../upload/upload.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@@ -16,5 +16,3 @@
|
||||
*/
|
||||
|
||||
export * from './webscript.component';
|
||||
|
||||
export * from './webscript.module';
|
||||
|
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AppConfigService, CoreModule } from '@alfresco/adf-core';
|
||||
import { DataTableModule } from '@alfresco/adf-core';
|
||||
@@ -27,7 +26,6 @@ describe('WebscriptComponent', () => {
|
||||
|
||||
let component: WebscriptComponent;
|
||||
let fixture: ComponentFixture<WebscriptComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@@ -49,7 +47,6 @@ describe('WebscriptComponent', () => {
|
||||
fixture = TestBed.createComponent(WebscriptComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
||||
debug = fixture.debugElement;
|
||||
element = fixture.nativeElement;
|
||||
component = fixture.componentInstance;
|
||||
component.scriptPath = 'fakePath';
|
||||
|
Reference in New Issue
Block a user