@exhaustive-ui/mcp 22.4.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.
Files changed (205) hide show
  1. package/README.md +13 -1
  2. package/data/cards/accordion.md +91 -0
  3. package/data/cards/animateonscroll.md +155 -0
  4. package/data/cards/autocomplete.md +109 -0
  5. package/data/cards/autofocus.md +36 -0
  6. package/data/cards/avatar.md +45 -0
  7. package/data/cards/badge.md +44 -0
  8. package/data/cards/blockui.md +51 -0
  9. package/data/cards/breadcrumb.md +56 -0
  10. package/data/cards/button.md +83 -0
  11. package/data/cards/card.md +49 -0
  12. package/data/cards/carousel.md +101 -0
  13. package/data/cards/cascadeselect.md +77 -0
  14. package/data/cards/chart.md +105 -0
  15. package/data/cards/checkbox.md +59 -0
  16. package/data/cards/chip.md +50 -0
  17. package/data/cards/classnames.md +91 -0
  18. package/data/cards/colorpicker.md +52 -0
  19. package/data/cards/confirmdialog.md +119 -0
  20. package/data/cards/confirmpopup.md +96 -0
  21. package/data/cards/contextmenu.md +60 -0
  22. package/data/cards/dataview.md +134 -0
  23. package/data/cards/datepicker.md +103 -0
  24. package/data/cards/dialog.md +89 -0
  25. package/data/cards/divider.md +55 -0
  26. package/data/cards/dock.md +106 -0
  27. package/data/cards/dragdrop.md +106 -0
  28. package/data/cards/drawer.md +62 -0
  29. package/data/cards/dynamicdialog.md +103 -0
  30. package/data/cards/editor.md +55 -0
  31. package/data/cards/fieldset.md +54 -0
  32. package/data/cards/fileinput.md +72 -0
  33. package/data/cards/fileupload.md +88 -0
  34. package/data/cards/floatlabel.md +41 -0
  35. package/data/cards/fluid.md +49 -0
  36. package/data/cards/focustrap.md +64 -0
  37. package/data/cards/galleria.md +94 -0
  38. package/data/cards/iconfield.md +45 -0
  39. package/data/cards/iftalabel.md +38 -0
  40. package/data/cards/image.md +58 -0
  41. package/data/cards/imagecompare.md +45 -0
  42. package/data/cards/inplace.md +56 -0
  43. package/data/cards/inputgroup.md +77 -0
  44. package/data/cards/inputmask.md +71 -0
  45. package/data/cards/inputnumber.md +78 -0
  46. package/data/cards/inputotp.md +60 -0
  47. package/data/cards/inputtext.md +41 -0
  48. package/data/cards/keyfilter.md +49 -0
  49. package/data/cards/knob.md +55 -0
  50. package/data/cards/listbox.md +105 -0
  51. package/data/cards/megamenu.md +96 -0
  52. package/data/cards/menu.md +64 -0
  53. package/data/cards/menubar.md +102 -0
  54. package/data/cards/message.md +51 -0
  55. package/data/cards/metergroup.md +53 -0
  56. package/data/cards/multiselect.md +115 -0
  57. package/data/cards/orderlist.md +96 -0
  58. package/data/cards/organizationchart.md +84 -0
  59. package/data/cards/overlay.md +63 -0
  60. package/data/cards/paginator.md +62 -0
  61. package/data/cards/panel.md +57 -0
  62. package/data/cards/panelmenu.md +94 -0
  63. package/data/cards/password.md +81 -0
  64. package/data/cards/picklist.md +106 -0
  65. package/data/cards/popover.md +53 -0
  66. package/data/cards/progressbar.md +42 -0
  67. package/data/cards/progressspinner.md +38 -0
  68. package/data/cards/radiobutton.md +52 -0
  69. package/data/cards/rating.md +56 -0
  70. package/data/cards/ripple.md +37 -0
  71. package/data/cards/scroller.md +32 -0
  72. package/data/cards/scrollpanel.md +50 -0
  73. package/data/cards/scrolltop.md +48 -0
  74. package/data/cards/select.md +108 -0
  75. package/data/cards/selectbutton.md +64 -0
  76. package/data/cards/skeleton.md +54 -0
  77. package/data/cards/slider.md +52 -0
  78. package/data/cards/speeddial.md +102 -0
  79. package/data/cards/splitbutton.md +96 -0
  80. package/data/cards/splitter.md +52 -0
  81. package/data/cards/stepper.md +125 -0
  82. package/data/cards/styleclass.md +46 -0
  83. package/data/cards/table.md +305 -0
  84. package/data/cards/tabs.md +97 -0
  85. package/data/cards/tag.md +41 -0
  86. package/data/cards/terminal.md +76 -0
  87. package/data/cards/textarea.md +45 -0
  88. package/data/cards/tieredmenu.md +121 -0
  89. package/data/cards/timeline.md +58 -0
  90. package/data/cards/toast.md +58 -0
  91. package/data/cards/togglebutton.md +59 -0
  92. package/data/cards/toggleswitch.md +52 -0
  93. package/data/cards/toolbar.md +74 -0
  94. package/data/cards/tooltip.md +43 -0
  95. package/data/cards/tree.md +93 -0
  96. package/data/cards/treeselect.md +98 -0
  97. package/data/cards/treetable.md +231 -0
  98. package/data/components/accordion.md +31 -23
  99. package/data/components/animateonscroll.md +18 -15
  100. package/data/components/autocomplete.md +162 -93
  101. package/data/components/autofocus.md +9 -7
  102. package/data/components/avatar.md +56 -43
  103. package/data/components/badge.md +27 -18
  104. package/data/components/blockui.md +15 -8
  105. package/data/components/breadcrumb.md +20 -14
  106. package/data/components/button.md +121 -94
  107. package/data/components/card.md +12 -10
  108. package/data/components/carousel.md +75 -53
  109. package/data/components/cascadeselect.md +271 -238
  110. package/data/components/chart.md +88 -74
  111. package/data/components/checkbox.md +107 -97
  112. package/data/components/chip.md +20 -16
  113. package/data/components/classnames.md +22 -4
  114. package/data/components/colorpicker.md +54 -36
  115. package/data/components/confirmdialog.md +146 -43
  116. package/data/components/confirmpopup.md +95 -22
  117. package/data/components/contextmenu.md +110 -39
  118. package/data/components/dataview.md +176 -83
  119. package/data/components/datepicker.md +171 -141
  120. package/data/components/dialog.md +80 -68
  121. package/data/components/divider.md +17 -12
  122. package/data/components/dock.md +65 -29
  123. package/data/components/dragdrop.md +26 -12
  124. package/data/components/drawer.md +67 -48
  125. package/data/components/dynamicdialog.md +22 -13
  126. package/data/components/editor.md +42 -33
  127. package/data/components/fieldset.md +20 -17
  128. package/data/components/fileinput.md +92 -35
  129. package/data/components/fileupload.md +101 -61
  130. package/data/components/floatlabel.md +20 -11
  131. package/data/components/fluid.md +11 -9
  132. package/data/components/focustrap.md +11 -7
  133. package/data/components/galleria.md +231 -90
  134. package/data/components/iconfield.md +23 -15
  135. package/data/components/iftalabel.md +15 -9
  136. package/data/components/image.md +31 -26
  137. package/data/components/imagecompare.md +8 -6
  138. package/data/components/inplace.md +27 -22
  139. package/data/components/inputgroup.md +53 -29
  140. package/data/components/inputmask.md +107 -85
  141. package/data/components/inputnumber.md +128 -90
  142. package/data/components/inputotp.md +55 -42
  143. package/data/components/inputtext.md +72 -50
  144. package/data/components/keyfilter.md +6 -3
  145. package/data/components/knob.md +70 -58
  146. package/data/components/listbox.md +171 -141
  147. package/data/components/llms.md +4 -0
  148. package/data/components/megamenu.md +24 -23
  149. package/data/components/menu.md +37 -34
  150. package/data/components/menubar.md +27 -22
  151. package/data/components/message.md +44 -32
  152. package/data/components/metergroup.md +48 -17
  153. package/data/components/multiselect.md +232 -168
  154. package/data/components/orderlist.md +55 -48
  155. package/data/components/organizationchart.md +182 -13
  156. package/data/components/overlay.md +31 -26
  157. package/data/components/paginator.md +49 -34
  158. package/data/components/panel.md +23 -19
  159. package/data/components/panelmenu.md +51 -25
  160. package/data/components/password.md +104 -91
  161. package/data/components/picklist.md +93 -71
  162. package/data/components/popover.md +68 -46
  163. package/data/components/progressbar.md +28 -22
  164. package/data/components/progressspinner.md +13 -11
  165. package/data/components/radiobutton.md +69 -35
  166. package/data/components/rating.md +48 -40
  167. package/data/components/ripple.md +8 -6
  168. package/data/components/scroller.md +29 -29
  169. package/data/components/scrollpanel.md +9 -7
  170. package/data/components/scrolltop.md +20 -18
  171. package/data/components/select.md +248 -169
  172. package/data/components/selectbutton.md +118 -56
  173. package/data/components/skeleton.md +22 -18
  174. package/data/components/slider.md +73 -49
  175. package/data/components/speeddial.md +77 -59
  176. package/data/components/splitbutton.md +354 -329
  177. package/data/components/splitter.md +22 -18
  178. package/data/components/stepper.md +38 -21
  179. package/data/components/styleclass.md +12 -6
  180. package/data/components/table.md +524 -315
  181. package/data/components/tabs.md +44 -26
  182. package/data/components/tag.md +18 -14
  183. package/data/components/terminal.md +38 -27
  184. package/data/components/textarea.md +82 -47
  185. package/data/components/tieredmenu.md +34 -29
  186. package/data/components/timeline.md +29 -28
  187. package/data/components/toast.md +115 -57
  188. package/data/components/togglebutton.md +53 -39
  189. package/data/components/toggleswitch.md +41 -28
  190. package/data/components/toolbar.md +19 -18
  191. package/data/components/tooltip.md +43 -32
  192. package/data/components/tree.md +114 -81
  193. package/data/components/treeselect.md +176 -174
  194. package/data/components/treetable.md +1250 -1045
  195. package/data/components.json +4134 -4088
  196. package/data/llms-full.txt +8979 -6437
  197. package/data/llms.txt +100 -96
  198. package/data/manifest.json +183 -15
  199. package/data/pages/llms.md +29 -0
  200. package/data/pages/tailwind.md +20 -10
  201. package/data/snapshot.json +2 -2
  202. package/dist/index.d.mts +37 -2
  203. package/dist/index.mjs +1395 -1079
  204. package/dist/index.mjs.map +1 -1
  205. package/package.json +1 -1
