From 0a17fb4f4c1c24db72918c8cc922e2570bbd2cf8 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 15 Jan 2025 08:37:46 -0500 Subject: [PATCH] AAE-26215 Standalone process cloud components (#10553) --- docs/README.md | 5 +- .../images/adf-task-audit-directive.png | Bin 7050 -> 0 bytes .../edit-process-filter-cloud.component.md | 93 +++++----- .../process-filters-cloud.component.md | 28 +-- .../components/task-details.component.md | 21 --- .../directives/task-audit.directive.md | 42 ----- .../src/lib/material.module.ts | 92 ---------- .../src/lib/process-services-cloud.module.ts | 35 ++-- .../src/lib/process/process-cloud.module.ts | 10 +- .../edit-process-filter-cloud.component.html | 23 ++- .../edit-process-filter-cloud.component.scss | 0 ...dit-process-filter-cloud.component.spec.ts | 52 ++---- .../edit-process-filter-cloud.component.ts | 50 ++++-- ...process-filter-dialog-cloud.component.html | 13 +- ...process-filter-dialog-cloud.component.scss | 0 ...cess-filter-dialog-cloud.component.spec.ts | 5 +- .../process-filter-dialog-cloud.component.ts | 10 +- .../process-filters-cloud.component.html | 0 .../process-filters-cloud.component.scss | 0 .../process-filters-cloud.component.spec.ts | 26 +-- .../process-filters-cloud.component.ts | 33 ++-- .../process-filters-cloud.module.ts | 36 ++-- .../lib/process/process-filters/public-api.ts | 6 +- .../process-list-cloud.component.html | 2 +- .../process-list-cloud.component.spec.ts | 163 +++++++++++++++++- .../process-list-cloud.component.ts | 129 ++++++++------ .../mock/process-list-service.mock.ts | 163 ------------------ .../process-list/process-list-cloud.module.ts | 6 +- .../mock/start-process.component.mock.ts | 11 -- .../src/lib/task/task-cloud.module.ts | 1 + .../edit-task-filter-cloud.component.ts | 4 +- .../task-list-cloud.component.spec.ts | 23 ++- .../task-list/task-list-cloud.component.ts | 7 + .../task/task-list/task-list-cloud.module.ts | 1 + .../no-task-detail-template.directive.spec.ts | 36 ---- .../no-task-detail-template.directive.ts | 39 ----- .../task-audit/task-audit.directive.spec.ts | 155 ----------------- .../task-audit/task-audit.directive.ts | 121 ------------- .../src/lib/task-list/public-api.ts | 8 +- 39 files changed, 475 insertions(+), 974 deletions(-) delete mode 100644 docs/docassets/images/adf-task-audit-directive.png delete mode 100644 docs/process-services/directives/task-audit.directive.md delete mode 100644 lib/process-services-cloud/src/lib/material.module.ts rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => edit-process-filter}/edit-process-filter-cloud.component.html (85%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => edit-process-filter}/edit-process-filter-cloud.component.scss (100%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => edit-process-filter}/edit-process-filter-cloud.component.spec.ts (95%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => edit-process-filter}/edit-process-filter-cloud.component.ts (93%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => process-filter-dialog}/process-filter-dialog-cloud.component.html (67%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => process-filter-dialog}/process-filter-dialog-cloud.component.scss (100%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => process-filter-dialog}/process-filter-dialog-cloud.component.spec.ts (95%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => process-filter-dialog}/process-filter-dialog-cloud.component.ts (75%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => process-filters}/process-filters-cloud.component.html (100%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => process-filters}/process-filters-cloud.component.scss (100%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => process-filters}/process-filters-cloud.component.spec.ts (97%) rename lib/process-services-cloud/src/lib/process/process-filters/components/{ => process-filters}/process-filters-cloud.component.ts (90%) delete mode 100644 lib/process-services-cloud/src/lib/process/process-list/mock/process-list-service.mock.ts delete mode 100644 lib/process-services/src/lib/task-list/components/no-task-details/no-task-detail-template.directive.spec.ts delete mode 100644 lib/process-services/src/lib/task-list/components/no-task-details/no-task-detail-template.directive.ts delete mode 100644 lib/process-services/src/lib/task-list/components/task-audit/task-audit.directive.spec.ts delete mode 100644 lib/process-services/src/lib/task-list/components/task-audit/task-audit.directive.ts diff --git a/docs/README.md b/docs/README.md index 0b42a6d5e1..47f1556eca 100644 --- a/docs/README.md +++ b/docs/README.md @@ -445,7 +445,6 @@ for more information about installing and using the source code. | ---- | ----------- | ----------- | | [Claim Task Directive](process-services/directives/claim-task.directive.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Claims a task | [Source](../lib/process-services/src/lib/task-list/components/task-form/claim-task.directive.ts) | | [Process Audit Directive](process-services/directives/process-audit.directive.md) | Fetches the Process Audit information in PDF or JSON format. | [Source](../lib/process-services/src/lib/process-list/components/process-audit/process-audit.directive.ts) | -| [Task Audit Directive](process-services/directives/task-audit.directive.md) | Fetches the Task Audit information in PDF or JSON format. | [Source](../lib/process-services/src/lib/task-list/components/task-audit/task-audit.directive.ts) | | [Unclaim Task Directive](process-services/directives/unclaim-task.directive.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Unclaims a task | [Source](../lib/process-services/src/lib/task-list/components/task-form/unclaim-task.directive.ts) | ### Services @@ -475,7 +474,7 @@ for more information about installing and using the source code. | Name | Description | Source link | | ---- | ----------- | ----------- | | [App List Cloud Component](process-services-cloud/components/app-list-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows all deployed cloud application instances. | [Source](../lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.ts) | -| [Edit Process Filter Cloud component](process-services-cloud/components/edit-process-filter-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows/edits process filter details. | [Source](../lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts) | +| [Edit Process Filter Cloud component](process-services-cloud/components/edit-process-filter-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows/edits process filter details. | [Source](../lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter/edit-process-filter-cloud.component.ts) | | [Edit Task Filter Cloud component](process-services-cloud/components/edit-task-filter-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Edits task filter details. | [Source](../lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.ts) | | [Form cloud custom outcomes component](process-services-cloud/components/form-cloud-custom-outcome.component.md) | Supplies custom outcome buttons to be included in Form cloud component. | [Source](../lib/process-services-cloud/src/lib/form/components/form-cloud-custom-outcomes.component.ts) | | [Form cloud component](process-services-cloud/components/form-cloud.component.md) | Shows a form from Process Services. | [Source](../lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts) | @@ -485,7 +484,7 @@ for more information about installing and using the source code. Added: v3.0.0 Status: Experimental | [Source](<>) | -| [Process Filters Cloud Component](process-services-cloud/components/process-filters-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Lists all available process filters and allows to select a filter. | [Source](../lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts) | +| [Process Filters Cloud Component](process-services-cloud/components/process-filters-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Lists all available process filters and allows to select a filter. | [Source](../lib/process-services-cloud/src/lib/process/process-filters/components/process-filters/process-filters-cloud.component.ts) | | [Process Header Cloud Component](process-services-cloud/components/process-header-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows all the information related to a process instance. | [Source](../lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.ts) | | [Process Instance List Cloud component](process-services-cloud/components/process-list-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Renders a list containing all the process instances matched by the parameters specified. | [Source](../lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts) | | [Start Process Cloud Component](process-services-cloud/components/start-process-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Starts a process. | [Source](../lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.ts) | diff --git a/docs/docassets/images/adf-task-audit-directive.png b/docs/docassets/images/adf-task-audit-directive.png deleted file mode 100644 index 770e27c33b2909628392ca25d0c2648e589cf985..0000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y%<35TD%jDjix*zm<%AC5mQvMOjH?(g`+Ldjx+UDy;1Z@|(fq9) z@P-va`Kw+1YbzX|j>^9%bTz-ZdAU!raN1wH2u6tE##QM>lNDDku73)%66+xymdMBV zUn;!->wB(@4C}Ik&BFU(HzrHVCaOcys16(}@<)4w3RtmQALJ|z>vIhEV=k)edwFI# zn!lSDYR#^iq`;Rk8moN`TeS>Zjs`>(Bh43{u2t?P@f-`rO#5rnWH#0EwXqm88~faN zw}u{C(*zVh<4FAk-Ys&{p}!*eBfjvD-j^_IPDl=WHOh3qNA@ZG8kZd2$_Ck8Drj|K zZwsgp04+IrO(3Hkp2Ie3wliKE(O3s1xJk1&s3C6VHM;yQ zOH+B(3zM-u@%_GTl#&WPvfqK7$M_CI5hMS^>x1W-yA-Qj*Fo4DQFm^k)NT-f7{vWg z>i%4Y|7XemFZ1xf+JbY>@u$i7&m?@x|ED+kPxRthSSTPehVoDL7wnh*b|+n^BVI02 WW?h3HMmfLTu%3>QcFnDOQU3)qe?yi4 diff --git a/docs/process-services-cloud/components/edit-process-filter-cloud.component.md b/docs/process-services-cloud/components/edit-process-filter-cloud.component.md index 766937e06f..f95465e87f 100644 --- a/docs/process-services-cloud/components/edit-process-filter-cloud.component.md +++ b/docs/process-services-cloud/components/edit-process-filter-cloud.component.md @@ -5,7 +5,7 @@ Status: Experimental Last reviewed: 2023-04-03 --- -# [Edit Process Filter Cloud component](../../../lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts "Defined in edit-process-filter-cloud.component.ts") +# Edit Process Filter Cloud component Shows/edits process filter details. @@ -41,27 +41,27 @@ Shows/edits process filter details. ### Properties -| Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| actions | `string[]` | DEFAULT_ACTIONS | List of sort actions. | -| appName | `string` | "" | The name of the application. | -| environmentId | `string` | | [Environment](../../../lib/process-services-cloud/src/lib/common/interface/environment.interface.ts) ID of the application. | -| environmentList | [`Environment`](../../../lib/process-services-cloud/src/lib/common/interface/environment.interface.ts)`[]` | \[] | List of environments. | -| filterProperties | `string[]` | | List of process filter properties to display | -| id | `string` | | Id of the process instance filter. | -| role | `string` | "" | roles to filter the apps | -| showFilterActions | `boolean` | true | Toggles editing of process filter actions. | -| showProcessFilterName | `boolean` | true | Toggles the appearance of the process filter name . | -| showTitle | `boolean` | true | Toggles editing of the process filter title. | -| sortProperties | `string[]` | | List of sort properties to display. | -| processFilter | [`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts) | | Process filter | +| Name | Type | Default value | Description | +|-----------------------|---------------------------|-----------------|-----------------------------------------------------| +| actions | `string[]` | DEFAULT_ACTIONS | List of sort actions. | +| appName | `string` | "" | The name of the application. | +| environmentId | `string` | | Environment ID of the application. | +| environmentList | `Environment[]` | \[] | List of environments. | +| filterProperties | `string[]` | | List of process filter properties to display | +| id | `string` | | Id of the process instance filter. | +| role | `string` | "" | roles to filter the apps | +| showFilterActions | `boolean` | true | Toggles editing of process filter actions. | +| showProcessFilterName | `boolean` | true | Toggles the appearance of the process filter name . | +| showTitle | `boolean` | true | Toggles editing of the process filter title. | +| sortProperties | `string[]` | | List of sort properties to display. | +| processFilter | `ProcessFilterCloudModel` | | Process filter | ### Events -| Name | Type | Description | -| ---- | ---- | ----------- | -| action | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessFilterAction`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)`>` | Emitted when a filter action occurs i.e Save, SaveAs, Delete. | -| filterChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)`>` | Emitted when a process instance filter property changes. | +| Name | Type | Description | +|--------------|-----------------------------------------|---------------------------------------------------------------| +| action | `EventEmitter` | Emitted when a filter action occurs i.e Save, SaveAs, Delete. | +| filterChange | `EventEmitter` | Emitted when a process instance filter property changes. | ## Details @@ -72,8 +72,8 @@ Use the `appName` and `id` properties to choose which process filter to edit: ```html - + [appName]="appName" +/> ``` ### Filter properties @@ -82,18 +82,18 @@ You can supply various _filter properties_ to edit. These will determine which processes are found by a filter. The full set of properties is given below: -| Name | Description | -| ---- | ----------- | -| **_appName_** | Name of the app | -| **_id_** | Process instance ID | -| **_name_** | Process name. | -| **_initiator_** | ID of the user who initiated the process | -| **_status_** | Execution status of the process. | -| **_processDefinitionId_** | Process definition ID | -| **_processDefinitionKey_** | Process definition key | -| **_lastModified_** | Date the process was last modified. If lastModified defined the component will show the range **_lastModifiedTo_**, **_lastModifiedFrom_** | -| **_sort_** | Field on which the filter results will be sorted. Can be "id", "name", "status", "startDate". | -| **_order_** | Sort ordering of the filter results (this doesn't participate in the filtering itself) | +| Name | Description | +|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------| +| **_appName_** | Name of the app | +| **_id_** | Process instance ID | +| **_name_** | Process name. | +| **_initiator_** | ID of the user who initiated the process | +| **_status_** | Execution status of the process. | +| **_processDefinitionId_** | Process definition ID | +| **_processDefinitionKey_** | Process definition key | +| **_lastModified_** | Date the process was last modified. If lastModified defined the component will show the range **_lastModifiedTo_**, **_lastModifiedFrom_** | +| **_sort_** | Field on which the filter results will be sorted. Can be "id", "name", "status", "startDate". | +| **_order_** | Sort ordering of the filter results (this doesn't participate in the filtering itself) | By default, the **_status_**, **_sort_** and **_order_** properties are displayed in the editor. However, you can also choose which properties @@ -118,14 +118,15 @@ export class SomeComponent implements OnInit { onAction($event: ProcessFilterAction) { console.log('Clicked action: ', $event); } +} ``` ```html - + [filterProperties]="filterProperties" +/> ``` With this configuration, only the four listed properties will be shown. @@ -146,7 +147,8 @@ export class SomeComponent implements OnInit { sortProperties: string[] = [ "startDate", - "lastModified"]; + "lastModified" + ]; onFilterChange(filter: ProcessFilterCloudModel) { console.log('On filter change: ', filter); @@ -155,14 +157,15 @@ export class SomeComponent implements OnInit { onAction($event: ProcessFilterAction) { console.log('Clicked action: ', $event); } +} ``` ```html - + [sortProperties]="sortProperties" +/> ``` With this configuration, only the two listed sort properties will be shown. @@ -171,11 +174,11 @@ With this configuration, only the two listed sort properties will be shown. You can supply various _actions_ to apply on process filter. -| Name | Description | -| ---- | ----------- | -| **_save_** | Save process filter. | +| Name | Description | +|--------------|-------------------------------| +| **_save_** | Save process filter. | | **_saveAs_** | Creates a new process filter. | -| **_delete_** | Delete process filter. | +| **_delete_** | Delete process filter. | By default, the **_save_**, **_saveAs_** and **_delete_** actions are displayed in the editor. However, you can also choose which actions to @@ -194,14 +197,15 @@ export class SomeComponent implements OnInit { onAction($event: ProcessFilterAction) { console.log('Clicked action: ', $event); } +} ``` ```html - + [actions]="actions" +/> ``` With this configuration, only the two actions will be shown. @@ -211,7 +215,6 @@ With this configuration, only the two actions will be shown. Users can save a filter if they make any changes to it in an application using the **Save** icon. How it is saved is dictated by the Activiti version used: - An Activiti 7 community version stores saved filters in the local browser storage. This restricts a user's custom filters to that single session. - - An Activiti Enterprise version uses the preference service to store saved filters. This allows for user's custom filters to be available between sessions and between devices. ## See also diff --git a/docs/process-services-cloud/components/process-filters-cloud.component.md b/docs/process-services-cloud/components/process-filters-cloud.component.md index 59e77352a4..d960153d1d 100644 --- a/docs/process-services-cloud/components/process-filters-cloud.component.md +++ b/docs/process-services-cloud/components/process-filters-cloud.component.md @@ -5,7 +5,7 @@ Status: Experimental Last reviewed: 2019-01-08 --- -# [Process Filters Cloud Component](../../../lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts "Defined in process-filters-cloud.component.ts") +# Process Filters Cloud Component Lists all available process filters and allows to select a filter. @@ -14,28 +14,28 @@ Lists all available process filters and allows to select a filter. ```html - + [showIcons]="true" +/> ``` ## Class members ### Properties -| Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| appName | `string` | "" | (required) The application name | -| filterParam | `UserTaskFilterRepresentation` | | (optional) The filter to be selected by default | -| showIcons | `boolean` | false | (optional) Toggles showing an icon by the side of each filter | +| Name | Type | Default value | Description | +|-------------|--------------------------------|---------------|---------------------------------------------------------------| +| appName | `string` | "" | (required) The application name | +| filterParam | `UserTaskFilterRepresentation` | | (optional) The filter to be selected by default | +| showIcons | `boolean` | false | (optional) Toggles showing an icon by the side of each filter | ### Events -| Name | Type | Description | -| ---- | ---- | ----------- | -| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when any error occurs while loading the filters | -| filterClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)`>` | Emitted when a filter is being clicked from the UI. | -| filterSelected | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)`>` | Emitted when a filter is being selected based on the filterParam input. | -| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when filters are loaded successfully | +| Name | Type | Description | +|----------------|-----------------------------------------|-------------------------------------------------------------------------| +| error | `EventEmitter` | Emitted when any error occurs while loading the filters | +| filterClicked | `EventEmitter` | Emitted when a filter is being clicked from the UI. | +| filterSelected | `EventEmitter` | Emitted when a filter is being selected based on the filterParam input. | +| success | `EventEmitter` | Emitted when filters are loaded successfully | ## See also diff --git a/docs/process-services/components/task-details.component.md b/docs/process-services/components/task-details.component.md index 4f21be779f..b0b24e14a1 100644 --- a/docs/process-services/components/task-details.component.md +++ b/docs/process-services/components/task-details.component.md @@ -53,24 +53,3 @@ Shows the details of the task ID passed in as input. | taskCreated | `EventEmitter` | Emitted when a checklist task is created. | | taskDeleted | `EventEmitter` | Emitted when a checklist task is deleted. | | unClaimedTask | `EventEmitter` | Emitted when a task is unclaimed. | - -## Details - -### Custom 'empty Task Details' template - -By default, the [Task Details component](task-details.component.md) shows "No Tasks" message when there are -no details. You can change this by adding a custom HTML template as in the following -example: - -```html - - - -

Sorry, no tasks here

- example -
-
-
-``` - -Note that you can use any HTML content in the template, including other Angular components. diff --git a/docs/process-services/directives/task-audit.directive.md b/docs/process-services/directives/task-audit.directive.md deleted file mode 100644 index 87a1f0e5cc..0000000000 --- a/docs/process-services/directives/task-audit.directive.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -Title: Task Audit Directive -Added: v2.0.0 -Status: Active -Last reviewed: 2019-01-14 ---- - -# [Task Audit Directive](../../../lib/process-services/src/lib/task-list/components/task-audit/task-audit.directive.ts "Defined in task-audit.directive.ts") - -Fetches the Task Audit information in PDF or JSON format. - -![adf-task-audit-directive](../../docassets/images/adf-task-audit-directive.png) - -## Basic Usage - -```html - -``` - -## Class members - -### Properties - -| Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| download | `boolean` | true | Enables downloading of the audit when the decorated element is clicked. | -| fileName | `string` | "Audit" | Name of the downloaded file (for PDF downloads). | -| format | `string` | "pdf" | Format of the audit information. Can be "pdf" or "json". | -| taskId | `string` | | (**required**) The id of the task. | - -### Events - -| Name | Type | Description | -| ---- | ---- | ----------- | -| clicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the decorated element is clicked. | -| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an error occurs. | diff --git a/lib/process-services-cloud/src/lib/material.module.ts b/lib/process-services-cloud/src/lib/material.module.ts deleted file mode 100644 index b9a832560a..0000000000 --- a/lib/process-services-cloud/src/lib/material.module.ts +++ /dev/null @@ -1,92 +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 { NgModule } from '@angular/core'; -import { MatAutocompleteModule } from '@angular/material/autocomplete'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatChipsModule } from '@angular/material/chips'; -import { MatNativeDateModule, MatRippleModule, MatOptionModule } from '@angular/material/core'; -import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field'; -import { MatDatepickerModule } from '@angular/material/datepicker'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatGridListModule } from '@angular/material/grid-list'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatListModule } from '@angular/material/list'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatRadioModule } from '@angular/material/radio'; -import { MatSelectModule } from '@angular/material/select'; -import { MatSlideToggleModule } from '@angular/material/slide-toggle'; -import { MatTableModule } from '@angular/material/table'; -import { MatTabsModule } from '@angular/material/tabs'; - -@NgModule({ - providers: [{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { floatLabel: 'never' } }], - imports: [ - MatAutocompleteModule, - MatButtonModule, - MatCardModule, - MatDialogModule, - MatCheckboxModule, - MatDatepickerModule, - MatGridListModule, - MatIconModule, - MatInputModule, - MatListModule, - MatOptionModule, - MatRadioModule, - MatSelectModule, - MatSlideToggleModule, - MatTableModule, - MatTabsModule, - MatProgressSpinnerModule, - MatNativeDateModule, - MatRippleModule, - MatChipsModule, - MatMenuModule, - MatExpansionModule - ], - exports: [ - MatAutocompleteModule, - MatButtonModule, - MatCardModule, - MatDialogModule, - MatCheckboxModule, - MatDatepickerModule, - MatGridListModule, - MatIconModule, - MatInputModule, - MatListModule, - MatOptionModule, - MatRadioModule, - MatSelectModule, - MatSlideToggleModule, - MatTableModule, - MatTabsModule, - MatProgressSpinnerModule, - MatNativeDateModule, - MatRippleModule, - MatChipsModule, - MatMenuModule, - MatExpansionModule - ] -}) -export class MaterialModule {} diff --git a/lib/process-services-cloud/src/lib/process-services-cloud.module.ts b/lib/process-services-cloud/src/lib/process-services-cloud.module.ts index 4a994895ee..435826dbac 100644 --- a/lib/process-services-cloud/src/lib/process-services-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/process-services-cloud.module.ts @@ -16,7 +16,7 @@ */ import { NgModule, ModuleWithProviders } from '@angular/core'; -import { CoreModule, FormRenderingService, provideTranslations } from '@alfresco/adf-core'; +import { FormRenderingService, provideTranslations } from '@alfresco/adf-core'; import { APP_LIST_CLOUD_DIRECTIVES } from './app/app-list-cloud.module'; import { TaskCloudModule } from './task/task-cloud.module'; import { ProcessCloudModule } from './process/process-cloud.module'; @@ -31,35 +31,22 @@ import { TASK_LIST_PREFERENCES_SERVICE_TOKEN } from './services/public-api'; import { CloudFormRenderingService } from './form/components/cloud-form-rendering.service'; -import { ApolloModule } from 'apollo-angular'; import { RichTextEditorComponent } from './rich-text-editor'; import { GroupCloudComponent } from './group/components/group-cloud.component'; import { PeopleCloudComponent } from './people/components/people-cloud.component'; +export const PROCESS_SERVICES_CLOUD_DIRECTIVES = [ + ...APP_LIST_CLOUD_DIRECTIVES, + ...FORM_CLOUD_DIRECTIVES, + ...TASK_FORM_CLOUD_DIRECTIVES, + PeopleCloudComponent, + RichTextEditorComponent +] as const; + @NgModule({ - imports: [ - CoreModule, - ...APP_LIST_CLOUD_DIRECTIVES, - ProcessCloudModule, - TaskCloudModule, - GroupCloudComponent, - PeopleCloudComponent, - ...FORM_CLOUD_DIRECTIVES, - ...TASK_FORM_CLOUD_DIRECTIVES, - ApolloModule, - RichTextEditorComponent - ], + imports: [ProcessCloudModule, TaskCloudModule, GroupCloudComponent, ...PROCESS_SERVICES_CLOUD_DIRECTIVES], providers: [provideTranslations('adf-process-services-cloud', 'assets/adf-process-services-cloud')], - exports: [ - ...APP_LIST_CLOUD_DIRECTIVES, - ProcessCloudModule, - TaskCloudModule, - GroupCloudComponent, - ...FORM_CLOUD_DIRECTIVES, - ...TASK_FORM_CLOUD_DIRECTIVES, - PeopleCloudComponent, - RichTextEditorComponent - ] + exports: [ProcessCloudModule, TaskCloudModule, GroupCloudComponent, ...PROCESS_SERVICES_CLOUD_DIRECTIVES] }) export class ProcessServicesCloudModule { static forRoot( diff --git a/lib/process-services-cloud/src/lib/process/process-cloud.module.ts b/lib/process-services-cloud/src/lib/process/process-cloud.module.ts index 5487d76494..89c724d581 100644 --- a/lib/process-services-cloud/src/lib/process/process-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/process/process-cloud.module.ts @@ -16,14 +16,16 @@ */ import { NgModule } from '@angular/core'; -import { ProcessFiltersCloudModule } from './process-filters/process-filters-cloud.module'; +import { PROCESS_FILTERS_CLOUD_DIRECTIVES } from './process-filters/process-filters-cloud.module'; import { ProcessListCloudModule } from './process-list/process-list-cloud.module'; -import { CoreModule } from '@alfresco/adf-core'; import { StartProcessCloudComponent } from './start-process/components/start-process-cloud.component'; import { ProcessHeaderCloudComponent } from './process-header/components/process-header-cloud.component'; +export const PROCESS_CLOUD_DIRECTIVES = [StartProcessCloudComponent, ProcessHeaderCloudComponent] as const; + +/** @deprecated use standalone components or PROCESS_CLOUD_DIRECTIVES instead */ @NgModule({ - imports: [CoreModule, ProcessFiltersCloudModule, ProcessListCloudModule, StartProcessCloudComponent, ProcessHeaderCloudComponent], - exports: [ProcessFiltersCloudModule, ProcessListCloudModule, StartProcessCloudComponent, ProcessHeaderCloudComponent] + imports: [...PROCESS_FILTERS_CLOUD_DIRECTIVES, ProcessListCloudModule, ...PROCESS_CLOUD_DIRECTIVES], + exports: [...PROCESS_FILTERS_CLOUD_DIRECTIVES, ProcessListCloudModule, ...PROCESS_CLOUD_DIRECTIVES] }) export class ProcessCloudModule {} diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.html b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter/edit-process-filter-cloud.component.html similarity index 85% rename from lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.html rename to lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter/edit-process-filter-cloud.component.html index 769de7df98..66b70c8e47 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.html +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter/edit-process-filter-cloud.component.html @@ -8,7 +8,12 @@ {{ 'ADF_CLOUD_EDIT_PROCESS_FILTER.TITLE' | translate}}
- @@ -72,14 +77,16 @@ [matDatepicker]="dateController" placeholder="{{processFilterProperty.label | translate}}" [attr.data-automation-id]="'adf-cloud-edit-process-property-' + processFilterProperty.key"> - - -
-
-
{{'ADF_CLOUD_EDIT_PROCESS_FILTER.ERROR.DATE' | translate}}
- warning + + +
+
+
{{'ADF_CLOUD_EDIT_PROCESS_FILTER.ERROR.DATE' | translate}}
+ warning +
-
{ @@ -106,17 +96,7 @@ describe('EditProcessFilterCloudComponent', () => { MatDialogModule, NoopTranslateModule, NoopAnimationsModule, - MatSelectModule, - MatDatepickerModule, - MatAutocompleteModule, - FullNamePipe, - MatFormFieldModule, - MatInputModule, - ReactiveFormsModule, - MatChipsModule, - MatProgressBarModule, - PeopleCloudComponent, - DateRangeFilterComponent + EditProcessFilterCloudComponent ], providers: [ { provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }, diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter/edit-process-filter-cloud.component.ts similarity index 93% rename from lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts rename to lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter/edit-process-filter-cloud.component.ts index 5a6aa9c878..86eca1cbf9 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter/edit-process-filter-cloud.component.ts @@ -16,28 +16,40 @@ */ import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; -import { AbstractControl, FormBuilder, FormControl, FormGroup } from '@angular/forms'; +import { AbstractControl, FormBuilder, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms'; import { DateAdapter } from '@angular/material/core'; import { MatDialog } from '@angular/material/dialog'; import { debounceTime, filter, finalize, switchMap, tap } from 'rxjs/operators'; import { Observable, Subscription } from 'rxjs'; -import { AppsProcessCloudService } from '../../../app/services/apps-process-cloud.service'; +import { AppsProcessCloudService } from '../../../../app/services/apps-process-cloud.service'; import { ProcessFilterAction, ProcessFilterCloudModel, ProcessFilterOptions, ProcessFilterProperties, ProcessSortFilterProperty -} from '../models/process-filter-cloud.model'; -import { DateFnsUtils, TranslationService, UserPreferencesService, UserPreferenceValues } from '@alfresco/adf-core'; -import { ProcessFilterCloudService } from '../services/process-filter-cloud.service'; -import { ProcessFilterDialogCloudComponent } from './process-filter-dialog-cloud.component'; -import { ProcessCloudService } from '../../services/process-cloud.service'; -import { DateCloudFilterType, DateRangeFilter } from '../../../models/date-cloud-filter.model'; -import { IdentityUserModel } from '../../../people/models/identity-user.model'; -import { Environment } from '../../../common/interface/environment.interface'; +} from '../../models/process-filter-cloud.model'; +import { DateFnsUtils, IconComponent, TranslationService, UserPreferencesService, UserPreferenceValues } from '@alfresco/adf-core'; +import { ProcessFilterCloudService } from '../../services/process-filter-cloud.service'; +import { ProcessFilterDialogCloudComponent } from '../process-filter-dialog/process-filter-dialog-cloud.component'; +import { ProcessCloudService } from '../../../services/process-cloud.service'; +import { DateCloudFilterType, DateRangeFilter } from '../../../../models/date-cloud-filter.model'; +import { IdentityUserModel } from '../../../../people/models/identity-user.model'; +import { Environment } from '../../../../common/interface/environment.interface'; import { endOfDay, isValid, startOfDay } from 'date-fns'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { TranslateModule } from '@ngx-translate/core'; +import { MatButtonModule } from '@angular/material/button'; +import { NgForOf, NgIf } from '@angular/common'; +import { MatExpansionModule } from '@angular/material/expansion'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatSelectModule } from '@angular/material/select'; +import { MatInputModule } from '@angular/material/input'; +import { MatDatepickerModule } from '@angular/material/datepicker'; +import { MatIconModule } from '@angular/material/icon'; +import { DateRangeFilterComponent } from '../../../../common/date-range-filter/date-range-filter.component'; +import { PeopleCloudComponent } from '../../../../people/components/people-cloud.component'; export const PROCESS_FILTER_ACTION_SAVE = 'save'; export const PROCESS_FILTER_ACTION_SAVE_AS = 'saveAs'; @@ -68,6 +80,24 @@ interface ProcessFilterFormProps { @Component({ selector: 'adf-cloud-edit-process-filter', + standalone: true, + imports: [ + IconComponent, + MatProgressSpinnerModule, + TranslateModule, + MatButtonModule, + NgForOf, + NgIf, + MatExpansionModule, + MatFormFieldModule, + MatSelectModule, + ReactiveFormsModule, + MatInputModule, + MatDatepickerModule, + MatIconModule, + DateRangeFilterComponent, + PeopleCloudComponent + ], templateUrl: './edit-process-filter-cloud.component.html', styleUrls: ['./edit-process-filter-cloud.component.scss'], encapsulation: ViewEncapsulation.None diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filter-dialog-cloud.component.html b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filter-dialog/process-filter-dialog-cloud.component.html similarity index 67% rename from lib/process-services-cloud/src/lib/process/process-filters/components/process-filter-dialog-cloud.component.html rename to lib/process-services-cloud/src/lib/process/process-filters/components/process-filter-dialog/process-filter-dialog-cloud.component.html index 475387c011..36649eda14 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filter-dialog-cloud.component.html +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filter-dialog/process-filter-dialog-cloud.component.html @@ -4,11 +4,14 @@ -
- - - -
+
+ + + +
` - }) - class BasicButtonComponent { - download: boolean = false; - fileName: string; - format: string; - - onAuditClick() {} - } - - let fixture: ComponentFixture; - let component: BasicButtonComponent; - let service: TaskListService; - - const createFakePdfBlob = (): Blob => { - const pdfData = atob( - 'JVBERi0xLjcKCjEgMCBvYmogICUgZW50cnkgcG9pbnQKPDwKICAvVHlwZSAvQ2F0YWxvZwog' + - 'IC9QYWdlcyAyIDAgUgo+PgplbmRvYmoKCjIgMCBvYmoKPDwKICAvVHlwZSAvUGFnZXMKICAv' + - 'TWVkaWFCb3ggWyAwIDAgMjAwIDIwMCBdCiAgL0NvdW50IDEKICAvS2lkcyBbIDMgMCBSIF0K' + - 'Pj4KZW5kb2JqCgozIDAgb2JqCjw8CiAgL1R5cGUgL1BhZ2UKICAvUGFyZW50IDIgMCBSCiAg' + - 'L1Jlc291cmNlcyA8PAogICAgL0ZvbnQgPDwKICAgICAgL0YxIDQgMCBSIAogICAgPj4KICA+' + - 'PgogIC9Db250ZW50cyA1IDAgUgo+PgplbmRvYmoKCjQgMCBvYmoKPDwKICAvVHlwZSAvRm9u' + - 'dAogIC9TdWJ0eXBlIC9UeXBlMQogIC9CYXNlRm9udCAvVGltZXMtUm9tYW4KPj4KZW5kb2Jq' + - 'Cgo1IDAgb2JqICAlIHBhZ2UgY29udGVudAo8PAogIC9MZW5ndGggNDQKPj4Kc3RyZWFtCkJU' + - 'CjcwIDUwIFRECi9GMSAxMiBUZgooSGVsbG8sIHdvcmxkISkgVGoKRVQKZW5kc3RyZWFtCmVu' + - 'ZG9iagoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDEwIDAwMDAwIG4g' + - 'CjAwMDAwMDAwNzkgMDAwMDAgbiAKMDAwMDAwMDE3MyAwMDAwMCBuIAowMDAwMDAwMzAxIDAw' + - 'MDAwIG4gCjAwMDAwMDAzODAgMDAwMDAgbiAKdHJhaWxlcgo8PAogIC9TaXplIDYKICAvUm9v' + - 'dCAxIDAgUgo+PgpzdGFydHhyZWYKNDkyCiUlRU9G' - ); - return new Blob([pdfData], { type: 'application/pdf' }); - }; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ProcessTestingModule, BasicButtonComponent] - }); - fixture = TestBed.createComponent(BasicButtonComponent); - component = fixture.componentInstance; - service = TestBed.inject(TaskListService); - - jasmine.Ajax.install(); - }); - - afterEach(() => { - jasmine.Ajax.uninstall(); - }); - - it('should fetch the pdf Blob when the format is pdf', fakeAsync(() => { - component.fileName = 'FakeAuditName'; - component.format = 'pdf'; - const blob = createFakePdfBlob(); - spyOn(service, 'fetchTaskAuditPdfById').and.returnValue(of(blob)); - spyOn(component, 'onAuditClick').and.callThrough(); - - fixture.detectChanges(); - - const button = fixture.nativeElement.querySelector('#auditButton'); - - fixture.whenStable().then(() => { - fixture.detectChanges(); - expect(component.onAuditClick).toHaveBeenCalledWith({ format: 'pdf', value: blob, fileName: 'FakeAuditName' }); - }); - - button.click(); - })); - - it('should fetch the json info when the format is json', fakeAsync(() => { - component.fileName = 'FakeAuditName'; - component.format = 'json'; - component.download = true; - - const auditJson = { - taskId: '77', - taskName: 'Fake Task Name', - assignee: 'FirstName LastName', - formData: [], - selectedOutcome: null, - comments: [] - }; - spyOn(service, 'fetchTaskAuditJsonById').and.returnValue(of(auditJson)); - spyOn(component, 'onAuditClick').and.callThrough(); - - fixture.detectChanges(); - - const button = fixture.nativeElement.querySelector('#auditButton'); - - fixture.whenStable().then(() => { - fixture.detectChanges(); - expect(component.onAuditClick).toHaveBeenCalledWith({ format: 'json', value: auditJson, fileName: 'FakeAuditName' }); - }); - - button.click(); - })); - - it('should fetch the pdf Blob as default when the format is UNKNOWN', fakeAsync(() => { - component.fileName = 'FakeAuditName'; - component.format = 'fakeFormat'; - const blob = createFakePdfBlob(); - spyOn(service, 'fetchTaskAuditPdfById').and.returnValue(of(blob)); - spyOn(component, 'onAuditClick').and.callThrough(); - - fixture.detectChanges(); - - const button = fixture.nativeElement.querySelector('#auditButton'); - - fixture.whenStable().then(() => { - fixture.detectChanges(); - expect(component.onAuditClick).toHaveBeenCalledWith({ format: 'pdf', value: blob, fileName: 'FakeAuditName' }); - }); - - button.click(); - })); -}); diff --git a/lib/process-services/src/lib/task-list/components/task-audit/task-audit.directive.ts b/lib/process-services/src/lib/task-list/components/task-audit/task-audit.directive.ts deleted file mode 100644 index aa5ec71198..0000000000 --- a/lib/process-services/src/lib/task-list/components/task-audit/task-audit.directive.ts +++ /dev/null @@ -1,121 +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. - */ - -/* eslint-disable @angular-eslint/no-input-rename */ - -import { DownloadService } from '@alfresco/adf-core'; -import { Directive, EventEmitter, Input, OnChanges, Output } from '@angular/core'; -import { TaskListService } from '../../services/tasklist.service'; - -const JSON_FORMAT: string = 'json'; -const PDF_FORMAT: string = 'pdf'; - -/** @deprecated no longer used anywhere, and can be safely removed */ -@Directive({ - // eslint-disable-next-line @angular-eslint/directive-selector - selector: 'button[adf-task-audit]', - standalone: true, - host: { - role: 'button', - '(click)': 'onClickAudit()' - } -}) -export class TaskAuditDirective implements OnChanges { - /** (**required**) The id of the task. */ - @Input('task-id') - taskId: string; - - /** Name of the downloaded file (for PDF downloads). */ - @Input() - fileName: string = 'Audit'; - - /** Format of the audit information. Can be "pdf" or "json". */ - @Input() - format: string = 'pdf'; - - /** Enables downloading of the audit when the decorated element is clicked. */ - @Input() - download: boolean = true; - - /** Emitted when the decorated element is clicked. */ - @Output() - clicked: EventEmitter = new EventEmitter(); - - /** Emitted when an error occurs. */ - @Output() - error: EventEmitter = new EventEmitter(); - - public audit: any; - - constructor(private downloadService: DownloadService, private taskListService: TaskListService) {} - - ngOnChanges(): void { - if (!this.isValidType()) { - this.setDefaultFormatType(); - } - } - - isValidType(): boolean { - return this.format && (this.isJsonFormat() || this.isPdfFormat()); - } - - setDefaultFormatType(): void { - this.format = PDF_FORMAT; - } - - /** - * fetch the audit information in the requested format - */ - fetchAuditInfo(): void { - if (this.isPdfFormat()) { - this.taskListService.fetchTaskAuditPdfById(this.taskId).subscribe( - (blob: Blob) => { - this.audit = blob; - if (this.download) { - this.downloadService.downloadBlob(this.audit, this.fileName + '.pdf'); - } - this.clicked.emit({ format: this.format, value: this.audit, fileName: this.fileName }); - }, - (err) => { - this.error.emit(err); - } - ); - } else { - this.taskListService.fetchTaskAuditJsonById(this.taskId).subscribe( - (res) => { - this.audit = res; - this.clicked.emit({ format: this.format, value: this.audit, fileName: this.fileName }); - }, - (err) => { - this.error.emit(err); - } - ); - } - } - - onClickAudit() { - this.fetchAuditInfo(); - } - - isJsonFormat() { - return this.format === JSON_FORMAT; - } - - isPdfFormat() { - return this.format === PDF_FORMAT; - } -} diff --git a/lib/process-services/src/lib/task-list/public-api.ts b/lib/process-services/src/lib/task-list/public-api.ts index f0f331f779..bce8c34064 100644 --- a/lib/process-services/src/lib/task-list/public-api.ts +++ b/lib/process-services/src/lib/task-list/public-api.ts @@ -20,8 +20,6 @@ import { UnclaimTaskDirective } from './components/task-form/unclaim-task.direct import { TaskFormComponent } from './components/task-form/task-form.component'; import { AttachFormComponent } from './components/attach-form/attach-form.component'; import { ChecklistComponent } from './components/checklist/checklist.component'; -import { NoTaskDetailsTemplateDirective } from './components/no-task-details/no-task-detail-template.directive'; -import { TaskAuditDirective } from './components/task-audit/task-audit.directive'; import { TaskFiltersComponent } from './components/task-filters/task-filters.component'; import { TaskListComponent } from './components/task-list/task-list.component'; import { TaskDetailsComponent } from './components/task-details/task-details.component'; @@ -32,13 +30,11 @@ import { TaskStandaloneComponent } from './components/task-standalone/task-stand export * from './components/task-list/task-list.component'; export * from './components/checklist/checklist.component'; export * from './components/task-header/task-header.component'; -export * from './components/no-task-details/no-task-detail-template.directive'; export * from './components/task-filters/task-filters.component'; export * from './components/task-form/task-form.component'; export * from './components/task-form/claim-task.directive'; export * from './components/task-form/unclaim-task.directive'; export * from './components/task-details/task-details.component'; -export * from './components/task-audit/task-audit.directive'; export * from './components/start-task/start-task.component'; export * from './components/task-standalone/task-standalone.component'; export * from './components/attach-form/attach-form.component'; @@ -64,7 +60,5 @@ export const TASK_LIST_DIRECTIVES = [ StartTaskComponent, TaskStandaloneComponent, ClaimTaskDirective, - UnclaimTaskDirective, - NoTaskDetailsTemplateDirective, - TaskAuditDirective + UnclaimTaskDirective ] as const;