[ADF-] update library to use new js-api 3.0.0 (#4097)

This commit is contained in:
Eugenio Romano
2019-01-06 23:57:01 +01:00
committed by Eugenio Romano
parent 2acd1b4e26
commit 3ef7d3b7ea
430 changed files with 1966 additions and 2149 deletions

View File

@@ -15,7 +15,7 @@ module.exports = {
}
},
"/activiti-app": {
"target": "http://localhost:9999",
"target": "http://localhost:8080",
"secure": false,
"pathRewrite": {
"^/activiti-app/activiti-app": ""

View File

@@ -16,7 +16,7 @@
*/
import { Component, ViewEncapsulation } from '@angular/core';
import { SitePaging, SiteEntry, MinimalNodeEntryEntity } from 'alfresco-js-api';
import { SitePaging, SiteEntry, MinimalNodeEntryEntity } from '@alfresco/js-api';
import { ShareDataRow } from '@alfresco/adf-content-services';
import { DataRow, DataColumn, ThumbnailService } from '@alfresco/adf-core';
@@ -44,20 +44,20 @@ export class ContentNodeSelectorComponent {
customImageResolver: any = null;
defaultSites: SiteEntry[] = [
{ entry: { title: 'MINE', guid: '-my-' } },
{ entry: { title: 'ROOTY', guid: '-root-' } }];
new SiteEntry({ entry: { title: 'MINE', guid: '-my-' } }),
new SiteEntry({ entry: { title: 'ROOTY', guid: '-root-' } })];
customSites: SitePaging = {
customSites: SitePaging = new SitePaging({
list: {
entries: [
{ entry: { title: 'MINE', guid: '-my-' } },
{ entry: { title: 'ROOTY', guid: '-root-' } }],
pagination: {}
}
};
});
onClickAddSite() {
const newSiteEntry: SiteEntry = { entry: { title: this.customSideTitle, guid: this.customSideGuid } };
const newSiteEntry: SiteEntry = new SiteEntry({ entry: { title: this.customSideTitle, guid: this.customSideGuid } });
this.customSites.list.entries.push(newSiteEntry);
this.customSideGuid = '';
this.customSideTitle = '';

View File

@@ -208,16 +208,6 @@
</mat-slide-toggle>
</p>
<p class="toggle">
<mat-slide-toggle
id="adf-switch-share"
[color]="'primary'"
(change)="toggleAllowShare()"
[checked]="allowShare">
Allow Share
</mat-slide-toggle>
</p>
<p class="toggle">
<mat-slide-toggle
id="adf-switch-allowsidebar"
@@ -274,7 +264,6 @@
[allowGoBack]="allowGoBack"
[displayName]="displayName"
[showToolbar]="showToolbar"
[allowShare]="allowShare"
[allowPrint]="allowPrint"
[allowDownload]="allowDownload"
[allowSidebar]="allowSidebar"

View File

@@ -43,7 +43,6 @@ export class FileViewComponent implements OnInit {
openWith = false;
allowDownload = true;
allowPrint = true;
allowShare = true;
allowSidebar = true;
allowLeftSidebar = true;
moreActions = true;
@@ -120,10 +119,6 @@ export class FileViewComponent implements OnInit {
this.allowPrint = !this.allowPrint;
}
toggleAllowShare() {
this.allowShare = !this.allowShare;
}
toggleOpenMoreActions() {
this.moreActions = !this.moreActions;
}

View File

@@ -23,7 +23,7 @@ import { Location } from '@angular/common';
import { MatDialog } from '@angular/material';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { MinimalNodeEntity, NodePaging, Pagination, MinimalNodeEntryEntity, SiteEntry } from 'alfresco-js-api';
import { MinimalNodeEntity, NodePaging, Pagination, MinimalNodeEntryEntity, SiteEntry } from '@alfresco/js-api';
import {
AlfrescoApiService, AuthenticationService, AppConfigService, AppConfigValues, ContentService, TranslationService,
FileUploadEvent, FolderCreatedEvent, LogService, NotificationService,
@@ -57,7 +57,7 @@ const DEFAULT_FOLDER_TO_SHOW = '-my-';
export class FilesComponent implements OnInit, OnChanges, OnDestroy {
errorMessage: string = null;
fileNodeId: any;
nodeId: any;
showViewer = false;
showVersions = false;
allowDropFiles = true;

View File

@@ -17,7 +17,7 @@
import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
@Component({
templateUrl: './metadata-dialog-adapter.component.html',

View File

@@ -17,7 +17,7 @@
import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
import { MatSnackBar } from '@angular/material';
@Component({

View File

@@ -18,5 +18,5 @@
<adf-viewer
[(showViewer)]="showViewer"
[overlayMode]="isOverlay"
[fileNodeId]="nodeId">
[nodeId]="nodeId">
</adf-viewer>

View File

@@ -18,7 +18,7 @@
import { Component, Optional, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router';
import { PermissionListComponent, NodePermissionDialogService } from '@alfresco/adf-content-services';
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
import { NodesApiService, NotificationService } from '@alfresco/adf-core';
@Component({

View File

@@ -33,7 +33,7 @@ import {
ProcessInstanceFilterRepresentation,
Pagination,
UserProcessInstanceFilterRepresentation
} from 'alfresco-js-api';
} from '@alfresco/js-api';
import {
FORM_FIELD_VALIDATORS, FormEvent, FormFieldEvent, FormRenderingService, FormService,
DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService, PaginationComponent, UserPreferenceValues

View File

@@ -17,7 +17,7 @@
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { MinimalNodeEntity } from 'alfresco-js-api';
import { MinimalNodeEntity } from '@alfresco/js-api';
import { PreviewService } from '../../services/preview.service';
@Component({

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { QueryBody } from 'alfresco-js-api';
import { QueryBody } from '@alfresco/js-api';
import { SearchConfigurationInterface } from '@alfresco/adf-core';
export class TestSearchConfigurationService implements SearchConfigurationInterface {

View File

@@ -16,7 +16,7 @@
*/
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { NodePaging, Pagination, QueryBody, MinimalNodeEntity } from 'alfresco-js-api';
import { NodePaging, Pagination, QueryBody, MinimalNodeEntity } from '@alfresco/js-api';
import { SearchComponent } from '@alfresco/adf-content-services';
import { ThumbnailService } from '@alfresco/adf-core';
import { SearchService, SearchConfigurationService } from '@alfresco/adf-core';

View File

@@ -17,7 +17,7 @@
import { Component, OnInit, Optional, OnDestroy } from '@angular/core';
import { Router, ActivatedRoute, Params } from '@angular/router';
import { NodePaging, Pagination } from 'alfresco-js-api';
import { NodePaging, Pagination, ResultSetPaging } from '@alfresco/js-api';
import { SearchQueryBuilderService } from '@alfresco/adf-content-services';
import { UserPreferencesService, SearchService, AppConfigService } from '@alfresco/adf-core';
import { Subscription } from 'rxjs';
@@ -61,10 +61,10 @@ export class SearchResultComponent implements OnInit, OnDestroy {
this.isLoading = true;
}),
this.queryBuilder.executed.subscribe((data) => {
this.queryBuilder.executed.subscribe((resultSetPaging: ResultSetPaging) => {
this.queryBuilder.paging.skipCount = 0;
this.onSearchResultLoaded(data);
this.onSearchResultLoaded(resultSetPaging);
this.isLoading = false;
})
);
@@ -79,7 +79,12 @@ export class SearchResultComponent implements OnInit, OnDestroy {
this.queryBuilder.update();
} else {
this.queryBuilder.userQuery = null;
this.queryBuilder.executed.next({ list: { pagination: { totalItems: 0 }, entries: [] } });
this.queryBuilder.executed.next(new ResultSetPaging({
list: {
pagination: { totalItems: 0 },
entries: []
}
}));
}
});
}
@@ -101,9 +106,9 @@ export class SearchResultComponent implements OnInit, OnDestroy {
this.subscriptions = [];
}
onSearchResultLoaded(nodePaging: NodePaging) {
this.data = nodePaging;
this.pagination = { ...nodePaging.list.pagination };
onSearchResultLoaded(resultSetPaging: ResultSetPaging) {
this.data = resultSetPaging;
this.pagination = { ...resultSetPaging.list.pagination };
}
onRefreshPagination(pagination: Pagination) {

View File

@@ -19,7 +19,7 @@ import { Component, ViewChild } from '@angular/core';
import { DocumentListComponent } from '@alfresco/adf-content-services';
import { UserPreferencesService, UserPreferenceValues, RestoreMessageModel, NotificationService } from '@alfresco/adf-core';
import { Router } from '@angular/router';
import { PathInfoEntity } from 'alfresco-js-api';
import { PathInfoEntity } from '@alfresco/js-api';
@Component({
templateUrl: './trashcan.component.html',

View File

@@ -8,8 +8,8 @@
"skipLibCheck": false,
"types": [],
"paths": {
"alfresco-js-api": [
"../../node_modules/alfresco-js-api/dist/alfresco-js-api.js"
"@alfresco/js-api": [
"../../node_modules/@alfresco/js-api"
],
"rxjs/*": [
"../../node_modules/rxjs/*"