@@ -12,10 +12,10 @@ ConfirmPopup is defined using p-confirmPopup tag and an instance of Confirmation
12
12
 
13
13
  ```typescript
14
14
  import { Component, inject } from '@angular/core';
15
- import { ButtonModule } from '@exhaustive-ui/core/button';
15
+ import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
16
16
  import { ConfirmPopupModule } from '@exhaustive-ui/core/confirmpopup';
17
17
  import { ToastModule } from '@exhaustive-ui/core/toast';
18
- import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
18
+ import { ButtonModule } from '@exhaustive-ui/core/button';
19
19
 
20
20
  @Component({
21
21
  template: `
@@ -27,13 +27,35 @@ import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
27
27
  </div>
28
28
  `,
29
29
  standalone: true,
30
- imports: [ButtonModule, ConfirmPopupModule, ToastModule],
30
+ imports: [ConfirmPopupModule, ToastModule, ButtonModule],
31
31
  providers: [ConfirmationService, MessageService]
32
32
  })
33
33
  export class ConfirmpopupBasicDemo {
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.currentTarget as EventTarget,
40
+ message: 'Are you sure you want to proceed?',
41
+ icon: 'pi pi-exclamation-triangle',
42
+ rejectButtonProps: {
43
+ label: 'Cancel',
44
+ severity: 'secondary',
45
+ outlined: true
46
+ },
47
+ acceptButtonProps: {
48
+ label: 'Save'
49
+ },
50
+ accept: () => {
51
+ this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 });
52
+ },
53
+ reject: () => {
54
+ this.messageService.add({ severity: 'error', summary: 'Rejected', detail: 'You have rejected', life: 3000 });
55
+ }
56
+ });
57
+ }
58
+
37
59
  confirm2(event: Event) {
38
60
  this.confirmationService.confirm({
39
61
  target: event.currentTarget as EventTarget,
@@ -168,7 +190,8 @@ import { Component } from '@angular/core';
168
190
  standalone: true,
169
191
  imports: []
170
192
  })
171
- export class ConfirmpopupConfirmationapiDemo {}
193
+ export class ConfirmpopupConfirmationapiDemo {
194
+ }
172
195
  ```
