@exhaustive-ui/mcp 22.0.0-rc.2 → 22.0.0-rc.3
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/accordion.md +1 -0
- package/data/components/autocomplete.md +59 -0
- package/data/components/cascadeselect.md +136 -0
- package/data/components/checkbox.md +56 -0
- package/data/components/colorpicker.md +49 -0
- package/data/components/confirmpopup.md +0 -7
- package/data/components/dataview.md +0 -2
- package/data/components/datepicker.md +52 -3
- package/data/components/drawer.md +1 -1
- package/data/components/editor.md +49 -0
- package/data/components/floatlabel.md +72 -0
- package/data/components/iftalabel.md +68 -0
- package/data/components/inputmask.md +54 -4
- package/data/components/inputnumber.md +52 -3
- package/data/components/inputotp.md +50 -0
- package/data/components/inputtext.md +63 -1
- package/data/components/knob.md +55 -0
- package/data/components/listbox.md +57 -2
- package/data/components/message.md +0 -1
- package/data/components/multiselect.md +59 -4
- package/data/components/orderlist.md +1 -3
- package/data/components/password.md +52 -3
- package/data/components/picklist.md +0 -3
- package/data/components/radiobutton.md +60 -0
- package/data/components/rating.md +49 -0
- package/data/components/select.md +58 -3
- package/data/components/selectbutton.md +50 -1
- package/data/components/slider.md +50 -0
- package/data/components/stepper.md +0 -1
- package/data/components/table.md +1 -1
- package/data/components/textarea.md +48 -0
- package/data/components/togglebutton.md +50 -0
- package/data/components/toggleswitch.md +49 -0
- package/data/components/tooltip.md +0 -1
- package/data/components/treeselect.md +61 -1
- package/data/components/treetable.md +1 -1
- package/data/components.json +366 -151
- package/data/llms-full.txt +1523 -89
- package/data/manifest.json +91 -476
- package/data/pages/installation.md +1 -1
- package/data/pages/update.md +1 -1
- package/data/snapshot.json +3 -3
- package/dist/index.mjs +70 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -400,6 +400,7 @@ Accordion groups a collection of contents in tabs.
|
|
|
400
400
|
| accordion.header.hover.background | --p-accordion-header-hover-background | Hover background of header |
|
|
401
401
|
| accordion.header.active.background | --p-accordion-header-active-background | Active background of header |
|
|
402
402
|
| accordion.header.active.hover.background | --p-accordion-header-active-hover-background | Active hover background of header |
|
|
403
|
+
| accordion.header.focus.background | --p-accordion-header-focus-background | Focus background of header |
|
|
403
404
|
| accordion.header.focus.ring.width | --p-accordion-header-focus-ring-width | Focus ring width of header |
|
|
404
405
|
| accordion.header.focus.ring.style | --p-accordion-header-focus-ring-style | Focus ring style of header |
|
|
405
406
|
| accordion.header.focus.ring.color | --p-accordion-header-focus-ring-color | Focus ring color of header |
|
|
@@ -760,6 +760,65 @@ export class AutocompleteReactiveFormsDemo {
|
|
|
760
760
|
}
|
|
761
761
|
```
|
|
762
762
|
|
|
763
|
+
## Signal Forms
|
|
764
|
+
|
|
765
|
+
AutoComplete can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
766
|
+
|
|
767
|
+
```typescript
|
|
768
|
+
import { Component, inject, signal } from '@angular/core';
|
|
769
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
770
|
+
import { AutoCompleteModule } from '@exhaustive-ui/core/autocomplete';
|
|
771
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
772
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
773
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
774
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
775
|
+
|
|
776
|
+
interface AutoCompleteCompleteEvent {
|
|
777
|
+
originalEvent: Event;
|
|
778
|
+
query: string;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
@Component({
|
|
782
|
+
template: `
|
|
783
|
+
<p-toast />
|
|
784
|
+
<div class="card flex justify-center">
|
|
785
|
+
<form novalidate (submit)="onSubmit($event)" class="flex justify-center flex-col gap-4 md:w-56">
|
|
786
|
+
<div class="flex flex-col gap-1">
|
|
787
|
+
<p-autocomplete [formField]="exampleForm.value" [suggestions]="items" (completeMethod)="search($event)" fluid />
|
|
788
|
+
@let value = exampleForm.value();
|
|
789
|
+
@if (value.invalid() && value.touched()) {
|
|
790
|
+
<p-message severity="error" size="small" variant="simple">Value is required.</p-message>
|
|
791
|
+
}
|
|
792
|
+
</div>
|
|
793
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
794
|
+
</form>
|
|
795
|
+
</div>
|
|
796
|
+
`,
|
|
797
|
+
standalone: true,
|
|
798
|
+
imports: [AutoCompleteModule, MessageModule, ToastModule, ButtonModule, FormField]
|
|
799
|
+
})
|
|
800
|
+
export class AutocompleteSignalformsDemo {
|
|
801
|
+
messageService = inject(MessageService);
|
|
802
|
+
items: any[] | undefined;
|
|
803
|
+
model = signal({ value: '' });
|
|
804
|
+
exampleForm = form(this.model, (f) => {
|
|
805
|
+
required(f.value);
|
|
806
|
+
});
|
|
807
|
+
|
|
808
|
+
search(event: AutoCompleteCompleteEvent) {
|
|
809
|
+
this.items = [...Array(10).keys()].map((item) => event.query + '-' + item);
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
onSubmit(event: Event) {
|
|
813
|
+
event.preventDefault();
|
|
814
|
+
submit(this.exampleForm, async () => {
|
|
815
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
816
|
+
this.exampleForm().reset({ value: '' });
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
```
|
|
821
|
+
|
|
763
822
|
## Sizes
|
|
764
823
|
|
|
765
824
|
AutoComplete provides small and large sizes as alternatives to the base.
|
|
@@ -927,6 +927,142 @@ export class CascadeselectReactiveformsDemo {
|
|
|
927
927
|
}
|
|
928
928
|
```
|
|
929
929
|
|
|
930
|
+
## Signal Forms
|
|
931
|
+
|
|
932
|
+
CascadeSelect can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
933
|
+
|
|
934
|
+
```typescript
|
|
935
|
+
import { Component, inject, signal } from '@angular/core';
|
|
936
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
937
|
+
import { CascadeSelectModule } from '@exhaustive-ui/core/cascadeselect';
|
|
938
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
939
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
940
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
941
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
942
|
+
|
|
943
|
+
@Component({
|
|
944
|
+
template: `
|
|
945
|
+
<p-toast />
|
|
946
|
+
<div class="card flex justify-center">
|
|
947
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4">
|
|
948
|
+
<div class="flex flex-col gap-1">
|
|
949
|
+
<p-cascadeselect
|
|
950
|
+
[formField]="exampleForm.selectedCity"
|
|
951
|
+
[options]="countries"
|
|
952
|
+
optionLabel="cname"
|
|
953
|
+
optionValue="code"
|
|
954
|
+
optionGroupLabel="name"
|
|
955
|
+
[optionGroupChildren]="['states', 'cities']"
|
|
956
|
+
[style]="{ minWidth: '14rem' }"
|
|
957
|
+
placeholder="Select a City"
|
|
958
|
+
/>
|
|
959
|
+
@let selectedCity = exampleForm.selectedCity();
|
|
960
|
+
@if (selectedCity.invalid() && selectedCity.touched()) {
|
|
961
|
+
<p-message severity="error" size="small" variant="simple">City is required.</p-message>
|
|
962
|
+
}
|
|
963
|
+
</div>
|
|
964
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
965
|
+
</form>
|
|
966
|
+
</div>
|
|
967
|
+
`,
|
|
968
|
+
standalone: true,
|
|
969
|
+
imports: [CascadeSelectModule, MessageModule, ToastModule, ButtonModule, FormField]
|
|
970
|
+
})
|
|
971
|
+
export class CascadeselectSignalformsDemo {
|
|
972
|
+
messageService = inject(MessageService);
|
|
973
|
+
countries: any[] | undefined;
|
|
974
|
+
model = signal<{ selectedCity: string | null }>({ selectedCity: null });
|
|
975
|
+
exampleForm = form(this.model, (f) => {
|
|
976
|
+
required(f.selectedCity);
|
|
977
|
+
});
|
|
978
|
+
|
|
979
|
+
constructor() {
|
|
980
|
+
this.countries = [
|
|
981
|
+
{
|
|
982
|
+
name: 'Australia',
|
|
983
|
+
code: 'AU',
|
|
984
|
+
states: [
|
|
985
|
+
{
|
|
986
|
+
name: 'New South Wales',
|
|
987
|
+
cities: [
|
|
988
|
+
{ cname: 'Sydney', code: 'A-SY' },
|
|
989
|
+
{ cname: 'Newcastle', code: 'A-NE' },
|
|
990
|
+
{ cname: 'Wollongong', code: 'A-WO' }
|
|
991
|
+
]
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
name: 'Queensland',
|
|
995
|
+
cities: [
|
|
996
|
+
{ cname: 'Brisbane', code: 'A-BR' },
|
|
997
|
+
{ cname: 'Townsville', code: 'A-TO' }
|
|
998
|
+
]
|
|
999
|
+
}
|
|
1000
|
+
]
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
name: 'Canada',
|
|
1004
|
+
code: 'CA',
|
|
1005
|
+
states: [
|
|
1006
|
+
{
|
|
1007
|
+
name: 'Quebec',
|
|
1008
|
+
cities: [
|
|
1009
|
+
{ cname: 'Montreal', code: 'C-MO' },
|
|
1010
|
+
{ cname: 'Quebec City', code: 'C-QU' }
|
|
1011
|
+
]
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
name: 'Ontario',
|
|
1015
|
+
cities: [
|
|
1016
|
+
{ cname: 'Ottawa', code: 'C-OT' },
|
|
1017
|
+
{ cname: 'Toronto', code: 'C-TO' }
|
|
1018
|
+
]
|
|
1019
|
+
}
|
|
1020
|
+
]
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
name: 'United States',
|
|
1024
|
+
code: 'US',
|
|
1025
|
+
states: [
|
|
1026
|
+
{
|
|
1027
|
+
name: 'California',
|
|
1028
|
+
cities: [
|
|
1029
|
+
{ cname: 'Los Angeles', code: 'US-LA' },
|
|
1030
|
+
{ cname: 'San Diego', code: 'US-SD' },
|
|
1031
|
+
{ cname: 'San Francisco', code: 'US-SF' }
|
|
1032
|
+
]
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
name: 'Florida',
|
|
1036
|
+
cities: [
|
|
1037
|
+
{ cname: 'Jacksonville', code: 'US-JA' },
|
|
1038
|
+
{ cname: 'Miami', code: 'US-MI' },
|
|
1039
|
+
{ cname: 'Tampa', code: 'US-TA' },
|
|
1040
|
+
{ cname: 'Orlando', code: 'US-OR' }
|
|
1041
|
+
]
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
name: 'Texas',
|
|
1045
|
+
cities: [
|
|
1046
|
+
{ cname: 'Austin', code: 'US-AU' },
|
|
1047
|
+
{ cname: 'Dallas', code: 'US-DA' },
|
|
1048
|
+
{ cname: 'Houston', code: 'US-HO' }
|
|
1049
|
+
]
|
|
1050
|
+
}
|
|
1051
|
+
]
|
|
1052
|
+
}
|
|
1053
|
+
];
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
onSubmit(event: Event) {
|
|
1057
|
+
event.preventDefault();
|
|
1058
|
+
submit(this.exampleForm, async () => {
|
|
1059
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
1060
|
+
this.exampleForm().reset({ selectedCity: null });
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
```
|
|
1065
|
+
|
|
930
1066
|
## Sizes
|
|
931
1067
|
|
|
932
1068
|
CascadeSelect provides small and large sizes as alternatives to the base.
|
|
@@ -312,6 +312,62 @@ export class CheckboxReactiveformsDemo {
|
|
|
312
312
|
}
|
|
313
313
|
```
|
|
314
314
|
|
|
315
|
+
## Signal Forms
|
|
316
|
+
|
|
317
|
+
Checkbox can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
318
|
+
|
|
319
|
+
```typescript
|
|
320
|
+
import { Component, inject, signal } from '@angular/core';
|
|
321
|
+
import { form, FormField, submit, validate } from '@angular/forms/signals';
|
|
322
|
+
import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
323
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
324
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
325
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
326
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
327
|
+
|
|
328
|
+
type Ingredient = 'cheese' | 'mushroom' | 'pepper' | 'onion';
|
|
329
|
+
|
|
330
|
+
@Component({
|
|
331
|
+
template: `
|
|
332
|
+
<p-toast />
|
|
333
|
+
<div class="card flex justify-center">
|
|
334
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4">
|
|
335
|
+
<div class="flex flex-wrap gap-4">
|
|
336
|
+
@for (item of formKeys; track item) {
|
|
337
|
+
<div class="flex items-center gap-2">
|
|
338
|
+
<p-checkbox [formField]="exampleForm[item]" [binary]="true" [inputId]="item" />
|
|
339
|
+
<label [for]="item" class="capitalize"> {{ item }} </label>
|
|
340
|
+
</div>
|
|
341
|
+
}
|
|
342
|
+
</div>
|
|
343
|
+
@if (exampleForm().invalid() && exampleForm().touched()) {
|
|
344
|
+
<p-message severity="error" size="small" variant="simple"> At least one ingredient must be selected. </p-message>
|
|
345
|
+
}
|
|
346
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
347
|
+
</form>
|
|
348
|
+
</div>
|
|
349
|
+
`,
|
|
350
|
+
standalone: true,
|
|
351
|
+
imports: [CheckboxModule, MessageModule, ToastModule, ButtonModule, FormField]
|
|
352
|
+
})
|
|
353
|
+
export class CheckboxSignalformsDemo {
|
|
354
|
+
messageService = inject(MessageService);
|
|
355
|
+
formKeys: Ingredient[] = ['cheese', 'mushroom', 'pepper', 'onion'];
|
|
356
|
+
model = signal({ cheese: false, mushroom: false, pepper: false, onion: false });
|
|
357
|
+
exampleForm = form(this.model, (f) => {
|
|
358
|
+
validate(f, ({ value }) => (Object.values(value()).some(Boolean) ? null : { kind: 'atLeastOneRequired' }));
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
onSubmit(event: Event) {
|
|
362
|
+
event.preventDefault();
|
|
363
|
+
submit(this.exampleForm, async () => {
|
|
364
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
365
|
+
this.exampleForm().reset({ cheese: false, mushroom: false, pepper: false, onion: false });
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
```
|
|
370
|
+
|
|
315
371
|
## Sizes
|
|
316
372
|
|
|
317
373
|
Checkbox provides small and large sizes as alternatives to the base.
|
|
@@ -172,6 +172,55 @@ export class ColorpickerReactiveformsDemo {
|
|
|
172
172
|
}
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
+
## Signal Forms
|
|
176
|
+
|
|
177
|
+
ColorPicker can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
import { Component, inject, signal } from '@angular/core';
|
|
181
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
182
|
+
import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
183
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
184
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
185
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
186
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
187
|
+
|
|
188
|
+
@Component({
|
|
189
|
+
template: `
|
|
190
|
+
<p-toast />
|
|
191
|
+
<div class="card flex justify-center">
|
|
192
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4">
|
|
193
|
+
<div class="flex flex-col items-center gap-2">
|
|
194
|
+
<p-colorpicker [formField]="exampleForm.color" defaultColor="989898" />
|
|
195
|
+
@let color = exampleForm.color();
|
|
196
|
+
@if (color.invalid() && color.touched()) {
|
|
197
|
+
<p-message severity="error" size="small" variant="simple">Color is required.</p-message>
|
|
198
|
+
}
|
|
199
|
+
</div>
|
|
200
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
201
|
+
</form>
|
|
202
|
+
</div>
|
|
203
|
+
`,
|
|
204
|
+
standalone: true,
|
|
205
|
+
imports: [ColorPickerModule, MessageModule, ToastModule, ButtonModule, FormField]
|
|
206
|
+
})
|
|
207
|
+
export class ColorpickerSignalformsDemo {
|
|
208
|
+
messageService = inject(MessageService);
|
|
209
|
+
model = signal({ color: '' });
|
|
210
|
+
exampleForm = form(this.model, (f) => {
|
|
211
|
+
required(f.color);
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
onSubmit(event: Event) {
|
|
215
|
+
event.preventDefault();
|
|
216
|
+
submit(this.exampleForm, async () => {
|
|
217
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
218
|
+
this.exampleForm().reset({ color: '' });
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
175
224
|
## templatedrivenforms-doc
|
|
176
225
|
|
|
177
226
|
```typescript
|
|
@@ -240,12 +240,6 @@ import { Component } from '@angular/core';
|
|
|
240
240
|
<td>true</td>
|
|
241
241
|
<td>Whether to automatically manage layering.</td>
|
|
242
242
|
</tr>
|
|
243
|
-
<tr>
|
|
244
|
-
<td>baseZIndex</td>
|
|
245
|
-
<td>number</td>
|
|
246
|
-
<td>0</td>
|
|
247
|
-
<td>Base zIndex value to use in layering.</td>
|
|
248
|
-
</tr>
|
|
249
243
|
<tr>
|
|
250
244
|
<td>style</td>
|
|
251
245
|
<td>string</td>
|
|
@@ -353,7 +347,6 @@ ConfirmPopup displays a confirmation overlay displayed relatively to its target.
|
|
|
353
347
|
| key | InputSignal<string> | ... | Optional key to match the key of confirm object, necessary to use when component tree has multiple confirm dialogs. |
|
|
354
348
|
| defaultFocus | InputSignal<string> | ... | Element to receive the focus when the popup gets visible, valid values are "accept", "reject", and "none". |
|
|
355
349
|
| autoZIndex | InputSignalWithTransform<boolean, unknown> | ... | Whether to automatically manage layering. |
|
|
356
|
-
| baseZIndex | InputSignalWithTransform<number, unknown> | ... | Base zIndex value to use in layering. |
|
|
357
350
|
| style | InputSignal<{ [klass: string]: any }> | ... | Inline style of the component. |
|
|
358
351
|
| styleClass | InputSignal<string> | ... | Style class of the component. |
|
|
359
352
|
| visible | InputSignal<boolean> | ... | Defines if the component is visible. |
|
|
@@ -501,8 +501,6 @@ DataView displays data in grid or list layout with pagination and sorting featur
|
|
|
501
501
|
| lazy | InputSignalWithTransform<boolean, unknown> | ... | Defines if data is loaded and interacted with in lazy manner. |
|
|
502
502
|
| lazyLoadOnInit | InputSignalWithTransform<boolean, unknown> | ... | Whether to call lazy loading on initialization. |
|
|
503
503
|
| emptyMessage | InputSignal<string> | ... | Text to display when there is no data. Defaults to global value in i18n translation configuration. |
|
|
504
|
-
| gridStyleClass | InputSignal<string> | ... | Style class of the grid. |
|
|
505
|
-
| trackBy | InputSignal<Function> | ... | Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity. |
|
|
506
504
|
| filterBy | InputSignal<string> | ... | Comma separated list of fields in the object graph to search against. |
|
|
507
505
|
| filterLocale | InputSignal<string> | ... | Locale to use in filtering. The default locale is the host environment's current locale. |
|
|
508
506
|
| loading | InputSignalWithTransform<boolean, unknown> | ... | Displays a loader to indicate data load is in progress. |
|
|
@@ -711,6 +711,55 @@ export class DatepickerReactiveformsDemo {
|
|
|
711
711
|
}
|
|
712
712
|
```
|
|
713
713
|
|
|
714
|
+
## Signal Forms
|
|
715
|
+
|
|
716
|
+
DatePicker can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
717
|
+
|
|
718
|
+
```typescript
|
|
719
|
+
import { Component, inject, signal } from '@angular/core';
|
|
720
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
721
|
+
import { DatePickerModule } from '@exhaustive-ui/core/datepicker';
|
|
722
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
723
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
724
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
725
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
726
|
+
|
|
727
|
+
@Component({
|
|
728
|
+
template: `
|
|
729
|
+
<p-toast />
|
|
730
|
+
<div class="card flex justify-center">
|
|
731
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4">
|
|
732
|
+
<div class="flex flex-col gap-1">
|
|
733
|
+
<p-datepicker [formField]="exampleForm.selectedDate" />
|
|
734
|
+
@let selectedDate = exampleForm.selectedDate();
|
|
735
|
+
@if (selectedDate.invalid() && selectedDate.touched()) {
|
|
736
|
+
<p-message severity="error" size="small" variant="simple">Date is required.</p-message>
|
|
737
|
+
}
|
|
738
|
+
</div>
|
|
739
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
740
|
+
</form>
|
|
741
|
+
</div>
|
|
742
|
+
`,
|
|
743
|
+
standalone: true,
|
|
744
|
+
imports: [DatePickerModule, MessageModule, ToastModule, ButtonModule, FormField]
|
|
745
|
+
})
|
|
746
|
+
export class DatepickerSignalformsDemo {
|
|
747
|
+
messageService = inject(MessageService);
|
|
748
|
+
model = signal<{ selectedDate: Date | null }>({ selectedDate: null });
|
|
749
|
+
exampleForm = form(this.model, (f) => {
|
|
750
|
+
required(f.selectedDate);
|
|
751
|
+
});
|
|
752
|
+
|
|
753
|
+
onSubmit(event: Event) {
|
|
754
|
+
event.preventDefault();
|
|
755
|
+
submit(this.exampleForm, async () => {
|
|
756
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
757
|
+
this.exampleForm().reset({ selectedDate: null });
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
```
|
|
762
|
+
|
|
714
763
|
## Sizes
|
|
715
764
|
|
|
716
765
|
DatePicker provides small and large sizes as alternatives to the base.
|
|
@@ -973,9 +1022,9 @@ DatePicker is a form component to work with dates.
|
|
|
973
1022
|
| variant | InputSignal<"outlined" \| "filled"> | 'outlined' | Specifies the input variant of the component. |
|
|
974
1023
|
| size | InputSignal<"small" \| "large"> | undefined | Specifies the size of the component. |
|
|
975
1024
|
| inputSize | InputSignal<number> | undefined | Specifies the visible width of the input element in characters. |
|
|
976
|
-
| pattern |
|
|
977
|
-
| min |
|
|
978
|
-
| max |
|
|
1025
|
+
| pattern | InputSignalWithTransform<string, string \| readonly RegExp[]> | undefined | Specifies the value must match the pattern. |
|
|
1026
|
+
| min | InputSignalWithTransform<number, unknown> | undefined | The value must be greater than or equal to the value. |
|
|
1027
|
+
| max | InputSignalWithTransform<number, unknown> | undefined | The value must be less than or equal to the value. |
|
|
979
1028
|
| step | InputSignal<number> | undefined | Unless the step is set to the any literal, the value must be min + an integral multiple of the step. |
|
|
980
1029
|
| minlength | InputSignal<number> | undefined | The number of characters (code points) must not be less than the value of the attribute, if non-empty. |
|
|
981
1030
|
| maxlength | InputSignal<number> | undefined | The number of characters (code points) must not exceed the value of the attribute. |
|
|
@@ -437,7 +437,7 @@ Sidebar is a panel component displayed as an overlay at the edges of the screen.
|
|
|
437
437
|
| blockScroll | InputSignalWithTransform<boolean, unknown> | ... | Whether to block scrolling of the document when drawer is active. |
|
|
438
438
|
| style | InputSignal<{ [klass: string]: any }> | ... | Inline style of the component. |
|
|
439
439
|
| styleClass | InputSignal<string> | ... | Style class of the component. |
|
|
440
|
-
|
|
|
440
|
+
| closeAriaLabel | InputSignal<string> | ... | Aria label of the close icon. |
|
|
441
441
|
| autoZIndex | InputSignalWithTransform<boolean, unknown> | ... | Whether to automatically manage layering. |
|
|
442
442
|
| baseZIndex | InputSignalWithTransform<number, unknown> | ... | Base zIndex value to use in layering. |
|
|
443
443
|
| modal | InputSignalWithTransform<boolean, unknown> | ... | Whether an overlay mask is displayed behind the drawer. |
|
|
@@ -146,6 +146,55 @@ export class EditorReadonlyDemo {
|
|
|
146
146
|
}
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
+
## Signal Forms
|
|
150
|
+
|
|
151
|
+
Editor can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
import { Component, inject, signal } from '@angular/core';
|
|
155
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
156
|
+
import { EditorModule } from '@exhaustive-ui/core/editor';
|
|
157
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
158
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
159
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
160
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
161
|
+
|
|
162
|
+
@Component({
|
|
163
|
+
template: `
|
|
164
|
+
<p-toast />
|
|
165
|
+
<div class="card">
|
|
166
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4">
|
|
167
|
+
<div class="flex flex-col gap-1">
|
|
168
|
+
<p-editor [formField]="exampleForm.text" [style]="{ height: '320px' }" />
|
|
169
|
+
@let text = exampleForm.text();
|
|
170
|
+
@if (text.invalid() && text.touched()) {
|
|
171
|
+
<p-message severity="error" size="small" variant="simple">Content is required.</p-message>
|
|
172
|
+
}
|
|
173
|
+
</div>
|
|
174
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
175
|
+
</form>
|
|
176
|
+
</div>
|
|
177
|
+
`,
|
|
178
|
+
standalone: true,
|
|
179
|
+
imports: [EditorModule, MessageModule, ToastModule, ButtonModule, FormField]
|
|
180
|
+
})
|
|
181
|
+
export class EditorSignalformsDemo {
|
|
182
|
+
messageService = inject(MessageService);
|
|
183
|
+
model = signal({ text: '' });
|
|
184
|
+
exampleForm = form(this.model, (f) => {
|
|
185
|
+
required(f.text);
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
onSubmit(event: Event) {
|
|
189
|
+
event.preventDefault();
|
|
190
|
+
submit(this.exampleForm, async () => {
|
|
191
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
192
|
+
this.exampleForm().reset({ text: '' });
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
149
198
|
## templatedrivenforms-doc
|
|
150
199
|
|
|
151
200
|
```typescript
|
|
@@ -70,6 +70,64 @@ export class FloatlabelInvalidDemo {
|
|
|
70
70
|
}
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
## Sizes
|
|
74
|
+
|
|
75
|
+
The label follows the small and large sizes of the field it wraps, in every variant: its inset, its font size and, for the in variant, the vertical room left for it.
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
import { Component } from '@angular/core';
|
|
79
|
+
import { FormsModule } from '@angular/forms';
|
|
80
|
+
import { SelectModule } from '@exhaustive-ui/core/select';
|
|
81
|
+
import { FloatLabelModule } from '@exhaustive-ui/core/floatlabel';
|
|
82
|
+
import { InputTextModule } from '@exhaustive-ui/core/inputtext';
|
|
83
|
+
|
|
84
|
+
@Component({
|
|
85
|
+
template: `
|
|
86
|
+
<div class="card flex flex-col items-center gap-6">
|
|
87
|
+
<div class="flex flex-wrap justify-center items-end gap-4">
|
|
88
|
+
<p-floatlabel variant="in">
|
|
89
|
+
<input pInputText id="small_input" pSize="small" [(ngModel)]="value1" autocomplete="off" />
|
|
90
|
+
<label for="small_input">Small</label>
|
|
91
|
+
</p-floatlabel>
|
|
92
|
+
<p-floatlabel variant="in">
|
|
93
|
+
<input pInputText id="normal_input" [(ngModel)]="value2" autocomplete="off" />
|
|
94
|
+
<label for="normal_input">Normal</label>
|
|
95
|
+
</p-floatlabel>
|
|
96
|
+
<p-floatlabel variant="in">
|
|
97
|
+
<input pInputText id="large_input" pSize="large" [(ngModel)]="value3" autocomplete="off" />
|
|
98
|
+
<label for="large_input">Large</label>
|
|
99
|
+
</p-floatlabel>
|
|
100
|
+
</div>
|
|
101
|
+
<div class="flex flex-wrap justify-center items-end gap-4">
|
|
102
|
+
<p-floatlabel variant="on">
|
|
103
|
+
<p-select [(ngModel)]="city1" inputId="small_select" [options]="cities" size="small" class="w-56" />
|
|
104
|
+
<label for="small_select">Small</label>
|
|
105
|
+
</p-floatlabel>
|
|
106
|
+
<p-floatlabel variant="on">
|
|
107
|
+
<p-select [(ngModel)]="city2" inputId="normal_select" [options]="cities" class="w-56" />
|
|
108
|
+
<label for="normal_select">Normal</label>
|
|
109
|
+
</p-floatlabel>
|
|
110
|
+
<p-floatlabel variant="on">
|
|
111
|
+
<p-select [(ngModel)]="city3" inputId="large_select" [options]="cities" size="large" class="w-56" />
|
|
112
|
+
<label for="large_select">Large</label>
|
|
113
|
+
</p-floatlabel>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
`,
|
|
117
|
+
standalone: true,
|
|
118
|
+
imports: [SelectModule, FloatLabelModule, InputTextModule, FormsModule]
|
|
119
|
+
})
|
|
120
|
+
export class FloatlabelSizesDemo {
|
|
121
|
+
value1: string | undefined;
|
|
122
|
+
value2: string | undefined;
|
|
123
|
+
value3: string | undefined;
|
|
124
|
+
city1: string | undefined;
|
|
125
|
+
city2: string | undefined;
|
|
126
|
+
city3: string | undefined;
|
|
127
|
+
cities: any[] = ['New York', 'Rome', 'London', 'Istanbul', 'Paris'];
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
73
131
|
## Variants
|
|
74
132
|
|
|
75
133
|
The variant property defines the position of the label. Default value is over , whereas in and on are the alternatives.
|
|
@@ -145,10 +203,24 @@ FloatLabel appears on top of the input field when focused.
|
|
|
145
203
|
| floatlabel.font.weight | --p-floatlabel-font-weight | Font weight of root |
|
|
146
204
|
| floatlabel.active.font.size | --p-floatlabel-active-font-size | Active font size of root |
|
|
147
205
|
| floatlabel.active.font.weight | --p-floatlabel-active-font-weight | Active font weight of root |
|
|
206
|
+
| floatlabel.sm.position.x | --p-floatlabel-sm-position-x | Sm position x of root |
|
|
207
|
+
| floatlabel.sm.position.y | --p-floatlabel-sm-position-y | Sm position y of root |
|
|
208
|
+
| floatlabel.sm.font.size | --p-floatlabel-sm-font-size | Sm font size of root |
|
|
209
|
+
| floatlabel.sm.active.font.size | --p-floatlabel-sm-active-font-size | Sm active font size of root |
|
|
210
|
+
| floatlabel.lg.position.x | --p-floatlabel-lg-position-x | Lg position x of root |
|
|
211
|
+
| floatlabel.lg.position.y | --p-floatlabel-lg-position-y | Lg position y of root |
|
|
212
|
+
| floatlabel.lg.font.size | --p-floatlabel-lg-font-size | Lg font size of root |
|
|
213
|
+
| floatlabel.lg.active.font.size | --p-floatlabel-lg-active-font-size | Lg active font size of root |
|
|
148
214
|
| floatlabel.over.active.top | --p-floatlabel-over-active-top | Active top of over |
|
|
149
215
|
| floatlabel.in.input.padding.top | --p-floatlabel-in-input-padding-top | Input padding top of in |
|
|
150
216
|
| floatlabel.in.input.padding.bottom | --p-floatlabel-in-input-padding-bottom | Input padding bottom of in |
|
|
151
217
|
| floatlabel.in.active.top | --p-floatlabel-in-active-top | Active top of in |
|
|
218
|
+
| floatlabel.in.sm.input.padding.top | --p-floatlabel-in-sm-input-padding-top | Sm input padding top of in |
|
|
219
|
+
| floatlabel.in.sm.input.padding.bottom | --p-floatlabel-in-sm-input-padding-bottom | Sm input padding bottom of in |
|
|
220
|
+
| floatlabel.in.sm.active.top | --p-floatlabel-in-sm-active-top | Sm active top of in |
|
|
221
|
+
| floatlabel.in.lg.input.padding.top | --p-floatlabel-in-lg-input-padding-top | Lg input padding top of in |
|
|
222
|
+
| floatlabel.in.lg.input.padding.bottom | --p-floatlabel-in-lg-input-padding-bottom | Lg input padding bottom of in |
|
|
223
|
+
| floatlabel.in.lg.active.top | --p-floatlabel-in-lg-active-top | Lg active top of in |
|
|
152
224
|
| floatlabel.on.border.radius | --p-floatlabel-on-border-radius | Border radius of on |
|
|
153
225
|
| floatlabel.on.active.background | --p-floatlabel-on-active-background | Active background of on |
|
|
154
226
|
| floatlabel.on.active.padding | --p-floatlabel-on-active-padding | Active padding of on |
|