pdm-ui-kit 0.4.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.module.d.ts +8 -0
- package/alert/alert.module.d.ts +9 -0
- package/aspect-ratio/aspect-ratio.module.d.ts +8 -0
- package/avatar/avatar.module.d.ts +8 -0
- package/badge/badge.module.d.ts +8 -0
- package/breadcrumb/breadcrumb.module.d.ts +8 -0
- package/button/button.module.d.ts +9 -0
- package/calendar/calendar.module.d.ts +11 -0
- package/{lib/components/date-picker → calendar}/date-picker.component.d.ts +2 -2
- package/card/card.module.d.ts +8 -0
- package/carousel/carousel.module.d.ts +8 -0
- package/chart/chart.module.d.ts +8 -0
- package/checkbox/checkbox.module.d.ts +8 -0
- package/collapsible/collapsible.module.d.ts +8 -0
- package/combobox/combobox.module.d.ts +9 -0
- package/{lib/components/command → command}/command.component.d.ts +1 -1
- package/command/command.module.d.ts +9 -0
- package/{lib/components/context-menu → context-menu}/context-menu.component.d.ts +1 -1
- package/context-menu/context-menu.module.d.ts +9 -0
- package/{lib/components/data-table → data-table}/data-table.component.d.ts +1 -1
- package/data-table/data-table.module.d.ts +10 -0
- package/{lib/components/draggable-table → data-table}/draggable-table.component.d.ts +2 -2
- package/{lib/components/table → data-table}/table.component.d.ts +1 -1
- package/dialog/dialog.module.d.ts +8 -0
- package/drawer/drawer.module.d.ts +10 -0
- package/{lib/components/dropdown-menu → dropdown-menu}/dropdown-menu.component.d.ts +1 -1
- package/dropdown-menu/dropdown-menu.module.d.ts +9 -0
- package/empty/empty.module.d.ts +10 -0
- package/esm2020/{lib/components/accordion → accordion}/accordion.component.mjs +1 -1
- package/esm2020/accordion/accordion.module.mjs +21 -0
- package/esm2020/{lib/components/alert-dialog → alert}/alert-dialog.component.mjs +1 -1
- package/esm2020/{lib/components/alert → alert}/alert.component.mjs +1 -1
- package/esm2020/alert/alert.module.mjs +25 -0
- package/esm2020/{lib/components/aspect-ratio → aspect-ratio}/aspect-ratio.component.mjs +1 -1
- package/esm2020/aspect-ratio/aspect-ratio.module.mjs +21 -0
- package/esm2020/{lib/components/avatar → avatar}/avatar.component.mjs +1 -1
- package/esm2020/avatar/avatar.module.mjs +21 -0
- package/esm2020/{lib/components/badge → badge}/badge.component.mjs +1 -1
- package/esm2020/badge/badge.module.mjs +21 -0
- package/esm2020/{lib/components/breadcrumb → breadcrumb}/breadcrumb.component.mjs +1 -1
- package/esm2020/breadcrumb/breadcrumb.module.mjs +21 -0
- package/esm2020/button/button-group.component.mjs +236 -0
- package/esm2020/button/button.component.mjs +114 -0
- package/esm2020/button/button.module.mjs +25 -0
- package/esm2020/calendar/calendar.component.mjs +529 -0
- package/esm2020/calendar/calendar.module.mjs +22 -0
- package/esm2020/{lib/components/date-picker → calendar}/date-picker.component.mjs +6 -6
- package/esm2020/{lib/components/card → card}/card.component.mjs +1 -1
- package/esm2020/card/card.module.mjs +21 -0
- package/esm2020/carousel/carousel.component.mjs +102 -0
- package/esm2020/carousel/carousel.module.mjs +21 -0
- package/esm2020/{lib/components/chart → chart}/chart.component.mjs +1 -1
- package/esm2020/chart/chart.module.mjs +21 -0
- package/esm2020/{lib/components/checkbox → checkbox}/checkbox.component.mjs +1 -1
- package/esm2020/checkbox/checkbox.module.mjs +21 -0
- package/esm2020/{lib/components/collapsible → collapsible}/collapsible.component.mjs +1 -1
- package/esm2020/collapsible/collapsible.module.mjs +21 -0
- package/esm2020/{lib/components/combobox → combobox}/combobox.component.mjs +2 -2
- package/esm2020/combobox/combobox.module.mjs +22 -0
- package/esm2020/command/command.component.mjs +75 -0
- package/esm2020/command/command.module.mjs +20 -0
- package/esm2020/context-menu/context-menu.component.mjs +165 -0
- package/esm2020/context-menu/context-menu.module.mjs +22 -0
- package/esm2020/data-table/data-table.component.mjs +299 -0
- package/esm2020/data-table/data-table.module.mjs +29 -0
- package/esm2020/data-table/draggable-table.component.mjs +300 -0
- package/esm2020/data-table/table.component.mjs +182 -0
- package/esm2020/dialog/dialog.component.mjs +265 -0
- package/esm2020/dialog/dialog.module.mjs +21 -0
- package/esm2020/drawer/drawer.component.mjs +217 -0
- package/esm2020/drawer/drawer.module.mjs +21 -0
- package/esm2020/drawer/sheet.component.mjs +116 -0
- package/esm2020/dropdown-menu/dropdown-menu.component.mjs +192 -0
- package/esm2020/dropdown-menu/dropdown-menu.module.mjs +22 -0
- package/esm2020/{lib/components/empty → empty}/empty.component.mjs +3 -3
- package/esm2020/empty/empty.module.mjs +21 -0
- package/esm2020/{lib/components/field → field}/field.component.mjs +1 -1
- package/esm2020/field/field.module.mjs +21 -0
- package/esm2020/{lib/components/hover-card → hover-card}/hover-card.component.mjs +2 -2
- package/esm2020/hover-card/hover-card.module.mjs +22 -0
- package/esm2020/icon/icon.component.mjs +144 -0
- package/esm2020/icon/icon.module.mjs +21 -0
- package/esm2020/input/input-group.component.mjs +63 -0
- package/esm2020/input/input-otp.component.mjs +144 -0
- package/esm2020/{lib/components/input-password → input}/input-password.component.mjs +1 -1
- package/esm2020/{lib/components/input → input}/input.component.mjs +1 -1
- package/esm2020/input/input.module.mjs +38 -0
- package/esm2020/{lib/components/textarea → input}/textarea.component.mjs +1 -1
- package/esm2020/{lib/components/item → item}/item.component.mjs +1 -1
- package/esm2020/item/item.module.mjs +21 -0
- package/esm2020/{lib/components/kbd → kbd}/kbd.component.mjs +1 -1
- package/esm2020/kbd/kbd.module.mjs +21 -0
- package/esm2020/{lib/components/label → label}/label.component.mjs +1 -1
- package/esm2020/label/label.module.mjs +21 -0
- package/esm2020/menubar/menubar.component.mjs +144 -0
- package/esm2020/menubar/menubar.module.mjs +22 -0
- package/esm2020/{lib/components/native-select → native-select}/native-select.component.mjs +2 -2
- package/esm2020/native-select/native-select.module.mjs +20 -0
- package/esm2020/{lib/components/navigation-menu → navigation-menu}/navigation-menu.component.mjs +1 -1
- package/esm2020/navigation-menu/navigation-menu.module.mjs +21 -0
- package/esm2020/overlay/create-flexible-position-strategy.mjs +54 -0
- package/esm2020/overlay/pdm-outside-click.directive.mjs +86 -0
- package/esm2020/overlay/pdm-outside-click.module.mjs +18 -0
- package/esm2020/overlay/pdm-overlay-options.mjs +2 -0
- package/esm2020/overlay/z-index-helper.mjs +69 -0
- package/esm2020/pagination/pagination.component.mjs +72 -0
- package/esm2020/pagination/pagination.module.mjs +21 -0
- package/esm2020/pdm-ui-kit.module.mjs +260 -0
- package/esm2020/{lib/components/popover → popover}/popover.component.mjs +2 -2
- package/esm2020/popover/popover.module.mjs +22 -0
- package/esm2020/{lib/components/progress → progress}/progress.component.mjs +1 -1
- package/esm2020/progress/progress.module.mjs +21 -0
- package/esm2020/public-api.mjs +117 -67
- package/esm2020/{lib/components/radio-group → radio-group}/radio-group.component.mjs +1 -1
- package/esm2020/radio-group/radio-group.module.mjs +21 -0
- package/esm2020/{lib/components/scroll-area → scroll-area}/scroll-area.component.mjs +1 -1
- package/esm2020/scroll-area/scroll-area.module.mjs +21 -0
- package/esm2020/select/select-option.directive.mjs +55 -0
- package/esm2020/select/select.component.mjs +164 -0
- package/esm2020/select/select.module.mjs +22 -0
- package/esm2020/{lib/components/separator → separator}/separator.component.mjs +1 -1
- package/esm2020/separator/separator.module.mjs +21 -0
- package/esm2020/{lib/components/sidebar → sidebar}/sidebar.component.mjs +1 -1
- package/esm2020/sidebar/sidebar.module.mjs +21 -0
- package/esm2020/{lib/components/skeleton → skeleton}/skeleton.component.mjs +1 -1
- package/esm2020/skeleton/skeleton.module.mjs +21 -0
- package/esm2020/{lib/components/slider → slider}/slider.component.mjs +1 -1
- package/esm2020/slider/slider.module.mjs +21 -0
- package/esm2020/{lib/components/sonner → sonner}/sonner.component.mjs +2 -2
- package/esm2020/sonner/sonner.module.mjs +20 -0
- package/esm2020/{lib/components/spinner → spinner}/spinner.component.mjs +1 -1
- package/esm2020/spinner/spinner.module.mjs +21 -0
- package/esm2020/src/accordion/accordion.component.mjs +42 -0
- package/esm2020/src/accordion/accordion.module.mjs +21 -0
- package/esm2020/src/accordion/pdm-ui-kit-src-accordion.mjs +5 -0
- package/esm2020/src/accordion/public-api.mjs +3 -0
- package/esm2020/src/alert/alert-dialog.component.mjs +87 -0
- package/esm2020/src/alert/alert.component.mjs +35 -0
- package/esm2020/src/alert/alert.module.mjs +25 -0
- package/esm2020/src/alert/pdm-ui-kit-src-alert.mjs +5 -0
- package/esm2020/src/alert/public-api.mjs +4 -0
- package/esm2020/src/aspect-ratio/aspect-ratio.component.mjs +31 -0
- package/esm2020/src/aspect-ratio/aspect-ratio.module.mjs +21 -0
- package/esm2020/src/aspect-ratio/pdm-ui-kit-src-aspect-ratio.mjs +5 -0
- package/esm2020/src/aspect-ratio/public-api.mjs +3 -0
- package/esm2020/src/avatar/avatar.component.mjs +46 -0
- package/esm2020/src/avatar/avatar.module.mjs +21 -0
- package/esm2020/src/avatar/pdm-ui-kit-src-avatar.mjs +5 -0
- package/esm2020/src/avatar/public-api.mjs +3 -0
- package/esm2020/src/badge/badge.component.mjs +23 -0
- package/esm2020/src/badge/badge.module.mjs +21 -0
- package/esm2020/src/badge/pdm-ui-kit-src-badge.mjs +5 -0
- package/esm2020/src/badge/public-api.mjs +3 -0
- package/esm2020/src/breadcrumb/breadcrumb.component.mjs +62 -0
- package/esm2020/src/breadcrumb/breadcrumb.module.mjs +21 -0
- package/esm2020/src/breadcrumb/pdm-ui-kit-src-breadcrumb.mjs +5 -0
- package/esm2020/src/breadcrumb/public-api.mjs +3 -0
- package/esm2020/{lib/components/button-group → src/button}/button-group.component.mjs +1 -1
- package/esm2020/src/button/button.component.mjs +114 -0
- package/esm2020/src/button/button.module.mjs +25 -0
- package/esm2020/src/button/pdm-ui-kit-src-button.mjs +5 -0
- package/esm2020/src/button/public-api.mjs +4 -0
- package/esm2020/src/calendar/calendar.component.mjs +529 -0
- package/esm2020/src/calendar/calendar.module.mjs +22 -0
- package/esm2020/src/calendar/date-picker.component.mjs +362 -0
- package/esm2020/src/calendar/pdm-ui-kit-src-calendar.mjs +5 -0
- package/esm2020/src/calendar/public-api.mjs +4 -0
- package/esm2020/src/card/card.component.mjs +48 -0
- package/esm2020/src/card/card.module.mjs +21 -0
- package/esm2020/src/card/pdm-ui-kit-src-card.mjs +5 -0
- package/esm2020/src/card/public-api.mjs +3 -0
- package/esm2020/src/carousel/carousel.component.mjs +102 -0
- package/esm2020/src/carousel/carousel.module.mjs +21 -0
- package/esm2020/src/carousel/pdm-ui-kit-src-carousel.mjs +5 -0
- package/esm2020/src/carousel/public-api.mjs +3 -0
- package/esm2020/src/chart/chart.component.mjs +177 -0
- package/esm2020/src/chart/chart.module.mjs +21 -0
- package/esm2020/src/chart/pdm-ui-kit-src-chart.mjs +5 -0
- package/esm2020/src/chart/public-api.mjs +3 -0
- package/esm2020/src/checkbox/checkbox.component.mjs +47 -0
- package/esm2020/src/checkbox/checkbox.module.mjs +21 -0
- package/esm2020/src/checkbox/pdm-ui-kit-src-checkbox.mjs +5 -0
- package/esm2020/src/checkbox/public-api.mjs +3 -0
- package/esm2020/src/collapsible/collapsible.component.mjs +43 -0
- package/esm2020/src/collapsible/collapsible.module.mjs +21 -0
- package/esm2020/src/collapsible/pdm-ui-kit-src-collapsible.mjs +5 -0
- package/esm2020/src/collapsible/public-api.mjs +3 -0
- package/esm2020/src/combobox/combobox.component.mjs +173 -0
- package/esm2020/src/combobox/combobox.module.mjs +22 -0
- package/esm2020/src/combobox/pdm-ui-kit-src-combobox.mjs +5 -0
- package/esm2020/src/combobox/public-api.mjs +3 -0
- package/esm2020/src/command/command.component.mjs +75 -0
- package/esm2020/src/command/command.module.mjs +20 -0
- package/esm2020/src/command/pdm-ui-kit-src-command.mjs +5 -0
- package/esm2020/src/command/public-api.mjs +3 -0
- package/esm2020/src/context-menu/context-menu.component.mjs +165 -0
- package/esm2020/src/context-menu/context-menu.module.mjs +22 -0
- package/esm2020/src/context-menu/pdm-ui-kit-src-context-menu.mjs +5 -0
- package/esm2020/src/context-menu/public-api.mjs +3 -0
- package/esm2020/src/data-table/data-table.component.mjs +299 -0
- package/esm2020/src/data-table/data-table.module.mjs +29 -0
- package/esm2020/src/data-table/draggable-table.component.mjs +300 -0
- package/esm2020/src/data-table/pdm-ui-kit-src-data-table.mjs +5 -0
- package/esm2020/src/data-table/public-api.mjs +5 -0
- package/esm2020/src/data-table/table.component.mjs +182 -0
- package/esm2020/src/dialog/dialog.component.mjs +265 -0
- package/esm2020/src/dialog/dialog.module.mjs +21 -0
- package/esm2020/src/dialog/pdm-ui-kit-src-dialog.mjs +5 -0
- package/esm2020/src/dialog/public-api.mjs +3 -0
- package/esm2020/src/drawer/drawer.component.mjs +217 -0
- package/esm2020/src/drawer/drawer.module.mjs +21 -0
- package/esm2020/src/drawer/pdm-ui-kit-src-drawer.mjs +5 -0
- package/esm2020/src/drawer/public-api.mjs +4 -0
- package/esm2020/src/drawer/sheet.component.mjs +116 -0
- package/esm2020/src/dropdown-menu/dropdown-menu.component.mjs +192 -0
- package/esm2020/src/dropdown-menu/dropdown-menu.module.mjs +22 -0
- package/esm2020/src/dropdown-menu/pdm-ui-kit-src-dropdown-menu.mjs +5 -0
- package/esm2020/src/dropdown-menu/public-api.mjs +3 -0
- package/esm2020/src/empty/empty.component.mjs +58 -0
- package/esm2020/src/empty/empty.module.mjs +21 -0
- package/esm2020/src/empty/pdm-ui-kit-src-empty.mjs +5 -0
- package/esm2020/src/empty/public-api.mjs +3 -0
- package/esm2020/src/field/field.component.mjs +64 -0
- package/esm2020/src/field/field.module.mjs +21 -0
- package/esm2020/src/field/pdm-ui-kit-src-field.mjs +5 -0
- package/esm2020/src/field/public-api.mjs +3 -0
- package/esm2020/src/hover-card/hover-card.component.mjs +205 -0
- package/esm2020/src/hover-card/hover-card.module.mjs +22 -0
- package/esm2020/src/hover-card/pdm-ui-kit-src-hover-card.mjs +5 -0
- package/esm2020/src/hover-card/public-api.mjs +3 -0
- package/esm2020/src/icon/icon.component.mjs +144 -0
- package/esm2020/src/icon/icon.module.mjs +21 -0
- package/esm2020/src/icon/pdm-ui-kit-src-icon.mjs +5 -0
- package/esm2020/src/icon/public-api.mjs +3 -0
- package/esm2020/{lib/components/input-group → src/input}/input-group.component.mjs +2 -2
- package/esm2020/src/input/input-otp.component.mjs +144 -0
- package/esm2020/src/input/input-password.component.mjs +78 -0
- package/esm2020/src/input/input.component.mjs +71 -0
- package/esm2020/src/input/input.module.mjs +38 -0
- package/esm2020/src/input/pdm-ui-kit-src-input.mjs +5 -0
- package/esm2020/src/input/public-api.mjs +7 -0
- package/esm2020/src/input/textarea.component.mjs +59 -0
- package/esm2020/src/item/item.component.mjs +23 -0
- package/esm2020/src/item/item.module.mjs +21 -0
- package/esm2020/src/item/pdm-ui-kit-src-item.mjs +5 -0
- package/esm2020/src/item/public-api.mjs +3 -0
- package/esm2020/src/kbd/kbd.component.mjs +17 -0
- package/esm2020/src/kbd/kbd.module.mjs +21 -0
- package/esm2020/src/kbd/pdm-ui-kit-src-kbd.mjs +5 -0
- package/esm2020/src/kbd/public-api.mjs +3 -0
- package/esm2020/src/label/label.component.mjs +23 -0
- package/esm2020/src/label/label.module.mjs +21 -0
- package/esm2020/src/label/pdm-ui-kit-src-label.mjs +5 -0
- package/esm2020/src/label/public-api.mjs +3 -0
- package/esm2020/src/menubar/menubar.component.mjs +144 -0
- package/esm2020/src/menubar/menubar.module.mjs +22 -0
- package/esm2020/src/menubar/pdm-ui-kit-src-menubar.mjs +5 -0
- package/esm2020/src/menubar/public-api.mjs +3 -0
- package/esm2020/src/native-select/native-select.component.mjs +42 -0
- package/esm2020/src/native-select/native-select.module.mjs +20 -0
- package/esm2020/src/native-select/pdm-ui-kit-src-native-select.mjs +5 -0
- package/esm2020/src/native-select/public-api.mjs +3 -0
- package/esm2020/src/navigation-menu/navigation-menu.component.mjs +42 -0
- package/esm2020/src/navigation-menu/navigation-menu.module.mjs +21 -0
- package/esm2020/src/navigation-menu/pdm-ui-kit-src-navigation-menu.mjs +5 -0
- package/esm2020/src/navigation-menu/public-api.mjs +3 -0
- package/esm2020/src/overlay/create-flexible-position-strategy.mjs +54 -0
- package/esm2020/src/overlay/pdm-outside-click.directive.mjs +86 -0
- package/esm2020/src/overlay/pdm-outside-click.module.mjs +18 -0
- package/esm2020/src/overlay/pdm-overlay-options.mjs +2 -0
- package/esm2020/src/overlay/pdm-ui-kit-src-overlay.mjs +5 -0
- package/esm2020/src/overlay/public-api.mjs +6 -0
- package/esm2020/src/overlay/z-index-helper.mjs +69 -0
- package/esm2020/{lib/components → src}/pagination/pagination.component.mjs +3 -3
- package/esm2020/src/pagination/pagination.module.mjs +21 -0
- package/esm2020/src/pagination/pdm-ui-kit-src-pagination.mjs +5 -0
- package/esm2020/src/pagination/public-api.mjs +3 -0
- package/esm2020/src/popover/pdm-ui-kit-src-popover.mjs +5 -0
- package/esm2020/src/popover/popover.component.mjs +162 -0
- package/esm2020/src/popover/popover.module.mjs +22 -0
- package/esm2020/src/popover/public-api.mjs +3 -0
- package/esm2020/src/progress/pdm-ui-kit-src-progress.mjs +5 -0
- package/esm2020/src/progress/progress.component.mjs +33 -0
- package/esm2020/src/progress/progress.module.mjs +21 -0
- package/esm2020/src/progress/public-api.mjs +3 -0
- package/esm2020/src/radio-group/pdm-ui-kit-src-radio-group.mjs +5 -0
- package/esm2020/src/radio-group/public-api.mjs +3 -0
- package/esm2020/src/radio-group/radio-group.component.mjs +38 -0
- package/esm2020/src/radio-group/radio-group.module.mjs +21 -0
- package/esm2020/src/scroll-area/pdm-ui-kit-src-scroll-area.mjs +5 -0
- package/esm2020/src/scroll-area/public-api.mjs +3 -0
- package/esm2020/src/scroll-area/scroll-area.component.mjs +20 -0
- package/esm2020/src/scroll-area/scroll-area.module.mjs +21 -0
- package/esm2020/src/select/pdm-ui-kit-src-select.mjs +5 -0
- package/esm2020/src/select/public-api.mjs +4 -0
- package/esm2020/src/select/select-option.directive.mjs +55 -0
- package/esm2020/src/select/select.component.mjs +164 -0
- package/esm2020/src/select/select.module.mjs +22 -0
- package/esm2020/src/separator/pdm-ui-kit-src-separator.mjs +5 -0
- package/esm2020/src/separator/public-api.mjs +3 -0
- package/esm2020/src/separator/separator.component.mjs +26 -0
- package/esm2020/src/separator/separator.module.mjs +21 -0
- package/esm2020/src/sidebar/pdm-ui-kit-src-sidebar.mjs +5 -0
- package/esm2020/src/sidebar/public-api.mjs +3 -0
- package/esm2020/src/sidebar/sidebar.component.mjs +67 -0
- package/esm2020/src/sidebar/sidebar.module.mjs +21 -0
- package/esm2020/src/skeleton/pdm-ui-kit-src-skeleton.mjs +5 -0
- package/esm2020/src/skeleton/public-api.mjs +3 -0
- package/esm2020/src/skeleton/skeleton.component.mjs +17 -0
- package/esm2020/src/skeleton/skeleton.module.mjs +21 -0
- package/esm2020/src/slider/pdm-ui-kit-src-slider.mjs +5 -0
- package/esm2020/src/slider/public-api.mjs +3 -0
- package/esm2020/src/slider/slider.component.mjs +46 -0
- package/esm2020/src/slider/slider.module.mjs +21 -0
- package/esm2020/src/sonner/pdm-ui-kit-src-sonner.mjs +5 -0
- package/esm2020/src/sonner/public-api.mjs +3 -0
- package/esm2020/src/sonner/sonner.component.mjs +39 -0
- package/esm2020/src/sonner/sonner.module.mjs +20 -0
- package/esm2020/src/spinner/pdm-ui-kit-src-spinner.mjs +5 -0
- package/esm2020/src/spinner/public-api.mjs +3 -0
- package/esm2020/src/spinner/spinner.component.mjs +20 -0
- package/esm2020/src/spinner/spinner.module.mjs +21 -0
- package/esm2020/src/switch/pdm-ui-kit-src-switch.mjs +5 -0
- package/esm2020/src/switch/public-api.mjs +3 -0
- package/esm2020/src/switch/switch.component.mjs +58 -0
- package/esm2020/src/switch/switch.module.mjs +21 -0
- package/esm2020/src/tabs/pdm-ui-kit-src-tabs.mjs +5 -0
- package/esm2020/src/tabs/public-api.mjs +3 -0
- package/esm2020/{lib/components → src}/tabs/tabs.component.mjs +1 -1
- package/esm2020/src/tabs/tabs.module.mjs +21 -0
- package/esm2020/src/toggle/pdm-ui-kit-src-toggle.mjs +5 -0
- package/esm2020/src/toggle/public-api.mjs +4 -0
- package/esm2020/{lib/components/toggle-group → src/toggle}/toggle-group.component.mjs +1 -1
- package/esm2020/{lib/components → src}/toggle/toggle.component.mjs +1 -1
- package/esm2020/src/toggle/toggle.module.mjs +25 -0
- package/esm2020/src/tooltip/pdm-ui-kit-src-tooltip.mjs +5 -0
- package/esm2020/src/tooltip/public-api.mjs +3 -0
- package/esm2020/src/tooltip/tooltip.component.mjs +176 -0
- package/esm2020/src/tooltip/tooltip.module.mjs +22 -0
- package/esm2020/src/utils/pdm-ui-kit-src-utils.mjs +5 -0
- package/esm2020/src/utils/public-api.mjs +3 -0
- package/esm2020/src/utils/responsive.mjs +143 -0
- package/esm2020/src/utils/z-index.mjs +90 -0
- package/esm2020/switch/switch.component.mjs +58 -0
- package/esm2020/switch/switch.module.mjs +21 -0
- package/esm2020/tabs/tabs.component.mjs +34 -0
- package/esm2020/tabs/tabs.module.mjs +21 -0
- package/esm2020/toggle/toggle-group.component.mjs +31 -0
- package/esm2020/toggle/toggle.component.mjs +41 -0
- package/esm2020/toggle/toggle.module.mjs +25 -0
- package/esm2020/{lib/components/tooltip → tooltip}/tooltip.component.mjs +2 -2
- package/esm2020/tooltip/tooltip.module.mjs +22 -0
- package/esm2020/utils/responsive.mjs +143 -0
- package/esm2020/utils/z-index.mjs +90 -0
- package/fesm2015/pdm-ui-kit-src-accordion.mjs +68 -0
- package/fesm2015/pdm-ui-kit-src-accordion.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-alert.mjs +147 -0
- package/fesm2015/pdm-ui-kit-src-alert.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-aspect-ratio.mjs +56 -0
- package/fesm2015/pdm-ui-kit-src-aspect-ratio.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-avatar.mjs +71 -0
- package/fesm2015/pdm-ui-kit-src-avatar.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-badge.mjs +48 -0
- package/fesm2015/pdm-ui-kit-src-badge.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-breadcrumb.mjs +87 -0
- package/fesm2015/pdm-ui-kit-src-breadcrumb.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-button.mjs +376 -0
- package/fesm2015/pdm-ui-kit-src-button.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-calendar.mjs +912 -0
- package/fesm2015/pdm-ui-kit-src-calendar.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-card.mjs +73 -0
- package/fesm2015/pdm-ui-kit-src-card.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-carousel.mjs +127 -0
- package/fesm2015/pdm-ui-kit-src-carousel.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-chart.mjs +203 -0
- package/fesm2015/pdm-ui-kit-src-chart.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-checkbox.mjs +72 -0
- package/fesm2015/pdm-ui-kit-src-checkbox.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-collapsible.mjs +68 -0
- package/fesm2015/pdm-ui-kit-src-collapsible.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-combobox.mjs +200 -0
- package/fesm2015/pdm-ui-kit-src-combobox.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-command.mjs +100 -0
- package/fesm2015/pdm-ui-kit-src-command.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-context-menu.mjs +191 -0
- package/fesm2015/pdm-ui-kit-src-context-menu.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-data-table.mjs +806 -0
- package/fesm2015/pdm-ui-kit-src-data-table.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-dialog.mjs +289 -0
- package/fesm2015/pdm-ui-kit-src-dialog.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-drawer.mjs +354 -0
- package/fesm2015/pdm-ui-kit-src-drawer.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-dropdown-menu.mjs +212 -0
- package/fesm2015/pdm-ui-kit-src-dropdown-menu.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-empty.mjs +83 -0
- package/fesm2015/pdm-ui-kit-src-empty.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-field.mjs +89 -0
- package/fesm2015/pdm-ui-kit-src-field.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-hover-card.mjs +231 -0
- package/fesm2015/pdm-ui-kit-src-hover-card.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-icon.mjs +172 -0
- package/fesm2015/pdm-ui-kit-src-icon.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-input.mjs +443 -0
- package/fesm2015/pdm-ui-kit-src-input.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-item.mjs +48 -0
- package/fesm2015/pdm-ui-kit-src-item.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-kbd.mjs +42 -0
- package/fesm2015/pdm-ui-kit-src-kbd.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-label.mjs +48 -0
- package/fesm2015/pdm-ui-kit-src-label.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-menubar.mjs +170 -0
- package/fesm2015/pdm-ui-kit-src-menubar.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-native-select.mjs +66 -0
- package/fesm2015/pdm-ui-kit-src-native-select.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-navigation-menu.mjs +67 -0
- package/fesm2015/pdm-ui-kit-src-navigation-menu.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-overlay.mjs +225 -0
- package/fesm2015/pdm-ui-kit-src-overlay.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-pagination.mjs +97 -0
- package/fesm2015/pdm-ui-kit-src-pagination.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-popover.mjs +189 -0
- package/fesm2015/pdm-ui-kit-src-popover.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-progress.mjs +58 -0
- package/fesm2015/pdm-ui-kit-src-progress.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-radio-group.mjs +63 -0
- package/fesm2015/pdm-ui-kit-src-radio-group.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-scroll-area.mjs +45 -0
- package/fesm2015/pdm-ui-kit-src-scroll-area.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-select.mjs +238 -0
- package/fesm2015/pdm-ui-kit-src-select.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-separator.mjs +51 -0
- package/fesm2015/pdm-ui-kit-src-separator.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-sidebar.mjs +92 -0
- package/fesm2015/pdm-ui-kit-src-sidebar.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-skeleton.mjs +42 -0
- package/fesm2015/pdm-ui-kit-src-skeleton.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-slider.mjs +71 -0
- package/fesm2015/pdm-ui-kit-src-slider.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-sonner.mjs +63 -0
- package/fesm2015/pdm-ui-kit-src-sonner.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-spinner.mjs +45 -0
- package/fesm2015/pdm-ui-kit-src-spinner.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-switch.mjs +83 -0
- package/fesm2015/pdm-ui-kit-src-switch.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-tabs.mjs +59 -0
- package/fesm2015/pdm-ui-kit-src-tabs.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-toggle.mjs +97 -0
- package/fesm2015/pdm-ui-kit-src-toggle.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-tooltip.mjs +202 -0
- package/fesm2015/pdm-ui-kit-src-tooltip.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-utils.mjs +239 -0
- package/fesm2015/pdm-ui-kit-src-utils.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit.mjs +3832 -2982
- package/fesm2015/pdm-ui-kit.mjs.map +1 -1
- package/fesm2020/pdm-ui-kit-src-accordion.mjs +67 -0
- package/fesm2020/pdm-ui-kit-src-accordion.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-alert.mjs +147 -0
- package/fesm2020/pdm-ui-kit-src-alert.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-aspect-ratio.mjs +56 -0
- package/fesm2020/pdm-ui-kit-src-aspect-ratio.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-avatar.mjs +71 -0
- package/fesm2020/pdm-ui-kit-src-avatar.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-badge.mjs +48 -0
- package/fesm2020/pdm-ui-kit-src-badge.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-breadcrumb.mjs +87 -0
- package/fesm2020/pdm-ui-kit-src-breadcrumb.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-button.mjs +375 -0
- package/fesm2020/pdm-ui-kit-src-button.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-calendar.mjs +911 -0
- package/fesm2020/pdm-ui-kit-src-calendar.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-card.mjs +73 -0
- package/fesm2020/pdm-ui-kit-src-card.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-carousel.mjs +127 -0
- package/fesm2020/pdm-ui-kit-src-carousel.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-chart.mjs +202 -0
- package/fesm2020/pdm-ui-kit-src-chart.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-checkbox.mjs +72 -0
- package/fesm2020/pdm-ui-kit-src-checkbox.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-collapsible.mjs +68 -0
- package/fesm2020/pdm-ui-kit-src-collapsible.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-combobox.mjs +199 -0
- package/fesm2020/pdm-ui-kit-src-combobox.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-command.mjs +99 -0
- package/fesm2020/pdm-ui-kit-src-command.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-context-menu.mjs +191 -0
- package/fesm2020/pdm-ui-kit-src-context-menu.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-data-table.mjs +805 -0
- package/fesm2020/pdm-ui-kit-src-data-table.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-dialog.mjs +289 -0
- package/fesm2020/pdm-ui-kit-src-dialog.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-drawer.mjs +354 -0
- package/fesm2020/pdm-ui-kit-src-drawer.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-dropdown-menu.mjs +218 -0
- package/fesm2020/pdm-ui-kit-src-dropdown-menu.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-empty.mjs +83 -0
- package/fesm2020/pdm-ui-kit-src-empty.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-field.mjs +89 -0
- package/fesm2020/pdm-ui-kit-src-field.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-hover-card.mjs +231 -0
- package/fesm2020/pdm-ui-kit-src-hover-card.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-icon.mjs +169 -0
- package/fesm2020/pdm-ui-kit-src-icon.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-input.mjs +441 -0
- package/fesm2020/pdm-ui-kit-src-input.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-item.mjs +48 -0
- package/fesm2020/pdm-ui-kit-src-item.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-kbd.mjs +42 -0
- package/fesm2020/pdm-ui-kit-src-kbd.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-label.mjs +48 -0
- package/fesm2020/pdm-ui-kit-src-label.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-menubar.mjs +170 -0
- package/fesm2020/pdm-ui-kit-src-menubar.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-native-select.mjs +66 -0
- package/fesm2020/pdm-ui-kit-src-native-select.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-navigation-menu.mjs +67 -0
- package/fesm2020/pdm-ui-kit-src-navigation-menu.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-overlay.mjs +229 -0
- package/fesm2020/pdm-ui-kit-src-overlay.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-pagination.mjs +97 -0
- package/fesm2020/pdm-ui-kit-src-pagination.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-popover.mjs +188 -0
- package/fesm2020/pdm-ui-kit-src-popover.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-progress.mjs +58 -0
- package/fesm2020/pdm-ui-kit-src-progress.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-radio-group.mjs +63 -0
- package/fesm2020/pdm-ui-kit-src-radio-group.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-scroll-area.mjs +45 -0
- package/fesm2020/pdm-ui-kit-src-scroll-area.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-select.mjs +241 -0
- package/fesm2020/pdm-ui-kit-src-select.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-separator.mjs +51 -0
- package/fesm2020/pdm-ui-kit-src-separator.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-sidebar.mjs +92 -0
- package/fesm2020/pdm-ui-kit-src-sidebar.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-skeleton.mjs +42 -0
- package/fesm2020/pdm-ui-kit-src-skeleton.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-slider.mjs +71 -0
- package/fesm2020/pdm-ui-kit-src-slider.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-sonner.mjs +63 -0
- package/fesm2020/pdm-ui-kit-src-sonner.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-spinner.mjs +45 -0
- package/fesm2020/pdm-ui-kit-src-spinner.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-switch.mjs +83 -0
- package/fesm2020/pdm-ui-kit-src-switch.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-tabs.mjs +59 -0
- package/fesm2020/pdm-ui-kit-src-tabs.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-toggle.mjs +97 -0
- package/fesm2020/pdm-ui-kit-src-toggle.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-tooltip.mjs +202 -0
- package/fesm2020/pdm-ui-kit-src-tooltip.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-utils.mjs +239 -0
- package/fesm2020/pdm-ui-kit-src-utils.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit.mjs +3865 -3015
- package/fesm2020/pdm-ui-kit.mjs.map +1 -1
- package/field/field.module.d.ts +8 -0
- package/hover-card/hover-card.module.d.ts +9 -0
- package/icon/icon.module.d.ts +8 -0
- package/{lib/components/input-password → input}/input-password.component.d.ts +1 -1
- package/input/input.module.d.ts +13 -0
- package/item/item.module.d.ts +8 -0
- package/kbd/kbd.module.d.ts +8 -0
- package/label/label.module.d.ts +8 -0
- package/{lib/components/menubar → menubar}/menubar.component.d.ts +1 -1
- package/menubar/menubar.module.d.ts +9 -0
- package/native-select/native-select.module.d.ts +9 -0
- package/navigation-menu/navigation-menu.module.d.ts +8 -0
- package/overlay/pdm-outside-click.module.d.ts +8 -0
- package/package.json +786 -2
- package/{lib/components/pagination → pagination}/pagination.component.d.ts +1 -1
- package/pagination/pagination.module.d.ts +10 -0
- package/pdm-ui-kit.module.d.ts +60 -0
- package/popover/popover.module.d.ts +9 -0
- package/progress/progress.module.d.ts +8 -0
- package/public-api.d.ts +114 -66
- package/radio-group/radio-group.module.d.ts +8 -0
- package/scroll-area/scroll-area.module.d.ts +8 -0
- package/{lib/components/select → select}/select.component.d.ts +1 -1
- package/select/select.module.d.ts +11 -0
- package/separator/separator.module.d.ts +8 -0
- package/sidebar/sidebar.module.d.ts +8 -0
- package/skeleton/skeleton.module.d.ts +8 -0
- package/slider/slider.module.d.ts +8 -0
- package/sonner/sonner.module.d.ts +9 -0
- package/spinner/spinner.module.d.ts +8 -0
- package/src/accordion/accordion.component.d.ts +19 -0
- package/src/accordion/accordion.module.d.ts +8 -0
- package/src/accordion/index.d.ts +5 -0
- package/src/accordion/public-api.d.ts +2 -0
- package/src/alert/alert-dialog.component.d.ts +29 -0
- package/src/alert/alert.component.d.ts +13 -0
- package/src/alert/alert.module.d.ts +9 -0
- package/src/alert/index.d.ts +5 -0
- package/src/alert/public-api.d.ts +3 -0
- package/src/aspect-ratio/aspect-ratio.component.d.ts +10 -0
- package/src/aspect-ratio/aspect-ratio.module.d.ts +8 -0
- package/src/aspect-ratio/index.d.ts +5 -0
- package/src/aspect-ratio/public-api.d.ts +2 -0
- package/src/avatar/avatar.component.d.ts +20 -0
- package/src/avatar/avatar.module.d.ts +8 -0
- package/src/avatar/index.d.ts +5 -0
- package/src/avatar/public-api.d.ts +2 -0
- package/src/badge/badge.component.d.ts +9 -0
- package/src/badge/badge.module.d.ts +8 -0
- package/src/badge/index.d.ts +5 -0
- package/src/badge/public-api.d.ts +2 -0
- package/src/breadcrumb/breadcrumb.component.d.ts +32 -0
- package/src/breadcrumb/breadcrumb.module.d.ts +8 -0
- package/src/breadcrumb/index.d.ts +5 -0
- package/src/breadcrumb/public-api.d.ts +2 -0
- package/src/button/button-group.component.d.ts +19 -0
- package/src/button/button.component.d.ts +29 -0
- package/src/button/button.module.d.ts +9 -0
- package/src/button/index.d.ts +5 -0
- package/src/button/public-api.d.ts +3 -0
- package/src/calendar/calendar.component.d.ts +149 -0
- package/src/calendar/calendar.module.d.ts +11 -0
- package/src/calendar/date-picker.component.d.ts +89 -0
- package/src/calendar/index.d.ts +5 -0
- package/src/calendar/public-api.d.ts +3 -0
- package/src/card/card.component.d.ts +37 -0
- package/src/card/card.module.d.ts +8 -0
- package/src/card/index.d.ts +5 -0
- package/src/card/public-api.d.ts +2 -0
- package/src/carousel/carousel.component.d.ts +28 -0
- package/src/carousel/carousel.module.d.ts +8 -0
- package/src/carousel/index.d.ts +5 -0
- package/src/carousel/public-api.d.ts +2 -0
- package/src/chart/chart.component.d.ts +44 -0
- package/src/chart/chart.module.d.ts +8 -0
- package/src/chart/index.d.ts +5 -0
- package/src/chart/public-api.d.ts +2 -0
- package/src/checkbox/checkbox.component.d.ts +17 -0
- package/src/checkbox/checkbox.module.d.ts +8 -0
- package/src/checkbox/index.d.ts +5 -0
- package/src/checkbox/public-api.d.ts +2 -0
- package/src/collapsible/collapsible.component.d.ts +14 -0
- package/src/collapsible/collapsible.module.d.ts +8 -0
- package/src/collapsible/index.d.ts +5 -0
- package/src/collapsible/public-api.d.ts +2 -0
- package/src/combobox/combobox.component.d.ts +35 -0
- package/src/combobox/combobox.module.d.ts +9 -0
- package/src/combobox/index.d.ts +5 -0
- package/src/combobox/public-api.d.ts +2 -0
- package/src/command/command.component.d.ts +33 -0
- package/src/command/command.module.d.ts +9 -0
- package/src/command/index.d.ts +5 -0
- package/src/command/public-api.d.ts +2 -0
- package/src/context-menu/context-menu.component.d.ts +38 -0
- package/src/context-menu/context-menu.module.d.ts +9 -0
- package/src/context-menu/index.d.ts +5 -0
- package/src/context-menu/public-api.d.ts +2 -0
- package/src/data-table/data-table.component.d.ts +200 -0
- package/src/data-table/data-table.module.d.ts +10 -0
- package/src/data-table/draggable-table.component.d.ts +74 -0
- package/src/data-table/index.d.ts +5 -0
- package/src/data-table/public-api.d.ts +4 -0
- package/src/data-table/table.component.d.ts +55 -0
- package/src/dialog/dialog.component.d.ts +72 -0
- package/src/dialog/dialog.module.d.ts +8 -0
- package/src/dialog/index.d.ts +5 -0
- package/src/dialog/public-api.d.ts +2 -0
- package/src/drawer/drawer.component.d.ts +96 -0
- package/src/drawer/drawer.module.d.ts +10 -0
- package/src/drawer/index.d.ts +5 -0
- package/src/drawer/public-api.d.ts +3 -0
- package/src/drawer/sheet.component.d.ts +46 -0
- package/src/dropdown-menu/dropdown-menu.component.d.ts +61 -0
- package/src/dropdown-menu/dropdown-menu.module.d.ts +9 -0
- package/src/dropdown-menu/index.d.ts +5 -0
- package/src/dropdown-menu/public-api.d.ts +2 -0
- package/src/empty/empty.component.d.ts +19 -0
- package/src/empty/empty.module.d.ts +10 -0
- package/src/empty/index.d.ts +5 -0
- package/src/empty/public-api.d.ts +2 -0
- package/src/field/field.component.d.ts +23 -0
- package/src/field/field.module.d.ts +8 -0
- package/src/field/index.d.ts +5 -0
- package/src/field/public-api.d.ts +2 -0
- package/src/hover-card/hover-card.component.d.ts +37 -0
- package/src/hover-card/hover-card.module.d.ts +9 -0
- package/src/hover-card/index.d.ts +5 -0
- package/src/hover-card/public-api.d.ts +2 -0
- package/src/icon/icon.component.d.ts +28 -0
- package/src/icon/icon.module.d.ts +8 -0
- package/src/icon/index.d.ts +5 -0
- package/src/icon/public-api.d.ts +2 -0
- package/src/input/index.d.ts +5 -0
- package/src/input/input-group.component.d.ts +22 -0
- package/src/input/input-otp.component.d.ts +26 -0
- package/src/input/input-password.component.d.ts +28 -0
- package/src/input/input.component.d.ts +27 -0
- package/src/input/input.module.d.ts +13 -0
- package/src/input/public-api.d.ts +6 -0
- package/src/input/textarea.component.d.ts +21 -0
- package/src/item/index.d.ts +5 -0
- package/src/item/item.component.d.ts +8 -0
- package/src/item/item.module.d.ts +8 -0
- package/src/item/public-api.d.ts +2 -0
- package/src/kbd/index.d.ts +5 -0
- package/src/kbd/kbd.component.d.ts +6 -0
- package/src/kbd/kbd.module.d.ts +8 -0
- package/src/kbd/public-api.d.ts +2 -0
- package/src/label/index.d.ts +5 -0
- package/src/label/label.component.d.ts +8 -0
- package/src/label/label.module.d.ts +8 -0
- package/src/label/public-api.d.ts +2 -0
- package/src/menubar/index.d.ts +5 -0
- package/src/menubar/menubar.component.d.ts +34 -0
- package/src/menubar/menubar.module.d.ts +9 -0
- package/src/menubar/public-api.d.ts +2 -0
- package/src/native-select/index.d.ts +5 -0
- package/src/native-select/native-select.component.d.ts +20 -0
- package/src/native-select/native-select.module.d.ts +9 -0
- package/src/native-select/public-api.d.ts +2 -0
- package/src/navigation-menu/index.d.ts +5 -0
- package/src/navigation-menu/navigation-menu.component.d.ts +33 -0
- package/src/navigation-menu/navigation-menu.module.d.ts +8 -0
- package/src/navigation-menu/public-api.d.ts +2 -0
- package/src/overlay/create-flexible-position-strategy.d.ts +15 -0
- package/src/overlay/index.d.ts +5 -0
- package/src/overlay/pdm-outside-click.directive.d.ts +40 -0
- package/src/overlay/pdm-outside-click.module.d.ts +8 -0
- package/src/overlay/pdm-overlay-options.d.ts +21 -0
- package/src/overlay/public-api.d.ts +5 -0
- package/src/overlay/z-index-helper.d.ts +36 -0
- package/src/pagination/index.d.ts +5 -0
- package/src/pagination/pagination.component.d.ts +21 -0
- package/src/pagination/pagination.module.d.ts +10 -0
- package/src/pagination/public-api.d.ts +2 -0
- package/src/popover/index.d.ts +5 -0
- package/src/popover/popover.component.d.ts +32 -0
- package/src/popover/popover.module.d.ts +9 -0
- package/src/popover/public-api.d.ts +2 -0
- package/src/progress/index.d.ts +5 -0
- package/src/progress/progress.component.d.ts +10 -0
- package/src/progress/progress.module.d.ts +8 -0
- package/src/progress/public-api.d.ts +2 -0
- package/src/radio-group/index.d.ts +5 -0
- package/src/radio-group/public-api.d.ts +2 -0
- package/src/radio-group/radio-group.component.d.ts +19 -0
- package/src/radio-group/radio-group.module.d.ts +8 -0
- package/src/scroll-area/index.d.ts +5 -0
- package/src/scroll-area/public-api.d.ts +2 -0
- package/src/scroll-area/scroll-area.component.d.ts +7 -0
- package/src/scroll-area/scroll-area.module.d.ts +8 -0
- package/src/select/index.d.ts +5 -0
- package/src/select/public-api.d.ts +3 -0
- package/src/select/select-option.directive.d.ts +34 -0
- package/src/select/select.component.d.ts +55 -0
- package/src/select/select.module.d.ts +11 -0
- package/src/separator/index.d.ts +5 -0
- package/src/separator/public-api.d.ts +2 -0
- package/src/separator/separator.component.d.ts +9 -0
- package/src/separator/separator.module.d.ts +8 -0
- package/src/sidebar/index.d.ts +5 -0
- package/src/sidebar/public-api.d.ts +2 -0
- package/src/sidebar/sidebar.component.d.ts +45 -0
- package/src/sidebar/sidebar.module.d.ts +8 -0
- package/src/skeleton/index.d.ts +5 -0
- package/src/skeleton/public-api.d.ts +2 -0
- package/src/skeleton/skeleton.component.d.ts +6 -0
- package/src/skeleton/skeleton.module.d.ts +8 -0
- package/src/slider/index.d.ts +5 -0
- package/src/slider/public-api.d.ts +2 -0
- package/src/slider/slider.component.d.ts +15 -0
- package/src/slider/slider.module.d.ts +8 -0
- package/src/sonner/index.d.ts +5 -0
- package/src/sonner/public-api.d.ts +2 -0
- package/src/sonner/sonner.component.d.ts +13 -0
- package/src/sonner/sonner.module.d.ts +9 -0
- package/src/spinner/index.d.ts +5 -0
- package/src/spinner/public-api.d.ts +2 -0
- package/src/spinner/spinner.component.d.ts +7 -0
- package/src/spinner/spinner.module.d.ts +8 -0
- package/src/switch/index.d.ts +5 -0
- package/src/switch/public-api.d.ts +2 -0
- package/src/switch/switch.module.d.ts +8 -0
- package/src/tabs/index.d.ts +5 -0
- package/src/tabs/public-api.d.ts +2 -0
- package/src/tabs/tabs.module.d.ts +8 -0
- package/src/toggle/index.d.ts +5 -0
- package/src/toggle/public-api.d.ts +3 -0
- package/src/toggle/toggle.module.d.ts +9 -0
- package/src/tooltip/index.d.ts +5 -0
- package/src/tooltip/public-api.d.ts +2 -0
- package/src/tooltip/tooltip.module.d.ts +9 -0
- package/src/utils/index.d.ts +5 -0
- package/src/utils/public-api.d.ts +2 -0
- package/switch/switch.component.d.ts +18 -0
- package/switch/switch.module.d.ts +8 -0
- package/tabs/tabs.component.d.ts +18 -0
- package/tabs/tabs.module.d.ts +8 -0
- package/toggle/toggle-group.component.d.ts +16 -0
- package/toggle/toggle.component.d.ts +14 -0
- package/toggle/toggle.module.d.ts +9 -0
- package/tooltip/tooltip.component.d.ts +28 -0
- package/tooltip/tooltip.module.d.ts +9 -0
- package/utils/responsive.d.ts +107 -0
- package/utils/z-index.d.ts +69 -0
- package/esm2020/lib/components/button/button.component.mjs +0 -114
- package/esm2020/lib/components/calendar/calendar.component.mjs +0 -529
- package/esm2020/lib/components/carousel/carousel.component.mjs +0 -102
- package/esm2020/lib/components/command/command.component.mjs +0 -75
- package/esm2020/lib/components/context-menu/context-menu.component.mjs +0 -165
- package/esm2020/lib/components/data-table/data-table.component.mjs +0 -299
- package/esm2020/lib/components/dialog/dialog.component.mjs +0 -265
- package/esm2020/lib/components/draggable-table/draggable-table.component.mjs +0 -300
- package/esm2020/lib/components/drawer/drawer.component.mjs +0 -217
- package/esm2020/lib/components/dropdown-menu/dropdown-menu.component.mjs +0 -192
- package/esm2020/lib/components/icon/icon.component.mjs +0 -144
- package/esm2020/lib/components/input-otp/input-otp.component.mjs +0 -144
- package/esm2020/lib/components/menubar/menubar.component.mjs +0 -144
- package/esm2020/lib/components/select/select-option.directive.mjs +0 -55
- package/esm2020/lib/components/select/select.component.mjs +0 -164
- package/esm2020/lib/components/sheet/sheet.component.mjs +0 -116
- package/esm2020/lib/components/switch/switch.component.mjs +0 -58
- package/esm2020/lib/components/table/table.component.mjs +0 -182
- package/esm2020/lib/overlay/create-flexible-position-strategy.mjs +0 -54
- package/esm2020/lib/overlay/pdm-outside-click.directive.mjs +0 -86
- package/esm2020/lib/overlay/pdm-overlay-options.mjs +0 -2
- package/esm2020/lib/overlay/z-index-helper.mjs +0 -69
- package/esm2020/lib/pdm-ui-kit.module.mjs +0 -258
- package/esm2020/lib/utils/responsive.mjs +0 -143
- package/esm2020/lib/utils/z-index.mjs +0 -90
- package/lib/pdm-ui-kit.module.d.ts +0 -68
- /package/{lib/components/accordion → accordion}/accordion.component.d.ts +0 -0
- /package/{lib/components/alert-dialog → alert}/alert-dialog.component.d.ts +0 -0
- /package/{lib/components/alert → alert}/alert.component.d.ts +0 -0
- /package/{lib/components/aspect-ratio → aspect-ratio}/aspect-ratio.component.d.ts +0 -0
- /package/{lib/components/avatar → avatar}/avatar.component.d.ts +0 -0
- /package/{lib/components/badge → badge}/badge.component.d.ts +0 -0
- /package/{lib/components/breadcrumb → breadcrumb}/breadcrumb.component.d.ts +0 -0
- /package/{lib/components/button-group → button}/button-group.component.d.ts +0 -0
- /package/{lib/components/button → button}/button.component.d.ts +0 -0
- /package/{lib/components/calendar → calendar}/calendar.component.d.ts +0 -0
- /package/{lib/components/card → card}/card.component.d.ts +0 -0
- /package/{lib/components/carousel → carousel}/carousel.component.d.ts +0 -0
- /package/{lib/components/chart → chart}/chart.component.d.ts +0 -0
- /package/{lib/components/checkbox → checkbox}/checkbox.component.d.ts +0 -0
- /package/{lib/components/collapsible → collapsible}/collapsible.component.d.ts +0 -0
- /package/{lib/components/combobox → combobox}/combobox.component.d.ts +0 -0
- /package/{lib/components/dialog → dialog}/dialog.component.d.ts +0 -0
- /package/{lib/components/drawer → drawer}/drawer.component.d.ts +0 -0
- /package/{lib/components/sheet → drawer}/sheet.component.d.ts +0 -0
- /package/{lib/components/empty → empty}/empty.component.d.ts +0 -0
- /package/{lib/components/field → field}/field.component.d.ts +0 -0
- /package/{lib/components/hover-card → hover-card}/hover-card.component.d.ts +0 -0
- /package/{lib/components/icon → icon}/icon.component.d.ts +0 -0
- /package/{lib/components/input-group → input}/input-group.component.d.ts +0 -0
- /package/{lib/components/input-otp → input}/input-otp.component.d.ts +0 -0
- /package/{lib/components/input → input}/input.component.d.ts +0 -0
- /package/{lib/components/textarea → input}/textarea.component.d.ts +0 -0
- /package/{lib/components/item → item}/item.component.d.ts +0 -0
- /package/{lib/components/kbd → kbd}/kbd.component.d.ts +0 -0
- /package/{lib/components/label → label}/label.component.d.ts +0 -0
- /package/{lib/components/native-select → native-select}/native-select.component.d.ts +0 -0
- /package/{lib/components/navigation-menu → navigation-menu}/navigation-menu.component.d.ts +0 -0
- /package/{lib/overlay → overlay}/create-flexible-position-strategy.d.ts +0 -0
- /package/{lib/overlay → overlay}/pdm-outside-click.directive.d.ts +0 -0
- /package/{lib/overlay → overlay}/pdm-overlay-options.d.ts +0 -0
- /package/{lib/overlay → overlay}/z-index-helper.d.ts +0 -0
- /package/{lib/components/popover → popover}/popover.component.d.ts +0 -0
- /package/{lib/components/progress → progress}/progress.component.d.ts +0 -0
- /package/{lib/components/radio-group → radio-group}/radio-group.component.d.ts +0 -0
- /package/{lib/components/scroll-area → scroll-area}/scroll-area.component.d.ts +0 -0
- /package/{lib/components/select → select}/select-option.directive.d.ts +0 -0
- /package/{lib/components/separator → separator}/separator.component.d.ts +0 -0
- /package/{lib/components/sidebar → sidebar}/sidebar.component.d.ts +0 -0
- /package/{lib/components/skeleton → skeleton}/skeleton.component.d.ts +0 -0
- /package/{lib/components/slider → slider}/slider.component.d.ts +0 -0
- /package/{lib/components/sonner → sonner}/sonner.component.d.ts +0 -0
- /package/{lib/components/spinner → spinner}/spinner.component.d.ts +0 -0
- /package/src/{lib/styles → styles}/tokens.css +0 -0
- /package/{lib/components → src}/switch/switch.component.d.ts +0 -0
- /package/{lib/components → src}/tabs/tabs.component.d.ts +0 -0
- /package/{lib/components/toggle-group → src/toggle}/toggle-group.component.d.ts +0 -0
- /package/{lib/components → src}/toggle/toggle.component.d.ts +0 -0
- /package/{lib/components → src}/tooltip/tooltip.component.d.ts +0 -0
- /package/{lib → src}/utils/responsive.d.ts +0 -0
- /package/{lib → src}/utils/z-index.d.ts +0 -0
|
@@ -0,0 +1,806 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { TABLE_RESPONSIVE } from 'pdm-ui-kit/src/utils';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Componente base de tabla con soporte responsive
|
|
9
|
+
*
|
|
10
|
+
* SIMPLIFICADO: Ya no incluye drag & drop (usar pdm-draggable-table para eso)
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Tabla simple con scroll horizontal
|
|
14
|
+
* <pdm-table variant="default">
|
|
15
|
+
* <thead><tr><th>Name</th><th>Email</th></tr></thead>
|
|
16
|
+
* <tbody><tr><td>John</td><td>john@example.com</td></tr></tbody>
|
|
17
|
+
* </pdm-table>
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* // Tabla interactiva con wrap en mobile
|
|
21
|
+
* <pdm-table variant="interactive" responsiveStrategy="wrap">
|
|
22
|
+
* ...
|
|
23
|
+
* </pdm-table>
|
|
24
|
+
*/
|
|
25
|
+
class PdmTableComponent {
|
|
26
|
+
constructor() {
|
|
27
|
+
/**
|
|
28
|
+
* Variante visual de la tabla
|
|
29
|
+
* - default: tabla básica sin estilos extra
|
|
30
|
+
* - data: tabla con bordes y espaciado para data
|
|
31
|
+
* - interactive: tabla con hover, sticky header y estilos interactivos
|
|
32
|
+
*/
|
|
33
|
+
this.variant = "default";
|
|
34
|
+
/**
|
|
35
|
+
* Estrategia responsive para la tabla
|
|
36
|
+
* - scroll: scroll horizontal en mobile (default, más simple)
|
|
37
|
+
* - wrap: permite que el contenido haga wrap
|
|
38
|
+
* - stack: convierte filas en cards en mobile (requiere data-label en celdas)
|
|
39
|
+
* - collapse: oculta columnas menos importantes en mobile
|
|
40
|
+
*/
|
|
41
|
+
this.responsiveStrategy = "scroll";
|
|
42
|
+
/**
|
|
43
|
+
* Clases CSS adicionales para el wrapper
|
|
44
|
+
*/
|
|
45
|
+
this.className = "";
|
|
46
|
+
/**
|
|
47
|
+
* Si es true, aplica padding negativo en mobile para scroll edge-to-edge
|
|
48
|
+
* Útil cuando la tabla está dentro de un container con padding
|
|
49
|
+
*/
|
|
50
|
+
this.fullBleed = false;
|
|
51
|
+
}
|
|
52
|
+
get wrapperClasses() {
|
|
53
|
+
const baseClasses = ["relative", "w-full"];
|
|
54
|
+
const strategyClasses = this.getResponsiveStrategyClasses();
|
|
55
|
+
const variantClasses = this.getVariantWrapperClasses();
|
|
56
|
+
// Full bleed: scroll edge-to-edge en mobile
|
|
57
|
+
if (this.fullBleed && this.responsiveStrategy === "scroll") {
|
|
58
|
+
baseClasses.push("-mx-4", "px-4", "sm:mx-0", "sm:px-0");
|
|
59
|
+
}
|
|
60
|
+
return [
|
|
61
|
+
...baseClasses,
|
|
62
|
+
...strategyClasses,
|
|
63
|
+
...variantClasses,
|
|
64
|
+
this.className,
|
|
65
|
+
].filter(Boolean);
|
|
66
|
+
}
|
|
67
|
+
get tableClasses() {
|
|
68
|
+
const baseClasses = ["w-full", "caption-bottom", "text-sm"];
|
|
69
|
+
const variantClasses = this.getVariantTableClasses();
|
|
70
|
+
const cellClasses = this.getCellClasses();
|
|
71
|
+
return [...baseClasses, ...variantClasses, ...cellClasses].filter(Boolean);
|
|
72
|
+
}
|
|
73
|
+
getResponsiveStrategyClasses() {
|
|
74
|
+
const strategy = TABLE_RESPONSIVE[this.responsiveStrategy];
|
|
75
|
+
if (this.responsiveStrategy === "scroll") {
|
|
76
|
+
return ["overflow-x-auto"];
|
|
77
|
+
}
|
|
78
|
+
if (this.responsiveStrategy === "wrap") {
|
|
79
|
+
return ["overflow-x-auto"];
|
|
80
|
+
}
|
|
81
|
+
if (this.responsiveStrategy === "stack") {
|
|
82
|
+
// Stack requiere lógica en el template, aquí solo el wrapper
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
if (this.responsiveStrategy === "collapse") {
|
|
86
|
+
return ["overflow-x-auto"];
|
|
87
|
+
}
|
|
88
|
+
return ["overflow-auto"];
|
|
89
|
+
}
|
|
90
|
+
getVariantWrapperClasses() {
|
|
91
|
+
if (this.variant === "interactive") {
|
|
92
|
+
return ["rounded-xl", "border border-solid", "border-border", "bg-background"];
|
|
93
|
+
}
|
|
94
|
+
if (this.variant === "data") {
|
|
95
|
+
return ["rounded-md", "border border-solid", "border-border", "bg-background"];
|
|
96
|
+
}
|
|
97
|
+
return [];
|
|
98
|
+
}
|
|
99
|
+
getVariantTableClasses() {
|
|
100
|
+
if (this.variant === "data") {
|
|
101
|
+
return [
|
|
102
|
+
"border-collapse",
|
|
103
|
+
"text-foreground",
|
|
104
|
+
"[&_thead_tr]:border-b",
|
|
105
|
+
"[&_thead_tr]:border-border",
|
|
106
|
+
"[&_tbody_tr]:border-b",
|
|
107
|
+
"[&_tbody_tr]:border-border",
|
|
108
|
+
"[&_tbody_tr:last-child]:border-b-0",
|
|
109
|
+
"[&_th]:h-10",
|
|
110
|
+
"[&_th]:px-2",
|
|
111
|
+
"[&_th]:text-left",
|
|
112
|
+
"[&_th]:align-middle",
|
|
113
|
+
"[&_th]:font-medium",
|
|
114
|
+
"[&_td]:p-2",
|
|
115
|
+
"[&_td]:align-middle",
|
|
116
|
+
];
|
|
117
|
+
}
|
|
118
|
+
if (this.variant === "interactive") {
|
|
119
|
+
return [
|
|
120
|
+
"text-foreground",
|
|
121
|
+
"[&_thead]:sticky",
|
|
122
|
+
"[&_thead]:top-0",
|
|
123
|
+
"[&_thead]:z-10",
|
|
124
|
+
"[&_thead]:bg-muted/70",
|
|
125
|
+
"[&_thead_tr]:border-b",
|
|
126
|
+
"[&_thead_tr]:border-border",
|
|
127
|
+
"[&_th]:h-12",
|
|
128
|
+
"[&_th]:px-4",
|
|
129
|
+
"[&_th]:text-left",
|
|
130
|
+
"[&_th]:align-middle",
|
|
131
|
+
"[&_th]:text-sm",
|
|
132
|
+
"[&_th]:font-medium",
|
|
133
|
+
"[&_tbody_tr]:border-b",
|
|
134
|
+
"[&_tbody_tr]:border-border",
|
|
135
|
+
"[&_tbody_tr]:transition-colors",
|
|
136
|
+
"[&_tbody_tr:hover]:bg-muted/50",
|
|
137
|
+
"[&_tbody_tr:last-child]:border-b-0",
|
|
138
|
+
"[&_td]:h-14",
|
|
139
|
+
"[&_td]:px-4",
|
|
140
|
+
"[&_td]:align-middle",
|
|
141
|
+
"[&_td]:text-sm",
|
|
142
|
+
"[&_svg]:text-muted-foreground",
|
|
143
|
+
];
|
|
144
|
+
}
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
getCellClasses() {
|
|
148
|
+
// Manejo responsive de whitespace
|
|
149
|
+
if (this.responsiveStrategy === "scroll") {
|
|
150
|
+
// En scroll, permitir wrap en mobile, nowrap en desktop
|
|
151
|
+
return [
|
|
152
|
+
"[&_td]:whitespace-normal",
|
|
153
|
+
"[&_th]:whitespace-normal",
|
|
154
|
+
"sm:[&_td]:whitespace-nowrap",
|
|
155
|
+
"sm:[&_th]:whitespace-nowrap",
|
|
156
|
+
];
|
|
157
|
+
}
|
|
158
|
+
if (this.responsiveStrategy === "wrap") {
|
|
159
|
+
// En wrap, siempre permitir wrap
|
|
160
|
+
return [
|
|
161
|
+
"[&_td]:whitespace-normal",
|
|
162
|
+
"[&_td]:break-words",
|
|
163
|
+
"[&_th]:whitespace-normal",
|
|
164
|
+
];
|
|
165
|
+
}
|
|
166
|
+
// Default: nowrap (comportamiento anterior para backward compatibility)
|
|
167
|
+
return [];
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
PdmTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
171
|
+
PdmTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmTableComponent, selector: "pdm-table", inputs: { variant: "variant", responsiveStrategy: "responsiveStrategy", className: "className", fullBleed: "fullBleed" }, ngImport: i0, template: "<div [ngClass]=\"wrapperClasses\" [attr.data-slot]=\"variant === 'interactive' ? 'table-container' : null\">\n <table #tableElement [ngClass]=\"tableClasses\" [attr.data-slot]=\"variant === 'interactive' ? 'table' : null\">\n <ng-content></ng-content>\n </table>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmTableComponent, decorators: [{
|
|
173
|
+
type: Component,
|
|
174
|
+
args: [{ selector: "pdm-table", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"wrapperClasses\" [attr.data-slot]=\"variant === 'interactive' ? 'table-container' : null\">\n <table #tableElement [ngClass]=\"tableClasses\" [attr.data-slot]=\"variant === 'interactive' ? 'table' : null\">\n <ng-content></ng-content>\n </table>\n</div>\n", styles: [":host{display:block}\n"] }]
|
|
175
|
+
}], propDecorators: { variant: [{
|
|
176
|
+
type: Input
|
|
177
|
+
}], responsiveStrategy: [{
|
|
178
|
+
type: Input
|
|
179
|
+
}], className: [{
|
|
180
|
+
type: Input
|
|
181
|
+
}], fullBleed: [{
|
|
182
|
+
type: Input
|
|
183
|
+
}] } });
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Data-table genérico con paginación, filtrado y selección
|
|
187
|
+
*
|
|
188
|
+
* NUEVO: Ahora es genérico y configurable via columnas
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* // Definir columnas
|
|
192
|
+
* columns: PdmDataTableColumn<User>[] = [
|
|
193
|
+
* { key: 'name', label: 'Name', sortable: true },
|
|
194
|
+
* { key: 'email', label: 'Email', sortable: true },
|
|
195
|
+
* { key: 'role', label: 'Role', hideOnMobile: true },
|
|
196
|
+
* { key: 'createdAt', label: 'Created', render: (val) => formatDate(val) }
|
|
197
|
+
* ];
|
|
198
|
+
*
|
|
199
|
+
* // En el template
|
|
200
|
+
* <pdm-data-table
|
|
201
|
+
* [columns]="columns"
|
|
202
|
+
* [rows]="users"
|
|
203
|
+
* [selectable]="true"
|
|
204
|
+
* (selectionChange)="onSelect($event)">
|
|
205
|
+
* </pdm-data-table>
|
|
206
|
+
*/
|
|
207
|
+
class PdmDataTableComponent {
|
|
208
|
+
constructor() {
|
|
209
|
+
this.className = '';
|
|
210
|
+
/**
|
|
211
|
+
* Columnas a mostrar
|
|
212
|
+
* Si no se provee, intenta inferir del primer row (legacy mode)
|
|
213
|
+
*/
|
|
214
|
+
this.columns = [];
|
|
215
|
+
/**
|
|
216
|
+
* Estrategia responsive de la tabla
|
|
217
|
+
*/
|
|
218
|
+
this.responsiveStrategy = 'scroll';
|
|
219
|
+
/**
|
|
220
|
+
* Si es true, muestra checkbox de selección en cada fila
|
|
221
|
+
*/
|
|
222
|
+
this.selectable = false;
|
|
223
|
+
/**
|
|
224
|
+
* Si es true, muestra botón de acciones (tres puntos) en cada fila
|
|
225
|
+
*/
|
|
226
|
+
this.showActions = false;
|
|
227
|
+
/**
|
|
228
|
+
* Si es true, muestra filtro de búsqueda
|
|
229
|
+
*/
|
|
230
|
+
this.showFilter = true;
|
|
231
|
+
/**
|
|
232
|
+
* Si es true, muestra controles de paginación
|
|
233
|
+
*/
|
|
234
|
+
this.showPagination = true;
|
|
235
|
+
/**
|
|
236
|
+
* Si es true, muestra selector de columnas
|
|
237
|
+
*/
|
|
238
|
+
this.showColumnSelector = false;
|
|
239
|
+
// Labels i18n
|
|
240
|
+
this.filterPlaceholder = 'Filter...';
|
|
241
|
+
this.columnsLabel = 'Columns';
|
|
242
|
+
this.previousLabel = 'Previous';
|
|
243
|
+
this.nextLabel = 'Next';
|
|
244
|
+
this.emptyLabel = 'No results.';
|
|
245
|
+
this.rowsSelectedLabel = 'row(s) selected';
|
|
246
|
+
// DEPRECATED: Labels hardcodeados para backward compatibility
|
|
247
|
+
/**
|
|
248
|
+
* @deprecated Use columns configuration instead
|
|
249
|
+
*/
|
|
250
|
+
this.statusLabel = 'Status';
|
|
251
|
+
/**
|
|
252
|
+
* @deprecated Use columns configuration instead
|
|
253
|
+
*/
|
|
254
|
+
this.emailLabel = 'Email';
|
|
255
|
+
/**
|
|
256
|
+
* @deprecated Use columns configuration instead
|
|
257
|
+
*/
|
|
258
|
+
this.amountLabel = 'Amount';
|
|
259
|
+
/**
|
|
260
|
+
* Datos a mostrar
|
|
261
|
+
*/
|
|
262
|
+
this.rows = [];
|
|
263
|
+
/**
|
|
264
|
+
* Página actual (1-indexed)
|
|
265
|
+
*/
|
|
266
|
+
this.page = 1;
|
|
267
|
+
/**
|
|
268
|
+
* Cantidad de filas por página
|
|
269
|
+
*/
|
|
270
|
+
this.pageSize = 10;
|
|
271
|
+
/**
|
|
272
|
+
* Query de filtrado
|
|
273
|
+
*/
|
|
274
|
+
this.query = '';
|
|
275
|
+
this.queryChange = new EventEmitter();
|
|
276
|
+
this.rowAction = new EventEmitter();
|
|
277
|
+
this.pageChange = new EventEmitter();
|
|
278
|
+
this.selectionChange = new EventEmitter();
|
|
279
|
+
this.columnSort = new EventEmitter();
|
|
280
|
+
// Estado interno
|
|
281
|
+
this.selectedRows = new Set();
|
|
282
|
+
this.sortDirection = 'asc';
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Backward compatibility: si no hay columnas definidas, inferir del primer row
|
|
286
|
+
*/
|
|
287
|
+
get effectiveColumns() {
|
|
288
|
+
if (this.columns.length > 0) {
|
|
289
|
+
return this.columns;
|
|
290
|
+
}
|
|
291
|
+
// Legacy mode: inferir columnas del primer row (solo para PdmDataTableRow)
|
|
292
|
+
if (this.rows.length > 0) {
|
|
293
|
+
const firstRow = this.rows[0];
|
|
294
|
+
return Object.keys(firstRow)
|
|
295
|
+
.filter(key => key !== 'selected')
|
|
296
|
+
.map(key => ({
|
|
297
|
+
key: key,
|
|
298
|
+
label: this.getLegacyLabel(key),
|
|
299
|
+
align: key === 'amount' ? 'right' : 'left'
|
|
300
|
+
}));
|
|
301
|
+
}
|
|
302
|
+
return [];
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* LEGACY: mapeo de keys a labels hardcodeados
|
|
306
|
+
*/
|
|
307
|
+
getLegacyLabel(key) {
|
|
308
|
+
const map = {
|
|
309
|
+
status: this.statusLabel,
|
|
310
|
+
email: this.emailLabel,
|
|
311
|
+
amount: this.amountLabel
|
|
312
|
+
};
|
|
313
|
+
return map[key] || key.charAt(0).toUpperCase() + key.slice(1);
|
|
314
|
+
}
|
|
315
|
+
get filteredRows() {
|
|
316
|
+
const q = this.query.trim().toLowerCase();
|
|
317
|
+
if (!q)
|
|
318
|
+
return this.rows;
|
|
319
|
+
if (this.filterFn) {
|
|
320
|
+
return this.rows.filter(row => this.filterFn(row, q));
|
|
321
|
+
}
|
|
322
|
+
// Filtrado default: buscar en todos los campos string
|
|
323
|
+
return this.rows.filter(row => {
|
|
324
|
+
return Object.values(row).some(val => typeof val === 'string' && val.toLowerCase().includes(q));
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
get pagedRows() {
|
|
328
|
+
const start = (this.page - 1) * this.pageSize;
|
|
329
|
+
return this.filteredRows.slice(start, start + this.pageSize);
|
|
330
|
+
}
|
|
331
|
+
get totalPages() {
|
|
332
|
+
return Math.max(1, Math.ceil(this.filteredRows.length / this.pageSize));
|
|
333
|
+
}
|
|
334
|
+
get selectedCount() {
|
|
335
|
+
return this.selectedRows.size;
|
|
336
|
+
}
|
|
337
|
+
onQueryInput(event) {
|
|
338
|
+
const value = event.target.value;
|
|
339
|
+
this.queryChange.emit(value);
|
|
340
|
+
}
|
|
341
|
+
onToggleRow(row, event) {
|
|
342
|
+
const checked = event.target.checked;
|
|
343
|
+
if (checked) {
|
|
344
|
+
this.selectedRows.add(row);
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
this.selectedRows.delete(row);
|
|
348
|
+
}
|
|
349
|
+
this.selectionChange.emit({ row, selected: checked });
|
|
350
|
+
}
|
|
351
|
+
onToggleAll(event) {
|
|
352
|
+
const checked = event.target.checked;
|
|
353
|
+
if (checked) {
|
|
354
|
+
this.pagedRows.forEach(row => this.selectedRows.add(row));
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
this.pagedRows.forEach(row => this.selectedRows.delete(row));
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
isSelected(row) {
|
|
361
|
+
return this.selectedRows.has(row);
|
|
362
|
+
}
|
|
363
|
+
previous() {
|
|
364
|
+
if (this.page <= 1)
|
|
365
|
+
return;
|
|
366
|
+
this.pageChange.emit(this.page - 1);
|
|
367
|
+
}
|
|
368
|
+
next() {
|
|
369
|
+
if (this.page >= this.totalPages)
|
|
370
|
+
return;
|
|
371
|
+
this.pageChange.emit(this.page + 1);
|
|
372
|
+
}
|
|
373
|
+
onAction(row) {
|
|
374
|
+
this.rowAction.emit(row);
|
|
375
|
+
}
|
|
376
|
+
onSort(column) {
|
|
377
|
+
if (!column.sortable)
|
|
378
|
+
return;
|
|
379
|
+
if (this.sortColumn === column) {
|
|
380
|
+
this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
this.sortColumn = column;
|
|
384
|
+
this.sortDirection = 'asc';
|
|
385
|
+
}
|
|
386
|
+
this.columnSort.emit({ column, direction: this.sortDirection });
|
|
387
|
+
}
|
|
388
|
+
getCellValue(row, column) {
|
|
389
|
+
const value = row[column.key];
|
|
390
|
+
if (column.render) {
|
|
391
|
+
return column.render(value, row);
|
|
392
|
+
}
|
|
393
|
+
return value != null ? String(value) : '';
|
|
394
|
+
}
|
|
395
|
+
getCellClass(column) {
|
|
396
|
+
const classes = ['px-2', 'py-2'];
|
|
397
|
+
if (column.align === 'center')
|
|
398
|
+
classes.push('text-center');
|
|
399
|
+
if (column.align === 'right')
|
|
400
|
+
classes.push('text-right');
|
|
401
|
+
if (column.hideOnMobile)
|
|
402
|
+
classes.push('hidden', 'md:table-cell');
|
|
403
|
+
if (column.cellClass)
|
|
404
|
+
classes.push(column.cellClass);
|
|
405
|
+
return classes.join(' ');
|
|
406
|
+
}
|
|
407
|
+
getHeaderClass(column) {
|
|
408
|
+
const classes = ['px-2', 'py-2', 'text-left', 'font-medium'];
|
|
409
|
+
if (column.hideOnMobile)
|
|
410
|
+
classes.push('hidden', 'md:table-cell');
|
|
411
|
+
if (column.headerClass)
|
|
412
|
+
classes.push(column.headerClass);
|
|
413
|
+
return classes.join(' ');
|
|
414
|
+
}
|
|
415
|
+
getColumnStyle(column) {
|
|
416
|
+
return column.width ? { width: column.width } : {};
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
PdmDataTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
420
|
+
PdmDataTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmDataTableComponent, selector: "pdm-data-table", inputs: { className: "className", columns: "columns", responsiveStrategy: "responsiveStrategy", selectable: "selectable", showActions: "showActions", showFilter: "showFilter", showPagination: "showPagination", showColumnSelector: "showColumnSelector", filterPlaceholder: "filterPlaceholder", columnsLabel: "columnsLabel", previousLabel: "previousLabel", nextLabel: "nextLabel", emptyLabel: "emptyLabel", rowsSelectedLabel: "rowsSelectedLabel", statusLabel: "statusLabel", emailLabel: "emailLabel", amountLabel: "amountLabel", rows: "rows", page: "page", pageSize: "pageSize", query: "query", filterFn: "filterFn" }, outputs: { queryChange: "queryChange", rowAction: "rowAction", pageChange: "pageChange", selectionChange: "selectionChange", columnSort: "columnSort" }, ngImport: i0, template: "<section [ngClass]=\"['flex w-full flex-col', className]\">\n <!-- Toolbar: Filtro + Selector de columnas -->\n <div\n *ngIf=\"showFilter || showColumnSelector\"\n class=\"flex w-full flex-col gap-2 py-4 sm:flex-row sm:items-center\"\n >\n <input\n *ngIf=\"showFilter\"\n type=\"text\"\n [placeholder]=\"filterPlaceholder\"\n [value]=\"query\"\n (input)=\"onQueryInput($event)\"\n class=\"h-9 flex-1 appearance-none box-border rounded-md border border-solid border-input bg-transparent px-3 py-1 text-sm text-foreground shadow-sm placeholder:text-muted-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n />\n\n <button\n *ngIf=\"showColumnSelector\"\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center gap-2 rounded-md border border-solid border-input bg-background px-3 py-2 text-sm font-medium text-foreground shadow-sm whitespace-nowrap\"\n >\n <span>{{ columnsLabel }}</span>\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7 10L12 15L17 10\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n </div>\n\n <!-- Tabla con responsive -->\n <pdm-table\n variant=\"data\"\n [responsiveStrategy]=\"responsiveStrategy\"\n [fullBleed]=\"false\"\n >\n <thead>\n <tr>\n <!-- Columna de selecci\u00F3n -->\n <th *ngIf=\"selectable\" class=\"w-10 px-2 py-2 text-left font-medium\">\n <input\n type=\"checkbox\"\n (change)=\"onToggleAll($event)\"\n class=\"h-4 w-4 box-border rounded-sm border border-solid border-input accent-primary\"\n />\n </th>\n\n <!-- Columnas din\u00E1micas -->\n <th\n *ngFor=\"let column of effectiveColumns\"\n [ngClass]=\"getHeaderClass(column)\"\n [ngStyle]=\"getColumnStyle(column)\"\n >\n <!-- Header sortable -->\n <button\n *ngIf=\"column.sortable\"\n type=\"button\"\n (click)=\"onSort(column)\"\n class=\"inline-flex appearance-none box-border items-center gap-1 rounded-sm border-0 bg-transparent px-3 py-2 text-sm hover:underline\"\n >\n <span>{{ column.label }}</span>\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 6L4 10L8 14M16 18L20 14L16 10\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n\n <!-- Header no sortable -->\n <span *ngIf=\"!column.sortable\">{{ column.label }}</span>\n </th>\n\n <!-- Columna de acciones -->\n <th *ngIf=\"showActions\" class=\"w-10 px-2 py-2\"></th>\n </tr>\n </thead>\n\n <tbody>\n <!-- Filas con datos -->\n <tr *ngFor=\"let row of pagedRows\">\n <!-- Celda de selecci\u00F3n -->\n <td *ngIf=\"selectable\" class=\"px-2 py-2\">\n <input\n type=\"checkbox\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n class=\"h-4 w-4 box-border rounded-sm border border-solid border-input accent-primary\"\n />\n </td>\n\n <!-- Celdas din\u00E1micas -->\n <td\n *ngFor=\"let column of effectiveColumns\"\n [ngClass]=\"getCellClass(column)\"\n >\n <!-- Template personalizado si existe -->\n <ng-container *ngIf=\"column.cellTemplate; else defaultCell\">\n <ng-container\n *ngTemplateOutlet=\"\n column.cellTemplate;\n context: { $implicit: row, value: row[column.key] }\n \"\n >\n </ng-container>\n </ng-container>\n\n <!-- Renderizado default -->\n <ng-template #defaultCell>\n {{ getCellValue(row, column) }}\n </ng-template>\n </td>\n\n <!-- Celda de acciones -->\n <td *ngIf=\"showActions\" class=\"px-2 py-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-8 w-8 appearance-none box-border items-center justify-center border-0 bg-transparent p-0 hover:text-foreground\"\n (click)=\"onAction(row)\"\n >\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"6\" cy=\"12\" r=\"1.5\" fill=\"currentColor\"></circle>\n <circle cx=\"12\" cy=\"12\" r=\"1.5\" fill=\"currentColor\"></circle>\n <circle cx=\"18\" cy=\"12\" r=\"1.5\" fill=\"currentColor\"></circle>\n </svg>\n </button>\n </td>\n </tr>\n\n <!-- Fila vac\u00EDa -->\n <tr *ngIf=\"pagedRows.length === 0\">\n <td\n [attr.colspan]=\"\n effectiveColumns.length +\n (selectable ? 1 : 0) +\n (showActions ? 1 : 0)\n \"\n class=\"px-3 py-6 text-center text-sm text-muted-foreground\"\n >\n {{ emptyLabel }}\n </td>\n </tr>\n </tbody>\n </pdm-table>\n\n <!-- Footer: Info + Paginaci\u00F3n -->\n <div\n *ngIf=\"showPagination || selectable\"\n class=\"flex w-full flex-wrap items-center gap-2 py-4 sm:flex-nowrap\"\n >\n <p\n *ngIf=\"selectable\"\n class=\"m-0 flex-1 pr-2 text-sm text-muted-foreground whitespace-nowrap\"\n >\n {{ selectedCount }} of {{ rows.length }} {{ rowsSelectedLabel }}\n </p>\n\n <div *ngIf=\"showPagination\" class=\"flex items-center gap-2 ml-auto\">\n <span class=\"text-sm text-muted-foreground whitespace-nowrap\">\n Page {{ page }} of {{ totalPages }}\n </span>\n <button\n type=\"button\"\n class=\"h-9 appearance-none box-border rounded-md border border-solid border-input bg-background px-4 text-sm font-medium text-foreground shadow-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\"\n [disabled]=\"page <= 1\"\n (click)=\"previous()\"\n >\n {{ previousLabel }}\n </button>\n <button\n type=\"button\"\n class=\"h-9 appearance-none box-border rounded-md border border-solid border-input bg-background px-4 text-sm font-medium text-foreground shadow-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\"\n [disabled]=\"page >= totalPages\"\n (click)=\"next()\"\n >\n {{ nextLabel }}\n </button>\n </div>\n </div>\n</section>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PdmTableComponent, selector: "pdm-table", inputs: ["variant", "responsiveStrategy", "className", "fullBleed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDataTableComponent, decorators: [{
|
|
422
|
+
type: Component,
|
|
423
|
+
args: [{ selector: 'pdm-data-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<section [ngClass]=\"['flex w-full flex-col', className]\">\n <!-- Toolbar: Filtro + Selector de columnas -->\n <div\n *ngIf=\"showFilter || showColumnSelector\"\n class=\"flex w-full flex-col gap-2 py-4 sm:flex-row sm:items-center\"\n >\n <input\n *ngIf=\"showFilter\"\n type=\"text\"\n [placeholder]=\"filterPlaceholder\"\n [value]=\"query\"\n (input)=\"onQueryInput($event)\"\n class=\"h-9 flex-1 appearance-none box-border rounded-md border border-solid border-input bg-transparent px-3 py-1 text-sm text-foreground shadow-sm placeholder:text-muted-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n />\n\n <button\n *ngIf=\"showColumnSelector\"\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center gap-2 rounded-md border border-solid border-input bg-background px-3 py-2 text-sm font-medium text-foreground shadow-sm whitespace-nowrap\"\n >\n <span>{{ columnsLabel }}</span>\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7 10L12 15L17 10\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n </div>\n\n <!-- Tabla con responsive -->\n <pdm-table\n variant=\"data\"\n [responsiveStrategy]=\"responsiveStrategy\"\n [fullBleed]=\"false\"\n >\n <thead>\n <tr>\n <!-- Columna de selecci\u00F3n -->\n <th *ngIf=\"selectable\" class=\"w-10 px-2 py-2 text-left font-medium\">\n <input\n type=\"checkbox\"\n (change)=\"onToggleAll($event)\"\n class=\"h-4 w-4 box-border rounded-sm border border-solid border-input accent-primary\"\n />\n </th>\n\n <!-- Columnas din\u00E1micas -->\n <th\n *ngFor=\"let column of effectiveColumns\"\n [ngClass]=\"getHeaderClass(column)\"\n [ngStyle]=\"getColumnStyle(column)\"\n >\n <!-- Header sortable -->\n <button\n *ngIf=\"column.sortable\"\n type=\"button\"\n (click)=\"onSort(column)\"\n class=\"inline-flex appearance-none box-border items-center gap-1 rounded-sm border-0 bg-transparent px-3 py-2 text-sm hover:underline\"\n >\n <span>{{ column.label }}</span>\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 6L4 10L8 14M16 18L20 14L16 10\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n\n <!-- Header no sortable -->\n <span *ngIf=\"!column.sortable\">{{ column.label }}</span>\n </th>\n\n <!-- Columna de acciones -->\n <th *ngIf=\"showActions\" class=\"w-10 px-2 py-2\"></th>\n </tr>\n </thead>\n\n <tbody>\n <!-- Filas con datos -->\n <tr *ngFor=\"let row of pagedRows\">\n <!-- Celda de selecci\u00F3n -->\n <td *ngIf=\"selectable\" class=\"px-2 py-2\">\n <input\n type=\"checkbox\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n class=\"h-4 w-4 box-border rounded-sm border border-solid border-input accent-primary\"\n />\n </td>\n\n <!-- Celdas din\u00E1micas -->\n <td\n *ngFor=\"let column of effectiveColumns\"\n [ngClass]=\"getCellClass(column)\"\n >\n <!-- Template personalizado si existe -->\n <ng-container *ngIf=\"column.cellTemplate; else defaultCell\">\n <ng-container\n *ngTemplateOutlet=\"\n column.cellTemplate;\n context: { $implicit: row, value: row[column.key] }\n \"\n >\n </ng-container>\n </ng-container>\n\n <!-- Renderizado default -->\n <ng-template #defaultCell>\n {{ getCellValue(row, column) }}\n </ng-template>\n </td>\n\n <!-- Celda de acciones -->\n <td *ngIf=\"showActions\" class=\"px-2 py-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-8 w-8 appearance-none box-border items-center justify-center border-0 bg-transparent p-0 hover:text-foreground\"\n (click)=\"onAction(row)\"\n >\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"6\" cy=\"12\" r=\"1.5\" fill=\"currentColor\"></circle>\n <circle cx=\"12\" cy=\"12\" r=\"1.5\" fill=\"currentColor\"></circle>\n <circle cx=\"18\" cy=\"12\" r=\"1.5\" fill=\"currentColor\"></circle>\n </svg>\n </button>\n </td>\n </tr>\n\n <!-- Fila vac\u00EDa -->\n <tr *ngIf=\"pagedRows.length === 0\">\n <td\n [attr.colspan]=\"\n effectiveColumns.length +\n (selectable ? 1 : 0) +\n (showActions ? 1 : 0)\n \"\n class=\"px-3 py-6 text-center text-sm text-muted-foreground\"\n >\n {{ emptyLabel }}\n </td>\n </tr>\n </tbody>\n </pdm-table>\n\n <!-- Footer: Info + Paginaci\u00F3n -->\n <div\n *ngIf=\"showPagination || selectable\"\n class=\"flex w-full flex-wrap items-center gap-2 py-4 sm:flex-nowrap\"\n >\n <p\n *ngIf=\"selectable\"\n class=\"m-0 flex-1 pr-2 text-sm text-muted-foreground whitespace-nowrap\"\n >\n {{ selectedCount }} of {{ rows.length }} {{ rowsSelectedLabel }}\n </p>\n\n <div *ngIf=\"showPagination\" class=\"flex items-center gap-2 ml-auto\">\n <span class=\"text-sm text-muted-foreground whitespace-nowrap\">\n Page {{ page }} of {{ totalPages }}\n </span>\n <button\n type=\"button\"\n class=\"h-9 appearance-none box-border rounded-md border border-solid border-input bg-background px-4 text-sm font-medium text-foreground shadow-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\"\n [disabled]=\"page <= 1\"\n (click)=\"previous()\"\n >\n {{ previousLabel }}\n </button>\n <button\n type=\"button\"\n class=\"h-9 appearance-none box-border rounded-md border border-solid border-input bg-background px-4 text-sm font-medium text-foreground shadow-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\"\n [disabled]=\"page >= totalPages\"\n (click)=\"next()\"\n >\n {{ nextLabel }}\n </button>\n </div>\n </div>\n</section>\n" }]
|
|
424
|
+
}], propDecorators: { className: [{
|
|
425
|
+
type: Input
|
|
426
|
+
}], columns: [{
|
|
427
|
+
type: Input
|
|
428
|
+
}], responsiveStrategy: [{
|
|
429
|
+
type: Input
|
|
430
|
+
}], selectable: [{
|
|
431
|
+
type: Input
|
|
432
|
+
}], showActions: [{
|
|
433
|
+
type: Input
|
|
434
|
+
}], showFilter: [{
|
|
435
|
+
type: Input
|
|
436
|
+
}], showPagination: [{
|
|
437
|
+
type: Input
|
|
438
|
+
}], showColumnSelector: [{
|
|
439
|
+
type: Input
|
|
440
|
+
}], filterPlaceholder: [{
|
|
441
|
+
type: Input
|
|
442
|
+
}], columnsLabel: [{
|
|
443
|
+
type: Input
|
|
444
|
+
}], previousLabel: [{
|
|
445
|
+
type: Input
|
|
446
|
+
}], nextLabel: [{
|
|
447
|
+
type: Input
|
|
448
|
+
}], emptyLabel: [{
|
|
449
|
+
type: Input
|
|
450
|
+
}], rowsSelectedLabel: [{
|
|
451
|
+
type: Input
|
|
452
|
+
}], statusLabel: [{
|
|
453
|
+
type: Input
|
|
454
|
+
}], emailLabel: [{
|
|
455
|
+
type: Input
|
|
456
|
+
}], amountLabel: [{
|
|
457
|
+
type: Input
|
|
458
|
+
}], rows: [{
|
|
459
|
+
type: Input
|
|
460
|
+
}], page: [{
|
|
461
|
+
type: Input
|
|
462
|
+
}], pageSize: [{
|
|
463
|
+
type: Input
|
|
464
|
+
}], query: [{
|
|
465
|
+
type: Input
|
|
466
|
+
}], filterFn: [{
|
|
467
|
+
type: Input
|
|
468
|
+
}], queryChange: [{
|
|
469
|
+
type: Output
|
|
470
|
+
}], rowAction: [{
|
|
471
|
+
type: Output
|
|
472
|
+
}], pageChange: [{
|
|
473
|
+
type: Output
|
|
474
|
+
}], selectionChange: [{
|
|
475
|
+
type: Output
|
|
476
|
+
}], columnSort: [{
|
|
477
|
+
type: Output
|
|
478
|
+
}] } });
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Tabla con funcionalidad de reordenamiento de filas mediante drag & drop
|
|
482
|
+
*
|
|
483
|
+
* Extiende pdm-table agregando la capacidad de reordenar filas.
|
|
484
|
+
* Si no necesitás drag & drop, usá pdm-table directamente (más simple y liviano).
|
|
485
|
+
*
|
|
486
|
+
* @example
|
|
487
|
+
* <pdm-draggable-table
|
|
488
|
+
* variant="interactive"
|
|
489
|
+
* [reorderRows]="true"
|
|
490
|
+
* (rowOrderChange)="onOrderChange($event)">
|
|
491
|
+
* <tbody>
|
|
492
|
+
* <tr data-row-id="1"><td>Row 1</td></tr>
|
|
493
|
+
* <tr data-row-id="2"><td>Row 2</td></tr>
|
|
494
|
+
* </tbody>
|
|
495
|
+
* </pdm-draggable-table>
|
|
496
|
+
*
|
|
497
|
+
* IMPORTANTE: Cada <tr> debe tener un atributo data-row-id único
|
|
498
|
+
*/
|
|
499
|
+
class PdmDraggableTableComponent {
|
|
500
|
+
constructor(renderer) {
|
|
501
|
+
this.renderer = renderer;
|
|
502
|
+
this.variant = 'default';
|
|
503
|
+
this.responsiveStrategy = 'scroll';
|
|
504
|
+
this.className = '';
|
|
505
|
+
this.fullBleed = false;
|
|
506
|
+
/**
|
|
507
|
+
* Habilita el reordenamiento de filas mediante drag & drop
|
|
508
|
+
*/
|
|
509
|
+
this.reorderRows = false;
|
|
510
|
+
/**
|
|
511
|
+
* Selector CSS para identificar los handles de drag
|
|
512
|
+
* Por defecto busca: [data-drag-handle], [data-slot=row-drag-handle], .row-drag-handle
|
|
513
|
+
* Si no encuentra ninguno, inserta un handle automático
|
|
514
|
+
*/
|
|
515
|
+
this.dragHandleSelector = '[data-drag-handle],[data-slot=row-drag-handle],.row-drag-handle,[data-auto-drag-handle]';
|
|
516
|
+
/**
|
|
517
|
+
* Emite el nuevo orden de las filas cuando el usuario termina de arrastrar
|
|
518
|
+
* Array de data-row-id en el nuevo orden
|
|
519
|
+
*/
|
|
520
|
+
this.rowOrderChange = new EventEmitter();
|
|
521
|
+
this.cleanupListeners = [];
|
|
522
|
+
this.draggedRow = null;
|
|
523
|
+
}
|
|
524
|
+
ngAfterViewInit() {
|
|
525
|
+
this.syncReorderBehavior();
|
|
526
|
+
}
|
|
527
|
+
// Getters para clases CSS (mismo comportamiento que pdm-table)
|
|
528
|
+
get wrapperClasses() {
|
|
529
|
+
const baseClasses = ['relative', 'w-full'];
|
|
530
|
+
const strategyClasses = this.getResponsiveStrategyClasses();
|
|
531
|
+
const variantClasses = this.getVariantWrapperClasses();
|
|
532
|
+
if (this.fullBleed && this.responsiveStrategy === 'scroll') {
|
|
533
|
+
baseClasses.push('-mx-4', 'px-4', 'sm:mx-0', 'sm:px-0');
|
|
534
|
+
}
|
|
535
|
+
return [
|
|
536
|
+
...baseClasses,
|
|
537
|
+
...strategyClasses,
|
|
538
|
+
...variantClasses,
|
|
539
|
+
this.className
|
|
540
|
+
].filter(Boolean);
|
|
541
|
+
}
|
|
542
|
+
get tableClasses() {
|
|
543
|
+
const baseClasses = ['w-full', 'caption-bottom', 'text-sm'];
|
|
544
|
+
const variantClasses = this.getVariantTableClasses();
|
|
545
|
+
const cellClasses = this.getCellClasses();
|
|
546
|
+
return [...baseClasses, ...variantClasses, ...cellClasses].filter(Boolean);
|
|
547
|
+
}
|
|
548
|
+
getResponsiveStrategyClasses() {
|
|
549
|
+
if (this.responsiveStrategy === 'scroll' || this.responsiveStrategy === 'wrap' || this.responsiveStrategy === 'collapse') {
|
|
550
|
+
return ['overflow-x-auto'];
|
|
551
|
+
}
|
|
552
|
+
return [];
|
|
553
|
+
}
|
|
554
|
+
getVariantWrapperClasses() {
|
|
555
|
+
if (this.variant === 'interactive') {
|
|
556
|
+
return ['rounded-xl', 'border border-solid', 'border-border', 'bg-background'];
|
|
557
|
+
}
|
|
558
|
+
if (this.variant === 'data') {
|
|
559
|
+
return ['rounded-md', 'border border-solid', 'border-border', 'bg-background'];
|
|
560
|
+
}
|
|
561
|
+
return [];
|
|
562
|
+
}
|
|
563
|
+
getVariantTableClasses() {
|
|
564
|
+
if (this.variant === 'data') {
|
|
565
|
+
return [
|
|
566
|
+
'border-collapse', 'text-foreground',
|
|
567
|
+
'[&_thead_tr]:border-b', '[&_thead_tr]:border-border',
|
|
568
|
+
'[&_tbody_tr]:border-b', '[&_tbody_tr]:border-border',
|
|
569
|
+
'[&_tbody_tr:last-child]:border-b-0',
|
|
570
|
+
'[&_th]:h-10', '[&_th]:px-2', '[&_th]:text-left', '[&_th]:align-middle', '[&_th]:font-medium',
|
|
571
|
+
'[&_td]:p-2', '[&_td]:align-middle'
|
|
572
|
+
];
|
|
573
|
+
}
|
|
574
|
+
if (this.variant === 'interactive') {
|
|
575
|
+
return [
|
|
576
|
+
'text-foreground',
|
|
577
|
+
'[&_thead]:sticky', '[&_thead]:top-0', '[&_thead]:z-10', '[&_thead]:bg-muted/70',
|
|
578
|
+
'[&_thead_tr]:border-b', '[&_thead_tr]:border-border',
|
|
579
|
+
'[&_th]:h-12', '[&_th]:px-4', '[&_th]:text-left', '[&_th]:align-middle', '[&_th]:text-sm', '[&_th]:font-medium',
|
|
580
|
+
'[&_tbody_tr]:border-b', '[&_tbody_tr]:border-border',
|
|
581
|
+
'[&_tbody_tr]:transition-colors', '[&_tbody_tr:hover]:bg-muted/50',
|
|
582
|
+
'[&_tbody_tr:last-child]:border-b-0',
|
|
583
|
+
'[&_td]:h-14', '[&_td]:px-4', '[&_td]:align-middle', '[&_td]:text-sm',
|
|
584
|
+
'[&_svg]:text-muted-foreground'
|
|
585
|
+
];
|
|
586
|
+
}
|
|
587
|
+
return [];
|
|
588
|
+
}
|
|
589
|
+
getCellClasses() {
|
|
590
|
+
if (this.responsiveStrategy === 'scroll') {
|
|
591
|
+
return ['[&_td]:whitespace-normal', '[&_th]:whitespace-normal', 'sm:[&_td]:whitespace-nowrap', 'sm:[&_th]:whitespace-nowrap'];
|
|
592
|
+
}
|
|
593
|
+
if (this.responsiveStrategy === 'wrap') {
|
|
594
|
+
return ['[&_td]:whitespace-normal', '[&_td]:break-words', '[&_th]:whitespace-normal'];
|
|
595
|
+
}
|
|
596
|
+
return [];
|
|
597
|
+
}
|
|
598
|
+
ngOnChanges(changes) {
|
|
599
|
+
if (changes['reorderRows'] || changes['variant']) {
|
|
600
|
+
this.syncReorderBehavior();
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
ngOnDestroy() {
|
|
604
|
+
this.cleanupReorderBehavior();
|
|
605
|
+
}
|
|
606
|
+
syncReorderBehavior() {
|
|
607
|
+
this.cleanupReorderBehavior();
|
|
608
|
+
if (!this.reorderRows) {
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
const tbody = this.getTbody();
|
|
612
|
+
if (!tbody) {
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
this.setRowsDraggable(tbody, true);
|
|
616
|
+
this.cleanupListeners.push(this.renderer.listen(tbody, 'mousedown', (event) => this.armDragFromHandle(event)), this.renderer.listen(tbody, 'dragstart', (event) => this.onDragStart(event)), this.renderer.listen(tbody, 'dragover', (event) => this.onDragOver(event, tbody)), this.renderer.listen(tbody, 'drop', (event) => this.onDrop(event)), this.renderer.listen(tbody, 'dragend', () => this.onDragEnd()));
|
|
617
|
+
// Observer para detectar cambios en el DOM (filas agregadas/removidas)
|
|
618
|
+
this.observer = new MutationObserver(() => this.setRowsDraggable(tbody, true));
|
|
619
|
+
this.observer.observe(tbody, { childList: true });
|
|
620
|
+
}
|
|
621
|
+
cleanupReorderBehavior() {
|
|
622
|
+
this.cleanupListeners.forEach((dispose) => dispose());
|
|
623
|
+
this.cleanupListeners = [];
|
|
624
|
+
if (this.observer) {
|
|
625
|
+
this.observer.disconnect();
|
|
626
|
+
this.observer = undefined;
|
|
627
|
+
}
|
|
628
|
+
const tbody = this.getTbody();
|
|
629
|
+
if (tbody) {
|
|
630
|
+
this.setRowsDraggable(tbody, false);
|
|
631
|
+
}
|
|
632
|
+
this.draggedRow = null;
|
|
633
|
+
}
|
|
634
|
+
getTbody() {
|
|
635
|
+
var _a, _b;
|
|
636
|
+
return (_b = (_a = this.tableElement) === null || _a === void 0 ? void 0 : _a.nativeElement.tBodies.item(0)) !== null && _b !== void 0 ? _b : null;
|
|
637
|
+
}
|
|
638
|
+
setRowsDraggable(tbody, enabled) {
|
|
639
|
+
const rows = Array.from(tbody.rows);
|
|
640
|
+
rows.forEach((row) => {
|
|
641
|
+
this.syncAutoDragHandle(row, enabled);
|
|
642
|
+
row.draggable = false;
|
|
643
|
+
if (!enabled) {
|
|
644
|
+
delete row.dataset['dragging'];
|
|
645
|
+
delete row.dataset['dragArmed'];
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Inserta un handle de drag automático si no existe uno custom
|
|
651
|
+
*/
|
|
652
|
+
syncAutoDragHandle(row, enabled) {
|
|
653
|
+
const firstCell = row.cells.item(0);
|
|
654
|
+
if (!firstCell) {
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
const existingAutoHandle = firstCell.querySelector('[data-auto-drag-handle]');
|
|
658
|
+
if (!enabled) {
|
|
659
|
+
existingAutoHandle === null || existingAutoHandle === void 0 ? void 0 : existingAutoHandle.remove();
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
const hasCustomHandle = !!firstCell.querySelector('[data-drag-handle],[data-slot=row-drag-handle],.row-drag-handle');
|
|
663
|
+
if (hasCustomHandle || existingAutoHandle) {
|
|
664
|
+
return;
|
|
665
|
+
}
|
|
666
|
+
// Crear handle automático
|
|
667
|
+
const button = this.renderer.createElement('button');
|
|
668
|
+
this.renderer.setAttribute(button, 'type', 'button');
|
|
669
|
+
this.renderer.setAttribute(button, 'aria-label', 'Drag row');
|
|
670
|
+
this.renderer.setAttribute(button, 'data-auto-drag-handle', 'true');
|
|
671
|
+
this.renderer.addClass(button, 'inline-flex');
|
|
672
|
+
this.renderer.addClass(button, 'h-7');
|
|
673
|
+
this.renderer.addClass(button, 'w-7');
|
|
674
|
+
this.renderer.addClass(button, 'items-center');
|
|
675
|
+
this.renderer.addClass(button, 'justify-center');
|
|
676
|
+
this.renderer.addClass(button, 'cursor-grab');
|
|
677
|
+
this.renderer.addClass(button, 'active:cursor-grabbing');
|
|
678
|
+
this.renderer.addClass(button, 'text-muted-foreground');
|
|
679
|
+
const dots = this.renderer.createElement('span');
|
|
680
|
+
this.renderer.addClass(dots, 'text-sm');
|
|
681
|
+
this.renderer.addClass(dots, 'leading-none');
|
|
682
|
+
this.renderer.setProperty(dots, 'textContent', '⋮⋮');
|
|
683
|
+
this.renderer.appendChild(button, dots);
|
|
684
|
+
this.renderer.insertBefore(firstCell, button, firstCell.firstChild);
|
|
685
|
+
}
|
|
686
|
+
onDragStart(event) {
|
|
687
|
+
const target = event.target;
|
|
688
|
+
const row = target === null || target === void 0 ? void 0 : target.closest('tr');
|
|
689
|
+
if (!row) {
|
|
690
|
+
return;
|
|
691
|
+
}
|
|
692
|
+
const handle = target === null || target === void 0 ? void 0 : target.closest(this.dragHandleSelector);
|
|
693
|
+
const isArmed = row.dataset['dragArmed'] === 'true';
|
|
694
|
+
if ((!handle || !row.contains(handle)) && !isArmed) {
|
|
695
|
+
event.preventDefault();
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
this.draggedRow = row;
|
|
699
|
+
this.draggedRow.dataset['dragging'] = 'true';
|
|
700
|
+
if (event.dataTransfer) {
|
|
701
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
702
|
+
event.dataTransfer.setData('text/plain', '');
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
onDragOver(event, tbody) {
|
|
706
|
+
if (!this.draggedRow) {
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
event.preventDefault();
|
|
710
|
+
const target = event.target;
|
|
711
|
+
const targetRow = target === null || target === void 0 ? void 0 : target.closest('tr');
|
|
712
|
+
if (!targetRow || targetRow === this.draggedRow) {
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
const rect = targetRow.getBoundingClientRect();
|
|
716
|
+
const shouldInsertBefore = event.clientY < rect.top + rect.height / 2;
|
|
717
|
+
tbody.insertBefore(this.draggedRow, shouldInsertBefore ? targetRow : targetRow.nextSibling);
|
|
718
|
+
}
|
|
719
|
+
onDrop(event) {
|
|
720
|
+
event.preventDefault();
|
|
721
|
+
}
|
|
722
|
+
onDragEnd() {
|
|
723
|
+
const tbody = this.getTbody();
|
|
724
|
+
if (tbody) {
|
|
725
|
+
Array.from(tbody.rows).forEach((row) => {
|
|
726
|
+
row.draggable = false;
|
|
727
|
+
delete row.dataset['dragArmed'];
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
if (this.draggedRow) {
|
|
731
|
+
delete this.draggedRow.dataset['dragging'];
|
|
732
|
+
this.draggedRow = null;
|
|
733
|
+
}
|
|
734
|
+
if (!tbody) {
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
const order = Array.from(tbody.rows).map((row, index) => row.getAttribute('data-row-id') || String(index));
|
|
738
|
+
this.rowOrderChange.emit(order);
|
|
739
|
+
}
|
|
740
|
+
armDragFromHandle(event) {
|
|
741
|
+
const target = event.target;
|
|
742
|
+
const handle = target === null || target === void 0 ? void 0 : target.closest(this.dragHandleSelector);
|
|
743
|
+
if (!handle) {
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
const row = handle.closest('tr');
|
|
747
|
+
if (!row) {
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
row.draggable = true;
|
|
751
|
+
row.dataset['dragArmed'] = 'true';
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
PdmDraggableTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDraggableTableComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
755
|
+
PdmDraggableTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmDraggableTableComponent, selector: "pdm-draggable-table", inputs: { variant: "variant", responsiveStrategy: "responsiveStrategy", className: "className", fullBleed: "fullBleed", reorderRows: "reorderRows", dragHandleSelector: "dragHandleSelector" }, outputs: { rowOrderChange: "rowOrderChange" }, viewQueries: [{ propertyName: "tableElement", first: true, predicate: ["tableElement"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"wrapperClasses\" [attr.data-slot]=\"variant === 'interactive' ? 'table-container' : null\">\n <table #tableElement [ngClass]=\"tableClasses\" [attr.data-slot]=\"variant === 'interactive' ? 'table' : null\">\n <ng-content></ng-content>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
756
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDraggableTableComponent, decorators: [{
|
|
757
|
+
type: Component,
|
|
758
|
+
args: [{ selector: 'pdm-draggable-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"wrapperClasses\" [attr.data-slot]=\"variant === 'interactive' ? 'table-container' : null\">\n <table #tableElement [ngClass]=\"tableClasses\" [attr.data-slot]=\"variant === 'interactive' ? 'table' : null\">\n <ng-content></ng-content>\n </table>\n</div>\n" }]
|
|
759
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { variant: [{
|
|
760
|
+
type: Input
|
|
761
|
+
}], responsiveStrategy: [{
|
|
762
|
+
type: Input
|
|
763
|
+
}], className: [{
|
|
764
|
+
type: Input
|
|
765
|
+
}], fullBleed: [{
|
|
766
|
+
type: Input
|
|
767
|
+
}], reorderRows: [{
|
|
768
|
+
type: Input
|
|
769
|
+
}], dragHandleSelector: [{
|
|
770
|
+
type: Input
|
|
771
|
+
}], rowOrderChange: [{
|
|
772
|
+
type: Output
|
|
773
|
+
}], tableElement: [{
|
|
774
|
+
type: ViewChild,
|
|
775
|
+
args: ['tableElement']
|
|
776
|
+
}] } });
|
|
777
|
+
|
|
778
|
+
const COMPONENTS = [
|
|
779
|
+
PdmDataTableComponent,
|
|
780
|
+
PdmDraggableTableComponent,
|
|
781
|
+
PdmTableComponent,
|
|
782
|
+
];
|
|
783
|
+
class PdmDataTableModule {
|
|
784
|
+
}
|
|
785
|
+
PdmDataTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDataTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
786
|
+
PdmDataTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmDataTableModule, declarations: [PdmDataTableComponent,
|
|
787
|
+
PdmDraggableTableComponent,
|
|
788
|
+
PdmTableComponent], imports: [CommonModule], exports: [PdmDataTableComponent,
|
|
789
|
+
PdmDraggableTableComponent,
|
|
790
|
+
PdmTableComponent] });
|
|
791
|
+
PdmDataTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDataTableModule, imports: [CommonModule] });
|
|
792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDataTableModule, decorators: [{
|
|
793
|
+
type: NgModule,
|
|
794
|
+
args: [{
|
|
795
|
+
imports: [CommonModule],
|
|
796
|
+
declarations: COMPONENTS,
|
|
797
|
+
exports: COMPONENTS
|
|
798
|
+
}]
|
|
799
|
+
}] });
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Generated bundle index. Do not edit.
|
|
803
|
+
*/
|
|
804
|
+
|
|
805
|
+
export { PdmDataTableComponent, PdmDataTableModule, PdmDraggableTableComponent, PdmTableComponent };
|
|
806
|
+
//# sourceMappingURL=pdm-ui-kit-src-data-table.mjs.map
|