173
196
 
174
197
  ## Headless
@@ -176,11 +199,12 @@ export class ConfirmpopupConfirmationapiDemo {}
176
199
  Headless mode allows you to customize the entire user interface instead of the default elements.
177
200
 
178
201
  ```typescript
202
+ import { CommonModule } from '@angular/common';
179
203
  import { Component, inject } from '@angular/core';
204
+ import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
180
205
  import { ButtonModule } from '@exhaustive-ui/core/button';
181
206
  import { ConfirmPopupModule } from '@exhaustive-ui/core/confirmpopup';
182
207
  import { ToastModule } from '@exhaustive-ui/core/toast';
183
- import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
184
208
 
185
209
  @Component({
186
210
  template: `
@@ -201,12 +225,25 @@ import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
201
225
  </div>
202
226
  `,
203
227
  standalone: true,
204
- imports: [ButtonModule, ConfirmPopupModule, ToastModule],
228
+ imports: [CommonModule, ConfirmPopupModule, ToastModule, ButtonModule],
205
229
  providers: [ConfirmationService, MessageService]
206
230
  })
207
231
  export class ConfirmpopupHeadlessDemo {
208
232
  private confirmationService = inject(ConfirmationService);
209
233
  private messageService = inject(MessageService);
234
+
235
+ confirm(event: Event) {
236
+ this.confirmationService.confirm({
237
+ target: event.target as EventTarget,
238
+ message: 'Save your current process?',
239
+ accept: () => {
240
+ this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 });
241
+ },
242
+ reject: () => {
243
+ this.messageService.add({ severity: 'error', summary: 'Rejected', detail: 'You have rejected', life: 3000 });
244
+ }
245
+ });
246
+ }
210
247
  }
211
248
  ```
