ngx-tethys 18.1.0-next.0 → 18.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/CHANGELOG.md +13 -0
- package/action/action.component.d.ts +1 -2
- package/affix/affix.component.d.ts +2 -4
- package/anchor/anchor-link.component.d.ts +2 -4
- package/anchor/anchor.component.d.ts +1 -4
- package/arrow-switcher/arrow-switcher.component.d.ts +1 -2
- package/autocomplete/autocomplete.component.d.ts +1 -2
- package/autocomplete/autocomplete.trigger.directive.d.ts +3 -5
- package/autocomplete/overlay/autocomplete-container.component.d.ts +4 -4
- package/autocomplete/overlay/autocomplete.service.d.ts +3 -5
- package/avatar/avatar.component.d.ts +1 -3
- package/avatar/avatar.pipe.d.ts +0 -2
- package/back-top/back-top.component.d.ts +2 -4
- package/badge/badge.component.d.ts +5 -14
- package/breadcrumb/breadcrumb-item.component.d.ts +1 -2
- package/breadcrumb/breadcrumb.component.d.ts +1 -2
- package/button/button.component.d.ts +1 -2
- package/calendar/calendar-header.component.d.ts +1 -2
- package/calendar/calendar.component.d.ts +1 -2
- package/carousel/carousel-item.directive.d.ts +1 -2
- package/carousel/carousel.component.d.ts +1 -4
- package/carousel/carousel.service.d.ts +1 -2
- package/cascader/cascader.component.d.ts +4 -4
- package/checkbox/checkbox.component.d.ts +0 -2
- package/collapse/collapse-item.component.d.ts +2 -4
- package/color-picker/color-picker-panel.component.d.ts +2 -3
- package/color-picker/color-picker.component.d.ts +2 -4
- package/color-picker/coordinates.directive.d.ts +1 -2
- package/color-picker/parts/alpha/alpha.component.d.ts +1 -2
- package/color-picker/parts/hue/hue.component.d.ts +1 -2
- package/color-picker/parts/saturation/saturation.component.d.ts +1 -2
- package/copy/copy.directive.d.ts +0 -2
- package/core/click-positioner.d.ts +0 -2
- package/core/scroll.d.ts +1 -2
- package/core/update-host-class.service.d.ts +1 -2
- package/date-picker/abstract-picker.component.d.ts +1 -1
- package/date-picker/abstract-picker.directive.d.ts +2 -3
- package/date-picker/base-picker.component.d.ts +2 -3
- package/date-picker/date-picker.component.d.ts +2 -2
- package/date-picker/date-picker.directive.d.ts +1 -3
- package/date-picker/date-picker.service.d.ts +2 -2
- package/date-picker/lib/calendar/calendar-footer.component.d.ts +1 -2
- package/date-picker/lib/calendar/calendar-header.component.d.ts +0 -1
- package/date-picker/lib/date/date-header.component.d.ts +0 -3
- package/date-picker/lib/date/date-table.component.d.ts +1 -3
- package/date-picker/lib/date-carousel/date-carousel.component.d.ts +1 -2
- package/date-picker/lib/decade/decade-header.component.d.ts +1 -1
- package/date-picker/lib/month/month-header.component.d.ts +0 -3
- package/date-picker/lib/month/month-table.component.d.ts +1 -2
- package/date-picker/lib/popups/date-popup.component.d.ts +1 -3
- package/date-picker/lib/popups/inner-popup.component.d.ts +1 -4
- package/date-picker/lib/quarter/quarter-table.component.d.ts +1 -2
- package/date-picker/lib/year/year-header.component.d.ts +0 -1
- package/date-picker/month-picker.component.d.ts +2 -2
- package/date-picker/picker.component.d.ts +1 -3
- package/date-picker/picker.pipes.d.ts +0 -3
- package/date-picker/quarter-picker.component.d.ts +2 -2
- package/date-picker/range-picker.component.d.ts +2 -2
- package/date-picker/range-picker.directive.d.ts +2 -3
- package/date-picker/week-picker.component.d.ts +2 -2
- package/date-picker/year-picker.component.d.ts +2 -2
- package/date-range/date-range.component.d.ts +1 -3
- package/date-range/optional-dates/optional-dates.component.d.ts +0 -2
- package/dialog/body/dialog-body.component.d.ts +0 -2
- package/dialog/confirm/confirm.component.d.ts +2 -3
- package/dialog/dialog-container.component.d.ts +4 -5
- package/dialog/dialog.service.d.ts +4 -4
- package/dialog/footer/dialog-footer.component.d.ts +2 -2
- package/dialog/header/dialog-header.component.d.ts +2 -6
- package/dot/dot.component.d.ts +1 -2
- package/drag-drop/drag-content.directive.d.ts +2 -3
- package/drag-drop/drag-handle.directive.d.ts +2 -3
- package/drag-drop/drag.directive.d.ts +4 -5
- package/drag-drop/drop-container.directive.d.ts +6 -3
- package/dropdown/dropdown-active.directive.d.ts +3 -4
- package/dropdown/dropdown-menu-item.directive.d.ts +1 -2
- package/dropdown/dropdown-submenu.component.d.ts +1 -3
- package/dropdown/dropdown.directive.d.ts +3 -5
- package/empty/empty.component.d.ts +6 -6
- package/esm2022/action/action.component.mjs +18 -18
- package/esm2022/affix/affix.component.mjs +11 -14
- package/esm2022/anchor/anchor-link.component.mjs +9 -10
- package/esm2022/anchor/anchor.component.mjs +11 -16
- package/esm2022/arrow-switcher/arrow-switcher.component.mjs +22 -22
- package/esm2022/autocomplete/autocomplete.component.mjs +7 -7
- package/esm2022/autocomplete/autocomplete.trigger.directive.mjs +30 -37
- package/esm2022/autocomplete/overlay/autocomplete-container.component.mjs +11 -15
- package/esm2022/autocomplete/overlay/autocomplete.service.mjs +14 -21
- package/esm2022/avatar/avatar.component.mjs +24 -25
- package/esm2022/avatar/avatar.pipe.mjs +6 -7
- package/esm2022/back-top/back-top.component.mjs +11 -15
- package/esm2022/badge/badge.component.mjs +6 -6
- package/esm2022/breadcrumb/breadcrumb-item.component.mjs +7 -7
- package/esm2022/breadcrumb/breadcrumb.component.mjs +12 -12
- package/esm2022/button/button.component.mjs +12 -12
- package/esm2022/calendar/calendar-header.component.mjs +12 -12
- package/esm2022/calendar/calendar.component.mjs +12 -12
- package/esm2022/carousel/carousel-item.directive.mjs +7 -6
- package/esm2022/carousel/carousel.component.mjs +10 -12
- package/esm2022/carousel/carousel.service.mjs +7 -9
- package/esm2022/cascader/cascader.component.mjs +11 -16
- package/esm2022/checkbox/checkbox.component.mjs +7 -9
- package/esm2022/collapse/collapse-item.component.mjs +18 -21
- package/esm2022/color-picker/color-picker-panel.component.mjs +11 -12
- package/esm2022/color-picker/color-picker.component.mjs +10 -11
- package/esm2022/color-picker/coordinates.directive.mjs +10 -10
- package/esm2022/color-picker/parts/alpha/alpha.component.mjs +6 -6
- package/esm2022/color-picker/parts/hue/hue.component.mjs +6 -6
- package/esm2022/color-picker/parts/saturation/saturation.component.mjs +9 -9
- package/esm2022/copy/copy.directive.mjs +8 -12
- package/esm2022/core/click-positioner.mjs +6 -7
- package/esm2022/core/scroll.mjs +7 -9
- package/esm2022/core/store/store.mjs +1 -1
- package/esm2022/core/update-host-class.service.mjs +6 -6
- package/esm2022/date-picker/abstract-picker.component.mjs +5 -5
- package/esm2022/date-picker/abstract-picker.directive.mjs +42 -44
- package/esm2022/date-picker/base-picker.component.mjs +26 -26
- package/esm2022/date-picker/date-picker.component.mjs +6 -6
- package/esm2022/date-picker/date-picker.directive.mjs +6 -8
- package/esm2022/date-picker/date-picker.service.mjs +6 -10
- package/esm2022/date-picker/lib/calendar/calendar-footer.component.mjs +5 -5
- package/esm2022/date-picker/lib/calendar/calendar-header.component.mjs +6 -7
- package/esm2022/date-picker/lib/date/date-header.component.mjs +3 -9
- package/esm2022/date-picker/lib/date/date-table.component.mjs +7 -9
- package/esm2022/date-picker/lib/date-carousel/date-carousel.component.mjs +12 -12
- package/esm2022/date-picker/lib/decade/decade-header.component.mjs +5 -8
- package/esm2022/date-picker/lib/month/month-header.component.mjs +3 -9
- package/esm2022/date-picker/lib/month/month-table.component.mjs +6 -7
- package/esm2022/date-picker/lib/popups/date-popup.component.mjs +12 -13
- package/esm2022/date-picker/lib/popups/inner-popup.component.mjs +12 -13
- package/esm2022/date-picker/lib/quarter/quarter-table.component.mjs +6 -7
- package/esm2022/date-picker/lib/year/year-header.component.mjs +3 -9
- package/esm2022/date-picker/month-picker.component.mjs +6 -7
- package/esm2022/date-picker/picker.component.mjs +21 -22
- package/esm2022/date-picker/picker.pipes.mjs +10 -11
- package/esm2022/date-picker/quarter-picker.component.mjs +6 -7
- package/esm2022/date-picker/range-picker.component.mjs +6 -7
- package/esm2022/date-picker/range-picker.directive.mjs +6 -8
- package/esm2022/date-picker/week-picker.component.mjs +6 -7
- package/esm2022/date-picker/year-picker.component.mjs +6 -7
- package/esm2022/date-range/date-range.component.mjs +14 -15
- package/esm2022/date-range/optional-dates/optional-dates.component.mjs +8 -9
- package/esm2022/dialog/body/dialog-body.component.mjs +11 -12
- package/esm2022/dialog/confirm/confirm.component.mjs +10 -14
- package/esm2022/dialog/dialog-container.component.mjs +13 -18
- package/esm2022/dialog/dialog.service.mjs +10 -17
- package/esm2022/dialog/footer/dialog-footer.component.mjs +7 -11
- package/esm2022/dialog/header/dialog-header.component.mjs +14 -19
- package/esm2022/dot/dot.component.mjs +7 -7
- package/esm2022/drag-drop/drag-content.directive.mjs +7 -9
- package/esm2022/drag-drop/drag-handle.directive.mjs +7 -9
- package/esm2022/drag-drop/drag.directive.mjs +13 -16
- package/esm2022/drag-drop/drop-container.directive.mjs +13 -13
- package/esm2022/dropdown/dropdown-active.directive.mjs +9 -12
- package/esm2022/dropdown/dropdown-menu-item.directive.mjs +12 -12
- package/esm2022/dropdown/dropdown-submenu.component.mjs +9 -10
- package/esm2022/dropdown/dropdown.directive.mjs +12 -10
- package/esm2022/empty/empty.component.mjs +14 -17
- package/esm2022/flexible-text/flexible-text.component.mjs +16 -17
- package/esm2022/form/form-group-error/form-group-error.component.mjs +9 -12
- package/esm2022/form/form-group-label.directive.mjs +9 -10
- package/esm2022/form/form-group.component.mjs +15 -19
- package/esm2022/form/form-submit.directive.mjs +6 -7
- package/esm2022/form/form-validator-loader.mjs +1 -1
- package/esm2022/form/form-validator.service.mjs +12 -13
- package/esm2022/form/form.directive.mjs +11 -16
- package/esm2022/form/from-group-footer/form-group-footer.component.mjs +10 -16
- package/esm2022/form/validator/unique-validator.directive.mjs +7 -10
- package/esm2022/fullscreen/fullscreen.component.mjs +10 -11
- package/esm2022/fullscreen/fullscreen.service.mjs +7 -10
- package/esm2022/grid/thy-col.directive.mjs +9 -14
- package/esm2022/grid/thy-grid-item.component.mjs +8 -14
- package/esm2022/grid/thy-grid.component.mjs +7 -8
- package/esm2022/guider/guider.directive.mjs +8 -9
- package/esm2022/guider/guider.service.mjs +12 -19
- package/esm2022/icon/icon-registry.mjs +11 -16
- package/esm2022/icon/icon.component.mjs +8 -9
- package/esm2022/image/image-group.component.mjs +7 -7
- package/esm2022/image/image.directive.mjs +11 -12
- package/esm2022/image/image.service.mjs +8 -14
- package/esm2022/image/preview/image-preview.component.mjs +34 -38
- package/esm2022/input/input-count.component.mjs +7 -10
- package/esm2022/input/input-group.component.mjs +12 -13
- package/esm2022/input/input-search.component.mjs +7 -7
- package/esm2022/input/input.component.mjs +14 -14
- package/esm2022/input/input.directive.mjs +12 -17
- package/esm2022/input-number/input-number.component.mjs +6 -6
- package/esm2022/layout/sidebar.component.mjs +45 -51
- package/esm2022/list/selection/selection-list.mjs +25 -25
- package/esm2022/loading/loading.component.mjs +8 -8
- package/esm2022/mention/mention.directive.mjs +9 -14
- package/esm2022/mention/suggestions/suggestions.component.mjs +8 -9
- package/esm2022/menu/group/menu-group.component.mjs +34 -35
- package/esm2022/menu/item/action/menu-item-action.component.mjs +15 -16
- package/esm2022/menu/item/menu-item.component.mjs +6 -6
- package/esm2022/message/abstract/abstract-message-container.component.mjs +5 -5
- package/esm2022/message/abstract/abstract-message.component.mjs +6 -6
- package/esm2022/message/message-container.component.mjs +9 -11
- package/esm2022/message/message-queue.service.mjs +6 -8
- package/esm2022/message/message.component.mjs +7 -7
- package/esm2022/message/message.service.mjs +10 -11
- package/esm2022/nav/icon-nav/icon-nav.component.mjs +6 -6
- package/esm2022/nav/nav-ink-bar.directive.mjs +9 -14
- package/esm2022/nav/nav-item.directive.mjs +8 -11
- package/esm2022/nav/nav.component.mjs +32 -33
- package/esm2022/nav/nav.pipe.mjs +6 -7
- package/esm2022/notify/notify-container.component.mjs +8 -11
- package/esm2022/notify/notify-queue.service.mjs +6 -8
- package/esm2022/notify/notify.component.mjs +7 -7
- package/esm2022/notify/notify.service.mjs +11 -12
- package/esm2022/pagination/pagination.component.mjs +38 -43
- package/esm2022/pagination/pagination.pipe.mjs +6 -7
- package/esm2022/popover/header/popover-header.component.mjs +12 -14
- package/esm2022/popover/popover-container.component.mjs +11 -13
- package/esm2022/popover/popover.directive.mjs +13 -12
- package/esm2022/popover/popover.service.mjs +14 -26
- package/esm2022/progress/progress-strip.component.mjs +10 -13
- package/esm2022/property/property-item.component.mjs +10 -13
- package/esm2022/property-operation/property-operation.component.mjs +24 -25
- package/esm2022/radio/button/radio-button.component.mjs +9 -15
- package/esm2022/radio/group/radio-group.component.mjs +17 -17
- package/esm2022/radio/radio.component.mjs +8 -14
- package/esm2022/rate/rate.component.mjs +6 -6
- package/esm2022/resizable/resizable.directive.mjs +10 -12
- package/esm2022/resizable/resizable.service.mjs +7 -9
- package/esm2022/resizable/resize-handle.component.mjs +7 -8
- package/esm2022/segment/segment-item.component.mjs +12 -15
- package/esm2022/segment/segment.component.mjs +26 -26
- package/esm2022/select/custom-select/custom-select.component.mjs +14 -28
- package/esm2022/select/native-select/native-select.component.mjs +6 -6
- package/esm2022/shared/base-form-check.component.mjs +7 -8
- package/esm2022/shared/directives/string-or-template-outlet.directive.mjs +7 -7
- package/esm2022/shared/directives/thy-autofocus.directive.mjs +10 -10
- package/esm2022/shared/directives/thy-contextmenu.directive.mjs +8 -8
- package/esm2022/shared/directives/thy-ctrl-enter.directive.mjs +8 -8
- package/esm2022/shared/directives/thy-enter.directive.mjs +8 -8
- package/esm2022/shared/directives/thy-scroll.directive.mjs +21 -21
- package/esm2022/shared/directives/thy-show.mjs +11 -11
- package/esm2022/shared/directives/thy-stop-propagation.directive.mjs +7 -5
- package/esm2022/shared/directives/view-outlet.directive.mjs +7 -7
- package/esm2022/shared/ng-transclude.directive.mjs +6 -5
- package/esm2022/shared/option/group/option-group.component.mjs +10 -10
- package/esm2022/shared/option/list-option/list-option.component.mjs +12 -19
- package/esm2022/shared/option/option.component.mjs +9 -19
- package/esm2022/shared/select/select-control/select-control.component.mjs +23 -23
- package/esm2022/skeleton/skeleton-circle.component.mjs +7 -15
- package/esm2022/skeleton/skeleton-rectangle.component.mjs +7 -15
- package/esm2022/slide/drawer/drawer-container.directive.mjs +6 -6
- package/esm2022/slide/slide-container.component.mjs +12 -16
- package/esm2022/slide/slide-header/slide-header.component.mjs +10 -11
- package/esm2022/slide/slide-ref.service.mjs +1 -1
- package/esm2022/slide/slide.service.mjs +8 -12
- package/esm2022/slider/slider.component.mjs +8 -8
- package/esm2022/space/space.component.mjs +13 -13
- package/esm2022/statistic/statistic.component.mjs +20 -20
- package/esm2022/stepper/step.component.mjs +6 -11
- package/esm2022/stepper/stepper-button.directive.mjs +10 -11
- package/esm2022/strength/strength.component.mjs +11 -12
- package/esm2022/switch/switch.component.mjs +6 -6
- package/esm2022/table/table-column.component.mjs +58 -63
- package/esm2022/table/table-skeleton.component.mjs +32 -32
- package/esm2022/table/table.component.mjs +16 -24
- package/esm2022/tabs/tabs.component.mjs +19 -19
- package/esm2022/tag/tag.component.mjs +22 -22
- package/esm2022/time-picker/inner/inner-time-picker.component.mjs +10 -9
- package/esm2022/time-picker/time-picker-panel.component.mjs +27 -27
- package/esm2022/time-picker/time-picker.component.mjs +29 -29
- package/esm2022/timeline/timeline-item.component.mjs +12 -13
- package/esm2022/timeline/timeline.component.mjs +7 -8
- package/esm2022/tooltip/tooltip.component.mjs +14 -14
- package/esm2022/tooltip/tooltip.directive.mjs +11 -10
- package/esm2022/tooltip/tooltip.service.mjs +9 -13
- package/esm2022/transfer/transfer-list.component.mjs +6 -6
- package/esm2022/tree/tree-node.component.mjs +13 -17
- package/esm2022/tree/tree.component.mjs +86 -90
- package/esm2022/tree-select/tree-select.component.mjs +22 -27
- package/esm2022/typography/bg-color.directive.mjs +9 -9
- package/esm2022/typography/text-color.directive.mjs +9 -9
- package/esm2022/upload/file-drop.directive.mjs +1 -1
- package/esm2022/upload/file-select-base.mjs +5 -6
- package/esm2022/upload/file-select.component.mjs +4 -3
- package/esm2022/upload/upload.service.mjs +6 -7
- package/esm2022/version.mjs +2 -2
- package/esm2022/watermark/watermark.directive.mjs +12 -12
- package/fesm2022/ngx-tethys-action.mjs +17 -17
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +12 -14
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +19 -22
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +21 -21
- package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
- package/fesm2022/ngx-tethys-autocomplete.mjs +59 -71
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +27 -27
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +12 -15
- package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
- package/fesm2022/ngx-tethys-badge.mjs +5 -5
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-breadcrumb.mjs +16 -16
- package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngx-tethys-button.mjs +11 -11
- package/fesm2022/ngx-tethys-button.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +21 -21
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +20 -21
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +11 -15
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-checkbox.mjs +6 -7
- package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-tethys-collapse.mjs +17 -19
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +44 -42
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +8 -12
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-core.mjs +14 -16
- package/fesm2022/ngx-tethys-core.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +192 -216
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-range.mjs +20 -20
- package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dialog.mjs +56 -72
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dot.mjs +6 -6
- package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
- package/fesm2022/ngx-tethys-drag-drop.mjs +33 -37
- package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dropdown.mjs +39 -37
- package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +15 -15
- package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
- package/fesm2022/ngx-tethys-flexible-text.mjs +16 -17
- package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +67 -82
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-fullscreen.mjs +14 -17
- package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +20 -29
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-guider.mjs +17 -23
- package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-icon.mjs +18 -22
- package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +57 -62
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +5 -5
- package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input.mjs +46 -53
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-layout.mjs +45 -50
- package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +24 -24
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +7 -7
- package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
- package/fesm2022/ngx-tethys-mention.mjs +16 -21
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +51 -52
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs +33 -35
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +55 -64
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +26 -29
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +44 -49
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +48 -54
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +9 -12
- package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property-operation.mjs +24 -24
- package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +11 -11
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +29 -35
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-rate.mjs +5 -5
- package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
- package/fesm2022/ngx-tethys-resizable.mjs +22 -25
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-segment.mjs +35 -38
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +20 -34
- package/fesm2022/ngx-tethys-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-shared.mjs +128 -143
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +11 -25
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slide.mjs +30 -34
- package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +7 -7
- package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-space.mjs +13 -13
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-statistic.mjs +19 -19
- package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs +13 -18
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-strength.mjs +11 -11
- package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +5 -5
- package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs +103 -115
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +19 -19
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tag.mjs +21 -21
- package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +61 -58
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +16 -16
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tooltip.mjs +32 -33
- package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-tethys-transfer.mjs +5 -5
- package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree-select.mjs +23 -28
- package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree.mjs +96 -102
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +15 -15
- package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +11 -12
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-watermark.mjs +12 -12
- package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/flexible-text/flexible-text.component.d.ts +1 -3
- package/form/form-group-error/form-group-error.component.d.ts +1 -3
- package/form/form-group-label.directive.d.ts +0 -2
- package/form/form-group.component.d.ts +1 -4
- package/form/form-submit.directive.d.ts +0 -2
- package/form/form-validator.service.d.ts +0 -2
- package/form/form.directive.d.ts +4 -4
- package/form/from-group-footer/form-group-footer.component.d.ts +2 -4
- package/form/validator/unique-validator.directive.d.ts +1 -4
- package/fullscreen/fullscreen.component.d.ts +0 -2
- package/fullscreen/fullscreen.service.d.ts +0 -2
- package/grid/thy-col.directive.d.ts +1 -2
- package/grid/thy-grid-item.component.d.ts +2 -4
- package/grid/thy-grid.component.d.ts +1 -3
- package/guider/guider.directive.d.ts +1 -3
- package/guider/guider.service.d.ts +0 -7
- package/icon/icon-registry.d.ts +1 -3
- package/icon/icon.component.d.ts +1 -3
- package/image/image-group.component.d.ts +1 -2
- package/image/image.directive.d.ts +1 -3
- package/image/image.service.d.ts +2 -2
- package/image/preview/image-preview.component.d.ts +1 -4
- package/input/input-count.component.d.ts +3 -4
- package/input/input-group.component.d.ts +1 -3
- package/input/input-search.component.d.ts +2 -2
- package/input/input.component.d.ts +1 -2
- package/input/input.directive.d.ts +2 -3
- package/input-number/input-number.component.d.ts +2 -2
- package/layout/sidebar.component.d.ts +44 -13
- package/list/selection/selection-list.d.ts +1 -2
- package/loading/loading.component.d.ts +0 -2
- package/loading/styles/loading.scss +3 -1
- package/mention/mention.directive.d.ts +4 -5
- package/mention/suggestions/suggestions.component.d.ts +2 -3
- package/menu/group/menu-group.component.d.ts +12 -26
- package/menu/item/action/menu-item-action.component.d.ts +2 -3
- package/menu/item/menu-item.component.d.ts +1 -2
- package/message/abstract/abstract-message-container.component.d.ts +1 -2
- package/message/abstract/abstract-message.component.d.ts +2 -2
- package/message/message-container.component.d.ts +1 -3
- package/message/message-queue.service.d.ts +1 -2
- package/message/message.component.d.ts +1 -3
- package/message/message.service.d.ts +3 -5
- package/nav/icon-nav/icon-nav.component.d.ts +2 -2
- package/nav/nav-ink-bar.directive.d.ts +2 -4
- package/nav/nav-item.directive.d.ts +3 -4
- package/nav/nav.component.d.ts +1 -3
- package/nav/nav.pipe.d.ts +0 -2
- package/notify/notify-container.component.d.ts +1 -3
- package/notify/notify-queue.service.d.ts +1 -2
- package/notify/notify.component.d.ts +2 -3
- package/notify/notify.service.d.ts +1 -4
- package/package.json +1 -1
- package/pagination/pagination.component.d.ts +7 -19
- package/pagination/pagination.pipe.d.ts +0 -2
- package/popover/header/popover-header.component.d.ts +0 -3
- package/popover/popover-container.component.d.ts +3 -4
- package/popover/popover.directive.d.ts +2 -5
- package/popover/popover.service.d.ts +4 -6
- package/progress/progress-strip.component.d.ts +0 -1
- package/property/property-item.component.d.ts +6 -6
- package/property-operation/property-operation.component.d.ts +1 -3
- package/radio/button/radio-button.component.d.ts +2 -5
- package/radio/group/radio-group.component.d.ts +1 -2
- package/radio/radio.component.d.ts +2 -3
- package/rate/rate.component.d.ts +2 -2
- package/resizable/resizable.directive.d.ts +2 -4
- package/resizable/resizable.service.d.ts +2 -2
- package/resizable/resize-handle.component.d.ts +1 -3
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/segment-item.component.d.ts +4 -5
- package/segment/segment.component.d.ts +1 -2
- package/select/custom-select/custom-select.component.d.ts +5 -5
- package/select/native-select/native-select.component.d.ts +1 -1
- package/shared/base-form-check.component.d.ts +1 -1
- package/shared/directives/string-or-template-outlet.directive.d.ts +1 -2
- package/shared/directives/thy-autofocus.directive.d.ts +0 -2
- package/shared/directives/thy-contextmenu.directive.d.ts +1 -2
- package/shared/directives/thy-ctrl-enter.directive.d.ts +1 -2
- package/shared/directives/thy-enter.directive.d.ts +1 -2
- package/shared/directives/thy-scroll.directive.d.ts +1 -2
- package/shared/directives/thy-show.d.ts +1 -2
- package/shared/directives/thy-stop-propagation.directive.d.ts +2 -2
- package/shared/directives/view-outlet.directive.d.ts +1 -2
- package/shared/ng-transclude.directive.d.ts +1 -1
- package/shared/option/group/option-group.component.d.ts +1 -2
- package/shared/option/list-option/list-option.component.d.ts +5 -10
- package/shared/option/option.component.d.ts +5 -5
- package/shared/select/select-control/select-control.component.d.ts +1 -2
- package/skeleton/skeleton-circle.component.d.ts +1 -4
- package/skeleton/skeleton-rectangle.component.d.ts +5 -5
- package/slide/drawer/drawer-container.directive.d.ts +1 -2
- package/slide/slide-container.component.d.ts +3 -4
- package/slide/slide-header/slide-header.component.d.ts +0 -2
- package/slide/slide.service.d.ts +3 -3
- package/slider/slider.component.d.ts +2 -2
- package/space/space.component.d.ts +1 -2
- package/statistic/statistic.component.d.ts +1 -2
- package/stepper/step.component.d.ts +1 -2
- package/stepper/stepper-button.directive.d.ts +0 -3
- package/strength/strength.component.d.ts +0 -1
- package/switch/switch.component.d.ts +1 -1
- package/table/table-column.component.d.ts +32 -8
- package/table/table-skeleton.component.d.ts +3 -12
- package/table/table.component.d.ts +3 -5
- package/tabs/tabs.component.d.ts +1 -2
- package/tag/tag.component.d.ts +7 -3
- package/time-picker/inner/inner-time-picker.component.d.ts +2 -4
- package/time-picker/time-picker-panel.component.d.ts +1 -2
- package/time-picker/time-picker.component.d.ts +1 -2
- package/timeline/timeline-item.component.d.ts +1 -3
- package/timeline/timeline.component.d.ts +1 -3
- package/tooltip/tooltip.component.d.ts +1 -2
- package/tooltip/tooltip.directive.d.ts +6 -9
- package/tooltip/tooltip.service.d.ts +2 -4
- package/transfer/transfer-list.component.d.ts +1 -2
- package/tree/tree-node.component.d.ts +5 -21
- package/tree/tree.component.d.ts +1 -2
- package/tree-select/tree-select.component.d.ts +5 -6
- package/typography/bg-color.directive.d.ts +0 -2
- package/typography/text-color.directive.d.ts +1 -2
- package/upload/file-select-base.d.ts +2 -3
- package/upload/file-select.component.d.ts +1 -0
- package/upload/upload.service.d.ts +0 -2
- package/watermark/watermark.directive.d.ts +1 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, ContentChild, ViewChild, Input, ViewEncapsulation,
|
|
2
|
+
import { Component, ChangeDetectionStrategy, ContentChild, ViewChild, Input, ViewEncapsulation, inject, ChangeDetectorRef, ElementRef, QueryList, DestroyRef, EventEmitter, ContentChildren, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
4
4
|
import { coerceBooleanProperty, isString } from 'ngx-tethys/util';
|
|
5
5
|
import { fromEvent } from 'rxjs';
|
|
@@ -94,22 +94,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
94
94
|
* @name thy-tabs
|
|
95
95
|
*/
|
|
96
96
|
class ThyTabs {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
set thyActiveTab(value) {
|
|
101
|
-
if (isString(value)) {
|
|
102
|
-
this.activeTabId = value;
|
|
103
|
-
this.activeTabIndex = undefined;
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
this.activeTabIndex = value;
|
|
107
|
-
this.activeTabId = undefined;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
constructor(cd, el) {
|
|
111
|
-
this.cd = cd;
|
|
112
|
-
this.el = el;
|
|
97
|
+
constructor() {
|
|
98
|
+
this.cd = inject(ChangeDetectorRef);
|
|
99
|
+
this.el = inject(ElementRef);
|
|
113
100
|
this.tabs = new QueryList();
|
|
114
101
|
this.destroyRef = inject(DestroyRef);
|
|
115
102
|
/**
|
|
@@ -142,6 +129,19 @@ class ThyTabs {
|
|
|
142
129
|
this.activeTabIndex = 0;
|
|
143
130
|
this.transitionStarted = false;
|
|
144
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* 激活的项
|
|
134
|
+
*/
|
|
135
|
+
set thyActiveTab(value) {
|
|
136
|
+
if (isString(value)) {
|
|
137
|
+
this.activeTabId = value;
|
|
138
|
+
this.activeTabIndex = undefined;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
this.activeTabIndex = value;
|
|
142
|
+
this.activeTabId = undefined;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
145
|
ngOnInit() {
|
|
146
146
|
const tabsContent = this.el.nativeElement.querySelector('.thy-tabs-content');
|
|
147
147
|
fromEvent(tabsContent, 'transitionend')
|
|
@@ -185,7 +185,7 @@ class ThyTabs {
|
|
|
185
185
|
const activeTab = tab.id ? tab.id : index;
|
|
186
186
|
this.thyActiveTabChange.emit(activeTab);
|
|
187
187
|
}
|
|
188
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTabs, deps: [
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTabs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
189
189
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyTabs, isStandalone: true, selector: "thy-tabs", inputs: { thyType: "thyType", thySize: "thySize", thyActiveTab: "thyActiveTab", thyExtra: "thyExtra", thyPosition: "thyPosition", thyAnimated: ["thyAnimated", "thyAnimated", coerceBooleanProperty], thyResponsive: ["thyResponsive", "thyResponsive", coerceBooleanProperty] }, outputs: { thyActiveTabChange: "thyActiveTabChange" }, host: { properties: { "class.thy-tabs-top": "thyPosition === 'top'", "class.thy-tabs-left": "thyPosition === 'left'", "style.overflow": "transitionStarted ? \"hidden\" : null" }, classAttribute: "thy-tabs" }, queries: [{ propertyName: "tabs", predicate: ThyTab, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType\"\n [thySize]=\"thySize\"\n [thyExtra]=\"thyExtra\"\n [thyVertical]=\"thyPosition === 'left'\"\n [thyResponsive]=\"thyResponsive\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id\"\n [thyNavItemDisabled]=\"tab.thyDisabled\"\n [thyNavItemActive]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n", dependencies: [{ kind: "component", type: ThyNav, selector: "thy-nav", inputs: ["thyType", "thySize", "thyHorizontal", "thyVertical", "thyFill", "thyResponsive", "thyInsideClosable", "thyExtra"] }, { kind: "directive", type: ThyNavItemDirective, selector: "[thyNavLink],[thyNavItem]", inputs: ["thyNavItemActive", "thyNavLinkActive", "thyNavItemDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyTabContent, selector: "thy-tab-content, [thyTabContent]", inputs: ["content", "active", "tabPaneAnimated"], exportAs: ["thyTabContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
190
190
|
}
|
|
191
191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTabs, decorators: [{
|
|
@@ -196,7 +196,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
196
196
|
'[class.thy-tabs-left]': `thyPosition === 'left'`,
|
|
197
197
|
'[style.overflow]': `transitionStarted ? "hidden" : null`
|
|
198
198
|
}, standalone: true, imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent], template: "<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType\"\n [thySize]=\"thySize\"\n [thyExtra]=\"thyExtra\"\n [thyVertical]=\"thyPosition === 'left'\"\n [thyResponsive]=\"thyResponsive\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id\"\n [thyNavItemDisabled]=\"tab.thyDisabled\"\n [thyNavItemActive]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n" }]
|
|
199
|
-
}],
|
|
199
|
+
}], propDecorators: { tabs: [{
|
|
200
200
|
type: ContentChildren,
|
|
201
201
|
args: [ThyTab, { descendants: true }]
|
|
202
202
|
}], thyType: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-tabs.mjs","sources":["../../../src/tabs/tab.component.ts","../../../src/tabs/tab-content.component.ts","../../../src/tabs/tabs.component.ts","../../../src/tabs/tabs.component.html","../../../src/tabs/tabs.module.ts","../../../src/tabs/ngx-tethys-tabs.ts"],"sourcesContent":["import { Component, OnInit, ChangeDetectionStrategy, Input, ViewChild, TemplateRef, ContentChild } from '@angular/core';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 选项卡的选项组件\n * @name thy-tab\n */\n@Component({\n selector: 'thy-tab',\n template: ` <ng-template #content><ng-content></ng-content></ng-template> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class ThyTab implements OnInit {\n /**\n * 自定义选项标题的模板\n * @type TemplateRef\n */\n @ContentChild('title') titleTemplateRef: TemplateRef<unknown>;\n\n @ViewChild('content', { static: true }) content: TemplateRef<HTMLElement>;\n\n /**\n * 选项标题\n */\n @Input() thyTitle: string;\n\n /**\n * 选项的唯一标识\n */\n @Input() id: string;\n\n /**\n * 是否禁用选项\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyDisabled: boolean;\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * @private\n */\n@Component({\n selector: 'thy-tab-content, [thyTabContent]',\n exportAs: 'thyTabContent',\n preserveWhitespaces: false,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (active) {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n }\n `,\n host: {\n class: 'thy-tab-content',\n '[attr.aria-hidden]': '!active',\n '[attr.tabindex]': 'active ? 0 : -1',\n '[style.visibility]': 'tabPaneAnimated ? active ? null : \"hidden\" : null',\n '[style.height]': 'tabPaneAnimated ? active ? null : 0 : null',\n '[style.overflow-y]': 'tabPaneAnimated ? active ? null : \"none\" : null',\n '[style.display]': '!tabPaneAnimated ? active ? null : \"none\" : null'\n },\n standalone: true,\n imports: [NgTemplateOutlet]\n})\nexport class ThyTabContent {\n @Input() content: TemplateRef<void> | null = null;\n\n @Input() active = false;\n\n @Input() tabPaneAnimated = true;\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n inject\n} from '@angular/core';\nimport { coerceBooleanProperty, isString } from 'ngx-tethys/util';\nimport { fromEvent } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ThyTab } from './tab.component';\nimport { ThyActiveTabInfo, ThyTabActiveEvent } from './types';\nimport { ThyTabContent } from './tab-content.component';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ThyNav, ThyNavItemDirective } from 'ngx-tethys/nav';\n\nexport type ThyTabsSize = 'lg' | 'md' | 'sm';\n\nexport type ThyTabsType = 'pulled' | 'tabs' | 'pills' | 'lite';\n\nexport type ThyTabsPosition = 'top' | 'left';\n\n/**\n * 选项卡切换组件\n * @name thy-tabs\n */\n@Component({\n selector: 'thy-tabs',\n templateUrl: './tabs.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tabs',\n '[class.thy-tabs-top]': `thyPosition === 'top'`,\n '[class.thy-tabs-left]': `thyPosition === 'left'`,\n '[style.overflow]': `transitionStarted ? \"hidden\" : null`\n },\n standalone: true,\n imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent]\n})\nexport class ThyTabs implements OnInit, OnChanges, AfterContentInit {\n @ContentChildren(ThyTab, { descendants: true }) tabs = new QueryList<ThyTab>();\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * 标签类型\n * @type 'pulled' | 'tabs' | 'pills' | 'lite'\n */\n @Input() thyType: ThyTabsType = 'tabs';\n\n /**\n * 选项卡的大小\n * @type 'lg' | 'md' | 'sm'\n */\n @Input() thySize: ThyTabsSize = 'md';\n\n /**\n * 激活的项\n */\n @Input()\n set thyActiveTab(value: ThyActiveTabInfo) {\n if (isString(value)) {\n this.activeTabId = value;\n this.activeTabIndex = undefined;\n } else {\n this.activeTabIndex = value;\n this.activeTabId = undefined;\n }\n }\n\n /**\n * 附加操作\n */\n @Input() thyExtra: TemplateRef<unknown>;\n\n /**\n * 选项卡的位置\n * @type 'top' | 'left'\n */\n @Input() thyPosition: ThyTabsPosition = 'top';\n\n /**\n * 是否使用动画切换 Tabs\n */\n @Input({ transform: coerceBooleanProperty }) thyAnimated: boolean = false;\n\n /**\n * 响应式,自动计算宽度存放 thyNavItem,并添加更多弹框\n */\n @Input({ transform: coerceBooleanProperty }) thyResponsive: boolean = false;\n\n /**\n * 激活的项发生改变时的回调\n */\n @Output() thyActiveTabChange: EventEmitter<ThyTabActiveEvent> = new EventEmitter<ThyTabActiveEvent>();\n\n activeTabIndex: number = 0;\n\n activeTabId: string;\n\n transitionStarted: boolean = false;\n\n constructor(\n private cd: ChangeDetectorRef,\n private el: ElementRef\n ) {}\n\n ngOnInit(): void {\n const tabsContent = this.el.nativeElement.querySelector('.thy-tabs-content');\n fromEvent(tabsContent, 'transitionend')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.transitionStarted = false;\n this.cd.markForCheck();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thyActiveTab } = changes;\n if (thyActiveTab && !thyActiveTab.firstChange && this.thyAnimated) {\n const index = thyActiveTab?.currentValue?.index || Array.from(this.tabs).findIndex(k => k.id === thyActiveTab?.currentValue.id);\n this.transitionStarted = this.activeTabIndex !== index;\n this.activeTabIndex = index;\n }\n }\n\n ngAfterContentInit() {\n this.tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {\n this.thyAnimated && (this.transitionStarted = true);\n this.activeTabIndex = data.length - 1;\n this.cd.markForCheck();\n });\n }\n\n get tabPaneAnimated(): boolean {\n return this.thyPosition === 'top' && this.thyAnimated;\n }\n\n getTabContentMarginLeft(): string {\n if (this.tabPaneAnimated) {\n return `${-(this.activeTabIndex || 0) * 100}%`;\n }\n return '';\n }\n\n activeTab(tab: ThyTab, index: number) {\n if (tab.thyDisabled) {\n return;\n }\n this.activeTabId = tab.id || null;\n this.thyAnimated && (this.transitionStarted = this.activeTabIndex !== index);\n this.activeTabIndex = index;\n const activeTab = tab.id ? tab.id : index;\n this.thyActiveTabChange.emit(activeTab);\n }\n}\n","<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType\"\n [thySize]=\"thySize\"\n [thyExtra]=\"thyExtra\"\n [thyVertical]=\"thyPosition === 'left'\"\n [thyResponsive]=\"thyResponsive\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id\"\n [thyNavItemDisabled]=\"tab.thyDisabled\"\n [thyNavItemActive]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyTabs } from './tabs.component';\nimport { ThyTab } from './tab.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyNavModule } from 'ngx-tethys/nav';\nimport { ThyTabContent } from './tab-content.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyNavModule, ThyTabs, ThyTab, ThyTabContent],\n exports: [ThyTabs, ThyTab]\n})\nexport class ThyTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;AAGG;MAOU,MAAM,CAAA;AAyBf,IAAA,WAAA,GAAA,GAAgB;AAEhB,IAAA,QAAQ,MAAW;8GA3BV,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAN,MAAM,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,aAAA,EAAA,aAAA,EAuBK,qBAAqB,CAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,OAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,SAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA3B/B,CAAiE,+DAAA,CAAA,EAAA,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A,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAHZ,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CACzE,EAAA,OAAA,EAAA,CAAA,OAAO,EAAE,MAAM,CAAA,EAAA,CAAA,CAAA,EAAA;AAEhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHZ,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGnD,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC;AACpF,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;AAC7B,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-tabs.mjs","sources":["../../../src/tabs/tab.component.ts","../../../src/tabs/tab-content.component.ts","../../../src/tabs/tabs.component.ts","../../../src/tabs/tabs.component.html","../../../src/tabs/tabs.module.ts","../../../src/tabs/ngx-tethys-tabs.ts"],"sourcesContent":["import { Component, OnInit, ChangeDetectionStrategy, Input, ViewChild, TemplateRef, ContentChild } from '@angular/core';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 选项卡的选项组件\n * @name thy-tab\n */\n@Component({\n selector: 'thy-tab',\n template: ` <ng-template #content><ng-content></ng-content></ng-template> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class ThyTab implements OnInit {\n /**\n * 自定义选项标题的模板\n * @type TemplateRef\n */\n @ContentChild('title') titleTemplateRef: TemplateRef<unknown>;\n\n @ViewChild('content', { static: true }) content: TemplateRef<HTMLElement>;\n\n /**\n * 选项标题\n */\n @Input() thyTitle: string;\n\n /**\n * 选项的唯一标识\n */\n @Input() id: string;\n\n /**\n * 是否禁用选项\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyDisabled: boolean;\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * @private\n */\n@Component({\n selector: 'thy-tab-content, [thyTabContent]',\n exportAs: 'thyTabContent',\n preserveWhitespaces: false,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (active) {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n }\n `,\n host: {\n class: 'thy-tab-content',\n '[attr.aria-hidden]': '!active',\n '[attr.tabindex]': 'active ? 0 : -1',\n '[style.visibility]': 'tabPaneAnimated ? active ? null : \"hidden\" : null',\n '[style.height]': 'tabPaneAnimated ? active ? null : 0 : null',\n '[style.overflow-y]': 'tabPaneAnimated ? active ? null : \"none\" : null',\n '[style.display]': '!tabPaneAnimated ? active ? null : \"none\" : null'\n },\n standalone: true,\n imports: [NgTemplateOutlet]\n})\nexport class ThyTabContent {\n @Input() content: TemplateRef<void> | null = null;\n\n @Input() active = false;\n\n @Input() tabPaneAnimated = true;\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n inject\n} from '@angular/core';\nimport { coerceBooleanProperty, isString } from 'ngx-tethys/util';\nimport { fromEvent } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ThyTab } from './tab.component';\nimport { ThyActiveTabInfo, ThyTabActiveEvent } from './types';\nimport { ThyTabContent } from './tab-content.component';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ThyNav, ThyNavItemDirective } from 'ngx-tethys/nav';\n\nexport type ThyTabsSize = 'lg' | 'md' | 'sm';\n\nexport type ThyTabsType = 'pulled' | 'tabs' | 'pills' | 'lite';\n\nexport type ThyTabsPosition = 'top' | 'left';\n\n/**\n * 选项卡切换组件\n * @name thy-tabs\n */\n@Component({\n selector: 'thy-tabs',\n templateUrl: './tabs.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tabs',\n '[class.thy-tabs-top]': `thyPosition === 'top'`,\n '[class.thy-tabs-left]': `thyPosition === 'left'`,\n '[style.overflow]': `transitionStarted ? \"hidden\" : null`\n },\n standalone: true,\n imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent]\n})\nexport class ThyTabs implements OnInit, OnChanges, AfterContentInit {\n private cd = inject(ChangeDetectorRef);\n private el = inject(ElementRef);\n\n @ContentChildren(ThyTab, { descendants: true }) tabs = new QueryList<ThyTab>();\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * 标签类型\n * @type 'pulled' | 'tabs' | 'pills' | 'lite'\n */\n @Input() thyType: ThyTabsType = 'tabs';\n\n /**\n * 选项卡的大小\n * @type 'lg' | 'md' | 'sm'\n */\n @Input() thySize: ThyTabsSize = 'md';\n\n /**\n * 激活的项\n */\n @Input()\n set thyActiveTab(value: ThyActiveTabInfo) {\n if (isString(value)) {\n this.activeTabId = value;\n this.activeTabIndex = undefined;\n } else {\n this.activeTabIndex = value;\n this.activeTabId = undefined;\n }\n }\n\n /**\n * 附加操作\n */\n @Input() thyExtra: TemplateRef<unknown>;\n\n /**\n * 选项卡的位置\n * @type 'top' | 'left'\n */\n @Input() thyPosition: ThyTabsPosition = 'top';\n\n /**\n * 是否使用动画切换 Tabs\n */\n @Input({ transform: coerceBooleanProperty }) thyAnimated: boolean = false;\n\n /**\n * 响应式,自动计算宽度存放 thyNavItem,并添加更多弹框\n */\n @Input({ transform: coerceBooleanProperty }) thyResponsive: boolean = false;\n\n /**\n * 激活的项发生改变时的回调\n */\n @Output() thyActiveTabChange: EventEmitter<ThyTabActiveEvent> = new EventEmitter<ThyTabActiveEvent>();\n\n activeTabIndex: number = 0;\n\n activeTabId: string;\n\n transitionStarted: boolean = false;\n\n ngOnInit(): void {\n const tabsContent = this.el.nativeElement.querySelector('.thy-tabs-content');\n fromEvent(tabsContent, 'transitionend')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.transitionStarted = false;\n this.cd.markForCheck();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thyActiveTab } = changes;\n if (thyActiveTab && !thyActiveTab.firstChange && this.thyAnimated) {\n const index = thyActiveTab?.currentValue?.index || Array.from(this.tabs).findIndex(k => k.id === thyActiveTab?.currentValue.id);\n this.transitionStarted = this.activeTabIndex !== index;\n this.activeTabIndex = index;\n }\n }\n\n ngAfterContentInit() {\n this.tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {\n this.thyAnimated && (this.transitionStarted = true);\n this.activeTabIndex = data.length - 1;\n this.cd.markForCheck();\n });\n }\n\n get tabPaneAnimated(): boolean {\n return this.thyPosition === 'top' && this.thyAnimated;\n }\n\n getTabContentMarginLeft(): string {\n if (this.tabPaneAnimated) {\n return `${-(this.activeTabIndex || 0) * 100}%`;\n }\n return '';\n }\n\n activeTab(tab: ThyTab, index: number) {\n if (tab.thyDisabled) {\n return;\n }\n this.activeTabId = tab.id || null;\n this.thyAnimated && (this.transitionStarted = this.activeTabIndex !== index);\n this.activeTabIndex = index;\n const activeTab = tab.id ? tab.id : index;\n this.thyActiveTabChange.emit(activeTab);\n }\n}\n","<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType\"\n [thySize]=\"thySize\"\n [thyExtra]=\"thyExtra\"\n [thyVertical]=\"thyPosition === 'left'\"\n [thyResponsive]=\"thyResponsive\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id\"\n [thyNavItemDisabled]=\"tab.thyDisabled\"\n [thyNavItemActive]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyTabs } from './tabs.component';\nimport { ThyTab } from './tab.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyNavModule } from 'ngx-tethys/nav';\nimport { ThyTabContent } from './tab-content.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyNavModule, ThyTabs, ThyTab, ThyTabContent],\n exports: [ThyTabs, ThyTab]\n})\nexport class ThyTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;AAGG;MAOU,MAAM,CAAA;AAyBf,IAAA,WAAA,GAAA,GAAgB;AAEhB,IAAA,QAAQ,MAAW;8GA3BV,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAN,MAAM,EAAA,YAAA,E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;ACXD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { isThemeColor } from 'ngx-tethys/core';
|
|
5
5
|
import { hexToRgb, coerceBooleanProperty } from 'ngx-tethys/util';
|
|
@@ -11,24 +11,8 @@ import { ThyIconModule } from 'ngx-tethys/icon';
|
|
|
11
11
|
* @name thy-tag,[thyTag]
|
|
12
12
|
*/
|
|
13
13
|
class ThyTag {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @type primary | success | info | warning | danger | default | light | string
|
|
17
|
-
* @default default
|
|
18
|
-
*/
|
|
19
|
-
set thyTag(value) {
|
|
20
|
-
if (value) {
|
|
21
|
-
this.color = value;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 标签颜色,支持设置主题色和颜色值,主题色为 default、primary、success、info、warning、danger
|
|
26
|
-
*/
|
|
27
|
-
set thyColor(color) {
|
|
28
|
-
this.color = color;
|
|
29
|
-
}
|
|
30
|
-
constructor(elementRef) {
|
|
31
|
-
this.elementRef = elementRef;
|
|
14
|
+
constructor() {
|
|
15
|
+
this.elementRef = inject(ElementRef);
|
|
32
16
|
this.color = 'default';
|
|
33
17
|
this.hostRenderer = useHostRenderer();
|
|
34
18
|
/**
|
|
@@ -47,6 +31,22 @@ class ThyTag {
|
|
|
47
31
|
*/
|
|
48
32
|
this.thySize = 'md';
|
|
49
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* 标签颜色,thyColor 的简写
|
|
36
|
+
* @type primary | success | info | warning | danger | default | light | string
|
|
37
|
+
* @default default
|
|
38
|
+
*/
|
|
39
|
+
set thyTag(value) {
|
|
40
|
+
if (value) {
|
|
41
|
+
this.color = value;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 标签颜色,支持设置主题色和颜色值,主题色为 default、primary、success、info、warning、danger
|
|
46
|
+
*/
|
|
47
|
+
set thyColor(color) {
|
|
48
|
+
this.color = color;
|
|
49
|
+
}
|
|
50
50
|
ngOnInit() {
|
|
51
51
|
this.setColor();
|
|
52
52
|
}
|
|
@@ -80,7 +80,7 @@ class ThyTag {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTag, deps: [
|
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTag, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
84
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.0", type: ThyTag, isStandalone: true, selector: "thy-tag,[thyTag]", inputs: { thyTag: "thyTag", thyShape: "thyShape", thyColor: "thyColor", thyTheme: "thyTheme", thySize: "thySize", thyHoverable: ["thyHoverable", "thyHoverable", coerceBooleanProperty] }, host: { properties: { "class.thy-tag-pill": "thyShape === \"pill\"", "class.thy-tag-outline": "thyTheme === \"outline\"", "class.thy-tag-hover": "thyHoverable", "class.thy-tag-md": "thySize === \"md\"", "class.thy-tag-sm": "thySize === \"sm\"", "class.thy-tag-xs": "thySize === \"xs\"", "class.thy-tag-lg": "thySize === \"lg\"" }, classAttribute: "thy-tag" }, usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
85
85
|
}
|
|
86
86
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTag, decorators: [{
|
|
@@ -95,7 +95,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
95
95
|
'[class.thy-tag-xs]': 'thySize === "xs"',
|
|
96
96
|
'[class.thy-tag-lg]': 'thySize === "lg"'
|
|
97
97
|
}, standalone: true, template: "<ng-content></ng-content>\n" }]
|
|
98
|
-
}],
|
|
98
|
+
}], propDecorators: { thyTag: [{
|
|
99
99
|
type: Input
|
|
100
100
|
}], thyShape: [{
|
|
101
101
|
type: Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-tag.mjs","sources":["../../../src/tag/tag.component.ts","../../../src/tag/tag.component.html","../../../src/tag/tags.component.ts","../../../src/tag/tag.module.ts","../../../src/tag/ngx-tethys-tag.ts"],"sourcesContent":["import { Component, ElementRef, OnChanges, Input, OnInit, ChangeDetectionStrategy, SimpleChanges } from '@angular/core';\nimport { isThemeColor, ThyThemeColor } from 'ngx-tethys/core';\nimport { coerceBooleanProperty, hexToRgb } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\n\nexport type ThyTagColor = ThyThemeColor | string;\n\nexport type ThyTagShape = 'pill' | 'rectangle';\n\nexport type ThyTagSize = 'sm' | 'md' | 'lg';\n\n/**\n * 标签组件\n * @name thy-tag,[thyTag]\n */\n@Component({\n selector: 'thy-tag,[thyTag]',\n templateUrl: './tag.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tag',\n '[class.thy-tag-pill]': 'thyShape === \"pill\"',\n '[class.thy-tag-outline]': 'thyTheme === \"outline\"',\n '[class.thy-tag-hover]': 'thyHoverable',\n '[class.thy-tag-md]': 'thySize === \"md\"',\n '[class.thy-tag-sm]': 'thySize === \"sm\"',\n '[class.thy-tag-xs]': 'thySize === \"xs\"',\n '[class.thy-tag-lg]': 'thySize === \"lg\"'\n },\n standalone: true\n})\nexport class ThyTag implements OnInit, OnChanges {\n private color: ThyTagColor = 'default';\n\n private hostRenderer = useHostRenderer();\n\n /**\n * 标签颜色,thyColor 的简写\n * @type primary | success | info | warning | danger | default | light | string\n * @default default\n */\n @Input()\n set thyTag(value: ThyTagColor) {\n if (value) {\n this.color = value;\n }\n }\n\n /**\n * 标签形状\n * @type pill | rectangle\n */\n @Input() thyShape: ThyTagShape = 'rectangle';\n\n /**\n * 标签颜色,支持设置主题色和颜色值,主题色为 default、primary、success、info、warning、danger\n */\n @Input()\n set thyColor(color: ThyTagColor) {\n this.color = color;\n }\n\n /**\n * 标签主题,fill 为颜色填充,outline 为线框,weak-fill 为背景色0.1透明度效果\n * @type outline | fill | weak-fill\n */\n @Input() thyTheme: 'outline' | 'fill' | 'weak-fill' = 'fill';\n\n /**\n * 标签大小\n * @type sm | md | lg\n */\n @Input() thySize: ThyTagSize = 'md';\n\n /**\n * 可 Hover 悬停的标签,设置为 true 时会有一个 Hover 效果\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n thyHoverable: boolean | string;\n\n
|
|
1
|
+
{"version":3,"file":"ngx-tethys-tag.mjs","sources":["../../../src/tag/tag.component.ts","../../../src/tag/tag.component.html","../../../src/tag/tags.component.ts","../../../src/tag/tag.module.ts","../../../src/tag/ngx-tethys-tag.ts"],"sourcesContent":["import { Component, ElementRef, OnChanges, Input, OnInit, ChangeDetectionStrategy, SimpleChanges, inject } from '@angular/core';\nimport { isThemeColor, ThyThemeColor } from 'ngx-tethys/core';\nimport { coerceBooleanProperty, hexToRgb } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\n\nexport type ThyTagColor = ThyThemeColor | string;\n\nexport type ThyTagShape = 'pill' | 'rectangle';\n\nexport type ThyTagSize = 'sm' | 'md' | 'lg';\n\n/**\n * 标签组件\n * @name thy-tag,[thyTag]\n */\n@Component({\n selector: 'thy-tag,[thyTag]',\n templateUrl: './tag.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tag',\n '[class.thy-tag-pill]': 'thyShape === \"pill\"',\n '[class.thy-tag-outline]': 'thyTheme === \"outline\"',\n '[class.thy-tag-hover]': 'thyHoverable',\n '[class.thy-tag-md]': 'thySize === \"md\"',\n '[class.thy-tag-sm]': 'thySize === \"sm\"',\n '[class.thy-tag-xs]': 'thySize === \"xs\"',\n '[class.thy-tag-lg]': 'thySize === \"lg\"'\n },\n standalone: true\n})\nexport class ThyTag implements OnInit, OnChanges {\n private elementRef = inject(ElementRef);\n\n private color: ThyTagColor = 'default';\n\n private hostRenderer = useHostRenderer();\n\n /**\n * 标签颜色,thyColor 的简写\n * @type primary | success | info | warning | danger | default | light | string\n * @default default\n */\n @Input()\n set thyTag(value: ThyTagColor) {\n if (value) {\n this.color = value;\n }\n }\n\n /**\n * 标签形状\n * @type pill | rectangle\n */\n @Input() thyShape: ThyTagShape = 'rectangle';\n\n /**\n * 标签颜色,支持设置主题色和颜色值,主题色为 default、primary、success、info、warning、danger\n */\n @Input()\n set thyColor(color: ThyTagColor) {\n this.color = color;\n }\n\n /**\n * 标签主题,fill 为颜色填充,outline 为线框,weak-fill 为背景色0.1透明度效果\n * @type outline | fill | weak-fill\n */\n @Input() thyTheme: 'outline' | 'fill' | 'weak-fill' = 'fill';\n\n /**\n * 标签大小\n * @type sm | md | lg\n */\n @Input() thySize: ThyTagSize = 'md';\n\n /**\n * 可 Hover 悬停的标签,设置为 true 时会有一个 Hover 效果\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n thyHoverable: boolean | string;\n\n ngOnInit(): void {\n this.setColor();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.thyColor && changes.thyColor.currentValue && !changes.thyColor.firstChange) {\n this.setColor();\n }\n if (changes.thyTheme && changes.thyTheme.currentValue && !changes.thyTheme.firstChange) {\n this.setColor();\n }\n }\n\n private setColor(): void {\n this.elementRef.nativeElement.style.removeProperty('background-color');\n this.elementRef.nativeElement.style.removeProperty('border-color');\n this.elementRef.nativeElement.style.removeProperty('color');\n this.hostRenderer.updateClass([]);\n\n if (isThemeColor(this.color)) {\n this.hostRenderer.updateClass([`thy-tag-${this.thyTheme === 'fill' ? '' : this.thyTheme + '-'}${this.color}`]);\n } else {\n if (this.thyTheme === 'fill') {\n this.elementRef.nativeElement.style.backgroundColor = this.color;\n } else if (this.thyTheme === 'outline') {\n this.elementRef.nativeElement.style.color = this.color;\n this.elementRef.nativeElement.style['border-color'] = this.color;\n } else {\n this.elementRef.nativeElement.style.backgroundColor = hexToRgb(this.color, 0.1);\n this.elementRef.nativeElement.style.color = this.color;\n }\n }\n }\n}\n","<ng-content></ng-content>\n","import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\n\n/**\n * @name thy-tags\n */\n@Component({\n selector: 'thy-tags',\n template: '<ng-content></ng-content>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tags'\n },\n standalone: true\n})\nexport class ThyTags implements OnInit {\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyTag } from './tag.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyTags } from './tags.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyTag, ThyTags],\n exports: [ThyTag, ThyTags]\n})\nexport class ThyTagModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAWA;;;AAGG;MAiBU,MAAM,CAAA;AAhBnB,IAAA,WAAA,GAAA;AAiBY,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QAEhC,IAAK,CAAA,KAAA,GAAgB,SAAS,CAAC;QAE/B,IAAY,CAAA,YAAA,GAAG,eAAe,EAAE,CAAC;AAczC;;;AAGG;QACM,IAAQ,CAAA,QAAA,GAAgB,WAAW,CAAC;AAU7C;;;AAGG;QACM,IAAQ,CAAA,QAAA,GAAqC,MAAM,CAAC;AAE7D;;;AAGG;QACM,IAAO,CAAA,OAAA,GAAe,IAAI,CAAC;AA0Cv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AC;AAC7B,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, forwardRef, EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, forwardRef, inject, ChangeDetectorRef, EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgZone, ViewChild, ElementRef, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
5
5
|
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
@@ -436,9 +436,9 @@ class ThyInnerTimePicker {
|
|
|
436
436
|
get isEditable() {
|
|
437
437
|
return !(this.readonlyInput || this.disabled);
|
|
438
438
|
}
|
|
439
|
-
constructor(
|
|
440
|
-
this._cd =
|
|
441
|
-
this._store =
|
|
439
|
+
constructor() {
|
|
440
|
+
this._cd = inject(ChangeDetectorRef);
|
|
441
|
+
this._store = inject(ThyTimePickerStore);
|
|
442
442
|
/** emits true if value is a valid date */
|
|
443
443
|
this.isValid = new EventEmitter();
|
|
444
444
|
// min/max validation for input fields
|
|
@@ -449,6 +449,9 @@ class ThyInnerTimePicker {
|
|
|
449
449
|
this.onChange = Function.prototype;
|
|
450
450
|
this.onTouched = Function.prototype;
|
|
451
451
|
this.timerPickerSubscription = new Subscription();
|
|
452
|
+
const _config = inject(TimePickerConfig);
|
|
453
|
+
const _cd = this._cd;
|
|
454
|
+
const _store = this._store;
|
|
452
455
|
Object.assign(this, _config);
|
|
453
456
|
this.timerPickerSubscription.add(_store
|
|
454
457
|
.select(state => state.value)
|
|
@@ -608,13 +611,13 @@ class ThyInnerTimePicker {
|
|
|
608
611
|
this.minutes = padNumber(_value.getMinutes());
|
|
609
612
|
this.seconds = padNumber(_value.getUTCSeconds());
|
|
610
613
|
}
|
|
611
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInnerTimePicker, deps: [
|
|
614
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInnerTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
612
615
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyInnerTimePicker, isStandalone: true, selector: "thy-inner-time-picker", inputs: { hourStep: "hourStep", minuteStep: "minuteStep", secondsStep: "secondsStep", readonlyInput: "readonlyInput", disabled: "disabled", mousewheel: "mousewheel", arrowKeys: "arrowKeys", showSpinners: "showSpinners", showMeridian: "showMeridian", showMinutes: "showMinutes", showSeconds: "showSeconds", meridians: "meridians", min: "min", max: "max", hoursPlaceholder: "hoursPlaceholder", minutesPlaceholder: "minutesPlaceholder", secondsPlaceholder: "secondsPlaceholder" }, outputs: { isValid: "isValid" }, providers: [TIMEPICKER_CONTROL_VALUE_ACCESSOR, ThyTimePickerStore], usesOnChanges: true, ngImport: i0, template: "<table>\n <tbody>\n <tr class=\"text-center\" [hidden]=\"!showSpinners\">\n <!-- increment hours button-->\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canIncrementHours || !isEditable\" (click)=\"changeHours(hourStep)\"\n ><span class=\"thy-chevron thy-chevron-up\"></span\n ></a>\n </td>\n <!-- divider -->\n @if (showMinutes) {\n <td> </td>\n }\n <!-- increment minutes button -->\n @if (showMinutes) {\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canIncrementMinutes || !isEditable\" (click)=\"changeMinutes(minuteStep)\"\n ><span class=\"thy-chevron thy-chevron-up\"></span\n ></a>\n </td>\n }\n <!-- divider -->\n @if (showSeconds) {\n <td> </td>\n }\n <!-- increment seconds button -->\n @if (showSeconds) {\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canIncrementSeconds || !isEditable\" (click)=\"changeSeconds(secondsStep)\">\n <span class=\"thy-chevron thy-chevron-up\"></span>\n </a>\n </td>\n }\n <!-- space between -->\n @if (showMeridian) {\n <td> </td>\n }\n <!-- meridian placeholder-->\n @if (showMeridian) {\n <td></td>\n }\n </tr>\n <tr>\n <!-- hours -->\n <td class=\"form-group\" [class.has-error]=\"invalidHours\">\n <input\n type=\"text\"\n [class.is-invalid]=\"invalidHours\"\n class=\"form-control text-center thy-time-picker-field\"\n [placeholder]=\"hoursPlaceholder\"\n maxlength=\"2\"\n [readonly]=\"readonlyInput\"\n [disabled]=\"disabled\"\n [value]=\"hours\"\n (wheel)=\"prevDef($event); changeHours(hourStep * wheelSign($event), 'wheel')\"\n (keydown.ArrowUp)=\"changeHours(hourStep, 'key')\"\n (keydown.ArrowDown)=\"changeHours(-hourStep, 'key')\"\n (change)=\"updateHours($event.target.value)\"\n />\n </td>\n\n <!-- divider -->\n @if (showMinutes) {\n <td> : </td>\n }\n <!-- minutes -->\n @if (showMinutes) {\n <td class=\"form-group\" [class.has-error]=\"invalidMinutes\">\n <input\n type=\"text\"\n [class.is-invalid]=\"invalidMinutes\"\n class=\"form-control text-center thy-time-picker-field\"\n [placeholder]=\"minutesPlaceholder\"\n maxlength=\"2\"\n [readonly]=\"readonlyInput\"\n [disabled]=\"disabled\"\n [value]=\"minutes\"\n (wheel)=\"prevDef($event); changeMinutes(minuteStep * wheelSign($event), 'wheel')\"\n (keydown.ArrowUp)=\"changeMinutes(minuteStep, 'key')\"\n (keydown.ArrowDown)=\"changeMinutes(-minuteStep, 'key')\"\n (change)=\"updateMinutes($event.target.value)\"\n />\n </td>\n }\n <!-- divider -->\n @if (showSeconds) {\n <td> : </td>\n }\n <!-- seconds -->\n @if (showSeconds) {\n <td class=\"form-group\" [class.has-error]=\"invalidSeconds\">\n <input\n type=\"text\"\n [class.is-invalid]=\"invalidSeconds\"\n class=\"form-control text-center thy-time-picker-field\"\n [placeholder]=\"secondsPlaceholder\"\n maxlength=\"2\"\n [readonly]=\"readonlyInput\"\n [disabled]=\"disabled\"\n [value]=\"seconds\"\n (wheel)=\"prevDef($event); changeSeconds(secondsStep * wheelSign($event), 'wheel')\"\n (keydown.ArrowUp)=\"changeSeconds(secondsStep, 'key')\"\n (keydown.ArrowDown)=\"changeSeconds(-secondsStep, 'key')\"\n (change)=\"updateSeconds($event.target.value)\"\n />\n </td>\n }\n <!-- space between -->\n @if (showMeridian) {\n <td> </td>\n }\n <!-- meridian -->\n @if (showMeridian) {\n <td>\n <button\n type=\"button\"\n class=\"btn btn-default text-center\"\n [disabled]=\"!isEditable || !canToggleMeridian\"\n [class.disabled]=\"!isEditable || !canToggleMeridian\"\n (click)=\"toggleMeridian()\"\n >\n {{ meridian }}\n </button>\n </td>\n }\n </tr>\n <tr class=\"text-center\" [hidden]=\"!showSpinners\">\n <!-- decrement hours button-->\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canDecrementHours || !isEditable\" (click)=\"changeHours(-hourStep)\">\n <span class=\"thy-chevron thy-chevron-down\"></span>\n </a>\n </td>\n <!-- divider -->\n @if (showMinutes) {\n <td> </td>\n }\n <!-- decrement minutes button-->\n @if (showMinutes) {\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canDecrementMinutes || !isEditable\" (click)=\"changeMinutes(-minuteStep)\">\n <span class=\"thy-chevron thy-chevron-down\"></span>\n </a>\n </td>\n }\n <!-- divider -->\n @if (showSeconds) {\n <td> </td>\n }\n <!-- decrement seconds button-->\n @if (showSeconds) {\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canDecrementSeconds || !isEditable\" (click)=\"changeSeconds(-secondsStep)\">\n <span class=\"thy-chevron thy-chevron-down\"></span>\n </a>\n </td>\n }\n <!-- space between -->\n @if (showMeridian) {\n <td> </td>\n }\n <!-- meridian placeholder-->\n @if (showMeridian) {\n <td></td>\n }\n </tr>\n </tbody>\n</table>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
613
616
|
}
|
|
614
617
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInnerTimePicker, decorators: [{
|
|
615
618
|
type: Component,
|
|
616
619
|
args: [{ selector: 'thy-inner-time-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TIMEPICKER_CONTROL_VALUE_ACCESSOR, ThyTimePickerStore], standalone: true, imports: [], template: "<table>\n <tbody>\n <tr class=\"text-center\" [hidden]=\"!showSpinners\">\n <!-- increment hours button-->\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canIncrementHours || !isEditable\" (click)=\"changeHours(hourStep)\"\n ><span class=\"thy-chevron thy-chevron-up\"></span\n ></a>\n </td>\n <!-- divider -->\n @if (showMinutes) {\n <td> </td>\n }\n <!-- increment minutes button -->\n @if (showMinutes) {\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canIncrementMinutes || !isEditable\" (click)=\"changeMinutes(minuteStep)\"\n ><span class=\"thy-chevron thy-chevron-up\"></span\n ></a>\n </td>\n }\n <!-- divider -->\n @if (showSeconds) {\n <td> </td>\n }\n <!-- increment seconds button -->\n @if (showSeconds) {\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canIncrementSeconds || !isEditable\" (click)=\"changeSeconds(secondsStep)\">\n <span class=\"thy-chevron thy-chevron-up\"></span>\n </a>\n </td>\n }\n <!-- space between -->\n @if (showMeridian) {\n <td> </td>\n }\n <!-- meridian placeholder-->\n @if (showMeridian) {\n <td></td>\n }\n </tr>\n <tr>\n <!-- hours -->\n <td class=\"form-group\" [class.has-error]=\"invalidHours\">\n <input\n type=\"text\"\n [class.is-invalid]=\"invalidHours\"\n class=\"form-control text-center thy-time-picker-field\"\n [placeholder]=\"hoursPlaceholder\"\n maxlength=\"2\"\n [readonly]=\"readonlyInput\"\n [disabled]=\"disabled\"\n [value]=\"hours\"\n (wheel)=\"prevDef($event); changeHours(hourStep * wheelSign($event), 'wheel')\"\n (keydown.ArrowUp)=\"changeHours(hourStep, 'key')\"\n (keydown.ArrowDown)=\"changeHours(-hourStep, 'key')\"\n (change)=\"updateHours($event.target.value)\"\n />\n </td>\n\n <!-- divider -->\n @if (showMinutes) {\n <td> : </td>\n }\n <!-- minutes -->\n @if (showMinutes) {\n <td class=\"form-group\" [class.has-error]=\"invalidMinutes\">\n <input\n type=\"text\"\n [class.is-invalid]=\"invalidMinutes\"\n class=\"form-control text-center thy-time-picker-field\"\n [placeholder]=\"minutesPlaceholder\"\n maxlength=\"2\"\n [readonly]=\"readonlyInput\"\n [disabled]=\"disabled\"\n [value]=\"minutes\"\n (wheel)=\"prevDef($event); changeMinutes(minuteStep * wheelSign($event), 'wheel')\"\n (keydown.ArrowUp)=\"changeMinutes(minuteStep, 'key')\"\n (keydown.ArrowDown)=\"changeMinutes(-minuteStep, 'key')\"\n (change)=\"updateMinutes($event.target.value)\"\n />\n </td>\n }\n <!-- divider -->\n @if (showSeconds) {\n <td> : </td>\n }\n <!-- seconds -->\n @if (showSeconds) {\n <td class=\"form-group\" [class.has-error]=\"invalidSeconds\">\n <input\n type=\"text\"\n [class.is-invalid]=\"invalidSeconds\"\n class=\"form-control text-center thy-time-picker-field\"\n [placeholder]=\"secondsPlaceholder\"\n maxlength=\"2\"\n [readonly]=\"readonlyInput\"\n [disabled]=\"disabled\"\n [value]=\"seconds\"\n (wheel)=\"prevDef($event); changeSeconds(secondsStep * wheelSign($event), 'wheel')\"\n (keydown.ArrowUp)=\"changeSeconds(secondsStep, 'key')\"\n (keydown.ArrowDown)=\"changeSeconds(-secondsStep, 'key')\"\n (change)=\"updateSeconds($event.target.value)\"\n />\n </td>\n }\n <!-- space between -->\n @if (showMeridian) {\n <td> </td>\n }\n <!-- meridian -->\n @if (showMeridian) {\n <td>\n <button\n type=\"button\"\n class=\"btn btn-default text-center\"\n [disabled]=\"!isEditable || !canToggleMeridian\"\n [class.disabled]=\"!isEditable || !canToggleMeridian\"\n (click)=\"toggleMeridian()\"\n >\n {{ meridian }}\n </button>\n </td>\n }\n </tr>\n <tr class=\"text-center\" [hidden]=\"!showSpinners\">\n <!-- decrement hours button-->\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canDecrementHours || !isEditable\" (click)=\"changeHours(-hourStep)\">\n <span class=\"thy-chevron thy-chevron-down\"></span>\n </a>\n </td>\n <!-- divider -->\n @if (showMinutes) {\n <td> </td>\n }\n <!-- decrement minutes button-->\n @if (showMinutes) {\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canDecrementMinutes || !isEditable\" (click)=\"changeMinutes(-minuteStep)\">\n <span class=\"thy-chevron thy-chevron-down\"></span>\n </a>\n </td>\n }\n <!-- divider -->\n @if (showSeconds) {\n <td> </td>\n }\n <!-- decrement seconds button-->\n @if (showSeconds) {\n <td>\n <a class=\"btn btn-link\" [class.disabled]=\"!canDecrementSeconds || !isEditable\" (click)=\"changeSeconds(-secondsStep)\">\n <span class=\"thy-chevron thy-chevron-down\"></span>\n </a>\n </td>\n }\n <!-- space between -->\n @if (showMeridian) {\n <td> </td>\n }\n <!-- meridian placeholder-->\n @if (showMeridian) {\n <td></td>\n }\n </tr>\n </tbody>\n</table>\n" }]
|
|
617
|
-
}], ctorParameters: () => [
|
|
620
|
+
}], ctorParameters: () => [], propDecorators: { hourStep: [{
|
|
618
621
|
type: Input
|
|
619
622
|
}], minuteStep: [{
|
|
620
623
|
type: Input
|
|
@@ -657,29 +660,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
657
660
|
* @name thy-time-picker-panel
|
|
658
661
|
*/
|
|
659
662
|
class ThyTimePanel {
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
* @default HH:mm:ss
|
|
664
|
-
*/
|
|
665
|
-
set thyFormat(value) {
|
|
666
|
-
if (value) {
|
|
667
|
-
const formatSet = new Set(value);
|
|
668
|
-
this.showHourColumn = formatSet.has('H') || formatSet.has('h');
|
|
669
|
-
this.showMinuteColumn = formatSet.has('m');
|
|
670
|
-
this.showSecondColumn = formatSet.has('s');
|
|
671
|
-
}
|
|
672
|
-
else {
|
|
673
|
-
this.showHourColumn = true;
|
|
674
|
-
this.showMinuteColumn = true;
|
|
675
|
-
this.showSecondColumn = true;
|
|
676
|
-
}
|
|
677
|
-
this.showColumnCount = [this.showHourColumn, this.showMinuteColumn, this.showSecondColumn].filter(m => m).length;
|
|
678
|
-
this.cdr.markForCheck();
|
|
679
|
-
}
|
|
680
|
-
constructor(cdr, ngZone) {
|
|
681
|
-
this.cdr = cdr;
|
|
682
|
-
this.ngZone = ngZone;
|
|
663
|
+
constructor() {
|
|
664
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
665
|
+
this.ngZone = inject(NgZone);
|
|
683
666
|
/**
|
|
684
667
|
* 小时间隔步长
|
|
685
668
|
* @type number
|
|
@@ -729,6 +712,26 @@ class ThyTimePanel {
|
|
|
729
712
|
this.onValueChangeFn = () => void 0;
|
|
730
713
|
this.onTouchedFn = () => void 0;
|
|
731
714
|
}
|
|
715
|
+
/**
|
|
716
|
+
* 展示的日期格式,支持 'HH:mm:ss' | 'HH:mm' | 'mm:ss'
|
|
717
|
+
* @type string
|
|
718
|
+
* @default HH:mm:ss
|
|
719
|
+
*/
|
|
720
|
+
set thyFormat(value) {
|
|
721
|
+
if (value) {
|
|
722
|
+
const formatSet = new Set(value);
|
|
723
|
+
this.showHourColumn = formatSet.has('H') || formatSet.has('h');
|
|
724
|
+
this.showMinuteColumn = formatSet.has('m');
|
|
725
|
+
this.showSecondColumn = formatSet.has('s');
|
|
726
|
+
}
|
|
727
|
+
else {
|
|
728
|
+
this.showHourColumn = true;
|
|
729
|
+
this.showMinuteColumn = true;
|
|
730
|
+
this.showSecondColumn = true;
|
|
731
|
+
}
|
|
732
|
+
this.showColumnCount = [this.showHourColumn, this.showMinuteColumn, this.showSecondColumn].filter(m => m).length;
|
|
733
|
+
this.cdr.markForCheck();
|
|
734
|
+
}
|
|
732
735
|
ngOnInit() {
|
|
733
736
|
this.generateTimeRange();
|
|
734
737
|
this.initialValue();
|
|
@@ -856,7 +859,7 @@ class ThyTimePanel {
|
|
|
856
859
|
this.resetScrollPosition();
|
|
857
860
|
}, 200);
|
|
858
861
|
}
|
|
859
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTimePanel, deps: [
|
|
862
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTimePanel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
860
863
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyTimePanel, isStandalone: true, selector: "thy-time-picker-panel", inputs: { thyFormat: "thyFormat", thyHourStep: "thyHourStep", thyMinuteStep: "thyMinuteStep", thySecondStep: "thySecondStep", thyShowSelectNow: ["thyShowSelectNow", "thyShowSelectNow", coerceBooleanProperty], thyShowOperations: ["thyShowOperations", "thyShowOperations", coerceBooleanProperty] }, outputs: { thyPickChange: "thyPickChange", thyClosePanel: "thyClosePanel" }, host: { properties: { "class.thy-time-picker-panel-has-bottom-operation": "thyShowOperations", "class.thy-time-picker-panel-columns-2": "showColumnCount === 2", "class.thy-time-picker-panel-columns-3": "showColumnCount === 3" }, classAttribute: "thy-time-picker-panel" }, providers: [
|
|
861
864
|
{
|
|
862
865
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -879,7 +882,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
879
882
|
'[class.thy-time-picker-panel-columns-2]': `showColumnCount === 2`,
|
|
880
883
|
'[class.thy-time-picker-panel-columns-3]': `showColumnCount === 3`
|
|
881
884
|
}, standalone: true, imports: [ThyButton, DecimalPipe], template: "<div class=\"{{ prefixCls }}-content\">\n @if (showHourColumn) {\n <ul #hourListElement class=\"{{ prefixCls }}-time-column {{ prefixCls }}-hour-column\">\n @for (time of hourRange; track $index; let i = $index) {\n <li\n class=\"{{ prefixCls }}-time-column-cell\"\n [class.thy-time-picker-panel-time-column-cell-selected]=\"hour === time.value\"\n (click)=\"pickHours(time, i)\">\n <span class=\"{{ prefixCls }}-time-column-cell-inner\">{{ time.value | number: '2.0-0' }}</span>\n </li>\n }\n </ul>\n }\n @if (showMinuteColumn) {\n <ul #minuteListElement class=\"{{ prefixCls }}-time-column {{ prefixCls }}-minute-column\">\n @for (time of minuteRange; track $index; let i = $index) {\n <li\n class=\"{{ prefixCls }}-time-column-cell\"\n [class.thy-time-picker-panel-time-column-cell-selected]=\"minute === time.value\"\n (click)=\"pickMinutes(time, i)\">\n <span class=\"{{ prefixCls }}-time-column-cell-inner\">{{ time.value | number: '2.0-0' }}</span>\n </li>\n }\n </ul>\n }\n @if (showSecondColumn) {\n <ul #secondListElement class=\"{{ prefixCls }}-time-column {{ prefixCls }}-second-column\">\n @for (time of secondRange; track $index; let i = $index) {\n <li\n class=\"{{ prefixCls }}-time-column-cell\"\n [class.thy-time-picker-panel-time-column-cell-selected]=\"second === time.value\"\n (click)=\"pickSeconds(time, i)\">\n <span class=\"{{ prefixCls }}-time-column-cell-inner\">{{ time.value | number: '2.0-0' }}</span>\n </li>\n }\n </ul>\n }\n</div>\n\n@if (thyShowOperations) {\n <div class=\"{{ prefixCls }}-bottom-operation\">\n @if (thyShowSelectNow) {\n <a href=\"javascript:;\" class=\"{{ prefixCls }}-time-now\" (click)=\"selectNow()\">\u6B64\u523B</a>\n }\n <button class=\"{{ prefixCls }}-time-confirm\" thyButton=\"primary\" thySize=\"xs\" class=\"confirm\" (click)=\"confirmPickTime()\">\u786E\u5B9A</button>\n </div>\n}\n" }]
|
|
882
|
-
}],
|
|
885
|
+
}], propDecorators: { hourListRef: [{
|
|
883
886
|
type: ViewChild,
|
|
884
887
|
args: ['hourListElement', { static: false }]
|
|
885
888
|
}], minuteListRef: [{
|
|
@@ -913,31 +916,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
913
916
|
* @name thy-time-picker
|
|
914
917
|
*/
|
|
915
918
|
class ThyTimePicker {
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
* @default HH:mm:ss
|
|
920
|
-
*/
|
|
921
|
-
set thyFormat(value) {
|
|
922
|
-
this.format = value || 'HH:mm:ss';
|
|
923
|
-
if (this.value && isValid(this.value)) {
|
|
924
|
-
this.showText = new TinyDate(this.value).format(this.format);
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
/**
|
|
928
|
-
* 禁用
|
|
929
|
-
* @type boolean
|
|
930
|
-
* @default false
|
|
931
|
-
*/
|
|
932
|
-
set thyDisabled(value) {
|
|
933
|
-
this.disabled = value;
|
|
934
|
-
}
|
|
935
|
-
get thyDisabled() {
|
|
936
|
-
return this.disabled;
|
|
937
|
-
}
|
|
938
|
-
constructor(cdr, elementRef) {
|
|
939
|
-
this.cdr = cdr;
|
|
940
|
-
this.elementRef = elementRef;
|
|
919
|
+
constructor() {
|
|
920
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
921
|
+
this.elementRef = inject(ElementRef);
|
|
941
922
|
/**
|
|
942
923
|
* 输入框大小
|
|
943
924
|
* @type 'xs' | 'sm' | 'md' | 'lg' | 'default'
|
|
@@ -992,6 +973,28 @@ class ThyTimePicker {
|
|
|
992
973
|
this.onValueChangeFn = () => void 0;
|
|
993
974
|
this.onTouchedFn = () => void 0;
|
|
994
975
|
}
|
|
976
|
+
/**
|
|
977
|
+
* 展示的日期格式,支持 'HH:mm:ss' | 'HH:mm' | 'mm:ss'
|
|
978
|
+
* @type string
|
|
979
|
+
* @default HH:mm:ss
|
|
980
|
+
*/
|
|
981
|
+
set thyFormat(value) {
|
|
982
|
+
this.format = value || 'HH:mm:ss';
|
|
983
|
+
if (this.value && isValid(this.value)) {
|
|
984
|
+
this.showText = new TinyDate(this.value).format(this.format);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* 禁用
|
|
989
|
+
* @type boolean
|
|
990
|
+
* @default false
|
|
991
|
+
*/
|
|
992
|
+
set thyDisabled(value) {
|
|
993
|
+
this.disabled = value;
|
|
994
|
+
}
|
|
995
|
+
get thyDisabled() {
|
|
996
|
+
return this.disabled;
|
|
997
|
+
}
|
|
995
998
|
ngOnInit() { }
|
|
996
999
|
ngAfterViewInit() {
|
|
997
1000
|
this.overlayPositions = getFlexiblePositions(this.thyPlacement, 4);
|
|
@@ -1189,7 +1192,7 @@ class ThyTimePicker {
|
|
|
1189
1192
|
disabledUserOperation() {
|
|
1190
1193
|
return this.disabled || this.thyReadonly;
|
|
1191
1194
|
}
|
|
1192
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTimePicker, deps: [
|
|
1195
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1193
1196
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyTimePicker, isStandalone: true, selector: "thy-time-picker", inputs: { thySize: "thySize", thyPlaceholder: "thyPlaceholder", thyPlacement: "thyPlacement", thyFormat: "thyFormat", thyHourStep: "thyHourStep", thyMinuteStep: "thyMinuteStep", thySecondStep: "thySecondStep", thyPopupClass: "thyPopupClass", thyBackdrop: ["thyBackdrop", "thyBackdrop", coerceBooleanProperty], thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty], thyReadonly: ["thyReadonly", "thyReadonly", coerceBooleanProperty], thyShowSelectNow: ["thyShowSelectNow", "thyShowSelectNow", coerceBooleanProperty], thyAllowClear: ["thyAllowClear", "thyAllowClear", coerceBooleanProperty] }, outputs: { thyOpenChange: "thyOpenChange" }, host: { properties: { "class.thy-time-picker-disabled": "disabled", "class.thy-time-picker-readonly": "thyReadonly" }, classAttribute: "thy-time-picker" }, providers: [
|
|
1194
1197
|
{
|
|
1195
1198
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1211,7 +1214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1211
1214
|
'[class.thy-time-picker-disabled]': `disabled`,
|
|
1212
1215
|
'[class.thy-time-picker-readonly]': `thyReadonly`
|
|
1213
1216
|
}, standalone: true, imports: [CdkOverlayOrigin, ThyInputDirective, FormsModule, NgTemplateOutlet, ThyIcon, NgClass, CdkConnectedOverlay, ThyTimePanel], animations: [scaleXMotion, scaleYMotion, scaleMotion], template: "<span cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" (click)=\"onInputPickerClick()\" class=\"{{ prefixCls }}-wrapper\">\n <ng-container>\n <input\n #pickerInput\n thyInput\n class=\"form-control {{ prefixCls }}-input\"\n [class.thy-input-disabled]=\"disabled\"\n [class.thy-input-readonly]=\"thyReadonly\"\n [class.thy-time-picker-panel-opened]=\"openState\"\n [(ngModel)]=\"showText\"\n [thySize]=\"thySize\"\n [disabled]=\"disabled\"\n [readonly]=\"thyReadonly\"\n [placeholder]=\"thyPlaceholder\"\n (blur)=\"onInputPickerBlur()\"\n (keyup.enter)=\"onKeyupEnter()\"\n (keyup.escape)=\"onKeyupEsc()\"\n (ngModelChange)=\"onCustomizeInput($event)\" />\n <ng-container *ngTemplateOutlet=\"rightIcon\"></ng-container>\n </ng-container>\n</span>\n\n<ng-template #rightIcon>\n @if (!disabled && thyAllowClear && !thyReadonly && showText) {\n <span class=\"{{ prefixCls }}-clear\">\n <thy-icon thyIconName=\"close-circle-bold-fill\" (click)=\"onClearTime($event)\" ngClass=\"remove-link remove-link-{{ thySize }}\"></thy-icon>\n </span>\n }\n <span class=\"{{ prefixCls }}-icon\">\n <thy-icon [thyIconName]=\"'clock-circle-moment'\" ngClass=\"remove-link-{{ thySize }}\"></thy-icon>\n </span>\n</ng-template>\n\n<!-- Overlay -->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"openState\"\n [cdkConnectedOverlayHasBackdrop]=\"thyBackdrop\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n cdkConnectedOverlayTransformOriginOn=\".thy-time-picker-container\"\n (positionChange)=\"onPositionChange($event)\"\n (backdropClick)=\"onClickBackdrop()\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (detach)=\"onOverlayDetach()\"\n (attach)=\"onOverlayAttach()\">\n <div\n #overlayContainer\n style=\"position: relative\"\n [@scaleXMotion]=\"thyPlacement === 'left' || thyPlacement === 'right' ? 'enter' : 'void'\"\n [@scaleYMotion]=\"thyPlacement === 'top' || thyPlacement === 'bottom' ? 'enter' : 'void'\"\n [@scaleMotion]=\"\n thyPlacement !== 'left' && thyPlacement !== 'right' && thyPlacement !== 'top' && thyPlacement !== 'bottom' ? 'enter' : 'void'\n \"\n class=\"thy-time-picker-container\">\n <!-- Compatible for overlay that not support offset dynamically and immediately -->\n <thy-time-picker-panel\n [ngClass]=\"thyPopupClass\"\n [(ngModel)]=\"value\"\n [thyFormat]=\"format\"\n [thyHourStep]=\"thyHourStep\"\n [thyMinuteStep]=\"thyMinuteStep\"\n [thySecondStep]=\"thySecondStep\"\n [thyShowSelectNow]=\"thyShowSelectNow\"\n (ngModelChange)=\"onPickTimeConfirm($event)\"\n (thyPickChange)=\"onPickTime($event)\"\n (thyClosePanel)=\"closeOverlay()\"></thy-time-picker-panel>\n </div>\n</ng-template>\n" }]
|
|
1214
|
-
}],
|
|
1217
|
+
}], propDecorators: { cdkConnectedOverlay: [{
|
|
1215
1218
|
type: ViewChild,
|
|
1216
1219
|
args: [CdkConnectedOverlay, { static: true }]
|
|
1217
1220
|
}], origin: [{
|