[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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
61 changed files with 121 additions and 197 deletions

View File

@ -39,7 +39,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
})
export class AspectListComponent implements OnInit {
/** Node Id of the node that we want to update */
@Input()
@Input({ required: true })
nodeId: string = '';
/** List of aspects' ids which should not be displayed. */

View File

@ -15,18 +15,7 @@
* limitations under the License.
*/
import {
Component,
DestroyRef,
EventEmitter,
inject,
Input,
OnChanges,
OnInit,
Output,
ViewChild,
ViewEncapsulation
} from '@angular/core';
import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core';
import { MatSelect, MatSelectModule } from '@angular/material/select';
import { Node, PathElement } from '@alfresco/js-api';
import { DocumentListComponent } from '../document-list/components/document-list.component';
@ -46,7 +35,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
})
export class BreadcrumbComponent implements OnInit, OnChanges {
/** Active node, builds UI based on folderNode.path.elements collection. */
@Input()
@Input({ required: true })
folderNode: Node = null;
/**

View File

@ -137,7 +137,7 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy {
* In ASSIGN mode we can only assign/unassign categories from existing list.
* In CRUD mode we can create categories.
*/
@Input()
@Input({ required: true })
managementMode: CategoriesManagementMode;
/** ID of a parent category. New categories will be created under this parent */
@ -180,7 +180,9 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy {
)
.subscribe((name: string) => this.onNameControlValueChange(name));
this.categoryNameControl.statusChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.setCategoryNameControlErrorMessageKey());
this.categoryNameControl.statusChanges
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(() => this.setCategoryNameControlErrorMessageKey());
this.setCategoryNameControlErrorMessageKey();

View File

@ -40,7 +40,7 @@ import { TranslateModule } from '@ngx-translate/core';
})
export class ContentMetadataCardComponent implements OnChanges {
/** (required) The node entity to fetch metadata about */
@Input()
@Input({ required: true })
node: Node;
/**
@ -68,7 +68,7 @@ export class ContentMetadataCardComponent implements OnChanges {
* Name or configuration of the metadata preset, which defines aspects
* and their properties.
*/
@Input()
@Input({ required: true })
preset: string | PresetConfig;
/**

View File

@ -86,7 +86,7 @@ enum DefaultPanels {
})
export class ContentMetadataComponent implements OnChanges, OnInit {
/** (required) The node entity to fetch metadata about */
@Input()
@Input({ required: true })
node: Node;
/** Toggles whether to display empty values in the card view */
@ -105,7 +105,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit {
multi = false;
/** Name or configuration of the metadata preset, which defines aspects and their properties */
@Input()
@Input({ required: true })
preset: string | PresetConfig;
/** Toggles whether the metadata properties should be shown */

View File

@ -111,7 +111,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
restrictRootToCurrentFolderId: boolean = false;
/** Node ID of the folder currently listed. */
@Input()
@Input({ required: true })
currentFolderId: string = null;
/**

View File

@ -15,26 +15,13 @@
* limitations under the License.
*/
import {
Component,
DestroyRef,
EventEmitter,
Inject,
inject,
Input,
OnChanges,
OnInit,
Output,
SimpleChanges
} from '@angular/core';
import { Component, DestroyRef, EventEmitter, Inject, inject, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
import { DataSorting, HeaderFilterTemplateDirective, PaginationModel } from '@alfresco/adf-core';
import { SearchHeaderQueryBuilderService } from '../../../search/services/search-header-query-builder.service';
import { FilterSearch } from './../../../search/models/filter-search.interface';
import { ADF_DOCUMENT_PARENT_COMPONENT } from '../document-list.token';
import { CommonModule } from '@angular/common';
import {
SearchFilterContainerComponent
} from '../../../search/components/search-filter-container/search-filter-container.component';
import { SearchFilterContainerComponent } from '../../../search/components/search-filter-container/search-filter-container.component';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
@ -49,7 +36,7 @@ export class FilterHeaderComponent implements OnInit, OnChanges {
value: any = {};
/** The id of the current folder of the document list. */
@Input()
@Input({ required: true })
currentFolderId: string;
/** Emitted when a filter value is selected */

View File

@ -15,16 +15,7 @@
* limitations under the License.
*/
import {
ChangeDetectionStrategy,
Component,
DestroyRef,
ElementRef,
inject,
Input,
OnInit,
ViewEncapsulation
} from '@angular/core';
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { NodeEntry, Site } from '@alfresco/js-api';
import { ShareDataRow } from '../../data/share-data-row.model';
import { NodesApiService } from '../../../common/services/nodes-api.service';
@ -64,7 +55,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
}
})
export class LibraryNameColumnComponent implements OnInit {
@Input()
@Input({ required: true })
context: any;
displayTooltip$ = new BehaviorSubject<string>('');
@ -129,5 +120,4 @@ export class LibraryNameColumnComponent implements OnInit {
return isDuplicate ? `${title} (${id})` : `${title}`;
}
}

View File

@ -15,15 +15,7 @@
* limitations under the License.
*/
import {
ChangeDetectionStrategy,
Component,
DestroyRef,
inject,
Input,
OnInit,
ViewEncapsulation
} from '@angular/core';
import { ChangeDetectionStrategy, Component, DestroyRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { Site, SiteEntry } from '@alfresco/js-api';
import { ShareDataRow } from '../../data/share-data-row.model';
@ -46,7 +38,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
host: { class: 'adf-library-role-column adf-datatable-content-cell' }
})
export class LibraryRoleColumnComponent implements OnInit {
@Input()
@Input({ required: true })
context: any;
displayText$ = new BehaviorSubject<string>('');

View File

@ -36,7 +36,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
host: { class: 'adf-library-status-column adf-datatable-content-cell' }
})
export class LibraryStatusColumnComponent implements OnInit {
@Input()
@Input({ required: true })
context: any;
displayText$ = new BehaviorSubject<string>('');
@ -82,5 +82,4 @@ export class LibraryStatusColumnComponent implements OnInit {
}
}
}
}