212
249
 
@@ -259,7 +296,8 @@ import { Component } from '@angular/core';
259
296
  standalone: true,
260
297
  imports: []
261
298
  })
262
- export class ConfirmpopupPropsDemo {}
299
+ export class ConfirmpopupPropsDemo {
300
+ }
263
301
  ```
264
302
 
265
303
  ## Template
@@ -267,11 +305,12 @@ export class ConfirmpopupPropsDemo {}
267
305
  Content section can be customized using content template.
268
306
 
269
307
  ```typescript
308
+ import { CommonModule } from '@angular/common';
270
309
  import { Component, inject } from '@angular/core';
310
+ import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
271
311
  import { ButtonModule } from '@exhaustive-ui/core/button';
272
312
  import { ConfirmPopupModule } from '@exhaustive-ui/core/confirmpopup';
273
313
  import { ToastModule } from '@exhaustive-ui/core/toast';
274
- import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
275
314
 
276
315
  @Component({
277
316
  template: `
@@ -289,12 +328,45 @@ import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
289
328
  </div>
290
329
  `,
291
330
  standalone: true,
292
- imports: [ButtonModule, ConfirmPopupModule, ToastModule],
331
+ imports: [CommonModule, ConfirmPopupModule, ToastModule, ButtonModule],
293
332
  providers: [ConfirmationService, MessageService]
294
333
  })
