[ADF-2054] Created a new widget to handle uploading file from Share (#2810)

* [ADF-2054] start creating custom upload widget for share integration

* [ADF-2054] changed content node selector service to allow different opening approach

* [ADF-2054] addedd support for multi resource files

* [ADF-2054] fixed base case for upload when only local files are selected

* [ADF-2054] start adding and fixing tests for new share attach button widget

* [ADF-2054] changed test to perfrom a correct check

* [ADF-2054] removed fdescribe

* [ADF-2054] added test for share-widget component

* [ADF-2054] added peer reviews changes

* [ADF-2054] created a module folder for content widgets

* [ADF-2054] fixed wrong import

* [ADF-2054] fixed rebase errors

* [ADF-2054] restored some files changed by rebase

* [ADF-2054] added link to content services to fix packaging issue

* [ADF-2054] renamed widget
This commit is contained in:
Vito
2018-01-12 14:28:18 +01:00
committed by Eugenio Romano
parent 69e40ea1c0
commit 46ad98cd8b
37 changed files with 886 additions and 597 deletions

View File

@@ -21,6 +21,7 @@ import { Observable } from 'rxjs/Observable';
import { AlfrescoApiService } from './alfresco-api.service';
import 'rxjs/add/observable/fromPromise';
import 'rxjs/add/operator/catch';
import { SitePaging, SiteEntry } from 'alfresco-js-api';
@Injectable()
export class SitesService {
@@ -28,7 +29,7 @@ export class SitesService {
constructor(
private apiService: AlfrescoApiService) { }
getSites(opts: any = {}): any {
getSites(opts: any = {}): Observable<SitePaging> {
const defaultOptions = {
skipCount: 0,
include: ['properties']
@@ -38,23 +39,23 @@ export class SitesService {
.catch(this.handleError);
}
getSite(siteId: string, opts?: any): any {
getSite(siteId: string, opts?: any): Observable<SiteEntry> {
return Observable.fromPromise(this.apiService.getInstance().core.sitesApi.getSite(siteId, opts))
.catch(this.handleError);
}
deleteSite(siteId: string, permanentFlag: boolean = true): any {
deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any> {
let options: any = {};
options.permanent = permanentFlag;
return Observable.fromPromise(this.apiService.getInstance().core.sitesApi.deleteSite(siteId, options)
.catch(this.handleError));
}
getSiteContent(siteId: string): Observable<any> {
getSiteContent(siteId: string): Observable<SiteEntry> {
return this.getSite(siteId, { relations: ['containers'] });
}
getSiteMembers(siteId: string): Observable<any> {
getSiteMembers(siteId: string): Observable<SiteEntry> {
return this.getSite(siteId, { relations: ['members'] });
}