ngx-tethys 17.0.0 → 17.0.2
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 +26 -7
- package/action/action.component.d.ts +3 -0
- package/affix/affix.component.d.ts +2 -0
- package/alert/alert.component.d.ts +1 -0
- package/anchor/anchor.component.d.ts +3 -0
- package/arrow-switcher/arrow-switcher.component.d.ts +1 -0
- package/autocomplete/autocomplete.component.d.ts +2 -3
- package/autocomplete/autocomplete.trigger.directive.d.ts +3 -0
- package/avatar/avatar.component.d.ts +4 -0
- package/back-top/back-top.component.d.ts +1 -0
- package/badge/badge.component.d.ts +5 -0
- package/button/button-icon.component.d.ts +2 -0
- package/button/button.component.d.ts +2 -0
- package/card/card.component.d.ts +3 -0
- package/card/content.component.d.ts +2 -1
- package/carousel/carousel.component.d.ts +5 -0
- package/cascader/cascader-li.component.d.ts +9 -2
- package/cascader/cascader-search-option.component.d.ts +7 -2
- package/cascader/cascader.component.d.ts +23 -2
- package/cascader/styles/cascader.scss +1 -0
- package/cascader/types.d.ts +1 -0
- package/checkbox/checkbox.component.d.ts +1 -0
- package/collapse/collapse-item.component.d.ts +2 -0
- package/collapse/collapse.component.d.ts +1 -0
- package/color-picker/color-picker-panel.component.d.ts +1 -0
- package/color-picker/color-picker.component.d.ts +7 -1
- package/copy/copy.directive.d.ts +1 -0
- package/core/behaviors/decorators.d.ts +6 -0
- package/date-picker/abstract-picker.component.d.ts +8 -1
- package/date-picker/abstract-picker.directive.d.ts +4 -0
- package/date-picker/base-picker.component.d.ts +2 -0
- package/date-picker/lib/calendar/calendar-footer.component.d.ts +1 -0
- package/date-picker/lib/popups/inner-popup.component.d.ts +1 -0
- package/date-picker/picker.component.d.ts +1 -0
- package/date-range/date-range.component.d.ts +2 -0
- package/dialog/body/dialog-body.component.d.ts +2 -1
- package/dialog/footer/dialog-footer.component.d.ts +1 -0
- package/dialog/header/dialog-header.component.d.ts +1 -0
- package/divider/divider.component.d.ts +2 -0
- package/drag-drop/drag-handle.directive.d.ts +1 -0
- package/drag-drop/drag.directive.d.ts +1 -0
- package/drag-drop/drop-container.directive.d.ts +1 -0
- package/dropdown/dropdown-menu-item.directive.d.ts +3 -1
- package/dropdown/dropdown-menu.component.d.ts +1 -0
- package/dropdown/dropdown.directive.d.ts +3 -0
- package/empty/empty.component.d.ts +1 -0
- package/esm2022/action/action.component.mjs +9 -22
- package/esm2022/affix/affix.component.mjs +8 -15
- package/esm2022/alert/alert.component.mjs +5 -10
- package/esm2022/anchor/anchor.component.mjs +10 -20
- package/esm2022/arrow-switcher/arrow-switcher.component.mjs +5 -11
- package/esm2022/autocomplete/autocomplete.component.mjs +5 -23
- package/esm2022/autocomplete/autocomplete.trigger.directive.mjs +9 -20
- package/esm2022/avatar/avatar.component.mjs +14 -30
- package/esm2022/back-top/back-top.component.mjs +6 -10
- package/esm2022/badge/badge.component.mjs +15 -37
- package/esm2022/button/button-icon.component.mjs +9 -20
- package/esm2022/button/button.component.mjs +7 -16
- package/esm2022/card/card.component.mjs +6 -20
- package/esm2022/card/content.component.mjs +5 -6
- package/esm2022/carousel/carousel.component.mjs +13 -30
- package/esm2022/cascader/cascader-li.component.mjs +16 -31
- package/esm2022/cascader/cascader-search-option.component.mjs +12 -21
- package/esm2022/cascader/cascader.component.mjs +32 -52
- package/esm2022/cascader/types.mjs +1 -1
- package/esm2022/checkbox/checkbox.component.mjs +7 -13
- package/esm2022/collapse/collapse-item.component.mjs +8 -15
- package/esm2022/collapse/collapse.component.mjs +5 -10
- package/esm2022/color-picker/color-picker-panel.component.mjs +5 -10
- package/esm2022/color-picker/color-picker.component.mjs +17 -37
- package/esm2022/copy/copy.directive.mjs +5 -10
- package/esm2022/core/behaviors/decorators.mjs +7 -44
- package/esm2022/date-picker/abstract-picker.component.mjs +21 -45
- package/esm2022/date-picker/abstract-picker.directive.mjs +11 -27
- package/esm2022/date-picker/base-picker.component.mjs +8 -15
- package/esm2022/date-picker/lib/calendar/calendar-footer.component.mjs +5 -10
- package/esm2022/date-picker/lib/popups/date-popup.component.mjs +4 -2
- package/esm2022/date-picker/lib/popups/inner-popup.component.mjs +7 -6
- package/esm2022/date-picker/picker.component.mjs +6 -10
- package/esm2022/date-range/date-range.component.mjs +7 -15
- package/esm2022/dialog/body/dialog-body.component.mjs +6 -6
- package/esm2022/dialog/footer/dialog-footer.component.mjs +6 -13
- package/esm2022/dialog/header/dialog-header.component.mjs +6 -10
- package/esm2022/divider/divider.component.mjs +7 -15
- package/esm2022/drag-drop/drag-handle.directive.mjs +5 -13
- package/esm2022/drag-drop/drag.directive.mjs +5 -11
- package/esm2022/drag-drop/drop-container.directive.mjs +5 -10
- package/esm2022/dropdown/dropdown-menu-item.directive.mjs +9 -19
- package/esm2022/dropdown/dropdown-menu.component.mjs +6 -9
- package/esm2022/dropdown/dropdown.directive.mjs +8 -22
- package/esm2022/empty/empty.component.mjs +7 -13
- package/esm2022/flexible-text/flexible-text.component.mjs +4 -11
- package/esm2022/form/form-group-error/form-group-error.component.mjs +5 -10
- package/esm2022/form/form-group-label.directive.mjs +6 -6
- package/esm2022/form/form-group.component.mjs +13 -17
- package/esm2022/icon/icon.component.mjs +6 -20
- package/esm2022/image/image.directive.mjs +7 -15
- package/esm2022/input/input-search.component.mjs +6 -11
- package/esm2022/input/input.component.mjs +7 -15
- package/esm2022/input-number/input-number.component.mjs +12 -25
- package/esm2022/layout/header.component.mjs +9 -19
- package/esm2022/layout/sidebar-header.component.mjs +5 -10
- package/esm2022/layout/sidebar.component.mjs +22 -45
- package/esm2022/list/list.component.mjs +5 -11
- package/esm2022/list/selection/selection-list.mjs +13 -10
- package/esm2022/loading/loading.component.mjs +9 -20
- package/esm2022/menu/group/menu-group.component.mjs +12 -38
- package/esm2022/menu/item/action/menu-item-action.component.mjs +5 -10
- package/esm2022/menu/item/name/menu-item-name.component.mjs +5 -10
- package/esm2022/menu/menu.component.mjs +5 -10
- package/esm2022/nav/icon-nav/icon-nav-link.directive.mjs +6 -6
- package/esm2022/nav/nav-ink-bar.directive.mjs +7 -15
- package/esm2022/nav/nav-item.directive.mjs +10 -20
- package/esm2022/nav/nav.component.mjs +12 -25
- package/esm2022/pagination/pagination.component.mjs +18 -68
- package/esm2022/popover/popover.directive.mjs +12 -33
- package/esm2022/progress/progress-circle.component.mjs +9 -20
- package/esm2022/progress/progress-strip.component.mjs +5 -11
- package/esm2022/progress/progress.component.mjs +11 -23
- package/esm2022/property/properties.component.mjs +5 -10
- package/esm2022/property/property-item.component.mjs +8 -15
- package/esm2022/property-operation/property-operation.component.mjs +16 -37
- package/esm2022/radio/group/radio-group.component.mjs +6 -21
- package/esm2022/rate/rate-item.component.mjs +5 -10
- package/esm2022/rate/rate.component.mjs +16 -25
- package/esm2022/resizable/resizable.directive.mjs +24 -62
- package/esm2022/resizable/resize-handle.component.mjs +6 -10
- package/esm2022/resizable/resize-handles.component.mjs +5 -10
- package/esm2022/segment/segment-item.component.mjs +5 -10
- package/esm2022/segment/segment.component.mjs +7 -16
- package/esm2022/select/custom-select/custom-select.component.mjs +30 -65
- package/esm2022/select/native-select/native-select.component.mjs +6 -10
- package/esm2022/shared/base-form-check.component.mjs +10 -20
- package/esm2022/shared/directives/thy-autofocus.directive.mjs +10 -15
- package/esm2022/shared/directives/thy-scroll.directive.mjs +6 -13
- package/esm2022/shared/directives/thy-show.mjs +5 -11
- package/esm2022/shared/option/group/option-group.component.mjs +5 -10
- package/esm2022/shared/option/list-option/list-option.component.mjs +6 -13
- package/esm2022/shared/option/option.component.mjs +5 -11
- package/esm2022/shared/select/select-control/select-control.component.mjs +17 -44
- package/esm2022/skeleton/skeleton-circle.component.mjs +6 -9
- package/esm2022/skeleton/skeleton-rectangle.component.mjs +6 -9
- package/esm2022/skeleton/skeleton.component.mjs +5 -10
- package/esm2022/skeleton/stylized/bullet-list.component.mjs +6 -9
- package/esm2022/skeleton/stylized/list.component.mjs +6 -9
- package/esm2022/skeleton/stylized/paragraph.component.mjs +6 -9
- package/esm2022/slide/slide-body/slide-body-section.component.mjs +6 -6
- package/esm2022/slider/slider.component.mjs +18 -35
- package/esm2022/space/space.component.mjs +6 -10
- package/esm2022/stepper/step-header.component.mjs +9 -20
- package/esm2022/stepper/stepper.component.mjs +7 -16
- package/esm2022/switch/switch.component.mjs +12 -17
- package/esm2022/table/table-column.component.mjs +9 -31
- package/esm2022/table/table-skeleton.component.mjs +8 -14
- package/esm2022/table/table.component.mjs +32 -83
- package/esm2022/tabs/tab.component.mjs +5 -10
- package/esm2022/tabs/tabs.component.mjs +8 -15
- package/esm2022/tag/tag.component.mjs +6 -10
- package/esm2022/time-picker/time-picker-panel.component.mjs +8 -15
- package/esm2022/time-picker/time-picker.component.mjs +20 -46
- package/esm2022/timeline/timeline.component.mjs +5 -10
- package/esm2022/tooltip/tooltip.directive.mjs +11 -34
- package/esm2022/tree/tree-node.component.mjs +17 -40
- package/esm2022/tree/tree.component.mjs +19 -47
- package/esm2022/tree-select/tree-select.component.mjs +18 -40
- package/esm2022/upload/file-select-base.mjs +7 -6
- package/esm2022/upload/file-select.component.mjs +11 -26
- package/esm2022/version.mjs +2 -2
- package/esm2022/vote/vote.component.mjs +11 -33
- package/esm2022/watermark/watermark.directive.mjs +6 -10
- package/fesm2022/ngx-tethys-action.mjs +9 -21
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +6 -14
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-alert.mjs +4 -9
- package/fesm2022/ngx-tethys-alert.mjs.map +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +8 -19
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +4 -10
- package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
- package/fesm2022/ngx-tethys-autocomplete.mjs +14 -39
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +14 -29
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +5 -9
- package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
- package/fesm2022/ngx-tethys-badge.mjs +14 -36
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-button.mjs +13 -30
- package/fesm2022/ngx-tethys-button.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +8 -23
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +12 -29
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +55 -95
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-checkbox.mjs +5 -12
- package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-tethys-collapse.mjs +10 -20
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +19 -42
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +4 -9
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-core.mjs +6 -43
- package/fesm2022/ngx-tethys-core.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +48 -94
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-range.mjs +6 -14
- package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dialog.mjs +13 -21
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +6 -14
- package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-drag-drop.mjs +10 -25
- package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dropdown.mjs +19 -42
- package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +5 -12
- package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
- package/fesm2022/ngx-tethys-flexible-text.mjs +3 -10
- package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +19 -25
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-icon.mjs +5 -19
- package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +7 -14
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +11 -24
- package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input.mjs +10 -21
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-layout.mjs +31 -64
- package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +16 -18
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +8 -19
- package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +20 -55
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +28 -55
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +17 -67
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +11 -32
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +20 -45
- package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property-operation.mjs +14 -36
- package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +10 -21
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +5 -19
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-rate.mjs +18 -30
- package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
- package/fesm2022/ngx-tethys-resizable.mjs +29 -73
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-segment.mjs +10 -21
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +32 -70
- package/fesm2022/ngx-tethys-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-shared.mjs +49 -105
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +20 -38
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slide.mjs +6 -5
- package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +17 -34
- package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-space.mjs +5 -9
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs +13 -31
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +11 -16
- package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs +43 -120
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +10 -20
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tag.mjs +5 -9
- package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +24 -55
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +4 -9
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tooltip.mjs +10 -33
- package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree-select.mjs +17 -39
- package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree.mjs +33 -82
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +15 -28
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-vote.mjs +10 -32
- package/fesm2022/ngx-tethys-vote.mjs.map +1 -1
- package/fesm2022/ngx-tethys-watermark.mjs +5 -9
- 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 -0
- package/form/form-group-error/form-group-error.component.d.ts +1 -0
- package/form/form-group-label.directive.d.ts +2 -1
- package/form/form-group.component.d.ts +5 -2
- package/icon/icon.component.d.ts +3 -0
- package/image/image.directive.d.ts +2 -0
- package/input/input-search.component.d.ts +1 -0
- package/input/input.component.d.ts +2 -0
- package/input-number/input-number.component.d.ts +4 -0
- package/layout/header.component.d.ts +5 -2
- package/layout/sidebar-header.component.d.ts +1 -0
- package/layout/sidebar.component.d.ts +14 -4
- package/list/list.component.d.ts +1 -0
- package/list/selection/selection-list.d.ts +4 -1
- package/loading/loading.component.d.ts +4 -2
- package/menu/group/menu-group.component.d.ts +6 -0
- package/menu/item/action/menu-item-action.component.d.ts +1 -0
- package/menu/item/name/menu-item-name.component.d.ts +1 -0
- package/menu/menu.component.d.ts +1 -0
- package/nav/icon-nav/icon-nav-link.directive.d.ts +2 -1
- package/nav/nav-ink-bar.directive.d.ts +2 -0
- package/nav/nav-item.directive.d.ts +3 -0
- package/nav/nav.component.d.ts +4 -0
- package/package.json +7 -7
- package/pagination/pagination.component.d.ts +11 -0
- package/popover/popover.directive.d.ts +5 -0
- package/progress/progress-circle.component.d.ts +3 -0
- package/progress/progress-strip.component.d.ts +1 -0
- package/progress/progress.component.d.ts +3 -0
- package/property/properties.component.d.ts +1 -0
- package/property/property-item.component.d.ts +2 -0
- package/property-operation/property-operation.component.d.ts +5 -0
- package/radio/group/radio-group.component.d.ts +2 -2
- package/rate/rate-item.component.d.ts +1 -0
- package/rate/rate.component.d.ts +5 -1
- package/resizable/resizable.directive.d.ts +10 -1
- package/resizable/resize-handle.component.d.ts +1 -0
- package/resizable/resize-handles.component.d.ts +1 -0
- package/resizable/styles/resizable.scss +1 -0
- package/schematics/dependencies.js +1 -1
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/segment-item.component.d.ts +1 -0
- package/segment/segment.component.d.ts +2 -0
- package/select/custom-select/custom-select.component.d.ts +12 -1
- package/select/native-select/native-select.component.d.ts +1 -0
- package/shared/base-form-check.component.d.ts +2 -0
- package/shared/directives/thy-autofocus.directive.d.ts +3 -1
- package/shared/directives/thy-scroll.directive.d.ts +1 -0
- package/shared/directives/thy-show.d.ts +1 -0
- package/shared/option/group/option-group.component.d.ts +1 -0
- package/shared/option/list-option/list-option.component.d.ts +1 -0
- package/shared/option/option.component.d.ts +1 -0
- package/shared/option/styles/select-dropdown.scss +1 -0
- package/shared/select/select-control/select-control.component.d.ts +7 -0
- package/skeleton/skeleton-circle.component.d.ts +1 -0
- package/skeleton/skeleton-rectangle.component.d.ts +1 -0
- package/skeleton/skeleton.component.d.ts +1 -0
- package/skeleton/stylized/bullet-list.component.d.ts +1 -0
- package/skeleton/stylized/list.component.d.ts +1 -0
- package/skeleton/stylized/paragraph.component.d.ts +1 -0
- package/slide/slide-body/slide-body-section.component.d.ts +2 -1
- package/slider/slider.component.d.ts +6 -1
- package/space/space.component.d.ts +1 -0
- package/stepper/step-header.component.d.ts +3 -0
- package/stepper/stepper.component.d.ts +2 -0
- package/switch/switch.component.d.ts +3 -1
- package/table/table-column.component.d.ts +7 -2
- package/table/table-skeleton.component.d.ts +2 -0
- package/table/table.component.d.ts +14 -0
- package/tabs/tab.component.d.ts +1 -0
- package/tabs/tabs.component.d.ts +2 -0
- package/tag/tag.component.d.ts +1 -0
- package/time-picker/time-picker-panel.component.d.ts +2 -0
- package/time-picker/time-picker.component.d.ts +6 -2
- package/timeline/timeline.component.d.ts +1 -0
- package/tooltip/tooltip.directive.d.ts +5 -0
- package/tree/tree-node.component.d.ts +7 -0
- package/tree/tree.component.d.ts +8 -0
- package/tree-select/tree-select.component.d.ts +7 -0
- package/upload/file-select-base.d.ts +1 -0
- package/upload/file-select.component.d.ts +3 -0
- package/vote/vote.component.d.ts +4 -2
- package/watermark/watermark.directive.d.ts +1 -0
|
@@ -2,11 +2,8 @@ import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
|
|
|
2
2
|
import { ThySharedModule } from 'ngx-tethys/shared';
|
|
3
3
|
import { NgIf, NgClass, NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, Component, Input, ContentChild, NgModule } from '@angular/core';
|
|
6
|
-
import { __decorate, __metadata } from 'tslib';
|
|
5
|
+
import { Injectable, booleanAttribute, Component, Input, ContentChild, NgModule } from '@angular/core';
|
|
7
6
|
import * as i1 from 'ngx-tethys/core';
|
|
8
|
-
import { InputBoolean } from 'ngx-tethys/core';
|
|
9
|
-
import { coerceBooleanProperty } from 'ngx-tethys/util';
|
|
10
7
|
import { useHostRenderer } from '@tethys/cdk/dom';
|
|
11
8
|
import * as i3 from '@angular/platform-browser';
|
|
12
9
|
|
|
@@ -196,9 +193,8 @@ class ThyEmpty {
|
|
|
196
193
|
}
|
|
197
194
|
_calculatePosition() {
|
|
198
195
|
const sizeOptions = sizeMap[this.thySize || 'md'];
|
|
199
|
-
const topAuto = coerceBooleanProperty(this.thyTopAuto);
|
|
200
196
|
let marginTop = null;
|
|
201
|
-
if (
|
|
197
|
+
if (this.thyTopAuto) {
|
|
202
198
|
// 选择参考父容器居中
|
|
203
199
|
const containerElement = this.thyContainer ? this.thyContainer.nativeElement : this.elementRef.nativeElement.parentElement;
|
|
204
200
|
// containerElement.height;
|
|
@@ -264,12 +260,8 @@ class ThyEmpty {
|
|
|
264
260
|
this.presetSvg = presetSvg ? this.sanitizer.bypassSecurityTrustHtml(presetSvg) : '';
|
|
265
261
|
}
|
|
266
262
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyEmpty, deps: [{ token: i1.ThyTranslate }, { token: ThyEmptyConfig }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
267
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
263
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.2.3", type: ThyEmpty, isStandalone: true, selector: "thy-empty", inputs: { thyMessage: "thyMessage", thyTranslationKey: "thyTranslationKey", thyTranslationValues: "thyTranslationValues", thyEntityName: "thyEntityName", thyEntityNameTranslateKey: "thyEntityNameTranslateKey", thyIconName: "thyIconName", thySize: "thySize", thyMarginTop: "thyMarginTop", thyTopAuto: ["thyTopAuto", "thyTopAuto", booleanAttribute], thyContainer: "thyContainer", thyImageUrl: "thyImageUrl", thyImageLoading: "thyImageLoading", thyImageFetchPriority: "thyImageFetchPriority", thyDescription: "thyDescription" }, queries: [{ propertyName: "extraTemplateRef", first: true, predicate: ["extra"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"thy-empty-icon\">\n <img\n *ngIf=\"thyImageUrl; else icon\"\n [src]=\"thyImageUrl\"\n [attr.loading]=\"thyImageLoading\"\n [attr.fetchpriority]=\"thyImageFetchPriority\"\n class=\"empty-img\"\n />\n <ng-template #icon>\n <div *ngIf=\"presetSvg; else thyIcon\" [innerHTML]=\"presetSvg\"></div>\n <ng-template #thyIcon>\n <thy-icon class=\"empty-icon\" *ngIf=\"thyIconName\" [thyIconName]=\"thyIconName\"></thy-icon>\n </ng-template>\n </ng-template>\n</div>\n\n<div [ngClass]=\"{ 'thy-empty-text': !thyDescription, 'thy-empty-text-with-extra': thyDescription }\">\n {{ displayText }}\n</div>\n\n<div class=\"thy-empty-description\" *ngIf=\"thyDescription\">\n {{ thyDescription }}\n</div>\n\n<div class=\"thy-empty-extra\" *ngIf=\"extraTemplateRef\">\n <ng-template [ngTemplateOutlet]=\"extraTemplateRef\"></ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
268
264
|
}
|
|
269
|
-
__decorate([
|
|
270
|
-
InputBoolean(),
|
|
271
|
-
__metadata("design:type", Boolean)
|
|
272
|
-
], ThyEmpty.prototype, "thyTopAuto", void 0);
|
|
273
265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyEmpty, decorators: [{
|
|
274
266
|
type: Component,
|
|
275
267
|
args: [{ selector: 'thy-empty', standalone: true, imports: [NgIf, ThyIcon, NgClass, NgTemplateOutlet], template: "<div class=\"thy-empty-icon\">\n <img\n *ngIf=\"thyImageUrl; else icon\"\n [src]=\"thyImageUrl\"\n [attr.loading]=\"thyImageLoading\"\n [attr.fetchpriority]=\"thyImageFetchPriority\"\n class=\"empty-img\"\n />\n <ng-template #icon>\n <div *ngIf=\"presetSvg; else thyIcon\" [innerHTML]=\"presetSvg\"></div>\n <ng-template #thyIcon>\n <thy-icon class=\"empty-icon\" *ngIf=\"thyIconName\" [thyIconName]=\"thyIconName\"></thy-icon>\n </ng-template>\n </ng-template>\n</div>\n\n<div [ngClass]=\"{ 'thy-empty-text': !thyDescription, 'thy-empty-text-with-extra': thyDescription }\">\n {{ displayText }}\n</div>\n\n<div class=\"thy-empty-description\" *ngIf=\"thyDescription\">\n {{ thyDescription }}\n</div>\n\n<div class=\"thy-empty-extra\" *ngIf=\"extraTemplateRef\">\n <ng-template [ngTemplateOutlet]=\"extraTemplateRef\"></ng-template>\n</div>\n" }]
|
|
@@ -290,7 +282,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
290
282
|
}], thyMarginTop: [{
|
|
291
283
|
type: Input
|
|
292
284
|
}], thyTopAuto: [{
|
|
293
|
-
type: Input
|
|
285
|
+
type: Input,
|
|
286
|
+
args: [{ transform: booleanAttribute }]
|
|
294
287
|
}], thyContainer: [{
|
|
295
288
|
type: Input
|
|
296
289
|
}], thyImageUrl: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-empty.mjs","sources":["../../../src/empty/empty.config.ts","../../../src/empty/svgs.ts","../../../src/empty/empty.component.ts","../../../src/empty/empty.component.html","../../../src/empty/empty.module.ts","../../../src/empty/ngx-tethys-empty.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class ThyEmptyConfig {\n noResultTranslateKey = 'common.tips.NO_RESULT';\n noResultWithTargetTranslateKey = 'common.tips.NO_RESULT_TARGET';\n}\n","const defaultSvg = `\n<svg width=\"180px\" height=\"133px\" viewBox=\"0 0 180 133\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>180x133</title>\n <defs>\n <linearGradient x1=\"50%\" y1=\"89.1384987%\" x2=\"50%\" y2=\"-0.00684472949%\" id=\"linearGradient-1\">\n <stop stop-color=\"#EEEEEE\" stop-opacity=\"0\" offset=\"0%\"></stop>\n <stop stop-color=\"#F2F2F2\" offset=\"100%\"></stop>\n </linearGradient>\n </defs>\n <g id=\"180x133\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g id=\"编组-10-03\">\n <path d=\"M5.8105003,110.750582 C5.8105003,110.750582 8.11054753,102.083233 16.8008738,90.5817505 C25.4912,79.0802683 38.8193883,74.4804253 62.5752127,79.6538429 C86.3310371,84.8272606 5.25910485,73.8369831 27.8592405,73.8369831 C50.4593762,73.8369831 76.8415599,98.2945025 98.8638512,85.7770811 C120.886142,73.2596597 125.886574,71.7976069 135.947864,73.8332343 C159.775447,78.6542597 180,112.967947 180,112.967947 L5.8105003,110.750582 Z\" id=\"路径\" fill=\"url(#linearGradient-1)\"></path>\n <path d=\"M7.55352128,0 L86.7672989,0 C90.9389935,0 94.3208202,3.35683765 94.3208202,7.49770673 L94.3208202,115.299902 C94.3208202,118.710832 91.5557157,121.475936 88.1447865,121.475936 L6.17603367,121.475936 C2.76510446,121.475936 -4.02317374e-15,118.710832 0,115.299902 L0,7.49770673 L0,7.49770673 C0,3.35683765 3.38182667,0 7.55352128,0 Z\" id=\"矩形-2\" fill=\"#FAFAFA\"></path>\n <path d=\"M15.8623947,13.8707575 L78.4584255,13.8707575 C80.5442728,13.8707575 82.2351861,15.5491763 82.2351861,17.6196108 L82.2351861,46.811932 C82.2351861,48.8823665 80.5442728,50.5607854 78.4584255,50.5607854 L15.8623947,50.5607854 C13.7765474,50.5607854 12.085634,48.8823665 12.085634,46.811932 L12.085634,17.5971177 C12.0980962,15.5354727 13.7853649,13.8707575 15.8623947,13.8707575 L15.8623947,13.8707575 Z\" id=\"矩形-3\" fill=\"#EEEEEE\"></path>\n <g id=\"_null_\" transform=\"translate(19.717334, 22.627913)\" fill=\"#AAAAAA\" fill-rule=\"nonzero\">\n <g id=\"</null>\">\n <polygon id=\"路径\" points=\"8.57124497 5.1766925 0 8.99556402 0 10.064848 8.57124497 13.9006923 8.57124497 12.6277352 1.59543966 9.53869242 8.57124497 6.43267691\"></polygon>\n <polygon id=\"路径\" points=\"16.0732059 0 10.0478753 15.6149413 11.2699142 15.6149413 17.278272 0\"></polygon>\n <path d=\"M23.065984,4.90512831 C22.4889101,4.90512831 21.9627544,5.04091041 21.4875171,5.3124746 C21.0122797,5.56706604 20.6219062,5.94046681 20.3163965,6.43267691 L20.3163965,5.14274698 L18.9585755,5.14274698 L18.9585755,13.9176651 L20.3163965,13.9176651 L20.3163965,8.62216325 C20.3673148,7.82444342 20.6219062,7.19645122 21.0971435,6.72121387 C21.5384354,6.27992205 22.064591,6.05927614 22.6756104,6.05927614 C24.2031591,6.05927614 24.9839061,6.90791426 24.9839061,8.62216325 L24.9839061,13.9176651 L26.3417271,13.9176651 L26.3417271,8.52032668 C26.3417271,6.11019443 25.2384976,4.90512831 23.065984,4.90512831 Z\" id=\"路径\"></path>\n <path d=\"M28.4463496,5.14274698 L28.4463496,10.5740309 C28.4463496,12.9502176 29.4986609,14.1552838 31.6372289,14.1552838 C32.8253223,14.1552838 33.775797,13.6121554 34.488653,12.5598441 L34.488653,13.9176651 L35.846474,13.9176651 L35.846474,5.14274698 L34.488653,5.14274698 L34.488653,10.4891671 C34.3868164,11.2359686 34.0982795,11.8469881 33.6230421,12.3222254 C33.1647775,12.7635173 32.6386219,13.0011359 32.061548,13.0011359 C31.2638282,13.0011359 30.6867543,12.78049 30.3303262,12.3731437 C29.9738982,11.9657974 29.8041706,11.3378052 29.8041706,10.5061399 L29.8041706,5.14274698 L28.4463496,5.14274698 Z\" id=\"路径\"></path>\n <polygon id=\"路径\" points=\"38.2226607 1.56149413 38.2226607 13.9176651 39.5635089 13.9176651 39.5635089 1.56149413\"></polygon>\n <polygon id=\"路径\" points=\"42.2112599 1.56149413 42.2112599 13.9176651 43.5521081 13.9176651 43.5521081 1.56149413\"></polygon>\n <polygon id=\"路径\" points=\"45.7246217 5.1766925 45.7246217 6.43267691 52.700427 9.53869242 45.7246217 12.6277352 45.7246217 13.9006923 54.2958666 10.064848 54.2958666 8.99556402\"></polygon>\n </g>\n </g>\n <path d=\"M14.9182045,61.702991 L78.2809177,61.702991 C79.8432174,61.702991 81.1097115,62.9601267 81.1097115,64.5108822 L81.1097115,64.5108822 C81.1076309,66.0607814 79.8423548,67.3167082 78.2809177,67.3187734 L14.9182045,67.3187734 C14.1679618,67.3187734 13.448447,67.0229428 12.9179453,66.4963611 C12.3874436,65.9697793 12.0894108,65.2555812 12.0894108,64.5108822 L12.0894108,64.5108822 C12.0894108,63.7661831 12.3874436,63.051985 12.9179453,62.5254033 C13.448447,61.9988216 14.1679618,61.702991 14.9182045,61.702991 Z\" id=\"矩形-4\" fill=\"#EEEEEE\"></path>\n <path d=\"M14.9182045,79.7095517 L78.2809177,79.7095517 C79.8423548,79.7116168 81.1076309,80.9675436 81.1097115,82.5174428 L81.1097115,82.5174428 C81.1097115,84.0681983 79.8432174,85.325334 78.2809177,85.325334 L14.9182045,85.325334 C14.1679618,85.325334 13.448447,85.0295035 12.9179453,84.5029217 C12.3874436,83.97634 12.0894108,83.2621419 12.0894108,82.5174428 L12.0894108,82.5174428 C12.0894108,81.7727438 12.3874436,81.0585457 12.9179453,80.531964 C13.448447,80.0053822 14.1679618,79.7095517 14.9182045,79.7095517 Z\" id=\"矩形备份\" fill=\"#EEEEEE\"></path>\n <path d=\"M14.9182045,98.1007447 L47.4007494,98.1007447 C48.9621864,98.1028098 50.2274626,99.3587366 50.2295431,100.908636 C50.2295431,102.459391 48.963049,103.716527 47.4007494,103.716527 L14.9182045,103.716527 C14.1679618,103.716527 13.448447,103.420696 12.9179453,102.894115 C12.3874436,102.367533 12.0894108,101.653335 12.0894108,100.908636 C12.0894108,100.163937 12.3874436,99.4497387 12.9179453,98.923157 C13.448447,98.3965752 14.1679618,98.1007447 14.9182045,98.1007447 Z\" id=\"矩形备份\" fill=\"#EEEEEE\"></path>\n <g id=\"编组-9\" transform=\"translate(74.475558, 49.058790)\">\n <ellipse id=\"椭圆形\" fill=\"#EDEFF2\" fill-rule=\"nonzero\" cx=\"22.2198147\" cy=\"77.132658\" rx=\"14.8766602\" ry=\"5.97567227\"></ellipse>\n <path d=\"M18.41284,5.91943947 C18.41284,5.91943947 18.4317238,2.02063196 22.6465886,2.23431661 C26.8614535,2.44800125 27.3524324,7.60267463 25.6037922,9.58956691 C24.470764,10.8754236 17.8161118,11.2877975 18.2844301,10.6242504 C18.7527484,9.9607034 18.41284,5.91943947 18.41284,5.91943947 Z\" id=\"路径\" fill=\"#5E5C7D\" fill-rule=\"nonzero\"></path>\n <path d=\"M21.015028,14.7817288 L21.015028,12.5324168 C21.015028,12.5324168 18.1900111,12.8323251 18.1220294,9.90821945 C18.0502709,6.62797275 18.3939562,5.86320667 18.3939562,5.86320667 C18.3939562,5.86320667 20.4522907,5.88569979 20.9810372,4.38240959 C20.9810372,4.38240959 22.16694,7.19779846 24.5689598,7.19779846 C24.6898161,7.12657025 26.3742514,6.31681792 26.7330436,7.84260124 C27.0918359,9.36838456 25.2676605,9.55957609 25.2676605,9.55957609 L25.3583028,14.2418939 L21.015028,14.7817288 Z\" id=\"路径\" fill=\"#FCDBBA\" fill-rule=\"nonzero\"></path>\n <ellipse id=\"椭圆形\" fill=\"#5E5C7D\" fill-rule=\"nonzero\" cx=\"25.6679971\" cy=\"1.97564572\" rx=\"1.99035286\" ry=\"1.97564572\"></ellipse>\n <path d=\"M25.0259478,8.83604739 C24.9899784,8.8353723 24.9589719,8.8107504 24.9504126,8.77606573 C24.9379216,8.73371868 24.961222,8.6891143 25.0032873,8.67484669 C25.4786599,8.51406706 25.8469637,8.13592658 25.9927986,7.65890743 C26.0055919,7.61564839 26.0510096,7.5906028 26.0947711,7.60267463 C26.1365196,7.61534634 26.1612683,7.6579271 26.1514225,7.70014482 C25.9910355,8.2300747 25.5811286,8.64953657 25.0523852,8.82480083 L25.0259478,8.83604739 Z\" id=\"路径\" fill=\"#ED6F4A\" fill-rule=\"nonzero\"></path>\n <path d=\"M25.5886852,8.49490173 L25.5886852,8.49490173 C25.5676127,8.49141077 25.549015,8.47922554 25.5374987,8.46136424 C25.5259823,8.44350294 25.5226245,8.42163624 25.528257,8.4011804 C25.5669781,8.12357401 25.4685598,7.84445657 25.2638838,7.65140972 C25.2336326,7.61849049 25.2336326,7.5681145 25.2638838,7.53519527 C25.2962826,7.50326751 25.3485645,7.50326751 25.3809633,7.53519527 C25.6305204,7.77189226 25.7463943,8.11554248 25.6906577,8.45366434 C25.6709059,8.48976985 25.6282327,8.50702674 25.5886852,8.49490173 Z\" id=\"路径\" fill=\"#ED6F4A\" fill-rule=\"nonzero\"></path>\n <path d=\"M26.0267894,10.0544247 C25.6575944,10.0544247 25.3583028,9.7573446 25.3583028,9.39087768 C25.3583028,9.02441077 25.6575944,8.72733064 26.0267894,8.72733064 C26.3959844,8.72733064 26.695276,9.02441077 26.695276,9.39087768 C26.695276,9.5668613 26.6248464,9.73563709 26.4994808,9.8600763 C26.3741153,9.98451551 26.2040831,10.0544247 26.0267894,10.0544247 L26.0267894,10.0544247 Z M26.0267894,8.99724779 C25.8207212,8.99750393 25.6528971,9.16167512 25.6496331,9.36619519 C25.6463691,9.57071526 25.8088702,9.74008057 26.0148269,9.74681521 C26.2207836,9.75354985 26.3941619,9.59516757 26.4044655,9.39087768 C26.4096418,9.28824585 26.3721482,9.1880042 26.3007514,9.11359151 C26.2293546,9.03917883 26.1303147,8.99711955 26.0267894,8.99724779 L26.0267894,8.99724779 Z\" id=\"形状\" fill=\"#FFD858\" fill-rule=\"nonzero\"></path>\n <path d=\"M21.015028,12.5174214 C21.6913572,12.5156584 22.3458616,12.2796565 22.8656408,11.8501255 L21.015028,14.7817288 L21.015028,12.5174214 Z\" id=\"路径\" fill=\"#E57958\" fill-rule=\"nonzero\"></path>\n <path d=\"M18.2995371,69.0501302 L19.7875808,72.58155 L16.3658357,75.4531717 C16.3658357,75.4531717 14.2772871,78.6097063 17.529078,77.9536569 C20.7128872,77.312603 23.7531795,74.3997439 23.7531795,74.3997439 L22.688133,70.6508906 L18.2995371,69.0501302 Z\" id=\"路径\" fill=\"#575577\" fill-rule=\"nonzero\"></path>\n <path d=\"M23.6851978,72.0529617 L23.9684549,73.9611281 L19.9348745,75.9030341 C19.9348745,75.9030341 17.1249646,78.4522544 20.4371837,78.6134551 C22.8089893,78.7296696 25.3922936,77.6125113 26.6121873,76.9976993 C27.0503761,76.7768162 27.3231217,76.3270548 27.3146648,75.8393036 L27.2617901,72.8102301 L23.6851978,72.0529617 Z\" id=\"路径\" fill=\"#6C6A8E\" fill-rule=\"nonzero\"></path>\n <path d=\"M15.0401927,39.8428136 L29.252143,40.8212643 L27.2655669,74.3959951 L23.7342957,74.0698448 L23.0809161,48.4764229 C23.0809161,48.4764229 23.0809161,46.1821246 21.5928724,46.1258918 C20.1048287,46.069659 19.058666,59.9591608 20.4371837,62.3134407 C21.8157013,64.6677206 23.1375675,72.1579296 23.1375675,72.1579296 L19.6100731,72.0492129 C19.6100731,72.0492129 14.7002843,62.0922583 14.7002843,57.6086297 C14.7002843,53.1250011 15.0401927,39.8428136 15.0401927,39.8428136 Z\" id=\"路径\" fill=\"#6698FF\"></path>\n <path d=\"M15.1799329,40.0040143 L29.6298191,41.1961497 L29.6298191,21.0835513 L30.7326332,22.7255491 L34.0372987,19.3515811 L30.9516853,13.6645705 C29.4332356,12.450527 27.383939,12.1174325 25.5546943,12.7873388 C25.5546943,12.7873388 25.3356422,14.2119031 22.9109619,14.3206199 C21.9354308,14.3605755 20.9704937,14.1070768 20.1425963,13.5933423 C18.2844301,12.502426 16.2449794,14.1556703 15.4178688,15.467769 C14.6839309,16.7904495 14.04043,18.1606223 13.4917208,19.5690146 L16.4640315,20.98983 L15.1799329,40.0040143 Z\" id=\"路径\" fill=\"#FFFFFF\"></path>\n <path d=\"M13.552149,19.5802611 C13.552149,19.5802611 12.0678821,22.8605078 11.3238602,22.6168324 C10.5798384,22.3731569 6.61423973,15.7264399 5.95330661,15.8089146 C5.2923735,15.8913894 -0.0895104068,15.2315912 0.00113184855,16.2175397 C0.0917741039,17.2034881 5.12619603,17.2034881 5.45855097,17.282214 C5.79090591,17.3609399 8.26846089,25.6496547 10.9121933,26.7180779 C13.5559258,27.7865012 16.4489244,20.9748346 16.4489244,20.9748346 L13.552149,19.5802611 Z\" id=\"路径\" fill=\"#FCDBBA\"></path>\n <path d=\"M34.0184149,19.3365857 C34.0184149,19.3365857 35.2609692,23.085439 36.1673917,22.9054941 C37.0738143,22.7255491 41.2924559,16.8361005 43.1921665,16.9073287 C45.0918771,16.9785569 48.8950751,17.769565 48.3172307,18.6505455 C47.7393863,19.531526 43.4414327,18.3431395 43.1090778,18.6505455 C42.7767228,18.9579515 39.1434791,27.5690677 36.4997467,27.7340172 C33.8560142,27.8989668 30.7137494,22.729298 30.7137494,22.729298 L34.0184149,19.3365857 Z\" id=\"路径\" fill=\"#FCDBBA\"></path>\n </g>\n <g id=\"编组-8\" transform=\"translate(146.963723, 46.476171)\" fill-rule=\"nonzero\">\n <path d=\"M8.31779035,0 C8.31779035,0 -9.76156282,29.3122845 7.38870724,29.3122845 C24.5389773,29.3122845 8.31779035,0 8.31779035,0 Z\" id=\"路径\" fill=\"#FAFAFA\"></path>\n <line x1=\"7.25274385\" y1=\"37.0949041\" x2=\"7.63041992\" y2=\"14.088191\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n <line x1=\"5.25483748\" y1=\"19.6327451\" x2=\"7.31317202\" y2=\"26.2007362\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n <line x1=\"10.9728531\" y1=\"16.6074204\" x2=\"7.68329457\" y2=\"22.6580698\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n </g>\n </g>\n </g>\n</svg>\n`;\n\nconst lightSvg = `\n<svg width=\"180px\" height=\"133px\" viewBox=\"0 0 180 133\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>180x133(灰色底)</title>\n <defs>\n <linearGradient x1=\"50%\" y1=\"89.1384987%\" x2=\"50%\" y2=\"-0.00684472949%\" id=\"linearGradient-1\">\n <stop stop-color=\"#EEEEEE\" stop-opacity=\"0\" offset=\"0%\"></stop>\n <stop stop-color=\"#F2F2F2\" offset=\"100%\"></stop>\n </linearGradient>\n </defs>\n <g id=\"180x133(灰色底)\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g id=\"编组-10-03\" transform=\"translate(0.000000, 0.000000)\">\n <path d=\"M5.8105003,110.750582 C5.8105003,110.750582 8.11054753,102.083233 16.8008738,90.5817505 C25.4912,79.0802683 38.8193883,74.4804253 62.5752127,79.6538429 C86.3310371,84.8272606 5.25910485,73.8369831 27.8592405,73.8369831 C50.4593762,73.8369831 76.8415599,98.2945025 98.8638512,85.7770811 C120.886142,73.2596597 125.886574,71.7976069 135.947864,73.8332343 C159.775447,78.6542597 180,112.967947 180,112.967947 L5.8105003,110.750582 Z\" id=\"路径\" fill=\"url(#linearGradient-1)\"></path>\n <path d=\"M7.55352128,0 L86.7672989,0 C90.9389935,0 94.3208202,3.35683765 94.3208202,7.49770673 L94.3208202,115.299902 C94.3208202,118.710832 91.5557157,121.475936 88.1447865,121.475936 L6.17603367,121.475936 C2.76510446,121.475936 -4.02317374e-15,118.710832 0,115.299902 L0,7.49770673 L0,7.49770673 C0,3.35683765 3.38182667,0 7.55352128,0 Z\" id=\"矩形-2\" fill=\"#FEFEFE\"></path>\n <path d=\"M15.8623947,13.8707575 L78.4584255,13.8707575 C80.5442728,13.8707575 82.2351861,15.5491763 82.2351861,17.6196108 L82.2351861,46.811932 C82.2351861,48.8823665 80.5442728,50.5607854 78.4584255,50.5607854 L15.8623947,50.5607854 C13.7765474,50.5607854 12.085634,48.8823665 12.085634,46.811932 L12.085634,17.5971177 C12.0980962,15.5354727 13.7853649,13.8707575 15.8623947,13.8707575 L15.8623947,13.8707575 Z\" id=\"矩形-3\" fill=\"#EEEEEE\"></path>\n <g id=\"_null_\" transform=\"translate(19.717334, 22.627913)\" fill=\"#AAAAAA\" fill-rule=\"nonzero\">\n <g id=\"</null>\">\n <polygon id=\"路径\" points=\"8.57124497 5.1766925 0 8.99556402 0 10.064848 8.57124497 13.9006923 8.57124497 12.6277352 1.59543966 9.53869242 8.57124497 6.43267691\"></polygon>\n <polygon id=\"路径\" points=\"16.0732059 0 10.0478753 15.6149413 11.2699142 15.6149413 17.278272 0\"></polygon>\n <path d=\"M23.065984,4.90512831 C22.4889101,4.90512831 21.9627544,5.04091041 21.4875171,5.3124746 C21.0122797,5.56706604 20.6219062,5.94046681 20.3163965,6.43267691 L20.3163965,5.14274698 L18.9585755,5.14274698 L18.9585755,13.9176651 L20.3163965,13.9176651 L20.3163965,8.62216325 C20.3673148,7.82444342 20.6219062,7.19645122 21.0971435,6.72121387 C21.5384354,6.27992205 22.064591,6.05927614 22.6756104,6.05927614 C24.2031591,6.05927614 24.9839061,6.90791426 24.9839061,8.62216325 L24.9839061,13.9176651 L26.3417271,13.9176651 L26.3417271,8.52032668 C26.3417271,6.11019443 25.2384976,4.90512831 23.065984,4.90512831 Z\" id=\"路径\"></path>\n <path d=\"M28.4463496,5.14274698 L28.4463496,10.5740309 C28.4463496,12.9502176 29.4986609,14.1552838 31.6372289,14.1552838 C32.8253223,14.1552838 33.775797,13.6121554 34.488653,12.5598441 L34.488653,13.9176651 L35.846474,13.9176651 L35.846474,5.14274698 L34.488653,5.14274698 L34.488653,10.4891671 C34.3868164,11.2359686 34.0982795,11.8469881 33.6230421,12.3222254 C33.1647775,12.7635173 32.6386219,13.0011359 32.061548,13.0011359 C31.2638282,13.0011359 30.6867543,12.78049 30.3303262,12.3731437 C29.9738982,11.9657974 29.8041706,11.3378052 29.8041706,10.5061399 L29.8041706,5.14274698 L28.4463496,5.14274698 Z\" id=\"路径\"></path>\n <polygon id=\"路径\" points=\"38.2226607 1.56149413 38.2226607 13.9176651 39.5635089 13.9176651 39.5635089 1.56149413\"></polygon>\n <polygon id=\"路径\" points=\"42.2112599 1.56149413 42.2112599 13.9176651 43.5521081 13.9176651 43.5521081 1.56149413\"></polygon>\n <polygon id=\"路径\" points=\"45.7246217 5.1766925 45.7246217 6.43267691 52.700427 9.53869242 45.7246217 12.6277352 45.7246217 13.9006923 54.2958666 10.064848 54.2958666 8.99556402\"></polygon>\n </g>\n </g>\n <path d=\"M14.9182045,61.702991 L78.2809177,61.702991 C79.8432174,61.702991 81.1097115,62.9601267 81.1097115,64.5108822 L81.1097115,64.5108822 C81.1076309,66.0607814 79.8423548,67.3167082 78.2809177,67.3187734 L14.9182045,67.3187734 C14.1679618,67.3187734 13.448447,67.0229428 12.9179453,66.4963611 C12.3874436,65.9697793 12.0894108,65.2555812 12.0894108,64.5108822 L12.0894108,64.5108822 C12.0894108,63.7661831 12.3874436,63.051985 12.9179453,62.5254033 C13.448447,61.9988216 14.1679618,61.702991 14.9182045,61.702991 Z\" id=\"矩形-4\" fill=\"#EEEEEE\"></path>\n <path d=\"M14.9182045,79.7095517 L78.2809177,79.7095517 C79.8423548,79.7116168 81.1076309,80.9675436 81.1097115,82.5174428 L81.1097115,82.5174428 C81.1097115,84.0681983 79.8432174,85.325334 78.2809177,85.325334 L14.9182045,85.325334 C14.1679618,85.325334 13.448447,85.0295035 12.9179453,84.5029217 C12.3874436,83.97634 12.0894108,83.2621419 12.0894108,82.5174428 L12.0894108,82.5174428 C12.0894108,81.7727438 12.3874436,81.0585457 12.9179453,80.531964 C13.448447,80.0053822 14.1679618,79.7095517 14.9182045,79.7095517 Z\" id=\"矩形备份\" fill=\"#EEEEEE\"></path>\n <path d=\"M14.9182045,98.1007447 L47.4007494,98.1007447 C48.9621864,98.1028098 50.2274626,99.3587366 50.2295431,100.908636 C50.2295431,102.459391 48.963049,103.716527 47.4007494,103.716527 L14.9182045,103.716527 C14.1679618,103.716527 13.448447,103.420696 12.9179453,102.894115 C12.3874436,102.367533 12.0894108,101.653335 12.0894108,100.908636 C12.0894108,100.163937 12.3874436,99.4497387 12.9179453,98.923157 C13.448447,98.3965752 14.1679618,98.1007447 14.9182045,98.1007447 Z\" id=\"矩形备份\" fill=\"#EEEEEE\"></path>\n <g id=\"编组-9\" transform=\"translate(74.475558, 49.058790)\">\n <ellipse id=\"椭圆形\" fill=\"#EDEFF2\" fill-rule=\"nonzero\" cx=\"22.2198147\" cy=\"77.132658\" rx=\"14.8766602\" ry=\"5.97567227\"></ellipse>\n <path d=\"M18.41284,5.91943947 C18.41284,5.91943947 18.4317238,2.02063196 22.6465886,2.23431661 C26.8614535,2.44800125 27.3524324,7.60267463 25.6037922,9.58956691 C24.470764,10.8754236 17.8161118,11.2877975 18.2844301,10.6242504 C18.7527484,9.9607034 18.41284,5.91943947 18.41284,5.91943947 Z\" id=\"路径\" fill=\"#5E5C7D\" fill-rule=\"nonzero\"></path>\n <path d=\"M21.015028,14.7817288 L21.015028,12.5324168 C21.015028,12.5324168 18.1900111,12.8323251 18.1220294,9.90821945 C18.0502709,6.62797275 18.3939562,5.86320667 18.3939562,5.86320667 C18.3939562,5.86320667 20.4522907,5.88569979 20.9810372,4.38240959 C20.9810372,4.38240959 22.16694,7.19779846 24.5689598,7.19779846 C24.6898161,7.12657025 26.3742514,6.31681792 26.7330436,7.84260124 C27.0918359,9.36838456 25.2676605,9.55957609 25.2676605,9.55957609 L25.3583028,14.2418939 L21.015028,14.7817288 Z\" id=\"路径\" fill=\"#FCDBBA\" fill-rule=\"nonzero\"></path>\n <ellipse id=\"椭圆形\" fill=\"#5E5C7D\" fill-rule=\"nonzero\" cx=\"25.6679971\" cy=\"1.97564572\" rx=\"1.99035286\" ry=\"1.97564572\"></ellipse>\n <path d=\"M25.0259478,8.83604739 C24.9899784,8.8353723 24.9589719,8.8107504 24.9504126,8.77606573 C24.9379216,8.73371868 24.961222,8.6891143 25.0032873,8.67484669 C25.4786599,8.51406706 25.8469637,8.13592658 25.9927986,7.65890743 C26.0055919,7.61564839 26.0510096,7.5906028 26.0947711,7.60267463 C26.1365196,7.61534634 26.1612683,7.6579271 26.1514225,7.70014482 C25.9910355,8.2300747 25.5811286,8.64953657 25.0523852,8.82480083 L25.0259478,8.83604739 Z\" id=\"路径\" fill=\"#ED6F4A\" fill-rule=\"nonzero\"></path>\n <path d=\"M25.5886852,8.49490173 L25.5886852,8.49490173 C25.5676127,8.49141077 25.549015,8.47922554 25.5374987,8.46136424 C25.5259823,8.44350294 25.5226245,8.42163624 25.528257,8.4011804 C25.5669781,8.12357401 25.4685598,7.84445657 25.2638838,7.65140972 C25.2336326,7.61849049 25.2336326,7.5681145 25.2638838,7.53519527 C25.2962826,7.50326751 25.3485645,7.50326751 25.3809633,7.53519527 C25.6305204,7.77189226 25.7463943,8.11554248 25.6906577,8.45366434 C25.6709059,8.48976985 25.6282327,8.50702674 25.5886852,8.49490173 Z\" id=\"路径\" fill=\"#ED6F4A\" fill-rule=\"nonzero\"></path>\n <path d=\"M26.0267894,10.0544247 C25.6575944,10.0544247 25.3583028,9.7573446 25.3583028,9.39087768 C25.3583028,9.02441077 25.6575944,8.72733064 26.0267894,8.72733064 C26.3959844,8.72733064 26.695276,9.02441077 26.695276,9.39087768 C26.695276,9.5668613 26.6248464,9.73563709 26.4994808,9.8600763 C26.3741153,9.98451551 26.2040831,10.0544247 26.0267894,10.0544247 L26.0267894,10.0544247 Z M26.0267894,8.99724779 C25.8207212,8.99750393 25.6528971,9.16167512 25.6496331,9.36619519 C25.6463691,9.57071526 25.8088702,9.74008057 26.0148269,9.74681521 C26.2207836,9.75354985 26.3941619,9.59516757 26.4044655,9.39087768 C26.4096418,9.28824585 26.3721482,9.1880042 26.3007514,9.11359151 C26.2293546,9.03917883 26.1303147,8.99711955 26.0267894,8.99724779 L26.0267894,8.99724779 Z\" id=\"形状\" fill=\"#FFD858\" fill-rule=\"nonzero\"></path>\n <path d=\"M21.015028,12.5174214 C21.6913572,12.5156584 22.3458616,12.2796565 22.8656408,11.8501255 L21.015028,14.7817288 L21.015028,12.5174214 Z\" id=\"路径\" fill=\"#E57958\" fill-rule=\"nonzero\"></path>\n <path d=\"M18.2995371,69.0501302 L19.7875808,72.58155 L16.3658357,75.4531717 C16.3658357,75.4531717 14.2772871,78.6097063 17.529078,77.9536569 C20.7128872,77.312603 23.7531795,74.3997439 23.7531795,74.3997439 L22.688133,70.6508906 L18.2995371,69.0501302 Z\" id=\"路径\" fill=\"#575577\" fill-rule=\"nonzero\"></path>\n <path d=\"M23.6851978,72.0529617 L23.9684549,73.9611281 L19.9348745,75.9030341 C19.9348745,75.9030341 17.1249646,78.4522544 20.4371837,78.6134551 C22.8089893,78.7296696 25.3922936,77.6125113 26.6121873,76.9976993 C27.0503761,76.7768162 27.3231217,76.3270548 27.3146648,75.8393036 L27.2617901,72.8102301 L23.6851978,72.0529617 Z\" id=\"路径\" fill=\"#6C6A8E\" fill-rule=\"nonzero\"></path>\n <path d=\"M15.0401927,39.8428136 L29.252143,40.8212643 L27.2655669,74.3959951 L23.7342957,74.0698448 L23.0809161,48.4764229 C23.0809161,48.4764229 23.0809161,46.1821246 21.5928724,46.1258918 C20.1048287,46.069659 19.058666,59.9591608 20.4371837,62.3134407 C21.8157013,64.6677206 23.1375675,72.1579296 23.1375675,72.1579296 L19.6100731,72.0492129 C19.6100731,72.0492129 14.7002843,62.0922583 14.7002843,57.6086297 C14.7002843,53.1250011 15.0401927,39.8428136 15.0401927,39.8428136 Z\" id=\"路径\" fill=\"#6698FF\"></path>\n <path d=\"M15.1799329,40.0040143 L29.6298191,41.1961497 L29.6298191,21.0835513 L30.7326332,22.7255491 L34.0372987,19.3515811 L30.9516853,13.6645705 C29.4332356,12.450527 27.383939,12.1174325 25.5546943,12.7873388 C25.5546943,12.7873388 25.3356422,14.2119031 22.9109619,14.3206199 C21.9354308,14.3605755 20.9704937,14.1070768 20.1425963,13.5933423 C18.2844301,12.502426 16.2449794,14.1556703 15.4178688,15.467769 C14.6839309,16.7904495 14.04043,18.1606223 13.4917208,19.5690146 L16.4640315,20.98983 L15.1799329,40.0040143 Z\" id=\"路径\" fill=\"#FFFFFF\"></path>\n <path d=\"M13.552149,19.5802611 C13.552149,19.5802611 12.0678821,22.8605078 11.3238602,22.6168324 C10.5798384,22.3731569 6.61423973,15.7264399 5.95330661,15.8089146 C5.2923735,15.8913894 -0.0895104068,15.2315912 0.00113184855,16.2175397 C0.0917741039,17.2034881 5.12619603,17.2034881 5.45855097,17.282214 C5.79090591,17.3609399 8.26846089,25.6496547 10.9121933,26.7180779 C13.5559258,27.7865012 16.4489244,20.9748346 16.4489244,20.9748346 L13.552149,19.5802611 Z\" id=\"路径\" fill=\"#FCDBBA\"></path>\n <path d=\"M34.0184149,19.3365857 C34.0184149,19.3365857 35.2609692,23.085439 36.1673917,22.9054941 C37.0738143,22.7255491 41.2924559,16.8361005 43.1921665,16.9073287 C45.0918771,16.9785569 48.8950751,17.769565 48.3172307,18.6505455 C47.7393863,19.531526 43.4414327,18.3431395 43.1090778,18.6505455 C42.7767228,18.9579515 39.1434791,27.5690677 36.4997467,27.7340172 C33.8560142,27.8989668 30.7137494,22.729298 30.7137494,22.729298 L34.0184149,19.3365857 Z\" id=\"路径\" fill=\"#FCDBBA\"></path>\n </g>\n <g id=\"编组-8\" transform=\"translate(146.963723, 46.476171)\" fill-rule=\"nonzero\">\n <path d=\"M8.31779035,0 C8.31779035,0 -9.76156282,29.3122845 7.38870724,29.3122845 C24.5389773,29.3122845 8.31779035,0 8.31779035,0 Z\" id=\"路径\" fill=\"#FAFAFA\"></path>\n <line x1=\"7.25274385\" y1=\"37.0949041\" x2=\"7.63041992\" y2=\"14.088191\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n <line x1=\"5.25483748\" y1=\"19.6327451\" x2=\"7.31317202\" y2=\"26.2007362\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n <line x1=\"10.9728531\" y1=\"16.6074204\" x2=\"7.68329457\" y2=\"22.6580698\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n </g>\n </g>\n </g>\n</svg>`;\n\nexport const PRESET_SVG = {\n default: defaultSvg,\n 'preset-light': lightSvg\n};\n","import { InputBoolean, ThyTranslate } from 'ngx-tethys/core';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n ElementRef,\n OnChanges,\n Input,\n NgZone,\n OnInit,\n TemplateRef,\n SimpleChanges\n} from '@angular/core';\n\nimport { ThyEmptyConfig } from './empty.config';\nimport { PRESET_SVG } from './svgs';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgIf, NgClass, NgTemplateOutlet } from '@angular/common';\n\nconst sizeClassMap = {\n lg: ['thy-empty-state', 'thy-empty-state--lg'],\n md: ['thy-empty-state'],\n sm: ['thy-empty-state', 'thy-empty-state--sm']\n};\n\nconst sizeMap = {\n lg: {\n height: 168, // 空提示的高度\n offsetTop: 30, // 空提示图标和大小之间的空白距离,需要除去,否则会不居中\n defaultMarginTop: 120 // 不自动计算默认的 top 距离\n },\n md: {\n height: 118,\n offsetTop: 20,\n defaultMarginTop: 10\n },\n sm: {\n height: 78,\n offsetTop: 10,\n defaultMarginTop: 10\n }\n};\n\n/** https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading */\nexport type ThyEmptyImageLoading = 'eager' | 'lazy';\n\n/** https://wicg.github.io/priority-hints/#idl-index */\nexport type ThyEmptyImageFetchPriority = 'high' | 'low' | 'auto';\n\n/**\n * 空页面组件\n * @name thy-empty\n * @order 10\n */\n@Component({\n selector: 'thy-empty',\n templateUrl: './empty.component.html',\n standalone: true,\n imports: [NgIf, ThyIcon, NgClass, NgTemplateOutlet]\n})\nexport class ThyEmpty implements OnInit, AfterViewInit, OnChanges {\n /**\n * 显示文本提示信息。同时传入 thyMessage,thyTranslationKey,thyEntityName,thyEntityNameTranslateKey 时优先级最高\n */\n @Input() thyMessage: string;\n\n /**\n * 显示文本提示信息多语言 Key。同时传入 thyTranslationKey,thyEntityName,thyEntityNameTranslateKey 时优先级最高\n */\n @Input() thyTranslationKey: string;\n\n /**\n * 显示文本提示信息多语言 Key 的 Values。传入 thyTranslationKey 后,传入这个才会生效\n */\n @Input() thyTranslationValues: any;\n\n /**\n * 显示默认提示信息,替换默认提示信息的目标对象,比如:没有 {thyEntityName}。同时传入 thyEntityName,thyEntityNameTranslateKey 时优先级较高\n */\n @Input() thyEntityName: string;\n\n /**\n * thyEntityName 的多语言 Key。thyMessage,thyTranslationKey,thyEntityName 均未传入时才会生效\n */\n @Input() thyEntityNameTranslateKey: string;\n\n /**\n * 提示图标名\n */\n @Input() thyIconName: string;\n\n /**\n * 大小\n * @type sm | md | lg\n * @default md\n */\n @Input()\n set thySize(value: string) {\n this.size = value;\n if (this._initialized) {\n this.updateClass();\n }\n }\n\n /**\n * 距上距离\n */\n @Input() thyMarginTop: number | string;\n\n /**\n * 是否自动根据父容器计算高度,垂直居中\n * @default false\n */\n @Input() @InputBoolean() thyTopAuto: boolean;\n\n /**\n * 自动计算高度垂直居中(即 thyTopAuto 为 true)时,支持传入自定义父容器\n */\n @Input() thyContainer: ElementRef;\n\n /**\n * 提示图片链接\n */\n @Input() thyImageUrl: string;\n\n @Input() thyImageLoading?: ThyEmptyImageLoading;\n\n @Input() thyImageFetchPriority?: ThyEmptyImageFetchPriority;\n\n /**\n * 显示文本描述\n */\n @Input() thyDescription: string;\n\n private size: string = 'md';\n\n private _initialized = false;\n\n private hostRenderer = useHostRenderer();\n\n presetSvg: SafeAny;\n\n /**\n * 除提示图片,文本外的其他信息传入模板\n * @type TemplateRef\n */\n @ContentChild('extra') extraTemplateRef: TemplateRef<any>;\n\n get displayText() {\n if (this.thyMessage) {\n return this.thyMessage;\n } else if (this.thyTranslationKey) {\n return this.thyTranslate.instant(this.thyTranslationKey, this.thyTranslationValues);\n } else if (this.thyEntityName) {\n return this.thyTranslate.instant(this.thyEmptyConfig.noResultWithTargetTranslateKey, {\n target: this.thyEntityName\n });\n } else if (this.thyEntityNameTranslateKey) {\n return this.thyTranslate.instant(this.thyEmptyConfig.noResultWithTargetTranslateKey, {\n target: this.thyTranslate.instant(this.thyEntityNameTranslateKey)\n });\n } else {\n return this.thyTranslate.instant(this.thyEmptyConfig.noResultTranslateKey);\n }\n }\n\n private _calculatePosition() {\n const sizeOptions = sizeMap[this.thySize || 'md'];\n const topAuto = coerceBooleanProperty(this.thyTopAuto);\n let marginTop = null;\n if (topAuto) {\n // 选择参考父容器居中\n const containerElement = this.thyContainer ? this.thyContainer.nativeElement : this.elementRef.nativeElement.parentElement;\n // containerElement.height;\n let emptyStateHeight = this.elementRef.nativeElement.offsetHeight;\n // 高度没有自动计算出来使用默认值\n if (emptyStateHeight <= 10) {\n emptyStateHeight = sizeOptions.height;\n }\n marginTop = (containerElement.offsetHeight - emptyStateHeight) / 2 - sizeOptions.offsetTop;\n // marginTop = (containerElement.offsetHeight - emptyStateHeight) / 2;\n if (marginTop < 0) {\n marginTop = 0; // sizeOptions.defaultMarginTop;\n }\n } else {\n if (this.thyMarginTop) {\n marginTop = this.thyMarginTop;\n } else {\n marginTop = 0; // sizeOptions.defaultMarginTop;\n }\n }\n if (marginTop) {\n this.hostRenderer.setStyle('marginTop', marginTop + 'px');\n }\n }\n\n constructor(\n private thyTranslate: ThyTranslate,\n private thyEmptyConfig: ThyEmptyConfig,\n private elementRef: ElementRef,\n private ngZone: NgZone,\n private sanitizer: DomSanitizer\n ) {}\n\n ngOnInit() {\n this.updateClass();\n this._initialized = true;\n this.setPresetSvg(this.thyIconName);\n }\n\n updateClass() {\n const classList = sizeClassMap[this.size] || sizeClassMap['md'];\n if (classList) {\n this.hostRenderer.updateClass(classList);\n }\n }\n\n ngAfterViewInit() {\n this.ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n this._calculatePosition();\n }, 50);\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.thyIconName && changes.thyIconName.currentValue && !changes.thyIconName.firstChange) {\n this.setPresetSvg(changes.thyIconName.currentValue);\n }\n }\n\n setPresetSvg(icon: string) {\n this.presetSvg = '';\n let presetSvg = icon ? PRESET_SVG[icon] : PRESET_SVG.default;\n\n this.presetSvg = presetSvg ? this.sanitizer.bypassSecurityTrustHtml(presetSvg) : '';\n }\n}\n","<div class=\"thy-empty-icon\">\n <img\n *ngIf=\"thyImageUrl; else icon\"\n [src]=\"thyImageUrl\"\n [attr.loading]=\"thyImageLoading\"\n [attr.fetchpriority]=\"thyImageFetchPriority\"\n class=\"empty-img\"\n />\n <ng-template #icon>\n <div *ngIf=\"presetSvg; else thyIcon\" [innerHTML]=\"presetSvg\"></div>\n <ng-template #thyIcon>\n <thy-icon class=\"empty-icon\" *ngIf=\"thyIconName\" [thyIconName]=\"thyIconName\"></thy-icon>\n </ng-template>\n </ng-template>\n</div>\n\n<div [ngClass]=\"{ 'thy-empty-text': !thyDescription, 'thy-empty-text-with-extra': thyDescription }\">\n {{ displayText }}\n</div>\n\n<div class=\"thy-empty-description\" *ngIf=\"thyDescription\">\n {{ thyDescription }}\n</div>\n\n<div class=\"thy-empty-extra\" *ngIf=\"extraTemplateRef\">\n <ng-template [ngTemplateOutlet]=\"extraTemplateRef\"></ng-template>\n</div>\n","import { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThySharedModule } from 'ngx-tethys/shared';\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ThyEmpty } from './empty.component';\nimport { ThyEmptyConfig } from './empty.config';\n\n@NgModule({\n imports: [CommonModule, ThySharedModule, ThyIconModule, ThyEmpty],\n exports: [ThyEmpty],\n providers: [ThyEmptyConfig]\n})\nexport class ThyEmptyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.ThyEmptyConfig"],"mappings":";;;;;;;;;;;;MAGa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;QAEI,IAAoB,CAAA,oBAAA,GAAG,uBAAuB,CAAC;QAC/C,IAA8B,CAAA,8BAAA,GAAG,8BAA8B,CAAC;AACnE,KAAA;8GAHY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;kHAAd,cAAc,EAAA,CAAA,CAAA,EAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;;;ACFX,MAAM,UAAU,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDlB,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDV,CAAC;AAED,MAAM,UAAU,GAAG;AACtB,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,cAAc,EAAE,QAAQ;CAC3B;;ACzFD,MAAM,YAAY,GAAG;AACjB,IAAA,EAAE,EAAE,CAAC,iBAAiB,EAAE,qBAAqB,CAAC;IAC9C,EAAE,EAAE,CAAC,iBAAiB,CAAC;AACvB,IAAA,EAAE,EAAE,CAAC,iBAAiB,EAAE,qBAAqB,CAAC;CACjD,CAAC;AAEF,MAAM,OAAO,GAAG;AACZ,IAAA,EAAE,EAAE;QACA,MAAM,EAAE,GAAG;QACX,SAAS,EAAE,EAAE;QACb,gBAAgB,EAAE,GAAG;AACxB,KAAA;AACD,IAAA,EAAE,EAAE;AACA,QAAA,MAAM,EA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W,EAAA,CAAA;sBAAnB,KAAK;gBAEG,eAAe,EAAA,CAAA;sBAAvB,KAAK;gBAEG,qBAAqB,EAAA,CAAA;sBAA7B,KAAK;gBAKG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBAciB,gBAAgB,EAAA,CAAA;sBAAtC,YAAY;uBAAC,OAAO,CAAA;;;MExIZ,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAd,cAAc,EAAA,OAAA,EAAA,CAJb,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,CAAA,EAAA,OAAA,EAAA,CACtD,QAAQ,CAAA,EAAA,CAAA,CAAA,EAAA;+GAGT,cAAc,EAAA,SAAA,EAFZ,CAAC,cAAc,CAAC,EAAA,OAAA,EAAA,CAFjB,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIvD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,CAAC;oBACjE,OAAO,EAAE,CAAC,QAAQ,CAAC;oBACnB,SAAS,EAAE,CAAC,cAAc,CAAC;AAC9B,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-empty.mjs","sources":["../../../src/empty/empty.config.ts","../../../src/empty/svgs.ts","../../../src/empty/empty.component.ts","../../../src/empty/empty.component.html","../../../src/empty/empty.module.ts","../../../src/empty/ngx-tethys-empty.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class ThyEmptyConfig {\n noResultTranslateKey = 'common.tips.NO_RESULT';\n noResultWithTargetTranslateKey = 'common.tips.NO_RESULT_TARGET';\n}\n","const defaultSvg = `\n<svg width=\"180px\" height=\"133px\" viewBox=\"0 0 180 133\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>180x133</title>\n <defs>\n <linearGradient x1=\"50%\" y1=\"89.1384987%\" x2=\"50%\" y2=\"-0.00684472949%\" id=\"linearGradient-1\">\n <stop stop-color=\"#EEEEEE\" stop-opacity=\"0\" offset=\"0%\"></stop>\n <stop stop-color=\"#F2F2F2\" offset=\"100%\"></stop>\n </linearGradient>\n </defs>\n <g id=\"180x133\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g id=\"编组-10-03\">\n <path d=\"M5.8105003,110.750582 C5.8105003,110.750582 8.11054753,102.083233 16.8008738,90.5817505 C25.4912,79.0802683 38.8193883,74.4804253 62.5752127,79.6538429 C86.3310371,84.8272606 5.25910485,73.8369831 27.8592405,73.8369831 C50.4593762,73.8369831 76.8415599,98.2945025 98.8638512,85.7770811 C120.886142,73.2596597 125.886574,71.7976069 135.947864,73.8332343 C159.775447,78.6542597 180,112.967947 180,112.967947 L5.8105003,110.750582 Z\" id=\"路径\" fill=\"url(#linearGradient-1)\"></path>\n <path d=\"M7.55352128,0 L86.7672989,0 C90.9389935,0 94.3208202,3.35683765 94.3208202,7.49770673 L94.3208202,115.299902 C94.3208202,118.710832 91.5557157,121.475936 88.1447865,121.475936 L6.17603367,121.475936 C2.76510446,121.475936 -4.02317374e-15,118.710832 0,115.299902 L0,7.49770673 L0,7.49770673 C0,3.35683765 3.38182667,0 7.55352128,0 Z\" id=\"矩形-2\" fill=\"#FAFAFA\"></path>\n <path d=\"M15.8623947,13.8707575 L78.4584255,13.8707575 C80.5442728,13.8707575 82.2351861,15.5491763 82.2351861,17.6196108 L82.2351861,46.811932 C82.2351861,48.8823665 80.5442728,50.5607854 78.4584255,50.5607854 L15.8623947,50.5607854 C13.7765474,50.5607854 12.085634,48.8823665 12.085634,46.811932 L12.085634,17.5971177 C12.0980962,15.5354727 13.7853649,13.8707575 15.8623947,13.8707575 L15.8623947,13.8707575 Z\" id=\"矩形-3\" fill=\"#EEEEEE\"></path>\n <g id=\"_null_\" transform=\"translate(19.717334, 22.627913)\" fill=\"#AAAAAA\" fill-rule=\"nonzero\">\n <g id=\"</null>\">\n <polygon id=\"路径\" points=\"8.57124497 5.1766925 0 8.99556402 0 10.064848 8.57124497 13.9006923 8.57124497 12.6277352 1.59543966 9.53869242 8.57124497 6.43267691\"></polygon>\n <polygon id=\"路径\" points=\"16.0732059 0 10.0478753 15.6149413 11.2699142 15.6149413 17.278272 0\"></polygon>\n <path d=\"M23.065984,4.90512831 C22.4889101,4.90512831 21.9627544,5.04091041 21.4875171,5.3124746 C21.0122797,5.56706604 20.6219062,5.94046681 20.3163965,6.43267691 L20.3163965,5.14274698 L18.9585755,5.14274698 L18.9585755,13.9176651 L20.3163965,13.9176651 L20.3163965,8.62216325 C20.3673148,7.82444342 20.6219062,7.19645122 21.0971435,6.72121387 C21.5384354,6.27992205 22.064591,6.05927614 22.6756104,6.05927614 C24.2031591,6.05927614 24.9839061,6.90791426 24.9839061,8.62216325 L24.9839061,13.9176651 L26.3417271,13.9176651 L26.3417271,8.52032668 C26.3417271,6.11019443 25.2384976,4.90512831 23.065984,4.90512831 Z\" id=\"路径\"></path>\n <path d=\"M28.4463496,5.14274698 L28.4463496,10.5740309 C28.4463496,12.9502176 29.4986609,14.1552838 31.6372289,14.1552838 C32.8253223,14.1552838 33.775797,13.6121554 34.488653,12.5598441 L34.488653,13.9176651 L35.846474,13.9176651 L35.846474,5.14274698 L34.488653,5.14274698 L34.488653,10.4891671 C34.3868164,11.2359686 34.0982795,11.8469881 33.6230421,12.3222254 C33.1647775,12.7635173 32.6386219,13.0011359 32.061548,13.0011359 C31.2638282,13.0011359 30.6867543,12.78049 30.3303262,12.3731437 C29.9738982,11.9657974 29.8041706,11.3378052 29.8041706,10.5061399 L29.8041706,5.14274698 L28.4463496,5.14274698 Z\" id=\"路径\"></path>\n <polygon id=\"路径\" points=\"38.2226607 1.56149413 38.2226607 13.9176651 39.5635089 13.9176651 39.5635089 1.56149413\"></polygon>\n <polygon id=\"路径\" points=\"42.2112599 1.56149413 42.2112599 13.9176651 43.5521081 13.9176651 43.5521081 1.56149413\"></polygon>\n <polygon id=\"路径\" points=\"45.7246217 5.1766925 45.7246217 6.43267691 52.700427 9.53869242 45.7246217 12.6277352 45.7246217 13.9006923 54.2958666 10.064848 54.2958666 8.99556402\"></polygon>\n </g>\n </g>\n <path d=\"M14.9182045,61.702991 L78.2809177,61.702991 C79.8432174,61.702991 81.1097115,62.9601267 81.1097115,64.5108822 L81.1097115,64.5108822 C81.1076309,66.0607814 79.8423548,67.3167082 78.2809177,67.3187734 L14.9182045,67.3187734 C14.1679618,67.3187734 13.448447,67.0229428 12.9179453,66.4963611 C12.3874436,65.9697793 12.0894108,65.2555812 12.0894108,64.5108822 L12.0894108,64.5108822 C12.0894108,63.7661831 12.3874436,63.051985 12.9179453,62.5254033 C13.448447,61.9988216 14.1679618,61.702991 14.9182045,61.702991 Z\" id=\"矩形-4\" fill=\"#EEEEEE\"></path>\n <path d=\"M14.9182045,79.7095517 L78.2809177,79.7095517 C79.8423548,79.7116168 81.1076309,80.9675436 81.1097115,82.5174428 L81.1097115,82.5174428 C81.1097115,84.0681983 79.8432174,85.325334 78.2809177,85.325334 L14.9182045,85.325334 C14.1679618,85.325334 13.448447,85.0295035 12.9179453,84.5029217 C12.3874436,83.97634 12.0894108,83.2621419 12.0894108,82.5174428 L12.0894108,82.5174428 C12.0894108,81.7727438 12.3874436,81.0585457 12.9179453,80.531964 C13.448447,80.0053822 14.1679618,79.7095517 14.9182045,79.7095517 Z\" id=\"矩形备份\" fill=\"#EEEEEE\"></path>\n <path d=\"M14.9182045,98.1007447 L47.4007494,98.1007447 C48.9621864,98.1028098 50.2274626,99.3587366 50.2295431,100.908636 C50.2295431,102.459391 48.963049,103.716527 47.4007494,103.716527 L14.9182045,103.716527 C14.1679618,103.716527 13.448447,103.420696 12.9179453,102.894115 C12.3874436,102.367533 12.0894108,101.653335 12.0894108,100.908636 C12.0894108,100.163937 12.3874436,99.4497387 12.9179453,98.923157 C13.448447,98.3965752 14.1679618,98.1007447 14.9182045,98.1007447 Z\" id=\"矩形备份\" fill=\"#EEEEEE\"></path>\n <g id=\"编组-9\" transform=\"translate(74.475558, 49.058790)\">\n <ellipse id=\"椭圆形\" fill=\"#EDEFF2\" fill-rule=\"nonzero\" cx=\"22.2198147\" cy=\"77.132658\" rx=\"14.8766602\" ry=\"5.97567227\"></ellipse>\n <path d=\"M18.41284,5.91943947 C18.41284,5.91943947 18.4317238,2.02063196 22.6465886,2.23431661 C26.8614535,2.44800125 27.3524324,7.60267463 25.6037922,9.58956691 C24.470764,10.8754236 17.8161118,11.2877975 18.2844301,10.6242504 C18.7527484,9.9607034 18.41284,5.91943947 18.41284,5.91943947 Z\" id=\"路径\" fill=\"#5E5C7D\" fill-rule=\"nonzero\"></path>\n <path d=\"M21.015028,14.7817288 L21.015028,12.5324168 C21.015028,12.5324168 18.1900111,12.8323251 18.1220294,9.90821945 C18.0502709,6.62797275 18.3939562,5.86320667 18.3939562,5.86320667 C18.3939562,5.86320667 20.4522907,5.88569979 20.9810372,4.38240959 C20.9810372,4.38240959 22.16694,7.19779846 24.5689598,7.19779846 C24.6898161,7.12657025 26.3742514,6.31681792 26.7330436,7.84260124 C27.0918359,9.36838456 25.2676605,9.55957609 25.2676605,9.55957609 L25.3583028,14.2418939 L21.015028,14.7817288 Z\" id=\"路径\" fill=\"#FCDBBA\" fill-rule=\"nonzero\"></path>\n <ellipse id=\"椭圆形\" fill=\"#5E5C7D\" fill-rule=\"nonzero\" cx=\"25.6679971\" cy=\"1.97564572\" rx=\"1.99035286\" ry=\"1.97564572\"></ellipse>\n <path d=\"M25.0259478,8.83604739 C24.9899784,8.8353723 24.9589719,8.8107504 24.9504126,8.77606573 C24.9379216,8.73371868 24.961222,8.6891143 25.0032873,8.67484669 C25.4786599,8.51406706 25.8469637,8.13592658 25.9927986,7.65890743 C26.0055919,7.61564839 26.0510096,7.5906028 26.0947711,7.60267463 C26.1365196,7.61534634 26.1612683,7.6579271 26.1514225,7.70014482 C25.9910355,8.2300747 25.5811286,8.64953657 25.0523852,8.82480083 L25.0259478,8.83604739 Z\" id=\"路径\" fill=\"#ED6F4A\" fill-rule=\"nonzero\"></path>\n <path d=\"M25.5886852,8.49490173 L25.5886852,8.49490173 C25.5676127,8.49141077 25.549015,8.47922554 25.5374987,8.46136424 C25.5259823,8.44350294 25.5226245,8.42163624 25.528257,8.4011804 C25.5669781,8.12357401 25.4685598,7.84445657 25.2638838,7.65140972 C25.2336326,7.61849049 25.2336326,7.5681145 25.2638838,7.53519527 C25.2962826,7.50326751 25.3485645,7.50326751 25.3809633,7.53519527 C25.6305204,7.77189226 25.7463943,8.11554248 25.6906577,8.45366434 C25.6709059,8.48976985 25.6282327,8.50702674 25.5886852,8.49490173 Z\" id=\"路径\" fill=\"#ED6F4A\" fill-rule=\"nonzero\"></path>\n <path d=\"M26.0267894,10.0544247 C25.6575944,10.0544247 25.3583028,9.7573446 25.3583028,9.39087768 C25.3583028,9.02441077 25.6575944,8.72733064 26.0267894,8.72733064 C26.3959844,8.72733064 26.695276,9.02441077 26.695276,9.39087768 C26.695276,9.5668613 26.6248464,9.73563709 26.4994808,9.8600763 C26.3741153,9.98451551 26.2040831,10.0544247 26.0267894,10.0544247 L26.0267894,10.0544247 Z M26.0267894,8.99724779 C25.8207212,8.99750393 25.6528971,9.16167512 25.6496331,9.36619519 C25.6463691,9.57071526 25.8088702,9.74008057 26.0148269,9.74681521 C26.2207836,9.75354985 26.3941619,9.59516757 26.4044655,9.39087768 C26.4096418,9.28824585 26.3721482,9.1880042 26.3007514,9.11359151 C26.2293546,9.03917883 26.1303147,8.99711955 26.0267894,8.99724779 L26.0267894,8.99724779 Z\" id=\"形状\" fill=\"#FFD858\" fill-rule=\"nonzero\"></path>\n <path d=\"M21.015028,12.5174214 C21.6913572,12.5156584 22.3458616,12.2796565 22.8656408,11.8501255 L21.015028,14.7817288 L21.015028,12.5174214 Z\" id=\"路径\" fill=\"#E57958\" fill-rule=\"nonzero\"></path>\n <path d=\"M18.2995371,69.0501302 L19.7875808,72.58155 L16.3658357,75.4531717 C16.3658357,75.4531717 14.2772871,78.6097063 17.529078,77.9536569 C20.7128872,77.312603 23.7531795,74.3997439 23.7531795,74.3997439 L22.688133,70.6508906 L18.2995371,69.0501302 Z\" id=\"路径\" fill=\"#575577\" fill-rule=\"nonzero\"></path>\n <path d=\"M23.6851978,72.0529617 L23.9684549,73.9611281 L19.9348745,75.9030341 C19.9348745,75.9030341 17.1249646,78.4522544 20.4371837,78.6134551 C22.8089893,78.7296696 25.3922936,77.6125113 26.6121873,76.9976993 C27.0503761,76.7768162 27.3231217,76.3270548 27.3146648,75.8393036 L27.2617901,72.8102301 L23.6851978,72.0529617 Z\" id=\"路径\" fill=\"#6C6A8E\" fill-rule=\"nonzero\"></path>\n <path d=\"M15.0401927,39.8428136 L29.252143,40.8212643 L27.2655669,74.3959951 L23.7342957,74.0698448 L23.0809161,48.4764229 C23.0809161,48.4764229 23.0809161,46.1821246 21.5928724,46.1258918 C20.1048287,46.069659 19.058666,59.9591608 20.4371837,62.3134407 C21.8157013,64.6677206 23.1375675,72.1579296 23.1375675,72.1579296 L19.6100731,72.0492129 C19.6100731,72.0492129 14.7002843,62.0922583 14.7002843,57.6086297 C14.7002843,53.1250011 15.0401927,39.8428136 15.0401927,39.8428136 Z\" id=\"路径\" fill=\"#6698FF\"></path>\n <path d=\"M15.1799329,40.0040143 L29.6298191,41.1961497 L29.6298191,21.0835513 L30.7326332,22.7255491 L34.0372987,19.3515811 L30.9516853,13.6645705 C29.4332356,12.450527 27.383939,12.1174325 25.5546943,12.7873388 C25.5546943,12.7873388 25.3356422,14.2119031 22.9109619,14.3206199 C21.9354308,14.3605755 20.9704937,14.1070768 20.1425963,13.5933423 C18.2844301,12.502426 16.2449794,14.1556703 15.4178688,15.467769 C14.6839309,16.7904495 14.04043,18.1606223 13.4917208,19.5690146 L16.4640315,20.98983 L15.1799329,40.0040143 Z\" id=\"路径\" fill=\"#FFFFFF\"></path>\n <path d=\"M13.552149,19.5802611 C13.552149,19.5802611 12.0678821,22.8605078 11.3238602,22.6168324 C10.5798384,22.3731569 6.61423973,15.7264399 5.95330661,15.8089146 C5.2923735,15.8913894 -0.0895104068,15.2315912 0.00113184855,16.2175397 C0.0917741039,17.2034881 5.12619603,17.2034881 5.45855097,17.282214 C5.79090591,17.3609399 8.26846089,25.6496547 10.9121933,26.7180779 C13.5559258,27.7865012 16.4489244,20.9748346 16.4489244,20.9748346 L13.552149,19.5802611 Z\" id=\"路径\" fill=\"#FCDBBA\"></path>\n <path d=\"M34.0184149,19.3365857 C34.0184149,19.3365857 35.2609692,23.085439 36.1673917,22.9054941 C37.0738143,22.7255491 41.2924559,16.8361005 43.1921665,16.9073287 C45.0918771,16.9785569 48.8950751,17.769565 48.3172307,18.6505455 C47.7393863,19.531526 43.4414327,18.3431395 43.1090778,18.6505455 C42.7767228,18.9579515 39.1434791,27.5690677 36.4997467,27.7340172 C33.8560142,27.8989668 30.7137494,22.729298 30.7137494,22.729298 L34.0184149,19.3365857 Z\" id=\"路径\" fill=\"#FCDBBA\"></path>\n </g>\n <g id=\"编组-8\" transform=\"translate(146.963723, 46.476171)\" fill-rule=\"nonzero\">\n <path d=\"M8.31779035,0 C8.31779035,0 -9.76156282,29.3122845 7.38870724,29.3122845 C24.5389773,29.3122845 8.31779035,0 8.31779035,0 Z\" id=\"路径\" fill=\"#FAFAFA\"></path>\n <line x1=\"7.25274385\" y1=\"37.0949041\" x2=\"7.63041992\" y2=\"14.088191\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n <line x1=\"5.25483748\" y1=\"19.6327451\" x2=\"7.31317202\" y2=\"26.2007362\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n <line x1=\"10.9728531\" y1=\"16.6074204\" x2=\"7.68329457\" y2=\"22.6580698\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n </g>\n </g>\n </g>\n</svg>\n`;\n\nconst lightSvg = `\n<svg width=\"180px\" height=\"133px\" viewBox=\"0 0 180 133\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>180x133(灰色底)</title>\n <defs>\n <linearGradient x1=\"50%\" y1=\"89.1384987%\" x2=\"50%\" y2=\"-0.00684472949%\" id=\"linearGradient-1\">\n <stop stop-color=\"#EEEEEE\" stop-opacity=\"0\" offset=\"0%\"></stop>\n <stop stop-color=\"#F2F2F2\" offset=\"100%\"></stop>\n </linearGradient>\n </defs>\n <g id=\"180x133(灰色底)\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g id=\"编组-10-03\" transform=\"translate(0.000000, 0.000000)\">\n <path d=\"M5.8105003,110.750582 C5.8105003,110.750582 8.11054753,102.083233 16.8008738,90.5817505 C25.4912,79.0802683 38.8193883,74.4804253 62.5752127,79.6538429 C86.3310371,84.8272606 5.25910485,73.8369831 27.8592405,73.8369831 C50.4593762,73.8369831 76.8415599,98.2945025 98.8638512,85.7770811 C120.886142,73.2596597 125.886574,71.7976069 135.947864,73.8332343 C159.775447,78.6542597 180,112.967947 180,112.967947 L5.8105003,110.750582 Z\" id=\"路径\" fill=\"url(#linearGradient-1)\"></path>\n <path d=\"M7.55352128,0 L86.7672989,0 C90.9389935,0 94.3208202,3.35683765 94.3208202,7.49770673 L94.3208202,115.299902 C94.3208202,118.710832 91.5557157,121.475936 88.1447865,121.475936 L6.17603367,121.475936 C2.76510446,121.475936 -4.02317374e-15,118.710832 0,115.299902 L0,7.49770673 L0,7.49770673 C0,3.35683765 3.38182667,0 7.55352128,0 Z\" id=\"矩形-2\" fill=\"#FEFEFE\"></path>\n <path d=\"M15.8623947,13.8707575 L78.4584255,13.8707575 C80.5442728,13.8707575 82.2351861,15.5491763 82.2351861,17.6196108 L82.2351861,46.811932 C82.2351861,48.8823665 80.5442728,50.5607854 78.4584255,50.5607854 L15.8623947,50.5607854 C13.7765474,50.5607854 12.085634,48.8823665 12.085634,46.811932 L12.085634,17.5971177 C12.0980962,15.5354727 13.7853649,13.8707575 15.8623947,13.8707575 L15.8623947,13.8707575 Z\" id=\"矩形-3\" fill=\"#EEEEEE\"></path>\n <g id=\"_null_\" transform=\"translate(19.717334, 22.627913)\" fill=\"#AAAAAA\" fill-rule=\"nonzero\">\n <g id=\"</null>\">\n <polygon id=\"路径\" points=\"8.57124497 5.1766925 0 8.99556402 0 10.064848 8.57124497 13.9006923 8.57124497 12.6277352 1.59543966 9.53869242 8.57124497 6.43267691\"></polygon>\n <polygon id=\"路径\" points=\"16.0732059 0 10.0478753 15.6149413 11.2699142 15.6149413 17.278272 0\"></polygon>\n <path d=\"M23.065984,4.90512831 C22.4889101,4.90512831 21.9627544,5.04091041 21.4875171,5.3124746 C21.0122797,5.56706604 20.6219062,5.94046681 20.3163965,6.43267691 L20.3163965,5.14274698 L18.9585755,5.14274698 L18.9585755,13.9176651 L20.3163965,13.9176651 L20.3163965,8.62216325 C20.3673148,7.82444342 20.6219062,7.19645122 21.0971435,6.72121387 C21.5384354,6.27992205 22.064591,6.05927614 22.6756104,6.05927614 C24.2031591,6.05927614 24.9839061,6.90791426 24.9839061,8.62216325 L24.9839061,13.9176651 L26.3417271,13.9176651 L26.3417271,8.52032668 C26.3417271,6.11019443 25.2384976,4.90512831 23.065984,4.90512831 Z\" id=\"路径\"></path>\n <path d=\"M28.4463496,5.14274698 L28.4463496,10.5740309 C28.4463496,12.9502176 29.4986609,14.1552838 31.6372289,14.1552838 C32.8253223,14.1552838 33.775797,13.6121554 34.488653,12.5598441 L34.488653,13.9176651 L35.846474,13.9176651 L35.846474,5.14274698 L34.488653,5.14274698 L34.488653,10.4891671 C34.3868164,11.2359686 34.0982795,11.8469881 33.6230421,12.3222254 C33.1647775,12.7635173 32.6386219,13.0011359 32.061548,13.0011359 C31.2638282,13.0011359 30.6867543,12.78049 30.3303262,12.3731437 C29.9738982,11.9657974 29.8041706,11.3378052 29.8041706,10.5061399 L29.8041706,5.14274698 L28.4463496,5.14274698 Z\" id=\"路径\"></path>\n <polygon id=\"路径\" points=\"38.2226607 1.56149413 38.2226607 13.9176651 39.5635089 13.9176651 39.5635089 1.56149413\"></polygon>\n <polygon id=\"路径\" points=\"42.2112599 1.56149413 42.2112599 13.9176651 43.5521081 13.9176651 43.5521081 1.56149413\"></polygon>\n <polygon id=\"路径\" points=\"45.7246217 5.1766925 45.7246217 6.43267691 52.700427 9.53869242 45.7246217 12.6277352 45.7246217 13.9006923 54.2958666 10.064848 54.2958666 8.99556402\"></polygon>\n </g>\n </g>\n <path d=\"M14.9182045,61.702991 L78.2809177,61.702991 C79.8432174,61.702991 81.1097115,62.9601267 81.1097115,64.5108822 L81.1097115,64.5108822 C81.1076309,66.0607814 79.8423548,67.3167082 78.2809177,67.3187734 L14.9182045,67.3187734 C14.1679618,67.3187734 13.448447,67.0229428 12.9179453,66.4963611 C12.3874436,65.9697793 12.0894108,65.2555812 12.0894108,64.5108822 L12.0894108,64.5108822 C12.0894108,63.7661831 12.3874436,63.051985 12.9179453,62.5254033 C13.448447,61.9988216 14.1679618,61.702991 14.9182045,61.702991 Z\" id=\"矩形-4\" fill=\"#EEEEEE\"></path>\n <path d=\"M14.9182045,79.7095517 L78.2809177,79.7095517 C79.8423548,79.7116168 81.1076309,80.9675436 81.1097115,82.5174428 L81.1097115,82.5174428 C81.1097115,84.0681983 79.8432174,85.325334 78.2809177,85.325334 L14.9182045,85.325334 C14.1679618,85.325334 13.448447,85.0295035 12.9179453,84.5029217 C12.3874436,83.97634 12.0894108,83.2621419 12.0894108,82.5174428 L12.0894108,82.5174428 C12.0894108,81.7727438 12.3874436,81.0585457 12.9179453,80.531964 C13.448447,80.0053822 14.1679618,79.7095517 14.9182045,79.7095517 Z\" id=\"矩形备份\" fill=\"#EEEEEE\"></path>\n <path d=\"M14.9182045,98.1007447 L47.4007494,98.1007447 C48.9621864,98.1028098 50.2274626,99.3587366 50.2295431,100.908636 C50.2295431,102.459391 48.963049,103.716527 47.4007494,103.716527 L14.9182045,103.716527 C14.1679618,103.716527 13.448447,103.420696 12.9179453,102.894115 C12.3874436,102.367533 12.0894108,101.653335 12.0894108,100.908636 C12.0894108,100.163937 12.3874436,99.4497387 12.9179453,98.923157 C13.448447,98.3965752 14.1679618,98.1007447 14.9182045,98.1007447 Z\" id=\"矩形备份\" fill=\"#EEEEEE\"></path>\n <g id=\"编组-9\" transform=\"translate(74.475558, 49.058790)\">\n <ellipse id=\"椭圆形\" fill=\"#EDEFF2\" fill-rule=\"nonzero\" cx=\"22.2198147\" cy=\"77.132658\" rx=\"14.8766602\" ry=\"5.97567227\"></ellipse>\n <path d=\"M18.41284,5.91943947 C18.41284,5.91943947 18.4317238,2.02063196 22.6465886,2.23431661 C26.8614535,2.44800125 27.3524324,7.60267463 25.6037922,9.58956691 C24.470764,10.8754236 17.8161118,11.2877975 18.2844301,10.6242504 C18.7527484,9.9607034 18.41284,5.91943947 18.41284,5.91943947 Z\" id=\"路径\" fill=\"#5E5C7D\" fill-rule=\"nonzero\"></path>\n <path d=\"M21.015028,14.7817288 L21.015028,12.5324168 C21.015028,12.5324168 18.1900111,12.8323251 18.1220294,9.90821945 C18.0502709,6.62797275 18.3939562,5.86320667 18.3939562,5.86320667 C18.3939562,5.86320667 20.4522907,5.88569979 20.9810372,4.38240959 C20.9810372,4.38240959 22.16694,7.19779846 24.5689598,7.19779846 C24.6898161,7.12657025 26.3742514,6.31681792 26.7330436,7.84260124 C27.0918359,9.36838456 25.2676605,9.55957609 25.2676605,9.55957609 L25.3583028,14.2418939 L21.015028,14.7817288 Z\" id=\"路径\" fill=\"#FCDBBA\" fill-rule=\"nonzero\"></path>\n <ellipse id=\"椭圆形\" fill=\"#5E5C7D\" fill-rule=\"nonzero\" cx=\"25.6679971\" cy=\"1.97564572\" rx=\"1.99035286\" ry=\"1.97564572\"></ellipse>\n <path d=\"M25.0259478,8.83604739 C24.9899784,8.8353723 24.9589719,8.8107504 24.9504126,8.77606573 C24.9379216,8.73371868 24.961222,8.6891143 25.0032873,8.67484669 C25.4786599,8.51406706 25.8469637,8.13592658 25.9927986,7.65890743 C26.0055919,7.61564839 26.0510096,7.5906028 26.0947711,7.60267463 C26.1365196,7.61534634 26.1612683,7.6579271 26.1514225,7.70014482 C25.9910355,8.2300747 25.5811286,8.64953657 25.0523852,8.82480083 L25.0259478,8.83604739 Z\" id=\"路径\" fill=\"#ED6F4A\" fill-rule=\"nonzero\"></path>\n <path d=\"M25.5886852,8.49490173 L25.5886852,8.49490173 C25.5676127,8.49141077 25.549015,8.47922554 25.5374987,8.46136424 C25.5259823,8.44350294 25.5226245,8.42163624 25.528257,8.4011804 C25.5669781,8.12357401 25.4685598,7.84445657 25.2638838,7.65140972 C25.2336326,7.61849049 25.2336326,7.5681145 25.2638838,7.53519527 C25.2962826,7.50326751 25.3485645,7.50326751 25.3809633,7.53519527 C25.6305204,7.77189226 25.7463943,8.11554248 25.6906577,8.45366434 C25.6709059,8.48976985 25.6282327,8.50702674 25.5886852,8.49490173 Z\" id=\"路径\" fill=\"#ED6F4A\" fill-rule=\"nonzero\"></path>\n <path d=\"M26.0267894,10.0544247 C25.6575944,10.0544247 25.3583028,9.7573446 25.3583028,9.39087768 C25.3583028,9.02441077 25.6575944,8.72733064 26.0267894,8.72733064 C26.3959844,8.72733064 26.695276,9.02441077 26.695276,9.39087768 C26.695276,9.5668613 26.6248464,9.73563709 26.4994808,9.8600763 C26.3741153,9.98451551 26.2040831,10.0544247 26.0267894,10.0544247 L26.0267894,10.0544247 Z M26.0267894,8.99724779 C25.8207212,8.99750393 25.6528971,9.16167512 25.6496331,9.36619519 C25.6463691,9.57071526 25.8088702,9.74008057 26.0148269,9.74681521 C26.2207836,9.75354985 26.3941619,9.59516757 26.4044655,9.39087768 C26.4096418,9.28824585 26.3721482,9.1880042 26.3007514,9.11359151 C26.2293546,9.03917883 26.1303147,8.99711955 26.0267894,8.99724779 L26.0267894,8.99724779 Z\" id=\"形状\" fill=\"#FFD858\" fill-rule=\"nonzero\"></path>\n <path d=\"M21.015028,12.5174214 C21.6913572,12.5156584 22.3458616,12.2796565 22.8656408,11.8501255 L21.015028,14.7817288 L21.015028,12.5174214 Z\" id=\"路径\" fill=\"#E57958\" fill-rule=\"nonzero\"></path>\n <path d=\"M18.2995371,69.0501302 L19.7875808,72.58155 L16.3658357,75.4531717 C16.3658357,75.4531717 14.2772871,78.6097063 17.529078,77.9536569 C20.7128872,77.312603 23.7531795,74.3997439 23.7531795,74.3997439 L22.688133,70.6508906 L18.2995371,69.0501302 Z\" id=\"路径\" fill=\"#575577\" fill-rule=\"nonzero\"></path>\n <path d=\"M23.6851978,72.0529617 L23.9684549,73.9611281 L19.9348745,75.9030341 C19.9348745,75.9030341 17.1249646,78.4522544 20.4371837,78.6134551 C22.8089893,78.7296696 25.3922936,77.6125113 26.6121873,76.9976993 C27.0503761,76.7768162 27.3231217,76.3270548 27.3146648,75.8393036 L27.2617901,72.8102301 L23.6851978,72.0529617 Z\" id=\"路径\" fill=\"#6C6A8E\" fill-rule=\"nonzero\"></path>\n <path d=\"M15.0401927,39.8428136 L29.252143,40.8212643 L27.2655669,74.3959951 L23.7342957,74.0698448 L23.0809161,48.4764229 C23.0809161,48.4764229 23.0809161,46.1821246 21.5928724,46.1258918 C20.1048287,46.069659 19.058666,59.9591608 20.4371837,62.3134407 C21.8157013,64.6677206 23.1375675,72.1579296 23.1375675,72.1579296 L19.6100731,72.0492129 C19.6100731,72.0492129 14.7002843,62.0922583 14.7002843,57.6086297 C14.7002843,53.1250011 15.0401927,39.8428136 15.0401927,39.8428136 Z\" id=\"路径\" fill=\"#6698FF\"></path>\n <path d=\"M15.1799329,40.0040143 L29.6298191,41.1961497 L29.6298191,21.0835513 L30.7326332,22.7255491 L34.0372987,19.3515811 L30.9516853,13.6645705 C29.4332356,12.450527 27.383939,12.1174325 25.5546943,12.7873388 C25.5546943,12.7873388 25.3356422,14.2119031 22.9109619,14.3206199 C21.9354308,14.3605755 20.9704937,14.1070768 20.1425963,13.5933423 C18.2844301,12.502426 16.2449794,14.1556703 15.4178688,15.467769 C14.6839309,16.7904495 14.04043,18.1606223 13.4917208,19.5690146 L16.4640315,20.98983 L15.1799329,40.0040143 Z\" id=\"路径\" fill=\"#FFFFFF\"></path>\n <path d=\"M13.552149,19.5802611 C13.552149,19.5802611 12.0678821,22.8605078 11.3238602,22.6168324 C10.5798384,22.3731569 6.61423973,15.7264399 5.95330661,15.8089146 C5.2923735,15.8913894 -0.0895104068,15.2315912 0.00113184855,16.2175397 C0.0917741039,17.2034881 5.12619603,17.2034881 5.45855097,17.282214 C5.79090591,17.3609399 8.26846089,25.6496547 10.9121933,26.7180779 C13.5559258,27.7865012 16.4489244,20.9748346 16.4489244,20.9748346 L13.552149,19.5802611 Z\" id=\"路径\" fill=\"#FCDBBA\"></path>\n <path d=\"M34.0184149,19.3365857 C34.0184149,19.3365857 35.2609692,23.085439 36.1673917,22.9054941 C37.0738143,22.7255491 41.2924559,16.8361005 43.1921665,16.9073287 C45.0918771,16.9785569 48.8950751,17.769565 48.3172307,18.6505455 C47.7393863,19.531526 43.4414327,18.3431395 43.1090778,18.6505455 C42.7767228,18.9579515 39.1434791,27.5690677 36.4997467,27.7340172 C33.8560142,27.8989668 30.7137494,22.729298 30.7137494,22.729298 L34.0184149,19.3365857 Z\" id=\"路径\" fill=\"#FCDBBA\"></path>\n </g>\n <g id=\"编组-8\" transform=\"translate(146.963723, 46.476171)\" fill-rule=\"nonzero\">\n <path d=\"M8.31779035,0 C8.31779035,0 -9.76156282,29.3122845 7.38870724,29.3122845 C24.5389773,29.3122845 8.31779035,0 8.31779035,0 Z\" id=\"路径\" fill=\"#FAFAFA\"></path>\n <line x1=\"7.25274385\" y1=\"37.0949041\" x2=\"7.63041992\" y2=\"14.088191\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n <line x1=\"5.25483748\" y1=\"19.6327451\" x2=\"7.31317202\" y2=\"26.2007362\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n <line x1=\"10.9728531\" y1=\"16.6074204\" x2=\"7.68329457\" y2=\"22.6580698\" id=\"路径\" stroke=\"#DDDDDD\" stroke-width=\"0.75484856\" fill=\"#F9FAFB\"></line>\n </g>\n </g>\n </g>\n</svg>`;\n\nexport const PRESET_SVG = {\n default: defaultSvg,\n 'preset-light': lightSvg\n};\n","import { ThyTranslate } from 'ngx-tethys/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n ElementRef,\n OnChanges,\n Input,\n NgZone,\n OnInit,\n TemplateRef,\n SimpleChanges,\n booleanAttribute\n} from '@angular/core';\n\nimport { ThyEmptyConfig } from './empty.config';\nimport { PRESET_SVG } from './svgs';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgIf, NgClass, NgTemplateOutlet } from '@angular/common';\n\nconst sizeClassMap = {\n lg: ['thy-empty-state', 'thy-empty-state--lg'],\n md: ['thy-empty-state'],\n sm: ['thy-empty-state', 'thy-empty-state--sm']\n};\n\nconst sizeMap = {\n lg: {\n height: 168, // 空提示的高度\n offsetTop: 30, // 空提示图标和大小之间的空白距离,需要除去,否则会不居中\n defaultMarginTop: 120 // 不自动计算默认的 top 距离\n },\n md: {\n height: 118,\n offsetTop: 20,\n defaultMarginTop: 10\n },\n sm: {\n height: 78,\n offsetTop: 10,\n defaultMarginTop: 10\n }\n};\n\n/** https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading */\nexport type ThyEmptyImageLoading = 'eager' | 'lazy';\n\n/** https://wicg.github.io/priority-hints/#idl-index */\nexport type ThyEmptyImageFetchPriority = 'high' | 'low' | 'auto';\n\n/**\n * 空页面组件\n * @name thy-empty\n * @order 10\n */\n@Component({\n selector: 'thy-empty',\n templateUrl: './empty.component.html',\n standalone: true,\n imports: [NgIf, ThyIcon, NgClass, NgTemplateOutlet]\n})\nexport class ThyEmpty implements OnInit, AfterViewInit, OnChanges {\n /**\n * 显示文本提示信息。同时传入 thyMessage,thyTranslationKey,thyEntityName,thyEntityNameTranslateKey 时优先级最高\n */\n @Input() thyMessage: string;\n\n /**\n * 显示文本提示信息多语言 Key。同时传入 thyTranslationKey,thyEntityName,thyEntityNameTranslateKey 时优先级最高\n */\n @Input() thyTranslationKey: string;\n\n /**\n * 显示文本提示信息多语言 Key 的 Values。传入 thyTranslationKey 后,传入这个才会生效\n */\n @Input() thyTranslationValues: any;\n\n /**\n * 显示默认提示信息,替换默认提示信息的目标对象,比如:没有 {thyEntityName}。同时传入 thyEntityName,thyEntityNameTranslateKey 时优先级较高\n */\n @Input() thyEntityName: string;\n\n /**\n * thyEntityName 的多语言 Key。thyMessage,thyTranslationKey,thyEntityName 均未传入时才会生效\n */\n @Input() thyEntityNameTranslateKey: string;\n\n /**\n * 提示图标名\n */\n @Input() thyIconName: string;\n\n /**\n * 大小\n * @type sm | md | lg\n * @default md\n */\n @Input()\n set thySize(value: string) {\n this.size = value;\n if (this._initialized) {\n this.updateClass();\n }\n }\n\n /**\n * 距上距离\n */\n @Input() thyMarginTop: number | string;\n\n /**\n * 是否自动根据父容器计算高度,垂直居中\n * @default false\n */\n @Input({ transform: booleanAttribute }) thyTopAuto: boolean;\n\n /**\n * 自动计算高度垂直居中(即 thyTopAuto 为 true)时,支持传入自定义父容器\n */\n @Input() thyContainer: ElementRef;\n\n /**\n * 提示图片链接\n */\n @Input() thyImageUrl: string;\n\n @Input() thyImageLoading?: ThyEmptyImageLoading;\n\n @Input() thyImageFetchPriority?: ThyEmptyImageFetchPriority;\n\n /**\n * 显示文本描述\n */\n @Input() thyDescription: string;\n\n private size: string = 'md';\n\n private _initialized = false;\n\n private hostRenderer = useHostRenderer();\n\n presetSvg: SafeAny;\n\n /**\n * 除提示图片,文本外的其他信息传入模板\n * @type TemplateRef\n */\n @ContentChild('extra') extraTemplateRef: TemplateRef<any>;\n\n get displayText() {\n if (this.thyMessage) {\n return this.thyMessage;\n } else if (this.thyTranslationKey) {\n return this.thyTranslate.instant(this.thyTranslationKey, this.thyTranslationValues);\n } else if (this.thyEntityName) {\n return this.thyTranslate.instant(this.thyEmptyConfig.noResultWithTargetTranslateKey, {\n target: this.thyEntityName\n });\n } else if (this.thyEntityNameTranslateKey) {\n return this.thyTranslate.instant(this.thyEmptyConfig.noResultWithTargetTranslateKey, {\n target: this.thyTranslate.instant(this.thyEntityNameTranslateKey)\n });\n } else {\n return this.thyTranslate.instant(this.thyEmptyConfig.noResultTranslateKey);\n }\n }\n\n private _calculatePosition() {\n const sizeOptions = sizeMap[this.thySize || 'md'];\n let marginTop = null;\n if (this.thyTopAuto) {\n // 选择参考父容器居中\n const containerElement = this.thyContainer ? this.thyContainer.nativeElement : this.elementRef.nativeElement.parentElement;\n // containerElement.height;\n let emptyStateHeight = this.elementRef.nativeElement.offsetHeight;\n // 高度没有自动计算出来使用默认值\n if (emptyStateHeight <= 10) {\n emptyStateHeight = sizeOptions.height;\n }\n marginTop = (containerElement.offsetHeight - emptyStateHeight) / 2 - sizeOptions.offsetTop;\n // marginTop = (containerElement.offsetHeight - emptyStateHeight) / 2;\n if (marginTop < 0) {\n marginTop = 0; // sizeOptions.defaultMarginTop;\n }\n } else {\n if (this.thyMarginTop) {\n marginTop = this.thyMarginTop;\n } else {\n marginTop = 0; // sizeOptions.defaultMarginTop;\n }\n }\n if (marginTop) {\n this.hostRenderer.setStyle('marginTop', marginTop + 'px');\n }\n }\n\n constructor(\n private thyTranslate: ThyTranslate,\n private thyEmptyConfig: ThyEmptyConfig,\n private elementRef: ElementRef,\n private ngZone: NgZone,\n private sanitizer: DomSanitizer\n ) {}\n\n ngOnInit() {\n this.updateClass();\n this._initialized = true;\n this.setPresetSvg(this.thyIconName);\n }\n\n updateClass() {\n const classList = sizeClassMap[this.size] || sizeClassMap['md'];\n if (classList) {\n this.hostRenderer.updateClass(classList);\n }\n }\n\n ngAfterViewInit() {\n this.ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n this._calculatePosition();\n }, 50);\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.thyIconName && changes.thyIconName.currentValue && !changes.thyIconName.firstChange) {\n this.setPresetSvg(changes.thyIconName.currentValue);\n }\n }\n\n setPresetSvg(icon: string) {\n this.presetSvg = '';\n let presetSvg = icon ? PRESET_SVG[icon] : PRESET_SVG.default;\n\n this.presetSvg = presetSvg ? this.sanitizer.bypassSecurityTrustHtml(presetSvg) : '';\n }\n}\n","<div class=\"thy-empty-icon\">\n <img\n *ngIf=\"thyImageUrl; else icon\"\n [src]=\"thyImageUrl\"\n [attr.loading]=\"thyImageLoading\"\n [attr.fetchpriority]=\"thyImageFetchPriority\"\n class=\"empty-img\"\n />\n <ng-template #icon>\n <div *ngIf=\"presetSvg; else thyIcon\" [innerHTML]=\"presetSvg\"></div>\n <ng-template #thyIcon>\n <thy-icon class=\"empty-icon\" *ngIf=\"thyIconName\" [thyIconName]=\"thyIconName\"></thy-icon>\n </ng-template>\n </ng-template>\n</div>\n\n<div [ngClass]=\"{ 'thy-empty-text': !thyDescription, 'thy-empty-text-with-extra': thyDescription }\">\n {{ displayText }}\n</div>\n\n<div class=\"thy-empty-description\" *ngIf=\"thyDescription\">\n {{ thyDescription }}\n</div>\n\n<div class=\"thy-empty-extra\" *ngIf=\"extraTemplateRef\">\n <ng-template [ngTemplateOutlet]=\"extraTemplateRef\"></ng-template>\n</div>\n","import { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThySharedModule } from 'ngx-tethys/shared';\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ThyEmpty } from './empty.component';\nimport { ThyEmptyConfig } from './empty.config';\n\n@NgModule({\n imports: [CommonModule, ThySharedModule, ThyIconModule, ThyEmpty],\n exports: [ThyEmpty],\n providers: [ThyEmptyConfig]\n})\nexport class ThyEmptyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.ThyEmptyConfig"],"mappings":";;;;;;;;;MAGa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;QAEI,IAAoB,CAAA,oBAAA,GAAG,uBAAuB,CAAC;QAC/C,IAA8B,CAAA,8BAAA,GAAG,8BAA8B,CAAC;AACnE,KAAA;8GAHY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;kHAAd,cAAc,EAAA,CAAA,CAAA,EAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;;;ACFX,MAAM,UAAU,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDlB,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDV,CAAC;AAED,MAAM,UAAU,GAAG;AACtB,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,cAAc,EAAE,QAAQ;CAC3B;;ACzFD,MAAM,YAAY,GAAG;AACjB,IAAA,EAAE,EAAE,CAAC,iBAAiB,EAAE,qBAAqB,CAAC;IAC9C,EAAE,EAAE,CAAC,iBAAiB,CAAC;AACvB,IAAA,EAAE,EAAE,CAAC,iBAAiB,EAAE,qBAAqB,CAAC;CACjD,CAAC;AAEF,MAAM,OAAO,GAAG;AACZ,IAAA,EAAE,EAAE;QACA,MAAM,EAAE,GAAG;QACX,SAAS,EAAE,EAAE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UAAU,EAAA,CAAA;sBAAjD,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;gBAK7B,YAAY,EAAA,CAAA;sBAApB,KAAK;gBAKG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBAEG,eAAe,EAAA,CAAA;sBAAvB,KAAK;gBAEG,qBAAqB,EAAA,CAAA;sBAA7B,KAAK;gBAKG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBAciB,gBAAgB,EAAA,CAAA;sBAAtC,YAAY;uBAAC,OAAO,CAAA;;;MExIZ,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAd,cAAc,EAAA,OAAA,EAAA,CAJb,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,CAAA,EAAA,OAAA,EAAA,CACtD,QAAQ,CAAA,EAAA,CAAA,CAAA,EAAA;+GAGT,cAAc,EAAA,SAAA,EAFZ,CAAC,cAAc,CAAC,EAAA,OAAA,EAAA,CAFjB,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIvD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,CAAC;oBACjE,OAAO,EAAE,CAAC,QAAQ,CAAC;oBACnB,SAAS,EAAE,CAAC,cAAc,CAAC;AAC9B,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input, NgModule } from '@angular/core';
|
|
2
|
+
import { numberAttribute, Component, Input, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { __decorate, __metadata } from 'tslib';
|
|
5
4
|
import * as i1 from '@angular/cdk/observers';
|
|
6
5
|
import { ObserversModule } from '@angular/cdk/observers';
|
|
7
|
-
import { InputNumber } from 'ngx-tethys/core';
|
|
8
6
|
import * as i2 from 'ngx-tethys/tooltip';
|
|
9
7
|
import { ThyTooltipDirective, ThyTooltipModule } from 'ngx-tethys/tooltip';
|
|
10
8
|
import { isUndefinedOrNull } from 'ngx-tethys/util';
|
|
@@ -138,13 +136,8 @@ class ThyFlexibleText {
|
|
|
138
136
|
this.hostRenderer.updateClassByMap(flexibleTextClass);
|
|
139
137
|
}
|
|
140
138
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyFlexibleText, deps: [{ token: i0.ElementRef }, { token: i1.ContentObserver }, { token: i0.NgZone }, { token: i2.ThyTooltipDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
141
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
139
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.2.3", type: ThyFlexibleText, isStandalone: true, selector: "thy-flexible-text,[thyFlexibleText]", inputs: { trigger: ["thyTooltipTrigger", "trigger"], thyContainerClass: "thyContainerClass", thyContent: ["thyTooltipContent", "thyContent"], thyPlacement: ["thyTooltipPlacement", "thyPlacement"], thyOffset: ["thyTooltipOffset", "thyOffset", numberAttribute] }, exportAs: ["thyFlexibleText"], hostDirectives: [{ directive: i2.ThyTooltipDirective }], ngImport: i0, template: "<ng-content></ng-content>\n" }); }
|
|
142
140
|
}
|
|
143
|
-
__decorate([
|
|
144
|
-
InputNumber(),
|
|
145
|
-
__metadata("design:type", Number),
|
|
146
|
-
__metadata("design:paramtypes", [Number])
|
|
147
|
-
], ThyFlexibleText.prototype, "thyOffset", null);
|
|
148
141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyFlexibleText, decorators: [{
|
|
149
142
|
type: Component,
|
|
150
143
|
args: [{ selector: 'thy-flexible-text,[thyFlexibleText]', exportAs: 'thyFlexibleText', hostDirectives: [ThyTooltipDirective], standalone: true, template: "<ng-content></ng-content>\n" }]
|
|
@@ -162,7 +155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
162
155
|
args: ['thyTooltipPlacement']
|
|
163
156
|
}], thyOffset: [{
|
|
164
157
|
type: Input,
|
|
165
|
-
args: ['thyTooltipOffset']
|
|
158
|
+
args: [{ alias: 'thyTooltipOffset', transform: numberAttribute }]
|
|
166
159
|
}] } });
|
|
167
160
|
|
|
168
161
|
class ThyFlexibleTextModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-flexible-text.mjs","sources":["../../../src/flexible-text/flexible-text.component.ts","../../../src/flexible-text/flexible-text.component.html","../../../src/flexible-text/flexible-text.module.ts","../../../src/flexible-text/ngx-tethys-flexible-text.ts"],"sourcesContent":["import { ContentObserver } from '@angular/cdk/observers';\nimport { AfterContentInit, Component, ElementRef, Input, NgZone, OnDestroy, OnInit, TemplateRef } from '@angular/core';\nimport { InputNumber, ThyPlacement } from 'ngx-tethys/core';\nimport { ThyTooltipDirective } from 'ngx-tethys/tooltip';\nimport { isUndefinedOrNull } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { from, Observable, Subject, Subscription } from 'rxjs';\nimport { debounceTime, take, takeUntil } from 'rxjs/operators';\n\n/**\n * 文本提示组件,支持组件 thy-flexible-text 和指令 [thyFlexibleText] 两种方式\n * @name thy-flexible-text,[thyFlexibleText]\n */\n@Component({\n selector: 'thy-flexible-text,[thyFlexibleText]',\n exportAs: 'thyFlexibleText',\n templateUrl: './flexible-text.component.html',\n hostDirectives: [ThyTooltipDirective],\n standalone: true\n})\nexport class ThyFlexibleText implements OnInit, AfterContentInit, OnDestroy {\n isOverflow = false;\n\n content: string | TemplateRef<HTMLElement>;\n\n placement: ThyPlacement;\n\n containerClass: string;\n\n subscription: Subscription | null = null;\n\n offset: number;\n\n /**\n * 触发提示方式\n * @type hover | focus | click\n * @default hover\n */\n @Input('thyTooltipTrigger') trigger: 'hover' | 'focus' | 'click';\n\n /**\n * 自定义class类,如果不设置默认会包含 `flexible-text-container`\n */\n @Input('thyContainerClass')\n set thyContainerClass(value: string) {\n this.containerClass = value;\n this.updateContainerClass();\n }\n\n get thyContainerClass(): string {\n return this.containerClass;\n }\n\n /**\n * 需要展示的全部内容\n * @type string | TemplateRef<HTMLElement>\n */\n @Input('thyTooltipContent') set thyContent(value: string | TemplateRef<HTMLElement>) {\n this.content = value;\n if (this.tooltipDirective) {\n this.tooltipDirective.content = this.content;\n }\n }\n\n /**\n * tooltip 的提示位置\n * @type top | bottom | left | right\n * @default top\n */\n @Input('thyTooltipPlacement') set thyPlacement(value: ThyPlacement) {\n this.placement = value;\n if (this.tooltipDirective) {\n this.tooltipDirective.placement = this.placement;\n }\n }\n\n /**\n * tooltip 偏移量\n */\n @Input('thyTooltipOffset') @InputNumber() set thyOffset(value: number) {\n this.offset = value;\n if (this.tooltipDirective) {\n this.tooltipDirective.tooltipOffset = this.offset;\n }\n }\n\n private destroy$ = new Subject<void>();\n\n private hostRenderer = useHostRenderer();\n\n constructor(\n private elementRef: ElementRef,\n private contentObserver: ContentObserver,\n private ngZone: NgZone,\n public tooltipDirective: ThyTooltipDirective\n ) {}\n\n static createResizeObserver(element: HTMLElement) {\n return new Observable(observer => {\n const resize = new ResizeObserver(entries => {\n observer.next(entries);\n });\n resize.observe(element);\n return () => {\n resize.disconnect();\n };\n });\n }\n\n ngOnInit() {\n this.updateContainerClass();\n if (this.placement) {\n this.tooltipDirective.placement = this.placement;\n }\n if (this.offset) {\n this.tooltipDirective.tooltipOffset = this.offset;\n }\n if (this.trigger) {\n this.tooltipDirective.trigger = this.trigger;\n }\n this.tooltipDirective.content = this.content;\n this.tooltipDirective.thyTooltipDisabled = true;\n }\n\n ngAfterContentInit() {\n // Note: the zone may be nooped through `BootstrapOptions` when bootstrapping the root module. This means\n // the `onStable` will never emit any value.\n const onStable$ = this.ngZone.isStable ? from(Promise.resolve()) : this.ngZone.onStable.pipe(take(1));\n // Normally this isn't in the zone, but it can cause performance regressions for apps\n // using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.\n this.ngZone.runOutsideAngular(() => {\n // Wait for the next time period to avoid blocking the js thread.\n onStable$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.contentObserver\n .observe(this.elementRef)\n .pipe(debounceTime(100), takeUntil(this.destroy$))\n .subscribe(() => {\n this.applyOverflow();\n });\n\n ThyFlexibleText.createResizeObserver(this.elementRef.nativeElement)\n .pipe(debounceTime(100), takeUntil(this.destroy$))\n .subscribe(() => {\n this.applyOverflow();\n });\n });\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.tooltipDirective.hide();\n }\n\n applyOverflow() {\n const nativeElement = this.elementRef.nativeElement;\n if (nativeElement.clientWidth < nativeElement.scrollWidth || nativeElement.clientHeight < nativeElement.scrollHeight) {\n this.isOverflow = true;\n } else {\n this.isOverflow = false;\n }\n this.tooltipDirective.thyTooltipDisabled = !this.isOverflow;\n }\n\n updateContainerClass() {\n const containerClass = isUndefinedOrNull(this.containerClass) ? 'flexible-text-container' : this.containerClass;\n const flexibleTextClass = {\n 'text-truncate': true,\n [containerClass]: containerClass !== ''\n };\n this.hostRenderer.updateClassByMap(flexibleTextClass);\n }\n}\n","<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyFlexibleText } from './flexible-text.component';\nimport { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { ObserversModule } from '@angular/cdk/observers';\n\n@NgModule({\n imports: [CommonModule, ThyTooltipModule, ObserversModule, ThyFlexibleText],\n exports: [ThyFlexibleText]\n})\nexport class ThyFlexibleTextModule {}\n","/**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"ngx-tethys-flexible-text.mjs","sources":["../../../src/flexible-text/flexible-text.component.ts","../../../src/flexible-text/flexible-text.component.html","../../../src/flexible-text/flexible-text.module.ts","../../../src/flexible-text/ngx-tethys-flexible-text.ts"],"sourcesContent":["import { ContentObserver } from '@angular/cdk/observers';\nimport { AfterContentInit, Component, ElementRef, Input, NgZone, OnDestroy, OnInit, TemplateRef, numberAttribute } from '@angular/core';\nimport { ThyPlacement } from 'ngx-tethys/core';\nimport { ThyTooltipDirective } from 'ngx-tethys/tooltip';\nimport { isUndefinedOrNull } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { from, Observable, Subject, Subscription } from 'rxjs';\nimport { debounceTime, take, takeUntil } from 'rxjs/operators';\n\n/**\n * 文本提示组件,支持组件 thy-flexible-text 和指令 [thyFlexibleText] 两种方式\n * @name thy-flexible-text,[thyFlexibleText]\n */\n@Component({\n selector: 'thy-flexible-text,[thyFlexibleText]',\n exportAs: 'thyFlexibleText',\n templateUrl: './flexible-text.component.html',\n hostDirectives: [ThyTooltipDirective],\n standalone: true\n})\nexport class ThyFlexibleText implements OnInit, AfterContentInit, OnDestroy {\n isOverflow = false;\n\n content: string | TemplateRef<HTMLElement>;\n\n placement: ThyPlacement;\n\n containerClass: string;\n\n subscription: Subscription | null = null;\n\n offset: number;\n\n /**\n * 触发提示方式\n * @type hover | focus | click\n * @default hover\n */\n @Input('thyTooltipTrigger') trigger: 'hover' | 'focus' | 'click';\n\n /**\n * 自定义class类,如果不设置默认会包含 `flexible-text-container`\n */\n @Input('thyContainerClass')\n set thyContainerClass(value: string) {\n this.containerClass = value;\n this.updateContainerClass();\n }\n\n get thyContainerClass(): string {\n return this.containerClass;\n }\n\n /**\n * 需要展示的全部内容\n * @type string | TemplateRef<HTMLElement>\n */\n @Input('thyTooltipContent') set thyContent(value: string | TemplateRef<HTMLElement>) {\n this.content = value;\n if (this.tooltipDirective) {\n this.tooltipDirective.content = this.content;\n }\n }\n\n /**\n * tooltip 的提示位置\n * @type top | bottom | left | right\n * @default top\n */\n @Input('thyTooltipPlacement') set thyPlacement(value: ThyPlacement) {\n this.placement = value;\n if (this.tooltipDirective) {\n this.tooltipDirective.placement = this.placement;\n }\n }\n\n /**\n * tooltip 偏移量\n */\n @Input({ alias: 'thyTooltipOffset', transform: numberAttribute }) set thyOffset(value: number) {\n this.offset = value;\n if (this.tooltipDirective) {\n this.tooltipDirective.tooltipOffset = this.offset;\n }\n }\n\n private destroy$ = new Subject<void>();\n\n private hostRenderer = useHostRenderer();\n\n constructor(\n private elementRef: ElementRef,\n private contentObserver: ContentObserver,\n private ngZone: NgZone,\n public tooltipDirective: ThyTooltipDirective\n ) {}\n\n static createResizeObserver(element: HTMLElement) {\n return new Observable(observer => {\n const resize = new ResizeObserver(entries => {\n observer.next(entries);\n });\n resize.observe(element);\n return () => {\n resize.disconnect();\n };\n });\n }\n\n ngOnInit() {\n this.updateContainerClass();\n if (this.placement) {\n this.tooltipDirective.placement = this.placement;\n }\n if (this.offset) {\n this.tooltipDirective.tooltipOffset = this.offset;\n }\n if (this.trigger) {\n this.tooltipDirective.trigger = this.trigger;\n }\n this.tooltipDirective.content = this.content;\n this.tooltipDirective.thyTooltipDisabled = true;\n }\n\n ngAfterContentInit() {\n // Note: the zone may be nooped through `BootstrapOptions` when bootstrapping the root module. This means\n // the `onStable` will never emit any value.\n const onStable$ = this.ngZone.isStable ? from(Promise.resolve()) : this.ngZone.onStable.pipe(take(1));\n // Normally this isn't in the zone, but it can cause performance regressions for apps\n // using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.\n this.ngZone.runOutsideAngular(() => {\n // Wait for the next time period to avoid blocking the js thread.\n onStable$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.contentObserver\n .observe(this.elementRef)\n .pipe(debounceTime(100), takeUntil(this.destroy$))\n .subscribe(() => {\n this.applyOverflow();\n });\n\n ThyFlexibleText.createResizeObserver(this.elementRef.nativeElement)\n .pipe(debounceTime(100), takeUntil(this.destroy$))\n .subscribe(() => {\n this.applyOverflow();\n });\n });\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.tooltipDirective.hide();\n }\n\n applyOverflow() {\n const nativeElement = this.elementRef.nativeElement;\n if (nativeElement.clientWidth < nativeElement.scrollWidth || nativeElement.clientHeight < nativeElement.scrollHeight) {\n this.isOverflow = true;\n } else {\n this.isOverflow = false;\n }\n this.tooltipDirective.thyTooltipDisabled = !this.isOverflow;\n }\n\n updateContainerClass() {\n const containerClass = isUndefinedOrNull(this.containerClass) ? 'flexible-text-container' : this.containerClass;\n const flexibleTextClass = {\n 'text-truncate': true,\n [containerClass]: containerClass !== ''\n };\n this.hostRenderer.updateClassByMap(flexibleTextClass);\n }\n}\n","<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyFlexibleText } from './flexible-text.component';\nimport { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { ObserversModule } from '@angular/cdk/observers';\n\n@NgModule({\n imports: [CommonModule, ThyTooltipModule, ObserversModule, ThyFlexibleText],\n exports: [ThyFlexibleText]\n})\nexport class ThyFlexibleTextModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AASA;;;AAGG;MAQU,eAAe,CAAA;AAoBxB;;AAEG;IACH,IACI,iBAAiB,CAAC,KAAa,EAAA;AAC/B,QAAA,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC/B;AAED,IAAA,IAAI,iBAAiB,GAAA;QACjB,OAAO,IAAI,CAAC,cAAc,CAAC;KAC9B;AAED;;;AAGG;IACH,IAAgC,UAAU,CAAC,KAAwC,EAAA;AAC/E,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;AACrB,QAAA,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACvB,IAAI,CAAC,gBAAgB,CAAC,OAAO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gBAYQ,YAAY,EAAA,CAAA;sBAA7C,KAAK;uBAAC,qBAAqB,CAAA;gBAU0C,SAAS,EAAA,CAAA;sBAA9E,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA,EAAE,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;;;MErEvD,qBAAqB,CAAA;8GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAArB,qBAAqB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAChE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;AAEhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,EAHpB,OAAA,EAAA,CAAA,YAAY,EAAE,gBAAgB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGhD,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,CAAC;oBAC3E,OAAO,EAAE,CAAC,eAAe,CAAC;AAC7B,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -4,16 +4,14 @@ import { ThyInputModule } from 'ngx-tethys/input';
|
|
|
4
4
|
import { ThyTooltipDirective, ThyTooltipModule } from 'ngx-tethys/tooltip';
|
|
5
5
|
import { NgClass, NgFor, NgIf, NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { InjectionToken, Injectable, Optional, Inject, Directive, Input, HostBinding, ContentChildren, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChild, EventEmitter, Output, HostListener, forwardRef, NgModule } from '@angular/core';
|
|
7
|
+
import { InjectionToken, Injectable, Optional, Inject, Directive, Input, HostBinding, ContentChildren, booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChild, EventEmitter, Output, HostListener, forwardRef, NgModule } from '@angular/core';
|
|
8
8
|
import * as i1 from '@angular/forms';
|
|
9
9
|
import { NgForm, FormGroupDirective, NgControl, NG_ASYNC_VALIDATORS, Validators, NG_VALIDATORS, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
10
|
-
import { __decorate, __metadata } from 'tslib';
|
|
11
|
-
import * as i1$1 from 'ngx-tethys/core';
|
|
12
|
-
import { InputBoolean } from 'ngx-tethys/core';
|
|
13
10
|
import { helpers, isUndefinedOrNull, keycodes, coerceBooleanProperty } from 'ngx-tethys/util';
|
|
14
11
|
import { useHostRenderer } from '@tethys/cdk/dom';
|
|
15
12
|
import { of, Subject } from 'rxjs';
|
|
16
13
|
import { debounceTime, distinctUntilChanged, filter, switchMap, takeUntil, map, catchError } from 'rxjs/operators';
|
|
14
|
+
import * as i1$1 from 'ngx-tethys/core';
|
|
17
15
|
|
|
18
16
|
const THY_VALIDATOR_CONFIG = new InjectionToken('VALIDATION_CONFIG');
|
|
19
17
|
const THY_FORM_CONFIG = new InjectionToken('THY_FORM_CONFIG');
|
|
@@ -577,19 +575,16 @@ class ThyFormGroupError {
|
|
|
577
575
|
}
|
|
578
576
|
}
|
|
579
577
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyFormGroupError, deps: [{ token: ThyFormDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
580
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
578
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.2.3", type: ThyFormGroupError, isStandalone: true, selector: "thy-form-group-error", inputs: { thyShowFirst: ["thyShowFirst", "thyShowFirst", booleanAttribute], thyErrors: "thyErrors" }, host: { properties: { "class.form-group": "this._isFormGroup", "class.row": "this.isHorizontal" } }, ngImport: i0, template: "<div [ngClass]=\"{ 'col-sm-10 offset-sm-2 col-form-control': isHorizontal }\">\n <thy-alert *ngFor=\"let error of thyErrors\" thyType=\"danger\" [thyMessage]=\"error\"></thy-alert>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ThyAlert, selector: "thy-alert", inputs: ["thyType", "thyTheme", "thyMessage", "thyIcon", "thyCloseable"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
581
579
|
}
|
|
582
|
-
__decorate([
|
|
583
|
-
InputBoolean(),
|
|
584
|
-
__metadata("design:type", Object)
|
|
585
|
-
], ThyFormGroupError.prototype, "thyShowFirst", void 0);
|
|
586
580
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyFormGroupError, decorators: [{
|
|
587
581
|
type: Component,
|
|
588
582
|
args: [{ selector: 'thy-form-group-error', encapsulation: ViewEncapsulation.None, standalone: true, imports: [NgClass, NgFor, ThyAlert], template: "<div [ngClass]=\"{ 'col-sm-10 offset-sm-2 col-form-control': isHorizontal }\">\n <thy-alert *ngFor=\"let error of thyErrors\" thyType=\"danger\" [thyMessage]=\"error\"></thy-alert>\n</div>\n" }]
|
|
589
583
|
}], ctorParameters: () => [{ type: ThyFormDirective, decorators: [{
|
|
590
584
|
type: Optional
|
|
591
585
|
}] }], propDecorators: { thyShowFirst: [{
|
|
592
|
-
type: Input
|
|
586
|
+
type: Input,
|
|
587
|
+
args: [{ transform: booleanAttribute }]
|
|
593
588
|
}], thyErrors: [{
|
|
594
589
|
type: Input
|
|
595
590
|
}], _isFormGroup: [{
|
|
@@ -614,7 +609,7 @@ class ThyFormGroupLabelDirective {
|
|
|
614
609
|
}
|
|
615
610
|
}
|
|
616
611
|
set thyLabelRequired(value) {
|
|
617
|
-
this.labelRequired =
|
|
612
|
+
this.labelRequired = value;
|
|
618
613
|
}
|
|
619
614
|
constructor(thyTranslate) {
|
|
620
615
|
this.thyTranslate = thyTranslate;
|
|
@@ -622,7 +617,7 @@ class ThyFormGroupLabelDirective {
|
|
|
622
617
|
this._isFormGroupLabel = true;
|
|
623
618
|
}
|
|
624
619
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyFormGroupLabelDirective, deps: [{ token: i1$1.ThyTranslate }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
625
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
620
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.2.3", type: ThyFormGroupLabelDirective, isStandalone: true, selector: "[thyFormGroupLabel]", inputs: { thyLabelText: "thyLabelText", thyLabelTranslateKey: "thyLabelTranslateKey", thyLabelRequired: ["thyLabelRequired", "thyLabelRequired", booleanAttribute] }, host: { properties: { "class.label-required": "this.labelRequired", "class.col-form-label": "this._isFormGroupLabel" } }, ngImport: i0 }); }
|
|
626
621
|
}
|
|
627
622
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyFormGroupLabelDirective, decorators: [{
|
|
628
623
|
type: Directive,
|
|
@@ -641,7 +636,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
641
636
|
}], thyLabelTranslateKey: [{
|
|
642
637
|
type: Input
|
|
643
638
|
}], thyLabelRequired: [{
|
|
644
|
-
type: Input
|
|
639
|
+
type: Input,
|
|
640
|
+
args: [{ transform: booleanAttribute }]
|
|
645
641
|
}] } });
|
|
646
642
|
|
|
647
643
|
const internalIconMap = {
|
|
@@ -674,10 +670,10 @@ class ThyFormGroup {
|
|
|
674
670
|
* Label 是否显示必填项样式
|
|
675
671
|
*/
|
|
676
672
|
set thyLabelRequired(value) {
|
|
677
|
-
this.labelRequired =
|
|
673
|
+
this.labelRequired = value;
|
|
678
674
|
}
|
|
679
675
|
set thyLabelPaddingTopClear(value) {
|
|
680
|
-
this.labelPaddingTopClear =
|
|
676
|
+
this.labelPaddingTopClear = value;
|
|
681
677
|
}
|
|
682
678
|
/**
|
|
683
679
|
* 反馈图标,比如日期输入框显示日期的图标,常用输入 date 表示时间 wtf wtf-schedule-o
|
|
@@ -718,7 +714,7 @@ class ThyFormGroup {
|
|
|
718
714
|
* @default false
|
|
719
715
|
*/
|
|
720
716
|
set thyRowFill(value) {
|
|
721
|
-
this._rowFill =
|
|
717
|
+
this._rowFill = value;
|
|
722
718
|
}
|
|
723
719
|
constructor(thyParentForm, thyTranslate) {
|
|
724
720
|
this.thyParentForm = thyParentForm;
|
|
@@ -735,13 +731,8 @@ class ThyFormGroup {
|
|
|
735
731
|
this.isHorizontal = this.thyParentForm ? this.thyParentForm.isHorizontal : true;
|
|
736
732
|
}
|
|
737
733
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyFormGroup, deps: [{ token: ThyFormDirective, optional: true }, { token: i1$1.ThyTranslate }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
738
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
734
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.2.3", type: ThyFormGroup, isStandalone: true, selector: "thy-form-group", inputs: { thyLabelText: "thyLabelText", thyLabelTextTranslateKey: "thyLabelTextTranslateKey", thyLabelRequired: ["thyLabelRequired", "thyLabelRequired", booleanAttribute], thyLabelPaddingTopClear: ["thyLabelPaddingTopClear", "thyLabelPaddingTopClear", booleanAttribute], thyFeedbackIcon: "thyFeedbackIcon", thyTipsMode: "thyTipsMode", thyTips: "thyTips", thyTipsTranslateKey: "thyTipsTranslateKey", thyRowFill: ["thyRowFill", "thyRowFill", booleanAttribute] }, host: { properties: { "class.row-fill": "this._rowFill", "class.form-group": "this._isFormGroup", "class.row": "this.isHorizontal", "class.has-feedback": "this.hasFeedback" } }, queries: [{ propertyName: "contentTemplateRef", first: true, predicate: ["formGroup"], descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"contentTemplate || contentTemplateRef; else defaultTpl\">\n <ng-container [ngTemplateOutlet]=\"contentTemplate || contentTemplateRef\"></ng-container>\n <ng-container *ngIf=\"feedbackSvgIconName; else iconFont\">\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackSvgIconName\"></thy-icon>\n </ng-container>\n</ng-container>\n<ng-template #defaultTpl>\n <label\n *ngIf=\"!(!isHorizontal && !labelText)\"\n class=\"form-label \"\n [ngClass]=\"{\n 'col-sm-2 col-form-label': isHorizontal,\n 'pt-0': labelPaddingTopClear\n }\"\n >\n <span\n [ngClass]=\"{\n 'label-required': labelRequired\n }\"\n >{{ labelText }}</span\n >\n <thy-icon class=\"label-tips-icon\" *ngIf=\"tipMode === 'label' && tips\" thyIconName=\"question-circle\" [thyTooltip]=\"tips\"></thy-icon>\n </label>\n <div [ngClass]=\"{ 'col-sm-10 col-form-control': isHorizontal, 'position-relative': !isHorizontal }\">\n <ng-content></ng-content>\n <ng-container *ngIf=\"feedbackSvgIconName; else iconFont\">\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackSvgIconName\"></thy-icon>\n </ng-container>\n <span *ngIf=\"tipMode === 'default' && tips\" class=\"form-text text-desc\">{{ tips }}</span>\n </div>\n</ng-template>\n\n<ng-template #iconFont>\n <span *ngIf=\"feedbackIcon\" class=\"form-control-feedback {{ feedbackIcon }}\"></span>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
739
735
|
}
|
|
740
|
-
__decorate([
|
|
741
|
-
InputBoolean(),
|
|
742
|
-
__metadata("design:type", Boolean),
|
|
743
|
-
__metadata("design:paramtypes", [Boolean])
|
|
744
|
-
], ThyFormGroup.prototype, "thyRowFill", null);
|
|
745
736
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: ThyFormGroup, decorators: [{
|
|
746
737
|
type: Component,
|
|
747
738
|
args: [{ selector: 'thy-form-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, NgTemplateOutlet, ThyIcon, NgClass, ThyTooltipDirective], template: "<ng-container *ngIf=\"contentTemplate || contentTemplateRef; else defaultTpl\">\n <ng-container [ngTemplateOutlet]=\"contentTemplate || contentTemplateRef\"></ng-container>\n <ng-container *ngIf=\"feedbackSvgIconName; else iconFont\">\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackSvgIconName\"></thy-icon>\n </ng-container>\n</ng-container>\n<ng-template #defaultTpl>\n <label\n *ngIf=\"!(!isHorizontal && !labelText)\"\n class=\"form-label \"\n [ngClass]=\"{\n 'col-sm-2 col-form-label': isHorizontal,\n 'pt-0': labelPaddingTopClear\n }\"\n >\n <span\n [ngClass]=\"{\n 'label-required': labelRequired\n }\"\n >{{ labelText }}</span\n >\n <thy-icon class=\"label-tips-icon\" *ngIf=\"tipMode === 'label' && tips\" thyIconName=\"question-circle\" [thyTooltip]=\"tips\"></thy-icon>\n </label>\n <div [ngClass]=\"{ 'col-sm-10 col-form-control': isHorizontal, 'position-relative': !isHorizontal }\">\n <ng-content></ng-content>\n <ng-container *ngIf=\"feedbackSvgIconName; else iconFont\">\n <thy-icon class=\"form-control-feedback\" [thyIconName]=\"feedbackSvgIconName\"></thy-icon>\n </ng-container>\n <span *ngIf=\"tipMode === 'default' && tips\" class=\"form-text text-desc\">{{ tips }}</span>\n </div>\n</ng-template>\n\n<ng-template #iconFont>\n <span *ngIf=\"feedbackIcon\" class=\"form-control-feedback {{ feedbackIcon }}\"></span>\n</ng-template>\n" }]
|
|
@@ -764,9 +755,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
764
755
|
}], thyLabelTextTranslateKey: [{
|
|
765
756
|
type: Input
|
|
766
757
|
}], thyLabelRequired: [{
|
|
767
|
-
type: Input
|
|
758
|
+
type: Input,
|
|
759
|
+
args: [{ transform: booleanAttribute }]
|
|
768
760
|
}], thyLabelPaddingTopClear: [{
|
|
769
|
-
type: Input
|
|
761
|
+
type: Input,
|
|
762
|
+
args: [{ transform: booleanAttribute }]
|
|
770
763
|
}], thyFeedbackIcon: [{
|
|
771
764
|
type: Input
|
|
772
765
|
}], thyTipsMode: [{
|
|
@@ -776,7 +769,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
776
769
|
}], thyTipsTranslateKey: [{
|
|
777
770
|
type: Input
|
|
778
771
|
}], thyRowFill: [{
|
|
779
|
-
type: Input
|
|
772
|
+
type: Input,
|
|
773
|
+
args: [{ transform: booleanAttribute }]
|
|
780
774
|
}], contentTemplateRef: [{
|
|
781
775
|
type: ContentChild,
|
|
782
776
|
args: ['formGroup']
|