mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-2704] move Locked By to aca-shared library (#1322)
* move component to aca-shared * use aca-shared import * update e2e * fix selector prefix * remove * move node utils to aca-shared * update reference * fix lint * fix linting
This commit is contained in:
committed by
Denys Vuika
parent
4c7a95c7e6
commit
5102f7d64d
@@ -1,4 +1,9 @@
|
|||||||
.aca-locked-by {
|
.aca-locked-by {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 10px;
|
||||||
|
color: var(--theme-text-color, rgba(0, 0, 0, 0.54));
|
||||||
|
|
||||||
.locked_by--icon {
|
.locked_by--icon {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
width: 14px;
|
width: 14px;
|
||||||
@@ -7,5 +12,6 @@
|
|||||||
|
|
||||||
.locked_by--name {
|
.locked_by--name {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
padding: 0 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -46,7 +46,7 @@ import { NodeEntry } from '@alfresco/js-api';
|
|||||||
class: 'aca-locked-by'
|
class: 'aca-locked-by'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
export class LockByComponent implements OnInit {
|
export class LockedByComponent implements OnInit {
|
||||||
@Input()
|
@Input()
|
||||||
context: any;
|
context: any;
|
||||||
|
|
@@ -0,0 +1,36 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Alfresco Example Content Application
|
||||||
|
*
|
||||||
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
|
*
|
||||||
|
* This file is part of the Alfresco Example Content Application.
|
||||||
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
|
* provided under the following open source license terms:
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { LockedByComponent } from './locked-by.component';
|
||||||
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [CommonModule, MatIconModule],
|
||||||
|
declarations: [LockedByComponent],
|
||||||
|
exports: [LockedByComponent]
|
||||||
|
})
|
||||||
|
export class LockedByModule {}
|
@@ -28,6 +28,8 @@ export * from './lib/components/page-layout/page-layout-error.component';
|
|||||||
export * from './lib/components/page-layout/page-layout-header.component';
|
export * from './lib/components/page-layout/page-layout-header.component';
|
||||||
export * from './lib/components/page-layout/page-layout.component';
|
export * from './lib/components/page-layout/page-layout.component';
|
||||||
export * from './lib/components/page-layout/page-layout.module';
|
export * from './lib/components/page-layout/page-layout.module';
|
||||||
|
export * from './lib/components/locked-by/locked-by.component';
|
||||||
|
export * from './lib/components/locked-by/locked-by.module';
|
||||||
|
|
||||||
export * from './lib/routing/app.routes.strategy';
|
export * from './lib/routing/app.routes.strategy';
|
||||||
export * from './lib/routing/shared.guard';
|
export * from './lib/routing/shared.guard';
|
||||||
@@ -42,4 +44,6 @@ export * from './lib/components/generic-error/generic-error.module';
|
|||||||
export * from './lib/directives/contextmenu/contextmenu.directive';
|
export * from './lib/directives/contextmenu/contextmenu.directive';
|
||||||
export * from './lib/directives/contextmenu/contextmenu.module';
|
export * from './lib/directives/contextmenu/contextmenu.module';
|
||||||
|
|
||||||
|
export * from './lib/utils/node.utils';
|
||||||
|
|
||||||
export * from './lib/shared.module';
|
export * from './lib/shared.module';
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CustomNameColumnComponent } from './name-column/name-column.component';
|
import { CustomNameColumnComponent } from './name-column/name-column.component';
|
||||||
import { LockByComponent } from './locked-by/locked-by.component';
|
import { LockedByModule } from '@alfresco/aca-shared';
|
||||||
import { ContentModule } from '@alfresco/adf-content-services';
|
import { ContentModule } from '@alfresco/adf-content-services';
|
||||||
import { MaterialModule } from '../../material.module';
|
import { MaterialModule } from '../../material.module';
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
@@ -36,10 +36,11 @@ import { CoreModule } from '@alfresco/adf-core';
|
|||||||
BrowserModule,
|
BrowserModule,
|
||||||
CoreModule.forChild(),
|
CoreModule.forChild(),
|
||||||
ContentModule.forChild(),
|
ContentModule.forChild(),
|
||||||
MaterialModule
|
MaterialModule,
|
||||||
|
LockedByModule
|
||||||
],
|
],
|
||||||
declarations: [CustomNameColumnComponent, LockByComponent],
|
declarations: [CustomNameColumnComponent],
|
||||||
exports: [CustomNameColumnComponent, LockByComponent],
|
exports: [CustomNameColumnComponent],
|
||||||
entryComponents: [CustomNameColumnComponent, LockByComponent]
|
entryComponents: [CustomNameColumnComponent]
|
||||||
})
|
})
|
||||||
export class DocumentListCustomComponentsModule {}
|
export class DocumentListCustomComponentsModule {}
|
||||||
|
@@ -37,7 +37,7 @@ import { Actions, ofType } from '@ngrx/effects';
|
|||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { filter, takeUntil } from 'rxjs/operators';
|
import { filter, takeUntil } from 'rxjs/operators';
|
||||||
import { NodeActionTypes } from '@alfresco/aca-shared/store';
|
import { NodeActionTypes } from '@alfresco/aca-shared/store';
|
||||||
import { isLocked } from '../../../utils/node.utils';
|
import { isLocked } from '@alfresco/aca-shared';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'aca-custom-name-column',
|
selector: 'aca-custom-name-column',
|
||||||
|
@@ -25,8 +25,7 @@
|
|||||||
|
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
||||||
import { NodePermissionService } from '@alfresco/aca-shared';
|
import { NodePermissionService, isLocked } from '@alfresco/aca-shared';
|
||||||
import { isLocked } from '../../../utils/node.utils';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-comments-tab',
|
selector: 'app-comments-tab',
|
||||||
|
@@ -31,11 +31,10 @@ import {
|
|||||||
OnDestroy
|
OnDestroy
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
||||||
import { NodePermissionService } from '@alfresco/aca-shared';
|
import { NodePermissionService, isLocked } from '@alfresco/aca-shared';
|
||||||
import { AppStore, infoDrawerMetadataAspect } from '@alfresco/aca-shared/store';
|
import { AppStore, infoDrawerMetadataAspect } from '@alfresco/aca-shared/store';
|
||||||
import { AppExtensionService } from '../../../extensions/extension.service';
|
import { AppExtensionService } from '../../../extensions/extension.service';
|
||||||
import { AppConfigService, NotificationService } from '@alfresco/adf-core';
|
import { AppConfigService, NotificationService } from '@alfresco/adf-core';
|
||||||
import { isLocked } from '../../../utils/node.utils';
|
|
||||||
import { Observable, Subject } from 'rxjs';
|
import { Observable, Subject } from 'rxjs';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { ContentMetadataService } from '@alfresco/adf-content-services';
|
import { ContentMetadataService } from '@alfresco/adf-content-services';
|
||||||
|
@@ -47,7 +47,7 @@ import {
|
|||||||
ViewNodeExtras,
|
ViewNodeExtras,
|
||||||
SetSelectedNodesAction
|
SetSelectedNodesAction
|
||||||
} from '@alfresco/aca-shared/store';
|
} from '@alfresco/aca-shared/store';
|
||||||
import { isLocked, isLibrary } from '../utils/node.utils';
|
import { isLocked, isLibrary } from '@alfresco/aca-shared';
|
||||||
|
|
||||||
export abstract class PageComponent implements OnInit, OnDestroy {
|
export abstract class PageComponent implements OnInit, OnDestroy {
|
||||||
onDestroy$: Subject<boolean> = new Subject<boolean>();
|
onDestroy$: Subject<boolean> = new Subject<boolean>();
|
||||||
|
@@ -32,7 +32,7 @@ import {
|
|||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { NodeEntry, NodeBodyLock, SharedLinkEntry } from '@alfresco/js-api';
|
import { NodeEntry, NodeBodyLock, SharedLinkEntry } from '@alfresco/js-api';
|
||||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||||
import { isLocked } from '../utils/node.utils';
|
import { isLocked } from '@alfresco/aca-shared';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[acaLockNode]',
|
selector: '[acaLockNode]',
|
||||||
|
Reference in New Issue
Block a user