cmat 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/animations/defaults.d.ts +11 -0
- package/animations/drop.d.ts +2 -0
- package/animations/expand-collapse.d.ts +2 -0
- package/animations/fade.d.ts +11 -0
- package/animations/index.d.ts +5 -0
- package/animations/public-api.d.ts +1 -0
- package/animations/shake.d.ts +2 -0
- package/animations/slide.d.ts +9 -0
- package/animations/transform.d.ts +2 -0
- package/animations/zoom.d.ts +3 -0
- package/components/adapter/datetime-adapter.d.ts +45 -0
- package/components/adapter/datetime-formats.d.ts +22 -0
- package/components/adapter/dayjs-date-adapter.d.ts +63 -0
- package/components/adapter/dayjs-date-formats.d.ts +2 -0
- package/components/adapter/dayjs-datetime-adapter.d.ts +22 -0
- package/components/adapter/dayjs-datetime-formats.d.ts +2 -0
- package/components/adapter/index.d.ts +5 -0
- package/components/adapter/native-datetime-adapter.d.ts +31 -0
- package/components/adapter/native-datetime-formats.d.ts +2 -0
- package/components/adapter/public-api.d.ts +8 -0
- package/components/breadcrumb/breadcrumb-item.directive.d.ts +10 -0
- package/components/breadcrumb/breadcrumb.component.d.ts +57 -0
- package/components/breadcrumb/breadcrumb.component.scss +18 -0
- package/components/breadcrumb/breadcrumb.service.d.ts +126 -0
- package/components/breadcrumb/index.d.ts +5 -0
- package/components/breadcrumb/public-api.d.ts +3 -0
- package/components/breadcrumb/types/breadcrumb.config.d.ts +33 -0
- package/components/breadcrumb/types/breadcrumb.d.ts +23 -0
- package/components/card/card.component.d.ts +20 -0
- package/components/card/card.component.scss +63 -0
- package/components/card/card.types.d.ts +1 -0
- package/components/card/index.d.ts +5 -0
- package/components/card/public-api.d.ts +1 -0
- package/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.d.ts +14 -0
- package/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.scss +43 -0
- package/components/cascade/cascade-list/cascade-list.component.d.ts +52 -0
- package/components/cascade/cascade-list/cascade-list.component.scss +22 -0
- package/components/cascade/cascade-menu/cascade-menu.component.d.ts +10 -0
- package/components/cascade/cascade-menu/cascade-menu.component.scss +48 -0
- package/components/cascade/index.d.ts +5 -0
- package/components/cascade/options.interface.d.ts +8 -0
- package/components/cascade/public-api.d.ts +2 -0
- package/components/date-range/date-range.component.d.ts +134 -0
- package/components/date-range/date-range.component.scss +232 -0
- package/components/date-range/index.d.ts +5 -0
- package/components/date-range/public-api.d.ts +1 -0
- package/components/drawer/drawer.component.d.ts +75 -0
- package/components/drawer/drawer.component.scss +133 -0
- package/components/drawer/drawer.service.d.ts +26 -0
- package/components/drawer/drawer.types.d.ts +2 -0
- package/components/drawer/index.d.ts +5 -0
- package/components/drawer/public-api.d.ts +3 -0
- package/components/fullscreen/fullscreen.component.d.ts +18 -0
- package/components/fullscreen/fullscreen.types.d.ts +13 -0
- package/components/fullscreen/index.d.ts +5 -0
- package/components/fullscreen/public-api.d.ts +2 -0
- package/components/highlight/highlight.component.d.ts +21 -0
- package/components/highlight/highlight.component.scss +3 -0
- package/components/highlight/highlight.service.d.ts +7 -0
- package/components/highlight/index.d.ts +5 -0
- package/components/highlight/public-api.d.ts +2 -0
- package/components/masonry/index.d.ts +5 -0
- package/components/masonry/masonry.component.d.ts +13 -0
- package/components/masonry/public-api.d.ts +1 -0
- package/components/material-color-picker/base-color.d.ts +1 -0
- package/components/material-color-picker/index.d.ts +5 -0
- package/components/material-color-picker/material-color-picker.component.d.ts +35 -0
- package/components/material-color-picker/material-color-picker.component.scss +5 -0
- package/components/material-color-picker/public-api.d.ts +2 -0
- package/components/material-color-picker/selected-color.d.ts +5 -0
- package/components/material-datetimepicker/calendar-body.d.ts +43 -0
- package/components/material-datetimepicker/calendar-body.scss +58 -0
- package/components/material-datetimepicker/calendar.d.ts +146 -0
- package/components/material-datetimepicker/calendar.scss +194 -0
- package/components/material-datetimepicker/clock.d.ts +74 -0
- package/components/material-datetimepicker/clock.scss +90 -0
- package/components/material-datetimepicker/datetimepicker-animations.d.ts +4 -0
- package/components/material-datetimepicker/datetimepicker-content.scss +151 -0
- package/components/material-datetimepicker/datetimepicker-errors.d.ts +1 -0
- package/components/material-datetimepicker/datetimepicker-filtertype.d.ts +5 -0
- package/components/material-datetimepicker/datetimepicker-input.d.ts +106 -0
- package/components/material-datetimepicker/datetimepicker-intl.d.ts +51 -0
- package/components/material-datetimepicker/datetimepicker-toggle.d.ts +40 -0
- package/components/material-datetimepicker/datetimepicker-types.d.ts +13 -0
- package/components/material-datetimepicker/datetimepicker.d.ts +195 -0
- package/components/material-datetimepicker/datetimepicker.scss +145 -0
- package/components/material-datetimepicker/index.d.ts +5 -0
- package/components/material-datetimepicker/month-view.d.ts +64 -0
- package/components/material-datetimepicker/multi-year-view.d.ts +74 -0
- package/components/material-datetimepicker/public-api.d.ts +9 -0
- package/components/material-datetimepicker/time.d.ts +129 -0
- package/components/material-datetimepicker/time.scss +82 -0
- package/components/material-datetimepicker/year-view.d.ts +56 -0
- package/components/navigation/horizontal/components/basic/basic.component.d.ts +27 -0
- package/components/navigation/horizontal/components/branch/branch.component.d.ts +39 -0
- package/components/navigation/horizontal/components/divider/divider.component.d.ts +23 -0
- package/components/navigation/horizontal/components/spacer/spacer.component.d.ts +23 -0
- package/components/navigation/horizontal/horizontal.component.d.ts +43 -0
- package/components/navigation/horizontal/horizontal.component.scss +167 -0
- package/components/navigation/index.d.ts +5 -0
- package/components/navigation/navigation.service.d.ts +71 -0
- package/components/navigation/navigation.types.d.ts +34 -0
- package/components/navigation/public-api.d.ts +4 -0
- package/components/navigation/vertical/components/aside/aside.component.d.ts +63 -0
- package/components/navigation/vertical/components/basic/basic.component.d.ts +30 -0
- package/components/navigation/vertical/components/collapsable/collapsable.component.d.ts +74 -0
- package/components/navigation/vertical/components/divider/divider.component.d.ts +26 -0
- package/components/navigation/vertical/components/group/group.component.d.ts +36 -0
- package/components/navigation/vertical/components/spacer/spacer.component.d.ts +26 -0
- package/components/navigation/vertical/styles/appearances/compact.scss +103 -0
- package/components/navigation/vertical/styles/appearances/default.scss +550 -0
- package/components/navigation/vertical/styles/appearances/dense.scss +171 -0
- package/components/navigation/vertical/styles/appearances/thin.scss +91 -0
- package/components/navigation/vertical/vertical.component.d.ts +176 -0
- package/components/navigation/vertical/vertical.component.scss +4 -0
- package/components/pagination/index.d.ts +5 -0
- package/components/pagination/pagination.component.d.ts +24 -0
- package/components/pagination/pagination.directive.d.ts +40 -0
- package/components/pagination/pagination.instance.d.ts +11 -0
- package/components/pagination/pagination.pipe.d.ts +29 -0
- package/components/pagination/pagination.service.d.ts +20 -0
- package/components/pagination/public-api.d.ts +4 -0
- package/components/password-strength/animations/index.d.ts +4 -0
- package/components/password-strength/enum.d.ts +13 -0
- package/components/password-strength/index.d.ts +5 -0
- package/components/password-strength/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.d.ts +11 -0
- package/components/password-strength/mat-password-strength/mat-password-strength.component.d.ts +52 -0
- package/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.d.ts +16 -0
- package/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.scss +19 -0
- package/components/password-strength/mat-password-strength-validator.d.ts +6 -0
- package/components/password-strength/public-api.d.ts +3 -0
- package/components/password-strength/regexp.class.d.ts +6 -0
- package/components/popover/index.d.ts +5 -0
- package/components/popover/popover.component.d.ts +139 -0
- package/components/popover/popover.component.scss +174 -0
- package/components/popover/popover.errors.d.ts +14 -0
- package/components/popover/popover.interfaces.d.ts +44 -0
- package/components/popover/popover.type.d.ts +5 -0
- package/components/popover/public-api.d.ts +1 -0
- package/components/progress-bar/index.d.ts +5 -0
- package/components/progress-bar/progress-bar.component.d.ts +17 -0
- package/components/progress-bar/progress-bar.component.scss +7 -0
- package/components/progress-bar/public-api.d.ts +1 -0
- package/components/rating/index.d.ts +5 -0
- package/components/rating/public-api.d.ts +1 -0
- package/components/rating/rating.component.d.ts +28 -0
- package/components/rating/rating.component.scss +33 -0
- package/components/select-search/default-options.d.ts +8 -0
- package/components/select-search/index.d.ts +5 -0
- package/components/select-search/public-api.d.ts +2 -0
- package/components/select-search/select-no-entries-found.directive.d.ts +5 -0
- package/components/select-search/select-search-clear.directive.d.ts +5 -0
- package/components/select-search/select-search.component.d.ts +91 -0
- package/components/select-search/select-search.component.scss +126 -0
- package/components/select-tree/index.d.ts +5 -0
- package/components/select-tree/public-api.d.ts +1 -0
- package/components/select-tree/select-tree.component.d.ts +85 -0
- package/components/select-tree/select-tree.component.scss +54 -0
- package/components/select-tree/select-tree.flatnode.d.ts +6 -0
- package/components/select-tree/select-tree.node.d.ts +5 -0
- package/components/timeline/index.d.ts +5 -0
- package/components/timeline/public-api.d.ts +2 -0
- package/components/timeline/timeline-item/timeline-item.component.d.ts +25 -0
- package/components/timeline/timeline-item/timeline-item.component.scss +329 -0
- package/components/timeline/timeline.component.d.ts +32 -0
- package/components/timeline/timeline.component.scss +42 -0
- package/components/toast/index.d.ts +5 -0
- package/components/toast/models/global-config.model.d.ts +12 -0
- package/components/toast/models/toast.model.d.ts +6 -0
- package/components/toast/models/type.model.d.ts +12 -0
- package/components/toast/public-api.d.ts +2 -0
- package/components/toast/toast-modal.component.d.ts +18 -0
- package/components/toast/toast-modal.component.scss +119 -0
- package/components/toast/toast.component.d.ts +17 -0
- package/components/toast/toast.component.scss +62 -0
- package/components/toast/toast.service.d.ts +26 -0
- package/components/transfer-picker/filter/filter.component.d.ts +24 -0
- package/components/transfer-picker/filter/filter.component.scss +40 -0
- package/components/transfer-picker/index.d.ts +5 -0
- package/components/transfer-picker/interface.d.ts +42 -0
- package/components/transfer-picker/public-api.d.ts +7 -0
- package/components/transfer-picker/search/search.component.d.ts +14 -0
- package/components/transfer-picker/search/search.component.scss +7 -0
- package/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.d.ts +49 -0
- package/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.scss +25 -0
- package/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.d.ts +12 -0
- package/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.scss +27 -0
- package/components/transfer-picker/transfer-picker.component.d.ts +28 -0
- package/components/transfer-picker/transfer-picker.component.scss +8 -0
- package/components/transfer-picker/transfer-picker.service.d.ts +31 -0
- package/directives/animate-on-scroll/animate-on-scroll.directive.d.ts +29 -0
- package/directives/animate-on-scroll/index.d.ts +5 -0
- package/directives/animate-on-scroll/public-api.d.ts +1 -0
- package/directives/animate-on-scroll/scroll.service.d.ts +15 -0
- package/directives/autofocus/autofocus.directive.d.ts +10 -0
- package/directives/autofocus/index.d.ts +5 -0
- package/directives/autofocus/public-api.d.ts +1 -0
- package/directives/debounce/abstract-debounce.directive.d.ts +15 -0
- package/directives/debounce/debounce-click.directive.d.ts +8 -0
- package/directives/debounce/debounce-keyup.directive.d.ts +8 -0
- package/directives/debounce/index.d.ts +5 -0
- package/directives/debounce/public-api.d.ts +2 -0
- package/directives/digit-only/digit-only.directive.d.ts +34 -0
- package/directives/digit-only/index.d.ts +5 -0
- package/directives/digit-only/mask.directive.d.ts +14 -0
- package/directives/digit-only/public-api.d.ts +2 -0
- package/directives/equal-validator/equal-validator.directive.d.ts +14 -0
- package/directives/equal-validator/index.d.ts +5 -0
- package/directives/equal-validator/public-api.d.ts +1 -0
- package/esm2022/animations/cmat-animations.mjs +5 -0
- package/esm2022/animations/defaults.mjs +12 -0
- package/esm2022/animations/drop.mjs +26 -0
- package/esm2022/animations/expand-collapse.mjs +17 -0
- package/esm2022/animations/fade.mjs +170 -0
- package/esm2022/animations/public-api.mjs +19 -0
- package/esm2022/animations/shake.mjs +59 -0
- package/esm2022/animations/slide.mjs +124 -0
- package/esm2022/animations/transform.mjs +16 -0
- package/esm2022/animations/zoom.mjs +38 -0
- package/esm2022/cmat.mjs +5 -0
- package/esm2022/components/adapter/cmat-components-adapter.mjs +5 -0
- package/esm2022/components/adapter/datetime-adapter.mjs +127 -0
- package/esm2022/components/adapter/datetime-formats.mjs +3 -0
- package/esm2022/components/adapter/dayjs-date-adapter.mjs +198 -0
- package/esm2022/components/adapter/dayjs-date-formats.mjs +12 -0
- package/esm2022/components/adapter/dayjs-datetime-adapter.mjs +100 -0
- package/esm2022/components/adapter/dayjs-datetime-formats.mjs +21 -0
- package/esm2022/components/adapter/native-datetime-adapter.mjs +130 -0
- package/esm2022/components/adapter/native-datetime-formats.mjs +15 -0
- package/esm2022/components/adapter/public-api.mjs +9 -0
- package/esm2022/components/breadcrumb/breadcrumb-item.directive.mjs +19 -0
- package/esm2022/components/breadcrumb/breadcrumb.component.mjs +95 -0
- package/esm2022/components/breadcrumb/breadcrumb.service.mjs +336 -0
- package/esm2022/components/breadcrumb/cmat-components-breadcrumb.mjs +5 -0
- package/esm2022/components/breadcrumb/public-api.mjs +4 -0
- package/esm2022/components/breadcrumb/types/breadcrumb.config.mjs +2 -0
- package/esm2022/components/breadcrumb/types/breadcrumb.mjs +2 -0
- package/esm2022/components/card/card.component.mjs +58 -0
- package/esm2022/components/card/card.types.mjs +2 -0
- package/esm2022/components/card/cmat-components-card.mjs +5 -0
- package/esm2022/components/card/public-api.mjs +2 -0
- package/esm2022/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.mjs +53 -0
- package/esm2022/components/cascade/cascade-list/cascade-list.component.mjs +263 -0
- package/esm2022/components/cascade/cascade-menu/cascade-menu.component.mjs +29 -0
- package/esm2022/components/cascade/cmat-components-cascade.mjs +5 -0
- package/esm2022/components/cascade/options.interface.mjs +2 -0
- package/esm2022/components/cascade/public-api.mjs +3 -0
- package/esm2022/components/date-range/cmat-components-date-range.mjs +5 -0
- package/esm2022/components/date-range/date-range.component.mjs +540 -0
- package/esm2022/components/date-range/public-api.mjs +2 -0
- package/esm2022/components/drawer/cmat-components-drawer.mjs +5 -0
- package/esm2022/components/drawer/drawer.component.mjs +301 -0
- package/esm2022/components/drawer/drawer.service.mjs +41 -0
- package/esm2022/components/drawer/drawer.types.mjs +2 -0
- package/esm2022/components/drawer/public-api.mjs +4 -0
- package/esm2022/components/fullscreen/cmat-components-fullscreen.mjs +5 -0
- package/esm2022/components/fullscreen/fullscreen.component.mjs +101 -0
- package/esm2022/components/fullscreen/fullscreen.types.mjs +2 -0
- package/esm2022/components/fullscreen/public-api.mjs +3 -0
- package/esm2022/components/highlight/cmat-components-highlight.mjs +5 -0
- package/esm2022/components/highlight/highlight.component.mjs +80 -0
- package/esm2022/components/highlight/highlight.service.mjs +47 -0
- package/esm2022/components/highlight/public-api.mjs +3 -0
- package/esm2022/components/masonry/cmat-components-masonry.mjs +5 -0
- package/esm2022/components/masonry/masonry.component.mjs +54 -0
- package/esm2022/components/masonry/public-api.mjs +2 -0
- package/esm2022/components/material-color-picker/base-color.mjs +13 -0
- package/esm2022/components/material-color-picker/cmat-components-material-color-picker.mjs +5 -0
- package/esm2022/components/material-color-picker/material-color-picker.component.mjs +138 -0
- package/esm2022/components/material-color-picker/public-api.mjs +3 -0
- package/esm2022/components/material-color-picker/selected-color.mjs +3 -0
- package/esm2022/components/material-datetimepicker/calendar-body.mjs +80 -0
- package/esm2022/components/material-datetimepicker/calendar.mjs +678 -0
- package/esm2022/components/material-datetimepicker/clock.mjs +293 -0
- package/esm2022/components/material-datetimepicker/cmat-components-material-datetimepicker.mjs +5 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-animations.mjs +34 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-errors.mjs +6 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-filtertype.mjs +8 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-input.mjs +340 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-intl.mjs +63 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-toggle.mjs +88 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-types.mjs +2 -0
- package/esm2022/components/material-datetimepicker/datetimepicker.mjs +534 -0
- package/esm2022/components/material-datetimepicker/month-view.mjs +146 -0
- package/esm2022/components/material-datetimepicker/multi-year-view.mjs +198 -0
- package/esm2022/components/material-datetimepicker/public-api.mjs +10 -0
- package/esm2022/components/material-datetimepicker/time.mjs +456 -0
- package/esm2022/components/material-datetimepicker/year-view.mjs +125 -0
- package/esm2022/components/navigation/cmat-components-navigation.mjs +5 -0
- package/esm2022/components/navigation/horizontal/components/basic/basic.component.mjs +70 -0
- package/esm2022/components/navigation/horizontal/components/branch/branch.component.mjs +83 -0
- package/esm2022/components/navigation/horizontal/components/divider/divider.component.mjs +47 -0
- package/esm2022/components/navigation/horizontal/components/spacer/spacer.component.mjs +47 -0
- package/esm2022/components/navigation/horizontal/horizontal.component.mjs +88 -0
- package/esm2022/components/navigation/navigation.service.mjs +140 -0
- package/esm2022/components/navigation/navigation.types.mjs +3 -0
- package/esm2022/components/navigation/public-api.mjs +5 -0
- package/esm2022/components/navigation/vertical/components/aside/aside.component.mjs +162 -0
- package/esm2022/components/navigation/vertical/components/basic/basic.component.mjs +76 -0
- package/esm2022/components/navigation/vertical/components/collapsable/collapsable.component.mjs +279 -0
- package/esm2022/components/navigation/vertical/components/divider/divider.component.mjs +56 -0
- package/esm2022/components/navigation/vertical/components/group/group.component.mjs +79 -0
- package/esm2022/components/navigation/vertical/components/spacer/spacer.component.mjs +56 -0
- package/esm2022/components/navigation/vertical/vertical.component.mjs +586 -0
- package/esm2022/components/pagination/cmat-components-pagination.mjs +5 -0
- package/esm2022/components/pagination/pagination.component.mjs +71 -0
- package/esm2022/components/pagination/pagination.directive.mjs +197 -0
- package/esm2022/components/pagination/pagination.instance.mjs +2 -0
- package/esm2022/components/pagination/pagination.pipe.mjs +100 -0
- package/esm2022/components/pagination/pagination.service.mjs +90 -0
- package/esm2022/components/pagination/public-api.mjs +5 -0
- package/esm2022/components/password-strength/animations/index.mjs +48 -0
- package/esm2022/components/password-strength/cmat-components-password-strength.mjs +5 -0
- package/esm2022/components/password-strength/enum.mjs +17 -0
- package/esm2022/components/password-strength/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.mjs +27 -0
- package/esm2022/components/password-strength/mat-password-strength/mat-password-strength.component.mjs +206 -0
- package/esm2022/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.mjs +151 -0
- package/esm2022/components/password-strength/mat-password-strength-validator.mjs +36 -0
- package/esm2022/components/password-strength/public-api.mjs +4 -0
- package/esm2022/components/password-strength/regexp.class.mjs +8 -0
- package/esm2022/components/popover/cmat-components-popover.mjs +5 -0
- package/esm2022/components/popover/popover.component.mjs +350 -0
- package/esm2022/components/popover/popover.errors.mjs +27 -0
- package/esm2022/components/popover/popover.interfaces.mjs +2 -0
- package/esm2022/components/popover/popover.type.mjs +2 -0
- package/esm2022/components/popover/public-api.mjs +2 -0
- package/esm2022/components/progress-bar/cmat-components-progress-bar.mjs +5 -0
- package/esm2022/components/progress-bar/progress-bar.component.mjs +55 -0
- package/esm2022/components/progress-bar/public-api.mjs +2 -0
- package/esm2022/components/rating/cmat-components-rating.mjs +5 -0
- package/esm2022/components/rating/public-api.mjs +2 -0
- package/esm2022/components/rating/rating.component.mjs +91 -0
- package/esm2022/components/select-search/cmat-components-select-search.mjs +5 -0
- package/esm2022/components/select-search/default-options.mjs +16 -0
- package/esm2022/components/select-search/public-api.mjs +3 -0
- package/esm2022/components/select-search/select-no-entries-found.directive.mjs +14 -0
- package/esm2022/components/select-search/select-search-clear.directive.mjs +14 -0
- package/esm2022/components/select-search/select-search.component.mjs +488 -0
- package/esm2022/components/select-tree/cmat-components-select-tree.mjs +5 -0
- package/esm2022/components/select-tree/public-api.mjs +2 -0
- package/esm2022/components/select-tree/select-tree.component.mjs +458 -0
- package/esm2022/components/select-tree/select-tree.flatnode.mjs +3 -0
- package/esm2022/components/select-tree/select-tree.node.mjs +3 -0
- package/esm2022/components/timeline/cmat-components-timeline.mjs +5 -0
- package/esm2022/components/timeline/public-api.mjs +3 -0
- package/esm2022/components/timeline/timeline-item/timeline-item.component.mjs +68 -0
- package/esm2022/components/timeline/timeline.component.mjs +114 -0
- package/esm2022/components/toast/cmat-components-toast.mjs +5 -0
- package/esm2022/components/toast/models/global-config.model.mjs +2 -0
- package/esm2022/components/toast/models/toast.model.mjs +2 -0
- package/esm2022/components/toast/models/type.model.mjs +2 -0
- package/esm2022/components/toast/public-api.mjs +3 -0
- package/esm2022/components/toast/toast-modal.component.mjs +53 -0
- package/esm2022/components/toast/toast.component.mjs +30 -0
- package/esm2022/components/toast/toast.service.mjs +122 -0
- package/esm2022/components/transfer-picker/cmat-components-transfer-picker.mjs +5 -0
- package/esm2022/components/transfer-picker/filter/filter.component.mjs +85 -0
- package/esm2022/components/transfer-picker/interface.mjs +17 -0
- package/esm2022/components/transfer-picker/public-api.mjs +8 -0
- package/esm2022/components/transfer-picker/search/search.component.mjs +34 -0
- package/esm2022/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.mjs +178 -0
- package/esm2022/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.mjs +34 -0
- package/esm2022/components/transfer-picker/transfer-picker.component.mjs +82 -0
- package/esm2022/components/transfer-picker/transfer-picker.service.mjs +134 -0
- package/esm2022/directives/animate-on-scroll/animate-on-scroll.directive.mjs +126 -0
- package/esm2022/directives/animate-on-scroll/cmat-directives-animate-on-scroll.mjs +5 -0
- package/esm2022/directives/animate-on-scroll/public-api.mjs +2 -0
- package/esm2022/directives/animate-on-scroll/scroll.service.mjs +38 -0
- package/esm2022/directives/autofocus/autofocus.directive.mjs +20 -0
- package/esm2022/directives/autofocus/cmat-directives-autofocus.mjs +5 -0
- package/esm2022/directives/autofocus/public-api.mjs +2 -0
- package/esm2022/directives/debounce/abstract-debounce.directive.mjs +34 -0
- package/esm2022/directives/debounce/cmat-directives-debounce.mjs +5 -0
- package/esm2022/directives/debounce/debounce-click.directive.mjs +25 -0
- package/esm2022/directives/debounce/debounce-keyup.directive.mjs +25 -0
- package/esm2022/directives/debounce/public-api.mjs +3 -0
- package/esm2022/directives/digit-only/cmat-directives-digit-only.mjs +5 -0
- package/esm2022/directives/digit-only/digit-only.directive.mjs +282 -0
- package/esm2022/directives/digit-only/mask.directive.mjs +69 -0
- package/esm2022/directives/digit-only/public-api.mjs +3 -0
- package/esm2022/directives/equal-validator/cmat-directives-equal-validator.mjs +5 -0
- package/esm2022/directives/equal-validator/equal-validator.directive.mjs +54 -0
- package/esm2022/directives/equal-validator/public-api.mjs +2 -0
- package/esm2022/lib/mock-api/cmat-lib-mock-api.mjs +5 -0
- package/esm2022/lib/mock-api/mock-api.constants.mjs +3 -0
- package/esm2022/lib/mock-api/mock-api.interceptor.mjs +73 -0
- package/esm2022/lib/mock-api/mock-api.request-handler.mjs +48 -0
- package/esm2022/lib/mock-api/mock-api.service.mjs +93 -0
- package/esm2022/lib/mock-api/mock-api.types.mjs +2 -0
- package/esm2022/lib/mock-api/mock-api.utils.mjs +17 -0
- package/esm2022/lib/mock-api/public-api.mjs +6 -0
- package/esm2022/pipes/bytes/bytes.pipe.mjs +25 -0
- package/esm2022/pipes/bytes/cmat-pipes-bytes.mjs +5 -0
- package/esm2022/pipes/bytes/public-api.mjs +2 -0
- package/esm2022/pipes/date-format/cmat-pipes-date-format.mjs +5 -0
- package/esm2022/pipes/date-format/date-format.pipe.mjs +18 -0
- package/esm2022/pipes/date-format/public-api.mjs +2 -0
- package/esm2022/pipes/find-by-key/cmat-pipes-find-by-key.mjs +5 -0
- package/esm2022/pipes/find-by-key/find-by-key.pipe.mjs +23 -0
- package/esm2022/pipes/find-by-key/public-api.mjs +2 -0
- package/esm2022/pipes/group-by/cmat-pipes-group-by.mjs +5 -0
- package/esm2022/pipes/group-by/group-by.pipe.mjs +29 -0
- package/esm2022/pipes/group-by/public-api.mjs +2 -0
- package/esm2022/pipes/keys/cmat-pipes-keys.mjs +5 -0
- package/esm2022/pipes/keys/keys.pipe.mjs +26 -0
- package/esm2022/pipes/keys/public-api.mjs +2 -0
- package/esm2022/pipes/secure/cmat-pipes-secure.mjs +5 -0
- package/esm2022/pipes/secure/public-api.mjs +2 -0
- package/esm2022/pipes/secure/secure-pipe.mjs +43 -0
- package/esm2022/pipes/uppercase/cmat-pipes-uppercase.mjs +5 -0
- package/esm2022/pipes/uppercase/public-api.mjs +2 -0
- package/esm2022/pipes/uppercase/uppercase.pipe.mjs +17 -0
- package/esm2022/public-api.mjs +2 -0
- package/esm2022/services/alert/alert.dialog.mjs +12 -0
- package/esm2022/services/alert/alert.message.mjs +9 -0
- package/esm2022/services/alert/alert.service.mjs +165 -0
- package/esm2022/services/alert/cmat-services-alert.mjs +5 -0
- package/esm2022/services/alert/enum.mjs +15 -0
- package/esm2022/services/alert/public-api.mjs +5 -0
- package/esm2022/services/config/cmat-services-config.mjs +5 -0
- package/esm2022/services/config/config.constants.mjs +3 -0
- package/esm2022/services/config/config.service.mjs +35 -0
- package/esm2022/services/config/public-api.mjs +4 -0
- package/esm2022/services/config/urlStateConfig.service.mjs +30 -0
- package/esm2022/services/confirmation/cmat-services-confirmation.mjs +5 -0
- package/esm2022/services/confirmation/confirmation.service.mjs +51 -0
- package/esm2022/services/confirmation/confirmation.types.mjs +2 -0
- package/esm2022/services/confirmation/dialog/dialog.component.mjs +25 -0
- package/esm2022/services/confirmation/public-api.mjs +3 -0
- package/esm2022/services/data/cmat-services-data.mjs +5 -0
- package/esm2022/services/data/data.service.mjs +169 -0
- package/esm2022/services/data/public-api.mjs +2 -0
- package/esm2022/services/loading/cmat-services-loading.mjs +5 -0
- package/esm2022/services/loading/loading.interceptor.mjs +29 -0
- package/esm2022/services/loading/loading.service.mjs +72 -0
- package/esm2022/services/loading/public-api.mjs +3 -0
- package/esm2022/services/local-storage/cmat-services-local-storage.mjs +5 -0
- package/esm2022/services/local-storage/local-storage.service.mjs +22 -0
- package/esm2022/services/local-storage/public-api.mjs +2 -0
- package/esm2022/services/media-watcher/cmat-services-media-watcher.mjs +5 -0
- package/esm2022/services/media-watcher/media-watcher.service.mjs +55 -0
- package/esm2022/services/media-watcher/public-api.mjs +2 -0
- package/esm2022/services/platform/cmat-services-platform.mjs +5 -0
- package/esm2022/services/platform/platform.service.mjs +46 -0
- package/esm2022/services/platform/public-api.mjs +2 -0
- package/esm2022/services/splash-screen/cmat-services-splash-screen.mjs +5 -0
- package/esm2022/services/splash-screen/public-api.mjs +2 -0
- package/esm2022/services/splash-screen/splash-screen.service.mjs +42 -0
- package/esm2022/services/title/cmat-services-title.mjs +5 -0
- package/esm2022/services/title/public-api.mjs +2 -0
- package/esm2022/services/title/title.service.mjs +46 -0
- package/esm2022/services/translation/cmat-services-translation.mjs +5 -0
- package/esm2022/services/translation/public-api.mjs +2 -0
- package/esm2022/services/translation/translation.service.mjs +62 -0
- package/esm2022/services/utils/cmat-services-utils.mjs +5 -0
- package/esm2022/services/utils/public-api.mjs +2 -0
- package/esm2022/services/utils/utils.service.mjs +391 -0
- package/esm2022/validators/cmat-validators.mjs +5 -0
- package/esm2022/validators/public-api.mjs +2 -0
- package/esm2022/validators/validators.mjs +33 -0
- package/esm2022/version/cmat-version.mjs +5 -0
- package/esm2022/version/public-api.mjs +2 -0
- package/esm2022/version/version.mjs +11 -0
- package/fesm2022/cmat-animations.mjs +466 -0
- package/fesm2022/cmat-animations.mjs.map +1 -0
- package/fesm2022/cmat-components-adapter.mjs +600 -0
- package/fesm2022/cmat-components-adapter.mjs.map +1 -0
- package/fesm2022/cmat-components-breadcrumb.mjs +449 -0
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -0
- package/fesm2022/cmat-components-card.mjs +65 -0
- package/fesm2022/cmat-components-card.mjs.map +1 -0
- package/fesm2022/cmat-components-cascade.mjs +334 -0
- package/fesm2022/cmat-components-cascade.mjs.map +1 -0
- package/fesm2022/cmat-components-date-range.mjs +547 -0
- package/fesm2022/cmat-components-date-range.mjs.map +1 -0
- package/fesm2022/cmat-components-drawer.mjs +346 -0
- package/fesm2022/cmat-components-drawer.mjs.map +1 -0
- package/fesm2022/cmat-components-fullscreen.mjs +108 -0
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -0
- package/fesm2022/cmat-components-highlight.mjs +131 -0
- package/fesm2022/cmat-components-highlight.mjs.map +1 -0
- package/fesm2022/cmat-components-masonry.mjs +61 -0
- package/fesm2022/cmat-components-masonry.mjs.map +1 -0
- package/fesm2022/cmat-components-material-color-picker.mjs +160 -0
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -0
- package/fesm2022/cmat-components-material-datetimepicker.mjs +2976 -0
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -0
- package/fesm2022/cmat-components-navigation.mjs +1656 -0
- package/fesm2022/cmat-components-navigation.mjs.map +1 -0
- package/fesm2022/cmat-components-pagination.mjs +455 -0
- package/fesm2022/cmat-components-pagination.mjs.map +1 -0
- package/fesm2022/cmat-components-password-strength.mjs +489 -0
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -0
- package/fesm2022/cmat-components-popover.mjs +383 -0
- package/fesm2022/cmat-components-popover.mjs.map +1 -0
- package/fesm2022/cmat-components-progress-bar.mjs +62 -0
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -0
- package/fesm2022/cmat-components-rating.mjs +98 -0
- package/fesm2022/cmat-components-rating.mjs.map +1 -0
- package/fesm2022/cmat-components-select-search.mjs +531 -0
- package/fesm2022/cmat-components-select-search.mjs.map +1 -0
- package/fesm2022/cmat-components-select-tree.mjs +467 -0
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -0
- package/fesm2022/cmat-components-timeline.mjs +186 -0
- package/fesm2022/cmat-components-timeline.mjs.map +1 -0
- package/fesm2022/cmat-components-toast.mjs +205 -0
- package/fesm2022/cmat-components-toast.mjs.map +1 -0
- package/fesm2022/cmat-components-transfer-picker.mjs +536 -0
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -0
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +166 -0
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -0
- package/fesm2022/cmat-directives-autofocus.mjs +27 -0
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -0
- package/fesm2022/cmat-directives-debounce.mjs +85 -0
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -0
- package/fesm2022/cmat-directives-digit-only.mjs +356 -0
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -0
- package/fesm2022/cmat-directives-equal-validator.mjs +61 -0
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -0
- package/fesm2022/cmat-lib-mock-api.mjs +232 -0
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -0
- package/fesm2022/cmat-pipes-bytes.mjs +32 -0
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -0
- package/fesm2022/cmat-pipes-date-format.mjs +25 -0
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -0
- package/fesm2022/cmat-pipes-find-by-key.mjs +30 -0
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -0
- package/fesm2022/cmat-pipes-group-by.mjs +36 -0
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -0
- package/fesm2022/cmat-pipes-keys.mjs +33 -0
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -0
- package/fesm2022/cmat-pipes-secure.mjs +50 -0
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -0
- package/fesm2022/cmat-pipes-uppercase.mjs +24 -0
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -0
- package/fesm2022/cmat-services-alert.mjs +207 -0
- package/fesm2022/cmat-services-alert.mjs.map +1 -0
- package/fesm2022/cmat-services-config.mjs +69 -0
- package/fesm2022/cmat-services-config.mjs.map +1 -0
- package/fesm2022/cmat-services-confirmation.mjs +79 -0
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -0
- package/fesm2022/cmat-services-data.mjs +176 -0
- package/fesm2022/cmat-services-data.mjs.map +1 -0
- package/fesm2022/cmat-services-loading.mjs +104 -0
- package/fesm2022/cmat-services-loading.mjs.map +1 -0
- package/fesm2022/cmat-services-local-storage.mjs +29 -0
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -0
- package/fesm2022/cmat-services-media-watcher.mjs +62 -0
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -0
- package/fesm2022/cmat-services-platform.mjs +53 -0
- package/fesm2022/cmat-services-platform.mjs.map +1 -0
- package/fesm2022/cmat-services-splash-screen.mjs +49 -0
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -0
- package/fesm2022/cmat-services-title.mjs +53 -0
- package/fesm2022/cmat-services-title.mjs.map +1 -0
- package/fesm2022/cmat-services-translation.mjs +69 -0
- package/fesm2022/cmat-services-translation.mjs.map +1 -0
- package/fesm2022/cmat-services-utils.mjs +398 -0
- package/fesm2022/cmat-services-utils.mjs.map +1 -0
- package/fesm2022/cmat-validators.mjs +39 -0
- package/fesm2022/cmat-validators.mjs.map +1 -0
- package/fesm2022/cmat-version.mjs +17 -0
- package/fesm2022/cmat-version.mjs.map +1 -0
- package/fesm2022/cmat.mjs +4 -0
- package/fesm2022/cmat.mjs.map +1 -0
- package/icons/CSV.svg +3 -0
- package/icons/EXCEL.svg +3 -0
- package/icons/FILE.svg +3 -0
- package/icons/GIF.svg +3 -0
- package/icons/JPG.svg +3 -0
- package/icons/PDF.svg +3 -0
- package/icons/PNG.svg +3 -0
- package/icons/PPT.svg +3 -0
- package/icons/TEXT.svg +3 -0
- package/icons/VIDEO.svg +3 -0
- package/icons/WORD.svg +3 -0
- package/icons/ZIP.svg +3 -0
- package/icons/arrow-cursor.svg +3 -0
- package/icons/material-icons/heroicons-outline.svg +893 -0
- package/icons/material-icons/heroicons-solid.svg +958 -0
- package/icons/material-icons/material-outline.svg +3586 -0
- package/icons/material-icons/material-solid.svg +3586 -0
- package/index.d.ts +5 -0
- package/lib/mock-api/index.d.ts +5 -0
- package/lib/mock-api/mock-api.constants.d.ts +2 -0
- package/lib/mock-api/mock-api.interceptor.d.ts +12 -0
- package/lib/mock-api/mock-api.request-handler.d.ts +18 -0
- package/lib/mock-api/mock-api.service.d.ts +22 -0
- package/lib/mock-api/mock-api.types.d.ts +9 -0
- package/lib/mock-api/mock-api.utils.d.ts +3 -0
- package/lib/mock-api/public-api.d.ts +5 -0
- package/package.json +344 -0
- package/pipes/bytes/bytes.pipe.d.ts +7 -0
- package/pipes/bytes/index.d.ts +5 -0
- package/pipes/bytes/public-api.d.ts +1 -0
- package/pipes/date-format/date-format.pipe.d.ts +7 -0
- package/pipes/date-format/index.d.ts +5 -0
- package/pipes/date-format/public-api.d.ts +1 -0
- package/pipes/find-by-key/find-by-key.pipe.d.ts +7 -0
- package/pipes/find-by-key/index.d.ts +5 -0
- package/pipes/find-by-key/public-api.d.ts +1 -0
- package/pipes/group-by/group-by.pipe.d.ts +7 -0
- package/pipes/group-by/index.d.ts +5 -0
- package/pipes/group-by/public-api.d.ts +1 -0
- package/pipes/keys/index.d.ts +5 -0
- package/pipes/keys/keys.pipe.d.ts +7 -0
- package/pipes/keys/public-api.d.ts +1 -0
- package/pipes/secure/index.d.ts +5 -0
- package/pipes/secure/public-api.d.ts +1 -0
- package/pipes/secure/secure-pipe.d.ts +18 -0
- package/pipes/uppercase/index.d.ts +5 -0
- package/pipes/uppercase/public-api.d.ts +1 -0
- package/pipes/uppercase/uppercase.pipe.d.ts +7 -0
- package/public-api.d.ts +1 -0
- package/services/alert/alert.dialog.d.ts +11 -0
- package/services/alert/alert.message.d.ts +8 -0
- package/services/alert/alert.service.d.ts +37 -0
- package/services/alert/enum.d.ts +12 -0
- package/services/alert/index.d.ts +5 -0
- package/services/alert/public-api.d.ts +4 -0
- package/services/config/config.constants.d.ts +6 -0
- package/services/config/config.service.d.ts +11 -0
- package/services/config/index.d.ts +5 -0
- package/services/config/public-api.d.ts +3 -0
- package/services/config/urlStateConfig.service.d.ts +10 -0
- package/services/confirmation/confirmation.service.d.ts +12 -0
- package/services/confirmation/confirmation.types.d.ts +21 -0
- package/services/confirmation/dialog/dialog.component.d.ts +10 -0
- package/services/confirmation/index.d.ts +5 -0
- package/services/confirmation/public-api.d.ts +2 -0
- package/services/data/data.service.d.ts +20 -0
- package/services/data/index.d.ts +5 -0
- package/services/data/public-api.d.ts +1 -0
- package/services/loading/index.d.ts +5 -0
- package/services/loading/loading.interceptor.d.ts +12 -0
- package/services/loading/loading.service.d.ts +24 -0
- package/services/loading/public-api.d.ts +2 -0
- package/services/local-storage/index.d.ts +5 -0
- package/services/local-storage/local-storage.service.d.ts +8 -0
- package/services/local-storage/public-api.d.ts +1 -0
- package/services/media-watcher/index.d.ts +5 -0
- package/services/media-watcher/media-watcher.service.d.ts +20 -0
- package/services/media-watcher/public-api.d.ts +1 -0
- package/services/platform/index.d.ts +5 -0
- package/services/platform/platform.service.d.ts +9 -0
- package/services/platform/public-api.d.ts +1 -0
- package/services/splash-screen/index.d.ts +5 -0
- package/services/splash-screen/public-api.d.ts +1 -0
- package/services/splash-screen/splash-screen.service.d.ts +14 -0
- package/services/title/index.d.ts +5 -0
- package/services/title/public-api.d.ts +1 -0
- package/services/title/title.service.d.ts +13 -0
- package/services/translation/index.d.ts +5 -0
- package/services/translation/public-api.d.ts +1 -0
- package/services/translation/translation.service.d.ts +20 -0
- package/services/utils/index.d.ts +5 -0
- package/services/utils/public-api.d.ts +1 -0
- package/services/utils/utils.service.d.ts +57 -0
- package/styles/components/input.scss +42 -0
- package/styles/main.scss +9 -0
- package/styles/overrides/angular-material.scss +1403 -0
- package/styles/overrides/fullcalendar.scss +550 -0
- package/styles/overrides/highlightjs.scss +81 -0
- package/styles/styles.scss +3 -0
- package/styles/tailwind.scss +86 -0
- package/styles/themes.scss +164 -0
- package/styles/user-themes.scss +1 -0
- package/tailwind/plugins/icon-size.js +49 -0
- package/tailwind/plugins/theming.js +256 -0
- package/tailwind/plugins/utilities.js +66 -0
- package/tailwind/utils/generate-contrasts.js +29 -0
- package/tailwind/utils/generate-palette.js +100 -0
- package/tailwind/utils/json-to-sass-map.js +67 -0
- package/validators/index.d.ts +5 -0
- package/validators/public-api.d.ts +1 -0
- package/validators/validators.d.ts +5 -0
- package/version/index.d.ts +5 -0
- package/version/public-api.d.ts +1 -0
- package/version/version.d.ts +9 -0
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Injectable, Directive, Input, Output, Component, ChangeDetectionStrategy, ViewEncapsulation, Pipe } from '@angular/core';
|
|
3
|
+
import { Subject, takeUntil } from 'rxjs';
|
|
4
|
+
import * as i5 from '@angular/material/select';
|
|
5
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
6
|
+
import { CmatDigitOnlyDirective } from 'cmat/directives/digit-only';
|
|
7
|
+
import * as i4 from '@angular/material/input';
|
|
8
|
+
import { MatInputModule } from '@angular/material/input';
|
|
9
|
+
import * as i3 from '@angular/material/form-field';
|
|
10
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
11
|
+
import * as i2 from '@angular/material/icon';
|
|
12
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
+
import { NgIf, NgFor, NgStyle, DecimalPipe } from '@angular/common';
|
|
14
|
+
import * as i1 from 'cmat/services/media-watcher';
|
|
15
|
+
import * as i6 from '@angular/material/core';
|
|
16
|
+
import { isNil } from 'lodash-es';
|
|
17
|
+
|
|
18
|
+
class CmatPaginationService {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.change = new EventEmitter();
|
|
21
|
+
this._instances = {};
|
|
22
|
+
this._defaultPaginationId = 'DEFAULT_PAGINATION_ID';
|
|
23
|
+
}
|
|
24
|
+
defaultId() { return this._defaultPaginationId; }
|
|
25
|
+
register(instance) {
|
|
26
|
+
if (instance.id == null) {
|
|
27
|
+
instance.id = this._defaultPaginationId;
|
|
28
|
+
}
|
|
29
|
+
if (!this._instances[instance.id]) {
|
|
30
|
+
this._instances[instance.id] = instance;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return this._updateInstance(instance);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
getCurrentPage(id) {
|
|
38
|
+
if (this._instances[id]) {
|
|
39
|
+
return this._instances[id].currentPage;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
getItemsPerPage(id) {
|
|
43
|
+
if (this._instances[id]) {
|
|
44
|
+
return this._instances[id].itemsPerPage;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
setCurrentPage(id, page) {
|
|
48
|
+
if (this._instances[id]) {
|
|
49
|
+
const instance = this._instances[id];
|
|
50
|
+
const maxPage = Math.ceil(instance.totalItems / instance.itemsPerPage);
|
|
51
|
+
if (page <= maxPage && 1 <= page) {
|
|
52
|
+
this._instances[id].currentPage = page;
|
|
53
|
+
this.change.emit(id);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
setTotalItems(id, totalItems) {
|
|
58
|
+
if (this._instances[id] && 0 <= totalItems) {
|
|
59
|
+
this._instances[id].totalItems = totalItems;
|
|
60
|
+
this.change.emit(id);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
setItemsPerPage(id, itemsPerPage) {
|
|
64
|
+
if (this._instances[id]) {
|
|
65
|
+
this._instances[id].itemsPerPage = itemsPerPage;
|
|
66
|
+
this.change.emit(id);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
getInstance(id = this._defaultPaginationId) {
|
|
70
|
+
if (this._instances[id]) {
|
|
71
|
+
return this._clone(this._instances[id]);
|
|
72
|
+
}
|
|
73
|
+
return {};
|
|
74
|
+
}
|
|
75
|
+
_updateInstance(instance) {
|
|
76
|
+
let changed = false;
|
|
77
|
+
if (instance.id) {
|
|
78
|
+
for (const prop in this._instances[instance.id]) {
|
|
79
|
+
if (instance[prop] !== this._instances[instance.id][prop]) {
|
|
80
|
+
this._instances[instance.id][prop] = instance[prop];
|
|
81
|
+
changed = true;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return changed;
|
|
86
|
+
}
|
|
87
|
+
_clone(obj) {
|
|
88
|
+
const target = {};
|
|
89
|
+
for (const i in obj) {
|
|
90
|
+
if (Object.prototype.hasOwnProperty.call(obj, i)) {
|
|
91
|
+
target[i] = obj[i];
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return target;
|
|
95
|
+
}
|
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatPaginationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
97
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatPaginationService, providedIn: 'root' }); }
|
|
98
|
+
}
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatPaginationService, decorators: [{
|
|
100
|
+
type: Injectable,
|
|
101
|
+
args: [{
|
|
102
|
+
providedIn: 'root'
|
|
103
|
+
}]
|
|
104
|
+
}] });
|
|
105
|
+
|
|
106
|
+
class CmatPaginationDirective {
|
|
107
|
+
constructor(service, changeDetectorRef) {
|
|
108
|
+
this.service = service;
|
|
109
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
110
|
+
this.maxSize = 7;
|
|
111
|
+
this.pageChange = new EventEmitter();
|
|
112
|
+
this.pageBoundsCorrection = new EventEmitter();
|
|
113
|
+
this.perPageCountChange = new EventEmitter();
|
|
114
|
+
this.pages = [];
|
|
115
|
+
this._unsubscribeAll = new Subject();
|
|
116
|
+
this.service.change.pipe(takeUntil(this._unsubscribeAll))
|
|
117
|
+
.subscribe((id) => {
|
|
118
|
+
if (this.id === id) {
|
|
119
|
+
this._updatePageLinks();
|
|
120
|
+
this.changeDetectorRef.markForCheck();
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
ngOnInit() {
|
|
125
|
+
if (this.id === undefined) {
|
|
126
|
+
this.id = this.service.defaultId();
|
|
127
|
+
}
|
|
128
|
+
this._updatePageLinks();
|
|
129
|
+
}
|
|
130
|
+
ngOnChanges() {
|
|
131
|
+
this._updatePageLinks();
|
|
132
|
+
}
|
|
133
|
+
ngOnDestroy() {
|
|
134
|
+
this._unsubscribeAll.next(void 0);
|
|
135
|
+
this._unsubscribeAll.complete();
|
|
136
|
+
}
|
|
137
|
+
previous() {
|
|
138
|
+
if (!this.isFirstPage()) {
|
|
139
|
+
this._checkValidId();
|
|
140
|
+
const current = this.getCurrent();
|
|
141
|
+
if (current)
|
|
142
|
+
this.setCurrent(current - 1);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
next() {
|
|
146
|
+
if (!this.isLastPage()) {
|
|
147
|
+
this._checkValidId();
|
|
148
|
+
const current = this.getCurrent();
|
|
149
|
+
if (current)
|
|
150
|
+
this.setCurrent(current + 1);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
goFirstPage() {
|
|
154
|
+
if (!this.isFirstPage()) {
|
|
155
|
+
this._checkValidId();
|
|
156
|
+
this.setCurrent(1);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
goLastPage() {
|
|
160
|
+
if (!this.isLastPage()) {
|
|
161
|
+
this._checkValidId();
|
|
162
|
+
const lastPage = this.getLastPage();
|
|
163
|
+
if (lastPage)
|
|
164
|
+
this.setCurrent(lastPage);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
isFirstPage() {
|
|
168
|
+
return this.getCurrent() === 1;
|
|
169
|
+
}
|
|
170
|
+
isLastPage() {
|
|
171
|
+
return this.getLastPage() === this.getCurrent();
|
|
172
|
+
}
|
|
173
|
+
setCurrent(page) {
|
|
174
|
+
this.pageChange.emit(page);
|
|
175
|
+
}
|
|
176
|
+
getCurrent() {
|
|
177
|
+
return this.service.getCurrentPage(this.id);
|
|
178
|
+
}
|
|
179
|
+
getLastPage() {
|
|
180
|
+
const inst = this.service.getInstance(this.id);
|
|
181
|
+
if (inst.totalItems < 1) {
|
|
182
|
+
// when there are 0 or fewer (an error case) items, there are no "pages" as such,
|
|
183
|
+
// but it makes sense to consider a single, empty page as the last page.
|
|
184
|
+
return 1;
|
|
185
|
+
}
|
|
186
|
+
return Math.ceil(inst.totalItems / inst.itemsPerPage);
|
|
187
|
+
}
|
|
188
|
+
getTotalItems() {
|
|
189
|
+
return this.service.getInstance(this.id).totalItems;
|
|
190
|
+
}
|
|
191
|
+
setItemsPerPage(count) {
|
|
192
|
+
this.service.setItemsPerPage(this.id, count);
|
|
193
|
+
this.perPageCountChange.emit(count);
|
|
194
|
+
const inst = this.service.getInstance(this.id);
|
|
195
|
+
this.setCurrent(this._outOfBoundCorrection(inst));
|
|
196
|
+
}
|
|
197
|
+
_checkValidId() {
|
|
198
|
+
if (this.service.getInstance(this.id).id == null) {
|
|
199
|
+
console.warn(`PaginationControlsDirective: the specified id "${this.id}" does not match any registered PaginationInstance`);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
_updatePageLinks() {
|
|
203
|
+
const inst = this.service.getInstance(this.id);
|
|
204
|
+
const correctedCurrentPage = this._outOfBoundCorrection(inst);
|
|
205
|
+
if (correctedCurrentPage !== inst.currentPage) {
|
|
206
|
+
setTimeout(() => {
|
|
207
|
+
this.pageBoundsCorrection.emit(correctedCurrentPage);
|
|
208
|
+
this.pages = this._createPageArray(inst.currentPage, inst.itemsPerPage, inst.totalItems, this.maxSize);
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
this.pages = this._createPageArray(inst.currentPage, inst.itemsPerPage, inst.totalItems, this.maxSize);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
_outOfBoundCorrection(instance) {
|
|
216
|
+
const totalPages = Math.ceil(instance.totalItems / instance.itemsPerPage);
|
|
217
|
+
if (totalPages < instance.currentPage && 0 < totalPages) {
|
|
218
|
+
return totalPages;
|
|
219
|
+
}
|
|
220
|
+
else if (instance.currentPage < 1) {
|
|
221
|
+
return 1;
|
|
222
|
+
}
|
|
223
|
+
return instance.currentPage;
|
|
224
|
+
}
|
|
225
|
+
_createPageArray(currentPage, itemsPerPage, totalItems, paginationRange) {
|
|
226
|
+
paginationRange = +paginationRange;
|
|
227
|
+
const pages = [];
|
|
228
|
+
const totalPages = Math.max(Math.ceil(totalItems / itemsPerPage), 1);
|
|
229
|
+
const halfWay = Math.ceil(paginationRange / 2);
|
|
230
|
+
const isStart = currentPage <= halfWay;
|
|
231
|
+
const isEnd = totalPages - halfWay < currentPage;
|
|
232
|
+
const isMiddle = !isStart && !isEnd;
|
|
233
|
+
const ellipsesNeeded = paginationRange < totalPages;
|
|
234
|
+
let i = 1;
|
|
235
|
+
while (i <= totalPages && i <= paginationRange) {
|
|
236
|
+
let label;
|
|
237
|
+
const pageNumber = this._calculatePageNumber(i, currentPage, paginationRange, totalPages);
|
|
238
|
+
const openingEllipsesNeeded = (i === 2 && (isMiddle || isEnd));
|
|
239
|
+
const closingEllipsesNeeded = (i === paginationRange - 1 && (isMiddle || isStart));
|
|
240
|
+
if (ellipsesNeeded && (openingEllipsesNeeded || closingEllipsesNeeded)) {
|
|
241
|
+
label = '...';
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
label = pageNumber;
|
|
245
|
+
}
|
|
246
|
+
pages.push({
|
|
247
|
+
label: label,
|
|
248
|
+
value: pageNumber
|
|
249
|
+
});
|
|
250
|
+
i++;
|
|
251
|
+
}
|
|
252
|
+
return pages;
|
|
253
|
+
}
|
|
254
|
+
_calculatePageNumber(i, currentPage, paginationRange, totalPages) {
|
|
255
|
+
const halfWay = Math.ceil(paginationRange / 2);
|
|
256
|
+
if (i === paginationRange) {
|
|
257
|
+
return totalPages;
|
|
258
|
+
}
|
|
259
|
+
else if (i === 1) {
|
|
260
|
+
return i;
|
|
261
|
+
}
|
|
262
|
+
else if (paginationRange < totalPages) {
|
|
263
|
+
if (totalPages - halfWay < currentPage) {
|
|
264
|
+
return totalPages - paginationRange + i;
|
|
265
|
+
}
|
|
266
|
+
else if (halfWay < currentPage) {
|
|
267
|
+
return currentPage - halfWay + i;
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
return i;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
return i;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatPaginationDirective, deps: [{ token: CmatPaginationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
278
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0", type: CmatPaginationDirective, isStandalone: true, selector: "pagination-template,[pagination-template]", inputs: { id: "id", maxSize: "maxSize" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection", perPageCountChange: "perPageCountChange" }, exportAs: ["paginationApi"], usesOnChanges: true, ngImport: i0 }); }
|
|
279
|
+
}
|
|
280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatPaginationDirective, decorators: [{
|
|
281
|
+
type: Directive,
|
|
282
|
+
args: [{
|
|
283
|
+
selector: 'pagination-template,[pagination-template]',
|
|
284
|
+
exportAs: 'paginationApi',
|
|
285
|
+
standalone: true
|
|
286
|
+
}]
|
|
287
|
+
}], ctorParameters: () => [{ type: CmatPaginationService }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{
|
|
288
|
+
type: Input
|
|
289
|
+
}], maxSize: [{
|
|
290
|
+
type: Input
|
|
291
|
+
}], pageChange: [{
|
|
292
|
+
type: Output
|
|
293
|
+
}], pageBoundsCorrection: [{
|
|
294
|
+
type: Output
|
|
295
|
+
}], perPageCountChange: [{
|
|
296
|
+
type: Output
|
|
297
|
+
}] } });
|
|
298
|
+
|
|
299
|
+
class CmatPaginationComponent {
|
|
300
|
+
constructor(_cmatMediaWatcherService, _changeDetectorRef) {
|
|
301
|
+
this._cmatMediaWatcherService = _cmatMediaWatcherService;
|
|
302
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
303
|
+
this.pageChange = new EventEmitter();
|
|
304
|
+
this.pageBoundsCorrection = new EventEmitter();
|
|
305
|
+
this.perPageCountChange = new EventEmitter();
|
|
306
|
+
this.maxSize = 7;
|
|
307
|
+
this.itemsPerPages = [10, 20, 30];
|
|
308
|
+
this.initPerPage = 10;
|
|
309
|
+
this._autoHide = false;
|
|
310
|
+
this._unsubscribeAll = new Subject();
|
|
311
|
+
}
|
|
312
|
+
get autoHide() {
|
|
313
|
+
return this._autoHide;
|
|
314
|
+
}
|
|
315
|
+
set autoHide(value) {
|
|
316
|
+
this._autoHide = !!value;
|
|
317
|
+
}
|
|
318
|
+
ngOnInit() {
|
|
319
|
+
this._cmatMediaWatcherService.onMediaChange$
|
|
320
|
+
.pipe(takeUntil(this._unsubscribeAll))
|
|
321
|
+
.subscribe(({ matchingAliases }) => {
|
|
322
|
+
this.isScreenSmall = !matchingAliases.includes('md');
|
|
323
|
+
this._changeDetectorRef.markForCheck();
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
trackByIndex(index) {
|
|
327
|
+
return index;
|
|
328
|
+
}
|
|
329
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatPaginationComponent, deps: [{ token: i1.CmatMediaWatcherService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
330
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.0", type: CmatPaginationComponent, isStandalone: true, selector: "cmat-pagination", inputs: { id: "id", maxSize: "maxSize", itemsPerPages: "itemsPerPages", initPerPage: "initPerPage", autoHide: "autoHide" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection", perPageCountChange: "perPageCountChange" }, exportAs: ["cmatPagination"], ngImport: i0, template: "<pagination-template #p=\"paginationApi\" [id]=\"id\" [maxSize]=\"isScreenSmall&&maxSize>5?5:maxSize\"\r\n (pageChange)=\"pageChange.emit($event)\" class=\"w-full px-4 py-2 flex\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n <div class=\"hidden md:flex flex-auto items-center\">\r\n <span>\u603B\u8BA1:{{p.getTotalItems()}}</span>\r\n </div>\r\n <nav role=\"navigation\" class=\"flex min-h-12 w-full md:w-0\">\r\n <ul *ngIf=\"!(autoHide && p.pages.length <= 1)\"\r\n class=\"flex flex-row space-x-6 items-center justify-center md:justify-end w-full\">\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.goFirstPage()\"\r\n [disabled]=\"p.getCurrent()===1\">\r\n <mat-icon svgIcon=\"mat_solid:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.previous()\"\r\n [disabled]=\"p.getCurrent()===1\">\r\n <mat-icon svgIcon=\"mat_solid:navigate_before\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <li class=\"flex text-xl lg:text-2xl\" *ngFor=\"let page of p.pages; trackBy: trackByIndex\">\r\n <a tabindex=\"0\" (click)=\"p.setCurrent(page.value)\" *ngIf=\"p.getCurrent() !== page.value\"\r\n role=\"presentation\" class=\"cursor-pointer text-gray-400 hover:text-black\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </a>\r\n <ng-container *ngIf=\"p.getCurrent() === page.value\">\r\n <span class=\"text-black\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </span>\r\n </ng-container>\r\n </li>\r\n\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.next()\"\r\n [disabled]=\"p.getCurrent()===p.getLastPage()\">\r\n <mat-icon svgIcon=\"mat_solid:navigate_next\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.goLastPage()\"\r\n [disabled]=\"p.getCurrent()===p.getLastPage()\">\r\n <mat-icon svgIcon=\"mat_solid:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field [ngStyle]=\"{'width':((p.getLastPage()?.toString()?.length||0)*8+64)+'px'}\">\r\n <input matInput #current [value]=\"p.getCurrent()\" [autocomplete]=\"'off'\" [min]=\"0\"\r\n [max]=\"p.getLastPage()||0\" type=\"text\" cmatDigitOnly\r\n (keyup.enter)=\"p.setCurrent(current.value)\">\r\n <span matSuffix>/{{p.getLastPage()}}</span>\r\n </mat-form-field>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field class=\"w-24\">\r\n <mat-select name=\"pageCount\" #pageCount [value]=\"initPerPage\"\r\n (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n <mat-option *ngFor=\"let perPage of itemsPerPages\" [value]=\"perPage\">\r\n {{perPage}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n </nav>\r\n</pagination-template>", dependencies: [{ kind: "directive", type: CmatPaginationDirective, selector: "pagination-template,[pagination-template]", inputs: ["id", "maxSize"], outputs: ["pageChange", "pageBoundsCorrection", "perPageCountChange"], exportAs: ["paginationApi"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
331
|
+
}
|
|
332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatPaginationComponent, decorators: [{
|
|
333
|
+
type: Component,
|
|
334
|
+
args: [{ selector: 'cmat-pagination', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'cmatPagination', standalone: true, imports: [CmatPaginationDirective, NgIf, MatIconModule, NgFor, NgStyle,
|
|
335
|
+
MatFormFieldModule, MatInputModule, CmatDigitOnlyDirective, MatSelectModule, DecimalPipe], template: "<pagination-template #p=\"paginationApi\" [id]=\"id\" [maxSize]=\"isScreenSmall&&maxSize>5?5:maxSize\"\r\n (pageChange)=\"pageChange.emit($event)\" class=\"w-full px-4 py-2 flex\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n <div class=\"hidden md:flex flex-auto items-center\">\r\n <span>\u603B\u8BA1:{{p.getTotalItems()}}</span>\r\n </div>\r\n <nav role=\"navigation\" class=\"flex min-h-12 w-full md:w-0\">\r\n <ul *ngIf=\"!(autoHide && p.pages.length <= 1)\"\r\n class=\"flex flex-row space-x-6 items-center justify-center md:justify-end w-full\">\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.goFirstPage()\"\r\n [disabled]=\"p.getCurrent()===1\">\r\n <mat-icon svgIcon=\"mat_solid:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.previous()\"\r\n [disabled]=\"p.getCurrent()===1\">\r\n <mat-icon svgIcon=\"mat_solid:navigate_before\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <li class=\"flex text-xl lg:text-2xl\" *ngFor=\"let page of p.pages; trackBy: trackByIndex\">\r\n <a tabindex=\"0\" (click)=\"p.setCurrent(page.value)\" *ngIf=\"p.getCurrent() !== page.value\"\r\n role=\"presentation\" class=\"cursor-pointer text-gray-400 hover:text-black\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </a>\r\n <ng-container *ngIf=\"p.getCurrent() === page.value\">\r\n <span class=\"text-black\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </span>\r\n </ng-container>\r\n </li>\r\n\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.next()\"\r\n [disabled]=\"p.getCurrent()===p.getLastPage()\">\r\n <mat-icon svgIcon=\"mat_solid:navigate_next\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.goLastPage()\"\r\n [disabled]=\"p.getCurrent()===p.getLastPage()\">\r\n <mat-icon svgIcon=\"mat_solid:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field [ngStyle]=\"{'width':((p.getLastPage()?.toString()?.length||0)*8+64)+'px'}\">\r\n <input matInput #current [value]=\"p.getCurrent()\" [autocomplete]=\"'off'\" [min]=\"0\"\r\n [max]=\"p.getLastPage()||0\" type=\"text\" cmatDigitOnly\r\n (keyup.enter)=\"p.setCurrent(current.value)\">\r\n <span matSuffix>/{{p.getLastPage()}}</span>\r\n </mat-form-field>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field class=\"w-24\">\r\n <mat-select name=\"pageCount\" #pageCount [value]=\"initPerPage\"\r\n (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n <mat-option *ngFor=\"let perPage of itemsPerPages\" [value]=\"perPage\">\r\n {{perPage}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n </nav>\r\n</pagination-template>" }]
|
|
336
|
+
}], ctorParameters: () => [{ type: i1.CmatMediaWatcherService }, { type: i0.ChangeDetectorRef }], propDecorators: { pageChange: [{
|
|
337
|
+
type: Output
|
|
338
|
+
}], pageBoundsCorrection: [{
|
|
339
|
+
type: Output
|
|
340
|
+
}], perPageCountChange: [{
|
|
341
|
+
type: Output
|
|
342
|
+
}], id: [{
|
|
343
|
+
type: Input
|
|
344
|
+
}], maxSize: [{
|
|
345
|
+
type: Input
|
|
346
|
+
}], itemsPerPages: [{
|
|
347
|
+
type: Input
|
|
348
|
+
}], initPerPage: [{
|
|
349
|
+
type: Input
|
|
350
|
+
}], autoHide: [{
|
|
351
|
+
type: Input
|
|
352
|
+
}] } });
|
|
353
|
+
|
|
354
|
+
const LARGE_NUMBER = Number.MAX_SAFE_INTEGER;
|
|
355
|
+
class CmatPaginatePipe {
|
|
356
|
+
constructor(service) {
|
|
357
|
+
this.service = service;
|
|
358
|
+
this.state = {};
|
|
359
|
+
}
|
|
360
|
+
transform(collection, args) {
|
|
361
|
+
if (!(collection instanceof Array)) {
|
|
362
|
+
const _id = args.id || this.service.defaultId();
|
|
363
|
+
if (this.state[_id]) {
|
|
364
|
+
return this.state[_id].slice;
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
return collection;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
const serverSideMode = args.totalItems && args.totalItems !== collection.length;
|
|
371
|
+
const instance = this.createInstance(collection, args);
|
|
372
|
+
const id = instance.id;
|
|
373
|
+
let start;
|
|
374
|
+
let end;
|
|
375
|
+
let perPage = args.itemsPerPage;
|
|
376
|
+
const emitChange = this.service.register(instance);
|
|
377
|
+
if (!serverSideMode && collection instanceof Array) {
|
|
378
|
+
perPage = +perPage || LARGE_NUMBER;
|
|
379
|
+
start = (instance.currentPage - 1) * perPage;
|
|
380
|
+
end = start + perPage;
|
|
381
|
+
const isIdentical = this._stateIsIdentical(id, collection, start, end);
|
|
382
|
+
if (isIdentical) {
|
|
383
|
+
return this.state[id].slice;
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
const slice = collection.slice(start, end);
|
|
387
|
+
this._saveState(id, collection, slice, start, end);
|
|
388
|
+
this.service.change.emit(id);
|
|
389
|
+
return slice;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
if (emitChange) {
|
|
394
|
+
this.service.change.emit(id);
|
|
395
|
+
}
|
|
396
|
+
this._saveState(id, collection, collection, start, end);
|
|
397
|
+
return collection;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
createInstance(collection, config) {
|
|
401
|
+
this.checkConfig(config);
|
|
402
|
+
return {
|
|
403
|
+
id: isNil(config.id) ? config.id : this.service.defaultId(),
|
|
404
|
+
itemsPerPage: +config.itemsPerPage || 10,
|
|
405
|
+
currentPage: +config.currentPage || 1,
|
|
406
|
+
totalItems: +config.totalItems || collection.length
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
checkConfig(config) {
|
|
410
|
+
const required = ['itemsPerPage', 'currentPage'];
|
|
411
|
+
const missing = required.filter(prop => !(prop in config));
|
|
412
|
+
if (0 < missing.length) {
|
|
413
|
+
throw new Error(`PaginatePipe: Argument is missing the following required properties: ${missing.join(', ')}`);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
_saveState(id, collection, slice, start, end) {
|
|
417
|
+
this.state[id] = {
|
|
418
|
+
collection,
|
|
419
|
+
size: collection.length,
|
|
420
|
+
slice,
|
|
421
|
+
start,
|
|
422
|
+
end
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
_stateIsIdentical(id, collection, start, end) {
|
|
426
|
+
const state = this.state[id];
|
|
427
|
+
if (!state) {
|
|
428
|
+
return false;
|
|
429
|
+
}
|
|
430
|
+
const isMetaDataIdentical = state.size === collection.length &&
|
|
431
|
+
state.start === start &&
|
|
432
|
+
state.end === end;
|
|
433
|
+
if (!isMetaDataIdentical) {
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
return state.slice.every((element, index) => element === collection[start + index]);
|
|
437
|
+
}
|
|
438
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatPaginatePipe, deps: [{ token: CmatPaginationService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
439
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: CmatPaginatePipe, isStandalone: true, name: "paginate" }); }
|
|
440
|
+
}
|
|
441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatPaginatePipe, decorators: [{
|
|
442
|
+
type: Pipe,
|
|
443
|
+
args: [{
|
|
444
|
+
name: 'paginate',
|
|
445
|
+
pure: true,
|
|
446
|
+
standalone: true
|
|
447
|
+
}]
|
|
448
|
+
}], ctorParameters: () => [{ type: CmatPaginationService }] });
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Generated bundle index. Do not edit.
|
|
452
|
+
*/
|
|
453
|
+
|
|
454
|
+
export { CmatPaginatePipe, CmatPaginationComponent, CmatPaginationDirective, CmatPaginationService };
|
|
455
|
+
//# sourceMappingURL=cmat-components-pagination.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmat-components-pagination.mjs","sources":["../../../projects/cmat/components/pagination/pagination.service.ts","../../../projects/cmat/components/pagination/pagination.directive.ts","../../../projects/cmat/components/pagination/pagination.component.ts","../../../projects/cmat/components/pagination/pagination.component.html","../../../projects/cmat/components/pagination/pagination.pipe.ts","../../../projects/cmat/components/pagination/cmat-components-pagination.ts"],"sourcesContent":["import { EventEmitter, Injectable } from '@angular/core';\r\nimport { CmatPaginationInstance } from './pagination.instance';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatPaginationService {\r\n public change: EventEmitter<string> = new EventEmitter<string>();\r\n\r\n private _instances: { [id: string]: CmatPaginationInstance } = {};\r\n private _defaultPaginationId = 'DEFAULT_PAGINATION_ID';\r\n\r\n public defaultId(): string { return this._defaultPaginationId; }\r\n\r\n public register(instance: CmatPaginationInstance): boolean {\r\n if (instance.id == null) {\r\n instance.id = this._defaultPaginationId;\r\n }\r\n\r\n if (!this._instances[instance.id]) {\r\n this._instances[instance.id] = instance;\r\n return true;\r\n } else {\r\n return this._updateInstance(instance);\r\n }\r\n }\r\n\r\n public getCurrentPage(id: string): number | void {\r\n if (this._instances[id]) {\r\n return this._instances[id].currentPage;\r\n }\r\n }\r\n\r\n public getItemsPerPage(id: string): number | void {\r\n if (this._instances[id]) {\r\n return this._instances[id].itemsPerPage;\r\n }\r\n }\r\n\r\n public setCurrentPage(id: string, page: number): void {\r\n if (this._instances[id]) {\r\n const instance = this._instances[id];\r\n const maxPage = Math.ceil(instance.totalItems / instance.itemsPerPage);\r\n if (page <= maxPage && 1 <= page) {\r\n this._instances[id].currentPage = page;\r\n this.change.emit(id);\r\n }\r\n }\r\n }\r\n\r\n public setTotalItems(id: string, totalItems: number): void {\r\n if (this._instances[id] && 0 <= totalItems) {\r\n this._instances[id].totalItems = totalItems;\r\n this.change.emit(id);\r\n }\r\n }\r\n\r\n public setItemsPerPage(id: string, itemsPerPage: number): void {\r\n if (this._instances[id]) {\r\n this._instances[id].itemsPerPage = itemsPerPage;\r\n this.change.emit(id);\r\n }\r\n }\r\n\r\n public getInstance(id: string = this._defaultPaginationId): CmatPaginationInstance {\r\n if (this._instances[id]) {\r\n return this._clone(this._instances[id]);\r\n }\r\n return {} as CmatPaginationInstance;\r\n }\r\n\r\n private _updateInstance(instance: CmatPaginationInstance): boolean {\r\n let changed = false;\r\n if (instance.id) {\r\n for (const prop in this._instances[instance.id]) {\r\n if (instance[prop] !== this._instances[instance.id][prop]) {\r\n this._instances[instance.id][prop] = instance[prop];\r\n changed = true;\r\n }\r\n }\r\n }\r\n return changed;\r\n }\r\n\r\n private _clone(obj: any): any {\r\n const target: any = {};\r\n for (const i in obj) {\r\n if (Object.prototype.hasOwnProperty.call(obj, i)) {\r\n target[i] = obj[i];\r\n }\r\n }\r\n return target;\r\n }\r\n}\r\n","import { ChangeDetectorRef, Directive, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { Subject, takeUntil } from 'rxjs';\r\n\r\nimport { CmatPaginationService } from './pagination.service';\r\nimport { CmatPaginationInstance } from './pagination.instance';\r\n\r\nexport interface Page {\r\n label: string;\r\n value: any;\r\n}\r\n@Directive({\r\n selector: 'pagination-template,[pagination-template]',\r\n exportAs: 'paginationApi',\r\n standalone: true\r\n})\r\nexport class CmatPaginationDirective implements OnInit, OnChanges, OnDestroy {\r\n @Input() id: string;\r\n @Input() maxSize: number = 7;\r\n @Output() pageChange: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() pageBoundsCorrection: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() perPageCountChange: EventEmitter<number> = new EventEmitter<number>();\r\n\r\n pages: Page[] = [];\r\n\r\n private _unsubscribeAll: Subject<any> = new Subject<any>();\r\n\r\n constructor(private service: CmatPaginationService,\r\n private changeDetectorRef: ChangeDetectorRef) {\r\n this.service.change.pipe(\r\n takeUntil(this._unsubscribeAll))\r\n .subscribe((id) => {\r\n if (this.id === id) {\r\n this._updatePageLinks();\r\n this.changeDetectorRef.markForCheck();\r\n }\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.id === undefined) {\r\n this.id = this.service.defaultId();\r\n }\r\n this._updatePageLinks();\r\n }\r\n\r\n ngOnChanges(): void {\r\n this._updatePageLinks();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n previous(): void {\r\n if (!this.isFirstPage()) {\r\n this._checkValidId();\r\n\r\n const current = this.getCurrent();\r\n if (current)\r\n this.setCurrent(current - 1);\r\n }\r\n }\r\n\r\n next(): void {\r\n if (!this.isLastPage()) {\r\n this._checkValidId();\r\n\r\n const current = this.getCurrent();\r\n if (current)\r\n this.setCurrent(current + 1);\r\n }\r\n }\r\n\r\n goFirstPage(): void {\r\n if (!this.isFirstPage()) {\r\n this._checkValidId();\r\n\r\n this.setCurrent(1);\r\n }\r\n }\r\n\r\n goLastPage(): void {\r\n if (!this.isLastPage()) {\r\n this._checkValidId();\r\n\r\n const lastPage = this.getLastPage();\r\n if (lastPage)\r\n this.setCurrent(lastPage);\r\n }\r\n }\r\n\r\n isFirstPage(): boolean {\r\n return this.getCurrent() === 1;\r\n }\r\n\r\n isLastPage(): boolean {\r\n return this.getLastPage() === this.getCurrent();\r\n }\r\n\r\n setCurrent(page: number | string): void {\r\n this.pageChange.emit(page as number);\r\n }\r\n\r\n getCurrent(): number | void {\r\n return this.service.getCurrentPage(this.id);\r\n }\r\n\r\n getLastPage(): number | void {\r\n const inst = this.service.getInstance(this.id);\r\n if (inst.totalItems < 1) {\r\n // when there are 0 or fewer (an error case) items, there are no \"pages\" as such,\r\n // but it makes sense to consider a single, empty page as the last page.\r\n return 1;\r\n }\r\n return Math.ceil(inst.totalItems / inst.itemsPerPage);\r\n }\r\n\r\n getTotalItems(): number | void {\r\n return this.service.getInstance(this.id).totalItems;\r\n }\r\n\r\n setItemsPerPage(count: number): void {\r\n this.service.setItemsPerPage(this.id, count);\r\n\r\n this.perPageCountChange.emit(count);\r\n const inst = this.service.getInstance(this.id);\r\n this.setCurrent(this._outOfBoundCorrection(inst));\r\n }\r\n\r\n private _checkValidId(): void {\r\n if (this.service.getInstance(this.id).id == null) {\r\n console.warn(`PaginationControlsDirective: the specified id \"${this.id}\" does not match any registered PaginationInstance`);\r\n }\r\n }\r\n\r\n private _updatePageLinks(): void {\r\n const inst = this.service.getInstance(this.id);\r\n const correctedCurrentPage = this._outOfBoundCorrection(inst);\r\n\r\n if (correctedCurrentPage !== inst.currentPage) {\r\n setTimeout(() => {\r\n this.pageBoundsCorrection.emit(correctedCurrentPage);\r\n this.pages = this._createPageArray(inst.currentPage, inst.itemsPerPage, inst.totalItems, this.maxSize);\r\n });\r\n } else {\r\n this.pages = this._createPageArray(inst.currentPage, inst.itemsPerPage, inst.totalItems, this.maxSize);\r\n }\r\n }\r\n\r\n private _outOfBoundCorrection(instance: CmatPaginationInstance): number {\r\n const totalPages = Math.ceil(instance.totalItems / instance.itemsPerPage);\r\n if (totalPages < instance.currentPage && 0 < totalPages) {\r\n return totalPages;\r\n } else if (instance.currentPage < 1) {\r\n return 1;\r\n }\r\n\r\n return instance.currentPage;\r\n }\r\n\r\n private _createPageArray(currentPage: number, itemsPerPage: number, totalItems: number, paginationRange: number): Page[] {\r\n paginationRange = +paginationRange;\r\n const pages = [];\r\n\r\n const totalPages = Math.max(Math.ceil(totalItems / itemsPerPage), 1);\r\n const halfWay = Math.ceil(paginationRange / 2);\r\n\r\n const isStart = currentPage <= halfWay;\r\n const isEnd = totalPages - halfWay < currentPage;\r\n const isMiddle = !isStart && !isEnd;\r\n\r\n const ellipsesNeeded = paginationRange < totalPages;\r\n let i = 1;\r\n\r\n while (i <= totalPages && i <= paginationRange) {\r\n let label: any;\r\n const pageNumber = this._calculatePageNumber(i, currentPage, paginationRange, totalPages);\r\n const openingEllipsesNeeded = (i === 2 && (isMiddle || isEnd));\r\n const closingEllipsesNeeded = (i === paginationRange - 1 && (isMiddle || isStart));\r\n if (ellipsesNeeded && (openingEllipsesNeeded || closingEllipsesNeeded)) {\r\n label = '...';\r\n } else {\r\n label = pageNumber;\r\n }\r\n pages.push({\r\n label: label,\r\n value: pageNumber\r\n });\r\n i++;\r\n }\r\n\r\n return pages;\r\n }\r\n\r\n private _calculatePageNumber(i: number, currentPage: number, paginationRange: number, totalPages: number): number {\r\n const halfWay = Math.ceil(paginationRange / 2);\r\n if (i === paginationRange) {\r\n return totalPages;\r\n } else if (i === 1) {\r\n return i;\r\n } else if (paginationRange < totalPages) {\r\n if (totalPages - halfWay < currentPage) {\r\n return totalPages - paginationRange + i;\r\n } else if (halfWay < currentPage) {\r\n return currentPage - halfWay + i;\r\n } else {\r\n return i;\r\n }\r\n } else {\r\n return i;\r\n }\r\n }\r\n}\r\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';\r\nimport { Subject, takeUntil } from 'rxjs';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { CmatDigitOnlyDirective } from 'cmat/directives/digit-only';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { NgIf, NgFor, DecimalPipe, NgStyle } from '@angular/common';\r\nimport { CmatPaginationDirective } from './pagination.directive';\r\nimport { CmatMediaWatcherService } from 'cmat/services/media-watcher';\r\n\r\n@Component({\r\n selector: 'cmat-pagination',\r\n templateUrl: './pagination.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n exportAs: 'cmatPagination',\r\n standalone: true,\r\n imports: [CmatPaginationDirective, NgIf, MatIconModule, NgFor, NgStyle,\r\n MatFormFieldModule, MatInputModule, CmatDigitOnlyDirective, MatSelectModule, DecimalPipe]\r\n})\r\nexport class CmatPaginationComponent implements OnInit {\r\n @Output() pageChange: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() pageBoundsCorrection: EventEmitter<number> = new EventEmitter<number>();\r\n @Output() perPageCountChange: EventEmitter<number> = new EventEmitter<number>();\r\n\r\n @Input() id: string;\r\n @Input() maxSize: number = 7;\r\n\r\n @Input() itemsPerPages: number[] = [10, 20, 30];\r\n @Input() initPerPage: number = 10;\r\n\r\n isScreenSmall: boolean;\r\n\r\n private _autoHide: boolean = false;\r\n private _unsubscribeAll: Subject<void> = new Subject<void>();\r\n\r\n constructor(private _cmatMediaWatcherService: CmatMediaWatcherService, private _changeDetectorRef: ChangeDetectorRef) {\r\n\r\n }\r\n\r\n @Input()\r\n get autoHide(): boolean {\r\n return this._autoHide;\r\n }\r\n set autoHide(value: boolean) {\r\n this._autoHide = !!value;\r\n }\r\n\r\n ngOnInit(): void {\r\n this._cmatMediaWatcherService.onMediaChange$\r\n .pipe(takeUntil(this._unsubscribeAll))\r\n .subscribe(({ matchingAliases }) => {\r\n this.isScreenSmall = !matchingAliases.includes('md');\r\n this._changeDetectorRef.markForCheck();\r\n });\r\n }\r\n\r\n trackByIndex(index: number): number {\r\n return index;\r\n }\r\n}\r\n","<pagination-template #p=\"paginationApi\" [id]=\"id\" [maxSize]=\"isScreenSmall&&maxSize>5?5:maxSize\"\r\n (pageChange)=\"pageChange.emit($event)\" class=\"w-full px-4 py-2 flex\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n <div class=\"hidden md:flex flex-auto items-center\">\r\n <span>总计:{{p.getTotalItems()}}</span>\r\n </div>\r\n <nav role=\"navigation\" class=\"flex min-h-12 w-full md:w-0\">\r\n <ul *ngIf=\"!(autoHide && p.pages.length <= 1)\"\r\n class=\"flex flex-row space-x-6 items-center justify-center md:justify-end w-full\">\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.goFirstPage()\"\r\n [disabled]=\"p.getCurrent()===1\">\r\n <mat-icon svgIcon=\"mat_solid:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.previous()\"\r\n [disabled]=\"p.getCurrent()===1\">\r\n <mat-icon svgIcon=\"mat_solid:navigate_before\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <li class=\"flex text-xl lg:text-2xl\" *ngFor=\"let page of p.pages; trackBy: trackByIndex\">\r\n <a tabindex=\"0\" (click)=\"p.setCurrent(page.value)\" *ngIf=\"p.getCurrent() !== page.value\"\r\n role=\"presentation\" class=\"cursor-pointer text-gray-400 hover:text-black\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </a>\r\n <ng-container *ngIf=\"p.getCurrent() === page.value\">\r\n <span class=\"text-black\">\r\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\r\n </span>\r\n </ng-container>\r\n </li>\r\n\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.next()\"\r\n [disabled]=\"p.getCurrent()===p.getLastPage()\">\r\n <mat-icon svgIcon=\"mat_solid:navigate_next\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" mat-button mat-icon-button (click)=\"p.goLastPage()\"\r\n [disabled]=\"p.getCurrent()===p.getLastPage()\">\r\n <mat-icon svgIcon=\"mat_solid:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field [ngStyle]=\"{'width':((p.getLastPage()?.toString()?.length||0)*8+64)+'px'}\">\r\n <input matInput #current [value]=\"p.getCurrent()\" [autocomplete]=\"'off'\" [min]=\"0\"\r\n [max]=\"p.getLastPage()||0\" type=\"text\" cmatDigitOnly\r\n (keyup.enter)=\"p.setCurrent(current.value)\">\r\n <span matSuffix>/{{p.getLastPage()}}</span>\r\n </mat-form-field>\r\n </li>\r\n <li class=\"hidden md:block\">\r\n <mat-form-field class=\"w-24\">\r\n <mat-select name=\"pageCount\" #pageCount [value]=\"initPerPage\"\r\n (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n <mat-option *ngFor=\"let perPage of itemsPerPages\" [value]=\"perPage\">\r\n {{perPage}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n </nav>\r\n</pagination-template>","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { CmatPaginationService } from './pagination.service';\r\nimport { CmatPaginationInstance } from './pagination.instance';\r\nimport { isNil } from 'lodash-es';\r\n\r\nconst LARGE_NUMBER = Number.MAX_SAFE_INTEGER;\r\n\r\nexport type Collection<T> = T[];\r\n\r\nexport interface CmatPaginatePipeArgs {\r\n id?: string;\r\n currentPage: string | number;\r\n itemsPerPage: string | number;\r\n totalItems: string | number;\r\n}\r\n\r\nexport interface CmatPipeState {\r\n collection: any[];\r\n size: number;\r\n start?: number;\r\n end?: number;\r\n slice: any[];\r\n}\r\n\r\n@Pipe({\r\n name: 'paginate',\r\n pure: true,\r\n standalone: true\r\n})\r\nexport class CmatPaginatePipe implements PipeTransform {\r\n private state: { [id: string]: CmatPipeState } = {};\r\n\r\n constructor(private service: CmatPaginationService) {\r\n }\r\n\r\n public transform<T, U extends Collection<T>>(collection: U, args: CmatPaginatePipeArgs): U {\r\n if (!(collection instanceof Array)) {\r\n const _id = args.id || this.service.defaultId();\r\n if (this.state[_id]) {\r\n return this.state[_id].slice as U;\r\n } else {\r\n return collection;\r\n }\r\n }\r\n\r\n const serverSideMode = args.totalItems && args.totalItems !== collection.length;\r\n const instance = this.createInstance(collection, args);\r\n const id = instance.id!;\r\n let start;\r\n let end;\r\n let perPage = args.itemsPerPage;\r\n\r\n const emitChange = this.service.register(instance);\r\n\r\n if (!serverSideMode && collection instanceof Array) {\r\n perPage = +perPage || LARGE_NUMBER;\r\n start = (instance.currentPage - 1) * perPage;\r\n end = start + perPage;\r\n\r\n const isIdentical = this._stateIsIdentical(id, collection, start, end);\r\n if (isIdentical) {\r\n return this.state[id].slice as U;\r\n } else {\r\n const slice = collection.slice(start, end);\r\n this._saveState(id, collection, slice, start, end);\r\n this.service.change.emit(id);\r\n return slice as U;\r\n }\r\n } else {\r\n if (emitChange) {\r\n this.service.change.emit(id);\r\n }\r\n\r\n this._saveState(id, collection, collection, start, end);\r\n\r\n return collection;\r\n }\r\n\r\n }\r\n\r\n private createInstance(collection: any[], config: CmatPaginatePipeArgs): CmatPaginationInstance {\r\n this.checkConfig(config);\r\n\r\n return {\r\n id: isNil(config.id) ? config.id : this.service.defaultId(),\r\n itemsPerPage: +config.itemsPerPage || 10,\r\n currentPage: +config.currentPage || 1,\r\n totalItems: +config.totalItems || collection.length\r\n };\r\n }\r\n\r\n private checkConfig(config: CmatPaginatePipeArgs): void {\r\n const required = ['itemsPerPage', 'currentPage'];\r\n\r\n const missing = required.filter(prop => !(prop in config));\r\n if (0 < missing.length) {\r\n throw new Error(`PaginatePipe: Argument is missing the following required properties: ${missing.join(', ')}`);\r\n }\r\n }\r\n\r\n private _saveState(id: string, collection: any[], slice: any[], start?: number, end?: number): void {\r\n this.state[id] = {\r\n collection,\r\n size: collection.length,\r\n slice,\r\n start,\r\n end\r\n };\r\n }\r\n\r\n private _stateIsIdentical(id: string, collection: any[], start: number, end: number): boolean {\r\n const state = this.state[id];\r\n if (!state) {\r\n return false;\r\n }\r\n const isMetaDataIdentical = state.size === collection.length &&\r\n state.start === start &&\r\n state.end === end;\r\n\r\n if (!isMetaDataIdentical) {\r\n return false;\r\n }\r\n\r\n return state.slice.every((element, index) => element === collection[start + index]);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.CmatPaginationService"],"mappings":";;;;;;;;;;;;;;;;;MAMa,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;AAIW,QAAA,IAAA,CAAA,MAAM,GAAyB,IAAI,YAAY,EAAU,CAAC;QAEzD,IAAU,CAAA,UAAA,GAA6C,EAAE,CAAC;QAC1D,IAAoB,CAAA,oBAAA,GAAG,uBAAuB,CAAC;AAmF1D,KAAA;AAjFU,IAAA,SAAS,KAAa,OAAO,IAAI,CAAC,oBAAoB,CAAC,EAAE;AAEzD,IAAA,QAAQ,CAAC,QAAgC,EAAA;AAC5C,QAAA,IAAI,QAAQ,CAAC,EAAE,IAAI,IAAI,EAAE;AACrB,YAAA,QAAQ,CAAC,EAAE,GAAG,IAAI,CAAC,oBAAoB,CAAC;AAC3C,SAAA;QAED,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;YAC/B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC;AACxC,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;AAAM,aAAA;AACH,YAAA,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzC,SAAA;KACJ;AAEM,IAAA,cAAc,CAAC,EAAU,EAAA;AAC5B,QAAA,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE;YACrB,OAAO,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC;AAC1C,SAAA;KACJ;AAEM,IAAA,eAAe,CAAC,EAAU,EAAA;AAC7B,QAAA,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE;YACrB,OAAO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