ngx-tethys 18.0.8 → 18.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -1
- package/action/action.component.d.ts +1 -2
- package/affix/affix.component.d.ts +2 -4
- package/alert/alert.component.d.ts +11 -19
- package/anchor/anchor-link.component.d.ts +2 -4
- package/anchor/anchor.component.d.ts +2 -7
- 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 +2 -2
- 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/index.d.ts +26 -27
- 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-cell.component.d.ts +1 -1
- 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 -4
- package/date-picker/lib/popups/inner-popup.component.d.ts +0 -2
- 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 +3 -11
- 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/divider/divider.component.d.ts +8 -2
- 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 +20 -21
- package/esm2022/affix/affix.component.mjs +11 -14
- package/esm2022/alert/alert.component.mjs +55 -81
- package/esm2022/anchor/anchor-link.component.mjs +23 -16
- package/esm2022/anchor/anchor.component.mjs +27 -24
- package/esm2022/arrow-switcher/arrow-switcher.component.mjs +25 -26
- package/esm2022/autocomplete/autocomplete.component.mjs +11 -11
- 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-list/avatar-list.component.mjs +4 -4
- package/esm2022/avatar/avatar.component.mjs +27 -28
- package/esm2022/avatar/avatar.pipe.mjs +6 -7
- package/esm2022/back-top/back-top.component.mjs +14 -18
- package/esm2022/badge/badge.component.mjs +8 -9
- package/esm2022/breadcrumb/breadcrumb-item.component.mjs +7 -7
- package/esm2022/breadcrumb/breadcrumb.component.mjs +15 -17
- package/esm2022/button/button-icon.component.mjs +4 -4
- package/esm2022/button/button.component.mjs +15 -15
- package/esm2022/calendar/calendar-header.component.mjs +15 -15
- package/esm2022/calendar/calendar.component.mjs +14 -15
- package/esm2022/card/header.component.mjs +4 -4
- package/esm2022/carousel/carousel-item.directive.mjs +7 -6
- package/esm2022/carousel/carousel.component.mjs +13 -15
- package/esm2022/carousel/carousel.service.mjs +7 -9
- package/esm2022/cascader/cascader-li.component.mjs +4 -4
- package/esm2022/cascader/cascader-search-option.component.mjs +4 -4
- package/esm2022/cascader/cascader.component.mjs +15 -22
- package/esm2022/checkbox/checkbox.component.mjs +11 -13
- package/esm2022/collapse/collapse-item.component.mjs +21 -24
- package/esm2022/color-picker/color-picker-panel.component.mjs +14 -15
- 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/comment/comment.component.mjs +4 -4
- 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 +10 -11
- package/esm2022/date-picker/date-picker.directive.mjs +6 -8
- package/esm2022/date-picker/date-picker.service.mjs +6 -10
- package/esm2022/date-picker/index.mjs +27 -28
- package/esm2022/date-picker/lib/calendar/calendar-footer.component.mjs +7 -8
- package/esm2022/date-picker/lib/calendar/calendar-header.component.mjs +6 -7
- package/esm2022/date-picker/lib/date/date-header.component.mjs +6 -12
- package/esm2022/date-picker/lib/date/date-table-cell.component.mjs +4 -4
- package/esm2022/date-picker/lib/date/date-table.component.mjs +10 -12
- package/esm2022/date-picker/lib/date-carousel/date-carousel.component.mjs +16 -16
- package/esm2022/date-picker/lib/decade/decade-header.component.mjs +8 -11
- package/esm2022/date-picker/lib/decade/decade-table.component.mjs +4 -4
- package/esm2022/date-picker/lib/month/month-header.component.mjs +6 -12
- package/esm2022/date-picker/lib/month/month-table.component.mjs +9 -10
- package/esm2022/date-picker/lib/popups/date-popup.component.mjs +14 -29
- package/esm2022/date-picker/lib/popups/inner-popup.component.mjs +14 -20
- package/esm2022/date-picker/lib/quarter/quarter-table.component.mjs +9 -10
- package/esm2022/date-picker/lib/year/year-header.component.mjs +6 -12
- package/esm2022/date-picker/lib/year/year-table.component.mjs +4 -4
- package/esm2022/date-picker/month-picker.component.mjs +9 -11
- package/esm2022/date-picker/picker.component.mjs +24 -35
- package/esm2022/date-picker/picker.pipes.mjs +10 -11
- package/esm2022/date-picker/quarter-picker.component.mjs +9 -11
- package/esm2022/date-picker/range-picker.component.mjs +9 -11
- package/esm2022/date-picker/range-picker.directive.mjs +6 -8
- package/esm2022/date-picker/week-picker.component.mjs +9 -11
- package/esm2022/date-picker/year-picker.component.mjs +9 -11
- package/esm2022/date-range/date-range.component.mjs +17 -18
- package/esm2022/date-range/optional-dates/optional-dates.component.mjs +9 -13
- 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 +10 -14
- package/esm2022/dialog/header/dialog-header.component.mjs +17 -22
- package/esm2022/divider/divider.component.mjs +21 -13
- 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-menu.component.mjs +11 -7
- package/esm2022/dropdown/dropdown-submenu.component.mjs +9 -10
- package/esm2022/dropdown/dropdown.directive.mjs +12 -10
- package/esm2022/empty/empty.component.mjs +17 -20
- package/esm2022/flexible-text/flexible-text.component.mjs +16 -17
- package/esm2022/form/form-group-error/form-group-error.component.mjs +12 -15
- package/esm2022/form/form-group-label.directive.mjs +9 -10
- package/esm2022/form/form-group.component.mjs +18 -22
- 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 +13 -19
- 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-hint/guider-hint.component.mjs +4 -4
- 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 +36 -41
- package/esm2022/input/input-count.component.mjs +7 -10
- package/esm2022/input/input-group.component.mjs +15 -16
- package/esm2022/input/input-search.component.mjs +9 -10
- package/esm2022/input/input.component.mjs +17 -17
- package/esm2022/input/input.directive.mjs +12 -17
- package/esm2022/input-number/input-number.component.mjs +6 -6
- package/esm2022/layout/header.component.mjs +4 -4
- package/esm2022/layout/sidebar-header.component.mjs +4 -4
- package/esm2022/layout/sidebar.component.mjs +125 -121
- package/esm2022/list/list-item-meta.component.mjs +4 -4
- package/esm2022/list/selection/selection-list.mjs +25 -25
- package/esm2022/loading/loading.component.mjs +10 -11
- package/esm2022/mention/mention.directive.mjs +9 -14
- package/esm2022/mention/suggestions/suggestions.component.mjs +11 -12
- package/esm2022/menu/group/menu-group.component.mjs +37 -38
- package/esm2022/menu/item/action/menu-item-action.component.mjs +15 -16
- package/esm2022/menu/item/menu-item.component.mjs +8 -9
- 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 +21 -15
- package/esm2022/message/message-queue.service.mjs +6 -8
- package/esm2022/message/message.component.mjs +9 -10
- package/esm2022/message/message.service.mjs +10 -11
- package/esm2022/nav/icon-nav/icon-nav-link.directive.mjs +4 -5
- 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 +35 -38
- package/esm2022/nav/nav.pipe.mjs +6 -7
- package/esm2022/notify/notify-container.component.mjs +11 -14
- package/esm2022/notify/notify-queue.service.mjs +6 -8
- package/esm2022/notify/notify.component.mjs +10 -10
- package/esm2022/notify/notify.service.mjs +11 -12
- package/esm2022/pagination/pagination.component.mjs +41 -46
- package/esm2022/pagination/pagination.pipe.mjs +6 -7
- package/esm2022/popover/header/popover-header.component.mjs +15 -17
- 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-circle.component.mjs +4 -7
- package/esm2022/progress/progress-strip.component.mjs +10 -13
- package/esm2022/progress/progress.component.mjs +5 -8
- package/esm2022/property/property-item.component.mjs +13 -16
- package/esm2022/property-operation/property-operation.component.mjs +27 -28
- 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 +12 -18
- package/esm2022/rate/rate.component.mjs +10 -10
- package/esm2022/resizable/resizable.directive.mjs +10 -12
- package/esm2022/resizable/resizable.service.mjs +7 -9
- package/esm2022/resizable/resize-handle.component.mjs +16 -14
- package/esm2022/resizable/resize-handles.component.mjs +12 -5
- package/esm2022/result/result.component.mjs +4 -4
- package/esm2022/segment/segment-item.component.mjs +15 -18
- package/esm2022/segment/segment.component.mjs +29 -30
- package/esm2022/select/custom-select/custom-select.component.mjs +19 -35
- package/esm2022/select/native-select/native-select.component.mjs +10 -11
- 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 +14 -22
- package/esm2022/shared/option/option.component.mjs +11 -22
- package/esm2022/shared/select/select-control/select-control.component.mjs +27 -27
- package/esm2022/skeleton/skeleton-circle.component.mjs +7 -15
- package/esm2022/skeleton/skeleton-rectangle.component.mjs +7 -15
- package/esm2022/skeleton/stylized/bullet-list.component.mjs +8 -9
- package/esm2022/skeleton/stylized/list.component.mjs +8 -9
- package/esm2022/skeleton/stylized/paragraph.component.mjs +8 -9
- 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 +13 -14
- 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 +16 -16
- package/esm2022/statistic/statistic.component.mjs +23 -23
- package/esm2022/stepper/step.component.mjs +6 -11
- package/esm2022/stepper/stepper-button.directive.mjs +10 -11
- package/esm2022/stepper/stepper.component.mjs +5 -5
- package/esm2022/strength/strength.component.mjs +11 -12
- package/esm2022/switch/switch.component.mjs +11 -11
- package/esm2022/table/table-column.component.mjs +58 -63
- package/esm2022/table/table-skeleton.component.mjs +35 -38
- package/esm2022/table/table.component.mjs +19 -29
- package/esm2022/tabs/tab-content.component.mjs +9 -9
- package/esm2022/tabs/tabs.component.mjs +22 -25
- package/esm2022/tag/tag.component.mjs +22 -22
- package/esm2022/time-picker/inner/inner-time-picker.component.mjs +12 -12
- package/esm2022/time-picker/time-picker-panel.component.mjs +31 -34
- package/esm2022/time-picker/time-picker.component.mjs +33 -43
- package/esm2022/timeline/timeline-item.component.mjs +15 -16
- package/esm2022/timeline/timeline.component.mjs +15 -16
- package/esm2022/tooltip/tooltip.component.mjs +17 -17
- package/esm2022/tooltip/tooltip.directive.mjs +11 -10
- package/esm2022/tooltip/tooltip.service.mjs +9 -13
- package/esm2022/transfer/transfer-list.component.mjs +9 -9
- package/esm2022/transfer/transfer.component.mjs +4 -4
- package/esm2022/tree/tree-node.component.mjs +16 -20
- package/esm2022/tree/tree.component.mjs +90 -96
- package/esm2022/tree-select/tree-select.component.mjs +28 -36
- package/esm2022/typography/bg-color.directive.mjs +9 -9
- package/esm2022/typography/text/text.component.mjs +3 -4
- 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/vote/vote.component.mjs +4 -4
- package/esm2022/watermark/watermark.directive.mjs +12 -12
- package/fesm2022/ngx-tethys-action.mjs +20 -20
- 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-alert.mjs +54 -80
- package/fesm2022/ngx-tethys-alert.mjs.map +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +48 -35
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +25 -25
- package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
- package/fesm2022/ngx-tethys-autocomplete.mjs +63 -75
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +32 -32
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +15 -18
- package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
- package/fesm2022/ngx-tethys-badge.mjs +8 -8
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-breadcrumb.mjs +19 -21
- package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngx-tethys-button.mjs +16 -16
- package/fesm2022/ngx-tethys-button.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +26 -26
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +3 -3
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +23 -24
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +19 -25
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-checkbox.mjs +10 -11
- package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-tethys-collapse.mjs +20 -22
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +47 -45
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-comment.mjs +3 -3
- package/fesm2022/ngx-tethys-comment.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 +2872 -2924
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-range.mjs +24 -26
- package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dialog.mjs +61 -77
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +20 -12
- package/fesm2022/ngx-tethys-divider.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 +49 -43
- package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +18 -18
- 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 +74 -89
- 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 +20 -26
- 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 +60 -65
- 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 +53 -60
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-layout.mjs +129 -124
- package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +27 -27
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +10 -10
- package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
- package/fesm2022/ngx-tethys-mention.mjs +19 -24
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +56 -57
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs +47 -41
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +61 -72
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +31 -34
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +46 -51
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +51 -57
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +15 -24
- package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property-operation.mjs +27 -27
- package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +14 -14
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +33 -39
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-rate.mjs +9 -9
- package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
- package/fesm2022/ngx-tethys-resizable.mjs +43 -34
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-result.mjs +3 -3
- package/fesm2022/ngx-tethys-result.mjs.map +1 -1
- package/fesm2022/ngx-tethys-segment.mjs +41 -44
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +28 -44
- package/fesm2022/ngx-tethys-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-shared.mjs +135 -150
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +33 -47
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slide.mjs +33 -37
- 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 +16 -16
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-statistic.mjs +22 -22
- package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs +17 -22
- 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 +10 -10
- package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs +107 -124
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +29 -32
- 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 +70 -80
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +26 -26
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tooltip.mjs +35 -36
- package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-tethys-transfer.mjs +10 -10
- package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree-select.mjs +29 -37
- package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree.mjs +102 -110
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +18 -18
- 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-vote.mjs +3 -3
- package/fesm2022/ngx-tethys-vote.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 +30 -8
- 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 +2 -4
- 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-circle.component.d.ts +0 -1
- package/progress/progress-strip.component.d.ts +0 -1
- package/progress/progress.component.d.ts +0 -1
- package/property/property-item.component.d.ts +6 -9
- 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 +2 -7
- 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 +2 -7
- 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 +6 -7
- 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/skeleton/stylized/bullet-list.component.d.ts +9 -1
- 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 +1 -3
- package/table/table.component.d.ts +3 -5
- package/tabs/tabs.component.d.ts +1 -3
- 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 -3
- 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,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, ContentChild, ViewChild, Input, ViewEncapsulation,
|
|
3
|
-
import {
|
|
2
|
+
import { Component, ChangeDetectionStrategy, ContentChild, ViewChild, Input, ViewEncapsulation, inject, ChangeDetectorRef, ElementRef, QueryList, DestroyRef, EventEmitter, ContentChildren, Output, NgModule } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
4
4
|
import { coerceBooleanProperty, isString } from 'ngx-tethys/util';
|
|
5
5
|
import { fromEvent } from 'rxjs';
|
|
6
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -50,11 +50,11 @@ class ThyTabContent {
|
|
|
50
50
|
this.tabPaneAnimated = true;
|
|
51
51
|
}
|
|
52
52
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTabContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
54
|
-
|
|
53
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyTabContent, isStandalone: true, selector: "thy-tab-content, [thyTabContent]", inputs: { content: "content", active: "active", tabPaneAnimated: "tabPaneAnimated" }, host: { properties: { "attr.aria-hidden": "!active", "attr.tabindex": "active ? 0 : -1", "style.visibility": "tabPaneAnimated ? active ? null : \"hidden\" : null", "style.height": "tabPaneAnimated ? active ? null : 0 : null", "style.overflow-y": "tabPaneAnimated ? active ? null : \"none\" : null", "style.display": "!tabPaneAnimated ? active ? null : \"none\" : null" }, classAttribute: "thy-tab-content" }, exportAs: ["thyTabContent"], ngImport: i0, template: `
|
|
54
|
+
@if (active) {
|
|
55
55
|
<ng-template [ngTemplateOutlet]="content"></ng-template>
|
|
56
|
-
|
|
57
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
56
|
+
}
|
|
57
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
58
58
|
}
|
|
59
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTabContent, decorators: [{
|
|
60
60
|
type: Component,
|
|
@@ -65,9 +65,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
65
65
|
encapsulation: ViewEncapsulation.None,
|
|
66
66
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
67
67
|
template: `
|
|
68
|
-
|
|
68
|
+
@if (active) {
|
|
69
69
|
<ng-template [ngTemplateOutlet]="content"></ng-template>
|
|
70
|
-
|
|
70
|
+
}
|
|
71
71
|
`,
|
|
72
72
|
host: {
|
|
73
73
|
class: 'thy-tab-content',
|
|
@@ -79,7 +79,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
79
79
|
'[style.display]': '!tabPaneAnimated ? active ? null : "none" : null'
|
|
80
80
|
},
|
|
81
81
|
standalone: true,
|
|
82
|
-
imports: [
|
|
82
|
+
imports: [NgTemplateOutlet]
|
|
83
83
|
}]
|
|
84
84
|
}], propDecorators: { content: [{
|
|
85
85
|
type: Input
|
|
@@ -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,11 +185,8 @@ class ThyTabs {
|
|
|
185
185
|
const activeTab = tab.id ? tab.id : index;
|
|
186
186
|
this.thyActiveTabChange.emit(activeTab);
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTabs, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
192
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.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>\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 *ngFor=\"let tab of tabs; let i = index; trackBy: tabTrackBy\"\n (click)=\"activeTab(tab, i)\"\n >\n <ng-container *ngIf=\"tab.titleTemplateRef; else titleName\">\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n </ng-container>\n <ng-template #titleName>\n {{ tab.thyTitle }}\n </ng-template>\n </a>\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n <div\n thyTabContent\n *ngFor=\"let tab of tabs; let i = index; trackBy: tabTrackBy\"\n [active]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"\n ></div>\n</div>\n", dependencies: [{ kind: "component", type: ThyNav, selector: "thy-nav", inputs: ["thyType", "thySize", "thyHorizontal", "thyVertical", "thyFill", "thyResponsive", "thyInsideClosable", "thyExtra"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: ThyNavItemDirective, selector: "[thyNavLink],[thyNavItem]", inputs: ["thyNavItemActive", "thyNavLinkActive", "thyNavItemDisabled"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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 }); }
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTabs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
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 }); }
|
|
193
190
|
}
|
|
194
191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyTabs, decorators: [{
|
|
195
192
|
type: Component,
|
|
@@ -198,8 +195,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
198
195
|
'[class.thy-tabs-top]': `thyPosition === 'top'`,
|
|
199
196
|
'[class.thy-tabs-left]': `thyPosition === 'left'`,
|
|
200
197
|
'[style.overflow]': `transitionStarted ? "hidden" : null`
|
|
201
|
-
}, standalone: true, imports: [ThyNav,
|
|
202
|
-
}],
|
|
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
|
+
}], propDecorators: { tabs: [{
|
|
203
200
|
type: ContentChildren,
|
|
204
201
|
args: [ThyTab, { descendants: true }]
|
|
205
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 { NgIf, 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 <ng-container *ngIf=\"active\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </ng-container>\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: [NgIf, 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 { NgFor, NgIf, 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, NgFor, ThyNavItemDirective, NgIf, 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 tabTrackBy(index: number, item: ThyTab) {\n return index;\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>\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 *ngFor=\"let tab of tabs; let i = index; trackBy: tabTrackBy\"\n (click)=\"activeTab(tab, i)\"\n >\n <ng-container *ngIf=\"tab.titleTemplateRef; else titleName\">\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n </ng-container>\n <ng-template #titleName>\n {{ tab.thyTitle }}\n </ng-template>\n </a>\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n <div\n thyTabContent\n *ngFor=\"let tab of tabs; let i = index; trackBy: tabTrackBy\"\n [active]=\"(tab.id && activeTabId && tab.id === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"\n ></div>\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 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M,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,EAAA,IAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,aAAA,EA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
|
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;AA0CvC,KAAA;AA9EG;;;;AAIG;IACH,IACI,MAAM,CAAC,KAAkB,EAAA;QACzB,IAAI,KAAK,EAAE;AACP,YAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SAC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