[ACS-8960] Review and apply required inputs where possible (#10554)

This commit is contained in:
dominikiwanekhyland
2025-01-17 13:15:25 +01:00
committed by GitHub
parent 0bc422735e
commit ada55aebc1
61 changed files with 121 additions and 197 deletions

View File

@@ -34,7 +34,7 @@ export class CreateProcessAttachmentComponent implements OnChanges {
private processContentService = inject(ProcessContentService);
/** (required) The ID of the process instance to display. */
@Input()
@Input({ required: true })
processInstanceId: string;
/**

View File

@@ -34,7 +34,7 @@ export class AttachmentComponent implements OnChanges {
private processContentService = inject(ProcessContentService);
/** (required) The numeric ID of the task to display. */
@Input()
@Input({ required: true })
taskId: string;
/**

View File

@@ -27,8 +27,8 @@ import {
} from '@alfresco/adf-core';
import {
AfterContentInit,
ContentChild,
Component,
ContentChild,
EventEmitter,
Input,
NgZone,
@@ -65,7 +65,7 @@ export class ProcessAttachmentListComponent implements OnChanges, AfterContentIn
emptyTemplate: EmptyListComponent;
/** (**required**) The ID of the process instance to display. */
@Input()
@Input({ required: true })
processInstanceId: string;
/** Disable/Enable read-only mode for attachment list. */

View File

@@ -16,20 +16,20 @@
*/
import {
ThumbnailService,
EmptyListComponent,
DownloadService,
DataTableComponent,
EmptyListHeaderDirective,
DataColumnListComponent,
DataColumnComponent,
DataColumnListComponent,
DataTableComponent,
DownloadService,
EmptyListComponent,
EmptyListHeaderDirective,
LoadingContentTemplateDirective,
NoContentTemplateDirective
NoContentTemplateDirective,
ThumbnailService
} from '@alfresco/adf-core';
import {
AfterContentInit,
ContentChild,
Component,
ContentChild,
EventEmitter,
Input,
NgZone,
@@ -68,7 +68,7 @@ export class TaskAttachmentListComponent implements OnChanges, AfterContentInit
emptyTemplate: EmptyListComponent;
/** (**required**) The ID of the task to display. */
@Input()
@Input({ required: true })
taskId: string;
/** Disable/Enable read only mode for attachment list. */

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, EventEmitter, OnInit, Input, Output, ViewEncapsulation } from '@angular/core';
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
import { Observable } from 'rxjs';
import { PerformSearchCallback } from '../../interfaces/perform-search-callback.interface';
import { map } from 'rxjs/operators';
@@ -44,7 +44,7 @@ export class PeopleSearchComponent implements OnInit {
actionLabel?: string;
/** Parameters for displaying the list. */
@Input()
@Input({ required: true })
results: Observable<LightUserRepresentation[]>;
/** Emitted when a search is performed with a new keyword. */

View File

@@ -19,6 +19,7 @@ import { ADF_COMMENTS_SERVICE, CommentsComponent } from '@alfresco/adf-core';
import { CommentProcessService } from './services/comment-process.service';
import { Component, Input, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common';
@Component({
selector: 'adf-process-instance-comments',
standalone: true,
@@ -35,7 +36,7 @@ import { CommonModule } from '@angular/common';
})
export class ProcessCommentsComponent {
/** (**required**) The numeric ID of the process instance to display comments for. */
@Input()
@Input({ required: true })
processInstanceId: string;
/** Should the comments be read-only? */

View File

@@ -44,7 +44,7 @@ import { ProcessCommentsComponent } from '../../../process-comments';
})
export class ProcessInstanceDetailsComponent implements OnChanges {
/** (required) The numeric ID of the process instance to display. */
@Input()
@Input({ required: true })
processInstanceId: string;
@ViewChild('processInstanceHeader')

View File

@@ -17,12 +17,12 @@
import {
AppConfigService,
CardViewBaseItemModel,
CardViewComponent,
CardViewDateItemModel,
CardViewItem,
CardViewBaseItemModel,
CardViewTextItemModel,
TranslationService,
CardViewComponent
TranslationService
} from '@alfresco/adf-core';
import { Component, Input, OnChanges } from '@angular/core';
import { ProcessInstanceRepresentation } from '@alfresco/js-api';
@@ -38,7 +38,7 @@ import { MatCardModule } from '@angular/material/card';
})
export class ProcessInstanceHeaderComponent implements OnChanges {
/** (**required**) Full details of the process instance to display information about. */
@Input()
@Input({ required: true })
processInstance: ProcessInstanceRepresentation;
properties: CardViewItem[];

View File

@@ -40,7 +40,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
})
export class ProcessInstanceTasksComponent implements OnInit, OnChanges {
/** The ID of the process instance to display tasks for. */
@Input()
@Input({ required: true })
processInstanceDetails: ProcessInstanceRepresentation;
/**

View File

@@ -38,7 +38,7 @@ import { FormComponent } from '../../../form';
})
export class AttachFormComponent implements OnInit, OnChanges {
/** Id of the task. */
@Input()
@Input({ required: true })
taskId: any;
/** Identifier of the form to attach. */

View File

@@ -22,14 +22,7 @@ import { EMPTY, Observable } from 'rxjs';
import { Form } from '../../models/form.model';
import { TaskListService } from '../../services/tasklist.service';
import { defaultIfEmpty, switchMap } from 'rxjs/operators';
import {
AbstractControl,
ReactiveFormsModule,
UntypedFormBuilder,
UntypedFormControl,
UntypedFormGroup,
Validators
} from '@angular/forms';
import { AbstractControl, ReactiveFormsModule, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { isValid } from 'date-fns';
import { TaskRepresentation } from '@alfresco/js-api';
import { CommonModule } from '@angular/common';
@@ -73,7 +66,7 @@ const MAX_LENGTH = 255;
})
export class StartTaskComponent implements OnInit {
/** (required) The id of the app. */
@Input()
@Input({ required: true })
appId: number;
/** Default Task Name. */

View File

@@ -96,7 +96,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
taskFormComponent: TaskFormComponent;
/** (**required**) The id of the task whose details we are asking for. */
@Input()
@Input({ required: true })
taskId: string;
/** Automatically renders the next task when the current one is completed. */

View File

@@ -15,15 +15,15 @@
* limitations under the License.
*/
import { Component, OnInit, Input, Output, EventEmitter, SimpleChanges, ViewEncapsulation, OnChanges, inject } from '@angular/core';
import { Component, EventEmitter, inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core';
import {
FormModel,
ContentLinkModel,
FormFieldValidator,
FormOutcomeEvent,
TranslationService,
EmptyContentComponent,
FormFieldModel,
EmptyContentComponent
FormFieldValidator,
FormModel,
FormOutcomeEvent,
TranslationService
} from '@alfresco/adf-core';
import { TaskListService } from '../../services/tasklist.service';
import { TaskRepresentation, UserRepresentation } from '@alfresco/js-api';
@@ -61,7 +61,7 @@ import { FormComponent, FormCustomOutcomesComponent } from '../../../form';
})
export class TaskFormComponent implements OnInit, OnChanges {
/** (**required**) The id of the task whose details we are asking for. */
@Input()
@Input({ required: true })
taskId: string;
/** Toggles rendering of the form title. */

View File

@@ -15,20 +15,20 @@
* limitations under the License.
*/
import { Component, EventEmitter, DestroyRef, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation, inject } from '@angular/core';
import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core';
import {
CardViewDateItemModel,
CardViewMapItemModel,
CardViewTextItemModel,
CardViewBaseItemModel,
TranslationService,
AppConfigService,
CardViewBaseItemModel,
CardViewComponent,
CardViewDateItemModel,
CardViewIntItemModel,
CardViewItemLengthValidator,
CardViewComponent,
CardViewUpdateService,
CardViewMapItemModel,
CardViewSelectItemModel,
CardViewSelectItemOption
CardViewSelectItemOption,
CardViewTextItemModel,
CardViewUpdateService,
TranslationService
} from '@alfresco/adf-core';
import { PeopleProcessService } from '../../../services/people-process.service';
import { TaskDescriptionValidator } from '../../validators/task-description.validator';
@@ -57,7 +57,7 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
formName: string = null;
/** (required) Details related to the task. */
@Input()
@Input({ required: true })
taskDetails: TaskRepresentation;
/** Toggles display of the claim/release button. */