@exhaustive-ui/mcp 0.0.0-stage → 22.0.0-alpha.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 (121) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +167 -2
  3. package/data/components/accordion.md +421 -0
  4. package/data/components/animateonscroll.md +163 -0
  5. package/data/components/autocomplete.md +1077 -0
  6. package/data/components/autofocus.md +38 -0
  7. package/data/components/avatar.md +417 -0
  8. package/data/components/badge.md +234 -0
  9. package/data/components/blockui.md +108 -0
  10. package/data/components/breadcrumb.md +178 -0
  11. package/data/components/button.md +774 -0
  12. package/data/components/card.md +138 -0
  13. package/data/components/carousel.md +440 -0
  14. package/data/components/cascadeselect.md +1387 -0
  15. package/data/components/chart.md +1178 -0
  16. package/data/components/checkbox.md +529 -0
  17. package/data/components/chip.md +180 -0
  18. package/data/components/colorpicker.md +301 -0
  19. package/data/components/confirmdialog.md +287 -0
  20. package/data/components/confirmpopup.md +417 -0
  21. package/data/components/contextmenu.md +491 -0
  22. package/data/components/dataview.md +600 -0
  23. package/data/components/datepicker.md +1262 -0
  24. package/data/components/dialog.md +622 -0
  25. package/data/components/divider.md +250 -0
  26. package/data/components/dock.md +500 -0
  27. package/data/components/dragdrop.md +285 -0
  28. package/data/components/drawer.md +510 -0
  29. package/data/components/dynamicdialog.md +109 -0
  30. package/data/components/editor.md +291 -0
  31. package/data/components/fieldset.md +182 -0
  32. package/data/components/fileupload.md +430 -0
  33. package/data/components/floatlabel.md +155 -0
  34. package/data/components/fluid.md +72 -0
  35. package/data/components/focustrap.md +65 -0
  36. package/data/components/galleria.md +627 -0
  37. package/data/components/iconfield.md +246 -0
  38. package/data/components/iftalabel.md +105 -0
  39. package/data/components/imagecompare.md +97 -0
  40. package/data/components/inplace.md +233 -0
  41. package/data/components/inputgroup.md +306 -0
  42. package/data/components/inputmask.md +518 -0
  43. package/data/components/inputnumber.md +675 -0
  44. package/data/components/inputotp.md +336 -0
  45. package/data/components/inputtext.md +488 -0
  46. package/data/components/keyfilter.md +85 -0
  47. package/data/components/knob.md +462 -0
  48. package/data/components/listbox.md +798 -0
  49. package/data/components/llms.md +28 -0
  50. package/data/components/megamenu.md +587 -0
  51. package/data/components/menu.md +483 -0
  52. package/data/components/menubar.md +462 -0
  53. package/data/components/message.md +449 -0
  54. package/data/components/metergroup.md +241 -0
  55. package/data/components/multiselect.md +1047 -0
  56. package/data/components/orderlist.md +342 -0
  57. package/data/components/organizationchart.md +197 -0
  58. package/data/components/overlay.md +217 -0
  59. package/data/components/paginator.md +314 -0
  60. package/data/components/panel.md +214 -0
  61. package/data/components/panelmenu.md +699 -0
  62. package/data/components/password.md +570 -0
  63. package/data/components/picklist.md +420 -0
  64. package/data/components/popover.md +378 -0
  65. package/data/components/progressbar.md +181 -0
  66. package/data/components/progressspinner.md +91 -0
  67. package/data/components/radiobutton.md +377 -0
  68. package/data/components/rating.md +312 -0
  69. package/data/components/ripple.md +89 -0
  70. package/data/components/scroller.md +122 -0
  71. package/data/components/scrollpanel.md +149 -0
  72. package/data/components/scrolltop.md +105 -0
  73. package/data/components/select.md +1206 -0
  74. package/data/components/selectbutton.md +356 -0
  75. package/data/components/skeleton.md +242 -0
  76. package/data/components/slider.md +337 -0
  77. package/data/components/speeddial.md +589 -0
  78. package/data/components/splitbutton.md +945 -0
  79. package/data/components/splitter.md +196 -0
  80. package/data/components/stepper.md +411 -0
  81. package/data/components/styleclass.md +126 -0
  82. package/data/components/table.md +4557 -0
  83. package/data/components/tabs.md +467 -0
  84. package/data/components/tag.md +200 -0
  85. package/data/components/terminal.md +118 -0
  86. package/data/components/textarea.md +416 -0
  87. package/data/components/tieredmenu.md +578 -0
  88. package/data/components/timeline.md +310 -0
  89. package/data/components/toast.md +596 -0
  90. package/data/components/togglebutton.md +356 -0
  91. package/data/components/toggleswitch.md +285 -0
  92. package/data/components/toolbar.md +182 -0
  93. package/data/components/tooltip.md +211 -0
  94. package/data/components/tree.md +746 -0
  95. package/data/components/treeselect.md +912 -0
  96. package/data/components/treetable.md +2814 -0
  97. package/data/components.json +43751 -0
  98. package/data/llms-full.txt +47433 -0
  99. package/data/llms.txt +121 -0
  100. package/data/manifest.json +46513 -0
  101. package/data/pages/accessibility.md +28 -0
  102. package/data/pages/animations.md +28 -0
  103. package/data/pages/configuration.md +210 -0
  104. package/data/pages/contribution.md +20 -0
  105. package/data/pages/customicons.md +20 -0
  106. package/data/pages/faq.md +20 -0
  107. package/data/pages/icons.md +66 -0
  108. package/data/pages/installation.md +71 -0
  109. package/data/pages/llms.md +61 -0
  110. package/data/pages/passthrough.md +32 -0
  111. package/data/pages/philosophy.md +28 -0
  112. package/data/pages/primeflex.md +20 -0
  113. package/data/pages/rtl.md +12 -0
  114. package/data/pages/styled.md +132 -0
  115. package/data/pages/tailwind.md +40 -0
  116. package/data/pages/unstyled.md +39 -0
  117. package/data/snapshot.json +9 -0
  118. package/dist/index.d.mts +448 -0
  119. package/dist/index.mjs +2501 -0
  120. package/dist/index.mjs.map +1 -0
  121. package/package.json +67 -3
