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,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, numberAttribute, forwardRef, Component, ViewChild, Input, Output, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, ChangeDetectorRef, EventEmitter, numberAttribute, forwardRef, Component, ViewChild, Input, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
@@ -49,9 +49,9 @@ class ThyInputNumber extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
49
49
|
get thyMin() {
|
|
50
50
|
return this.innerMin;
|
|
51
51
|
}
|
|
52
|
-
constructor(
|
|
52
|
+
constructor() {
|
|
53
53
|
super();
|
|
54
|
-
this.cdr =
|
|
54
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
55
55
|
this.hostFocusControl = useHostFocusControl();
|
|
56
56
|
this.disabledUp = false;
|
|
57
57
|
this.disabledDown = false;
|
|
@@ -306,7 +306,7 @@ class ThyInputNumber extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
306
306
|
ngOnDestroy() {
|
|
307
307
|
this.hostFocusControl.destroy();
|
|
308
308
|
}
|
|
309
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputNumber, deps: [
|
|
309
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputNumber, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
310
310
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.0", type: ThyInputNumber, isStandalone: true, selector: "thy-input-number", inputs: { thyAutoFocus: ["thyAutoFocus", "thyAutoFocus", coerceBooleanProperty], thyPlaceholder: "thyPlaceholder", thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty], thyMax: "thyMax", thyMin: "thyMin", thyStep: ["thyStep", "thyStep", numberAttribute], thyStepDelay: ["thyStepDelay", "thyStepDelay", numberAttribute], thySize: "thySize", thyPrecision: "thyPrecision", thySuffix: "thySuffix" }, outputs: { thyBlur: "thyBlur", thyFocus: "thyFocus", thyStepChange: "thyStepChange" }, host: { properties: { "attr.tabindex": "tabIndex" }, classAttribute: "thy-input-number" }, providers: [
|
|
311
311
|
{
|
|
312
312
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -327,7 +327,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
327
327
|
class: 'thy-input-number',
|
|
328
328
|
'[attr.tabindex]': 'tabIndex'
|
|
329
329
|
}, template: "<div class=\"input-number-handler-wrap\" [class.input-number-disabled]=\"thyDisabled\">\n <span\n unselectable=\"unselectable\"\n class=\"input-number-handler input-number-handler-up\"\n (mousedown)=\"up($event)\"\n (mouseup)=\"stop()\"\n (mouseleave)=\"stop()\"\n [class.disabled]=\"disabledUp\">\n <thy-icon thyIconName=\"angle-up\"></thy-icon>\n </span>\n <span\n unselectable=\"unselectable\"\n class=\"input-number-handler input-number-handler-down\"\n (mousedown)=\"down($event)\"\n (mouseup)=\"stop()\"\n (mouseleave)=\"stop()\"\n [class.disabled]=\"disabledDown\">\n <thy-icon thyIconName=\"angle-down\"></thy-icon>\n </span>\n</div>\n<input\n thyInput\n #input\n autocomplete=\"off\"\n class=\"input-number-input form-control\"\n [thySize]=\"thySize\"\n [thyAutofocus]=\"thyAutoFocus\"\n [disabled]=\"thyDisabled\"\n [attr.min]=\"thyMin\"\n [attr.max]=\"thyMax\"\n [placeholder]=\"thyPlaceholder\"\n [attr.step]=\"thyStep\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"stop()\"\n [(ngModel)]=\"displayValue\"\n (ngModelChange)=\"onModelChange($event)\"\n (focus)=\"onInputFocus($event)\"\n tabindex=\"-1\" />\n" }]
|
|
330
|
-
}], ctorParameters: () => [
|
|
330
|
+
}], ctorParameters: () => [], propDecorators: { inputElement: [{
|
|
331
331
|
type: ViewChild,
|
|
332
332
|
args: ['input', { static: true }]
|
|
333
333
|
}], thyAutoFocus: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-input-number.mjs","sources":["../../../src/input-number/input-number.component.ts","../../../src/input-number/input-number.component.html","../../../src/input-number/module.ts","../../../src/input-number/ngx-tethys-input-number.ts"],"sourcesContent":["import { TabIndexDisabledControlValueAccessorMixin, useHostFocusControl } from 'ngx-tethys/core';\nimport { ThyMaxDirective, ThyMinDirective } from 'ngx-tethys/form';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyInputDirective } from 'ngx-tethys/input';\nimport { ThyAutofocusDirective } from 'ngx-tethys/shared';\nimport { coerceBooleanProperty, DOWN_ARROW, ENTER, isFloat, isNumber, isUndefinedOrNull, UP_ARROW } from 'ngx-tethys/util';\n\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n numberAttribute,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\ntype InputSize = 'xs' | 'sm' | 'md' | 'lg' | '';\n\nenum Type {\n up,\n down\n}\n\n/**\n * 数字输入框\n * @name thy-input-number\n * @order 10\n */\n@Component({\n selector: 'thy-input-number',\n templateUrl: './input-number.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyInputNumber),\n multi: true\n }\n ],\n standalone: true,\n imports: [ThyIcon, ThyInputDirective, ThyAutofocusDirective, FormsModule, ThyMinDirective, ThyMaxDirective],\n host: {\n class: 'thy-input-number',\n '[attr.tabindex]': 'tabIndex'\n }\n})\nexport class ThyInputNumber\n extends TabIndexDisabledControlValueAccessorMixin\n implements ControlValueAccessor, OnChanges, OnInit, OnDestroy\n{\n @ViewChild('input', { static: true }) inputElement: ElementRef<any>;\n\n private autoStepTimer: any;\n\n private hostFocusControl = useHostFocusControl();\n\n validValue: number | string;\n\n displayValue: number | string;\n\n disabledUp = false;\n\n disabledDown = false;\n\n activeValue: string = '';\n\n /**\n * 是否自动聚焦\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyAutoFocus: boolean;\n\n /**\n * 输入框的placeholder\n */\n @Input() thyPlaceholder: string = '';\n\n /**\n * 是否禁用\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyDisabled: boolean;\n\n /**\n * 最大值\n * @default Infinity\n */\n @Input() set thyMax(value: number) {\n this.innerMax = isNumber(value) ? value : this.innerMax;\n if (this.displayValue || this.displayValue === 0) {\n const val = Number(this.displayValue);\n this.disabledUp = val >= this.innerMax;\n }\n }\n\n get thyMax() {\n return this.innerMax;\n }\n\n /**\n * 最小值\n * @default -Infinity\n */\n @Input() set thyMin(value: number) {\n this.innerMin = isNumber(value) ? value : this.innerMin;\n if (this.displayValue || this.displayValue === 0) {\n const val = Number(this.displayValue);\n this.disabledDown = val <= this.innerMin;\n }\n }\n\n get thyMin() {\n return this.innerMin;\n }\n\n /**\n * 每次改变步数,可以为小数\n */\n @Input({ transform: numberAttribute }) thyStep = 1;\n\n /**\n * 改变步数时的延迟毫秒数,值越小变化的速度越快\n * @default 300\n */\n @Input({ transform: numberAttribute }) thyStepDelay = 300;\n\n /**\n * 输入框大小\n * @type xs | sm | md | lg\n */\n @Input() thySize: InputSize;\n\n /**\n * 数值精度\n */\n @Input() thyPrecision: number;\n\n /**\n * 数值后缀\n */\n @Input() thySuffix: string;\n\n /**\n * 焦点失去事件\n */\n @Output() thyBlur = new EventEmitter<Event>();\n\n /**\n * 焦点激活事件\n */\n @Output() thyFocus = new EventEmitter<Event>();\n\n /**\n * 上下箭头点击事件\n */\n @Output() thyStepChange = new EventEmitter<{ value: number; type: Type }>();\n\n private innerMax: number = Infinity;\n\n private innerMin: number = -Infinity;\n\n private isFocused: boolean;\n\n constructor(private cdr: ChangeDetectorRef) {\n super();\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.thyDisabled = isDisabled;\n }\n\n ngOnInit() {\n this.hostFocusControl.focusChanged = (origin: FocusOrigin) => {\n if (this.thyDisabled) {\n return;\n }\n\n if (origin) {\n if (!this.isFocused) {\n this.inputElement.nativeElement.focus();\n }\n } else {\n if (this.isFocused) {\n this.displayValue = this.formatterValue(this.validValue);\n this.onTouchedFn();\n this.thyBlur.emit();\n this.isFocused = false;\n }\n }\n };\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.thySuffix && !changes.thySuffix.isFirstChange()) {\n const validValue = this.getCurrentValidValue(this.validValue);\n this.updateValidValue(validValue);\n this.displayValue = this.formatterValue(validValue);\n }\n }\n\n writeValue(value: number | string): void {\n const _value = this.getCurrentValidValue(value);\n this.updateValidValue(_value);\n this.displayValue = this.formatterValue(_value);\n this.cdr.markForCheck();\n }\n\n updateValidValue(value: number | string): void {\n if (this.isNotValid(value)) {\n this.validValue = '';\n } else if (this.validValue !== value) {\n this.validValue = value;\n }\n this.disabledUp = this.disabledDown = false;\n if (value || value === 0) {\n const val = Number(value);\n if (val >= this.thyMax) {\n this.disabledUp = true;\n }\n if (val <= this.thyMin) {\n this.disabledDown = true;\n }\n }\n }\n\n onModelChange(value: string): void {\n const parseValue = this.parser(value);\n if (this.isInputNumber(value)) {\n this.activeValue = value;\n } else {\n this.displayValue = parseValue;\n this.inputElement.nativeElement.value = parseValue;\n }\n const validValue = this.getCurrentValidValue(parseValue);\n if (`${this.validValue}` !== `${validValue}`) {\n this.updateValidValue(validValue);\n this.onChangeFn(validValue);\n }\n }\n\n onInputFocus(event?: Event) {\n this.activeValue = this.parser(this.displayValue.toString());\n if (!this.isFocused) {\n this.isFocused = true;\n this.thyFocus.emit(event);\n }\n }\n\n onKeyDown(e: KeyboardEvent): void {\n if (e.keyCode === UP_ARROW) {\n this.up(e);\n this.stop();\n } else if (e.keyCode === DOWN_ARROW) {\n this.down(e);\n this.stop();\n } else if (e.keyCode === ENTER) {\n this.displayValue = this.formatterValue(this.validValue);\n }\n }\n\n stop() {\n if (this.autoStepTimer) {\n clearTimeout(this.autoStepTimer);\n }\n this.displayValue = this.toNumber(this.displayValue);\n }\n\n step(type: Type, e: MouseEvent | KeyboardEvent): void {\n this.stop();\n e.preventDefault();\n if (this.thyDisabled) {\n return;\n }\n const value = this.validValue as number;\n let val;\n if (type === Type.up) {\n val = this.upStep(value);\n } else if (type === Type.down) {\n val = this.downStep(value);\n }\n const outOfRange = val > this.thyMax || val < this.thyMin;\n val = this.getCurrentValidValue(val);\n this.updateValidValue(val);\n this.onChangeFn(this.validValue);\n this.thyStepChange.emit({ value: this.validValue as number, type });\n this.displayValue = this.formatterValue(val);\n if (outOfRange) {\n return;\n }\n this.autoStepTimer = setTimeout(() => {\n (this[Type[type]] as (e: MouseEvent | KeyboardEvent) => void)(e);\n }, this.thyStepDelay);\n }\n\n upStep(value: number): number {\n const precisionFactor = this.getPrecisionFactor(value);\n const precision = this.getMaxPrecision(value);\n const result = ((precisionFactor * value + precisionFactor * this.thyStep) / precisionFactor).toFixed(precision);\n return this.toNumber(result);\n }\n\n downStep(value: number): number {\n const precisionFactor = this.getPrecisionFactor(value);\n const precision = Math.abs(this.getMaxPrecision(value));\n const result = ((precisionFactor * value - precisionFactor * this.thyStep) / precisionFactor).toFixed(precision);\n return this.toNumber(result);\n }\n\n getMaxPrecision(value: string | number): number {\n if (!isUndefinedOrNull(this.thyPrecision)) {\n return this.thyPrecision;\n }\n const stepPrecision = this.getPrecision(this.thyStep);\n const currentValuePrecision = this.getPrecision(value as number);\n if (!value) {\n return stepPrecision;\n }\n return Math.max(currentValuePrecision, stepPrecision);\n }\n\n getPrecisionFactor(activeValue: string | number): number {\n const precision = this.getMaxPrecision(activeValue);\n return Math.pow(10, precision);\n }\n\n getPrecision(value: number): number {\n const valueString = value.toString();\n // 0.0000000004.toString() = 4e10 => 10\n if (valueString.indexOf('e-') >= 0) {\n return parseInt(valueString.slice(valueString.indexOf('e-') + 2), 10);\n }\n let precision = 0;\n // 1.2222 => 4\n if (valueString.indexOf('.') >= 0) {\n precision = valueString.length - valueString.indexOf('.') - 1;\n }\n return precision;\n }\n\n up(e: MouseEvent | KeyboardEvent) {\n this.inputElement.nativeElement.focus();\n this.step(Type.up, e);\n }\n\n down(e: MouseEvent | KeyboardEvent) {\n this.inputElement.nativeElement.focus();\n this.step(Type.down, e);\n }\n\n formatterValue(value: number | string) {\n const parseValue = this.parser(`${value}`);\n if (parseValue) {\n return this.thySuffix ? `${parseValue} ${this.thySuffix}` : parseValue;\n } else {\n return '';\n }\n }\n\n parser(value: string) {\n return value\n .trim()\n .replace(/。/g, '.')\n .replace(/[^\\w\\.-]+/g, '')\n .replace(this.thySuffix, '');\n }\n\n getCurrentValidValue(value: string | number): number | string {\n let val = value;\n if (value === '' || isUndefinedOrNull(value)) {\n return '';\n }\n val = parseFloat(value as string);\n if (this.isNotValid(val)) {\n val = this.validValue;\n }\n if ((val as number) < this.thyMin) {\n val = this.thyMin;\n }\n if ((val as number) > this.thyMax) {\n val = this.thyMax;\n }\n\n return this.toNumber(val);\n }\n\n isNotValid(num: string | number): boolean {\n return isNaN(num as number) || num === '' || num === null || !!(num && num.toString().indexOf('.') === num.toString().length - 1);\n }\n\n toNumber(num: string | number): number {\n if (this.isNotValid(num)) {\n return num as number;\n }\n const numStr = String(num);\n if (numStr.indexOf('.') >= 0 && !isUndefinedOrNull(this.thyPrecision)) {\n return Number(Number(num).toFixed(this.thyPrecision));\n }\n return Number(num);\n }\n\n isInputNumber(value: string) {\n return isFloat(value) || /^[-+Ee]$|^([-+.]?[0-9])*(([.]|[.eE])?[eE]?[+-]?)?$|^$/.test(value);\n }\n\n ngOnDestroy() {\n this.hostFocusControl.destroy();\n }\n}\n","<div class=\"input-number-handler-wrap\" [class.input-number-disabled]=\"thyDisabled\">\n <span\n unselectable=\"unselectable\"\n class=\"input-number-handler input-number-handler-up\"\n (mousedown)=\"up($event)\"\n (mouseup)=\"stop()\"\n (mouseleave)=\"stop()\"\n [class.disabled]=\"disabledUp\">\n <thy-icon thyIconName=\"angle-up\"></thy-icon>\n </span>\n <span\n unselectable=\"unselectable\"\n class=\"input-number-handler input-number-handler-down\"\n (mousedown)=\"down($event)\"\n (mouseup)=\"stop()\"\n (mouseleave)=\"stop()\"\n [class.disabled]=\"disabledDown\">\n <thy-icon thyIconName=\"angle-down\"></thy-icon>\n </span>\n</div>\n<input\n thyInput\n #input\n autocomplete=\"off\"\n class=\"input-number-input form-control\"\n [thySize]=\"thySize\"\n [thyAutofocus]=\"thyAutoFocus\"\n [disabled]=\"thyDisabled\"\n [attr.min]=\"thyMin\"\n [attr.max]=\"thyMax\"\n [placeholder]=\"thyPlaceholder\"\n [attr.step]=\"thyStep\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"stop()\"\n [(ngModel)]=\"displayValue\"\n (ngModelChange)=\"onModelChange($event)\"\n (focus)=\"onInputFocus($event)\"\n tabindex=\"-1\" />\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyInputNumber } from './input-number.component';\nimport { ThyInputModule } from 'ngx-tethys/input';\nimport { ThyFormModule } from 'ngx-tethys/form';\n\n@NgModule({\n imports: [CommonModule, FormsModule, ThySharedModule, ThyIconModule, ThyInputModule, ThyFormModule, ThyInputNumber],\n exports: [ThyInputNumber]\n})\nexport class ThyInputNumberModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA2BA,IAAK,IAGJ,CAAA;AAHD,CAAA,UAAK,IAAI,EAAA;AACL,IAAA,IAAA,CAAA,IAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAE,CAAA;AACF,IAAA,IAAA,CAAA,IAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;AACR,CAAC,EAHI,IAAI,KAAJ,IAAI,GAGR,EAAA,CAAA,CAAA,CAAA;AAED;;;;AAIG;AAkBG,MAAO,cACT,SAAQ,yCAAyC,CAAA;AAoCjD;;;AAGG;IACH,IAAa,MAAM,CAAC,KAAa,EAAA;AAC7B,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC;QACxD,IAAI,IAAI,CAAC,YAA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GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EAHnB,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGzG,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,CAAC;oBACnH,OAAO,EAAE,CAAC,cAAc,CAAC;AAC5B,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-input-number.mjs","sources":["../../../src/input-number/input-number.component.ts","../../../src/input-number/input-number.component.html","../../../src/input-number/module.ts","../../../src/input-number/ngx-tethys-input-number.ts"],"sourcesContent":["import { TabIndexDisabledControlValueAccessorMixin, useHostFocusControl } from 'ngx-tethys/core';\nimport { ThyMaxDirective, ThyMinDirective } from 'ngx-tethys/form';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyInputDirective } from 'ngx-tethys/input';\nimport { ThyAutofocusDirective } from 'ngx-tethys/shared';\nimport { coerceBooleanProperty, DOWN_ARROW, ENTER, isFloat, isNumber, isUndefinedOrNull, UP_ARROW } from 'ngx-tethys/util';\n\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n numberAttribute,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild,\n inject\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\ntype InputSize = 'xs' | 'sm' | 'md' | 'lg' | '';\n\nenum Type {\n up,\n down\n}\n\n/**\n * 数字输入框\n * @name thy-input-number\n * @order 10\n */\n@Component({\n selector: 'thy-input-number',\n templateUrl: './input-number.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyInputNumber),\n multi: true\n }\n ],\n standalone: true,\n imports: [ThyIcon, ThyInputDirective, ThyAutofocusDirective, FormsModule, ThyMinDirective, ThyMaxDirective],\n host: {\n class: 'thy-input-number',\n '[attr.tabindex]': 'tabIndex'\n }\n})\nexport class ThyInputNumber\n extends TabIndexDisabledControlValueAccessorMixin\n implements ControlValueAccessor, OnChanges, OnInit, OnDestroy\n{\n private cdr = inject(ChangeDetectorRef);\n\n @ViewChild('input', { static: true }) inputElement: ElementRef<any>;\n\n private autoStepTimer: any;\n\n private hostFocusControl = useHostFocusControl();\n\n validValue: number | string;\n\n displayValue: number | string;\n\n disabledUp = false;\n\n disabledDown = false;\n\n activeValue: string = '';\n\n /**\n * 是否自动聚焦\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyAutoFocus: boolean;\n\n /**\n * 输入框的placeholder\n */\n @Input() thyPlaceholder: string = '';\n\n /**\n * 是否禁用\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyDisabled: boolean;\n\n /**\n * 最大值\n * @default Infinity\n */\n @Input() set thyMax(value: number) {\n this.innerMax = isNumber(value) ? value : this.innerMax;\n if (this.displayValue || this.displayValue === 0) {\n const val = Number(this.displayValue);\n this.disabledUp = val >= this.innerMax;\n }\n }\n\n get thyMax() {\n return this.innerMax;\n }\n\n /**\n * 最小值\n * @default -Infinity\n */\n @Input() set thyMin(value: number) {\n this.innerMin = isNumber(value) ? value : this.innerMin;\n if (this.displayValue || this.displayValue === 0) {\n const val = Number(this.displayValue);\n this.disabledDown = val <= this.innerMin;\n }\n }\n\n get thyMin() {\n return this.innerMin;\n }\n\n /**\n * 每次改变步数,可以为小数\n */\n @Input({ transform: numberAttribute }) thyStep = 1;\n\n /**\n * 改变步数时的延迟毫秒数,值越小变化的速度越快\n * @default 300\n */\n @Input({ transform: numberAttribute }) thyStepDelay = 300;\n\n /**\n * 输入框大小\n * @type xs | sm | md | lg\n */\n @Input() thySize: InputSize;\n\n /**\n * 数值精度\n */\n @Input() thyPrecision: number;\n\n /**\n * 数值后缀\n */\n @Input() thySuffix: string;\n\n /**\n * 焦点失去事件\n */\n @Output() thyBlur = new EventEmitter<Event>();\n\n /**\n * 焦点激活事件\n */\n @Output() thyFocus = new EventEmitter<Event>();\n\n /**\n * 上下箭头点击事件\n */\n @Output() thyStepChange = new EventEmitter<{ value: number; type: Type }>();\n\n private innerMax: number = Infinity;\n\n private innerMin: number = -Infinity;\n\n private isFocused: boolean;\n\n constructor() {\n super();\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.thyDisabled = isDisabled;\n }\n\n ngOnInit() {\n this.hostFocusControl.focusChanged = (origin: FocusOrigin) => {\n if (this.thyDisabled) {\n return;\n }\n\n if (origin) {\n if (!this.isFocused) {\n this.inputElement.nativeElement.focus();\n }\n } else {\n if (this.isFocused) {\n this.displayValue = this.formatterValue(this.validValue);\n this.onTouchedFn();\n this.thyBlur.emit();\n this.isFocused = false;\n }\n }\n };\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.thySuffix && !changes.thySuffix.isFirstChange()) {\n const validValue = this.getCurrentValidValue(this.validValue);\n this.updateValidValue(validValue);\n this.displayValue = this.formatterValue(validValue);\n }\n }\n\n writeValue(value: number | string): void {\n const _value = this.getCurrentValidValue(value);\n this.updateValidValue(_value);\n this.displayValue = this.formatterValue(_value);\n this.cdr.markForCheck();\n }\n\n updateValidValue(value: number | string): void {\n if (this.isNotValid(value)) {\n this.validValue = '';\n } else if (this.validValue !== value) {\n this.validValue = value;\n }\n this.disabledUp = this.disabledDown = false;\n if (value || value === 0) {\n const val = Number(value);\n if (val >= this.thyMax) {\n this.disabledUp = true;\n }\n if (val <= this.thyMin) {\n this.disabledDown = true;\n }\n }\n }\n\n onModelChange(value: string): void {\n const parseValue = this.parser(value);\n if (this.isInputNumber(value)) {\n this.activeValue = value;\n } else {\n this.displayValue = parseValue;\n this.inputElement.nativeElement.value = parseValue;\n }\n const validValue = this.getCurrentValidValue(parseValue);\n if (`${this.validValue}` !== `${validValue}`) {\n this.updateValidValue(validValue);\n this.onChangeFn(validValue);\n }\n }\n\n onInputFocus(event?: Event) {\n this.activeValue = this.parser(this.displayValue.toString());\n if (!this.isFocused) {\n this.isFocused = true;\n this.thyFocus.emit(event);\n }\n }\n\n onKeyDown(e: KeyboardEvent): void {\n if (e.keyCode === UP_ARROW) {\n this.up(e);\n this.stop();\n } else if (e.keyCode === DOWN_ARROW) {\n this.down(e);\n this.stop();\n } else if (e.keyCode === ENTER) {\n this.displayValue = this.formatterValue(this.validValue);\n }\n }\n\n stop() {\n if (this.autoStepTimer) {\n clearTimeout(this.autoStepTimer);\n }\n this.displayValue = this.toNumber(this.displayValue);\n }\n\n step(type: Type, e: MouseEvent | KeyboardEvent): void {\n this.stop();\n e.preventDefault();\n if (this.thyDisabled) {\n return;\n }\n const value = this.validValue as number;\n let val;\n if (type === Type.up) {\n val = this.upStep(value);\n } else if (type === Type.down) {\n val = this.downStep(value);\n }\n const outOfRange = val > this.thyMax || val < this.thyMin;\n val = this.getCurrentValidValue(val);\n this.updateValidValue(val);\n this.onChangeFn(this.validValue);\n this.thyStepChange.emit({ value: this.validValue as number, type });\n this.displayValue = this.formatterValue(val);\n if (outOfRange) {\n return;\n }\n this.autoStepTimer = setTimeout(() => {\n (this[Type[type]] as (e: MouseEvent | KeyboardEvent) => void)(e);\n }, this.thyStepDelay);\n }\n\n upStep(value: number): number {\n const precisionFactor = this.getPrecisionFactor(value);\n const precision = this.getMaxPrecision(value);\n const result = ((precisionFactor * value + precisionFactor * this.thyStep) / precisionFactor).toFixed(precision);\n return this.toNumber(result);\n }\n\n downStep(value: number): number {\n const precisionFactor = this.getPrecisionFactor(value);\n const precision = Math.abs(this.getMaxPrecision(value));\n const result = ((precisionFactor * value - precisionFactor * this.thyStep) / precisionFactor).toFixed(precision);\n return this.toNumber(result);\n }\n\n getMaxPrecision(value: string | number): number {\n if (!isUndefinedOrNull(this.thyPrecision)) {\n return this.thyPrecision;\n }\n const stepPrecision = this.getPrecision(this.thyStep);\n const currentValuePrecision = this.getPrecision(value as number);\n if (!value) {\n return stepPrecision;\n }\n return Math.max(currentValuePrecision, stepPrecision);\n }\n\n getPrecisionFactor(activeValue: string | number): number {\n const precision = this.getMaxPrecision(activeValue);\n return Math.pow(10, precision);\n }\n\n getPrecision(value: number): number {\n const valueString = value.toString();\n // 0.0000000004.toString() = 4e10 => 10\n if (valueString.indexOf('e-') >= 0) {\n return parseInt(valueString.slice(valueString.indexOf('e-') + 2), 10);\n }\n let precision = 0;\n // 1.2222 => 4\n if (valueString.indexOf('.') >= 0) {\n precision = valueString.length - valueString.indexOf('.') - 1;\n }\n return precision;\n }\n\n up(e: MouseEvent | KeyboardEvent) {\n this.inputElement.nativeElement.focus();\n this.step(Type.up, e);\n }\n\n down(e: MouseEvent | KeyboardEvent) {\n this.inputElement.nativeElement.focus();\n this.step(Type.down, e);\n }\n\n formatterValue(value: number | string) {\n const parseValue = this.parser(`${value}`);\n if (parseValue) {\n return this.thySuffix ? `${parseValue} ${this.thySuffix}` : parseValue;\n } else {\n return '';\n }\n }\n\n parser(value: string) {\n return value\n .trim()\n .replace(/。/g, '.')\n .replace(/[^\\w\\.-]+/g, '')\n .replace(this.thySuffix, '');\n }\n\n getCurrentValidValue(value: string | number): number | string {\n let val = value;\n if (value === '' || isUndefinedOrNull(value)) {\n return '';\n }\n val = parseFloat(value as string);\n if (this.isNotValid(val)) {\n val = this.validValue;\n }\n if ((val as number) < this.thyMin) {\n val = this.thyMin;\n }\n if ((val as number) > this.thyMax) {\n val = this.thyMax;\n }\n\n return this.toNumber(val);\n }\n\n isNotValid(num: string | number): boolean {\n return isNaN(num as number) || num === '' || num === null || !!(num && num.toString().indexOf('.') === num.toString().length - 1);\n }\n\n toNumber(num: string | number): number {\n if (this.isNotValid(num)) {\n return num as number;\n }\n const numStr = String(num);\n if (numStr.indexOf('.') >= 0 && !isUndefinedOrNull(this.thyPrecision)) {\n return Number(Number(num).toFixed(this.thyPrecision));\n }\n return Number(num);\n }\n\n isInputNumber(value: string) {\n return isFloat(value) || /^[-+Ee]$|^([-+.]?[0-9])*(([.]|[.eE])?[eE]?[+-]?)?$|^$/.test(value);\n }\n\n ngOnDestroy() {\n this.hostFocusControl.destroy();\n }\n}\n","<div class=\"input-number-handler-wrap\" [class.input-number-disabled]=\"thyDisabled\">\n <span\n unselectable=\"unselectable\"\n class=\"input-number-handler input-number-handler-up\"\n (mousedown)=\"up($event)\"\n (mouseup)=\"stop()\"\n (mouseleave)=\"stop()\"\n [class.disabled]=\"disabledUp\">\n <thy-icon thyIconName=\"angle-up\"></thy-icon>\n </span>\n <span\n unselectable=\"unselectable\"\n class=\"input-number-handler input-number-handler-down\"\n (mousedown)=\"down($event)\"\n (mouseup)=\"stop()\"\n (mouseleave)=\"stop()\"\n [class.disabled]=\"disabledDown\">\n <thy-icon thyIconName=\"angle-down\"></thy-icon>\n </span>\n</div>\n<input\n thyInput\n #input\n autocomplete=\"off\"\n class=\"input-number-input form-control\"\n [thySize]=\"thySize\"\n [thyAutofocus]=\"thyAutoFocus\"\n [disabled]=\"thyDisabled\"\n [attr.min]=\"thyMin\"\n [attr.max]=\"thyMax\"\n [placeholder]=\"thyPlaceholder\"\n [attr.step]=\"thyStep\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"stop()\"\n [(ngModel)]=\"displayValue\"\n (ngModelChange)=\"onModelChange($event)\"\n (focus)=\"onInputFocus($event)\"\n tabindex=\"-1\" />\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyInputNumber } from './input-number.component';\nimport { ThyInputModule } from 'ngx-tethys/input';\nimport { ThyFormModule } from 'ngx-tethys/form';\n\n@NgModule({\n imports: [CommonModule, FormsModule, ThySharedModule, ThyIconModule, ThyInputModule, ThyFormModule, ThyInputNumber],\n exports: [ThyInputNumber]\n})\nexport class ThyInputNumberModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA4BA,IAAK,IAGJ,CAAA;AAHD,CAAA,UAAK,IAAI,EAAA;AACL,IAAA,IAAA,CAAA,IAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAE,CAAA;AACF,IAAA,IAAA,CAAA,IAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;AACR,CAAC,EAHI,IAAI,KAAJ,IAAI,GAGR,EAAA,CAAA,CAAA,CAAA;AAED;;;;AAIG;AAkBG,MAAO,cACT,SAAQ,yCAAyC,CAAA;AAsCjD;;;AAGG;IACH,IAAa,MAAM,CAAC,KAAa,EAAA;AAC7B,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC;QACxD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC,EAAE;YAC9C,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACtC,IAAI,CAAC,UAAU,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC;SAC1C;KACJ;AAED,IAAA,IAAI,MAAM,GAAA;QACN,OAAO,IAAI,CAAC,QAAQ,CAAC;KACxB;AAED;;;AAGG;IACH,IAAa,MAAM,CAAC,KAAa,EAAA;AAC7B,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,QAAQ,C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cAAc,CAAC;oBACnH,OAAO,EAAE,CAAC,cAAc,CAAC;AAC5B,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { inject, ElementRef, Renderer2, Directive, HostBinding, Input, forwardRef, NgZone, EventEmitter, Component, ViewEncapsulation, Output, ContentChild, ViewChild, ChangeDetectorRef, DestroyRef, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
|
-
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
5
|
+
import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
6
6
|
import { useHostRenderer } from '@tethys/cdk/dom';
|
|
7
7
|
import { take, throttleTime, filter, tap, switchMap } from 'rxjs/operators';
|
|
8
8
|
import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
|
|
9
9
|
import { ThyAutofocusDirective, ThySharedModule } from 'ngx-tethys/shared';
|
|
10
10
|
import { coerceBooleanProperty } from 'ngx-tethys/util';
|
|
11
|
-
import
|
|
12
|
-
import { useHostFocusControl, mixinInitialized, mixinTabIndex, mixinDisabled, AbstractControlValueAccessor } from 'ngx-tethys/core';
|
|
11
|
+
import { ThyTranslate, useHostFocusControl, mixinInitialized, mixinTabIndex, mixinDisabled, AbstractControlValueAccessor } from 'ngx-tethys/core';
|
|
13
12
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
14
13
|
import { of, Observable, Subject } from 'rxjs';
|
|
15
14
|
import { ThyDividerModule } from 'ngx-tethys/divider';
|
|
@@ -26,6 +25,14 @@ const inputGroupSizeMap$1 = {
|
|
|
26
25
|
* @order 10
|
|
27
26
|
*/
|
|
28
27
|
class ThyInputDirective {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.elementRef = inject(ElementRef);
|
|
30
|
+
this.render = inject(Renderer2);
|
|
31
|
+
this.control = inject(NgControl, { optional: true, self: true });
|
|
32
|
+
this.isFormControl = true;
|
|
33
|
+
this.initialized = false;
|
|
34
|
+
this.hostRenderer = useHostRenderer();
|
|
35
|
+
}
|
|
29
36
|
/**
|
|
30
37
|
* 输入框大小
|
|
31
38
|
* @type 'xs' | 'sm' | 'md' | 'default' | 'lg'
|
|
@@ -45,18 +52,10 @@ class ThyInputDirective {
|
|
|
45
52
|
get nativeElement() {
|
|
46
53
|
return this.elementRef.nativeElement;
|
|
47
54
|
}
|
|
48
|
-
constructor(elementRef, render, control) {
|
|
49
|
-
this.elementRef = elementRef;
|
|
50
|
-
this.render = render;
|
|
51
|
-
this.control = control;
|
|
52
|
-
this.isFormControl = true;
|
|
53
|
-
this.initialized = false;
|
|
54
|
-
this.hostRenderer = useHostRenderer();
|
|
55
|
-
}
|
|
56
55
|
ngOnInit() {
|
|
57
56
|
this.initialized = true;
|
|
58
57
|
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputDirective, deps: [
|
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
60
59
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.0", type: ThyInputDirective, isStandalone: true, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: { thySize: "thySize" }, host: { properties: { "class.form-control": "this.isFormControl" } }, exportAs: ["thyInput"], ngImport: i0 }); }
|
|
61
60
|
}
|
|
62
61
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputDirective, decorators: [{
|
|
@@ -66,11 +65,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
66
65
|
exportAs: 'thyInput',
|
|
67
66
|
standalone: true
|
|
68
67
|
}]
|
|
69
|
-
}],
|
|
70
|
-
type: Optional
|
|
71
|
-
}, {
|
|
72
|
-
type: Self
|
|
73
|
-
}] }], propDecorators: { isFormControl: [{
|
|
68
|
+
}], propDecorators: { isFormControl: [{
|
|
74
69
|
type: HostBinding,
|
|
75
70
|
args: ['class.form-control']
|
|
76
71
|
}], thySize: [{
|
|
@@ -90,16 +85,9 @@ const password = 'password';
|
|
|
90
85
|
* @order 50
|
|
91
86
|
*/
|
|
92
87
|
class ThyInput {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*/
|
|
97
|
-
set thyType(value) {
|
|
98
|
-
this.type = value;
|
|
99
|
-
}
|
|
100
|
-
constructor(ngZone, elementRef) {
|
|
101
|
-
this.ngZone = ngZone;
|
|
102
|
-
this.elementRef = elementRef;
|
|
88
|
+
constructor() {
|
|
89
|
+
this.ngZone = inject(NgZone);
|
|
90
|
+
this.elementRef = inject(ElementRef);
|
|
103
91
|
/**
|
|
104
92
|
* Placeholder
|
|
105
93
|
*/
|
|
@@ -126,6 +114,13 @@ class ThyInput {
|
|
|
126
114
|
this.onTouchedCallback = noop$1;
|
|
127
115
|
this.onChangeCallback = noop$1;
|
|
128
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* 输入框类型
|
|
119
|
+
* @type 'number' | 'input'
|
|
120
|
+
*/
|
|
121
|
+
set thyType(value) {
|
|
122
|
+
this.type = value;
|
|
123
|
+
}
|
|
129
124
|
ngOnInit() {
|
|
130
125
|
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
131
126
|
if (this.isPassword(this.type)) {
|
|
@@ -168,8 +163,8 @@ class ThyInput {
|
|
|
168
163
|
togglePasswordType() {
|
|
169
164
|
this.type = this.isPassword(this.type) ? 'text' : 'password';
|
|
170
165
|
}
|
|
171
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInput, deps: [
|
|
172
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
166
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInput, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
167
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyInput, isStandalone: true, selector: "thy-input", inputs: { placeholder: "placeholder", thySize: "thySize", thyAutofocus: ["thyAutofocus", "thyAutofocus", coerceBooleanProperty], thyType: "thyType", type: "type", thyLabelText: "thyLabelText", readonly: ["readonly", "readonly", coerceBooleanProperty] }, outputs: { focus: "focus", blur: "blur" }, host: { properties: { "class.form-control-active": "focused", "class.disabled": "disabled" }, classAttribute: "thy-input form-control" }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], queries: [{ propertyName: "appendTemplate", first: true, predicate: ["append"], descendants: true }, { propertyName: "prependTemplate", first: true, predicate: ["prepend"], descendants: true }], viewQueries: [{ propertyName: "eyeTemplate", first: true, predicate: ["eye"], descendants: true, static: true }], ngImport: i0, template: "@if (prependTemplate) {\n <div #prepend class=\"input-prepend\">\n <ng-template *ngTemplateOutlet=\"prependTemplate\"></ng-template>\n </div>\n}\n<input\n #input\n thyInput\n [thySize]=\"thySize\"\n [thyAutofocus]=\"thyAutofocus\"\n [type]=\"type\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onModelChange()\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n [readonly]=\"readonly\"\n />\n<span class=\"input-label input-label-{{ thySize }}\" [class.active]=\"showLabel\">{{ thyLabelText }}</span>\n@if (appendTemplate) {\n <div #append class=\"input-append\">\n <ng-template *ngTemplateOutlet=\"appendTemplate\"></ng-template>\n </div>\n}\n\n<ng-template #eye>\n <a href=\"javascript:;\" class=\"link-secondary input-password-icon\" (click)=\"togglePasswordType()\">\n @if (isPassword(type)) {\n <thy-icon thyIconName=\"eye\"></thy-icon>\n }\n @if (!isPassword(type)) {\n <thy-icon thyIconName=\"eye-invisible\"></thy-icon>\n }\n </a>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "directive", type: ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
173
168
|
}
|
|
174
169
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInput, decorators: [{
|
|
175
170
|
type: Component,
|
|
@@ -177,8 +172,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
177
172
|
class: 'thy-input form-control',
|
|
178
173
|
'[class.form-control-active]': 'focused',
|
|
179
174
|
'[class.disabled]': 'disabled'
|
|
180
|
-
}, standalone: true, imports: [
|
|
181
|
-
}],
|
|
175
|
+
}, standalone: true, imports: [NgTemplateOutlet, ThyInputDirective, ThyAutofocusDirective, FormsModule, ThyIcon], template: "@if (prependTemplate) {\n <div #prepend class=\"input-prepend\">\n <ng-template *ngTemplateOutlet=\"prependTemplate\"></ng-template>\n </div>\n}\n<input\n #input\n thyInput\n [thySize]=\"thySize\"\n [thyAutofocus]=\"thyAutofocus\"\n [type]=\"type\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onModelChange()\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n [readonly]=\"readonly\"\n />\n<span class=\"input-label input-label-{{ thySize }}\" [class.active]=\"showLabel\">{{ thyLabelText }}</span>\n@if (appendTemplate) {\n <div #append class=\"input-append\">\n <ng-template *ngTemplateOutlet=\"appendTemplate\"></ng-template>\n </div>\n}\n\n<ng-template #eye>\n <a href=\"javascript:;\" class=\"link-secondary input-password-icon\" (click)=\"togglePasswordType()\">\n @if (isPassword(type)) {\n <thy-icon thyIconName=\"eye\"></thy-icon>\n }\n @if (!isPassword(type)) {\n <thy-icon thyIconName=\"eye-invisible\"></thy-icon>\n }\n </a>\n</ng-template>\n" }]
|
|
176
|
+
}], propDecorators: { placeholder: [{
|
|
182
177
|
type: Input
|
|
183
178
|
}], thySize: [{
|
|
184
179
|
type: Input
|
|
@@ -220,6 +215,15 @@ const inputGroupSizeMap = {
|
|
|
220
215
|
* @order 20
|
|
221
216
|
*/
|
|
222
217
|
class ThyInputGroup {
|
|
218
|
+
constructor() {
|
|
219
|
+
this.thyTranslate = inject(ThyTranslate);
|
|
220
|
+
this.ngZone = inject(NgZone);
|
|
221
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
222
|
+
this.hostRenderer = useHostRenderer();
|
|
223
|
+
this.hostFocusControl = useHostFocusControl();
|
|
224
|
+
this.destroyRef = inject(DestroyRef);
|
|
225
|
+
this.disabled = false;
|
|
226
|
+
}
|
|
223
227
|
/**
|
|
224
228
|
* 输入框上添加的后置文本
|
|
225
229
|
*/
|
|
@@ -261,15 +265,6 @@ class ThyInputGroup {
|
|
|
261
265
|
this.hostRenderer.updateClass([]);
|
|
262
266
|
}
|
|
263
267
|
}
|
|
264
|
-
constructor(thyTranslate, ngZone, cdr) {
|
|
265
|
-
this.thyTranslate = thyTranslate;
|
|
266
|
-
this.ngZone = ngZone;
|
|
267
|
-
this.cdr = cdr;
|
|
268
|
-
this.hostRenderer = useHostRenderer();
|
|
269
|
-
this.hostFocusControl = useHostFocusControl();
|
|
270
|
-
this.destroyRef = inject(DestroyRef);
|
|
271
|
-
this.disabled = false;
|
|
272
|
-
}
|
|
273
268
|
ngOnInit() {
|
|
274
269
|
this.hostFocusControl.focusChanged = (origin) => {
|
|
275
270
|
if (origin) {
|
|
@@ -318,8 +313,8 @@ class ThyInputGroup {
|
|
|
318
313
|
ngOnDestroy() {
|
|
319
314
|
this.hostFocusControl.destroy();
|
|
320
315
|
}
|
|
321
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputGroup, deps: [
|
|
322
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
316
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
317
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyInputGroup, isStandalone: true, selector: "thy-input-group", inputs: { thyAppendText: "thyAppendText", thyAppendTextTranslateKey: "thyAppendTextTranslateKey", thyPrependText: "thyPrependText", thyPrependTextTranslateKey: "thyPrependTextTranslateKey", thySize: "thySize" }, host: { properties: { "class.form-control": "prefixTemplate || suffixTemplate", "class.thy-input-group-with-prefix": "prefixTemplate", "class.thy-input-group-with-suffix": "suffixTemplate", "class.thy-input-group-with-textarea-suffix": "isTextareaSuffix", "class.thy-input-group-with-scroll-bar": "isTextareaSuffix && hasScrollbar", "class.disabled": "this.disabled" }, classAttribute: "thy-input-group" }, queries: [{ propertyName: "appendTemplate", first: true, predicate: ["append"], descendants: true }, { propertyName: "prependTemplate", first: true, predicate: ["prepend"], descendants: true }, { propertyName: "prefixTemplate", first: true, predicate: ["prefix"], descendants: true }, { propertyName: "suffixTemplate", first: true, predicate: ["suffix"], descendants: true }, { propertyName: "inputDirective", first: true, predicate: ThyInputDirective, descendants: true }], ngImport: i0, template: "@if (prependText) {\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">{{ prependText }}</span>\n </div>\n}\n@if (prependTemplate) {\n <div class=\"input-group-prepend\">\n <ng-template *ngTemplateOutlet=\"prependTemplate\"></ng-template>\n </div>\n}\n\n@if (prefixTemplate) {\n <div class=\"input-group-prefix\">\n <ng-template *ngTemplateOutlet=\"prefixTemplate\"></ng-template>\n </div>\n}\n\n<ng-content></ng-content>\n\n@if (appendText) {\n <div class=\"input-group-append\">\n <span class=\"input-group-text\">{{ appendText }}</span>\n </div>\n}\n@if (appendTemplate) {\n <div class=\"input-group-append\">\n <ng-template *ngTemplateOutlet=\"appendTemplate\"></ng-template>\n </div>\n}\n\n@if (suffixTemplate) {\n <div class=\"input-group-suffix\">\n <ng-template *ngTemplateOutlet=\"suffixTemplate\"></ng-template>\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
323
318
|
}
|
|
324
319
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputGroup, decorators: [{
|
|
325
320
|
type: Component,
|
|
@@ -330,8 +325,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
330
325
|
'[class.thy-input-group-with-suffix]': 'suffixTemplate',
|
|
331
326
|
'[class.thy-input-group-with-textarea-suffix]': 'isTextareaSuffix',
|
|
332
327
|
'[class.thy-input-group-with-scroll-bar]': 'isTextareaSuffix && hasScrollbar'
|
|
333
|
-
}, standalone: true, imports: [
|
|
334
|
-
}],
|
|
328
|
+
}, standalone: true, imports: [NgTemplateOutlet], template: "@if (prependText) {\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text\">{{ prependText }}</span>\n </div>\n}\n@if (prependTemplate) {\n <div class=\"input-group-prepend\">\n <ng-template *ngTemplateOutlet=\"prependTemplate\"></ng-template>\n </div>\n}\n\n@if (prefixTemplate) {\n <div class=\"input-group-prefix\">\n <ng-template *ngTemplateOutlet=\"prefixTemplate\"></ng-template>\n </div>\n}\n\n<ng-content></ng-content>\n\n@if (appendText) {\n <div class=\"input-group-append\">\n <span class=\"input-group-text\">{{ appendText }}</span>\n </div>\n}\n@if (appendTemplate) {\n <div class=\"input-group-append\">\n <ng-template *ngTemplateOutlet=\"appendTemplate\"></ng-template>\n </div>\n}\n\n@if (suffixTemplate) {\n <div class=\"input-group-suffix\">\n <ng-template *ngTemplateOutlet=\"suffixTemplate\"></ng-template>\n </div>\n}\n" }]
|
|
329
|
+
}], propDecorators: { disabled: [{
|
|
335
330
|
type: HostBinding,
|
|
336
331
|
args: ['class.disabled']
|
|
337
332
|
}], thyAppendText: [{
|
|
@@ -390,10 +385,10 @@ class ThyInputSearch extends _MixinBase {
|
|
|
390
385
|
this.iconPosition = value || 'before';
|
|
391
386
|
this.updateClasses();
|
|
392
387
|
}
|
|
393
|
-
constructor(
|
|
388
|
+
constructor() {
|
|
394
389
|
super();
|
|
395
|
-
this.cdr =
|
|
396
|
-
this.elementRef =
|
|
390
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
391
|
+
this.elementRef = inject(ElementRef);
|
|
397
392
|
this.hostRenderer = useHostRenderer();
|
|
398
393
|
this.hostFocusControl = useHostFocusControl();
|
|
399
394
|
this.disabled = false;
|
|
@@ -468,8 +463,8 @@ class ThyInputSearch extends _MixinBase {
|
|
|
468
463
|
ngOnDestroy() {
|
|
469
464
|
this.hostFocusControl.destroy();
|
|
470
465
|
}
|
|
471
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputSearch, deps: [
|
|
472
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
466
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputSearch, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
467
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyInputSearch, isStandalone: true, selector: "thy-input-search", inputs: { name: "name", placeholder: "placeholder", thyTheme: "thyTheme", thySearchFocus: ["thySearchFocus", "thySearchFocus", coerceBooleanProperty], thyIconPosition: "thyIconPosition", thySize: "thySize" }, outputs: { clear: "clear", thyClear: "thyClear" }, host: { properties: { "class.thy-input-search-ellipse": "thyTheme === \"ellipse\"", "class.thy-input-search-transparent": "thyTheme === \"transparent\"", "class.thy-input-search-before-with-clear": "searchText && iconPosition === \"before\"", "class.form-control-active": "focused", "attr.tabindex": "tabIndex" }, classAttribute: "thy-input form-control thy-input-search" }, providers: [CUSTOM_INPUT_SEARCH_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "@if (iconPosition === 'before') {\n <thy-icon class=\"input-prepend\" thyIconName=\"search\"></thy-icon>\n}\n<input\n class=\"input-search-control\"\n #input\n thyInput\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [thyAutofocus]=\"autoFocus\"\n [(ngModel)]=\"searchText\"\n (ngModelChange)=\"searchModelChange()\"\n (focus)=\"!focused ? (focused = true) : null\"\n [thySize]=\"thySize\"\n tabindex=\"-1\" />\n@if (iconPosition === 'after') {\n <div class=\"input-append input-append-divider\">\n @if (searchText) {\n <a class=\"close\" href=\"javascript:;\" (click)=\"clearSearchText($event)\">\n <thy-icon thyIconName=\"close\"></thy-icon>\n </a>\n } @else {\n <thy-icon class=\"text-placeholder\" thyIconName=\"search\"></thy-icon>\n }\n </div>\n}\n\n@if (searchText && iconPosition === 'before') {\n <a class=\"close input-append\" href=\"javascript:;\" (click)=\"clearSearchText($event)\">\n <thy-icon thyIconName=\"close\"></thy-icon>\n </a>\n}\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "directive", type: ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
473
468
|
}
|
|
474
469
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputSearch, decorators: [{
|
|
475
470
|
type: Component,
|
|
@@ -480,8 +475,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
480
475
|
'[class.thy-input-search-before-with-clear]': 'searchText && iconPosition === "before"',
|
|
481
476
|
'[class.form-control-active]': 'focused',
|
|
482
477
|
'[attr.tabindex]': 'tabIndex'
|
|
483
|
-
}, standalone: true, imports: [
|
|
484
|
-
}], ctorParameters: () => [
|
|
478
|
+
}, standalone: true, imports: [ThyIcon, ThyInputDirective, ThyAutofocusDirective, FormsModule], template: "@if (iconPosition === 'before') {\n <thy-icon class=\"input-prepend\" thyIconName=\"search\"></thy-icon>\n}\n<input\n class=\"input-search-control\"\n #input\n thyInput\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [thyAutofocus]=\"autoFocus\"\n [(ngModel)]=\"searchText\"\n (ngModelChange)=\"searchModelChange()\"\n (focus)=\"!focused ? (focused = true) : null\"\n [thySize]=\"thySize\"\n tabindex=\"-1\" />\n@if (iconPosition === 'after') {\n <div class=\"input-append input-append-divider\">\n @if (searchText) {\n <a class=\"close\" href=\"javascript:;\" (click)=\"clearSearchText($event)\">\n <thy-icon thyIconName=\"close\"></thy-icon>\n </a>\n } @else {\n <thy-icon class=\"text-placeholder\" thyIconName=\"search\"></thy-icon>\n }\n </div>\n}\n\n@if (searchText && iconPosition === 'before') {\n <a class=\"close input-append\" href=\"javascript:;\" (click)=\"clearSearchText($event)\">\n <thy-icon thyIconName=\"close\"></thy-icon>\n </a>\n}\n" }]
|
|
479
|
+
}], ctorParameters: () => [], propDecorators: { inputElement: [{
|
|
485
480
|
type: ViewChild,
|
|
486
481
|
args: ['input', { static: true }]
|
|
487
482
|
}], name: [{
|
|
@@ -517,9 +512,9 @@ class ThyInputCount {
|
|
|
517
512
|
this.hasInput = true;
|
|
518
513
|
this.thyInput$.next(value);
|
|
519
514
|
}
|
|
520
|
-
constructor(
|
|
521
|
-
this.changeDetectorRef =
|
|
522
|
-
this.inputGroup =
|
|
515
|
+
constructor() {
|
|
516
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
517
|
+
this.inputGroup = inject(ThyInputGroup, { optional: true });
|
|
523
518
|
this.destroyRef = inject(DestroyRef);
|
|
524
519
|
this.hasInput = false;
|
|
525
520
|
this.inputLength = 0;
|
|
@@ -546,7 +541,7 @@ class ThyInputCount {
|
|
|
546
541
|
this.thyInput$.next(this.inputGroup.inputDirective);
|
|
547
542
|
}
|
|
548
543
|
}
|
|
549
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputCount, deps: [
|
|
544
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputCount, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
550
545
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: ThyInputCount, isStandalone: true, selector: "thy-input-count", inputs: { thyInput: "thyInput" }, host: { classAttribute: "thy-input-count text-muted" }, ngImport: i0, template: '{{inputLength}} / {{maxLength}}', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
551
546
|
}
|
|
552
547
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyInputCount, decorators: [{
|
|
@@ -560,9 +555,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
560
555
|
},
|
|
561
556
|
standalone: true
|
|
562
557
|
}]
|
|
563
|
-
}], ctorParameters: () => [
|
|
564
|
-
type: Optional
|
|
565
|
-
}] }], propDecorators: { thyInput: [{
|
|
558
|
+
}], ctorParameters: () => [], propDecorators: { thyInput: [{
|
|
566
559
|
type: Input
|
|
567
560
|
}] } });
|
|
568
561
|
|