Skip to content

Commit

Permalink
[ACS-5645]linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasa-Nataliya committed Sep 7, 2023
1 parent 32343ac commit a860554
Showing 1 changed file with 26 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@
* limitations under the License.
*/

import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
import {
Category,
CategoryEntry,
CategoryLinkBody,
CategoryPaging,
Node,
TagBody,
TagEntry,
TagPaging
} from '@alfresco/js-api';
ChangeDetectorRef,
Component,
EventEmitter,
Input,
OnChanges,
OnDestroy,
OnInit,
Output,
SimpleChanges,
ViewChild,
ViewEncapsulation
} from '@angular/core';
import { Category, CategoryEntry, CategoryLinkBody, CategoryPaging, Node, TagBody, TagEntry, TagPaging } from '@alfresco/js-api';
import { forkJoin, Observable, of, Subject, zip } from 'rxjs';
import {
AppConfigService,
Expand Down Expand Up @@ -144,8 +147,6 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
@Input()
editableTags = false;



private _assignedTags: string[] = [];
private assignedTagsEntries: TagEntry[];
private _editable = false;
Expand Down Expand Up @@ -186,7 +187,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
private categoryService: CategoryService,
private cdr: ChangeDetectorRef,
private contentService: ContentService,
private notificationService: NotificationService
private notificationService: NotificationService
) {
this.copyToClipboardAction = this.appConfig.get<boolean>('content-metadata.copy-to-clipboard-action');
this.multiValueSeparator = this.appConfig.get<string>('content-metadata.multi-value-pipe-separator') || DEFAULT_SEPARATOR;
Expand All @@ -195,20 +196,15 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {

ngOnInit() {
this.cardViewContentUpdateService.itemUpdated$
.pipe(
debounceTime(500),
takeUntil(this.onDestroy$))
.subscribe(
(updatedNode: UpdateNotification) => {
this.hasMetadataChanged = true;
this.targetProperty = updatedNode.target;
this.updateChanges(updatedNode.changed);
}
);
.pipe(debounceTime(500), takeUntil(this.onDestroy$))
.subscribe((updatedNode: UpdateNotification) => {
this.hasMetadataChanged = true;
this.targetProperty = updatedNode.target;
this.updateChanges(updatedNode.changed);
});

this.cardViewContentUpdateService.updatedAspect$.pipe(
debounceTime(500),
takeUntil(this.onDestroy$))
this.cardViewContentUpdateService.updatedAspect$
.pipe(debounceTime(500), takeUntil(this.onDestroy$))
.subscribe((node) => this.loadProperties(node));

this.loadProperties(this.node);
Expand Down Expand Up @@ -238,8 +234,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {

try {
statusCode = JSON.parse(error.message).error.statusCode;
} catch {
}
} catch {}

let message = `METADATA.ERRORS.${statusCode}`;

Expand Down Expand Up @@ -363,7 +358,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
}

showSnackbar(message: string): void {
this.notificationService.showError(message)
this.notificationService.showError(message);
}

toggleEdit(event: MouseEvent, group: CardViewGroup, buttonType: ButtonType): void {
Expand Down Expand Up @@ -456,7 +451,8 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
}

keyDown(event: KeyboardEvent) {
if (event.keyCode === 37 || event.keyCode === 39) { // ArrowLeft && ArrowRight
if (event.keyCode === 37 || event.keyCode === 39) {
// ArrowLeft && ArrowRight
event.stopPropagation();
}
}
Expand Down

0 comments on commit a860554

Please sign in to comment.