295
334
  export class ConfirmpopupTemplateDemo {
296
335
  private confirmationService = inject(ConfirmationService);
297
336
  private messageService = inject(MessageService);
337
+
338
+ confirm(event: Event) {
339
+ this.confirmationService.confirm({
340
+ target: event.target as EventTarget,
341
+ message: 'Please confirm to proceed moving forward.',
342
+ icon: 'pi pi-exclamation-circle',
343
+ rejectButtonProps: {
344
+ icon: 'pi pi-times',
345
+ label: 'Cancel',
346
+ outlined: true
347
+ },
348
+ acceptButtonProps: {
349
+ icon: 'pi pi-check',
350
+ label: 'Confirm'
351
+ },
352
+ accept: () => {
353
+ this.messageService.add({
354
+ severity: 'info',
355
+ summary: 'Confirmed',
356
+ detail: 'You have accepted',
357
+ life: 3000
358
+ });
359
+ },
360
+ reject: () => {
361
+ this.messageService.add({
362
+ severity: 'error',
363
+ summary: 'Rejected',
364
+ detail: 'You have rejected',
365
+ life: 3000
366
+ });
367
+ }
368
+ });
369
+ }
298
370
  }
299
371
  ```
300
372
 
@@ -329,7 +401,8 @@ import { Component } from '@angular/core';
329
401
  standalone: true,
330
402
  imports: []
331
403
  })
332
- export class ConfirmpopupTemplatesDemo {}
404
+ export class ConfirmpopupTemplatesDemo {
405
+ }
333
406
  ```
334
407
 
335
408
  ## Confirm Popup
@@ -340,18 +413,18 @@ ConfirmPopup displays a confirmation overlay displayed relatively to its target.
340
413
 
341
414
  | Name | Type | Default | Description |
342
415
  |------|------|---------|-------------|
343
- | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
344
- | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
345
- | pt | InputSignal<ConfirmPopupPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
346
- | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
347
- | key | InputSignal<string> | ... | Optional key to match the key of confirm object, necessary to use when component tree has multiple confirm dialogs. |
348
- | defaultFocus | InputSignal<string> | ... | Element to receive the focus when the popup gets visible, valid values are "accept", "reject", and "none". |
349
- | autoZIndex | InputSignalWithTransform<boolean, unknown> | ... | Whether to automatically manage layering. |
350
- | style | InputSignal<{ [klass: string]: any }> | ... | Inline style of the component. |
351
- | styleClass | InputSignal<string> | ... | Style class of the component. |
352
- | visible | InputSignal<boolean> | ... | Defines if the component is visible. |
353
- | motionOptions | InputSignal<MotionOptions> | ... | The motion options. |
354
- | appendTo | InputSignal<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). |
416
+ | dt | Object | undefined | Defines scoped design tokens of the component. |
417
+ | unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
418
+ | pt | ConfirmPopupPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
419
+ | ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
420
+ | key | string | - | Optional key to match the key of confirm object, necessary to use when component tree has multiple confirm dialogs. |
421
+ | defaultFocus | string | 'accept' | Element to receive the focus when the popup gets visible, valid values are "accept", "reject", and "none". |
422
+ | autoZIndex | boolean | true | Whether to automatically manage layering. |
423
+ | style | { [klass: string]: any } | - | Inline style of the component. |
424
+ | styleClass | string | - | Style class of the component. |
425
+ | visible | boolean | - | Defines if the component is visible. |
426
+ | motionOptions | MotionOptions | - | The motion options. |
427
+ | 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). |
355
428
 
356
429
  ### Templates
357
430
 
@@ -12,9 +12,8 @@ ContextMenu can be attached to a particular element whose local template variabl
12
12
 