@@ -0,0 +1,342 @@
1
+ # Angular OrderList Component
2
+
3
+ OrderList is used to sort a collection.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader Value to describe the source listbox and target listbox can be provided with sourceListProps and targetListProps by passing aria-labelledby or aria-label props. The list elements has a listbox role with the aria-multiselectable attribute. Each list item has an option role with aria-selected and aria-disabled as their attributes. Controls buttons are button elements with an aria-label that refers to the aria.moveTop , aria.moveUp , aria.moveDown , aria.moveBottom , aria.moveTo , aria.moveAllTo , aria.moveFrom and aria.moveAllFrom properties of the locale API by default, alternatively you may use moveTopButtonProps , moveUpButtonProps , moveDownButtonProps , moveToButtonProps , moveAllToButtonProps , moveFromButtonProps , moveFromButtonProps and moveAllFromButtonProps to customize the buttons like overriding the default aria-label attributes. OrderList Keyboard Support Key Function tab Moves focus to the first selected option, if there is none then first option receives the focus. up arrow Moves focus to the previous option. down arrow Moves focus to the next option. enter Toggles the selected state of the focused option. space Toggles the selected state of the focused option. home Moves focus to the first option. end Moves focus to the last option. shift + down arrow Moves focus to the next option and toggles the selection state. shift + up arrow Moves focus to the previous option and toggles the selection state. shift + space Selects the items between the most recently selected option and the focused option. control + shift + home Selects the focused options and all the options up to the first one. control + shift + end Selects the focused options and all the options down to the first one. control + a Selects all options. Buttons Keyboard Support Key Function enter Executes button action. space Executes button action.
8
+
9
+ ## Basic
10
+
11
+ OrderList is used as a controlled input with value property. Content of a list item needs to be defined with the item template that receives an object in the list as parameter.
12
+
13
+ ```typescript
14
+ import { Component, OnInit, inject, signal } from '@angular/core';
15
+ import { OrderListModule } from '@exhaustive-ui/core/orderlist';
16
+ import { ProductService } from '@/service/productservice';
17
+ import { Product } from '@/domain/product';
18
+
19
+ @Component({
20
+ template: `
21
+ <div class="card sm:flex sm:justify-center">
22
+ <p-orderlist [value]="products()" dataKey="id" [responsive]="true" breakpoint="575px">
23
+ <ng-template #item let-option>
24
+ {{ option.name }}
25
+ </ng-template>
26
+ </p-orderlist>
27
+ </div>
28
+ `,
29
+ standalone: true,
30
+ imports: [OrderListModule],
31
+ providers: [ProductService]
32
+ })
33
+ export class OrderlistBasicDemo implements OnInit {
34
+ private productService = inject(ProductService);
35
+ products = signal<Product[]>([]);
36
+
37
+ ngOnInit() {
38
+ this.productService.getProductsSmall().then((cars) => {
39
+ this.products.set(cars);
40
+ });
41
+ }
42
+
43
+ getSeverity(status: string) {
44
+ switch (status) {
45
+ case 'INSTOCK':
46
+ return 'success';
47
+ case 'LOWSTOCK':
48
+ return 'warning';
49
+ case 'OUTOFSTOCK':
50
+ return 'danger';
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ ## dragdrop-doc
57
+
58
+ Items can be reordered using drag and drop by enabling dragdrop property. Depends on &#64;angular/cdk package.
59
+
60
+ ```typescript
61
+ import { Component, OnInit, inject, signal } from '@angular/core';
62
+ import { OrderListModule } from '@exhaustive-ui/core/orderlist';
63
+ import { ProductService } from '@/service/productservice';
64
+ import { Product } from '@/domain/product';
65
+
66
+ @Component({
67
+ template: `
68
+ <div class="card sm:flex sm:justify-center">
69
+ <p-orderlist [value]="products()" dataKey="id" [dragdrop]="true" [responsive]="true" breakpoint="575px" scrollHeight="20rem">
70
+ <ng-template let-option let-selected="selected" #item>
71
+ <div class="flex flex-wrap p-1 items-center gap-4 w-full">
72
+ <img class="w-12 shrink-0 rounded" src="https://exhaustive-ui.e-xiste.com/demo/product/{{ option.image }}" [alt]="option.name" />
73
+ <div class="flex-1 flex flex-col">
74
+ <span class="font-medium text-sm">{{ option.name }}</span>
75
+ <span
76
+ [ngClass]="{
77
+ 'text-sm': true,
78
+ 'text-surface-500': !selected,
79
+ 'dark:text-surface-400': !selected,
80
+ 'text-inherit': selected
81
+ }"
82
+ >{{ option.category }}</span
83
+ >
84
+ </div>
85
+ <span class="font-bold sm:ml-8">{{ '$' + option.price }}</span>
86
+ </div>
87
+ </ng-template>
88
+ </p-orderlist>
89
+ </div>
90
+ `,
91
+ standalone: true,
92
+ imports: [OrderListModule],
93
+ providers: [ProductService]
94
+ })
95
+ export class OrderlistDragdropDemo implements OnInit {
96
+ private productService = inject(ProductService);
97
+ products = signal<Product[]>([]);
98
+
99
+ ngOnInit() {
100
+ this.productService.getProductsSmall().then((cars) => {
101
+ this.products.set(cars);
102
+ });
103
+ }
104
+
105
+ getSeverity(status: string) {
106
+ switch (status) {
107
+ case 'INSTOCK':
108
+ return 'success';
109
+ case 'LOWSTOCK':
110
+ return 'warning';
111
+ case 'OUTOFSTOCK':
112
+ return 'danger';
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ ## Filter
119
+
120
+ Filter value is checked against the property of an object configured with the filterBy property
121
+
122
+ ```typescript
123
+ import { Component, OnInit, inject, signal } from '@angular/core';
124
+ import { OrderListModule } from '@exhaustive-ui/core/orderlist';
125
+ import { ProductService } from '@/service/productservice';
126
+ import { Product } from '@/domain/product';
127
+
128
+ @Component({
129
+ template: `
130
+ <div class="card sm:flex sm:justify-center">
131
+ <p-orderlist [value]="products()" filterBy="name" filterPlaceholder="Filter by name" [responsive]="true" breakpoint="575px" scrollHeight="20rem" class="sm:min-w-96">
132
+ <ng-template let-option let-selected="selected" #item>
133
+ <div class="flex flex-wrap p-1 items-center gap-4 w-full">
134
+ <img class="w-12 shrink-0 rounded" src="https://exhaustive-ui.e-xiste.com/demo/product/{{ option.image }}" [alt]="option.name" />
135
+ <div class="flex-1 flex flex-col">
136
+ <span class="font-medium text-sm">{{ option.name }}</span>
137
+ <span
138
+ [ngClass]="{
139
+ 'text-sm': true,
140
+ 'text-surface-500': !selected,
141
+ 'dark:text-surface-400': !selected,
142
+ 'text-inherit': selected
143
+ }"
144
+ >{{ option.category }}</span
145
+ >
146
+ </div>
147
+ <span class="font-bold sm:ml-8">{{ '$' + option.price }}</span>
148
+ </div>
149
+ </ng-template>
150
+ </p-orderlist>
151
+ </div>
152
+ `,
153
+ standalone: true,
154
+ imports: [OrderListModule],
155
+ providers: [ProductService]
156
+ })
157
+ export class OrderlistFilterDemo implements OnInit {
158
+ private productService = inject(ProductService);
159
+ products = signal<Product[]>([]);
160
+
161
+ ngOnInit() {
162
+ this.productService.getProductsSmall().then((cars) => {
163
+ this.products.set(cars);
164
+ });
165
+ }
166
+
167
+ getSeverity(status: string) {
168
+ switch (status) {
169
+ case 'INSTOCK':
170
+ return 'success';
171
+ case 'LOWSTOCK':
172
+ return 'warning';
173
+ case 'OUTOFSTOCK':
174
+ return 'danger';
175
+ }
176
+ }
177
+ }
178
+ ```
179
+
180
+ ## Template
181
+
182
+ For custom content support define an item template that gets the item instance as a parameter. In addition header template is provided for further customization.
183
+
184
+ ```typescript
185
+ import { Component, OnInit, inject, signal } from '@angular/core';
186
+ import { OrderListModule } from '@exhaustive-ui/core/orderlist';
187
+ import { ProductService } from '@/service/productservice';
188
+ import { Product } from '@/domain/product';
189
+
190
+ @Component({
191
+ template: `
192
+ <div class="card sm:flex sm:justify-center">
193
+ <p-orderlist [value]="products()" dataKey="id" [responsive]="true" breakpoint="575px" scrollHeight="20rem">
194
+ <ng-template let-option let-selected="selected" #item>
195
+ <div class="flex flex-wrap p-1 items-center gap-4 w-full">
196
+ <img class="w-12 shrink-0 rounded" src="https://exhaustive-ui.e-xiste.com/demo/product/{{ option.image }}" [alt]="option.name" />
197
+ <div class="flex-1 flex flex-col">
198
+ <span class="font-medium text-sm">{{ option.name }}</span>
199
+ <span
200
+ [ngClass]="{
201
+ 'text-sm': true,
202
+ 'text-surface-500': !selected,
203
+ 'dark:text-surface-400': !selected,
204
+ 'text-inherit': selected
205
+ }"
206
+ >{{ option.category }}</span
207
+ >
208
+ </div>
209
+ <span class="font-bold sm:ml-8">{{ '$' + option.price }}</span>
210
+ </div>
211
+ </ng-template>
212
+ </p-orderlist>
213
+ </div>
214
+ `,
215
+ standalone: true,
216
+ imports: [OrderListModule],
217
+ providers: [ProductService]
218
+ })
219
+ export class OrderlistTemplateDemo implements OnInit {
220
+ private productService = inject(ProductService);
221
+ products = signal<Product[]>([]);
222
+
223
+ ngOnInit() {
224
+ this.productService.getProductsSmall().then((cars) => {
225
+ this.products.set(cars);
226
+ });
227
+ }
228
+
229
+ getSeverity(status: string) {
230
+ switch (status) {
231
+ case 'INSTOCK':
232
+ return 'success';
233
+ case 'LOWSTOCK':
234
+ return 'warning';
235
+ case 'OUTOFSTOCK':
236
+ return 'danger';
237
+ }
238
+ }
239
+ }
240
+ ```
241
+
242
+ ## Order List
243
+
244
+ OrderList is used to manage the order of a collection.
245
+
246
+ ### Props
247
+
248
+ | Name | Type | Default | Description |
249
+ |------|------|---------|-------------|
250
+ | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
251
+ | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
252
+ | pt | InputSignal<OrderListPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
253
+ | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
254
+ | header | InputSignal<string> | ... | Text for the caption. |
255
+ | tabindex | InputSignalWithTransform<number, unknown> | ... | Index of the element in tabbing order. |
256
+ | ariaLabel | InputSignal<string> | ... | Defines a string that labels the input for accessibility. |
257
+ | ariaLabelledBy | InputSignal<string> | ... | Specifies one or more IDs in the DOM that labels the input field. |
258
+ | listStyle | InputSignal<{ [klass: string]: any }> | ... | Inline style of the list element. |
259
+ | responsive | InputSignalWithTransform<boolean, unknown> | ... | A boolean value that indicates whether the component should be responsive. |
260
+ | filterBy | InputSignal<string> | ... | When specified displays an input field to filter the items on keyup and decides which fields to search against. |
261
+ | filterPlaceholder | InputSignal<string> | ... | Placeholder of the filter input. |
262
+ | filterLocale | InputSignal<string> | ... | Locale to use in filtering. The default locale is the host environment's current locale. |
263
+ | metaKeySelection | InputSignalWithTransform<boolean, unknown> | ... | When true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically. |
264
+ | dragdrop | InputSignalWithTransform<boolean, unknown> | ... | Whether to enable dragdrop based reordering. |
265
+ | controlsPosition | InputSignal<"left" \| "right"> | ... | Defines the location of the buttons with respect to the list. |
266
+ | ariaFilterLabel | InputSignal<string> | ... | Defines a string that labels the filter input. |
267
+ | filterMatchMode | InputSignal<"gt" \| "lt" \| "in" \| "startsWith" \| "contains" \| "endsWith" \| "equals" \| "notEquals" \| "lte" \| "gte"> | ... | Defines how the items are filtered. |
268
+ | breakpoint | InputSignal<string> | ... | Indicates the width of the screen at which the component should change its behavior. |
269
+ | stripedRows | InputSignalWithTransform<boolean, unknown> | ... | Whether to displays rows with alternating colors. |
270
+ | disabled | InputSignalWithTransform<boolean, unknown> | ... | When present, it specifies that the component should be disabled. |
271
+ | trackBy | InputSignal<Function> | ... | Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity. |
272
+ | scrollHeight | InputSignal<string> | ... | Height of the viewport, a scrollbar is defined if height of list exceeds this value. |
273
+ | autoOptionFocus | InputSignalWithTransform<boolean, unknown> | ... | Whether to focus on the first visible or selected element. |
274
+ | dataKey | InputSignal<string> | ... | Name of the field that uniquely identifies the record in the data. |
275
+ | selection | ModelSignal<any[]> | ... | A list of values that are currently selected. Two-way bindable with `[(selection)]` : `selectionChange` is emitted with the new selection when it changes. |
276
+ | value | InputSignal<any[]> | ... | Array of values to be displayed in the component. It represents the data source for the list of items. |
277
+ | buttonProps | InputSignal<ButtonProps> | ... | Used to pass all properties of the ButtonProps to the Button component. |
278
+ | moveUpButtonProps | InputSignal<ButtonProps> | ... | Used to pass all properties of the ButtonProps to the move up button inside the component. |
279
+ | moveTopButtonProps | InputSignal<ButtonProps> | ... | Used to pass all properties of the ButtonProps to the move top button inside the component. |
280
+ | moveDownButtonProps | InputSignal<ButtonProps> | ... | Used to pass all properties of the ButtonProps to the move down button inside the component. |
281
+ | moveBottomButtonProps | InputSignal<ButtonProps> | ... | Used to pass all properties of the ButtonProps to the move bottom button inside the component. |
282
+
283
+ ### Emits
284
+
285
+ | Name | Parameters | Description |
286
+ |------|------------|-------------|
287
+ | onReorder | value: any | Callback to invoke when list is reordered. |
288
+ | onSelectionChange | event: OrderListSelectionChangeEvent | Callback to invoke when selection changes. |
289
+ | onFilterEvent | event: OrderListFilterEvent | Callback to invoke when filtering occurs. |
290
+ | onFocus | event: Event | Callback to invoke when the list is focused |
291
+ | onBlur | event: Event | Callback to invoke when the list is blurred |
292
+
293
+ ### Templates
294
+
295
+ | Name | Type | Description |
296
+ |------|------|-------------|
297
+ | item | TemplateRef<OrderListItemTemplateContext> | Custom item template. |
298
+ | emptymessage | TemplateRef<void> | Custom empty template. |
299
+ | emptyfiltermessage | TemplateRef<void> | Custom empty filter template. |
300
+ | filter | TemplateRef<OrderListFilterTemplateContext> | Custom filter template. |
301
+ | header | TemplateRef<void> | Custom header template. |
302
+ | moveupicon | TemplateRef<void> | Custom move up icon template. |
303
+ | movetopicon | TemplateRef<void> | Custom move top icon template. |
304
+ | movedownicon | TemplateRef<void> | Custom move down icon template. |
305
+ | movebottomicon | TemplateRef<void> | Custom move bottom icon template. |
306
+ | filtericon | TemplateRef<void> | Custom filter icon template. |
307
+
308
+ ### Methods
309
+
310
+ | Name | Parameters | Return Type | Description |
311
+ |------|------------|-------------|-------------|
312
+ | resetFilter | | void | Callback to invoke on filter reset. |
313
+
314
+ ## Pass Through Options
315
+
316
+ | Name | Type | Description |
317
+ |------|------|-------------|
318
+ | host | PassThroughOption<HTMLElement, I> | Used to pass attributes to the host's DOM element. |
319
+ | root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
320
+ | controls | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the controls container's DOM element. |
321
+ | pcMoveUpButton | ButtonPassThrough | Used to pass attributes to the move up button's DOM element. |
322
+ | pcMoveTopButton | ButtonPassThrough | Used to pass attributes to the move top button's DOM element. |
323
+ | pcMoveDownButton | ButtonPassThrough | Used to pass attributes to the move down button's DOM element. |
324
+ | pcMoveBottomButton | ButtonPassThrough | Used to pass attributes to the move bottom button's DOM element. |
325
+ | pcListbox | ListBoxPassThrough | Used to pass attributes to the Listbox component. |
326
+
327
+ ## Theming
328
+
329
+ ### CSS Classes
330
+
331
+ | Class | Description |
332
+ |-------|-------------|
333
+ | p-orderlist | Class name of the root element |
334
+ | p-orderlist-controls | Class name of the controls element |
335
+
336
+ ### Design Tokens
337
+
338
+ | Token | CSS Variable | Description |
339
+ |-------|--------------|-------------|
340
+ | orderlist.gap | --p-orderlist-gap | Gap of root |
341
+ | orderlist.controls.gap | --p-orderlist-controls-gap | Gap of controls |
342
+
@@ -0,0 +1,197 @@
1
+ # Angular Organization Chart Component
2
+
3
+ OrganizationChart visualizes hierarchical organization data.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader Component currently uses a table based implementation and does not provide high level of screen reader support, a nested list implementation replacement is planned with aria roles and attributes aligned to a tree widget for high level of reader support in the upcoming versions. Keyboard Support Key Function tab Moves focus through the focusable elements within the chart. enter Toggles the expanded state of a node. space Toggles the expanded state of a node.
8
+
9
+ ## Basic
10
+
11
+ OrganizationChart requires a collection of TreeNode instances as a value .
12
+
13
+ ```typescript
14
+ import { Component } from '@angular/core';
15
+ import { TreeNode } from '@exhaustive-ui/core/api';
16
+
17
+ @Component({
18
+ template: `
19
+ <div class="card flex justify-center overflow-x-auto">
20
+ <p-organization-chart [value]="data" />
21
+ </div>
22
+ `,
23
+ standalone: true,
24
+ imports: []
25
+ })
26
+ export class OrganizationchartBasicDemo {
27
+ data: TreeNode[];
28
+ }
29
+ ```
30
+
31
+ ## colored.-doc
32
+
33
+ ```typescript
34
+ import { Component } from '@angular/core';
35
+ import { TreeNode } from '@exhaustive-ui/core/api';
36
+
37
+ @Component({
38
+ template: `
39
+ <app-docsectiontext>
40
+ <p>Styling a specific node is configured with <i>class</i> and <i>style</i> options of a TreeNode.</p></app-docsectiontext
41
+ >
42
+ <div class="card overflow-x-auto">
43
+ <p-organization-chart [value]="data" [collapsible]="true">
44
+ <ng-template let-node pTemplate="person">
45
+ <div class="flex flex-col">
46
+ <div class="flex flex-col items-center">
47
+ <img [src]="node.data.image" class="mb-4 w-12 h-12" />
48
+ <span class="font-bold mb-2">{{ node.data.name }}</span>
49
+ <span>{{ node.data.title }}</span>
50
+ </div>
51
+ </div>
52
+ </ng-template>
53
+ </p-organization-chart>
54
+ </div>
55
+ `,
56
+ standalone: true,
57
+ imports: []
58
+ })
59
+ export class OrganizationchartColored.Demo {
60
+ data: TreeNode[];
61
+ }
62
+ ```
63
+
64
+ ## Selection
65
+
66
+ ```typescript
67
+ import { Component } from '@angular/core';
68
+ import { TreeNode } from '@exhaustive-ui/core/api';
69
+
70
+ @Component({
71
+ template: `
72
+ <app-docsectiontext>
73
+ <p>
74
+ Nodes can be selected by defining <i>selectionMode</i> along with a value binding with <i>selection</i> properties. By default only one node can be selected, set <i>selectionMode</i> as <i>multiple</i> to select more than one.
75
+ </p></app-docsectiontext
76
+ >
77
+ <div class="card flex justify-center overflow-x-auto">
78
+ <p-organization-chart [value]="data" selectionMode="multiple" [(selection)]="selectedNodes" [collapsible]="true">
79
+ <ng-template let-node pTemplate="person">
80
+ <div class="flex flex-col">
81
+ <div class="flex flex-col items-center">
82
+ <img [src]="node.data.image" class="mb-4 w-12 h-12" />
83
+ <div class="font-bold mb-2">{{ node.data.name }}</div>
84
+ <div>{{ node.data.title }}</div>
85
+ </div>
86
+ </div>
87
+ </ng-template>
88
+ </p-organization-chart>
89
+ </div>
90
+ `,
91
+ standalone: true,
92
+ imports: []
93
+ })
94
+ export class OrganizationchartSelectionDemo {
95
+ selectedNodes!: TreeNode[];
96
+ data: TreeNode[];
97
+ }
98
+ ```
99
+
100
+ ## Template
101
+
102
+ Custom content instead of a node label is defined using the pTemplate property.
103
+
104
+ ```typescript
105
+ import { Component } from '@angular/core';
106
+ import { TreeNode } from '@exhaustive-ui/core/api';
107
+
108
+ @Component({
109
+ template: `
110
+ <div class="card overflow-x-auto">
111
+ <p-organization-chart [value]="data" [collapsible]="true">
112
+ <ng-template let-node pTemplate="default">
113
+ <div class="flex flex-col items-center">
114
+ <img src="https://exhaustive-ui.e-xiste.com/demo/flag/flag_placeholder.png" [alt]="node.label" [class]="'flag' + ' flag-' + node.data" width="32" />
115
+ <div class="mt-4 font-medium text-lg">{{ node.label }}</div>
116
+ </div>
117
+ </ng-template>
118
+ </p-organization-chart>
119
+ </div>
120
+ `,
121
+ standalone: true,
122
+ imports: []
123
+ })
124
+ export class OrganizationchartTemplateDemo {
125
+ data: TreeNode[];
126
+ }
127
+ ```
128
+
129
+ ## Pass Through Options
130
+
131
+ | Name | Type | Description |
132
+ |------|------|-------------|
133
+ | root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
134
+ | table | PassThroughOption<HTMLTableElement, I> | Used to pass attributes to the table's DOM element. |
135
+ | body | PassThroughOption<HTMLTableSectionElement, I> | Used to pass attributes to the body's DOM element. |
136
+ | row | PassThroughOption<HTMLTableRowElement, I> | Used to pass attributes to the row's DOM element. |
137
+ | cell | PassThroughOption<HTMLTableCellElement, I> | Used to pass attributes to the cell's DOM element. |
138
+ | node | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the node's DOM element. |
139
+ | nodeToggleButton | PassThroughOption<HTMLAnchorElement, I> | Used to pass attributes to the node toggle button's DOM element. |
140
+ | nodeToggleButtonIcon | PassThroughOption<HTMLElement, I> | Used to pass attributes to the node toggle button icon's DOM element. |
141
+ | connectors | PassThroughOption<HTMLTableRowElement, I> | Used to pass attributes to the connectors' DOM element. |
142
+ | lineCell | PassThroughOption<HTMLTableCellElement, I> | Used to pass attributes to the line cell's DOM element. |
143
+ | connectorDown | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the connector down's DOM element. |
144
+ | connectorLeft | PassThroughOption<HTMLTableCellElement, I> | Used to pass attributes to the connector left's DOM element. |
145
+ | connectorRight | PassThroughOption<HTMLTableCellElement, I> | Used to pass attributes to the connector right's DOM element. |
146
+ | nodeChildren | PassThroughOption<HTMLTableRowElement, I> | Used to pass attributes to the node children's DOM element. |
147
+ | nodeCell | PassThroughOption<HTMLTableCellElement, I> | Used to pass attributes to the node cell's DOM element. |
148
+
149
+ ## Theming
150
+
151
+ ### CSS Classes
152
+
153
+ | Class | Description |
154
+ |-------|-------------|
155
+ | p-organizationchart | Class name of the root element |
156
+ | p-organizationchart-table | Class name of the table element |
157
+ | p-organizationchart-node | Class name of the node element |
158
+ | p-organizationchart-node-toggle-button | Class name of the node toggle button element |
159
+ | p-organizationchart-node-toggle-button-icon | Class name of the node toggle button icon element |
160
+ | p-organizationchart-connectors | Class name of the connectors element |
161
+ | p-organizationchart-connector-down | Class name of the connector down element |
162
+ | p-organizationchart-connector-left | Class name of the connector left element |
163
+ | p-organizationchart-connector-right | Class name of the connector right element |
164
+ | p-organizationchart-node-children | Class name of the node children element |
165
+
166
+ ### Design Tokens
167
+
168
+ | Token | CSS Variable | Description |
169
+ |-------|--------------|-------------|
170
+ | organizationchart.gutter | --p-organizationchart-gutter | Gutter of root |
171
+ | organizationchart.transition.duration | --p-organizationchart-transition-duration | Transition duration of root |
172
+ | organizationchart.node.background | --p-organizationchart-node-background | Background of node |
173
+ | organizationchart.node.hover.background | --p-organizationchart-node-hover-background | Hover background of node |
174
+ | organizationchart.node.selected.background | --p-organizationchart-node-selected-background | Selected background of node |
175
+ | organizationchart.node.border.color | --p-organizationchart-node-border-color | Border color of node |
176
+ | organizationchart.node.color | --p-organizationchart-node-color | Color of node |
177
+ | organizationchart.node.selected.color | --p-organizationchart-node-selected-color | Selected color of node |
178
+ | organizationchart.node.hover.color | --p-organizationchart-node-hover-color | Hover color of node |
179
+ | organizationchart.node.padding | --p-organizationchart-node-padding | Padding of node |
180
+ | organizationchart.node.toggleable.padding | --p-organizationchart-node-toggleable-padding | Toggleable padding of node |
181
+ | organizationchart.node.border.radius | --p-organizationchart-node-border-radius | Border radius of node |
182
+ | organizationchart.node.toggle.button.background | --p-organizationchart-node-toggle-button-background | Background of node toggle button |
183
+ | organizationchart.node.toggle.button.hover.background | --p-organizationchart-node-toggle-button-hover-background | Hover background of node toggle button |
184
+ | organizationchart.node.toggle.button.border.color | --p-organizationchart-node-toggle-button-border-color | Border color of node toggle button |
185
+ | organizationchart.node.toggle.button.color | --p-organizationchart-node-toggle-button-color | Color of node toggle button |
186
+ | organizationchart.node.toggle.button.hover.color | --p-organizationchart-node-toggle-button-hover-color | Hover color of node toggle button |
187
+ | organizationchart.node.toggle.button.size | --p-organizationchart-node-toggle-button-size | Size of node toggle button |
188
+ | organizationchart.node.toggle.button.border.radius | --p-organizationchart-node-toggle-button-border-radius | Border radius of node toggle button |
189
+ | organizationchart.node.toggle.button.focus.ring.width | --p-organizationchart-node-toggle-button-focus-ring-width | Focus ring width of node toggle button |
190
+ | organizationchart.node.toggle.button.focus.ring.style | --p-organizationchart-node-toggle-button-focus-ring-style | Focus ring style of node toggle button |
191
+ | organizationchart.node.toggle.button.focus.ring.color | --p-organizationchart-node-toggle-button-focus-ring-color | Focus ring color of node toggle button |
192
+ | organizationchart.node.toggle.button.focus.ring.offset | --p-organizationchart-node-toggle-button-focus-ring-offset | Focus ring offset of node toggle button |
193
+ | organizationchart.node.toggle.button.focus.ring.shadow | --p-organizationchart-node-toggle-button-focus-ring-shadow | Focus ring shadow of node toggle button |
194
+ | organizationchart.connector.color | --p-organizationchart-connector-color | Color of connector |
195
+ | organizationchart.connector.border.radius | --p-organizationchart-connector-border-radius | Border radius of connector |
196
+ | organizationchart.connector.height | --p-organizationchart-connector-height | Height of connector |
197
+