View File

@ -15,16 +15,7 @@
* limitations under the License.
*/
import {
ChangeDetectionStrategy,
Component,
DestroyRef,
ElementRef,
inject,
Input,
OnInit,
ViewEncapsulation
} from '@angular/core';
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { NodeEntry } from '@alfresco/js-api';
import { BehaviorSubject } from 'rxjs';
import { NodesApiService } from '../../../common/services/nodes-api.service';
@ -62,7 +53,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
host: { class: 'adf-datatable-content-cell adf-datatable-link adf-name-column' }
})
export class NameColumnComponent implements OnInit {
@Input()
@Input({ required: true })
context: any;
@Input()
@ -110,5 +101,4 @@ export class NameColumnComponent implements OnInit {
})
);
}
}

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, Input } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { NodeEntry } from '@alfresco/js-api';
import { ShareDataRow } from '../../data/share-data-row.model';
import { CommonModule } from '@angular/common';
@ -38,7 +38,7 @@ import { NodeNameTooltipPipe } from '../../../pipes/node-name-tooltip.pipe';
host: { class: 'adf-datatable-content-cell adf-trashcan-name-column' }
})
export class TrashcanNameColumnComponent implements OnInit {
@Input()
@Input({ required: true })
context: any;
isLibrary = false;

View File

@ -34,7 +34,7 @@ import { NodeCommentsService } from './services/node-comments.service';
})
export class NodeCommentsComponent {
/** nodeId of the document that has comments */
@Input()
@Input({ required: true })
nodeId: string;
/** make the comments component readOnly */

View File

@ -39,7 +39,7 @@ import { TranslateModule } from '@ngx-translate/core';
*/
export class AddPermissionComponent implements OnInit {
/** ID of the target node. */
@Input()
@Input({ required: true })
nodeId: string;
/** Emitted when the node is updated successfully. */

View File

@ -60,7 +60,7 @@ import { UserRoleColumnComponent } from '../user-role-column/user-role-column.co
encapsulation: ViewEncapsulation.None
})
export class PermissionContainerComponent implements OnChanges {
@Input()
@Input({ required: true })
node: Node;
@Input()

View File

@ -52,7 +52,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
})
export class PermissionListComponent implements OnInit {
/** ID of the node whose permissions you want to show. */
@Input()
@Input({ required: true })
nodeId: string;
/** Emitted when the permission is updated. */

View File

@ -45,8 +45,8 @@ export class SearchFacetFieldComponent implements FacetWidget {
private searchFacetFiltersService = inject(SearchFacetFiltersService);
private translationService = inject(TranslationService);
@Input()
field!: FacetField;
@Input({ required: true })
field: FacetField;
displayValue$: Subject<string> = new Subject<string>();

View File

@ -41,7 +41,7 @@ export class SearchFacetTabbedContentComponent implements OnInit, OnChanges, Fac
private translationService = inject(TranslationService);
private searchFacetFiltersService = inject(SearchFacetFiltersService);
@Input()
@Input({ required: true })
tabbedFacet: TabbedFacetField;
@Input()

View File

@ -45,7 +45,7 @@ import { MatButtonModule } from '@angular/material/button';
encapsulation: ViewEncapsulation.None
})
export class SearchFacetChipComponent {
@Input()
@Input({ required: true })
field: FacetField;
@ViewChild('menuContainer', { static: false })

View File

@ -52,7 +52,7 @@ import { first } from 'rxjs/operators';
encapsulation: ViewEncapsulation.None
})
export class SearchWidgetChipComponent implements AfterViewInit {
@Input()
@Input({ required: true })
category: SearchCategory;
@ViewChild('menuContainer', { static: false })

View File

@ -15,16 +15,7 @@
* limitations under the License.
*/
import {
Component,
ElementRef,
EventEmitter,
Input,
OnInit,
Output,
ViewChild,
ViewEncapsulation
} from '@angular/core';
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core';
import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
import { DataColumn, IconComponent, TranslationService } from '@alfresco/adf-core';
import { SearchWidgetContainerComponent } from '../search-widget-container/search-widget-container.component';
@ -57,7 +48,7 @@ import { MatDialogModule } from '@angular/material/dialog';
})
export class SearchFilterContainerComponent implements OnInit {
/** The column the filter will be applied on. */
@Input()
@Input({ required: true })
col: DataColumn;
/** The column the filter will be applied on. */

View File

@ -30,7 +30,7 @@ import { MatButtonModule } from '@angular/material/button';
encapsulation: ViewEncapsulation.None
})
export class SearchFilterCardComponent {
@Input()
@Input({ required: true })
category: SearchCategory;
@ViewChild(SearchWidgetContainerComponent, { static: false })

View File

@ -16,17 +16,7 @@
*/
import { TranslationService } from '@alfresco/adf-core';
import {
Component,
DestroyRef,
EventEmitter,
inject,
Input,
OnChanges,
OnInit,
Output,
ViewEncapsulation
} from '@angular/core';
import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, ViewEncapsulation } from '@angular/core';
import { TagService } from '../services/tag.service';
import { TagPaging } from '@alfresco/js-api';
import { CommonModule } from '@angular/common';
@ -55,7 +45,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
})
export class TagActionsComponent implements OnChanges, OnInit {
/** The identifier of a node. */
@Input()
@Input({ required: true })
nodeId: string;
/** Emitted when a tag is added successfully. */

View File

@ -35,7 +35,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
})
export class TagNodeListComponent implements OnChanges, OnInit {
/** The identifier of a node. */
@Input()
@Input({ required: true })
nodeId: string;
/** Show delete button */

View File

@ -88,7 +88,7 @@ export class TagsCreatorComponent implements OnInit, OnDestroy {
* In Create mode we can't select existing tags, we can only create them.
* In Create and Assign mode we can both - create tags and select existing tags.
*/
@Input()
@Input({ required: true })
mode: TagsCreatorMode;
/**

View File

@ -16,7 +16,7 @@
*/
import { FlatTreeControl } from '@angular/cdk/tree';
import { Component, Input, OnChanges, SimpleChanges, Output, EventEmitter } from '@angular/core';
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
import { TreeBaseNode } from '../models/tree-view.model';
import { TreeViewDataSource } from '../data/tree-view-datasource';
import { TreeViewService } from '../services/tree-view.service';
@ -36,7 +36,7 @@ import { TranslateModule } from '@ngx-translate/core';
})
export class TreeViewComponent implements OnChanges {
/** Identifier of the node to display. */
@Input()
@Input({ required: true })
nodeId: string;
/** Emitted when a node in the tree view is clicked. */

View File

@ -31,11 +31,11 @@ import { TranslateModule } from '@ngx-translate/core';
})
export class VersionComparisonComponent {
/** Target node. */
@Input()
@Input({ required: true })
node: Node;
/** New file for updating current version. */
@Input()
@Input({ required: true })
newFileVersion: File;
constructor(public thumbnailService: ThumbnailService) {}

View File

@ -15,10 +15,10 @@
* limitations under the License.
*/
import { Component, Input, ViewEncapsulation, ViewChild, Output, EventEmitter, OnInit } from '@angular/core';
import { Component, EventEmitter, Input, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core';
import { Node } from '@alfresco/js-api';
import { VersionListComponent } from './version-list.component';
import { trigger, state, style, animate, transition } from '@angular/animations';
import { animate, state, style, transition, trigger } from '@angular/animations';
import { ContentService } from '../common/services/content.service';
import { NodesApiService } from '../common/services/nodes-api.service';
import { FileUploadErrorEvent } from '../common/events/file.event';
@ -46,7 +46,7 @@ import { TranslateModule } from '@ngx-translate/core';
})
export class VersionManagerComponent implements OnInit {
/** Target node to manage version history. */
@Input()
@Input({ required: true })
node: Node;
/** New file for updating current version. */

View File

@ -57,7 +57,7 @@ export class VersionUploadComponent implements OnInit {
minorVersion = '1.1';
/** The target node. */
@Input()
@Input({ required: true })
node: Node;
/** New file for updating current version. */

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
import { ExtensionRef } from '@alfresco/adf-extensions';
import { CommonModule } from '@angular/common';
import { MatTableModule } from '@angular/material/table';
@ -45,6 +45,6 @@ export class AboutExtensionListComponent {
displayedColumns = this.columns.map((x) => x.columnDef);
@Input()
@Input({ required: true })
data: Array<ExtensionRef> = [];
}

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
import { LicenseData } from '../interfaces';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
@ -46,6 +46,6 @@ export class AboutLicenseListComponent {
displayedColumns = this.columns.map((x) => x.columnDef);
@Input()
@Input({ required: true })
data: LicenseData[] = [];
}

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { MatTableModule } from '@angular/material/table';
@ -49,6 +49,6 @@ export class ModuleListComponent {
displayedColumns = this.columns.map((x) => x.columnDef);
@Input()
@Input({ required: true })
data: Array<ModuleInfo> = [];
}

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, ChangeDetectionStrategy, Input, OnInit } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
import { PackageInfo } from '../interfaces';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
import { StatusData } from '../interfaces';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
@ -45,6 +45,6 @@ export class AboutStatusListComponent {
displayedColumns = this.columns.map((x) => x.columnDef);
@Input()
@Input({ required: true })
data: StatusData[] = [];
}

View File

@ -31,7 +31,7 @@ import { CardViewItemDispatcherComponent } from '../card-view-item-dispatcher/ca
})
export class CardViewComponent {
/** (**required**) Items to show in the card view. */
@Input()
@Input({ required: true })
properties: CardViewItem[];
/** Toggles whether or not the items can be edited. */

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, EventEmitter, Input, Output, ViewEncapsulation, inject } from '@angular/core';
import { Component, EventEmitter, inject, Input, Output, ViewEncapsulation } from '@angular/core';
import { CommentModel } from '../../models/comment.model';
import { CommentsService } from '../interfaces/comments-service.interface';
import { ADF_COMMENTS_SERVICE } from '../interfaces/comments.token';
@ -35,7 +35,7 @@ import { TranslateModule } from '@ngx-translate/core';
})
export class CommentListComponent {
/** The comments data used to populate the list. */
@Input()
@Input({ required: true })
comments: CommentModel[];
/** Emitted when the user clicks on one of the comment rows. */

View File

@ -50,7 +50,7 @@ export class ColumnsSelectorComponent implements OnInit {
@Input()
columns: DataColumn[] = [];
@Input()
@Input({ required: true })
mainMenuTrigger: MatMenuTrigger;
@Input()

View File

@ -54,15 +54,15 @@ import { TruncatePipe } from '../../../pipes/truncate.pipe';
})
export class DataTableCellComponent implements OnInit {
/** Data table adapter instance. */
@Input()
@Input({ required: true })
data: DataTableAdapter;
/** Data that defines the column. */
@Input()
@Input({ required: true })
column: DataColumn;
/** Data that defines the row. */
@Input()
@Input({ required: true })
row: DataRow;
/** Enables/disables a Clipboard directive to allow copying of the cell's content. */

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, ViewEncapsulation, ElementRef, Input, HostBinding, HostListener, Output, EventEmitter } from '@angular/core';
import { Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, ViewEncapsulation } from '@angular/core';
import { FocusableOption } from '@angular/cdk/a11y';
import { DataRow } from '../../data/data-row.model';