13
13
  ```typescript
14
14
  import { Component, OnInit } from '@angular/core';
15
- import { ContextMenu, ContextMenuModule } from '@exhaustive-ui/core/contextmenu';
16
15
  import { MenuItem } from '@exhaustive-ui/core/api';
17
- import { ContextMenu } from '@exhaustive-ui/core/contextmenu';
16
+ import { ContextMenuModule } from '@exhaustive-ui/core/contextmenu';
18
17
 
19
18
  @Component({
20
19
  template: `
@@ -43,12 +42,12 @@ export class ContextmenuBasicDemo implements OnInit {
43
42
  The function to invoke when an item is clicked is defined using the command property.
44
43
 
45
44
  ```typescript
46
- import { Component, OnInit, inject } from '@angular/core';
45
+ import { Component, OnInit, ViewChild, inject } from '@angular/core';
46
+ import { CommonModule } from '@angular/common';
47
+ import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
47
48
  import { ContextMenu, ContextMenuModule } from '@exhaustive-ui/core/contextmenu';
48
- import { TagModule } from '@exhaustive-ui/core/tag';
49
49
  import { ToastModule } from '@exhaustive-ui/core/toast';
50
- import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
51
- import { ContextMenu } from '@exhaustive-ui/core/contextmenu';
50
+ import { Tag } from '@exhaustive-ui/core/tag';
52
51
 
53
52
  interface Users {
54
53
  id: number;
@@ -64,8 +63,8 @@ interface Users {
64
63
  <ul class="m-0 list-none border border-surface rounded-sm p-4 flex flex-col gap-2 w-full sm:w-96">
65
64
  <li
66
65
  *ngFor="let user of users"
67
- class="p-2 hover:bg-emphasis rounded-sm border border-transparent transition-all duration-200 flex items-center justify-content-between"
68
- [ngClass]="{ 'border-primary': selectedId === user.id }"
66
+ class="p-2 hover:bg-emphasis rounded-sm border border-transparent transition-all duration-200 flex items-center justify-between"
67
+ [ngClass]="{ 'border-primary': selectedUser?.id === user.id }"
69
68
  (contextmenu)="onContextMenu($event, user)"
70
69
  >
71
70
  <div class="flex flex-1 items-center gap-2">
@@ -79,13 +78,18 @@ interface Users {
79
78
  </div>
80
79
  `,
81
80
  standalone: true,
82
- imports: [ContextMenuModule, TagModule, ToastModule],
81
+ imports: [CommonModule, ContextMenuModule, ToastModule, Tag],
83
82
  providers: [MessageService]
84
83
  })
