@exhaustive-ui/mcp 22.2.0 → 22.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/components/autocomplete.md +41 -41
- package/data/components/avatar.md +8 -4
- package/data/components/badge.md +6 -6
- package/data/components/blockui.md +3 -3
- package/data/components/button.md +2 -2
- package/data/components/cascadeselect.md +28 -28
- package/data/components/checkbox.md +1 -1
- package/data/components/colorpicker.md +9 -9
- package/data/components/confirmdialog.md +9 -9
- package/data/components/confirmpopup.md +5 -5
- package/data/components/contextmenu.md +6 -6
- package/data/components/dataview.md +14 -14
- package/data/components/datepicker.md +53 -52
- package/data/components/dialog.md +14 -14
- package/data/components/dock.md +1 -1
- package/data/components/editor.md +1 -1
- package/data/components/fileinput.md +18 -18
- package/data/components/fileupload.md +10 -10
- package/data/components/floatlabel.md +26 -26
- package/data/components/focustrap.md +8 -8
- package/data/components/galleria.md +8 -8
- package/data/components/iconfield.md +40 -40
- package/data/components/iftalabel.md +18 -18
- package/data/components/imagecompare.md +4 -4
- package/data/components/inputgroup.md +73 -73
- package/data/components/inputmask.md +9 -9
- package/data/components/inputnumber.md +46 -46
- package/data/components/inputotp.md +13 -13
- package/data/components/inputtext.md +8 -8
- package/data/components/megamenu.md +6 -6
- package/data/components/message.md +1 -1
- package/data/components/metergroup.md +8 -8
- package/data/components/multiselect.md +34 -34
- package/data/components/orderlist.md +10 -10
- package/data/components/organizationchart.md +8 -4
- package/data/components/paginator.md +2 -2
- package/data/components/panelmenu.md +7 -7
- package/data/components/password.md +8 -8
- package/data/components/picklist.md +10 -10
- package/data/components/popover.md +6 -6
- package/data/components/progressbar.md +5 -5
- package/data/components/progressspinner.md +4 -2
- package/data/components/radiobutton.md +15 -15
- package/data/components/scrollpanel.md +4 -4
- package/data/components/scrolltop.md +2 -2
- package/data/components/select.md +24 -24
- package/data/components/selectbutton.md +14 -14
- package/data/components/slider.md +1 -1
- package/data/components/speeddial.md +18 -18
- package/data/components/splitbutton.md +57 -57
- package/data/components/splitter.md +6 -0
- package/data/components/stepper.md +10 -10
- package/data/components/table.md +174 -140
- package/data/components/tabs.md +64 -64
- package/data/components/textarea.md +8 -8
- package/data/components/tieredmenu.md +6 -6
- package/data/components/toast.md +2 -2
- package/data/components/togglebutton.md +11 -11
- package/data/components/toggleswitch.md +9 -9
- package/data/components/toolbar.md +4 -4
- package/data/components/tree.md +2 -2
- package/data/components/treeselect.md +33 -33
- package/data/components/treetable.md +136 -105
- package/data/components.json +776 -441
- package/data/llms-full.txt +1234 -1117
- package/data/llms.txt +1 -0
- package/data/manifest.json +920 -258
- package/data/pages/naming.md +27 -0
- package/data/pages/tailwind.md +1 -1
- package/data/snapshot.json +3 -3
- package/package.json +1 -1
package/data/components/table.md
CHANGED
|
@@ -57,7 +57,7 @@ export class TableBasicDemo implements OnInit {
|
|
|
57
57
|
|
|
58
58
|
## celledit-doc
|
|
59
59
|
|
|
60
|
-
In-cell editing is enabled by adding pEditableColumn directive to an editable cell that has a p-
|
|
60
|
+
In-cell editing is enabled by adding pEditableColumn directive to an editable cell that has a p-cell-editor helper component to define the input-output templates for the edit and view modes respectively.
|
|
61
61
|
|
|
62
62
|
```typescript
|
|
63
63
|
import { Component, OnInit, inject } from '@angular/core';
|
|
@@ -82,44 +82,44 @@ import { Product } from '@/domain/product';
|
|
|
82
82
|
<ng-template #body let-product let-editing="editing">
|
|
83
83
|
<tr>
|
|
84
84
|
<td [pEditableColumn]="product.code" pEditableColumnField="code">
|
|
85
|
-
<p-
|
|
85
|
+
<p-cell-editor>
|
|
86
86
|
<ng-template #input>
|
|
87
87
|
<input pInputText type="text" [(ngModel)]="product.code" fluid />
|
|
88
88
|
</ng-template>
|
|
89
89
|
<ng-template #output>
|
|
90
90
|
{{ product.code }}
|
|
91
91
|
</ng-template>
|
|
92
|
-
</p-
|
|
92
|
+
</p-cell-editor>
|
|
93
93
|
</td>
|
|
94
94
|
<td [pEditableColumn]="product.name" pEditableColumnField="name">
|
|
95
|
-
<p-
|
|
95
|
+
<p-cell-editor>
|
|
96
96
|
<ng-template #input>
|
|
97
97
|
<input pInputText type="text" [(ngModel)]="product.name" required fluid />
|
|
98
98
|
</ng-template>
|
|
99
99
|
<ng-template #output>
|
|
100
100
|
{{ product.name }}
|
|
101
101
|
</ng-template>
|
|
102
|
-
</p-
|
|
102
|
+
</p-cell-editor>
|
|
103
103
|
</td>
|
|
104
104
|
<td [pEditableColumn]="product.quantity" pEditableColumnField="quantity">
|
|
105
|
-
<p-
|
|
105
|
+
<p-cell-editor>
|
|
106
106
|
<ng-template #input>
|
|
107
107
|
<input pInputText [(ngModel)]="product.quantity" fluid />
|
|
108
108
|
</ng-template>
|
|
109
109
|
<ng-template #output>
|
|
110
110
|
{{ product.quantity }}
|
|
111
111
|
</ng-template>
|
|
112
|
-
</p-
|
|
112
|
+
</p-cell-editor>
|
|
113
113
|
</td>
|
|
114
114
|
<td [pEditableColumn]="product.price" pEditableColumnField="price">
|
|
115
|
-
<p-
|
|
115
|
+
<p-cell-editor>
|
|
116
116
|
<ng-template #input>
|
|
117
117
|
<input pInputText type="text" [(ngModel)]="product.price" fluid />
|
|
118
118
|
</ng-template>
|
|
119
119
|
<ng-template #output>
|
|
120
120
|
{{ product.price | currency: 'USD' }}
|
|
121
121
|
</ng-template>
|
|
122
|
-
</p-
|
|
122
|
+
</p-cell-editor>
|
|
123
123
|
</td>
|
|
124
124
|
</tr>
|
|
125
125
|
</ng-template>
|
|
@@ -159,7 +159,7 @@ import { Product } from '@/domain/product';
|
|
|
159
159
|
<ng-template #header>
|
|
160
160
|
<tr>
|
|
161
161
|
<th style="width: 4rem">
|
|
162
|
-
<p-
|
|
162
|
+
<p-table-header-checkbox />
|
|
163
163
|
</th>
|
|
164
164
|
<th>Code</th>
|
|
165
165
|
<th>Name</th>
|
|
@@ -170,7 +170,7 @@ import { Product } from '@/domain/product';
|
|
|
170
170
|
<ng-template #body let-product>
|
|
171
171
|
<tr>
|
|
172
172
|
<td>
|
|
173
|
-
<p-
|
|
173
|
+
<p-table-checkbox [value]="product" />
|
|
174
174
|
</td>
|
|
175
175
|
<td>{{ product.code }}</td>
|
|
176
176
|
<td>{{ product.name }}</td>
|
|
@@ -566,7 +566,7 @@ interface Column {
|
|
|
566
566
|
<div class="card">
|
|
567
567
|
<p-table [columns]="selectedColumns" [value]="products" [tableStyle]="{ 'min-width': '50rem' }">
|
|
568
568
|
<ng-template #caption>
|
|
569
|
-
<p-
|
|
569
|
+
<p-multi-select display="chip" [options]="cols" [(ngModel)]="selectedColumns" optionLabel="header" selectedItemsLabel="{0} columns selected" [style]="{ 'min-width': '200px' }" placeholder="Choose Columns" />
|
|
570
570
|
</ng-template>
|
|
571
571
|
<ng-template #header let-columns>
|
|
572
572
|
<tr>
|
|
@@ -627,7 +627,7 @@ import { Product } from '@/domain/product';
|
|
|
627
627
|
@Component({
|
|
628
628
|
template: `
|
|
629
629
|
<div class="card">
|
|
630
|
-
<p-
|
|
630
|
+
<p-context-menu #cm [model]="items" (onHide)="selectedProduct = null" />
|
|
631
631
|
<p-table [value]="products" [(contextMenuSelection)]="selectedProduct" [contextMenu]="cm" dataKey="code" [tableStyle]="{ 'min-width': '50rem' }">
|
|
632
632
|
<ng-template #header>
|
|
633
633
|
<tr>
|
|
@@ -690,11 +690,11 @@ DataTable with selection, pagination, filtering, sorting and templating.
|
|
|
690
690
|
import { Component, OnInit, inject } from '@angular/core';
|
|
691
691
|
import { FormsModule } from '@angular/forms';
|
|
692
692
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
693
|
-
import { SelectModule } from '@exhaustive-ui/core/select';
|
|
694
693
|
import { IconFieldModule } from '@exhaustive-ui/core/iconfield';
|
|
695
694
|
import { InputIconModule } from '@exhaustive-ui/core/inputicon';
|
|
696
695
|
import { MultiSelectModule } from '@exhaustive-ui/core/multiselect';
|
|
697
696
|
import { ProgressBarModule } from '@exhaustive-ui/core/progressbar';
|
|
697
|
+
import { SelectModule } from '@exhaustive-ui/core/select';
|
|
698
698
|
import { SliderModule } from '@exhaustive-ui/core/slider';
|
|
699
699
|
import { Table, TableModule } from '@exhaustive-ui/core/table';
|
|
700
700
|
import { TagModule } from '@exhaustive-ui/core/tag';
|
|
@@ -723,70 +723,70 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
723
723
|
<ng-template #caption>
|
|
724
724
|
<div class="flex justify-between">
|
|
725
725
|
<p-button [outlined]="true" icon="pi pi-filter-slash" label="Clear" (click)="clear(dt)" />
|
|
726
|
-
<p-
|
|
727
|
-
<p-
|
|
726
|
+
<p-icon-field iconPosition="left">
|
|
727
|
+
<p-input-icon>
|
|
728
728
|
<i class="pi pi-search"></i>
|
|
729
|
-
</p-
|
|
729
|
+
</p-input-icon>
|
|
730
730
|
<input pInputText type="text" [(ngModel)]="searchValue" (input)="dt.filterGlobal($event.target.value, 'contains')" placeholder="Keyboard Search" />
|
|
731
|
-
</p-
|
|
731
|
+
</p-icon-field>
|
|
732
732
|
</div>
|
|
733
733
|
</ng-template>
|
|
734
734
|
<ng-template #header>
|
|
735
735
|
<tr>
|
|
736
736
|
<th style="width: 4rem">
|
|
737
|
-
<p-
|
|
737
|
+
<p-table-header-checkbox />
|
|
738
738
|
</th>
|
|
739
739
|
<th pSortableColumn="name" style="min-width: 14rem">
|
|
740
740
|
<div class="flex justify-between items-center gap-2">
|
|
741
741
|
Name
|
|
742
|
-
<p-
|
|
743
|
-
<p-
|
|
742
|
+
<p-sort-icon field="name" />
|
|
743
|
+
<p-column-filter type="text" field="name" display="menu" class="ml-auto" />
|
|
744
744
|
</div>
|
|
745
745
|
</th>
|
|
746
746
|
<th pSortableColumn="country.name" style="min-width: 14rem">
|
|
747
747
|
<div class="flex justify-between items-center gap-2">
|
|
748
748
|
Country
|
|
749
|
-
<p-
|
|
750
|
-
<p-
|
|
749
|
+
<p-sort-icon field="country.name" />
|
|
750
|
+
<p-column-filter type="text" field="country.name" display="menu" class="ml-auto" />
|
|
751
751
|
</div>
|
|
752
752
|
</th>
|
|
753
753
|
<th pSortableColumn="representative.name" style="min-width: 14rem">
|
|
754
754
|
<div class="flex justify-between items-center gap-2">
|
|
755
755
|
Agent
|
|
756
|
-
<p-
|
|
757
|
-
<p-
|
|
756
|
+
<p-sort-icon field="representative.name" />
|
|
757
|
+
<p-column-filter field="representative" matchMode="in" display="menu" [showMatchModes]="false" [showOperator]="false" [showAddButton]="false" class="ml-auto">
|
|
758
758
|
<ng-template #filter let-value let-filter="filterCallback">
|
|
759
|
-
<p-
|
|
759
|
+
<p-multi-select [filter]="false" [(ngModel)]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name" class="w-full">
|
|
760
760
|
<ng-template let-option #item>
|
|
761
761
|
<div class="flex items-center gap-2">
|
|
762
762
|
<img [alt]="option.label" src="https://exhaustive-ui.com/demo/avatar/{{ option.image }}" style="width: 32px" />
|
|
763
763
|
<span>{{ option.name }}</span>
|
|
764
764
|
</div>
|
|
765
765
|
</ng-template>
|
|
766
|
-
</p-
|
|
766
|
+
</p-multi-select>
|
|
767
767
|
</ng-template>
|
|
768
|
-
</p-
|
|
768
|
+
</p-column-filter>
|
|
769
769
|
</div>
|
|
770
770
|
</th>
|
|
771
771
|
<th pSortableColumn="date" style="min-width: 14rem">
|
|
772
772
|
<div class="flex justify-between items-center gap-2">
|
|
773
773
|
Date
|
|
774
|
-
<p-
|
|
775
|
-
<p-
|
|
774
|
+
<p-sort-icon field="date" />
|
|
775
|
+
<p-column-filter type="date" field="date" display="menu" class="ml-auto" />
|
|
776
776
|
</div>
|
|
777
777
|
</th>
|
|
778
778
|
<th pSortableColumn="balance" style="min-width: 14rem">
|
|
779
779
|
<div class="flex justify-between items-center gap-2">
|
|
780
780
|
Balance
|
|
781
|
-
<p-
|
|
782
|
-
<p-
|
|
781
|
+
<p-sort-icon field="balance" />
|
|
782
|
+
<p-column-filter type="numeric" field="balance" display="menu" currency="USD" class="ml-auto" />
|
|
783
783
|
</div>
|
|
784
784
|
</th>
|
|
785
785
|
<th pSortableColumn="status" style="min-width: 14rem">
|
|
786
786
|
<div class="flex justify-between items-center gap-2">
|
|
787
787
|
Status
|
|
788
|
-
<p-
|
|
789
|
-
<p-
|
|
788
|
+
<p-sort-icon field="status" />
|
|
789
|
+
<p-column-filter field="status" matchMode="equals" display="menu" class="ml-auto">
|
|
790
790
|
<ng-template #filter let-value let-filter="filterCallback">
|
|
791
791
|
<p-select [(ngModel)]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
|
|
792
792
|
<ng-template let-option #item>
|
|
@@ -794,14 +794,14 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
794
794
|
</ng-template>
|
|
795
795
|
</p-select>
|
|
796
796
|
</ng-template>
|
|
797
|
-
</p-
|
|
797
|
+
</p-column-filter>
|
|
798
798
|
</div>
|
|
799
799
|
</th>
|
|
800
800
|
<th pSortableColumn="activity" style="min-width: 14rem">
|
|
801
801
|
<div class="flex justify-between items-center gap-2">
|
|
802
802
|
Activity
|
|
803
|
-
<p-
|
|
804
|
-
<p-
|
|
803
|
+
<p-sort-icon field="activity" />
|
|
804
|
+
<p-column-filter field="activity" matchMode="between" display="menu" [showMatchModes]="false" [showOperator]="false" [showAddButton]="false" class="ml-auto">
|
|
805
805
|
<ng-template #filter let-filter="filterCallback">
|
|
806
806
|
<p-slider [(ngModel)]="activityValues" [range]="true" (onSlideEnd)="filter($event.values)" class="m-4"></p-slider>
|
|
807
807
|
<div class="flex items-center justify-between px-2">
|
|
@@ -809,7 +809,7 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
809
809
|
<span>{{ activityValues[1] }}</span>
|
|
810
810
|
</div>
|
|
811
811
|
</ng-template>
|
|
812
|
-
</p-
|
|
812
|
+
</p-column-filter>
|
|
813
813
|
</div>
|
|
814
814
|
</th>
|
|
815
815
|
<th style="width: 5rem"></th>
|
|
@@ -818,7 +818,7 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
818
818
|
<ng-template #body let-customer>
|
|
819
819
|
<tr class="p-selectable-row">
|
|
820
820
|
<td>
|
|
821
|
-
<p-
|
|
821
|
+
<p-table-checkbox [value]="customer" />
|
|
822
822
|
</td>
|
|
823
823
|
<td>
|
|
824
824
|
{{ customer.name }}
|
|
@@ -845,7 +845,7 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
845
845
|
<p-tag [value]="customer.status" [severity]="getSeverity(customer.status)" />
|
|
846
846
|
</td>
|
|
847
847
|
<td>
|
|
848
|
-
<p-
|
|
848
|
+
<p-progress-bar [value]="customer.activity" [showValue]="false" />
|
|
849
849
|
</td>
|
|
850
850
|
<td style="text-align: center">
|
|
851
851
|
<p-button rounded icon="pi pi-cog" />
|
|
@@ -861,7 +861,7 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
861
861
|
</div>
|
|
862
862
|
`,
|
|
863
863
|
standalone: true,
|
|
864
|
-
imports: [ButtonModule,
|
|
864
|
+
imports: [ButtonModule, IconFieldModule, InputIconModule, MultiSelectModule, ProgressBarModule, SelectModule, SliderModule, TableModule, TagModule, InputTextModule, FormsModule],
|
|
865
865
|
providers: [CustomerService]
|
|
866
866
|
})
|
|
867
867
|
export class TableCustomersDemo implements OnInit {
|
|
@@ -1186,11 +1186,11 @@ Filters are displayed in an overlay.
|
|
|
1186
1186
|
import { Component, OnInit, inject, signal } from '@angular/core';
|
|
1187
1187
|
import { FormsModule } from '@angular/forms';
|
|
1188
1188
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
1189
|
-
import { SelectModule } from '@exhaustive-ui/core/select';
|
|
1190
1189
|
import { IconFieldModule } from '@exhaustive-ui/core/iconfield';
|
|
1191
1190
|
import { InputIconModule } from '@exhaustive-ui/core/inputicon';
|
|
1192
1191
|
import { MultiSelectModule } from '@exhaustive-ui/core/multiselect';
|
|
1193
1192
|
import { ProgressBarModule } from '@exhaustive-ui/core/progressbar';
|
|
1193
|
+
import { SelectModule } from '@exhaustive-ui/core/select';
|
|
1194
1194
|
import { SliderModule } from '@exhaustive-ui/core/slider';
|
|
1195
1195
|
import { Table, TableModule } from '@exhaustive-ui/core/table';
|
|
1196
1196
|
import { TagModule } from '@exhaustive-ui/core/tag';
|
|
@@ -1205,12 +1205,12 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1205
1205
|
<ng-template #caption>
|
|
1206
1206
|
<div class="flex">
|
|
1207
1207
|
<p-button label="Clear" [outlined]="true" icon="pi pi-filter-slash" (click)="clear(dt1)" />
|
|
1208
|
-
<p-
|
|
1209
|
-
<p-
|
|
1208
|
+
<p-icon-field iconPosition="left" class="ml-auto">
|
|
1209
|
+
<p-input-icon>
|
|
1210
1210
|
<i class="pi pi-search"></i>
|
|
1211
|
-
</p-
|
|
1211
|
+
</p-input-icon>
|
|
1212
1212
|
<input pInputText type="text" (input)="dt1.filterGlobal($event.target.value, 'contains')" placeholder="Search keyword" />
|
|
1213
|
-
</p-
|
|
1213
|
+
</p-icon-field>
|
|
1214
1214
|
</div>
|
|
1215
1215
|
</ng-template>
|
|
1216
1216
|
<ng-template #header>
|
|
@@ -1218,48 +1218,48 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1218
1218
|
<th style="min-width:15rem">
|
|
1219
1219
|
<div class="flex items-center justify-between">
|
|
1220
1220
|
Name
|
|
1221
|
-
<p-
|
|
1221
|
+
<p-column-filter type="text" field="name" display="menu" />
|
|
1222
1222
|
</div>
|
|
1223
1223
|
</th>
|
|
1224
1224
|
<th style="min-width:15rem">
|
|
1225
1225
|
<div class="flex items-center justify-between">
|
|
1226
1226
|
Country
|
|
1227
|
-
<p-
|
|
1227
|
+
<p-column-filter type="text" field="country.name" display="menu" />
|
|
1228
1228
|
</div>
|
|
1229
1229
|
</th>
|
|
1230
1230
|
<th style="min-width:15rem">
|
|
1231
1231
|
<div class="flex items-center justify-between">
|
|
1232
1232
|
Agent
|
|
1233
|
-
<p-
|
|
1233
|
+
<p-column-filter field="representative" matchMode="in" display="menu" [showMatchModes]="false" [showOperator]="false" [showAddButton]="false">
|
|
1234
1234
|
<ng-template #filter let-value let-filter="filterCallback">
|
|
1235
|
-
<p-
|
|
1235
|
+
<p-multi-select [(ngModel)]="value" [options]="representatives()" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name" style="min-width: 14rem" [panelStyle]="{ minWidth: '16rem' }">
|
|
1236
1236
|
<ng-template let-option #item>
|
|
1237
1237
|
<div class="flex items-center gap-2">
|
|
1238
1238
|
<img [alt]="option.label" src="https://exhaustive-ui.com/demo/avatar/{{ option.image }}" style="width: 32px" />
|
|
1239
1239
|
<span>{{ option.name }}</span>
|
|
1240
1240
|
</div>
|
|
1241
1241
|
</ng-template>
|
|
1242
|
-
</p-
|
|
1242
|
+
</p-multi-select>
|
|
1243
1243
|
</ng-template>
|
|
1244
|
-
</p-
|
|
1244
|
+
</p-column-filter>
|
|
1245
1245
|
</div>
|
|
1246
1246
|
</th>
|
|
1247
1247
|
<th style="min-width:10rem">
|
|
1248
1248
|
<div class="flex items-center justify-between">
|
|
1249
1249
|
Date
|
|
1250
|
-
<p-
|
|
1250
|
+
<p-column-filter type="date" field="date" display="menu"></p-column-filter>
|
|
1251
1251
|
</div>
|
|
1252
1252
|
</th>
|
|
1253
1253
|
<th style="min-width:10rem">
|
|
1254
1254
|
<div class="flex items-center justify-between">
|
|
1255
1255
|
Balance
|
|
1256
|
-
<p-
|
|
1256
|
+
<p-column-filter type="numeric" field="balance" display="menu" currency="USD" />
|
|
1257
1257
|
</div>
|
|
1258
1258
|
</th>
|
|
1259
1259
|
<th style="min-width:10rem">
|
|
1260
1260
|
<div class="flex items-center justify-between">
|
|
1261
1261
|
Status
|
|
1262
|
-
<p-
|
|
1262
|
+
<p-column-filter field="status" matchMode="equals" display="menu">
|
|
1263
1263
|
<ng-template #filter let-value let-filter="filterCallback">
|
|
1264
1264
|
<p-select [(ngModel)]="value" [options]="statuses()" (onChange)="filter($event.value)" placeholder="Select One" class="w-full">
|
|
1265
1265
|
<ng-template let-option #item>
|
|
@@ -1267,13 +1267,13 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1267
1267
|
</ng-template>
|
|
1268
1268
|
</p-select>
|
|
1269
1269
|
</ng-template>
|
|
1270
|
-
</p-
|
|
1270
|
+
</p-column-filter>
|
|
1271
1271
|
</div>
|
|
1272
1272
|
</th>
|
|
1273
1273
|
<th style="min-width:10rem">
|
|
1274
1274
|
<div class="flex items-center justify-between">
|
|
1275
1275
|
Activity
|
|
1276
|
-
<p-
|
|
1276
|
+
<p-column-filter field="activity" matchMode="between" display="menu" [showMatchModes]="false" [showOperator]="false" [showAddButton]="false">
|
|
1277
1277
|
<ng-template #filter let-value let-filter="filterCallback">
|
|
1278
1278
|
<p-slider [(ngModel)]="value" [range]="true" class="m-4" (onSlideEnd)="filter($event.values)" />
|
|
1279
1279
|
<div class="flex items-center px-2">
|
|
@@ -1281,13 +1281,13 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1281
1281
|
<span *ngIf="value">{{ value[0] }} - {{ value[1] }}</span>
|
|
1282
1282
|
</div>
|
|
1283
1283
|
</ng-template>
|
|
1284
|
-
</p-
|
|
1284
|
+
</p-column-filter>
|
|
1285
1285
|
</div>
|
|
1286
1286
|
</th>
|
|
1287
1287
|
<th style="width: 3rem">
|
|
1288
1288
|
<div class="flex items-center justify-between">
|
|
1289
1289
|
Verified
|
|
1290
|
-
<p-
|
|
1290
|
+
<p-column-filter type="boolean" field="verified" display="menu" />
|
|
1291
1291
|
</div>
|
|
1292
1292
|
</th>
|
|
1293
1293
|
</tr>
|
|
@@ -1319,7 +1319,7 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1319
1319
|
<p-tag [value]="customer.status" [severity]="getSeverity(customer.status)" />
|
|
1320
1320
|
</td>
|
|
1321
1321
|
<td>
|
|
1322
|
-
<p-
|
|
1322
|
+
<p-progress-bar [value]="customer.activity" [showValue]="false" />
|
|
1323
1323
|
</td>
|
|
1324
1324
|
<td class="text-center">
|
|
1325
1325
|
<i
|
|
@@ -1341,7 +1341,7 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1341
1341
|
</div>
|
|
1342
1342
|
`,
|
|
1343
1343
|
standalone: true,
|
|
1344
|
-
imports: [ButtonModule,
|
|
1344
|
+
imports: [ButtonModule, IconFieldModule, InputIconModule, MultiSelectModule, ProgressBarModule, SelectModule, SliderModule, TableModule, TagModule, InputTextModule, FormsModule],
|
|
1345
1345
|
providers: [CustomerService]
|
|
1346
1346
|
})
|
|
1347
1347
|
export class TableFilterAdvancedDemo implements OnInit {
|
|
@@ -1415,10 +1415,10 @@ Data filtering is enabled by defining the filters property referring to a DataTa
|
|
|
1415
1415
|
```typescript
|
|
1416
1416
|
import { Component, OnInit, inject } from '@angular/core';
|
|
1417
1417
|
import { FormsModule } from '@angular/forms';
|
|
1418
|
-
import { SelectModule } from '@exhaustive-ui/core/select';
|
|
1419
1418
|
import { IconFieldModule } from '@exhaustive-ui/core/iconfield';
|
|
1420
1419
|
import { InputIconModule } from '@exhaustive-ui/core/inputicon';
|
|
1421
1420
|
import { MultiSelectModule } from '@exhaustive-ui/core/multiselect';
|
|
1421
|
+
import { SelectModule } from '@exhaustive-ui/core/select';
|
|
1422
1422
|
import { Table, TableModule } from '@exhaustive-ui/core/table';
|
|
1423
1423
|
import { TagModule } from '@exhaustive-ui/core/tag';
|
|
1424
1424
|
import { InputTextModule } from '@exhaustive-ui/core/inputtext';
|
|
@@ -1441,12 +1441,12 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1441
1441
|
>
|
|
1442
1442
|
<ng-template #caption>
|
|
1443
1443
|
<div class="flex">
|
|
1444
|
-
<p-
|
|
1445
|
-
<p-
|
|
1444
|
+
<p-icon-field iconPosition="left" class="ml-auto">
|
|
1445
|
+
<p-input-icon>
|
|
1446
1446
|
<i class="pi pi-search"></i>
|
|
1447
|
-
</p-
|
|
1447
|
+
</p-input-icon>
|
|
1448
1448
|
<input pInputText type="text" (input)="dt2.filterGlobal($event.target.value, 'contains')" placeholder="Search keyword" />
|
|
1449
|
-
</p-
|
|
1449
|
+
</p-icon-field>
|
|
1450
1450
|
</div>
|
|
1451
1451
|
</ng-template>
|
|
1452
1452
|
<ng-template #header>
|
|
@@ -1459,27 +1459,27 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1459
1459
|
</tr>
|
|
1460
1460
|
<tr>
|
|
1461
1461
|
<th>
|
|
1462
|
-
<p-
|
|
1462
|
+
<p-column-filter type="text" field="name" placeholder="Type to search" ariaLabel="Filter Name" filterOn="input"></p-column-filter>
|
|
1463
1463
|
</th>
|
|
1464
1464
|
<th>
|
|
1465
|
-
<p-
|
|
1465
|
+
<p-column-filter type="text" field="country.name" placeholder="Enter key to search" ariaLabel="Filter Country"></p-column-filter>
|
|
1466
1466
|
</th>
|
|
1467
1467
|
<th>
|
|
1468
|
-
<p-
|
|
1468
|
+
<p-column-filter field="representative" matchMode="in" [showMenu]="false">
|
|
1469
1469
|
<ng-template #filter let-value let-filter="filterCallback">
|
|
1470
|
-
<p-
|
|
1470
|
+
<p-multi-select [(ngModel)]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name" style="min-width: 14rem" [panelStyle]="{ minWidth: '16rem' }">
|
|
1471
1471
|
<ng-template let-option #item>
|
|
1472
1472
|
<div class="flex items-center gap-2">
|
|
1473
1473
|
<img [alt]="option.label" src="https://exhaustive-ui.com/demo/avatar/{{ option.image }}" style="width: 32px" />
|
|
1474
1474
|
<span>{{ option.name }}</span>
|
|
1475
1475
|
</div>
|
|
1476
1476
|
</ng-template>
|
|
1477
|
-
</p-
|
|
1477
|
+
</p-multi-select>
|
|
1478
1478
|
</ng-template>
|
|
1479
|
-
</p-
|
|
1479
|
+
</p-column-filter>
|
|
1480
1480
|
</th>
|
|
1481
1481
|
<th>
|
|
1482
|
-
<p-
|
|
1482
|
+
<p-column-filter field="status" matchMode="equals" [showMenu]="false">
|
|
1483
1483
|
<ng-template #filter let-value let-filter="filterCallback">
|
|
1484
1484
|
<p-select [(ngModel)]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Select One" [showClear]="true" style="min-width: 12rem">
|
|
1485
1485
|
<ng-template let-option #item>
|
|
@@ -1487,10 +1487,10 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1487
1487
|
</ng-template>
|
|
1488
1488
|
</p-select>
|
|
1489
1489
|
</ng-template>
|
|
1490
|
-
</p-
|
|
1490
|
+
</p-column-filter>
|
|
1491
1491
|
</th>
|
|
1492
1492
|
<th>
|
|
1493
|
-
<p-
|
|
1493
|
+
<p-column-filter type="boolean" field="verified"></p-column-filter>
|
|
1494
1494
|
</th>
|
|
1495
1495
|
</tr>
|
|
1496
1496
|
</ng-template>
|
|
@@ -1534,7 +1534,7 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1534
1534
|
</div>
|
|
1535
1535
|
`,
|
|
1536
1536
|
standalone: true,
|
|
1537
|
-
imports: [
|
|
1537
|
+
imports: [IconFieldModule, InputIconModule, MultiSelectModule, SelectModule, TableModule, TagModule, InputTextModule, FormsModule],
|
|
1538
1538
|
providers: [CustomerService]
|
|
1539
1539
|
})
|
|
1540
1540
|
export class TableFilterbasicDemo implements OnInit {
|
|
@@ -1677,7 +1677,7 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
1677
1677
|
@Component({
|
|
1678
1678
|
template: `
|
|
1679
1679
|
<div class="card">
|
|
1680
|
-
<p-
|
|
1680
|
+
<p-toggle-button [(ngModel)]="balanceFrozen" [onIcon]="'pi pi-lock'" offIcon="pi pi-lock-open" [onLabel]="'Balance'" offLabel="Balance" />
|
|
1681
1681
|
<p-table [value]="customers" [scrollable]="true" scrollHeight="400px" class="mt-4">
|
|
1682
1682
|
<ng-template #header>
|
|
1683
1683
|
<tr>
|
|
@@ -2068,25 +2068,25 @@ import { Product } from '@/domain/product';
|
|
|
2068
2068
|
<th pSortableColumn="code" style="width:20%">
|
|
2069
2069
|
<div class="flex items-center gap-2">
|
|
2070
2070
|
Code
|
|
2071
|
-
<p-
|
|
2071
|
+
<p-sort-icon field="code" />
|
|
2072
2072
|
</div>
|
|
2073
2073
|
</th>
|
|
2074
2074
|
<th pSortableColumn="name" style="width:20%">
|
|
2075
2075
|
<div class="flex items-center gap-2">
|
|
2076
2076
|
Name
|
|
2077
|
-
<p-
|
|
2077
|
+
<p-sort-icon field="name" />
|
|
2078
2078
|
</div>
|
|
2079
2079
|
</th>
|
|
2080
2080
|
<th pSortableColumn="category" style="width:20%">
|
|
2081
2081
|
<div class="flex items-center gap-2">
|
|
2082
2082
|
Category
|
|
2083
|
-
<p-
|
|
2083
|
+
<p-sort-icon field="category" />
|
|
2084
2084
|
</div>
|
|
2085
2085
|
</th>
|
|
2086
2086
|
<th pSortableColumn="quantity" style="width:20%">
|
|
2087
2087
|
<div class="flex items-center gap-2">
|
|
2088
2088
|
Quantity
|
|
2089
|
-
<p-
|
|
2089
|
+
<p-sort-icon field="quantity" />
|
|
2090
2090
|
</div>
|
|
2091
2091
|
</th>
|
|
2092
2092
|
</tr>
|
|
@@ -2134,7 +2134,7 @@ import { Product } from '@/domain/product';
|
|
|
2134
2134
|
template: `
|
|
2135
2135
|
<div class="card">
|
|
2136
2136
|
<div class="flex justify-center items-center mb-6 gap-2">
|
|
2137
|
-
<p-
|
|
2137
|
+
<p-toggle-switch [(ngModel)]="metaKey" inputId="input-metakey" />
|
|
2138
2138
|
<label for="input-metakey">MetaKey</label>
|
|
2139
2139
|
</div>
|
|
2140
2140
|
<p-table [value]="products" selectionMode="multiple" [(selection)]="selectedProducts" [metaKeySelection]="metaKey" dataKey="code" [tableStyle]="{ 'min-width': '50rem' }">
|
|
@@ -2335,31 +2335,31 @@ import { Product } from '@/domain/product';
|
|
|
2335
2335
|
<th pSortableColumn="code" style="width:20%">
|
|
2336
2336
|
<div class="flex items-center gap-2">
|
|
2337
2337
|
Code
|
|
2338
|
-
<p-
|
|
2338
|
+
<p-sort-icon field="code" />
|
|
2339
2339
|
</div>
|
|
2340
2340
|
</th>
|
|
2341
2341
|
<th pSortableColumn="name" style="width:20%">
|
|
2342
2342
|
<div class="flex items-center gap-2">
|
|
2343
2343
|
Name
|
|
2344
|
-
<p-
|
|
2344
|
+
<p-sort-icon field="name" />
|
|
2345
2345
|
</div>
|
|
2346
2346
|
</th>
|
|
2347
2347
|
<th pSortableColumn="price" style="width:20%">
|
|
2348
2348
|
<div class="flex items-center gap-2">
|
|
2349
2349
|
Price
|
|
2350
|
-
<p-
|
|
2350
|
+
<p-sort-icon field="price" />
|
|
2351
2351
|
</div>
|
|
2352
2352
|
</th>
|
|
2353
2353
|
<th pSortableColumn="category" style="width:20%">
|
|
2354
2354
|
<div class="flex items-center gap-2">
|
|
2355
2355
|
Category
|
|
2356
|
-
<p-
|
|
2356
|
+
<p-sort-icon field="category" />
|
|
2357
2357
|
</div>
|
|
2358
2358
|
</th>
|
|
2359
2359
|
<th pSortableColumn="quantity" style="width:20%">
|
|
2360
2360
|
<div class="flex items-center gap-2">
|
|
2361
2361
|
Quantity
|
|
2362
|
-
<p-
|
|
2362
|
+
<p-sort-icon field="quantity" />
|
|
2363
2363
|
</div>
|
|
2364
2364
|
</th>
|
|
2365
2365
|
</tr>
|
|
@@ -2402,13 +2402,13 @@ import { FormsModule } from '@angular/forms';
|
|
|
2402
2402
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
2403
2403
|
import { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';
|
|
2404
2404
|
import { Dialog, DialogModule } from '@exhaustive-ui/core/dialog';
|
|
2405
|
-
import { SelectModule } from '@exhaustive-ui/core/select';
|
|
2406
2405
|
import { FileUploadModule } from '@exhaustive-ui/core/fileupload';
|
|
2407
2406
|
import { IconFieldModule } from '@exhaustive-ui/core/iconfield';
|
|
2408
2407
|
import { InputIconModule } from '@exhaustive-ui/core/inputicon';
|
|
2409
2408
|
import { InputNumberModule } from '@exhaustive-ui/core/inputnumber';
|
|
2410
2409
|
import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
2411
2410
|
import { RatingModule } from '@exhaustive-ui/core/rating';
|
|
2411
|
+
import { SelectModule } from '@exhaustive-ui/core/select';
|
|
2412
2412
|
import { Table, TableModule } from '@exhaustive-ui/core/table';
|
|
2413
2413
|
import { TagModule } from '@exhaustive-ui/core/tag';
|
|
2414
2414
|
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
@@ -2439,7 +2439,7 @@ interface ExportColumn {
|
|
|
2439
2439
|
<p-button severity="danger" label="Delete" icon="pi pi-trash" outlined (onClick)="deleteSelectedProducts()" [disabled]="!selectedProducts || !selectedProducts.length" />
|
|
2440
2440
|
</ng-template>
|
|
2441
2441
|
<ng-template #end>
|
|
2442
|
-
<p-
|
|
2442
|
+
<p-file-upload mode="basic" accept="image/*" [maxFileSize]="1000000" label="Import" chooseLabel="Import" auto customUpload class="mr-2 inline-block" [chooseButtonProps]="{ severity: 'secondary' }" />
|
|
2443
2443
|
<p-button label="Export" icon="pi pi-upload" severity="secondary" (onClick)="exportCSV($event)" />
|
|
2444
2444
|
</ng-template>
|
|
2445
2445
|
</p-toolbar>
|
|
@@ -2460,47 +2460,47 @@ interface ExportColumn {
|
|
|
2460
2460
|
<ng-template #caption>
|
|
2461
2461
|
<div class="flex items-center justify-between">
|
|
2462
2462
|
<h5 class="m-0">Manage Products</h5>
|
|
2463
|
-
<p-
|
|
2464
|
-
<p-
|
|
2463
|
+
<p-icon-field>
|
|
2464
|
+
<p-input-icon class="pi pi-search" />
|
|
2465
2465
|
<input pInputText type="text" (input)="dt.filterGlobal($event.target.value, 'contains')" placeholder="Search..." />
|
|
2466
|
-
</p-
|
|
2466
|
+
</p-icon-field>
|
|
2467
2467
|
</div>
|
|
2468
2468
|
</ng-template>
|
|
2469
2469
|
<ng-template #header>
|
|
2470
2470
|
<tr>
|
|
2471
2471
|
<th style="width: 3rem">
|
|
2472
|
-
<p-
|
|
2472
|
+
<p-table-header-checkbox />
|
|
2473
2473
|
</th>
|
|
2474
2474
|
<th style="min-width: 16rem">Code</th>
|
|
2475
2475
|
<th pSortableColumn="name" style="min-width:16rem">
|
|
2476
2476
|
<div class="flex items-center gap-2">
|
|
2477
2477
|
Name
|
|
2478
|
-
<p-
|
|
2478
|
+
<p-sort-icon field="name" />
|
|
2479
2479
|
</div>
|
|
2480
2480
|
</th>
|
|
2481
2481
|
<th>Image</th>
|
|
2482
2482
|
<th pSortableColumn="price" style="min-width: 8rem">
|
|
2483
2483
|
<div class="flex items-center gap-2">
|
|
2484
2484
|
Price
|
|
2485
|
-
<p-
|
|
2485
|
+
<p-sort-icon field="price" />
|
|
2486
2486
|
</div>
|
|
2487
2487
|
</th>
|
|
2488
2488
|
<th pSortableColumn="category" style="min-width:10rem">
|
|
2489
2489
|
<div class="flex items-center gap-2">
|
|
2490
2490
|
Category
|
|
2491
|
-
<p-
|
|
2491
|
+
<p-sort-icon field="category" />
|
|
2492
2492
|
</div>
|
|
2493
2493
|
</th>
|
|
2494
2494
|
<th pSortableColumn="rating" style="min-width: 12rem">
|
|
2495
2495
|
<div class="flex items-center gap-2">
|
|
2496
2496
|
Reviews
|
|
2497
|
-
<p-
|
|
2497
|
+
<p-sort-icon field="rating" />
|
|
2498
2498
|
</div>
|
|
2499
2499
|
</th>
|
|
2500
2500
|
<th pSortableColumn="inventoryStatus" style="min-width: 12rem">
|
|
2501
2501
|
<div class="flex items-center gap-2">
|
|
2502
2502
|
Status
|
|
2503
|
-
<p-
|
|
2503
|
+
<p-sort-icon field="inventoryStatus" />
|
|
2504
2504
|
</div>
|
|
2505
2505
|
</th>
|
|
2506
2506
|
<th style="min-width: 12rem"></th>
|
|
@@ -2509,7 +2509,7 @@ interface ExportColumn {
|
|
|
2509
2509
|
<ng-template #body let-product>
|
|
2510
2510
|
<tr>
|
|
2511
2511
|
<td style="width: 3rem">
|
|
2512
|
-
<p-
|
|
2512
|
+
<p-table-checkbox [value]="product" />
|
|
2513
2513
|
</td>
|
|
2514
2514
|
<td style="min-width: 12rem">{{ product.code }}</td>
|
|
2515
2515
|
<td style="min-width: 16rem">{{ product.name }}</td>
|
|
@@ -2552,19 +2552,19 @@ interface ExportColumn {
|
|
|
2552
2552
|
<span class="block font-bold mb-4">Category</span>
|
|
2553
2553
|
<div class="grid grid-cols-12 gap-4">
|
|
2554
2554
|
<div class="flex items-center gap-2 col-span-6">
|
|
2555
|
-
<p-
|
|
2555
|
+
<p-radio-button id="category1" name="category" value="Accessories" [(ngModel)]="product.category" />
|
|
2556
2556
|
<label for="category1">Accessories</label>
|
|
2557
2557
|
</div>
|
|
2558
2558
|
<div class="flex items-center gap-2 col-span-6">
|
|
2559
|
-
<p-
|
|
2559
|
+
<p-radio-button id="category2" name="category" value="Clothing" [(ngModel)]="product.category" />
|
|
2560
2560
|
<label for="category2">Clothing</label>
|
|
2561
2561
|
</div>
|
|
2562
2562
|
<div class="flex items-center gap-2 col-span-6">
|
|
2563
|
-
<p-
|
|
2563
|
+
<p-radio-button id="category3" name="category" value="Electronics" [(ngModel)]="product.category" />
|
|
2564
2564
|
<label for="category3">Electronics</label>
|
|
2565
2565
|
</div>
|
|
2566
2566
|
<div class="flex items-center gap-2 col-span-6">
|
|
2567
|
-
<p-
|
|
2567
|
+
<p-radio-button id="category4" name="category" value="Fitness" [(ngModel)]="product.category" />
|
|
2568
2568
|
<label for="category4">Fitness</label>
|
|
2569
2569
|
</div>
|
|
2570
2570
|
</div>
|
|
@@ -2572,11 +2572,11 @@ interface ExportColumn {
|
|
|
2572
2572
|
<div class="grid grid-cols-12 gap-4">
|
|
2573
2573
|
<div class="col-span-6">
|
|
2574
2574
|
<label for="price" class="block font-bold mb-3">Price</label>
|
|
2575
|
-
<p-
|
|
2575
|
+
<p-input-number id="price" [(ngModel)]="product.price" mode="currency" currency="USD" locale="en-US" fluid />
|
|
2576
2576
|
</div>
|
|
2577
2577
|
<div class="col-span-6">
|
|
2578
2578
|
<label for="quantity" class="block font-bold mb-3">Quantity</label>
|
|
2579
|
-
<p-
|
|
2579
|
+
<p-input-number id="quantity" [(ngModel)]="product.quantity" fluid />
|
|
2580
2580
|
</div>
|
|
2581
2581
|
</div>
|
|
2582
2582
|
</div>
|
|
@@ -2586,11 +2586,11 @@ interface ExportColumn {
|
|
|
2586
2586
|
<p-button label="Save" icon="pi pi-check" (click)="saveProduct()" />
|
|
2587
2587
|
</ng-template>
|
|
2588
2588
|
</p-dialog>
|
|
2589
|
-
<p-
|
|
2589
|
+
<p-confirm-dialog [style]="{ width: '450px' }" />
|
|
2590
2590
|
</div>
|
|
2591
2591
|
`,
|
|
2592
2592
|
standalone: true,
|
|
2593
|
-
imports: [ButtonModule, ConfirmDialogModule, DialogModule,
|
|
2593
|
+
imports: [ButtonModule, ConfirmDialogModule, DialogModule, FileUploadModule, IconFieldModule, InputIconModule, InputNumberModule, RadioButtonModule, RatingModule, SelectModule, TableModule, TagModule, ToastModule, ToolbarModule, InputTextModule, FormsModule],
|
|
2594
2594
|
providers: [ProductService, MessageService, ConfirmationService]
|
|
2595
2595
|
})
|
|
2596
2596
|
export class TableProductsDemo implements OnInit {
|
|
@@ -2786,7 +2786,7 @@ import { Product } from '@/domain/product';
|
|
|
2786
2786
|
<ng-template #body let-product>
|
|
2787
2787
|
<tr>
|
|
2788
2788
|
<td>
|
|
2789
|
-
<p-
|
|
2789
|
+
<p-table-radio-button [value]="product" />
|
|
2790
2790
|
</td>
|
|
2791
2791
|
<td>{{ product.code }}</td>
|
|
2792
2792
|
<td>{{ product.name }}</td>
|
|
@@ -2834,25 +2834,25 @@ import { Product } from '@/domain/product';
|
|
|
2834
2834
|
<th pSortableColumn="code">
|
|
2835
2835
|
<div class="flex items-center gap-2">
|
|
2836
2836
|
Code
|
|
2837
|
-
<p-
|
|
2837
|
+
<p-sort-icon field="code" />
|
|
2838
2838
|
</div>
|
|
2839
2839
|
</th>
|
|
2840
2840
|
<th pSortableColumn="name">
|
|
2841
2841
|
<div class="flex items-center gap-2">
|
|
2842
2842
|
Name
|
|
2843
|
-
<p-
|
|
2843
|
+
<p-sort-icon field="name" />
|
|
2844
2844
|
</div>
|
|
2845
2845
|
</th>
|
|
2846
2846
|
<th pSortableColumn="category">
|
|
2847
2847
|
<div class="flex items-center gap-2">
|
|
2848
2848
|
Category
|
|
2849
|
-
<p-
|
|
2849
|
+
<p-sort-icon field="category" />
|
|
2850
2850
|
</div>
|
|
2851
2851
|
</th>
|
|
2852
2852
|
<th pSortableColumn="quantity">
|
|
2853
2853
|
<div class="flex items-center gap-2">
|
|
2854
2854
|
Quantity
|
|
2855
|
-
<p-
|
|
2855
|
+
<p-sort-icon field="quantity" />
|
|
2856
2856
|
</div>
|
|
2857
2857
|
</th>
|
|
2858
2858
|
</tr>
|
|
@@ -3014,44 +3014,44 @@ import { Product } from '@/domain/product';
|
|
|
3014
3014
|
<ng-template #body let-product let-editing="editing" let-ri="rowIndex">
|
|
3015
3015
|
<tr [pEditableRow]="product">
|
|
3016
3016
|
<td>
|
|
3017
|
-
<p-
|
|
3017
|
+
<p-cell-editor>
|
|
3018
3018
|
<ng-template #input>
|
|
3019
3019
|
<input pInputText type="text" [(ngModel)]="product.code" />
|
|
3020
3020
|
</ng-template>
|
|
3021
3021
|
<ng-template #output>
|
|
3022
3022
|
{{ product.code }}
|
|
3023
3023
|
</ng-template>
|
|
3024
|
-
</p-
|
|
3024
|
+
</p-cell-editor>
|
|
3025
3025
|
</td>
|
|
3026
3026
|
<td>
|
|
3027
|
-
<p-
|
|
3027
|
+
<p-cell-editor>
|
|
3028
3028
|
<ng-template #input>
|
|
3029
3029
|
<input pInputText type="text" [(ngModel)]="product.name" required />
|
|
3030
3030
|
</ng-template>
|
|
3031
3031
|
<ng-template #output>
|
|
3032
3032
|
{{ product.name }}
|
|
3033
3033
|
</ng-template>
|
|
3034
|
-
</p-
|
|
3034
|
+
</p-cell-editor>
|
|
3035
3035
|
</td>
|
|
3036
3036
|
<td>
|
|
3037
|
-
<p-
|
|
3037
|
+
<p-cell-editor>
|
|
3038
3038
|
<ng-template #input>
|
|
3039
3039
|
<p-select [options]="statuses" appendTo="body" [(ngModel)]="product.inventoryStatus" [style]="{ width: '100%' }" />
|
|
3040
3040
|
</ng-template>
|
|
3041
3041
|
<ng-template #output>
|
|
3042
3042
|
<p-tag [value]="product.inventoryStatus" [severity]="getSeverity(product.inventoryStatus)" />
|
|
3043
3043
|
</ng-template>
|
|
3044
|
-
</p-
|
|
3044
|
+
</p-cell-editor>
|
|
3045
3045
|
</td>
|
|
3046
3046
|
<td>
|
|
3047
|
-
<p-
|
|
3047
|
+
<p-cell-editor>
|
|
3048
3048
|
<ng-template #input>
|
|
3049
3049
|
<input pInputText type="text" [(ngModel)]="product.price" />
|
|
3050
3050
|
</ng-template>
|
|
3051
3051
|
<ng-template #output>
|
|
3052
3052
|
{{ product.price | currency: 'USD' }}
|
|
3053
3053
|
</ng-template>
|
|
3054
|
-
</p-
|
|
3054
|
+
</p-cell-editor>
|
|
3055
3055
|
</td>
|
|
3056
3056
|
<td>
|
|
3057
3057
|
<div class="flex items-center justify-center gap-2">
|
|
@@ -3187,31 +3187,31 @@ import { Customer } from '@/domain/customer';
|
|
|
3187
3187
|
<th pSortableColumn="id">
|
|
3188
3188
|
<div class="flex items-center gap-2">
|
|
3189
3189
|
Id
|
|
3190
|
-
<p-
|
|
3190
|
+
<p-sort-icon field="price" />
|
|
3191
3191
|
</div>
|
|
3192
3192
|
</th>
|
|
3193
3193
|
<th pSortableColumn="customer">
|
|
3194
3194
|
<div class="flex items-center gap-2">
|
|
3195
3195
|
Customer
|
|
3196
|
-
<p-
|
|
3196
|
+
<p-sort-icon field="customer" />
|
|
3197
3197
|
</div>
|
|
3198
3198
|
</th>
|
|
3199
3199
|
<th pSortableColumn="date">
|
|
3200
3200
|
<div class="flex items-center gap-2">
|
|
3201
3201
|
Date
|
|
3202
|
-
<p-
|
|
3202
|
+
<p-sort-icon field="date" />
|
|
3203
3203
|
</div>
|
|
3204
3204
|
</th>
|
|
3205
3205
|
<th pSortableColumn="amount">
|
|
3206
3206
|
<div class="flex items-center gap-2">
|
|
3207
3207
|
Amount
|
|
3208
|
-
<p-
|
|
3208
|
+
<p-sort-icon field="amount" />
|
|
3209
3209
|
</div>
|
|
3210
3210
|
</th>
|
|
3211
3211
|
<th pSortableColumn="status">
|
|
3212
3212
|
<div class="flex items-center gap-2">
|
|
3213
3213
|
Status
|
|
3214
|
-
<p-
|
|
3214
|
+
<p-sort-icon field="status" />
|
|
3215
3215
|
</div>
|
|
3216
3216
|
</th>
|
|
3217
3217
|
<th style="width: 4rem"></th>
|
|
@@ -3472,7 +3472,7 @@ export class TableSelectioneventsDemo implements OnInit {
|
|
|
3472
3472
|
|
|
3473
3473
|
## singlecolumnsort-doc
|
|
3474
3474
|
|
|
3475
|
-
A column can be made sortable by adding the pSortableColumn directive whose value is the field to sort against and a sort indicator via p-
|
|
3475
|
+
A column can be made sortable by adding the pSortableColumn directive whose value is the field to sort against and a sort indicator via p-sort-icon component. For dynamic columns, setting pSortableColumnDisabled property as true disables sorting for that particular column. Default sorting is executed on a single column, in order to enable multiple field sorting, set sortMode property to "multiple" and use metakey when clicking on another column.
|
|
3476
3476
|
|
|
3477
3477
|
```typescript
|
|
3478
3478
|
import { Component, OnInit, inject } from '@angular/core';
|
|
@@ -3489,25 +3489,25 @@ import { Product } from '@/domain/product';
|
|
|
3489
3489
|
<th pSortableColumn="code" style="width:20%">
|
|
3490
3490
|
<div class="flex items-center gap-2">
|
|
3491
3491
|
Code
|
|
3492
|
-
<p-
|
|
3492
|
+
<p-sort-icon field="code" />
|
|
3493
3493
|
</div>
|
|
3494
3494
|
</th>
|
|
3495
3495
|
<th pSortableColumn="name" style="width:20%">
|
|
3496
3496
|
<div class="flex items-center gap-2">
|
|
3497
3497
|
Name
|
|
3498
|
-
<p-
|
|
3498
|
+
<p-sort-icon field="name" />
|
|
3499
3499
|
</div>
|
|
3500
3500
|
</th>
|
|
3501
3501
|
<th pSortableColumn="category" style="width:20%">
|
|
3502
3502
|
<div class="flex items-center gap-2">
|
|
3503
3503
|
Category
|
|
3504
|
-
<p-
|
|
3504
|
+
<p-sort-icon field="category" />
|
|
3505
3505
|
</div>
|
|
3506
3506
|
</th>
|
|
3507
3507
|
<th pSortableColumn="quantity" style="width:20%">
|
|
3508
3508
|
<div class="flex items-center gap-2">
|
|
3509
3509
|
Quantity
|
|
3510
|
-
<p-
|
|
3510
|
+
<p-sort-icon field="quantity" />
|
|
3511
3511
|
</div>
|
|
3512
3512
|
</th>
|
|
3513
3513
|
</tr>
|
|
@@ -3555,7 +3555,7 @@ import { Product } from '@/domain/product';
|
|
|
3555
3555
|
template: `
|
|
3556
3556
|
<div class="card">
|
|
3557
3557
|
<div class="flex justify-center items-center mb-6 gap-2">
|
|
3558
|
-
<p-
|
|
3558
|
+
<p-toggle-switch [(ngModel)]="metaKey" inputId="input-metakey" />
|
|
3559
3559
|
<label for="input-metakey">MetaKey</label>
|
|
3560
3560
|
</div>
|
|
3561
3561
|
<p-table [value]="products" selectionMode="single" [(selection)]="selectedProduct" [metaKeySelection]="metaKey" dataKey="id" [tableStyle]="{ 'min-width': '50rem' }">
|
|
@@ -3612,7 +3612,7 @@ import { Product } from '@/domain/product';
|
|
|
3612
3612
|
template: `
|
|
3613
3613
|
<div class="card">
|
|
3614
3614
|
<div class="flex justify-center mb-4">
|
|
3615
|
-
<p-
|
|
3615
|
+
<p-select-button [options]="sizes" [(ngModel)]="selectedSize" [multiple]="false" optionLabel="name" optionValue="value" />
|
|
3616
3616
|
</div>
|
|
3617
3617
|
<p-table [value]="products" [tableStyle]="{ 'min-width': '50rem' }" [size]="selectedSize">
|
|
3618
3618
|
<ng-template #header>
|
|
@@ -3688,37 +3688,37 @@ import { Customer, Representative, Country } from '@/domain/customer';
|
|
|
3688
3688
|
stateKey="statedemo-session"
|
|
3689
3689
|
>
|
|
3690
3690
|
<ng-template #caption>
|
|
3691
|
-
<p-
|
|
3692
|
-
<p-
|
|
3691
|
+
<p-icon-field iconPosition="left">
|
|
3692
|
+
<p-input-icon>
|
|
3693
3693
|
<i class="pi pi-search"></i>
|
|
3694
|
-
</p-
|
|
3694
|
+
</p-input-icon>
|
|
3695
3695
|
<input pInputText type="text" [value]="dt1._filters()['global']?.value" (input)="dt1.filterGlobal($event.target.value, 'contains')" placeholder="Global Search" />
|
|
3696
|
-
</p-
|
|
3696
|
+
</p-icon-field>
|
|
3697
3697
|
</ng-template>
|
|
3698
3698
|
<ng-template #header>
|
|
3699
3699
|
<tr>
|
|
3700
3700
|
<th pSortableColumn="name" style="width:25%">
|
|
3701
3701
|
<div class="flex items-center gap-2">
|
|
3702
3702
|
Name
|
|
3703
|
-
<p-
|
|
3703
|
+
<p-sort-icon field="name" />
|
|
3704
3704
|
</div>
|
|
3705
3705
|
</th>
|
|
3706
3706
|
<th pSortableColumn="country.name" style="width:25%">
|
|
3707
3707
|
<div class="flex items-center gap-2">
|
|
3708
3708
|
Country
|
|
3709
|
-
<p-
|
|
3709
|
+
<p-sort-icon field="country.name" />
|
|
3710
3710
|
</div>
|
|
3711
3711
|
</th>
|
|
3712
3712
|
<th pSortableColumn="representative.name" style="width:25%">
|
|
3713
3713
|
<div class="flex items-center gap-2">
|
|
3714
3714
|
Representative
|
|
3715
|
-
<p-
|
|
3715
|
+
<p-sort-icon field="representative.name" />
|
|
3716
3716
|
</div>
|
|
3717
3717
|
</th>
|
|
3718
3718
|
<th pSortableColumn="status" style="width:25%">
|
|
3719
3719
|
<div class="flex items-center gap-2">
|
|
3720
3720
|
Status
|
|
3721
|
-
<p-
|
|
3721
|
+
<p-sort-icon field="status" />
|
|
3722
3722
|
</div>
|
|
3723
3723
|
</th>
|
|
3724
3724
|
</tr>
|
|
@@ -4456,6 +4456,40 @@ Table displays data in tabular format.
|
|
|
4456
4456
|
| onStateSave | value: TableState | Callback to invoke table state is saved. |
|
|
4457
4457
|
| onStateRestore | value: TableState | Callback to invoke table state is restored. |
|
|
4458
4458
|
|
|
4459
|
+
### Templates
|
|
4460
|
+
|
|
4461
|
+
| Name | Type | Description |
|
|
4462
|
+
|------|------|-------------|
|
|
4463
|
+
| header | TemplateRef<TableColumnsTemplateContext> | Custom header rows, rendered in the thead. |
|
|
4464
|
+
| headergrouped | TemplateRef<TableColumnsTemplateContext> | Custom grouped header rows, used in place of the header template. |
|
|
4465
|
+
| body | TemplateRef<TableBodyTemplateContext<any>> | Custom row, rendered for each row of data. |
|
|
4466
|
+
| loadingbody | TemplateRef<TableLoadingBodyTemplateContext> | Custom content while the table is loading, and for each row not loaded yet with lazy virtual scrolling. |
|
|
4467
|
+
| caption | TemplateRef<void> | Custom caption, rendered above the table. |
|
|
4468
|
+
| footer | TemplateRef<TableColumnsTemplateContext> | Custom footer rows, rendered in the tfoot. |
|
|
4469
|
+
| footergrouped | TemplateRef<TableColumnsTemplateContext> | Custom grouped footer rows, used in place of the footer template. |
|
|
4470
|
+
| summary | TemplateRef<void> | Custom summary, rendered below the table. |
|
|
4471
|
+
| colgroup | TemplateRef<TableColumnsTemplateContext> | Custom colgroup element. |
|
|
4472
|
+
| expandedrow | TemplateRef<TableExpandedRowTemplateContext<any>> | Custom content of an expanded row. |
|
|
4473
|
+
| groupheader | TemplateRef<TableRowGroupTemplateContext<any>> | Custom row group header, with rowGroupMode set to subheader. |
|
|
4474
|
+
| groupfooter | TemplateRef<TableRowGroupTemplateContext<any>> | Custom row group footer, with rowGroupMode set to subheader. |
|
|
4475
|
+
| frozenexpandedrow | TemplateRef<TableExpandedRowTemplateContext<any>> | Custom content of an expanded frozen row. |
|
|
4476
|
+
| frozenbody | TemplateRef<TableBodyTemplateContext<any>> | Custom row of the frozen rows. |
|
|
4477
|
+
| emptymessage | TemplateRef<TableEmptyMessageTemplateContext> | Custom content when there is no data. |
|
|
4478
|
+
| paginatorleft | TemplateRef<PaginatorTemplateContext> | Custom content on the left of the paginator. |
|
|
4479
|
+
| paginatorright | TemplateRef<PaginatorTemplateContext> | Custom content on the right of the paginator. |
|
|
4480
|
+
| paginatordropdownitem | TemplateRef<PaginatorDropdownItemTemplateContext> | Custom item of the rows per page dropdown of the paginator. |
|
|
4481
|
+
| loadingicon | TemplateRef<void> | Custom loading icon. |
|
|
4482
|
+
| reorderindicatorupicon | TemplateRef<void> | Custom icon of the upper column reorder indicator. |
|
|
4483
|
+
| reorderindicatordownicon | TemplateRef<void> | Custom icon of the lower column reorder indicator. |
|
|
4484
|
+
| sorticon | TemplateRef<TableSortIconTemplateContext> | Custom sort icon of a sortable column. |
|
|
4485
|
+
| checkboxicon | TemplateRef<TableCheckboxIconTemplateContext> | Custom icon of the row checkboxes. |
|
|
4486
|
+
| headercheckboxicon | TemplateRef<TableCheckboxIconTemplateContext> | Custom icon of the header checkbox. |
|
|
4487
|
+
| paginatordropdownicon | TemplateRef<void> | Custom dropdown icon of the paginator. |
|
|
4488
|
+
| paginatorfirstpagelinkicon | TemplateRef<void> | Custom icon of the first page button of the paginator. |
|
|
4489
|
+
| paginatorlastpagelinkicon | TemplateRef<void> | Custom icon of the last page button of the paginator. |
|
|
4490
|
+
| paginatorpreviouspagelinkicon | TemplateRef<void> | Custom icon of the previous page button of the paginator. |
|
|
4491
|
+
| paginatornextpagelinkicon | TemplateRef<void> | Custom icon of the next page button of the paginator. |
|
|
4492
|
+
|
|
4459
4493
|
### Methods
|
|
4460
4494
|
|
|
4461
4495
|
| Name | Parameters | Return Type | Description |
|