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,11 +1,11 @@
|
|
|
1
1
|
import { ThyButtonIcon, ThyButtonModule } from 'ngx-tethys/button';
|
|
2
2
|
import { ThyFlexibleText, ThyFlexibleTextModule } from 'ngx-tethys/flexible-text';
|
|
3
3
|
import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
|
|
4
|
-
import { NgTemplateOutlet,
|
|
4
|
+
import { NgTemplateOutlet, NgClass, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Component, HostBinding, EventEmitter, Output, ContentChild, ViewChild, Input, NgModule } from '@angular/core';
|
|
6
|
+
import { Component, HostBinding, inject, ElementRef, NgZone, EventEmitter, Output, ContentChild, ViewChild, Input, NgModule } from '@angular/core';
|
|
7
7
|
import { useHostRenderer } from '@tethys/cdk/dom';
|
|
8
|
-
import
|
|
8
|
+
import { ThyTranslate } from 'ngx-tethys/core';
|
|
9
9
|
import { htmlElementIsEmpty, coerceBooleanProperty } from 'ngx-tethys/util';
|
|
10
10
|
import { Subject, fromEvent } from 'rxjs';
|
|
11
11
|
import { takeUntil } from 'rxjs/operators';
|
|
@@ -34,6 +34,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
34
34
|
* @order 10
|
|
35
35
|
*/
|
|
36
36
|
class ThyPropertyOperation {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.thyTranslate = inject(ThyTranslate);
|
|
39
|
+
this.elementRef = inject(ElementRef);
|
|
40
|
+
this.ngZone = inject(NgZone);
|
|
41
|
+
this.initialized = false;
|
|
42
|
+
this.hostRenderer = useHostRenderer();
|
|
43
|
+
this.onlyHasTips = false;
|
|
44
|
+
this.showClose = false;
|
|
45
|
+
this.labelHideWhenHasValue = false;
|
|
46
|
+
/**
|
|
47
|
+
* 点击移除图标时的事件回调,此函数只有在thyShowClose为true时才会发生
|
|
48
|
+
*/
|
|
49
|
+
this.thyOnRemove = new EventEmitter();
|
|
50
|
+
/**
|
|
51
|
+
* 点击事件回调
|
|
52
|
+
*/
|
|
53
|
+
this.thyClick = new EventEmitter();
|
|
54
|
+
this._isPropertyOperation = true;
|
|
55
|
+
this.destroy$ = new Subject();
|
|
56
|
+
}
|
|
37
57
|
/**
|
|
38
58
|
* 属性的 Label 文本
|
|
39
59
|
*/
|
|
@@ -106,26 +126,6 @@ class ThyPropertyOperation {
|
|
|
106
126
|
this.onlyHasTips = false;
|
|
107
127
|
}
|
|
108
128
|
}
|
|
109
|
-
constructor(thyTranslate, elementRef, ngZone) {
|
|
110
|
-
this.thyTranslate = thyTranslate;
|
|
111
|
-
this.elementRef = elementRef;
|
|
112
|
-
this.ngZone = ngZone;
|
|
113
|
-
this.initialized = false;
|
|
114
|
-
this.hostRenderer = useHostRenderer();
|
|
115
|
-
this.onlyHasTips = false;
|
|
116
|
-
this.showClose = false;
|
|
117
|
-
this.labelHideWhenHasValue = false;
|
|
118
|
-
/**
|
|
119
|
-
* 点击移除图标时的事件回调,此函数只有在thyShowClose为true时才会发生
|
|
120
|
-
*/
|
|
121
|
-
this.thyOnRemove = new EventEmitter();
|
|
122
|
-
/**
|
|
123
|
-
* 点击事件回调
|
|
124
|
-
*/
|
|
125
|
-
this.thyClick = new EventEmitter();
|
|
126
|
-
this._isPropertyOperation = true;
|
|
127
|
-
this.destroy$ = new Subject();
|
|
128
|
-
}
|
|
129
129
|
ngOnInit() {
|
|
130
130
|
this.setHostClass(true);
|
|
131
131
|
this.ngZone.runOutsideAngular(() => fromEvent(this.elementRef.nativeElement, 'click')
|
|
@@ -148,13 +148,13 @@ class ThyPropertyOperation {
|
|
|
148
148
|
$event.stopPropagation();
|
|
149
149
|
this.thyOnRemove.emit($event);
|
|
150
150
|
}
|
|
151
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyPropertyOperation, deps: [
|
|
152
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
151
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyPropertyOperation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
152
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyPropertyOperation, isStandalone: true, selector: "thy-property-operation", inputs: { thyLabelText: "thyLabelText", thyValue: "thyValue", thyLabelTextTranslateKey: "thyLabelTextTranslateKey", thyIcon: "thyIcon", thyShowClose: ["thyShowClose", "thyShowClose", coerceBooleanProperty], thyLabelHasValue: ["thyLabelHasValue", "thyLabelHasValue", coerceBooleanProperty], thyLabelHideWhenHasValue: ["thyLabelHideWhenHasValue", "thyLabelHideWhenHasValue", coerceBooleanProperty], thyType: "thyType", active: ["thyActive", "active", coerceBooleanProperty], disabled: ["thyDisabled", "disabled", coerceBooleanProperty] }, outputs: { thyOnRemove: "thyOnRemove", thyClick: "thyClick" }, host: { properties: { "class.thy-property-operation": "this._isPropertyOperation", "class.active": "this.active", "class.thy-property-operation-disabled": "this.disabled" } }, queries: [{ propertyName: "operationIcon", first: true, predicate: ["operationIcon"], descendants: true }], viewQueries: [{ propertyName: "contentElement", first: true, predicate: ["contentElement"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"thy-operation-icon\">\n <ng-container *ngTemplateOutlet=\"operationIcon\"></ng-container>\n @if (icon) {\n <button\n [ngClass]=\"{ disabled: disabled }\"\n [thyButtonIcon]=\"icon\"\n [thyShape]=\"onlyHasTips ? 'circle-thick-dashed' : 'circle-thick-solid'\"\n ></button>\n }\n</div>\n<div class=\"thy-operation-content\" [ngClass]=\"{ 'only-has-tips': onlyHasTips }\">\n <div #contentElement>\n <ng-content></ng-content>\n </div>\n @if (value) {\n <span thyFlexibleText [thyTooltipContent]=\"value\">{{ value }}</span>\n }\n\n @if (!value || (!labelHideWhenHasValue && value)) {\n <div class=\"thy-tips\">{{ labelText }}</div>\n }\n</div>\n@if (showClose && !disabled) {\n <span (click)=\"remove($event)\" class=\"close-link close-link-danger\">\n <thy-icon thyIconName=\"close\" class=\" close-link-sm\"></thy-icon>\n </span>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyButtonIcon, selector: "thy-button-icon,[thy-button-icon],[thyButtonIcon]", inputs: ["thySize", "thyIcon", "thyButtonIcon", "thyShape", "thyLight", "thyActive", "thyTheme", "thyColor"] }, { kind: "component", type: ThyFlexibleText, selector: "thy-flexible-text,[thyFlexibleText]", inputs: ["thyTooltipTrigger", "thyContainerClass", "thyTooltipContent", "thyTooltipPlacement", "thyTooltipOffset"], exportAs: ["thyFlexibleText"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] }); }
|
|
153
153
|
}
|
|
154
154
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyPropertyOperation, decorators: [{
|
|
155
155
|
type: Component,
|
|
156
|
-
args: [{ selector: 'thy-property-operation', standalone: true, imports: [NgTemplateOutlet,
|
|
157
|
-
}],
|
|
156
|
+
args: [{ selector: 'thy-property-operation', standalone: true, imports: [NgTemplateOutlet, NgClass, ThyButtonIcon, ThyFlexibleText, ThyIcon], template: "<div class=\"thy-operation-icon\">\n <ng-container *ngTemplateOutlet=\"operationIcon\"></ng-container>\n @if (icon) {\n <button\n [ngClass]=\"{ disabled: disabled }\"\n [thyButtonIcon]=\"icon\"\n [thyShape]=\"onlyHasTips ? 'circle-thick-dashed' : 'circle-thick-solid'\"\n ></button>\n }\n</div>\n<div class=\"thy-operation-content\" [ngClass]=\"{ 'only-has-tips': onlyHasTips }\">\n <div #contentElement>\n <ng-content></ng-content>\n </div>\n @if (value) {\n <span thyFlexibleText [thyTooltipContent]=\"value\">{{ value }}</span>\n }\n\n @if (!value || (!labelHideWhenHasValue && value)) {\n <div class=\"thy-tips\">{{ labelText }}</div>\n }\n</div>\n@if (showClose && !disabled) {\n <span (click)=\"remove($event)\" class=\"close-link close-link-danger\">\n <thy-icon thyIconName=\"close\" class=\" close-link-sm\"></thy-icon>\n </span>\n}\n" }]
|
|
157
|
+
}], propDecorators: { thyOnRemove: [{
|
|
158
158
|
type: Output
|
|
159
159
|
}], thyClick: [{
|
|
160
160
|
type: Output
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-property-operation.mjs","sources":["../../../src/property-operation/group/property-operation-group.component.ts","../../../src/property-operation/group/property-operation-group.component.html","../../../src/property-operation/property-operation.component.ts","../../../src/property-operation/property-operation.component.html","../../../src/property-operation/module.ts","../../../src/property-operation/ngx-tethys-property-operation.ts"],"sourcesContent":["import { Component, HostBinding } from '@angular/core';\n\n/**\n * @name thy-property-operation-group\n */\n@Component({\n selector: 'thy-property-operation-group',\n templateUrl: './property-operation-group.component.html',\n standalone: true\n})\nexport class ThyPropertyOperationGroup {\n @HostBinding('class.thy-property-operation-group') _isPropertyOperationGroup = true;\n\n constructor() {}\n}\n","<ng-content></ng-content>\n","import {\n AfterContentInit,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild,\n OnDestroy,\n NgZone\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyTranslate } from 'ngx-tethys/core';\nimport { coerceBooleanProperty, htmlElementIsEmpty } from 'ngx-tethys/util';\nimport { fromEvent, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyFlexibleText } from 'ngx-tethys/flexible-text';\nimport { ThyButtonIcon } from 'ngx-tethys/button';\nimport { NgTemplateOutlet, NgIf, NgClass } from '@angular/common';\n\ntype ThyPropertyOperationTypes = 'primary' | 'success' | 'warning' | 'danger';\n\n/**\n * 属性操作组件\n * @name thy-property-operation\n * @order 10\n */\n@Component({\n selector: 'thy-property-operation',\n templateUrl: './property-operation.component.html',\n standalone: true,\n imports: [NgTemplateOutlet, NgIf, NgClass, ThyButtonIcon, ThyFlexibleText, ThyIcon]\n})\nexport class ThyPropertyOperation implements OnInit, AfterContentInit, OnDestroy {\n private initialized = false;\n\n private hostRenderer = useHostRenderer();\n\n labelText: string;\n\n onlyHasTips = false;\n\n showClose = false;\n\n type: ThyPropertyOperationTypes;\n\n icon: string;\n\n value: string;\n\n labelHideWhenHasValue = false;\n\n /**\n * 点击移除图标时的事件回调,此函数只有在thyShowClose为true时才会发生\n */\n @Output() thyOnRemove = new EventEmitter();\n\n /**\n * 点击事件回调\n */\n @Output() thyClick = new EventEmitter<Event>();\n\n @HostBinding('class.thy-property-operation') _isPropertyOperation = true;\n\n @ContentChild('operationIcon') operationIcon: TemplateRef<any>;\n\n @ViewChild('contentElement', { static: true }) contentElement: ElementRef;\n\n /**\n * 属性的 Label 文本\n */\n @Input()\n set thyLabelText(value: string) {\n this.labelText = value;\n }\n\n /**\n * 属性的值\n */\n @Input()\n set thyValue(value: string) {\n this.value = value;\n this.setOnlyHasTips();\n }\n\n /**\n * 属性的 Label Translate Key\n */\n @Input()\n set thyLabelTextTranslateKey(value: string) {\n this.labelText = this.thyTranslate.instant(value);\n }\n\n /**\n * 图标\n */\n @Input()\n set thyIcon(value: string) {\n this.icon = value;\n }\n\n /**\n * 当有属性值时是否展示移除图标\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n set thyShowClose(value: boolean) {\n this.showClose = value;\n }\n\n // 支持有值时,label不显示\n @Input({ transform: coerceBooleanProperty })\n set thyLabelHasValue(value: boolean) {\n this.labelHideWhenHasValue = !value;\n }\n\n /**\n * 有值时隐藏 label\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n set thyLabelHideWhenHasValue(value: boolean) {\n this.labelHideWhenHasValue = value;\n }\n\n /**\n * 属性类型\n * @type danger | primary | success | warning | null\n * @default null\n */\n @Input()\n set thyType(value: ThyPropertyOperationTypes) {\n this.type = value;\n this.setHostClass();\n }\n\n /**\n * 激活状态\n * @default false\n */\n @HostBinding('class.active')\n @Input({ alias: 'thyActive', transform: coerceBooleanProperty })\n active: boolean;\n\n /**\n * 禁用操作,添加后property operation中thyClick和thyOnRemove事件将会被禁用\n * @default false\n */\n @HostBinding('class.thy-property-operation-disabled')\n @Input({ alias: 'thyDisabled', transform: coerceBooleanProperty })\n disabled: boolean;\n\n private destroy$ = new Subject<void>();\n\n private setHostClass(first = false) {\n if (!this.initialized && !first) {\n return;\n }\n this.hostRenderer.updateClass(this.type ? [`thy-property-operation-${this.type}`] : []);\n }\n\n private setOnlyHasTips(first = false) {\n if (!this.initialized && !first) {\n return;\n }\n if (this.value) {\n this.onlyHasTips = false;\n } else if (htmlElementIsEmpty(this.contentElement.nativeElement)) {\n this.onlyHasTips = true;\n } else {\n this.onlyHasTips = false;\n }\n }\n\n constructor(\n private thyTranslate: ThyTranslate,\n private elementRef: ElementRef<HTMLElement>,\n private ngZone: NgZone\n ) {}\n\n ngOnInit() {\n this.setHostClass(true);\n\n this.ngZone.runOutsideAngular(() =>\n fromEvent<Event>(this.elementRef.nativeElement, 'click')\n .pipe(takeUntil(this.destroy$))\n .subscribe(event => {\n if (this.disabled || this.thyClick.observers.length === 0) {\n return;\n }\n\n this.ngZone.run(() => this.thyClick.emit(event));\n })\n );\n }\n\n ngAfterContentInit() {\n this.setOnlyHasTips(true);\n this.initialized = true;\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n }\n\n remove($event: Event) {\n $event.stopPropagation();\n this.thyOnRemove.emit($event);\n }\n}\n","<div class=\"thy-operation-icon\">\n <ng-container *ngTemplateOutlet=\"operationIcon\"></ng-container>\n <button\n *ngIf=\"icon\"\n [ngClass]=\"{ disabled: disabled }\"\n [thyButtonIcon]=\"icon\"\n [thyShape]=\"onlyHasTips ? 'circle-thick-dashed' : 'circle-thick-solid'\"\n ></button>\n</div>\n<div class=\"thy-operation-content\" [ngClass]=\"{ 'only-has-tips': onlyHasTips }\">\n <div #contentElement>\n <ng-content></ng-content>\n </div>\n <ng-container *ngIf=\"value\">\n <span thyFlexibleText [thyTooltipContent]=\"value\">{{ value }}</span>\n </ng-container>\n\n <div class=\"thy-tips\" *ngIf=\"!value || (!labelHideWhenHasValue && value)\">{{ labelText }}</div>\n</div>\n<span *ngIf=\"showClose && !disabled\" (click)=\"remove($event)\" class=\"close-link close-link-danger\">\n <thy-icon thyIconName=\"close\" class=\" close-link-sm\"></thy-icon>\n</span>\n","import { ThyButtonModule } from 'ngx-tethys/button';\nimport { ThyFlexibleTextModule } from 'ngx-tethys/flexible-text';\nimport { ThyIconModule } from 'ngx-tethys/icon';\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ThyPropertyOperationGroup } from './group/property-operation-group.component';\nimport { ThyPropertyOperation } from './property-operation.component';\n\n@NgModule({\n imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyFlexibleTextModule, ThyPropertyOperation, ThyPropertyOperationGroup],\n exports: [ThyPropertyOperation, ThyPropertyOperationGroup]\n})\nexport class ThyPropertyOperationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAEA;;AAEG;MAMU,yBAAyB,CAAA;AAGlC,IAAA,WAAA,GAAA;QAFmD,IAAyB,CAAA,yBAAA,GAAG,IAAI,CAAC;KAEpE;8GAHP,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,0LCVtC,6BACA,EAAA,CAAA,CAAA,EAAA;;2FDSa,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBALrC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,8BAA8B,cAE5B,IAAI,EAAA,QAAA,EAAA,6BAAA,EAAA,CAAA;wDAGmC,yBAAyB,EAAA,CAAA;sBAA3E,WAAW;uBAAC,oCAAoC,CAAA;;;AEgBrD;;;;AAIG;MAOU,oBAAoB,CAAA;AAmC7B;;AAEG;IACH,IACI,YAAY,CAAC,KAAa,EAAA;AAC1B,QAAA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qB,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG1F,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAJtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,yBAAyB,CAAC;AAC/H,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,yBAAyB,CAAC;AAC7D,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-property-operation.mjs","sources":["../../../src/property-operation/group/property-operation-group.component.ts","../../../src/property-operation/group/property-operation-group.component.html","../../../src/property-operation/property-operation.component.ts","../../../src/property-operation/property-operation.component.html","../../../src/property-operation/module.ts","../../../src/property-operation/ngx-tethys-property-operation.ts"],"sourcesContent":["import { Component, HostBinding } from '@angular/core';\n\n/**\n * @name thy-property-operation-group\n */\n@Component({\n selector: 'thy-property-operation-group',\n templateUrl: './property-operation-group.component.html',\n standalone: true\n})\nexport class ThyPropertyOperationGroup {\n @HostBinding('class.thy-property-operation-group') _isPropertyOperationGroup = true;\n\n constructor() {}\n}\n","<ng-content></ng-content>\n","import {\n AfterContentInit,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild,\n OnDestroy,\n NgZone,\n inject\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyTranslate } from 'ngx-tethys/core';\nimport { coerceBooleanProperty, htmlElementIsEmpty } from 'ngx-tethys/util';\nimport { fromEvent, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyFlexibleText } from 'ngx-tethys/flexible-text';\nimport { ThyButtonIcon } from 'ngx-tethys/button';\nimport { NgTemplateOutlet, NgClass } from '@angular/common';\n\ntype ThyPropertyOperationTypes = 'primary' | 'success' | 'warning' | 'danger';\n\n/**\n * 属性操作组件\n * @name thy-property-operation\n * @order 10\n */\n@Component({\n selector: 'thy-property-operation',\n templateUrl: './property-operation.component.html',\n standalone: true,\n imports: [NgTemplateOutlet, NgClass, ThyButtonIcon, ThyFlexibleText, ThyIcon]\n})\nexport class ThyPropertyOperation implements OnInit, AfterContentInit, OnDestroy {\n private thyTranslate = inject(ThyTranslate);\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private ngZone = inject(NgZone);\n\n private initialized = false;\n\n private hostRenderer = useHostRenderer();\n\n labelText: string;\n\n onlyHasTips = false;\n\n showClose = false;\n\n type: ThyPropertyOperationTypes;\n\n icon: string;\n\n value: string;\n\n labelHideWhenHasValue = false;\n\n /**\n * 点击移除图标时的事件回调,此函数只有在thyShowClose为true时才会发生\n */\n @Output() thyOnRemove = new EventEmitter();\n\n /**\n * 点击事件回调\n */\n @Output() thyClick = new EventEmitter<Event>();\n\n @HostBinding('class.thy-property-operation') _isPropertyOperation = true;\n\n @ContentChild('operationIcon') operationIcon: TemplateRef<any>;\n\n @ViewChild('contentElement', { static: true }) contentElement: ElementRef;\n\n /**\n * 属性的 Label 文本\n */\n @Input()\n set thyLabelText(value: string) {\n this.labelText = value;\n }\n\n /**\n * 属性的值\n */\n @Input()\n set thyValue(value: string) {\n this.value = value;\n this.setOnlyHasTips();\n }\n\n /**\n * 属性的 Label Translate Key\n */\n @Input()\n set thyLabelTextTranslateKey(value: string) {\n this.labelText = this.thyTranslate.instant(value);\n }\n\n /**\n * 图标\n */\n @Input()\n set thyIcon(value: string) {\n this.icon = value;\n }\n\n /**\n * 当有属性值时是否展示移除图标\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n set thyShowClose(value: boolean) {\n this.showClose = value;\n }\n\n // 支持有值时,label不显示\n @Input({ transform: coerceBooleanProperty })\n set thyLabelHasValue(value: boolean) {\n this.labelHideWhenHasValue = !value;\n }\n\n /**\n * 有值时隐藏 label\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n set thyLabelHideWhenHasValue(value: boolean) {\n this.labelHideWhenHasValue = value;\n }\n\n /**\n * 属性类型\n * @type danger | primary | success | warning | null\n * @default null\n */\n @Input()\n set thyType(value: ThyPropertyOperationTypes) {\n this.type = value;\n this.setHostClass();\n }\n\n /**\n * 激活状态\n * @default false\n */\n @HostBinding('class.active')\n @Input({ alias: 'thyActive', transform: coerceBooleanProperty })\n active: boolean;\n\n /**\n * 禁用操作,添加后property operation中thyClick和thyOnRemove事件将会被禁用\n * @default false\n */\n @HostBinding('class.thy-property-operation-disabled')\n @Input({ alias: 'thyDisabled', transform: coerceBooleanProperty })\n disabled: boolean;\n\n private destroy$ = new Subject<void>();\n\n private setHostClass(first = false) {\n if (!this.initialized && !first) {\n return;\n }\n this.hostRenderer.updateClass(this.type ? [`thy-property-operation-${this.type}`] : []);\n }\n\n private setOnlyHasTips(first = false) {\n if (!this.initialized && !first) {\n return;\n }\n if (this.value) {\n this.onlyHasTips = false;\n } else if (htmlElementIsEmpty(this.contentElement.nativeElement)) {\n this.onlyHasTips = true;\n } else {\n this.onlyHasTips = false;\n }\n }\n\n ngOnInit() {\n this.setHostClass(true);\n\n this.ngZone.runOutsideAngular(() =>\n fromEvent<Event>(this.elementRef.nativeElement, 'click')\n .pipe(takeUntil(this.destroy$))\n .subscribe(event => {\n if (this.disabled || this.thyClick.observers.length === 0) {\n return;\n }\n\n this.ngZone.run(() => this.thyClick.emit(event));\n })\n );\n }\n\n ngAfterContentInit() {\n this.setOnlyHasTips(true);\n this.initialized = true;\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n }\n\n remove($event: Event) {\n $event.stopPropagation();\n this.thyOnRemove.emit($event);\n }\n}\n","<div class=\"thy-operation-icon\">\n <ng-container *ngTemplateOutlet=\"operationIcon\"></ng-container>\n @if (icon) {\n <button\n [ngClass]=\"{ disabled: disabled }\"\n [thyButtonIcon]=\"icon\"\n [thyShape]=\"onlyHasTips ? 'circle-thick-dashed' : 'circle-thick-solid'\"\n ></button>\n }\n</div>\n<div class=\"thy-operation-content\" [ngClass]=\"{ 'only-has-tips': onlyHasTips }\">\n <div #contentElement>\n <ng-content></ng-content>\n </div>\n @if (value) {\n <span thyFlexibleText [thyTooltipContent]=\"value\">{{ value }}</span>\n }\n\n @if (!value || (!labelHideWhenHasValue && value)) {\n <div class=\"thy-tips\">{{ labelText }}</div>\n }\n</div>\n@if (showClose && !disabled) {\n <span (click)=\"remove($event)\" class=\"close-link close-link-danger\">\n <thy-icon thyIconName=\"close\" class=\" close-link-sm\"></thy-icon>\n </span>\n}\n","import { ThyButtonModule } from 'ngx-tethys/button';\nimport { ThyFlexibleTextModule } from 'ngx-tethys/flexible-text';\nimport { ThyIconModule } from 'ngx-tethys/icon';\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ThyPropertyOperationGroup } from './group/property-operation-group.component';\nimport { ThyPropertyOperation } from './property-operation.component';\n\n@NgModule({\n imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyFlexibleTextModule, ThyPropertyOperation, ThyPropertyOperationGroup],\n exports: [ThyPropertyOperation, ThyPropertyOperationGroup]\n})\nexport class ThyPropertyOperationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAEA;;AAEG;MAMU,yBAAyB,CAAA;AAGlC,IAAA,WAAA,GAAA;QAFmD,IAAyB,CAAA,yBAAA,GAAG,IAAI,CAAC;KAEpE;8GAHP,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,0LCVtC,6BACA,EAAA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import { numberAttribute, Component, ChangeDetectionStrategy, Input, HostBinding, EventEmitter, Output, ContentChild, ViewChild, NgModule } from '@angular/core';
|
|
4
|
-
import
|
|
3
|
+
import { numberAttribute, Component, ChangeDetectionStrategy, Input, HostBinding, inject, ChangeDetectorRef, NgZone, EventEmitter, Output, ContentChild, ViewChild, NgModule } from '@angular/core';
|
|
4
|
+
import { ThyClickDispatcher } from 'ngx-tethys/core';
|
|
5
5
|
import { ThyFlexibleText, ThyFlexibleTextModule } from 'ngx-tethys/flexible-text';
|
|
6
6
|
import { takeUntil, delay, take, filter } from 'rxjs/operators';
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
7
|
+
import { OverlayOutsideClickDispatcher } from '@angular/cdk/overlay';
|
|
8
|
+
import { NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
9
9
|
import { coerceBooleanProperty } from 'ngx-tethys/util';
|
|
10
10
|
import { ThyTooltipModule } from 'ngx-tethys/tooltip';
|
|
11
11
|
|
|
@@ -73,12 +73,12 @@ class ThyPropertyItem {
|
|
|
73
73
|
get gridColumn() {
|
|
74
74
|
return `span ${Math.min(this.thySpan, this.parent.thyColumn)}`;
|
|
75
75
|
}
|
|
76
|
-
constructor(
|
|
77
|
-
this.cdr =
|
|
78
|
-
this.clickDispatcher =
|
|
79
|
-
this.ngZone =
|
|
80
|
-
this.overlayOutsideClickDispatcher =
|
|
81
|
-
this.parent =
|
|
76
|
+
constructor() {
|
|
77
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
78
|
+
this.clickDispatcher = inject(ThyClickDispatcher);
|
|
79
|
+
this.ngZone = inject(NgZone);
|
|
80
|
+
this.overlayOutsideClickDispatcher = inject(OverlayOutsideClickDispatcher);
|
|
81
|
+
this.parent = inject(ThyProperties);
|
|
82
82
|
/**
|
|
83
83
|
* 设置跨列的数量
|
|
84
84
|
* @type number
|
|
@@ -188,8 +188,8 @@ class ThyPropertyItem {
|
|
|
188
188
|
this.eventDestroy$.next();
|
|
189
189
|
this.eventDestroy$.complete();
|
|
190
190
|
}
|
|
191
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyPropertyItem, deps: [
|
|
192
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyPropertyItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
192
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyPropertyItem, isStandalone: true, selector: "thy-property-item", inputs: { thyLabelText: "thyLabelText", thyEditable: ["thyEditable", "thyEditable", coerceBooleanProperty], thySpan: ["thySpan", "thySpan", numberAttribute], thyOperationTrigger: "thyOperationTrigger" }, outputs: { thyEditingChange: "thyEditingChange" }, host: { properties: { "class.thy-property-item-operational": "!!operation", "class.thy-property-item-operational-hover": "thyOperationTrigger === 'hover'", "style.grid-column": "this.gridColumn" }, classAttribute: "thy-property-item" }, queries: [{ propertyName: "label", first: true, predicate: ["label"], descendants: true, static: true }, { propertyName: "editor", first: true, predicate: ["editor"], descendants: true, static: true }, { propertyName: "operation", first: true, predicate: ["operation"], descendants: true, static: true }], viewQueries: [{ propertyName: "content", first: true, predicate: ["contentTemplate"], descendants: true, static: true }, { propertyName: "itemContent", first: true, predicate: ["item"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n<div class=\"thy-property-item-label\">\n @if (thyLabelText) {\n <span thyFlexibleText [thyTooltipContent]=\"thyLabelText\">{{ thyLabelText }}</span>\n }\n @if (label) {\n <span> <ng-template [ngTemplateOutlet]=\"label\"></ng-template></span>\n }\n @if (operation && isVertical) {\n <div class=\"thy-property-item-operation\">\n <ng-template [ngTemplateOutlet]=\"operation\"></ng-template>\n </div>\n }\n</div>\n<div class=\"thy-property-item-wrapper\">\n <div\n #item\n class=\"thy-property-item-content\"\n [class.thy-property-item-content-editable]=\"thyEditable\"\n [class.thy-property-item-content-editing]=\"editing\">\n <div class=\"thy-property-item-content-text\">\n @if (content) {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n }\n </div>\n @if (thyEditable) {\n <div class=\"thy-property-item-content-editor\">\n @if (editor) {\n <ng-template [ngTemplateOutlet]=\"editor\"></ng-template>\n }\n </div>\n }\n </div>\n @if (operation && !isVertical) {\n <div class=\"thy-property-item-operation\">\n <ng-template [ngTemplateOutlet]=\"operation\"></ng-template>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: ThyFlexibleText, selector: "thy-flexible-text,[thyFlexibleText]", inputs: ["thyTooltipTrigger", "thyContainerClass", "thyTooltipContent", "thyTooltipPlacement", "thyTooltipOffset"], exportAs: ["thyFlexibleText"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
193
193
|
}
|
|
194
194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyPropertyItem, decorators: [{
|
|
195
195
|
type: Component,
|
|
@@ -197,8 +197,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
197
197
|
class: 'thy-property-item',
|
|
198
198
|
'[class.thy-property-item-operational]': '!!operation',
|
|
199
199
|
'[class.thy-property-item-operational-hover]': "thyOperationTrigger === 'hover'"
|
|
200
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
201
|
-
}], ctorParameters: () => [
|
|
200
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ThyFlexibleText, NgTemplateOutlet], template: "<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n<div class=\"thy-property-item-label\">\n @if (thyLabelText) {\n <span thyFlexibleText [thyTooltipContent]=\"thyLabelText\">{{ thyLabelText }}</span>\n }\n @if (label) {\n <span> <ng-template [ngTemplateOutlet]=\"label\"></ng-template></span>\n }\n @if (operation && isVertical) {\n <div class=\"thy-property-item-operation\">\n <ng-template [ngTemplateOutlet]=\"operation\"></ng-template>\n </div>\n }\n</div>\n<div class=\"thy-property-item-wrapper\">\n <div\n #item\n class=\"thy-property-item-content\"\n [class.thy-property-item-content-editable]=\"thyEditable\"\n [class.thy-property-item-content-editing]=\"editing\">\n <div class=\"thy-property-item-content-text\">\n @if (content) {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n }\n </div>\n @if (thyEditable) {\n <div class=\"thy-property-item-content-editor\">\n @if (editor) {\n <ng-template [ngTemplateOutlet]=\"editor\"></ng-template>\n }\n </div>\n }\n </div>\n @if (operation && !isVertical) {\n <div class=\"thy-property-item-operation\">\n <ng-template [ngTemplateOutlet]=\"operation\"></ng-template>\n </div>\n }\n</div>\n" }]
|
|
201
|
+
}], ctorParameters: () => [], propDecorators: { thyLabelText: [{
|
|
202
202
|
type: Input
|
|
203
203
|
}], thyEditable: [{
|
|
204
204
|
type: Input,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-property.mjs","sources":["../../../src/property/properties.component.ts","../../../src/property/properties.component.html","../../../src/property/property-item.component.ts","../../../src/property/property-item.component.html","../../../src/property/module.ts","../../../src/property/ngx-tethys-property.ts"],"sourcesContent":["import { BehaviorSubject } from 'rxjs';\n\nimport { ChangeDetectionStrategy, Component, HostBinding, Input, OnInit, numberAttribute } from '@angular/core';\n\nexport type ThyPropertiesLayout = 'horizontal' | 'vertical';\n\n/**\n * 属性列表组件\n * @name thy-properties\n */\n@Component({\n selector: 'thy-properties',\n templateUrl: './properties.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-properties',\n '[class.thy-properties-vertical]': 'layout === \"vertical\"',\n '[class.thy-properties-horizontal]': 'layout === \"horizontal\"',\n '[class.thy-properties-edit-trigger-hover]': 'thyEditTrigger === \"hover\"',\n '[class.thy-properties-edit-trigger-click]': 'thyEditTrigger === \"click\"'\n },\n standalone: true\n})\nexport class ThyProperties implements OnInit {\n layout$ = new BehaviorSubject<ThyPropertiesLayout>('horizontal');\n\n layout: ThyPropertiesLayout = 'horizontal';\n\n /**\n * 展示布局\n * @type \"horizontal\" | \"vertical\"\n * @default horizontal\n */\n @Input() set thyLayout(layout: ThyPropertiesLayout) {\n this.layout = layout;\n this.layout$.next(layout);\n }\n\n /**\n * 设置一行的可以 property-item 的数量\n * @type number\n */\n @Input({ transform: numberAttribute }) thyColumn: number = 1;\n\n /**\n * 设置编辑状态触发方法\n * @type 'hover' | 'click'\n */\n @Input() thyEditTrigger: 'hover' | 'click' = 'hover';\n\n @HostBinding('style.grid-template-columns')\n get gridTemplateColumns() {\n return `repeat(${this.thyColumn}, 1fr)`;\n }\n\n constructor() {}\n\n ngOnInit() {}\n}\n","<ng-content></ng-content>\n","import { ThyClickDispatcher } from 'ngx-tethys/core';\nimport { ThyFlexibleText } from 'ngx-tethys/flexible-text';\nimport { combineLatest, fromEvent, Subject, Subscription, timer } from 'rxjs';\nimport { delay, filter, take, takeUntil } from 'rxjs/operators';\n\nimport { OverlayOutsideClickDispatcher, OverlayRef } from '@angular/cdk/overlay';\nimport { NgIf, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n NgZone,\n numberAttribute,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild\n} from '@angular/core';\n\nimport { ThyProperties } from './properties.component';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport type ThyPropertyItemOperationTrigger = 'hover' | 'always';\n\n/**\n * 属性组件\n * @name thy-property-item\n */\n@Component({\n selector: 'thy-property-item',\n templateUrl: './property-item.component.html',\n host: {\n class: 'thy-property-item',\n '[class.thy-property-item-operational]': '!!operation',\n '[class.thy-property-item-operational-hover]': \"thyOperationTrigger === 'hover'\"\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [NgIf, ThyFlexibleText, NgTemplateOutlet]\n})\nexport class ThyPropertyItem implements OnInit, OnChanges, OnDestroy {\n /**\n * 属性名称\n * @type sting\n * @default thyLabelText\n */\n @Input() thyLabelText: string;\n\n /**\n * 设置属性是否是可编辑的\n * @type sting\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyEditable: boolean;\n\n /**\n * 设置跨列的数量\n * @type number\n */\n @Input({ transform: numberAttribute }) thySpan: number = 1;\n\n /**\n * 设置属性操作现实触发方式,默认 always 一直显示\n * @type 'hover' | 'always'\n */\n @Input() thyOperationTrigger: ThyPropertyItemOperationTrigger = 'always';\n\n @Output() thyEditingChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /**\n * 属性名称自定义模板\n * @type TemplateRef\n */\n @ContentChild('label', { static: true }) label!: TemplateRef<void>;\n\n /**\n * 属性内容编辑模板,只有在 thyEditable 为 true 时生效\n * @type TemplateRef\n */\n @ContentChild('editor', { static: true }) editor!: TemplateRef<void>;\n\n /**\n * 操作区模板\n * @type TemplateRef\n */\n @ContentChild('operation', { static: true }) operation!: TemplateRef<void>;\n\n /**\n * @private\n */\n @ViewChild('contentTemplate', { static: true }) content!: TemplateRef<void>;\n\n /**\n * @private\n */\n @ViewChild('item', { static: true }) itemContent: ElementRef<HTMLElement>;\n\n editing: boolean;\n\n changes$ = new Subject<SimpleChanges>();\n\n private destroy$ = new Subject<void>();\n\n private eventDestroy$ = new Subject<void>();\n\n private originOverlays: OverlayRef[] = [];\n\n private clickEventSubscription: Subscription;\n\n @HostBinding('style.grid-column')\n get gridColumn() {\n return `span ${Math.min(this.thySpan, this.parent.thyColumn)}`;\n }\n\n isVertical = false;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private clickDispatcher: ThyClickDispatcher,\n private ngZone: NgZone,\n private overlayOutsideClickDispatcher: OverlayOutsideClickDispatcher,\n private parent: ThyProperties\n ) {\n this.originOverlays = [...this.overlayOutsideClickDispatcher._attachedOverlays] as OverlayRef[];\n }\n\n ngOnInit() {\n this.subscribeClick();\n this.parent.layout$.pipe(takeUntil(this.destroy$)).subscribe(layout => {\n this.isVertical = layout === 'vertical';\n this.cdr.markForCheck();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.thyEditable && changes.thyEditable.currentValue) {\n this.subscribeClick();\n } else {\n this.setEditing(false);\n this.eventDestroy$.next();\n this.eventDestroy$.complete();\n\n if (this.clickEventSubscription) {\n this.clickEventSubscription.unsubscribe();\n this.clickEventSubscription = null;\n }\n }\n }\n\n setEditing(editing: boolean) {\n this.ngZone.run(() => {\n if (!!this.editing !== !!editing) {\n this.thyEditingChange.emit(editing);\n }\n this.editing = editing;\n this.cdr.markForCheck();\n });\n }\n\n /**\n * @deprecated please use setEditing(editing: boolean)\n */\n setKeepEditing(keep: boolean) {\n this.setEditing(keep);\n }\n\n private hasOverlay() {\n return this.overlayOutsideClickDispatcher._attachedOverlays.length > this.originOverlays.length;\n }\n\n private subscribeClick() {\n if (this.thyEditable === true) {\n this.ngZone.runOutsideAngular(() => {\n if (this.clickEventSubscription) {\n return;\n }\n this.clickEventSubscription = fromEvent(this.itemContent.nativeElement, 'click')\n .pipe(takeUntil(this.eventDestroy$))\n .subscribe(() => {\n this.setEditing(true);\n this.bindEditorBlurEvent(this.itemContent.nativeElement);\n });\n });\n }\n }\n\n private subscribeOverlayDetach() {\n const openedOverlays = this.overlayOutsideClickDispatcher._attachedOverlays.slice(this.originOverlays.length);\n const overlaysDetachments$ = openedOverlays.map(overlay => overlay.detachments());\n if (overlaysDetachments$.length) {\n combineLatest(overlaysDetachments$)\n .pipe(delay(50), take(1), takeUntil(this.destroy$))\n .subscribe(() => {\n this.setEditing(false);\n });\n }\n }\n\n private subscribeDocumentClick(editorElement: HTMLElement) {\n this.clickDispatcher\n .clicked(0)\n .pipe(\n filter(event => {\n return !editorElement.contains(event.target as HTMLElement);\n }),\n take(1),\n takeUntil(this.destroy$)\n )\n .subscribe(() => {\n this.setEditing(false);\n });\n }\n\n private bindEditorBlurEvent(editorElement: HTMLElement) {\n timer(0).subscribe(() => {\n if (this.hasOverlay()) {\n this.subscribeOverlayDetach();\n } else {\n this.subscribeDocumentClick(editorElement);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n\n this.eventDestroy$.next();\n this.eventDestroy$.complete();\n }\n}\n","<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n<div class=\"thy-property-item-label\">\n <span *ngIf=\"thyLabelText\" thyFlexibleText [thyTooltipContent]=\"thyLabelText\">{{ thyLabelText }}</span>\n <ng-container *ngIf=\"label\">\n <span> <ng-template [ngTemplateOutlet]=\"label\"></ng-template></span>\n </ng-container>\n <div class=\"thy-property-item-operation\" *ngIf=\"operation && isVertical\">\n <ng-template [ngTemplateOutlet]=\"operation\"></ng-template>\n </div>\n</div>\n<div class=\"thy-property-item-wrapper\">\n <div\n #item\n class=\"thy-property-item-content\"\n [class.thy-property-item-content-editable]=\"thyEditable\"\n [class.thy-property-item-content-editing]=\"editing\">\n <div class=\"thy-property-item-content-text\">\n <ng-template *ngIf=\"content\" [ngTemplateOutlet]=\"content\"></ng-template>\n </div>\n <div class=\"thy-property-item-content-editor\" *ngIf=\"thyEditable\">\n <ng-template *ngIf=\"editor\" [ngTemplateOutlet]=\"editor\"></ng-template>\n </div>\n </div>\n <div class=\"thy-property-item-operation\" *ngIf=\"operation && !isVertical\">\n <ng-template [ngTemplateOutlet]=\"operation\"></ng-template>\n </div>\n</div>\n","import { ThyFlexibleTextModule } from 'ngx-tethys/flexible-text';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ThyProperties } from './properties.component';\nimport { ThyPropertyItem } from './property-item.component';\nimport { ThyTooltipModule } from 'ngx-tethys/tooltip';\n\n@NgModule({\n imports: [CommonModule, ThyFlexibleTextModule, ThyTooltipModule, ThyProperties, ThyPropertyItem],\n exports: [ThyProperties, ThyPropertyItem]\n})\nexport class ThyPropertyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.ThyProperties"],"mappings":";;;;;;;;;;;AAMA;;;AAGG;MAcU,aAAa,CAAA;AAKtB;;;;AAIG;IACH,IAAa,SAAS,CAAC,MAA2B,EAAA;AAC9C,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAC7B;AAcD,IAAA,IACI,mBAAmB,GAAA;AACnB,QAAA,OAAO,CAAU,OAAA,EAAA,IAAI,CAAC,SAAS,QAAQ,CAAC;KAC3C;AAED,IAAA,WAAA,GAAA;AA/BA,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAsB,YAAY,CAAC,CAAC;QAEjE,IAAM,CAAA,MAAA,GAAwB,YAAY,CAAC;AAY3C;;;AAGG;QACoC,IAAS,CAAA,SAAA,GAAW,CAAC,CAAC;AAE7D;;;AAGG;QACM,IAAc,CAAA,cAAA,GAAsB,OAAO,CAAC;KAOrC;AAEhB,IAAA,QAAQ,MAAK;8GAlCJ,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,SAAA,EAAA,CAAA,WAAA,EAAA,WAAA,EAmBF,eAAe,CAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAA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,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGtF,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,CAAC;AAChG,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,CAAC;AAC5C,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-property.mjs","sources":["../../../src/property/properties.component.ts","../../../src/property/properties.component.html","../../../src/property/property-item.component.ts","../../../src/property/property-item.component.html","../../../src/property/module.ts","../../../src/property/ngx-tethys-property.ts"],"sourcesContent":["import { BehaviorSubject } from 'rxjs';\n\nimport { ChangeDetectionStrategy, Component, HostBinding, Input, OnInit, numberAttribute } from '@angular/core';\n\nexport type ThyPropertiesLayout = 'horizontal' | 'vertical';\n\n/**\n * 属性列表组件\n * @name thy-properties\n */\n@Component({\n selector: 'thy-properties',\n templateUrl: './properties.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-properties',\n '[class.thy-properties-vertical]': 'layout === \"vertical\"',\n '[class.thy-properties-horizontal]': 'layout === \"horizontal\"',\n '[class.thy-properties-edit-trigger-hover]': 'thyEditTrigger === \"hover\"',\n '[class.thy-properties-edit-trigger-click]': 'thyEditTrigger === \"click\"'\n },\n standalone: true\n})\nexport class ThyProperties implements OnInit {\n layout$ = new BehaviorSubject<ThyPropertiesLayout>('horizontal');\n\n layout: ThyPropertiesLayout = 'horizontal';\n\n /**\n * 展示布局\n * @type \"horizontal\" | \"vertical\"\n * @default horizontal\n */\n @Input() set thyLayout(layout: ThyPropertiesLayout) {\n this.layout = layout;\n this.layout$.next(layout);\n }\n\n /**\n * 设置一行的可以 property-item 的数量\n * @type number\n */\n @Input({ transform: numberAttribute }) thyColumn: number = 1;\n\n /**\n * 设置编辑状态触发方法\n * @type 'hover' | 'click'\n */\n @Input() thyEditTrigger: 'hover' | 'click' = 'hover';\n\n @HostBinding('style.grid-template-columns')\n get gridTemplateColumns() {\n return `repeat(${this.thyColumn}, 1fr)`;\n }\n\n constructor() {}\n\n ngOnInit() {}\n}\n","<ng-content></ng-content>\n","import { ThyClickDispatcher } from 'ngx-tethys/core';\nimport { ThyFlexibleText } from 'ngx-tethys/flexible-text';\nimport { combineLatest, fromEvent, Subject, Subscription, timer } from 'rxjs';\nimport { delay, filter, take, takeUntil } from 'rxjs/operators';\n\nimport { OverlayOutsideClickDispatcher, OverlayRef } from '@angular/cdk/overlay';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n NgZone,\n numberAttribute,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n inject\n} from '@angular/core';\n\nimport { ThyProperties } from './properties.component';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport type ThyPropertyItemOperationTrigger = 'hover' | 'always';\n\n/**\n * 属性组件\n * @name thy-property-item\n */\n@Component({\n selector: 'thy-property-item',\n templateUrl: './property-item.component.html',\n host: {\n class: 'thy-property-item',\n '[class.thy-property-item-operational]': '!!operation',\n '[class.thy-property-item-operational-hover]': \"thyOperationTrigger === 'hover'\"\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [ThyFlexibleText, NgTemplateOutlet]\n})\nexport class ThyPropertyItem implements OnInit, OnChanges, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n private clickDispatcher = inject(ThyClickDispatcher);\n private ngZone = inject(NgZone);\n private overlayOutsideClickDispatcher = inject(OverlayOutsideClickDispatcher);\n private parent = inject(ThyProperties);\n\n /**\n * 属性名称\n * @type sting\n * @default thyLabelText\n */\n @Input() thyLabelText: string;\n\n /**\n * 设置属性是否是可编辑的\n * @type sting\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyEditable: boolean;\n\n /**\n * 设置跨列的数量\n * @type number\n */\n @Input({ transform: numberAttribute }) thySpan: number = 1;\n\n /**\n * 设置属性操作现实触发方式,默认 always 一直显示\n * @type 'hover' | 'always'\n */\n @Input() thyOperationTrigger: ThyPropertyItemOperationTrigger = 'always';\n\n @Output() thyEditingChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /**\n * 属性名称自定义模板\n * @type TemplateRef\n */\n @ContentChild('label', { static: true }) label!: TemplateRef<void>;\n\n /**\n * 属性内容编辑模板,只有在 thyEditable 为 true 时生效\n * @type TemplateRef\n */\n @ContentChild('editor', { static: true }) editor!: TemplateRef<void>;\n\n /**\n * 操作区模板\n * @type TemplateRef\n */\n @ContentChild('operation', { static: true }) operation!: TemplateRef<void>;\n\n /**\n * @private\n */\n @ViewChild('contentTemplate', { static: true }) content!: TemplateRef<void>;\n\n /**\n * @private\n */\n @ViewChild('item', { static: true }) itemContent: ElementRef<HTMLElement>;\n\n editing: boolean;\n\n changes$ = new Subject<SimpleChanges>();\n\n private destroy$ = new Subject<void>();\n\n private eventDestroy$ = new Subject<void>();\n\n private originOverlays: OverlayRef[] = [];\n\n private clickEventSubscription: Subscription;\n\n @HostBinding('style.grid-column')\n get gridColumn() {\n return `span ${Math.min(this.thySpan, this.parent.thyColumn)}`;\n }\n\n isVertical = false;\n\n constructor() {\n this.originOverlays = [...this.overlayOutsideClickDispatcher._attachedOverlays] as OverlayRef[];\n }\n\n ngOnInit() {\n this.subscribeClick();\n this.parent.layout$.pipe(takeUntil(this.destroy$)).subscribe(layout => {\n this.isVertical = layout === 'vertical';\n this.cdr.markForCheck();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.thyEditable && changes.thyEditable.currentValue) {\n this.subscribeClick();\n } else {\n this.setEditing(false);\n this.eventDestroy$.next();\n this.eventDestroy$.complete();\n\n if (this.clickEventSubscription) {\n this.clickEventSubscription.unsubscribe();\n this.clickEventSubscription = null;\n }\n }\n }\n\n setEditing(editing: boolean) {\n this.ngZone.run(() => {\n if (!!this.editing !== !!editing) {\n this.thyEditingChange.emit(editing);\n }\n this.editing = editing;\n this.cdr.markForCheck();\n });\n }\n\n /**\n * @deprecated please use setEditing(editing: boolean)\n */\n setKeepEditing(keep: boolean) {\n this.setEditing(keep);\n }\n\n private hasOverlay() {\n return this.overlayOutsideClickDispatcher._attachedOverlays.length > this.originOverlays.length;\n }\n\n private subscribeClick() {\n if (this.thyEditable === true) {\n this.ngZone.runOutsideAngular(() => {\n if (this.clickEventSubscription) {\n return;\n }\n this.clickEventSubscription = fromEvent(this.itemContent.nativeElement, 'click')\n .pipe(takeUntil(this.eventDestroy$))\n .subscribe(() => {\n this.setEditing(true);\n this.bindEditorBlurEvent(this.itemContent.nativeElement);\n });\n });\n }\n }\n\n private subscribeOverlayDetach() {\n const openedOverlays = this.overlayOutsideClickDispatcher._attachedOverlays.slice(this.originOverlays.length);\n const overlaysDetachments$ = openedOverlays.map(overlay => overlay.detachments());\n if (overlaysDetachments$.length) {\n combineLatest(overlaysDetachments$)\n .pipe(delay(50), take(1), takeUntil(this.destroy$))\n .subscribe(() => {\n this.setEditing(false);\n });\n }\n }\n\n private subscribeDocumentClick(editorElement: HTMLElement) {\n this.clickDispatcher\n .clicked(0)\n .pipe(\n filter(event => {\n return !editorElement.contains(event.target as HTMLElement);\n }),\n take(1),\n takeUntil(this.destroy$)\n )\n .subscribe(() => {\n this.setEditing(false);\n });\n }\n\n private bindEditorBlurEvent(editorElement: HTMLElement) {\n timer(0).subscribe(() => {\n if (this.hasOverlay()) {\n this.subscribeOverlayDetach();\n } else {\n this.subscribeDocumentClick(editorElement);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n\n this.eventDestroy$.next();\n this.eventDestroy$.complete();\n }\n}\n","<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n<div class=\"thy-property-item-label\">\n @if (thyLabelText) {\n <span thyFlexibleText [thyTooltipContent]=\"thyLabelText\">{{ thyLabelText }}</span>\n }\n @if (label) {\n <span> <ng-template [ngTemplateOutlet]=\"label\"></ng-template></span>\n }\n @if (operation && isVertical) {\n <div class=\"thy-property-item-operation\">\n <ng-template [ngTemplateOutlet]=\"operation\"></ng-template>\n </div>\n }\n</div>\n<div class=\"thy-property-item-wrapper\">\n <div\n #item\n class=\"thy-property-item-content\"\n [class.thy-property-item-content-editable]=\"thyEditable\"\n [class.thy-property-item-content-editing]=\"editing\">\n <div class=\"thy-property-item-content-text\">\n @if (content) {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n }\n </div>\n @if (thyEditable) {\n <div class=\"thy-property-item-content-editor\">\n @if (editor) {\n <ng-template [ngTemplateOutlet]=\"editor\"></ng-template>\n }\n </div>\n }\n </div>\n @if (operation && !isVertical) {\n <div class=\"thy-property-item-operation\">\n <ng-template [ngTemplateOutlet]=\"operation\"></ng-template>\n </div>\n }\n</div>\n","import { ThyFlexibleTextModule } from 'ngx-tethys/flexible-text';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ThyProperties } from './properties.component';\nimport { ThyPropertyItem } from './property-item.component';\nimport { ThyTooltipModule } from 'ngx-tethys/tooltip';\n\n@NgModule({\n imports: [CommonModule, ThyFlexibleTextModule, ThyTooltipModule, ThyProperties, ThyPropertyItem],\n exports: [ThyProperties, ThyPropertyItem]\n})\nexport class ThyPropertyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAMA;;;AAGG;MAcU,aAAa,CAAA;AAKtB;;;;AAIG;IACH,IAAa,SAAS,CAAC,MAA2B,EAAA;AAC9C,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAC7B;AAcD,IA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CAAA,EAAA;AAAjB,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,iBAAiB,EAHhB,OAAA,EAAA,CAAA,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,CACrF,EAAA,OAAA,EAAA,CAAA,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;AAE/B,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,iBAAiB,YAHhB,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAiB,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGtF,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,CAAC;AAChG,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,CAAC;AAC5C,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { forwardRef, Component, ChangeDetectionStrategy, HostBinding, Input,
|
|
3
|
-
import { NgClass,
|
|
2
|
+
import { inject, ChangeDetectorRef, forwardRef, Component, ChangeDetectionStrategy, HostBinding, Input, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import { NgClass, CommonModule } from '@angular/common';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
5
|
-
import * as i1 from 'ngx-tethys/core';
|
|
6
5
|
import { ThyFormCheckBaseComponent } from 'ngx-tethys/shared';
|
|
7
6
|
import { useHostRenderer } from '@tethys/cdk/dom';
|
|
8
7
|
import { coerceBooleanProperty } from 'ngx-tethys/util';
|
|
@@ -20,19 +19,8 @@ const radioGroupLayoutMap = {
|
|
|
20
19
|
* @order 20
|
|
21
20
|
*/
|
|
22
21
|
class ThyRadioGroup {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* @type sm | md | lg
|
|
26
|
-
* @default md
|
|
27
|
-
*/
|
|
28
|
-
set thySize(size) {
|
|
29
|
-
this._size = size;
|
|
30
|
-
}
|
|
31
|
-
set thyLayout(layout) {
|
|
32
|
-
this._layout = layout;
|
|
33
|
-
}
|
|
34
|
-
constructor(changeDetectorRef) {
|
|
35
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
22
|
+
constructor() {
|
|
23
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
36
24
|
this.thyRadioGroup = true;
|
|
37
25
|
this.isButtonGroup = false;
|
|
38
26
|
this.isButtonGroupOutline = false;
|
|
@@ -46,6 +34,17 @@ class ThyRadioGroup {
|
|
|
46
34
|
this.onChange = () => null;
|
|
47
35
|
this.onTouched = () => null;
|
|
48
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* 大小
|
|
39
|
+
* @type sm | md | lg
|
|
40
|
+
* @default md
|
|
41
|
+
*/
|
|
42
|
+
set thySize(size) {
|
|
43
|
+
this._size = size;
|
|
44
|
+
}
|
|
45
|
+
set thyLayout(layout) {
|
|
46
|
+
this._layout = layout;
|
|
47
|
+
}
|
|
49
48
|
addRadio(radio) {
|
|
50
49
|
this.radios.push(radio);
|
|
51
50
|
radio.thyChecked = radio.thyValue === this._innerValue;
|
|
@@ -103,7 +102,7 @@ class ThyRadioGroup {
|
|
|
103
102
|
}
|
|
104
103
|
this.hostRenderer.updateClass(classNames);
|
|
105
104
|
}
|
|
106
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyRadioGroup, deps: [
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
107
106
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.0", type: ThyRadioGroup, isStandalone: true, selector: "thy-radio-group", inputs: { thySize: "thySize", thyLayout: "thyLayout", thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty] }, host: { properties: { "attr.tabindex": "-1", "class.thy-radio-group": "this.thyRadioGroup", "class.btn-group": "this.isButtonGroup", "class.btn-group-outline-default": "this.isButtonGroupOutline" } }, providers: [
|
|
108
107
|
{
|
|
109
108
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -123,7 +122,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
123
122
|
], host: {
|
|
124
123
|
'[attr.tabindex]': `-1`
|
|
125
124
|
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ng-content></ng-content>\n" }]
|
|
126
|
-
}],
|
|
125
|
+
}], propDecorators: { thyRadioGroup: [{
|
|
127
126
|
type: HostBinding,
|
|
128
127
|
args: ['class.thy-radio-group']
|
|
129
128
|
}], isButtonGroup: [{
|
|
@@ -147,15 +146,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
147
146
|
* @order 10
|
|
148
147
|
*/
|
|
149
148
|
class ThyRadio extends ThyFormCheckBaseComponent {
|
|
149
|
+
constructor() {
|
|
150
|
+
super(...arguments);
|
|
151
|
+
this.thyRadioGroupComponent = inject(ThyRadioGroup, { optional: true });
|
|
152
|
+
}
|
|
150
153
|
set thyChecked(value) {
|
|
151
154
|
this.writeValue(coerceBooleanProperty$1(value));
|
|
152
155
|
this.changeDetectorRef.markForCheck();
|
|
153
156
|
}
|
|
154
|
-
constructor(thyTranslate, thyRadioGroupComponent, changeDetectorRef) {
|
|
155
|
-
super(thyTranslate, changeDetectorRef);
|
|
156
|
-
this.thyTranslate = thyTranslate;
|
|
157
|
-
this.thyRadioGroupComponent = thyRadioGroupComponent;
|
|
158
|
-
}
|
|
159
157
|
ngOnInit() {
|
|
160
158
|
if (this.thyRadioGroupComponent) {
|
|
161
159
|
this.thyRadioGroupComponent.addRadio(this);
|
|
@@ -169,14 +167,14 @@ class ThyRadio extends ThyFormCheckBaseComponent {
|
|
|
169
167
|
this.updateValue(!this._innerValue);
|
|
170
168
|
}
|
|
171
169
|
}
|
|
172
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyRadio, deps:
|
|
173
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
170
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyRadio, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
171
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyRadio, isStandalone: true, selector: "[thy-radio],[thyRadio]", inputs: { thyValue: "thyValue" }, host: { properties: { "attr.tabindex": "-1" } }, providers: [
|
|
174
172
|
{
|
|
175
173
|
provide: NG_VALUE_ACCESSOR,
|
|
176
174
|
useExisting: forwardRef(() => ThyRadio),
|
|
177
175
|
multi: true
|
|
178
176
|
}
|
|
179
|
-
], usesInheritance: true, ngImport: i0, template: "<input\n class=\"form-check-input\"\n [checked]=\"_isChecked\"\n (change)=\"change()\"\n type=\"radio\"\n [attr.tabindex]=\"tabIndex\"\n [disabled]=\"_disabled\"\n [attr.name]=\"name\"\n [ngClass]=\"{ 'form-check-no-label-text': !_labelText }\" />\n<span class=\"form-check-label\"
|
|
177
|
+
], usesInheritance: true, ngImport: i0, template: "<input\n class=\"form-check-input\"\n [checked]=\"_isChecked\"\n (change)=\"change()\"\n type=\"radio\"\n [attr.tabindex]=\"tabIndex\"\n [disabled]=\"_disabled\"\n [attr.name]=\"name\"\n [ngClass]=\"{ 'form-check-no-label-text': !_labelText }\" />\n@if (_labelText) {\n <span class=\"form-check-label\">{{ _labelText }}</span>\n}\n<ng-content></ng-content>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
180
178
|
}
|
|
181
179
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyRadio, decorators: [{
|
|
182
180
|
type: Component,
|
|
@@ -188,10 +186,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
188
186
|
}
|
|
189
187
|
], host: {
|
|
190
188
|
'[attr.tabindex]': `-1`
|
|
191
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgClass
|
|
192
|
-
}],
|
|
193
|
-
type: Optional
|
|
194
|
-
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { thyValue: [{
|
|
189
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgClass], template: "<input\n class=\"form-check-input\"\n [checked]=\"_isChecked\"\n (change)=\"change()\"\n type=\"radio\"\n [attr.tabindex]=\"tabIndex\"\n [disabled]=\"_disabled\"\n [attr.name]=\"name\"\n [ngClass]=\"{ 'form-check-no-label-text': !_labelText }\" />\n@if (_labelText) {\n <span class=\"form-check-label\">{{ _labelText }}</span>\n}\n<ng-content></ng-content>\n" }]
|
|
190
|
+
}], propDecorators: { thyValue: [{
|
|
195
191
|
type: Input
|
|
196
192
|
}] } });
|
|
197
193
|
|
|
@@ -199,6 +195,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
199
195
|
* @name [thy-radio-button],[thyRadioButton]
|
|
200
196
|
*/
|
|
201
197
|
class ThyRadioButton extends ThyRadio {
|
|
198
|
+
constructor() {
|
|
199
|
+
super(...arguments);
|
|
200
|
+
this.isButton = true;
|
|
201
|
+
this.isActive = false;
|
|
202
|
+
}
|
|
202
203
|
get isDisabled() {
|
|
203
204
|
return this._disabled;
|
|
204
205
|
}
|
|
@@ -206,11 +207,6 @@ class ThyRadioButton extends ThyRadio {
|
|
|
206
207
|
this.isActive = !!value;
|
|
207
208
|
this.writeValue(coerceBooleanProperty$1(value));
|
|
208
209
|
}
|
|
209
|
-
constructor(thyTranslate, thyRadioGroupComponent, changeDetectorRef) {
|
|
210
|
-
super(thyTranslate, thyRadioGroupComponent, changeDetectorRef);
|
|
211
|
-
this.isButton = true;
|
|
212
|
-
this.isActive = false;
|
|
213
|
-
}
|
|
214
210
|
ngOnInit() {
|
|
215
211
|
this._isFormCheck = false;
|
|
216
212
|
if (this.thyRadioGroupComponent) {
|
|
@@ -223,7 +219,7 @@ class ThyRadioButton extends ThyRadio {
|
|
|
223
219
|
this.change();
|
|
224
220
|
}
|
|
225
221
|
}
|
|
226
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyRadioButton, deps:
|
|
222
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyRadioButton, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
227
223
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: ThyRadioButton, isStandalone: true, selector: "[thy-radio-button],[thyRadioButton]", inputs: { thyValue: "thyValue" }, host: { listeners: { "click": "click($event)" }, properties: { "attr.tabindex": "tabIndex", "class.btn": "this.isButton", "class.active": "this.isActive", "class.disabled": "this.isDisabled" } }, usesInheritance: true, ngImport: i0, template: "<ng-container> {{ _labelText }}</ng-container>\n<ng-content></ng-content>\n" }); }
|
|
228
224
|
}
|
|
229
225
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyRadioButton, decorators: [{
|
|
@@ -231,9 +227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
231
227
|
args: [{ selector: '[thy-radio-button],[thyRadioButton]', standalone: true, host: {
|
|
232
228
|
'[attr.tabindex]': `tabIndex`
|
|
233
229
|
}, template: "<ng-container> {{ _labelText }}</ng-container>\n<ng-content></ng-content>\n" }]
|
|
234
|
-
}],
|
|
235
|
-
type: Optional
|
|
236
|
-
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { isButton: [{
|
|
230
|
+
}], propDecorators: { isButton: [{
|
|
237
231
|
type: HostBinding,
|
|
238
232
|
args: ['class.btn']
|
|
239
233
|
}], isActive: [{
|