mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +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:
parent
39737b3df6
commit
f629f48d16
@ -94,23 +94,38 @@
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/core/bundles/assets",
|
||||
"input": "../../lib/core/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/process-services/bundles/assets",
|
||||
"input": "../../lib/process-services/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/content-services/bundles/assets",
|
||||
"input": "../../lib/content-services/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/insights/bundles/assets",
|
||||
"output": "./assets/"
|
||||
"input": "../../lib/core/i18n",
|
||||
"output": "./assets/adf-core/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/process-services/i18n",
|
||||
"output": "./assets/adf-process-services/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/content-services/i18n",
|
||||
"output": "./assets/adf-content-services/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/insights/i18n",
|
||||
"output": "./assets/adf-insights/i18n"
|
||||
},
|
||||
{ "glob": "pdf.worker.js", "input": "../node_modules/pdfjs-dist/build", "output": "./" }
|
||||
],
|
||||
|
@ -84,6 +84,7 @@
|
||||
"hammerjs": "2.0.8",
|
||||
"intl": "1.2.5",
|
||||
"minimatch": "3.0.4",
|
||||
"moment-es6": "^1.0.0",
|
||||
"moment": "2.15.2",
|
||||
"ng2-3d-editor": "0.0.18",
|
||||
"ng2-charts": "1.6.0",
|
||||
|
@ -11,6 +11,7 @@
|
||||
"skipLibCheck": true,
|
||||
"noUnusedLocals": true,
|
||||
"target": "es5",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
|
25
lib/config/bundle-scss-new.js
Normal file
25
lib/config/bundle-scss-new.js
Normal file
@ -0,0 +1,25 @@
|
||||
var Bundler = require('scss-bundle').Bundler;
|
||||
var writeFileSync = require('fs-extra').writeFileSync;
|
||||
var mkdirpSync = require('fs-extra').mkdirpSync;
|
||||
|
||||
new Bundler().Bundle('./core/styles/_index.scss', '**/*.scss').then(result => {
|
||||
mkdirpSync('core');
|
||||
writeFileSync('core/dist/_theming.scss', result.bundledContent);
|
||||
});
|
||||
|
||||
new Bundler().Bundle('./insights/styles/_index.scss', '**/*.scss').then(result => {
|
||||
mkdirpSync('insights');
|
||||
writeFileSync('insights/dist/_theming.scss', result.bundledContent);
|
||||
});
|
||||
|
||||
|
||||
new Bundler().Bundle('./process-services/styles/_index.scss', '**/*.scss').then(result => {
|
||||
mkdirpSync('process-services');
|
||||
writeFileSync('process-services/dist/_theming.scss', result.bundledContent);
|
||||
});
|
||||
|
||||
new Bundler().Bundle('./content-services/styles/_index.scss', '**/*.scss').then(result => {
|
||||
mkdirpSync('content-services');
|
||||
writeFileSync('content-services/dist/_theming.scss', result.bundledContent);
|
||||
});
|
||||
|
@ -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';
|
||||
|
@ -15,9 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { DataTableAdapter } from './datatable-adapter';
|
||||
export { ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter } from './object-datatable-adapter';
|
||||
export { DataRow } from './data-row.model';
|
||||
export { DataRowEvent } from './data-row-event.model';
|
||||
export { DataColumn } from './data-column.model';
|
||||
export { DataSorting } from './data-sorting.model';
|
||||
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,14 +195,12 @@ 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)
|
||||
|
@ -15,5 +15,4 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './chart.model';
|
||||
export * from './report.model';
|
||||
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';
|
||||
|
@ -16,5 +16,3 @@
|
||||
*/
|
||||
|
||||
export * from './app-config.service';
|
||||
|
||||
export * from './app-config.module';
|
||||
|
@ -20,7 +20,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MatDatepickerModule, MatInputModule, MatNativeDateModule } from '@angular/material';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { AppConfigService } from '../index';
|
||||
import { CardViewDateItemModel } from '../models/card-view-dateitem.model';
|
||||
import { CardViewUpdateService } from '../services/card-view-update.service';
|
||||
|
@ -18,12 +18,13 @@
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatDatepicker } from '@angular/material';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material';
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment-es6';
|
||||
import { Moment } from 'moment';
|
||||
import { CardViewDateItemModel } from '../models/card-view-dateitem.model';
|
||||
import { CardViewUpdateService } from '../services/card-view-update.service';
|
||||
import { UserPreferencesService } from '../services/user-preferences.service';
|
||||
import { MOMENT_DATE_FORMATS, MomentDateAdapter } from '../utils/momentDateAdapter';
|
||||
import { MomentDateAdapter } from '../utils/momentDateAdapter';
|
||||
import { MOMENT_DATE_FORMATS } from '../utils/moment-date-formats.model';
|
||||
|
||||
@Component({
|
||||
providers: [
|
||||
@ -48,8 +49,7 @@ export class CardViewDateItemComponent implements OnInit {
|
||||
|
||||
valueDate: Moment;
|
||||
|
||||
constructor(
|
||||
private cardViewUpdateService: CardViewUpdateService,
|
||||
constructor(private cardViewUpdateService: CardViewUpdateService,
|
||||
private dateAdapter: DateAdapter<Moment>,
|
||||
private preferences: UserPreferencesService) {
|
||||
}
|
||||
|
@ -21,5 +21,3 @@ export * from './card-view-item-dispatcher.component';
|
||||
export * from './card-view-mapitem.component';
|
||||
export * from './card-view-textitem.component';
|
||||
export * from './card-view.component';
|
||||
|
||||
export * from './card-view.module';
|
||||
|
@ -17,5 +17,3 @@
|
||||
|
||||
export * from './accordion-group.component';
|
||||
export * from './accordion.component';
|
||||
|
||||
export * from './collapsable.module';
|
||||
|
@ -19,7 +19,7 @@ import { OverlayContainer } from '@angular/cdk/overlay';
|
||||
import { ViewportRuler } from '@angular/cdk/scrolling';
|
||||
import { Component, HostListener, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
|
||||
import { MatMenuTrigger } from '@angular/material';
|
||||
import { Subscription } from 'rxjs/Rx';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
|
||||
@Component({
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Subject } from 'rxjs/Rx';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
|
||||
@Injectable()
|
||||
export class ContextMenuService {
|
||||
|
@ -26,25 +26,27 @@ import { TRANSLATION_PROVIDER, TranslationService } from './services/translation
|
||||
|
||||
import { MaterialModule } from './material.module';
|
||||
|
||||
import { AppConfigModule } from './app-config';
|
||||
import { CardViewModule } from './card-view';
|
||||
import { CollapsableModule } from './collapsable';
|
||||
import { ContextMenuModule } from './context-menu';
|
||||
import { DataColumnModule } from './data-column';
|
||||
import { DataTableModule } from './datatable';
|
||||
import { InfoDrawerModule } from './info-drawer';
|
||||
import { LanguageMenuModule } from './language-menu';
|
||||
import { LoginModule } from './login';
|
||||
import { PaginationModule } from './pagination';
|
||||
import { HostSettingsModule } from './settings';
|
||||
import { ToolbarModule } from './toolbar';
|
||||
import { UserInfoModule } from './userinfo';
|
||||
import { ViewerModule } from './viewer';
|
||||
import { FormModule } from './form';
|
||||
import { AppConfigModule } from './app-config/app-config.module';
|
||||
import { CardViewModule } from './card-view/card-view.module';
|
||||
import { CollapsableModule } from './collapsable/collapsable.module';
|
||||
import { ContextMenuModule } from './context-menu/context-menu.module';
|
||||
import { DataColumnModule } from './data-column/data-column.module';
|
||||
import { DataTableModule } from './datatable/datatable.module';
|
||||
import { InfoDrawerModule } from './info-drawer/info-drawer.module';
|
||||
import { LanguageMenuModule } from './language-menu/language-menu.module';
|
||||
import { LoginModule } from './login/login.module';
|
||||
import { PaginationModule } from './pagination/pagination.module';
|
||||
import { HostSettingsModule } from './settings/host-settings.module';
|
||||
import { ToolbarModule } from './toolbar/toolbar.module';
|
||||
import { UserInfoModule } from './userinfo/userinfo.module';
|
||||
import { ViewerModule } from './viewer/viewer.module';
|
||||
import { FormModule } from './form/form.module';
|
||||
|
||||
import { DirectiveModule } from './directives';
|
||||
import { PipeModule } from './pipes';
|
||||
import { LogService , ServiceModule, TranslateLoaderService } from './services';
|
||||
import { DirectiveModule } from './directives/directive.module';
|
||||
import { PipeModule } from './pipes/pipe.module';
|
||||
import { ServiceModule } from './services/service.module';
|
||||
import { LogService } from './services/log.service';
|
||||
import { TranslateLoaderService } from './services/translate-loader.service';
|
||||
|
||||
export function createTranslateLoader(http: HttpClient, logService: LogService) {
|
||||
return new TranslateLoaderService(http, logService);
|
||||
@ -80,7 +82,6 @@ export function createTranslateLoader(http: HttpClient, logService: LogService)
|
||||
})
|
||||
],
|
||||
providers: [
|
||||
TranslationService,
|
||||
{
|
||||
provide: TRANSLATION_PROVIDER,
|
||||
multi: true,
|
||||
@ -88,7 +89,8 @@ export function createTranslateLoader(http: HttpClient, logService: LogService)
|
||||
name: 'adf-core',
|
||||
source: 'assets/adf-core'
|
||||
}
|
||||
}
|
||||
},
|
||||
TranslationService
|
||||
],
|
||||
exports: [
|
||||
AppConfigModule,
|
||||
@ -96,7 +98,6 @@ export function createTranslateLoader(http: HttpClient, logService: LogService)
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpClientModule,
|
||||
TranslateModule,
|
||||
ContextMenuModule,
|
||||
CardViewModule,
|
||||
@ -114,7 +115,8 @@ export function createTranslateLoader(http: HttpClient, logService: LogService)
|
||||
ViewerModule,
|
||||
PipeModule,
|
||||
DirectiveModule,
|
||||
FormModule
|
||||
FormModule,
|
||||
MaterialModule
|
||||
]
|
||||
})
|
||||
export class CoreModule {
|
||||
|
@ -17,5 +17,3 @@
|
||||
|
||||
export * from './data-column-list.component';
|
||||
export * from './data-column.component';
|
||||
|
||||
export * from './data-column.module';
|
||||
|
@ -21,13 +21,12 @@ import { MatCheckboxChange } from '@angular/material';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { DataTableModule } from '../../datatable.module';
|
||||
import { MaterialModule } from '../../../material.module';
|
||||
import {
|
||||
DataColumn,
|
||||
DataRow,
|
||||
DataSorting,
|
||||
ObjectDataColumn,
|
||||
ObjectDataTableAdapter
|
||||
} from './../../data/index';
|
||||
import { DataColumn } from '../../data/data-column.model';
|
||||
import { DataRow } from '../../data/data-row.model';
|
||||
import { DataSorting } from '../../data/data-sorting.model';
|
||||
import { ObjectDataColumn } from '../../data/object-datacolumn.model';
|
||||
import { ObjectDataTableAdapter } from '../../data/object-datatable-adapter';
|
||||
|
||||
import { DataTableComponent } from './datatable.component';
|
||||
|
||||
describe('DataTable', () => {
|
||||
@ -35,7 +34,6 @@ describe('DataTable', () => {
|
||||
let fixture: ComponentFixture<DataTableComponent>;
|
||||
let dataTable: DataTableComponent;
|
||||
let element: any;
|
||||
let eventMock: any;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@ -53,13 +51,6 @@ describe('DataTable', () => {
|
||||
element = fixture.debugElement.nativeElement;
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
eventMock = {
|
||||
preventDefault: function () {
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
it('should change the rows on changing of the data', () => {
|
||||
let newData = new ObjectDataTableAdapter(
|
||||
[
|
||||
|
@ -20,17 +20,23 @@ import {
|
||||
IterableDiffers, OnChanges, Output, SimpleChange, SimpleChanges, TemplateRef, ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
import { MatCheckboxChange } from '@angular/material';
|
||||
import { Observable, Observer, Subscription } from 'rxjs/Rx';
|
||||
import { DataColumnListComponent } from '../../../data-column';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Observer } from 'rxjs/Observer';
|
||||
import { DataColumnListComponent } from '../../../data-column/data-column-list.component';
|
||||
import { DataColumn } from '../../data/data-column.model';
|
||||
import { DataRowEvent } from '../../data/data-row-event.model';
|
||||
import { DataRow } from '../../data/data-row.model';
|
||||
import { DataSorting } from '../../data/data-sorting.model';
|
||||
import { DataTableAdapter } from '../../data/datatable-adapter';
|
||||
|
||||
import { ObjectDataRow, ObjectDataTableAdapter } from '../../data/object-datatable-adapter';
|
||||
import { ObjectDataRow } from '../../data/object-datarow.model';
|
||||
import { ObjectDataTableAdapter } from '../../data/object-datatable-adapter';
|
||||
import { DataCellEvent } from './data-cell.event';
|
||||
import { DataRowActionEvent } from './data-row-action.event';
|
||||
import 'rxjs/add/operator/debounceTime';
|
||||
import 'rxjs/add/operator/buffer';
|
||||
import 'rxjs/add/operator/filter';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-datatable',
|
||||
@ -40,7 +46,8 @@ import { DataRowActionEvent } from './data-row-action.event';
|
||||
})
|
||||
export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck {
|
||||
|
||||
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
|
||||
@ContentChild(DataColumnListComponent)
|
||||
columnList: DataColumnListComponent;
|
||||
|
||||
@Input()
|
||||
data: DataTableAdapter;
|
||||
|
@ -17,10 +17,9 @@
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import {
|
||||
ObjectDataColumn,
|
||||
ObjectDataTableAdapter
|
||||
} from './../../data/index';
|
||||
import { ObjectDataTableAdapter } from './../../data/object-datatable-adapter';
|
||||
import { ObjectDataColumn } from './../../data/object-datacolumn.model';
|
||||
|
||||
import { LocationCellComponent } from './location-cell.component';
|
||||
|
||||
describe('LocationCellComponent', () => {
|
||||
|
43
lib/core/datatable/data/object-datacolumn.model.ts
Normal file
43
lib/core/datatable/data/object-datacolumn.model.ts
Normal file
@ -0,0 +1,43 @@
|
||||
/*!
|
||||
* @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 { TemplateRef } from '@angular/core';
|
||||
import { DataColumn } from './data-column.model';
|
||||
|
||||
// Simple implementation of the DataColumn interface.
|
||||
export class ObjectDataColumn implements DataColumn {
|
||||
|
||||
key: string;
|
||||
type: string; // text|image
|
||||
format: string;
|
||||
sortable: boolean;
|
||||
title: string;
|
||||
srTitle: string;
|
||||
cssClass: string;
|
||||
template?: TemplateRef<any>;
|
||||
|
||||
constructor(obj: any) {
|
||||
this.key = obj.key;
|
||||
this.type = obj.type || 'text';
|
||||
this.format = obj.format;
|
||||
this.sortable = obj.sortable;
|
||||
this.title = obj.title;
|
||||
this.srTitle = obj.srTitle;
|
||||
this.cssClass = obj.cssClass;
|
||||
this.template = obj.template;
|
||||
}
|
||||
}
|
@ -15,16 +15,24 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
import { ObjectUtils } from '../../utils';
|
||||
import { DataRow } from './data-row.model';
|
||||
|
||||
import { DiagramEventSubprocessComponent } from './diagram-event-subprocess.component';
|
||||
import { DiagramSubprocessComponent } from './diagram-subprocess.component';
|
||||
// Simple implementation of the DataRow interface.
|
||||
export class ObjectDataRow implements DataRow {
|
||||
|
||||
// primitives
|
||||
export * from './diagram-subprocess.component';
|
||||
export * from './diagram-event-subprocess.component';
|
||||
constructor(private obj: any, public isSelected: boolean = false) {
|
||||
if (!obj) {
|
||||
throw new Error('Object source not found');
|
||||
}
|
||||
|
||||
export const DIAGRAM_STRUCTURAL_DIRECTIVES: any[] = [
|
||||
DiagramSubprocessComponent,
|
||||
DiagramEventSubprocessComponent
|
||||
];
|
||||
}
|
||||
|
||||
getValue(key: string): any {
|
||||
return ObjectUtils.getValue(this.obj, key);
|
||||
}
|
||||
|
||||
hasValue(key: string): boolean {
|
||||
return this.getValue(key) !== undefined;
|
||||
}
|
||||
}
|
@ -18,7 +18,9 @@
|
||||
import { DataColumn } from './data-column.model';
|
||||
import { DataRow } from './data-row.model';
|
||||
import { DataSorting } from './data-sorting.model';
|
||||
import { ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter } from './object-datatable-adapter';
|
||||
import { ObjectDataTableAdapter } from './object-datatable-adapter';
|
||||
import { ObjectDataRow } from './object-datarow.model';
|
||||
import { ObjectDataColumn } from './object-datacolumn.model';
|
||||
|
||||
describe('ObjectDataTableAdapter', () => {
|
||||
|
||||
|
@ -16,34 +16,15 @@
|
||||
*/
|
||||
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { TemplateRef } from '@angular/core';
|
||||
|
||||
import { TimeAgoPipe } from '../../pipes';
|
||||
import { ObjectUtils } from '../../utils';
|
||||
import { DataColumn } from './data-column.model';
|
||||
import { DataRow } from './data-row.model';
|
||||
import { ObjectDataRow } from './object-datarow.model';
|
||||
import { ObjectDataColumn } from './object-datacolumn.model';
|
||||
import { DataSorting } from './data-sorting.model';
|
||||
import { DataTableAdapter } from './datatable-adapter';
|
||||
|
||||
// Simple implementation of the DataRow interface.
|
||||
export class ObjectDataRow implements DataRow {
|
||||
|
||||
constructor(private obj: any, public isSelected: boolean = false) {
|
||||
if (!obj) {
|
||||
throw new Error('Object source not found');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getValue(key: string): any {
|
||||
return ObjectUtils.getValue(this.obj, key);
|
||||
}
|
||||
|
||||
hasValue(key: string): boolean {
|
||||
return this.getValue(key) !== undefined;
|
||||
}
|
||||
}
|
||||
|
||||
// Simple implementation of the DataTableAdapter interface.
|
||||
export class ObjectDataTableAdapter implements DataTableAdapter {
|
||||
|
||||
@ -196,27 +177,3 @@ export class ObjectDataTableAdapter implements DataTableAdapter {
|
||||
this.setSorting(sorting);
|
||||
}
|
||||
}
|
||||
|
||||
// Simple implementation of the DataColumn interface.
|
||||
export class ObjectDataColumn implements DataColumn {
|
||||
|
||||
key: string;
|
||||
type: string; // text|image
|
||||
format: string;
|
||||
sortable: boolean;
|
||||
title: string;
|
||||
srTitle: string;
|
||||
cssClass: string;
|
||||
template?: TemplateRef<any>;
|
||||
|
||||
constructor(obj: any) {
|
||||
this.key = obj.key;
|
||||
this.type = obj.type || 'text';
|
||||
this.format = obj.format;
|
||||
this.sortable = obj.sortable;
|
||||
this.title = obj.title;
|
||||
this.srTitle = obj.srTitle;
|
||||
this.cssClass = obj.cssClass;
|
||||
this.template = obj.template;
|
||||
}
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ import { RouterModule } from '@angular/router';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { ContextMenuModule } from '../context-menu';
|
||||
import { PipeModule } from '../pipes';
|
||||
import { ContextMenuModule } from '../context-menu/context-menu.module';
|
||||
import { PipeModule } from '../pipes/pipe.module';
|
||||
|
||||
import { DirectiveModule } from '../directives';
|
||||
import { DirectiveModule } from '../directives/directive.module';
|
||||
import { DataTableCellComponent } from './components/datatable/datatable-cell.component';
|
||||
import { DataTableComponent } from './components/datatable/datatable.component';
|
||||
import { DateCellComponent } from './components/datatable/date-cell.component';
|
||||
|
@ -15,7 +15,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './data/index';
|
||||
export * from './data/datatable-adapter';
|
||||
|
||||
export * from './data/data-row.model';
|
||||
export * from './data/data-row-event.model';
|
||||
export * from './data/data-column.model';
|
||||
export * from './data/data-sorting.model';
|
||||
|
||||
export * from './data/object-datarow.model';
|
||||
export * from './data/object-datatable-adapter';
|
||||
export * from './data/object-datacolumn.model';
|
||||
|
||||
export * from './components/datatable/data-cell.event';
|
||||
export * from './components/datatable/data-row-action.event';
|
||||
@ -30,5 +39,3 @@ export * from './components/datatable/location-cell.component';
|
||||
export * from './directives/loading-template.directive';
|
||||
export * from './directives/no-content-template.directive';
|
||||
export * from './directives/no-permission-template.directive';
|
||||
|
||||
export * from './datatable.module';
|
||||
|
@ -19,7 +19,7 @@ import { Component } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Router } from '@angular/router';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { AuthenticationService } from '../services';
|
||||
|
||||
|
@ -17,10 +17,13 @@
|
||||
|
||||
import { Directive, ElementRef, EventEmitter, HostListener, Input, OnChanges, Output } from '@angular/core';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
import { TranslationService } from '../services/translation.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/observable/forkJoin';
|
||||
import 'rxjs/add/operator/catch';
|
||||
|
||||
interface ProcessedNodeData {
|
||||
entry: MinimalNodeEntryEntity;
|
||||
|
@ -17,8 +17,10 @@
|
||||
|
||||
import { Directive, EventEmitter, HostListener, Input, OnChanges, Output } from '@angular/core';
|
||||
import { FavoriteBody, MinimalNodeEntity } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import 'rxjs/add/observable/fromPromise';
|
||||
import 'rxjs/observable/forkJoin';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-node-favorite]',
|
||||
@ -37,7 +39,8 @@ export class NodeFavoriteDirective implements OnChanges {
|
||||
this.toggleFavorite();
|
||||
}
|
||||
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {}
|
||||
constructor(private alfrescoApiService: AlfrescoApiService) {
|
||||
}
|
||||
|
||||
ngOnChanges(changes) {
|
||||
if (!changes.selection.currentValue.length) {
|
||||
|
@ -20,7 +20,7 @@ import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Router } from '@angular/router';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { TranslationService } from '../services';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
|
@ -18,10 +18,13 @@
|
||||
import { Directive, EventEmitter, HostListener, Input, Output } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { DeletedNodeEntry, DeletedNodesPaging, PathInfoEntity } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
import { TranslationService } from '../services/translation.service';
|
||||
import 'rxjs/add/observable/from';
|
||||
import 'rxjs/add/observable/zip';
|
||||
import 'rxjs/add/operator/mergeMap';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-restore]'
|
||||
@ -73,7 +76,7 @@ export class NodeRestoreDirective {
|
||||
this.restoreProcessStatus.fail.push(...status.fail);
|
||||
this.restoreProcessStatus.success.push(...status.success);
|
||||
})
|
||||
.flatMap(() => this.getDeletedNodes())
|
||||
.mergeMap(() => this.getDeletedNodes())
|
||||
.subscribe(
|
||||
(deletedNodesList: any) => {
|
||||
const { entries: nodelist } = deletedNodesList.list;
|
||||
|
@ -22,5 +22,3 @@ export * from './node-favorite.directive';
|
||||
export * from './node-permission.directive';
|
||||
export * from './node-restore.directive';
|
||||
export * from './upload.directive';
|
||||
|
||||
export * from './directive.module';
|
||||
|
@ -18,15 +18,8 @@
|
||||
/** Base cancellable event implementation */
|
||||
export class BaseEvent<T> {
|
||||
|
||||
private isDefaultPrevented: boolean = false;
|
||||
defaultPrevented: boolean = false;
|
||||
|
||||
value: T;
|
||||
|
||||
get defaultPrevented() {
|
||||
return this.isDefaultPrevented;
|
||||
}
|
||||
|
||||
preventDefault() {
|
||||
this.isDefaultPrevented = true;
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ import {
|
||||
|
||||
import { FormRenderingService } from './../../services/form-rendering.service';
|
||||
import { WidgetVisibilityService } from './../../services/widget-visibility.service';
|
||||
import { FormFieldModel } from './../widgets/core/index';
|
||||
import { FormFieldModel } from './../widgets/core/form-field.model';
|
||||
import { WidgetComponent } from './../widgets/widget.component';
|
||||
|
||||
declare var adf: any;
|
||||
|
@ -18,9 +18,9 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslationService } from '../../index';
|
||||
import { DataTableModule } from '../../datatable';
|
||||
import { DataColumnModule } from '../../data-column';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { DataTableModule } from '../../datatable/datatable.module';
|
||||
import { DataColumnModule } from '../../data-column/data-column.module';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { EcmModelService } from '../services/ecm-model.service';
|
||||
import { FormService } from '../services/form.service';
|
||||
import { FormListComponent } from './form-list.component';
|
||||
|
@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { LogService } from '../../services';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { fakeForm } from '../../mock';
|
||||
import { FormService } from './../services/form.service';
|
||||
import { NodeService } from './../services/node.service';
|
||||
|
@ -23,7 +23,7 @@ import { FormService } from './../services/form.service';
|
||||
import { NodeService } from './../services/node.service';
|
||||
import { ContentLinkModel } from './widgets/core/content-link.model';
|
||||
import { FormFieldModel, FormModel, FormOutcomeEvent, FormOutcomeModel, FormValues, FormFieldValidator } from './widgets/core/index';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
||||
|
||||
@Component({
|
||||
|
@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { DebugElement, SimpleChange } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
@ -36,13 +36,9 @@ const SELECT_OPEN_ANIMATION = 200;
|
||||
const SELECT_CLOSE_ANIMATION = 500;
|
||||
|
||||
describe('FormComponent UI and visibiltiy', () => {
|
||||
let debugElement: DebugElement;
|
||||
let element: HTMLElement;
|
||||
let component: FormComponent;
|
||||
let service: FormService;
|
||||
let fixture: ComponentFixture<FormComponent>;
|
||||
let formDefinitionSpy: jasmine.Spy;
|
||||
let taskSpy: jasmine.Spy;
|
||||
|
||||
function openSelect() {
|
||||
let trigger: HTMLElement;
|
||||
@ -63,8 +59,6 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FormComponent);
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
debugElement = fixture.debugElement;
|
||||
service = fixture.debugElement.injector.get(FormService);
|
||||
});
|
||||
|
||||
@ -75,8 +69,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
describe('form definition', () => {
|
||||
|
||||
it('should display two text fields form definition', () => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefinitionTwoTextFields));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefinitionTwoTextFields));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
@ -92,8 +86,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
});
|
||||
|
||||
it('should display dropdown field', fakeAsync(() => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefinitionDropdownField));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefinitionDropdownField));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
@ -123,8 +117,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
describe('Visibility conditions', () => {
|
||||
|
||||
it('should hide the field based on the next one', () => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnNextOne));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnNextOne));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
@ -139,8 +133,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
});
|
||||
|
||||
it('should hide the field based on the previous one', () => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnPreviousOne));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnPreviousOne));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
@ -155,8 +149,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
});
|
||||
|
||||
it('should show the hidden field when the visibility condition change to true', () => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnNextOne));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formDefVisibilitiFieldDependsOnNextOne));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
@ -181,8 +175,8 @@ describe('FormComponent UI and visibiltiy', () => {
|
||||
|
||||
describe('Readonly Form', () => {
|
||||
it('should display two text fields readonly', () => {
|
||||
taskSpy = spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
formDefinitionSpy = spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formReadonlyTwoTextFields));
|
||||
spyOn(service, 'getTask').and.returnValue(Observable.of({}));
|
||||
spyOn(service, 'getTaskForm').and.returnValue(Observable.of(formReadonlyTwoTextFields));
|
||||
|
||||
let change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ 'taskId': change });
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, SimpleChange } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { EntryComponentMockModule } from '../../mock/form/entry-module.mock';
|
||||
import { startFormDateWidgetMock, startFormDropdownDefinitionMock, startFormTextDefinitionMock, startMockForm, startMockFormWithTab } from '../../mock';
|
||||
import { startFormAmountWidgetMock, startFormNumberWidgetMock, startFormRadioButtonWidgetMock } from '../../mock';
|
||||
@ -37,7 +37,6 @@ describe('ActivitiStartForm', () => {
|
||||
|
||||
let formService: FormService;
|
||||
let component: StartFormComponent;
|
||||
let element: HTMLElement;
|
||||
let fixture: ComponentFixture<StartFormComponent>;
|
||||
let getStartFormSpy: jasmine.Spy;
|
||||
|
||||
@ -72,7 +71,6 @@ describe('ActivitiStartForm', () => {
|
||||
fixture = TestBed.createComponent(StartFormComponent);
|
||||
component = fixture.componentInstance;
|
||||
formService = fixture.debugElement.injector.get(FormService);
|
||||
element = fixture.nativeElement;
|
||||
|
||||
getStartFormSpy = spyOn(formService, 'getStartFormDefinition').and.returnValue(Observable.of({
|
||||
processDefinitionName: 'my:process'
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LogService } from '../../services';
|
||||
import { LogService } from '../../services/log.service';
|
||||
import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../services/form.service';
|
||||
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { ActivitiContentService } from '../../../services/activiti-alfresco.service';
|
||||
import { MaterialModule } from '../../../../material.module';
|
||||
import { ExternalContent } from '../core/external-content';
|
||||
@ -33,7 +33,6 @@ describe('AttachWidgetComponent', () => {
|
||||
|
||||
let widget: AttachWidgetComponent;
|
||||
let fixture: ComponentFixture<AttachWidgetComponent>;
|
||||
let element: HTMLElement;
|
||||
let contentService: ActivitiContentService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
@ -57,7 +56,6 @@ describe('AttachWidgetComponent', () => {
|
||||
fixture = TestBed.createComponent(AttachWidgetComponent);
|
||||
contentService = TestBed.get(ActivitiContentService);
|
||||
|
||||
element = fixture.nativeElement;
|
||||
widget = fixture.componentInstance;
|
||||
});
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user