85
84
  export class ContextmenuCommandDemo implements OnInit {
86
85
  private messageService = inject(MessageService);
86
+
87
87
  items: MenuItem[] | undefined;
88
+
89
+ @ViewChild('cm') cm: ContextMenu;
90
+
88
91
  selectedUser: Users;
92
+
89
93
  users: Users[];
90
94
 
91
95
  ngOnInit() {
@@ -96,6 +100,7 @@ export class ContextmenuCommandDemo implements OnInit {
96
100
  { id: 3, name: 'Bernardo Dominic', image: 'bernardodominic.png', role: 'Guest' },
97
101
  { id: 4, name: 'Elwin Sharvill', image: 'elwinsharvill.png', role: 'Member' }
98
102
  ];
103
+
99
104
  this.items = [
100
105
  {
101
106
  label: 'Roles',
@@ -159,9 +164,8 @@ Setting global property to true attaches the context menu to the document.
159
164
 
160
165
  ```typescript
161
166
  import { Component, OnInit } from '@angular/core';
162
- import { ContextMenu, ContextMenuModule } from '@exhaustive-ui/core/contextmenu';
163
167
  import { MenuItem } from '@exhaustive-ui/core/api';
164
- import { ContextMenu } from '@exhaustive-ui/core/contextmenu';
168
+ import { ContextMenuModule } from '@exhaustive-ui/core/contextmenu';
165
169
 
166
170
  @Component({
167
171
  template: `
@@ -213,9 +217,10 @@ export class ContextmenuDocumentDemo implements OnInit {
213
217
  Menu items support navigation via routerLink, programmatic routing using commands, or external URLs.
214
218
 
215
219
  ```typescript
216
- import { Component, OnInit } from '@angular/core';
217
- import { ContextMenuModule } from '@exhaustive-ui/core/contextmenu';
220
+ import { Component, OnInit, inject } from '@angular/core';
221
+ import { Router } from '@angular/router';
218
222
  import { MenuItem } from '@exhaustive-ui/core/api';
223
+ import { ContextMenuModule } from '@exhaustive-ui/core/contextmenu';
219
224
 
220
225
  @Component({
221
226
  template: `
@@ -253,6 +258,8 @@ import { MenuItem } from '@exhaustive-ui/core/api';
253
258
  imports: [ContextMenuModule]
254
259
  })
255
260
  export class ContextmenuRouterDemo implements OnInit {
261
+ private router = inject(Router);
262
+
256
263
  items: MenuItem[] | undefined;
257
264
 
258
265
  ngOnInit() {
@@ -288,13 +295,12 @@ Table has built-in support for ContextMenu, see the ContextMenu demo for an exam
288
295
  ContextMenu offers item customization with the item template that receives the menuitem instance from the model as a parameter.
289
296
 
290
297
  ```typescript
291
- import { Component, OnInit } from '@angular/core';
298
+ import { CommonModule } from '@angular/common';
299
+ import { Component, OnInit, ViewChild } from '@angular/core';
300
+ import { MenuItem } from '@exhaustive-ui/core/api';
292
301
  import { BadgeModule } from '@exhaustive-ui/core/badge';
293
302
  import { ContextMenu, ContextMenuModule } from '@exhaustive-ui/core/contextmenu';
294
- import { RippleModule } from '@exhaustive-ui/core/ripple';
295
- import { MenuItem } from '@exhaustive-ui/core/api';
296
- import { Product } from '@/domain/product';
297
- import { ContextMenu } from '@exhaustive-ui/core/contextmenu';
303
+ import { Ripple } from '@exhaustive-ui/core/ripple';
298
304
 
299
305
  @Component({
300
306
  template: `
@@ -333,12 +339,77 @@ import { ContextMenu } from '@exhaustive-ui/core/contextmenu';
333
339
  </div>
334
340
  `,
335
341
  standalone: true,
336
- imports: [BadgeModule, ContextMenuModule, RippleModule]
342
+ imports: [CommonModule, ContextMenuModule, BadgeModule, Ripple]
337
343
  })
338
344
  export class ContextmenuTemplateDemo implements OnInit {
339
345
  items: MenuItem[] | undefined;
346
+
347
+ @ViewChild('cm') cm: ContextMenu;
348
+
340
349
  selectedId!: string;
341
- data: any[];
350
+
351
+ data = [
352
+ {
353
+ id: '1000',
354
+ code: 'f230fh0g3',
355
+ name: 'Bamboo Watch',
356
+ description: 'Product Description',
357
+ image: 'bamboo-watch.jpg',
358
+ price: 65,
359
+ category: 'Accessories',
360
+ quantity: 24,
361
+ inventoryStatus: 'INSTOCK',
362
+ rating: 5
363
+ },
364
+ {
365
+ id: '1001',
366
+ code: 'nvklal433',
367
+ name: 'Black Watch',
368
+ description: 'Product Description',
369
+ image: 'black-watch.jpg',
370
+ price: 72,
371
+ category: 'Accessories',
372
+ quantity: 61,
373
+ inventoryStatus: 'INSTOCK',
374
+ rating: 4
375
+ },
376
+ {
377
+ id: '1002',
378
+ code: 'zz21cz3c1',
379
+ name: 'Blue Band',
380
+ description: 'Product Description',
381
+ image: 'blue-band.jpg',
382
+ price: 79,
383
+ category: 'Fitness',
384
+ quantity: 2,
385
+ inventoryStatus: 'LOWSTOCK',
386
+ rating: 3
387
+ },
388
+ {
389
+ id: '1003',
390
+ code: '244wgerg2',
391
+ name: 'Blue T-Shirt',
392
+ description: 'Product Description',
393
+ image: 'blue-t-shirt.jpg',
394
+ price: 29,
395
+ category: 'Clothing',
396
+ quantity: 25,
397
+ inventoryStatus: 'INSTOCK',
398
+ rating: 5
399
+ },
400
+ {
401
+ id: '1004',
402
+ code: 'h456wer53',
403
+ name: 'Bracelet',
404
+ description: 'Product Description',
405
+ image: 'bracelet.jpg',
406
+ price: 15,
407
+ category: 'Accessories',
408
+ quantity: 73,
409
+ inventoryStatus: 'INSTOCK',
410
+ rating: 4
411
+ }
412
+ ];
342
413
 
343
414
  ngOnInit() {
344
415
  this.items = [
@@ -392,25 +463,25 @@ ContextMenu displays an overlay menu on right click of its target. Note that com
392
463
 
393
464
  | Name | Type | Default | Description |
394
465
  |------|------|---------|-------------|
395
- | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
396
- | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
397
- | pt | InputSignal<ContextMenuPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
398
- | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
399
- | model | InputSignal<MenuItem[]> | ... | An array of menuitems. |
400
- | triggerEvent | InputSignal<string> | ... | Event for which the menu must be displayed. |
401
- | target | InputSignal<string \| HTMLElement> | ... | Local template variable name of the element to attach the context menu. |
402
- | global | InputSignalWithTransform<boolean, unknown> | ... | Attaches the menu to document instead of a particular item. |
403
- | style | InputSignal<{ [klass: string]: any }> | ... | Inline style of the component. |
404
- | styleClass | InputSignal<string> | ... | Style class of the component. |
405
- | autoZIndex | InputSignalWithTransform<boolean, unknown> | ... | Whether to automatically manage layering. |
406
- | baseZIndex | InputSignalWithTransform<number, unknown> | ... | Base zIndex value to use in layering. |
407
- | id | InputSignal<string> | ... | Current id state as a string. |
408
- | breakpoint | InputSignal<string> | ... | The breakpoint to define the maximum width boundary. |
409
- | ariaLabel | InputSignal<string> | ... | Defines a string value that labels an interactive element. |
410
- | ariaLabelledBy | InputSignal<string> | ... | Identifier of the underlying input element. |
411
- | pressDelay | InputSignalWithTransform<number, unknown> | ... | Press delay in touch devices as miliseconds. |
412
- | appendTo | InputSignal<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). |
413
- | motionOptions | InputSignal<MotionOptions> | ... | The motion options. |
466
+ | dt | Object | undefined | Defines scoped design tokens of the component. |
467
+ | unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
468
+ | pt | ContextMenuPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
469
+ | ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
470
+ | model | MenuItem[] | - | An array of menuitems. |
471
+ | triggerEvent | string | 'contextmenu' | Event for which the menu must be displayed. |
472
+ | target | string \| HTMLElement | - | Local template variable name of the element to attach the context menu. |
473
+ | global | boolean | - | Attaches the menu to document instead of a particular item. |
474
+ | style | { [klass: string]: any } | - | Inline style of the component. |
475
+ | styleClass | string | - | Style class of the component. |
476
+ | autoZIndex | boolean | true | Whether to automatically manage layering. |
477
+ | baseZIndex | number | 0 | Base zIndex value to use in layering. |
478
+ | id | string | - | Current id state as a string. |
479
+ | breakpoint | string | '960px' | The breakpoint to define the maximum width boundary. |
480
+ | ariaLabel | string | - | Defines a string value that labels an interactive element. |
481
+ | ariaLabelledBy | string | - | Identifier of the underlying input element. |
482
+ | pressDelay | number | 500 | Press delay in touch devices as miliseconds. |
483
+ | 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). |
484
+ | motionOptions | MotionOptions | - | The motion options. |
414
485
 
415
486
  ### Emits
416
487