@exhaustive-ui/mcp 22.5.0 → 22.6.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/cards/accordion.md +5 -2
- package/data/cards/animateonscroll.md +8 -5
- package/data/cards/autocomplete.md +8 -3
- package/data/cards/autofocus.md +4 -2
- package/data/cards/avatar.md +4 -2
- package/data/cards/badge.md +2 -1
- package/data/cards/breadcrumb.md +3 -1
- package/data/cards/button.md +8 -2
- package/data/cards/card.md +2 -1
- package/data/cards/carousel.md +7 -5
- package/data/cards/cascadeselect.md +2 -6
- package/data/cards/chart.md +9 -7
- package/data/cards/checkbox.md +4 -3
- package/data/cards/chip.md +2 -1
- package/data/cards/classnames.md +21 -3
- package/data/cards/colorpicker.md +2 -1
- package/data/cards/confirmdialog.md +35 -5
- package/data/cards/confirmpopup.md +25 -3
- package/data/cards/contextmenu.md +1 -7
- package/data/cards/dataview.md +28 -9
- package/data/cards/datepicker.md +4 -3
- package/data/cards/dialog.md +3 -3
- package/data/cards/divider.md +2 -1
- package/data/cards/dock.md +24 -3
- package/data/cards/dragdrop.md +5 -1
- package/data/cards/drawer.md +3 -3
- package/data/cards/dynamicdialog.md +41 -14
- package/data/cards/editor.md +1 -1
- package/data/cards/fieldset.md +2 -1
- package/data/cards/fileinput.md +1 -1
- package/data/cards/fileupload.md +7 -8
- package/data/cards/floatlabel.md +1 -1
- package/data/cards/fluid.md +7 -5
- package/data/cards/focustrap.md +6 -2
- package/data/cards/galleria.md +18 -25
- package/data/cards/iconfield.md +3 -2
- package/data/cards/iftalabel.md +1 -1
- package/data/cards/image.md +4 -2
- package/data/cards/imagecompare.md +4 -3
- package/data/cards/inplace.md +2 -1
- package/data/cards/inputgroup.md +14 -3
- package/data/cards/inputmask.md +2 -2
- package/data/cards/inputnumber.md +4 -3
- package/data/cards/inputotp.md +2 -2
- package/data/cards/inputtext.md +2 -2
- package/data/cards/keyfilter.md +2 -1
- package/data/cards/knob.md +3 -2
- package/data/cards/listbox.md +5 -3
- package/data/cards/megamenu.md +7 -8
- package/data/cards/menu.md +3 -7
- package/data/cards/menubar.md +3 -7
- package/data/cards/message.md +2 -1
- package/data/cards/metergroup.md +3 -7
- package/data/cards/multiselect.md +5 -9
- package/data/cards/orderlist.md +6 -4
- package/data/cards/organizationchart.md +33 -6
- package/data/cards/overlay.md +2 -1
- package/data/cards/paginator.md +2 -1
- package/data/cards/panel.md +2 -1
- package/data/cards/panelmenu.md +4 -13
- package/data/cards/password.md +6 -3
- package/data/cards/picklist.md +9 -5
- package/data/cards/popover.md +6 -5
- package/data/cards/progressbar.md +4 -3
- package/data/cards/progressspinner.md +2 -1
- package/data/cards/radiobutton.md +4 -3
- package/data/cards/rating.md +1 -1
- package/data/cards/ripple.md +2 -1
- package/data/cards/scrollpanel.md +2 -1
- package/data/cards/scrolltop.md +5 -3
- package/data/cards/select.md +2 -1
- package/data/cards/selectbutton.md +6 -2
- package/data/cards/skeleton.md +2 -1
- package/data/cards/slider.md +4 -3
- package/data/cards/speeddial.md +7 -4
- package/data/cards/splitbutton.md +21 -18
- package/data/cards/splitter.md +2 -1
- package/data/cards/stepper.md +8 -3
- package/data/cards/styleclass.md +4 -2
- package/data/cards/table.md +46 -11
- package/data/cards/tabs.md +2 -1
- package/data/cards/tag.md +2 -1
- package/data/cards/terminal.md +31 -22
- package/data/cards/textarea.md +3 -2
- package/data/cards/tieredmenu.md +1 -6
- package/data/cards/timeline.md +5 -5
- package/data/cards/toast.md +7 -8
- package/data/cards/togglebutton.md +1 -1
- package/data/cards/toggleswitch.md +4 -3
- package/data/cards/toolbar.md +8 -8
- package/data/cards/tooltip.md +2 -1
- package/data/cards/tree.md +3 -6
- package/data/cards/treeselect.md +6 -7
- package/data/cards/treetable.md +52 -31
- package/data/components/accordion.md +31 -23
- package/data/components/animateonscroll.md +18 -15
- package/data/components/autocomplete.md +162 -93
- package/data/components/autofocus.md +9 -7
- package/data/components/avatar.md +56 -43
- package/data/components/badge.md +27 -18
- package/data/components/blockui.md +15 -8
- package/data/components/breadcrumb.md +20 -14
- package/data/components/button.md +121 -94
- package/data/components/card.md +12 -10
- package/data/components/carousel.md +75 -53
- package/data/components/cascadeselect.md +271 -238
- package/data/components/chart.md +88 -74
- package/data/components/checkbox.md +107 -73
- package/data/components/chip.md +20 -16
- package/data/components/classnames.md +22 -4
- package/data/components/colorpicker.md +54 -36
- package/data/components/confirmdialog.md +146 -43
- package/data/components/confirmpopup.md +95 -22
- package/data/components/contextmenu.md +110 -39
- package/data/components/dataview.md +176 -83
- package/data/components/datepicker.md +171 -141
- package/data/components/dialog.md +80 -68
- package/data/components/divider.md +17 -12
- package/data/components/dock.md +63 -27
- package/data/components/dragdrop.md +26 -12
- package/data/components/drawer.md +67 -48
- package/data/components/dynamicdialog.md +22 -13
- package/data/components/editor.md +42 -33
- package/data/components/fieldset.md +20 -17
- package/data/components/fileinput.md +92 -35
- package/data/components/fileupload.md +101 -61
- package/data/components/floatlabel.md +20 -11
- package/data/components/fluid.md +11 -9
- package/data/components/focustrap.md +11 -7
- package/data/components/galleria.md +224 -83
- package/data/components/iconfield.md +23 -15
- package/data/components/iftalabel.md +15 -9
- package/data/components/image.md +31 -26
- package/data/components/imagecompare.md +8 -6
- package/data/components/inplace.md +27 -22
- package/data/components/inputgroup.md +53 -29
- package/data/components/inputmask.md +107 -85
- package/data/components/inputnumber.md +127 -89
- package/data/components/inputotp.md +55 -42
- package/data/components/inputtext.md +72 -50
- package/data/components/keyfilter.md +6 -3
- package/data/components/knob.md +70 -58
- package/data/components/listbox.md +171 -141
- package/data/components/megamenu.md +24 -23
- package/data/components/menu.md +37 -34
- package/data/components/menubar.md +27 -22
- package/data/components/message.md +44 -32
- package/data/components/metergroup.md +48 -17
- package/data/components/multiselect.md +232 -168
- package/data/components/orderlist.md +55 -48
- package/data/components/organizationchart.md +182 -13
- package/data/components/overlay.md +31 -26
- package/data/components/paginator.md +49 -34
- package/data/components/panel.md +23 -19
- package/data/components/panelmenu.md +51 -25
- package/data/components/password.md +104 -91
- package/data/components/picklist.md +92 -70
- package/data/components/popover.md +68 -46
- package/data/components/progressbar.md +28 -22
- package/data/components/progressspinner.md +13 -11
- package/data/components/radiobutton.md +69 -35
- package/data/components/rating.md +48 -40
- package/data/components/ripple.md +8 -6
- package/data/components/scroller.md +29 -29
- package/data/components/scrollpanel.md +9 -7
- package/data/components/scrolltop.md +20 -18
- package/data/components/select.md +248 -169
- package/data/components/selectbutton.md +118 -56
- package/data/components/skeleton.md +22 -18
- package/data/components/slider.md +73 -49
- package/data/components/speeddial.md +77 -59
- package/data/components/splitbutton.md +354 -329
- package/data/components/splitter.md +22 -18
- package/data/components/stepper.md +38 -21
- package/data/components/styleclass.md +12 -6
- package/data/components/table.md +523 -314
- package/data/components/tabs.md +44 -26
- package/data/components/tag.md +18 -14
- package/data/components/terminal.md +38 -27
- package/data/components/textarea.md +82 -47
- package/data/components/tieredmenu.md +34 -29
- package/data/components/timeline.md +29 -28
- package/data/components/toast.md +115 -57
- package/data/components/togglebutton.md +53 -39
- package/data/components/toggleswitch.md +41 -28
- package/data/components/toolbar.md +19 -18
- package/data/components/tooltip.md +43 -32
- package/data/components/tree.md +114 -81
- package/data/components/treeselect.md +176 -174
- package/data/components/treetable.md +1250 -1045
- package/data/components.json +4122 -4080
- package/data/llms-full.txt +8784 -6249
- package/data/manifest.json +154 -15
- package/data/pages/tailwind.md +20 -10
- package/data/snapshot.json +2 -2
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ ColorPicker is used as a controlled input with ngModel property.
|
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
14
|
import { Component } from '@angular/core';
|
|
15
|
+
import { CommonModule } from '@angular/common';
|
|
15
16
|
import { FormsModule } from '@angular/forms';
|
|
16
17
|
import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
17
18
|
|
|
@@ -22,7 +23,7 @@ import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
|
22
23
|
</div>
|
|
23
24
|
`,
|
|
24
25
|
standalone: true,
|
|
25
|
-
imports: [
|
|
26
|
+
imports: [CommonModule, FormsModule, ColorPickerModule]
|
|
26
27
|
})
|
|
27
28
|
export class ColorpickerBasicDemo {
|
|
28
29
|
color: string | undefined;
|
|
@@ -35,6 +36,7 @@ When disabled is present, the element cannot be edited and focused.
|
|
|
35
36
|
|
|
36
37
|
```typescript
|
|
37
38
|
import { Component } from '@angular/core';
|
|
39
|
+
import { CommonModule } from '@angular/common';
|
|
38
40
|
import { FormsModule } from '@angular/forms';
|
|
39
41
|
import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
40
42
|
|
|
@@ -45,7 +47,7 @@ import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
|
45
47
|
</div>
|
|
46
48
|
`,
|
|
47
49
|
standalone: true,
|
|
48
|
-
imports: [
|
|
50
|
+
imports: [CommonModule, FormsModule, ColorPickerModule]
|
|
49
51
|
})
|
|
50
52
|
export class ColorpickerDisabledDemo {
|
|
51
53
|
color: string | undefined;
|
|
@@ -58,6 +60,7 @@ Default color format to use in value binding is hex and other possible values ca
|
|
|
58
60
|
|
|
59
61
|
```typescript
|
|
60
62
|
import { Component } from '@angular/core';
|
|
63
|
+
import { CommonModule } from '@angular/common';
|
|
61
64
|
import { FormsModule } from '@angular/forms';
|
|
62
65
|
import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
63
66
|
|
|
@@ -82,11 +85,13 @@ import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
|
82
85
|
</div>
|
|
83
86
|
`,
|
|
84
87
|
standalone: true,
|
|
85
|
-
imports: [
|
|
88
|
+
imports: [CommonModule, FormsModule, ColorPickerModule]
|
|
86
89
|
})
|
|
87
90
|
export class ColorpickerFormatDemo {
|
|
88
91
|
color: string = '#6466f1';
|
|
92
|
+
|
|
89
93
|
colorRGB: any = { r: 100, g: 102, b: 241 };
|
|
94
|
+
|
|
90
95
|
colorHSB: any = { h: 239, s: 59, b: 95 };
|
|
91
96
|
}
|
|
92
97
|
```
|
|
@@ -97,6 +102,7 @@ ColorPicker is displayed as a popup by default, add inline property to customize
|
|
|
97
102
|
|
|
98
103
|
```typescript
|
|
99
104
|
import { Component } from '@angular/core';
|
|
105
|
+
import { CommonModule } from '@angular/common';
|
|
100
106
|
import { FormsModule } from '@angular/forms';
|
|
101
107
|
import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
102
108
|
|
|
@@ -107,7 +113,7 @@ import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
|
107
113
|
</div>
|
|
108
114
|
`,
|
|
109
115
|
standalone: true,
|
|
110
|
-
imports: [
|
|
116
|
+
imports: [CommonModule, FormsModule, ColorPickerModule]
|
|
111
117
|
})
|
|
112
118
|
export class ColorpickerInlineDemo {
|
|
113
119
|
color: string | undefined;
|
|
@@ -120,12 +126,13 @@ ColorPicker can also be used with reactive forms. In this case, the formControlN
|
|
|
120
126
|
|
|
121
127
|
```typescript
|
|
122
128
|
import { Component, inject } from '@angular/core';
|
|
123
|
-
import {
|
|
129
|
+
import { CommonModule } from '@angular/common';
|
|
130
|
+
import { FormBuilder, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
131
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
124
132
|
import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
133
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
125
134
|
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
126
135
|
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
127
|
-
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
128
|
-
import { MessageService } from '@exhaustive-ui/core/api';
|
|
129
136
|
|
|
130
137
|
@Component({
|
|
131
138
|
template: `
|
|
@@ -143,17 +150,22 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
143
150
|
</div>
|
|
144
151
|
`,
|
|
145
152
|
standalone: true,
|
|
146
|
-
imports: [
|
|
153
|
+
imports: [CommonModule, ReactiveFormsModule, ColorPickerModule, ButtonModule, MessageModule, ToastModule],
|
|
154
|
+
providers: [MessageService]
|
|
147
155
|
})
|
|
148
156
|
export class ColorpickerReactiveformsDemo {
|
|
157
|
+
private fb = inject(FormBuilder);
|
|
158
|
+
|
|
149
159
|
messageService = inject(MessageService);
|
|
160
|
+
|
|
150
161
|
exampleForm: FormGroup;
|
|
151
|
-
|
|
162
|
+
|
|
163
|
+
formSubmitted = false;
|
|
152
164
|
|
|
153
165
|
constructor() {
|
|
154
166
|
this.exampleForm = this.fb.group({
|
|
155
|
-
|
|
156
|
-
|
|
167
|
+
color: ['', Validators.required]
|
|
168
|
+
});
|
|
157
169
|
}
|
|
158
170
|
|
|
159
171
|
onSubmit() {
|
|
@@ -179,11 +191,11 @@ ColorPicker can also be used with Angular Signal Forms , the @angular/forms/sign
|
|
|
179
191
|
```typescript
|
|
180
192
|
import { Component, inject, signal } from '@angular/core';
|
|
181
193
|
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
194
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
182
195
|
import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
183
|
-
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
184
|
-
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
185
196
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
186
|
-
import {
|
|
197
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
198
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
187
199
|
|
|
188
200
|
@Component({
|
|
189
201
|
template: `
|
|
@@ -202,11 +214,14 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
202
214
|
</div>
|
|
203
215
|
`,
|
|
204
216
|
standalone: true,
|
|
205
|
-
imports: [ColorPickerModule,
|
|
217
|
+
imports: [FormField, ColorPickerModule, ButtonModule, ToastModule, MessageModule],
|
|
218
|
+
providers: [MessageService]
|
|
206
219
|
})
|
|
207
220
|
export class ColorpickerSignalformsDemo {
|
|
208
221
|
messageService = inject(MessageService);
|
|
222
|
+
|
|
209
223
|
model = signal({ color: '' });
|
|
224
|
+
|
|
210
225
|
exampleForm = form(this.model, (f) => {
|
|
211
226
|
required(f.color);
|
|
212
227
|
});
|
|
@@ -225,12 +240,13 @@ export class ColorpickerSignalformsDemo {
|
|
|
225
240
|
|
|
226
241
|
```typescript
|
|
227
242
|
import { Component, inject } from '@angular/core';
|
|
243
|
+
import { CommonModule } from '@angular/common';
|
|
228
244
|
import { FormsModule } from '@angular/forms';
|
|
245
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
229
246
|
import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
|
|
247
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
230
248
|
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
231
249
|
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
232
|
-
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
233
|
-
import { MessageService } from '@exhaustive-ui/core/api';
|
|
234
250
|
|
|
235
251
|
@Component({
|
|
236
252
|
template: `
|
|
@@ -248,10 +264,12 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
248
264
|
</div>
|
|
249
265
|
`,
|
|
250
266
|
standalone: true,
|
|
251
|
-
imports: [
|
|
267
|
+
imports: [CommonModule, FormsModule, ColorPickerModule, ButtonModule, MessageModule, ToastModule],
|
|
268
|
+
providers: [MessageService]
|
|
252
269
|
})
|
|
253
270
|
export class ColorpickerTemplatedrivenformsDemo {
|
|
254
271
|
messageService = inject(MessageService);
|
|
272
|
+
|
|
255
273
|
color: string | undefined;
|
|
256
274
|
|
|
257
275
|
onSubmit(form: any) {
|
|
@@ -271,24 +289,24 @@ ColorPicker groups a collection of contents in tabs.
|
|
|
271
289
|
|
|
272
290
|
| Name | Type | Default | Description |
|
|
273
291
|
|------|------|---------|-------------|
|
|
274
|
-
| dt |
|
|
275
|
-
| unstyled |
|
|
276
|
-
| pt |
|
|
277
|
-
| ptOptions |
|
|
278
|
-
| required |
|
|
279
|
-
| invalid |
|
|
280
|
-
| disabled |
|
|
281
|
-
| name |
|
|
282
|
-
| inline |
|
|
283
|
-
| format |
|
|
284
|
-
| tabindex |
|
|
285
|
-
| inputId |
|
|
286
|
-
| autoZIndex |
|
|
287
|
-
| autofocus |
|
|
288
|
-
| defaultColor |
|
|
289
|
-
| appendTo |
|
|
290
|
-
| overlayOptions |
|
|
291
|
-
| motionOptions |
|
|
292
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
293
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
294
|
+
| pt | ColorPickerPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
295
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
296
|
+
| required | boolean | false | There must be a value (if set). |
|
|
297
|
+
| invalid | boolean | false | When present, it specifies that the component should have invalid state style. |
|
|
298
|
+
| disabled | boolean | false | When present, it specifies that the component should have disabled state style. |
|
|
299
|
+
| name | string | undefined | When present, it specifies that the name of the input. |
|
|
300
|
+
| inline | boolean | - | Whether to display as an overlay or not. |
|
|
301
|
+
| format | "hex" \| "rgb" \| "hsb" | 'hex' | Format to use in value binding. |
|
|
302
|
+
| tabindex | string | - | Index of the element in tabbing order. |
|
|
303
|
+
| inputId | string | - | Identifier of the focus input to match a label defined for the dropdown. |
|
|
304
|
+
| autoZIndex | boolean | true | Whether to automatically manage layering. |
|
|
305
|
+
| autofocus | boolean | - | When present, it specifies that the component should automatically get focus on load. |
|
|
306
|
+
| defaultColor | string | 'ff0000' | Default color to display initially when model value is not present. |
|
|
307
|
+
| appendTo | any | 'self' | Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). |
|
|
308
|
+
| overlayOptions | OverlayOptions | - | Whether to use overlay API feature. The properties of overlay API can be used like an object in it. |
|
|
309
|
+
| motionOptions | MotionOptions | - | The motion options. |
|
|
292
310
|
|
|
293
311
|
### Emits
|
|
294
312
|
|
|
@@ -12,10 +12,10 @@ ConfirmDialog is defined using p-confirm-dialog tag and an instance of Confirmat
|
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
14
|
import { Component, inject } from '@angular/core';
|
|
15
|
-
import {
|
|
15
|
+
import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
|
|
16
16
|
import { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';
|
|
17
17
|
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
18
|
-
import {
|
|
18
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
19
19
|
|
|
20
20
|
@Component({
|
|
21
21
|
template: `
|
|
@@ -27,13 +27,43 @@ import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
|
|
|
27
27
|
</div>
|
|
28
28
|
`,
|
|
29
29
|
standalone: true,
|
|
30
|
-
imports: [
|
|
30
|
+
imports: [ConfirmDialogModule, ToastModule, ButtonModule],
|
|
31
31
|
providers: [ConfirmationService, MessageService]
|
|
32
32
|
})
|
|
33
33
|
export class ConfirmdialogBasicDemo {
|
|
34
34
|
private confirmationService = inject(ConfirmationService);
|
|
35
35
|
private messageService = inject(MessageService);
|
|
36
36
|
|
|
37
|
+
confirm1(event: Event) {
|
|
38
|
+
this.confirmationService.confirm({
|
|
39
|
+
target: event.target as EventTarget,
|
|
40
|
+
message: 'Are you sure that you want to proceed?',
|
|
41
|
+
header: 'Confirmation',
|
|
42
|
+
closable: true,
|
|
43
|
+
closeOnEscape: true,
|
|
44
|
+
icon: 'pi pi-exclamation-triangle',
|
|
45
|
+
rejectButtonProps: {
|
|
46
|
+
label: 'Cancel',
|
|
47
|
+
severity: 'secondary',
|
|
48
|
+
outlined: true
|
|
49
|
+
},
|
|
50
|
+
acceptButtonProps: {
|
|
51
|
+
label: 'Save'
|
|
52
|
+
},
|
|
53
|
+
accept: () => {
|
|
54
|
+
this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted' });
|
|
55
|
+
},
|
|
56
|
+
reject: () => {
|
|
57
|
+
this.messageService.add({
|
|
58
|
+
severity: 'error',
|
|
59
|
+
summary: 'Rejected',
|
|
60
|
+
detail: 'You have rejected',
|
|
61
|
+
life: 3000
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
37
67
|
confirm2(event: Event) {
|
|
38
68
|
this.confirmationService.confirm({
|
|
39
69
|
target: event.target as EventTarget,
|
|
@@ -50,7 +80,7 @@ export class ConfirmdialogBasicDemo {
|
|
|
50
80
|
label: 'Delete',
|
|
51
81
|
severity: 'danger'
|
|
52
82
|
},
|
|
53
|
-
|
|
83
|
+
|
|
54
84
|
accept: () => {
|
|
55
85
|
this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted' });
|
|
56
86
|
},
|
|
@@ -67,11 +97,12 @@ export class ConfirmdialogBasicDemo {
|
|
|
67
97
|
Headless mode allows you to customize the entire user interface instead of the default elements.
|
|
68
98
|
|
|
69
99
|
```typescript
|
|
100
|
+
import { CommonModule } from '@angular/common';
|
|
70
101
|
import { Component, inject } from '@angular/core';
|
|
102
|
+
import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
|
|
71
103
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
72
104
|
import { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';
|
|
73
105
|
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
74
|
-
import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
|
|
75
106
|
|
|
76
107
|
@Component({
|
|
77
108
|
template: `
|
|
@@ -98,12 +129,25 @@ import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
|
|
|
98
129
|
</div>
|
|
99
130
|
`,
|
|
100
131
|
standalone: true,
|
|
101
|
-
imports: [
|
|
132
|
+
imports: [CommonModule, ConfirmDialogModule, ToastModule, ButtonModule],
|
|
102
133
|
providers: [ConfirmationService, MessageService]
|
|
103
134
|
})
|
|
104
135
|
export class ConfirmdialogHeadlessDemo {
|
|
105
136
|
private confirmationService = inject(ConfirmationService);
|
|
106
137
|
private messageService = inject(MessageService);
|
|
138
|
+
|
|
139
|
+
confirm() {
|
|
140
|
+
this.confirmationService.confirm({
|
|
141
|
+
header: 'Are you sure?',
|
|
142
|
+
message: 'Please confirm to proceed.',
|
|
143
|
+
accept: () => {
|
|
144
|
+
this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted' });
|
|
145
|
+
},
|
|
146
|
+
reject: () => {
|
|
147
|
+
this.messageService.add({ severity: 'info', summary: 'Rejected', detail: 'You have rejected' });
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
107
151
|
}
|
|
108
152
|
```
|
|
109
153
|
|
|
@@ -113,11 +157,10 @@ The position property of the confirm options is used to display a Dialog at all
|
|
|
113
157
|
|
|
114
158
|
```typescript
|
|
115
159
|
import { Component, inject } from '@angular/core';
|
|
116
|
-
import {
|
|
160
|
+
import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
|
|
117
161
|
import { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';
|
|
118
162
|
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
119
|
-
import {
|
|
120
|
-
import { Dialog } from '@exhaustive-ui/core/dialog';
|
|
163
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
121
164
|
|
|
122
165
|
@Component({
|
|
123
166
|
template: `
|
|
@@ -141,12 +184,46 @@ import { Dialog } from '@exhaustive-ui/core/dialog';
|
|
|
141
184
|
</div>
|
|
142
185
|
`,
|
|
143
186
|
standalone: true,
|
|
144
|
-
imports: [
|
|
187
|
+
imports: [ConfirmDialogModule, ToastModule, ButtonModule],
|
|
145
188
|
providers: [ConfirmationService, MessageService]
|
|
146
189
|
})
|
|
147
190
|
export class ConfirmdialogPositionDemo {
|
|
148
191
|
private confirmationService = inject(ConfirmationService);
|
|
149
192
|
private messageService = inject(MessageService);
|
|
193
|
+
|
|
194
|
+
position: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright' = 'center';
|
|
195
|
+
|
|
196
|
+
confirmPosition(position: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright') {
|
|
197
|
+
this.position = position;
|
|
198
|
+
|
|
199
|
+
this.confirmationService.confirm({
|
|
200
|
+
message: 'Are you sure you want to proceed?',
|
|
201
|
+
header: 'Confirmation',
|
|
202
|
+
icon: 'pi pi-info-circle',
|
|
203
|
+
rejectButtonStyleClass: 'p-button-text',
|
|
204
|
+
rejectButtonProps: {
|
|
205
|
+
label: 'Cancel',
|
|
206
|
+
severity: 'secondary',
|
|
207
|
+
text: true
|
|
208
|
+
},
|
|
209
|
+
acceptButtonProps: {
|
|
210
|
+
label: 'Save',
|
|
211
|
+
text: true
|
|
212
|
+
},
|
|
213
|
+
accept: () => {
|
|
214
|
+
this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'Request submitted' });
|
|
215
|
+
},
|
|
216
|
+
reject: () => {
|
|
217
|
+
this.messageService.add({
|
|
218
|
+
severity: 'error',
|
|
219
|
+
summary: 'Rejected',
|
|
220
|
+
detail: 'Process incomplete',
|
|
221
|
+
life: 3000
|
|
222
|
+
});
|
|
223
|
+
},
|
|
224
|
+
key: 'positionDialog'
|
|
225
|
+
});
|
|
226
|
+
}
|
|
150
227
|
}
|
|
151
228
|
```
|
|
152
229
|
|
|
@@ -155,11 +232,12 @@ export class ConfirmdialogPositionDemo {
|
|
|
155
232
|
Properties of the dialog are defined in two ways, message , icon , header properties can either be defined using confirm method or declaratively on p-confirm-dialog ng-template by header , message , icon and footer templates. If these values are unlikely to change then declarative approach would be useful, still properties defined in a ng-template can be overridden with confirm method call. In addition, buttons at footer section can be customized by passing your own UI, important note to make confirmation work with a custom UI is defining a local ng-template variable for the dialog and assign accept()-reject() methods to your own buttons.
|
|
156
233
|
|
|
157
234
|
```typescript
|
|
235
|
+
import { CommonModule } from '@angular/common';
|
|
158
236
|
import { Component, inject } from '@angular/core';
|
|
237
|
+
import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
|
|
159
238
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
160
239
|
import { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';
|
|
161
240
|
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
162
|
-
import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
|
|
163
241
|
|
|
164
242
|
@Component({
|
|
165
243
|
template: `
|
|
@@ -179,12 +257,37 @@ import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
|
|
|
179
257
|
</div>
|
|
180
258
|
`,
|
|
181
259
|
standalone: true,
|
|
182
|
-
imports: [
|
|
260
|
+
imports: [CommonModule, ConfirmDialogModule, ToastModule, ButtonModule],
|
|
183
261
|
providers: [ConfirmationService, MessageService]
|
|
184
262
|
})
|
|
185
263
|
export class ConfirmdialogTemplateDemo {
|
|
186
264
|
private confirmationService = inject(ConfirmationService);
|
|
187
265
|
private messageService = inject(MessageService);
|
|
266
|
+
|
|
267
|
+
confirm() {
|
|
268
|
+
this.confirmationService.confirm({
|
|
269
|
+
header: 'Confirmation',
|
|
270
|
+
message: 'Please confirm to proceed moving forward.',
|
|
271
|
+
icon: 'pi pi-exclamation-circle',
|
|
272
|
+
rejectButtonProps: {
|
|
273
|
+
label: 'Cancel',
|
|
274
|
+
icon: 'pi pi-times',
|
|
275
|
+
variant: 'outlined',
|
|
276
|
+
size: 'small'
|
|
277
|
+
},
|
|
278
|
+
acceptButtonProps: {
|
|
279
|
+
label: 'Save',
|
|
280
|
+
icon: 'pi pi-check',
|
|
281
|
+
size: 'small'
|
|
282
|
+
},
|
|
283
|
+
accept: () => {
|
|
284
|
+
this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 });
|
|
285
|
+
},
|
|
286
|
+
reject: () => {
|
|
287
|
+
this.messageService.add({ severity: 'error', summary: 'Rejected', detail: 'You have rejected', life: 3000 });
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
188
291
|
}
|
|
189
292
|
```
|
|
190
293
|
|
|
@@ -196,37 +299,37 @@ ConfirmDialog uses a Dialog UI that is integrated with the Confirmation API.
|
|
|
196
299
|
|
|
197
300
|
| Name | Type | Default | Description |
|
|
198
301
|
|------|------|---------|-------------|
|
|
199
|
-
| dt |
|
|
200
|
-
| unstyled |
|
|
201
|
-
| pt |
|
|
202
|
-
| ptOptions |
|
|
203
|
-
| header |
|
|
204
|
-
| icon |
|
|
205
|
-
| message |
|
|
206
|
-
| style |
|
|
207
|
-
| styleClass |
|
|
208
|
-
| maskStyleClass |
|
|
209
|
-
| acceptIcon |
|
|
210
|
-
| acceptLabel |
|
|
211
|
-
| acceptVisible |
|
|
212
|
-
| rejectIcon |
|
|
213
|
-
| rejectLabel |
|
|
214
|
-
| rejectVisible |
|
|
215
|
-
| acceptButtonStyleClass |
|
|
216
|
-
| rejectButtonStyleClass |
|
|
217
|
-
| closeOnEscape |
|
|
218
|
-
| dismissableMask |
|
|
219
|
-
| blockScroll |
|
|
220
|
-
| closable |
|
|
221
|
-
| appendTo |
|
|
222
|
-
| key |
|
|
223
|
-
| autoZIndex |
|
|
224
|
-
| baseZIndex |
|
|
225
|
-
| breakpoints |
|
|
226
|
-
| modal |
|
|
227
|
-
| visible |
|
|
228
|
-
| position |
|
|
229
|
-
| draggable |
|
|
302
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
303
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
304
|
+
| pt | ConfirmDialogPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
305
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
306
|
+
| header | string | - | Title text of the dialog. |
|
|
307
|
+
| icon | string | - | Icon to display next to message. |
|
|
308
|
+
| message | string | - | Message of the confirmation. |
|
|
309
|
+
| style | { [klass: string]: any } | - | Inline style of the element. |
|
|
310
|
+
| styleClass | string | - | Class of the element. |
|
|
311
|
+
| maskStyleClass | string | - | Specify the CSS class(es) for styling the mask element |
|
|
312
|
+
| acceptIcon | string | - | Icon of the accept button. |
|
|
313
|
+
| acceptLabel | string | - | Label of the accept button. |
|
|
314
|
+
| acceptVisible | boolean | true | Visibility of the accept button. |
|
|
315
|
+
| rejectIcon | string | - | Icon of the reject button. |
|
|
316
|
+
| rejectLabel | string | - | Label of the reject button. |
|
|
317
|
+
| rejectVisible | boolean | true | Visibility of the reject button. |
|
|
318
|
+
| acceptButtonStyleClass | string | - | Style class of the accept button. |
|
|
319
|
+
| rejectButtonStyleClass | string | - | Style class of the reject button. |
|
|
320
|
+
| closeOnEscape | boolean | true | Specifies if pressing escape key should hide the dialog. |
|
|
321
|
+
| dismissableMask | boolean | - | Specifies if clicking the modal background should hide the dialog. |
|
|
322
|
+
| blockScroll | boolean | true | Determines whether scrolling behavior should be blocked within the component. |
|
|
323
|
+
| closable | boolean | true | Adds a close icon to the header to hide the dialog. |
|
|
324
|
+
| appendTo | any | 'body' | Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). |
|
|
325
|
+
| key | string | - | Optional key to match the key of confirm object, necessary to use when component tree has multiple confirm dialogs. |
|
|
326
|
+
| autoZIndex | boolean | true | Whether to automatically manage layering. |
|
|
327
|
+
| baseZIndex | number | 0 | Base zIndex value to use in layering. |
|
|
328
|
+
| breakpoints | { [maxWidth: string]: string } | - | Object literal to define widths per screen size. |
|
|
329
|
+
| modal | boolean | true | Defines if background should be blocked when dialog is displayed. |
|
|
330
|
+
| visible | boolean | - | Current visible state as a boolean. Emits `visibleChange` with the new value when the dialog is shown or hidden. |
|
|
331
|
+
| position | "top" \| "bottom" \| "center" \| "left" \| "right" \| "topleft" \| "bottomleft" \| "topright" \| "bottomright" | 'center' | Allows getting the position of the component. |
|
|
332
|
+
| draggable | boolean | true | Enables dragging to change the position using header. |
|
|
230
333
|
|
|
231
334
|
### Emits
|
|
232
335
|
|