mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
[ADF-4125] simplify extension load in extension module (#4214)
* add extension load in extension module * add viewer extensions * fix license header * fix node passed in the viewer extension * fix node passed in the viewer extension * startup factory extension * startup factory extension * fix script * fix beta tag build * fix build * fix build * refactoring configuration files * extension using map * fix build * fix config * fix test * fix test
This commit is contained in:
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { ExtensionRef } from '@alfresco/adf-extensions';
|
||||
import { AppExtensionService } from '../../extensions/extension.service';
|
||||
import { AppExtensionService, ExtensionRef } from '@alfresco/adf-extensions';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
|
@@ -19,6 +19,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { NotificationService, AppConfigService } from '@alfresco/adf-core';
|
||||
import { CloudLayoutService } from './services/cloud-layout.service';
|
||||
|
||||
@Component({
|
||||
templateUrl: './start-process-cloud-demo.component.html',
|
||||
styleUrls: ['./start-process-cloud-demo.component.scss']
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
|
||||
|
||||
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.COMMENTS' | translate">
|
||||
<adf-comments [nodeId]="nodeId" [readOnly]="isCommentDisabled"></adf-comments>
|
||||
<adf-comments [nodeId]="nodeId" [readOnly]="!isCommentEnabled"></adf-comments>
|
||||
</adf-info-drawer-tab>
|
||||
|
||||
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.PROPERTIES' | translate">
|
||||
|
@@ -1,3 +1,12 @@
|
||||
.adf-viewer__sidebar {
|
||||
width: 380px !important;
|
||||
}
|
||||
|
||||
/* stylelint-disable */
|
||||
.monaco-scrollable-element {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
adf-preview-extension {
|
||||
width: 600px;
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ContentService, PermissionsEnum, NodesApiService } from '@alfresco/adf-core';
|
||||
import { ContentService, AllowableOperationsEnum, PermissionsEnum, NodesApiService } from '@alfresco/adf-core';
|
||||
import { MatSnackBar } from '@angular/material';
|
||||
|
||||
@Component({
|
||||
@@ -52,7 +52,7 @@ export class FileViewComponent implements OnInit {
|
||||
showLeftSidebar = null;
|
||||
showRightSidebar = false;
|
||||
customToolbar = false;
|
||||
isCommentDisabled = false;
|
||||
isCommentEnabled = false;
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
@@ -68,7 +68,8 @@ export class FileViewComponent implements OnInit {
|
||||
this.nodeApiService.getNode(id).subscribe(
|
||||
(node) => {
|
||||
if (node && node.isFile) {
|
||||
this.isCommentDisabled = this.contentServices.hasPermissions(node, PermissionsEnum.CONSUMER);
|
||||
this.isCommentEnabled = this.contentServices.hasPermissions(node, PermissionsEnum.NOT_CONSUMER) ||
|
||||
this.contentServices.hasAllowableOperations(node, AllowableOperationsEnum.UPDATE);
|
||||
this.nodeId = id;
|
||||
return;
|
||||
}
|
||||
|
@@ -16,8 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, ViewChild } from '@angular/core';
|
||||
import { FormComponent, FormModel, FormService, LogService } from '@alfresco/adf-core';
|
||||
import { FormOutcomeEvent } from '../../../../../lib/core/form/components/widgets/core';
|
||||
import { FormComponent, FormModel, FormService, LogService, FormOutcomeEvent } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-form-list',
|
||||
|
@@ -22,10 +22,9 @@ import {
|
||||
TaskDetailsModel,
|
||||
TaskUploadService
|
||||
} from '@alfresco/adf-process-services';
|
||||
import { UploadService, AlfrescoApiService, AppConfigService } from '@alfresco/adf-core';
|
||||
import { UploadService, AlfrescoApiService, AppConfigService, FileUploadCompleteEvent } from '@alfresco/adf-core';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { FileUploadCompleteEvent } from '../../../../../lib/core/events/file.event';
|
||||
|
||||
export function taskUploadServiceFactory(api: AlfrescoApiService, config: AppConfigService) {
|
||||
return new TaskUploadService(api, config);
|
||||
|
Reference in New Issue
Block a user