primeng 20.1.2 → 20.3.0-rc.1
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/accordion/index.d.ts +33 -14
- package/animateonscroll/index.d.ts +7 -8
- package/api/index.d.ts +132 -5
- package/autocomplete/index.d.ts +59 -203
- package/autofocus/index.d.ts +2 -2
- package/avatar/index.d.ts +12 -5
- package/avatargroup/index.d.ts +11 -6
- package/badge/index.d.ts +23 -15
- package/base/index.d.ts +7 -12
- package/basecomponent/index.d.ts +148 -30
- package/baseeditableholder/index.d.ts +7 -7
- package/baseinput/index.d.ts +15 -15
- package/basemodelholder/index.d.ts +3 -3
- package/bind/index.d.ts +38 -0
- package/blockui/index.d.ts +17 -21
- package/breadcrumb/index.d.ts +16 -47
- package/button/index.d.ts +123 -163
- package/buttongroup/index.d.ts +1 -1
- package/card/index.d.ts +19 -37
- package/carousel/index.d.ts +24 -80
- package/cascadeselect/index.d.ts +32 -140
- package/chart/index.d.ts +13 -7
- package/checkbox/index.d.ts +19 -38
- package/chip/index.d.ts +28 -39
- package/classnames/index.d.ts +32 -0
- package/colorpicker/index.d.ts +15 -27
- package/config/index.d.ts +205 -26
- package/confirmdialog/index.d.ts +25 -52
- package/confirmpopup/index.d.ts +15 -36
- package/contextmenu/index.d.ts +23 -12
- package/dataview/index.d.ts +18 -185
- package/datepicker/index.d.ts +24 -216
- package/dialog/index.d.ts +20 -43
- package/divider/index.d.ts +12 -6
- package/dock/index.d.ts +19 -31
- package/dom/index.d.ts +4 -4
- package/drawer/index.d.ts +16 -37
- package/dynamicdialog/index.d.ts +75 -83
- package/editor/index.d.ts +16 -132
- package/fesm2022/primeng-accordion.mjs +107 -59
- package/fesm2022/primeng-accordion.mjs.map +1 -1
- package/fesm2022/primeng-animateonscroll.mjs +11 -14
- package/fesm2022/primeng-animateonscroll.mjs.map +1 -1
- package/fesm2022/primeng-api.mjs +31 -31
- package/fesm2022/primeng-autocomplete.mjs +256 -96
- package/fesm2022/primeng-autocomplete.mjs.map +1 -1
- package/fesm2022/primeng-autofocus.mjs +9 -9
- package/fesm2022/primeng-autofocus.mjs.map +1 -1
- package/fesm2022/primeng-avatar.mjs +33 -24
- package/fesm2022/primeng-avatar.mjs.map +1 -1
- package/fesm2022/primeng-avatargroup.mjs +24 -22
- package/fesm2022/primeng-avatargroup.mjs.map +1 -1
- package/fesm2022/primeng-badge.mjs +67 -49
- package/fesm2022/primeng-badge.mjs.map +1 -1
- package/fesm2022/primeng-base.mjs +10 -13
- package/fesm2022/primeng-base.mjs.map +1 -1
- package/fesm2022/primeng-basecomponent.mjs +345 -94
- package/fesm2022/primeng-basecomponent.mjs.map +1 -1
- package/fesm2022/primeng-baseeditableholder.mjs +3 -3
- package/fesm2022/primeng-baseeditableholder.mjs.map +1 -1
- package/fesm2022/primeng-baseinput.mjs +3 -3
- package/fesm2022/primeng-baseinput.mjs.map +1 -1
- package/fesm2022/primeng-basemodelholder.mjs +3 -3
- package/fesm2022/primeng-basemodelholder.mjs.map +1 -1
- package/fesm2022/primeng-bind.mjs +94 -0
- package/fesm2022/primeng-bind.mjs.map +1 -0
- package/fesm2022/primeng-blockui.mjs +30 -24
- package/fesm2022/primeng-blockui.mjs.map +1 -1
- package/fesm2022/primeng-breadcrumb.mjs +97 -72
- package/fesm2022/primeng-breadcrumb.mjs.map +1 -1
- package/fesm2022/primeng-button.mjs +248 -207
- package/fesm2022/primeng-button.mjs.map +1 -1
- package/fesm2022/primeng-buttongroup.mjs +14 -14
- package/fesm2022/primeng-buttongroup.mjs.map +1 -1
- package/fesm2022/primeng-card.mjs +58 -38
- package/fesm2022/primeng-card.mjs.map +1 -1
- package/fesm2022/primeng-carousel.mjs +154 -57
- package/fesm2022/primeng-carousel.mjs.map +1 -1
- package/fesm2022/primeng-cascadeselect.mjs +237 -203
- package/fesm2022/primeng-cascadeselect.mjs.map +1 -1
- package/fesm2022/primeng-chart.mjs +43 -20
- package/fesm2022/primeng-chart.mjs.map +1 -1
- package/fesm2022/primeng-checkbox.mjs +50 -35
- package/fesm2022/primeng-checkbox.mjs.map +1 -1
- package/fesm2022/primeng-chip.mjs +79 -41
- package/fesm2022/primeng-chip.mjs.map +1 -1
- package/fesm2022/primeng-classnames.mjs +48 -0
- package/fesm2022/primeng-classnames.mjs.map +1 -0
- package/fesm2022/primeng-colorpicker.mjs +49 -41
- package/fesm2022/primeng-colorpicker.mjs.map +1 -1
- package/fesm2022/primeng-config.mjs +25 -9
- package/fesm2022/primeng-config.mjs.map +1 -1
- package/fesm2022/primeng-confirmdialog.mjs +63 -33
- package/fesm2022/primeng-confirmdialog.mjs.map +1 -1
- package/fesm2022/primeng-confirmpopup.mjs +59 -41
- package/fesm2022/primeng-confirmpopup.mjs.map +1 -1
- package/fesm2022/primeng-contextmenu.mjs +140 -90
- package/fesm2022/primeng-contextmenu.mjs.map +1 -1
- package/fesm2022/primeng-dataview.mjs +52 -43
- package/fesm2022/primeng-dataview.mjs.map +1 -1
- package/fesm2022/primeng-datepicker.mjs +305 -199
- package/fesm2022/primeng-datepicker.mjs.map +1 -1
- package/fesm2022/primeng-dialog.mjs +96 -44
- package/fesm2022/primeng-dialog.mjs.map +1 -1
- package/fesm2022/primeng-divider.mjs +29 -21
- package/fesm2022/primeng-divider.mjs.map +1 -1
- package/fesm2022/primeng-dock.mjs +73 -51
- package/fesm2022/primeng-dock.mjs.map +1 -1
- package/fesm2022/primeng-dom.mjs +13 -10
- package/fesm2022/primeng-dom.mjs.map +1 -1
- package/fesm2022/primeng-dragdrop.mjs +10 -10
- package/fesm2022/primeng-drawer.mjs +71 -51
- package/fesm2022/primeng-drawer.mjs.map +1 -1
- package/fesm2022/primeng-dynamicdialog.mjs +377 -571
- package/fesm2022/primeng-dynamicdialog.mjs.map +1 -1
- package/fesm2022/primeng-editor.mjs +102 -90
- package/fesm2022/primeng-editor.mjs.map +1 -1
- package/fesm2022/primeng-fieldset.mjs +66 -48
- package/fesm2022/primeng-fieldset.mjs.map +1 -1
- package/fesm2022/primeng-fileupload.mjs +127 -122
- package/fesm2022/primeng-fileupload.mjs.map +1 -1
- package/fesm2022/primeng-floatlabel.mjs +28 -19
- package/fesm2022/primeng-floatlabel.mjs.map +1 -1
- package/fesm2022/primeng-fluid.mjs +24 -16
- package/fesm2022/primeng-fluid.mjs.map +1 -1
- package/fesm2022/primeng-focustrap.mjs +9 -11
- package/fesm2022/primeng-focustrap.mjs.map +1 -1
- package/fesm2022/primeng-galleria.mjs +368 -232
- package/fesm2022/primeng-galleria.mjs.map +1 -1
- package/fesm2022/primeng-iconfield.mjs +30 -18
- package/fesm2022/primeng-iconfield.mjs.map +1 -1
- package/fesm2022/primeng-icons-angledoubledown.mjs +3 -3
- package/fesm2022/primeng-icons-angledoubleleft.mjs +3 -3
- package/fesm2022/primeng-icons-angledoubleright.mjs +3 -3
- package/fesm2022/primeng-icons-angledoubleup.mjs +3 -3
- package/fesm2022/primeng-icons-angledown.mjs +3 -3
- package/fesm2022/primeng-icons-angleleft.mjs +3 -3
- package/fesm2022/primeng-icons-angleright.mjs +3 -3
- package/fesm2022/primeng-icons-angleup.mjs +3 -3
- package/fesm2022/primeng-icons-arrowdown.mjs +4 -5
- package/fesm2022/primeng-icons-arrowdown.mjs.map +1 -1
- package/fesm2022/primeng-icons-arrowdownleft.mjs +3 -3
- package/fesm2022/primeng-icons-arrowdownright.mjs +3 -3
- package/fesm2022/primeng-icons-arrowleft.mjs +4 -5
- package/fesm2022/primeng-icons-arrowleft.mjs.map +1 -1
- package/fesm2022/primeng-icons-arrowright.mjs +3 -3
- package/fesm2022/primeng-icons-arrowup.mjs +4 -5
- package/fesm2022/primeng-icons-arrowup.mjs.map +1 -1
- package/fesm2022/primeng-icons-ban.mjs +4 -5
- package/fesm2022/primeng-icons-ban.mjs.map +1 -1
- package/fesm2022/primeng-icons-bars.mjs +3 -3
- package/fesm2022/primeng-icons-baseicon.mjs +7 -6
- package/fesm2022/primeng-icons-baseicon.mjs.map +1 -1
- package/fesm2022/primeng-icons-blank.mjs +3 -3
- package/fesm2022/primeng-icons-calendar.mjs +3 -3
- package/fesm2022/primeng-icons-caretleft.mjs +3 -3
- package/fesm2022/primeng-icons-caretright.mjs +3 -3
- package/fesm2022/primeng-icons-check.mjs +3 -3
- package/fesm2022/primeng-icons-chevrondown.mjs +3 -3
- package/fesm2022/primeng-icons-chevronleft.mjs +3 -3
- package/fesm2022/primeng-icons-chevronright.mjs +3 -3
- package/fesm2022/primeng-icons-chevronup.mjs +3 -3
- package/fesm2022/primeng-icons-exclamationtriangle.mjs +4 -5
- package/fesm2022/primeng-icons-exclamationtriangle.mjs.map +1 -1
- package/fesm2022/primeng-icons-eye.mjs +3 -3
- package/fesm2022/primeng-icons-eyeslash.mjs +4 -5
- package/fesm2022/primeng-icons-eyeslash.mjs.map +1 -1
- package/fesm2022/primeng-icons-filter.mjs +4 -5
- package/fesm2022/primeng-icons-filter.mjs.map +1 -1
- package/fesm2022/primeng-icons-filterfill.mjs +3 -3
- package/fesm2022/primeng-icons-filterslash.mjs +4 -5
- package/fesm2022/primeng-icons-filterslash.mjs.map +1 -1
- package/fesm2022/primeng-icons-home.mjs +4 -5
- package/fesm2022/primeng-icons-home.mjs.map +1 -1
- package/fesm2022/primeng-icons-infocircle.mjs +4 -5
- package/fesm2022/primeng-icons-infocircle.mjs.map +1 -1
- package/fesm2022/primeng-icons-minus.mjs +3 -3
- package/fesm2022/primeng-icons-pencil.mjs +4 -5
- package/fesm2022/primeng-icons-pencil.mjs.map +1 -1
- package/fesm2022/primeng-icons-plus.mjs +4 -5
- package/fesm2022/primeng-icons-plus.mjs.map +1 -1
- package/fesm2022/primeng-icons-refresh.mjs +4 -5
- package/fesm2022/primeng-icons-refresh.mjs.map +1 -1
- package/fesm2022/primeng-icons-search.mjs +4 -5
- package/fesm2022/primeng-icons-search.mjs.map +1 -1
- package/fesm2022/primeng-icons-searchminus.mjs +4 -5
- package/fesm2022/primeng-icons-searchminus.mjs.map +1 -1
- package/fesm2022/primeng-icons-searchplus.mjs +4 -5
- package/fesm2022/primeng-icons-searchplus.mjs.map +1 -1
- package/fesm2022/primeng-icons-sortalt.mjs +4 -5
- package/fesm2022/primeng-icons-sortalt.mjs.map +1 -1
- package/fesm2022/primeng-icons-sortamountdown.mjs +4 -5
- package/fesm2022/primeng-icons-sortamountdown.mjs.map +1 -1
- package/fesm2022/primeng-icons-sortamountupalt.mjs +4 -5
- package/fesm2022/primeng-icons-sortamountupalt.mjs.map +1 -1
- package/fesm2022/primeng-icons-spinner.mjs +4 -5
- package/fesm2022/primeng-icons-spinner.mjs.map +1 -1
- package/fesm2022/primeng-icons-star.mjs +4 -5
- package/fesm2022/primeng-icons-star.mjs.map +1 -1
- package/fesm2022/primeng-icons-starfill.mjs +4 -5
- package/fesm2022/primeng-icons-starfill.mjs.map +1 -1
- package/fesm2022/primeng-icons-thlarge.mjs +4 -5
- package/fesm2022/primeng-icons-thlarge.mjs.map +1 -1
- package/fesm2022/primeng-icons-times.mjs +3 -3
- package/fesm2022/primeng-icons-timescircle.mjs +4 -5
- package/fesm2022/primeng-icons-timescircle.mjs.map +1 -1
- package/fesm2022/primeng-icons-trash.mjs +4 -5
- package/fesm2022/primeng-icons-trash.mjs.map +1 -1
- package/fesm2022/primeng-icons-undo.mjs +4 -5
- package/fesm2022/primeng-icons-undo.mjs.map +1 -1
- package/fesm2022/primeng-icons-upload.mjs +4 -5
- package/fesm2022/primeng-icons-upload.mjs.map +1 -1
- package/fesm2022/primeng-icons-windowmaximize.mjs +4 -5
- package/fesm2022/primeng-icons-windowmaximize.mjs.map +1 -1
- package/fesm2022/primeng-icons-windowminimize.mjs +4 -5
- package/fesm2022/primeng-icons-windowminimize.mjs.map +1 -1
- package/fesm2022/primeng-iftalabel.mjs +27 -17
- package/fesm2022/primeng-iftalabel.mjs.map +1 -1
- package/fesm2022/primeng-image.mjs +100 -47
- package/fesm2022/primeng-image.mjs.map +1 -1
- package/fesm2022/primeng-imagecompare.mjs +31 -24
- package/fesm2022/primeng-imagecompare.mjs.map +1 -1
- package/fesm2022/primeng-inplace.mjs +46 -36
- package/fesm2022/primeng-inplace.mjs.map +1 -1
- package/fesm2022/primeng-inputgroup.mjs +28 -21
- package/fesm2022/primeng-inputgroup.mjs.map +1 -1
- package/fesm2022/primeng-inputgroupaddon.mjs +25 -19
- package/fesm2022/primeng-inputgroupaddon.mjs.map +1 -1
- package/fesm2022/primeng-inputicon.mjs +27 -15
- package/fesm2022/primeng-inputicon.mjs.map +1 -1
- package/fesm2022/primeng-inputmask.mjs +50 -32
- package/fesm2022/primeng-inputmask.mjs.map +1 -1
- package/fesm2022/primeng-inputnumber.mjs +109 -81
- package/fesm2022/primeng-inputnumber.mjs.map +1 -1
- package/fesm2022/primeng-inputotp.mjs +32 -20
- package/fesm2022/primeng-inputotp.mjs.map +1 -1
- package/fesm2022/primeng-inputtext.mjs +39 -20
- package/fesm2022/primeng-inputtext.mjs.map +1 -1
- package/fesm2022/primeng-keyfilter.mjs +19 -10
- package/fesm2022/primeng-keyfilter.mjs.map +1 -1
- package/fesm2022/primeng-knob.mjs +35 -27
- package/fesm2022/primeng-knob.mjs.map +1 -1
- package/fesm2022/primeng-listbox.mjs +254 -88
- package/fesm2022/primeng-listbox.mjs.map +1 -1
- package/fesm2022/primeng-megamenu.mjs +371 -351
- package/fesm2022/primeng-megamenu.mjs.map +1 -1
- package/fesm2022/primeng-menu.mjs +126 -79
- package/fesm2022/primeng-menu.mjs.map +1 -1
- package/fesm2022/primeng-menubar.mjs +133 -96
- package/fesm2022/primeng-menubar.mjs.map +1 -1
- package/fesm2022/primeng-message.mjs +66 -55
- package/fesm2022/primeng-message.mjs.map +1 -1
- package/fesm2022/primeng-metergroup.mjs +67 -48
- package/fesm2022/primeng-metergroup.mjs.map +1 -1
- package/fesm2022/primeng-multiselect.mjs +238 -179
- package/fesm2022/primeng-multiselect.mjs.map +1 -1
- package/fesm2022/primeng-orderlist.mjs +218 -81
- package/fesm2022/primeng-orderlist.mjs.map +1 -1
- package/fesm2022/primeng-organizationchart.mjs +93 -67
- package/fesm2022/primeng-organizationchart.mjs.map +1 -1
- package/fesm2022/primeng-overlay.mjs +72 -81
- package/fesm2022/primeng-overlay.mjs.map +1 -1
- package/fesm2022/primeng-overlaybadge.mjs +31 -22
- package/fesm2022/primeng-overlaybadge.mjs.map +1 -1
- package/fesm2022/primeng-paginator.mjs +66 -54
- package/fesm2022/primeng-paginator.mjs.map +1 -1
- package/fesm2022/primeng-panel.mjs +109 -80
- package/fesm2022/primeng-panel.mjs.map +1 -1
- package/fesm2022/primeng-panelmenu.mjs +394 -316
- package/fesm2022/primeng-panelmenu.mjs.map +1 -1
- package/fesm2022/primeng-passthrough.mjs +21 -0
- package/fesm2022/primeng-passthrough.mjs.map +1 -0
- package/fesm2022/primeng-password.mjs +89 -72
- package/fesm2022/primeng-password.mjs.map +1 -1
- package/fesm2022/primeng-picklist.mjs +271 -132
- package/fesm2022/primeng-picklist.mjs.map +1 -1
- package/fesm2022/primeng-popover.mjs +45 -34
- package/fesm2022/primeng-popover.mjs.map +1 -1
- package/fesm2022/primeng-progressbar.mjs +37 -29
- package/fesm2022/primeng-progressbar.mjs.map +1 -1
- package/fesm2022/primeng-progressspinner.mjs +30 -23
- package/fesm2022/primeng-progressspinner.mjs.map +1 -1
- package/fesm2022/primeng-radiobutton.mjs +43 -34
- package/fesm2022/primeng-radiobutton.mjs.map +1 -1
- package/fesm2022/primeng-rating.mjs +49 -39
- package/fesm2022/primeng-rating.mjs.map +1 -1
- package/fesm2022/primeng-ripple.mjs +17 -19
- package/fesm2022/primeng-ripple.mjs.map +1 -1
- package/fesm2022/primeng-scroller.mjs +50 -42
- package/fesm2022/primeng-scroller.mjs.map +1 -1
- package/fesm2022/primeng-scrollpanel.mjs +55 -48
- package/fesm2022/primeng-scrollpanel.mjs.map +1 -1
- package/fesm2022/primeng-scrolltop.mjs +31 -21
- package/fesm2022/primeng-scrolltop.mjs.map +1 -1
- package/fesm2022/primeng-select.mjs +204 -107
- package/fesm2022/primeng-select.mjs.map +1 -1
- package/fesm2022/primeng-selectbutton.mjs +38 -27
- package/fesm2022/primeng-selectbutton.mjs.map +1 -1
- package/fesm2022/primeng-skeleton.mjs +24 -17
- package/fesm2022/primeng-skeleton.mjs.map +1 -1
- package/fesm2022/primeng-slider.mjs +47 -27
- package/fesm2022/primeng-slider.mjs.map +1 -1
- package/fesm2022/primeng-speeddial.mjs +88 -56
- package/fesm2022/primeng-speeddial.mjs.map +1 -1
- package/fesm2022/primeng-splitbutton.mjs +43 -26
- package/fesm2022/primeng-splitbutton.mjs.map +1 -1
- package/fesm2022/primeng-splitter.mjs +49 -45
- package/fesm2022/primeng-splitter.mjs.map +1 -1
- package/fesm2022/primeng-stepper.mjs +163 -88
- package/fesm2022/primeng-stepper.mjs.map +1 -1
- package/fesm2022/primeng-steps.mjs +19 -21
- package/fesm2022/primeng-steps.mjs.map +1 -1
- package/fesm2022/primeng-styleclass.mjs +8 -8
- package/fesm2022/primeng-styleclass.mjs.map +1 -1
- package/fesm2022/primeng-table.mjs +766 -675
- package/fesm2022/primeng-table.mjs.map +1 -1
- package/fesm2022/primeng-tabs.mjs +242 -131
- package/fesm2022/primeng-tabs.mjs.map +1 -1
- package/fesm2022/primeng-tag.mjs +35 -25
- package/fesm2022/primeng-tag.mjs.map +1 -1
- package/fesm2022/primeng-terminal.mjs +51 -45
- package/fesm2022/primeng-terminal.mjs.map +1 -1
- package/fesm2022/primeng-textarea.mjs +29 -24
- package/fesm2022/primeng-textarea.mjs.map +1 -1
- package/fesm2022/primeng-tieredmenu.mjs +147 -83
- package/fesm2022/primeng-tieredmenu.mjs.map +1 -1
- package/fesm2022/primeng-timeline.mjs +42 -34
- package/fesm2022/primeng-timeline.mjs.map +1 -1
- package/fesm2022/primeng-toast.mjs +67 -61
- package/fesm2022/primeng-toast.mjs.map +1 -1
- package/fesm2022/primeng-togglebutton.mjs +46 -29
- package/fesm2022/primeng-togglebutton.mjs.map +1 -1
- package/fesm2022/primeng-toggleswitch.mjs +39 -29
- package/fesm2022/primeng-toggleswitch.mjs.map +1 -1
- package/fesm2022/primeng-toolbar.mjs +37 -29
- package/fesm2022/primeng-toolbar.mjs.map +1 -1
- package/fesm2022/primeng-tooltip.mjs +37 -37
- package/fesm2022/primeng-tooltip.mjs.map +1 -1
- package/fesm2022/primeng-tree.mjs +330 -310
- package/fesm2022/primeng-tree.mjs.map +1 -1
- package/fesm2022/primeng-treeselect.mjs +101 -55
- package/fesm2022/primeng-treeselect.mjs.map +1 -1
- package/fesm2022/primeng-treetable.mjs +305 -264
- package/fesm2022/primeng-treetable.mjs.map +1 -1
- package/fesm2022/primeng-types-accordion.mjs +4 -0
- package/fesm2022/primeng-types-accordion.mjs.map +1 -0
- package/fesm2022/primeng-types-autocomplete.mjs +4 -0
- package/fesm2022/primeng-types-autocomplete.mjs.map +1 -0
- package/fesm2022/primeng-types-avatar.mjs +4 -0
- package/fesm2022/primeng-types-avatar.mjs.map +1 -0
- package/fesm2022/primeng-types-avatargroup.mjs +4 -0
- package/fesm2022/primeng-types-avatargroup.mjs.map +1 -0
- package/fesm2022/primeng-types-badge.mjs +4 -0
- package/fesm2022/primeng-types-badge.mjs.map +1 -0
- package/fesm2022/primeng-types-blockui.mjs +4 -0
- package/fesm2022/primeng-types-blockui.mjs.map +1 -0
- package/fesm2022/primeng-types-breadcrumb.mjs +4 -0
- package/fesm2022/primeng-types-breadcrumb.mjs.map +1 -0
- package/fesm2022/primeng-types-button.mjs +4 -0
- package/fesm2022/primeng-types-button.mjs.map +1 -0
- package/fesm2022/primeng-types-card.mjs +4 -0
- package/fesm2022/primeng-types-card.mjs.map +1 -0
- package/fesm2022/primeng-types-carousel.mjs +4 -0
- package/fesm2022/primeng-types-carousel.mjs.map +1 -0
- package/fesm2022/primeng-types-cascadeselect.mjs +4 -0
- package/fesm2022/primeng-types-cascadeselect.mjs.map +1 -0
- package/fesm2022/primeng-types-chart.mjs +4 -0
- package/fesm2022/primeng-types-chart.mjs.map +1 -0
- package/fesm2022/primeng-types-checkbox.mjs +4 -0
- package/fesm2022/primeng-types-checkbox.mjs.map +1 -0
- package/fesm2022/primeng-types-chip.mjs +4 -0
- package/fesm2022/primeng-types-chip.mjs.map +1 -0
- package/fesm2022/primeng-types-colorpicker.mjs +4 -0
- package/fesm2022/primeng-types-colorpicker.mjs.map +1 -0
- package/fesm2022/primeng-types-confirmdialog.mjs +4 -0
- package/fesm2022/primeng-types-confirmdialog.mjs.map +1 -0
- package/fesm2022/primeng-types-confirmpopup.mjs +4 -0
- package/fesm2022/primeng-types-confirmpopup.mjs.map +1 -0
- package/fesm2022/primeng-types-contextmenu.mjs +4 -0
- package/fesm2022/primeng-types-contextmenu.mjs.map +1 -0
- package/fesm2022/primeng-types-dataview.mjs +4 -0
- package/fesm2022/primeng-types-dataview.mjs.map +1 -0
- package/fesm2022/primeng-types-datepicker.mjs +4 -0
- package/fesm2022/primeng-types-datepicker.mjs.map +1 -0
- package/fesm2022/primeng-types-dialog.mjs +4 -0
- package/fesm2022/primeng-types-dialog.mjs.map +1 -0
- package/fesm2022/primeng-types-divider.mjs +4 -0
- package/fesm2022/primeng-types-divider.mjs.map +1 -0
- package/fesm2022/primeng-types-dock.mjs +4 -0
- package/fesm2022/primeng-types-dock.mjs.map +1 -0
- package/fesm2022/primeng-types-drawer.mjs +4 -0
- package/fesm2022/primeng-types-drawer.mjs.map +1 -0
- package/fesm2022/primeng-types-editor.mjs +4 -0
- package/fesm2022/primeng-types-editor.mjs.map +1 -0
- package/fesm2022/primeng-types-fieldset.mjs +4 -0
- package/fesm2022/primeng-types-fieldset.mjs.map +1 -0
- package/fesm2022/primeng-types-fileupload.mjs +4 -0
- package/fesm2022/primeng-types-fileupload.mjs.map +1 -0
- package/fesm2022/primeng-types-floatlabel.mjs +4 -0
- package/fesm2022/primeng-types-floatlabel.mjs.map +1 -0
- package/fesm2022/primeng-types-fluid.mjs +4 -0
- package/fesm2022/primeng-types-fluid.mjs.map +1 -0
- package/fesm2022/primeng-types-galleria.mjs +4 -0
- package/fesm2022/primeng-types-galleria.mjs.map +1 -0
- package/fesm2022/primeng-types-iconfield.mjs +4 -0
- package/fesm2022/primeng-types-iconfield.mjs.map +1 -0
- package/fesm2022/primeng-types-iftalabel.mjs +4 -0
- package/fesm2022/primeng-types-iftalabel.mjs.map +1 -0
- package/fesm2022/primeng-types-image.mjs +4 -0
- package/fesm2022/primeng-types-image.mjs.map +1 -0
- package/fesm2022/primeng-types-imagecompare.mjs +4 -0
- package/fesm2022/primeng-types-imagecompare.mjs.map +1 -0
- package/fesm2022/primeng-types-inplace.mjs +4 -0
- package/fesm2022/primeng-types-inplace.mjs.map +1 -0
- package/fesm2022/primeng-types-inputgroup.mjs +4 -0
- package/fesm2022/primeng-types-inputgroup.mjs.map +1 -0
- package/fesm2022/primeng-types-inputgroupaddon.mjs +4 -0
- package/fesm2022/primeng-types-inputgroupaddon.mjs.map +1 -0
- package/fesm2022/primeng-types-inputicon.mjs +4 -0
- package/fesm2022/primeng-types-inputicon.mjs.map +1 -0
- package/fesm2022/primeng-types-inputmask.mjs +4 -0
- package/fesm2022/primeng-types-inputmask.mjs.map +1 -0
- package/fesm2022/primeng-types-inputnumber.mjs +4 -0
- package/fesm2022/primeng-types-inputnumber.mjs.map +1 -0
- package/fesm2022/primeng-types-inputotp.mjs +4 -0
- package/fesm2022/primeng-types-inputotp.mjs.map +1 -0
- package/fesm2022/primeng-types-inputtext.mjs +4 -0
- package/fesm2022/primeng-types-inputtext.mjs.map +1 -0
- package/fesm2022/primeng-types-knob.mjs +4 -0
- package/fesm2022/primeng-types-knob.mjs.map +1 -0
- package/fesm2022/primeng-types-listbox.mjs +4 -0
- package/fesm2022/primeng-types-listbox.mjs.map +1 -0
- package/fesm2022/primeng-types-megamenu.mjs +4 -0
- package/fesm2022/primeng-types-megamenu.mjs.map +1 -0
- package/fesm2022/primeng-types-menu.mjs +4 -0
- package/fesm2022/primeng-types-menu.mjs.map +1 -0
- package/fesm2022/primeng-types-menubar.mjs +4 -0
- package/fesm2022/primeng-types-menubar.mjs.map +1 -0
- package/fesm2022/primeng-types-message.mjs +4 -0
- package/fesm2022/primeng-types-message.mjs.map +1 -0
- package/fesm2022/primeng-types-metergroup.mjs +4 -0
- package/fesm2022/primeng-types-metergroup.mjs.map +1 -0
- package/fesm2022/primeng-types-multiselect.mjs +4 -0
- package/fesm2022/primeng-types-multiselect.mjs.map +1 -0
- package/fesm2022/primeng-types-orderlist.mjs +4 -0
- package/fesm2022/primeng-types-orderlist.mjs.map +1 -0
- package/fesm2022/primeng-types-organizationchart.mjs +4 -0
- package/fesm2022/primeng-types-organizationchart.mjs.map +1 -0
- package/fesm2022/primeng-types-overlay.mjs +4 -0
- package/fesm2022/primeng-types-overlay.mjs.map +1 -0
- package/fesm2022/primeng-types-overlaybadge.mjs +4 -0
- package/fesm2022/primeng-types-overlaybadge.mjs.map +1 -0
- package/fesm2022/primeng-types-paginator.mjs +4 -0
- package/fesm2022/primeng-types-paginator.mjs.map +1 -0
- package/fesm2022/primeng-types-panel.mjs +4 -0
- package/fesm2022/primeng-types-panel.mjs.map +1 -0
- package/fesm2022/primeng-types-panelmenu.mjs +4 -0
- package/fesm2022/primeng-types-panelmenu.mjs.map +1 -0
- package/fesm2022/primeng-types-password.mjs +4 -0
- package/fesm2022/primeng-types-password.mjs.map +1 -0
- package/fesm2022/primeng-types-picklist.mjs +4 -0
- package/fesm2022/primeng-types-picklist.mjs.map +1 -0
- package/fesm2022/primeng-types-popover.mjs +4 -0
- package/fesm2022/primeng-types-popover.mjs.map +1 -0
- package/fesm2022/primeng-types-progressbar.mjs +4 -0
- package/fesm2022/primeng-types-progressbar.mjs.map +1 -0
- package/fesm2022/primeng-types-progressspinner.mjs +4 -0
- package/fesm2022/primeng-types-progressspinner.mjs.map +1 -0
- package/fesm2022/primeng-types-radiobutton.mjs +4 -0
- package/fesm2022/primeng-types-radiobutton.mjs.map +1 -0
- package/fesm2022/primeng-types-rating.mjs +4 -0
- package/fesm2022/primeng-types-rating.mjs.map +1 -0
- package/fesm2022/primeng-types-scroller.mjs +4 -0
- package/fesm2022/primeng-types-scroller.mjs.map +1 -0
- package/fesm2022/primeng-types-scrollpanel.mjs +4 -0
- package/fesm2022/primeng-types-scrollpanel.mjs.map +1 -0
- package/fesm2022/primeng-types-scrolltop.mjs +4 -0
- package/fesm2022/primeng-types-scrolltop.mjs.map +1 -0
- package/fesm2022/primeng-types-select.mjs +4 -0
- package/fesm2022/primeng-types-select.mjs.map +1 -0
- package/fesm2022/primeng-types-selectbutton.mjs +4 -0
- package/fesm2022/primeng-types-selectbutton.mjs.map +1 -0
- package/fesm2022/primeng-types-skeleton.mjs +4 -0
- package/fesm2022/primeng-types-skeleton.mjs.map +1 -0
- package/fesm2022/primeng-types-slider.mjs +4 -0
- package/fesm2022/primeng-types-slider.mjs.map +1 -0
- package/fesm2022/primeng-types-speeddial.mjs +4 -0
- package/fesm2022/primeng-types-speeddial.mjs.map +1 -0
- package/fesm2022/primeng-types-splitbutton.mjs +4 -0
- package/fesm2022/primeng-types-splitbutton.mjs.map +1 -0
- package/fesm2022/primeng-types-splitter.mjs +4 -0
- package/fesm2022/primeng-types-splitter.mjs.map +1 -0
- package/fesm2022/primeng-types-stepper.mjs +4 -0
- package/fesm2022/primeng-types-stepper.mjs.map +1 -0
- package/fesm2022/primeng-types-table.mjs +4 -0
- package/fesm2022/primeng-types-table.mjs.map +1 -0
- package/fesm2022/primeng-types-tabs.mjs +4 -0
- package/fesm2022/primeng-types-tabs.mjs.map +1 -0
- package/fesm2022/primeng-types-tag.mjs +4 -0
- package/fesm2022/primeng-types-tag.mjs.map +1 -0
- package/fesm2022/primeng-types-terminal.mjs +4 -0
- package/fesm2022/primeng-types-terminal.mjs.map +1 -0
- package/fesm2022/primeng-types-textarea.mjs +4 -0
- package/fesm2022/primeng-types-textarea.mjs.map +1 -0
- package/fesm2022/primeng-types-tieredmenu.mjs +4 -0
- package/fesm2022/primeng-types-tieredmenu.mjs.map +1 -0
- package/fesm2022/primeng-types-timeline.mjs +4 -0
- package/fesm2022/primeng-types-timeline.mjs.map +1 -0
- package/fesm2022/primeng-types-toast.mjs +4 -0
- package/fesm2022/primeng-types-toast.mjs.map +1 -0
- package/fesm2022/primeng-types-togglebutton.mjs +4 -0
- package/fesm2022/primeng-types-togglebutton.mjs.map +1 -0
- package/fesm2022/primeng-types-toggleswitch.mjs +4 -0
- package/fesm2022/primeng-types-toggleswitch.mjs.map +1 -0
- package/fesm2022/primeng-types-toolbar.mjs +4 -0
- package/fesm2022/primeng-types-toolbar.mjs.map +1 -0
- package/fesm2022/primeng-types-tooltip.mjs +4 -0
- package/fesm2022/primeng-types-tooltip.mjs.map +1 -0
- package/fesm2022/primeng-types-tree.mjs +4 -0
- package/fesm2022/primeng-types-tree.mjs.map +1 -0
- package/fesm2022/primeng-types-treeselect.mjs +4 -0
- package/fesm2022/primeng-types-treeselect.mjs.map +1 -0
- package/fesm2022/primeng-types-treetable.mjs +4 -0
- package/fesm2022/primeng-types-treetable.mjs.map +1 -0
- package/fesm2022/primeng-usestyle.mjs +20 -18
- package/fesm2022/primeng-usestyle.mjs.map +1 -1
- package/fesm2022/primeng-utils.mjs.map +1 -1
- package/fieldset/index.d.ts +19 -57
- package/fileupload/index.d.ts +24 -252
- package/floatlabel/index.d.ts +13 -6
- package/fluid/index.d.ts +9 -4
- package/focustrap/index.d.ts +2 -2
- package/galleria/index.d.ts +60 -142
- package/iconfield/index.d.ts +13 -5
- package/icons/arrowdown/index.d.ts +3 -4
- package/icons/arrowleft/index.d.ts +1 -1
- package/icons/arrowup/index.d.ts +1 -1
- package/icons/ban/index.d.ts +1 -1
- package/icons/baseicon/index.d.ts +1 -1
- package/icons/exclamationtriangle/index.d.ts +3 -4
- package/icons/eyeslash/index.d.ts +1 -1
- package/icons/filter/index.d.ts +1 -1
- package/icons/filterslash/index.d.ts +1 -1
- package/icons/home/index.d.ts +1 -1
- package/icons/infocircle/index.d.ts +1 -1
- package/icons/pencil/index.d.ts +1 -1
- package/icons/plus/index.d.ts +1 -1
- package/icons/refresh/index.d.ts +1 -1
- package/icons/search/index.d.ts +1 -1
- package/icons/searchminus/index.d.ts +1 -1
- package/icons/searchplus/index.d.ts +1 -1
- package/icons/sortalt/index.d.ts +1 -1
- package/icons/sortamountdown/index.d.ts +1 -1
- package/icons/sortamountupalt/index.d.ts +1 -1
- package/icons/spinner/index.d.ts +1 -1
- package/icons/star/index.d.ts +1 -1
- package/icons/starfill/index.d.ts +1 -1
- package/icons/thlarge/index.d.ts +1 -1
- package/icons/timescircle/index.d.ts +1 -1
- package/icons/trash/index.d.ts +1 -1
- package/icons/undo/index.d.ts +1 -1
- package/icons/upload/index.d.ts +1 -1
- package/icons/windowmaximize/index.d.ts +1 -1
- package/icons/windowminimize/index.d.ts +1 -1
- package/iftalabel/index.d.ts +15 -8
- package/image/index.d.ts +21 -78
- package/imagecompare/index.d.ts +15 -9
- package/inplace/index.d.ts +16 -29
- package/inputgroup/index.d.ts +12 -6
- package/inputgroupaddon/index.d.ts +11 -5
- package/inputicon/index.d.ts +11 -4
- package/inputmask/index.d.ts +21 -29
- package/inputnumber/index.d.ts +24 -56
- package/inputotp/index.d.ts +17 -11
- package/inputtext/index.d.ts +20 -12
- package/keyfilter/index.d.ts +2 -7
- package/knob/index.d.ts +11 -5
- package/listbox/index.d.ts +48 -194
- package/megamenu/index.d.ts +24 -45
- package/menu/index.d.ts +23 -12
- package/menubar/index.d.ts +22 -52
- package/message/index.d.ts +18 -11
- package/metergroup/index.d.ts +23 -138
- package/multiselect/index.d.ts +41 -276
- package/orderlist/index.d.ts +28 -126
- package/organizationchart/index.d.ts +20 -70
- package/overlay/index.d.ts +40 -12
- package/overlaybadge/index.d.ts +11 -5
- package/package.json +585 -213
- package/paginator/index.d.ts +17 -48
- package/panel/index.d.ts +34 -57
- package/panelmenu/index.d.ts +32 -43
- package/passthrough/index.d.ts +14 -0
- package/password/index.d.ts +28 -18
- package/picklist/index.d.ts +33 -263
- package/popover/index.d.ts +15 -8
- package/progressbar/index.d.ts +14 -7
- package/progressspinner/index.d.ts +11 -5
- package/radiobutton/index.d.ts +18 -28
- package/rating/index.d.ts +16 -44
- package/ripple/index.d.ts +5 -5
- package/scroller/index.d.ts +23 -193
- package/scrollpanel/index.d.ts +17 -22
- package/scrolltop/index.d.ts +16 -28
- package/select/index.d.ts +34 -176
- package/selectbutton/index.d.ts +17 -56
- package/skeleton/index.d.ts +11 -5
- package/slider/index.d.ts +16 -49
- package/speeddial/index.d.ts +28 -63
- package/splitbutton/index.d.ts +15 -39
- package/splitter/index.d.ts +16 -45
- package/stepper/index.d.ts +54 -26
- package/steps/index.d.ts +8 -8
- package/table/index.d.ts +200 -854
- package/tabs/index.d.ts +59 -26
- package/tag/index.d.ts +14 -19
- package/terminal/index.d.ts +14 -8
- package/textarea/index.d.ts +19 -14
- package/tieredmenu/index.d.ts +26 -42
- package/timeline/index.d.ts +14 -51
- package/toast/index.d.ts +25 -70
- package/togglebutton/index.d.ts +16 -60
- package/toggleswitch/index.d.ts +16 -25
- package/toolbar/index.d.ts +14 -27
- package/tooltip/index.d.ts +24 -19
- package/tree/index.d.ts +55 -259
- package/treeselect/index.d.ts +23 -124
- package/treetable/index.d.ts +106 -558
- package/types/accordion/index.d.ts +88 -0
- package/types/autocomplete/index.d.ts +299 -0
- package/types/avatar/index.d.ts +40 -0
- package/types/avatargroup/index.d.ts +28 -0
- package/types/badge/index.d.ts +26 -0
- package/types/blockui/index.d.ts +39 -0
- package/types/breadcrumb/index.d.ts +70 -0
- package/types/button/index.d.ts +105 -0
- package/types/card/index.d.ts +75 -0
- package/types/carousel/index.d.ts +140 -0
- package/types/cascadeselect/index.d.ts +198 -0
- package/types/chart/index.d.ts +32 -0
- package/types/checkbox/index.d.ts +62 -0
- package/types/chip/index.d.ts +71 -0
- package/types/colorpicker/index.d.ts +73 -0
- package/types/confirmdialog/index.d.ts +121 -0
- package/types/confirmpopup/index.d.ts +82 -0
- package/types/contextmenu/index.d.ts +89 -0
- package/types/dataview/index.d.ts +234 -0
- package/types/datepicker/index.d.ts +464 -0
- package/types/dialog/index.d.ts +98 -0
- package/types/divider/index.d.ts +28 -0
- package/types/dock/index.d.ts +67 -0
- package/types/drawer/index.d.ts +77 -0
- package/types/editor/index.d.ts +210 -0
- package/types/fieldset/index.d.ts +92 -0
- package/types/fileupload/index.d.ts +576 -0
- package/types/floatlabel/index.d.ts +26 -0
- package/types/fluid/index.d.ts +28 -0
- package/types/galleria/index.d.ts +233 -0
- package/types/iconfield/index.d.ts +26 -0
- package/types/iftalabel/index.d.ts +26 -0
- package/types/image/index.d.ts +193 -0
- package/types/imagecompare/index.d.ts +28 -0
- package/types/inplace/index.d.ts +61 -0
- package/types/inputgroup/index.d.ts +28 -0
- package/types/inputgroupaddon/index.d.ts +28 -0
- package/types/inputicon/index.d.ts +26 -0
- package/types/inputmask/index.d.ts +56 -0
- package/types/inputnumber/index.d.ts +95 -0
- package/types/inputotp/index.d.ts +31 -0
- package/types/inputtext/index.d.ts +24 -0
- package/types/knob/index.d.ts +40 -0
- package/types/listbox/index.d.ts +280 -0
- package/types/megamenu/index.d.ts +122 -0
- package/types/menu/index.d.ts +101 -0
- package/types/menubar/index.d.ts +121 -0
- package/types/message/index.d.ts +48 -0
- package/types/metergroup/index.d.ts +178 -0
- package/types/multiselect/index.d.ts +362 -0
- package/types/orderlist/index.d.ts +164 -0
- package/types/organizationchart/index.d.ts +138 -0
- package/types/overlay/index.d.ts +28 -0
- package/types/overlaybadge/index.d.ts +34 -0
- package/types/paginator/index.d.ts +131 -0
- package/types/panel/index.d.ts +92 -0
- package/types/panelmenu/index.d.ts +114 -0
- package/types/password/index.d.ts +97 -0
- package/types/picklist/index.d.ts +353 -0
- package/types/popover/index.d.ts +52 -0
- package/types/progressbar/index.d.ts +54 -0
- package/types/progressspinner/index.d.ts +36 -0
- package/types/radiobutton/index.d.ts +51 -0
- package/types/rating/index.d.ts +82 -0
- package/types/scroller/index.d.ts +221 -0
- package/types/scrollpanel/index.d.ts +51 -0
- package/types/scrolltop/index.d.ts +52 -0
- package/types/select/index.d.ts +288 -0
- package/types/selectbutton/index.d.ts +77 -0
- package/types/skeleton/index.d.ts +28 -0
- package/types/slider/index.d.ts +78 -0
- package/types/speeddial/index.d.ts +82 -0
- package/types/splitbutton/index.d.ts +70 -0
- package/types/splitter/index.d.ts +70 -0
- package/types/stepper/index.d.ts +153 -0
- package/types/table/index.d.ts +884 -0
- package/types/tabs/index.d.ts +119 -0
- package/types/tag/index.d.ts +47 -0
- package/types/terminal/index.d.ts +60 -0
- package/types/textarea/index.d.ts +28 -0
- package/types/tieredmenu/index.d.ts +87 -0
- package/types/timeline/index.d.ts +95 -0
- package/types/toast/index.d.ts +114 -0
- package/types/togglebutton/index.d.ts +85 -0
- package/types/toggleswitch/index.d.ts +51 -0
- package/types/toolbar/index.d.ts +55 -0
- package/types/tooltip/index.d.ts +32 -0
- package/types/tree/index.d.ts +308 -0
- package/types/treeselect/index.d.ts +224 -0
- package/types/treetable/index.d.ts +640 -0
- package/usestyle/index.d.ts +2 -2
- package/utils/index.d.ts +2 -2
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
import * as i1 from '@angular/common';
|
|
3
|
-
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
1
|
+
export * from 'primeng/types/table';
|
|
4
2
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, EventEmitter, inject, NgZone, numberAttribute, booleanAttribute, ContentChild, ContentChildren, ViewChild, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, HostListener,
|
|
6
|
-
import
|
|
3
|
+
import { Injectable, InjectionToken, EventEmitter, inject, NgZone, numberAttribute, booleanAttribute, ContentChild, ContentChildren, ViewChild, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, HostListener, Optional, input, ElementRef, NgModule } from '@angular/core';
|
|
4
|
+
import { style as style$1 } from '@primeuix/styles/datatable';
|
|
5
|
+
import { BaseStyle } from 'primeng/base';
|
|
6
|
+
import { trigger, transition, style as style$2, animate } from '@angular/animations';
|
|
7
|
+
import * as i2 from '@angular/common';
|
|
8
|
+
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
9
|
+
import * as i7 from '@angular/forms';
|
|
7
10
|
import { FormsModule } from '@angular/forms';
|
|
8
|
-
import * as
|
|
11
|
+
import * as i4 from 'primeng/api';
|
|
9
12
|
import { OverlayService, FilterService, FilterOperator, FilterMatchMode, PrimeTemplate, TranslationKeys, SharedModule } from 'primeng/api';
|
|
10
|
-
import * as
|
|
13
|
+
import * as i6 from 'primeng/badge';
|
|
11
14
|
import { BadgeModule } from 'primeng/badge';
|
|
12
|
-
import { BaseComponent } from 'primeng/basecomponent';
|
|
13
|
-
import * as
|
|
15
|
+
import { BaseComponent, PARENT_INSTANCE } from 'primeng/basecomponent';
|
|
16
|
+
import * as i1 from 'primeng/bind';
|
|
17
|
+
import { Bind, BindModule } from 'primeng/bind';
|
|
18
|
+
import * as i11 from 'primeng/button';
|
|
14
19
|
import { Button, ButtonModule } from 'primeng/button';
|
|
15
|
-
import * as
|
|
20
|
+
import * as i9 from 'primeng/checkbox';
|
|
16
21
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
17
|
-
import * as
|
|
22
|
+
import * as i13 from 'primeng/datepicker';
|
|
18
23
|
import { DatePickerModule } from 'primeng/datepicker';
|
|
19
24
|
import { DomHandler, ConnectedOverlayScrollHandler } from 'primeng/dom';
|
|
20
25
|
import { ArrowDownIcon } from 'primeng/icons/arrowdown';
|
|
@@ -28,26 +33,24 @@ import { SortAmountDownIcon } from 'primeng/icons/sortamountdown';
|
|
|
28
33
|
import { SortAmountUpAltIcon } from 'primeng/icons/sortamountupalt';
|
|
29
34
|
import { SpinnerIcon } from 'primeng/icons/spinner';
|
|
30
35
|
import { TrashIcon } from 'primeng/icons/trash';
|
|
31
|
-
import * as
|
|
36
|
+
import * as i14 from 'primeng/inputnumber';
|
|
32
37
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
33
|
-
import * as
|
|
38
|
+
import * as i12 from 'primeng/inputtext';
|
|
34
39
|
import { InputTextModule } from 'primeng/inputtext';
|
|
35
|
-
import * as
|
|
40
|
+
import * as i3 from 'primeng/paginator';
|
|
36
41
|
import { PaginatorModule } from 'primeng/paginator';
|
|
37
|
-
import * as
|
|
42
|
+
import * as i8 from 'primeng/radiobutton';
|
|
38
43
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
39
|
-
import * as
|
|
44
|
+
import * as i5 from 'primeng/scroller';
|
|
40
45
|
import { ScrollerModule } from 'primeng/scroller';
|
|
41
|
-
import * as
|
|
46
|
+
import * as i10 from 'primeng/select';
|
|
42
47
|
import { SelectModule } from 'primeng/select';
|
|
43
48
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
44
49
|
import { UniqueComponentId, ObjectUtils, ZIndexUtils } from 'primeng/utils';
|
|
45
50
|
import { Subject } from 'rxjs';
|
|
46
|
-
import { style } from '@primeuix/styles/datatable';
|
|
47
|
-
import { BaseStyle } from 'primeng/base';
|
|
48
51
|
|
|
49
|
-
const
|
|
50
|
-
${style}
|
|
52
|
+
const style = /*css*/ `
|
|
53
|
+
${style$1}
|
|
51
54
|
|
|
52
55
|
/* For PrimeNG */
|
|
53
56
|
.p-datatable-scrollable-table > .p-datatable-thead {
|
|
@@ -64,23 +67,7 @@ const theme = /*css*/ `
|
|
|
64
67
|
z-index: 1;
|
|
65
68
|
}
|
|
66
69
|
|
|
67
|
-
.p-datatable-
|
|
68
|
-
position: sticky;
|
|
69
|
-
background: dt('datatable.header.cell.background');
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.p-datatable-scrollable th.p-datatable-frozen-column {
|
|
73
|
-
z-index: 1;
|
|
74
|
-
position: sticky;
|
|
75
|
-
background: dt('datatable.header.cell.background');
|
|
76
|
-
}
|
|
77
|
-
.p-datatable-scrollable td.p-datatable-frozen-column {
|
|
78
|
-
z-index: 1;
|
|
79
|
-
position: sticky;
|
|
80
|
-
background: dt('datatable.header.cell.background');
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.p-datatable-mask {
|
|
70
|
+
.p-datatable-mask.p-overlay-mask {
|
|
84
71
|
position: absolute;
|
|
85
72
|
display: flex;
|
|
86
73
|
align-items: center;
|
|
@@ -286,13 +273,13 @@ const inlineStyles = {
|
|
|
286
273
|
};
|
|
287
274
|
class TableStyle extends BaseStyle {
|
|
288
275
|
name = 'datatable';
|
|
289
|
-
|
|
276
|
+
style = style;
|
|
290
277
|
classes = classes;
|
|
291
278
|
inlineStyles = inlineStyles;
|
|
292
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
293
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
279
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
280
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableStyle });
|
|
294
281
|
}
|
|
295
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableStyle, decorators: [{
|
|
296
283
|
type: Injectable
|
|
297
284
|
}] });
|
|
298
285
|
/**
|
|
@@ -524,6 +511,7 @@ var TableClasses;
|
|
|
524
511
|
TableClasses["rowEditorCancel"] = "p-datatable-row-editor-cancel";
|
|
525
512
|
})(TableClasses || (TableClasses = {}));
|
|
526
513
|
|
|
514
|
+
const TABLE_INSTANCE = new InjectionToken('TABLE_INSTANCE');
|
|
527
515
|
class TableService {
|
|
528
516
|
sortSource = new Subject();
|
|
529
517
|
selectionSource = new Subject();
|
|
@@ -550,10 +538,10 @@ class TableService {
|
|
|
550
538
|
onColumnsChange(columns) {
|
|
551
539
|
this.columnsSource.next(columns);
|
|
552
540
|
}
|
|
553
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
554
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
541
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
542
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableService });
|
|
555
543
|
}
|
|
556
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
544
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableService, decorators: [{
|
|
557
545
|
type: Injectable
|
|
558
546
|
}] });
|
|
559
547
|
/**
|
|
@@ -1291,8 +1279,11 @@ class Table extends BaseComponent {
|
|
|
1291
1279
|
tableService = inject(TableService);
|
|
1292
1280
|
zone = inject(NgZone);
|
|
1293
1281
|
_componentStyle = inject(TableStyle);
|
|
1294
|
-
|
|
1295
|
-
|
|
1282
|
+
bindDirectiveInstance = inject(Bind, { self: true });
|
|
1283
|
+
onAfterViewChecked() {
|
|
1284
|
+
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
|
|
1285
|
+
}
|
|
1286
|
+
onInit() {
|
|
1296
1287
|
if (this.lazy && this.lazyLoadOnInit) {
|
|
1297
1288
|
if (!this.virtualScroll) {
|
|
1298
1289
|
this.onLazyLoad.emit(this.createLazyLoadMetadata());
|
|
@@ -1306,7 +1297,7 @@ class Table extends BaseComponent {
|
|
|
1306
1297
|
}
|
|
1307
1298
|
this.initialized = true;
|
|
1308
1299
|
}
|
|
1309
|
-
|
|
1300
|
+
onAfterContentInit() {
|
|
1310
1301
|
this._templates.forEach((item) => {
|
|
1311
1302
|
switch (item.getType()) {
|
|
1312
1303
|
case 'caption':
|
|
@@ -1408,16 +1399,14 @@ class Table extends BaseComponent {
|
|
|
1408
1399
|
}
|
|
1409
1400
|
});
|
|
1410
1401
|
}
|
|
1411
|
-
|
|
1412
|
-
super.ngAfterViewInit();
|
|
1402
|
+
onAfterViewInit() {
|
|
1413
1403
|
if (isPlatformBrowser(this.platformId)) {
|
|
1414
1404
|
if (this.isStateful() && this.resizableColumns) {
|
|
1415
1405
|
this.restoreColumnWidths();
|
|
1416
1406
|
}
|
|
1417
1407
|
}
|
|
1418
1408
|
}
|
|
1419
|
-
|
|
1420
|
-
super.ngOnChanges(simpleChange);
|
|
1409
|
+
onChanges(simpleChange) {
|
|
1421
1410
|
if (simpleChange.totalRecords && simpleChange.totalRecords.firstChange) {
|
|
1422
1411
|
this._totalRecords = simpleChange.totalRecords.currentValue;
|
|
1423
1412
|
}
|
|
@@ -1650,7 +1639,7 @@ class Table extends BaseComponent {
|
|
|
1650
1639
|
result = value1.localeCompare(value2);
|
|
1651
1640
|
else
|
|
1652
1641
|
result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
1653
|
-
return order * result;
|
|
1642
|
+
return order * (result || 0);
|
|
1654
1643
|
});
|
|
1655
1644
|
this._value = [...this.value];
|
|
1656
1645
|
}
|
|
@@ -2117,7 +2106,7 @@ class Table extends BaseComponent {
|
|
|
2117
2106
|
}
|
|
2118
2107
|
toggleRowsWithCheckbox({ originalEvent }, check) {
|
|
2119
2108
|
if (this._selectAll !== null) {
|
|
2120
|
-
this.selectAllChange.emit({ originalEvent, checked: check });
|
|
2109
|
+
this.selectAllChange.emit({ originalEvent: originalEvent, checked: check });
|
|
2121
2110
|
}
|
|
2122
2111
|
else {
|
|
2123
2112
|
const data = this.selectionPageOnly ? this.dataToRender(this.processedData) : this.processedData;
|
|
@@ -2132,7 +2121,7 @@ class Table extends BaseComponent {
|
|
|
2132
2121
|
this.selectionChange.emit(this._selection);
|
|
2133
2122
|
this.tableService.onSelectionChange();
|
|
2134
2123
|
this.onHeaderCheckboxToggle.emit({
|
|
2135
|
-
originalEvent,
|
|
2124
|
+
originalEvent: originalEvent,
|
|
2136
2125
|
checked: check
|
|
2137
2126
|
});
|
|
2138
2127
|
if (this.isStateful()) {
|
|
@@ -2392,7 +2381,7 @@ class Table extends BaseComponent {
|
|
|
2392
2381
|
}
|
|
2393
2382
|
else {
|
|
2394
2383
|
csv = 'data:text/csv;charset=utf-8,' + csv;
|
|
2395
|
-
this.document.defaultView
|
|
2384
|
+
this.document.defaultView?.open(encodeURI(csv));
|
|
2396
2385
|
}
|
|
2397
2386
|
this.renderer.removeChild(this.document.body, link);
|
|
2398
2387
|
}
|
|
@@ -2675,7 +2664,7 @@ class Table extends BaseComponent {
|
|
|
2675
2664
|
if (this.resizableColumns && this.resizeColumnElement) {
|
|
2676
2665
|
let width = this.columnResizeMode === 'expand' ? this._initialColWidths : this._totalTableWidth();
|
|
2677
2666
|
ObjectUtils.reorderArray(width, dragIndex + 1, dropIndex + 1);
|
|
2678
|
-
this.updateStyleElement(width, dragIndex,
|
|
2667
|
+
this.updateStyleElement(width, dragIndex, 0, 0);
|
|
2679
2668
|
}
|
|
2680
2669
|
this.reorderIndicatorUpViewChild.nativeElement.style.display = 'none';
|
|
2681
2670
|
this.reorderIndicatorDownViewChild.nativeElement.style.display = 'none';
|
|
@@ -3024,26 +3013,28 @@ class Table extends BaseComponent {
|
|
|
3024
3013
|
this.styleElement = null;
|
|
3025
3014
|
}
|
|
3026
3015
|
}
|
|
3027
|
-
|
|
3016
|
+
ngAfterViewChecked() {
|
|
3017
|
+
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
|
|
3018
|
+
}
|
|
3019
|
+
onDestroy() {
|
|
3028
3020
|
this.unbindDocumentEditListener();
|
|
3029
3021
|
this.editingCell = null;
|
|
3030
3022
|
this.initialized = null;
|
|
3031
3023
|
this.destroyStyleElement();
|
|
3032
3024
|
this.destroyResponsiveStyle();
|
|
3033
|
-
super.ngOnDestroy();
|
|
3034
3025
|
}
|
|
3035
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3036
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.
|
|
3037
|
-
<div [class]="cx('mask')" *ngIf="loading && showLoader">
|
|
3038
|
-
<i *ngIf="loadingIcon" [class]="cn(cx('loadingIcon'), loadingIcon)"></i>
|
|
3026
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: Table, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3027
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.4", type: Table, isStandalone: false, selector: "p-table", inputs: { frozenColumns: "frozenColumns", frozenValue: "frozenValue", styleClass: "styleClass", tableStyle: "tableStyle", tableStyleClass: "tableStyleClass", paginator: ["paginator", "paginator", booleanAttribute], pageLinks: ["pageLinks", "pageLinks", numberAttribute], rowsPerPageOptions: "rowsPerPageOptions", alwaysShowPaginator: ["alwaysShowPaginator", "alwaysShowPaginator", booleanAttribute], paginatorPosition: "paginatorPosition", paginatorStyleClass: "paginatorStyleClass", paginatorDropdownAppendTo: "paginatorDropdownAppendTo", paginatorDropdownScrollHeight: "paginatorDropdownScrollHeight", currentPageReportTemplate: "currentPageReportTemplate", showCurrentPageReport: ["showCurrentPageReport", "showCurrentPageReport", booleanAttribute], showJumpToPageDropdown: ["showJumpToPageDropdown", "showJumpToPageDropdown", booleanAttribute], showJumpToPageInput: ["showJumpToPageInput", "showJumpToPageInput", booleanAttribute], showFirstLastIcon: ["showFirstLastIcon", "showFirstLastIcon", booleanAttribute], showPageLinks: ["showPageLinks", "showPageLinks", booleanAttribute], defaultSortOrder: ["defaultSortOrder", "defaultSortOrder", numberAttribute], sortMode: "sortMode", resetPageOnSort: ["resetPageOnSort", "resetPageOnSort", booleanAttribute], selectionMode: "selectionMode", selectionPageOnly: ["selectionPageOnly", "selectionPageOnly", booleanAttribute], contextMenuSelection: "contextMenuSelection", contextMenuSelectionMode: "contextMenuSelectionMode", dataKey: "dataKey", metaKeySelection: ["metaKeySelection", "metaKeySelection", booleanAttribute], rowSelectable: "rowSelectable", rowTrackBy: "rowTrackBy", lazy: ["lazy", "lazy", booleanAttribute], lazyLoadOnInit: ["lazyLoadOnInit", "lazyLoadOnInit", booleanAttribute], compareSelectionBy: "compareSelectionBy", csvSeparator: "csvSeparator", exportFilename: "exportFilename", filters: "filters", globalFilterFields: "globalFilterFields", filterDelay: ["filterDelay", "filterDelay", numberAttribute], filterLocale: "filterLocale", expandedRowKeys: "expandedRowKeys", editingRowKeys: "editingRowKeys", rowExpandMode: "rowExpandMode", scrollable: ["scrollable", "scrollable", booleanAttribute], rowGroupMode: "rowGroupMode", scrollHeight: "scrollHeight", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], virtualScrollItemSize: ["virtualScrollItemSize", "virtualScrollItemSize", numberAttribute], virtualScrollOptions: "virtualScrollOptions", virtualScrollDelay: ["virtualScrollDelay", "virtualScrollDelay", numberAttribute], frozenWidth: "frozenWidth", contextMenu: "contextMenu", resizableColumns: ["resizableColumns", "resizableColumns", booleanAttribute], columnResizeMode: "columnResizeMode", reorderableColumns: ["reorderableColumns", "reorderableColumns", booleanAttribute], loading: ["loading", "loading", booleanAttribute], loadingIcon: "loadingIcon", showLoader: ["showLoader", "showLoader", booleanAttribute], rowHover: ["rowHover", "rowHover", booleanAttribute], customSort: ["customSort", "customSort", booleanAttribute], showInitialSortBadge: ["showInitialSortBadge", "showInitialSortBadge", booleanAttribute], exportFunction: "exportFunction", exportHeader: "exportHeader", stateKey: "stateKey", stateStorage: "stateStorage", editMode: "editMode", groupRowsBy: "groupRowsBy", size: "size", showGridlines: ["showGridlines", "showGridlines", booleanAttribute], stripedRows: ["stripedRows", "stripedRows", booleanAttribute], groupRowsByOrder: ["groupRowsByOrder", "groupRowsByOrder", numberAttribute], responsiveLayout: "responsiveLayout", breakpoint: "breakpoint", paginatorLocale: "paginatorLocale", value: "value", columns: "columns", first: "first", rows: "rows", totalRecords: "totalRecords", sortField: "sortField", sortOrder: "sortOrder", multiSortMeta: "multiSortMeta", selection: "selection", selectAll: "selectAll" }, outputs: { contextMenuSelectionChange: "contextMenuSelectionChange", selectAllChange: "selectAllChange", selectionChange: "selectionChange", onRowSelect: "onRowSelect", onRowUnselect: "onRowUnselect", onPage: "onPage", onSort: "onSort", onFilter: "onFilter", onLazyLoad: "onLazyLoad", onRowExpand: "onRowExpand", onRowCollapse: "onRowCollapse", onContextMenuSelect: "onContextMenuSelect", onColResize: "onColResize", onColReorder: "onColReorder", onRowReorder: "onRowReorder", onEditInit: "onEditInit", onEditComplete: "onEditComplete", onEditCancel: "onEditCancel", onHeaderCheckboxToggle: "onHeaderCheckboxToggle", sortFunction: "sortFunction", firstChange: "firstChange", rowsChange: "rowsChange", onStateSave: "onStateSave", onStateRestore: "onStateRestore" }, host: { properties: { "class": "cn(cx('root'), styleClass)" } }, providers: [TableService, TableStyle, { provide: TABLE_INSTANCE, useExisting: Table }, { provide: PARENT_INSTANCE, useExisting: Table }], queries: [{ propertyName: "_headerTemplate", first: true, predicate: ["header"] }, { propertyName: "_headerGroupedTemplate", first: true, predicate: ["headergrouped"] }, { propertyName: "_bodyTemplate", first: true, predicate: ["body"] }, { propertyName: "_loadingBodyTemplate", first: true, predicate: ["loadingbody"] }, { propertyName: "_captionTemplate", first: true, predicate: ["caption"] }, { propertyName: "_footerTemplate", first: true, predicate: ["footer"] }, { propertyName: "_footerGroupedTemplate", first: true, predicate: ["footergrouped"] }, { propertyName: "_summaryTemplate", first: true, predicate: ["summary"] }, { propertyName: "_colGroupTemplate", first: true, predicate: ["colgroup"] }, { propertyName: "_expandedRowTemplate", first: true, predicate: ["expandedrow"] }, { propertyName: "_groupHeaderTemplate", first: true, predicate: ["groupheader"] }, { propertyName: "_groupFooterTemplate", first: true, predicate: ["groupfooter"] }, { propertyName: "_frozenExpandedRowTemplate", first: true, predicate: ["frozenexpandedrow"] }, { propertyName: "_frozenHeaderTemplate", first: true, predicate: ["frozenheader"] }, { propertyName: "_frozenBodyTemplate", first: true, predicate: ["frozenbody"] }, { propertyName: "_frozenFooterTemplate", first: true, predicate: ["frozenfooter"] }, { propertyName: "_frozenColGroupTemplate", first: true, predicate: ["frozencolgroup"] }, { propertyName: "_emptyMessageTemplate", first: true, predicate: ["emptymessage"] }, { propertyName: "_paginatorLeftTemplate", first: true, predicate: ["paginatorleft"] }, { propertyName: "_paginatorRightTemplate", first: true, predicate: ["paginatorright"] }, { propertyName: "_paginatorDropdownItemTemplate", first: true, predicate: ["paginatordropdownitem"] }, { propertyName: "_loadingIconTemplate", first: true, predicate: ["loadingicon"] }, { propertyName: "_reorderIndicatorUpIconTemplate", first: true, predicate: ["reorderindicatorupicon"] }, { propertyName: "_reorderIndicatorDownIconTemplate", first: true, predicate: ["reorderindicatordownicon"] }, { propertyName: "_sortIconTemplate", first: true, predicate: ["sorticon"] }, { propertyName: "_checkboxIconTemplate", first: true, predicate: ["checkboxicon"] }, { propertyName: "_headerCheckboxIconTemplate", first: true, predicate: ["headercheckboxicon"] }, { propertyName: "_paginatorDropdownIconTemplate", first: true, predicate: ["paginatordropdownicon"] }, { propertyName: "_paginatorFirstPageLinkIconTemplate", first: true, predicate: ["paginatorfirstpagelinkicon"] }, { propertyName: "_paginatorLastPageLinkIconTemplate", first: true, predicate: ["paginatorlastpagelinkicon"] }, { propertyName: "_paginatorPreviousPageLinkIconTemplate", first: true, predicate: ["paginatorpreviouspagelinkicon"] }, { propertyName: "_paginatorNextPageLinkIconTemplate", first: true, predicate: ["paginatornextpagelinkicon"] }, { propertyName: "_templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "resizeHelperViewChild", first: true, predicate: ["resizeHelper"], descendants: true }, { propertyName: "reorderIndicatorUpViewChild", first: true, predicate: ["reorderIndicatorUp"], descendants: true }, { propertyName: "reorderIndicatorDownViewChild", first: true, predicate: ["reorderIndicatorDown"], descendants: true }, { propertyName: "wrapperViewChild", first: true, predicate: ["wrapper"], descendants: true }, { propertyName: "tableViewChild", first: true, predicate: ["table"], descendants: true }, { propertyName: "tableHeaderViewChild", first: true, predicate: ["thead"], descendants: true }, { propertyName: "tableFooterViewChild", first: true, predicate: ["tfoot"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
3028
|
+
<div [class]="cx('mask')" [pBind]="ptm('mask')" *ngIf="loading && showLoader">
|
|
3029
|
+
<i *ngIf="loadingIcon" [class]="cn(cx('loadingIcon'), loadingIcon)" [pBind]="ptm('loadingIcon')"></i>
|
|
3039
3030
|
<ng-container *ngIf="!loadingIcon">
|
|
3040
|
-
<svg data-p-icon="spinner" *ngIf="!loadingIconTemplate && !_loadingIconTemplate" [spin]="true" [class]="cx('loadingIcon')" />
|
|
3041
|
-
<span *ngIf="loadingIconTemplate || _loadingIconTemplate" [class]="cx('loadingIcon')">
|
|
3031
|
+
<svg data-p-icon="spinner" *ngIf="!loadingIconTemplate && !_loadingIconTemplate" [spin]="true" [class]="cx('loadingIcon')" [pBind]="ptm('loadingIcon')" />
|
|
3032
|
+
<span *ngIf="loadingIconTemplate || _loadingIconTemplate" [class]="cx('loadingIcon')" [pBind]="ptm('loadingIcon')">
|
|
3042
3033
|
<ng-template *ngTemplateOutlet="loadingIconTemplate || _loadingIconTemplate"></ng-template>
|
|
3043
3034
|
</span>
|
|
3044
3035
|
</ng-container>
|
|
3045
3036
|
</div>
|
|
3046
|
-
<div *ngIf="captionTemplate || _captionTemplate" [class]="cx('header')">
|
|
3037
|
+
<div *ngIf="captionTemplate || _captionTemplate" [class]="cx('header')" [pBind]="ptm('header')">
|
|
3047
3038
|
<ng-container *ngTemplateOutlet="captionTemplate || _captionTemplate"></ng-container>
|
|
3048
3039
|
</div>
|
|
3049
3040
|
<p-paginator
|
|
@@ -3068,6 +3059,7 @@ class Table extends BaseComponent {
|
|
|
3068
3059
|
[showPageLinks]="showPageLinks"
|
|
3069
3060
|
[styleClass]="cx('pcPaginator') + ' ' + paginatorStyleClass && paginatorStyleClass"
|
|
3070
3061
|
[locale]="paginatorLocale"
|
|
3062
|
+
[pt]="ptm('pcPaginator')"
|
|
3071
3063
|
>
|
|
3072
3064
|
<ng-template pTemplate="dropdownicon" *ngIf="paginatorDropdownIconTemplate || _paginatorDropdownIconTemplate">
|
|
3073
3065
|
<ng-container *ngTemplateOutlet="paginatorDropdownIconTemplate || _paginatorDropdownIconTemplate"></ng-container>
|
|
@@ -3090,7 +3082,7 @@ class Table extends BaseComponent {
|
|
|
3090
3082
|
</ng-template>
|
|
3091
3083
|
</p-paginator>
|
|
3092
3084
|
|
|
3093
|
-
<div #wrapper [class]="cx('tableContainer')" [ngStyle]="sx('tableContainer')">
|
|
3085
|
+
<div #wrapper [class]="cx('tableContainer')" [ngStyle]="sx('tableContainer')" [pBind]="ptm('tableContainer')">
|
|
3094
3086
|
<p-scroller
|
|
3095
3087
|
#scroller
|
|
3096
3088
|
*ngIf="virtualScroll"
|
|
@@ -3104,13 +3096,14 @@ class Table extends BaseComponent {
|
|
|
3104
3096
|
[step]="rows"
|
|
3105
3097
|
[delay]="lazy ? virtualScrollDelay : 0"
|
|
3106
3098
|
[inline]="true"
|
|
3099
|
+
[autoSize]="true"
|
|
3107
3100
|
[lazy]="lazy"
|
|
3108
3101
|
(onLazyLoad)="onLazyItemLoad($event)"
|
|
3109
3102
|
[loaderDisabled]="true"
|
|
3110
3103
|
[showSpacer]="false"
|
|
3111
3104
|
[showLoader]="loadingBodyTemplate || _loadingBodyTemplate"
|
|
3112
3105
|
[options]="virtualScrollOptions"
|
|
3113
|
-
[
|
|
3106
|
+
[pt]="ptm('virtualScroller')"
|
|
3114
3107
|
>
|
|
3115
3108
|
<ng-template #content let-items let-scrollerOptions="options">
|
|
3116
3109
|
<ng-container
|
|
@@ -3137,9 +3130,9 @@ class Table extends BaseComponent {
|
|
|
3137
3130
|
</ng-container>
|
|
3138
3131
|
|
|
3139
3132
|
<ng-template #buildInTable let-items let-scrollerOptions="options">
|
|
3140
|
-
<table #table role="table" [class]="cn(cx('table'), tableStyleClass)" [style]="tableStyle" [attr.id]="id + '-table'">
|
|
3133
|
+
<table #table role="table" [class]="cn(cx('table'), tableStyleClass)" [pBind]="ptm('table')" [style]="tableStyle" [attr.id]="id + '-table'">
|
|
3141
3134
|
<ng-container *ngTemplateOutlet="colGroupTemplate || _colGroupTemplate; context: { $implicit: scrollerOptions.columns }"></ng-container>
|
|
3142
|
-
<thead role="rowgroup" #thead [class]="cx('thead')" [ngStyle]="sx('thead')">
|
|
3135
|
+
<thead role="rowgroup" #thead [class]="cx('thead')" [ngStyle]="sx('thead')" [pBind]="ptm('thead')">
|
|
3143
3136
|
<ng-container
|
|
3144
3137
|
*ngTemplateOutlet="
|
|
3145
3138
|
headerGroupedTemplate || headerTemplate || _headerTemplate;
|
|
@@ -3152,6 +3145,7 @@ class Table extends BaseComponent {
|
|
|
3152
3145
|
<tbody
|
|
3153
3146
|
role="rowgroup"
|
|
3154
3147
|
[class]="cx('tbody')"
|
|
3148
|
+
[pBind]="ptm('tbody')"
|
|
3155
3149
|
*ngIf="frozenValue || frozenBodyTemplate || _frozenBodyTemplate"
|
|
3156
3150
|
[value]="frozenValue"
|
|
3157
3151
|
[frozenRows]="true"
|
|
@@ -3162,6 +3156,7 @@ class Table extends BaseComponent {
|
|
|
3162
3156
|
<tbody
|
|
3163
3157
|
role="rowgroup"
|
|
3164
3158
|
[class]="cx('tbody', scrollerOptions.contentStyleClass)"
|
|
3159
|
+
[pBind]="ptm('tbody')"
|
|
3165
3160
|
[style]="scrollerOptions.contentStyle"
|
|
3166
3161
|
[value]="dataToRender(scrollerOptions.rows)"
|
|
3167
3162
|
[pTableBody]="scrollerOptions.columns"
|
|
@@ -3173,8 +3168,9 @@ class Table extends BaseComponent {
|
|
|
3173
3168
|
*ngIf="scrollerOptions.spacerStyle"
|
|
3174
3169
|
[style]="'height: calc(' + scrollerOptions.spacerStyle.height + ' - ' + scrollerOptions.rows.length * scrollerOptions.itemSize + 'px);'"
|
|
3175
3170
|
[class]="cx('virtualScrollerSpacer')"
|
|
3171
|
+
[pBind]="ptm('virtualScrollerSpacer')"
|
|
3176
3172
|
></tbody>
|
|
3177
|
-
<tfoot role="rowgroup" *ngIf="footerGroupedTemplate || footerTemplate || _footerTemplate || _footerGroupedTemplate" #tfoot [ngClass]="cx('footer')" [ngStyle]="sx('tfoot')">
|
|
3173
|
+
<tfoot role="rowgroup" *ngIf="footerGroupedTemplate || footerTemplate || _footerTemplate || _footerGroupedTemplate" #tfoot [ngClass]="cx('footer')" [ngStyle]="sx('tfoot')" [pBind]="ptm('tfoot')">
|
|
3178
3174
|
<ng-container
|
|
3179
3175
|
*ngTemplateOutlet="
|
|
3180
3176
|
footerGroupedTemplate || footerTemplate || _footerTemplate || _footerGroupedTemplate;
|
|
@@ -3210,6 +3206,7 @@ class Table extends BaseComponent {
|
|
|
3210
3206
|
[showPageLinks]="showPageLinks"
|
|
3211
3207
|
[styleClass]="cx('pcPaginator') + ' ' + paginatorStyleClass && paginatorStyleClass"
|
|
3212
3208
|
[locale]="paginatorLocale"
|
|
3209
|
+
[pt]="ptm('pcPaginator')"
|
|
3213
3210
|
>
|
|
3214
3211
|
<ng-template pTemplate="dropdownicon" *ngIf="paginatorDropdownIconTemplate || _paginatorDropdownIconTemplate">
|
|
3215
3212
|
<ng-container *ngTemplateOutlet="paginatorDropdownIconTemplate || _paginatorDropdownIconTemplate"></ng-container>
|
|
@@ -3232,37 +3229,37 @@ class Table extends BaseComponent {
|
|
|
3232
3229
|
</ng-template>
|
|
3233
3230
|
</p-paginator>
|
|
3234
3231
|
|
|
3235
|
-
<div *ngIf="summaryTemplate || _summaryTemplate" [ngClass]="cx('footer')">
|
|
3232
|
+
<div *ngIf="summaryTemplate || _summaryTemplate" [ngClass]="cx('footer')" [pBind]="ptm('footer')">
|
|
3236
3233
|
<ng-container *ngTemplateOutlet="summaryTemplate || _summaryTemplate"></ng-container>
|
|
3237
3234
|
</div>
|
|
3238
3235
|
|
|
3239
|
-
<div #resizeHelper [ngClass]="cx('columnResizeIndicator')" [style.display]="'none'" *ngIf="resizableColumns"></div>
|
|
3240
|
-
<span #reorderIndicatorUp [ngClass]="cx('rowReorderIndicatorUp')" [style.display]="'none'" *ngIf="reorderableColumns">
|
|
3241
|
-
<svg data-p-icon="arrow-down" *ngIf="!reorderIndicatorUpIconTemplate && !_reorderIndicatorUpIconTemplate" />
|
|
3236
|
+
<div #resizeHelper [ngClass]="cx('columnResizeIndicator')" [pBind]="ptm('columnResizeIndicator')" [style.display]="'none'" *ngIf="resizableColumns"></div>
|
|
3237
|
+
<span #reorderIndicatorUp [ngClass]="cx('rowReorderIndicatorUp')" [pBind]="ptm('rowReorderIndicatorUp')" [style.display]="'none'" *ngIf="reorderableColumns">
|
|
3238
|
+
<svg data-p-icon="arrow-down" *ngIf="!reorderIndicatorUpIconTemplate && !_reorderIndicatorUpIconTemplate" [pBind]="ptm('rowReorderIndicatorUp')['icon']" />
|
|
3242
3239
|
<ng-template *ngTemplateOutlet="reorderIndicatorUpIconTemplate || _reorderIndicatorUpIconTemplate"></ng-template>
|
|
3243
3240
|
</span>
|
|
3244
|
-
<span #reorderIndicatorDown [ngClass]="cx('rowReorderIndicatorDown')" [style.display]="'none'" *ngIf="reorderableColumns">
|
|
3245
|
-
<svg data-p-icon="arrow-up" *ngIf="!reorderIndicatorDownIconTemplate && !_reorderIndicatorDownIconTemplate" />
|
|
3241
|
+
<span #reorderIndicatorDown [ngClass]="cx('rowReorderIndicatorDown')" [pBind]="ptm('rowReorderIndicatorDown')" [style.display]="'none'" *ngIf="reorderableColumns">
|
|
3242
|
+
<svg data-p-icon="arrow-up" *ngIf="!reorderIndicatorDownIconTemplate && !_reorderIndicatorDownIconTemplate" [pBind]="ptm('rowReorderIndicatorDown')['icon']" />
|
|
3246
3243
|
<ng-template *ngTemplateOutlet="reorderIndicatorDownIconTemplate || _reorderIndicatorDownIconTemplate"></ng-template>
|
|
3247
3244
|
</span>
|
|
3248
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() =>
|
|
3245
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i0.forwardRef(() => i3.Paginator), selector: "p-paginator", inputs: ["pageLinkSize", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first", "appendTo"], outputs: ["onPageChange"] }, { kind: "directive", type: i0.forwardRef(() => i4.PrimeTemplate), selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i0.forwardRef(() => i5.Scroller), selector: "p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller", inputs: ["hostName", "id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "component", type: i0.forwardRef(() => ArrowDownIcon), selector: "[data-p-icon=\"arrow-down\"]" }, { kind: "component", type: i0.forwardRef(() => ArrowUpIcon), selector: "[data-p-icon=\"arrow-up\"]" }, { kind: "component", type: i0.forwardRef(() => SpinnerIcon), selector: "[data-p-icon=\"spinner\"]" }, { kind: "directive", type: i0.forwardRef(() => i1.Bind), selector: "[pBind]", inputs: ["pBind"] }, { kind: "component", type: i0.forwardRef(() => TableBody), selector: "[pTableBody]", inputs: ["pTableBody", "pTableBodyTemplate", "value", "frozen", "frozenRows", "scrollerOptions"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
3249
3246
|
}
|
|
3250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: Table, decorators: [{
|
|
3251
3248
|
type: Component,
|
|
3252
3249
|
args: [{
|
|
3253
3250
|
selector: 'p-table',
|
|
3254
3251
|
standalone: false,
|
|
3255
3252
|
template: `
|
|
3256
|
-
<div [class]="cx('mask')" *ngIf="loading && showLoader">
|
|
3257
|
-
<i *ngIf="loadingIcon" [class]="cn(cx('loadingIcon'), loadingIcon)"></i>
|
|
3253
|
+
<div [class]="cx('mask')" [pBind]="ptm('mask')" *ngIf="loading && showLoader">
|
|
3254
|
+
<i *ngIf="loadingIcon" [class]="cn(cx('loadingIcon'), loadingIcon)" [pBind]="ptm('loadingIcon')"></i>
|
|
3258
3255
|
<ng-container *ngIf="!loadingIcon">
|
|
3259
|
-
<svg data-p-icon="spinner" *ngIf="!loadingIconTemplate && !_loadingIconTemplate" [spin]="true" [class]="cx('loadingIcon')" />
|
|
3260
|
-
<span *ngIf="loadingIconTemplate || _loadingIconTemplate" [class]="cx('loadingIcon')">
|
|
3256
|
+
<svg data-p-icon="spinner" *ngIf="!loadingIconTemplate && !_loadingIconTemplate" [spin]="true" [class]="cx('loadingIcon')" [pBind]="ptm('loadingIcon')" />
|
|
3257
|
+
<span *ngIf="loadingIconTemplate || _loadingIconTemplate" [class]="cx('loadingIcon')" [pBind]="ptm('loadingIcon')">
|
|
3261
3258
|
<ng-template *ngTemplateOutlet="loadingIconTemplate || _loadingIconTemplate"></ng-template>
|
|
3262
3259
|
</span>
|
|
3263
3260
|
</ng-container>
|
|
3264
3261
|
</div>
|
|
3265
|
-
<div *ngIf="captionTemplate || _captionTemplate" [class]="cx('header')">
|
|
3262
|
+
<div *ngIf="captionTemplate || _captionTemplate" [class]="cx('header')" [pBind]="ptm('header')">
|
|
3266
3263
|
<ng-container *ngTemplateOutlet="captionTemplate || _captionTemplate"></ng-container>
|
|
3267
3264
|
</div>
|
|
3268
3265
|
<p-paginator
|
|
@@ -3287,6 +3284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3287
3284
|
[showPageLinks]="showPageLinks"
|
|
3288
3285
|
[styleClass]="cx('pcPaginator') + ' ' + paginatorStyleClass && paginatorStyleClass"
|
|
3289
3286
|
[locale]="paginatorLocale"
|
|
3287
|
+
[pt]="ptm('pcPaginator')"
|
|
3290
3288
|
>
|
|
3291
3289
|
<ng-template pTemplate="dropdownicon" *ngIf="paginatorDropdownIconTemplate || _paginatorDropdownIconTemplate">
|
|
3292
3290
|
<ng-container *ngTemplateOutlet="paginatorDropdownIconTemplate || _paginatorDropdownIconTemplate"></ng-container>
|
|
@@ -3309,7 +3307,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3309
3307
|
</ng-template>
|
|
3310
3308
|
</p-paginator>
|
|
3311
3309
|
|
|
3312
|
-
<div #wrapper [class]="cx('tableContainer')" [ngStyle]="sx('tableContainer')">
|
|
3310
|
+
<div #wrapper [class]="cx('tableContainer')" [ngStyle]="sx('tableContainer')" [pBind]="ptm('tableContainer')">
|
|
3313
3311
|
<p-scroller
|
|
3314
3312
|
#scroller
|
|
3315
3313
|
*ngIf="virtualScroll"
|
|
@@ -3323,13 +3321,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3323
3321
|
[step]="rows"
|
|
3324
3322
|
[delay]="lazy ? virtualScrollDelay : 0"
|
|
3325
3323
|
[inline]="true"
|
|
3324
|
+
[autoSize]="true"
|
|
3326
3325
|
[lazy]="lazy"
|
|
3327
3326
|
(onLazyLoad)="onLazyItemLoad($event)"
|
|
3328
3327
|
[loaderDisabled]="true"
|
|
3329
3328
|
[showSpacer]="false"
|
|
3330
3329
|
[showLoader]="loadingBodyTemplate || _loadingBodyTemplate"
|
|
3331
3330
|
[options]="virtualScrollOptions"
|
|
3332
|
-
[
|
|
3331
|
+
[pt]="ptm('virtualScroller')"
|
|
3333
3332
|
>
|
|
3334
3333
|
<ng-template #content let-items let-scrollerOptions="options">
|
|
3335
3334
|
<ng-container
|
|
@@ -3356,9 +3355,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3356
3355
|
</ng-container>
|
|
3357
3356
|
|
|
3358
3357
|
<ng-template #buildInTable let-items let-scrollerOptions="options">
|
|
3359
|
-
<table #table role="table" [class]="cn(cx('table'), tableStyleClass)" [style]="tableStyle" [attr.id]="id + '-table'">
|
|
3358
|
+
<table #table role="table" [class]="cn(cx('table'), tableStyleClass)" [pBind]="ptm('table')" [style]="tableStyle" [attr.id]="id + '-table'">
|
|
3360
3359
|
<ng-container *ngTemplateOutlet="colGroupTemplate || _colGroupTemplate; context: { $implicit: scrollerOptions.columns }"></ng-container>
|
|
3361
|
-
<thead role="rowgroup" #thead [class]="cx('thead')" [ngStyle]="sx('thead')">
|
|
3360
|
+
<thead role="rowgroup" #thead [class]="cx('thead')" [ngStyle]="sx('thead')" [pBind]="ptm('thead')">
|
|
3362
3361
|
<ng-container
|
|
3363
3362
|
*ngTemplateOutlet="
|
|
3364
3363
|
headerGroupedTemplate || headerTemplate || _headerTemplate;
|
|
@@ -3371,6 +3370,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3371
3370
|
<tbody
|
|
3372
3371
|
role="rowgroup"
|
|
3373
3372
|
[class]="cx('tbody')"
|
|
3373
|
+
[pBind]="ptm('tbody')"
|
|
3374
3374
|
*ngIf="frozenValue || frozenBodyTemplate || _frozenBodyTemplate"
|
|
3375
3375
|
[value]="frozenValue"
|
|
3376
3376
|
[frozenRows]="true"
|
|
@@ -3381,6 +3381,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3381
3381
|
<tbody
|
|
3382
3382
|
role="rowgroup"
|
|
3383
3383
|
[class]="cx('tbody', scrollerOptions.contentStyleClass)"
|
|
3384
|
+
[pBind]="ptm('tbody')"
|
|
3384
3385
|
[style]="scrollerOptions.contentStyle"
|
|
3385
3386
|
[value]="dataToRender(scrollerOptions.rows)"
|
|
3386
3387
|
[pTableBody]="scrollerOptions.columns"
|
|
@@ -3392,8 +3393,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3392
3393
|
*ngIf="scrollerOptions.spacerStyle"
|
|
3393
3394
|
[style]="'height: calc(' + scrollerOptions.spacerStyle.height + ' - ' + scrollerOptions.rows.length * scrollerOptions.itemSize + 'px);'"
|
|
3394
3395
|
[class]="cx('virtualScrollerSpacer')"
|
|
3396
|
+
[pBind]="ptm('virtualScrollerSpacer')"
|
|
3395
3397
|
></tbody>
|
|
3396
|
-
<tfoot role="rowgroup" *ngIf="footerGroupedTemplate || footerTemplate || _footerTemplate || _footerGroupedTemplate" #tfoot [ngClass]="cx('footer')" [ngStyle]="sx('tfoot')">
|
|
3398
|
+
<tfoot role="rowgroup" *ngIf="footerGroupedTemplate || footerTemplate || _footerTemplate || _footerGroupedTemplate" #tfoot [ngClass]="cx('footer')" [ngStyle]="sx('tfoot')" [pBind]="ptm('tfoot')">
|
|
3397
3399
|
<ng-container
|
|
3398
3400
|
*ngTemplateOutlet="
|
|
3399
3401
|
footerGroupedTemplate || footerTemplate || _footerTemplate || _footerGroupedTemplate;
|
|
@@ -3429,6 +3431,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3429
3431
|
[showPageLinks]="showPageLinks"
|
|
3430
3432
|
[styleClass]="cx('pcPaginator') + ' ' + paginatorStyleClass && paginatorStyleClass"
|
|
3431
3433
|
[locale]="paginatorLocale"
|
|
3434
|
+
[pt]="ptm('pcPaginator')"
|
|
3432
3435
|
>
|
|
3433
3436
|
<ng-template pTemplate="dropdownicon" *ngIf="paginatorDropdownIconTemplate || _paginatorDropdownIconTemplate">
|
|
3434
3437
|
<ng-container *ngTemplateOutlet="paginatorDropdownIconTemplate || _paginatorDropdownIconTemplate"></ng-container>
|
|
@@ -3451,26 +3454,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3451
3454
|
</ng-template>
|
|
3452
3455
|
</p-paginator>
|
|
3453
3456
|
|
|
3454
|
-
<div *ngIf="summaryTemplate || _summaryTemplate" [ngClass]="cx('footer')">
|
|
3457
|
+
<div *ngIf="summaryTemplate || _summaryTemplate" [ngClass]="cx('footer')" [pBind]="ptm('footer')">
|
|
3455
3458
|
<ng-container *ngTemplateOutlet="summaryTemplate || _summaryTemplate"></ng-container>
|
|
3456
3459
|
</div>
|
|
3457
3460
|
|
|
3458
|
-
<div #resizeHelper [ngClass]="cx('columnResizeIndicator')" [style.display]="'none'" *ngIf="resizableColumns"></div>
|
|
3459
|
-
<span #reorderIndicatorUp [ngClass]="cx('rowReorderIndicatorUp')" [style.display]="'none'" *ngIf="reorderableColumns">
|
|
3460
|
-
<svg data-p-icon="arrow-down" *ngIf="!reorderIndicatorUpIconTemplate && !_reorderIndicatorUpIconTemplate" />
|
|
3461
|
+
<div #resizeHelper [ngClass]="cx('columnResizeIndicator')" [pBind]="ptm('columnResizeIndicator')" [style.display]="'none'" *ngIf="resizableColumns"></div>
|
|
3462
|
+
<span #reorderIndicatorUp [ngClass]="cx('rowReorderIndicatorUp')" [pBind]="ptm('rowReorderIndicatorUp')" [style.display]="'none'" *ngIf="reorderableColumns">
|
|
3463
|
+
<svg data-p-icon="arrow-down" *ngIf="!reorderIndicatorUpIconTemplate && !_reorderIndicatorUpIconTemplate" [pBind]="ptm('rowReorderIndicatorUp')['icon']" />
|
|
3461
3464
|
<ng-template *ngTemplateOutlet="reorderIndicatorUpIconTemplate || _reorderIndicatorUpIconTemplate"></ng-template>
|
|
3462
3465
|
</span>
|
|
3463
|
-
<span #reorderIndicatorDown [ngClass]="cx('rowReorderIndicatorDown')" [style.display]="'none'" *ngIf="reorderableColumns">
|
|
3464
|
-
<svg data-p-icon="arrow-up" *ngIf="!reorderIndicatorDownIconTemplate && !_reorderIndicatorDownIconTemplate" />
|
|
3466
|
+
<span #reorderIndicatorDown [ngClass]="cx('rowReorderIndicatorDown')" [pBind]="ptm('rowReorderIndicatorDown')" [style.display]="'none'" *ngIf="reorderableColumns">
|
|
3467
|
+
<svg data-p-icon="arrow-up" *ngIf="!reorderIndicatorDownIconTemplate && !_reorderIndicatorDownIconTemplate" [pBind]="ptm('rowReorderIndicatorDown')['icon']" />
|
|
3465
3468
|
<ng-template *ngTemplateOutlet="reorderIndicatorDownIconTemplate || _reorderIndicatorDownIconTemplate"></ng-template>
|
|
3466
3469
|
</span>
|
|
3467
3470
|
`,
|
|
3468
|
-
providers: [TableService, TableStyle],
|
|
3471
|
+
providers: [TableService, TableStyle, { provide: TABLE_INSTANCE, useExisting: Table }, { provide: PARENT_INSTANCE, useExisting: Table }],
|
|
3469
3472
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
3470
3473
|
encapsulation: ViewEncapsulation.None,
|
|
3471
3474
|
host: {
|
|
3472
3475
|
'[class]': "cn(cx('root'), styleClass)"
|
|
3473
|
-
}
|
|
3476
|
+
},
|
|
3477
|
+
hostDirectives: [Bind]
|
|
3474
3478
|
}]
|
|
3475
3479
|
}], propDecorators: { frozenColumns: [{
|
|
3476
3480
|
type: Input
|
|
@@ -3839,11 +3843,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3839
3843
|
type: ContentChild,
|
|
3840
3844
|
args: ['paginatornextpagelinkicon', { descendants: false }]
|
|
3841
3845
|
}] } });
|
|
3842
|
-
class TableBody {
|
|
3843
|
-
|
|
3846
|
+
class TableBody extends BaseComponent {
|
|
3847
|
+
dataTable;
|
|
3844
3848
|
tableService;
|
|
3845
|
-
|
|
3846
|
-
el;
|
|
3849
|
+
hostName = 'Table';
|
|
3847
3850
|
columns;
|
|
3848
3851
|
template;
|
|
3849
3852
|
get value() {
|
|
@@ -3854,7 +3857,7 @@ class TableBody {
|
|
|
3854
3857
|
if (this.frozenRows) {
|
|
3855
3858
|
this.updateFrozenRowStickyPosition();
|
|
3856
3859
|
}
|
|
3857
|
-
if (this.
|
|
3860
|
+
if (this.dataTable.scrollable && this.dataTable.rowGroupMode === 'subheader') {
|
|
3858
3861
|
this.updateFrozenRowGroupHeaderStickyPosition();
|
|
3859
3862
|
}
|
|
3860
3863
|
}
|
|
@@ -3863,30 +3866,29 @@ class TableBody {
|
|
|
3863
3866
|
scrollerOptions;
|
|
3864
3867
|
subscription;
|
|
3865
3868
|
_value;
|
|
3866
|
-
|
|
3869
|
+
onAfterViewInit() {
|
|
3867
3870
|
if (this.frozenRows) {
|
|
3868
3871
|
this.updateFrozenRowStickyPosition();
|
|
3869
3872
|
}
|
|
3870
|
-
if (this.
|
|
3873
|
+
if (this.dataTable.scrollable && this.dataTable.rowGroupMode === 'subheader') {
|
|
3871
3874
|
this.updateFrozenRowGroupHeaderStickyPosition();
|
|
3872
3875
|
}
|
|
3873
3876
|
}
|
|
3874
|
-
constructor(
|
|
3875
|
-
|
|
3877
|
+
constructor(dataTable, tableService) {
|
|
3878
|
+
super();
|
|
3879
|
+
this.dataTable = dataTable;
|
|
3876
3880
|
this.tableService = tableService;
|
|
3877
|
-
this.
|
|
3878
|
-
|
|
3879
|
-
this.subscription = this.dt.tableService.valueSource$.subscribe(() => {
|
|
3880
|
-
if (this.dt.virtualScroll) {
|
|
3881
|
+
this.subscription = this.dataTable.tableService.valueSource$.subscribe(() => {
|
|
3882
|
+
if (this.dataTable.virtualScroll) {
|
|
3881
3883
|
this.cd.detectChanges();
|
|
3882
3884
|
}
|
|
3883
3885
|
});
|
|
3884
3886
|
}
|
|
3885
3887
|
shouldRenderRowGroupHeader(value, rowData, i) {
|
|
3886
|
-
let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.
|
|
3887
|
-
let prevRowData = value[i - this.
|
|
3888
|
+
let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.dataTable?.groupRowsBy || '');
|
|
3889
|
+
let prevRowData = value[i - (this.dataTable?._first || 0) - 1];
|
|
3888
3890
|
if (prevRowData) {
|
|
3889
|
-
let previousRowFieldData = ObjectUtils.resolveFieldData(prevRowData, this.
|
|
3891
|
+
let previousRowFieldData = ObjectUtils.resolveFieldData(prevRowData, this.dataTable?.groupRowsBy || '');
|
|
3890
3892
|
return currentRowFieldData !== previousRowFieldData;
|
|
3891
3893
|
}
|
|
3892
3894
|
else {
|
|
@@ -3894,10 +3896,10 @@ class TableBody {
|
|
|
3894
3896
|
}
|
|
3895
3897
|
}
|
|
3896
3898
|
shouldRenderRowGroupFooter(value, rowData, i) {
|
|
3897
|
-
let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.
|
|
3898
|
-
let nextRowData = value[i - this.
|
|
3899
|
+
let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.dataTable?.groupRowsBy || '');
|
|
3900
|
+
let nextRowData = value[i - (this.dataTable?._first || 0) + 1];
|
|
3899
3901
|
if (nextRowData) {
|
|
3900
|
-
let nextRowFieldData = ObjectUtils.resolveFieldData(nextRowData, this.
|
|
3902
|
+
let nextRowFieldData = ObjectUtils.resolveFieldData(nextRowData, this.dataTable?.groupRowsBy || '');
|
|
3901
3903
|
return currentRowFieldData !== nextRowFieldData;
|
|
3902
3904
|
}
|
|
3903
3905
|
else {
|
|
@@ -3905,10 +3907,10 @@ class TableBody {
|
|
|
3905
3907
|
}
|
|
3906
3908
|
}
|
|
3907
3909
|
shouldRenderRowspan(value, rowData, i) {
|
|
3908
|
-
let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.
|
|
3910
|
+
let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.dataTable?.groupRowsBy);
|
|
3909
3911
|
let prevRowData = value[i - 1];
|
|
3910
3912
|
if (prevRowData) {
|
|
3911
|
-
let previousRowFieldData = ObjectUtils.resolveFieldData(prevRowData, this.
|
|
3913
|
+
let previousRowFieldData = ObjectUtils.resolveFieldData(prevRowData, this.dataTable?.groupRowsBy || '');
|
|
3912
3914
|
return currentRowFieldData !== previousRowFieldData;
|
|
3913
3915
|
}
|
|
3914
3916
|
else {
|
|
@@ -3916,14 +3918,14 @@ class TableBody {
|
|
|
3916
3918
|
}
|
|
3917
3919
|
}
|
|
3918
3920
|
calculateRowGroupSize(value, rowData, index) {
|
|
3919
|
-
let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.
|
|
3921
|
+
let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.dataTable?.groupRowsBy);
|
|
3920
3922
|
let nextRowFieldData = currentRowFieldData;
|
|
3921
3923
|
let groupRowSpan = 0;
|
|
3922
3924
|
while (currentRowFieldData === nextRowFieldData) {
|
|
3923
3925
|
groupRowSpan++;
|
|
3924
3926
|
let nextRowData = value[++index];
|
|
3925
3927
|
if (nextRowData) {
|
|
3926
|
-
nextRowFieldData = ObjectUtils.resolveFieldData(nextRowData, this.
|
|
3928
|
+
nextRowFieldData = ObjectUtils.resolveFieldData(nextRowData, this.dataTable?.groupRowsBy || '');
|
|
3927
3929
|
}
|
|
3928
3930
|
else {
|
|
3929
3931
|
break;
|
|
@@ -3931,7 +3933,7 @@ class TableBody {
|
|
|
3931
3933
|
}
|
|
3932
3934
|
return groupRowSpan === 1 ? null : groupRowSpan;
|
|
3933
3935
|
}
|
|
3934
|
-
|
|
3936
|
+
onDestroy() {
|
|
3935
3937
|
if (this.subscription) {
|
|
3936
3938
|
this.subscription.unsubscribe();
|
|
3937
3939
|
}
|
|
@@ -3942,62 +3944,65 @@ class TableBody {
|
|
|
3942
3944
|
updateFrozenRowGroupHeaderStickyPosition() {
|
|
3943
3945
|
if (this.el.nativeElement.previousElementSibling) {
|
|
3944
3946
|
let tableHeaderHeight = DomHandler.getOuterHeight(this.el.nativeElement.previousElementSibling);
|
|
3945
|
-
this.
|
|
3947
|
+
this.dataTable.rowGroupHeaderStyleObject.top = tableHeaderHeight + 'px';
|
|
3946
3948
|
}
|
|
3947
3949
|
}
|
|
3948
3950
|
getScrollerOption(option, options) {
|
|
3949
|
-
if (this.
|
|
3951
|
+
if (this.dataTable.virtualScroll) {
|
|
3950
3952
|
options = options || this.scrollerOptions;
|
|
3951
3953
|
return options ? options[option] : null;
|
|
3952
3954
|
}
|
|
3953
3955
|
return null;
|
|
3954
3956
|
}
|
|
3955
3957
|
getRowIndex(rowIndex) {
|
|
3956
|
-
const index = this.
|
|
3958
|
+
const index = this.dataTable.paginator ? this.dataTable.first + rowIndex : rowIndex;
|
|
3957
3959
|
const getItemOptions = this.getScrollerOption('getItemOptions');
|
|
3958
3960
|
return getItemOptions ? getItemOptions(index).index : index;
|
|
3959
3961
|
}
|
|
3960
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3961
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.
|
|
3962
|
-
<ng-container *ngIf="!
|
|
3963
|
-
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="
|
|
3964
|
-
<ng-container
|
|
3962
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableBody, deps: [{ token: Table }, { token: TableService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3963
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.4", type: TableBody, isStandalone: false, selector: "[pTableBody]", inputs: { columns: ["pTableBody", "columns"], template: ["pTableBodyTemplate", "template"], value: "value", frozen: ["frozen", "frozen", booleanAttribute], frozenRows: ["frozenRows", "frozenRows", booleanAttribute], scrollerOptions: "scrollerOptions" }, usesInheritance: true, ngImport: i0, template: `
|
|
3964
|
+
<ng-container *ngIf="!dataTable.expandedRowTemplate && !dataTable._expandedRowTemplate">
|
|
3965
|
+
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="dataTable.rowTrackBy">
|
|
3966
|
+
<ng-container
|
|
3967
|
+
*ngIf="(dataTable.groupHeaderTemplate || dataTable._groupHeaderTemplate) && !dataTable.virtualScroll && dataTable.rowGroupMode === 'subheader' && shouldRenderRowGroupHeader(value, rowData, getRowIndex(rowIndex))"
|
|
3968
|
+
role="row"
|
|
3969
|
+
>
|
|
3965
3970
|
<ng-container
|
|
3966
3971
|
*ngTemplateOutlet="
|
|
3967
|
-
|
|
3972
|
+
dataTable.groupHeaderTemplate || dataTable._groupHeaderTemplate;
|
|
3968
3973
|
context: {
|
|
3969
3974
|
$implicit: rowData,
|
|
3970
3975
|
rowIndex: getRowIndex(rowIndex),
|
|
3971
3976
|
columns: columns,
|
|
3972
|
-
editing:
|
|
3977
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
3973
3978
|
frozen: frozen
|
|
3974
3979
|
}
|
|
3975
3980
|
"
|
|
3976
3981
|
></ng-container>
|
|
3977
3982
|
</ng-container>
|
|
3978
|
-
<ng-container *ngIf="
|
|
3983
|
+
<ng-container *ngIf="dataTable.rowGroupMode !== 'rowspan'">
|
|
3979
3984
|
<ng-container
|
|
3980
3985
|
*ngTemplateOutlet="
|
|
3981
|
-
rowData ? template :
|
|
3986
|
+
rowData ? template : dataTable.loadingBodyTemplate || dataTable._loadingBodyTemplate;
|
|
3982
3987
|
context: {
|
|
3983
3988
|
$implicit: rowData,
|
|
3984
3989
|
rowIndex: getRowIndex(rowIndex),
|
|
3985
3990
|
columns: columns,
|
|
3986
|
-
editing:
|
|
3991
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
3987
3992
|
frozen: frozen
|
|
3988
3993
|
}
|
|
3989
3994
|
"
|
|
3990
3995
|
></ng-container>
|
|
3991
3996
|
</ng-container>
|
|
3992
|
-
<ng-container *ngIf="
|
|
3997
|
+
<ng-container *ngIf="dataTable.rowGroupMode === 'rowspan'">
|
|
3993
3998
|
<ng-container
|
|
3994
3999
|
*ngTemplateOutlet="
|
|
3995
|
-
rowData ? template :
|
|
4000
|
+
rowData ? template : dataTable.loadingBodyTemplate || dataTable._loadingBodyTemplate;
|
|
3996
4001
|
context: {
|
|
3997
4002
|
$implicit: rowData,
|
|
3998
4003
|
rowIndex: getRowIndex(rowIndex),
|
|
3999
4004
|
columns: columns,
|
|
4000
|
-
editing:
|
|
4005
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4001
4006
|
frozen: frozen,
|
|
4002
4007
|
rowgroup: shouldRenderRowspan(value, rowData, rowIndex),
|
|
4003
4008
|
rowspan: calculateRowGroupSize(value, rowData, rowIndex)
|
|
@@ -4005,15 +4010,18 @@ class TableBody {
|
|
|
4005
4010
|
"
|
|
4006
4011
|
></ng-container>
|
|
4007
4012
|
</ng-container>
|
|
4008
|
-
<ng-container
|
|
4013
|
+
<ng-container
|
|
4014
|
+
*ngIf="(dataTable.groupFooterTemplate || dataTable._groupFooterTemplate) && !dataTable.virtualScroll && dataTable.rowGroupMode === 'subheader' && shouldRenderRowGroupFooter(value, rowData, getRowIndex(rowIndex))"
|
|
4015
|
+
role="row"
|
|
4016
|
+
>
|
|
4009
4017
|
<ng-container
|
|
4010
4018
|
*ngTemplateOutlet="
|
|
4011
|
-
|
|
4019
|
+
dataTable.groupFooterTemplate || dataTable._groupFooterTemplate;
|
|
4012
4020
|
context: {
|
|
4013
4021
|
$implicit: rowData,
|
|
4014
4022
|
rowIndex: getRowIndex(rowIndex),
|
|
4015
4023
|
columns: columns,
|
|
4016
|
-
editing:
|
|
4024
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4017
4025
|
frozen: frozen
|
|
4018
4026
|
}
|
|
4019
4027
|
"
|
|
@@ -4021,9 +4029,9 @@ class TableBody {
|
|
|
4021
4029
|
</ng-container>
|
|
4022
4030
|
</ng-template>
|
|
4023
4031
|
</ng-container>
|
|
4024
|
-
<ng-container *ngIf="(
|
|
4025
|
-
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="
|
|
4026
|
-
<ng-container *ngIf="!(
|
|
4032
|
+
<ng-container *ngIf="(dataTable.expandedRowTemplate || dataTable._expandedRowTemplate) && !(frozen && (dataTable.frozenExpandedRowTemplate || dataTable._frozenExpandedRowTemplate))">
|
|
4033
|
+
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="dataTable.rowTrackBy">
|
|
4034
|
+
<ng-container *ngIf="!(dataTable.groupHeaderTemplate && dataTable._groupHeaderTemplate)">
|
|
4027
4035
|
<ng-container
|
|
4028
4036
|
*ngTemplateOutlet="
|
|
4029
4037
|
template;
|
|
@@ -4031,32 +4039,32 @@ class TableBody {
|
|
|
4031
4039
|
$implicit: rowData,
|
|
4032
4040
|
rowIndex: getRowIndex(rowIndex),
|
|
4033
4041
|
columns: columns,
|
|
4034
|
-
expanded:
|
|
4035
|
-
editing:
|
|
4042
|
+
expanded: dataTable.isRowExpanded(rowData),
|
|
4043
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4036
4044
|
frozen: frozen
|
|
4037
4045
|
}
|
|
4038
4046
|
"
|
|
4039
4047
|
></ng-container>
|
|
4040
4048
|
</ng-container>
|
|
4041
|
-
<ng-container *ngIf="(
|
|
4049
|
+
<ng-container *ngIf="(dataTable.groupHeaderTemplate || dataTable._groupHeaderTemplate) && dataTable.rowGroupMode === 'subheader' && shouldRenderRowGroupHeader(value, rowData, getRowIndex(rowIndex))" role="row">
|
|
4042
4050
|
<ng-container
|
|
4043
4051
|
*ngTemplateOutlet="
|
|
4044
|
-
|
|
4052
|
+
dataTable.groupHeaderTemplate || dataTable._groupHeaderTemplate;
|
|
4045
4053
|
context: {
|
|
4046
4054
|
$implicit: rowData,
|
|
4047
4055
|
rowIndex: getRowIndex(rowIndex),
|
|
4048
4056
|
columns: columns,
|
|
4049
|
-
expanded:
|
|
4050
|
-
editing:
|
|
4057
|
+
expanded: dataTable.isRowExpanded(rowData),
|
|
4058
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4051
4059
|
frozen: frozen
|
|
4052
4060
|
}
|
|
4053
4061
|
"
|
|
4054
4062
|
></ng-container>
|
|
4055
4063
|
</ng-container>
|
|
4056
|
-
<ng-container *ngIf="
|
|
4064
|
+
<ng-container *ngIf="dataTable.isRowExpanded(rowData)">
|
|
4057
4065
|
<ng-container
|
|
4058
4066
|
*ngTemplateOutlet="
|
|
4059
|
-
|
|
4067
|
+
dataTable.expandedRowTemplate || dataTable._expandedRowTemplate;
|
|
4060
4068
|
context: {
|
|
4061
4069
|
$implicit: rowData,
|
|
4062
4070
|
rowIndex: getRowIndex(rowIndex),
|
|
@@ -4065,16 +4073,16 @@ class TableBody {
|
|
|
4065
4073
|
}
|
|
4066
4074
|
"
|
|
4067
4075
|
></ng-container>
|
|
4068
|
-
<ng-container *ngIf="(
|
|
4076
|
+
<ng-container *ngIf="(dataTable.groupFooterTemplate || dataTable._groupFooterTemplate) && dataTable.rowGroupMode === 'subheader' && shouldRenderRowGroupFooter(value, rowData, getRowIndex(rowIndex))" role="row">
|
|
4069
4077
|
<ng-container
|
|
4070
4078
|
*ngTemplateOutlet="
|
|
4071
|
-
|
|
4079
|
+
dataTable.groupFooterTemplate || dataTable._groupFooterTemplate;
|
|
4072
4080
|
context: {
|
|
4073
4081
|
$implicit: rowData,
|
|
4074
4082
|
rowIndex: getRowIndex(rowIndex),
|
|
4075
4083
|
columns: columns,
|
|
4076
|
-
expanded:
|
|
4077
|
-
editing:
|
|
4084
|
+
expanded: dataTable.isRowExpanded(rowData),
|
|
4085
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4078
4086
|
frozen: frozen
|
|
4079
4087
|
}
|
|
4080
4088
|
"
|
|
@@ -4083,8 +4091,8 @@ class TableBody {
|
|
|
4083
4091
|
</ng-container>
|
|
4084
4092
|
</ng-template>
|
|
4085
4093
|
</ng-container>
|
|
4086
|
-
<ng-container *ngIf="(
|
|
4087
|
-
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="
|
|
4094
|
+
<ng-container *ngIf="(dataTable.frozenExpandedRowTemplate || dataTable._frozenExpandedRowTemplate) && frozen">
|
|
4095
|
+
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="dataTable.rowTrackBy">
|
|
4088
4096
|
<ng-container
|
|
4089
4097
|
*ngTemplateOutlet="
|
|
4090
4098
|
template;
|
|
@@ -4092,16 +4100,16 @@ class TableBody {
|
|
|
4092
4100
|
$implicit: rowData,
|
|
4093
4101
|
rowIndex: getRowIndex(rowIndex),
|
|
4094
4102
|
columns: columns,
|
|
4095
|
-
expanded:
|
|
4096
|
-
editing:
|
|
4103
|
+
expanded: dataTable.isRowExpanded(rowData),
|
|
4104
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4097
4105
|
frozen: frozen
|
|
4098
4106
|
}
|
|
4099
4107
|
"
|
|
4100
4108
|
></ng-container>
|
|
4101
|
-
<ng-container *ngIf="
|
|
4109
|
+
<ng-container *ngIf="dataTable.isRowExpanded(rowData)">
|
|
4102
4110
|
<ng-container
|
|
4103
4111
|
*ngTemplateOutlet="
|
|
4104
|
-
|
|
4112
|
+
dataTable.frozenExpandedRowTemplate || dataTable._frozenExpandedRowTemplate;
|
|
4105
4113
|
context: {
|
|
4106
4114
|
$implicit: rowData,
|
|
4107
4115
|
rowIndex: getRowIndex(rowIndex),
|
|
@@ -4113,59 +4121,62 @@ class TableBody {
|
|
|
4113
4121
|
</ng-container>
|
|
4114
4122
|
</ng-template>
|
|
4115
4123
|
</ng-container>
|
|
4116
|
-
<ng-container *ngIf="
|
|
4117
|
-
<ng-container *ngTemplateOutlet="
|
|
4124
|
+
<ng-container *ngIf="dataTable.loading">
|
|
4125
|
+
<ng-container *ngTemplateOutlet="dataTable.loadingBodyTemplate || dataTable._loadingBodyTemplate; context: { $implicit: columns, frozen: frozen }"></ng-container>
|
|
4118
4126
|
</ng-container>
|
|
4119
|
-
<ng-container *ngIf="
|
|
4120
|
-
<ng-container *ngTemplateOutlet="
|
|
4127
|
+
<ng-container *ngIf="dataTable.isEmpty() && !dataTable.loading">
|
|
4128
|
+
<ng-container *ngTemplateOutlet="dataTable.emptyMessageTemplate || dataTable._emptyMessageTemplate; context: { $implicit: columns, frozen: frozen }"></ng-container>
|
|
4121
4129
|
</ng-container>
|
|
4122
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
4130
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
4123
4131
|
}
|
|
4124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableBody, decorators: [{
|
|
4125
4133
|
type: Component,
|
|
4126
4134
|
args: [{
|
|
4127
4135
|
selector: '[pTableBody]',
|
|
4128
4136
|
standalone: false,
|
|
4129
4137
|
template: `
|
|
4130
|
-
<ng-container *ngIf="!
|
|
4131
|
-
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="
|
|
4132
|
-
<ng-container
|
|
4138
|
+
<ng-container *ngIf="!dataTable.expandedRowTemplate && !dataTable._expandedRowTemplate">
|
|
4139
|
+
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="dataTable.rowTrackBy">
|
|
4140
|
+
<ng-container
|
|
4141
|
+
*ngIf="(dataTable.groupHeaderTemplate || dataTable._groupHeaderTemplate) && !dataTable.virtualScroll && dataTable.rowGroupMode === 'subheader' && shouldRenderRowGroupHeader(value, rowData, getRowIndex(rowIndex))"
|
|
4142
|
+
role="row"
|
|
4143
|
+
>
|
|
4133
4144
|
<ng-container
|
|
4134
4145
|
*ngTemplateOutlet="
|
|
4135
|
-
|
|
4146
|
+
dataTable.groupHeaderTemplate || dataTable._groupHeaderTemplate;
|
|
4136
4147
|
context: {
|
|
4137
4148
|
$implicit: rowData,
|
|
4138
4149
|
rowIndex: getRowIndex(rowIndex),
|
|
4139
4150
|
columns: columns,
|
|
4140
|
-
editing:
|
|
4151
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4141
4152
|
frozen: frozen
|
|
4142
4153
|
}
|
|
4143
4154
|
"
|
|
4144
4155
|
></ng-container>
|
|
4145
4156
|
</ng-container>
|
|
4146
|
-
<ng-container *ngIf="
|
|
4157
|
+
<ng-container *ngIf="dataTable.rowGroupMode !== 'rowspan'">
|
|
4147
4158
|
<ng-container
|
|
4148
4159
|
*ngTemplateOutlet="
|
|
4149
|
-
rowData ? template :
|
|
4160
|
+
rowData ? template : dataTable.loadingBodyTemplate || dataTable._loadingBodyTemplate;
|
|
4150
4161
|
context: {
|
|
4151
4162
|
$implicit: rowData,
|
|
4152
4163
|
rowIndex: getRowIndex(rowIndex),
|
|
4153
4164
|
columns: columns,
|
|
4154
|
-
editing:
|
|
4165
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4155
4166
|
frozen: frozen
|
|
4156
4167
|
}
|
|
4157
4168
|
"
|
|
4158
4169
|
></ng-container>
|
|
4159
4170
|
</ng-container>
|
|
4160
|
-
<ng-container *ngIf="
|
|
4171
|
+
<ng-container *ngIf="dataTable.rowGroupMode === 'rowspan'">
|
|
4161
4172
|
<ng-container
|
|
4162
4173
|
*ngTemplateOutlet="
|
|
4163
|
-
rowData ? template :
|
|
4174
|
+
rowData ? template : dataTable.loadingBodyTemplate || dataTable._loadingBodyTemplate;
|
|
4164
4175
|
context: {
|
|
4165
4176
|
$implicit: rowData,
|
|
4166
4177
|
rowIndex: getRowIndex(rowIndex),
|
|
4167
4178
|
columns: columns,
|
|
4168
|
-
editing:
|
|
4179
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4169
4180
|
frozen: frozen,
|
|
4170
4181
|
rowgroup: shouldRenderRowspan(value, rowData, rowIndex),
|
|
4171
4182
|
rowspan: calculateRowGroupSize(value, rowData, rowIndex)
|
|
@@ -4173,15 +4184,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4173
4184
|
"
|
|
4174
4185
|
></ng-container>
|
|
4175
4186
|
</ng-container>
|
|
4176
|
-
<ng-container
|
|
4187
|
+
<ng-container
|
|
4188
|
+
*ngIf="(dataTable.groupFooterTemplate || dataTable._groupFooterTemplate) && !dataTable.virtualScroll && dataTable.rowGroupMode === 'subheader' && shouldRenderRowGroupFooter(value, rowData, getRowIndex(rowIndex))"
|
|
4189
|
+
role="row"
|
|
4190
|
+
>
|
|
4177
4191
|
<ng-container
|
|
4178
4192
|
*ngTemplateOutlet="
|
|
4179
|
-
|
|
4193
|
+
dataTable.groupFooterTemplate || dataTable._groupFooterTemplate;
|
|
4180
4194
|
context: {
|
|
4181
4195
|
$implicit: rowData,
|
|
4182
4196
|
rowIndex: getRowIndex(rowIndex),
|
|
4183
4197
|
columns: columns,
|
|
4184
|
-
editing:
|
|
4198
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4185
4199
|
frozen: frozen
|
|
4186
4200
|
}
|
|
4187
4201
|
"
|
|
@@ -4189,9 +4203,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4189
4203
|
</ng-container>
|
|
4190
4204
|
</ng-template>
|
|
4191
4205
|
</ng-container>
|
|
4192
|
-
<ng-container *ngIf="(
|
|
4193
|
-
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="
|
|
4194
|
-
<ng-container *ngIf="!(
|
|
4206
|
+
<ng-container *ngIf="(dataTable.expandedRowTemplate || dataTable._expandedRowTemplate) && !(frozen && (dataTable.frozenExpandedRowTemplate || dataTable._frozenExpandedRowTemplate))">
|
|
4207
|
+
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="dataTable.rowTrackBy">
|
|
4208
|
+
<ng-container *ngIf="!(dataTable.groupHeaderTemplate && dataTable._groupHeaderTemplate)">
|
|
4195
4209
|
<ng-container
|
|
4196
4210
|
*ngTemplateOutlet="
|
|
4197
4211
|
template;
|
|
@@ -4199,32 +4213,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4199
4213
|
$implicit: rowData,
|
|
4200
4214
|
rowIndex: getRowIndex(rowIndex),
|
|
4201
4215
|
columns: columns,
|
|
4202
|
-
expanded:
|
|
4203
|
-
editing:
|
|
4216
|
+
expanded: dataTable.isRowExpanded(rowData),
|
|
4217
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4204
4218
|
frozen: frozen
|
|
4205
4219
|
}
|
|
4206
4220
|
"
|
|
4207
4221
|
></ng-container>
|
|
4208
4222
|
</ng-container>
|
|
4209
|
-
<ng-container *ngIf="(
|
|
4223
|
+
<ng-container *ngIf="(dataTable.groupHeaderTemplate || dataTable._groupHeaderTemplate) && dataTable.rowGroupMode === 'subheader' && shouldRenderRowGroupHeader(value, rowData, getRowIndex(rowIndex))" role="row">
|
|
4210
4224
|
<ng-container
|
|
4211
4225
|
*ngTemplateOutlet="
|
|
4212
|
-
|
|
4226
|
+
dataTable.groupHeaderTemplate || dataTable._groupHeaderTemplate;
|
|
4213
4227
|
context: {
|
|
4214
4228
|
$implicit: rowData,
|
|
4215
4229
|
rowIndex: getRowIndex(rowIndex),
|
|
4216
4230
|
columns: columns,
|
|
4217
|
-
expanded:
|
|
4218
|
-
editing:
|
|
4231
|
+
expanded: dataTable.isRowExpanded(rowData),
|
|
4232
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4219
4233
|
frozen: frozen
|
|
4220
4234
|
}
|
|
4221
4235
|
"
|
|
4222
4236
|
></ng-container>
|
|
4223
4237
|
</ng-container>
|
|
4224
|
-
<ng-container *ngIf="
|
|
4238
|
+
<ng-container *ngIf="dataTable.isRowExpanded(rowData)">
|
|
4225
4239
|
<ng-container
|
|
4226
4240
|
*ngTemplateOutlet="
|
|
4227
|
-
|
|
4241
|
+
dataTable.expandedRowTemplate || dataTable._expandedRowTemplate;
|
|
4228
4242
|
context: {
|
|
4229
4243
|
$implicit: rowData,
|
|
4230
4244
|
rowIndex: getRowIndex(rowIndex),
|
|
@@ -4233,16 +4247,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4233
4247
|
}
|
|
4234
4248
|
"
|
|
4235
4249
|
></ng-container>
|
|
4236
|
-
<ng-container *ngIf="(
|
|
4250
|
+
<ng-container *ngIf="(dataTable.groupFooterTemplate || dataTable._groupFooterTemplate) && dataTable.rowGroupMode === 'subheader' && shouldRenderRowGroupFooter(value, rowData, getRowIndex(rowIndex))" role="row">
|
|
4237
4251
|
<ng-container
|
|
4238
4252
|
*ngTemplateOutlet="
|
|
4239
|
-
|
|
4253
|
+
dataTable.groupFooterTemplate || dataTable._groupFooterTemplate;
|
|
4240
4254
|
context: {
|
|
4241
4255
|
$implicit: rowData,
|
|
4242
4256
|
rowIndex: getRowIndex(rowIndex),
|
|
4243
4257
|
columns: columns,
|
|
4244
|
-
expanded:
|
|
4245
|
-
editing:
|
|
4258
|
+
expanded: dataTable.isRowExpanded(rowData),
|
|
4259
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4246
4260
|
frozen: frozen
|
|
4247
4261
|
}
|
|
4248
4262
|
"
|
|
@@ -4251,8 +4265,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4251
4265
|
</ng-container>
|
|
4252
4266
|
</ng-template>
|
|
4253
4267
|
</ng-container>
|
|
4254
|
-
<ng-container *ngIf="(
|
|
4255
|
-
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="
|
|
4268
|
+
<ng-container *ngIf="(dataTable.frozenExpandedRowTemplate || dataTable._frozenExpandedRowTemplate) && frozen">
|
|
4269
|
+
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="value" [ngForTrackBy]="dataTable.rowTrackBy">
|
|
4256
4270
|
<ng-container
|
|
4257
4271
|
*ngTemplateOutlet="
|
|
4258
4272
|
template;
|
|
@@ -4260,16 +4274,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4260
4274
|
$implicit: rowData,
|
|
4261
4275
|
rowIndex: getRowIndex(rowIndex),
|
|
4262
4276
|
columns: columns,
|
|
4263
|
-
expanded:
|
|
4264
|
-
editing:
|
|
4277
|
+
expanded: dataTable.isRowExpanded(rowData),
|
|
4278
|
+
editing: dataTable.editMode === 'row' && dataTable.isRowEditing(rowData),
|
|
4265
4279
|
frozen: frozen
|
|
4266
4280
|
}
|
|
4267
4281
|
"
|
|
4268
4282
|
></ng-container>
|
|
4269
|
-
<ng-container *ngIf="
|
|
4283
|
+
<ng-container *ngIf="dataTable.isRowExpanded(rowData)">
|
|
4270
4284
|
<ng-container
|
|
4271
4285
|
*ngTemplateOutlet="
|
|
4272
|
-
|
|
4286
|
+
dataTable.frozenExpandedRowTemplate || dataTable._frozenExpandedRowTemplate;
|
|
4273
4287
|
context: {
|
|
4274
4288
|
$implicit: rowData,
|
|
4275
4289
|
rowIndex: getRowIndex(rowIndex),
|
|
@@ -4281,17 +4295,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4281
4295
|
</ng-container>
|
|
4282
4296
|
</ng-template>
|
|
4283
4297
|
</ng-container>
|
|
4284
|
-
<ng-container *ngIf="
|
|
4285
|
-
<ng-container *ngTemplateOutlet="
|
|
4298
|
+
<ng-container *ngIf="dataTable.loading">
|
|
4299
|
+
<ng-container *ngTemplateOutlet="dataTable.loadingBodyTemplate || dataTable._loadingBodyTemplate; context: { $implicit: columns, frozen: frozen }"></ng-container>
|
|
4286
4300
|
</ng-container>
|
|
4287
|
-
<ng-container *ngIf="
|
|
4288
|
-
<ng-container *ngTemplateOutlet="
|
|
4301
|
+
<ng-container *ngIf="dataTable.isEmpty() && !dataTable.loading">
|
|
4302
|
+
<ng-container *ngTemplateOutlet="dataTable.emptyMessageTemplate || dataTable._emptyMessageTemplate; context: { $implicit: columns, frozen: frozen }"></ng-container>
|
|
4289
4303
|
</ng-container>
|
|
4290
4304
|
`,
|
|
4291
4305
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
4292
4306
|
encapsulation: ViewEncapsulation.None
|
|
4293
4307
|
}]
|
|
4294
|
-
}], ctorParameters: () => [{ type: Table }, { type: TableService }
|
|
4308
|
+
}], ctorParameters: () => [{ type: Table }, { type: TableService }], propDecorators: { columns: [{
|
|
4295
4309
|
type: Input,
|
|
4296
4310
|
args: ['pTableBody']
|
|
4297
4311
|
}], template: [{
|
|
@@ -4309,17 +4323,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4309
4323
|
type: Input
|
|
4310
4324
|
}] } });
|
|
4311
4325
|
class RowGroupHeader {
|
|
4312
|
-
|
|
4313
|
-
constructor(
|
|
4314
|
-
this.
|
|
4326
|
+
dataTable;
|
|
4327
|
+
constructor(dataTable) {
|
|
4328
|
+
this.dataTable = dataTable;
|
|
4315
4329
|
}
|
|
4316
4330
|
get getFrozenRowGroupHeaderStickyPosition() {
|
|
4317
|
-
return this.
|
|
4331
|
+
return this.dataTable.rowGroupHeaderStyleObject ? this.dataTable.rowGroupHeaderStyleObject.top : '';
|
|
4318
4332
|
}
|
|
4319
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4320
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
4333
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RowGroupHeader, deps: [{ token: Table }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4334
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: RowGroupHeader, isStandalone: false, selector: "[pRowGroupHeader]", host: { properties: { "style.top": "getFrozenRowGroupHeaderStickyPosition" }, classAttribute: "p-datatable-row-group-header" }, ngImport: i0 });
|
|
4321
4335
|
}
|
|
4322
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RowGroupHeader, decorators: [{
|
|
4323
4337
|
type: Directive,
|
|
4324
4338
|
args: [{
|
|
4325
4339
|
selector: '[pRowGroupHeader]',
|
|
@@ -4330,9 +4344,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4330
4344
|
}
|
|
4331
4345
|
}]
|
|
4332
4346
|
}], ctorParameters: () => [{ type: Table }] });
|
|
4333
|
-
class FrozenColumn {
|
|
4334
|
-
el;
|
|
4335
|
-
zone;
|
|
4347
|
+
class FrozenColumn extends BaseComponent {
|
|
4336
4348
|
get frozen() {
|
|
4337
4349
|
return this._frozen;
|
|
4338
4350
|
}
|
|
@@ -4341,16 +4353,35 @@ class FrozenColumn {
|
|
|
4341
4353
|
Promise.resolve(null).then(() => this.updateStickyPosition());
|
|
4342
4354
|
}
|
|
4343
4355
|
alignFrozen = 'left';
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4356
|
+
resizeListener;
|
|
4357
|
+
resizeObserver;
|
|
4358
|
+
onAfterViewInit() {
|
|
4359
|
+
this.bindResizeListener();
|
|
4360
|
+
this.observeChanges();
|
|
4347
4361
|
}
|
|
4348
|
-
|
|
4349
|
-
this.
|
|
4350
|
-
|
|
4362
|
+
bindResizeListener() {
|
|
4363
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
4364
|
+
if (!this.resizeListener) {
|
|
4365
|
+
this.resizeListener = this.renderer.listen(this.document.defaultView, 'resize', () => {
|
|
4366
|
+
this.recalculateColumns();
|
|
4367
|
+
});
|
|
4368
|
+
}
|
|
4369
|
+
}
|
|
4370
|
+
}
|
|
4371
|
+
unbindResizeListener() {
|
|
4372
|
+
if (this.resizeListener) {
|
|
4373
|
+
this.resizeListener();
|
|
4374
|
+
this.resizeListener = null;
|
|
4375
|
+
}
|
|
4376
|
+
}
|
|
4377
|
+
observeChanges() {
|
|
4378
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
4379
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
4351
4380
|
this.recalculateColumns();
|
|
4352
|
-
}
|
|
4353
|
-
|
|
4381
|
+
});
|
|
4382
|
+
resizeObserver.observe(this.el.nativeElement);
|
|
4383
|
+
this.resizeObserver = resizeObserver;
|
|
4384
|
+
}
|
|
4354
4385
|
}
|
|
4355
4386
|
recalculateColumns() {
|
|
4356
4387
|
const siblings = DomHandler.siblings(this.el.nativeElement);
|
|
@@ -4391,10 +4422,16 @@ class FrozenColumn {
|
|
|
4391
4422
|
}
|
|
4392
4423
|
}
|
|
4393
4424
|
}
|
|
4394
|
-
|
|
4395
|
-
|
|
4425
|
+
onDestroy() {
|
|
4426
|
+
this.unbindResizeListener();
|
|
4427
|
+
if (this.resizeObserver) {
|
|
4428
|
+
this.resizeObserver.disconnect();
|
|
4429
|
+
}
|
|
4430
|
+
}
|
|
4431
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FrozenColumn, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
4432
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: FrozenColumn, isStandalone: false, selector: "[pFrozenColumn]", inputs: { frozen: "frozen", alignFrozen: "alignFrozen" }, host: { properties: { "class.p-datatable-frozen-column": "frozen", "class.p-datatable-frozen-column-left": "alignFrozen === \"left\"" } }, usesInheritance: true, ngImport: i0 });
|
|
4396
4433
|
}
|
|
4397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FrozenColumn, decorators: [{
|
|
4398
4435
|
type: Directive,
|
|
4399
4436
|
args: [{
|
|
4400
4437
|
selector: '[pFrozenColumn]',
|
|
@@ -4404,35 +4441,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4404
4441
|
'[class.p-datatable-frozen-column-left]': 'alignFrozen === "left"'
|
|
4405
4442
|
}
|
|
4406
4443
|
}]
|
|
4407
|
-
}],
|
|
4444
|
+
}], propDecorators: { frozen: [{
|
|
4408
4445
|
type: Input
|
|
4409
4446
|
}], alignFrozen: [{
|
|
4410
4447
|
type: Input
|
|
4411
|
-
}], recalculateColumns: [{
|
|
4412
|
-
type: HostListener,
|
|
4413
|
-
args: ['window:resize', ['$event']]
|
|
4414
4448
|
}] } });
|
|
4415
4449
|
class SortableColumn extends BaseComponent {
|
|
4416
|
-
|
|
4417
|
-
#elementRef = inject(ElementRef);
|
|
4450
|
+
dataTable;
|
|
4418
4451
|
field;
|
|
4419
4452
|
pSortableColumnDisabled;
|
|
4420
|
-
role = this
|
|
4453
|
+
role = this.el.nativeElement?.tagName !== 'TH' ? 'columnheader' : null;
|
|
4421
4454
|
sorted;
|
|
4422
4455
|
sortOrder;
|
|
4423
4456
|
subscription;
|
|
4424
4457
|
_componentStyle = inject(TableStyle);
|
|
4425
|
-
constructor(
|
|
4458
|
+
constructor(dataTable) {
|
|
4426
4459
|
super();
|
|
4427
|
-
this.
|
|
4460
|
+
this.dataTable = dataTable;
|
|
4428
4461
|
if (this.isEnabled()) {
|
|
4429
|
-
this.subscription = this.
|
|
4462
|
+
this.subscription = this.dataTable.tableService.sortSource$.subscribe((sortMeta) => {
|
|
4430
4463
|
this.updateSortState();
|
|
4431
4464
|
});
|
|
4432
4465
|
}
|
|
4433
4466
|
}
|
|
4434
|
-
|
|
4435
|
-
super.ngOnInit();
|
|
4467
|
+
onInit() {
|
|
4436
4468
|
if (this.isEnabled()) {
|
|
4437
4469
|
this.updateSortState();
|
|
4438
4470
|
}
|
|
@@ -4440,12 +4472,12 @@ class SortableColumn extends BaseComponent {
|
|
|
4440
4472
|
updateSortState() {
|
|
4441
4473
|
let sorted = false;
|
|
4442
4474
|
let sortOrder = 0;
|
|
4443
|
-
if (this.
|
|
4444
|
-
sorted = this.
|
|
4445
|
-
sortOrder = this.
|
|
4475
|
+
if (this.dataTable.sortMode === 'single') {
|
|
4476
|
+
sorted = this.dataTable.isSorted(this.field);
|
|
4477
|
+
sortOrder = this.dataTable.sortOrder;
|
|
4446
4478
|
}
|
|
4447
|
-
else if (this.
|
|
4448
|
-
const sortMeta = this.
|
|
4479
|
+
else if (this.dataTable.sortMode === 'multiple') {
|
|
4480
|
+
const sortMeta = this.dataTable.getSortMeta(this.field);
|
|
4449
4481
|
sorted = !!sortMeta;
|
|
4450
4482
|
sortOrder = sortMeta ? sortMeta.order : 0;
|
|
4451
4483
|
}
|
|
@@ -4455,7 +4487,7 @@ class SortableColumn extends BaseComponent {
|
|
|
4455
4487
|
onClick(event) {
|
|
4456
4488
|
if (this.isEnabled() && !this.isFilterElement(event.target)) {
|
|
4457
4489
|
this.updateSortState();
|
|
4458
|
-
this.
|
|
4490
|
+
this.dataTable.sort({
|
|
4459
4491
|
originalEvent: event,
|
|
4460
4492
|
field: this.field
|
|
4461
4493
|
});
|
|
@@ -4475,16 +4507,15 @@ class SortableColumn extends BaseComponent {
|
|
|
4475
4507
|
isFilterElementIconOrButton(element) {
|
|
4476
4508
|
return DomHandler.hasClass(element, 'pi-filter-icon') || DomHandler.hasClass(element, 'p-column-filter-menu-button');
|
|
4477
4509
|
}
|
|
4478
|
-
|
|
4479
|
-
super.ngOnDestroy();
|
|
4510
|
+
onDestroy() {
|
|
4480
4511
|
if (this.subscription) {
|
|
4481
4512
|
this.subscription.unsubscribe();
|
|
4482
4513
|
}
|
|
4483
4514
|
}
|
|
4484
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4485
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
4515
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SortableColumn, deps: [{ token: Table }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4516
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.4", type: SortableColumn, isStandalone: false, selector: "[pSortableColumn]", inputs: { field: ["pSortableColumn", "field"], pSortableColumnDisabled: ["pSortableColumnDisabled", "pSortableColumnDisabled", booleanAttribute] }, host: { listeners: { "click": "onClick($event)", "keydown.space": "onEnterKey($event)", "keydown.enter": "onEnterKey($event)" }, properties: { "class": "cx('sortableColumn')", "tabindex": "isEnabled() ? \"0\" : null", "role": "\"columnheader\"", "attr.aria-sort": "sortOrder" } }, providers: [TableStyle], usesInheritance: true, ngImport: i0 });
|
|
4486
4517
|
}
|
|
4487
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4518
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SortableColumn, decorators: [{
|
|
4488
4519
|
type: Directive,
|
|
4489
4520
|
args: [{
|
|
4490
4521
|
selector: '[pSortableColumn]',
|
|
@@ -4514,41 +4545,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4514
4545
|
args: ['keydown.enter', ['$event']]
|
|
4515
4546
|
}] } });
|
|
4516
4547
|
class SortIcon extends BaseComponent {
|
|
4517
|
-
|
|
4548
|
+
dataTable;
|
|
4518
4549
|
cd;
|
|
4519
4550
|
field;
|
|
4520
4551
|
subscription;
|
|
4521
4552
|
sortOrder;
|
|
4522
4553
|
_componentStyle = inject(TableStyle);
|
|
4523
|
-
constructor(
|
|
4554
|
+
constructor(dataTable, cd) {
|
|
4524
4555
|
super();
|
|
4525
|
-
this.
|
|
4556
|
+
this.dataTable = dataTable;
|
|
4526
4557
|
this.cd = cd;
|
|
4527
|
-
this.subscription = this.
|
|
4558
|
+
this.subscription = this.dataTable.tableService.sortSource$.subscribe((sortMeta) => {
|
|
4528
4559
|
this.updateSortState();
|
|
4529
4560
|
});
|
|
4530
4561
|
}
|
|
4531
|
-
|
|
4532
|
-
super.ngOnInit();
|
|
4562
|
+
onInit() {
|
|
4533
4563
|
this.updateSortState();
|
|
4534
4564
|
}
|
|
4535
4565
|
onClick(event) {
|
|
4536
4566
|
event.preventDefault();
|
|
4537
4567
|
}
|
|
4538
4568
|
updateSortState() {
|
|
4539
|
-
if (this.
|
|
4540
|
-
this.sortOrder = this.
|
|
4569
|
+
if (this.dataTable.sortMode === 'single') {
|
|
4570
|
+
this.sortOrder = this.dataTable.isSorted(this.field) ? this.dataTable.sortOrder : 0;
|
|
4541
4571
|
}
|
|
4542
|
-
else if (this.
|
|
4543
|
-
let sortMeta = this.
|
|
4572
|
+
else if (this.dataTable.sortMode === 'multiple') {
|
|
4573
|
+
let sortMeta = this.dataTable.getSortMeta(this.field);
|
|
4544
4574
|
this.sortOrder = sortMeta ? sortMeta.order : 0;
|
|
4545
4575
|
}
|
|
4546
4576
|
this.cd.markForCheck();
|
|
4547
4577
|
}
|
|
4548
4578
|
getMultiSortMetaIndex() {
|
|
4549
|
-
let multiSortMeta = this.
|
|
4579
|
+
let multiSortMeta = this.dataTable._multiSortMeta;
|
|
4550
4580
|
let index = -1;
|
|
4551
|
-
if (multiSortMeta && this.
|
|
4581
|
+
if (multiSortMeta && this.dataTable.sortMode === 'multiple' && this.dataTable.showInitialSortBadge && multiSortMeta.length > 1) {
|
|
4552
4582
|
for (let i = 0; i < multiSortMeta.length; i++) {
|
|
4553
4583
|
let meta = multiSortMeta[i];
|
|
4554
4584
|
if (meta.field === this.field || meta.field === this.field) {
|
|
@@ -4561,43 +4591,42 @@ class SortIcon extends BaseComponent {
|
|
|
4561
4591
|
}
|
|
4562
4592
|
getBadgeValue() {
|
|
4563
4593
|
let index = this.getMultiSortMetaIndex();
|
|
4564
|
-
return this.
|
|
4594
|
+
return (this.dataTable?.groupRowsBy || '') && index > -1 ? index : index + 1;
|
|
4565
4595
|
}
|
|
4566
4596
|
isMultiSorted() {
|
|
4567
|
-
return this.
|
|
4597
|
+
return this.dataTable.sortMode === 'multiple' && this.getMultiSortMetaIndex() > -1;
|
|
4568
4598
|
}
|
|
4569
|
-
|
|
4570
|
-
super.ngOnDestroy();
|
|
4599
|
+
onDestroy() {
|
|
4571
4600
|
if (this.subscription) {
|
|
4572
4601
|
this.subscription.unsubscribe();
|
|
4573
4602
|
}
|
|
4574
4603
|
}
|
|
4575
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4576
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
4577
|
-
<ng-container *ngIf="!(
|
|
4604
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SortIcon, deps: [{ token: Table }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4605
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: SortIcon, isStandalone: false, selector: "p-sortIcon", inputs: { field: "field" }, providers: [TableStyle], usesInheritance: true, ngImport: i0, template: `
|
|
4606
|
+
<ng-container *ngIf="!(dataTable.sortIconTemplate || dataTable._sortIconTemplate)">
|
|
4578
4607
|
<svg data-p-icon="sort-alt" [class]="cx('sortableColumnIcon')" *ngIf="sortOrder === 0" />
|
|
4579
4608
|
<svg data-p-icon="sort-amount-up-alt" [class]="cx('sortableColumnIcon')" *ngIf="sortOrder === 1" />
|
|
4580
4609
|
<svg data-p-icon="sort-amount-down" [class]="cx('sortableColumnIcon')" *ngIf="sortOrder === -1" />
|
|
4581
4610
|
</ng-container>
|
|
4582
|
-
<span *ngIf="
|
|
4583
|
-
<ng-template *ngTemplateOutlet="
|
|
4611
|
+
<span *ngIf="dataTable.sortIconTemplate || dataTable._sortIconTemplate" [class]="cx('sortableColumnIcon')">
|
|
4612
|
+
<ng-template *ngTemplateOutlet="dataTable.sortIconTemplate || dataTable._sortIconTemplate; context: { $implicit: sortOrder }"></ng-template>
|
|
4584
4613
|
</span>
|
|
4585
4614
|
<p-badge *ngIf="isMultiSorted()" [class]="cx('sortableColumnBadge')" [value]="getBadgeValue()" size="small"></p-badge>
|
|
4586
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() =>
|
|
4615
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => i6.Badge), selector: "p-badge", inputs: ["styleClass", "badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "component", type: i0.forwardRef(() => SortAltIcon), selector: "[data-p-icon=\"sort-alt\"]" }, { kind: "component", type: i0.forwardRef(() => SortAmountUpAltIcon), selector: "[data-p-icon=\"sort-amount-up-alt\"]" }, { kind: "component", type: i0.forwardRef(() => SortAmountDownIcon), selector: "[data-p-icon=\"sort-amount-down\"]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4587
4616
|
}
|
|
4588
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SortIcon, decorators: [{
|
|
4589
4618
|
type: Component,
|
|
4590
4619
|
args: [{
|
|
4591
4620
|
selector: 'p-sortIcon',
|
|
4592
4621
|
standalone: false,
|
|
4593
4622
|
template: `
|
|
4594
|
-
<ng-container *ngIf="!(
|
|
4623
|
+
<ng-container *ngIf="!(dataTable.sortIconTemplate || dataTable._sortIconTemplate)">
|
|
4595
4624
|
<svg data-p-icon="sort-alt" [class]="cx('sortableColumnIcon')" *ngIf="sortOrder === 0" />
|
|
4596
4625
|
<svg data-p-icon="sort-amount-up-alt" [class]="cx('sortableColumnIcon')" *ngIf="sortOrder === 1" />
|
|
4597
4626
|
<svg data-p-icon="sort-amount-down" [class]="cx('sortableColumnIcon')" *ngIf="sortOrder === -1" />
|
|
4598
4627
|
</ng-container>
|
|
4599
|
-
<span *ngIf="
|
|
4600
|
-
<ng-template *ngTemplateOutlet="
|
|
4628
|
+
<span *ngIf="dataTable.sortIconTemplate || dataTable._sortIconTemplate" [class]="cx('sortableColumnIcon')">
|
|
4629
|
+
<ng-template *ngTemplateOutlet="dataTable.sortIconTemplate || dataTable._sortIconTemplate; context: { $implicit: sortOrder }"></ng-template>
|
|
4601
4630
|
</span>
|
|
4602
4631
|
<p-badge *ngIf="isMultiSorted()" [class]="cx('sortableColumnBadge')" [value]="getBadgeValue()" size="small"></p-badge>
|
|
4603
4632
|
`,
|
|
@@ -4609,7 +4638,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4609
4638
|
type: Input
|
|
4610
4639
|
}] } });
|
|
4611
4640
|
class SelectableRow extends BaseComponent {
|
|
4612
|
-
|
|
4641
|
+
dataTable;
|
|
4613
4642
|
tableService;
|
|
4614
4643
|
data;
|
|
4615
4644
|
index;
|
|
@@ -4617,30 +4646,29 @@ class SelectableRow extends BaseComponent {
|
|
|
4617
4646
|
selected;
|
|
4618
4647
|
subscription;
|
|
4619
4648
|
_componentStyle = inject(TableStyle);
|
|
4620
|
-
constructor(
|
|
4649
|
+
constructor(dataTable, tableService) {
|
|
4621
4650
|
super();
|
|
4622
|
-
this.
|
|
4651
|
+
this.dataTable = dataTable;
|
|
4623
4652
|
this.tableService = tableService;
|
|
4624
4653
|
if (this.isEnabled()) {
|
|
4625
|
-
this.subscription = this.
|
|
4626
|
-
this.selected = this.
|
|
4654
|
+
this.subscription = this.dataTable.tableService.selectionSource$.subscribe(() => {
|
|
4655
|
+
this.selected = this.dataTable.isSelected(this.data);
|
|
4627
4656
|
});
|
|
4628
4657
|
}
|
|
4629
4658
|
}
|
|
4630
4659
|
setRowTabIndex() {
|
|
4631
|
-
if (this.
|
|
4632
|
-
return !this.
|
|
4660
|
+
if (this.dataTable.selectionMode === 'single' || this.dataTable.selectionMode === 'multiple') {
|
|
4661
|
+
return !this.dataTable.selection ? 0 : this.dataTable.anchorRowIndex === this.index ? 0 : -1;
|
|
4633
4662
|
}
|
|
4634
4663
|
}
|
|
4635
|
-
|
|
4636
|
-
super.ngOnInit();
|
|
4664
|
+
onInit() {
|
|
4637
4665
|
if (this.isEnabled()) {
|
|
4638
|
-
this.selected = this.
|
|
4666
|
+
this.selected = this.dataTable.isSelected(this.data);
|
|
4639
4667
|
}
|
|
4640
4668
|
}
|
|
4641
4669
|
onClick(event) {
|
|
4642
4670
|
if (this.isEnabled()) {
|
|
4643
|
-
this.
|
|
4671
|
+
this.dataTable.handleRowClick({
|
|
4644
4672
|
originalEvent: event,
|
|
4645
4673
|
rowData: this.data,
|
|
4646
4674
|
rowIndex: this.index
|
|
@@ -4649,7 +4677,7 @@ class SelectableRow extends BaseComponent {
|
|
|
4649
4677
|
}
|
|
4650
4678
|
onTouchEnd(event) {
|
|
4651
4679
|
if (this.isEnabled()) {
|
|
4652
|
-
this.
|
|
4680
|
+
this.dataTable.handleRowTouchEnd(event);
|
|
4653
4681
|
}
|
|
4654
4682
|
}
|
|
4655
4683
|
onKeyDown(event) {
|
|
@@ -4673,10 +4701,10 @@ class SelectableRow extends BaseComponent {
|
|
|
4673
4701
|
this.onEnterKey(event);
|
|
4674
4702
|
break;
|
|
4675
4703
|
default:
|
|
4676
|
-
if (event.code === 'KeyA' && (event.metaKey || event.ctrlKey) && this.
|
|
4677
|
-
const data = this.
|
|
4678
|
-
this.
|
|
4679
|
-
this.
|
|
4704
|
+
if (event.code === 'KeyA' && (event.metaKey || event.ctrlKey) && this.dataTable.selectionMode === 'multiple') {
|
|
4705
|
+
const data = this.dataTable.dataToRender(this.dataTable.processedData);
|
|
4706
|
+
this.dataTable.selection = [...data];
|
|
4707
|
+
this.dataTable.selectRange(event, data.length - 1, true);
|
|
4680
4708
|
event.preventDefault();
|
|
4681
4709
|
}
|
|
4682
4710
|
break;
|
|
@@ -4708,7 +4736,7 @@ class SelectableRow extends BaseComponent {
|
|
|
4708
4736
|
if (!this.isEnabled()) {
|
|
4709
4737
|
return;
|
|
4710
4738
|
}
|
|
4711
|
-
this.
|
|
4739
|
+
this.dataTable.handleRowClick({
|
|
4712
4740
|
originalEvent: event,
|
|
4713
4741
|
rowData: this.data,
|
|
4714
4742
|
rowIndex: this.index
|
|
@@ -4718,11 +4746,11 @@ class SelectableRow extends BaseComponent {
|
|
|
4718
4746
|
const lastRow = this.findLastSelectableRow();
|
|
4719
4747
|
lastRow && this.focusRowChange(this.el.nativeElement, lastRow);
|
|
4720
4748
|
if (event.ctrlKey && event.shiftKey) {
|
|
4721
|
-
const data = this.
|
|
4749
|
+
const data = this.dataTable.dataToRender(this.dataTable.rows);
|
|
4722
4750
|
const lastSelectableRowIndex = DomHandler.getAttribute(lastRow, 'index');
|
|
4723
|
-
this.
|
|
4724
|
-
this.
|
|
4725
|
-
this.
|
|
4751
|
+
this.dataTable.anchorRowIndex = lastSelectableRowIndex;
|
|
4752
|
+
this.dataTable.selection = data.slice(this.index || 0, data.length);
|
|
4753
|
+
this.dataTable.selectRange(event, this.index || 0);
|
|
4726
4754
|
}
|
|
4727
4755
|
event.preventDefault();
|
|
4728
4756
|
}
|
|
@@ -4730,11 +4758,11 @@ class SelectableRow extends BaseComponent {
|
|
|
4730
4758
|
const firstRow = this.findFirstSelectableRow();
|
|
4731
4759
|
firstRow && this.focusRowChange(this.el.nativeElement, firstRow);
|
|
4732
4760
|
if (event.ctrlKey && event.shiftKey) {
|
|
4733
|
-
const data = this.
|
|
4761
|
+
const data = this.dataTable.dataToRender(this.dataTable.rows);
|
|
4734
4762
|
const firstSelectableRowIndex = DomHandler.getAttribute(firstRow, 'index');
|
|
4735
|
-
this.
|
|
4736
|
-
this.
|
|
4737
|
-
this.
|
|
4763
|
+
this.dataTable.anchorRowIndex = this.dataTable.anchorRowIndex || firstSelectableRowIndex || 0;
|
|
4764
|
+
this.dataTable.selection = data.slice(0, (this.index || 0) + 1);
|
|
4765
|
+
this.dataTable.selectRange(event, this.index || 0);
|
|
4738
4766
|
}
|
|
4739
4767
|
event.preventDefault();
|
|
4740
4768
|
}
|
|
@@ -4745,21 +4773,21 @@ class SelectableRow extends BaseComponent {
|
|
|
4745
4773
|
}
|
|
4746
4774
|
else {
|
|
4747
4775
|
this.onEnterKey(event);
|
|
4748
|
-
if (event.shiftKey && this.
|
|
4749
|
-
const data = this.
|
|
4776
|
+
if (event.shiftKey && this.dataTable.selection !== null) {
|
|
4777
|
+
const data = this.dataTable.dataToRender(this.dataTable.rows);
|
|
4750
4778
|
let index;
|
|
4751
|
-
if (ObjectUtils.isNotEmpty(this.
|
|
4779
|
+
if (ObjectUtils.isNotEmpty(this.dataTable.selection) && this.dataTable.selection.length > 0) {
|
|
4752
4780
|
let firstSelectedRowIndex, lastSelectedRowIndex;
|
|
4753
|
-
firstSelectedRowIndex = ObjectUtils.findIndexInList(this.
|
|
4754
|
-
lastSelectedRowIndex = ObjectUtils.findIndexInList(this.
|
|
4755
|
-
index = this.index <= firstSelectedRowIndex ? lastSelectedRowIndex : firstSelectedRowIndex;
|
|
4781
|
+
firstSelectedRowIndex = ObjectUtils.findIndexInList(this.dataTable.selection[0], data);
|
|
4782
|
+
lastSelectedRowIndex = ObjectUtils.findIndexInList(this.dataTable.selection[this.dataTable.selection.length - 1], data);
|
|
4783
|
+
index = (this.index || 0) <= firstSelectedRowIndex ? lastSelectedRowIndex : firstSelectedRowIndex;
|
|
4756
4784
|
}
|
|
4757
4785
|
else {
|
|
4758
|
-
index = ObjectUtils.findIndexInList(this.
|
|
4786
|
+
index = ObjectUtils.findIndexInList(this.dataTable.selection, data);
|
|
4759
4787
|
}
|
|
4760
|
-
this.
|
|
4761
|
-
this.
|
|
4762
|
-
this.
|
|
4788
|
+
this.dataTable.anchorRowIndex = index || 0;
|
|
4789
|
+
this.dataTable.selection = index !== this.index ? data.slice(Math.min(index || 0, this.index || 0), Math.max(index || 0, this.index || 0) + 1) : [this.data];
|
|
4790
|
+
this.dataTable.selectRange(event, this.index || 0);
|
|
4763
4791
|
}
|
|
4764
4792
|
event.preventDefault();
|
|
4765
4793
|
}
|
|
@@ -4770,11 +4798,11 @@ class SelectableRow extends BaseComponent {
|
|
|
4770
4798
|
DomHandler.focus(currentFocusedRow);
|
|
4771
4799
|
}
|
|
4772
4800
|
findLastSelectableRow() {
|
|
4773
|
-
const rows = DomHandler.find(this.
|
|
4801
|
+
const rows = DomHandler.find(this.dataTable.el.nativeElement, '.p-datatable-selectable-row');
|
|
4774
4802
|
return rows ? rows[rows.length - 1] : null;
|
|
4775
4803
|
}
|
|
4776
4804
|
findFirstSelectableRow() {
|
|
4777
|
-
const firstRow = DomHandler.findSingle(this.
|
|
4805
|
+
const firstRow = DomHandler.findSingle(this.dataTable.el.nativeElement, '.p-datatable-selectable-row');
|
|
4778
4806
|
return firstRow;
|
|
4779
4807
|
}
|
|
4780
4808
|
findNextSelectableRow(row) {
|
|
@@ -4804,16 +4832,15 @@ class SelectableRow extends BaseComponent {
|
|
|
4804
4832
|
isEnabled() {
|
|
4805
4833
|
return this.pSelectableRowDisabled !== true;
|
|
4806
4834
|
}
|
|
4807
|
-
|
|
4808
|
-
super.ngOnDestroy();
|
|
4835
|
+
onDestroy() {
|
|
4809
4836
|
if (this.subscription) {
|
|
4810
4837
|
this.subscription.unsubscribe();
|
|
4811
4838
|
}
|
|
4812
4839
|
}
|
|
4813
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4814
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
4840
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SelectableRow, deps: [{ token: Table }, { token: TableService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4841
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.4", type: SelectableRow, isStandalone: false, selector: "[pSelectableRow]", inputs: { data: ["pSelectableRow", "data"], index: ["pSelectableRowIndex", "index"], pSelectableRowDisabled: ["pSelectableRowDisabled", "pSelectableRowDisabled", booleanAttribute] }, host: { listeners: { "click": "onClick($event)", "touchend": "onTouchEnd($event)", "keydown": "onKeyDown($event)" }, properties: { "class": "cx('selectableRow')", "tabindex": "setRowTabIndex()", "attr.data-p-selectable-row": "true" } }, providers: [TableStyle], usesInheritance: true, ngImport: i0 });
|
|
4815
4842
|
}
|
|
4816
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4843
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SelectableRow, decorators: [{
|
|
4817
4844
|
type: Directive,
|
|
4818
4845
|
args: [{
|
|
4819
4846
|
selector: '[pSelectableRow]',
|
|
@@ -4844,31 +4871,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4844
4871
|
type: HostListener,
|
|
4845
4872
|
args: ['keydown', ['$event']]
|
|
4846
4873
|
}] } });
|
|
4847
|
-
class SelectableRowDblClick {
|
|
4848
|
-
|
|
4874
|
+
class SelectableRowDblClick extends BaseComponent {
|
|
4875
|
+
dataTable;
|
|
4849
4876
|
tableService;
|
|
4850
4877
|
data;
|
|
4851
4878
|
index;
|
|
4852
4879
|
pSelectableRowDisabled;
|
|
4853
4880
|
selected;
|
|
4854
4881
|
subscription;
|
|
4855
|
-
constructor(
|
|
4856
|
-
|
|
4882
|
+
constructor(dataTable, tableService) {
|
|
4883
|
+
super();
|
|
4884
|
+
this.dataTable = dataTable;
|
|
4857
4885
|
this.tableService = tableService;
|
|
4858
4886
|
if (this.isEnabled()) {
|
|
4859
|
-
this.subscription = this.
|
|
4860
|
-
this.selected = this.
|
|
4887
|
+
this.subscription = this.dataTable.tableService.selectionSource$.subscribe(() => {
|
|
4888
|
+
this.selected = this.dataTable.isSelected(this.data);
|
|
4861
4889
|
});
|
|
4862
4890
|
}
|
|
4863
4891
|
}
|
|
4864
|
-
|
|
4892
|
+
onInit() {
|
|
4865
4893
|
if (this.isEnabled()) {
|
|
4866
|
-
this.selected = this.
|
|
4894
|
+
this.selected = this.dataTable.isSelected(this.data);
|
|
4867
4895
|
}
|
|
4868
4896
|
}
|
|
4869
4897
|
onClick(event) {
|
|
4870
4898
|
if (this.isEnabled()) {
|
|
4871
|
-
this.
|
|
4899
|
+
this.dataTable.handleRowClick({
|
|
4872
4900
|
originalEvent: event,
|
|
4873
4901
|
rowData: this.data,
|
|
4874
4902
|
rowIndex: this.index
|
|
@@ -4878,15 +4906,15 @@ class SelectableRowDblClick {
|
|
|
4878
4906
|
isEnabled() {
|
|
4879
4907
|
return this.pSelectableRowDisabled !== true;
|
|
4880
4908
|
}
|
|
4881
|
-
|
|
4909
|
+
onDestroy() {
|
|
4882
4910
|
if (this.subscription) {
|
|
4883
4911
|
this.subscription.unsubscribe();
|
|
4884
4912
|
}
|
|
4885
4913
|
}
|
|
4886
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4887
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
4914
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SelectableRowDblClick, deps: [{ token: Table }, { token: TableService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4915
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.4", type: SelectableRowDblClick, isStandalone: false, selector: "[pSelectableRowDblClick]", inputs: { data: ["pSelectableRowDblClick", "data"], index: ["pSelectableRowIndex", "index"], pSelectableRowDisabled: ["pSelectableRowDisabled", "pSelectableRowDisabled", booleanAttribute] }, host: { listeners: { "dblclick": "onClick($event)" }, properties: { "class.p-selectable-row": "isEnabled()", "class.p-highlight": "selected" } }, usesInheritance: true, ngImport: i0 });
|
|
4888
4916
|
}
|
|
4889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SelectableRowDblClick, decorators: [{
|
|
4890
4918
|
type: Directive,
|
|
4891
4919
|
args: [{
|
|
4892
4920
|
selector: '[pSelectableRowDblClick]',
|
|
@@ -4909,28 +4937,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4909
4937
|
type: HostListener,
|
|
4910
4938
|
args: ['dblclick', ['$event']]
|
|
4911
4939
|
}] } });
|
|
4912
|
-
class ContextMenuRow {
|
|
4913
|
-
|
|
4940
|
+
class ContextMenuRow extends BaseComponent {
|
|
4941
|
+
dataTable;
|
|
4914
4942
|
tableService;
|
|
4915
|
-
el;
|
|
4916
4943
|
data;
|
|
4917
4944
|
index;
|
|
4918
4945
|
pContextMenuRowDisabled;
|
|
4919
4946
|
selected;
|
|
4920
4947
|
subscription;
|
|
4921
|
-
constructor(
|
|
4922
|
-
|
|
4948
|
+
constructor(dataTable, tableService) {
|
|
4949
|
+
super();
|
|
4950
|
+
this.dataTable = dataTable;
|
|
4923
4951
|
this.tableService = tableService;
|
|
4924
|
-
this.el = el;
|
|
4925
4952
|
if (this.isEnabled()) {
|
|
4926
|
-
this.subscription = this.
|
|
4927
|
-
this.selected = this.
|
|
4953
|
+
this.subscription = this.dataTable.tableService.contextMenuSource$.subscribe((data) => {
|
|
4954
|
+
this.selected = this.dataTable.equals(this.data, data);
|
|
4928
4955
|
});
|
|
4929
4956
|
}
|
|
4930
4957
|
}
|
|
4931
4958
|
onContextMenu(event) {
|
|
4932
4959
|
if (this.isEnabled()) {
|
|
4933
|
-
this.
|
|
4960
|
+
this.dataTable.handleRowRightClick({
|
|
4934
4961
|
originalEvent: event,
|
|
4935
4962
|
rowData: this.data,
|
|
4936
4963
|
rowIndex: this.index
|
|
@@ -4942,15 +4969,15 @@ class ContextMenuRow {
|
|
|
4942
4969
|
isEnabled() {
|
|
4943
4970
|
return this.pContextMenuRowDisabled !== true;
|
|
4944
4971
|
}
|
|
4945
|
-
|
|
4972
|
+
onDestroy() {
|
|
4946
4973
|
if (this.subscription) {
|
|
4947
4974
|
this.subscription.unsubscribe();
|
|
4948
4975
|
}
|
|
4949
4976
|
}
|
|
4950
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4951
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
4977
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ContextMenuRow, deps: [{ token: Table }, { token: TableService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4978
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.4", type: ContextMenuRow, isStandalone: false, selector: "[pContextMenuRow]", inputs: { data: ["pContextMenuRow", "data"], index: ["pContextMenuRowIndex", "index"], pContextMenuRowDisabled: ["pContextMenuRowDisabled", "pContextMenuRowDisabled", booleanAttribute] }, host: { listeners: { "contextmenu": "onContextMenu($event)" }, properties: { "class.p-datatable-contextmenu-row-selected": "selected", "attr.tabindex": "isEnabled() ? 0 : undefined" } }, usesInheritance: true, ngImport: i0 });
|
|
4952
4979
|
}
|
|
4953
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ContextMenuRow, decorators: [{
|
|
4954
4981
|
type: Directive,
|
|
4955
4982
|
args: [{
|
|
4956
4983
|
selector: '[pContextMenuRow]',
|
|
@@ -4960,7 +4987,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4960
4987
|
'[attr.tabindex]': 'isEnabled() ? 0 : undefined'
|
|
4961
4988
|
}
|
|
4962
4989
|
}]
|
|
4963
|
-
}], ctorParameters: () => [{ type: Table }, { type: TableService }
|
|
4990
|
+
}], ctorParameters: () => [{ type: Table }, { type: TableService }], propDecorators: { data: [{
|
|
4964
4991
|
type: Input,
|
|
4965
4992
|
args: ['pContextMenuRow']
|
|
4966
4993
|
}], index: [{
|
|
@@ -4973,26 +5000,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
4973
5000
|
type: HostListener,
|
|
4974
5001
|
args: ['contextmenu', ['$event']]
|
|
4975
5002
|
}] } });
|
|
4976
|
-
class RowToggler {
|
|
4977
|
-
|
|
5003
|
+
class RowToggler extends BaseComponent {
|
|
5004
|
+
dataTable;
|
|
4978
5005
|
data;
|
|
4979
5006
|
pRowTogglerDisabled;
|
|
4980
|
-
constructor(
|
|
4981
|
-
|
|
5007
|
+
constructor(dataTable) {
|
|
5008
|
+
super();
|
|
5009
|
+
this.dataTable = dataTable;
|
|
4982
5010
|
}
|
|
4983
5011
|
onClick(event) {
|
|
4984
5012
|
if (this.isEnabled()) {
|
|
4985
|
-
this.
|
|
5013
|
+
this.dataTable.toggleRow(this.data, event);
|
|
4986
5014
|
event.preventDefault();
|
|
4987
5015
|
}
|
|
4988
5016
|
}
|
|
4989
5017
|
isEnabled() {
|
|
4990
5018
|
return this.pRowTogglerDisabled !== true;
|
|
4991
5019
|
}
|
|
4992
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4993
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
5020
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RowToggler, deps: [{ token: Table }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5021
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.4", type: RowToggler, isStandalone: false, selector: "[pRowToggler]", inputs: { data: ["pRowToggler", "data"], pRowTogglerDisabled: ["pRowTogglerDisabled", "pRowTogglerDisabled", booleanAttribute] }, host: { listeners: { "click": "onClick($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
4994
5022
|
}
|
|
4995
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5023
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RowToggler, decorators: [{
|
|
4996
5024
|
type: Directive,
|
|
4997
5025
|
args: [{
|
|
4998
5026
|
selector: '[pRowToggler]',
|
|
@@ -5009,8 +5037,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5009
5037
|
args: ['click', ['$event']]
|
|
5010
5038
|
}] } });
|
|
5011
5039
|
class ResizableColumn extends BaseComponent {
|
|
5012
|
-
|
|
5013
|
-
el;
|
|
5040
|
+
dataTable;
|
|
5014
5041
|
zone;
|
|
5015
5042
|
pResizableColumnDisabled;
|
|
5016
5043
|
resizer;
|
|
@@ -5021,14 +5048,12 @@ class ResizableColumn extends BaseComponent {
|
|
|
5021
5048
|
documentMouseMoveListener;
|
|
5022
5049
|
documentMouseUpListener;
|
|
5023
5050
|
_componentStyle = inject(TableStyle);
|
|
5024
|
-
constructor(
|
|
5051
|
+
constructor(dataTable, zone) {
|
|
5025
5052
|
super();
|
|
5026
|
-
this.
|
|
5027
|
-
this.el = el;
|
|
5053
|
+
this.dataTable = dataTable;
|
|
5028
5054
|
this.zone = zone;
|
|
5029
5055
|
}
|
|
5030
|
-
|
|
5031
|
-
super.ngAfterViewInit();
|
|
5056
|
+
onAfterViewInit() {
|
|
5032
5057
|
if (isPlatformBrowser(this.platformId)) {
|
|
5033
5058
|
if (this.isEnabled()) {
|
|
5034
5059
|
DomHandler.addClass(this.el.nativeElement, 'p-datatable-resizable-column');
|
|
@@ -5069,42 +5094,41 @@ class ResizableColumn extends BaseComponent {
|
|
|
5069
5094
|
}
|
|
5070
5095
|
}
|
|
5071
5096
|
onMouseDown(event) {
|
|
5072
|
-
this.
|
|
5097
|
+
this.dataTable.onColumnResizeBegin(event);
|
|
5073
5098
|
this.bindDocumentEvents();
|
|
5074
5099
|
}
|
|
5075
5100
|
onTouchStart(event) {
|
|
5076
|
-
this.
|
|
5101
|
+
this.dataTable.onColumnResizeBegin(event);
|
|
5077
5102
|
this.bindDocumentEvents();
|
|
5078
5103
|
}
|
|
5079
5104
|
onTouchMove(event) {
|
|
5080
|
-
this.
|
|
5105
|
+
this.dataTable.onColumnResize(event);
|
|
5081
5106
|
}
|
|
5082
5107
|
onDocumentMouseMove(event) {
|
|
5083
|
-
this.
|
|
5108
|
+
this.dataTable.onColumnResize(event);
|
|
5084
5109
|
}
|
|
5085
5110
|
onDocumentMouseUp(event) {
|
|
5086
|
-
this.
|
|
5111
|
+
this.dataTable.onColumnResizeEnd();
|
|
5087
5112
|
this.unbindDocumentEvents();
|
|
5088
5113
|
}
|
|
5089
5114
|
onTouchEnd(event) {
|
|
5090
|
-
this.
|
|
5115
|
+
this.dataTable.onColumnResizeEnd();
|
|
5091
5116
|
this.unbindDocumentEvents();
|
|
5092
5117
|
}
|
|
5093
5118
|
isEnabled() {
|
|
5094
5119
|
return this.pResizableColumnDisabled !== true;
|
|
5095
5120
|
}
|
|
5096
|
-
|
|
5097
|
-
super.ngOnDestroy();
|
|
5121
|
+
onDestroy() {
|
|
5098
5122
|
if (this.resizerMouseDownListener) {
|
|
5099
5123
|
this.resizerMouseDownListener();
|
|
5100
5124
|
this.resizerMouseDownListener = null;
|
|
5101
5125
|
}
|
|
5102
5126
|
this.unbindDocumentEvents();
|
|
5103
5127
|
}
|
|
5104
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5105
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
5128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ResizableColumn, deps: [{ token: Table }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5129
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.4", type: ResizableColumn, isStandalone: false, selector: "[pResizableColumn]", inputs: { pResizableColumnDisabled: ["pResizableColumnDisabled", "pResizableColumnDisabled", booleanAttribute] }, host: { properties: { "class": "cx('resizableColumn')" } }, providers: [TableStyle], usesInheritance: true, ngImport: i0 });
|
|
5106
5130
|
}
|
|
5107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ResizableColumn, decorators: [{
|
|
5108
5132
|
type: Directive,
|
|
5109
5133
|
args: [{
|
|
5110
5134
|
selector: '[pResizableColumn]',
|
|
@@ -5114,12 +5138,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5114
5138
|
},
|
|
5115
5139
|
providers: [TableStyle]
|
|
5116
5140
|
}]
|
|
5117
|
-
}], ctorParameters: () => [{ type: Table }, { type: i0.
|
|
5141
|
+
}], ctorParameters: () => [{ type: Table }, { type: i0.NgZone }], propDecorators: { pResizableColumnDisabled: [{
|
|
5118
5142
|
type: Input,
|
|
5119
5143
|
args: [{ transform: booleanAttribute }]
|
|
5120
5144
|
}] } });
|
|
5121
5145
|
class ReorderableColumn extends BaseComponent {
|
|
5122
|
-
|
|
5146
|
+
dataTable;
|
|
5123
5147
|
el;
|
|
5124
5148
|
zone;
|
|
5125
5149
|
pReorderableColumnDisabled;
|
|
@@ -5129,14 +5153,13 @@ class ReorderableColumn extends BaseComponent {
|
|
|
5129
5153
|
dragLeaveListener;
|
|
5130
5154
|
mouseDownListener;
|
|
5131
5155
|
_componentStyle = inject(TableStyle);
|
|
5132
|
-
constructor(
|
|
5156
|
+
constructor(dataTable, el, zone) {
|
|
5133
5157
|
super();
|
|
5134
|
-
this.
|
|
5158
|
+
this.dataTable = dataTable;
|
|
5135
5159
|
this.el = el;
|
|
5136
5160
|
this.zone = zone;
|
|
5137
5161
|
}
|
|
5138
|
-
|
|
5139
|
-
super.ngAfterViewInit();
|
|
5162
|
+
onAfterViewInit() {
|
|
5140
5163
|
if (this.isEnabled()) {
|
|
5141
5164
|
this.bindEvents();
|
|
5142
5165
|
}
|
|
@@ -5181,33 +5204,32 @@ class ReorderableColumn extends BaseComponent {
|
|
|
5181
5204
|
this.el.nativeElement.draggable = true;
|
|
5182
5205
|
}
|
|
5183
5206
|
onDragStart(event) {
|
|
5184
|
-
this.
|
|
5207
|
+
this.dataTable.onColumnDragStart(event, this.el.nativeElement);
|
|
5185
5208
|
}
|
|
5186
5209
|
onDragOver(event) {
|
|
5187
5210
|
event.preventDefault();
|
|
5188
5211
|
}
|
|
5189
5212
|
onDragEnter(event) {
|
|
5190
|
-
this.
|
|
5213
|
+
this.dataTable.onColumnDragEnter(event, this.el.nativeElement);
|
|
5191
5214
|
}
|
|
5192
5215
|
onDragLeave(event) {
|
|
5193
|
-
this.
|
|
5216
|
+
this.dataTable.onColumnDragLeave(event);
|
|
5194
5217
|
}
|
|
5195
5218
|
onDrop(event) {
|
|
5196
5219
|
if (this.isEnabled()) {
|
|
5197
|
-
this.
|
|
5220
|
+
this.dataTable.onColumnDrop(event, this.el.nativeElement);
|
|
5198
5221
|
}
|
|
5199
5222
|
}
|
|
5200
5223
|
isEnabled() {
|
|
5201
5224
|
return this.pReorderableColumnDisabled !== true;
|
|
5202
5225
|
}
|
|
5203
|
-
|
|
5204
|
-
super.ngOnDestroy();
|
|
5226
|
+
onDestroy() {
|
|
5205
5227
|
this.unbindEvents();
|
|
5206
5228
|
}
|
|
5207
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5208
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
5229
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ReorderableColumn, deps: [{ token: Table }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5230
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.4", type: ReorderableColumn, isStandalone: false, selector: "[pReorderableColumn]", inputs: { pReorderableColumnDisabled: ["pReorderableColumnDisabled", "pReorderableColumnDisabled", booleanAttribute] }, host: { listeners: { "drop": "onDrop($event)" }, properties: { "class": "cx('reorderableColumn')" } }, providers: [TableStyle], usesInheritance: true, ngImport: i0 });
|
|
5209
5231
|
}
|
|
5210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ReorderableColumn, decorators: [{
|
|
5211
5233
|
type: Directive,
|
|
5212
5234
|
args: [{
|
|
5213
5235
|
selector: '[pReorderableColumn]',
|
|
@@ -5224,9 +5246,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5224
5246
|
type: HostListener,
|
|
5225
5247
|
args: ['drop', ['$event']]
|
|
5226
5248
|
}] } });
|
|
5227
|
-
class EditableColumn {
|
|
5228
|
-
|
|
5229
|
-
el;
|
|
5249
|
+
class EditableColumn extends BaseComponent {
|
|
5250
|
+
dataTable;
|
|
5230
5251
|
zone;
|
|
5231
5252
|
data;
|
|
5232
5253
|
field;
|
|
@@ -5234,27 +5255,27 @@ class EditableColumn {
|
|
|
5234
5255
|
pEditableColumnDisabled;
|
|
5235
5256
|
pFocusCellSelector;
|
|
5236
5257
|
overlayEventListener;
|
|
5237
|
-
constructor(
|
|
5238
|
-
|
|
5239
|
-
this.
|
|
5258
|
+
constructor(dataTable, zone) {
|
|
5259
|
+
super();
|
|
5260
|
+
this.dataTable = dataTable;
|
|
5240
5261
|
this.zone = zone;
|
|
5241
5262
|
}
|
|
5242
|
-
|
|
5263
|
+
onChanges(changes) {
|
|
5243
5264
|
if (this.el.nativeElement && !changes.data?.firstChange) {
|
|
5244
|
-
this.
|
|
5265
|
+
this.dataTable.updateEditingCell(this.el.nativeElement, this.data, this.field, this.rowIndex);
|
|
5245
5266
|
}
|
|
5246
5267
|
}
|
|
5247
|
-
|
|
5268
|
+
onAfterViewInit() {
|
|
5248
5269
|
if (this.isEnabled()) {
|
|
5249
5270
|
DomHandler.addClass(this.el.nativeElement, 'p-editable-column');
|
|
5250
5271
|
}
|
|
5251
5272
|
}
|
|
5252
5273
|
onClick(event) {
|
|
5253
5274
|
if (this.isEnabled()) {
|
|
5254
|
-
this.
|
|
5255
|
-
if (this.
|
|
5256
|
-
if (this.
|
|
5257
|
-
if (!this.
|
|
5275
|
+
this.dataTable.selfClick = true;
|
|
5276
|
+
if (this.dataTable.editingCell) {
|
|
5277
|
+
if (this.dataTable.editingCell !== this.el.nativeElement) {
|
|
5278
|
+
if (!this.dataTable.isEditingCellValid()) {
|
|
5258
5279
|
return;
|
|
5259
5280
|
}
|
|
5260
5281
|
this.closeEditingCell(true, event);
|
|
@@ -5267,9 +5288,9 @@ class EditableColumn {
|
|
|
5267
5288
|
}
|
|
5268
5289
|
}
|
|
5269
5290
|
openCell() {
|
|
5270
|
-
this.
|
|
5291
|
+
this.dataTable.updateEditingCell(this.el.nativeElement, this.data, this.field, this.rowIndex);
|
|
5271
5292
|
DomHandler.addClass(this.el.nativeElement, 'p-cell-editing');
|
|
5272
|
-
this.
|
|
5293
|
+
this.dataTable.onEditInit.emit({
|
|
5273
5294
|
field: this.field,
|
|
5274
5295
|
data: this.data,
|
|
5275
5296
|
index: this.rowIndex
|
|
@@ -5285,41 +5306,41 @@ class EditableColumn {
|
|
|
5285
5306
|
});
|
|
5286
5307
|
this.overlayEventListener = (e) => {
|
|
5287
5308
|
if (this.el && this.el.nativeElement.contains(e.target)) {
|
|
5288
|
-
this.
|
|
5309
|
+
this.dataTable.selfClick = true;
|
|
5289
5310
|
}
|
|
5290
5311
|
};
|
|
5291
|
-
this.
|
|
5312
|
+
this.dataTable.overlaySubscription = this.dataTable.overlayService.clickObservable.subscribe(this.overlayEventListener);
|
|
5292
5313
|
}
|
|
5293
5314
|
closeEditingCell(completed, event) {
|
|
5294
5315
|
const eventData = {
|
|
5295
|
-
field: this.
|
|
5296
|
-
data: this.
|
|
5316
|
+
field: this.dataTable.editingCellField,
|
|
5317
|
+
data: this.dataTable.editingCellData,
|
|
5297
5318
|
originalEvent: event,
|
|
5298
|
-
index: this.
|
|
5319
|
+
index: this.dataTable.editingCellRowIndex
|
|
5299
5320
|
};
|
|
5300
5321
|
if (completed) {
|
|
5301
|
-
this.
|
|
5322
|
+
this.dataTable.onEditComplete.emit(eventData);
|
|
5302
5323
|
}
|
|
5303
5324
|
else {
|
|
5304
|
-
this.
|
|
5305
|
-
this.
|
|
5306
|
-
if (element[this.
|
|
5307
|
-
element[this.
|
|
5325
|
+
this.dataTable.onEditCancel.emit(eventData);
|
|
5326
|
+
this.dataTable.value.forEach((element) => {
|
|
5327
|
+
if (element[this.dataTable.editingCellField] === this.data) {
|
|
5328
|
+
element[this.dataTable.editingCellField] = this.dataTable.editingCellData;
|
|
5308
5329
|
}
|
|
5309
5330
|
});
|
|
5310
5331
|
}
|
|
5311
|
-
DomHandler.removeClass(this.
|
|
5312
|
-
this.
|
|
5313
|
-
this.
|
|
5314
|
-
this.
|
|
5315
|
-
this.
|
|
5316
|
-
if (this.
|
|
5317
|
-
this.
|
|
5332
|
+
DomHandler.removeClass(this.dataTable.editingCell, 'p-cell-editing');
|
|
5333
|
+
this.dataTable.editingCell = null;
|
|
5334
|
+
this.dataTable.editingCellData = null;
|
|
5335
|
+
this.dataTable.editingCellField = null;
|
|
5336
|
+
this.dataTable.unbindDocumentEditListener();
|
|
5337
|
+
if (this.dataTable.overlaySubscription) {
|
|
5338
|
+
this.dataTable.overlaySubscription.unsubscribe();
|
|
5318
5339
|
}
|
|
5319
5340
|
}
|
|
5320
5341
|
onEnterKeyDown(event) {
|
|
5321
5342
|
if (this.isEnabled() && !event.shiftKey) {
|
|
5322
|
-
if (this.
|
|
5343
|
+
if (this.dataTable.isEditingCellValid()) {
|
|
5323
5344
|
this.closeEditingCell(true, event);
|
|
5324
5345
|
}
|
|
5325
5346
|
event.preventDefault();
|
|
@@ -5327,7 +5348,7 @@ class EditableColumn {
|
|
|
5327
5348
|
}
|
|
5328
5349
|
onTabKeyDown(event) {
|
|
5329
5350
|
if (this.isEnabled()) {
|
|
5330
|
-
if (this.
|
|
5351
|
+
if (this.dataTable.isEditingCellValid()) {
|
|
5331
5352
|
this.closeEditingCell(true, event);
|
|
5332
5353
|
}
|
|
5333
5354
|
event.preventDefault();
|
|
@@ -5335,7 +5356,7 @@ class EditableColumn {
|
|
|
5335
5356
|
}
|
|
5336
5357
|
onEscapeKeyDown(event) {
|
|
5337
5358
|
if (this.isEnabled()) {
|
|
5338
|
-
if (this.
|
|
5359
|
+
if (this.dataTable.isEditingCellValid()) {
|
|
5339
5360
|
this.closeEditingCell(false, event);
|
|
5340
5361
|
}
|
|
5341
5362
|
event.preventDefault();
|
|
@@ -5357,7 +5378,7 @@ class EditableColumn {
|
|
|
5357
5378
|
let cellIndex = DomHandler.index(currentCell);
|
|
5358
5379
|
let targetCell = this.findNextEditableColumnByIndex(currentCell, cellIndex);
|
|
5359
5380
|
if (targetCell) {
|
|
5360
|
-
if (this.
|
|
5381
|
+
if (this.dataTable.isEditingCellValid()) {
|
|
5361
5382
|
this.closeEditingCell(true, event);
|
|
5362
5383
|
}
|
|
5363
5384
|
DomHandler.invokeElementMethod(event.target, 'blur');
|
|
@@ -5374,7 +5395,7 @@ class EditableColumn {
|
|
|
5374
5395
|
let cellIndex = DomHandler.index(currentCell);
|
|
5375
5396
|
let targetCell = this.findPrevEditableColumnByIndex(currentCell, cellIndex);
|
|
5376
5397
|
if (targetCell) {
|
|
5377
|
-
if (this.
|
|
5398
|
+
if (this.dataTable.isEditingCellValid()) {
|
|
5378
5399
|
this.closeEditingCell(true, event);
|
|
5379
5400
|
}
|
|
5380
5401
|
DomHandler.invokeElementMethod(event.target, 'blur');
|
|
@@ -5411,7 +5432,7 @@ class EditableColumn {
|
|
|
5411
5432
|
if (currentCell) {
|
|
5412
5433
|
let targetCell = this.findPreviousEditableColumn(currentCell);
|
|
5413
5434
|
if (targetCell) {
|
|
5414
|
-
if (this.
|
|
5435
|
+
if (this.dataTable.isEditingCellValid()) {
|
|
5415
5436
|
this.closeEditingCell(true, event);
|
|
5416
5437
|
}
|
|
5417
5438
|
DomHandler.invokeElementMethod(event.target, 'blur');
|
|
@@ -5425,7 +5446,7 @@ class EditableColumn {
|
|
|
5425
5446
|
if (currentCell) {
|
|
5426
5447
|
let targetCell = this.findNextEditableColumn(currentCell);
|
|
5427
5448
|
if (targetCell) {
|
|
5428
|
-
if (this.
|
|
5449
|
+
if (this.dataTable.isEditingCellValid()) {
|
|
5429
5450
|
this.closeEditingCell(true, event);
|
|
5430
5451
|
}
|
|
5431
5452
|
DomHandler.invokeElementMethod(event.target, 'blur');
|
|
@@ -5433,7 +5454,7 @@ class EditableColumn {
|
|
|
5433
5454
|
event.preventDefault();
|
|
5434
5455
|
}
|
|
5435
5456
|
else {
|
|
5436
|
-
if (this.
|
|
5457
|
+
if (this.dataTable.isEditingCellValid()) {
|
|
5437
5458
|
this.closeEditingCell(true, event);
|
|
5438
5459
|
}
|
|
5439
5460
|
}
|
|
@@ -5504,21 +5525,21 @@ class EditableColumn {
|
|
|
5504
5525
|
isEnabled() {
|
|
5505
5526
|
return this.pEditableColumnDisabled !== true;
|
|
5506
5527
|
}
|
|
5507
|
-
|
|
5508
|
-
if (this.
|
|
5509
|
-
this.
|
|
5528
|
+
onDestroy() {
|
|
5529
|
+
if (this.dataTable.overlaySubscription) {
|
|
5530
|
+
this.dataTable.overlaySubscription.unsubscribe();
|
|
5510
5531
|
}
|
|
5511
5532
|
}
|
|
5512
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5513
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
5533
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: EditableColumn, deps: [{ token: Table }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5534
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.4", type: EditableColumn, isStandalone: false, selector: "[pEditableColumn]", inputs: { data: ["pEditableColumn", "data"], field: ["pEditableColumnField", "field"], rowIndex: ["pEditableColumnRowIndex", "rowIndex"], pEditableColumnDisabled: ["pEditableColumnDisabled", "pEditableColumnDisabled", booleanAttribute], pFocusCellSelector: "pFocusCellSelector" }, host: { listeners: { "click": "onClick($event)", "keydown.enter": "onEnterKeyDown($event)", "keydown.tab": "onShiftKeyDown($event)", "keydown.escape": "onEscapeKeyDown($event)", "keydown.shift.tab": "onShiftKeyDown($event)", "keydown.meta.tab": "onShiftKeyDown($event)", "keydown.arrowdown": "onArrowDown($event)", "keydown.arrowup": "onArrowUp($event)", "keydown.arrowleft": "onArrowLeft($event)", "keydown.arrowright": "onArrowRight($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
5514
5535
|
}
|
|
5515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: EditableColumn, decorators: [{
|
|
5516
5537
|
type: Directive,
|
|
5517
5538
|
args: [{
|
|
5518
5539
|
selector: '[pEditableColumn]',
|
|
5519
5540
|
standalone: false
|
|
5520
5541
|
}]
|
|
5521
|
-
}], ctorParameters: () => [{ type: Table }, { type: i0.
|
|
5542
|
+
}], ctorParameters: () => [{ type: Table }, { type: i0.NgZone }], propDecorators: { data: [{
|
|
5522
5543
|
type: Input,
|
|
5523
5544
|
args: ['pEditableColumn']
|
|
5524
5545
|
}], field: [{
|
|
@@ -5566,47 +5587,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5566
5587
|
type: HostListener,
|
|
5567
5588
|
args: ['keydown.arrowright', ['$event']]
|
|
5568
5589
|
}] } });
|
|
5569
|
-
class EditableRow {
|
|
5570
|
-
el;
|
|
5590
|
+
class EditableRow extends BaseComponent {
|
|
5571
5591
|
data;
|
|
5572
5592
|
pEditableRowDisabled;
|
|
5573
|
-
constructor(el) {
|
|
5574
|
-
this.el = el;
|
|
5575
|
-
}
|
|
5576
5593
|
isEnabled() {
|
|
5577
5594
|
return this.pEditableRowDisabled !== true;
|
|
5578
5595
|
}
|
|
5579
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5580
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
5596
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: EditableRow, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
5597
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.4", type: EditableRow, isStandalone: false, selector: "[pEditableRow]", inputs: { data: ["pEditableRow", "data"], pEditableRowDisabled: ["pEditableRowDisabled", "pEditableRowDisabled", booleanAttribute] }, usesInheritance: true, ngImport: i0 });
|
|
5581
5598
|
}
|
|
5582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: EditableRow, decorators: [{
|
|
5583
5600
|
type: Directive,
|
|
5584
5601
|
args: [{
|
|
5585
5602
|
selector: '[pEditableRow]',
|
|
5586
5603
|
standalone: false
|
|
5587
5604
|
}]
|
|
5588
|
-
}],
|
|
5605
|
+
}], propDecorators: { data: [{
|
|
5589
5606
|
type: Input,
|
|
5590
5607
|
args: ['pEditableRow']
|
|
5591
5608
|
}], pEditableRowDisabled: [{
|
|
5592
5609
|
type: Input,
|
|
5593
5610
|
args: [{ transform: booleanAttribute }]
|
|
5594
5611
|
}] } });
|
|
5595
|
-
class InitEditableRow {
|
|
5596
|
-
|
|
5612
|
+
class InitEditableRow extends BaseComponent {
|
|
5613
|
+
dataTable;
|
|
5597
5614
|
editableRow;
|
|
5598
|
-
constructor(
|
|
5599
|
-
|
|
5615
|
+
constructor(dataTable, editableRow) {
|
|
5616
|
+
super();
|
|
5617
|
+
this.dataTable = dataTable;
|
|
5600
5618
|
this.editableRow = editableRow;
|
|
5601
5619
|
}
|
|
5602
5620
|
onClick(event) {
|
|
5603
|
-
this.
|
|
5621
|
+
this.dataTable.initRowEdit(this.editableRow.data);
|
|
5604
5622
|
event.preventDefault();
|
|
5605
5623
|
}
|
|
5606
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5607
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
5624
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: InitEditableRow, deps: [{ token: Table }, { token: EditableRow }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5625
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: InitEditableRow, isStandalone: false, selector: "[pInitEditableRow]", host: { listeners: { "click": "onClick($event)" }, classAttribute: "p-datatable-row-editor-init" }, usesInheritance: true, ngImport: i0 });
|
|
5608
5626
|
}
|
|
5609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: InitEditableRow, decorators: [{
|
|
5610
5628
|
type: Directive,
|
|
5611
5629
|
args: [{
|
|
5612
5630
|
selector: '[pInitEditableRow]',
|
|
@@ -5619,21 +5637,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5619
5637
|
type: HostListener,
|
|
5620
5638
|
args: ['click', ['$event']]
|
|
5621
5639
|
}] } });
|
|
5622
|
-
class SaveEditableRow {
|
|
5623
|
-
|
|
5640
|
+
class SaveEditableRow extends BaseComponent {
|
|
5641
|
+
dataTable;
|
|
5624
5642
|
editableRow;
|
|
5625
|
-
constructor(
|
|
5626
|
-
|
|
5643
|
+
constructor(dataTable, editableRow) {
|
|
5644
|
+
super();
|
|
5645
|
+
this.dataTable = dataTable;
|
|
5627
5646
|
this.editableRow = editableRow;
|
|
5628
5647
|
}
|
|
5629
5648
|
onClick(event) {
|
|
5630
|
-
this.
|
|
5649
|
+
this.dataTable.saveRowEdit(this.editableRow.data, this.editableRow.el.nativeElement);
|
|
5631
5650
|
event.preventDefault();
|
|
5632
5651
|
}
|
|
5633
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5634
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
5652
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SaveEditableRow, deps: [{ token: Table }, { token: EditableRow }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5653
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: SaveEditableRow, isStandalone: false, selector: "[pSaveEditableRow]", host: { listeners: { "click": "onClick($event)" }, classAttribute: "p-datatable-row-editor-save" }, usesInheritance: true, ngImport: i0 });
|
|
5635
5654
|
}
|
|
5636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SaveEditableRow, decorators: [{
|
|
5637
5656
|
type: Directive,
|
|
5638
5657
|
args: [{
|
|
5639
5658
|
selector: '[pSaveEditableRow]',
|
|
@@ -5647,22 +5666,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5647
5666
|
args: ['click', ['$event']]
|
|
5648
5667
|
}] } });
|
|
5649
5668
|
class CancelEditableRow extends BaseComponent {
|
|
5650
|
-
|
|
5669
|
+
dataTable;
|
|
5651
5670
|
editableRow;
|
|
5652
|
-
constructor(
|
|
5671
|
+
constructor(dataTable, editableRow) {
|
|
5653
5672
|
super();
|
|
5654
|
-
this.
|
|
5673
|
+
this.dataTable = dataTable;
|
|
5655
5674
|
this.editableRow = editableRow;
|
|
5656
5675
|
}
|
|
5657
5676
|
_componentStyle = inject(TableStyle);
|
|
5658
5677
|
onClick(event) {
|
|
5659
|
-
this.
|
|
5678
|
+
this.dataTable.cancelRowEdit(this.editableRow.data);
|
|
5660
5679
|
event.preventDefault();
|
|
5661
5680
|
}
|
|
5662
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5663
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
5681
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CancelEditableRow, deps: [{ token: Table }, { token: EditableRow }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5682
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: CancelEditableRow, isStandalone: false, selector: "[pCancelEditableRow]", host: { listeners: { "click": "onClick($event)" }, properties: { "class": "cx('rowEditorCancel')" } }, providers: [TableStyle], usesInheritance: true, ngImport: i0 });
|
|
5664
5683
|
}
|
|
5665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CancelEditableRow, decorators: [{
|
|
5666
5685
|
type: Directive,
|
|
5667
5686
|
args: [{
|
|
5668
5687
|
selector: '[pCancelEditableRow]',
|
|
@@ -5676,8 +5695,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5676
5695
|
type: HostListener,
|
|
5677
5696
|
args: ['click', ['$event']]
|
|
5678
5697
|
}] } });
|
|
5679
|
-
class CellEditor {
|
|
5680
|
-
|
|
5698
|
+
class CellEditor extends BaseComponent {
|
|
5699
|
+
dataTable;
|
|
5681
5700
|
editableColumn;
|
|
5682
5701
|
editableRow;
|
|
5683
5702
|
_templates;
|
|
@@ -5685,12 +5704,13 @@ class CellEditor {
|
|
|
5685
5704
|
_outputTemplate;
|
|
5686
5705
|
inputTemplate;
|
|
5687
5706
|
outputTemplate;
|
|
5688
|
-
constructor(
|
|
5689
|
-
|
|
5707
|
+
constructor(dataTable, editableColumn, editableRow) {
|
|
5708
|
+
super();
|
|
5709
|
+
this.dataTable = dataTable;
|
|
5690
5710
|
this.editableColumn = editableColumn;
|
|
5691
5711
|
this.editableRow = editableRow;
|
|
5692
5712
|
}
|
|
5693
|
-
|
|
5713
|
+
onAfterContentInit() {
|
|
5694
5714
|
this._templates.forEach((item) => {
|
|
5695
5715
|
switch (item.getType()) {
|
|
5696
5716
|
case 'input':
|
|
@@ -5703,19 +5723,19 @@ class CellEditor {
|
|
|
5703
5723
|
});
|
|
5704
5724
|
}
|
|
5705
5725
|
get editing() {
|
|
5706
|
-
return (this.
|
|
5726
|
+
return ((this.dataTable.editingCell && this.editableColumn && this.dataTable.editingCell === this.editableColumn.el.nativeElement) || (this.editableRow && this.dataTable.editMode === 'row' && this.dataTable.isRowEditing(this.editableRow.data)));
|
|
5707
5727
|
}
|
|
5708
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5709
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
5728
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CellEditor, deps: [{ token: Table }, { token: EditableColumn, optional: true }, { token: EditableRow, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
5729
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: CellEditor, isStandalone: false, selector: "p-cellEditor", queries: [{ propertyName: "_inputTemplate", first: true, predicate: ["input"], descendants: true }, { propertyName: "_outputTemplate", first: true, predicate: ["output"], descendants: true }, { propertyName: "_templates", predicate: PrimeTemplate }], usesInheritance: true, ngImport: i0, template: `
|
|
5710
5730
|
<ng-container *ngIf="editing">
|
|
5711
5731
|
<ng-container *ngTemplateOutlet="inputTemplate || _inputTemplate"></ng-container>
|
|
5712
5732
|
</ng-container>
|
|
5713
5733
|
<ng-container *ngIf="!editing">
|
|
5714
5734
|
<ng-container *ngTemplateOutlet="outputTemplate || _outputTemplate"></ng-container>
|
|
5715
5735
|
</ng-container>
|
|
5716
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
5736
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
5717
5737
|
}
|
|
5718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CellEditor, decorators: [{
|
|
5719
5739
|
type: Component,
|
|
5720
5740
|
args: [{
|
|
5721
5741
|
selector: 'p-cellEditor',
|
|
@@ -5744,8 +5764,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5744
5764
|
type: ContentChild,
|
|
5745
5765
|
args: ['output']
|
|
5746
5766
|
}] } });
|
|
5747
|
-
class TableRadioButton {
|
|
5748
|
-
|
|
5767
|
+
class TableRadioButton extends BaseComponent {
|
|
5768
|
+
dataTable;
|
|
5749
5769
|
cd;
|
|
5750
5770
|
value;
|
|
5751
5771
|
disabled = input(undefined, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
@@ -5756,21 +5776,22 @@ class TableRadioButton {
|
|
|
5756
5776
|
inputViewChild;
|
|
5757
5777
|
checked;
|
|
5758
5778
|
subscription;
|
|
5759
|
-
constructor(
|
|
5760
|
-
|
|
5779
|
+
constructor(dataTable, cd) {
|
|
5780
|
+
super();
|
|
5781
|
+
this.dataTable = dataTable;
|
|
5761
5782
|
this.cd = cd;
|
|
5762
|
-
this.subscription = this.
|
|
5763
|
-
this.checked = this.
|
|
5764
|
-
this.ariaLabel = this.ariaLabel || this.
|
|
5783
|
+
this.subscription = this.dataTable.tableService.selectionSource$.subscribe(() => {
|
|
5784
|
+
this.checked = this.dataTable.isSelected(this.value);
|
|
5785
|
+
this.ariaLabel = this.ariaLabel || (this.dataTable.config.translation.aria ? (this.checked ? this.dataTable.config.translation.aria.selectRow : this.dataTable.config.translation.aria.unselectRow) : undefined);
|
|
5765
5786
|
this.cd.markForCheck();
|
|
5766
5787
|
});
|
|
5767
5788
|
}
|
|
5768
|
-
|
|
5769
|
-
this.checked = this.
|
|
5789
|
+
onInit() {
|
|
5790
|
+
this.checked = this.dataTable.isSelected(this.value);
|
|
5770
5791
|
}
|
|
5771
5792
|
onClick(event) {
|
|
5772
5793
|
if (!this.disabled()) {
|
|
5773
|
-
this.
|
|
5794
|
+
this.dataTable.toggleRowWithRadio({
|
|
5774
5795
|
originalEvent: event.originalEvent,
|
|
5775
5796
|
rowIndex: this.index()
|
|
5776
5797
|
}, this.value);
|
|
@@ -5778,20 +5799,20 @@ class TableRadioButton {
|
|
|
5778
5799
|
}
|
|
5779
5800
|
DomHandler.clearSelection();
|
|
5780
5801
|
}
|
|
5781
|
-
|
|
5802
|
+
onDestroy() {
|
|
5782
5803
|
if (this.subscription) {
|
|
5783
5804
|
this.subscription.unsubscribe();
|
|
5784
5805
|
}
|
|
5785
5806
|
}
|
|
5786
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5787
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
5807
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableRadioButton, deps: [{ token: Table }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5808
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.4", type: TableRadioButton, isStandalone: false, selector: "p-tableRadioButton", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputViewChild", first: true, predicate: ["rb"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<p-radioButton #rb [(ngModel)]="checked" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [binary]="true" [value]="value" (onClick)="onClick($event)" /> `, isInline: true, dependencies: [{ kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.RadioButton, selector: "p-radioButton, p-radiobutton, p-radio-button", inputs: ["value", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "styleClass", "autofocus", "binary", "variant", "size"], outputs: ["onClick", "onFocus", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5788
5809
|
}
|
|
5789
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableRadioButton, decorators: [{
|
|
5790
5811
|
type: Component,
|
|
5791
5812
|
args: [{
|
|
5792
5813
|
selector: 'p-tableRadioButton',
|
|
5793
5814
|
standalone: false,
|
|
5794
|
-
template:
|
|
5815
|
+
template: `<p-radioButton #rb [(ngModel)]="checked" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [binary]="true" [value]="value" (onClick)="onClick($event)" /> `,
|
|
5795
5816
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5796
5817
|
encapsulation: ViewEncapsulation.None
|
|
5797
5818
|
}]
|
|
@@ -5803,10 +5824,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5803
5824
|
type: ViewChild,
|
|
5804
5825
|
args: ['rb']
|
|
5805
5826
|
}] } });
|
|
5806
|
-
class TableCheckbox {
|
|
5807
|
-
|
|
5827
|
+
class TableCheckbox extends BaseComponent {
|
|
5828
|
+
dataTable;
|
|
5808
5829
|
tableService;
|
|
5809
|
-
cd;
|
|
5810
5830
|
value;
|
|
5811
5831
|
disabled = input(undefined, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
5812
5832
|
required = input(undefined, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
@@ -5816,52 +5836,52 @@ class TableCheckbox {
|
|
|
5816
5836
|
ariaLabel;
|
|
5817
5837
|
checked;
|
|
5818
5838
|
subscription;
|
|
5819
|
-
constructor(
|
|
5820
|
-
|
|
5839
|
+
constructor(dataTable, tableService) {
|
|
5840
|
+
super();
|
|
5841
|
+
this.dataTable = dataTable;
|
|
5821
5842
|
this.tableService = tableService;
|
|
5822
|
-
this.
|
|
5823
|
-
|
|
5824
|
-
this.
|
|
5825
|
-
this.ariaLabel = this.ariaLabel || this.dt.config.translation.aria ? (this.checked ? this.dt.config.translation.aria.selectRow : this.dt.config.translation.aria.unselectRow) : undefined;
|
|
5843
|
+
this.subscription = this.dataTable.tableService.selectionSource$.subscribe(() => {
|
|
5844
|
+
this.checked = this.dataTable.isSelected(this.value);
|
|
5845
|
+
this.ariaLabel = this.ariaLabel || (this.dataTable.config.translation.aria ? (this.checked ? this.dataTable.config.translation.aria.selectRow : this.dataTable.config.translation.aria.unselectRow) : undefined);
|
|
5826
5846
|
this.cd.markForCheck();
|
|
5827
5847
|
});
|
|
5828
5848
|
}
|
|
5829
|
-
|
|
5830
|
-
this.checked = this.
|
|
5849
|
+
onInit() {
|
|
5850
|
+
this.checked = this.dataTable.isSelected(this.value);
|
|
5831
5851
|
}
|
|
5832
5852
|
onClick({ originalEvent }) {
|
|
5833
5853
|
if (!this.disabled()) {
|
|
5834
|
-
this.
|
|
5835
|
-
originalEvent,
|
|
5836
|
-
rowIndex: this.index()
|
|
5854
|
+
this.dataTable.toggleRowWithCheckbox({
|
|
5855
|
+
originalEvent: originalEvent,
|
|
5856
|
+
rowIndex: this.index() || 0
|
|
5837
5857
|
}, this.value);
|
|
5838
5858
|
}
|
|
5839
5859
|
DomHandler.clearSelection();
|
|
5840
5860
|
}
|
|
5841
|
-
|
|
5861
|
+
onDestroy() {
|
|
5842
5862
|
if (this.subscription) {
|
|
5843
5863
|
this.subscription.unsubscribe();
|
|
5844
5864
|
}
|
|
5845
5865
|
}
|
|
5846
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5847
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
5866
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableCheckbox, deps: [{ token: Table }, { token: TableService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5867
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: TableCheckbox, isStandalone: false, selector: "p-tableCheckbox", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
5848
5868
|
<p-checkbox [(ngModel)]="checked" [binary]="true" (onChange)="onClick($event)" [required]="required()" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel">
|
|
5849
|
-
@if (
|
|
5869
|
+
@if (dataTable.checkboxIconTemplate || dataTable._checkboxIconTemplate; as template) {
|
|
5850
5870
|
<ng-template pTemplate="icon">
|
|
5851
5871
|
<ng-template *ngTemplateOutlet="template; context: { $implicit: checked }" />
|
|
5852
5872
|
</ng-template>
|
|
5853
5873
|
}
|
|
5854
5874
|
</p-checkbox>
|
|
5855
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
5875
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5856
5876
|
}
|
|
5857
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableCheckbox, decorators: [{
|
|
5858
5878
|
type: Component,
|
|
5859
5879
|
args: [{
|
|
5860
5880
|
selector: 'p-tableCheckbox',
|
|
5861
5881
|
standalone: false,
|
|
5862
5882
|
template: `
|
|
5863
5883
|
<p-checkbox [(ngModel)]="checked" [binary]="true" (onChange)="onClick($event)" [required]="required()" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel">
|
|
5864
|
-
@if (
|
|
5884
|
+
@if (dataTable.checkboxIconTemplate || dataTable._checkboxIconTemplate; as template) {
|
|
5865
5885
|
<ng-template pTemplate="icon">
|
|
5866
5886
|
<ng-template *ngTemplateOutlet="template; context: { $implicit: checked }" />
|
|
5867
5887
|
</ng-template>
|
|
@@ -5871,15 +5891,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5871
5891
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5872
5892
|
encapsulation: ViewEncapsulation.None
|
|
5873
5893
|
}]
|
|
5874
|
-
}], ctorParameters: () => [{ type: Table }, { type: TableService }
|
|
5894
|
+
}], ctorParameters: () => [{ type: Table }, { type: TableService }], propDecorators: { value: [{
|
|
5875
5895
|
type: Input
|
|
5876
5896
|
}], ariaLabel: [{
|
|
5877
5897
|
type: Input
|
|
5878
5898
|
}] } });
|
|
5879
|
-
class TableHeaderCheckbox {
|
|
5880
|
-
|
|
5899
|
+
class TableHeaderCheckbox extends BaseComponent {
|
|
5900
|
+
dataTable;
|
|
5881
5901
|
tableService;
|
|
5882
|
-
|
|
5902
|
+
hostName = 'Table';
|
|
5903
|
+
bindDirectiveInstance = inject(Bind, { self: true });
|
|
5904
|
+
onAfterViewChecked() {
|
|
5905
|
+
this.bindDirectiveInstance.setAttrs(this.ptm('headerCheckbox'));
|
|
5906
|
+
}
|
|
5883
5907
|
disabled = input(undefined, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
5884
5908
|
inputId = input(...(ngDevMode ? [undefined, { debugName: "inputId" }] : []));
|
|
5885
5909
|
name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : []));
|
|
@@ -5887,33 +5911,33 @@ class TableHeaderCheckbox {
|
|
|
5887
5911
|
checked;
|
|
5888
5912
|
selectionChangeSubscription;
|
|
5889
5913
|
valueChangeSubscription;
|
|
5890
|
-
constructor(
|
|
5891
|
-
|
|
5914
|
+
constructor(dataTable, tableService) {
|
|
5915
|
+
super();
|
|
5916
|
+
this.dataTable = dataTable;
|
|
5892
5917
|
this.tableService = tableService;
|
|
5893
|
-
this.
|
|
5894
|
-
this.valueChangeSubscription = this.dt.tableService.valueSource$.subscribe(() => {
|
|
5918
|
+
this.valueChangeSubscription = this.dataTable.tableService.valueSource$.subscribe(() => {
|
|
5895
5919
|
this.checked = this.updateCheckedState();
|
|
5896
|
-
this.ariaLabel = this.ariaLabel || this.
|
|
5920
|
+
this.ariaLabel = this.ariaLabel || (this.dataTable.config.translation.aria ? (this.checked ? this.dataTable.config.translation.aria.selectAll : this.dataTable.config.translation.aria.unselectAll) : undefined);
|
|
5897
5921
|
});
|
|
5898
|
-
this.selectionChangeSubscription = this.
|
|
5922
|
+
this.selectionChangeSubscription = this.dataTable.tableService.selectionSource$.subscribe(() => {
|
|
5899
5923
|
this.checked = this.updateCheckedState();
|
|
5900
5924
|
});
|
|
5901
5925
|
}
|
|
5902
|
-
|
|
5926
|
+
onInit() {
|
|
5903
5927
|
this.checked = this.updateCheckedState();
|
|
5904
5928
|
}
|
|
5905
5929
|
onClick(event) {
|
|
5906
5930
|
if (!this.disabled()) {
|
|
5907
|
-
if (this.
|
|
5908
|
-
this.
|
|
5931
|
+
if (this.dataTable.value && this.dataTable.value.length > 0) {
|
|
5932
|
+
this.dataTable.toggleRowsWithCheckbox(event, this.checked || false);
|
|
5909
5933
|
}
|
|
5910
5934
|
}
|
|
5911
5935
|
DomHandler.clearSelection();
|
|
5912
5936
|
}
|
|
5913
5937
|
isDisabled() {
|
|
5914
|
-
return this.disabled() || !this.
|
|
5938
|
+
return this.disabled() || !this.dataTable.value || !this.dataTable.value.length;
|
|
5915
5939
|
}
|
|
5916
|
-
|
|
5940
|
+
onDestroy() {
|
|
5917
5941
|
if (this.selectionChangeSubscription) {
|
|
5918
5942
|
this.selectionChangeSubscription.unsubscribe();
|
|
5919
5943
|
}
|
|
@@ -5923,35 +5947,35 @@ class TableHeaderCheckbox {
|
|
|
5923
5947
|
}
|
|
5924
5948
|
updateCheckedState() {
|
|
5925
5949
|
this.cd.markForCheck();
|
|
5926
|
-
if (this.
|
|
5927
|
-
return this.
|
|
5950
|
+
if (this.dataTable._selectAll !== null) {
|
|
5951
|
+
return this.dataTable._selectAll;
|
|
5928
5952
|
}
|
|
5929
5953
|
else {
|
|
5930
|
-
const data = this.
|
|
5931
|
-
const val = this.
|
|
5932
|
-
const selectableVal = this.
|
|
5933
|
-
return ObjectUtils.isNotEmpty(selectableVal) && ObjectUtils.isNotEmpty(this.
|
|
5954
|
+
const data = this.dataTable.selectionPageOnly ? this.dataTable.dataToRender(this.dataTable.processedData) : this.dataTable.processedData;
|
|
5955
|
+
const val = this.dataTable.frozenValue ? [...this.dataTable.frozenValue, ...data] : data;
|
|
5956
|
+
const selectableVal = this.dataTable.rowSelectable ? val.filter((data, index) => this.dataTable.rowSelectable({ data, index })) : val;
|
|
5957
|
+
return ObjectUtils.isNotEmpty(selectableVal) && ObjectUtils.isNotEmpty(this.dataTable.selection) && selectableVal.every((v) => this.dataTable.selection.some((s) => this.dataTable.equals(v, s)));
|
|
5934
5958
|
}
|
|
5935
5959
|
}
|
|
5936
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5937
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
5938
|
-
<p-checkbox [(ngModel)]="checked" (onChange)="onClick($event)" [binary]="true" [disabled]="isDisabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel">
|
|
5939
|
-
@if (
|
|
5960
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableHeaderCheckbox, deps: [{ token: Table }, { token: TableService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5961
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: TableHeaderCheckbox, isStandalone: false, selector: "p-tableHeaderCheckbox", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
5962
|
+
<p-checkbox [pt]="ptm('pcCheckbox')" [(ngModel)]="checked" (onChange)="onClick($event)" [binary]="true" [disabled]="isDisabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel">
|
|
5963
|
+
@if (dataTable.headerCheckboxIconTemplate || dataTable._headerCheckboxIconTemplate; as template) {
|
|
5940
5964
|
<ng-template pTemplate="icon">
|
|
5941
5965
|
<ng-template *ngTemplateOutlet="template; context: { $implicit: checked }" />
|
|
5942
5966
|
</ng-template>
|
|
5943
5967
|
}
|
|
5944
5968
|
</p-checkbox>
|
|
5945
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
5969
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5946
5970
|
}
|
|
5947
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableHeaderCheckbox, decorators: [{
|
|
5948
5972
|
type: Component,
|
|
5949
5973
|
args: [{
|
|
5950
5974
|
selector: 'p-tableHeaderCheckbox',
|
|
5951
5975
|
standalone: false,
|
|
5952
5976
|
template: `
|
|
5953
|
-
<p-checkbox [(ngModel)]="checked" (onChange)="onClick($event)" [binary]="true" [disabled]="isDisabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel">
|
|
5954
|
-
@if (
|
|
5977
|
+
<p-checkbox [pt]="ptm('pcCheckbox')" [(ngModel)]="checked" (onChange)="onClick($event)" [binary]="true" [disabled]="isDisabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel">
|
|
5978
|
+
@if (dataTable.headerCheckboxIconTemplate || dataTable._headerCheckboxIconTemplate; as template) {
|
|
5955
5979
|
<ng-template pTemplate="icon">
|
|
5956
5980
|
<ng-template *ngTemplateOutlet="template; context: { $implicit: checked }" />
|
|
5957
5981
|
</ng-template>
|
|
@@ -5959,25 +5983,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5959
5983
|
</p-checkbox>
|
|
5960
5984
|
`,
|
|
5961
5985
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5962
|
-
encapsulation: ViewEncapsulation.None
|
|
5986
|
+
encapsulation: ViewEncapsulation.None,
|
|
5987
|
+
hostDirectives: [Bind]
|
|
5963
5988
|
}]
|
|
5964
|
-
}], ctorParameters: () => [{ type: Table }, { type: TableService }
|
|
5989
|
+
}], ctorParameters: () => [{ type: Table }, { type: TableService }], propDecorators: { ariaLabel: [{
|
|
5965
5990
|
type: Input
|
|
5966
5991
|
}] } });
|
|
5967
5992
|
class ReorderableRowHandle extends BaseComponent {
|
|
5968
5993
|
el;
|
|
5994
|
+
hostName = 'Table';
|
|
5995
|
+
bindDirectiveInstance = inject(Bind, { self: true });
|
|
5996
|
+
onAfterViewChecked() {
|
|
5997
|
+
this.bindDirectiveInstance.setAttrs(this.ptm('reorderableRowHandle'));
|
|
5998
|
+
}
|
|
5969
5999
|
_componentStyle = inject(TableStyle);
|
|
5970
6000
|
constructor(el) {
|
|
5971
6001
|
super();
|
|
5972
6002
|
this.el = el;
|
|
5973
6003
|
}
|
|
5974
|
-
|
|
6004
|
+
onAfterViewInit() {
|
|
5975
6005
|
// DomHandler.addClass(this.el.nativeElement, 'p-datatable-reorderable-row-handle');
|
|
5976
6006
|
}
|
|
5977
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5978
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
6007
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ReorderableRowHandle, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6008
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: ReorderableRowHandle, isStandalone: false, selector: "[pReorderableRowHandle]", host: { properties: { "class": "cx('reorderableRowHandle')" } }, providers: [TableStyle], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
|
|
5979
6009
|
}
|
|
5980
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6010
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ReorderableRowHandle, decorators: [{
|
|
5981
6011
|
type: Directive,
|
|
5982
6012
|
args: [{
|
|
5983
6013
|
selector: '[pReorderableRowHandle]',
|
|
@@ -5985,14 +6015,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
5985
6015
|
host: {
|
|
5986
6016
|
'[class]': "cx('reorderableRowHandle')"
|
|
5987
6017
|
},
|
|
5988
|
-
providers: [TableStyle]
|
|
6018
|
+
providers: [TableStyle],
|
|
6019
|
+
hostDirectives: [Bind]
|
|
5989
6020
|
}]
|
|
5990
6021
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
5991
|
-
class ReorderableRow {
|
|
5992
|
-
|
|
5993
|
-
dt;
|
|
5994
|
-
el;
|
|
6022
|
+
class ReorderableRow extends BaseComponent {
|
|
6023
|
+
dataTable;
|
|
5995
6024
|
zone;
|
|
6025
|
+
hostName = 'Table';
|
|
6026
|
+
bindDirectiveInstance = inject(Bind, { self: true });
|
|
6027
|
+
onAfterViewChecked() {
|
|
6028
|
+
this.bindDirectiveInstance.setAttrs(this.ptm('reorderableRow'));
|
|
6029
|
+
}
|
|
5996
6030
|
index;
|
|
5997
6031
|
pReorderableRowDisabled;
|
|
5998
6032
|
mouseDownListener;
|
|
@@ -6001,13 +6035,12 @@ class ReorderableRow {
|
|
|
6001
6035
|
dragOverListener;
|
|
6002
6036
|
dragLeaveListener;
|
|
6003
6037
|
dropListener;
|
|
6004
|
-
constructor(
|
|
6005
|
-
|
|
6006
|
-
this.
|
|
6007
|
-
this.el = el;
|
|
6038
|
+
constructor(dataTable, zone) {
|
|
6039
|
+
super();
|
|
6040
|
+
this.dataTable = dataTable;
|
|
6008
6041
|
this.zone = zone;
|
|
6009
6042
|
}
|
|
6010
|
-
|
|
6043
|
+
onAfterViewInit() {
|
|
6011
6044
|
if (this.isEnabled()) {
|
|
6012
6045
|
this.el.nativeElement.droppable = true;
|
|
6013
6046
|
this.bindEvents();
|
|
@@ -6059,41 +6092,42 @@ class ReorderableRow {
|
|
|
6059
6092
|
return false;
|
|
6060
6093
|
}
|
|
6061
6094
|
onDragStart(event) {
|
|
6062
|
-
this.
|
|
6095
|
+
this.dataTable.onRowDragStart(event, this.index);
|
|
6063
6096
|
}
|
|
6064
6097
|
onDragEnd(event) {
|
|
6065
|
-
this.
|
|
6098
|
+
this.dataTable.onRowDragEnd(event);
|
|
6066
6099
|
this.el.nativeElement.draggable = false;
|
|
6067
6100
|
}
|
|
6068
6101
|
onDragOver(event) {
|
|
6069
|
-
this.
|
|
6102
|
+
this.dataTable.onRowDragOver(event, this.index, this.el.nativeElement);
|
|
6070
6103
|
event.preventDefault();
|
|
6071
6104
|
}
|
|
6072
6105
|
onDragLeave(event) {
|
|
6073
|
-
this.
|
|
6106
|
+
this.dataTable.onRowDragLeave(event, this.el.nativeElement);
|
|
6074
6107
|
}
|
|
6075
6108
|
isEnabled() {
|
|
6076
6109
|
return this.pReorderableRowDisabled !== true;
|
|
6077
6110
|
}
|
|
6078
6111
|
onDrop(event) {
|
|
6079
|
-
if (this.isEnabled() && this.
|
|
6080
|
-
this.
|
|
6112
|
+
if (this.isEnabled() && this.dataTable.rowDragging) {
|
|
6113
|
+
this.dataTable.onRowDrop(event, this.el.nativeElement);
|
|
6081
6114
|
}
|
|
6082
6115
|
event.preventDefault();
|
|
6083
6116
|
}
|
|
6084
|
-
|
|
6117
|
+
onDestroy() {
|
|
6085
6118
|
this.unbindEvents();
|
|
6086
6119
|
}
|
|
6087
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6088
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.
|
|
6120
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ReorderableRow, deps: [{ token: Table }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6121
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.4", type: ReorderableRow, isStandalone: false, selector: "[pReorderableRow]", inputs: { index: ["pReorderableRow", "index"], pReorderableRowDisabled: ["pReorderableRowDisabled", "pReorderableRowDisabled", booleanAttribute] }, host: { listeners: { "drop": "onDrop($event)" } }, usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
|
|
6089
6122
|
}
|
|
6090
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ReorderableRow, decorators: [{
|
|
6091
6124
|
type: Directive,
|
|
6092
6125
|
args: [{
|
|
6093
6126
|
selector: '[pReorderableRow]',
|
|
6094
|
-
standalone: false
|
|
6127
|
+
standalone: false,
|
|
6128
|
+
hostDirectives: [Bind]
|
|
6095
6129
|
}]
|
|
6096
|
-
}], ctorParameters: () => [{ type:
|
|
6130
|
+
}], ctorParameters: () => [{ type: Table }, { type: i0.NgZone }], propDecorators: { index: [{
|
|
6097
6131
|
type: Input,
|
|
6098
6132
|
args: ['pReorderableRow']
|
|
6099
6133
|
}], pReorderableRowDisabled: [{
|
|
@@ -6108,6 +6142,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6108
6142
|
* @group Components
|
|
6109
6143
|
*/
|
|
6110
6144
|
class ColumnFilter extends BaseComponent {
|
|
6145
|
+
hostName = 'Table';
|
|
6146
|
+
bindDirectiveInstance = inject(Bind, { self: true });
|
|
6147
|
+
onAfterViewChecked() {
|
|
6148
|
+
this.bindDirectiveInstance.setAttrs(this.ptm('columnFilter'));
|
|
6149
|
+
}
|
|
6150
|
+
ptmFilterConstraintOptions(matchMode) {
|
|
6151
|
+
return {
|
|
6152
|
+
context: {
|
|
6153
|
+
highlighted: matchMode && this.isRowMatchModeSelected(matchMode.value)
|
|
6154
|
+
}
|
|
6155
|
+
};
|
|
6156
|
+
}
|
|
6111
6157
|
/**
|
|
6112
6158
|
* Property represented by the column.
|
|
6113
6159
|
* @group Props
|
|
@@ -6341,7 +6387,7 @@ class ColumnFilter extends BaseComponent {
|
|
|
6341
6387
|
overlayEventListener;
|
|
6342
6388
|
overlayId;
|
|
6343
6389
|
get fieldConstraints() {
|
|
6344
|
-
return this.
|
|
6390
|
+
return this.dataTable.filters ? this.dataTable.filters[this.field] : null;
|
|
6345
6391
|
}
|
|
6346
6392
|
get showRemoveIcon() {
|
|
6347
6393
|
return this.fieldConstraints ? this.fieldConstraints.length > 1 : false;
|
|
@@ -6374,25 +6420,22 @@ class ColumnFilter extends BaseComponent {
|
|
|
6374
6420
|
return this.config.getTranslation(TranslationKeys.NO_FILTER);
|
|
6375
6421
|
}
|
|
6376
6422
|
get filterMenuButtonAriaLabel() {
|
|
6377
|
-
return this.config
|
|
6423
|
+
return this.config?.translation ? (this.overlayVisible ? this.config?.translation?.aria?.hideFilterMenu : this.config?.translation?.aria?.showFilterMenu) : undefined;
|
|
6378
6424
|
}
|
|
6379
6425
|
get removeRuleButtonAriaLabel() {
|
|
6380
|
-
return this.config
|
|
6426
|
+
return this.config?.translation ? this.config?.translation?.removeRule : undefined;
|
|
6381
6427
|
}
|
|
6382
6428
|
get filterOperatorAriaLabel() {
|
|
6383
|
-
return this.config
|
|
6429
|
+
return this.config?.translation ? this.config?.translation?.aria?.filterOperator : undefined;
|
|
6384
6430
|
}
|
|
6385
6431
|
get filterConstraintAriaLabel() {
|
|
6386
|
-
return this.config
|
|
6432
|
+
return this.config?.translation ? this.config?.translation?.aria?.filterConstraint : undefined;
|
|
6387
6433
|
}
|
|
6388
|
-
|
|
6434
|
+
dataTable = inject(Table);
|
|
6389
6435
|
overlayService = inject(OverlayService);
|
|
6390
|
-
|
|
6391
|
-
parentInstance = inject(forwardRef(() => Table));
|
|
6392
|
-
ngOnInit() {
|
|
6393
|
-
super.ngOnInit();
|
|
6436
|
+
onInit() {
|
|
6394
6437
|
this.overlayId = UniqueComponentId();
|
|
6395
|
-
if (!this.
|
|
6438
|
+
if (!this.dataTable.filters[this.field]) {
|
|
6396
6439
|
this.initFieldFilterConstraint();
|
|
6397
6440
|
}
|
|
6398
6441
|
this.translationSubscription = this.config.translationObserver.subscribe(() => {
|
|
@@ -6424,7 +6467,7 @@ class ColumnFilter extends BaseComponent {
|
|
|
6424
6467
|
}
|
|
6425
6468
|
];
|
|
6426
6469
|
}
|
|
6427
|
-
|
|
6470
|
+
onAfterContentInit() {
|
|
6428
6471
|
this._templates.forEach((item) => {
|
|
6429
6472
|
switch (item.getType()) {
|
|
6430
6473
|
case 'header':
|
|
@@ -6456,7 +6499,7 @@ class ColumnFilter extends BaseComponent {
|
|
|
6456
6499
|
}
|
|
6457
6500
|
initFieldFilterConstraint() {
|
|
6458
6501
|
let defaultMatchMode = this.getDefaultMatchMode();
|
|
6459
|
-
this.
|
|
6502
|
+
this.dataTable.filters[this.field] =
|
|
6460
6503
|
this.display == 'row'
|
|
6461
6504
|
? { value: null, matchMode: defaultMatchMode }
|
|
6462
6505
|
: [
|
|
@@ -6470,14 +6513,14 @@ class ColumnFilter extends BaseComponent {
|
|
|
6470
6513
|
onMenuMatchModeChange(value, filterMeta) {
|
|
6471
6514
|
filterMeta.matchMode = value;
|
|
6472
6515
|
if (!this.showApplyButton) {
|
|
6473
|
-
this.
|
|
6516
|
+
this.dataTable._filter();
|
|
6474
6517
|
}
|
|
6475
6518
|
}
|
|
6476
6519
|
onRowMatchModeChange(matchMode) {
|
|
6477
|
-
const fieldFilter = this.
|
|
6520
|
+
const fieldFilter = this.dataTable.filters[this.field];
|
|
6478
6521
|
fieldFilter.matchMode = matchMode;
|
|
6479
6522
|
if (fieldFilter.value) {
|
|
6480
|
-
this.
|
|
6523
|
+
this.dataTable._filter();
|
|
6481
6524
|
}
|
|
6482
6525
|
this.hide();
|
|
6483
6526
|
}
|
|
@@ -6509,30 +6552,30 @@ class ColumnFilter extends BaseComponent {
|
|
|
6509
6552
|
this.hide();
|
|
6510
6553
|
}
|
|
6511
6554
|
isRowMatchModeSelected(matchMode) {
|
|
6512
|
-
return this.
|
|
6555
|
+
return this.dataTable.filters[this.field].matchMode === matchMode;
|
|
6513
6556
|
}
|
|
6514
6557
|
addConstraint() {
|
|
6515
|
-
this.
|
|
6558
|
+
this.dataTable.filters[this.field].push({
|
|
6516
6559
|
value: null,
|
|
6517
6560
|
matchMode: this.getDefaultMatchMode(),
|
|
6518
6561
|
operator: this.getDefaultOperator()
|
|
6519
6562
|
});
|
|
6520
|
-
DomHandler.focus(this.clearButtonViewChild
|
|
6563
|
+
DomHandler.focus(this.clearButtonViewChild?.nativeElement);
|
|
6521
6564
|
}
|
|
6522
6565
|
removeConstraint(filterMeta) {
|
|
6523
|
-
this.
|
|
6566
|
+
this.dataTable.filters[this.field] = this.dataTable.filters[this.field].filter((meta) => meta !== filterMeta);
|
|
6524
6567
|
if (!this.showApplyButton) {
|
|
6525
|
-
this.
|
|
6568
|
+
this.dataTable._filter();
|
|
6526
6569
|
}
|
|
6527
|
-
DomHandler.focus(this.clearButtonViewChild
|
|
6570
|
+
DomHandler.focus(this.clearButtonViewChild?.nativeElement);
|
|
6528
6571
|
}
|
|
6529
6572
|
onOperatorChange(value) {
|
|
6530
|
-
this.
|
|
6573
|
+
this.dataTable.filters[this.field].forEach((filterMeta) => {
|
|
6531
6574
|
filterMeta.operator = value;
|
|
6532
6575
|
this.operator = value;
|
|
6533
6576
|
});
|
|
6534
6577
|
if (!this.showApplyButton) {
|
|
6535
|
-
this.
|
|
6578
|
+
this.dataTable._filter();
|
|
6536
6579
|
}
|
|
6537
6580
|
}
|
|
6538
6581
|
toggleMenu(event) {
|
|
@@ -6643,18 +6686,18 @@ class ColumnFilter extends BaseComponent {
|
|
|
6643
6686
|
}
|
|
6644
6687
|
}
|
|
6645
6688
|
getDefaultOperator() {
|
|
6646
|
-
return this.
|
|
6689
|
+
return this.dataTable.filters ? this.dataTable.filters[this.field][0].operator : this.operator;
|
|
6647
6690
|
}
|
|
6648
6691
|
hasRowFilter() {
|
|
6649
|
-
return this.
|
|
6692
|
+
return this.dataTable.filters[this.field] && !this.dataTable.isFilterBlank(this.dataTable.filters[this.field].value);
|
|
6650
6693
|
}
|
|
6651
6694
|
get hasFilter() {
|
|
6652
|
-
let fieldFilter = this.
|
|
6695
|
+
let fieldFilter = this.dataTable.filters[this.field];
|
|
6653
6696
|
if (fieldFilter) {
|
|
6654
6697
|
if (Array.isArray(fieldFilter))
|
|
6655
|
-
return !this.
|
|
6698
|
+
return !this.dataTable.isFilterBlank(fieldFilter[0].value);
|
|
6656
6699
|
else
|
|
6657
|
-
return !this.
|
|
6700
|
+
return !this.dataTable.isFilterBlank(fieldFilter.value);
|
|
6658
6701
|
}
|
|
6659
6702
|
return false;
|
|
6660
6703
|
}
|
|
@@ -6732,15 +6775,15 @@ class ColumnFilter extends BaseComponent {
|
|
|
6732
6775
|
}
|
|
6733
6776
|
clearFilter() {
|
|
6734
6777
|
this.initFieldFilterConstraint();
|
|
6735
|
-
this.
|
|
6778
|
+
this.dataTable._filter();
|
|
6736
6779
|
if (this.hideOnClear)
|
|
6737
6780
|
this.hide();
|
|
6738
6781
|
}
|
|
6739
6782
|
applyFilter() {
|
|
6740
|
-
this.
|
|
6783
|
+
this.dataTable._filter();
|
|
6741
6784
|
this.hide();
|
|
6742
6785
|
}
|
|
6743
|
-
|
|
6786
|
+
onDestroy() {
|
|
6744
6787
|
if (this.overlay) {
|
|
6745
6788
|
this.renderer.appendChild(this.el.nativeElement, this.overlay);
|
|
6746
6789
|
ZIndexUtils.clear(this.overlay);
|
|
@@ -6755,18 +6798,17 @@ class ColumnFilter extends BaseComponent {
|
|
|
6755
6798
|
if (this.overlaySubscription) {
|
|
6756
6799
|
this.overlaySubscription.unsubscribe();
|
|
6757
6800
|
}
|
|
6758
|
-
super.ngOnDestroy();
|
|
6759
6801
|
}
|
|
6760
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6761
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
6762
|
-
<div [class]="cx('filter')">
|
|
6802
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ColumnFilter, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6803
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ColumnFilter, isStandalone: false, selector: "p-columnFilter, p-column-filter, p-columnfilter", inputs: { field: "field", type: "type", display: "display", showMenu: ["showMenu", "showMenu", booleanAttribute], matchMode: "matchMode", operator: "operator", showOperator: ["showOperator", "showOperator", booleanAttribute], showClearButton: ["showClearButton", "showClearButton", booleanAttribute], showApplyButton: ["showApplyButton", "showApplyButton", booleanAttribute], showMatchModes: ["showMatchModes", "showMatchModes", booleanAttribute], showAddButton: ["showAddButton", "showAddButton", booleanAttribute], hideOnClear: ["hideOnClear", "hideOnClear", booleanAttribute], placeholder: "placeholder", matchModeOptions: "matchModeOptions", maxConstraints: ["maxConstraints", "maxConstraints", numberAttribute], minFractionDigits: ["minFractionDigits", "minFractionDigits", (value) => numberAttribute(value, undefined)], maxFractionDigits: ["maxFractionDigits", "maxFractionDigits", (value) => numberAttribute(value, undefined)], prefix: "prefix", suffix: "suffix", locale: "locale", localeMatcher: "localeMatcher", currency: "currency", currencyDisplay: "currencyDisplay", filterOn: "filterOn", useGrouping: ["useGrouping", "useGrouping", booleanAttribute], showButtons: ["showButtons", "showButtons", booleanAttribute], ariaLabel: "ariaLabel", filterButtonProps: "filterButtonProps" }, outputs: { onShow: "onShow", onHide: "onHide" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"] }, { propertyName: "filterTemplate", first: true, predicate: ["filter"] }, { propertyName: "footerTemplate", first: true, predicate: ["footer"] }, { propertyName: "filterIconTemplate", first: true, predicate: ["filtericon"] }, { propertyName: "removeRuleIconTemplate", first: true, predicate: ["removeruleicon"] }, { propertyName: "addRuleIconTemplate", first: true, predicate: ["addruleicon"] }, { propertyName: "clearFilterIconTemplate", first: true, predicate: ["clearfiltericon"] }, { propertyName: "_templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "icon", first: true, predicate: Button, descendants: true, read: ElementRef }, { propertyName: "clearButtonViewChild", first: true, predicate: ["clearBtn"], descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
6804
|
+
<div [class]="cx('filter')" [pBind]="ptm('filter')">
|
|
6763
6805
|
<p-columnFilterFormElement
|
|
6764
6806
|
*ngIf="display === 'row'"
|
|
6765
6807
|
class="p-fluid"
|
|
6766
6808
|
[type]="type"
|
|
6767
6809
|
[field]="field"
|
|
6768
6810
|
[ariaLabel]="ariaLabel"
|
|
6769
|
-
[filterConstraint]="
|
|
6811
|
+
[filterConstraint]="dataTable.filters[field]"
|
|
6770
6812
|
[filterTemplate]="filterTemplate || _filterTemplate"
|
|
6771
6813
|
[placeholder]="placeholder"
|
|
6772
6814
|
[minFractionDigits]="minFractionDigits"
|
|
@@ -6780,10 +6822,12 @@ class ColumnFilter extends BaseComponent {
|
|
|
6780
6822
|
[useGrouping]="useGrouping"
|
|
6781
6823
|
[showButtons]="showButtons"
|
|
6782
6824
|
[filterOn]="filterOn"
|
|
6825
|
+
[pt]="pt()"
|
|
6783
6826
|
></p-columnFilterFormElement>
|
|
6784
6827
|
<p-button
|
|
6785
6828
|
*ngIf="showMenuButton"
|
|
6786
6829
|
[styleClass]="cx('pcColumnFilterButton')"
|
|
6830
|
+
[pt]="ptm('pcColumnFilterButton')"
|
|
6787
6831
|
[attr.aria-haspopup]="true"
|
|
6788
6832
|
[ariaLabel]="filterMenuButtonAriaLabel"
|
|
6789
6833
|
[attr.aria-controls]="overlayVisible ? overlayId : null"
|
|
@@ -6794,9 +6838,9 @@ class ColumnFilter extends BaseComponent {
|
|
|
6794
6838
|
>
|
|
6795
6839
|
<ng-template #icon>
|
|
6796
6840
|
<ng-container>
|
|
6797
|
-
<svg data-p-icon="filter" *ngIf="!filterIconTemplate && !_filterIconTemplate && !hasFilter" />
|
|
6798
|
-
<svg data-p-icon="filter-fill" *ngIf="!filterIconTemplate && !_filterIconTemplate && hasFilter" />
|
|
6799
|
-
<span class="pi-filter-icon" *ngIf="filterIconTemplate || _filterIconTemplate">
|
|
6841
|
+
<svg data-p-icon="filter" *ngIf="!filterIconTemplate && !_filterIconTemplate && !hasFilter" [pBind]="ptm('pcColumnFilterButton')['icon']" />
|
|
6842
|
+
<svg data-p-icon="filter-fill" *ngIf="!filterIconTemplate && !_filterIconTemplate && hasFilter" [pBind]="ptm('pcColumnFilterButton')['icon']" />
|
|
6843
|
+
<span class="pi-filter-icon" *ngIf="filterIconTemplate || _filterIconTemplate" [pBind]="ptm('pcColumnFilterButton')['icon']">
|
|
6800
6844
|
<ng-template *ngTemplateOutlet="filterIconTemplate || _filterIconTemplate; context: { hasFilter: hasFilter }"></ng-template>
|
|
6801
6845
|
</span>
|
|
6802
6846
|
</ng-container>
|
|
@@ -6806,6 +6850,7 @@ class ColumnFilter extends BaseComponent {
|
|
|
6806
6850
|
<div
|
|
6807
6851
|
*ngIf="showMenu && overlayVisible"
|
|
6808
6852
|
[class]="cx('filterOverlay')"
|
|
6853
|
+
[pBind]="ptm('filterOverlay')"
|
|
6809
6854
|
[id]="overlayId"
|
|
6810
6855
|
[attr.aria-modal]="true"
|
|
6811
6856
|
role="dialog"
|
|
@@ -6816,35 +6861,37 @@ class ColumnFilter extends BaseComponent {
|
|
|
6816
6861
|
(keydown.escape)="onEscape()"
|
|
6817
6862
|
>
|
|
6818
6863
|
<ng-container *ngTemplateOutlet="headerTemplate || _headerTemplate; context: { $implicit: field }"></ng-container>
|
|
6819
|
-
<ul *ngIf="display === 'row'; else menu" [class]="cx('filterConstraintList')">
|
|
6864
|
+
<ul *ngIf="display === 'row'; else menu" [class]="cx('filterConstraintList')" [pBind]="ptm('filterConstraintList')">
|
|
6820
6865
|
<li
|
|
6821
6866
|
*ngFor="let matchMode of matchModes; let i = index"
|
|
6822
6867
|
(click)="onRowMatchModeChange(matchMode.value)"
|
|
6823
6868
|
(keydown)="onRowMatchModeKeyDown($event)"
|
|
6824
6869
|
(keydown.enter)="onRowMatchModeChange(matchMode.value)"
|
|
6825
6870
|
[class]="cx('filterConstraint')"
|
|
6871
|
+
[pBind]="ptm('filterConstraint', ptmFilterConstraintOptions(matchMode))"
|
|
6826
6872
|
[class.p-datatable-filter-constraint-selected]="isRowMatchModeSelected(matchMode.value)"
|
|
6827
6873
|
[attr.tabindex]="i === 0 ? '0' : null"
|
|
6828
6874
|
>
|
|
6829
6875
|
{{ matchMode.label }}
|
|
6830
6876
|
</li>
|
|
6831
|
-
<li [class]="cx('filterConstraintSeparator')"></li>
|
|
6832
|
-
<li [class]="cx('filterConstraint')" (click)="onRowClearItemClick()" (keydown)="onRowMatchModeKeyDown($event)" (keydown.enter)="onRowClearItemClick()">
|
|
6877
|
+
<li [class]="cx('filterConstraintSeparator')" [pBind]="ptm('filterConstraintSeparator', { context: { index: i } })"></li>
|
|
6878
|
+
<li [class]="cx('filterConstraint')" [pBind]="ptm('emtpyFilterLabel')" (click)="onRowClearItemClick()" (keydown)="onRowMatchModeKeyDown($event)" (keydown.enter)="onRowClearItemClick()">
|
|
6833
6879
|
{{ noFilterLabel }}
|
|
6834
6880
|
</li>
|
|
6835
6881
|
</ul>
|
|
6836
6882
|
<ng-template #menu>
|
|
6837
|
-
<div [class]="cx('filterOperator')" *ngIf="isShowOperator">
|
|
6838
|
-
<p-select [options]="operatorOptions" [ngModel]="operator" (ngModelChange)="onOperatorChange($event)" [styleClass]="cx('pcFilterOperatorDropdown')"></p-select>
|
|
6883
|
+
<div [class]="cx('filterOperator')" [pBind]="ptm('filterOperator')" *ngIf="isShowOperator">
|
|
6884
|
+
<p-select [options]="operatorOptions" [pt]="ptm('pcFilterOperatorDropdown')" [ngModel]="operator" (ngModelChange)="onOperatorChange($event)" [styleClass]="cx('pcFilterOperatorDropdown')"></p-select>
|
|
6839
6885
|
</div>
|
|
6840
|
-
<div [class]="cx('filterRuleList')">
|
|
6841
|
-
<div *ngFor="let fieldConstraint of fieldConstraints; let i = index" [ngClass]="cx('filterRule')">
|
|
6886
|
+
<div [class]="cx('filterRuleList')" [pBind]="ptm('filterRuleList')">
|
|
6887
|
+
<div *ngFor="let fieldConstraint of fieldConstraints; let i = index" [ngClass]="cx('filterRule')" [pBind]="ptm('filterRule')">
|
|
6842
6888
|
<p-select
|
|
6843
6889
|
*ngIf="showMatchModes && matchModes"
|
|
6844
6890
|
[options]="matchModes"
|
|
6845
6891
|
[ngModel]="fieldConstraint.matchMode"
|
|
6846
6892
|
(ngModelChange)="onMenuMatchModeChange($event, fieldConstraint)"
|
|
6847
6893
|
[styleClass]="cx('pcFilterConstraintDropdown')"
|
|
6894
|
+
[pt]="ptm('pcFilterConstraintDropdown')"
|
|
6848
6895
|
></p-select>
|
|
6849
6896
|
<p-columnFilterFormElement
|
|
6850
6897
|
[type]="type"
|
|
@@ -6862,11 +6909,13 @@ class ColumnFilter extends BaseComponent {
|
|
|
6862
6909
|
[currencyDisplay]="currencyDisplay"
|
|
6863
6910
|
[useGrouping]="useGrouping"
|
|
6864
6911
|
[filterOn]="filterOn"
|
|
6912
|
+
[pt]="pt()"
|
|
6865
6913
|
></p-columnFilterFormElement>
|
|
6866
6914
|
<div>
|
|
6867
6915
|
<p-button
|
|
6868
6916
|
*ngIf="showRemoveIcon"
|
|
6869
6917
|
[styleClass]="cx('pcFilterRemoveRuleButton')"
|
|
6918
|
+
[pt]="ptm('pcFilterRemoveRuleButton')"
|
|
6870
6919
|
[text]="true"
|
|
6871
6920
|
severity="danger"
|
|
6872
6921
|
size="small"
|
|
@@ -6876,16 +6925,17 @@ class ColumnFilter extends BaseComponent {
|
|
|
6876
6925
|
[buttonProps]="filterButtonProps?.popover?.removeRule"
|
|
6877
6926
|
>
|
|
6878
6927
|
<ng-template #icon>
|
|
6879
|
-
<svg data-p-icon="trash" *ngIf="!removeRuleIconTemplate && !_removeRuleIconTemplate" />
|
|
6928
|
+
<svg data-p-icon="trash" *ngIf="!removeRuleIconTemplate && !_removeRuleIconTemplate" [pBind]="ptm('pcFilterRemoveRuleButton')['icon']" />
|
|
6880
6929
|
<ng-template *ngTemplateOutlet="removeRuleIconTemplate || _removeRuleIconTemplate"></ng-template>
|
|
6881
6930
|
</ng-template>
|
|
6882
6931
|
</p-button>
|
|
6883
6932
|
</div>
|
|
6884
6933
|
</div>
|
|
6885
6934
|
</div>
|
|
6886
|
-
|
|
6935
|
+
@if (isShowAddConstraint) {
|
|
6887
6936
|
<p-button
|
|
6888
6937
|
type="button"
|
|
6938
|
+
[pt]="ptm('pcAddRuleButtonLabel')"
|
|
6889
6939
|
[label]="addRuleButtonLabel"
|
|
6890
6940
|
[attr.aria-label]="addRuleButtonLabel"
|
|
6891
6941
|
[styleClass]="cx('pcFilterAddRuleButton')"
|
|
@@ -6895,35 +6945,44 @@ class ColumnFilter extends BaseComponent {
|
|
|
6895
6945
|
[buttonProps]="filterButtonProps?.popover?.addRule"
|
|
6896
6946
|
>
|
|
6897
6947
|
<ng-template #icon>
|
|
6898
|
-
<svg data-p-icon="plus" *ngIf="!addRuleIconTemplate && !_addRuleIconTemplate" />
|
|
6948
|
+
<svg data-p-icon="plus" *ngIf="!addRuleIconTemplate && !_addRuleIconTemplate" [pBind]="ptm('pcAddRuleButtonLabel')['icon']" />
|
|
6899
6949
|
<ng-template *ngTemplateOutlet="addRuleIconTemplate || _addRuleIconTemplate"></ng-template>
|
|
6900
6950
|
</ng-template>
|
|
6901
6951
|
</p-button>
|
|
6902
|
-
|
|
6903
|
-
<div [class]="cx('filterButtonbar')">
|
|
6904
|
-
<p-button
|
|
6905
|
-
|
|
6952
|
+
}
|
|
6953
|
+
<div [class]="cx('filterButtonbar')" [pBind]="ptm('filterButtonBar')">
|
|
6954
|
+
<p-button
|
|
6955
|
+
#clearBtn
|
|
6956
|
+
*ngIf="showClearButton"
|
|
6957
|
+
[outlined]="true"
|
|
6958
|
+
(onClick)="clearFilter()"
|
|
6959
|
+
[attr.aria-label]="clearButtonLabel"
|
|
6960
|
+
[label]="clearButtonLabel"
|
|
6961
|
+
[buttonProps]="filterButtonProps?.popover?.clear"
|
|
6962
|
+
[pt]="ptm('pcFilterClearButton')"
|
|
6963
|
+
/>
|
|
6964
|
+
<p-button *ngIf="showApplyButton" (onClick)="applyFilter()" size="small" [label]="applyButtonLabel" [attr.aria-label]="applyButtonLabel" [buttonProps]="filterButtonProps?.popover?.apply" [pt]="ptm('pcFilterApplyButton')" />
|
|
6906
6965
|
</div>
|
|
6907
6966
|
</ng-template>
|
|
6908
6967
|
<ng-container *ngTemplateOutlet="footerTemplate || _footerTemplate; context: { $implicit: field }"></ng-container>
|
|
6909
6968
|
</div>
|
|
6910
6969
|
</div>
|
|
6911
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() =>
|
|
6970
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => i10.Select), selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i0.forwardRef(() => i7.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i7.NgModel), selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i0.forwardRef(() => i11.Button), selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i0.forwardRef(() => FilterIcon), selector: "[data-p-icon=\"filter\"]" }, { kind: "component", type: i0.forwardRef(() => FilterFillIcon), selector: "[data-p-icon=\"filter-fill\"]" }, { kind: "component", type: i0.forwardRef(() => PlusIcon), selector: "[data-p-icon=\"plus\"]" }, { kind: "component", type: i0.forwardRef(() => TrashIcon), selector: "[data-p-icon=\"trash\"]" }, { kind: "directive", type: i0.forwardRef(() => i1.Bind), selector: "[pBind]", inputs: ["pBind"] }, { kind: "component", type: i0.forwardRef(() => ColumnFilterFormElement), selector: "p-columnFilterFormElement", inputs: ["field", "type", "filterConstraint", "filterTemplate", "placeholder", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "ariaLabel", "filterOn"] }], animations: [trigger('overlayAnimation', [transition(':enter', [style$2({ opacity: 0, transform: 'scaleY(0.8)' }), animate('.12s cubic-bezier(0, 0, 0.2, 1)')]), transition(':leave', [animate('.1s linear', style$2({ opacity: 0 }))])])], encapsulation: i0.ViewEncapsulation.None });
|
|
6912
6971
|
}
|
|
6913
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6972
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ColumnFilter, decorators: [{
|
|
6914
6973
|
type: Component,
|
|
6915
6974
|
args: [{
|
|
6916
6975
|
selector: 'p-columnFilter, p-column-filter, p-columnfilter',
|
|
6917
6976
|
standalone: false,
|
|
6918
6977
|
template: `
|
|
6919
|
-
<div [class]="cx('filter')">
|
|
6978
|
+
<div [class]="cx('filter')" [pBind]="ptm('filter')">
|
|
6920
6979
|
<p-columnFilterFormElement
|
|
6921
6980
|
*ngIf="display === 'row'"
|
|
6922
6981
|
class="p-fluid"
|
|
6923
6982
|
[type]="type"
|
|
6924
6983
|
[field]="field"
|
|
6925
6984
|
[ariaLabel]="ariaLabel"
|
|
6926
|
-
[filterConstraint]="
|
|
6985
|
+
[filterConstraint]="dataTable.filters[field]"
|
|
6927
6986
|
[filterTemplate]="filterTemplate || _filterTemplate"
|
|
6928
6987
|
[placeholder]="placeholder"
|
|
6929
6988
|
[minFractionDigits]="minFractionDigits"
|
|
@@ -6937,10 +6996,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6937
6996
|
[useGrouping]="useGrouping"
|
|
6938
6997
|
[showButtons]="showButtons"
|
|
6939
6998
|
[filterOn]="filterOn"
|
|
6999
|
+
[pt]="pt()"
|
|
6940
7000
|
></p-columnFilterFormElement>
|
|
6941
7001
|
<p-button
|
|
6942
7002
|
*ngIf="showMenuButton"
|
|
6943
7003
|
[styleClass]="cx('pcColumnFilterButton')"
|
|
7004
|
+
[pt]="ptm('pcColumnFilterButton')"
|
|
6944
7005
|
[attr.aria-haspopup]="true"
|
|
6945
7006
|
[ariaLabel]="filterMenuButtonAriaLabel"
|
|
6946
7007
|
[attr.aria-controls]="overlayVisible ? overlayId : null"
|
|
@@ -6951,9 +7012,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6951
7012
|
>
|
|
6952
7013
|
<ng-template #icon>
|
|
6953
7014
|
<ng-container>
|
|
6954
|
-
<svg data-p-icon="filter" *ngIf="!filterIconTemplate && !_filterIconTemplate && !hasFilter" />
|
|
6955
|
-
<svg data-p-icon="filter-fill" *ngIf="!filterIconTemplate && !_filterIconTemplate && hasFilter" />
|
|
6956
|
-
<span class="pi-filter-icon" *ngIf="filterIconTemplate || _filterIconTemplate">
|
|
7015
|
+
<svg data-p-icon="filter" *ngIf="!filterIconTemplate && !_filterIconTemplate && !hasFilter" [pBind]="ptm('pcColumnFilterButton')['icon']" />
|
|
7016
|
+
<svg data-p-icon="filter-fill" *ngIf="!filterIconTemplate && !_filterIconTemplate && hasFilter" [pBind]="ptm('pcColumnFilterButton')['icon']" />
|
|
7017
|
+
<span class="pi-filter-icon" *ngIf="filterIconTemplate || _filterIconTemplate" [pBind]="ptm('pcColumnFilterButton')['icon']">
|
|
6957
7018
|
<ng-template *ngTemplateOutlet="filterIconTemplate || _filterIconTemplate; context: { hasFilter: hasFilter }"></ng-template>
|
|
6958
7019
|
</span>
|
|
6959
7020
|
</ng-container>
|
|
@@ -6963,6 +7024,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6963
7024
|
<div
|
|
6964
7025
|
*ngIf="showMenu && overlayVisible"
|
|
6965
7026
|
[class]="cx('filterOverlay')"
|
|
7027
|
+
[pBind]="ptm('filterOverlay')"
|
|
6966
7028
|
[id]="overlayId"
|
|
6967
7029
|
[attr.aria-modal]="true"
|
|
6968
7030
|
role="dialog"
|
|
@@ -6973,35 +7035,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
6973
7035
|
(keydown.escape)="onEscape()"
|
|
6974
7036
|
>
|
|
6975
7037
|
<ng-container *ngTemplateOutlet="headerTemplate || _headerTemplate; context: { $implicit: field }"></ng-container>
|
|
6976
|
-
<ul *ngIf="display === 'row'; else menu" [class]="cx('filterConstraintList')">
|
|
7038
|
+
<ul *ngIf="display === 'row'; else menu" [class]="cx('filterConstraintList')" [pBind]="ptm('filterConstraintList')">
|
|
6977
7039
|
<li
|
|
6978
7040
|
*ngFor="let matchMode of matchModes; let i = index"
|
|
6979
7041
|
(click)="onRowMatchModeChange(matchMode.value)"
|
|
6980
7042
|
(keydown)="onRowMatchModeKeyDown($event)"
|
|
6981
7043
|
(keydown.enter)="onRowMatchModeChange(matchMode.value)"
|
|
6982
7044
|
[class]="cx('filterConstraint')"
|
|
7045
|
+
[pBind]="ptm('filterConstraint', ptmFilterConstraintOptions(matchMode))"
|
|
6983
7046
|
[class.p-datatable-filter-constraint-selected]="isRowMatchModeSelected(matchMode.value)"
|
|
6984
7047
|
[attr.tabindex]="i === 0 ? '0' : null"
|
|
6985
7048
|
>
|
|
6986
7049
|
{{ matchMode.label }}
|
|
6987
7050
|
</li>
|
|
6988
|
-
<li [class]="cx('filterConstraintSeparator')"></li>
|
|
6989
|
-
<li [class]="cx('filterConstraint')" (click)="onRowClearItemClick()" (keydown)="onRowMatchModeKeyDown($event)" (keydown.enter)="onRowClearItemClick()">
|
|
7051
|
+
<li [class]="cx('filterConstraintSeparator')" [pBind]="ptm('filterConstraintSeparator', { context: { index: i } })"></li>
|
|
7052
|
+
<li [class]="cx('filterConstraint')" [pBind]="ptm('emtpyFilterLabel')" (click)="onRowClearItemClick()" (keydown)="onRowMatchModeKeyDown($event)" (keydown.enter)="onRowClearItemClick()">
|
|
6990
7053
|
{{ noFilterLabel }}
|
|
6991
7054
|
</li>
|
|
6992
7055
|
</ul>
|
|
6993
7056
|
<ng-template #menu>
|
|
6994
|
-
<div [class]="cx('filterOperator')" *ngIf="isShowOperator">
|
|
6995
|
-
<p-select [options]="operatorOptions" [ngModel]="operator" (ngModelChange)="onOperatorChange($event)" [styleClass]="cx('pcFilterOperatorDropdown')"></p-select>
|
|
7057
|
+
<div [class]="cx('filterOperator')" [pBind]="ptm('filterOperator')" *ngIf="isShowOperator">
|
|
7058
|
+
<p-select [options]="operatorOptions" [pt]="ptm('pcFilterOperatorDropdown')" [ngModel]="operator" (ngModelChange)="onOperatorChange($event)" [styleClass]="cx('pcFilterOperatorDropdown')"></p-select>
|
|
6996
7059
|
</div>
|
|
6997
|
-
<div [class]="cx('filterRuleList')">
|
|
6998
|
-
<div *ngFor="let fieldConstraint of fieldConstraints; let i = index" [ngClass]="cx('filterRule')">
|
|
7060
|
+
<div [class]="cx('filterRuleList')" [pBind]="ptm('filterRuleList')">
|
|
7061
|
+
<div *ngFor="let fieldConstraint of fieldConstraints; let i = index" [ngClass]="cx('filterRule')" [pBind]="ptm('filterRule')">
|
|
6999
7062
|
<p-select
|
|
7000
7063
|
*ngIf="showMatchModes && matchModes"
|
|
7001
7064
|
[options]="matchModes"
|
|
7002
7065
|
[ngModel]="fieldConstraint.matchMode"
|
|
7003
7066
|
(ngModelChange)="onMenuMatchModeChange($event, fieldConstraint)"
|
|
7004
7067
|
[styleClass]="cx('pcFilterConstraintDropdown')"
|
|
7068
|
+
[pt]="ptm('pcFilterConstraintDropdown')"
|
|
7005
7069
|
></p-select>
|
|
7006
7070
|
<p-columnFilterFormElement
|
|
7007
7071
|
[type]="type"
|
|
@@ -7019,11 +7083,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
7019
7083
|
[currencyDisplay]="currencyDisplay"
|
|
7020
7084
|
[useGrouping]="useGrouping"
|
|
7021
7085
|
[filterOn]="filterOn"
|
|
7086
|
+
[pt]="pt()"
|
|
7022
7087
|
></p-columnFilterFormElement>
|
|
7023
7088
|
<div>
|
|
7024
7089
|
<p-button
|
|
7025
7090
|
*ngIf="showRemoveIcon"
|
|
7026
7091
|
[styleClass]="cx('pcFilterRemoveRuleButton')"
|
|
7092
|
+
[pt]="ptm('pcFilterRemoveRuleButton')"
|
|
7027
7093
|
[text]="true"
|
|
7028
7094
|
severity="danger"
|
|
7029
7095
|
size="small"
|
|
@@ -7033,16 +7099,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
7033
7099
|
[buttonProps]="filterButtonProps?.popover?.removeRule"
|
|
7034
7100
|
>
|
|
7035
7101
|
<ng-template #icon>
|
|
7036
|
-
<svg data-p-icon="trash" *ngIf="!removeRuleIconTemplate && !_removeRuleIconTemplate" />
|
|
7102
|
+
<svg data-p-icon="trash" *ngIf="!removeRuleIconTemplate && !_removeRuleIconTemplate" [pBind]="ptm('pcFilterRemoveRuleButton')['icon']" />
|
|
7037
7103
|
<ng-template *ngTemplateOutlet="removeRuleIconTemplate || _removeRuleIconTemplate"></ng-template>
|
|
7038
7104
|
</ng-template>
|
|
7039
7105
|
</p-button>
|
|
7040
7106
|
</div>
|
|
7041
7107
|
</div>
|
|
7042
7108
|
</div>
|
|
7043
|
-
|
|
7109
|
+
@if (isShowAddConstraint) {
|
|
7044
7110
|
<p-button
|
|
7045
7111
|
type="button"
|
|
7112
|
+
[pt]="ptm('pcAddRuleButtonLabel')"
|
|
7046
7113
|
[label]="addRuleButtonLabel"
|
|
7047
7114
|
[attr.aria-label]="addRuleButtonLabel"
|
|
7048
7115
|
[styleClass]="cx('pcFilterAddRuleButton')"
|
|
@@ -7052,22 +7119,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
7052
7119
|
[buttonProps]="filterButtonProps?.popover?.addRule"
|
|
7053
7120
|
>
|
|
7054
7121
|
<ng-template #icon>
|
|
7055
|
-
<svg data-p-icon="plus" *ngIf="!addRuleIconTemplate && !_addRuleIconTemplate" />
|
|
7122
|
+
<svg data-p-icon="plus" *ngIf="!addRuleIconTemplate && !_addRuleIconTemplate" [pBind]="ptm('pcAddRuleButtonLabel')['icon']" />
|
|
7056
7123
|
<ng-template *ngTemplateOutlet="addRuleIconTemplate || _addRuleIconTemplate"></ng-template>
|
|
7057
7124
|
</ng-template>
|
|
7058
7125
|
</p-button>
|
|
7059
|
-
|
|
7060
|
-
<div [class]="cx('filterButtonbar')">
|
|
7061
|
-
<p-button
|
|
7062
|
-
|
|
7126
|
+
}
|
|
7127
|
+
<div [class]="cx('filterButtonbar')" [pBind]="ptm('filterButtonBar')">
|
|
7128
|
+
<p-button
|
|
7129
|
+
#clearBtn
|
|
7130
|
+
*ngIf="showClearButton"
|
|
7131
|
+
[outlined]="true"
|
|
7132
|
+
(onClick)="clearFilter()"
|
|
7133
|
+
[attr.aria-label]="clearButtonLabel"
|
|
7134
|
+
[label]="clearButtonLabel"
|
|
7135
|
+
[buttonProps]="filterButtonProps?.popover?.clear"
|
|
7136
|
+
[pt]="ptm('pcFilterClearButton')"
|
|
7137
|
+
/>
|
|
7138
|
+
<p-button *ngIf="showApplyButton" (onClick)="applyFilter()" size="small" [label]="applyButtonLabel" [attr.aria-label]="applyButtonLabel" [buttonProps]="filterButtonProps?.popover?.apply" [pt]="ptm('pcFilterApplyButton')" />
|
|
7063
7139
|
</div>
|
|
7064
7140
|
</ng-template>
|
|
7065
7141
|
<ng-container *ngTemplateOutlet="footerTemplate || _footerTemplate; context: { $implicit: field }"></ng-container>
|
|
7066
7142
|
</div>
|
|
7067
7143
|
</div>
|
|
7068
7144
|
`,
|
|
7069
|
-
animations: [trigger('overlayAnimation', [transition(':enter', [style$
|
|
7070
|
-
encapsulation: ViewEncapsulation.None
|
|
7145
|
+
animations: [trigger('overlayAnimation', [transition(':enter', [style$2({ opacity: 0, transform: 'scaleY(0.8)' }), animate('.12s cubic-bezier(0, 0, 0.2, 1)')]), transition(':leave', [animate('.1s linear', style$2({ opacity: 0 }))])])],
|
|
7146
|
+
encapsulation: ViewEncapsulation.None,
|
|
7147
|
+
hostDirectives: [Bind]
|
|
7071
7148
|
}]
|
|
7072
7149
|
}], propDecorators: { field: [{
|
|
7073
7150
|
type: Input
|
|
@@ -7109,10 +7186,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
7109
7186
|
args: [{ transform: numberAttribute }]
|
|
7110
7187
|
}], minFractionDigits: [{
|
|
7111
7188
|
type: Input,
|
|
7112
|
-
args: [{ transform: (value) => numberAttribute(value,
|
|
7189
|
+
args: [{ transform: (value) => numberAttribute(value, undefined) }]
|
|
7113
7190
|
}], maxFractionDigits: [{
|
|
7114
7191
|
type: Input,
|
|
7115
|
-
args: [{ transform: (value) => numberAttribute(value,
|
|
7192
|
+
args: [{ transform: (value) => numberAttribute(value, undefined) }]
|
|
7116
7193
|
}], prefix: [{
|
|
7117
7194
|
type: Input
|
|
7118
7195
|
}], suffix: [{
|
|
@@ -7172,9 +7249,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
7172
7249
|
type: ContentChild,
|
|
7173
7250
|
args: ['clearfiltericon', { descendants: false }]
|
|
7174
7251
|
}] } });
|
|
7175
|
-
class ColumnFilterFormElement {
|
|
7176
|
-
|
|
7252
|
+
class ColumnFilterFormElement extends BaseComponent {
|
|
7253
|
+
dataTable;
|
|
7177
7254
|
colFilter;
|
|
7255
|
+
hostName = 'Table';
|
|
7256
|
+
bindDirectiveInstance = inject(Bind, { self: true });
|
|
7257
|
+
onAfterViewChecked() {
|
|
7258
|
+
this.bindDirectiveInstance.setAttrs(this.ptm('columnFilterFormElement'));
|
|
7259
|
+
}
|
|
7178
7260
|
field;
|
|
7179
7261
|
type;
|
|
7180
7262
|
filterConstraint;
|
|
@@ -7195,34 +7277,35 @@ class ColumnFilterFormElement {
|
|
|
7195
7277
|
return this.colFilter.showButtons;
|
|
7196
7278
|
}
|
|
7197
7279
|
filterCallback;
|
|
7198
|
-
constructor(
|
|
7199
|
-
|
|
7280
|
+
constructor(dataTable, colFilter) {
|
|
7281
|
+
super();
|
|
7282
|
+
this.dataTable = dataTable;
|
|
7200
7283
|
this.colFilter = colFilter;
|
|
7201
7284
|
}
|
|
7202
|
-
|
|
7285
|
+
onInit() {
|
|
7203
7286
|
this.filterCallback = (value) => {
|
|
7204
7287
|
this.filterConstraint.value = value;
|
|
7205
|
-
this.
|
|
7288
|
+
this.dataTable._filter();
|
|
7206
7289
|
};
|
|
7207
7290
|
}
|
|
7208
7291
|
onModelChange(value) {
|
|
7209
7292
|
this.filterConstraint.value = value;
|
|
7210
7293
|
if (this.type === 'date' || this.type === 'boolean' || ((this.type === 'text' || this.type === 'numeric') && this.filterOn === 'input') || !value) {
|
|
7211
|
-
this.
|
|
7294
|
+
this.dataTable._filter();
|
|
7212
7295
|
}
|
|
7213
7296
|
}
|
|
7214
7297
|
onTextInputEnterKeyDown(event) {
|
|
7215
|
-
this.
|
|
7298
|
+
this.dataTable._filter();
|
|
7216
7299
|
event.preventDefault();
|
|
7217
7300
|
}
|
|
7218
7301
|
onNumericInputKeyDown(event) {
|
|
7219
7302
|
if (event.key === 'Enter') {
|
|
7220
|
-
this.
|
|
7303
|
+
this.dataTable._filter();
|
|
7221
7304
|
event.preventDefault();
|
|
7222
7305
|
}
|
|
7223
7306
|
}
|
|
7224
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
7225
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.
|
|
7307
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ColumnFilterFormElement, deps: [{ token: Table }, { token: ColumnFilter }], target: i0.ɵɵFactoryTarget.Component });
|
|
7308
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.4", type: ColumnFilterFormElement, isStandalone: false, selector: "p-columnFilterFormElement", inputs: { field: "field", type: "type", filterConstraint: "filterConstraint", filterTemplate: "filterTemplate", placeholder: "placeholder", minFractionDigits: ["minFractionDigits", "minFractionDigits", (value) => numberAttribute(value, undefined)], maxFractionDigits: ["maxFractionDigits", "maxFractionDigits", (value) => numberAttribute(value, undefined)], prefix: "prefix", suffix: "suffix", locale: "locale", localeMatcher: "localeMatcher", currency: "currency", currencyDisplay: "currencyDisplay", useGrouping: ["useGrouping", "useGrouping", booleanAttribute], ariaLabel: "ariaLabel", filterOn: "filterOn" }, usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
7226
7309
|
<ng-container *ngIf="filterTemplate; else builtInElement">
|
|
7227
7310
|
<ng-container
|
|
7228
7311
|
*ngTemplateOutlet="
|
|
@@ -7255,6 +7338,7 @@ class ColumnFilterFormElement {
|
|
|
7255
7338
|
type="text"
|
|
7256
7339
|
[ariaLabel]="ariaLabel"
|
|
7257
7340
|
pInputText
|
|
7341
|
+
[pt]="ptm('pcFilterInputText')"
|
|
7258
7342
|
[value]="filterConstraint?.value"
|
|
7259
7343
|
(input)="onModelChange($event.target.value)"
|
|
7260
7344
|
(keydown.enter)="onTextInputEnterKeyDown($event)"
|
|
@@ -7278,15 +7362,16 @@ class ColumnFilterFormElement {
|
|
|
7278
7362
|
[currency]="currency"
|
|
7279
7363
|
[currencyDisplay]="currencyDisplay"
|
|
7280
7364
|
[useGrouping]="useGrouping"
|
|
7365
|
+
[pt]="ptm('pcFilterInputNumber')"
|
|
7281
7366
|
></p-inputNumber>
|
|
7282
|
-
<p-checkbox [indeterminate]="filterConstraint?.value === null" [binary]="true" *ngSwitchCase="'boolean'" [ngModel]="filterConstraint?.value" (ngModelChange)="onModelChange($event)" />
|
|
7367
|
+
<p-checkbox [pt]="ptm('pcFilterCheckbox')" [indeterminate]="filterConstraint?.value === null" [binary]="true" *ngSwitchCase="'boolean'" [ngModel]="filterConstraint?.value" (ngModelChange)="onModelChange($event)" />
|
|
7283
7368
|
|
|
7284
|
-
<p-datepicker [ariaLabel]="ariaLabel" *ngSwitchCase="'date'" [placeholder]="placeholder" [ngModel]="filterConstraint?.value" (ngModelChange)="onModelChange($event)" appendTo="body"></p-datepicker>
|
|
7369
|
+
<p-datepicker [pt]="ptm('pcFilterDatePicker')" [ariaLabel]="ariaLabel" *ngSwitchCase="'date'" [placeholder]="placeholder" [ngModel]="filterConstraint?.value" (ngModelChange)="onModelChange($event)" appendTo="body"></p-datepicker>
|
|
7285
7370
|
</ng-container>
|
|
7286
7371
|
</ng-template>
|
|
7287
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
7372
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i12.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i13.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: i14.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: i9.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
7288
7373
|
}
|
|
7289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ColumnFilterFormElement, decorators: [{
|
|
7290
7375
|
type: Component,
|
|
7291
7376
|
args: [{
|
|
7292
7377
|
selector: 'p-columnFilterFormElement',
|
|
@@ -7324,6 +7409,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
7324
7409
|
type="text"
|
|
7325
7410
|
[ariaLabel]="ariaLabel"
|
|
7326
7411
|
pInputText
|
|
7412
|
+
[pt]="ptm('pcFilterInputText')"
|
|
7327
7413
|
[value]="filterConstraint?.value"
|
|
7328
7414
|
(input)="onModelChange($event.target.value)"
|
|
7329
7415
|
(keydown.enter)="onTextInputEnterKeyDown($event)"
|
|
@@ -7347,14 +7433,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
7347
7433
|
[currency]="currency"
|
|
7348
7434
|
[currencyDisplay]="currencyDisplay"
|
|
7349
7435
|
[useGrouping]="useGrouping"
|
|
7436
|
+
[pt]="ptm('pcFilterInputNumber')"
|
|
7350
7437
|
></p-inputNumber>
|
|
7351
|
-
<p-checkbox [indeterminate]="filterConstraint?.value === null" [binary]="true" *ngSwitchCase="'boolean'" [ngModel]="filterConstraint?.value" (ngModelChange)="onModelChange($event)" />
|
|
7438
|
+
<p-checkbox [pt]="ptm('pcFilterCheckbox')" [indeterminate]="filterConstraint?.value === null" [binary]="true" *ngSwitchCase="'boolean'" [ngModel]="filterConstraint?.value" (ngModelChange)="onModelChange($event)" />
|
|
7352
7439
|
|
|
7353
|
-
<p-datepicker [ariaLabel]="ariaLabel" *ngSwitchCase="'date'" [placeholder]="placeholder" [ngModel]="filterConstraint?.value" (ngModelChange)="onModelChange($event)" appendTo="body"></p-datepicker>
|
|
7440
|
+
<p-datepicker [pt]="ptm('pcFilterDatePicker')" [ariaLabel]="ariaLabel" *ngSwitchCase="'date'" [placeholder]="placeholder" [ngModel]="filterConstraint?.value" (ngModelChange)="onModelChange($event)" appendTo="body"></p-datepicker>
|
|
7354
7441
|
</ng-container>
|
|
7355
7442
|
</ng-template>
|
|
7356
7443
|
`,
|
|
7357
|
-
encapsulation: ViewEncapsulation.None
|
|
7444
|
+
encapsulation: ViewEncapsulation.None,
|
|
7445
|
+
hostDirectives: [Bind]
|
|
7358
7446
|
}]
|
|
7359
7447
|
}], ctorParameters: () => [{ type: Table }, { type: ColumnFilter }], propDecorators: { field: [{
|
|
7360
7448
|
type: Input
|
|
@@ -7368,10 +7456,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
7368
7456
|
type: Input
|
|
7369
7457
|
}], minFractionDigits: [{
|
|
7370
7458
|
type: Input,
|
|
7371
|
-
args: [{ transform: (value) => numberAttribute(value,
|
|
7459
|
+
args: [{ transform: (value) => numberAttribute(value, undefined) }]
|
|
7372
7460
|
}], maxFractionDigits: [{
|
|
7373
7461
|
type: Input,
|
|
7374
|
-
args: [{ transform: (value) => numberAttribute(value,
|
|
7462
|
+
args: [{ transform: (value) => numberAttribute(value, undefined) }]
|
|
7375
7463
|
}], prefix: [{
|
|
7376
7464
|
type: Input
|
|
7377
7465
|
}], suffix: [{
|
|
@@ -7393,8 +7481,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
7393
7481
|
type: Input
|
|
7394
7482
|
}] } });
|
|
7395
7483
|
class TableModule {
|
|
7396
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
7397
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
7484
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
7485
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: TableModule, declarations: [Table, SortableColumn, FrozenColumn, RowGroupHeader, SelectableRow, RowToggler, ContextMenuRow, ResizableColumn, ReorderableColumn, EditableColumn, CellEditor, TableBody, SortIcon, TableRadioButton, TableCheckbox, TableHeaderCheckbox, ReorderableRowHandle, ReorderableRow, SelectableRowDblClick, EditableRow, InitEditableRow, SaveEditableRow, CancelEditableRow, ColumnFilter, ColumnFilterFormElement], imports: [CommonModule,
|
|
7398
7486
|
PaginatorModule,
|
|
7399
7487
|
InputTextModule,
|
|
7400
7488
|
SelectModule,
|
|
@@ -7417,8 +7505,9 @@ class TableModule {
|
|
|
7417
7505
|
FilterSlashIcon,
|
|
7418
7506
|
PlusIcon,
|
|
7419
7507
|
TrashIcon,
|
|
7420
|
-
RadioButtonModule
|
|
7421
|
-
|
|
7508
|
+
RadioButtonModule,
|
|
7509
|
+
BindModule], exports: [Table, SharedModule, SortableColumn, FrozenColumn, RowGroupHeader, SelectableRow, RowToggler, ContextMenuRow, ResizableColumn, ReorderableColumn, EditableColumn, CellEditor, SortIcon, TableRadioButton, TableCheckbox, TableHeaderCheckbox, ReorderableRowHandle, ReorderableRow, SelectableRowDblClick, EditableRow, InitEditableRow, SaveEditableRow, CancelEditableRow, ColumnFilter, ColumnFilterFormElement, ScrollerModule] });
|
|
7510
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableModule, providers: [TableStyle], imports: [CommonModule,
|
|
7422
7511
|
PaginatorModule,
|
|
7423
7512
|
InputTextModule,
|
|
7424
7513
|
SelectModule,
|
|
@@ -7441,10 +7530,11 @@ class TableModule {
|
|
|
7441
7530
|
FilterSlashIcon,
|
|
7442
7531
|
PlusIcon,
|
|
7443
7532
|
TrashIcon,
|
|
7444
|
-
RadioButtonModule,
|
|
7533
|
+
RadioButtonModule,
|
|
7534
|
+
BindModule, SharedModule,
|
|
7445
7535
|
ScrollerModule] });
|
|
7446
7536
|
}
|
|
7447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableModule, decorators: [{
|
|
7448
7538
|
type: NgModule,
|
|
7449
7539
|
args: [{
|
|
7450
7540
|
imports: [
|
|
@@ -7471,7 +7561,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
7471
7561
|
FilterSlashIcon,
|
|
7472
7562
|
PlusIcon,
|
|
7473
7563
|
TrashIcon,
|
|
7474
|
-
RadioButtonModule
|
|
7564
|
+
RadioButtonModule,
|
|
7565
|
+
BindModule
|
|
7475
7566
|
],
|
|
7476
7567
|
exports: [
|
|
7477
7568
|
Table,
|