Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 76x 76x 76x 76x 42x 42x 42x 42x 42x 42x 42x 76x 34x 34x 34x 1x 1x 1x 1x 1x 1x 1x 1x 1x 15x 15x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 11x 11x 11x 11x 11x 11x 11x 11x 11x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 68x 68x 68x 68x 68x 1x 1x 1x 1x 1x 10x 10x 10x 1x 1x 1x 7x 7x 7x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 20x 20x 20x 20x 20x 20x 20x 20x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 10x 10x 10x 10x 10x 10x 10x 10x 10x 1x 1x 1x 1x 1x 1x 1x 1x 7x 7x 7x 7x 7x 7x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 1x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 1x 1x 1x 1x 1x 1x 26x 26x 26x 26x 26x 26x 1x 1x 1x 1x 1x 1x 1x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 42x 42x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | /**
* PrimeReact intermediary components for blong-browser.
*
* React 19 removed support for `defaultProps` on function components. This file
* wraps every PrimeReact component used in blong-browser and hard-codes the
* non-null / non-undefined default prop values that PrimeReact previously relied
* on `defaultProps` to supply.
*
* Consumers should import from this module instead of directly from 'primereact/*'.
* Functions and types that are not affected (e.g. `addLocale`, `locale`, `confirmDialog`,
* `SplitterPanel`, `TabPanel`) are re-exported as-is.
*/
// ── Re-exported functions / utilities (not affected by defaultProps removal) ─
export {addLocale, locale, PrimeReactProvider} from 'primereact/api';
export {confirmDialog} from 'primereact/confirmdialog';
export {confirmPopup} from 'primereact/confirmpopup';
export {SplitterPanel} from 'primereact/splitter';
// ── Type re-exports ──────────────────────────────────────────────────────────
export type {AutoCompleteProps} from 'primereact/autocomplete';
export type {BreadCrumbProps} from 'primereact/breadcrumb';
export type {ButtonProps} from 'primereact/button';
export type {CalendarProps} from 'primereact/calendar';
export type {CardProps} from 'primereact/card';
export type {CheckboxProps} from 'primereact/checkbox';
export type {ChipsProps} from 'primereact/chips';
export type {ColumnProps} from 'primereact/column';
export type {ConfirmDialogProps} from 'primereact/confirmdialog';
export type {ConfirmPopupProps} from 'primereact/confirmpopup';
export type {DataTableProps} from 'primereact/datatable';
export type {DataViewProps} from 'primereact/dataview';
export type {DialogProps} from 'primereact/dialog';
export type {DropdownProps} from 'primereact/dropdown';
export type {FileUploadProps} from 'primereact/fileupload';
export type {ImageProps} from 'primereact/image';
export type {InputMaskProps} from 'primereact/inputmask';
export type {InputNumberProps} from 'primereact/inputnumber';
export type {InputTextProps} from 'primereact/inputtext';
export type {InputTextareaProps} from 'primereact/inputtextarea';
export type {MenubarProps} from 'primereact/menubar';
export type {MenuItem} from 'primereact/menuitem';
export type {MessageProps} from 'primereact/message';
export type {MultiSelectProps} from 'primereact/multiselect';
export type {OverlayPanelProps} from 'primereact/overlaypanel';
export type {PanelProps} from 'primereact/panel';
export type {PanelMenuProps} from 'primereact/panelmenu';
export type {PasswordProps} from 'primereact/password';
export type {ProgressBarProps} from 'primereact/progressbar';
export type {ProgressSpinnerProps} from 'primereact/progressspinner';
export type {SelectButtonProps} from 'primereact/selectbutton';
export type {SkeletonProps} from 'primereact/skeleton';
export type {SplitButtonProps} from 'primereact/splitbutton';
export type {SplitterProps} from 'primereact/splitter';
export type {StepsProps} from 'primereact/steps';
export type {TabMenuProps} from 'primereact/tabmenu';
export type {TabViewProps} from 'primereact/tabview';
export type {ToastProps} from 'primereact/toast';
export type {ToolbarProps} from 'primereact/toolbar';
export type {TreeProps} from 'primereact/tree';
export type {TreeNode} from 'primereact/treenode';
export type {TreeSelectProps} from 'primereact/treeselect';
export type {TreeTableProps} from 'primereact/treetable';
/** Compatibility alias: renamed/split in PrimeReact 10 — use onSelectionChange event directly for new code. */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type DataTableSelectionChangeParams = {value: any; originalEvent?: any};
/** Sort event type extracted from DataTableProps (DataTableStateEvent is not exported in v10). */
export type DataTableSortParams = Parameters<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
NonNullable<import('primereact/datatable').DataTableProps<Record<string, any>[]>['onSort']>
>[0];
/** TabPanelProps extended with the `__TYPE` discriminator PrimeReact TabView uses to identify
* panel children. React 19 removed defaultProps support, so callers pass `__TYPE="TabPanel"`
* explicitly; this type makes that prop valid. */
export type TabPanelProps = import('primereact/tabview').TabPanelProps & {__TYPE?: string};
// ── Component wrappers ───────────────────────────────────────────────────────
import {AutoComplete as PrimeAutoComplete} from 'primereact/autocomplete';
import {BreadCrumb as PrimeBreadCrumb} from 'primereact/breadcrumb';
import {Button as PrimeButton, type ButtonProps} from 'primereact/button';
import {Calendar as PrimeCalendar} from 'primereact/calendar';
import {Card as PrimeCard} from 'primereact/card';
import {Checkbox as PrimeCheckbox} from 'primereact/checkbox';
import {Chips as PrimeChips} from 'primereact/chips';
import {Column as PrimeColumn} from 'primereact/column';
import {ConfirmDialog as PrimeConfirmDialog} from 'primereact/confirmdialog';
import {ConfirmPopup as PrimeConfirmPopup} from 'primereact/confirmpopup';
import {DataTable as PrimeDataTable} from 'primereact/datatable';
import {DataView as PrimeDataView} from 'primereact/dataview';
import {Dialog as PrimeDialog} from 'primereact/dialog';
import {Dropdown as PrimeDropdown} from 'primereact/dropdown';
import {FileUpload as PrimeFileUpload} from 'primereact/fileupload';
import {Image as PrimeImage} from 'primereact/image';
import {InputMask as PrimeInputMask} from 'primereact/inputmask';
import {InputNumber as PrimeInputNumber} from 'primereact/inputnumber';
import {InputText as PrimeInputText} from 'primereact/inputtext';
import {InputTextarea as PrimeInputTextarea} from 'primereact/inputtextarea';
import {Menubar as PrimeMenubar} from 'primereact/menubar';
import {Message as PrimeMessage} from 'primereact/message';
import {MultiSelect as PrimeMultiSelect} from 'primereact/multiselect';
import {OverlayPanel as PrimeOverlayPanel} from 'primereact/overlaypanel';
import {Panel as PrimePanel} from 'primereact/panel';
import {PanelMenu as PrimePanelMenu} from 'primereact/panelmenu';
import {Password as PrimePassword} from 'primereact/password';
import {ProgressBar as PrimeProgressBar} from 'primereact/progressbar';
import {ProgressSpinner as PrimeProgressSpinner} from 'primereact/progressspinner';
import {SelectButton as PrimeSelectButton} from 'primereact/selectbutton';
import {Skeleton as PrimeSkeleton} from 'primereact/skeleton';
import {SplitButton as PrimeSplitButton} from 'primereact/splitbutton';
import {Splitter as PrimeSplitter} from 'primereact/splitter';
import {Steps as PrimeSteps} from 'primereact/steps';
import {TabMenu as PrimeTabMenu} from 'primereact/tabmenu';
import type {TabPanelProps as PrimeTabPanelProps} from 'primereact/tabview';
import {TabPanel as PrimeTabPanel, TabView as PrimeTabView} from 'primereact/tabview';
import {Toast as PrimeToast} from 'primereact/toast';
import {Toolbar as PrimeToolbar} from 'primereact/toolbar';
import {Tree as PrimeTree} from 'primereact/tree';
import {TreeSelect as PrimeTreeSelect} from 'primereact/treeselect';
import {TreeTable as PrimeTreeTable} from 'primereact/treetable';
import React from 'react';
import {Text} from '../components/Text/Text.js';
import {useAppStore} from '../state/appStore.js';
import type {AutoCompleteProps} from 'primereact/autocomplete';
import type {BreadCrumbProps} from 'primereact/breadcrumb';
import type {CalendarProps} from 'primereact/calendar';
import type {CardProps} from 'primereact/card';
import type {CheckboxProps} from 'primereact/checkbox';
import type {ChipsProps} from 'primereact/chips';
import type {ColumnProps} from 'primereact/column';
import type {ConfirmDialogProps} from 'primereact/confirmdialog';
import type {ConfirmPopupProps} from 'primereact/confirmpopup';
import type {DataViewProps} from 'primereact/dataview';
import type {DialogProps} from 'primereact/dialog';
import type {DropdownProps} from 'primereact/dropdown';
import type {FileUploadProps} from 'primereact/fileupload';
import type {ImageProps} from 'primereact/image';
import type {InputMaskProps} from 'primereact/inputmask';
import type {InputNumberProps} from 'primereact/inputnumber';
import type {InputTextProps} from 'primereact/inputtext';
import type {InputTextareaProps} from 'primereact/inputtextarea';
import type {MenubarProps} from 'primereact/menubar';
import type {MessageProps} from 'primereact/message';
import type {MultiSelectProps} from 'primereact/multiselect';
import type {OverlayPanelProps} from 'primereact/overlaypanel';
import type {PanelProps} from 'primereact/panel';
import type {PanelMenuProps} from 'primereact/panelmenu';
import type {PasswordProps} from 'primereact/password';
import type {ProgressBarProps} from 'primereact/progressbar';
import type {ProgressSpinnerProps} from 'primereact/progressspinner';
import type {SelectButtonProps} from 'primereact/selectbutton';
import type {SkeletonProps} from 'primereact/skeleton';
import type {SplitButtonProps} from 'primereact/splitbutton';
import type {SplitterProps} from 'primereact/splitter';
import type {StepsProps} from 'primereact/steps';
import type {TabMenuProps} from 'primereact/tabmenu';
import type {TabViewProps} from 'primereact/tabview';
import type {ToastProps} from 'primereact/toast';
import type {ToolbarProps} from 'primereact/toolbar';
import type {TreeProps} from 'primereact/tree';
import type {TreeSelectProps} from 'primereact/treeselect';
import type {TreeTableProps} from 'primereact/treetable';
// AutoComplete — delay:300, minLength:1, scrollHeight:'200px', dropdownIcon:'pi pi-chevron-down', removeTokenIcon:'pi pi-times-circle'
export function AutoComplete({
delay = 300,
minLength = 1,
scrollHeight = '200px',
dropdownIcon = 'pi pi-chevron-down',
removeTokenIcon = 'pi pi-times-circle',
...props
}: AutoCompleteProps) {
return (
<PrimeAutoComplete
delay={delay}
minLength={minLength}
scrollHeight={scrollHeight}
dropdownIcon={dropdownIcon}
removeTokenIcon={removeTokenIcon}
{...props}
/>
);
}
// BreadCrumb — no meaningful non-null defaults
export function BreadCrumb(props: BreadCrumbProps) {
return <PrimeBreadCrumb {...props} />;
}
/**
* Button — wraps PrimeReact Button with automatic label translation via the
* `Text` component and a default `iconPos='left'`.
*/
export function Button({'aria-label': ariaLabel, label, iconPos = 'left', ...props}: ButtonProps) {
const translations = useAppStore(s => s.translations);
if (typeof label === 'string') {
const accessibleName = ariaLabel ?? translations[label] ?? label;
return (
<PrimeButton
{...props}
iconPos={iconPos}
label={(<Text>{label}</Text>) as unknown as string}
aria-label={accessibleName}
/>
);
}
return (
<PrimeButton
{...props}
iconPos={iconPos}
label={label}
aria-label={ariaLabel}
/>
);
}
// Calendar — showOnFocus:true, selectionMode:'single', iconPos:'right', hourFormat:'24', icon:'pi pi-calendar'
// numberOfMonths:1, stepHour:1, stepMinute:1, stepSecond:1, stepMillisec:1
export function Calendar({
showOnFocus = true,
selectionMode = 'single',
iconPos = 'right',
hourFormat = '24',
icon = 'pi pi-calendar' as CalendarProps['icon'],
numberOfMonths = 1,
stepHour = 1,
stepMinute = 1,
stepSecond = 1,
stepMillisec = 1,
shortYearCutoff = '+10',
view = 'date',
clearButtonClassName = 'p-button-secondary',
todayButtonClassName = 'p-button-secondary',
...props
}: CalendarProps) {
return (
<PrimeCalendar
showOnFocus={showOnFocus}
selectionMode={selectionMode}
iconPos={iconPos}
hourFormat={hourFormat}
icon={icon}
numberOfMonths={numberOfMonths}
stepHour={stepHour}
stepMinute={stepMinute}
stepSecond={stepSecond}
stepMillisec={stepMillisec}
shortYearCutoff={shortYearCutoff}
view={view}
clearButtonClassName={clearButtonClassName}
todayButtonClassName={todayButtonClassName}
{...props}
/>
);
}
// Card — no meaningful non-null defaults
export function Card(props: CardProps) {
return <PrimeCard {...props} />;
}
// Checkbox — trueValue:true, falseValue:false, icon:'pi pi-check'
export function Checkbox({
trueValue = true,
falseValue = false,
icon = 'pi pi-check',
...props
}: CheckboxProps) {
return (
<PrimeCheckbox
trueValue={trueValue}
falseValue={falseValue}
icon={icon}
{...props}
/>
);
}
// Chips — removable:true, allowDuplicate:true
export function Chips({removable = true, allowDuplicate = true, ...props}: ChipsProps) {
return (
<PrimeChips
removable={removable}
allowDuplicate={allowDuplicate}
{...props}
/>
);
}
// Column — showFilterMenu:true, showFilterMatchModes:true, showFilterOperator:true, showAddButton:true,
// showApplyButton:true, showClearButton:true, showFilterMenuOptions:true,
// dataType:'text', filterType:'text', maxConstraints:2, rowReorderIcon:'pi pi-bars',
// alignFrozen:'left', cellEditValidatorEvent:'click', exportable:true, reorderable:true, resizeable:true
export function Column({
showFilterMenu = true,
showFilterMatchModes = true,
showFilterOperator = true,
showAddButton = true,
showApplyButton = true,
showClearButton = true,
showFilterMenuOptions = true,
dataType = 'text',
filterType = 'text',
maxConstraints = 2,
rowReorderIcon = 'pi pi-bars',
alignFrozen = 'left',
cellEditValidatorEvent = 'click',
exportable = true,
reorderable = true,
resizeable = true,
...props
}: ColumnProps) {
return (
<PrimeColumn
showFilterMenu={showFilterMenu}
showFilterMatchModes={showFilterMatchModes}
showFilterOperator={showFilterOperator}
showAddButton={showAddButton}
showApplyButton={showApplyButton}
showClearButton={showClearButton}
showFilterMenuOptions={showFilterMenuOptions}
dataType={dataType}
filterType={filterType}
maxConstraints={maxConstraints}
rowReorderIcon={rowReorderIcon}
alignFrozen={alignFrozen}
cellEditValidatorEvent={cellEditValidatorEvent}
exportable={exportable}
reorderable={reorderable}
resizeable={resizeable}
{...props}
/>
);
}
// ConfirmDialog — no meaningful non-null defaults
export function ConfirmDialog(props: ConfirmDialogProps) {
return <PrimeConfirmDialog {...props} />;
}
// ConfirmPopup — dismissable:true
export function ConfirmPopup({dismissable = true, ...props}: ConfirmPopupProps) {
return (
<PrimeConfirmPopup
dismissable={dismissable}
{...props}
/>
);
}
// DataTable — first:0, size:'normal', editMode:'cell', sortMode:'single', columnResizeMode:'fit',
// defaultSortOrder:1, filterDelay:300, filterDisplay:'menu', pageLinkSize:5,
// csvSeparator:',', exportFilename:'download', breakpoint:'960px',
// paginatorPosition:'bottom', paginatorTemplate:'...', currentPageReportTemplate:'...',
// loadingIcon:'pi pi-spinner', expandedRowIcon:'pi pi-chevron-down',
// collapsedRowIcon:'pi pi-chevron-right', tabIndex:0, scrollDirection:'vertical',
// stateStorage:'session', compareSelectionBy:'deepEquals'
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type DataTable = PrimeDataTable<any>;
// Wrapper accepts any DataTable-compatible props. We use a permissive index signature here
// because DataTableProps<T> is a discriminated union (single/multiple/cell-single/cell-multiple)
// that rejects mixed props at compile time, which conflicts with dynamic selectionMode usage.
export function DataTable({
ref,
first = 0,
size = 'normal',
editMode = 'cell',
sortMode = 'single',
columnResizeMode = 'fit',
defaultSortOrder = 1,
filterDelay = 300,
filterDisplay = 'menu',
pageLinkSize = 5,
csvSeparator = ',',
exportFilename = 'download',
breakpoint = '960px',
paginatorPosition = 'bottom',
paginatorTemplate = 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown',
currentPageReportTemplate = '({currentPage} of {totalPages})',
loadingIcon = 'pi pi-spinner',
expandedRowIcon = 'pi pi-chevron-down',
collapsedRowIcon = 'pi pi-chevron-right',
tabIndex = 0,
stateStorage = 'session',
compareSelectionBy = 'deepEquals',
...props
}: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ref?: React.Ref<PrimeDataTable<any>>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any;
}) {
return (
<PrimeDataTable
first={first}
size={size}
editMode={editMode}
sortMode={sortMode}
columnResizeMode={columnResizeMode}
defaultSortOrder={defaultSortOrder}
filterDelay={filterDelay}
filterDisplay={filterDisplay}
pageLinkSize={pageLinkSize}
csvSeparator={csvSeparator}
exportFilename={exportFilename}
breakpoint={breakpoint}
paginatorPosition={paginatorPosition}
paginatorTemplate={paginatorTemplate}
currentPageReportTemplate={currentPageReportTemplate}
loadingIcon={loadingIcon}
expandedRowIcon={expandedRowIcon}
collapsedRowIcon={collapsedRowIcon}
tabIndex={tabIndex}
stateStorage={stateStorage}
compareSelectionBy={compareSelectionBy}
ref={ref}
{...props}
/>
);
}
// DataView — layout:'list', first:0, paginatorPosition:'bottom', pageLinkSize:5,
// loadingIcon:'pi pi-spinner', paginatorTemplate:'...', currentPageReportTemplate:'...'
export function DataView({
layout = 'list',
first = 0,
paginatorPosition = 'bottom',
pageLinkSize = 5,
loadingIcon = 'pi pi-spinner',
paginatorTemplate = 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown',
currentPageReportTemplate = '({currentPage} of {totalPages})',
...props
}: DataViewProps) {
return (
<PrimeDataView
layout={layout}
first={first}
paginatorPosition={paginatorPosition}
pageLinkSize={pageLinkSize}
loadingIcon={loadingIcon}
paginatorTemplate={paginatorTemplate}
currentPageReportTemplate={currentPageReportTemplate}
{...props}
/>
);
}
// Dialog — modal:true, position:'center', draggable:true, resizable:true, closable:true,
// closeOnEscape:true, focusOnShow:true, showHeader:true, keepInViewport:true, minX:0, minY:0
export function Dialog({
modal = true,
position = 'center',
draggable = true,
resizable = true,
closable = true,
closeOnEscape = true,
focusOnShow = true,
showHeader = true,
keepInViewport = true,
minX = 0,
minY = 0,
baseZIndex = 0,
...props
}: DialogProps) {
return (
<PrimeDialog
modal={modal}
position={position}
draggable={draggable}
resizable={resizable}
closable={closable}
closeOnEscape={closeOnEscape}
focusOnShow={focusOnShow}
showHeader={showHeader}
keepInViewport={keepInViewport}
minX={minX}
minY={minY}
baseZIndex={baseZIndex}
{...props}
/>
);
}
// Dropdown — dropdownIcon:'pi pi-chevron-down', scrollHeight:'200px', filterMatchMode:'contains'
export function Dropdown({
dropdownIcon = 'pi pi-chevron-down',
scrollHeight = '200px',
filterMatchMode = 'contains',
...props
}: DropdownProps) {
return (
<PrimeDropdown
dropdownIcon={dropdownIcon}
scrollHeight={scrollHeight}
filterMatchMode={filterMatchMode}
{...props}
/>
);
}
// FileUpload — mode:'advanced', previewWidth:50
export type FileUpload = PrimeFileUpload;
export function FileUpload({
ref,
mode = 'advanced',
previewWidth = 50,
...props
}: FileUploadProps & {ref?: React.Ref<PrimeFileUpload>}) {
return (
<PrimeFileUpload
mode={mode}
previewWidth={previewWidth}
ref={ref}
{...props}
/>
);
}
// Image — no meaningful non-null defaults
export function Image(props: ImageProps) {
return <PrimeImage {...props} />;
}
// InputMask — type:'text', slotChar:'_', autoClear:true
export function InputMask({
type = 'text',
slotChar = '_',
autoClear = true,
...props
}: InputMaskProps) {
return (
<PrimeInputMask
type={type}
slotChar={slotChar}
autoClear={autoClear}
{...props}
/>
);
}
// InputNumber — mode:'decimal', buttonLayout:'stacked', step:1, type:'text',
// incrementButtonIcon:'pi pi-angle-up', decrementButtonIcon:'pi pi-angle-down', useGrouping:true
export function InputNumber({
mode = 'decimal',
buttonLayout = 'stacked',
step = 1,
type = 'text',
incrementButtonIcon = 'pi pi-angle-up',
decrementButtonIcon = 'pi pi-angle-down',
useGrouping = true,
...props
}: InputNumberProps) {
return (
<PrimeInputNumber
mode={mode}
buttonLayout={buttonLayout}
step={step}
type={type}
incrementButtonIcon={incrementButtonIcon}
decrementButtonIcon={decrementButtonIcon}
useGrouping={useGrouping}
{...props}
/>
);
}
// InputText — no meaningful non-null/non-false defaults (validateOnly:false is the default)
export function InputText(props: InputTextProps) {
return <PrimeInputText {...props} />;
}
// InputTextarea — no meaningful non-null defaults (autoResize:false is default)
export function InputTextarea(props: InputTextareaProps) {
return <PrimeInputTextarea {...props} />;
}
// Menubar — no meaningful non-null defaults
export function Menubar(props: MenubarProps) {
return <PrimeMenubar {...props} />;
}
// Message — severity:'info'
export function Message({severity = 'info', ...props}: MessageProps) {
return (
<PrimeMessage
severity={severity}
{...props}
/>
);
}
// MultiSelect — display:'comma', dropdownIcon:'pi pi-chevron-down', scrollHeight:'200px',
// filterMatchMode:'contains', removeIcon:'pi pi-times-circle',
// selectedItemsLabel:'{0} items selected', tabIndex:0
export function MultiSelect({
display = 'comma',
dropdownIcon = 'pi pi-chevron-down',
scrollHeight = '200px',
filterMatchMode = 'contains',
removeIcon = 'pi pi-times-circle',
selectedItemsLabel = '{0} items selected',
tabIndex = 0,
...props
}: MultiSelectProps) {
return (
<PrimeMultiSelect
display={display}
dropdownIcon={dropdownIcon}
scrollHeight={scrollHeight}
filterMatchMode={filterMatchMode}
removeIcon={removeIcon}
selectedItemsLabel={selectedItemsLabel}
tabIndex={tabIndex}
{...props}
/>
);
}
// OverlayPanel — dismissable:true
export type OverlayPanel = PrimeOverlayPanel;
export function OverlayPanel({
ref,
dismissable = true,
...props
}: OverlayPanelProps & {ref?: React.Ref<PrimeOverlayPanel>}) {
return (
<PrimeOverlayPanel
dismissable={dismissable}
ref={ref}
{...props}
/>
);
}
// Panel — expandIcon:'pi pi-plus', collapseIcon:'pi pi-minus'
export function Panel({
expandIcon = 'pi pi-plus',
collapseIcon = 'pi pi-minus',
...props
}: PanelProps) {
return (
<PrimePanel
expandIcon={expandIcon}
collapseIcon={collapseIcon}
{...props}
/>
);
}
// PanelMenu — no meaningful non-null defaults (multiple:false is default)
export function PanelMenu(props: PanelMenuProps) {
return <PrimePanelMenu {...props} />;
}
// Password — feedback:true, mediumRegex:'...', strongRegex:'...'
export function Password({
feedback = false,
mediumRegex = '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})',
strongRegex = '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})',
...props
}: PasswordProps) {
return (
<PrimePassword
feedback={feedback}
mediumRegex={mediumRegex}
strongRegex={strongRegex}
{...props}
/>
);
}
// ProgressBar — showValue:true, unit:'%', mode:'determinate'
export function ProgressBar({
showValue = true,
unit = '%',
mode = 'determinate',
...props
}: ProgressBarProps) {
return (
<PrimeProgressBar
showValue={showValue}
unit={unit}
mode={mode}
{...props}
/>
);
}
// ProgressSpinner — strokeWidth:'2', fill:'none', animationDuration:'2s'
export function ProgressSpinner({
strokeWidth = '2',
fill = 'none',
animationDuration = '2s',
...props
}: ProgressSpinnerProps) {
return (
<PrimeProgressSpinner
strokeWidth={strokeWidth}
fill={fill}
animationDuration={animationDuration}
{...props}
/>
);
}
// SelectButton — unselectable:true
export function SelectButton({unselectable = true, ...props}: SelectButtonProps) {
return (
<PrimeSelectButton
unselectable={unselectable}
{...props}
/>
);
}
// Skeleton — shape:'rectangle', width:'100%', height:'1rem', animation:'wave'
export function Skeleton({
shape = 'rectangle',
width = '100%',
height = '1rem',
animation = 'wave',
...props
}: SkeletonProps) {
return (
<PrimeSkeleton
shape={shape}
width={width}
height={height}
animation={animation}
{...props}
/>
);
}
// SplitButton — dropdownIcon:'pi pi-chevron-down', loadingIcon:'pi pi-spinner pi-spin'
export function SplitButton({
dropdownIcon = 'pi pi-chevron-down',
loadingIcon = 'pi pi-spinner pi-spin',
...props
}: SplitButtonProps) {
return (
<PrimeSplitButton
dropdownIcon={dropdownIcon}
loadingIcon={loadingIcon}
{...props}
/>
);
}
// Splitter — gutterSize:4, layout:'horizontal', stateStorage:'session'
export function Splitter({
gutterSize = 4,
layout = 'horizontal',
stateStorage = 'session',
...props
}: SplitterProps) {
return (
<PrimeSplitter
gutterSize={gutterSize}
layout={layout}
stateStorage={stateStorage}
{...props}
/>
);
}
// Steps — activeIndex:0, readOnly:true
export function Steps({activeIndex = 0, readOnly = true, ...props}: StepsProps) {
return (
<PrimeSteps
activeIndex={activeIndex}
readOnly={readOnly}
{...props}
/>
);
}
// TabMenu — activeIndex:0
export function TabMenu({activeIndex = 0, ...props}: TabMenuProps) {
return (
<PrimeTabMenu
activeIndex={activeIndex}
{...props}
/>
);
}
// TabPanel — thin wrapper that adds `__TYPE` to the prop type.
// React 19 no longer applies defaultProps, so PrimeReact's TabView cannot auto-inject
// __TYPE:'TabPanel' onto elements. Callers pass it explicitly; this wrapper makes that valid.
// TabView never mounts TabPanel — it only reads element.props — so the wrapper is transparent.
export function TabPanel({__TYPE: _type, ...props}: TabPanelProps) {
return <PrimeTabPanel {...(props as PrimeTabPanelProps)} />;
}
// TabView — activeIndex:0, renderActiveOnly:true
export function TabView({activeIndex = 0, renderActiveOnly = true, ...props}: TabViewProps) {
return (
<PrimeTabView
activeIndex={activeIndex}
renderActiveOnly={renderActiveOnly}
{...props}
/>
);
}
// Toast — position:'top-right', baseZIndex:0, appendTo:'self'
export type Toast = PrimeToast;
export function Toast({
ref,
position = 'top-right',
baseZIndex = 0,
appendTo = 'self',
...props
}: ToastProps & {ref?: React.Ref<PrimeToast>}) {
return (
<PrimeToast
position={position}
baseZIndex={baseZIndex}
appendTo={appendTo}
ref={ref}
{...props}
/>
);
}
// Toolbar — no meaningful non-null defaults
export function Toolbar(props: ToolbarProps) {
return <PrimeToolbar {...props} />;
}
// Tree — filterBy:'label', filterMode:'lenient', loadingIcon:'pi pi-spinner'
// propagateSelectionUp:true, propagateSelectionDown:true, showHeader:true
export function Tree({
filterBy = 'label',
filterMode = 'lenient',
loadingIcon = 'pi pi-spinner',
propagateSelectionUp = true,
propagateSelectionDown = true,
showHeader = true,
...props
}: TreeProps) {
return (
<PrimeTree
filterBy={filterBy}
filterMode={filterMode}
loadingIcon={loadingIcon}
propagateSelectionUp={propagateSelectionUp}
propagateSelectionDown={propagateSelectionDown}
showHeader={showHeader}
{...props}
/>
);
}
// TreeSelect — display:'comma', dropdownIcon:'pi pi-chevron-down', scrollHeight:'400px',
// filterBy:'label', filterMode:'lenient', selectionMode:'single'
export function TreeSelect({
display = 'comma',
dropdownIcon = 'pi pi-chevron-down',
scrollHeight = '400px',
filterBy = 'label',
filterMode = 'lenient',
selectionMode = 'single',
...props
}: TreeSelectProps) {
return (
<PrimeTreeSelect
display={display}
dropdownIcon={dropdownIcon}
scrollHeight={scrollHeight}
filterBy={filterBy}
filterMode={filterMode}
selectionMode={selectionMode}
{...props}
/>
);
}
// TreeTable — first:0, sortMode:'single', columnResizeMode:'fit', defaultSortOrder:1,
// filterDelay:300, filterMode:'lenient', pageLinkSize:5, loadingIcon:'pi pi-spinner',
// paginatorPosition:'bottom', paginatorTemplate:'...', currentPageReportTemplate:'...',
// propagateSelectionUp:true, propagateSelectionDown:true, tabIndex:0, stateStorage:'session'
export function TreeTable({
sortMode = 'single',
columnResizeMode = 'fit',
defaultSortOrder = 1,
filterDelay = 300,
filterMode = 'lenient',
pageLinkSize = 5,
loadingIcon = 'pi pi-spinner',
paginatorPosition = 'bottom',
paginatorTemplate = 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown',
currentPageReportTemplate = '({currentPage} of {totalPages})',
propagateSelectionUp = true,
propagateSelectionDown = true,
tabIndex = 0,
...props
}: TreeTableProps) {
return (
<PrimeTreeTable
sortMode={sortMode}
columnResizeMode={columnResizeMode}
defaultSortOrder={defaultSortOrder}
filterDelay={filterDelay}
filterMode={filterMode}
pageLinkSize={pageLinkSize}
loadingIcon={loadingIcon}
paginatorPosition={paginatorPosition}
paginatorTemplate={paginatorTemplate}
currentPageReportTemplate={currentPageReportTemplate}
propagateSelectionUp={propagateSelectionUp}
propagateSelectionDown={propagateSelectionDown}
tabIndex={tabIndex}
{...props}
/>
);
}
|