ngx-tethys 19.1.13 → 20.0.0-next.0
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 +18 -0
- package/action/index.d.ts +107 -3
- package/affix/index.d.ts +65 -2
- package/alert/index.d.ts +74 -3
- package/anchor/index.d.ts +118 -3
- package/arrow-switcher/index.d.ts +79 -2
- package/autocomplete/index.d.ts +280 -7
- package/avatar/index.d.ts +195 -5
- package/back-top/index.d.ts +68 -2
- package/badge/index.d.ts +87 -2
- package/breadcrumb/index.d.ts +71 -3
- package/button/index.d.ts +156 -4
- package/calendar/index.d.ts +161 -4
- package/card/index.d.ts +100 -4
- package/carousel/index.d.ts +210 -4
- package/cascader/index.d.ts +471 -5
- package/checkbox/index.d.ts +27 -2
- package/collapse/index.d.ts +108 -3
- package/color-picker/index.d.ts +494 -13
- package/comment/index.d.ts +53 -4
- package/copy/index.d.ts +59 -2
- package/core/index.d.ts +680 -15
- package/date-picker/index.d.ts +1148 -36
- package/date-range/index.d.ts +158 -4
- package/dialog/index.d.ts +393 -11
- package/divider/index.d.ts +60 -2
- package/dot/index.d.ts +56 -2
- package/drag-drop/index.d.ts +281 -9
- package/dropdown/index.d.ts +282 -6
- package/empty/index.d.ts +116 -3
- package/fesm2022/ngx-tethys-action.mjs +26 -26
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +14 -14
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-alert.mjs +19 -19
- package/fesm2022/ngx-tethys-alert.mjs.map +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +25 -25
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +20 -20
- package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
- package/fesm2022/ngx-tethys-autocomplete.mjs +41 -36
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +45 -45
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +15 -15
- package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
- package/fesm2022/ngx-tethys-badge.mjs +27 -27
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-breadcrumb.mjs +20 -20
- package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngx-tethys-button.mjs +57 -51
- package/fesm2022/ngx-tethys-button.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +29 -29
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +28 -28
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +29 -29
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +93 -87
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-checkbox.mjs +9 -9
- package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-tethys-collapse.mjs +24 -24
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +75 -73
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-comment.mjs +17 -17
- package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +15 -15
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-core.mjs +38 -38
- package/fesm2022/ngx-tethys-core.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +323 -305
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-range.mjs +23 -23
- package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dialog.mjs +56 -54
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +16 -16
- package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dot.mjs +20 -20
- package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
- package/fesm2022/ngx-tethys-drag-drop.mjs +20 -21
- package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dropdown.mjs +85 -83
- package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +28 -28
- package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
- package/fesm2022/ngx-tethys-flexible-text.mjs +13 -13
- package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +99 -95
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-fullscreen.mjs +22 -21
- package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +60 -60
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-guider.mjs +20 -20
- package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +4 -4
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-icon.mjs +20 -20
- package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +26 -26
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +28 -24
- package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input.mjs +72 -71
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-layout.mjs +128 -118
- package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +37 -37
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +11 -11
- package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
- package/fesm2022/ngx-tethys-mention.mjs +18 -18
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +57 -57
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs +43 -40
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +58 -58
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +35 -32
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +38 -38
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +46 -38
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +64 -57
- package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property-operation.mjs +11 -11
- package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +29 -29
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +23 -23
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-rate.mjs +28 -28
- package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
- package/fesm2022/ngx-tethys-resizable.mjs +38 -38
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-result.mjs +16 -16
- package/fesm2022/ngx-tethys-result.mjs.map +1 -1
- package/fesm2022/ngx-tethys-segment.mjs +23 -23
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +76 -64
- package/fesm2022/ngx-tethys-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-shared.mjs +163 -155
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +84 -84
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slide.mjs +50 -46
- package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +21 -21
- package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-space.mjs +16 -16
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-statistic.mjs +29 -29
- package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs +37 -37
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-strength.mjs +22 -22
- package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +19 -19
- package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs +22 -22
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +31 -31
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tag.mjs +18 -18
- package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
- package/fesm2022/ngx-tethys-testing.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +75 -74
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +28 -28
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tooltip.mjs +28 -28
- package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-tethys-transfer.mjs +36 -36
- package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree-select.mjs +58 -58
- package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree.mjs +77 -72
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +19 -19
- package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +68 -68
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-util.mjs.map +1 -1
- package/fesm2022/ngx-tethys-vote.mjs +25 -25
- package/fesm2022/ngx-tethys-vote.mjs.map +1 -1
- package/fesm2022/ngx-tethys-watermark.mjs +12 -12
- package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/flexible-text/index.d.ts +64 -2
- package/form/index.d.ts +405 -11
- package/fullscreen/index.d.ts +117 -6
- package/grid/index.d.ts +262 -7
- package/guider/index.d.ts +304 -8
- package/i18n/index.d.ts +1053 -6
- package/icon/index.d.ts +145 -4
- package/image/index.d.ts +263 -8
- package/index.d.ts +5 -5
- package/input/index.d.ts +281 -6
- package/input-number/index.d.ts +133 -2
- package/layout/index.d.ts +362 -10
- package/list/index.d.ts +182 -6
- package/loading/index.d.ts +34 -2
- package/mention/index.d.ts +147 -4
- package/menu/index.d.ts +191 -8
- package/message/index.d.ts +203 -8
- package/nav/index.d.ts +269 -6
- package/notify/index.d.ts +158 -7
- package/package.json +13 -13
- package/pagination/index.d.ts +248 -5
- package/popover/index.d.ts +339 -9
- package/progress/index.d.ts +154 -5
- package/property/index.d.ts +118 -3
- package/property-operation/index.d.ts +114 -3
- package/radio/index.d.ts +102 -4
- package/rate/index.d.ts +99 -3
- package/resizable/index.d.ts +197 -7
- package/result/index.d.ts +63 -2
- package/schematics/ng-update/migration-collection.json +4 -4
- package/schematics/ng-update/{update-19 → update-20}/index.js +1 -1
- package/schematics/ng-update/{update-19 → update-20}/index.spec.js +5 -5
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/index.d.ts +119 -4
- package/select/index.d.ts +332 -4
- package/shared/index.d.ts +516 -16
- package/skeleton/index.d.ts +301 -8
- package/slide/index.d.ts +270 -12
- package/slider/index.d.ts +117 -2
- package/space/index.d.ts +48 -2
- package/statistic/index.d.ts +124 -2
- package/stepper/index.d.ts +112 -5
- package/strength/index.d.ts +77 -2
- package/switch/index.d.ts +69 -2
- package/table/index.d.ts +670 -9
- package/tabs/index.d.ts +114 -4
- package/tag/index.d.ts +71 -3
- package/testing/index.d.ts +178 -7
- package/time-picker/index.d.ts +468 -7
- package/timeline/index.d.ts +109 -5
- package/tooltip/index.d.ts +198 -8
- package/transfer/index.d.ts +212 -4
- package/tree/index.d.ts +469 -5
- package/tree-select/index.d.ts +231 -3
- package/types/index.d.ts +22 -3
- package/typography/index.d.ts +69 -4
- package/upload/index.d.ts +253 -6
- package/util/index.d.ts +595 -14
- package/vote/index.d.ts +66 -2
- package/watermark/index.d.ts +75 -2
- package/action/action.component.d.ts +0 -76
- package/action/action.module.d.ts +0 -10
- package/action/actions.component.d.ts +0 -21
- package/affix/affix.component.d.ts +0 -54
- package/affix/affix.module.d.ts +0 -9
- package/affix/respond-events.d.ts +0 -9
- package/alert/alert.component.d.ts +0 -51
- package/alert/alert.directive.d.ts +0 -12
- package/alert/alert.module.d.ts +0 -10
- package/anchor/anchor-link.component.d.ts +0 -34
- package/anchor/anchor.component.d.ts +0 -68
- package/anchor/anchor.module.d.ts +0 -11
- package/anchor/anchor.token.d.ts +0 -9
- package/arrow-switcher/arrow-switcher.component.d.ts +0 -64
- package/arrow-switcher/module.d.ts +0 -12
- package/autocomplete/autocomplete.component.d.ts +0 -79
- package/autocomplete/autocomplete.trigger.directive.d.ts +0 -77
- package/autocomplete/module.d.ts +0 -18
- package/autocomplete/overlay/autocomplete-animations.d.ts +0 -8
- package/autocomplete/overlay/autocomplete-container.component.d.ts +0 -33
- package/autocomplete/overlay/autocomplete-ref.d.ts +0 -14
- package/autocomplete/overlay/autocomplete.config.d.ts +0 -36
- package/autocomplete/overlay/autocomplete.options.d.ts +0 -2
- package/autocomplete/overlay/autocomplete.service.d.ts +0 -32
- package/avatar/avatar-list/avatar-list.component.d.ts +0 -41
- package/avatar/avatar.component.d.ts +0 -95
- package/avatar/avatar.module.d.ts +0 -11
- package/avatar/avatar.pipe.d.ts +0 -30
- package/avatar/avatar.service.d.ts +0 -21
- package/back-top/back-top.component.d.ts +0 -57
- package/back-top/back-top.module.d.ts +0 -9
- package/badge/badge.component.d.ts +0 -75
- package/badge/badge.module.d.ts +0 -9
- package/breadcrumb/breadcrumb-item.component.d.ts +0 -15
- package/breadcrumb/breadcrumb.component.d.ts +0 -44
- package/breadcrumb/module.d.ts +0 -12
- package/button/button-group.component.d.ts +0 -32
- package/button/button-icon.component.d.ts +0 -51
- package/button/button.component.d.ts +0 -61
- package/button/button.module.d.ts +0 -11
- package/calendar/calendar-cells.d.ts +0 -17
- package/calendar/calendar-header.component.d.ts +0 -51
- package/calendar/calendar.component.d.ts +0 -78
- package/calendar/module.d.ts +0 -18
- package/card/card.component.d.ts +0 -28
- package/card/card.module.d.ts +0 -10
- package/card/content.component.d.ts +0 -21
- package/card/header.component.d.ts +0 -42
- package/carousel/carousel-item.directive.d.ts +0 -14
- package/carousel/carousel.component.d.ts +0 -112
- package/carousel/carousel.service.d.ts +0 -19
- package/carousel/carousel.token.d.ts +0 -7
- package/carousel/engine/carousel-base.d.ts +0 -27
- package/carousel/engine/carousel-fade.d.ts +0 -15
- package/carousel/engine/carousel-noop.d.ts +0 -14
- package/carousel/engine/carousel-slide.d.ts +0 -16
- package/carousel/engine/index.d.ts +0 -4
- package/carousel/module.d.ts +0 -11
- package/carousel/typings.d.ts +0 -20
- package/cascader/cascader-li.component.d.ts +0 -24
- package/cascader/cascader-search-option.component.d.ts +0 -21
- package/cascader/cascader.component.d.ts +0 -284
- package/cascader/cascader.pipe.d.ts +0 -11
- package/cascader/cascader.service.d.ts +0 -97
- package/cascader/module.d.ts +0 -19
- package/cascader/types.d.ts +0 -23
- package/checkbox/checkbox.component.d.ts +0 -16
- package/checkbox/module.d.ts +0 -9
- package/collapse/collapse-item.component.d.ts +0 -52
- package/collapse/collapse.component.d.ts +0 -29
- package/collapse/collapse.token.d.ts +0 -15
- package/collapse/module.d.ts +0 -13
- package/color-picker/color-picker-custom-panel.component.d.ts +0 -17
- package/color-picker/color-picker-panel.component.d.ts +0 -28
- package/color-picker/color-picker.component.d.ts +0 -100
- package/color-picker/constant.d.ts +0 -1
- package/color-picker/coordinates.directive.d.ts +0 -28
- package/color-picker/helpers/color.class.d.ts +0 -32
- package/color-picker/helpers/colors-table.class.d.ts +0 -154
- package/color-picker/helpers/rgba.class.d.ts +0 -20
- package/color-picker/module.d.ts +0 -22
- package/color-picker/parts/alpha/alpha.component.d.ts +0 -28
- package/color-picker/parts/hue/hue.component.d.ts +0 -26
- package/color-picker/parts/indicator/indicator.component.d.ts +0 -13
- package/color-picker/parts/inputs/inputs.component.d.ts +0 -18
- package/color-picker/parts/saturation/saturation.component.d.ts +0 -28
- package/comment/comment-actions.directive.d.ts +0 -8
- package/comment/comment-content.directive.d.ts +0 -8
- package/comment/comment.component.d.ts +0 -24
- package/comment/comment.module.d.ts +0 -13
- package/copy/copy.directive.d.ts +0 -47
- package/copy/module.d.ts +0 -9
- package/core/animation/animation-consts.d.ts +0 -22
- package/core/animation/collapse.d.ts +0 -2
- package/core/animation/fade.d.ts +0 -2
- package/core/animation/index.d.ts +0 -1
- package/core/animation/public-api.d.ts +0 -5
- package/core/animation/thumb.d.ts +0 -6
- package/core/animation/zoom.d.ts +0 -4
- package/core/behaviors/constructor.d.ts +0 -5
- package/core/behaviors/control-value-accessor.d.ts +0 -7
- package/core/behaviors/decorators.d.ts +0 -9
- package/core/behaviors/disabled.d.ts +0 -7
- package/core/behaviors/focus-control.d.ts +0 -14
- package/core/behaviors/index.d.ts +0 -10
- package/core/behaviors/initialized.d.ts +0 -6
- package/core/behaviors/loading-done.d.ts +0 -5
- package/core/behaviors/mixin.d.ts +0 -5
- package/core/behaviors/tabindex.d.ts +0 -11
- package/core/behaviors/unsubscribe.d.ts +0 -11
- package/core/click-positioner.d.ts +0 -15
- package/core/color/color.d.ts +0 -9
- package/core/color/index.d.ts +0 -1
- package/core/debounce-time.d.ts +0 -8
- package/core/event-dispatchers/index.d.ts +0 -1
- package/core/overlay/abstract-overlay-container.d.ts +0 -43
- package/core/overlay/abstract-overlay-ref.d.ts +0 -101
- package/core/overlay/abstract-overlay.config.d.ts +0 -131
- package/core/overlay/abstract-overlay.service.d.ts +0 -56
- package/core/overlay/index.d.ts +0 -9
- package/core/overlay/interface.d.ts +0 -5
- package/core/overlay/overlay-position-map.d.ts +0 -5
- package/core/overlay/overlay.directive.d.ts +0 -51
- package/core/overlay/portal-directives.d.ts +0 -14
- package/core/overlay/utils.d.ts +0 -14
- package/core/request-animation.d.ts +0 -2
- package/core/scroll-to.service.d.ts +0 -4
- package/core/scroll.d.ts +0 -22
- package/core/spacing/index.d.ts +0 -1
- package/core/spacing/spacing.d.ts +0 -2
- package/core/store/action-state.d.ts +0 -5
- package/core/store/action.d.ts +0 -4
- package/core/store/actions-stream.d.ts +0 -14
- package/core/store/index.d.ts +0 -3
- package/core/store/store.d.ts +0 -43
- package/core/store/types.d.ts +0 -12
- package/core/store/utils.d.ts +0 -2
- package/core/theme/enum.d.ts +0 -5
- package/core/theme/index.d.ts +0 -3
- package/core/theme/store.d.ts +0 -12
- package/core/theme/theme.d.ts +0 -2
- package/core/translate.d.ts +0 -8
- package/core/update-host-class.service.d.ts +0 -15
- package/date-picker/abstract-picker.component.d.ts +0 -174
- package/date-picker/abstract-picker.directive.d.ts +0 -57
- package/date-picker/base-picker.component.d.ts +0 -49
- package/date-picker/date-helper.service.d.ts +0 -20
- package/date-picker/date-picker.component.d.ts +0 -15
- package/date-picker/date-picker.config.d.ts +0 -27
- package/date-picker/date-picker.directive.d.ts +0 -13
- package/date-picker/date-picker.module.d.ts +0 -24
- package/date-picker/date-picker.service.d.ts +0 -14
- package/date-picker/inner-types.d.ts +0 -19
- package/date-picker/lib/calendar/calendar-footer.component.d.ts +0 -37
- package/date-picker/lib/calendar/calendar-header.component.d.ts +0 -44
- package/date-picker/lib/calendar/calendar-table.component.d.ts +0 -41
- package/date-picker/lib/date/date-header.component.d.ts +0 -10
- package/date-picker/lib/date/date-table-cell.component.d.ts +0 -18
- package/date-picker/lib/date/date-table.component.d.ts +0 -23
- package/date-picker/lib/date/types.d.ts +0 -41
- package/date-picker/lib/date-carousel/date-carousel.component.d.ts +0 -65
- package/date-picker/lib/decade/decade-header.component.d.ts +0 -14
- package/date-picker/lib/decade/decade-table.component.d.ts +0 -21
- package/date-picker/lib/lib-packer.module.d.ts +0 -28
- package/date-picker/lib/month/month-header.component.d.ts +0 -10
- package/date-picker/lib/month/month-table.component.d.ts +0 -22
- package/date-picker/lib/popups/date-popup.component.d.ts +0 -99
- package/date-picker/lib/popups/inner-popup.component.d.ts +0 -43
- package/date-picker/lib/quarter/quarter-table.component.d.ts +0 -21
- package/date-picker/lib/year/year-header.component.d.ts +0 -14
- package/date-picker/lib/year/year-table.component.d.ts +0 -21
- package/date-picker/month-picker.component.d.ts +0 -19
- package/date-picker/picker.component.d.ts +0 -76
- package/date-picker/picker.pipes.d.ts +0 -40
- package/date-picker/picker.util.d.ts +0 -30
- package/date-picker/picker.validators.d.ts +0 -22
- package/date-picker/quarter-picker.component.d.ts +0 -22
- package/date-picker/range-picker.component.d.ts +0 -16
- package/date-picker/range-picker.directive.d.ts +0 -14
- package/date-picker/standard-types.d.ts +0 -45
- package/date-picker/week-picker.component.d.ts +0 -15
- package/date-picker/year-picker.component.d.ts +0 -22
- package/date-range/date-range.class.d.ts +0 -29
- package/date-range/date-range.component.d.ts +0 -89
- package/date-range/module.d.ts +0 -15
- package/date-range/optional-dates/optional-dates.component.d.ts +0 -25
- package/dialog/body/dialog-body.component.d.ts +0 -18
- package/dialog/confirm/confirm.component.d.ts +0 -29
- package/dialog/confirm/token.d.ts +0 -8
- package/dialog/confirm.config.d.ts +0 -71
- package/dialog/dialog-animations.d.ts +0 -8
- package/dialog/dialog-container.component.d.ts +0 -46
- package/dialog/dialog-ref.d.ts +0 -32
- package/dialog/dialog.config.d.ts +0 -79
- package/dialog/dialog.module.d.ts +0 -20
- package/dialog/dialog.options.d.ts +0 -2
- package/dialog/dialog.service.d.ts +0 -52
- package/dialog/footer/dialog-footer.component.d.ts +0 -33
- package/dialog/header/dialog-header.component.d.ts +0 -47
- package/divider/divider.component.d.ts +0 -47
- package/divider/divider.module.d.ts +0 -10
- package/dot/dot.component.d.ts +0 -45
- package/dot/dot.module.d.ts +0 -8
- package/drag-drop/drag-content.directive.d.ts +0 -15
- package/drag-drop/drag-drop.class.d.ts +0 -36
- package/drag-drop/drag-drop.service.d.ts +0 -27
- package/drag-drop/drag-drop.token.d.ts +0 -24
- package/drag-drop/drag-handle.directive.d.ts +0 -24
- package/drag-drop/drag-ref.d.ts +0 -47
- package/drag-drop/drag.directive.d.ts +0 -39
- package/drag-drop/drop-container.directive.d.ts +0 -70
- package/drag-drop/module.d.ts +0 -14
- package/dropdown/dropdown-active.directive.d.ts +0 -27
- package/dropdown/dropdown-menu-item.directive.d.ts +0 -95
- package/dropdown/dropdown-menu.component.d.ts +0 -54
- package/dropdown/dropdown-submenu.component.d.ts +0 -23
- package/dropdown/dropdown.directive.d.ts +0 -77
- package/dropdown/module.d.ts +0 -13
- package/empty/empty.component.d.ts +0 -92
- package/empty/empty.config.d.ts +0 -10
- package/empty/empty.module.d.ts +0 -10
- package/empty/svgs.d.ts +0 -4
- package/flexible-text/flexible-text.component.d.ts +0 -53
- package/flexible-text/flexible-text.module.d.ts +0 -10
- package/form/form-group-error/form-group-error.component.d.ts +0 -21
- package/form/form-group-label.directive.d.ts +0 -18
- package/form/form-group.component.d.ts +0 -68
- package/form/form-submit.directive.d.ts +0 -18
- package/form/form-validator-loader.d.ts +0 -28
- package/form/form-validator.service.d.ts +0 -54
- package/form/form.class.d.ts +0 -54
- package/form/form.directive.d.ts +0 -56
- package/form/from-group-footer/form-group-footer.component.d.ts +0 -27
- package/form/module.d.ts +0 -25
- package/form/validator/confirm-validator.directive.d.ts +0 -17
- package/form/validator/index.d.ts +0 -4
- package/form/validator/max-validator.directive.d.ts +0 -15
- package/form/validator/min-validator.directive.d.ts +0 -15
- package/form/validator/unique-validator.directive.d.ts +0 -16
- package/fullscreen/fullscreen-launch.directive.d.ts +0 -9
- package/fullscreen/fullscreen-ref.d.ts +0 -25
- package/fullscreen/fullscreen.component.d.ts +0 -34
- package/fullscreen/fullscreen.config.d.ts +0 -23
- package/fullscreen/fullscreen.module.d.ts +0 -8
- package/fullscreen/fullscreen.service.d.ts +0 -20
- package/grid/flex.d.ts +0 -85
- package/grid/grid.token.d.ts +0 -7
- package/grid/grid.type.d.ts +0 -5
- package/grid/module.d.ts +0 -11
- package/grid/thy-col.directive.d.ts +0 -33
- package/grid/thy-grid-item.component.d.ts +0 -28
- package/grid/thy-grid.component.d.ts +0 -71
- package/grid/thy-row.directive.d.ts +0 -30
- package/guider/guider-hint/guider-hint.component.d.ts +0 -28
- package/guider/guider-manager.d.ts +0 -23
- package/guider/guider-ref.d.ts +0 -42
- package/guider/guider-step-ref.d.ts +0 -44
- package/guider/guider.class.d.ts +0 -95
- package/guider/guider.directive.d.ts +0 -21
- package/guider/guider.interface.d.ts +0 -26
- package/guider/guider.module.d.ts +0 -13
- package/guider/guider.service.d.ts +0 -25
- package/guider/utils.d.ts +0 -4
- package/i18n/i18n.d.ts +0 -191
- package/i18n/i18n.service.d.ts +0 -19
- package/i18n/i18n.token.d.ts +0 -8
- package/i18n/locale.d.ts +0 -4
- package/i18n/locales/de-de.d.ts +0 -162
- package/i18n/locales/en-us.d.ts +0 -183
- package/i18n/locales/index.d.ts +0 -5
- package/i18n/locales/ja-jp.d.ts +0 -162
- package/i18n/locales/zh-hans.d.ts +0 -162
- package/i18n/locales/zh-hant.d.ts +0 -162
- package/i18n/util.d.ts +0 -3
- package/icon/config.d.ts +0 -2
- package/icon/icon-registry.d.ts +0 -84
- package/icon/icon.component.d.ts +0 -47
- package/icon/icon.module.d.ts +0 -9
- package/image/image-group.component.d.ts +0 -16
- package/image/image.class.d.ts +0 -38
- package/image/image.config.d.ts +0 -21
- package/image/image.directive.d.ts +0 -50
- package/image/image.service.d.ts +0 -30
- package/image/image.token.d.ts +0 -17
- package/image/module.d.ts +0 -19
- package/image/preview/image-preview-ref.d.ts +0 -14
- package/image/preview/image-preview.component.d.ts +0 -73
- package/image/utils.d.ts +0 -1
- package/input/input-count.component.d.ts +0 -27
- package/input/input-group.component.d.ts +0 -71
- package/input/input-search.component.d.ts +0 -70
- package/input/input.component.d.ts +0 -82
- package/input/input.directive.d.ts +0 -26
- package/input/module.d.ts +0 -16
- package/input-number/input-number.component.d.ts +0 -115
- package/input-number/module.d.ts +0 -13
- package/layout/content-main.component.d.ts +0 -19
- package/layout/content-section.component.d.ts +0 -19
- package/layout/content.component.d.ts +0 -19
- package/layout/header.component.d.ts +0 -69
- package/layout/layout.component.d.ts +0 -22
- package/layout/layout.module.d.ts +0 -21
- package/layout/sidebar-content.component.d.ts +0 -19
- package/layout/sidebar-footer.component.d.ts +0 -19
- package/layout/sidebar-header.component.d.ts +0 -40
- package/layout/sidebar.component.d.ts +0 -123
- package/list/list-item-meta.component.d.ts +0 -25
- package/list/list-item.component.d.ts +0 -9
- package/list/list.component.d.ts +0 -14
- package/list/list.module.d.ts +0 -13
- package/list/selection/selection-list.d.ts +0 -116
- package/list/selection/selection.interface.d.ts +0 -8
- package/loading/loading.component.d.ts +0 -24
- package/loading/loading.module.d.ts +0 -8
- package/mention/adapter/adapter.d.ts +0 -19
- package/mention/adapter/editable.adapter.d.ts +0 -9
- package/mention/adapter/index.d.ts +0 -7
- package/mention/adapter/textarea.adapter.d.ts +0 -11
- package/mention/caret-positioner.d.ts +0 -19
- package/mention/interfaces.d.ts +0 -61
- package/mention/mention.directive.d.ts +0 -43
- package/mention/mention.module.d.ts +0 -13
- package/mention/suggestions/suggestions.component.d.ts +0 -28
- package/menu/divider/menu-divider.component.d.ts +0 -12
- package/menu/group/menu-group.component.d.ts +0 -61
- package/menu/item/action/menu-item-action.component.d.ts +0 -34
- package/menu/item/icon/menu-item-icon.component.d.ts +0 -18
- package/menu/item/menu-item.component.d.ts +0 -20
- package/menu/item/name/menu-item-name.component.d.ts +0 -17
- package/menu/menu.component.d.ts +0 -23
- package/menu/menu.module.d.ts +0 -16
- package/message/abstract/abstract-message-container.component.d.ts +0 -13
- package/message/abstract/abstract-message-queue.service.d.ts +0 -13
- package/message/abstract/abstract-message-ref.d.ts +0 -18
- package/message/abstract/abstract-message.component.d.ts +0 -35
- package/message/abstract/abstract-message.service.d.ts +0 -17
- package/message/abstract/index.d.ts +0 -5
- package/message/message-container.component.d.ts +0 -12
- package/message/message-queue.service.d.ts +0 -11
- package/message/message-ref.d.ts +0 -4
- package/message/message.component.d.ts +0 -13
- package/message/message.config.d.ts +0 -29
- package/message/message.service.d.ts +0 -36
- package/message/module.d.ts +0 -13
- package/nav/icon-nav/icon-nav-link.directive.d.ts +0 -10
- package/nav/icon-nav/icon-nav.component.d.ts +0 -15
- package/nav/nav-ink-bar.directive.d.ts +0 -22
- package/nav/nav-item.directive.d.ts +0 -60
- package/nav/nav.component.d.ts +0 -142
- package/nav/nav.module.d.ts +0 -17
- package/nav/nav.pipe.d.ts +0 -11
- package/notify/module.d.ts +0 -13
- package/notify/notify-container.component.d.ts +0 -12
- package/notify/notify-queue.service.d.ts +0 -15
- package/notify/notify-ref.d.ts +0 -4
- package/notify/notify.component.d.ts +0 -19
- package/notify/notify.config.d.ts +0 -55
- package/notify/notify.service.d.ts +0 -42
- package/pagination/pagination.class.d.ts +0 -79
- package/pagination/pagination.component.d.ts +0 -132
- package/pagination/pagination.config.d.ts +0 -8
- package/pagination/pagination.module.d.ts +0 -13
- package/pagination/pagination.pipe.d.ts +0 -17
- package/popover/body/popover-body.component.d.ts +0 -10
- package/popover/header/popover-header.component.d.ts +0 -35
- package/popover/module.d.ts +0 -14
- package/popover/popover-animations.d.ts +0 -8
- package/popover/popover-container.component.d.ts +0 -38
- package/popover/popover-ref.d.ts +0 -14
- package/popover/popover.config.d.ts +0 -110
- package/popover/popover.directive.d.ts +0 -67
- package/popover/popover.options.d.ts +0 -2
- package/popover/popover.service.d.ts +0 -58
- package/progress/interfaces.d.ts +0 -23
- package/progress/progress-circle.component.d.ts +0 -43
- package/progress/progress-strip.component.d.ts +0 -23
- package/progress/progress.component.d.ts +0 -59
- package/progress/progress.module.d.ts +0 -11
- package/property/module.d.ts +0 -11
- package/property/properties.component.d.ts +0 -25
- package/property/property-item.component.d.ts +0 -80
- package/property-operation/group/property-operation-group.component.d.ts +0 -10
- package/property-operation/module.d.ts +0 -12
- package/property-operation/property-operation.component.d.ts +0 -92
- package/public-api.d.ts +0 -1
- package/radio/button/radio-button.component.d.ts +0 -18
- package/radio/group/radio-group.component.d.ts +0 -46
- package/radio/module.d.ts +0 -11
- package/radio/radio.component.d.ts +0 -22
- package/radio/radio.token.d.ts +0 -12
- package/rate/module.d.ts +0 -13
- package/rate/rate-item.component.d.ts +0 -17
- package/rate/rate.component.d.ts +0 -69
- package/resizable/interface.d.ts +0 -12
- package/resizable/module.d.ts +0 -10
- package/resizable/resizable.directive.d.ts +0 -91
- package/resizable/resizable.service.d.ts +0 -32
- package/resizable/resize-handle.component.d.ts +0 -31
- package/resizable/resize-handles.component.d.ts +0 -21
- package/resizable/utils.d.ts +0 -3
- package/result/result.component.d.ts +0 -54
- package/result/result.module.d.ts +0 -8
- package/segment/segment-item.component.d.ts +0 -34
- package/segment/segment.component.d.ts +0 -55
- package/segment/segment.module.d.ts +0 -11
- package/segment/segment.token.d.ts +0 -16
- package/segment/types.d.ts +0 -5
- package/select/custom-select/custom-select.component.d.ts +0 -271
- package/select/module.d.ts +0 -16
- package/select/native-select/native-select.component.d.ts +0 -30
- package/select/select.config.d.ts +0 -34
- package/shared/base-form-check.component.d.ts +0 -51
- package/shared/directives/string-or-template-outlet.directive.d.ts +0 -17
- package/shared/directives/thy-autofocus.directive.d.ts +0 -23
- package/shared/directives/thy-contextmenu.directive.d.ts +0 -17
- package/shared/directives/thy-ctrl-enter.directive.d.ts +0 -17
- package/shared/directives/thy-drag-drop.directive.d.ts +0 -15
- package/shared/directives/thy-enter.directive.d.ts +0 -18
- package/shared/directives/thy-scroll.directive.d.ts +0 -39
- package/shared/directives/thy-show.d.ts +0 -19
- package/shared/directives/thy-stop-propagation.directive.d.ts +0 -17
- package/shared/directives/view-outlet.directive.d.ts +0 -27
- package/shared/ng-transclude.directive.d.ts +0 -14
- package/shared/option/group/option-group.component.d.ts +0 -22
- package/shared/option/index.d.ts +0 -8
- package/shared/option/list-option/list-option.component.d.ts +0 -32
- package/shared/option/module.d.ts +0 -13
- package/shared/option/option-group.component.d.ts +0 -12
- package/shared/option/option.component.d.ts +0 -51
- package/shared/option/option.token.d.ts +0 -30
- package/shared/option/options-container.component.d.ts +0 -9
- package/shared/option/select-option-base.d.ts +0 -5
- package/shared/select/index.d.ts +0 -2
- package/shared/select/module.d.ts +0 -11
- package/shared/select/select-control/select-control.component.d.ts +0 -73
- package/shared/shared.module.d.ts +0 -17
- package/shared/shared.type.d.ts +0 -1
- package/skeleton/module.d.ts +0 -16
- package/skeleton/skeleton-circle.component.d.ts +0 -45
- package/skeleton/skeleton-rectangle.component.d.ts +0 -55
- package/skeleton/skeleton.component.d.ts +0 -27
- package/skeleton/skeleton.config.d.ts +0 -8
- package/skeleton/stylized/bullet-list.component.d.ts +0 -55
- package/skeleton/stylized/list.component.d.ts +0 -44
- package/skeleton/stylized/paragraph.component.d.ts +0 -52
- package/slide/drawer/drawer-container.directive.d.ts +0 -11
- package/slide/slide-animations.d.ts +0 -4
- package/slide/slide-body/slide-body-section.component.d.ts +0 -16
- package/slide/slide-body/slide-body.component.d.ts +0 -10
- package/slide/slide-container.component.d.ts +0 -49
- package/slide/slide-footer/slide-footer.component.d.ts +0 -12
- package/slide/slide-header/slide-header.component.d.ts +0 -33
- package/slide/slide-layout/slide-layout.component.d.ts +0 -13
- package/slide/slide-ref.service.d.ts +0 -20
- package/slide/slide.config.d.ts +0 -73
- package/slide/slide.module.d.ts +0 -19
- package/slide/slide.service.d.ts +0 -28
- package/slider/slider.component.d.ts +0 -105
- package/slider/slider.module.d.ts +0 -9
- package/space/space.component.d.ts +0 -38
- package/space/space.module.d.ts +0 -8
- package/statistic/statistic.component.d.ts +0 -111
- package/statistic/statistic.module.d.ts +0 -10
- package/stepper/step-header.component.d.ts +0 -15
- package/stepper/step.component.d.ts +0 -28
- package/stepper/stepper-button.directive.d.ts +0 -25
- package/stepper/stepper.component.d.ts +0 -34
- package/stepper/stepper.module.d.ts +0 -11
- package/strength/strength.component.d.ts +0 -69
- package/strength/strength.module.d.ts +0 -7
- package/switch/switch.component.d.ts +0 -59
- package/switch/switch.module.d.ts +0 -8
- package/table/enums/column-skeleton-type.d.ts +0 -6
- package/table/enums/index.d.ts +0 -1
- package/table/pipes/drag.pipe.d.ts +0 -11
- package/table/pipes/table.pipe.d.ts +0 -10
- package/table/table-column.component.d.ts +0 -131
- package/table/table-skeleton.component.d.ts +0 -93
- package/table/table.component.d.ts +0 -333
- package/table/table.interface.d.ts +0 -87
- package/table/table.module.d.ts +0 -22
- package/table/table.type.d.ts +0 -3
- package/tabs/tab-content.component.d.ts +0 -12
- package/tabs/tab.component.d.ts +0 -31
- package/tabs/tabs.component.d.ts +0 -59
- package/tabs/tabs.module.d.ts +0 -12
- package/tabs/types.d.ts +0 -2
- package/tag/tag.component.d.ts +0 -48
- package/tag/tag.module.d.ts +0 -10
- package/tag/tags.component.d.ts +0 -11
- package/testing/data-transfer.d.ts +0 -22
- package/testing/dispatcher-events.d.ts +0 -32
- package/testing/element-focus.d.ts +0 -13
- package/testing/events.d.ts +0 -33
- package/testing/thy-icon.d.ts +0 -5
- package/testing/type-in-element.d.ts +0 -14
- package/testing/xhr-mock.d.ts +0 -51
- package/time-picker/inner/inner-time-picker.class.d.ts +0 -37
- package/time-picker/inner/inner-time-picker.component.d.ts +0 -91
- package/time-picker/inner/inner-time-picker.config.d.ts +0 -42
- package/time-picker/inner/inner-time-picker.store.d.ts +0 -23
- package/time-picker/time-picker-controls.util.d.ts +0 -7
- package/time-picker/time-picker-panel.component.d.ts +0 -113
- package/time-picker/time-picker.component.d.ts +0 -136
- package/time-picker/time-picker.module.d.ts +0 -17
- package/time-picker/time-picker.utils.d.ts +0 -16
- package/timeline/timeline-item.component.d.ts +0 -43
- package/timeline/timeline.component.d.ts +0 -47
- package/timeline/timeline.module.d.ts +0 -11
- package/timeline/timeline.service.d.ts +0 -8
- package/timeline/timeline.type.d.ts +0 -1
- package/tooltip/interface.d.ts +0 -5
- package/tooltip/tooltip-animations.d.ts +0 -4
- package/tooltip/tooltip-ref.d.ts +0 -31
- package/tooltip/tooltip.component.d.ts +0 -36
- package/tooltip/tooltip.config.d.ts +0 -22
- package/tooltip/tooltip.directive.d.ts +0 -81
- package/tooltip/tooltip.module.d.ts +0 -11
- package/tooltip/tooltip.service.d.ts +0 -16
- package/transfer/transfer-list.component.d.ts +0 -41
- package/transfer/transfer.component.d.ts +0 -90
- package/transfer/transfer.interface.d.ts +0 -66
- package/transfer/transfer.module.d.ts +0 -15
- package/tree/tree-abstract.d.ts +0 -19
- package/tree/tree-node.component.d.ts +0 -95
- package/tree/tree.class.d.ts +0 -106
- package/tree/tree.component.d.ts +0 -199
- package/tree/tree.module.d.ts +0 -20
- package/tree/tree.pipe.d.ts +0 -12
- package/tree/tree.service.d.ts +0 -34
- package/tree-select/module.d.ts +0 -14
- package/tree-select/tree-select.class.d.ts +0 -12
- package/tree-select/tree-select.component.d.ts +0 -203
- package/types/common.d.ts +0 -2
- package/types/dictionary.d.ts +0 -10
- package/types/pagination.d.ts +0 -6
- package/typography/bg-color.directive.d.ts +0 -20
- package/typography/module.d.ts +0 -11
- package/typography/text/text.component.d.ts +0 -17
- package/typography/text-color.directive.d.ts +0 -22
- package/upload/constant.d.ts +0 -73
- package/upload/file-drop.directive.d.ts +0 -32
- package/upload/file-select-base.d.ts +0 -22
- package/upload/file-select.component.d.ts +0 -34
- package/upload/module.d.ts +0 -9
- package/upload/types.d.ts +0 -11
- package/upload/upload.config.d.ts +0 -17
- package/upload/upload.service.d.ts +0 -140
- package/upload/util.d.ts +0 -1
- package/util/date/functions.d.ts +0 -85
- package/util/date/tiny-date.d.ts +0 -124
- package/util/dom.d.ts +0 -101
- package/util/helpers/helpers.d.ts +0 -55
- package/util/helpers/index.d.ts +0 -1
- package/util/immutable.d.ts +0 -70
- package/util/keycodes.d.ts +0 -2
- package/util/logger/index.d.ts +0 -1
- package/util/logger/logger.d.ts +0 -6
- package/util/ng.d.ts +0 -2
- package/util/references.d.ts +0 -58
- package/version.d.ts +0 -2
- package/vote/vote.component.d.ts +0 -53
- package/vote/vote.module.d.ts +0 -10
- package/watermark/config.d.ts +0 -19
- package/watermark/watermark.directive.d.ts +0 -63
- package/watermark/watermark.module.d.ts +0 -9
- /package/schematics/ng-update/{update-19 → update-20}/class-name-migration.d.ts +0 -0
- /package/schematics/ng-update/{update-19 → update-20}/class-name-migration.js +0 -0
- /package/schematics/ng-update/{update-19 → update-20}/index.d.ts +0 -0
- /package/schematics/ng-update/{update-19 → update-20}/index.spec.d.ts +0 -0
- /package/schematics/ng-update/{update-19 → update-20}/update-data.d.ts +0 -0
- /package/schematics/ng-update/{update-19 → update-20}/update-data.js +0 -0
|
@@ -24,10 +24,10 @@ class ThyDefaultAvatarService extends ThyAvatarService {
|
|
|
24
24
|
nameTransform(name) {
|
|
25
25
|
return name;
|
|
26
26
|
}
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
28
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyDefaultAvatarService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
28
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyDefaultAvatarService }); }
|
|
29
29
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyDefaultAvatarService, decorators: [{
|
|
31
31
|
type: Injectable
|
|
32
32
|
}] });
|
|
33
33
|
|
|
@@ -55,10 +55,10 @@ class AvatarShortNamePipe {
|
|
|
55
55
|
}
|
|
56
56
|
return name.length > 2 ? name.slice(0, 2).toUpperCase() : name.toUpperCase();
|
|
57
57
|
}
|
|
58
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
59
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarShortNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
59
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: AvatarShortNamePipe, isStandalone: true, name: "avatarShortName" }); }
|
|
60
60
|
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarShortNamePipe, decorators: [{
|
|
62
62
|
type: Pipe,
|
|
63
63
|
args: [{
|
|
64
64
|
name: 'avatarShortName'
|
|
@@ -84,10 +84,10 @@ class AvatarBgColorPipe {
|
|
|
84
84
|
'background-color': colors[code % 9]
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
88
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
87
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarBgColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
88
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: AvatarBgColorPipe, isStandalone: true, name: "avatarBgColor" }); }
|
|
89
89
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarBgColorPipe, decorators: [{
|
|
91
91
|
type: Pipe,
|
|
92
92
|
args: [{
|
|
93
93
|
name: 'avatarBgColor'
|
|
@@ -105,10 +105,10 @@ class AvatarSrcPipe {
|
|
|
105
105
|
? this.thyAvatarService.srcTransform(src, size)
|
|
106
106
|
: this.thyAvatarService.avatarSrcTransform(src, size);
|
|
107
107
|
}
|
|
108
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
109
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarSrcPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
109
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: AvatarSrcPipe, isStandalone: true, name: "thyAvatarSrc" }); }
|
|
110
110
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarSrcPipe, decorators: [{
|
|
112
112
|
type: Pipe,
|
|
113
113
|
args: [{
|
|
114
114
|
name: 'thyAvatarSrc'
|
|
@@ -150,11 +150,11 @@ class ThyAvatar {
|
|
|
150
150
|
/**
|
|
151
151
|
* 是否展示人员名称
|
|
152
152
|
*/
|
|
153
|
-
this.thyShowName = input(false, { transform: coerceBooleanProperty });
|
|
153
|
+
this.thyShowName = input(false, ...(ngDevMode ? [{ debugName: "thyShowName", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
|
|
154
154
|
/**
|
|
155
155
|
* 头像路径地址, 默认为全路径,如果不是全路径,可以通过自定义服务 ThyAvatarService,重写 srcTransform 方法实现转换
|
|
156
156
|
*/
|
|
157
|
-
this.thySrc = input();
|
|
157
|
+
this.thySrc = input(...(ngDevMode ? [undefined, { debugName: "thySrc" }] : []));
|
|
158
158
|
this.src = computed(() => {
|
|
159
159
|
if (this.isAvatarImgError()) {
|
|
160
160
|
return null;
|
|
@@ -163,28 +163,28 @@ class ThyAvatar {
|
|
|
163
163
|
return this.thySrc();
|
|
164
164
|
}
|
|
165
165
|
return null;
|
|
166
|
-
});
|
|
166
|
+
}, ...(ngDevMode ? [{ debugName: "src" }] : []));
|
|
167
167
|
/**
|
|
168
168
|
* 人员名称(可设置自定义名称,需通过自定义服务 ThyAvatarService,重写 nameTransform 方法去实现转换)
|
|
169
169
|
*/
|
|
170
|
-
this.thyName = input();
|
|
170
|
+
this.thyName = input(...(ngDevMode ? [undefined, { debugName: "thyName" }] : []));
|
|
171
171
|
this.avatarName = computed(() => {
|
|
172
172
|
const name = this.thyAvatarService.nameTransform(this.thyName());
|
|
173
173
|
return isString(name) ? name : this.thyName();
|
|
174
|
-
});
|
|
174
|
+
}, ...(ngDevMode ? [{ debugName: "avatarName" }] : []));
|
|
175
175
|
this.avatarNameSafeHtml = computed(() => {
|
|
176
176
|
const name = this.thyAvatarService.nameTransform(this.thyName());
|
|
177
177
|
if (!isString(name)) {
|
|
178
178
|
return name;
|
|
179
179
|
}
|
|
180
180
|
return null;
|
|
181
|
-
});
|
|
181
|
+
}, ...(ngDevMode ? [{ debugName: "avatarNameSafeHtml" }] : []));
|
|
182
182
|
/**
|
|
183
183
|
* 头像大小
|
|
184
184
|
* @type 16 | 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px)
|
|
185
185
|
* @default md
|
|
186
186
|
*/
|
|
187
|
-
this.thySize = model('md');
|
|
187
|
+
this.thySize = model('md', ...(ngDevMode ? [{ debugName: "thySize" }] : []));
|
|
188
188
|
this.size = computed(() => {
|
|
189
189
|
const sizeKey = this.thySize();
|
|
190
190
|
if (thyAvatarSizeMap[sizeKey]) {
|
|
@@ -194,36 +194,36 @@ class ThyAvatar {
|
|
|
194
194
|
const size = this.thySize() * 1;
|
|
195
195
|
return sizeArray.indexOf(size) > -1 ? size : this.findClosestSize(sizeArray, size);
|
|
196
196
|
}
|
|
197
|
-
});
|
|
197
|
+
}, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
198
198
|
/**
|
|
199
199
|
* 已废弃,请使用 thyRemovable
|
|
200
200
|
* @deprecated
|
|
201
201
|
*/
|
|
202
|
-
this.thyShowRemove = input(false, { transform: coerceBooleanProperty });
|
|
202
|
+
this.thyShowRemove = input(false, ...(ngDevMode ? [{ debugName: "thyShowRemove", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
|
|
203
203
|
/**
|
|
204
204
|
* 是否展示移除按钮
|
|
205
205
|
*/
|
|
206
|
-
this.thyRemovable = input(false, { transform: coerceBooleanProperty });
|
|
207
|
-
this.showRemove = computed(() => this.thyRemovable() || this.thyShowRemove());
|
|
206
|
+
this.thyRemovable = input(false, ...(ngDevMode ? [{ debugName: "thyRemovable", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
|
|
207
|
+
this.showRemove = computed(() => this.thyRemovable() || this.thyShowRemove(), ...(ngDevMode ? [{ debugName: "showRemove" }] : []));
|
|
208
208
|
/**
|
|
209
209
|
* 图片自定义类
|
|
210
210
|
*/
|
|
211
|
-
this.thyImgClass = input();
|
|
211
|
+
this.thyImgClass = input(...(ngDevMode ? [undefined, { debugName: "thyImgClass" }] : []));
|
|
212
212
|
/**
|
|
213
213
|
* 是否禁用
|
|
214
214
|
*/
|
|
215
|
-
this.thyDisabled = input(false, { transform: coerceBooleanProperty });
|
|
215
|
+
this.thyDisabled = input(false, ...(ngDevMode ? [{ debugName: "thyDisabled", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
|
|
216
216
|
/**
|
|
217
217
|
* 图片加载策略
|
|
218
218
|
* @type eager(立即加载) | lazy(延迟加载)
|
|
219
219
|
*/
|
|
220
|
-
this.thyLoading = input();
|
|
220
|
+
this.thyLoading = input(...(ngDevMode ? [undefined, { debugName: "thyLoading" }] : []));
|
|
221
221
|
/**
|
|
222
222
|
* 图片加载优先级
|
|
223
223
|
* @type auto(默认) | high(高) | low(低)
|
|
224
224
|
*/
|
|
225
|
-
this.thyFetchPriority = input();
|
|
226
|
-
this.isAvatarImgError = signal(false);
|
|
225
|
+
this.thyFetchPriority = input(...(ngDevMode ? [undefined, { debugName: "thyFetchPriority" }] : []));
|
|
226
|
+
this.isAvatarImgError = signal(false, ...(ngDevMode ? [{ debugName: "isAvatarImgError" }] : []));
|
|
227
227
|
this.hostRenderer = useHostRenderer();
|
|
228
228
|
effect(() => {
|
|
229
229
|
this.hostRenderer.updateClass([`thy-avatar-${this.size()}`]);
|
|
@@ -249,15 +249,15 @@ class ThyAvatar {
|
|
|
249
249
|
this.isAvatarImgError.set(true);
|
|
250
250
|
this.thyError.emit($event);
|
|
251
251
|
}
|
|
252
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
253
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
252
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
253
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: ThyAvatar, isStandalone: true, selector: "thy-avatar", inputs: { thyShowName: { classPropertyName: "thyShowName", publicName: "thyShowName", isSignal: true, isRequired: false, transformFunction: null }, thySrc: { classPropertyName: "thySrc", publicName: "thySrc", isSignal: true, isRequired: false, transformFunction: null }, thyName: { classPropertyName: "thyName", publicName: "thyName", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyShowRemove: { classPropertyName: "thyShowRemove", publicName: "thyShowRemove", isSignal: true, isRequired: false, transformFunction: null }, thyRemovable: { classPropertyName: "thyRemovable", publicName: "thyRemovable", isSignal: true, isRequired: false, transformFunction: null }, thyImgClass: { classPropertyName: "thyImgClass", publicName: "thyImgClass", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null }, thyLoading: { classPropertyName: "thyLoading", publicName: "thyLoading", isSignal: true, isRequired: false, transformFunction: null }, thyFetchPriority: { classPropertyName: "thyFetchPriority", publicName: "thyFetchPriority", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyOnRemove: "thyOnRemove", thyRemove: "thyRemove", thyError: "thyError", thySize: "thySizeChange" }, host: { classAttribute: "thy-avatar" }, ngImport: i0, template: "@if (src()) {\n <img\n [src]=\"src() | thyAvatarSrc: size()\"\n class=\"avatar-avatar\"\n [ngClass]=\"thyImgClass()\"\n alt=\"{{ avatarName() || '' }}\"\n [attr.loading]=\"thyLoading()\"\n [attr.fetchpriority]=\"thyFetchPriority()\"\n (error)=\"avatarImgError($event)\" />\n} @else {\n <span class=\"avatar-default\" [ngStyle]=\"avatarName() | avatarBgColor\">\n <div>{{ avatarName() | avatarShortName }}</div>\n </span>\n}\n\n@if (thyShowName()) {\n @if (avatarNameSafeHtml()) {\n <div class=\"avatar-name\" [innerHtml]=\"avatarNameSafeHtml()\"></div>\n } @else {\n <div class=\"avatar-name\">{{ avatarName() }}</div>\n }\n}\n\n@if (showRemove()) {\n <a (click)=\"remove($event)\" href=\"javascript:;\" class=\"remove-link avatar-remove\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n </a>\n}\n@if (thyDisabled()) {\n <div class=\"thy-avatar-disabled\">\n <thy-icon class=\"thy-avatar-disabled-icon\" thyIconName=\"ban\"></thy-icon>\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "pipe", type: AvatarShortNamePipe, name: "avatarShortName" }, { kind: "pipe", type: AvatarBgColorPipe, name: "avatarBgColor" }, { kind: "pipe", type: AvatarSrcPipe, name: "thyAvatarSrc" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
254
254
|
}
|
|
255
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyAvatar, decorators: [{
|
|
256
256
|
type: Component,
|
|
257
257
|
args: [{ selector: 'thy-avatar', host: {
|
|
258
258
|
class: 'thy-avatar'
|
|
259
259
|
}, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, NgStyle, ThyIcon, AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe], template: "@if (src()) {\n <img\n [src]=\"src() | thyAvatarSrc: size()\"\n class=\"avatar-avatar\"\n [ngClass]=\"thyImgClass()\"\n alt=\"{{ avatarName() || '' }}\"\n [attr.loading]=\"thyLoading()\"\n [attr.fetchpriority]=\"thyFetchPriority()\"\n (error)=\"avatarImgError($event)\" />\n} @else {\n <span class=\"avatar-default\" [ngStyle]=\"avatarName() | avatarBgColor\">\n <div>{{ avatarName() | avatarShortName }}</div>\n </span>\n}\n\n@if (thyShowName()) {\n @if (avatarNameSafeHtml()) {\n <div class=\"avatar-name\" [innerHtml]=\"avatarNameSafeHtml()\"></div>\n } @else {\n <div class=\"avatar-name\">{{ avatarName() }}</div>\n }\n}\n\n@if (showRemove()) {\n <a (click)=\"remove($event)\" href=\"javascript:;\" class=\"remove-link avatar-remove\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n </a>\n}\n@if (thyDisabled()) {\n <div class=\"thy-avatar-disabled\">\n <thy-icon class=\"thy-avatar-disabled-icon\" thyIconName=\"ban\"></thy-icon>\n </div>\n}\n" }]
|
|
260
|
-
}], ctorParameters: () => [] });
|
|
260
|
+
}], ctorParameters: () => [], propDecorators: { thyOnRemove: [{ type: i0.Output, args: ["thyOnRemove"] }], thyRemove: [{ type: i0.Output, args: ["thyRemove"] }], thyError: [{ type: i0.Output, args: ["thyError"] }], thyShowName: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyShowName", required: false }] }], thySrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySrc", required: false }] }], thyName: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyName", required: false }] }], thySize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySize", required: false }] }, { type: i0.Output, args: ["thySizeChange"] }], thyShowRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyShowRemove", required: false }] }], thyRemovable: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyRemovable", required: false }] }], thyImgClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyImgClass", required: false }] }], thyDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyDisabled", required: false }] }], thyLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyLoading", required: false }] }], thyFetchPriority: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyFetchPriority", required: false }] }] } });
|
|
261
261
|
|
|
262
262
|
const THY_AVATAR_ITEM_SPACE = 4;
|
|
263
263
|
const THY_OVERLAP_AVATAR_ITEM_SPACE = -8;
|
|
@@ -273,24 +273,24 @@ class ThyAvatarList {
|
|
|
273
273
|
* 展示方式
|
|
274
274
|
* @type overlap | default
|
|
275
275
|
*/
|
|
276
|
-
this.thyMode = input("default" /* ThyAvatarListMode.default
|
|
276
|
+
this.thyMode = input("default" /* ThyAvatarListMode.default */, ...(ngDevMode ? [{ debugName: "thyMode" }] : []));
|
|
277
277
|
this.isOverlapMode = computed(() => {
|
|
278
278
|
return this.thyMode() === "overlap" /* ThyAvatarListMode.overlap */;
|
|
279
|
-
});
|
|
279
|
+
}, ...(ngDevMode ? [{ debugName: "isOverlapMode" }] : []));
|
|
280
280
|
/**
|
|
281
281
|
* 头像大小
|
|
282
282
|
* @type 16 | 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px)
|
|
283
283
|
* @default 36
|
|
284
284
|
*/
|
|
285
|
-
this.thyAvatarSize = input(DEFAULT_SIZE);
|
|
285
|
+
this.thyAvatarSize = input(DEFAULT_SIZE, ...(ngDevMode ? [{ debugName: "thyAvatarSize" }] : []));
|
|
286
286
|
/**
|
|
287
287
|
* append 自定义操作
|
|
288
288
|
*/
|
|
289
|
-
this.append = contentChild('append');
|
|
289
|
+
this.append = contentChild('append', ...(ngDevMode ? [{ debugName: "append" }] : []));
|
|
290
290
|
/**
|
|
291
291
|
* @private
|
|
292
292
|
*/
|
|
293
|
-
this.avatarComponents = contentChildren(ThyAvatar);
|
|
293
|
+
this.avatarComponents = contentChildren(ThyAvatar, ...(ngDevMode ? [{ debugName: "avatarComponents" }] : []));
|
|
294
294
|
effect(() => {
|
|
295
295
|
this.updateAvatarItems();
|
|
296
296
|
});
|
|
@@ -302,28 +302,28 @@ class ThyAvatarList {
|
|
|
302
302
|
item.elementRef.nativeElement.style.zIndex = this.avatarItems.length - index;
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
306
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
305
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyAvatarList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
306
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: ThyAvatarList, isStandalone: true, selector: "thy-avatar-list", inputs: { thyMode: { classPropertyName: "thyMode", publicName: "thyMode", isSignal: true, isRequired: false, transformFunction: null }, thyAvatarSize: { classPropertyName: "thyAvatarSize", publicName: "thyAvatarSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-avatar-list-overlap": "isOverlapMode()" }, classAttribute: "thy-avatar-list" }, providers: [UpdateHostClassService], queries: [{ propertyName: "append", first: true, predicate: ["append"], descendants: true, isSignal: true }, { propertyName: "avatarComponents", predicate: ThyAvatar, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\n\n@if (append()) {\n <div class=\"thy-avatar-append\">\n <ng-container [ngTemplateOutlet]=\"append()\"></ng-container>\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
307
307
|
}
|
|
308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyAvatarList, decorators: [{
|
|
309
309
|
type: Component,
|
|
310
310
|
args: [{ selector: 'thy-avatar-list', host: {
|
|
311
311
|
class: 'thy-avatar-list',
|
|
312
312
|
'[class.thy-avatar-list-overlap]': 'isOverlapMode()'
|
|
313
313
|
}, providers: [UpdateHostClassService], imports: [NgTemplateOutlet], template: "<ng-content></ng-content>\n\n@if (append()) {\n <div class=\"thy-avatar-append\">\n <ng-container [ngTemplateOutlet]=\"append()\"></ng-container>\n </div>\n}\n" }]
|
|
314
|
-
}], ctorParameters: () => [] });
|
|
314
|
+
}], ctorParameters: () => [], propDecorators: { thyMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyMode", required: false }] }], thyAvatarSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAvatarSize", required: false }] }], append: [{ type: i0.ContentChild, args: ['append', { isSignal: true }] }], avatarComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ThyAvatar), { isSignal: true }] }] } });
|
|
315
315
|
|
|
316
316
|
class ThyAvatarModule {
|
|
317
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
318
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
319
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
318
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: ThyAvatarModule, imports: [CommonModule, ThyIconModule, ThyAvatar, ThyAvatarList, AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe], exports: [ThyAvatar, ThyAvatarList, AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe] }); }
|
|
319
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyAvatarModule, providers: [
|
|
320
320
|
{
|
|
321
321
|
provide: ThyAvatarService,
|
|
322
322
|
useClass: ThyDefaultAvatarService
|
|
323
323
|
}
|
|
324
324
|
], imports: [CommonModule, ThyIconModule, ThyAvatar] }); }
|
|
325
325
|
}
|
|
326
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyAvatarModule, decorators: [{
|
|
327
327
|
type: NgModule,
|
|
328
328
|
args: [{
|
|
329
329
|
imports: [CommonModule, ThyIconModule, ThyAvatar, ThyAvatarList, AvatarPipes],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-avatar.mjs","sources":["../../../src/avatar/avatar.service.ts","../../../src/avatar/avatar.pipe.ts","../../../src/avatar/avatar.component.ts","../../../src/avatar/avatar.component.html","../../../src/avatar/avatar-list/avatar-list.component.ts","../../../src/avatar/avatar-list/avatar-list.component.html","../../../src/avatar/avatar.module.ts","../../../src/avatar/ngx-tethys-avatar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\n\nexport abstract class ThyAvatarService {\n ignoreAvatarSrcPaths = [`default.png`];\n\n /**\n * @deprecated the avatarSrcTransform method will be deprecated, please use srcTransform.\n */\n abstract avatarSrcTransform(src: string, size: number): string;\n\n abstract srcTransform(src: string, size: number): string;\n\n abstract nameTransform(name: string): string | SafeHtml;\n}\n\n@Injectable()\nexport class ThyDefaultAvatarService extends ThyAvatarService {\n /**\n * @deprecated the avatarSrcTransform method will be deprecated, please use srcTransform.\n */\n avatarSrcTransform(src: string, size: number): string {\n return src;\n }\n\n srcTransform(src: string, size: number): string {\n return src;\n }\n\n nameTransform(name: string): string | SafeHtml {\n return name;\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { ThyAvatarService } from './avatar.service';\n\n/**\n * `\\u4e00`: https://www.compart.com/en/unicode/U+4E00\n * `\\u9fa5`: https://www.compart.com/en/unicode/U+9FA5\n */\nconst UNIFIED_IDEOGRAPHS_REGEX = /^[\\u4e00-\\u9fa5]+$/;\n\nconst SET_OF_LETTERS_REGEX = /^[a-zA-Z\\/ ]+$/;\n\n/**\n * @private\n */\n@Pipe({\n name: 'avatarShortName'\n})\nexport class AvatarShortNamePipe implements PipeTransform {\n transform(name: string | null | undefined): string {\n if (!name) {\n return '';\n }\n\n name = name.trim();\n\n if (UNIFIED_IDEOGRAPHS_REGEX.test(name) && name.length > 2) {\n return name.slice(name.length - 2);\n }\n\n if (SET_OF_LETTERS_REGEX.test(name) && name.indexOf(' ') > 0) {\n const words: string[] = name.split(' ');\n return (words[0].slice(0, 1) + words[1].slice(0, 1)).toUpperCase();\n }\n\n return name.length > 2 ? name.slice(0, 2).toUpperCase() : name.toUpperCase();\n }\n}\n\n/**\n * @private\n */\n@Pipe({\n name: 'avatarBgColor'\n})\nexport class AvatarBgColorPipe implements PipeTransform {\n transform(name: string) {\n if (!name) {\n return;\n }\n const colors = ['#56abfb', '#5dcfff', '#84e17e', '#73d897', '#ff9f73', '#fa8888', '#fb7fb7', '#9a7ef4', '#868af6'];\n const nameArray: string[] = name.split('');\n const code: number =\n name && name.length > 0\n ? nameArray.reduce(\n function (result, item) {\n result.value += item.charCodeAt(0);\n return result;\n },\n { value: 0 }\n ).value\n : 0;\n return {\n 'background-color': colors[code % 9]\n };\n }\n}\n\n/**\n * @private\n */\n@Pipe({\n name: 'thyAvatarSrc'\n})\nexport class AvatarSrcPipe implements PipeTransform {\n private thyAvatarService = inject(ThyAvatarService);\n\n transform(src: string, size: number) {\n return this.thyAvatarService.srcTransform\n ? this.thyAvatarService.srcTransform(src, size)\n : this.thyAvatarService.avatarSrcTransform(src, size);\n }\n}\n\nexport const AvatarPipes = [AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe];\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Signal,\n WritableSignal,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal\n} from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\nimport { isString, coerceBooleanProperty } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyAvatarService } from './avatar.service';\nimport { AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe } from './avatar.pipe';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgClass, NgStyle } from '@angular/common';\n\nconst sizeArray = [16, 22, 24, 28, 32, 36, 44, 48, 68, 110, 160];\n\nexport const DEFAULT_SIZE = 36;\n\nexport const thyAvatarSizeMap = {\n xxs: 22,\n xs: 24,\n sm: 32,\n md: 36,\n lg: 48\n};\n\n/** https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading */\nexport type ThyAvatarLoading = 'eager' | 'lazy';\n\n/** https://wicg.github.io/priority-hints/#idl-index */\nexport type ThyAvatarFetchPriority = 'high' | 'low' | 'auto';\n\n/**\n * 头像组件\n * @name thy-avatar\n * @order 10\n */\n@Component({\n selector: 'thy-avatar',\n templateUrl: './avatar.component.html',\n host: {\n class: 'thy-avatar'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgClass, NgStyle, ThyIcon, AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe]\n})\nexport class ThyAvatar {\n private thyAvatarService = inject(ThyAvatarService);\n elementRef = inject(ElementRef);\n\n /**\n * * 已废弃,请使用 thyRemove\n * @deprecated\n */\n readonly thyOnRemove = output<Event>();\n\n /**\n * 移除按钮的事件,当 thyRemovable 为 true 时起作用\n */\n readonly thyRemove = output<Event>();\n\n /**\n * 头像 img 加载 error 时触发\n */\n readonly thyError = output<Event>();\n\n /**\n * 是否展示人员名称\n */\n readonly thyShowName = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 头像路径地址, 默认为全路径,如果不是全路径,可以通过自定义服务 ThyAvatarService,重写 srcTransform 方法实现转换\n */\n readonly thySrc = input<string>();\n\n readonly src = computed(() => {\n if (this.isAvatarImgError()) {\n return null;\n }\n if (this.thySrc() && this.thyAvatarService.ignoreAvatarSrcPaths.indexOf(this.thySrc()) < 0) {\n return this.thySrc();\n }\n return null;\n });\n\n /**\n * 人员名称(可设置自定义名称,需通过自定义服务 ThyAvatarService,重写 nameTransform 方法去实现转换)\n */\n readonly thyName = input<string>();\n\n readonly avatarName: Signal<string> = computed(() => {\n const name = this.thyAvatarService.nameTransform(this.thyName());\n return isString(name) ? name : this.thyName();\n });\n\n readonly avatarNameSafeHtml: Signal<SafeHtml> = computed(() => {\n const name = this.thyAvatarService.nameTransform(this.thyName());\n if (!isString(name)) {\n return name;\n }\n return null;\n });\n\n /**\n * 头像大小\n * @type 16 | 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px)\n * @default md\n */\n readonly thySize = model<number | string>('md');\n\n readonly size: Signal<number> = computed(() => {\n const sizeKey = this.thySize() as 'xxs' | 'xs' | 'sm' | 'md' | 'lg';\n if (thyAvatarSizeMap[sizeKey]) {\n return thyAvatarSizeMap[sizeKey];\n } else {\n const size = (this.thySize() as number) * 1;\n return sizeArray.indexOf(size) > -1 ? size : this.findClosestSize(sizeArray, size);\n }\n });\n\n /**\n * 已废弃,请使用 thyRemovable\n * @deprecated\n */\n readonly thyShowRemove = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 是否展示移除按钮\n */\n readonly thyRemovable = input(false, { transform: coerceBooleanProperty });\n\n readonly showRemove: Signal<boolean> = computed(() => this.thyRemovable() || this.thyShowRemove());\n\n /**\n * 图片自定义类\n */\n readonly thyImgClass = input<string>();\n\n /**\n * 是否禁用\n */\n readonly thyDisabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 图片加载策略\n * @type eager(立即加载) | lazy(延迟加载)\n */\n readonly thyLoading = input<ThyAvatarLoading>();\n\n /**\n * 图片加载优先级\n * @type auto(默认) | high(高) | low(低)\n */\n readonly thyFetchPriority = input<ThyAvatarFetchPriority>();\n\n private isAvatarImgError: WritableSignal<boolean> = signal(false);\n\n private hostRenderer = useHostRenderer();\n\n constructor() {\n effect(() => {\n this.hostRenderer.updateClass([`thy-avatar-${this.size()}`]);\n });\n }\n\n private findClosestSize(sizeArray: number[], currentSize: number): number {\n let closestValue = sizeArray[0];\n let closestDifference = Math.abs(closestValue - currentSize);\n\n for (let i = 1; i < sizeArray.length; i++) {\n const currentDifference = Math.abs(sizeArray[i] - currentSize);\n if (currentDifference <= closestDifference) {\n closestValue = sizeArray[i];\n closestDifference = currentDifference;\n }\n }\n\n return closestValue;\n }\n\n remove($event: Event) {\n this.thyOnRemove.emit($event);\n this.thyRemove.emit($event);\n }\n\n avatarImgError($event: Event) {\n this.isAvatarImgError.set(true);\n this.thyError.emit($event);\n }\n}\n","@if (src()) {\n <img\n [src]=\"src() | thyAvatarSrc: size()\"\n class=\"avatar-avatar\"\n [ngClass]=\"thyImgClass()\"\n alt=\"{{ avatarName() || '' }}\"\n [attr.loading]=\"thyLoading()\"\n [attr.fetchpriority]=\"thyFetchPriority()\"\n (error)=\"avatarImgError($event)\" />\n} @else {\n <span class=\"avatar-default\" [ngStyle]=\"avatarName() | avatarBgColor\">\n <div>{{ avatarName() | avatarShortName }}</div>\n </span>\n}\n\n@if (thyShowName()) {\n @if (avatarNameSafeHtml()) {\n <div class=\"avatar-name\" [innerHtml]=\"avatarNameSafeHtml()\"></div>\n } @else {\n <div class=\"avatar-name\">{{ avatarName() }}</div>\n }\n}\n\n@if (showRemove()) {\n <a (click)=\"remove($event)\" href=\"javascript:;\" class=\"remove-link avatar-remove\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n </a>\n}\n@if (thyDisabled()) {\n <div class=\"thy-avatar-disabled\">\n <thy-icon class=\"thy-avatar-disabled-icon\" thyIconName=\"ban\"></thy-icon>\n </div>\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, contentChild, effect, input, Signal, TemplateRef, contentChildren } from '@angular/core';\nimport { UpdateHostClassService } from 'ngx-tethys/core';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { DEFAULT_SIZE, ThyAvatar } from '../avatar.component';\n\nexport const THY_AVATAR_ITEM_SPACE = 4;\n\nexport const THY_OVERLAP_AVATAR_ITEM_SPACE = -8;\n\nexport const enum ThyAvatarListMode {\n overlap = 'overlap',\n default = 'default'\n}\n\n/**\n * 头像列表组件\n * @name thy-avatar-list\n * @order 20\n */\n@Component({\n selector: 'thy-avatar-list',\n templateUrl: `./avatar-list.component.html`,\n host: {\n class: 'thy-avatar-list',\n '[class.thy-avatar-list-overlap]': 'isOverlapMode()'\n },\n providers: [UpdateHostClassService],\n imports: [NgTemplateOutlet]\n})\nexport class ThyAvatarList {\n public avatarItems: ThyAvatar[] = [];\n\n /**\n * 展示方式\n * @type overlap | default\n */\n readonly thyMode = input<ThyAvatarListMode>(ThyAvatarListMode.default);\n\n readonly isOverlapMode = computed(() => {\n return this.thyMode() === ThyAvatarListMode.overlap;\n });\n\n /**\n * 头像大小\n * @type 16 | 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px)\n * @default 36\n */\n readonly thyAvatarSize = input<number | string>(DEFAULT_SIZE);\n\n /**\n * append 自定义操作\n */\n readonly append = contentChild<TemplateRef<SafeAny>>('append');\n\n /**\n * @private\n */\n readonly avatarComponents = contentChildren<ThyAvatar>(ThyAvatar);\n\n constructor() {\n effect(() => {\n this.updateAvatarItems();\n });\n }\n\n private updateAvatarItems() {\n this.avatarItems = Array.from(this.avatarComponents());\n this.avatarItems.forEach((item, index) => {\n item.thySize.set(this.thyAvatarSize());\n item.elementRef.nativeElement.style.zIndex = this.avatarItems.length - index;\n });\n }\n}\n","<ng-content></ng-content>\n\n@if (append()) {\n <div class=\"thy-avatar-append\">\n <ng-container [ngTemplateOutlet]=\"append()\"></ng-container>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyAvatar } from './avatar.component';\nimport { AvatarPipes } from './avatar.pipe';\nimport { ThyAvatarService, ThyDefaultAvatarService } from './avatar.service';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyAvatarList } from './avatar-list/avatar-list.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyAvatar, ThyAvatarList, AvatarPipes],\n providers: [\n {\n provide: ThyAvatarService,\n useClass: ThyDefaultAvatarService\n }\n ],\n exports: [ThyAvatar, ThyAvatarList, AvatarPipes]\n})\nexport class ThyAvatarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AvatarShortNamePipe","i1.AvatarBgColorPipe","i1.AvatarSrcPipe"],"mappings":";;;;;;;;MAGsB,gBAAgB,CAAA;AAAtC,IAAA,WAAA,GAAA;AACI,QAAA,IAAA,CAAA,oBAAoB,GAAG,CAAC,CAAa,WAAA,CAAA,CAAC;;AAUzC;AAGK,MAAO,uBAAwB,SAAQ,gBAAgB,CAAA;AACzD;;AAEG;IACH,kBAAkB,CAAC,GAAW,EAAE,IAAY,EAAA;AACxC,QAAA,OAAO,GAAG;;IAGd,YAAY,CAAC,GAAW,EAAE,IAAY,EAAA;A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,EAAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,gBAAgB;AACzB,4BAAA,QAAQ,EAAE;AACb;AACJ,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW;AAClD,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-avatar.mjs","sources":["../../../src/avatar/avatar.service.ts","../../../src/avatar/avatar.pipe.ts","../../../src/avatar/avatar.component.ts","../../../src/avatar/avatar.component.html","../../../src/avatar/avatar-list/avatar-list.component.ts","../../../src/avatar/avatar-list/avatar-list.component.html","../../../src/avatar/avatar.module.ts","../../../src/avatar/ngx-tethys-avatar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\n\nexport abstract class ThyAvatarService {\n ignoreAvatarSrcPaths = [`default.png`];\n\n /**\n * @deprecated the avatarSrcTransform method will be deprecated, please use srcTransform.\n */\n abstract avatarSrcTransform(src: string, size: number): string;\n\n abstract srcTransform(src: string, size: number): string;\n\n abstract nameTransform(name: string): string | SafeHtml;\n}\n\n@Injectable()\nexport class ThyDefaultAvatarService extends ThyAvatarService {\n /**\n * @deprecated the avatarSrcTransform method will be deprecated, please use srcTransform.\n */\n avatarSrcTransform(src: string, size: number): string {\n return src;\n }\n\n srcTransform(src: string, size: number): string {\n return src;\n }\n\n nameTransform(name: string): string | SafeHtml {\n return name;\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { ThyAvatarService } from './avatar.service';\n\n/**\n * `\\u4e00`: https://www.compart.com/en/unicode/U+4E00\n * `\\u9fa5`: https://www.compart.com/en/unicode/U+9FA5\n */\nconst UNIFIED_IDEOGRAPHS_REGEX = /^[\\u4e00-\\u9fa5]+$/;\n\nconst SET_OF_LETTERS_REGEX = /^[a-zA-Z\\/ ]+$/;\n\n/**\n * @private\n */\n@Pipe({\n name: 'avatarShortName'\n})\nexport class AvatarShortNamePipe implements PipeTransform {\n transform(name: string | null | undefined): string {\n if (!name) {\n return '';\n }\n\n name = name.trim();\n\n if (UNIFIED_IDEOGRAPHS_REGEX.test(name) && name.length > 2) {\n return name.slice(name.length - 2);\n }\n\n if (SET_OF_LETTERS_REGEX.test(name) && name.indexOf(' ') > 0) {\n const words: string[] = name.split(' ');\n return (words[0].slice(0, 1) + words[1].slice(0, 1)).toUpperCase();\n }\n\n return name.length > 2 ? name.slice(0, 2).toUpperCase() : name.toUpperCase();\n }\n}\n\n/**\n * @private\n */\n@Pipe({\n name: 'avatarBgColor'\n})\nexport class AvatarBgColorPipe implements PipeTransform {\n transform(name: string) {\n if (!name) {\n return;\n }\n const colors = ['#56abfb', '#5dcfff', '#84e17e', '#73d897', '#ff9f73', '#fa8888', '#fb7fb7', '#9a7ef4', '#868af6'];\n const nameArray: string[] = name.split('');\n const code: number =\n name && name.length > 0\n ? nameArray.reduce(\n function (result, item) {\n result.value += item.charCodeAt(0);\n return result;\n },\n { value: 0 }\n ).value\n : 0;\n return {\n 'background-color': colors[code % 9]\n };\n }\n}\n\n/**\n * @private\n */\n@Pipe({\n name: 'thyAvatarSrc'\n})\nexport class AvatarSrcPipe implements PipeTransform {\n private thyAvatarService = inject(ThyAvatarService);\n\n transform(src: string, size: number) {\n return this.thyAvatarService.srcTransform\n ? this.thyAvatarService.srcTransform(src, size)\n : this.thyAvatarService.avatarSrcTransform(src, size);\n }\n}\n\nexport const AvatarPipes = [AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe];\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Signal,\n WritableSignal,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal\n} from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\nimport { isString, coerceBooleanProperty } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyAvatarService } from './avatar.service';\nimport { AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe } from './avatar.pipe';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgClass, NgStyle } from '@angular/common';\n\nconst sizeArray = [16, 22, 24, 28, 32, 36, 44, 48, 68, 110, 160];\n\nexport const DEFAULT_SIZE = 36;\n\nexport const thyAvatarSizeMap = {\n xxs: 22,\n xs: 24,\n sm: 32,\n md: 36,\n lg: 48\n};\n\n/** https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading */\nexport type ThyAvatarLoading = 'eager' | 'lazy';\n\n/** https://wicg.github.io/priority-hints/#idl-index */\nexport type ThyAvatarFetchPriority = 'high' | 'low' | 'auto';\n\n/**\n * 头像组件\n * @name thy-avatar\n * @order 10\n */\n@Component({\n selector: 'thy-avatar',\n templateUrl: './avatar.component.html',\n host: {\n class: 'thy-avatar'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgClass, NgStyle, ThyIcon, AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe]\n})\nexport class ThyAvatar {\n private thyAvatarService = inject(ThyAvatarService);\n elementRef = inject(ElementRef);\n\n /**\n * * 已废弃,请使用 thyRemove\n * @deprecated\n */\n readonly thyOnRemove = output<Event>();\n\n /**\n * 移除按钮的事件,当 thyRemovable 为 true 时起作用\n */\n readonly thyRemove = output<Event>();\n\n /**\n * 头像 img 加载 error 时触发\n */\n readonly thyError = output<Event>();\n\n /**\n * 是否展示人员名称\n */\n readonly thyShowName = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 头像路径地址, 默认为全路径,如果不是全路径,可以通过自定义服务 ThyAvatarService,重写 srcTransform 方法实现转换\n */\n readonly thySrc = input<string>();\n\n readonly src = computed(() => {\n if (this.isAvatarImgError()) {\n return null;\n }\n if (this.thySrc() && this.thyAvatarService.ignoreAvatarSrcPaths.indexOf(this.thySrc()) < 0) {\n return this.thySrc();\n }\n return null;\n });\n\n /**\n * 人员名称(可设置自定义名称,需通过自定义服务 ThyAvatarService,重写 nameTransform 方法去实现转换)\n */\n readonly thyName = input<string>();\n\n readonly avatarName: Signal<string> = computed(() => {\n const name = this.thyAvatarService.nameTransform(this.thyName());\n return isString(name) ? name : this.thyName();\n });\n\n readonly avatarNameSafeHtml: Signal<SafeHtml> = computed(() => {\n const name = this.thyAvatarService.nameTransform(this.thyName());\n if (!isString(name)) {\n return name;\n }\n return null;\n });\n\n /**\n * 头像大小\n * @type 16 | 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px)\n * @default md\n */\n readonly thySize = model<number | string>('md');\n\n readonly size: Signal<number> = computed(() => {\n const sizeKey = this.thySize() as 'xxs' | 'xs' | 'sm' | 'md' | 'lg';\n if (thyAvatarSizeMap[sizeKey]) {\n return thyAvatarSizeMap[sizeKey];\n } else {\n const size = (this.thySize() as number) * 1;\n return sizeArray.indexOf(size) > -1 ? size : this.findClosestSize(sizeArray, size);\n }\n });\n\n /**\n * 已废弃,请使用 thyRemovable\n * @deprecated\n */\n readonly thyShowRemove = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 是否展示移除按钮\n */\n readonly thyRemovable = input(false, { transform: coerceBooleanProperty });\n\n readonly showRemove: Signal<boolean> = computed(() => this.thyRemovable() || this.thyShowRemove());\n\n /**\n * 图片自定义类\n */\n readonly thyImgClass = input<string>();\n\n /**\n * 是否禁用\n */\n readonly thyDisabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 图片加载策略\n * @type eager(立即加载) | lazy(延迟加载)\n */\n readonly thyLoading = input<ThyAvatarLoading>();\n\n /**\n * 图片加载优先级\n * @type auto(默认) | high(高) | low(低)\n */\n readonly thyFetchPriority = input<ThyAvatarFetchPriority>();\n\n private isAvatarImgError: WritableSignal<boolean> = signal(false);\n\n private hostRenderer = useHostRenderer();\n\n constructor() {\n effect(() => {\n this.hostRenderer.updateClass([`thy-avatar-${this.size()}`]);\n });\n }\n\n private findClosestSize(sizeArray: number[], currentSize: number): number {\n let closestValue = sizeArray[0];\n let closestDifference = Math.abs(closestValue - currentSize);\n\n for (let i = 1; i < sizeArray.length; i++) {\n const currentDifference = Math.abs(sizeArray[i] - currentSize);\n if (currentDifference <= closestDifference) {\n closestValue = sizeArray[i];\n closestDifference = currentDifference;\n }\n }\n\n return closestValue;\n }\n\n remove($event: Event) {\n this.thyOnRemove.emit($event);\n this.thyRemove.emit($event);\n }\n\n avatarImgError($event: Event) {\n this.isAvatarImgError.set(true);\n this.thyError.emit($event);\n }\n}\n","@if (src()) {\n <img\n [src]=\"src() | thyAvatarSrc: size()\"\n class=\"avatar-avatar\"\n [ngClass]=\"thyImgClass()\"\n alt=\"{{ avatarName() || '' }}\"\n [attr.loading]=\"thyLoading()\"\n [attr.fetchpriority]=\"thyFetchPriority()\"\n (error)=\"avatarImgError($event)\" />\n} @else {\n <span class=\"avatar-default\" [ngStyle]=\"avatarName() | avatarBgColor\">\n <div>{{ avatarName() | avatarShortName }}</div>\n </span>\n}\n\n@if (thyShowName()) {\n @if (avatarNameSafeHtml()) {\n <div class=\"avatar-name\" [innerHtml]=\"avatarNameSafeHtml()\"></div>\n } @else {\n <div class=\"avatar-name\">{{ avatarName() }}</div>\n }\n}\n\n@if (showRemove()) {\n <a (click)=\"remove($event)\" href=\"javascript:;\" class=\"remove-link avatar-remove\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n </a>\n}\n@if (thyDisabled()) {\n <div class=\"thy-avatar-disabled\">\n <thy-icon class=\"thy-avatar-disabled-icon\" thyIconName=\"ban\"></thy-icon>\n </div>\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, contentChild, effect, input, Signal, TemplateRef, contentChildren } from '@angular/core';\nimport { UpdateHostClassService } from 'ngx-tethys/core';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { DEFAULT_SIZE, ThyAvatar } from '../avatar.component';\n\nexport const THY_AVATAR_ITEM_SPACE = 4;\n\nexport const THY_OVERLAP_AVATAR_ITEM_SPACE = -8;\n\nexport const enum ThyAvatarListMode {\n overlap = 'overlap',\n default = 'default'\n}\n\n/**\n * 头像列表组件\n * @name thy-avatar-list\n * @order 20\n */\n@Component({\n selector: 'thy-avatar-list',\n templateUrl: `./avatar-list.component.html`,\n host: {\n class: 'thy-avatar-list',\n '[class.thy-avatar-list-overlap]': 'isOverlapMode()'\n },\n providers: [UpdateHostClassService],\n imports: [NgTemplateOutlet]\n})\nexport class ThyAvatarList {\n public avatarItems: ThyAvatar[] = [];\n\n /**\n * 展示方式\n * @type overlap | default\n */\n readonly thyMode = input<ThyAvatarListMode>(ThyAvatarListMode.default);\n\n readonly isOverlapMode = computed(() => {\n return this.thyMode() === ThyAvatarListMode.overlap;\n });\n\n /**\n * 头像大小\n * @type 16 | 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px)\n * @default 36\n */\n readonly thyAvatarSize = input<number | string>(DEFAULT_SIZE);\n\n /**\n * append 自定义操作\n */\n readonly append = contentChild<TemplateRef<SafeAny>>('append');\n\n /**\n * @private\n */\n readonly avatarComponents = contentChildren<ThyAvatar>(ThyAvatar);\n\n constructor() {\n effect(() => {\n this.updateAvatarItems();\n });\n }\n\n private updateAvatarItems() {\n this.avatarItems = Array.from(this.avatarComponents());\n this.avatarItems.forEach((item, index) => {\n item.thySize.set(this.thyAvatarSize());\n item.elementRef.nativeElement.style.zIndex = this.avatarItems.length - index;\n });\n }\n}\n","<ng-content></ng-content>\n\n@if (append()) {\n <div class=\"thy-avatar-append\">\n <ng-container [ngTemplateOutlet]=\"append()\"></ng-container>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyAvatar } from './avatar.component';\nimport { AvatarPipes } from './avatar.pipe';\nimport { ThyAvatarService, ThyDefaultAvatarService } from './avatar.service';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyAvatarList } from './avatar-list/avatar-list.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyAvatar, ThyAvatarList, AvatarPipes],\n providers: [\n {\n provide: ThyAvatarService,\n useClass: ThyDefaultAvatarService\n }\n ],\n exports: [ThyAvatar, ThyAvatarList, AvatarPipes]\n})\nexport class ThyAvatarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AvatarShortNamePipe","i1.AvatarBgColorPipe","i1.AvatarSrcPipe"],"mappings":";;;;;;;;MAGsB,gBAAgB,CAAA;AAAtC,IAAA,WAAA,GAAA;AACI,QAAA,IAAA,CAAA,oBAAoB,GAAG,CAAC,CAAA,WAAA,CAAa,CAAC;IAU1C;AAAC;AAGK,MAAO,uBAAwB,SAAQ,gBAAgB,CAAA;AACzD;;AAEG;IACH,kBAAkB,CAAC,GAAW,EAAE,IAAY,EAAA;AACxC,QAAA,OAAO,GAAG;IACd;IAEA,YAAY,CAAC,GAAW,EAAE,IAAY,EAAA;AAClC,QAAA,OAAO,GAAG;IACd;AAEA,IAAA,aAAa,CAAC,IAAY,EAAA;AACtB,QAAA,OAAO,IAAI;IACf;+GAdS,uBAAuB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAvB,uBAAuB,EAAA,CAAA,CAAA;;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC;;;ACbD;;;AAGG;AACH,MAAM,wBAAwB,GAAG,oBAAoB;AAErD,MAAM,oBAAoB,GAAG,gBAAgB;AAE7C;;AAEG;MAIU,mBAAmB,CAAA;AAC5B,IAAA,SAAS,CAAC,IAA+B,EAAA;QACrC,IAAI,CAAC,IAAI,EAAE;AACP,YAAA,OAAO,EAAE;QACb;AAEA,QAAA,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;AAElB,QAAA,IAAI,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,E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,EAAA,CAAA;;MExCvD,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAf,eAAe,EAAA,OAAA,EAAA,CATd,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAAA,mBAAA,EAAAC,iBAAA,EAAAC,aAAA,CAAA,EAAA,OAAA,EAAA,CAOrD,SAAS,EAAE,aAAa,EAAAF,mBAAA,EAAAC,iBAAA,EAAAC,aAAA,CAAA,EAAA,CAAA,CAAA;AAEzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAAA,SAAA,EARb;AACP,YAAA;AACI,gBAAA,OAAO,EAAE,gBAAgB;AACzB,gBAAA,QAAQ,EAAE;AACb;AACJ,SAAA,EAAA,OAAA,EAAA,CANS,YAAY,EAAE,aAAa,EAAE,SAAS,CAAA,EAAA,CAAA,CAAA;;4FASvC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAV3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,CAAC;AAC7E,oBAAA,SAAS,EAAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,gBAAgB;AACzB,4BAAA,QAAQ,EAAE;AACb;AACJ,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW;AAClD,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, NgZone, input, numberAttribute, output, viewChild, computed, effect, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
-
import {
|
|
2
|
+
import { inject, DOCUMENT, ChangeDetectorRef, NgZone, input, numberAttribute, output, viewChild, computed, effect, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
4
4
|
import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
|
|
5
5
|
import { BehaviorSubject, Subject, Observable, EMPTY, fromEvent } from 'rxjs';
|
|
6
6
|
import { Platform } from '@angular/cdk/platform';
|
|
@@ -22,18 +22,18 @@ class ThyBackTop {
|
|
|
22
22
|
/**
|
|
23
23
|
* 自定义按钮显示模板
|
|
24
24
|
*/
|
|
25
|
-
this.thyTemplate = input();
|
|
25
|
+
this.thyTemplate = input(...(ngDevMode ? [undefined, { debugName: "thyTemplate" }] : []));
|
|
26
26
|
/**
|
|
27
27
|
* 指定对哪个 DOM 元素返回顶部
|
|
28
28
|
* @type string | HTMLElement
|
|
29
29
|
* @default window
|
|
30
30
|
*/
|
|
31
|
-
this.thyContainer = input();
|
|
31
|
+
this.thyContainer = input(...(ngDevMode ? [undefined, { debugName: "thyContainer" }] : []));
|
|
32
32
|
/**
|
|
33
33
|
* 滚动高度达到此参数值才出现 thy-back-top
|
|
34
34
|
* @type number
|
|
35
35
|
*/
|
|
36
|
-
this.thyVisibilityHeight = input(400, { transform: numberAttribute });
|
|
36
|
+
this.thyVisibilityHeight = input(400, ...(ngDevMode ? [{ debugName: "thyVisibilityHeight", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
37
37
|
/**
|
|
38
38
|
* 点击按钮的回调函数
|
|
39
39
|
*/
|
|
@@ -43,7 +43,7 @@ class ThyBackTop {
|
|
|
43
43
|
*/
|
|
44
44
|
this.visibleChange = output();
|
|
45
45
|
/** The native `<div class="thy-back-top"></div>` element. */
|
|
46
|
-
this.backTop = viewChild('backTop');
|
|
46
|
+
this.backTop = viewChild('backTop', ...(ngDevMode ? [{ debugName: "backTop" }] : []));
|
|
47
47
|
this.visible = false;
|
|
48
48
|
/**
|
|
49
49
|
* The subject used to store the native `<div class="thy-back-top"></div>` since
|
|
@@ -58,7 +58,7 @@ class ThyBackTop {
|
|
|
58
58
|
const thyContainerValue = this.thyContainer();
|
|
59
59
|
const target = typeof thyContainerValue === 'string' ? this.doc.querySelector(thyContainerValue) : thyContainerValue;
|
|
60
60
|
return target || window;
|
|
61
|
-
});
|
|
61
|
+
}, ...(ngDevMode ? [{ debugName: "target" }] : []));
|
|
62
62
|
const zone = this.zone;
|
|
63
63
|
this.backTop$
|
|
64
64
|
.pipe(switchMap(backTop => backTop
|
|
@@ -101,23 +101,23 @@ class ThyBackTop {
|
|
|
101
101
|
this.destroy$.next();
|
|
102
102
|
this.scrollListenerDestroy$.next();
|
|
103
103
|
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
105
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyBackTop, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: ThyBackTop, isStandalone: true, selector: "thy-back-top,[thyBackTop]", inputs: { thyTemplate: { classPropertyName: "thyTemplate", publicName: "thyTemplate", isSignal: true, isRequired: false, transformFunction: null }, thyContainer: { classPropertyName: "thyContainer", publicName: "thyContainer", isSignal: true, isRequired: false, transformFunction: null }, thyVisibilityHeight: { classPropertyName: "thyVisibilityHeight", publicName: "thyVisibilityHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyClick: "thyClick", visibleChange: "visibleChange" }, host: { properties: { "class.thy-back-top-container": "this.classNames" } }, viewQueries: [{ propertyName: "backTop", first: true, predicate: ["backTop"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (visible) {\n <div class=\"thy-back-top\" #backTop @fadeMotion>\n <ng-template #defaultContent>\n <div class=\"thy-back-top-content\">\n <thy-icon class=\"back-top-icon text-muted font-size-lg\" thyIconName=\"arrow-up\"></thy-icon>\n </div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"thyTemplate() || defaultContent\"></ng-template>\n </div>\n}\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [fadeMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
106
106
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyBackTop, decorators: [{
|
|
108
108
|
type: Component,
|
|
109
109
|
args: [{ selector: 'thy-back-top,[thyBackTop]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, animations: [fadeMotion], imports: [ThyIcon, NgTemplateOutlet], template: "@if (visible) {\n <div class=\"thy-back-top\" #backTop @fadeMotion>\n <ng-template #defaultContent>\n <div class=\"thy-back-top-content\">\n <thy-icon class=\"back-top-icon text-muted font-size-lg\" thyIconName=\"arrow-up\"></thy-icon>\n </div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"thyTemplate() || defaultContent\"></ng-template>\n </div>\n}\n" }]
|
|
110
110
|
}], ctorParameters: () => [], propDecorators: { classNames: [{
|
|
111
111
|
type: HostBinding,
|
|
112
112
|
args: ['class.thy-back-top-container']
|
|
113
|
-
}] } });
|
|
113
|
+
}], thyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTemplate", required: false }] }], thyContainer: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyContainer", required: false }] }], thyVisibilityHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyVisibilityHeight", required: false }] }], thyClick: [{ type: i0.Output, args: ["thyClick"] }], visibleChange: [{ type: i0.Output, args: ["visibleChange"] }], backTop: [{ type: i0.ViewChild, args: ['backTop', { isSignal: true }] }] } });
|
|
114
114
|
|
|
115
115
|
class ThyBackTopModule {
|
|
116
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
117
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
118
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
116
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyBackTopModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
117
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: ThyBackTopModule, imports: [CommonModule, ThyIconModule, ThyBackTop], exports: [ThyBackTop] }); }
|
|
118
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyBackTopModule, imports: [CommonModule, ThyIconModule, ThyBackTop] }); }
|
|
119
119
|
}
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ThyBackTopModule, decorators: [{
|
|
121
121
|
type: NgModule,
|
|
122
122
|
args: [{
|
|
123
123
|
imports: [CommonModule, ThyIconModule, ThyBackTop],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-back-top.mjs","sources":["../../../src/back-top/back-top.component.ts","../../../src/back-top/back-top.component.html","../../../src/back-top/back-top.module.ts","../../../src/back-top/ngx-tethys-back-top.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n TemplateRef,\n HostBinding,\n NgZone,\n ChangeDetectorRef,\n OnDestroy,\n OnChanges,\n ViewChild,\n ElementRef,\n numberAttribute,\n inject,\n input,\n output,\n effect,\n viewChild,\n Signal,\n computed\n} from '@angular/core';\nimport { Subject, fromEvent, BehaviorSubject, EMPTY, Observable } from 'rxjs';\nimport { Platform } from '@angular/cdk/platform';\nimport { throttleTime, takeUntil, switchMap } from 'rxjs/operators';\nimport { DOCUMENT, NgTemplateOutlet } from '@angular/common';\nimport { fadeMotion, ThyScrollService } from 'ngx-tethys/core';\nimport { ThyIcon } from 'ngx-tethys/icon';\n\n/**\n * 回到顶部组件\n * @name thy-back-top\n */\n@Component({\n selector: 'thy-back-top,[thyBackTop]',\n templateUrl: './back-top.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [fadeMotion],\n imports: [ThyIcon, NgTemplateOutlet]\n})\nexport class ThyBackTop implements OnInit, OnDestroy {\n private doc = inject(DOCUMENT);\n private thyScrollService = inject(ThyScrollService);\n private platform = inject(Platform);\n private cdr = inject(ChangeDetectorRef);\n private zone = inject(NgZone);\n\n @HostBinding('class.thy-back-top-container') classNames = true;\n\n /**\n * 自定义按钮显示模板\n */\n readonly thyTemplate = input<TemplateRef<void>>();\n\n /**\n * 指定对哪个 DOM 元素返回顶部\n * @type string | HTMLElement\n * @default window\n */\n readonly thyContainer = input<string | HTMLElement>();\n\n /**\n * 滚动高度达到此参数值才出现 thy-back-top\n * @type number\n */\n readonly thyVisibilityHeight = input(400, { transform: numberAttribute });\n\n /**\n * 点击按钮的回调函数\n */\n readonly thyClick = output<boolean>();\n\n /**\n * 监听按钮显示状态的回调函数\n */\n public readonly visibleChange = output<boolean>();\n\n /** The native `<div class=\"thy-back-top\"></div>` element. */\n readonly backTop = viewChild<ElementRef<HTMLElement>>('backTop');\n\n public visible = false;\n\n /**\n * The subject used to store the native `<div class=\"thy-back-top\"></div>` since\n * it's located within the `ngIf` directive. It might be set asynchronously whenever the condition\n * is met. Having subject makes the code reactive and cancellable (e.g. event listeners will be\n * automatically removed and re-added through the `switchMap` below).\n */\n private backTop$ = new BehaviorSubject<ElementRef<HTMLElement> | undefined>(undefined);\n\n private destroy$ = new Subject<void>();\n\n private scrollListenerDestroy$ = new Subject<void>();\n\n private target: Signal<Element | Window> = computed(() => {\n const thyContainerValue = this.thyContainer();\n const target = typeof thyContainerValue === 'string' ? this.doc.querySelector(thyContainerValue) : thyContainerValue;\n return target || window;\n });\n\n constructor() {\n const zone = this.zone;\n\n this.backTop$\n .pipe(\n switchMap(backTop =>\n backTop\n ? new Observable(subscriber =>\n zone.runOutsideAngular(() => fromEvent(backTop.nativeElement, 'click').subscribe(subscriber))\n )\n : EMPTY\n ),\n takeUntil(this.destroy$)\n )\n .subscribe(() => {\n this.thyScrollService.scrollTo(this.target(), 0);\n zone.run(() => this.thyClick.emit(true));\n });\n\n effect(() => {\n this.backTop$.next(this.backTop());\n });\n }\n\n ngOnInit(): void {\n this.registerScrollEvent();\n }\n\n private handleScroll(): void {\n if (this.visible === this.thyScrollService.getScroll(this.target()) > this.thyVisibilityHeight()) {\n return;\n }\n this.visible = !this.visible;\n this.cdr.detectChanges();\n this.zone.run(() => {\n this.visibleChange.emit(this.visible);\n });\n }\n\n private registerScrollEvent(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.scrollListenerDestroy$.next();\n this.handleScroll();\n this.zone.runOutsideAngular(() => {\n fromEvent(this.target(), 'scroll', { passive: true })\n .pipe(throttleTime(50), takeUntil(this.scrollListenerDestroy$))\n .subscribe(() => this.handleScroll());\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.scrollListenerDestroy$.next();\n }\n}\n","@if (visible) {\n <div class=\"thy-back-top\" #backTop @fadeMotion>\n <ng-template #defaultContent>\n <div class=\"thy-back-top-content\">\n <thy-icon class=\"back-top-icon text-muted font-size-lg\" thyIconName=\"arrow-up\"></thy-icon>\n </div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"thyTemplate() || defaultContent\"></ng-template>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyBackTop } from './back-top.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyBackTop],\n exports: [ThyBackTop]\n})\nexport class ThyBackTopModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA6BA;;;AAGG;MASU,UAAU,CAAA;AA4DnB,IAAA,WAAA,GAAA;AA3DQ,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC3C,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;QAEgB,IAAU,CAAA,UAAA,GAAG,IAAI;AAE9D;;AAEG;QACM,IAAW,CAAA,WAAA,GAAG,KAAK,EAAqB;AAEjD;;;;AAIG;QACM,IAAY,CAAA,YAAA,GAAG,KAAK,EAAwB;AAErD;;;AAGG;QACM,IAAmB,CAAA,mBAAA,GAAG,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AAEzE;;AAEG;QACM,IAAQ,CAAA,QAAA,GAAG,MAAM,EAAW;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;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-back-top.mjs","sources":["../../../src/back-top/back-top.component.ts","../../../src/back-top/back-top.component.html","../../../src/back-top/back-top.module.ts","../../../src/back-top/ngx-tethys-back-top.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n TemplateRef,\n HostBinding,\n NgZone,\n ChangeDetectorRef,\n OnDestroy,\n OnChanges,\n ViewChild,\n ElementRef,\n numberAttribute,\n inject,\n input,\n output,\n effect,\n viewChild,\n Signal,\n computed,\n DOCUMENT\n} from '@angular/core';\nimport { Subject, fromEvent, BehaviorSubject, EMPTY, Observable } from 'rxjs';\nimport { Platform } from '@angular/cdk/platform';\nimport { throttleTime, takeUntil, switchMap } from 'rxjs/operators';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { fadeMotion, ThyScrollService } from 'ngx-tethys/core';\nimport { ThyIcon } from 'ngx-tethys/icon';\n\n/**\n * 回到顶部组件\n * @name thy-back-top\n */\n@Component({\n selector: 'thy-back-top,[thyBackTop]',\n templateUrl: './back-top.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [fadeMotion],\n imports: [ThyIcon, NgTemplateOutlet]\n})\nexport class ThyBackTop implements OnInit, OnDestroy {\n private doc = inject(DOCUMENT);\n private thyScrollService = inject(ThyScrollService);\n private platform = inject(Platform);\n private cdr = inject(ChangeDetectorRef);\n private zone = inject(NgZone);\n\n @HostBinding('class.thy-back-top-container') classNames = true;\n\n /**\n * 自定义按钮显示模板\n */\n readonly thyTemplate = input<TemplateRef<void>>();\n\n /**\n * 指定对哪个 DOM 元素返回顶部\n * @type string | HTMLElement\n * @default window\n */\n readonly thyContainer = input<string | HTMLElement>();\n\n /**\n * 滚动高度达到此参数值才出现 thy-back-top\n * @type number\n */\n readonly thyVisibilityHeight = input(400, { transform: numberAttribute });\n\n /**\n * 点击按钮的回调函数\n */\n readonly thyClick = output<boolean>();\n\n /**\n * 监听按钮显示状态的回调函数\n */\n public readonly visibleChange = output<boolean>();\n\n /** The native `<div class=\"thy-back-top\"></div>` element. */\n readonly backTop = viewChild<ElementRef<HTMLElement>>('backTop');\n\n public visible = false;\n\n /**\n * The subject used to store the native `<div class=\"thy-back-top\"></div>` since\n * it's located within the `ngIf` directive. It might be set asynchronously whenever the condition\n * is met. Having subject makes the code reactive and cancellable (e.g. event listeners will be\n * automatically removed and re-added through the `switchMap` below).\n */\n private backTop$ = new BehaviorSubject<ElementRef<HTMLElement> | undefined>(undefined);\n\n private destroy$ = new Subject<void>();\n\n private scrollListenerDestroy$ = new Subject<void>();\n\n private target: Signal<Element | Window> = computed(() => {\n const thyContainerValue = this.thyContainer();\n const target = typeof thyContainerValue === 'string' ? this.doc.querySelector(thyContainerValue) : thyContainerValue;\n return target || window;\n });\n\n constructor() {\n const zone = this.zone;\n\n this.backTop$\n .pipe(\n switchMap(backTop =>\n backTop\n ? new Observable(subscriber =>\n zone.runOutsideAngular(() => fromEvent(backTop.nativeElement, 'click').subscribe(subscriber))\n )\n : EMPTY\n ),\n takeUntil(this.destroy$)\n )\n .subscribe(() => {\n this.thyScrollService.scrollTo(this.target(), 0);\n zone.run(() => this.thyClick.emit(true));\n });\n\n effect(() => {\n this.backTop$.next(this.backTop());\n });\n }\n\n ngOnInit(): void {\n this.registerScrollEvent();\n }\n\n private handleScroll(): void {\n if (this.visible === this.thyScrollService.getScroll(this.target()) > this.thyVisibilityHeight()) {\n return;\n }\n this.visible = !this.visible;\n this.cdr.detectChanges();\n this.zone.run(() => {\n this.visibleChange.emit(this.visible);\n });\n }\n\n private registerScrollEvent(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.scrollListenerDestroy$.next();\n this.handleScroll();\n this.zone.runOutsideAngular(() => {\n fromEvent(this.target(), 'scroll', { passive: true })\n .pipe(throttleTime(50), takeUntil(this.scrollListenerDestroy$))\n .subscribe(() => this.handleScroll());\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.scrollListenerDestroy$.next();\n }\n}\n","@if (visible) {\n <div class=\"thy-back-top\" #backTop @fadeMotion>\n <ng-template #defaultContent>\n <div class=\"thy-back-top-content\">\n <thy-icon class=\"back-top-icon text-muted font-size-lg\" thyIconName=\"arrow-up\"></thy-icon>\n </div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"thyTemplate() || defaultContent\"></ng-template>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyBackTop } from './back-top.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyBackTop],\n exports: [ThyBackTop]\n})\nexport class ThyBackTopModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA8BA;;;AAGG;MASU,UAAU,CAAA;AA4DnB,IAAA,WAAA,GAAA;AA3DQ,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC3C,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;QAEgB,IAAA,CAAA,UAAU,GAAG,IAAI;AAE9D;;AAEG;QACM,IAAA,CAAA,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAqB;AAEjD;;;;AAIG;QACM,IAAA,CAAA,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CA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