mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-26 17:24:45 +00:00
update to latest ADF 2.0 alpha (#93)
* update to latest ADF 2.0 alpha * test fixes * remove fdescribe
This commit is contained in:
parent
6dbaf63dab
commit
ce19f4f40d
@ -16,8 +16,8 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@alfresco/adf-content-services": "2.0.0-beta2",
|
||||
"@alfresco/adf-core": "2.0.0-beta2",
|
||||
"@alfresco/adf-content-services": "2.0.0-c968fbcdacb90946dc00bca3d7b663de94d5a9ad",
|
||||
"@alfresco/adf-core": "2.0.0-c968fbcdacb90946dc00bca3d7b663de94d5a9ad",
|
||||
"@angular/animations": "5.0.0",
|
||||
"@angular/cdk": "5.0.0-rc0",
|
||||
"@angular/common": "5.0.0",
|
||||
@ -34,6 +34,7 @@
|
||||
"alfresco-js-api": "2.0.0-beta1",
|
||||
"core-js": "2.4.1",
|
||||
"hammerjs": "2.0.8",
|
||||
"moment-es6": "1.0.0",
|
||||
"pdfjs-dist": "1.5.404",
|
||||
"rxjs": "5.5.2",
|
||||
"web-animations-js": "^2.3.1",
|
||||
|
@ -80,7 +80,6 @@
|
||||
selectionMode="multiple"
|
||||
[navigate]="false"
|
||||
[sorting]="[ 'modifiedAt', 'desc' ]"
|
||||
[pageSize]="25"
|
||||
[contextMenuActions]="true"
|
||||
[contentActions]="false"
|
||||
(node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)">
|
||||
@ -142,5 +141,6 @@
|
||||
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
<adf-pagination [target]="documentList"></adf-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -84,9 +84,8 @@
|
||||
|
||||
<div [attr.class]="!isValidPath ? 'content--hide' : 'inner-layout__content'">
|
||||
<adf-upload-drag-area
|
||||
[rootFolderId]="node?.id"
|
||||
[disabled]="!canCreateContent(node)"
|
||||
[showNotificationBar]="false">
|
||||
[parentId]="node?.id"
|
||||
[disabled]="!canCreateContent(node)">
|
||||
|
||||
<adf-document-list #documentList
|
||||
[attr.class]="documentList.isEmpty() ? 'empty-list' : ''"
|
||||
@ -98,7 +97,6 @@
|
||||
[contextMenuActions]="true"
|
||||
[contentActions]="false"
|
||||
[navigate]="false"
|
||||
[enablePagination]="false"
|
||||
[selectionMode]="'multiple'"
|
||||
|
||||
(node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)">
|
||||
|
@ -1,8 +1,7 @@
|
||||
<div class="layout">
|
||||
<adf-upload-drag-area
|
||||
[rootFolderId]="node?.id"
|
||||
[disabled]="!canCreateContent(node)"
|
||||
[showNotificationBar]="false">
|
||||
[parentId]="node?.id"
|
||||
[disabled]="!canCreateContent(node)">
|
||||
<app-header></app-header>
|
||||
|
||||
<div class="layout__content">
|
||||
|
@ -14,7 +14,6 @@
|
||||
selectionMode="none"
|
||||
[navigate]="false"
|
||||
[sorting]="[ 'name', 'asc' ]"
|
||||
[pageSize]="25"
|
||||
[contextMenuActions]="true"
|
||||
[contentActions]="false"
|
||||
(node-dblclick)="onNodeDoubleClick($event)">
|
||||
@ -65,5 +64,6 @@
|
||||
</data-column>
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
<adf-pagination [target]="documentList"></adf-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -21,6 +21,7 @@ import { TestBed, async } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
|
||||
import { CoreModule , NodesApiService, AlfrescoApiService} from '@alfresco/adf-core';
|
||||
import { ShareDataTableAdapter } from '@alfresco/adf-content-services';
|
||||
|
||||
import { CommonModule } from '../../common/common.module';
|
||||
import { LibrariesComponent } from './libraries.component';
|
||||
@ -101,30 +102,22 @@ describe('Libraries Routed Component', () => {
|
||||
it('sets title with id when duplicate nodes title exists in list', () => {
|
||||
node.title = 'title';
|
||||
|
||||
component.documentList.data = {
|
||||
page: {
|
||||
list: {
|
||||
entries: [<any>{ entry: { id: 'some-id', title: 'title' } }]
|
||||
}
|
||||
}
|
||||
};
|
||||
const data = new ShareDataTableAdapter(null);
|
||||
data.setRows([<any>{ node: { entry: { id: 'some-id', title: 'title' } } }]);
|
||||
|
||||
component.documentList.data = data;
|
||||
|
||||
const title = component.makeLibraryTitle(node);
|
||||
|
||||
expect(title).toContain('nodeId');
|
||||
});
|
||||
|
||||
it('sets title when no duplicate nodes title exists in list', () => {
|
||||
node.title = 'title';
|
||||
|
||||
component.documentList.data = {
|
||||
page: {
|
||||
list: {
|
||||
entries: [<any>{ entry: { id: 'some-id', title: 'title-some-id' } }]
|
||||
}
|
||||
}
|
||||
};
|
||||
const data = new ShareDataTableAdapter(null);
|
||||
data.setRows([<any>{ node: { entry: { id: 'some-id', title: 'title-some-id' } } }]);
|
||||
|
||||
component.documentList.data = data;
|
||||
const title = component.makeLibraryTitle(node);
|
||||
|
||||
expect(title).toBe('title');
|
||||
|
@ -18,7 +18,7 @@
|
||||
import { Component, ViewChild } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { NodesApiService } from '@alfresco/adf-core';
|
||||
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
||||
import { DocumentListComponent, ShareDataRow } from '@alfresco/adf-content-services';
|
||||
|
||||
import { PageComponent } from '../page.component';
|
||||
|
||||
@ -44,13 +44,15 @@ export class LibrariesComponent extends PageComponent {
|
||||
}
|
||||
|
||||
makeLibraryTitle(library: any): string {
|
||||
const rows = this.documentList.data.getRows();
|
||||
const entries = rows.map((r: ShareDataRow) => r.node.entry);
|
||||
const { title, id } = library;
|
||||
const { entries } = this.documentList.data.page.list;
|
||||
|
||||
let isDuplicate = false;
|
||||
|
||||
if (entries) {
|
||||
isDuplicate = entries
|
||||
.some(({ entry }: any) => {
|
||||
.some((entry: any) => {
|
||||
return (entry.id !== id && entry.title === title);
|
||||
});
|
||||
}
|
||||
|
@ -75,7 +75,6 @@
|
||||
selectionMode="multiple"
|
||||
[navigate]="false"
|
||||
[sorting]="[ 'modifiedAt', 'desc' ]"
|
||||
[pageSize]="25"
|
||||
[contextMenuActions]="true"
|
||||
[contentActions]="false"
|
||||
(node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)">
|
||||
@ -131,5 +130,6 @@
|
||||
</data-columns>
|
||||
|
||||
</adf-document-list>
|
||||
<adf-pagination [target]="documentList"></adf-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -73,7 +73,6 @@
|
||||
currentFolderId="-sharedlinks-"
|
||||
selectionMode="multiple"
|
||||
[sorting]="[ 'modifiedAt', 'desc' ]"
|
||||
[pageSize]="25"
|
||||
[contextMenuActions]="true"
|
||||
[contentActions]="false"
|
||||
(node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)">
|
||||
@ -139,5 +138,6 @@
|
||||
|
||||
</data-columns>
|
||||
</adf-document-list>
|
||||
<adf-pagination [target]="documentList"></adf-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -21,7 +21,6 @@
|
||||
</button>
|
||||
|
||||
<adf-upload-button
|
||||
[showNotificationBar]="false"
|
||||
tooltip="{{
|
||||
(canCreateContent(node)
|
||||
? 'APP.NEW_MENU.TOOLTIPS.UPLOAD_FILES'
|
||||
@ -35,7 +34,6 @@
|
||||
</adf-upload-button>
|
||||
|
||||
<adf-upload-button
|
||||
[showNotificationBar]="false"
|
||||
tooltip="{{
|
||||
(canCreateContent(node)
|
||||
? 'APP.NEW_MENU.TOOLTIPS.UPLOAD_FOLDERS'
|
||||
|
@ -32,7 +32,6 @@
|
||||
selectionMode="multiple"
|
||||
[navigate]="false"
|
||||
[sorting]="[ 'archivedAt', 'desc' ]"
|
||||
[pageSize]="25"
|
||||
[contextMenuActions]="true"
|
||||
[contentActions]="false">
|
||||
|
||||
@ -95,5 +94,6 @@
|
||||
</data-columns>
|
||||
|
||||
</adf-document-list>
|
||||
<adf-pagination [target]="documentList"></adf-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
39
yarn.lock
39
yarn.lock
@ -2,11 +2,11 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@alfresco/adf-content-services@2.0.0-beta2":
|
||||
version "2.0.0-beta2"
|
||||
resolved "https://registry.yarnpkg.com/@alfresco/adf-content-services/-/adf-content-services-2.0.0-beta2.tgz#7b587278b7bef852f6d543e1b667f9be5eaf3308"
|
||||
"@alfresco/adf-content-services@2.0.0-c968fbcdacb90946dc00bca3d7b663de94d5a9ad":
|
||||
version "2.0.0-c968fbcdacb90946dc00bca3d7b663de94d5a9ad"
|
||||
resolved "https://registry.yarnpkg.com/@alfresco/adf-content-services/-/adf-content-services-2.0.0-c968fbcdacb90946dc00bca3d7b663de94d5a9ad.tgz#4d189cf2df9ff155c439805ad9ccea92181dc5b1"
|
||||
dependencies:
|
||||
"@alfresco/adf-core" "2.0.0-beta2"
|
||||
"@alfresco/adf-core" "2.0.0-c968fbcdacb90946dc00bca3d7b663de94d5a9ad"
|
||||
"@angular/animations" "5.0.0"
|
||||
"@angular/cdk" "5.0.0-rc0"
|
||||
"@angular/common" "5.0.0"
|
||||
@ -21,7 +21,7 @@
|
||||
"@angular/platform-browser-dynamic" "5.0.0"
|
||||
"@angular/router" "5.0.0"
|
||||
"@ngx-translate/core" "8.0.0"
|
||||
alfresco-js-api "2.0.0-beta1"
|
||||
alfresco-js-api "2.0.0-2e4554a3d3a1265d058795c924d55d570dd46de2"
|
||||
chart.js "2.5.0"
|
||||
core-js "2.4.1"
|
||||
hammerjs "2.0.8"
|
||||
@ -35,9 +35,9 @@
|
||||
systemjs "0.19.27"
|
||||
zone.js "0.8.14"
|
||||
|
||||
"@alfresco/adf-core@2.0.0-beta2":
|
||||
version "2.0.0-beta2"
|
||||
resolved "https://registry.yarnpkg.com/@alfresco/adf-core/-/adf-core-2.0.0-beta2.tgz#3b38b8fa9339d94bde48d8866e797bb0e4d5cc24"
|
||||
"@alfresco/adf-core@2.0.0-c968fbcdacb90946dc00bca3d7b663de94d5a9ad":
|
||||
version "2.0.0-c968fbcdacb90946dc00bca3d7b663de94d5a9ad"
|
||||
resolved "https://registry.yarnpkg.com/@alfresco/adf-core/-/adf-core-2.0.0-c968fbcdacb90946dc00bca3d7b663de94d5a9ad.tgz#bbf289ed254049f7db0406efd94276fa53a9fbf0"
|
||||
dependencies:
|
||||
"@angular/animations" "5.0.0"
|
||||
"@angular/cdk" "5.0.0-rc0"
|
||||
@ -53,7 +53,7 @@
|
||||
"@angular/platform-browser-dynamic" "5.0.0"
|
||||
"@angular/router" "5.0.0"
|
||||
"@ngx-translate/core" "8.0.0"
|
||||
alfresco-js-api "2.0.0-beta1"
|
||||
alfresco-js-api "2.0.0-2e4554a3d3a1265d058795c924d55d570dd46de2"
|
||||
chart.js "2.5.0"
|
||||
core-js "2.4.1"
|
||||
hammerjs "2.0.8"
|
||||
@ -364,6 +364,13 @@ ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5:
|
||||
fast-json-stable-stringify "^2.0.0"
|
||||
json-schema-traverse "^0.3.0"
|
||||
|
||||
alfresco-js-api@2.0.0-2e4554a3d3a1265d058795c924d55d570dd46de2:
|
||||
version "2.0.0-2e4554a3d3a1265d058795c924d55d570dd46de2"
|
||||
resolved "https://registry.yarnpkg.com/alfresco-js-api/-/alfresco-js-api-2.0.0-2e4554a3d3a1265d058795c924d55d570dd46de2.tgz#9b4cafb16eef618ed449c2d69055cb032cbe9087"
|
||||
dependencies:
|
||||
event-emitter "0.3.4"
|
||||
superagent "3.7.0"
|
||||
|
||||
alfresco-js-api@2.0.0-beta1:
|
||||
version "2.0.0-beta1"
|
||||
resolved "https://registry.yarnpkg.com/alfresco-js-api/-/alfresco-js-api-2.0.0-beta1.tgz#f52f8dfb82e3516efd71868f06cf91c62e4fa71e"
|
||||
@ -3797,14 +3804,20 @@ mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkd
|
||||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
moment-es6@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/moment-es6/-/moment-es6-1.0.0.tgz#552fcf405d62565b0a1fe84e6c1e697ac79332df"
|
||||
dependencies:
|
||||
moment "*"
|
||||
|
||||
moment@*, moment@^2.10.6:
|
||||
version "2.19.2"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.2.tgz#8a7f774c95a64550b4c7ebd496683908f9419dbe"
|
||||
|
||||
moment@2.15.2:
|
||||
version "2.15.2"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.15.2.tgz#1bfdedf6a6e345f322fe956d5df5bd08a8ce84dc"
|
||||
|
||||
moment@^2.10.6:
|
||||
version "2.19.2"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.2.tgz#8a7f774c95a64550b4c7ebd496683908f9419dbe"
|
||||
|
||||
moment@~2.18.0:
|
||||
version "2.18.1"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f"
|
||||
|
Loading…
x
Reference in New Issue
Block a user