mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-5645] Property Panel Feature (#3477)
* [ACS-5540] changes for edit aspect button * added aspect edit button * [ACS-5540]fixed unit test cases and added unit test cases * [ACS-5540] Modified changes * [ACS-5540] fixed file lock issue * [ACS-5645]Implemented changes as per review comments * [ACS-5540]Modified the test case title * [ACS-5645] changes for aspect icon * [ACS-5645] fixed aspect lock issue in small screen * [ACS-5540] modified the aspect button changes * [ACS-5540] modified the changes * [ACS-5645] added unit test cases * [ACS-5540] removed unwanted code * [ACS-5540] fixed lock-file bug * [ACS-5540] revert the unwanted changes * [ACS-5540] modified changes * [ACS-5540]Implemented the changes as per the review comments * [ACS-5540] added group lock changes * [ACS-5540] added tooltip * [ACS-5540] Implemented the review comments * [ACS-5540] added tooltips * [ACS-5540] Added styles * [ACS-5540]Added focus * [ACS-5551]updated property panel design * [ACS-5551]added null checks * [ACS-5551] update style * [ACS-5540] changes for edit aspect button * added aspect edit button * [ACS-5540]fixed unit test cases and added unit test cases * [ACS-5540] Modified changes * [ACS-5645]Implemented changes as per review comments * [ACS-5645] changes for aspect icon * [ACS-5540] modified the aspect button changes * [ACS-5540] modified the changes * [ACS-5540] revert the unwanted changes * [ACS-5540] added group lock changes * [ACS-5551]updated property panel design * [ACS-5551]added null checks * [ACS-5551] update style * [ACS-5551] name updated * [ACS-5551] unit test fix * [ACS-5551] header issue fixed * [ACS-5645] style updated * [ACS-5645] border updated * [ACS-6117] fixed aspect dispaly issue * [ACS-5645] different node open issu fixed * [ACS-5645] unit test issue fix * [ACS-5645] unit test fix * [ACS-5645] tabs design modify * [ACS-5645] dependency updated * [link-adf:ACS-564 5-property-panel-feature] test linking * "[link-adf:ACS-5645-property-panel-feature]" * [ACS-5645] revert adf linking changes * add adf configs to libs * fix issue with empty paths * try using adf target * [link-adf:ACS-5645-property-panel-feature] fix core mapping * [link-adf:ACS-5645-property-panel-feature] revert target changes * remove useless styles * remove css hacks * cleanup useless properties * remove useless properties * remove useless code * [ACS-5645] added missing code * [ACS-5654] add icon for full screen * [ACS-5654] nodei con methods moved to thumbnail * [ACS-5654] unit test added and code refactor * [ACS-5645] unit test added * [ACS-5645] panel issue fix * [ACS-5645] removed unit test for editable property * [ACS-5645] removed unused unit test * [ACS-5645] unit test updated * [ACS-5645] updated the unit test * Modified the unit test cases for getNodeIcon * Upsteam ADF-6.6.0-7287333895, Js-api-7.5.0-7287333895 version * Fix failing test cases * Fix failing e2e --------- Co-authored-by: Yasa-Nataliya <yasa.nataliya@globallogic.com> Co-authored-by: pkundu <priyanka.kundu@hyland.com> Co-authored-by: Denys Vuika <denys.vuika@gmail.com> Co-authored-by: rbahirsheth <raviraj.bahirsheth@globallogic.com>
This commit is contained in:
@@ -25,10 +25,9 @@
|
||||
import { Component, Input, ViewEncapsulation, OnInit, OnDestroy } from '@angular/core';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { NodePermissionService, isLocked, AppExtensionService } from '@alfresco/aca-shared';
|
||||
import { AppStore, EditOfflineAction, infoDrawerMetadataAspect, NodeActionTypes } from '@alfresco/aca-shared/store';
|
||||
import { EditOfflineAction, NodeActionTypes } from '@alfresco/aca-shared/store';
|
||||
import { AppConfigService, NotificationService } from '@alfresco/adf-core';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { Store } from '@ngrx/store';
|
||||
import {
|
||||
ContentMetadataModule,
|
||||
ContentMetadataService,
|
||||
@@ -45,17 +44,15 @@ import { Actions, ofType } from '@ngrx/effects';
|
||||
imports: [CommonModule, ContentMetadataModule],
|
||||
selector: 'app-metadata-tab',
|
||||
template: `
|
||||
<adf-content-metadata-card
|
||||
[readOnly]="!canUpdateNode"
|
||||
<adf-content-metadata
|
||||
[readOnly]="readOnly"
|
||||
[preset]="'custom'"
|
||||
[node]="node"
|
||||
[displayAspect]="displayAspect$ | async"
|
||||
[customPanels]="customPanels | async"
|
||||
[(editable)]="editable"
|
||||
[displayCategories]="displayCategories"
|
||||
[displayTags]="displayTags"
|
||||
>
|
||||
</adf-content-metadata-card>
|
||||
</adf-content-metadata>
|
||||
`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'app-metadata-tab' }
|
||||
@@ -68,15 +65,12 @@ export class MetadataTabComponent implements OnInit, OnDestroy {
|
||||
@Input()
|
||||
node: Node;
|
||||
|
||||
displayAspect$: Observable<string>;
|
||||
canUpdateNode = false;
|
||||
editable = false;
|
||||
readOnly = false;
|
||||
customPanels: Observable<ContentMetadataCustomPanel[]>;
|
||||
|
||||
get displayCategories(): boolean {
|
||||
return this._displayCategories;
|
||||
}
|
||||
|
||||
get displayTags(): boolean {
|
||||
return this._displayTags;
|
||||
}
|
||||
@@ -85,7 +79,6 @@ export class MetadataTabComponent implements OnInit, OnDestroy {
|
||||
private permission: NodePermissionService,
|
||||
protected extensions: AppExtensionService,
|
||||
private appConfig: AppConfigService,
|
||||
private store: Store<AppStore>,
|
||||
private notificationService: NotificationService,
|
||||
private contentMetadataService: ContentMetadataService,
|
||||
private actions$: Actions,
|
||||
@@ -95,12 +88,12 @@ export class MetadataTabComponent implements OnInit, OnDestroy {
|
||||
if (this.extensions.contentMetadata) {
|
||||
this.appConfig.config['content-metadata'].presets = this.extensions.contentMetadata.presets;
|
||||
}
|
||||
this.displayAspect$ = this.store.select(infoDrawerMetadataAspect);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this._displayTags = this.tagService.areTagsEnabled();
|
||||
this._displayCategories = this.categoryService.areCategoriesEnabled();
|
||||
|
||||
this.contentMetadataService.error.pipe(takeUntil(this.onDestroy$)).subscribe((err: { message: string }) => {
|
||||
this.notificationService.showError(err.message);
|
||||
});
|
||||
@@ -113,9 +106,6 @@ export class MetadataTabComponent implements OnInit, OnDestroy {
|
||||
)
|
||||
.subscribe((updatedNode) => {
|
||||
this.checkIfNodeIsUpdatable(updatedNode?.payload.entry);
|
||||
if (!this.canUpdateNode) {
|
||||
this.editable = false;
|
||||
}
|
||||
});
|
||||
this.customPanels = this.extensions.getCustomMetadataPanels({ entry: this.node }).pipe(
|
||||
map((panels) => {
|
||||
@@ -133,6 +123,6 @@ export class MetadataTabComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
private checkIfNodeIsUpdatable(node: Node) {
|
||||
this.canUpdateNode = node && !isLocked({ entry: node }) ? this.permission.check(node, ['update']) : false;
|
||||
this.readOnly = !(node && !isLocked({ entry: node }) ? this.permission.check(node, ['update']) : false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user