Skip to content

Commit

Permalink
Review and apply required inputs where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikiwanekhyland committed Jan 16, 2025
1 parent 8283760 commit 4e64787
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -45,6 +45,6 @@ export class AboutExtensionListComponent {

displayedColumns = this.columns.map((x) => x.columnDef);

@Input()
@Input({ required: true })
data: Array<ExtensionRef> = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -46,6 +46,6 @@ export class AboutLicenseListComponent {

displayedColumns = this.columns.map((x) => x.columnDef);

@Input()
@Input({ required: true })
data: LicenseData[] = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -49,6 +49,6 @@ export class ModuleListComponent {

displayedColumns = this.columns.map((x) => x.columnDef);

@Input()
@Input({ required: true })
data: Array<ModuleInfo> = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -48,7 +48,7 @@ export class PackageListComponent implements OnInit {

displayedColumns = this.columns.map((x) => x.columnDef);

@Input()
@Input({ required: true })
data: Array<PackageInfo> = [];

ngOnInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -45,6 +45,6 @@ export class AboutStatusListComponent {

displayedColumns = this.columns.map((x) => x.columnDef);

@Input()
@Input({ required: true })
data: StatusData[] = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ColumnsSelectorComponent implements OnInit {
@Input()
columns: DataColumn[] = [];

@Input()
@Input({ required: true })
mainMenuTrigger: MatMenuTrigger;

@Input()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -31,7 +31,7 @@ import { DataRow } from '../../data/data-row.model';
}
})
export class DataTableRowComponent implements FocusableOption {
@Input() row: DataRow;
@Input({ required: true }) row: DataRow;

@Input() disabled = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class FormRendererComponent<T> implements OnInit, OnDestroy {
@Input()
showDebugButton: boolean = false;

@Input()
@Input({ required: true })
formDefinition: FormModel;

@Input()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ import { MatInputModule } from '@angular/material/input';
encapsulation: ViewEncapsulation.None
})
export class InplaceFormInputComponent {
@Input()
@Input({ required: true })
control: UntypedFormControl;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down

0 comments on commit 4e64787

Please sign in to comment.