Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some typing errors #29630

Merged
merged 10 commits into from
Aug 19, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<div class="category_listing">
<p-table
(onLazyLoad)="loadCategories($event)"
(onRowSelect)="handleRowCheck($event)"
(onRowUnselect)="handleRowCheck($event)"
(onHeaderCheckboxToggle)="handleRowCheck($event)"
(onRowSelect)="handleRowCheck()"
(onRowUnselect)="handleRowCheck()"
(onHeaderCheckboxToggle)="handleRowCheck()"
(onFilter)="handleFilter()"
[(selection)]="selectedCategories"
[value]="vm.categories"
Expand All @@ -35,7 +35,7 @@
type="button"
pButton
icon="pi pi-ellipsis-v"
attr.data-testId="actions"></button>
data-testId="actions"></button>
<p-menu
[popup]="true"
[model]="vm.categoriesBulkActions"
Expand All @@ -48,10 +48,10 @@
<i class="pi pi-search"></i>
</span>
<input
(input)="dataTable.filterGlobal($event.target.value, 'contains')"
[placeholder]="'message.category.search' | dm"
class="border-left-none"
#gf
(input)="dataTable.filterGlobal(gf.value, 'contains')"
type="text"
pInputText />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<dot-content-type-selector
(selected)="changeContentTypeSelector($event)"></dot-content-type-selector>
<input
(input)="handleQueryFilter($event.target.value)"
(keydown.arrowdown)="focusFirstRow()"
#gf
(input)="handleQueryFilter(gf.value)"
pInputText
placeholder="{{ 'Type-to-filter' | dm }}"
type="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ export class DotEditPageViewAsControllerSeoComponent implements OnInit {
private confirmationService = inject(ConfirmationService);

private readonly customEventsHandler;
dotPageStateService = inject(DotPageStateService);

constructor(
private dotAlertConfirmService: DotAlertConfirmService,
private dotMessageService: DotMessageService,
private dotLicenseService: DotLicenseService,
private dotPageStateService: DotPageStateService,
private dotPersonalizeService: DotPersonalizeService,
private router: Router
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
<div class="dot-pages-listing-header__inputs">
<div class="p-input-icon-right">
<input
(input)="filterData($event.target.value)"
[placeholder]="'Type-To-Search' | dm"
[value]="vm.keywordValue"
class="dot-pages-listing-header__filter-input"
#input
(input)="filterData(input.value)"
data-testid="dot-pages-listing-header__keyword-input"
type="text"
pInputText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
type="button"
pButton
icon="pi pi-ellipsis-v"
attr.data-testid="bulkActions"></button>
data-testid="bulkActions"></button>
</div>
<p-menu [popup]="true" [model]="templateBulkActions" #actionsMenu appendTo="body"></p-menu>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ export class DotTemplateListComponent implements OnInit, OnDestroy {
* @param {DotTemplate} { template }
* @memberof DotTemplateListComponent
*/
editTemplate(template: DotTemplate): void {
editTemplate(event: unknown): void {
const template = event as DotTemplate;
this.isTemplateAsFile(template)
? this.dotSiteBrowserService.setSelectedFolder(template.identifier).subscribe(() => {
this.dotRouterService.goToSiteBrowser();
Expand All @@ -139,7 +140,8 @@ export class DotTemplateListComponent implements OnInit, OnDestroy {
*
* @memberof DotTemplateListComponent
*/
updateSelectedTemplates(templates: DotTemplate[]): void {
updateSelectedTemplates(event: unknown): void {
const templates = event as DotTemplate[];
this.selectedTemplates = templates;
}

Expand Down Expand Up @@ -174,7 +176,8 @@ export class DotTemplateListComponent implements OnInit, OnDestroy {
* @param {DotTemplate} template
* @memberof DotTemplateListComponent
*/
setContextMenu(template: DotTemplate): void {
setContextMenu(event: unknown): void {
const template = event as DotTemplate;
this.listing.contextMenuItems = this.setTemplateActions(template).map(
({ menuItem }: DotActionMenuItem) => menuItem
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<dot-action-header [options]="actionHeaderOptions">
<ng-container [ngTemplateOutlet]="beforeSearchTemplate"></ng-container>
<input
(input)="dataTable.filterGlobal($event.target.value, 'contains')"
(keydown.arrowdown)="focusFirstRow()"
[(ngModel)]="filter"
#gf
(input)="dataTable.filterGlobal(gf.value, 'contains')"
pInputText
placeholder="{{ 'Type-to-filter' | dm }}"
type="text" />
Expand Down
nicobytes marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ import { DotMyAccountModule } from '../dot-my-account/dot-my-account.module';
]
})
export class DotToolbarUserComponent implements OnInit {
readonly #store = inject(DotToolbarUserStore);
readonly store = inject(DotToolbarUserStore);

vm$ = this.#store.vm$;
vm$ = this.store.vm$;
@ViewChild('menu') menu: Menu;
showMask = signal<boolean>(false);

ngOnInit(): void {
this.#store.init();
this.store.init();
}

toogleMenu(event: CustomEvent): void {
toogleMenu(event: Event): void {
this.menu.toggle(event);
this.showMask.update((value) => !value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ const PrimaryTemplate = `
<input
pInputText
type="text"
(input)="dt.filterGlobal($event.target.value, 'contains')"
#inputElement
(input)="dt.filterGlobal(inputElement.value, 'contains')"
placeholder="Global Search"
/>
</span>
Expand Down
Loading