Skip to content

Commit

Permalink
Refactor #16827
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Nov 25, 2024
1 parent 36810e2 commit 3bd2499
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 6 deletions.
2 changes: 2 additions & 0 deletions packages/primeng/src/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const DROPDOWN_VALUE_ACCESSOR: any = {

@Component({
selector: 'p-dropdownItem',
standalone: false,
template: `
<li
[id]="id"
Expand Down Expand Up @@ -144,6 +145,7 @@ export class DropdownItem extends BaseComponent {
*/
@Component({
selector: 'p-dropdown',
standalone: false,
template: `
<span
#focusInput
Expand Down
5 changes: 5 additions & 0 deletions packages/primeng/src/galleria/galleria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import { GalleriaStyle } from './style/galleriastyle';
*/
@Component({
selector: 'p-galleria',
standalone: false,
template: `
<div *ngIf="fullScreen; else windowed" #container>
<div *ngIf="maskVisible" #mask [ngClass]="{ 'p-galleria-mask p-overlay-mask p-overlay-mask-enter': true }" [class]="maskClass" [attr.role]="fullScreen ? 'dialog' : 'region'" [attr.aria-modal]="fullScreen ? 'true' : undefined">
Expand Down Expand Up @@ -404,6 +405,7 @@ export class Galleria extends BaseComponent implements OnChanges, OnDestroy {

@Component({
selector: 'p-galleriaContent',
standalone: false,
template: `
<div
[attr.id]="id"
Expand Down Expand Up @@ -592,6 +594,7 @@ export class GalleriaContent extends BaseComponent implements DoCheck {

@Component({
selector: 'p-galleriaItemSlot',
standalone: false,
template: `
<ng-container *ngIf="contentTemplate">
<ng-container *ngTemplateOutlet="contentTemplate; context: context"></ng-container>
Expand Down Expand Up @@ -662,6 +665,7 @@ export class GalleriaItemSlot {

@Component({
selector: 'p-galleriaItem',
standalone: false,
template: `
<div class="p-galleria-items">
<button
Expand Down Expand Up @@ -884,6 +888,7 @@ export class GalleriaItem implements OnChanges {

@Component({
selector: 'p-galleriaThumbnails',
standalone: false,
template: `
<div class="p-galleria-thumbnails">
<div class="p-galleria-thumbnails-content">
Expand Down
6 changes: 3 additions & 3 deletions packages/primeng/src/iftalabel/iftalabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { IftaLabelStyle } from './style/iftalabelstyle';
*/
@Component({
selector: 'p-iftalabel, p-iftaLabel, p-ifta-label',
standalone: true,
template: ` <ng-content></ng-content> `,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
Expand All @@ -24,8 +25,7 @@ export class IftaLabel extends BaseComponent {
}

@NgModule({
imports: [CommonModule, SharedModule, RouterModule],
exports: [IftaLabel, SharedModule],
declarations: [IftaLabel]
imports: [IftaLabel, CommonModule, SharedModule, RouterModule],
exports: [IftaLabel, SharedModule]
})
export class IftaLabelModule {}
1 change: 1 addition & 0 deletions packages/primeng/src/messages/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { MessagesStyle } from './style/messagesstyle';
*/
@Component({
selector: 'p-messages',
standalone: false,
template: `
<div [ngClass]="cx('container')" role="alert" [ngStyle]="style" [class]="styleClass" [attr.aria-atomic]="true" [attr.aria-live]="'assertive'" [attr.data-pc-name]="'message'">
@if (contentTemplate) {
Expand Down
1 change: 1 addition & 0 deletions packages/primeng/src/overlaypanel/overlaypanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { PopoverStyle } from './style/popoverstyle';
*/
@Component({
selector: 'p-overlayPanel, p-overlaypanel',
standalone: false,
template: `
<div
*ngIf="render"
Expand Down
22 changes: 19 additions & 3 deletions packages/primeng/src/treetable/treetable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export class TreeTableService {
*/
@Component({
selector: 'p-treeTable, p-treetable, p-tree-table',
standalone: false,
template: `
<div
#container
Expand Down Expand Up @@ -2292,6 +2293,7 @@ export class TreeTable extends BaseComponent implements AfterContentInit, OnInit

@Component({
selector: '[pTreeTableBody]',
standalone: false,
template: `
<ng-template ngFor let-serializedNode let-rowIndex="index" [ngForOf]="serializedNodes || tt.serializedValue" [ngForTrackBy]="tt.rowTrackBy">
<ng-container *ngIf="serializedNode.visible">
Expand Down Expand Up @@ -2362,6 +2364,7 @@ export class TTBody {

@Component({
selector: '[ttScrollableView]',
standalone: false,
template: `
<div #scrollHeader class="p-treetable-scrollable-header">
<div #scrollHeaderBox class="p-treetable-scrollable-header-box">
Expand Down Expand Up @@ -2637,6 +2640,7 @@ export class TTScrollableView implements AfterViewInit, OnDestroy {

@Directive({
selector: '[ttSortableColumn]',
standalone: false,
host: {
'[class.p-sortable-column]': 'isEnabled()',
'[class.p-treetable-column-sorted]': 'sorted',
Expand Down Expand Up @@ -2709,6 +2713,7 @@ export class TTSortableColumn implements OnInit, OnDestroy {

@Component({
selector: 'p-treeTableSortIcon',
standalone: false,
template: ` <ng-container *ngIf="!tt.sortIconTemplate">
<SortAltIcon [styleClass]="'p-sortable-column-icon'" *ngIf="sortOrder === 0" />
<SortAmountUpAltIcon [styleClass]="'p-sortable-column-icon'" *ngIf="sortOrder === 1" />
Expand Down Expand Up @@ -2766,7 +2771,8 @@ export class TTSortIcon implements OnInit, OnDestroy {
}

@Directive({
selector: '[ttResizableColumn]'
selector: '[ttResizableColumn]',
standalone: false
})
export class TTResizableColumn implements AfterViewInit, OnDestroy {
@Input({ transform: booleanAttribute }) ttResizableColumnDisabled: boolean | undefined;
Expand Down Expand Up @@ -2851,7 +2857,8 @@ export class TTResizableColumn implements AfterViewInit, OnDestroy {
}

@Directive({
selector: '[ttReorderableColumn]'
selector: '[ttReorderableColumn]',
standalone: false
})
export class TTReorderableColumn implements AfterViewInit, OnDestroy {
@Input({ transform: booleanAttribute }) ttReorderableColumnDisabled: boolean | undefined;
Expand Down Expand Up @@ -2956,6 +2963,7 @@ export class TTReorderableColumn implements AfterViewInit, OnDestroy {

@Directive({
selector: '[ttSelectableRow]',
standalone: false,
host: {
'[class.p-treetable-row-selected]': 'selected',
'[attr.aria-checked]': 'selected'
Expand Down Expand Up @@ -3042,6 +3050,7 @@ export class TTSelectableRow implements OnInit, OnDestroy {

@Directive({
selector: '[ttSelectableRowDblClick]',
standalone: false,
host: {
'[class.p-treetable-row-selected]': 'selected'
}
Expand Down Expand Up @@ -3095,6 +3104,7 @@ export class TTSelectableRowDblClick implements OnInit, OnDestroy {

@Directive({
selector: '[ttContextMenuRow]',
standalone: false,
host: {
'[class.p-treetable-contextmenu-row-selected]': 'selected',
'[attr.tabindex]': 'isEnabled() ? 0 : undefined'
Expand Down Expand Up @@ -3148,6 +3158,7 @@ export class TTContextMenuRow {

@Component({
selector: 'p-treeTableCheckbox',
standalone: false,
template: `
<p-checkbox [ngModel]="checked" (onChange)="onClick($event)" [binary]="true" [indeterminate]="partialChecked" styleClass="p-treetable-node-checkbox" [tabIndex]="-1">
<ng-container *ngIf="tt.checkboxIconTemplate">
Expand Down Expand Up @@ -3237,6 +3248,7 @@ export class TTCheckbox {

@Component({
selector: 'p-treeTableHeaderCheckbox',
standalone: false,
template: `
<p-checkbox [ngModel]="checked" (onChange)="onClick($event)" [binary]="true" [disabled]="!tt.value || tt.value.length === 0">
<ng-container *ngIf="tt.headerCheckboxIconTemplate">
Expand Down Expand Up @@ -3330,7 +3342,8 @@ export class TTHeaderCheckbox {
}

@Directive({
selector: '[ttEditableColumn]'
selector: '[ttEditableColumn]',
standalone: false
})
export class TTEditableColumn implements AfterViewInit {
@Input('ttEditableColumn') data: any;
Expand Down Expand Up @@ -3505,6 +3518,7 @@ export class TTEditableColumn implements AfterViewInit {

@Component({
selector: 'p-treeTableCellEditor, p-treetablecelleditor, p-treetable-cell-editor',
standalone: false,
template: `
<ng-container *ngIf="tt.editingCell === editableColumn.el.nativeElement">
<ng-container *ngTemplateOutlet="inputTemplate"></ng-container>
Expand Down Expand Up @@ -3545,6 +3559,7 @@ export class TreeTableCellEditor extends BaseComponent implements AfterContentIn

@Directive({
selector: '[ttRow]',
standalone: false,
host: {
'[class]': `'p-element ' + styleClass`,
'[attr.tabindex]': "'0'",
Expand Down Expand Up @@ -3744,6 +3759,7 @@ export class TTRow {

@Component({
selector: 'p-treeTableToggler, p-treetabletoggler, p-treetable-toggler',
standalone: false,
template: `
<button
type="button"
Expand Down

0 comments on commit 3bd2499

Please sign in to comment.