mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
ACS-7390: Core and Content Services as Standalone components (#10001)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div class="menu-container" *ngIf="!isEmpty()">
|
||||
<mat-list *ngIf="isList()" class="adf-app-list">
|
||||
<mat-list-item class="adf-app-list-item" (click)="selectApp(app)" (keyup.enter)="selectApp(app)" *ngFor="let app of appList" tabindex="0" role="button" title="{{app.name}}">
|
||||
<mat-icon matListIcon>touch_app</mat-icon>
|
||||
<mat-icon matListItemIcon>touch_app</mat-icon>
|
||||
<span matLine>{{getAppName(app) | translate}}</span>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
@@ -28,6 +28,7 @@ import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatLineModule } from '@angular/material/core';
|
||||
|
||||
const DEFAULT_TASKS_APP_NAME: string = 'ADF_TASK_LIST.APPS.TASK_APP_NAME';
|
||||
const DEFAULT_TASKS_APP_THEME: string = 'theme-2';
|
||||
@@ -39,7 +40,16 @@ export const APP_LIST_LAYOUT_GRID: string = 'GRID';
|
||||
@Component({
|
||||
selector: 'adf-apps',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatListModule, MatIconModule, MatCardModule, MatProgressSpinnerModule, TranslateModule, EmptyContentComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatListModule,
|
||||
MatIconModule,
|
||||
MatCardModule,
|
||||
MatProgressSpinnerModule,
|
||||
TranslateModule,
|
||||
EmptyContentComponent,
|
||||
MatLineModule
|
||||
],
|
||||
templateUrl: './apps-list.component.html',
|
||||
styleUrls: ['./apps-list.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
@@ -19,7 +19,7 @@ import { Component, Inject, ViewEncapsulation, ViewChild } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
||||
import { AlfrescoApiService, LoginDialogPanelComponent, TranslationService, AuthenticationService } from '@alfresco/adf-core';
|
||||
import { AttachFileWidgetDialogComponentData } from './attach-file-widget-dialog-component.interface';
|
||||
import { DocumentListService, SitesService, SearchService, ContentNodeSelectorModule } from '@alfresco/adf-content-services';
|
||||
import { DocumentListService, SitesService, SearchService, ContentNodeSelectorPanelComponent } from '@alfresco/adf-content-services';
|
||||
import { ExternalAlfrescoApiService } from '../../services/external-alfresco-api.service';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { CommonModule } from '@angular/common';
|
||||
@@ -29,7 +29,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
@Component({
|
||||
selector: 'adf-attach-file-widget-dialog',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatDialogModule, LoginDialogPanelComponent, ContentNodeSelectorModule, MatButtonModule, TranslateModule],
|
||||
imports: [CommonModule, MatDialogModule, LoginDialogPanelComponent, MatButtonModule, TranslateModule, ContentNodeSelectorPanelComponent],
|
||||
templateUrl: './attach-file-widget-dialog.component.html',
|
||||
styleUrls: ['./attach-file-widget-dialog.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
@@ -19,14 +19,14 @@ import { BaseViewerWidgetComponent, ErrorWidgetComponent, FormService } from '@a
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AlfrescoViewerModule } from '@alfresco/adf-content-services';
|
||||
import { AlfrescoViewerComponent } from '@alfresco/adf-content-services';
|
||||
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
@Component({
|
||||
selector: 'file-viewer-widget',
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, AlfrescoViewerModule, ErrorWidgetComponent],
|
||||
imports: [CommonModule, TranslateModule, AlfrescoViewerComponent, ErrorWidgetComponent],
|
||||
templateUrl: './file-viewer.widget.html',
|
||||
styleUrls: ['./file-viewer.widget.scss'],
|
||||
host: {
|
||||
|
@@ -1,55 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, from, of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { CommentModel, CommentsService } from '@alfresco/adf-core';
|
||||
|
||||
export const fakeUser1 = { id: 1, email: 'fake-email@dom.com', firstName: 'firstName', lastName: 'lastName', avatarId: '0' };
|
||||
|
||||
@Injectable()
|
||||
export class CommentProcessServiceMock implements Partial<CommentsService> {
|
||||
private comments: CommentModel[] = [];
|
||||
|
||||
get(_id: string): Observable<CommentModel[]> {
|
||||
this.comments.push(
|
||||
new CommentModel({
|
||||
id: 46,
|
||||
message: 'Hello from Process Model',
|
||||
created: new Date('2022-08-02T03:37:30.010+0000'),
|
||||
createdBy: fakeUser1
|
||||
})
|
||||
);
|
||||
|
||||
return of(this.comments);
|
||||
}
|
||||
|
||||
add(_id: string, _message: string): Observable<CommentModel> {
|
||||
return from(this.comments).pipe(
|
||||
map(
|
||||
(response) =>
|
||||
new CommentModel({
|
||||
id: response.id,
|
||||
message: response.message,
|
||||
created: response.created,
|
||||
createdBy: response.createdBy
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ADF_COMMENTS_SERVICE, CommentListModule, CommentModel } from '@alfresco/adf-core';
|
||||
import { ADF_COMMENTS_SERVICE, CommentListComponent, CommentModel } from '@alfresco/adf-core';
|
||||
import { CommentProcessService } from './services/comment-process.service';
|
||||
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, OnDestroy, ViewEncapsulation } from '@angular/core';
|
||||
import { Observable, Observer, Subject } from 'rxjs';
|
||||
@@ -29,7 +29,7 @@ import { FormsModule } from '@angular/forms';
|
||||
@Component({
|
||||
selector: 'adf-process-instance-comments',
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, MatFormFieldModule, MatInputModule, CommentListModule, FormsModule],
|
||||
imports: [CommonModule, TranslateModule, MatFormFieldModule, MatInputModule, CommentListComponent, FormsModule],
|
||||
providers: [
|
||||
{
|
||||
provide: ADF_COMMENTS_SERVICE,
|
||||
|
@@ -22,7 +22,7 @@ import {
|
||||
CardViewBaseItemModel,
|
||||
CardViewTextItemModel,
|
||||
TranslationService,
|
||||
CardViewModule
|
||||
CardViewComponent
|
||||
} from '@alfresco/adf-core';
|
||||
import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { ProcessInstanceRepresentation } from '@alfresco/js-api';
|
||||
@@ -32,7 +32,7 @@ import { MatCardModule } from '@angular/material/card';
|
||||
@Component({
|
||||
selector: 'adf-process-instance-header',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatCardModule, CardViewModule],
|
||||
imports: [CommonModule, MatCardModule, CardViewComponent],
|
||||
templateUrl: './process-instance-header.component.html',
|
||||
styleUrls: ['./process-instance-header.component.css']
|
||||
})
|
||||
|
@@ -16,14 +16,14 @@
|
||||
*/
|
||||
|
||||
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
||||
import { ADF_COMMENTS_SERVICE, CommentsModule } from '@alfresco/adf-core';
|
||||
import { ADF_COMMENTS_SERVICE, CommentsComponent } from '@alfresco/adf-core';
|
||||
import { TaskCommentsService } from '../services/task-comments.service';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-task-comments',
|
||||
standalone: true,
|
||||
imports: [CommonModule, CommentsModule],
|
||||
imports: [CommonModule, CommentsComponent],
|
||||
templateUrl: './task-comments.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
providers: [
|
||||
|
@@ -22,7 +22,8 @@ import {
|
||||
FormFieldValidator,
|
||||
FormModel,
|
||||
FormOutcomeEvent,
|
||||
InfoDrawerModule,
|
||||
InfoDrawerComponent,
|
||||
InfoDrawerTabComponent,
|
||||
UpdateNotification
|
||||
} from '@alfresco/adf-core';
|
||||
import {
|
||||
@@ -53,6 +54,7 @@ import { TaskHeaderComponent } from '../task-header/task-header.component';
|
||||
import { TaskCommentsComponent } from '../../../task-comments';
|
||||
import { ChecklistComponent } from '../checklist/checklist.component';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-task-details',
|
||||
@@ -62,14 +64,16 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
TranslateModule,
|
||||
TaskFormComponent,
|
||||
AttachFormComponent,
|
||||
InfoDrawerModule,
|
||||
PeopleSearchComponent,
|
||||
TaskHeaderComponent,
|
||||
PeopleComponent,
|
||||
TaskCommentsComponent,
|
||||
ChecklistComponent,
|
||||
MatDialogModule,
|
||||
MatButtonModule
|
||||
MatButtonModule,
|
||||
InfoDrawerTabComponent,
|
||||
InfoDrawerComponent,
|
||||
MatCardModule
|
||||
],
|
||||
templateUrl: './task-details.component.html',
|
||||
styleUrls: ['./task-details.component.scss'],
|
||||
|
@@ -25,7 +25,7 @@ import {
|
||||
AppConfigService,
|
||||
CardViewIntItemModel,
|
||||
CardViewItemLengthValidator,
|
||||
CardViewModule
|
||||
CardViewComponent
|
||||
} from '@alfresco/adf-core';
|
||||
import { PeopleProcessService } from '../../../services/people-process.service';
|
||||
import { TaskDescriptionValidator } from '../../validators/task-description.validator';
|
||||
@@ -40,7 +40,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
@Component({
|
||||
selector: 'adf-task-header',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatCardModule, CardViewModule, MatButtonModule, UnclaimTaskDirective, ClaimTaskDirective, TranslateModule],
|
||||
imports: [CommonModule, MatCardModule, MatButtonModule, UnclaimTaskDirective, ClaimTaskDirective, TranslateModule, CardViewComponent],
|
||||
templateUrl: './task-header.component.html',
|
||||
styleUrls: ['./task-header.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
Reference in New Issue
Block a user