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 { InjectionToken,
|
|
3
|
-
import { NgClass,
|
|
2
|
+
import { InjectionToken, inject, ElementRef, NgZone, ChangeDetectorRef, Renderer2, Component, ChangeDetectionStrategy, Input, HostBinding, DestroyRef, EventEmitter, numberAttribute, ViewEncapsulation, ContentChildren, Output, NgModule } from '@angular/core';
|
|
3
|
+
import { NgClass, CommonModule } from '@angular/common';
|
|
4
4
|
import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
|
|
5
5
|
import { ThyTooltipModule } from 'ngx-tethys/tooltip';
|
|
6
6
|
import { thumbMotion } from 'ngx-tethys/core';
|
|
@@ -16,17 +16,19 @@ const THY_SEGMENTED_COMPONENT = new InjectionToken('THY_SEGMENTED_COMPONENT');
|
|
|
16
16
|
* @name thy-segment-item,[thy-segment-item]
|
|
17
17
|
*/
|
|
18
18
|
class ThySegmentItem {
|
|
19
|
-
constructor(
|
|
20
|
-
this.elementRef =
|
|
21
|
-
this.ngZone =
|
|
22
|
-
this.cdr =
|
|
23
|
-
this.renderer =
|
|
24
|
-
this.parent =
|
|
19
|
+
constructor() {
|
|
20
|
+
this.elementRef = inject(ElementRef);
|
|
21
|
+
this.ngZone = inject(NgZone);
|
|
22
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
23
|
+
this.renderer = inject(Renderer2);
|
|
24
|
+
this.parent = inject(THY_SEGMENTED_COMPONENT, { optional: true });
|
|
25
25
|
/**
|
|
26
26
|
* 是否禁用该选项
|
|
27
27
|
*/
|
|
28
28
|
this.thyDisabled = false;
|
|
29
29
|
this.destroy$ = new Subject();
|
|
30
|
+
const elementRef = this.elementRef;
|
|
31
|
+
const ngZone = this.ngZone;
|
|
30
32
|
ngZone.runOutsideAngular(() => fromEvent(elementRef.nativeElement, 'click')
|
|
31
33
|
.pipe(takeUntil(this.destroy$))
|
|
32
34
|
.subscribe((event) => {
|
|
@@ -68,20 +70,15 @@ class ThySegmentItem {
|
|
|
68
70
|
this.destroy$.next();
|
|
69
71
|
this.destroy$.complete();
|
|
70
72
|
}
|
|
71
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThySegmentItem, deps: [
|
|
72
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThySegmentItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThySegmentItem, isStandalone: true, selector: "thy-segment-item,[thy-segment-item]", inputs: { thyValue: "thyValue", thyIcon: "thyIcon", thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty] }, host: { properties: { "class.disabled": "this.thyDisabled" }, classAttribute: "thy-segment-item" }, ngImport: i0, template: "<div\n class=\"thy-segment-item-label\"\n [ngClass]=\"{\n 'thy-segment-item-label-only-icon': isOnlyIcon\n }\"\n >\n @if (thyIcon) {\n <thy-icon class=\"thy-segment-item-icon\" [ngClass]=\"{ 'icon-with-text': isWithText }\" [thyIconName]=\"thyIcon\"></thy-icon>\n }\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
73
75
|
}
|
|
74
76
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThySegmentItem, decorators: [{
|
|
75
77
|
type: Component,
|
|
76
78
|
args: [{ selector: 'thy-segment-item,[thy-segment-item]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
77
79
|
class: 'thy-segment-item'
|
|
78
|
-
}, standalone: true, imports: [NgClass,
|
|
79
|
-
}], ctorParameters: () => [
|
|
80
|
-
type: Optional
|
|
81
|
-
}, {
|
|
82
|
-
type: Inject,
|
|
83
|
-
args: [THY_SEGMENTED_COMPONENT]
|
|
84
|
-
}] }], propDecorators: { thyValue: [{
|
|
80
|
+
}, standalone: true, imports: [NgClass, ThyIcon], template: "<div\n class=\"thy-segment-item-label\"\n [ngClass]=\"{\n 'thy-segment-item-label-only-icon': isOnlyIcon\n }\"\n >\n @if (thyIcon) {\n <thy-icon class=\"thy-segment-item-icon\" [ngClass]=\"{ 'icon-with-text': isWithText }\" [thyIconName]=\"thyIcon\"></thy-icon>\n }\n <ng-content></ng-content>\n</div>\n" }]
|
|
81
|
+
}], ctorParameters: () => [], propDecorators: { thyValue: [{
|
|
85
82
|
type: Input
|
|
86
83
|
}], thyIcon: [{
|
|
87
84
|
type: Input
|
|
@@ -98,28 +95,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
98
95
|
* @name thy-segment
|
|
99
96
|
*/
|
|
100
97
|
class ThySegment {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
set thyActiveIndex(value) {
|
|
105
|
-
this.newActiveIndex = value;
|
|
106
|
-
if (value < 0 || value === this.activeIndex) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
setTimeout(() => {
|
|
110
|
-
const selectedItem = this.options?.get(this.activeIndex);
|
|
111
|
-
if (selectedItem) {
|
|
112
|
-
selectedItem.unselect();
|
|
113
|
-
this.changeSelectedItem(this.options.get(value));
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
this.activeIndex = value;
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
constructor(cdr, destroyRef) {
|
|
121
|
-
this.cdr = cdr;
|
|
122
|
-
this.destroyRef = destroyRef;
|
|
98
|
+
constructor() {
|
|
99
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
100
|
+
this.destroyRef = inject(DestroyRef);
|
|
123
101
|
/**
|
|
124
102
|
* 大小
|
|
125
103
|
* @type xs | sm | md | default
|
|
@@ -141,6 +119,25 @@ class ThySegment {
|
|
|
141
119
|
this.animationState = null;
|
|
142
120
|
this.transitionedTo = null;
|
|
143
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* 选中选项的索引
|
|
124
|
+
*/
|
|
125
|
+
set thyActiveIndex(value) {
|
|
126
|
+
this.newActiveIndex = value;
|
|
127
|
+
if (value < 0 || value === this.activeIndex) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
setTimeout(() => {
|
|
131
|
+
const selectedItem = this.options?.get(this.activeIndex);
|
|
132
|
+
if (selectedItem) {
|
|
133
|
+
selectedItem.unselect();
|
|
134
|
+
this.changeSelectedItem(this.options.get(value));
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
this.activeIndex = value;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
144
141
|
ngAfterContentInit() {
|
|
145
142
|
this.selectedItem = this.options.get(this.newActiveIndex) || this.options.get(0);
|
|
146
143
|
this.selectedItem?.select();
|
|
@@ -180,13 +177,13 @@ class ThySegment {
|
|
|
180
177
|
this.cdr.detectChanges();
|
|
181
178
|
}
|
|
182
179
|
}
|
|
183
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThySegment, deps: [
|
|
184
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
180
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThySegment, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
181
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThySegment, isStandalone: true, selector: "thy-segment", inputs: { thySize: "thySize", thyMode: "thyMode", thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty], thyActiveIndex: ["thyActiveIndex", "thyActiveIndex", numberAttribute] }, outputs: { thySelectChange: "thySelectChange" }, host: { properties: { "class.thy-segment-xs": "thySize === 'xs'", "class.thy-segment-sm": "thySize === 'sm'", "class.thy-segment-md": "thySize === 'md'", "class.thy-segment-default": "!thySize || thySize === 'default'", "class.thy-segment-block": "thyMode === 'block'", "class.disabled": "this.thyDisabled" }, classAttribute: "thy-segment" }, providers: [
|
|
185
182
|
{
|
|
186
183
|
provide: THY_SEGMENTED_COMPONENT,
|
|
187
184
|
useExisting: ThySegment
|
|
188
185
|
}
|
|
189
|
-
], queries: [{ propertyName: "options", predicate: ThySegmentItem }], exportAs: ["thySegment"], ngImport: i0, template: "<div class=\"thy-segment-group\">\n
|
|
186
|
+
], queries: [{ propertyName: "options", predicate: ThySegmentItem }], exportAs: ["thySegment"], ngImport: i0, template: "<div class=\"thy-segment-group\">\n @if (animationState) {\n <div\n class=\"thy-segment-thumb thy-segment-thumb-motion\"\n [@thumbMotion]=\"animationState\"\n (@thumbMotion.done)=\"handleThumbAnimationDone($event)\"\n ></div>\n }\n\n <ng-content></ng-content>\n</div>\n", animations: [thumbMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
190
187
|
}
|
|
191
188
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThySegment, decorators: [{
|
|
192
189
|
type: Component,
|
|
@@ -202,8 +199,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
202
199
|
'[class.thy-segment-md]': `thySize === 'md'`,
|
|
203
200
|
'[class.thy-segment-default]': `!thySize || thySize === 'default'`,
|
|
204
201
|
'[class.thy-segment-block]': `thyMode === 'block'`
|
|
205
|
-
}, standalone: true, imports: [
|
|
206
|
-
}],
|
|
202
|
+
}, standalone: true, imports: [], template: "<div class=\"thy-segment-group\">\n @if (animationState) {\n <div\n class=\"thy-segment-thumb thy-segment-thumb-motion\"\n [@thumbMotion]=\"animationState\"\n (@thumbMotion.done)=\"handleThumbAnimationDone($event)\"\n ></div>\n }\n\n <ng-content></ng-content>\n</div>\n" }]
|
|
203
|
+
}], propDecorators: { options: [{
|
|
207
204
|
type: ContentChildren,
|
|
208
205
|
args: [ThySegmentItem]
|
|
209
206
|
}], thySize: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-segment.mjs","sources":["../../../src/segment/segment.token.ts","../../../src/segment/segment-item.component.ts","../../../src/segment/segment-item.component.html","../../../src/segment/segment.component.ts","../../../src/segment/segment.component.html","../../../src/segment/segment.module.ts","../../../src/segment/ngx-tethys-segment.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ThySegmentItem } from './segment-item.component';\n\nexport interface IThySegmentComponent {\n thyMode: string;\n thyDisabled: boolean;\n selectedItem: ThySegmentItem;\n changeSelectedItem: (item: ThySegmentItem, event?: Event) => void;\n}\n\nexport const THY_SEGMENTED_COMPONENT = new InjectionToken<IThySegmentComponent>('THY_SEGMENTED_COMPONENT');\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Renderer2\n} from '@angular/core';\nimport { IThySegmentComponent, THY_SEGMENTED_COMPONENT } from './segment.token';\nimport { assertIconOnly, coerceBooleanProperty } from 'ngx-tethys/util';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgClass, NgIf } from '@angular/common';\n\n/**\n * 分段控制器的选项组件\n * @name thy-segment-item,[thy-segment-item]\n */\n@Component({\n selector: 'thy-segment-item,[thy-segment-item]',\n templateUrl: './segment-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-segment-item'\n },\n standalone: true,\n imports: [NgClass, NgIf, ThyIcon]\n})\nexport class ThySegmentItem implements AfterViewInit, OnDestroy {\n /**\n * 选项的值\n */\n @Input() thyValue: SafeAny;\n\n /**\n * 选项的图标\n */\n @Input() thyIcon: string;\n\n /**\n * 是否禁用该选项\n */\n @Input({ transform: coerceBooleanProperty })\n @HostBinding(`class.disabled`)\n thyDisabled = false;\n\n public isOnlyIcon: boolean;\n\n public isWithText: boolean;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public elementRef: ElementRef,\n private ngZone: NgZone,\n private cdr: ChangeDetectorRef,\n private renderer: Renderer2,\n @Optional() @Inject(THY_SEGMENTED_COMPONENT) private parent: IThySegmentComponent\n ) {\n ngZone.runOutsideAngular(() =>\n fromEvent(elementRef.nativeElement, 'click')\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: Event) => {\n if (!this.thyDisabled && !this.parent.thyDisabled && this.parent.selectedItem && this.parent.selectedItem !== this) {\n ngZone.run(() => {\n this.parent.selectedItem.unselect();\n this.parent.changeSelectedItem(this, event);\n });\n }\n })\n );\n }\n\n ngAfterViewInit(): void {\n const labelDiv = this.elementRef.nativeElement.children[0];\n this.isOnlyIcon = assertIconOnly(labelDiv) && this.parent.thyMode === 'inline';\n this.cdr.detectChanges();\n\n this.wrapSpanForText(labelDiv.childNodes);\n }\n\n public select() {\n this.elementRef.nativeElement.classList.add('active');\n }\n\n public unselect() {\n this.elementRef.nativeElement.classList.remove('active');\n }\n\n private wrapSpanForText(nodes: NodeList): void {\n nodes.forEach(node => {\n if (node.nodeName === '#text') {\n const span = this.renderer.createElement('span');\n const parent = this.renderer.parentNode(node);\n this.renderer.insertBefore(parent, span, node);\n this.renderer.appendChild(span, node);\n }\n\n if (node.nodeName === '#text' || node.nodeName === 'SPAN') {\n this.isWithText = true;\n this.cdr.detectChanges();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","<div\n class=\"thy-segment-item-label\"\n [ngClass]=\"{\n 'thy-segment-item-label-only-icon': isOnlyIcon\n }\"\n>\n <thy-icon *ngIf=\"thyIcon\" class=\"thy-segment-item-icon\" [ngClass]=\"{ 'icon-with-text': isWithText }\" [thyIconName]=\"thyIcon\"></thy-icon>\n <ng-content></ng-content>\n</div>\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n QueryList,\n ViewEncapsulation,\n numberAttribute\n} from '@angular/core';\nimport { ThumbAnimationProps } from 'ngx-tethys/core';\nimport { thumbMotion } from 'ngx-tethys/core';\nimport { ThySegmentItem } from './segment-item.component';\nimport { IThySegmentComponent, THY_SEGMENTED_COMPONENT } from './segment.token';\nimport { ThySegmentEvent } from './types';\nimport { AnimationEvent } from '@angular/animations';\nimport { NgIf } from '@angular/common';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport type ThySegmentSize = 'xs' | 'sm' | 'md' | 'default';\n\nexport type ThySegmentMode = 'block' | 'inline';\n\n/**\n * 分段控制器组件\n * @name thy-segment\n */\n@Component({\n selector: 'thy-segment',\n templateUrl: './segment.component.html',\n exportAs: 'thySegment',\n animations: [thumbMotion],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: THY_SEGMENTED_COMPONENT,\n useExisting: ThySegment\n }\n ],\n host: {\n class: 'thy-segment',\n '[class.thy-segment-xs]': `thySize === 'xs'`,\n '[class.thy-segment-sm]': `thySize === 'sm'`,\n '[class.thy-segment-md]': `thySize === 'md'`,\n '[class.thy-segment-default]': `!thySize || thySize === 'default'`,\n '[class.thy-segment-block]': `thyMode === 'block'`\n },\n standalone: true,\n imports: [NgIf]\n})\nexport class ThySegment implements IThySegmentComponent, AfterContentInit {\n /**\n * @internal\n */\n @ContentChildren(ThySegmentItem) options!: QueryList<ThySegmentItem>;\n\n /**\n * 大小\n * @type xs | sm | md | default\n */\n @Input() thySize: ThySegmentSize = 'default';\n\n /**\n * 模式\n * @type block | inline\n */\n @Input() thyMode: ThySegmentMode = 'block';\n\n /**\n * 是否禁用分段控制器\n */\n @Input({ transform: coerceBooleanProperty })\n @HostBinding(`class.disabled`)\n thyDisabled = false;\n\n /**\n * 选中选项的索引\n */\n @Input({ transform: numberAttribute })\n set thyActiveIndex(value: number) {\n this.newActiveIndex = value;\n if (value < 0 || value === this.activeIndex) {\n return;\n }\n setTimeout(() => {\n const selectedItem = this.options?.get(this.activeIndex);\n if (selectedItem) {\n selectedItem.unselect();\n this.changeSelectedItem(this.options.get(value));\n } else {\n this.activeIndex = value;\n }\n });\n }\n\n /**\n * 选项被选中的回调事件\n */\n @Output() readonly thySelectChange = new EventEmitter<ThySegmentEvent>();\n\n public selectedItem: ThySegmentItem;\n\n private newActiveIndex: number;\n\n private activeIndex: number;\n\n public animationState: null | { value: string; params: ThumbAnimationProps } = null;\n\n public transitionedTo: any = null;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private destroyRef: DestroyRef\n ) {}\n\n ngAfterContentInit(): void {\n this.selectedItem = this.options.get(this.newActiveIndex) || this.options.get(0);\n this.selectedItem?.select();\n\n this.options.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.options.forEach(item => {\n item.unselect();\n });\n this.selectedItem = this.options.get(this.newActiveIndex) || this.options.get(0);\n this.selectedItem?.select();\n this.cdr.detectChanges();\n });\n }\n\n public changeSelectedItem(item: ThySegmentItem, event?: Event): void {\n this.animationState = {\n value: 'from',\n params: getThumbAnimationProps(this.options?.get(this.activeIndex || 0)?.elementRef.nativeElement!)\n };\n this.selectedItem = null;\n this.cdr.detectChanges();\n\n this.animationState = {\n value: 'to',\n params: getThumbAnimationProps(item.elementRef.nativeElement!)\n };\n this.transitionedTo = item;\n this.activeIndex = this.options?.toArray().findIndex(option => {\n return option.thyValue === item?.thyValue;\n });\n this.thySelectChange.emit({ event: event, value: item.thyValue, activeIndex: this.activeIndex });\n this.cdr.detectChanges();\n }\n\n public handleThumbAnimationDone(event: AnimationEvent): void {\n if (event.fromState === 'from') {\n this.selectedItem = this.transitionedTo;\n this.selectedItem?.select();\n this.transitionedTo = null;\n this.animationState = null;\n this.cdr.detectChanges();\n }\n }\n}\n\nfunction getThumbAnimationProps(element: HTMLElement): ThumbAnimationProps {\n return {\n transform: element.offsetLeft,\n width: element.clientWidth\n };\n}\n","<div class=\"thy-segment-group\">\n <div\n *ngIf=\"animationState\"\n class=\"thy-segment-thumb thy-segment-thumb-motion\"\n [@thumbMotion]=\"animationState\"\n (@thumbMotion.done)=\"handleThumbAnimationDone($event)\"\n ></div>\n\n <ng-content></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { ThySegment } from './segment.component';\nimport { ThySegmentItem } from './segment-item.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyTooltipModule, ThySegment, ThySegmentItem],\n exports: [ThySegment, ThySegmentItem]\n})\nexport class ThySegmentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAUO,MAAM,uBAAuB,GAAG,IAAI,cAAc,CAAuB,yBAAyB,CAAC;;ACY1G;;;AAGG;MAWU,cAAc,CAAA;IAwBvB,WACW,CAAA,UAAsB,EACrB,MAAc,EACd,GAAsB,EACtB,QAAmB,EAC0B,MAA4B,EAAA;QAJ1E,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QACrB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QACtB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QAC0B,IAAM,CAAA,MAAA,GAAN,MAAM,CAAsB;AAlBrF;;AAEG;QAGH,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAMZ,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ,CAAC;AASnC,QAAA,MAAM,CAAC,iBAAiB,CAAC,MACrB,SAAS,CAAC,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC;AACvC,aAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC9B,aAAA,SAAS,CAAC,CAAC,KAAY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Ac,CACzE,EAAA,OAAA,EAAA,CAAA,UAAU,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;AAE3B,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,gBAAgB,YAHf,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAc,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG1E,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,CAAC;AACpF,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC;AACxC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-segment.mjs","sources":["../../../src/segment/segment.token.ts","../../../src/segment/segment-item.component.ts","../../../src/segment/segment-item.component.html","../../../src/segment/segment.component.ts","../../../src/segment/segment.component.html","../../../src/segment/segment.module.ts","../../../src/segment/ngx-tethys-segment.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ThySegmentItem } from './segment-item.component';\n\nexport interface IThySegmentComponent {\n thyMode: string;\n thyDisabled: boolean;\n selectedItem: ThySegmentItem;\n changeSelectedItem: (item: ThySegmentItem, event?: Event) => void;\n}\n\nexport const THY_SEGMENTED_COMPONENT = new InjectionToken<IThySegmentComponent>('THY_SEGMENTED_COMPONENT');\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Input,\n NgZone,\n OnDestroy,\n Renderer2,\n inject\n} from '@angular/core';\nimport { IThySegmentComponent, THY_SEGMENTED_COMPONENT } from './segment.token';\nimport { assertIconOnly, coerceBooleanProperty } from 'ngx-tethys/util';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgClass } from '@angular/common';\n\n/**\n * 分段控制器的选项组件\n * @name thy-segment-item,[thy-segment-item]\n */\n@Component({\n selector: 'thy-segment-item,[thy-segment-item]',\n templateUrl: './segment-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-segment-item'\n },\n standalone: true,\n imports: [NgClass, ThyIcon]\n})\nexport class ThySegmentItem implements AfterViewInit, OnDestroy {\n elementRef = inject(ElementRef);\n private ngZone = inject(NgZone);\n private cdr = inject(ChangeDetectorRef);\n private renderer = inject(Renderer2);\n private parent = inject(THY_SEGMENTED_COMPONENT, { optional: true })!;\n\n /**\n * 选项的值\n */\n @Input() thyValue: SafeAny;\n\n /**\n * 选项的图标\n */\n @Input() thyIcon: string;\n\n /**\n * 是否禁用该选项\n */\n @Input({ transform: coerceBooleanProperty })\n @HostBinding(`class.disabled`)\n thyDisabled = false;\n\n public isOnlyIcon: boolean;\n\n public isWithText: boolean;\n\n private destroy$ = new Subject<void>();\n\n constructor() {\n const elementRef = this.elementRef;\n const ngZone = this.ngZone;\n\n ngZone.runOutsideAngular(() =>\n fromEvent(elementRef.nativeElement, 'click')\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: Event) => {\n if (!this.thyDisabled && !this.parent.thyDisabled && this.parent.selectedItem && this.parent.selectedItem !== this) {\n ngZone.run(() => {\n this.parent.selectedItem.unselect();\n this.parent.changeSelectedItem(this, event);\n });\n }\n })\n );\n }\n\n ngAfterViewInit(): void {\n const labelDiv = this.elementRef.nativeElement.children[0];\n this.isOnlyIcon = assertIconOnly(labelDiv) && this.parent.thyMode === 'inline';\n this.cdr.detectChanges();\n\n this.wrapSpanForText(labelDiv.childNodes);\n }\n\n public select() {\n this.elementRef.nativeElement.classList.add('active');\n }\n\n public unselect() {\n this.elementRef.nativeElement.classList.remove('active');\n }\n\n private wrapSpanForText(nodes: NodeList): void {\n nodes.forEach(node => {\n if (node.nodeName === '#text') {\n const span = this.renderer.createElement('span');\n const parent = this.renderer.parentNode(node);\n this.renderer.insertBefore(parent, span, node);\n this.renderer.appendChild(span, node);\n }\n\n if (node.nodeName === '#text' || node.nodeName === 'SPAN') {\n this.isWithText = true;\n this.cdr.detectChanges();\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","<div\n class=\"thy-segment-item-label\"\n [ngClass]=\"{\n 'thy-segment-item-label-only-icon': isOnlyIcon\n }\"\n >\n @if (thyIcon) {\n <thy-icon class=\"thy-segment-item-icon\" [ngClass]=\"{ 'icon-with-text': isWithText }\" [thyIconName]=\"thyIcon\"></thy-icon>\n }\n <ng-content></ng-content>\n</div>\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n QueryList,\n ViewEncapsulation,\n numberAttribute,\n inject\n} from '@angular/core';\nimport { ThumbAnimationProps } from 'ngx-tethys/core';\nimport { thumbMotion } from 'ngx-tethys/core';\nimport { ThySegmentItem } from './segment-item.component';\nimport { IThySegmentComponent, THY_SEGMENTED_COMPONENT } from './segment.token';\nimport { ThySegmentEvent } from './types';\nimport { AnimationEvent } from '@angular/animations';\n\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport type ThySegmentSize = 'xs' | 'sm' | 'md' | 'default';\n\nexport type ThySegmentMode = 'block' | 'inline';\n\n/**\n * 分段控制器组件\n * @name thy-segment\n */\n@Component({\n selector: 'thy-segment',\n templateUrl: './segment.component.html',\n exportAs: 'thySegment',\n animations: [thumbMotion],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: THY_SEGMENTED_COMPONENT,\n useExisting: ThySegment\n }\n ],\n host: {\n class: 'thy-segment',\n '[class.thy-segment-xs]': `thySize === 'xs'`,\n '[class.thy-segment-sm]': `thySize === 'sm'`,\n '[class.thy-segment-md]': `thySize === 'md'`,\n '[class.thy-segment-default]': `!thySize || thySize === 'default'`,\n '[class.thy-segment-block]': `thyMode === 'block'`\n },\n standalone: true,\n imports: []\n})\nexport class ThySegment implements IThySegmentComponent, AfterContentInit {\n private cdr = inject(ChangeDetectorRef);\n private destroyRef = inject(DestroyRef);\n\n /**\n * @internal\n */\n @ContentChildren(ThySegmentItem) options!: QueryList<ThySegmentItem>;\n\n /**\n * 大小\n * @type xs | sm | md | default\n */\n @Input() thySize: ThySegmentSize = 'default';\n\n /**\n * 模式\n * @type block | inline\n */\n @Input() thyMode: ThySegmentMode = 'block';\n\n /**\n * 是否禁用分段控制器\n */\n @Input({ transform: coerceBooleanProperty })\n @HostBinding(`class.disabled`)\n thyDisabled = false;\n\n /**\n * 选中选项的索引\n */\n @Input({ transform: numberAttribute })\n set thyActiveIndex(value: number) {\n this.newActiveIndex = value;\n if (value < 0 || value === this.activeIndex) {\n return;\n }\n setTimeout(() => {\n const selectedItem = this.options?.get(this.activeIndex);\n if (selectedItem) {\n selectedItem.unselect();\n this.changeSelectedItem(this.options.get(value));\n } else {\n this.activeIndex = value;\n }\n });\n }\n\n /**\n * 选项被选中的回调事件\n */\n @Output() readonly thySelectChange = new EventEmitter<ThySegmentEvent>();\n\n public selectedItem: ThySegmentItem;\n\n private newActiveIndex: number;\n\n private activeIndex: number;\n\n public animationState: null | { value: string; params: ThumbAnimationProps } = null;\n\n public transitionedTo: any = null;\n\n ngAfterContentInit(): void {\n this.selectedItem = this.options.get(this.newActiveIndex) || this.options.get(0);\n this.selectedItem?.select();\n\n this.options.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.options.forEach(item => {\n item.unselect();\n });\n this.selectedItem = this.options.get(this.newActiveIndex) || this.options.get(0);\n this.selectedItem?.select();\n this.cdr.detectChanges();\n });\n }\n\n public changeSelectedItem(item: ThySegmentItem, event?: Event): void {\n this.animationState = {\n value: 'from',\n params: getThumbAnimationProps(this.options?.get(this.activeIndex || 0)?.elementRef.nativeElement!)\n };\n this.selectedItem = null;\n this.cdr.detectChanges();\n\n this.animationState = {\n value: 'to',\n params: getThumbAnimationProps(item.elementRef.nativeElement!)\n };\n this.transitionedTo = item;\n this.activeIndex = this.options?.toArray().findIndex(option => {\n return option.thyValue === item?.thyValue;\n });\n this.thySelectChange.emit({ event: event, value: item.thyValue, activeIndex: this.activeIndex });\n this.cdr.detectChanges();\n }\n\n public handleThumbAnimationDone(event: AnimationEvent): void {\n if (event.fromState === 'from') {\n this.selectedItem = this.transitionedTo;\n this.selectedItem?.select();\n this.transitionedTo = null;\n this.animationState = null;\n this.cdr.detectChanges();\n }\n }\n}\n\nfunction getThumbAnimationProps(element: HTMLElement): ThumbAnimationProps {\n return {\n transform: element.offsetLeft,\n width: element.clientWidth\n };\n}\n","<div class=\"thy-segment-group\">\n @if (animationState) {\n <div\n class=\"thy-segment-thumb thy-segment-thumb-motion\"\n [@thumbMotion]=\"animationState\"\n (@thumbMotion.done)=\"handleThumbAnimationDone($event)\"\n ></div>\n }\n\n <ng-content></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { ThySegment } from './segment.component';\nimport { ThySegmentItem } from './segment-item.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyTooltipModule, ThySegment, ThySegmentItem],\n exports: [ThySegment, ThySegmentItem]\n})\nexport class ThySegmentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAUO,MAAM,uBAAuB,GAAG,IAAI,cAAc,CAAuB,yBAAyB,CAAC;;ACW1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CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAHf,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,CACzE,EAAA,OAAA,EAAA,CAAA,UAAU,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;AAE3B,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,gBAAgB,YAHf,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAc,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG1E,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,CAAC;AACpF,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC;AACxC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import * as i1 from '@angular/cdk/overlay';
|
|
2
1
|
import { Overlay, CdkConnectedOverlay, CdkOverlayOrigin, OverlayModule } from '@angular/cdk/overlay';
|
|
3
|
-
import { isPlatformBrowser, NgClass,
|
|
2
|
+
import { isPlatformBrowser, NgClass, NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
4
3
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken,
|
|
6
|
-
import * as i1
|
|
4
|
+
import { InjectionToken, inject, NgZone, ElementRef, ChangeDetectorRef, PLATFORM_ID, EventEmitter, numberAttribute, forwardRef, Component, ChangeDetectionStrategy, Input, ViewChild, HostBinding, Output, ContentChild, ContentChildren, ViewChildren, HostListener, NgModule } from '@angular/core';
|
|
5
|
+
import * as i1 from '@angular/forms';
|
|
7
6
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
8
7
|
import { ThyEmpty, ThyEmptyModule } from 'ngx-tethys/empty';
|
|
9
8
|
import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
|
|
10
9
|
import { ThyInputDirective, ThyInputModule } from 'ngx-tethys/input';
|
|
11
10
|
import { ThyLoading, ThyLoadingModule } from 'ngx-tethys/loading';
|
|
12
11
|
import { THY_OPTION_PARENT_COMPONENT, ThyOption, ThySelectOptionGroup, ThySelectControl, ThyStopPropagationDirective, ThyScrollDirective, ThyOptionsContainer, ThySharedModule, ThySelectCommonModule, ThyOptionModule } from 'ngx-tethys/shared';
|
|
13
|
-
import
|
|
14
|
-
import { TabIndexDisabledControlValueAccessorMixin, ScrollToService, getFlexiblePositions, scaleXMotion, scaleYMotion, scaleMotion } from 'ngx-tethys/core';
|
|
12
|
+
import { TabIndexDisabledControlValueAccessorMixin, ThyClickDispatcher, ScrollToService, getFlexiblePositions, scaleXMotion, scaleYMotion, scaleMotion } from 'ngx-tethys/core';
|
|
15
13
|
import { ENTER, isFunction, elementMatchClosest, DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, SPACE, hasModifierKey, HOME, END, A, helpers, isArray, coerceBooleanProperty } from 'ngx-tethys/util';
|
|
16
14
|
import { Subject, defer, merge, timer, Observable } from 'rxjs';
|
|
17
15
|
import { map, filter, take, switchMap, takeUntil, startWith, distinctUntilChanged } from 'rxjs/operators';
|
|
@@ -139,16 +137,16 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
139
137
|
get placement() {
|
|
140
138
|
return this.thyPlacement || this.config.placement;
|
|
141
139
|
}
|
|
142
|
-
constructor(
|
|
140
|
+
constructor() {
|
|
143
141
|
super();
|
|
144
|
-
this.ngZone =
|
|
145
|
-
this.elementRef =
|
|
146
|
-
this.changeDetectorRef =
|
|
147
|
-
this.overlay =
|
|
148
|
-
this.thyClickDispatcher =
|
|
149
|
-
this.platformId =
|
|
150
|
-
this.scrollStrategyFactory =
|
|
151
|
-
this.selectConfig =
|
|
142
|
+
this.ngZone = inject(NgZone);
|
|
143
|
+
this.elementRef = inject(ElementRef);
|
|
144
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
145
|
+
this.overlay = inject(Overlay);
|
|
146
|
+
this.thyClickDispatcher = inject(ThyClickDispatcher);
|
|
147
|
+
this.platformId = inject(PLATFORM_ID);
|
|
148
|
+
this.scrollStrategyFactory = inject(THY_SELECT_SCROLL_STRATEGY, { optional: true });
|
|
149
|
+
this.selectConfig = inject(THY_SELECT_CONFIG, { optional: true });
|
|
152
150
|
this.disabled = false;
|
|
153
151
|
this.mode = '';
|
|
154
152
|
this.emptyStateText = '暂无可选项';
|
|
@@ -225,6 +223,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
225
223
|
this.thyPreset = '';
|
|
226
224
|
this.isSearching = false;
|
|
227
225
|
this.groupBy = (item) => item.groupLabel;
|
|
226
|
+
const selectConfig = this.selectConfig;
|
|
228
227
|
this.config = { ...DEFAULT_SELECT_CONFIG, ...selectConfig };
|
|
229
228
|
this.buildScrollStrategy();
|
|
230
229
|
}
|
|
@@ -773,8 +772,8 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
773
772
|
this.destroy$.next();
|
|
774
773
|
this.destroy$.complete();
|
|
775
774
|
}
|
|
776
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThySelect, deps: [
|
|
777
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
775
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThySelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
776
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThySelect, isStandalone: true, selector: "thy-select,thy-custom-select", inputs: { thyDropdownWidthMode: "thyDropdownWidthMode", thyShowSearch: ["thyShowSearch", "thyShowSearch", coerceBooleanProperty], thyPlaceHolder: "thyPlaceHolder", thyServerSearch: ["thyServerSearch", "thyServerSearch", coerceBooleanProperty], thyLoadState: ["thyLoadState", "thyLoadState", coerceBooleanProperty], thyAutoActiveFirstItem: ["thyAutoActiveFirstItem", "thyAutoActiveFirstItem", coerceBooleanProperty], thyMode: "thyMode", thySize: "thySize", thyEmptyStateText: "thyEmptyStateText", thyEmptySearchMessageText: "thyEmptySearchMessageText", thyEnableScrollLoad: ["thyEnableScrollLoad", "thyEnableScrollLoad", coerceBooleanProperty], thyAllowClear: ["thyAllowClear", "thyAllowClear", coerceBooleanProperty], thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty], thySortComparator: "thySortComparator", thyFooterTemplate: "thyFooterTemplate", thyPlacement: "thyPlacement", thyOrigin: "thyOrigin", thyFooterClass: "thyFooterClass", thyAutoExpand: ["thyAutoExpand", "thyAutoExpand", coerceBooleanProperty], thyHasBackdrop: ["thyHasBackdrop", "thyHasBackdrop", coerceBooleanProperty], thyMaxTagCount: ["thyMaxTagCount", "thyMaxTagCount", numberAttribute], thyBorderless: ["thyBorderless", "thyBorderless", coerceBooleanProperty], thyOptions: "thyOptions", thyPreset: "thyPreset" }, outputs: { thyOnSearch: "thyOnSearch", thyOnScrollToBottom: "thyOnScrollToBottom", thyOnExpandStatusChange: "thyOnExpandStatusChange" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "tabIndex", "class.thy-select-custom": "this.isSelectCustom", "class.thy-select": "this.isSelect", "class.menu-is-opened": "this.panelOpen" } }, providers: [
|
|
778
777
|
{
|
|
779
778
|
provide: THY_OPTION_PARENT_COMPONENT,
|
|
780
779
|
useExisting: ThySelect
|
|
@@ -784,7 +783,7 @@ class ThySelect extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
784
783
|
useExisting: forwardRef(() => ThySelect),
|
|
785
784
|
multi: true
|
|
786
785
|
}
|
|
787
|
-
], queries: [{ propertyName: "selectedValueDisplayRef", first: true, predicate: ["selectedDisplay"], descendants: true }, { propertyName: "contentOptions", predicate: ThyOption, descendants: true }, { propertyName: "contentGroups", predicate: ThySelectOptionGroup }], viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, static: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, read: ElementRef, static: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, read: ElementRef }, { propertyName: "viewOptions", predicate: ThyOption, descendants: true }, { propertyName: "viewGroups", predicate: ThySelectOptionGroup, descendants: true }], exportAs: ["thySelect"], usesInheritance: true, ngImport: i0, template: "<div\n cdk-overlay-origin\n thySelectControl\n (click)=\"toggle($event)\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [thyPanelOpened]=\"panelOpen\"\n [thySelectedOptions]=\"selected\"\n [thyIsMultiple]=\"isMultiple\"\n [thyShowSearch]=\"thyShowSearch\"\n [thyAllowClear]=\"thyAllowClear\"\n [thySize]=\"thySize\"\n [thyPlaceholder]=\"thyPlaceHolder\"\n [customDisplayTemplate]=\"selectedValueDisplayRef\"\n [thyDisabled]=\"disabled\"\n [thyBorderless]=\"thyBorderless\"\n (thyOnClear)=\"clearSelectValue($event)\"\n (thyOnRemove)=\"remove($event)\"\n (thyOnSearch)=\"onSearchFilter($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n [thyMaxTagCount]=\"thyMaxTagCount\"\n [thyPreset]=\"thyPreset\"></div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop\"\n [cdkConnectedOverlayPositions]=\"dropDownPositions\"\n [cdkConnectedOverlayOrigin]=\"thyOrigin || origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"triggerRectWidth\"\n [cdkConnectedOverlayMinWidth]=\"dropDownMinWidth\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n cdkConnectedOverlayTransformOriginOn=\".thy-select-dropdown\"\n (attach)=\"onAttached()\"\n (detach)=\"close()\">\n <div\n thyStopPropagation\n [attr.tabindex]=\"-1\"\n [ngClass]=\"dropDownClass\"\n [@scaleYMotion]=\"placement === 'top' || placement === 'bottom' ? 'enter' : 'void'\"\n [@scaleXMotion]=\"placement === 'left' || placement === 'right' ? 'enter' : 'void'\"\n [@scaleMotion]=\"placement !== 'top' && placement !== 'bottom' && placement !== 'left' && placement !== 'right' ? 'enter' : 'void'\"\n (mousemove)=\"dropDownMouseMove($event)\">\n
|
|
786
|
+
], queries: [{ propertyName: "selectedValueDisplayRef", first: true, predicate: ["selectedDisplay"], descendants: true }, { propertyName: "contentOptions", predicate: ThyOption, descendants: true }, { propertyName: "contentGroups", predicate: ThySelectOptionGroup }], viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, static: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, read: ElementRef, static: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, read: ElementRef }, { propertyName: "viewOptions", predicate: ThyOption, descendants: true }, { propertyName: "viewGroups", predicate: ThySelectOptionGroup, descendants: true }], exportAs: ["thySelect"], usesInheritance: true, ngImport: i0, template: "<div\n cdk-overlay-origin\n thySelectControl\n (click)=\"toggle($event)\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [thyPanelOpened]=\"panelOpen\"\n [thySelectedOptions]=\"selected\"\n [thyIsMultiple]=\"isMultiple\"\n [thyShowSearch]=\"thyShowSearch\"\n [thyAllowClear]=\"thyAllowClear\"\n [thySize]=\"thySize\"\n [thyPlaceholder]=\"thyPlaceHolder\"\n [customDisplayTemplate]=\"selectedValueDisplayRef\"\n [thyDisabled]=\"disabled\"\n [thyBorderless]=\"thyBorderless\"\n (thyOnClear)=\"clearSelectValue($event)\"\n (thyOnRemove)=\"remove($event)\"\n (thyOnSearch)=\"onSearchFilter($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n [thyMaxTagCount]=\"thyMaxTagCount\"\n [thyPreset]=\"thyPreset\"></div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop\"\n [cdkConnectedOverlayPositions]=\"dropDownPositions\"\n [cdkConnectedOverlayOrigin]=\"thyOrigin || origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"triggerRectWidth\"\n [cdkConnectedOverlayMinWidth]=\"dropDownMinWidth\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n cdkConnectedOverlayTransformOriginOn=\".thy-select-dropdown\"\n (attach)=\"onAttached()\"\n (detach)=\"close()\">\n <div\n thyStopPropagation\n [attr.tabindex]=\"-1\"\n [ngClass]=\"dropDownClass\"\n [@scaleYMotion]=\"placement === 'top' || placement === 'bottom' ? 'enter' : 'void'\"\n [@scaleXMotion]=\"placement === 'left' || placement === 'right' ? 'enter' : 'void'\"\n [@scaleMotion]=\"placement !== 'top' && placement !== 'bottom' && placement !== 'left' && placement !== 'right' ? 'enter' : 'void'\"\n (mousemove)=\"dropDownMouseMove($event)\">\n @if (contentOptions?.length > 0 || contentGroups?.length > 0 || innerOptions?.length > 0) {\n <div\n #panel\n class=\"thy-select-dropdown-options thy-select-dropdown-options-{{ size }}\"\n thyScroll\n (thyOnScrolled)=\"onOptionsScrolled($event)\"\n [thyEnable]=\"thyEnableScrollLoad\">\n @if (isReactiveDriven) {\n <ng-template [ngTemplateOutlet]=\"optionsContainer.optionsTemplate\"></ng-template>\n }\n <ng-content></ng-content>\n @if (isHiddenOptions) {\n <thy-loading [thyDone]=\"thyLoadState\" thySize=\"sm\"></thy-loading>\n <div class=\"thy-select-empty-content\">\n @if (thyLoadState) {\n <thy-empty [thyMessage]=\"emptySearchMessageText\" thySize=\"sm\"></thy-empty>\n }\n </div>\n }\n </div>\n } @else {\n <thy-loading [thyDone]=\"thyLoadState\" thySize=\"sm\"></thy-loading>\n <div class=\"thy-select-empty-content\">\n @if (thyLoadState) {\n <thy-empty [thyMessage]=\"emptyStateText\" thySize=\"sm\"></thy-empty>\n }\n </div>\n }\n @if (thyFooterTemplate) {\n <div [class]=\"thyFooterClass ? thyFooterClass : 'thy-custom-select-footer'\">\n @if (thyFooterTemplate) {\n <ng-template [ngTemplateOutlet]=\"thyFooterTemplate\"></ng-template>\n }\n </div>\n }\n </div>\n</ng-template>\n\n<thy-options-container #optionsContainer>\n @for (option of optionGroups; track $index) {\n @if (!option.children) {\n <thy-option\n [thyDisabled]=\"option.disabled\"\n [thyLabelText]=\"option.label\"\n [thyValue]=\"option.value\"\n [thyRawValue]=\"option\"></thy-option>\n } @else {\n <thy-option-group [thyGroupLabel]=\"option.groupLabel\">\n @for (sub of option.children; track sub.value) {\n <thy-option [thyDisabled]=\"sub.disabled\" [thyLabelText]=\"sub.label\" [thyValue]=\"sub.value\" [thyRawValue]=\"sub\"></thy-option>\n }\n </thy-option-group>\n }\n }\n</thy-options-container>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ThySelectControl, selector: "thy-select-control,[thySelectControl]", inputs: ["thyPanelOpened", "thyIsMultiple", "thyShowSearch", "thySelectedOptions", "thyDisabled", "customDisplayTemplate", "thyAllowClear", "thyPlaceholder", "thySize", "thyMaxTagCount", "thyBorderless", "thyPreset"], outputs: ["thyOnSearch", "thyOnRemove", "thyOnClear", "thyOnBlur"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ThyScrollDirective, selector: "[thyScroll]", inputs: ["thyEnable"], outputs: ["thyOnScrolled"] }, { kind: "component", type: ThyLoading, selector: "thy-loading", inputs: ["thyDone", "thyTip", "thyIsMask"] }, { kind: "component", type: ThyEmpty, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "component", type: ThyOptionsContainer, selector: "thy-options-container" }, { kind: "component", type: ThyOption, selector: "thy-option", inputs: ["thyValue", "thyRawValue", "thyLabelText", "thyShowOptionCustom", "thySearchKey", "thyDisabled"], outputs: ["selectionChange", "visibleChange"] }, { kind: "component", type: ThySelectOptionGroup, selector: "thy-option-group", inputs: ["thyDisabled", "thyGroupLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [scaleXMotion, scaleYMotion, scaleMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
788
787
|
}
|
|
789
788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThySelect, decorators: [{
|
|
790
789
|
type: Component,
|
|
@@ -804,34 +803,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
804
803
|
CdkConnectedOverlay,
|
|
805
804
|
ThyStopPropagationDirective,
|
|
806
805
|
NgClass,
|
|
807
|
-
NgIf,
|
|
808
806
|
ThyScrollDirective,
|
|
809
807
|
ThyLoading,
|
|
810
808
|
ThyEmpty,
|
|
811
809
|
ThyOptionsContainer,
|
|
812
810
|
ThyOption,
|
|
813
811
|
ThySelectOptionGroup,
|
|
814
|
-
NgTemplateOutlet
|
|
815
|
-
NgFor
|
|
812
|
+
NgTemplateOutlet
|
|
816
813
|
], host: {
|
|
817
814
|
'[attr.tabindex]': 'tabIndex',
|
|
818
815
|
'(focus)': 'onFocus($event)',
|
|
819
816
|
'(blur)': 'onBlur($event)'
|
|
820
|
-
}, animations: [scaleXMotion, scaleYMotion, scaleMotion], template: "<div\n cdk-overlay-origin\n thySelectControl\n (click)=\"toggle($event)\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [thyPanelOpened]=\"panelOpen\"\n [thySelectedOptions]=\"selected\"\n [thyIsMultiple]=\"isMultiple\"\n [thyShowSearch]=\"thyShowSearch\"\n [thyAllowClear]=\"thyAllowClear\"\n [thySize]=\"thySize\"\n [thyPlaceholder]=\"thyPlaceHolder\"\n [customDisplayTemplate]=\"selectedValueDisplayRef\"\n [thyDisabled]=\"disabled\"\n [thyBorderless]=\"thyBorderless\"\n (thyOnClear)=\"clearSelectValue($event)\"\n (thyOnRemove)=\"remove($event)\"\n (thyOnSearch)=\"onSearchFilter($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n [thyMaxTagCount]=\"thyMaxTagCount\"\n [thyPreset]=\"thyPreset\"></div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop\"\n [cdkConnectedOverlayPositions]=\"dropDownPositions\"\n [cdkConnectedOverlayOrigin]=\"thyOrigin || origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"triggerRectWidth\"\n [cdkConnectedOverlayMinWidth]=\"dropDownMinWidth\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n cdkConnectedOverlayTransformOriginOn=\".thy-select-dropdown\"\n (attach)=\"onAttached()\"\n (detach)=\"close()\">\n <div\n thyStopPropagation\n [attr.tabindex]=\"-1\"\n [ngClass]=\"dropDownClass\"\n [@scaleYMotion]=\"placement === 'top' || placement === 'bottom' ? 'enter' : 'void'\"\n [@scaleXMotion]=\"placement === 'left' || placement === 'right' ? 'enter' : 'void'\"\n [@scaleMotion]=\"placement !== 'top' && placement !== 'bottom' && placement !== 'left' && placement !== 'right' ? 'enter' : 'void'\"\n (mousemove)=\"dropDownMouseMove($event)\">\n
|
|
821
|
-
}], ctorParameters: () => [
|
|
822
|
-
type: Inject,
|
|
823
|
-
args: [PLATFORM_ID]
|
|
824
|
-
}] }, { type: undefined, decorators: [{
|
|
825
|
-
type: Optional
|
|
826
|
-
}, {
|
|
827
|
-
type: Inject,
|
|
828
|
-
args: [THY_SELECT_SCROLL_STRATEGY]
|
|
829
|
-
}] }, { type: undefined, decorators: [{
|
|
830
|
-
type: Optional
|
|
831
|
-
}, {
|
|
832
|
-
type: Inject,
|
|
833
|
-
args: [THY_SELECT_CONFIG]
|
|
834
|
-
}] }], propDecorators: { thyDropdownWidthMode: [{
|
|
817
|
+
}, animations: [scaleXMotion, scaleYMotion, scaleMotion], template: "<div\n cdk-overlay-origin\n thySelectControl\n (click)=\"toggle($event)\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [thyPanelOpened]=\"panelOpen\"\n [thySelectedOptions]=\"selected\"\n [thyIsMultiple]=\"isMultiple\"\n [thyShowSearch]=\"thyShowSearch\"\n [thyAllowClear]=\"thyAllowClear\"\n [thySize]=\"thySize\"\n [thyPlaceholder]=\"thyPlaceHolder\"\n [customDisplayTemplate]=\"selectedValueDisplayRef\"\n [thyDisabled]=\"disabled\"\n [thyBorderless]=\"thyBorderless\"\n (thyOnClear)=\"clearSelectValue($event)\"\n (thyOnRemove)=\"remove($event)\"\n (thyOnSearch)=\"onSearchFilter($event)\"\n (thyOnBlur)=\"onBlur($event)\"\n [thyMaxTagCount]=\"thyMaxTagCount\"\n [thyPreset]=\"thyPreset\"></div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"thyHasBackdrop\"\n [cdkConnectedOverlayPositions]=\"dropDownPositions\"\n [cdkConnectedOverlayOrigin]=\"thyOrigin || origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"triggerRectWidth\"\n [cdkConnectedOverlayMinWidth]=\"dropDownMinWidth\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n cdkConnectedOverlayTransformOriginOn=\".thy-select-dropdown\"\n (attach)=\"onAttached()\"\n (detach)=\"close()\">\n <div\n thyStopPropagation\n [attr.tabindex]=\"-1\"\n [ngClass]=\"dropDownClass\"\n [@scaleYMotion]=\"placement === 'top' || placement === 'bottom' ? 'enter' : 'void'\"\n [@scaleXMotion]=\"placement === 'left' || placement === 'right' ? 'enter' : 'void'\"\n [@scaleMotion]=\"placement !== 'top' && placement !== 'bottom' && placement !== 'left' && placement !== 'right' ? 'enter' : 'void'\"\n (mousemove)=\"dropDownMouseMove($event)\">\n @if (contentOptions?.length > 0 || contentGroups?.length > 0 || innerOptions?.length > 0) {\n <div\n #panel\n class=\"thy-select-dropdown-options thy-select-dropdown-options-{{ size }}\"\n thyScroll\n (thyOnScrolled)=\"onOptionsScrolled($event)\"\n [thyEnable]=\"thyEnableScrollLoad\">\n @if (isReactiveDriven) {\n <ng-template [ngTemplateOutlet]=\"optionsContainer.optionsTemplate\"></ng-template>\n }\n <ng-content></ng-content>\n @if (isHiddenOptions) {\n <thy-loading [thyDone]=\"thyLoadState\" thySize=\"sm\"></thy-loading>\n <div class=\"thy-select-empty-content\">\n @if (thyLoadState) {\n <thy-empty [thyMessage]=\"emptySearchMessageText\" thySize=\"sm\"></thy-empty>\n }\n </div>\n }\n </div>\n } @else {\n <thy-loading [thyDone]=\"thyLoadState\" thySize=\"sm\"></thy-loading>\n <div class=\"thy-select-empty-content\">\n @if (thyLoadState) {\n <thy-empty [thyMessage]=\"emptyStateText\" thySize=\"sm\"></thy-empty>\n }\n </div>\n }\n @if (thyFooterTemplate) {\n <div [class]=\"thyFooterClass ? thyFooterClass : 'thy-custom-select-footer'\">\n @if (thyFooterTemplate) {\n <ng-template [ngTemplateOutlet]=\"thyFooterTemplate\"></ng-template>\n }\n </div>\n }\n </div>\n</ng-template>\n\n<thy-options-container #optionsContainer>\n @for (option of optionGroups; track $index) {\n @if (!option.children) {\n <thy-option\n [thyDisabled]=\"option.disabled\"\n [thyLabelText]=\"option.label\"\n [thyValue]=\"option.value\"\n [thyRawValue]=\"option\"></thy-option>\n } @else {\n <thy-option-group [thyGroupLabel]=\"option.groupLabel\">\n @for (sub of option.children; track sub.value) {\n <thy-option [thyDisabled]=\"sub.disabled\" [thyLabelText]=\"sub.label\" [thyValue]=\"sub.value\" [thyRawValue]=\"sub\"></thy-option>\n }\n </thy-option-group>\n }\n }\n</thy-options-container>\n" }]
|
|
818
|
+
}], ctorParameters: () => [], propDecorators: { thyDropdownWidthMode: [{
|
|
835
819
|
type: Input
|
|
836
820
|
}], cdkConnectedOverlay: [{
|
|
837
821
|
type: ViewChild,
|
|
@@ -952,9 +936,9 @@ class ThyNativeSelect extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
952
936
|
setDisabledState(isDisabled) {
|
|
953
937
|
this._disabled = isDisabled;
|
|
954
938
|
}
|
|
955
|
-
constructor(
|
|
939
|
+
constructor() {
|
|
956
940
|
super();
|
|
957
|
-
this.elementRef =
|
|
941
|
+
this.elementRef = inject(ElementRef);
|
|
958
942
|
// The internal data model
|
|
959
943
|
this._innerValue = null;
|
|
960
944
|
this._disabled = false;
|
|
@@ -985,14 +969,14 @@ class ThyNativeSelect extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
985
969
|
this._innerValue = '';
|
|
986
970
|
this.onChangeFn(this._innerValue);
|
|
987
971
|
}
|
|
988
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyNativeSelect, deps: [
|
|
989
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
972
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyNativeSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
973
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyNativeSelect, isStandalone: true, selector: "thy-native-select", inputs: { thySize: "thySize", name: "name", thyAllowClear: ["thyAllowClear", "thyAllowClear", coerceBooleanProperty] }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)" }, properties: { "attr.tabindex": "tabIndex", "class.thy-select": "this._isSelect" } }, providers: [
|
|
990
974
|
{
|
|
991
975
|
provide: NG_VALUE_ACCESSOR,
|
|
992
976
|
useExisting: forwardRef(() => ThyNativeSelect),
|
|
993
977
|
multi: true
|
|
994
978
|
}
|
|
995
|
-
], viewQueries: [{ propertyName: "selectElement", first: true, predicate: ["select"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<select\n #select\n thyInput\n [tabindex]=\"-1\"\n [thySize]=\"_size\"\n [disabled]=\"_disabled\"\n [(ngModel)]=\"_innerValue\"\n (ngModelChange)=\"ngModelChange()\"\n (blur)=\"onBlur($event)\"\n [class.thy-select-selection-allow-clear]=\"thyAllowClear\">\n <ng-content></ng-content>\n</select>\n<thy-icon thyIconName=\"angle-down\"></thy-icon>\n<a class=\"thy-select-remove remove-link\" href=\"javascript:;\" (click)=\"clearSelectValue($event)\"
|
|
979
|
+
], viewQueries: [{ propertyName: "selectElement", first: true, predicate: ["select"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<select\n #select\n thyInput\n [tabindex]=\"-1\"\n [thySize]=\"_size\"\n [disabled]=\"_disabled\"\n [(ngModel)]=\"_innerValue\"\n (ngModelChange)=\"ngModelChange()\"\n (blur)=\"onBlur($event)\"\n [class.thy-select-selection-allow-clear]=\"thyAllowClear\">\n <ng-content></ng-content>\n</select>\n<thy-icon thyIconName=\"angle-down\"></thy-icon>\n@if (thyAllowClear && _innerValue) {\n <a class=\"thy-select-remove remove-link\" href=\"javascript:;\" (click)=\"clearSelectValue($event)\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n </a>\n}\n", dependencies: [{ kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] }); }
|
|
996
980
|
}
|
|
997
981
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyNativeSelect, decorators: [{
|
|
998
982
|
type: Component,
|
|
@@ -1002,12 +986,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
1002
986
|
useExisting: forwardRef(() => ThyNativeSelect),
|
|
1003
987
|
multi: true
|
|
1004
988
|
}
|
|
1005
|
-
], standalone: true, imports: [ThyInputDirective, FormsModule, ThyIcon
|
|
989
|
+
], standalone: true, imports: [ThyInputDirective, FormsModule, ThyIcon], host: {
|
|
1006
990
|
'[attr.tabindex]': 'tabIndex',
|
|
1007
991
|
'(focus)': 'onFocus($event)',
|
|
1008
992
|
'(blur)': 'onBlur($event)'
|
|
1009
|
-
}, template: "<select\n #select\n thyInput\n [tabindex]=\"-1\"\n [thySize]=\"_size\"\n [disabled]=\"_disabled\"\n [(ngModel)]=\"_innerValue\"\n (ngModelChange)=\"ngModelChange()\"\n (blur)=\"onBlur($event)\"\n [class.thy-select-selection-allow-clear]=\"thyAllowClear\">\n <ng-content></ng-content>\n</select>\n<thy-icon thyIconName=\"angle-down\"></thy-icon>\n<a class=\"thy-select-remove remove-link\" href=\"javascript:;\" (click)=\"clearSelectValue($event)\"
|
|
1010
|
-
}], ctorParameters: () => [
|
|
993
|
+
}, template: "<select\n #select\n thyInput\n [tabindex]=\"-1\"\n [thySize]=\"_size\"\n [disabled]=\"_disabled\"\n [(ngModel)]=\"_innerValue\"\n (ngModelChange)=\"ngModelChange()\"\n (blur)=\"onBlur($event)\"\n [class.thy-select-selection-allow-clear]=\"thyAllowClear\">\n <ng-content></ng-content>\n</select>\n<thy-icon thyIconName=\"angle-down\"></thy-icon>\n@if (thyAllowClear && _innerValue) {\n <a class=\"thy-select-remove remove-link\" href=\"javascript:;\" (click)=\"clearSelectValue($event)\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n </a>\n}\n" }]
|
|
994
|
+
}], ctorParameters: () => [], propDecorators: { selectElement: [{
|
|
1011
995
|
type: ViewChild,
|
|
1012
996
|
args: ['select', { static: true }]
|
|
1013
997
|
}], _isSelect: [{
|