Skip to content

Commit

Permalink
Add alternative selectors to the components.
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Nov 7, 2024
2 parents c3dd420 + c77ea02 commit 961e20a
Show file tree
Hide file tree
Showing 34 changed files with 108 additions and 109 deletions.
5 changes: 1 addition & 4 deletions src/app/components/basecomponent/basecomponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ export class BaseComponent {
this.templates?.forEach((item) => {
const type = item.getType();
const template = `${type}Template`;

if (this[template]) {
this[template] = item.template;
}
this[template] = item.template;
});
}

Expand Down
5 changes: 3 additions & 2 deletions src/app/components/picklist/picklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1866,6 +1866,7 @@ export class PickList extends BaseComponent implements AfterViewChecked, AfterCo
if (this.media && !this.mediaChangeListener) {
this.mediaChangeListener = this.renderer.listen(this.media, 'change', (event) => {
this.viewChanged = event.matches;

this.cd.markForCheck();
});
}
Expand All @@ -1888,11 +1889,11 @@ export class PickList extends BaseComponent implements AfterViewChecked, AfterCo

let innerHTML = `
@media screen and (max-width: ${this.breakpoint}) {
.p-picklist[${this.attrSelector}] {
.p-picklist[${this.id}] {
flex-direction: column;
}
.p-picklist[${this.attrSelector}] .p-picklist-controls {
.p-picklist[${this.id}] .p-picklist-controls {
flex-direction: row;
}
}`;
Expand Down
1 change: 1 addition & 0 deletions src/app/components/tabs/tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { SharedModule } from 'primeng/api';
encapsulation: ViewEncapsulation.None,
host: {
'[class.p-tab]': 'true',
'[class.p-tab-active]': 'active()',
'[class.p-component]': 'true',
'[attr.data-pc-name]': '"tab"',
'[attr.id]': 'id()',
Expand Down
26 changes: 13 additions & 13 deletions src/app/components/treetable/treetable.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -46,7 +46,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -64,7 +64,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -82,7 +82,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -106,7 +106,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode" [ttSelectableRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -130,7 +130,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode" [ttSelectableRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand Down Expand Up @@ -159,7 +159,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
<p-treetableCheckbox [value]="rowNode" *ngIf="i == 0"></p-treetableCheckbox>
{{ rowData[col.field] }}
</td>
Expand All @@ -177,7 +177,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<td *ngFor="let col of columns; let i = index" ttEditableColumn [ngClass]="{ 'p-toggler-column': i === 0 }">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
<p-treetableCellEditor>
<ng-template pTemplate="input">
<input
Expand All @@ -204,7 +204,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -221,7 +221,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -238,7 +238,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -262,7 +262,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttContextMenuRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand Down Expand Up @@ -301,7 +301,7 @@ import { MinusIcon } from 'primeng/icons/minus';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr>
<td *ngFor="let col of cols; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treetableToggler>
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{ rowData[col.field] }}
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/basicdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { NodeService } from '@service/nodeservice';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr [ttRow]="rowNode">
<td>
<p-treetableToggler [rowNode]="rowNode" />
<p-treeTableToggler [rowNode]="rowNode" />
{{ rowData.name }}
</td>
<td>{{ rowData.size }}</td>
Expand Down Expand Up @@ -64,7 +64,7 @@ export class BasicDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr [ttRow]="rowNode">
<td>
<p-treetableToggler [rowNode]="rowNode" />
<p-treeTableToggler [rowNode]="rowNode" />
{{ rowData.name }}
</td>
<td>{{ rowData.size }}</td>
Expand All @@ -85,7 +85,7 @@ export class BasicDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr [ttRow]="rowNode">
<td>
<p-treetableToggler [rowNode]="rowNode" />
<p-treeTableToggler [rowNode]="rowNode" />
{{ rowData.name }}
</td>
<td>{{ rowData.size }}</td>
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/columngroupdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { Code } from '@domain/code';
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr [ttRow]="rowNode">
<td>
<p-treetableToggler [rowNode]="rowNode" />
<p-treeTableToggler [rowNode]="rowNode" />
{{ rowData.brand }}
</td>
<td>{{ rowData.lastYearSale }}</td>
Expand Down Expand Up @@ -328,7 +328,7 @@ export class ColumnGroupDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr>
<td>
<p-treetableToggler [rowNode]="rowNode" />
<p-treeTableToggler [rowNode]="rowNode" />
{{ rowData.brand }}
</td>
<td>{{ rowData.lastYearSale }}</td>
Expand Down Expand Up @@ -367,7 +367,7 @@ export class ColumnGroupDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr [ttRow]="rowNode">
<td>
<p-treetableToggler [rowNode]="rowNode" />
<p-treeTableToggler [rowNode]="rowNode" />
{{ rowData.brand }}
</td>
<td>{{ rowData.lastYearSale }}</td>
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/columnresizeexpanddoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface Column {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down Expand Up @@ -71,7 +71,7 @@ export class ResizeExpandDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -94,7 +94,7 @@ export class ResizeExpandDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/columnresizefitdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface Column {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down Expand Up @@ -74,7 +74,7 @@ export class ResizeFitDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -97,7 +97,7 @@ export class ResizeFitDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/columnresizescrollabledoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface Column {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down Expand Up @@ -92,7 +92,7 @@ export class ResizeScrollableDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down Expand Up @@ -121,7 +121,7 @@ export class ResizeScrollableDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/columntoggledoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ interface Column {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down Expand Up @@ -103,7 +103,7 @@ export class ColumnToggleDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down Expand Up @@ -138,7 +138,7 @@ export class ColumnToggleDoc {
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/conditionalstyledoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface Column {
*ngFor="let col of columns; let i = index"
[ngClass]="{ 'font-bold': col.field === 'size' && rowData.size.endsWith('kb') }"
>
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down Expand Up @@ -79,7 +79,7 @@ export class ConditionalStyleDoc {
<td
*ngFor="let col of columns; let i = index"
[ngClass]="{ 'font-bold': col.field === 'size' && rowData.size.endsWith('kb') }">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand All @@ -104,7 +104,7 @@ export class ConditionalStyleDoc {
<td
*ngFor="let col of columns; let i = index"
[ngClass]="{ 'font-bold': col.field === 'size' && rowData.size.endsWith('kb') }">
<p-treetableToggler [rowNode]="rowNode" *ngIf="i === 0" />
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0" />
{{ rowData[col.field] }}
</td>
</tr>
Expand Down
Loading

0 comments on commit 961e20a

Please sign in to comment.