View File

@ -35,7 +35,7 @@ export class DataColumnComponent implements OnInit {
* Data source key. Can be either a column/property key like `title`
* or a property path like `createdBy.name`.
*/
@Input()
@Input({ required: true })
key: string;
/** You can specify any custom data which can be used by any specific feature */

View File

@ -58,7 +58,7 @@ export class DynamicChipListComponent implements OnChanges, OnInit, AfterViewIni
pagination: Pagination;
/** List of chips to display. */
@Input()
@Input({ required: true })
chips: Chip[];
/** Show delete button. */

View File

@ -68,7 +68,7 @@ export class FormRendererComponent<T> implements OnInit, OnDestroy {
@Input()
showDebugButton: boolean = false;
@Input()
@Input({ required: true })
formDefinition: FormModel;
@Input()

View File

@ -30,6 +30,6 @@ import { MatInputModule } from '@angular/material/input';
encapsulation: ViewEncapsulation.None
})
export class InplaceFormInputComponent {
@Input()
@Input({ required: true })
control: UntypedFormControl;
}

View File

@ -48,7 +48,7 @@ import { PdfThumbComponent } from '../pdf-viewer-thumb/pdf-viewer-thumb.componen
encapsulation: ViewEncapsulation.None
})
export class PdfThumbListComponent implements OnInit, AfterViewInit, OnDestroy {
@Input() pdfViewer: any;
@Input({ required: true }) pdfViewer: any;
@Output()
close = new EventEmitter<void>();

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
import { ApplicationInstanceModel, DEFAULT_APP_INSTANCE_ICON, DEFAULT_APP_INSTANCE_THEME } from '../../models/application-instance.model';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
@ -31,7 +31,7 @@ import { MatCardModule } from '@angular/material/card';
encapsulation: ViewEncapsulation.None
})
export class AppDetailsCloudComponent {
@Input()
@Input({ required: true })
applicationInstance: ApplicationInstanceModel;
@Output()

View File

@ -42,11 +42,11 @@ import { NgIf } from '@angular/common';
})
export class ProcessHeaderCloudComponent implements OnChanges, OnInit {
/** (Required) The name of the application. */
@Input()
@Input({ required: true })
appName: string = '';
/** (Required) The id of the process instance. */
@Input()
@Input({ required: true })
processInstanceId: string;
/** Gets emitted each time a new process instance details are loaded. */

View File

@ -50,11 +50,11 @@ import { MatCardModule } from '@angular/material/card';
})
export class TaskHeaderCloudComponent implements OnInit, OnChanges {
/** (Required) The name of the application. */
@Input()
@Input({ required: true })
appName: string = '';
/** (Required) The id of the task. */
@Input()
@Input({ required: true })
taskId: string;
/** Show/Hide the task title */

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. */