@exhaustive-ui/mcp 22.4.0 → 22.5.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/README.md +13 -1
- package/data/cards/accordion.md +88 -0
- package/data/cards/animateonscroll.md +152 -0
- package/data/cards/autocomplete.md +104 -0
- package/data/cards/autofocus.md +34 -0
- package/data/cards/avatar.md +43 -0
- package/data/cards/badge.md +43 -0
- package/data/cards/blockui.md +51 -0
- package/data/cards/breadcrumb.md +54 -0
- package/data/cards/button.md +77 -0
- package/data/cards/card.md +48 -0
- package/data/cards/carousel.md +99 -0
- package/data/cards/cascadeselect.md +81 -0
- package/data/cards/chart.md +103 -0
- package/data/cards/checkbox.md +58 -0
- package/data/cards/chip.md +49 -0
- package/data/cards/classnames.md +73 -0
- package/data/cards/colorpicker.md +51 -0
- package/data/cards/confirmdialog.md +89 -0
- package/data/cards/confirmpopup.md +74 -0
- package/data/cards/contextmenu.md +66 -0
- package/data/cards/dataview.md +115 -0
- package/data/cards/datepicker.md +102 -0
- package/data/cards/dialog.md +89 -0
- package/data/cards/divider.md +54 -0
- package/data/cards/dock.md +85 -0
- package/data/cards/dragdrop.md +102 -0
- package/data/cards/drawer.md +62 -0
- package/data/cards/dynamicdialog.md +76 -0
- package/data/cards/editor.md +55 -0
- package/data/cards/fieldset.md +53 -0
- package/data/cards/fileinput.md +72 -0
- package/data/cards/fileupload.md +89 -0
- package/data/cards/floatlabel.md +41 -0
- package/data/cards/fluid.md +47 -0
- package/data/cards/focustrap.md +60 -0
- package/data/cards/galleria.md +101 -0
- package/data/cards/iconfield.md +44 -0
- package/data/cards/iftalabel.md +38 -0
- package/data/cards/image.md +56 -0
- package/data/cards/imagecompare.md +44 -0
- package/data/cards/inplace.md +55 -0
- package/data/cards/inputgroup.md +66 -0
- package/data/cards/inputmask.md +71 -0
- package/data/cards/inputnumber.md +77 -0
- package/data/cards/inputotp.md +60 -0
- package/data/cards/inputtext.md +41 -0
- package/data/cards/keyfilter.md +48 -0
- package/data/cards/knob.md +54 -0
- package/data/cards/listbox.md +103 -0
- package/data/cards/megamenu.md +97 -0
- package/data/cards/menu.md +68 -0
- package/data/cards/menubar.md +106 -0
- package/data/cards/message.md +50 -0
- package/data/cards/metergroup.md +57 -0
- package/data/cards/multiselect.md +119 -0
- package/data/cards/orderlist.md +94 -0
- package/data/cards/organizationchart.md +57 -0
- package/data/cards/overlay.md +62 -0
- package/data/cards/paginator.md +61 -0
- package/data/cards/panel.md +56 -0
- package/data/cards/panelmenu.md +103 -0
- package/data/cards/password.md +78 -0
- package/data/cards/picklist.md +102 -0
- package/data/cards/popover.md +52 -0
- package/data/cards/progressbar.md +41 -0
- package/data/cards/progressspinner.md +37 -0
- package/data/cards/radiobutton.md +51 -0
- package/data/cards/rating.md +56 -0
- package/data/cards/ripple.md +36 -0
- package/data/cards/scroller.md +32 -0
- package/data/cards/scrollpanel.md +49 -0
- package/data/cards/scrolltop.md +46 -0
- package/data/cards/select.md +107 -0
- package/data/cards/selectbutton.md +60 -0
- package/data/cards/skeleton.md +53 -0
- package/data/cards/slider.md +51 -0
- package/data/cards/speeddial.md +99 -0
- package/data/cards/splitbutton.md +93 -0
- package/data/cards/splitter.md +51 -0
- package/data/cards/stepper.md +120 -0
- package/data/cards/styleclass.md +44 -0
- package/data/cards/table.md +270 -0
- package/data/cards/tabs.md +96 -0
- package/data/cards/tag.md +40 -0
- package/data/cards/terminal.md +67 -0
- package/data/cards/textarea.md +44 -0
- package/data/cards/tieredmenu.md +126 -0
- package/data/cards/timeline.md +58 -0
- package/data/cards/toast.md +59 -0
- package/data/cards/togglebutton.md +59 -0
- package/data/cards/toggleswitch.md +51 -0
- package/data/cards/toolbar.md +74 -0
- package/data/cards/tooltip.md +42 -0
- package/data/cards/tree.md +96 -0
- package/data/cards/treeselect.md +99 -0
- package/data/cards/treetable.md +210 -0
- package/data/components/checkbox.md +0 -24
- package/data/components/dock.md +2 -2
- package/data/components/galleria.md +7 -7
- package/data/components/inputnumber.md +2 -2
- package/data/components/llms.md +4 -0
- package/data/components/password.md +3 -3
- package/data/components/picklist.md +1 -1
- package/data/components/table.md +1 -1
- package/data/components.json +26 -22
- package/data/llms-full.txt +49 -42
- package/data/llms.txt +100 -96
- package/data/manifest.json +30 -1
- package/data/pages/llms.md +29 -0
- package/data/snapshot.json +2 -2
- package/dist/index.d.mts +35 -2
- package/dist/index.mjs +1393 -1077
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/data/components.json
CHANGED
|
@@ -6304,14 +6304,6 @@
|
|
|
6304
6304
|
"typescript": "import { Component } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CheckboxModule } from '@exhaustive-ui/core/checkbox';\n\n@Component({\n template: `\n <div class=\"card flex justify-center\">\n <p-checkbox [(ngModel)]=\"checked\" [binary]=\"true\" [invalid]=\"!checked\" />\n </div>\n `,\n standalone: true,\n imports: [CheckboxModule, FormsModule]\n})\nexport class CheckboxInvalidDemo {\n checked: boolean = false;\n}"
|
|
6305
6305
|
}
|
|
6306
6306
|
},
|
|
6307
|
-
{
|
|
6308
|
-
"id": "label",
|
|
6309
|
-
"label": "label-doc",
|
|
6310
|
-
"description": "The label attribute provides a label text for the checkbox. This label is also clickable and toggles the checked state.",
|
|
6311
|
-
"examples": {
|
|
6312
|
-
"typescript": "import { Component } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CheckboxModule } from '@exhaustive-ui/core/checkbox';\n\n@Component({\n template: `\n <div class=\"card flex justify-center gap-4\">\n <p-checkbox name=\"groupname\" value=\"val1\" label=\"Value 1\" [(ngModel)]=\"selectedValues\"></p-checkbox>\n <p-checkbox name=\"groupname\" value=\"val2\" label=\"Value 2\" [(ngModel)]=\"selectedValues\"></p-checkbox>\n </div>\n `,\n standalone: true,\n imports: [CheckboxModule, FormsModule]\n})\nexport class CheckboxLabelDemo {\n selectedValues: string[] = [];\n}"
|
|
6313
|
-
}
|
|
6314
|
-
},
|
|
6315
6307
|
{
|
|
6316
6308
|
"id": "multiple",
|
|
6317
6309
|
"label": "multiple-doc",
|
|
@@ -12013,7 +12005,7 @@
|
|
|
12013
12005
|
"label": "Advanced",
|
|
12014
12006
|
"description": "A mock desktop UI implemented with various components in addition to Dock.",
|
|
12015
12007
|
"examples": {
|
|
12016
|
-
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { DialogModule } from '@exhaustive-ui/core/dialog';\nimport { DockModule } from '@exhaustive-ui/core/dock';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { MenubarModule } from '@exhaustive-ui/core/menubar';\nimport { TerminalModule } from '@exhaustive-ui/core/terminal';\nimport { ToastModule } from '@exhaustive-ui/core/toast';\nimport { TreeModule } from '@exhaustive-ui/core/tree';\nimport { TooltipModule } from '@exhaustive-ui/core/tooltip';\nimport { NodeService } from '@/service/nodeservice';\nimport { PhotoService } from '@/service/photoservice';\nimport { MenuItem, MessageService } from '@exhaustive-ui/core/api';\n\n@Component({\n template: `\n <div class=\"card dock-demo\">\n <p-menubar [model]=\"menubarItems\">\n <ng-template #start>\n <i class=\"pi pi-apple px-2\"></i>\n </ng-template>\n <ng-template #end>\n <i class=\"pi pi-video px-2\"></i>\n <i class=\"pi pi-wifi px-2\"></i>\n <i class=\"pi pi-volume-up px-2\"></i>\n <span class=\"px-2\">Fri 13:07</span>\n <i class=\"pi pi-search px-2\"></i>\n <i class=\"pi pi-bars px-2\"></i>\n </ng-template>\n </p-menubar>\n <div class=\"dock-window\">\n <p-dock [model]=\"dockItems\" position=\"bottom\">\n <ng-template #item let-item>\n <a [pTooltip]=\"item.label\" tooltipPosition=\"top\" class=\"p-dock-item-link\">\n <img [alt]=\"item.label\" [src]=\"item.icon\" style=\"width: 100%\" />\n </a>\n </ng-template>\n </p-dock>\n <p-toast position=\"top-center\" key=\"tc\" />\n <p-dialog [(visible)]=\"displayFinder\" [breakpoints]=\"{ '960px': '50vw' }\" [style]=\"{ width: '30vw', height: '18rem' }\" [draggable]=\"false\" [resizable]=\"false\" header=\"Finder\">\n <p-tree [value]=\"nodes\" />\n </p-dialog>\n <p-dialog [maximizable]=\"true\" [(visible)]=\"displayTerminal\" [breakpoints]=\"{ '960px': '50vw' }\" [style]=\"{ width: '30vw' }\" [draggable]=\"false\" [resizable]=\"false\" header=\"Terminal\">\n <p-terminal welcomeMessage=\"Welcome to ExhaustiveUI (cmd: 'date', 'greet {0}', 'random')\" prompt=\"exhaustive $\" />\n </p-dialog>\n <p-galleria\n [(value)]=\"images\"\n [showThumbnails]=\"false\"\n [showThumbnailNavigators]=\"false\"\n [showItemNavigators]=\"true\"\n [(visible)]=\"displayGalleria\"\n [circular]=\"true\"\n [responsiveOptions]=\"responsiveOptions\"\n [circular]=\"true\"\n [fullScreen]=\"true\"\n [containerStyle]=\"{ width: '400px' }\"\n >\n <ng-template #item let-item>\n <img [src]=\"item.itemImageSrc\" style=\"width: 100%; display: block;\" />\n </ng-template>\n </p-galleria>\n </div>\n </div>\n `,\n standalone: true,\n imports: [DialogModule, DockModule, GalleriaModule, MenubarModule, TerminalModule, ToastModule, TreeModule, TooltipModule],\n providers: [NodeService, PhotoService, MessageService]\n})\nexport class DockAdvancedDemo implements OnInit {\n private nodeService = inject(NodeService);\n private photoService = inject(PhotoService);\n private messageService = inject(MessageService);\n displayTerminal: boolean | undefined;\n displayFinder: boolean | undefined;\n displayGalleria: boolean | undefined;\n dockItems: MenuItem[] | undefined;\n menubarItems: any[] | undefined;\n responsiveOptions: any[] | undefined;\n images: any[] | undefined;\n nodes: any[] | undefined;\n subscription: Subscription | undefined;\n\n ngOnInit() {\n this.dockItems = [\n {\n label: 'Finder',\n tooltipOptions: {\n tooltipLabel: 'Finder',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/finder.svg',\n command: () => {\n this.displayFinder = true;\n }\n },\n {\n label: 'Terminal',\n tooltipOptions: {\n tooltipLabel: 'Terminal',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/terminal.svg',\n command: () => {\n this.displayTerminal = true;\n }\n },\n {\n label: 'App Store',\n tooltipOptions: {\n tooltipLabel: 'App Store',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/appstore.svg',\n url: 'https://www.apple.com/app-store/'\n },\n {\n label: 'Safari',\n tooltipOptions: {\n tooltipLabel: 'Safari',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/safari.svg'\n },\n {\n label: 'Photos',\n tooltipOptions: {\n tooltipLabel: 'Photos',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/photos.svg',\n command: () => {\n this.displayGalleria = true;\n }\n },\n {\n label: 'GitHub',\n tooltipOptions: {\n tooltipLabel: 'GitHub',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/github.svg',\n url: 'https://github.com/e-xiste/exhaustive-ui'\n },\n {\n label: 'Trash',\n tooltipOptions: {\n tooltipLabel: 'Trash',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/trash.png',\n command: () => {\n this.messageService.add({ severity: 'info', summary: 'Trash is empty', key: 'tc' });\n }\n }\n ];\n this.menubarItems = [\n {\n label: 'Finder',\n styleClass: 'menubar-root'\n },\n {\n label: 'File',\n items: [\n {\n label: 'New',\n icon: 'pi pi-fw pi-plus',\n items: [\n {\n label: 'Bookmark',\n icon: 'pi pi-fw pi-bookmark'\n },\n {\n label: 'Video',\n icon: 'pi pi-fw pi-video'\n }\n ]\n },\n {\n label: 'Delete',\n icon: 'pi pi-fw pi-trash'\n },\n {\n separator: true\n },\n {\n label: 'Export',\n icon: 'pi pi-fw pi-external-link'\n }\n ]\n },\n {\n label: 'Edit',\n items: [\n {\n label: 'Left',\n icon: 'pi pi-fw pi-align-left'\n },\n {\n label: 'Right',\n icon: 'pi pi-fw pi-align-right'\n },\n {\n label: 'Center',\n icon: 'pi pi-fw pi-align-center'\n },\n {\n label: 'Justify',\n icon: 'pi pi-fw pi-align-justify'\n }\n ]\n },\n {\n label: 'Users',\n items: [\n {\n label: 'New',\n icon: 'pi pi-fw pi-user-plus'\n },\n {\n label: 'Delete',\n icon: 'pi pi-fw pi-user-minus'\n },\n {\n label: 'Search',\n icon: 'pi pi-fw pi-users',\n items: [\n {\n label: 'Filter',\n icon: 'pi pi-fw pi-filter',\n items: [\n {\n label: 'Print',\n icon: 'pi pi-fw pi-print'\n }\n ]\n },\n {\n icon: 'pi pi-fw pi-bars',\n label: 'List'\n }\n ]\n }\n ]\n },\n {\n label: 'Events',\n items: [\n {\n label: 'Edit',\n icon: 'pi pi-fw pi-pencil',\n items: [\n {\n label: 'Save',\n icon: 'pi pi-fw pi-calendar-plus'\n },\n {\n label: 'Delete',\n icon: 'pi pi-fw pi-calendar-minus'\n }\n ]\n },\n {\n label: 'Archieve',\n icon: 'pi pi-fw pi-calendar-times',\n items: [\n {\n label: 'Remove',\n icon: 'pi pi-fw pi-calendar-minus'\n }\n ]\n }\n ]\n },\n {\n label: 'Quit'\n }\n ];\n this.responsiveOptions = [\n {\n breakpoint: '1024px',\n numVisible: 3\n },\n {\n breakpoint: '768px',\n numVisible: 2\n },\n {\n breakpoint: '560px',\n numVisible: 1\n }\n ];\n this.subscription = this.terminalService.commandHandler.subscribe((command) => this.commandHandler(command));\n this.galleriaService.getImages().then((data) => (this.images = data));\n this.nodeService.getFiles().then((data) => (this.nodes = data));\n }\n\n commandHandler(text: any) {\n let response;\n let argsIndex = text.indexOf(' ');\n let command = argsIndex !== -1 ? text.substring(0, argsIndex) : text;\n \n switch (command) {\n case 'date':\n response = 'Today is ' + new Date().toDateString();\n break;\n \n case 'greet':\n response = 'Hola ' + text.substring(argsIndex + 1) + '!';\n break;\n \n case 'random':\n response = Math.floor(Math.random() * 100);\n break;\n \n default:\n response = 'Unknown command: ' + command;\n break;\n }\n \n if (response) {\n this.terminalService.sendResponse(response as string);\n }\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n}"
|
|
12008
|
+
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { DialogModule } from '@exhaustive-ui/core/dialog';\nimport { DockModule } from '@exhaustive-ui/core/dock';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { MenubarModule } from '@exhaustive-ui/core/menubar';\nimport { TerminalModule } from '@exhaustive-ui/core/terminal';\nimport { ToastModule } from '@exhaustive-ui/core/toast';\nimport { TreeModule } from '@exhaustive-ui/core/tree';\nimport { TooltipModule } from '@exhaustive-ui/core/tooltip';\nimport { NodeService } from '@/service/nodeservice';\nimport { PhotoService } from '@/service/photoservice';\nimport { MenuItem, MessageService } from '@exhaustive-ui/core/api';\n\n@Component({\n template: `\n <div class=\"card dock-demo\">\n <p-menubar [model]=\"menubarItems\">\n <ng-template #start>\n <i class=\"pi pi-apple px-2\"></i>\n </ng-template>\n <ng-template #end>\n <i class=\"pi pi-video px-2\"></i>\n <i class=\"pi pi-wifi px-2\"></i>\n <i class=\"pi pi-volume-up px-2\"></i>\n <span class=\"px-2\">Fri 13:07</span>\n <i class=\"pi pi-search px-2\"></i>\n <i class=\"pi pi-bars px-2\"></i>\n </ng-template>\n </p-menubar>\n <div class=\"dock-window\">\n <p-dock [model]=\"dockItems\" position=\"bottom\">\n <ng-template #item let-item>\n <a [pTooltip]=\"item.label\" tooltipPosition=\"top\" class=\"p-dock-item-link\">\n <img [alt]=\"item.label\" [src]=\"item.icon\" style=\"width: 100%\" />\n </a>\n </ng-template>\n </p-dock>\n <p-toast position=\"top-center\" key=\"tc\" />\n <p-dialog [(visible)]=\"displayFinder\" [breakpoints]=\"{ '960px': '50vw' }\" [style]=\"{ width: '30vw', height: '18rem' }\" [draggable]=\"false\" [resizable]=\"false\" header=\"Finder\">\n <p-tree [value]=\"nodes\" />\n </p-dialog>\n <p-dialog [maximizable]=\"true\" [(visible)]=\"displayTerminal\" [breakpoints]=\"{ '960px': '50vw' }\" [style]=\"{ width: '30vw' }\" [draggable]=\"false\" [resizable]=\"false\" header=\"Terminal\">\n <p-terminal welcomeMessage=\"Welcome to ExhaustiveUI (cmd: 'date', 'greet {0}', 'random')\" prompt=\"exhaustive $\" />\n </p-dialog>\n <p-galleria\n [value]=\"images\"\n [showThumbnails]=\"false\"\n [showThumbnailNavigators]=\"false\"\n [showItemNavigators]=\"true\"\n [(visible)]=\"displayGalleria\"\n [circular]=\"true\"\n [responsiveOptions]=\"responsiveOptions\"\n [circular]=\"true\"\n [fullScreen]=\"true\"\n [containerStyle]=\"{ width: '400px' }\"\n >\n <ng-template #item let-item>\n <img [src]=\"item.itemImageSrc\" style=\"width: 100%; display: block;\" />\n </ng-template>\n </p-galleria>\n </div>\n </div>\n `,\n standalone: true,\n imports: [DialogModule, DockModule, GalleriaModule, MenubarModule, TerminalModule, ToastModule, TreeModule, TooltipModule],\n providers: [NodeService, PhotoService, MessageService]\n})\nexport class DockAdvancedDemo implements OnInit {\n private nodeService = inject(NodeService);\n private photoService = inject(PhotoService);\n private messageService = inject(MessageService);\n displayTerminal: boolean | undefined;\n displayFinder: boolean | undefined;\n displayGalleria: boolean | undefined;\n dockItems: MenuItem[] | undefined;\n menubarItems: any[] | undefined;\n responsiveOptions: any[] | undefined;\n images: any[] | undefined;\n nodes: any[] | undefined;\n subscription: Subscription | undefined;\n\n ngOnInit() {\n this.dockItems = [\n {\n label: 'Finder',\n tooltipOptions: {\n tooltipLabel: 'Finder',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/finder.svg',\n command: () => {\n this.displayFinder = true;\n }\n },\n {\n label: 'Terminal',\n tooltipOptions: {\n tooltipLabel: 'Terminal',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/terminal.svg',\n command: () => {\n this.displayTerminal = true;\n }\n },\n {\n label: 'App Store',\n tooltipOptions: {\n tooltipLabel: 'App Store',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/appstore.svg',\n url: 'https://www.apple.com/app-store/'\n },\n {\n label: 'Safari',\n tooltipOptions: {\n tooltipLabel: 'Safari',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/safari.svg'\n },\n {\n label: 'Photos',\n tooltipOptions: {\n tooltipLabel: 'Photos',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/photos.svg',\n command: () => {\n this.displayGalleria = true;\n }\n },\n {\n label: 'GitHub',\n tooltipOptions: {\n tooltipLabel: 'GitHub',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/github.svg',\n url: 'https://github.com/e-xiste/exhaustive-ui'\n },\n {\n label: 'Trash',\n tooltipOptions: {\n tooltipLabel: 'Trash',\n tooltipPosition: 'top',\n positionTop: -15,\n positionLeft: 15,\n showDelay: 1000\n },\n icon: 'https://exhaustive-ui.com/demo/dock/trash.png',\n command: () => {\n this.messageService.add({ severity: 'info', summary: 'Trash is empty', key: 'tc' });\n }\n }\n ];\n this.menubarItems = [\n {\n label: 'Finder',\n styleClass: 'menubar-root'\n },\n {\n label: 'File',\n items: [\n {\n label: 'New',\n icon: 'pi pi-fw pi-plus',\n items: [\n {\n label: 'Bookmark',\n icon: 'pi pi-fw pi-bookmark'\n },\n {\n label: 'Video',\n icon: 'pi pi-fw pi-video'\n }\n ]\n },\n {\n label: 'Delete',\n icon: 'pi pi-fw pi-trash'\n },\n {\n separator: true\n },\n {\n label: 'Export',\n icon: 'pi pi-fw pi-external-link'\n }\n ]\n },\n {\n label: 'Edit',\n items: [\n {\n label: 'Left',\n icon: 'pi pi-fw pi-align-left'\n },\n {\n label: 'Right',\n icon: 'pi pi-fw pi-align-right'\n },\n {\n label: 'Center',\n icon: 'pi pi-fw pi-align-center'\n },\n {\n label: 'Justify',\n icon: 'pi pi-fw pi-align-justify'\n }\n ]\n },\n {\n label: 'Users',\n items: [\n {\n label: 'New',\n icon: 'pi pi-fw pi-user-plus'\n },\n {\n label: 'Delete',\n icon: 'pi pi-fw pi-user-minus'\n },\n {\n label: 'Search',\n icon: 'pi pi-fw pi-users',\n items: [\n {\n label: 'Filter',\n icon: 'pi pi-fw pi-filter',\n items: [\n {\n label: 'Print',\n icon: 'pi pi-fw pi-print'\n }\n ]\n },\n {\n icon: 'pi pi-fw pi-bars',\n label: 'List'\n }\n ]\n }\n ]\n },\n {\n label: 'Events',\n items: [\n {\n label: 'Edit',\n icon: 'pi pi-fw pi-pencil',\n items: [\n {\n label: 'Save',\n icon: 'pi pi-fw pi-calendar-plus'\n },\n {\n label: 'Delete',\n icon: 'pi pi-fw pi-calendar-minus'\n }\n ]\n },\n {\n label: 'Archieve',\n icon: 'pi pi-fw pi-calendar-times',\n items: [\n {\n label: 'Remove',\n icon: 'pi pi-fw pi-calendar-minus'\n }\n ]\n }\n ]\n },\n {\n label: 'Quit'\n }\n ];\n this.responsiveOptions = [\n {\n breakpoint: '1024px',\n numVisible: 3\n },\n {\n breakpoint: '768px',\n numVisible: 2\n },\n {\n breakpoint: '560px',\n numVisible: 1\n }\n ];\n this.subscription = this.terminalService.commandHandler.subscribe((command) => this.commandHandler(command));\n this.galleriaService.getImages().then((data) => (this.images = data));\n this.nodeService.getFiles().then((data) => (this.nodes = data));\n }\n\n commandHandler(text: any) {\n let response;\n let argsIndex = text.indexOf(' ');\n let command = argsIndex !== -1 ? text.substring(0, argsIndex) : text;\n \n switch (command) {\n case 'date':\n response = 'Today is ' + new Date().toDateString();\n break;\n \n case 'greet':\n response = 'Hola ' + text.substring(argsIndex + 1) + '!';\n break;\n \n case 'random':\n response = Math.floor(Math.random() * 100);\n break;\n \n default:\n response = 'Unknown command: ' + command;\n break;\n }\n \n if (response) {\n this.terminalService.sendResponse(response as string);\n }\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n}"
|
|
12017
12009
|
}
|
|
12018
12010
|
},
|
|
12019
12011
|
{
|
|
@@ -12021,7 +12013,7 @@
|
|
|
12021
12013
|
"label": "Basic",
|
|
12022
12014
|
"description": "Dock requires a collection of menuitems as its model . Default location is bottom and other sides are also available when defined with the position property. Content of the dock component is defined by item template.",
|
|
12023
12015
|
"examples": {
|
|
12024
|
-
"typescript": "import { Component, OnInit } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { DockModule } from '@exhaustive-ui/core/dock';\nimport { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';\nimport { TooltipModule } from '@exhaustive-ui/core/tooltip';\nimport { MenuItem } from '@exhaustive-ui/core/api';\n\n@Component({\n template: `\n <div class=\"card\">\n <div class=\"flex flex-wrap gap-4 mb-8\">\n <div *ngFor=\"let pos of positionOptions\" class=\"flex items-center\">\n <p-radio-button name=\"dock\" [value]=\"pos.value\" [
|
|
12016
|
+
"typescript": "import { Component, OnInit } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { DockModule } from '@exhaustive-ui/core/dock';\nimport { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';\nimport { TooltipModule } from '@exhaustive-ui/core/tooltip';\nimport { MenuItem } from '@exhaustive-ui/core/api';\n\n@Component({\n template: `\n <div class=\"card\">\n <div class=\"flex flex-wrap gap-4 mb-8\">\n <div *ngFor=\"let pos of positionOptions\" class=\"flex items-center\">\n <p-radio-button name=\"dock\" [value]=\"pos.value\" [(ngModel)]=\"position\" [inputId]=\"pos.label\" />\n <label [for]=\"pos.label\" class=\"ml-2\"> {{ pos.label }} </label>\n </div>\n </div>\n <div class=\"dock-window\">\n <p-dock [model]=\"items\" [position]=\"position\">\n <ng-template #item let-item>\n <img [pTooltip]=\"item.label\" tooltipPosition=\"top\" [src]=\"item.icon\" [alt]=\"item.label\" width=\"100%\" />\n </ng-template>\n </p-dock>\n </div>\n </div>\n `,\n standalone: true,\n imports: [DockModule, RadioButtonModule, TooltipModule, FormsModule]\n})\nexport class DockBasicDemo implements OnInit {\n items: MenuItem[] | undefined;\n positionOptions: any[];\n\n ngOnInit() {\n this.items = [\n {\n label: 'Finder',\n icon: 'https://exhaustive-ui.com/demo/dock/finder.svg'\n },\n {\n label: 'App Store',\n icon: 'https://exhaustive-ui.com/demo/dock/appstore.svg'\n },\n {\n label: 'Photos',\n icon: 'https://exhaustive-ui.com/demo/dock/photos.svg'\n },\n {\n label: 'Trash',\n icon: 'https://exhaustive-ui.com/demo/dock/trash.png'\n }\n ];\n }\n}"
|
|
12025
12017
|
}
|
|
12026
12018
|
}
|
|
12027
12019
|
],
|
|
@@ -15978,7 +15970,7 @@
|
|
|
15978
15970
|
"label": "Advanced",
|
|
15979
15971
|
"description": "Galleria can be extended further to implement complex requirements.",
|
|
15980
15972
|
"examples": {
|
|
15981
|
-
"typescript": "import { Component, OnInit, inject, signal } from '@angular/core';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { ButtonModule } from '@exhaustive-ui/core/button';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-galleria\n #galleria\n [
|
|
15973
|
+
"typescript": "import { Component, OnInit, inject, signal } from '@angular/core';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { ButtonModule } from '@exhaustive-ui/core/button';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-galleria\n #galleria\n [value]=\"images\"\n [(activeIndex)]=\"activeIndex\"\n [numVisible]=\"5\"\n [showThumbnails]=\"showThumbnails\"\n [showItemNavigators]=\"true\"\n [showItemNavigatorsOnHover]=\"true\"\n [circular]=\"true\"\n [autoPlay]=\"isAutoPlay\"\n [transitionInterval]=\"3000\"\n [containerStyle]=\"{ 'max-width': '640px' }\"\n [pt]=\"galleriaPT\"\n >\n <ng-template #item let-item>\n <img [src]=\"item.itemImageSrc\" [ngStyle]=\"{ width: !fullscreen ? '100%' : '', display: !fullscreen ? 'block' : '' }\" />\n </ng-template>\n <ng-template #thumbnail let-item>\n <div class=\"grid gap-4 justify-center\">\n <img [src]=\"item.thumbnailImageSrc\" style=\"display: block\" />\n </div>\n </ng-template>\n <ng-template #footer let-item>\n <div class=\"flex items-stretch gap-2 bg-surface-950 text-white h-10\">\n <button\n type=\"button\"\n pButton\n icon=\"pi pi-th-large\"\n (click)=\"onThumbnailButtonClick()\"\n class=\"bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3\"\n ></button>\n <button\n type=\"button\"\n pButton\n [icon]=\"slideButtonIcon()\"\n (click)=\"toggleAutoSlide()\"\n class=\"bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3\"\n ></button>\n <span *ngIf=\"images()\" class=\"flex items-center gap-4 ml-3\">\n <span class=\"text-sm\">{{ activeIndex + 1 }}/{{ images().length }}</span>\n <span class=\"font-bold text-sm\">{{ images()[activeIndex].title }}</span>\n <span class=\"text-sm\">{{ images()[activeIndex].alt }}</span>\n </span>\n <button\n type=\"button\"\n pButton\n [icon]=\"fullScreenIcon()\"\n (click)=\"toggleFullScreen()\"\n class=\"bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3 ml-auto\"\n ></button>\n </div>\n </ng-template>\n </p-galleria>\n </div>\n `,\n standalone: true,\n imports: [GalleriaModule, ButtonModule],\n providers: [PhotoService]\n})\nexport class GalleriaAdvancedDemo implements OnInit {\n private photoService = inject(PhotoService);\n images = signal<any[]>([]);\n showThumbnails: boolean = false;\n fullscreen: boolean = false;\n activeIndex: number = 0;\n isAutoPlay: boolean = true;\n onFullScreenListener: any;\n responsiveOptions: any[];\n\n ngOnInit() {\n this.photoService.getImages().then((images) => {\n this.images.set(images);\n });\n this.bindDocumentListeners();\n }\n\n onThumbnailButtonClick() {\n this.showThumbnails = !this.showThumbnails;\n }\n\n toggleAutoSlide() {\n this.isAutoPlay = !this.isAutoPlay;\n }\n\n toggleFullScreen() {\n if (this.fullscreen) {\n this.closePreviewFullScreen();\n } else {\n this.openPreviewFullScreen();\n }\n }\n\n openPreviewFullScreen() {\n let elem = this.galleria?.element.nativeElement.querySelector('.p-galleria');\n if (elem.requestFullscreen) {\n elem.requestFullscreen();\n } else if (elem['mozRequestFullScreen']) {\n /* Firefox */\n elem['mozRequestFullScreen']();\n } else if (elem['webkitRequestFullscreen']) {\n /* Chrome, Safari & Opera */\n elem['webkitRequestFullscreen']();\n } else if (elem['msRequestFullscreen']) {\n /* IE/Edge */\n elem['msRequestFullscreen']();\n }\n }\n\n onFullScreenChange() {\n this.fullscreen = !this.fullscreen;\n }\n\n closePreviewFullScreen() {\n if (isPlatformBrowser(this.platformId)) {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document['mozCancelFullScreen']) {\n document['mozCancelFullScreen']();\n } else if (document['webkitExitFullscreen']) {\n document['webkitExitFullscreen']();\n } else if (document['msExitFullscreen']) {\n document['msExitFullscreen']();\n }\n }\n }\n\n bindDocumentListeners() {\n if (isPlatformBrowser(this.platformId)) {\n this.onFullScreenListener = this.onFullScreenChange.bind(this);\n document.addEventListener('fullscreenchange', this.onFullScreenListener);\n document.addEventListener('mozfullscreenchange', this.onFullScreenListener);\n document.addEventListener('webkitfullscreenchange', this.onFullScreenListener);\n document.addEventListener('msfullscreenchange', this.onFullScreenListener);\n }\n }\n\n unbindDocumentListeners() {\n if (isPlatformBrowser(this.platformId)) {\n document.removeEventListener('fullscreenchange', this.onFullScreenListener);\n document.removeEventListener('mozfullscreenchange', this.onFullScreenListener);\n document.removeEventListener('webkitfullscreenchange', this.onFullScreenListener);\n document.removeEventListener('msfullscreenchange', this.onFullScreenListener);\n this.onFullScreenListener = null;\n }\n }\n\n ngOnDestroy() {\n this.unbindDocumentListeners();\n }\n\n slideButtonIcon() {\n return this.isAutoPlay ? 'pi pi-pause' : 'pi pi-play';\n }\n\n fullScreenIcon() {\n return `pi ${this.fullscreen ? 'pi-window-minimize' : 'pi-window-maximize'}`;\n }\n}"
|
|
15982
15974
|
}
|
|
15983
15975
|
},
|
|
15984
15976
|
{
|
|
@@ -15986,7 +15978,7 @@
|
|
|
15986
15978
|
"label": "AutoPlay",
|
|
15987
15979
|
"description": "A slideshow implementation is defined by adding circular and autoPlay properties.",
|
|
15988
15980
|
"examples": {
|
|
15989
|
-
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-galleria [
|
|
15981
|
+
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-galleria [value]=\"images\" [autoPlay]=\"true\" [circular]=\"true\" [responsiveOptions]=\"responsiveOptions\" [numVisible]=\"5\" [containerStyle]=\"{ 'max-width': '640px' }\">\n <ng-template #item let-item>\n <img [src]=\"item.itemImageSrc\" style=\"width: 100%; display: block\" />\n </ng-template>\n <ng-template #thumbnail let-item>\n <img [src]=\"item.thumbnailImageSrc\" style=\"display: block\" />\n </ng-template>\n </p-galleria>\n </div>\n `,\n standalone: true,\n imports: [GalleriaModule],\n providers: [PhotoService]\n})\nexport class GalleriaAutoplayDemo implements OnInit {\n private photoService = inject(PhotoService);\n images: any = model([]);\n responsiveOptions: any[];\n\n ngOnInit() {\n this.photoService.getImages().then((images) => this.images.set(images));\n }\n}"
|
|
15990
15982
|
}
|
|
15991
15983
|
},
|
|
15992
15984
|
{
|
|
@@ -15994,7 +15986,7 @@
|
|
|
15994
15986
|
"label": "Basic",
|
|
15995
15987
|
"description": "Galleria requires a value as a collection of images, item template for the higher resolution image and thumbnail template to display as a thumbnail.",
|
|
15996
15988
|
"examples": {
|
|
15997
|
-
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-galleria [
|
|
15989
|
+
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-galleria [value]=\"images\" [responsiveOptions]=\"responsiveOptions\" [containerStyle]=\"{ 'max-width': '640px' }\" [numVisible]=\"5\">\n <ng-template #item let-item>\n <img [src]=\"item.itemImageSrc\" style=\"width:100%\" />\n </ng-template>\n <ng-template #thumbnail let-item>\n <img [src]=\"item.thumbnailImageSrc\" />\n </ng-template>\n </p-galleria>\n </div>\n `,\n standalone: true,\n imports: [GalleriaModule],\n providers: [PhotoService]\n})\nexport class GalleriaBasicDemo implements OnInit {\n private photoService = inject(PhotoService);\n images: any = model([]);\n responsiveOptions: any[];\n\n ngOnInit() {\n this.photoService.getImages().then((images) => this.images.set(images));\n }\n}"
|
|
15998
15990
|
}
|
|
15999
15991
|
},
|
|
16000
15992
|
{
|
|
@@ -16002,7 +15994,7 @@
|
|
|
16002
15994
|
"label": "Caption",
|
|
16003
15995
|
"description": "Description of an image is specified with the caption template.",
|
|
16004
15996
|
"examples": {
|
|
16005
|
-
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-galleria [
|
|
15997
|
+
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-galleria [value]=\"images\" [responsiveOptions]=\"responsiveOptions\" [containerStyle]=\"{ 'max-width': '640px' }\" [numVisible]=\"5\">\n <ng-template #item let-item>\n <img [src]=\"item.itemImageSrc\" style=\"width: 100%; display: block;\" />\n </ng-template>\n <ng-template #thumbnail let-item>\n <img [src]=\"item.thumbnailImageSrc\" style=\"display: block;\" />\n </ng-template>\n <ng-template #caption let-item>\n <div class=\"text-xl mb-2 font-bold\">{{ item.title }}</div>\n <p class=\"text-white\">{{ item.alt }}</p>\n </ng-template>\n </p-galleria>\n </div>\n `,\n standalone: true,\n imports: [GalleriaModule],\n providers: [PhotoService]\n})\nexport class GalleriaCaptionDemo implements OnInit {\n private photoService = inject(PhotoService);\n images: any = model([]);\n responsiveOptions: any[];\n\n ngOnInit() {\n this.photoService.getImages().then((images) => this.images.set(images));\n }\n}"
|
|
16006
15998
|
}
|
|
16007
15999
|
},
|
|
16008
16000
|
{
|
|
@@ -16010,7 +16002,7 @@
|
|
|
16010
16002
|
"label": "Controlled",
|
|
16011
16003
|
"description": "Galleria can be controlled programmatically using the activeIndex property.",
|
|
16012
16004
|
"examples": {
|
|
16013
|
-
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { ButtonModule } from '@exhaustive-ui/core/button';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <div class=\"mb-4\">\n <p-button type=\"button\" icon=\"pi pi-minus\" (click)=\"prev()\" />\n <p-button type=\"button\" icon=\"pi pi-plus\" (click)=\"next()\" severity=\"secondary\" styleClass=\"ml-2\" />\n </div>\n <p-galleria [
|
|
16005
|
+
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { ButtonModule } from '@exhaustive-ui/core/button';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <div class=\"mb-4\">\n <p-button type=\"button\" icon=\"pi pi-minus\" (click)=\"prev()\" />\n <p-button type=\"button\" icon=\"pi pi-plus\" (click)=\"next()\" severity=\"secondary\" styleClass=\"ml-2\" />\n </div>\n <p-galleria [value]=\"images\" [responsiveOptions]=\"responsiveOptions\" [containerStyle]=\"{ 'max-width': '640px' }\" [numVisible]=\"5\" [(activeIndex)]=\"activeIndex\">\n <ng-template #item let-item>\n <img [src]=\"item.itemImageSrc\" style=\"width: 100%;\" />\n </ng-template>\n <ng-template #thumbnail let-item>\n <img [src]=\"item.thumbnailImageSrc\" />\n </ng-template>\n </p-galleria>\n </div>\n `,\n standalone: true,\n imports: [ButtonModule, GalleriaModule],\n providers: [PhotoService]\n})\nexport class GalleriaControlledDemo implements OnInit {\n private photoService = inject(PhotoService);\n images: any = model([]);\n _activeIndex: number = 2;\n responsiveOptions: any[];\n\n ngOnInit() {\n this.photoService.getImages().then((images) => this.images.set(images));\n }\n\n next() {\n this.activeIndex++;\n }\n\n prev() {\n this.activeIndex--;\n }\n}"
|
|
16014
16006
|
}
|
|
16015
16007
|
},
|
|
16016
16008
|
{
|
|
@@ -16018,7 +16010,7 @@
|
|
|
16018
16010
|
"label": "Responsive",
|
|
16019
16011
|
"description": "Galleria responsiveness is defined with the responsiveOptions property.",
|
|
16020
16012
|
"examples": {
|
|
16021
|
-
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-galleria [
|
|
16013
|
+
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-galleria [value]=\"images\" [responsiveOptions]=\"responsiveOptions\" [containerStyle]=\"{ 'max-width': '640px' }\" [numVisible]=\"7\" [circular]=\"true\">\n <ng-template #item let-item>\n <img [src]=\"item.itemImageSrc\" style=\"width: 100%; display: block;\" />\n </ng-template>\n <ng-template #thumbnail let-item>\n <img [src]=\"item.thumbnailImageSrc\" style=\"width: 100%; display: block;\" />\n </ng-template>\n </p-galleria>\n </div>\n `,\n standalone: true,\n imports: [GalleriaModule],\n providers: [PhotoService]\n})\nexport class GalleriaResponsiveDemo implements OnInit {\n private photoService = inject(PhotoService);\n images: any = model([]);\n responsiveOptions: any[];\n\n ngOnInit() {\n this.photoService.getImages().then((images) => this.images.set(images));\n }\n}"
|
|
16022
16014
|
}
|
|
16023
16015
|
},
|
|
16024
16016
|
{
|
|
@@ -16026,7 +16018,7 @@
|
|
|
16026
16018
|
"label": "Thumbnail",
|
|
16027
16019
|
"description": "Galleria can be controlled programmatically using the activeIndex property.",
|
|
16028
16020
|
"examples": {
|
|
16029
|
-
"typescript": "import { Component, OnInit, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <div class=\"flex flex-wrap gap-4 mb-8\">\n <div *ngFor=\"let option of positionOptions\" class=\"flex items-center\">\n <p-radio-button [name]=\"option.label\" [value]=\"option.value\" [
|
|
16021
|
+
"typescript": "import { Component, OnInit, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { GalleriaModule } from '@exhaustive-ui/core/galleria';\nimport { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';\nimport { PhotoService } from '@/service/photoservice';\n\n@Component({\n template: `\n <div class=\"card\">\n <div class=\"flex flex-wrap gap-4 mb-8\">\n <div *ngFor=\"let option of positionOptions\" class=\"flex items-center\">\n <p-radio-button [name]=\"option.label\" [value]=\"option.value\" [(ngModel)]=\"position\" [inputId]=\"option.label\" />\n <label [for]=\"option.label\" class=\"ml-2\"> {{ option.label }} </label>\n </div>\n </div>\n <p-galleria [value]=\"images()\" [thumbnailsPosition]=\"position\" [responsiveOptions]=\"responsiveOptions\" [containerStyle]=\"{ 'max-width': '640px' }\" [numVisible]=\"5\">\n <ng-template #item let-item>\n <img [src]=\"item.itemImageSrc\" style=\"width: 100%; display: block\" />\n </ng-template>\n <ng-template #thumbnail let-item>\n <div class=\"grid gap-4 justify-center\">\n <img [src]=\"item.thumbnailImageSrc\" style=\"width: 100%; display: block\" />\n </div>\n </ng-template>\n </p-galleria>\n </div>\n `,\n standalone: true,\n imports: [GalleriaModule, RadioButtonModule, FormsModule],\n providers: [PhotoService]\n})\nexport class GalleriaThumbnailDemo implements OnInit {\n private photoService = inject(PhotoService);\n images = signal<any[]>([]);\n positionOptions: any[];\n responsiveOptions: any[];\n\n ngOnInit() {\n this.photoService.getImages().then((images) => this.images.set(images));\n }\n}"
|
|
16030
16022
|
}
|
|
16031
16023
|
}
|
|
16032
16024
|
],
|
|
@@ -18860,7 +18852,7 @@
|
|
|
18860
18852
|
"label": "Buttons",
|
|
18861
18853
|
"description": "Spinner buttons are enabled using the showButtons options and layout is defined with the buttonLayout . Default value is \"stacked\" whereas \"horizontal\" and \"stacked\" are alternatives. Note that even there are no buttons, up and down arrow keys can be used to spin the values with keyboard.",
|
|
18862
18854
|
"examples": {
|
|
18863
|
-
"typescript": "import { Component } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { InputNumberModule } from '@exhaustive-ui/core/inputnumber';\n\n@Component({\n template: `\n <p-fluid class=\"card flex flex-wrap gap-4\">\n <div class=\"flex-auto\">\n <label class=\"mb-2 block font-bold\" for=\"stacked\">Stacked</label>\n <p-input-number [(ngModel)]=\"value1\" [showButtons]=\"true\" inputId=\"stacked\" mode=\"currency\" currency=\"USD\" />\n </div>\n <div class=\"flex-auto\">\n <label class=\"mb-2 block font-bold\" for=\"minmax-buttons\">Min-Max Boundaries</label>\n <p-input-number [(ngModel)]=\"value2\" mode=\"decimal\" [showButtons]=\"true\" inputId=\"minmax-buttons\" [min]=\"0\" [max]=\"100\" />\n </div>\n <div class=\"flex-auto\">\n <label class=\"mb-2 block font-bold\" for=\"horizontal\">Horizontal with Step</label>\n <p-input-number [(ngModel)]=\"value3\" [showButtons]=\"true\" buttonLayout=\"horizontal\" inputId=\"horizontal\"
|
|
18855
|
+
"typescript": "import { Component } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { InputNumberModule } from '@exhaustive-ui/core/inputnumber';\n\n@Component({\n template: `\n <p-fluid class=\"card flex flex-wrap gap-4\">\n <div class=\"flex-auto\">\n <label class=\"mb-2 block font-bold\" for=\"stacked\">Stacked</label>\n <p-input-number [(ngModel)]=\"value1\" [showButtons]=\"true\" inputId=\"stacked\" mode=\"currency\" currency=\"USD\" />\n </div>\n <div class=\"flex-auto\">\n <label class=\"mb-2 block font-bold\" for=\"minmax-buttons\">Min-Max Boundaries</label>\n <p-input-number [(ngModel)]=\"value2\" mode=\"decimal\" [showButtons]=\"true\" inputId=\"minmax-buttons\" [min]=\"0\" [max]=\"100\" />\n </div>\n <div class=\"flex-auto\">\n <label class=\"mb-2 block font-bold\" for=\"horizontal\">Horizontal with Step</label>\n <p-input-number [(ngModel)]=\"value3\" [showButtons]=\"true\" buttonLayout=\"horizontal\" inputId=\"horizontal\" [step]=\"0.25\" mode=\"currency\" currency=\"EUR\">\n <ng-template #incrementbuttonicon>\n <span class=\"pi pi-plus\"></span>\n </ng-template>\n <ng-template #decrementbuttonicon>\n <span class=\"pi pi-minus\"></span>\n </ng-template>\n </p-input-number>\n </div>\n </p-fluid>\n `,\n standalone: true,\n imports: [InputNumberModule, FormsModule]\n})\nexport class InputnumberButtonsDemo {\n value1: number = 20;\n value2: number = 10.5;\n value3: number = 25;\n}"
|
|
18864
18856
|
}
|
|
18865
18857
|
},
|
|
18866
18858
|
{
|
|
@@ -18988,7 +18980,7 @@
|
|
|
18988
18980
|
"label": "Vertical",
|
|
18989
18981
|
"description": "Buttons can also placed vertically by setting buttonLayout as vertical .",
|
|
18990
18982
|
"examples": {
|
|
18991
|
-
"typescript": "import { Component } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { InputNumberModule } from '@exhaustive-ui/core/inputnumber';\n\n@Component({\n template: `\n <div class=\"card flex justify-center\">\n <p-input-number [(ngModel)]=\"value1\" [showButtons]=\"true\" buttonLayout=\"vertical\"
|
|
18983
|
+
"typescript": "import { Component } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { InputNumberModule } from '@exhaustive-ui/core/inputnumber';\n\n@Component({\n template: `\n <div class=\"card flex justify-center\">\n <p-input-number [(ngModel)]=\"value1\" [showButtons]=\"true\" buttonLayout=\"vertical\" inputId=\"vertical\" [inputStyle]=\"{ width: '3rem' }\">\n <ng-template #incrementbuttonicon>\n <span class=\"pi pi-plus\"></span>\n </ng-template>\n <ng-template #decrementbuttonicon>\n <span class=\"pi pi-minus\"></span>\n </ng-template>\n </p-input-number>\n </div>\n `,\n standalone: true,\n imports: [InputNumberModule, FormsModule]\n})\nexport class InputnumberVerticalDemo {\n value1: number = 50;\n}"
|
|
18992
18984
|
}
|
|
18993
18985
|
}
|
|
18994
18986
|
],
|
|
@@ -21649,6 +21641,12 @@
|
|
|
21649
21641
|
"title": "LLMs.txt",
|
|
21650
21642
|
"description": "LLM-optimized documentation endpoints for ExhaustiveUI components.",
|
|
21651
21643
|
"sections": [
|
|
21644
|
+
{
|
|
21645
|
+
"id": "agents",
|
|
21646
|
+
"label": "AI coding agents",
|
|
21647
|
+
"description": "@exhaustive-ui/core ships its own guide for AI coding agents: node_modules/@exhaustive-ui/core/AGENTS.md gives the rules that matter when writing code with the library (imports, canonical tags, templates, signals, OnPush), the PrimeNG habits to drop, and links to a card per component in llms/cards/ . Coding agents read node_modules , so this works without any setup, and always matches the installed version. To make sure your agent reads it first, add one line to the AGENTS.md or CLAUDE.md of your project. A component card is a 2 to 16 KB summary: the import, the tag, the inputs the examples use with their type and default, the outputs, every template with the context it receives, and one complete example. The same cards are published at /llms/cards/<name>.md , returned first by the get_component tool of the MCP server, and bundled in the Agent Skill. The site version of the guide is /llms/AGENTS.md . After writing templates, an agent (or you) can check them against the API with the check command of the MCP package. It reads the .html files and the inline templates under src , and reports, with file and line: PrimeNG tags and imports with their replacement, unknown or miscased inputs, invalid values, inputs removed in v22, and template names that the component does not have. It exits with 1 on errors, so it also fits in a CI pipeline or a pre-commit hook.",
|
|
21648
|
+
"examples": null
|
|
21649
|
+
},
|
|
21652
21650
|
{
|
|
21653
21651
|
"id": "agentskill",
|
|
21654
21652
|
"label": "Agent Skill",
|
|
@@ -28337,7 +28335,7 @@
|
|
|
28337
28335
|
"label": "Sizes",
|
|
28338
28336
|
"description": "Password provides small and large sizes as alternatives to the base.",
|
|
28339
28337
|
"examples": {
|
|
28340
|
-
"typescript": "import { Component } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { PasswordModule } from '@exhaustive-ui/core/password';\n\n@Component({\n template: `\n <div class=\"card flex flex-col items-center gap-4\">\n <p-password [(ngModel)]=\"value1\"
|
|
28338
|
+
"typescript": "import { Component } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { PasswordModule } from '@exhaustive-ui/core/password';\n\n@Component({\n template: `\n <div class=\"card flex flex-col items-center gap-4\">\n <p-password [(ngModel)]=\"value1\" size=\"small\" placeholder=\"Small\" />\n <p-password [(ngModel)]=\"value2\" placeholder=\"Normal\" />\n <p-password [(ngModel)]=\"value3\" size=\"large\" placeholder=\"Large\" />\n </div>\n `,\n standalone: true,\n imports: [PasswordModule, FormsModule]\n})\nexport class PasswordSizesDemo {\n value1: string;\n value2: string;\n value3: string;\n}"
|
|
28341
28339
|
}
|
|
28342
28340
|
},
|
|
28343
28341
|
{
|
|
@@ -28923,7 +28921,7 @@
|
|
|
28923
28921
|
"label": "Filter",
|
|
28924
28922
|
"description": "Filter value is checked against the property of an object configured with the filterBy property.",
|
|
28925
28923
|
"examples": {
|
|
28926
|
-
"typescript": "import { Component, OnInit, inject, signal } from '@angular/core';\nimport { PickListModule } from '@exhaustive-ui/core/picklist';\nimport { ProductService } from '@/service/productservice';\nimport { Product } from '@/domain/product';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-pick-list\n [source]=\"sourceProducts()\"\n [target]=\"targetProducts()\"\n [dragdrop]=\"true\"\n [responsive]=\"true\"\n filterBy=\"name\"\n sourceFilterPlaceholder=\"Search by name\"\n targetFilterPlaceholder=\"Search by name\"\n breakpoint=\"1400px\"\n scrollHeight=\"20rem\"\n >\n <ng-template let-option let-selected=\"selected\" #
|
|
28924
|
+
"typescript": "import { Component, OnInit, inject, signal } from '@angular/core';\nimport { PickListModule } from '@exhaustive-ui/core/picklist';\nimport { ProductService } from '@/service/productservice';\nimport { Product } from '@/domain/product';\n\n@Component({\n template: `\n <div class=\"card\">\n <p-pick-list\n [source]=\"sourceProducts()\"\n [target]=\"targetProducts()\"\n [dragdrop]=\"true\"\n [responsive]=\"true\"\n filterBy=\"name\"\n sourceFilterPlaceholder=\"Search by name\"\n targetFilterPlaceholder=\"Search by name\"\n breakpoint=\"1400px\"\n scrollHeight=\"20rem\"\n >\n <ng-template let-option let-selected=\"selected\" #item>\n <div class=\"flex flex-wrap p-1 items-center gap-4 w-full\">\n <img class=\"w-12 shrink-0 rounded-sm\" src=\"https://exhaustive-ui.com/demo/product/{{ option.image }}\" [alt]=\"option.name\" />\n <div class=\"flex-1 flex flex-col\">\n <span class=\"font-medium text-sm\">{{ option.name }}</span>\n <span\n [ngClass]=\"{\n 'text-surface-500': !selected,\n 'dark:text-surface-400': !selected,\n 'text-inherit': selected\n }\"\n >{{ option.category }}</span\n >\n </div>\n <span class=\"font-bold sm:ml-8\">{{ '$' + option.price }}</span>\n </div>\n </ng-template>\n </p-pick-list>\n </div>\n `,\n standalone: true,\n imports: [PickListModule],\n providers: [ProductService]\n})\nexport class PicklistFilterDemo implements OnInit {\n private productService = inject(ProductService);\n sourceProducts = signal<Product[]>([]);\n targetProducts = signal<Product[]>([]);\n\n ngOnInit() {\n this.carService.getProductsSmall().then((products) => {\n this.sourceProducts.set(products);\n });\n }\n}"
|
|
28927
28925
|
}
|
|
28928
28926
|
},
|
|
28929
28927
|
{
|
|
@@ -35847,7 +35845,7 @@
|
|
|
35847
35845
|
"label": "Products",
|
|
35848
35846
|
"description": "CRUD implementation example with a Dialog.",
|
|
35849
35847
|
"examples": {
|
|
35850
|
-
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ButtonModule } from '@exhaustive-ui/core/button';\nimport { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';\nimport { Dialog, DialogModule } from '@exhaustive-ui/core/dialog';\nimport { FileUploadModule } from '@exhaustive-ui/core/fileupload';\nimport { IconFieldModule } from '@exhaustive-ui/core/iconfield';\nimport { InputIconModule } from '@exhaustive-ui/core/inputicon';\nimport { InputNumberModule } from '@exhaustive-ui/core/inputnumber';\nimport { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';\nimport { RatingModule } from '@exhaustive-ui/core/rating';\nimport { SelectModule } from '@exhaustive-ui/core/select';\nimport { Table, TableModule } from '@exhaustive-ui/core/table';\nimport { TagModule } from '@exhaustive-ui/core/tag';\nimport { ToastModule } from '@exhaustive-ui/core/toast';\nimport { ToolbarModule } from '@exhaustive-ui/core/toolbar';\nimport { InputTextModule } from '@exhaustive-ui/core/inputtext';\nimport { ProductService } from '@/service/productservice';\nimport { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';\nimport { Product } from '@/domain/product';\n\ninterface Column {\n field: string;\n header: string;\n customExportHeader?: string;\n}\n\ninterface ExportColumn {\n title: string;\n dataKey: string;\n}\n\n@Component({\n template: `\n <div class=\"card\">\n <p-toast />\n <p-toolbar class=\"mb-6\">\n <ng-template #start>\n <p-button label=\"New\" icon=\"pi pi-plus\" class=\"mr-2\" (onClick)=\"openNew()\" />\n <p-button severity=\"danger\" label=\"Delete\" icon=\"pi pi-trash\" outlined (onClick)=\"deleteSelectedProducts()\" [disabled]=\"!selectedProducts || !selectedProducts.length\" />\n </ng-template>\n <ng-template #end>\n <p-file-upload mode=\"basic\" accept=\"image/*\" [maxFileSize]=\"1000000\" label=\"Import\" chooseLabel=\"Import\" auto customUpload class=\"mr-2 inline-block\" [chooseButtonProps]=\"{ severity: 'secondary' }\" />\n <p-button label=\"Export\" icon=\"pi pi-upload\" severity=\"secondary\" (onClick)=\"exportCSV($event)\" />\n </ng-template>\n </p-toolbar>\n <p-table\n #dt\n [value]=\"products\"\n [rows]=\"10\"\n [columns]=\"cols\"\n [paginator]=\"true\"\n [globalFilterFields]=\"['name', 'country.name', 'representative.name', 'status']\"\n [tableStyle]=\"{ 'min-width': '75rem' }\"\n [(selection)]=\"selectedProducts\"\n [rowHover]=\"true\"\n dataKey=\"id\"\n currentPageReportTemplate=\"Showing {first} to {last} of {totalRecords} entries\"\n [showCurrentPageReport]=\"true\"\n >\n <ng-template #caption>\n <div class=\"flex items-center justify-between\">\n <h5 class=\"m-0\">Manage Products</h5>\n <p-icon-field>\n <p-input-icon class=\"pi pi-search\" />\n <input pInputText type=\"text\" (input)=\"dt.filterGlobal($event.target.value, 'contains')\" placeholder=\"Search...\" />\n </p-icon-field>\n </div>\n </ng-template>\n <ng-template #header>\n <tr>\n <th style=\"width: 3rem\">\n <p-table-header-checkbox />\n </th>\n <th style=\"min-width: 16rem\">Code</th>\n <th pSortableColumn=\"name\" style=\"min-width:16rem\">\n <div class=\"flex items-center gap-2\">\n Name\n <p-sort-icon field=\"name\" />\n </div>\n </th>\n <th>Image</th>\n <th pSortableColumn=\"price\" style=\"min-width: 8rem\">\n <div class=\"flex items-center gap-2\">\n Price\n <p-sort-icon field=\"price\" />\n </div>\n </th>\n <th pSortableColumn=\"category\" style=\"min-width:10rem\">\n <div class=\"flex items-center gap-2\">\n Category\n <p-sort-icon field=\"category\" />\n </div>\n </th>\n <th pSortableColumn=\"rating\" style=\"min-width: 12rem\">\n <div class=\"flex items-center gap-2\">\n Reviews\n <p-sort-icon field=\"rating\" />\n </div>\n </th>\n <th pSortableColumn=\"inventoryStatus\" style=\"min-width: 12rem\">\n <div class=\"flex items-center gap-2\">\n Status\n <p-sort-icon field=\"inventoryStatus\" />\n </div>\n </th>\n <th style=\"min-width: 12rem\"></th>\n </tr>\n </ng-template>\n <ng-template #body let-product>\n <tr>\n <td style=\"width: 3rem\">\n <p-table-checkbox [value]=\"product\" />\n </td>\n <td style=\"min-width: 12rem\">{{ product.code }}</td>\n <td style=\"min-width: 16rem\">{{ product.name }}</td>\n <td>\n <img [src]=\"'https://exhaustive-ui.com/demo/product/' + product.image\" [alt]=\"product.name\" style=\"width: 64px\" class=\"rounded-sm\" />\n </td>\n <td>{{ product.price | currency: 'USD' }}</td>\n <td>{{ product.category }}</td>\n <td>\n <p-rating [(ngModel)]=\"product.rating\" [readonly]=\"true\" />\n </td>\n <td>\n <p-tag [value]=\"product.inventoryStatus\" [severity]=\"getSeverity(product.inventoryStatus)\" />\n </td>\n <td>\n <p-button icon=\"pi pi-pencil\" class=\"mr-2\" [rounded]=\"true\" [outlined]=\"true\" (click)=\"editProduct(product)\" />\n <p-button icon=\"pi pi-trash\" severity=\"danger\" [rounded]=\"true\" [outlined]=\"true\" (click)=\"deleteProduct(product)\" />\n </td>\n </tr>\n </ng-template>\n </p-table>\n <p-dialog [(visible)]=\"productDialog\" [style]=\"{ width: '450px' }\" header=\"Product Details\" [modal]=\"true\">\n <ng-template #content>\n <div class=\"flex flex-col gap-6\">\n <img [src]=\"'https://exhaustive-ui.com/demo/product/' + product.image\" [alt]=\"product.image\" class=\"block m-auto pb-4\" *ngIf=\"product.image\" />\n <div>\n <label for=\"name\" class=\"block font-bold mb-3\">Name</label>\n <input type=\"text\" pInputText id=\"name\" [(ngModel)]=\"product.name\" required autofocus fluid />\n <small class=\"text-red-500\" *ngIf=\"submitted && !product.name\">Name is required.</small>\n </div>\n <div>\n <label for=\"description\" class=\"block font-bold mb-3\">Description</label>\n <textarea id=\"description\" pTextarea [(ngModel)]=\"product.description\" required rows=\"3\" cols=\"20\" fluid></textarea>\n </div>\n <div>\n <label for=\"inventoryStatus\" class=\"block font-bold mb-3\">Inventory Status</label>\n <p-select [(ngModel)]=\"product.inventoryStatus\" inputId=\"inventoryStatus\" [options]=\"statuses\" optionLabel=\"label\" optionValue=\"label\" placeholder=\"Select a Status\" fluid />\n </div>\n <div>\n <span class=\"block font-bold mb-4\">Category</span>\n <div class=\"grid grid-cols-12 gap-4\">\n <div class=\"flex items-center gap-2 col-span-6\">\n <p-radio-button id=\"category1\" name=\"category\" value=\"Accessories\" [(ngModel)]=\"product.category\" />\n <label for=\"category1\">Accessories</label>\n </div>\n <div class=\"flex items-center gap-2 col-span-6\">\n <p-radio-button id=\"category2\" name=\"category\" value=\"Clothing\" [(ngModel)]=\"product.category\" />\n <label for=\"category2\">Clothing</label>\n </div>\n <div class=\"flex items-center gap-2 col-span-6\">\n <p-radio-button id=\"category3\" name=\"category\" value=\"Electronics\" [(ngModel)]=\"product.category\" />\n <label for=\"category3\">Electronics</label>\n </div>\n <div class=\"flex items-center gap-2 col-span-6\">\n <p-radio-button id=\"category4\" name=\"category\" value=\"Fitness\" [(ngModel)]=\"product.category\" />\n <label for=\"category4\">Fitness</label>\n </div>\n </div>\n </div>\n <div class=\"grid grid-cols-12 gap-4\">\n <div class=\"col-span-6\">\n <label for=\"price\" class=\"block font-bold mb-3\">Price</label>\n <p-input-number id=\"price\" [(ngModel)]=\"product.price\" mode=\"currency\" currency=\"USD\" locale=\"en-US\" fluid />\n </div>\n <div class=\"col-span-6\">\n <label for=\"quantity\" class=\"block font-bold mb-3\">Quantity</label>\n <p-input-number id=\"quantity\" [(ngModel)]=\"product.quantity\" fluid />\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #footer>\n <p-button label=\"Cancel\" icon=\"pi pi-times\" text (click)=\"hideDialog()\" />\n <p-button label=\"Save\" icon=\"pi pi-check\" (click)=\"saveProduct()\" />\n </ng-template>\n </p-dialog>\n <p-confirm-dialog [style]=\"{ width: '450px' }\" />\n </div>\n `,\n standalone: true,\n imports: [ButtonModule, ConfirmDialogModule, DialogModule, FileUploadModule, IconFieldModule, InputIconModule, InputNumberModule, RadioButtonModule, RatingModule, SelectModule, TableModule, TagModule, ToastModule, ToolbarModule, InputTextModule, FormsModule],\n providers: [ProductService, MessageService, ConfirmationService]\n})\nexport class TableProductsDemo implements OnInit {\n private productService = inject(ProductService);\n private messageService = inject(MessageService);\n private confirmationService = inject(ConfirmationService);\n productDialog: boolean = false;\n products!: Product[];\n product!: Product;\n selectedProducts!: Product[] | null;\n submitted: boolean = false;\n statuses!: any[];\n cols!: Column[];\n exportColumns!: ExportColumn[];\n\n ngOnInit() {\n this.productService.getProducts().then((data) => {\n this.products = data;\n });\n this.statuses = [\n { label: 'INSTOCK', value: 'instock' },\n { label: 'LOWSTOCK', value: 'lowstock' },\n { label: 'OUTOFSTOCK', value: 'outofstock' }\n ];\n this.cols = [\n { field: 'code', header: 'Code', customExportHeader: 'Product Code' },\n { field: 'name', header: 'Name' },\n { field: 'image', header: 'Image' },\n { field: 'price', header: 'Price' },\n { field: 'category', header: 'Category' }\n ];\n this.exportColumns = this.cols.map((col) => ({ title: col.header, dataKey: col.field }));\n }\n\n openNew() {\n this.product = {};\n this.submitted = false;\n this.productDialog = true;\n }\n\n editProduct(product: Product) {\n this.product = { ...product };\n this.productDialog = true;\n }\n\n deleteSelectedProducts() {\n this.confirmationService.confirm({\n message: 'Are you sure you want to delete the selected products?',\n header: 'Confirm',\n icon: 'pi pi-exclamation-triangle',\n rejectButtonProps: {\n label: 'No',\n severity: 'secondary',\n variant: 'text'\n },\n acceptButtonProps: {\n severity: 'danger',\n label: 'Yes'\n },\n accept: () => {\n this.products = this.products.filter((val) => !this.selectedProducts?.includes(val));\n this.selectedProducts = null;\n this.messageService.add({\n severity: 'success',\n summary: 'Successful',\n detail: 'Products Deleted',\n life: 3000\n });\n }\n });\n }\n\n hideDialog() {\n this.productDialog = false;\n this.submitted = false;\n }\n\n deleteProduct(product: Product) {\n this.confirmationService.confirm({\n message: 'Are you sure you want to delete ' + product.name + '?',\n header: 'Confirm',\n icon: 'pi pi-exclamation-triangle',\n rejectButtonProps: {\n label: 'No',\n severity: 'secondary',\n variant: 'text'\n },\n acceptButtonProps: {\n severity: 'danger',\n label: 'Yes'\n },\n accept: () => {\n this.products = this.products.filter((val) => val.id !== product.id);\n this.product = {};\n this.messageService.add({\n severity: 'success',\n summary: 'Successful',\n detail: 'Product Deleted',\n life: 3000\n });\n }\n });\n }\n\n findIndexById(id: string): number {\n let index = -1;\n for (let i = 0; i < this.products.length; i++) {\n if (this.products[i].id === id) {\n index = i;\n break;\n }\n }\n \n return index;\n }\n\n createId(): string {\n let id = '';\n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for (var i = 0; i < 5; i++) {\n id += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return id;\n }\n\n getSeverity(status: string) {\n switch (status) {\n case 'INSTOCK':\n return 'success';\n case 'LOWSTOCK':\n return 'warn';\n case 'OUTOFSTOCK':\n return 'danger';\n }\n }\n\n saveProduct() {\n this.submitted = true;\n \n if (this.product.name?.trim()) {\n if (this.product.id) {\n this.products[this.findIndexById(this.product.id)] = this.product;\n this.messageService.add({\n severity: 'success',\n summary: 'Successful',\n detail: 'Product Updated',\n life: 3000\n });\n } else {\n this.product.id = this.createId();\n this.product.code = this.createId();\n this.product.image = 'product-placeholder.svg';\n this.products.push(this.product);\n this.messageService.add({\n severity: 'success',\n summary: 'Successful',\n detail: 'Product Created',\n life: 3000\n });\n }\n \n this.products = [...this.products];\n this.productDialog = false;\n this.product = {};\n }\n }\n}"
|
|
35848
|
+
"typescript": "import { Component, OnInit, inject } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ButtonModule } from '@exhaustive-ui/core/button';\nimport { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';\nimport { Dialog, DialogModule } from '@exhaustive-ui/core/dialog';\nimport { FileUploadModule } from '@exhaustive-ui/core/fileupload';\nimport { IconFieldModule } from '@exhaustive-ui/core/iconfield';\nimport { InputIconModule } from '@exhaustive-ui/core/inputicon';\nimport { InputNumberModule } from '@exhaustive-ui/core/inputnumber';\nimport { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';\nimport { RatingModule } from '@exhaustive-ui/core/rating';\nimport { SelectModule } from '@exhaustive-ui/core/select';\nimport { Table, TableModule } from '@exhaustive-ui/core/table';\nimport { TagModule } from '@exhaustive-ui/core/tag';\nimport { ToastModule } from '@exhaustive-ui/core/toast';\nimport { ToolbarModule } from '@exhaustive-ui/core/toolbar';\nimport { InputTextModule } from '@exhaustive-ui/core/inputtext';\nimport { ProductService } from '@/service/productservice';\nimport { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';\nimport { Product } from '@/domain/product';\n\ninterface Column {\n field: string;\n header: string;\n customExportHeader?: string;\n}\n\ninterface ExportColumn {\n title: string;\n dataKey: string;\n}\n\n@Component({\n template: `\n <div class=\"card\">\n <p-toast />\n <p-toolbar class=\"mb-6\">\n <ng-template #start>\n <p-button label=\"New\" icon=\"pi pi-plus\" class=\"mr-2\" (onClick)=\"openNew()\" />\n <p-button severity=\"danger\" label=\"Delete\" icon=\"pi pi-trash\" outlined (onClick)=\"deleteSelectedProducts()\" [disabled]=\"!selectedProducts || !selectedProducts.length\" />\n </ng-template>\n <ng-template #end>\n <p-file-upload mode=\"basic\" accept=\"image/*\" [maxFileSize]=\"1000000\" chooseLabel=\"Import\" auto customUpload class=\"mr-2 inline-block\" [chooseButtonProps]=\"{ severity: 'secondary' }\" />\n <p-button label=\"Export\" icon=\"pi pi-upload\" severity=\"secondary\" (onClick)=\"exportCSV($event)\" />\n </ng-template>\n </p-toolbar>\n <p-table\n #dt\n [value]=\"products\"\n [rows]=\"10\"\n [columns]=\"cols\"\n [paginator]=\"true\"\n [globalFilterFields]=\"['name', 'country.name', 'representative.name', 'status']\"\n [tableStyle]=\"{ 'min-width': '75rem' }\"\n [(selection)]=\"selectedProducts\"\n [rowHover]=\"true\"\n dataKey=\"id\"\n currentPageReportTemplate=\"Showing {first} to {last} of {totalRecords} entries\"\n [showCurrentPageReport]=\"true\"\n >\n <ng-template #caption>\n <div class=\"flex items-center justify-between\">\n <h5 class=\"m-0\">Manage Products</h5>\n <p-icon-field>\n <p-input-icon class=\"pi pi-search\" />\n <input pInputText type=\"text\" (input)=\"dt.filterGlobal($event.target.value, 'contains')\" placeholder=\"Search...\" />\n </p-icon-field>\n </div>\n </ng-template>\n <ng-template #header>\n <tr>\n <th style=\"width: 3rem\">\n <p-table-header-checkbox />\n </th>\n <th style=\"min-width: 16rem\">Code</th>\n <th pSortableColumn=\"name\" style=\"min-width:16rem\">\n <div class=\"flex items-center gap-2\">\n Name\n <p-sort-icon field=\"name\" />\n </div>\n </th>\n <th>Image</th>\n <th pSortableColumn=\"price\" style=\"min-width: 8rem\">\n <div class=\"flex items-center gap-2\">\n Price\n <p-sort-icon field=\"price\" />\n </div>\n </th>\n <th pSortableColumn=\"category\" style=\"min-width:10rem\">\n <div class=\"flex items-center gap-2\">\n Category\n <p-sort-icon field=\"category\" />\n </div>\n </th>\n <th pSortableColumn=\"rating\" style=\"min-width: 12rem\">\n <div class=\"flex items-center gap-2\">\n Reviews\n <p-sort-icon field=\"rating\" />\n </div>\n </th>\n <th pSortableColumn=\"inventoryStatus\" style=\"min-width: 12rem\">\n <div class=\"flex items-center gap-2\">\n Status\n <p-sort-icon field=\"inventoryStatus\" />\n </div>\n </th>\n <th style=\"min-width: 12rem\"></th>\n </tr>\n </ng-template>\n <ng-template #body let-product>\n <tr>\n <td style=\"width: 3rem\">\n <p-table-checkbox [value]=\"product\" />\n </td>\n <td style=\"min-width: 12rem\">{{ product.code }}</td>\n <td style=\"min-width: 16rem\">{{ product.name }}</td>\n <td>\n <img [src]=\"'https://exhaustive-ui.com/demo/product/' + product.image\" [alt]=\"product.name\" style=\"width: 64px\" class=\"rounded-sm\" />\n </td>\n <td>{{ product.price | currency: 'USD' }}</td>\n <td>{{ product.category }}</td>\n <td>\n <p-rating [(ngModel)]=\"product.rating\" [readonly]=\"true\" />\n </td>\n <td>\n <p-tag [value]=\"product.inventoryStatus\" [severity]=\"getSeverity(product.inventoryStatus)\" />\n </td>\n <td>\n <p-button icon=\"pi pi-pencil\" class=\"mr-2\" [rounded]=\"true\" [outlined]=\"true\" (click)=\"editProduct(product)\" />\n <p-button icon=\"pi pi-trash\" severity=\"danger\" [rounded]=\"true\" [outlined]=\"true\" (click)=\"deleteProduct(product)\" />\n </td>\n </tr>\n </ng-template>\n </p-table>\n <p-dialog [(visible)]=\"productDialog\" [style]=\"{ width: '450px' }\" header=\"Product Details\" [modal]=\"true\">\n <ng-template #content>\n <div class=\"flex flex-col gap-6\">\n <img [src]=\"'https://exhaustive-ui.com/demo/product/' + product.image\" [alt]=\"product.image\" class=\"block m-auto pb-4\" *ngIf=\"product.image\" />\n <div>\n <label for=\"name\" class=\"block font-bold mb-3\">Name</label>\n <input type=\"text\" pInputText id=\"name\" [(ngModel)]=\"product.name\" required autofocus fluid />\n <small class=\"text-red-500\" *ngIf=\"submitted && !product.name\">Name is required.</small>\n </div>\n <div>\n <label for=\"description\" class=\"block font-bold mb-3\">Description</label>\n <textarea id=\"description\" pTextarea [(ngModel)]=\"product.description\" required rows=\"3\" cols=\"20\" fluid></textarea>\n </div>\n <div>\n <label for=\"inventoryStatus\" class=\"block font-bold mb-3\">Inventory Status</label>\n <p-select [(ngModel)]=\"product.inventoryStatus\" inputId=\"inventoryStatus\" [options]=\"statuses\" optionLabel=\"label\" optionValue=\"label\" placeholder=\"Select a Status\" fluid />\n </div>\n <div>\n <span class=\"block font-bold mb-4\">Category</span>\n <div class=\"grid grid-cols-12 gap-4\">\n <div class=\"flex items-center gap-2 col-span-6\">\n <p-radio-button id=\"category1\" name=\"category\" value=\"Accessories\" [(ngModel)]=\"product.category\" />\n <label for=\"category1\">Accessories</label>\n </div>\n <div class=\"flex items-center gap-2 col-span-6\">\n <p-radio-button id=\"category2\" name=\"category\" value=\"Clothing\" [(ngModel)]=\"product.category\" />\n <label for=\"category2\">Clothing</label>\n </div>\n <div class=\"flex items-center gap-2 col-span-6\">\n <p-radio-button id=\"category3\" name=\"category\" value=\"Electronics\" [(ngModel)]=\"product.category\" />\n <label for=\"category3\">Electronics</label>\n </div>\n <div class=\"flex items-center gap-2 col-span-6\">\n <p-radio-button id=\"category4\" name=\"category\" value=\"Fitness\" [(ngModel)]=\"product.category\" />\n <label for=\"category4\">Fitness</label>\n </div>\n </div>\n </div>\n <div class=\"grid grid-cols-12 gap-4\">\n <div class=\"col-span-6\">\n <label for=\"price\" class=\"block font-bold mb-3\">Price</label>\n <p-input-number id=\"price\" [(ngModel)]=\"product.price\" mode=\"currency\" currency=\"USD\" locale=\"en-US\" fluid />\n </div>\n <div class=\"col-span-6\">\n <label for=\"quantity\" class=\"block font-bold mb-3\">Quantity</label>\n <p-input-number id=\"quantity\" [(ngModel)]=\"product.quantity\" fluid />\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #footer>\n <p-button label=\"Cancel\" icon=\"pi pi-times\" text (click)=\"hideDialog()\" />\n <p-button label=\"Save\" icon=\"pi pi-check\" (click)=\"saveProduct()\" />\n </ng-template>\n </p-dialog>\n <p-confirm-dialog [style]=\"{ width: '450px' }\" />\n </div>\n `,\n standalone: true,\n imports: [ButtonModule, ConfirmDialogModule, DialogModule, FileUploadModule, IconFieldModule, InputIconModule, InputNumberModule, RadioButtonModule, RatingModule, SelectModule, TableModule, TagModule, ToastModule, ToolbarModule, InputTextModule, FormsModule],\n providers: [ProductService, MessageService, ConfirmationService]\n})\nexport class TableProductsDemo implements OnInit {\n private productService = inject(ProductService);\n private messageService = inject(MessageService);\n private confirmationService = inject(ConfirmationService);\n productDialog: boolean = false;\n products!: Product[];\n product!: Product;\n selectedProducts!: Product[] | null;\n submitted: boolean = false;\n statuses!: any[];\n cols!: Column[];\n exportColumns!: ExportColumn[];\n\n ngOnInit() {\n this.productService.getProducts().then((data) => {\n this.products = data;\n });\n this.statuses = [\n { label: 'INSTOCK', value: 'instock' },\n { label: 'LOWSTOCK', value: 'lowstock' },\n { label: 'OUTOFSTOCK', value: 'outofstock' }\n ];\n this.cols = [\n { field: 'code', header: 'Code', customExportHeader: 'Product Code' },\n { field: 'name', header: 'Name' },\n { field: 'image', header: 'Image' },\n { field: 'price', header: 'Price' },\n { field: 'category', header: 'Category' }\n ];\n this.exportColumns = this.cols.map((col) => ({ title: col.header, dataKey: col.field }));\n }\n\n openNew() {\n this.product = {};\n this.submitted = false;\n this.productDialog = true;\n }\n\n editProduct(product: Product) {\n this.product = { ...product };\n this.productDialog = true;\n }\n\n deleteSelectedProducts() {\n this.confirmationService.confirm({\n message: 'Are you sure you want to delete the selected products?',\n header: 'Confirm',\n icon: 'pi pi-exclamation-triangle',\n rejectButtonProps: {\n label: 'No',\n severity: 'secondary',\n variant: 'text'\n },\n acceptButtonProps: {\n severity: 'danger',\n label: 'Yes'\n },\n accept: () => {\n this.products = this.products.filter((val) => !this.selectedProducts?.includes(val));\n this.selectedProducts = null;\n this.messageService.add({\n severity: 'success',\n summary: 'Successful',\n detail: 'Products Deleted',\n life: 3000\n });\n }\n });\n }\n\n hideDialog() {\n this.productDialog = false;\n this.submitted = false;\n }\n\n deleteProduct(product: Product) {\n this.confirmationService.confirm({\n message: 'Are you sure you want to delete ' + product.name + '?',\n header: 'Confirm',\n icon: 'pi pi-exclamation-triangle',\n rejectButtonProps: {\n label: 'No',\n severity: 'secondary',\n variant: 'text'\n },\n acceptButtonProps: {\n severity: 'danger',\n label: 'Yes'\n },\n accept: () => {\n this.products = this.products.filter((val) => val.id !== product.id);\n this.product = {};\n this.messageService.add({\n severity: 'success',\n summary: 'Successful',\n detail: 'Product Deleted',\n life: 3000\n });\n }\n });\n }\n\n findIndexById(id: string): number {\n let index = -1;\n for (let i = 0; i < this.products.length; i++) {\n if (this.products[i].id === id) {\n index = i;\n break;\n }\n }\n \n return index;\n }\n\n createId(): string {\n let id = '';\n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for (var i = 0; i < 5; i++) {\n id += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return id;\n }\n\n getSeverity(status: string) {\n switch (status) {\n case 'INSTOCK':\n return 'success';\n case 'LOWSTOCK':\n return 'warn';\n case 'OUTOFSTOCK':\n return 'danger';\n }\n }\n\n saveProduct() {\n this.submitted = true;\n \n if (this.product.name?.trim()) {\n if (this.product.id) {\n this.products[this.findIndexById(this.product.id)] = this.product;\n this.messageService.add({\n severity: 'success',\n summary: 'Successful',\n detail: 'Product Updated',\n life: 3000\n });\n } else {\n this.product.id = this.createId();\n this.product.code = this.createId();\n this.product.image = 'product-placeholder.svg';\n this.products.push(this.product);\n this.messageService.add({\n severity: 'success',\n summary: 'Successful',\n detail: 'Product Created',\n life: 3000\n });\n }\n \n this.products = [...this.products];\n this.productDialog = false;\n this.product = {};\n }\n }\n}"
|
|
35851
35849
|
}
|
|
35852
35850
|
},
|
|
35853
35851
|
{
|
|
@@ -45670,6 +45668,12 @@
|
|
|
45670
45668
|
"title": "LLMs.txt",
|
|
45671
45669
|
"description": "LLM-optimized documentation endpoints for ExhaustiveUI components.",
|
|
45672
45670
|
"sections": [
|
|
45671
|
+
{
|
|
45672
|
+
"id": "agents",
|
|
45673
|
+
"label": "AI coding agents",
|
|
45674
|
+
"description": "`@exhaustive-ui/core` ships its own guide for AI coding agents: `node_modules/@exhaustive-ui/core/AGENTS.md` gives the rules that matter when writing code with the library (imports, canonical tags, templates,\nsignals, OnPush), the PrimeNG habits to drop, and links to a card per component in `llms/cards/`. Coding agents read `node_modules`, so this works without any setup, and always matches the installed version. To make sure\nyour agent reads it first, add one line to the `AGENTS.md` or `CLAUDE.md` of your project.\n\n```typescript\n<!-- AGENTS.md or CLAUDE.md -->\nThis project uses ExhaustiveUI. Before writing code with it, read node_modules/@exhaustive-ui/core/AGENTS.md,\nthen the card of each component you use. After changing templates, run: npx -y @exhaustive-ui/mcp check\n```\n\nA component card is a 2 to 16 KB summary: the import, the tag, the inputs the examples use with their type and default, the outputs, every template with the context it receives, and one complete example. The same cards are published\nat [/llms/cards/<name>.md](/llms/cards/select.md), returned first by the `get_component` tool of the MCP server, and bundled in the Agent Skill. The site version of the guide is\n[/llms/AGENTS.md](/llms/AGENTS.md).\n\nAfter writing templates, an agent (or you) can check them against the API with the `check` command of the MCP package. It reads the `.html` files and the inline templates under `src`, and reports, with file and line:\nPrimeNG tags and imports with their replacement, unknown or miscased inputs, invalid values, inputs removed in v22, and template names that the component does not have. It exits with 1 on errors, so it also fits in a CI pipeline or a\npre-commit hook.\n\n```bash\nnpx -y @exhaustive-ui/mcp check\n\nsrc/app/orders.component.ts:3 error \"primeng/dropdown\" is a PrimeNG package; ExhaustiveUI uses \"@exhaustive-ui/core/select\".\nsrc/app/orders.component.ts:11 error \"colour\" is not an input of Select.\nsrc/app/orders.component.ts:13 error <p-select> has no #selecteditem template: names are case sensitive, write #selectedItem.\n3 errors, 0 warnings in 12 files.\n```",
|
|
45675
|
+
"examples": null
|
|
45676
|
+
},
|
|
45673
45677
|
{
|
|
45674
45678
|
"id": "llmstxt",
|
|
45675
45679
|
"label": "/llms.txt",
|