[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 { export class AspectListComponent implements OnInit {
/** Node Id of the node that we want to update */ /** Node Id of the node that we want to update */
@Input() @Input({ required: true })
nodeId: string = ''; nodeId: string = '';
/** List of aspects' ids which should not be displayed. */ /** List of aspects' ids which should not be displayed. */

View File

@ -15,18 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core';
Component,
DestroyRef,
EventEmitter,
inject,
Input,
OnChanges,
OnInit,
Output,
ViewChild,
ViewEncapsulation
} from '@angular/core';
import { MatSelect, MatSelectModule } from '@angular/material/select'; import { MatSelect, MatSelectModule } from '@angular/material/select';
import { Node, PathElement } from '@alfresco/js-api'; import { Node, PathElement } from '@alfresco/js-api';
import { DocumentListComponent } from '../document-list/components/document-list.component'; 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 { export class BreadcrumbComponent implements OnInit, OnChanges {
/** Active node, builds UI based on folderNode.path.elements collection. */ /** Active node, builds UI based on folderNode.path.elements collection. */
@Input() @Input({ required: true })
folderNode: Node = null; 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 ASSIGN mode we can only assign/unassign categories from existing list.
* In CRUD mode we can create categories. * In CRUD mode we can create categories.
*/ */
@Input() @Input({ required: true })
managementMode: CategoriesManagementMode; managementMode: CategoriesManagementMode;
/** ID of a parent category. New categories will be created under this parent */ /** 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)); .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(); this.setCategoryNameControlErrorMessageKey();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@
* limitations under the License. * 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 { NodeEntry } from '@alfresco/js-api';
import { ShareDataRow } from '../../data/share-data-row.model'; import { ShareDataRow } from '../../data/share-data-row.model';
import { CommonModule } from '@angular/common'; 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' } host: { class: 'adf-datatable-content-cell adf-trashcan-name-column' }
}) })
export class TrashcanNameColumnComponent implements OnInit { export class TrashcanNameColumnComponent implements OnInit {
@Input() @Input({ required: true })
context: any; context: any;
isLibrary = false; isLibrary = false;

View File

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

View File

@ -39,7 +39,7 @@ import { TranslateModule } from '@ngx-translate/core';
*/ */
export class AddPermissionComponent implements OnInit { export class AddPermissionComponent implements OnInit {
/** ID of the target node. */ /** ID of the target node. */
@Input() @Input({ required: true })
nodeId: string; nodeId: string;
/** Emitted when the node is updated successfully. */ /** 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 encapsulation: ViewEncapsulation.None
}) })
export class PermissionContainerComponent implements OnChanges { export class PermissionContainerComponent implements OnChanges {
@Input() @Input({ required: true })
node: Node; node: Node;
@Input() @Input()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,17 +16,7 @@
*/ */
import { TranslationService } from '@alfresco/adf-core'; import { TranslationService } from '@alfresco/adf-core';
import { import { Component, DestroyRef, EventEmitter, inject, Input, OnChanges, OnInit, Output, ViewEncapsulation } from '@angular/core';
Component,
DestroyRef,
EventEmitter,
inject,
Input,
OnChanges,
OnInit,
Output,
ViewEncapsulation
} from '@angular/core';
import { TagService } from '../services/tag.service'; import { TagService } from '../services/tag.service';
import { TagPaging } from '@alfresco/js-api'; import { TagPaging } from '@alfresco/js-api';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
@ -55,7 +45,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
}) })
export class TagActionsComponent implements OnChanges, OnInit { export class TagActionsComponent implements OnChanges, OnInit {
/** The identifier of a node. */ /** The identifier of a node. */
@Input() @Input({ required: true })
nodeId: string; nodeId: string;
/** Emitted when a tag is added successfully. */ /** 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 { export class TagNodeListComponent implements OnChanges, OnInit {
/** The identifier of a node. */ /** The identifier of a node. */
@Input() @Input({ required: true })
nodeId: string; nodeId: string;
/** Show delete button */ /** 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 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. * In Create and Assign mode we can both - create tags and select existing tags.
*/ */
@Input() @Input({ required: true })
mode: TagsCreatorMode; mode: TagsCreatorMode;
/** /**

View File

@ -16,7 +16,7 @@
*/ */
import { FlatTreeControl } from '@angular/cdk/tree'; 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 { TreeBaseNode } from '../models/tree-view.model';
import { TreeViewDataSource } from '../data/tree-view-datasource'; import { TreeViewDataSource } from '../data/tree-view-datasource';
import { TreeViewService } from '../services/tree-view.service'; import { TreeViewService } from '../services/tree-view.service';
@ -36,7 +36,7 @@ import { TranslateModule } from '@ngx-translate/core';
}) })
export class TreeViewComponent implements OnChanges { export class TreeViewComponent implements OnChanges {
/** Identifier of the node to display. */ /** Identifier of the node to display. */
@Input() @Input({ required: true })
nodeId: string; nodeId: string;
/** Emitted when a node in the tree view is clicked. */ /** 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 { export class VersionComparisonComponent {
/** Target node. */ /** Target node. */
@Input() @Input({ required: true })
node: Node; node: Node;
/** New file for updating current version. */ /** New file for updating current version. */
@Input() @Input({ required: true })
newFileVersion: File; newFileVersion: File;
constructor(public thumbnailService: ThumbnailService) {} constructor(public thumbnailService: ThumbnailService) {}

View File

@ -15,10 +15,10 @@
* limitations under the License. * 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 { Node } from '@alfresco/js-api';
import { VersionListComponent } from './version-list.component'; 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 { ContentService } from '../common/services/content.service';
import { NodesApiService } from '../common/services/nodes-api.service'; import { NodesApiService } from '../common/services/nodes-api.service';
import { FileUploadErrorEvent } from '../common/events/file.event'; import { FileUploadErrorEvent } from '../common/events/file.event';
@ -46,7 +46,7 @@ import { TranslateModule } from '@ngx-translate/core';
}) })
export class VersionManagerComponent implements OnInit { export class VersionManagerComponent implements OnInit {
/** Target node to manage version history. */ /** Target node to manage version history. */
@Input() @Input({ required: true })
node: Node; node: Node;
/** New file for updating current version. */ /** New file for updating current version. */

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@
* limitations under the License. * 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 { PackageInfo } from '../interfaces';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@
* limitations under the License. * 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 { FocusableOption } from '@angular/cdk/a11y';
import { DataRow } from '../../data/data-row.model'; 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` * Data source key. Can be either a column/property key like `title`
* or a property path like `createdBy.name`. * or a property path like `createdBy.name`.
*/ */
@Input() @Input({ required: true })
key: string; key: string;
/** You can specify any custom data which can be used by any specific feature */ /** 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; pagination: Pagination;
/** List of chips to display. */ /** List of chips to display. */
@Input() @Input({ required: true })
chips: Chip[]; chips: Chip[];
/** Show delete button. */ /** Show delete button. */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@
* limitations under the License. * 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 { Observable } from 'rxjs';
import { PerformSearchCallback } from '../../interfaces/perform-search-callback.interface'; import { PerformSearchCallback } from '../../interfaces/perform-search-callback.interface';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
@ -44,7 +44,7 @@ export class PeopleSearchComponent implements OnInit {
actionLabel?: string; actionLabel?: string;
/** Parameters for displaying the list. */ /** Parameters for displaying the list. */
@Input() @Input({ required: true })
results: Observable<LightUserRepresentation[]>; results: Observable<LightUserRepresentation[]>;
/** Emitted when a search is performed with a new keyword. */ /** 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 { CommentProcessService } from './services/comment-process.service';
import { Component, Input, ViewEncapsulation } from '@angular/core'; import { Component, Input, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
@Component({ @Component({
selector: 'adf-process-instance-comments', selector: 'adf-process-instance-comments',
standalone: true, standalone: true,
@ -35,7 +36,7 @@ import { CommonModule } from '@angular/common';
}) })
export class ProcessCommentsComponent { export class ProcessCommentsComponent {
/** (**required**) The numeric ID of the process instance to display comments for. */ /** (**required**) The numeric ID of the process instance to display comments for. */
@Input() @Input({ required: true })
processInstanceId: string; processInstanceId: string;
/** Should the comments be read-only? */ /** Should the comments be read-only? */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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