ngx-tethys 22.0.2 → 22.0.3
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 +37 -0
- package/button/styles/button-group.scss +25 -18
- package/button/styles/button.scss +3 -1
- package/button/styles/mixin.scss +7 -2
- package/button/styles/theme.scss +3 -1
- package/cascader/styles/cascader.scss +5 -0
- package/date-picker/styles/index.scss +5 -0
- package/date-picker/styles/picker.scss +5 -0
- package/fesm2022/ngx-tethys-action.mjs +13 -4
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-alert.mjs +2 -2
- package/fesm2022/ngx-tethys-alert.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +17 -6
- package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
- package/fesm2022/ngx-tethys-autocomplete.mjs +11 -3
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-badge.mjs +17 -5
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-breadcrumb.mjs +1 -1
- package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngx-tethys-button.mjs +39 -21
- package/fesm2022/ngx-tethys-button.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +1 -3
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +36 -28
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-collapse.mjs +2 -2
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-core.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +30 -18
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-range.mjs +2 -2
- package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dialog.mjs +193 -195
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +18 -7
- package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dropdown.mjs +16 -5
- package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +447 -101
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +1 -1
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +10 -4
- package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input.mjs +54 -13
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +36 -6
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-native-table.mjs +26 -11
- package/fesm2022/ngx-tethys-native-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +4 -2
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +1 -1
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +81 -55
- package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property-operation.mjs +32 -24
- package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +1 -0
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-segment.mjs +0 -1
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +27 -9
- package/fesm2022/ngx-tethys-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-shared.mjs +16 -7
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slide.mjs +1 -1
- package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +38 -13
- package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-statistic.mjs +20 -10
- package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-strength.mjs +9 -1
- package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +20 -11
- package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs +28 -17
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +2 -2
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +10 -4
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +2 -8
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree-select.mjs +11 -6
- package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +0 -1
- package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/form/styles/forms.scss +1 -0
- package/form/styles/mixin.scss +37 -0
- package/form/styles/theme.scss +1 -0
- package/input/styles/input.scss +28 -19
- package/input-number/styles/input-number.scss +22 -3
- package/menu/examples/variant/variant.component.scss +21 -0
- package/package.json +1 -1
- package/schematics/ng-update/update-22/badge-dot-hollow-migration.spec.js +4 -4
- package/schematics/ng-update/update-22/button-appearance-migration.js +2 -0
- package/schematics/ng-update/update-22/button-appearance-migration.spec.js +0 -4
- package/schematics/ng-update/update-22/button-group-appearance-migration.d.ts +6 -0
- package/schematics/ng-update/update-22/button-group-appearance-migration.js +157 -0
- package/schematics/ng-update/update-22/button-group-appearance-migration.spec.d.ts +1 -0
- package/schematics/ng-update/update-22/button-group-appearance-migration.spec.js +56 -0
- package/schematics/ng-update/update-22/class-name-migration.spec.js +135 -0
- package/schematics/ng-update/update-22/divider-deeper-migration.js +12 -5
- package/schematics/ng-update/update-22/divider-deeper-migration.spec.js +9 -1
- package/schematics/ng-update/update-22/index.js +9 -1
- package/schematics/ng-update/update-22/index.spec.js +581 -3
- package/schematics/ng-update/update-22/input-search-appearance-migration.d.ts +6 -0
- package/schematics/ng-update/update-22/input-search-appearance-migration.js +94 -0
- package/schematics/ng-update/update-22/input-search-appearance-migration.spec.d.ts +1 -0
- package/schematics/ng-update/update-22/input-search-appearance-migration.spec.js +41 -0
- package/schematics/ng-update/update-22/menu-theme-migration.d.ts +14 -0
- package/schematics/ng-update/update-22/menu-theme-migration.js +108 -0
- package/schematics/ng-update/update-22/menu-theme-migration.spec.d.ts +1 -0
- package/schematics/ng-update/update-22/menu-theme-migration.spec.js +42 -0
- package/schematics/ng-update/update-22/select-borderless-migration.d.ts +6 -0
- package/schematics/ng-update/update-22/select-borderless-migration.js +111 -0
- package/schematics/ng-update/update-22/select-borderless-migration.spec.d.ts +1 -0
- package/schematics/ng-update/update-22/select-borderless-migration.spec.js +49 -0
- package/schematics/ng-update/update-22/update-data.js +102 -1
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/select/styles/custom-select.scss +5 -0
- package/select/styles/theme.scss +10 -0
- package/shared/select/select-control/select-control.scss +4 -3
- package/time-picker/styles/time-picker.scss +11 -2
- package/types/ngx-tethys-action.d.ts +14 -5
- package/types/ngx-tethys-alert.d.ts +2 -2
- package/types/ngx-tethys-arrow-switcher.d.ts +16 -5
- package/types/ngx-tethys-autocomplete.d.ts +8 -2
- package/types/ngx-tethys-badge.d.ts +14 -4
- package/types/ngx-tethys-button.d.ts +28 -9
- package/types/ngx-tethys-card.d.ts +3 -6
- package/types/ngx-tethys-cascader.d.ts +9 -3
- package/types/ngx-tethys-collapse.d.ts +3 -3
- package/types/ngx-tethys-core.d.ts +2 -1
- package/types/ngx-tethys-date-picker.d.ts +15 -3
- package/types/ngx-tethys-dialog.d.ts +1 -3
- package/types/ngx-tethys-divider.d.ts +20 -9
- package/types/ngx-tethys-dropdown.d.ts +16 -5
- package/types/ngx-tethys-form.d.ts +198 -55
- package/types/ngx-tethys-input-number.d.ts +8 -2
- package/types/ngx-tethys-input.d.ts +39 -8
- package/types/ngx-tethys-menu.d.ts +16 -4
- package/types/ngx-tethys-native-table.d.ts +21 -6
- package/types/ngx-tethys-nav.d.ts +2 -0
- package/types/ngx-tethys-progress.d.ts +42 -18
- package/types/ngx-tethys-property-operation.d.ts +6 -0
- package/types/ngx-tethys-segment.d.ts +0 -1
- package/types/ngx-tethys-select.d.ts +23 -5
- package/types/ngx-tethys-shared.d.ts +12 -3
- package/types/ngx-tethys-slider.d.ts +22 -8
- package/types/ngx-tethys-space.d.ts +3 -1
- package/types/ngx-tethys-statistic.d.ts +23 -9
- package/types/ngx-tethys-stepper.d.ts +1 -1
- package/types/ngx-tethys-strength.d.ts +5 -0
- package/types/ngx-tethys-switch.d.ts +15 -4
- package/types/ngx-tethys-table.d.ts +24 -8
- package/types/ngx-tethys-tabs.d.ts +3 -3
- package/types/ngx-tethys-time-picker.d.ts +8 -2
- package/types/ngx-tethys-timeline.d.ts +13 -14
- package/types/ngx-tethys-tree-select.d.ts +8 -3
- package/types/ngx-tethys-typography.d.ts +0 -1
- /package/action/examples/{type/type.component.scss → color/color.component.scss} +0 -0
- /package/badge/examples/{type/type.component.scss → color/color.component.scss} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [22.0.3](github.com/atinc/ngx-tethys/compare/22.0.2...22.0.3) (2026-09-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **radio:** support md size class for radio-group #TINFR-4085 ([#3947](/github.com/atinc/ngx-tethys/issues/3947)) ([aaafd1a](github.com/atinc/ngx-tethys/commits/aaafd1a1e347db9e4719b5ff185ca70e9b5e9b17)), closes [#TINFR-4085](github.com/atinc/ngx-tethys/issues/TINFR-4085)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **action:** add thyColor and ThyActionColor, deprecate thyType and ThyActionType #TINFR-4096 ([#3957](/github.com/atinc/ngx-tethys/issues/3957)) ([5f81cd9](github.com/atinc/ngx-tethys/commits/5f81cd9519816718e6e039233a31d6d32ce25d6f)), closes [#TINFR-4096](github.com/atinc/ngx-tethys/issues/TINFR-4096)
|
|
16
|
+
* **arrow-switcher:** add thyVariant and ThyArrowSwitcherVariant, deprecate thyTheme and ThyArrowSwitcherTheme #TINFR-4094 ([#3955](/github.com/atinc/ngx-tethys/issues/3955)) ([07f6160](github.com/atinc/ngx-tethys/commits/07f616046fc21d8d8c8238dd88af65cc69317a60)), closes [#TINFR-4094](github.com/atinc/ngx-tethys/issues/TINFR-4094)
|
|
17
|
+
* **autocomplete:** support thyAppearance outline | subtle | ghost #TINFR-4110 ([#3967](/github.com/atinc/ngx-tethys/issues/3967)) ([6ea6f71](github.com/atinc/ngx-tethys/commits/6ea6f71744e61bd20ddf884b097a901f588601fd)), closes [#TINFR-4110](github.com/atinc/ngx-tethys/issues/TINFR-4110)
|
|
18
|
+
* **badge:** add thyColor, ThyBadgeColor and mark thyType as deprecated #TINFR-4089 ([#3951](/github.com/atinc/ngx-tethys/issues/3951)) ([8895cbc](github.com/atinc/ngx-tethys/commits/8895cbcc7a76558a7102f6b353cbce42d0e17de5)), closes [#TINFR-4089](github.com/atinc/ngx-tethys/issues/TINFR-4089)
|
|
19
|
+
* **button:** support thyAppearance for button-group and mark thyType deprecated #TINFR-3995 ([#3946](/github.com/atinc/ngx-tethys/issues/3946)) ([83e39cd](github.com/atinc/ngx-tethys/commits/83e39cdbad171277b02b589202989036524af1a6)), closes [#TINFR-3995](github.com/atinc/ngx-tethys/issues/TINFR-3995)
|
|
20
|
+
* **cascader:** support thyAppearance outline | subtle | ghost #TINFR-4109 ([#3970](/github.com/atinc/ngx-tethys/issues/3970)) ([825f4c0](github.com/atinc/ngx-tethys/commits/825f4c0d4c47ba732ed0f9da376c2b6974273ed1)), closes [#TINFR-4109](github.com/atinc/ngx-tethys/issues/TINFR-4109)
|
|
21
|
+
* **datePicker:** support thyAppearance outline | subtle | ghost #TIN… ([#3968](/github.com/atinc/ngx-tethys/issues/3968)) ([3af16c9](github.com/atinc/ngx-tethys/commits/3af16c917ce25e66e6580a5a4922486b7844ed46))
|
|
22
|
+
* **divider:** support thyAppearance,ThyDividerAppearance,and mark thyStyle,ThyDividerStyle as deprecated #TINFR-4087 ([#3949](/github.com/atinc/ngx-tethys/issues/3949)) ([3dff1b6](github.com/atinc/ngx-tethys/commits/3dff1b681051b9cd0fc7ffc300c9b17a5ca67236)), closes [#TINFR-4087](github.com/atinc/ngx-tethys/issues/TINFR-4087) [#TINFR-4087](github.com/atinc/ngx-tethys/issues/TINFR-4087)
|
|
23
|
+
* **dropdown:** introduce thyColor and ThyDropdownMenuItemColor, mark thyType and ThyDropdownMenuItemType as deprecated #TINFR-4095 ([#3956](/github.com/atinc/ngx-tethys/issues/3956)) ([0a246de](github.com/atinc/ngx-tethys/commits/0a246defaeeb04b5a8f0669196edf15962c0f9db)), closes [#TINFR-4095](github.com/atinc/ngx-tethys/issues/TINFR-4095)
|
|
24
|
+
* **form:** 支持由 schema 驱动的动态表单 #TINFR-4119 ([#3966](/github.com/atinc/ngx-tethys/issues/3966)) ([c3fffeb](github.com/atinc/ngx-tethys/commits/c3fffeb8fcc35a12abbcbef62b960683162d7d64)), closes [#TINFR-4119](github.com/atinc/ngx-tethys/issues/TINFR-4119) [#TINFR-4119](github.com/atinc/ngx-tethys/issues/TINFR-4119)
|
|
25
|
+
* **input-number:** support thyAppearance outline | subtle | ghost #TINFR-4113 ([#3971](/github.com/atinc/ngx-tethys/issues/3971)) ([cddd76c](github.com/atinc/ngx-tethys/commits/cddd76c3f90c0c5a543d9f9ab22a467436844d21)), closes [#TINFR-4113](github.com/atinc/ngx-tethys/issues/TINFR-4113)
|
|
26
|
+
* **input-search:** add thyAppearance,ThyInputSearchAppearance and mark thyTheme,ThyInputSearchTheme as deprecated #TINFR-4099 ([#3958](/github.com/atinc/ngx-tethys/issues/3958)) ([2f0cdc8](github.com/atinc/ngx-tethys/commits/2f0cdc8344e4e9b8fa9624eac8d190834fd6c1dd)), closes [#TINFR-4099](github.com/atinc/ngx-tethys/issues/TINFR-4099)
|
|
27
|
+
* **input-search:** rename thyTheme and ThyInputSearchTheme to thyVariant and ThyInputSearchVariant #TINFR-4099 ([1bfe11b](github.com/atinc/ngx-tethys/commits/1bfe11b03f36218c0a770058a04830199493a3e7)), closes [#TINFR-4099](github.com/atinc/ngx-tethys/issues/TINFR-4099)
|
|
28
|
+
* **input:** support thyAppearance outline | subtle | ghost #TINFR-4107 ([#3960](/github.com/atinc/ngx-tethys/issues/3960)) ([2cc4e35](github.com/atinc/ngx-tethys/commits/2cc4e3561388f508e31c4d05726124ea0d289f52)), closes [#TINFR-4107](github.com/atinc/ngx-tethys/issues/TINFR-4107)
|
|
29
|
+
* **menu:** thyVariant,ThyMenuVariant support compact,loose and thyTheme,ThyMenuTheme support light,dark #TINFR-4070 ([#3945](/github.com/atinc/ngx-tethys/issues/3945)) ([a29b087](github.com/atinc/ngx-tethys/commits/a29b08712c2f58261097dcba748dab4fc02ac934)), closes [#TINFR-4070](github.com/atinc/ngx-tethys/issues/TINFR-4070) [#TINFR-4078](github.com/atinc/ngx-tethys/issues/TINFR-4078)
|
|
30
|
+
* **nav, property-operation:** deprecate thy-icon-nav, thyIconNavLink, thy-property-operation, and related components #NEXUS-5493 ([#3961](/github.com/atinc/ngx-tethys/issues/3961)) ([a7a5829](github.com/atinc/ngx-tethys/commits/a7a582910527b264950813ca65dd36e6b71a7787)), closes [#NEXUS-5493](github.com/atinc/ngx-tethys/issues/NEXUS-5493)
|
|
31
|
+
* **progress:** add thyColor,ThyProgressColor,ThyProgressShape,ThyProgressGapPosition and mark thyType,ThyProgressType,ThyProgressShapeType,ThyProgressGapPositionType as deprecated #TINFR-4090 ([#3952](/github.com/atinc/ngx-tethys/issues/3952)) ([a6970c9](github.com/atinc/ngx-tethys/commits/a6970c9c821eb981c55d1a8015dda8355b137c22)), closes [#TINFR-4090](github.com/atinc/ngx-tethys/issues/TINFR-4090)
|
|
32
|
+
* **select:** support thyAppearance outline | subtle | ghost #TINFR-4108 ([#3965](/github.com/atinc/ngx-tethys/issues/3965)) ([26bd3a0](github.com/atinc/ngx-tethys/commits/26bd3a02daddaa3cea0648eb864a78bcea2ad526)), closes [#TINFR-4108](github.com/atinc/ngx-tethys/issues/TINFR-4108)
|
|
33
|
+
* **slider:** thyColor support primary | success | info | warning | danger | string,mark thyType, ThySliderType as deprecated #TINFR-4086 ([#3948](/github.com/atinc/ngx-tethys/issues/3948)) ([a25b133](github.com/atinc/ngx-tethys/commits/a25b1330fb89c4ab7f2930921f9260396a242538)), closes [#TINFR-4086](github.com/atinc/ngx-tethys/issues/TINFR-4086)
|
|
34
|
+
* **statistic:** deprecate thyShape and ThyStatisticShape, introduce thyAppearance and ThyStatisticAppearance, ThyStatisticColorType → ThyStatisticColor, ThyStatisticSizes → ThyStatisticSize #TINFR-4091 ([#3953](/github.com/atinc/ngx-tethys/issues/3953)) ([3fc074b](github.com/atinc/ngx-tethys/commits/3fc074b9647872c5f345542343e436d590b9221d)), closes [#TINFR-4091](github.com/atinc/ngx-tethys/issues/TINFR-4091)
|
|
35
|
+
* **strength:** deprecate thy-strength and ThyStrengthModule, scheduled for removal in v23 ([#3962](/github.com/atinc/ngx-tethys/issues/3962)) ([f25087e](github.com/atinc/ngx-tethys/commits/f25087e989fb20c06c79a7d64b8178e1c9a40d5e))
|
|
36
|
+
* **switch:** add thyColor, ThySwitchColor and mark thyType as deprecated #TINFR-4088 ([#3950](/github.com/atinc/ngx-tethys/issues/3950)) ([ae1bed7](github.com/atinc/ngx-tethys/commits/ae1bed75399a236f01f94b15a7d5383aae5dbafb)), closes [#TINFR-4088](github.com/atinc/ngx-tethys/issues/TINFR-4088)
|
|
37
|
+
* **table:** add thyAppearance,deprecate thyTheme in thy-native-table and thy-table-skeleton ([#3959](/github.com/atinc/ngx-tethys/issues/3959)) ([50c2870](github.com/atinc/ngx-tethys/commits/50c2870f9aef5433c81bf1303db0cfe72532d60f))
|
|
38
|
+
* **time-picker:** support thyAppearance outline | subtle | ghost #TINFR-4114 ([#3972](/github.com/atinc/ngx-tethys/issues/3972)) ([a95c881](github.com/atinc/ngx-tethys/commits/a95c8810f4182ad98ebaec0d3cf9edf0d35d87d5)), closes [#TINFR-4114](github.com/atinc/ngx-tethys/issues/TINFR-4114)
|
|
39
|
+
* **timeline:** rename thyColor to ThyTimelineColor and ThyTimeMode to ThyTimelineMode; mark old types as deprecated #TINFR-4092 ([#3954](/github.com/atinc/ngx-tethys/issues/3954)) ([c1de9ef](github.com/atinc/ngx-tethys/commits/c1de9efb2e189d2cadb91f58b4dab1d638b4c03d)), closes [#TINFR-4092](github.com/atinc/ngx-tethys/issues/TINFR-4092)
|
|
40
|
+
* **tree-select:** support thyAppearance outline | subtle | ghost #TINFR-4115 ([#3974](/github.com/atinc/ngx-tethys/issues/3974)) ([4c26815](github.com/atinc/ngx-tethys/commits/4c268155d4e570f42c8c81508351d6100d7640bf)), closes [#TINFR-4115](github.com/atinc/ngx-tethys/issues/TINFR-4115)
|
|
41
|
+
|
|
5
42
|
## [22.0.2](github.com/atinc/ngx-tethys/compare/22.0.0...22.0.2) (2026-09-14)
|
|
6
43
|
|
|
7
44
|
|
|
@@ -80,9 +80,7 @@
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
// Sizing
|
|
84
|
-
//
|
|
85
|
-
// Remix the default button sizing classes into new ones for easier manipulation.
|
|
83
|
+
// Sizing(保留给 radio-group 等仍使用 btn-group-{size} 的场景;thy-button-group 已改为同步子按钮 size)
|
|
86
84
|
|
|
87
85
|
.btn-group-xs > .btn {
|
|
88
86
|
@extend .btn-xs;
|
|
@@ -114,7 +112,17 @@
|
|
|
114
112
|
}
|
|
115
113
|
}
|
|
116
114
|
|
|
117
|
-
// type
|
|
115
|
+
// type(thyType 兼容,勿删)
|
|
116
|
+
|
|
117
|
+
@mixin btn-group-divider {
|
|
118
|
+
position: absolute;
|
|
119
|
+
content: '';
|
|
120
|
+
width: bootstrap-variables.$btn-border-width;
|
|
121
|
+
height: 100%;
|
|
122
|
+
top: 0;
|
|
123
|
+
left: 0px;
|
|
124
|
+
background: rgba(variables.$white, 0.3);
|
|
125
|
+
}
|
|
118
126
|
|
|
119
127
|
@each $color, $value in functions-variables.$theme-colors {
|
|
120
128
|
.btn-group-#{$color} > .btn {
|
|
@@ -122,13 +130,7 @@
|
|
|
122
130
|
// 按钮中间的分割线
|
|
123
131
|
&:not(:first-child) {
|
|
124
132
|
&::before {
|
|
125
|
-
|
|
126
|
-
content: '';
|
|
127
|
-
width: bootstrap-variables.$btn-border-width;
|
|
128
|
-
height: 100%;
|
|
129
|
-
top: 0;
|
|
130
|
-
left: 0px;
|
|
131
|
-
background: rgba(variables.$white, 0.3);
|
|
133
|
+
@include btn-group-divider;
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
}
|
|
@@ -136,13 +138,7 @@
|
|
|
136
138
|
.btn-group-#{$color} {
|
|
137
139
|
.btn:not(:first-child) {
|
|
138
140
|
&::before {
|
|
139
|
-
|
|
140
|
-
content: '';
|
|
141
|
-
width: bootstrap-variables.$btn-border-width;
|
|
142
|
-
height: 100%;
|
|
143
|
-
top: 0;
|
|
144
|
-
left: 0px;
|
|
145
|
-
background: rgba(variables.$white, 0.3);
|
|
141
|
+
@include btn-group-divider;
|
|
146
142
|
}
|
|
147
143
|
}
|
|
148
144
|
}
|
|
@@ -161,6 +157,17 @@
|
|
|
161
157
|
}
|
|
162
158
|
}
|
|
163
159
|
|
|
160
|
+
// thyAppearance="fill":实心色按钮组中间分割线
|
|
161
|
+
.btn-group-fill {
|
|
162
|
+
@each $color, $value in functions-variables.$theme-colors {
|
|
163
|
+
> .btn-#{$color}:not(:first-child) {
|
|
164
|
+
&::before {
|
|
165
|
+
@include btn-group-divider;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
164
171
|
// The clickable button for toggling the menu
|
|
165
172
|
// Set the same inset shadow as the :active state
|
|
166
173
|
.btn-group.show .dropdown-toggle {
|
|
@@ -97,7 +97,9 @@ fieldset:disabled a.btn {
|
|
|
97
97
|
variables.$gray-200
|
|
98
98
|
);
|
|
99
99
|
|
|
100
|
-
&:hover
|
|
100
|
+
&:hover,
|
|
101
|
+
&:not(:disabled):not(.disabled):active,
|
|
102
|
+
&:not(:disabled):not(.disabled).active {
|
|
101
103
|
@include shadow.box-shadow(0px 2px 5px 1px variables.$gray-80);
|
|
102
104
|
}
|
|
103
105
|
}
|
package/button/styles/mixin.scss
CHANGED
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
color: $color;
|
|
23
23
|
@include gradients.gradient-bg($background);
|
|
24
24
|
border-color: $border;
|
|
25
|
-
|
|
25
|
+
&:hover,
|
|
26
|
+
&:not(:disabled):not(.disabled):active,
|
|
27
|
+
&:not(:disabled):not(.disabled).active,
|
|
28
|
+
.show > &.dropdown-toggle {
|
|
26
29
|
color: $hover-color;
|
|
27
30
|
@include gradients.gradient-bg($hover-background);
|
|
28
31
|
border-color: $hover-border;
|
|
@@ -88,7 +91,9 @@
|
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
@mixin button-hover-box-shadow($color) {
|
|
91
|
-
&:hover
|
|
94
|
+
&:hover,
|
|
95
|
+
&:not(:disabled):not(.disabled):active,
|
|
96
|
+
&:not(:disabled):not(.disabled).active {
|
|
92
97
|
@include shadow.box-shadow(0px 2px 5px 1px rgba($color, 0.6));
|
|
93
98
|
}
|
|
94
99
|
}
|
package/button/styles/theme.scss
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
.btn-default {
|
|
7
7
|
@include button-variant($gray-700, $gray-700, $gray-200, $gray-200, $gray-200, $gray-200, $gray-200, $gray-200);
|
|
8
8
|
|
|
9
|
-
&:hover
|
|
9
|
+
&:hover,
|
|
10
|
+
&:not(:disabled):not(.disabled):active,
|
|
11
|
+
&:not(:disabled):not(.disabled).active {
|
|
10
12
|
box-shadow: 0px 2px 5px 1px $gray-80;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
@@ -122,6 +122,11 @@
|
|
|
122
122
|
cursor: variables.$hand-cursor;
|
|
123
123
|
.panel-is-opened {
|
|
124
124
|
border-color: variables.$primary;
|
|
125
|
+
|
|
126
|
+
&.form-control-ghost {
|
|
127
|
+
border-color: transparent;
|
|
128
|
+
background-color: transparent;
|
|
129
|
+
}
|
|
125
130
|
}
|
|
126
131
|
.form-control {
|
|
127
132
|
padding-right: variables.$input-padding-x-md + variables.$font-size-md;
|
|
@@ -46,10 +46,19 @@ class ThyAction {
|
|
|
46
46
|
this.hostRenderer = useHostRenderer();
|
|
47
47
|
this.feedbackTimer = null;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* 操作图标的颜色
|
|
50
|
+
* @type primary | success | danger | warning
|
|
51
|
+
*/
|
|
52
|
+
this.thyColor = input(/* @ts-ignore */
|
|
53
|
+
...(ngDevMode ? [undefined, { debugName: "thyColor" }] : /* istanbul ignore next */ []));
|
|
54
|
+
/**
|
|
55
|
+
* 操作图标的类型(已废弃,将在 v23 彻底删除),请使用 thyColor
|
|
56
|
+
* @deprecated please use thyColor, will be removed in v23
|
|
50
57
|
* @type primary | success | danger | warning
|
|
51
58
|
*/
|
|
52
59
|
this.thyType = input('primary', { ...(ngDevMode ? { debugName: "thyType" } : /* istanbul ignore next */ {}), transform: (value) => value || 'primary' });
|
|
60
|
+
this.color = computed(() => this.thyColor() || this.thyType() || 'primary', /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
53
62
|
/**
|
|
54
63
|
* 操作图标,支持传参同时也支持在投影中写 thy-icon 组件
|
|
55
64
|
*/
|
|
@@ -135,7 +144,7 @@ class ThyAction {
|
|
|
135
144
|
}
|
|
136
145
|
updateClasses() {
|
|
137
146
|
const classNames = [];
|
|
138
|
-
classNames.push(`action-${this.
|
|
147
|
+
classNames.push(`action-${this.color()}`);
|
|
139
148
|
if (this.thyAppearance() === 'lite') {
|
|
140
149
|
classNames.push('thy-action-lite');
|
|
141
150
|
}
|
|
@@ -145,7 +154,7 @@ class ThyAction {
|
|
|
145
154
|
this.feedbackTimer?.unsubscribe();
|
|
146
155
|
}
|
|
147
156
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThyAction, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
148
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ThyAction, isStandalone: true, selector: "thy-action, [thyAction]", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thyIcon: { classPropertyName: "thyIcon", publicName: "thyIcon", isSignal: true, isRequired: false, transformFunction: null }, thyActionIcon: { classPropertyName: "thyActionIcon", publicName: "thyActionIcon", isSignal: true, isRequired: false, transformFunction: null }, thyActive: { classPropertyName: "thyActive", publicName: "thyActive", isSignal: true, isRequired: false, transformFunction: null }, thyActionActive: { classPropertyName: "thyActionActive", publicName: "thyActionActive", isSignal: true, isRequired: false, transformFunction: null }, thyAppearance: { classPropertyName: "thyAppearance", publicName: "thyAppearance", isSignal: true, isRequired: false, transformFunction: null }, thyHoverIcon: { classPropertyName: "thyHoverIcon", publicName: "thyHoverIcon", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.active": "active()", "class.thy-action-hover-icon": "thyHoverIcon()", "class.thy-action-has-feedback": "!!feedback()", "class.disabled": "thyDisabled()" }, classAttribute: "thy-action" }, ngImport: i0, template: "@if (icon() && !feedback()) {\n <thy-icon [thyIconName]=\"icon()\"></thy-icon>\n}\n@if (feedbackOptions()?.icon) {\n <thy-icon [class]=\"feedbackOptions()?.class\" [thyIconName]=\"$safeNavigationMigration(feedbackOptions()?.icon)\"></thy-icon>\n}\n@if (thyHoverIcon()) {\n <thy-icon class=\"hover-icon\" [thyIconName]=\"thyHoverIcon()\"></thy-icon>\n}\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] }); }
|
|
157
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ThyAction, isStandalone: true, selector: "thy-action, [thyAction]", inputs: { thyColor: { classPropertyName: "thyColor", publicName: "thyColor", isSignal: true, isRequired: false, transformFunction: null }, thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thyIcon: { classPropertyName: "thyIcon", publicName: "thyIcon", isSignal: true, isRequired: false, transformFunction: null }, thyActionIcon: { classPropertyName: "thyActionIcon", publicName: "thyActionIcon", isSignal: true, isRequired: false, transformFunction: null }, thyActive: { classPropertyName: "thyActive", publicName: "thyActive", isSignal: true, isRequired: false, transformFunction: null }, thyActionActive: { classPropertyName: "thyActionActive", publicName: "thyActionActive", isSignal: true, isRequired: false, transformFunction: null }, thyAppearance: { classPropertyName: "thyAppearance", publicName: "thyAppearance", isSignal: true, isRequired: false, transformFunction: null }, thyHoverIcon: { classPropertyName: "thyHoverIcon", publicName: "thyHoverIcon", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.active": "active()", "class.thy-action-hover-icon": "thyHoverIcon()", "class.thy-action-has-feedback": "!!feedback()", "class.disabled": "thyDisabled()" }, classAttribute: "thy-action" }, ngImport: i0, template: "@if (icon() && !feedback()) {\n <thy-icon [thyIconName]=\"icon()\"></thy-icon>\n}\n@if (feedbackOptions()?.icon) {\n <thy-icon [class]=\"feedbackOptions()?.class\" [thyIconName]=\"$safeNavigationMigration(feedbackOptions()?.icon)\"></thy-icon>\n}\n@if (thyHoverIcon()) {\n <thy-icon class=\"hover-icon\" [thyIconName]=\"thyHoverIcon()\"></thy-icon>\n}\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] }); }
|
|
149
158
|
}
|
|
150
159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThyAction, decorators: [{
|
|
151
160
|
type: Component,
|
|
@@ -156,7 +165,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
156
165
|
'[class.thy-action-has-feedback]': '!!feedback()',
|
|
157
166
|
'[class.disabled]': 'thyDisabled()'
|
|
158
167
|
}, imports: [ThyIcon], template: "@if (icon() && !feedback()) {\n <thy-icon [thyIconName]=\"icon()\"></thy-icon>\n}\n@if (feedbackOptions()?.icon) {\n <thy-icon [class]=\"feedbackOptions()?.class\" [thyIconName]=\"$safeNavigationMigration(feedbackOptions()?.icon)\"></thy-icon>\n}\n@if (thyHoverIcon()) {\n <thy-icon class=\"hover-icon\" [thyIconName]=\"thyHoverIcon()\"></thy-icon>\n}\n<ng-content></ng-content>\n" }]
|
|
159
|
-
}], ctorParameters: () => [], propDecorators: { thyType: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyType", required: false }] }], thyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyIcon", required: false }] }], thyActionIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyActionIcon", required: false }] }], thyActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyActive", required: false }] }], thyActionActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyActionActive", required: false }] }], thyAppearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAppearance", required: false }] }], thyHoverIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyHoverIcon", required: false }] }], thyDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyDisabled", required: false }] }] } });
|
|
168
|
+
}], ctorParameters: () => [], propDecorators: { thyColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyColor", required: false }] }], thyType: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyType", required: false }] }], thyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyIcon", required: false }] }], thyActionIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyActionIcon", required: false }] }], thyActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyActive", required: false }] }], thyActionActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyActionActive", required: false }] }], thyAppearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAppearance", required: false }] }], thyHoverIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyHoverIcon", required: false }] }], thyDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyDisabled", required: false }] }] } });
|
|
160
169
|
|
|
161
170
|
/**
|
|
162
171
|
* Actions 组件
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-action.mjs","sources":["../../../src/action/action.component.ts","../../../src/action/action.component.html","../../../src/action/actions.component.ts","../../../src/action/action.module.ts","../../../src/action/ngx-tethys-action.ts"],"sourcesContent":["import {\n AfterViewInit,\n Component,\n DestroyRef,\n ElementRef,\n OnDestroy,\n OnInit,\n Renderer2,\n Signal,\n WritableSignal,\n computed,\n effect,\n inject,\n input,\n signal\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\nimport { Subscription, timer } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nexport type ThyActionType = 'primary' | 'success' | 'danger' | 'warning';\n\nexport type ThyActionAppearance = 'fill' | 'lite';\n\nexport type ThyActionFeedback = 'success' | 'error';\n\nexport interface ThyActionFeedbackOptions {\n icon?: string;\n class?: string;\n duration?: number;\n}\n\nconst defaultFeedbackOptions: Record<ThyActionFeedback, ThyActionFeedbackOptions> = {\n success: {\n icon: 'check-circle-fill',\n class: 'text-success',\n duration: 3000\n },\n error: {\n icon: 'close-circle-fill',\n class: 'text-danger',\n duration: 3000\n }\n};\n/**\n * 立即操作组件\n * @name thy-action,[thyAction]\n */\n@Component({\n selector: 'thy-action, [thyAction]',\n templateUrl: './action.component.html',\n host: {\n class: 'thy-action',\n '[class.active]': 'active()',\n '[class.thy-action-hover-icon]': 'thyHoverIcon()',\n '[class.thy-action-has-feedback]': '!!feedback()',\n '[class.disabled]': 'thyDisabled()'\n },\n imports: [ThyIcon]\n})\nexport class ThyAction implements OnInit, AfterViewInit, OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private renderer = inject(Renderer2);\n private destroyRef = inject(DestroyRef);\n\n public readonly icon: Signal<string> = computed(() => this.thyActionIcon() || this.thyIcon());\n\n feedback: WritableSignal<ThyActionFeedback | null> = signal(null);\n\n feedbackOptions: WritableSignal<ThyActionFeedbackOptions | null> = signal(null);\n\n readonly active: Signal<boolean> = computed(() => this.thyActionActive() || this.thyActive());\n\n private hostRenderer = useHostRenderer();\n\n private feedbackTimer: Subscription | null = null;\n\n /**\n * 操作图标的类型\n * @type primary | success | danger | warning\n */\n readonly thyType = input<ThyActionType, ThyActionType>('primary', {\n transform: (value: ThyActionType) => value || 'primary'\n });\n\n /**\n * 操作图标,支持传参同时也支持在投影中写 thy-icon 组件\n */\n readonly thyIcon = input<string>('');\n\n /**\n * 操作图标,当 thyIcon 和其他指令参数名有冲突时使用 thyActionIcon\n */\n readonly thyActionIcon = input<string>('');\n\n /**\n * 操作的图标 Active 状态,设置为 true 时会在 Item 上添加 active class\n */\n readonly thyActive = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 操作的图标 Active 状态,当 thyActive 和其他指令参数名有冲突时使用 thyActionActive\n */\n readonly thyActionActive = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 操作图标的外观,fill(背景色填充) | lite(简单文本颜色变化)\n * @type fill | lite\n * @default fill\n */\n readonly thyAppearance = input<ThyActionAppearance>('fill');\n\n /**\n * Hover 展示的图标\n */\n readonly thyHoverIcon = input<string>();\n\n /**\n * 是否处于禁用状态\n */\n readonly thyDisabled = input(false, { transform: coerceBooleanProperty });\n\n ngOnInit(): void {\n this.updateClasses();\n }\n\n ngAfterViewInit() {\n this.wrapSpanForText(this.elementRef.nativeElement.childNodes);\n }\n\n constructor() {\n effect(() => {\n this.updateClasses();\n });\n }\n\n setMarginRight(marginRight: string) {\n this.elementRef.nativeElement.style.marginRight = marginRight;\n }\n\n /**\n * 触发成功反馈操作\n */\n success(options?: ThyActionFeedbackOptions) {\n this.setFeedback('success', options);\n }\n\n /**\n * 触发失败反馈操作\n */\n error(options?: ThyActionFeedbackOptions) {\n this.setFeedback('error', options);\n }\n\n private setFeedback(feedback: ThyActionFeedback, options: ThyActionFeedbackOptions | undefined) {\n if (this.thyDisabled()) {\n return;\n }\n options = Object.assign({}, defaultFeedbackOptions[feedback], options);\n this.feedback.set(feedback);\n this.feedbackOptions.set(options);\n\n if (options.duration) {\n if (this.feedbackTimer) {\n this.feedbackTimer.unsubscribe();\n }\n this.feedbackTimer = timer(options.duration)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.feedback.set(null);\n this.feedbackOptions.set(null);\n });\n }\n }\n\n private wrapSpanForText(nodes: NodeList): void {\n nodes.forEach(node => {\n if (node.nodeName === '#text') {\n const span = this.renderer.createElement('span');\n const parent = this.renderer.parentNode(node);\n // this.renderer.addClass(span, 'thy-action-wrap-span');\n this.renderer.insertBefore(parent, span, node);\n this.renderer.appendChild(span, node);\n }\n });\n }\n\n private updateClasses() {\n const classNames: string[] = [];\n classNames.push(`action-${this.thyType()}`);\n if (this.thyAppearance() === 'lite') {\n classNames.push('thy-action-lite');\n }\n this.hostRenderer.updateClass(classNames);\n }\n\n ngOnDestroy(): void {\n this.feedbackTimer?.unsubscribe();\n }\n}\n","@if (icon() && !feedback()) {\n <thy-icon [thyIconName]=\"icon()\"></thy-icon>\n}\n@if (feedbackOptions()?.icon) {\n <thy-icon [class]=\"feedbackOptions()?.class\" [thyIconName]=\"$safeNavigationMigration(feedbackOptions()?.icon)\"></thy-icon>\n}\n@if (thyHoverIcon()) {\n <thy-icon class=\"hover-icon\" [thyIconName]=\"thyHoverIcon()\"></thy-icon>\n}\n<ng-content></ng-content>\n","import { Component, OnInit, contentChildren, effect, input } from '@angular/core';\nimport { ThySpacingSize, getNumericSize } from 'ngx-tethys/core';\nimport { ThyAction } from './action.component';\n\n/**\n * Actions 组件\n * @name thy-actions\n */\n@Component({\n selector: 'thy-actions',\n template: ` <ng-content></ng-content> `,\n host: {\n class: 'thy-actions'\n }\n})\nexport class ThyActions implements OnInit {\n readonly actions = contentChildren<ThyAction>(ThyAction);\n\n /**\n * 大小,支持 `zero` | `xxs` | `xs` | `sm` | `md` | `lg` | `xlg` 和自定义数字大小\n * @type string | number\n */\n readonly thySize = input<ThySpacingSize>('md');\n\n constructor() {\n effect(() => {\n this.setActionsSize();\n });\n }\n\n ngOnInit(): void {}\n\n private setActionsSize() {\n const actions: ThyAction[] = Array.from(this.actions());\n actions.forEach((action: ThyAction, index) => {\n // can't set marginRight value for last item\n if (index !== actions.length - 1) {\n action.setMarginRight(`${getNumericSize(this.thySize(), 'md')}px`);\n }\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyAction } from './action.component';\nimport { ThyActions } from './actions.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyAction, ThyActions],\n exports: [ThyAction, ThyActions]\n})\nexport class ThyActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAkCA,MAAM,sBAAsB,GAAwD;AAChF,IAAA,OAAO,EAAE;AACL,QAAA,IAAI,EAAE,mBAAmB;AACzB,QAAA,KAAK,EAAE,cAAc;AACrB,QAAA,QAAQ,EAAE;AACb,KAAA;AACD,IAAA,KAAK,EAAE;AACH,QAAA,IAAI,EAAE,mBAAmB;AACzB,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,QAAQ,EAA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wBAAA,KAAK,EAAE;AACV;AACJ,iBAAA;yHAEiD,SAAS,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;MCL9C,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAf,eAAe,EAAA,OAAA,EAAA,CAHd,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CAClD,SAAS,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;AAEtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAAA,OAAA,EAAA,CAHd,YAAY,EAAE,aAAa,EAAE,SAAS,CAAA,EAAA,CAAA,CAAA;;2FAGvC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,UAAU;AAClC,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-action.mjs","sources":["../../../src/action/action.component.ts","../../../src/action/action.component.html","../../../src/action/actions.component.ts","../../../src/action/action.module.ts","../../../src/action/ngx-tethys-action.ts"],"sourcesContent":["import {\n AfterViewInit,\n Component,\n DestroyRef,\n ElementRef,\n OnDestroy,\n OnInit,\n Renderer2,\n Signal,\n WritableSignal,\n computed,\n effect,\n inject,\n input,\n signal\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\nimport { Subscription, timer } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nexport type ThyActionColor = 'primary' | 'success' | 'danger' | 'warning';\n\n/** @deprecated use ThyActionColor, will be removed in v23 */\nexport type ThyActionType = ThyActionColor;\n\nexport type ThyActionAppearance = 'fill' | 'lite';\n\nexport type ThyActionFeedback = 'success' | 'error';\n\nexport interface ThyActionFeedbackOptions {\n icon?: string;\n class?: string;\n duration?: number;\n}\n\nconst defaultFeedbackOptions: Record<ThyActionFeedback, ThyActionFeedbackOptions> = {\n success: {\n icon: 'check-circle-fill',\n class: 'text-success',\n duration: 3000\n },\n error: {\n icon: 'close-circle-fill',\n class: 'text-danger',\n duration: 3000\n }\n};\n/**\n * 立即操作组件\n * @name thy-action,[thyAction]\n */\n@Component({\n selector: 'thy-action, [thyAction]',\n templateUrl: './action.component.html',\n host: {\n class: 'thy-action',\n '[class.active]': 'active()',\n '[class.thy-action-hover-icon]': 'thyHoverIcon()',\n '[class.thy-action-has-feedback]': '!!feedback()',\n '[class.disabled]': 'thyDisabled()'\n },\n imports: [ThyIcon]\n})\nexport class ThyAction implements OnInit, AfterViewInit, OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private renderer = inject(Renderer2);\n private destroyRef = inject(DestroyRef);\n\n public readonly icon: Signal<string> = computed(() => this.thyActionIcon() || this.thyIcon());\n\n feedback: WritableSignal<ThyActionFeedback | null> = signal(null);\n\n feedbackOptions: WritableSignal<ThyActionFeedbackOptions | null> = signal(null);\n\n readonly active: Signal<boolean> = computed(() => this.thyActionActive() || this.thyActive());\n\n private hostRenderer = useHostRenderer();\n\n private feedbackTimer: Subscription | null = null;\n\n /**\n * 操作图标的颜色\n * @type primary | success | danger | warning\n */\n readonly thyColor = input<ThyActionColor>();\n\n /**\n * 操作图标的类型(已废弃,将在 v23 彻底删除),请使用 thyColor\n * @deprecated please use thyColor, will be removed in v23\n * @type primary | success | danger | warning\n */\n readonly thyType = input<ThyActionType, ThyActionType>('primary', {\n transform: (value: ThyActionType) => value || 'primary'\n });\n\n readonly color = computed(() => this.thyColor() || this.thyType() || 'primary');\n\n /**\n * 操作图标,支持传参同时也支持在投影中写 thy-icon 组件\n */\n readonly thyIcon = input<string>('');\n\n /**\n * 操作图标,当 thyIcon 和其他指令参数名有冲突时使用 thyActionIcon\n */\n readonly thyActionIcon = input<string>('');\n\n /**\n * 操作的图标 Active 状态,设置为 true 时会在 Item 上添加 active class\n */\n readonly thyActive = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 操作的图标 Active 状态,当 thyActive 和其他指令参数名有冲突时使用 thyActionActive\n */\n readonly thyActionActive = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 操作图标的外观,fill(背景色填充) | lite(简单文本颜色变化)\n * @type fill | lite\n * @default fill\n */\n readonly thyAppearance = input<ThyActionAppearance>('fill');\n\n /**\n * Hover 展示的图标\n */\n readonly thyHoverIcon = input<string>();\n\n /**\n * 是否处于禁用状态\n */\n readonly thyDisabled = input(false, { transform: coerceBooleanProperty });\n\n ngOnInit(): void {\n this.updateClasses();\n }\n\n ngAfterViewInit() {\n this.wrapSpanForText(this.elementRef.nativeElement.childNodes);\n }\n\n constructor() {\n effect(() => {\n this.updateClasses();\n });\n }\n\n setMarginRight(marginRight: string) {\n this.elementRef.nativeElement.style.marginRight = marginRight;\n }\n\n /**\n * 触发成功反馈操作\n */\n success(options?: ThyActionFeedbackOptions) {\n this.setFeedback('success', options);\n }\n\n /**\n * 触发失败反馈操作\n */\n error(options?: ThyActionFeedbackOptions) {\n this.setFeedback('error', options);\n }\n\n private setFeedback(feedback: ThyActionFeedback, options: ThyActionFeedbackOptions | undefined) {\n if (this.thyDisabled()) {\n return;\n }\n options = Object.assign({}, defaultFeedbackOptions[feedback], options);\n this.feedback.set(feedback);\n this.feedbackOptions.set(options);\n\n if (options.duration) {\n if (this.feedbackTimer) {\n this.feedbackTimer.unsubscribe();\n }\n this.feedbackTimer = timer(options.duration)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.feedback.set(null);\n this.feedbackOptions.set(null);\n });\n }\n }\n\n private wrapSpanForText(nodes: NodeList): void {\n nodes.forEach(node => {\n if (node.nodeName === '#text') {\n const span = this.renderer.createElement('span');\n const parent = this.renderer.parentNode(node);\n // this.renderer.addClass(span, 'thy-action-wrap-span');\n this.renderer.insertBefore(parent, span, node);\n this.renderer.appendChild(span, node);\n }\n });\n }\n\n private updateClasses() {\n const classNames: string[] = [];\n classNames.push(`action-${this.color()}`);\n if (this.thyAppearance() === 'lite') {\n classNames.push('thy-action-lite');\n }\n this.hostRenderer.updateClass(classNames);\n }\n\n ngOnDestroy(): void {\n this.feedbackTimer?.unsubscribe();\n }\n}\n","@if (icon() && !feedback()) {\n <thy-icon [thyIconName]=\"icon()\"></thy-icon>\n}\n@if (feedbackOptions()?.icon) {\n <thy-icon [class]=\"feedbackOptions()?.class\" [thyIconName]=\"$safeNavigationMigration(feedbackOptions()?.icon)\"></thy-icon>\n}\n@if (thyHoverIcon()) {\n <thy-icon class=\"hover-icon\" [thyIconName]=\"thyHoverIcon()\"></thy-icon>\n}\n<ng-content></ng-content>\n","import { Component, OnInit, contentChildren, effect, input } from '@angular/core';\nimport { ThySpacingSize, getNumericSize } from 'ngx-tethys/core';\nimport { ThyAction } from './action.component';\n\n/**\n * Actions 组件\n * @name thy-actions\n */\n@Component({\n selector: 'thy-actions',\n template: ` <ng-content></ng-content> `,\n host: {\n class: 'thy-actions'\n }\n})\nexport class ThyActions implements OnInit {\n readonly actions = contentChildren<ThyAction>(ThyAction);\n\n /**\n * 大小,支持 `zero` | `xxs` | `xs` | `sm` | `md` | `lg` | `xlg` 和自定义数字大小\n * @type string | number\n */\n readonly thySize = input<ThySpacingSize>('md');\n\n constructor() {\n effect(() => {\n this.setActionsSize();\n });\n }\n\n ngOnInit(): void {}\n\n private setActionsSize() {\n const actions: ThyAction[] = Array.from(this.actions());\n actions.forEach((action: ThyAction, index) => {\n // can't set marginRight value for last item\n if (index !== actions.length - 1) {\n action.setMarginRight(`${getNumericSize(this.thySize(), 'md')}px`);\n }\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyAction } from './action.component';\nimport { ThyActions } from './actions.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyAction, ThyActions],\n exports: [ThyAction, ThyActions]\n})\nexport class ThyActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAqCA,MAAM,sBAAsB,GAAwD;AAChF,IAAA,OAAO,EAAE;AACL,QAAA,IAAI,EAAE,mBAAmB;AACzB,QAAA,KAAK,EAAE,cAAc;AACrB,QAAA,QAAQ,EAAE;AACb,KAAA;AACD,IAAA,KAAK,EAAE;AACH,QAAA,IAAI,EAAE,mBAAmB;AACzB,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,QAAQ,EAAE;AACb;CACJ;AACD;;;AAGG;MAaU,SAAS,CAAA;IAuElB,QAAQ,GAAA;QACJ,IAAI,CAAC,aAAa,EAAE;IACxB;IAEA,eAAe,GAAA;QACX,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC;IAClE;AAEA,IAAA,WAAA,GAAA;AA9EQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,QAAA,IAAA,CAAA,UAAU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;yHAEiD,SAAS,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;MCL9C,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAf,eAAe,EAAA,OAAA,EAAA,CAHd,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CAClD,SAAS,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;AAEtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAAA,OAAA,EAAA,CAHd,YAAY,EAAE,aAAa,EAAE,SAAS,CAAA,EAAA,CAAA,CAAA;;2FAGvC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,UAAU;AAClC,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -54,8 +54,8 @@ class ThyAlert {
|
|
|
54
54
|
this.thyType = input('info', /* @ts-ignore */
|
|
55
55
|
...(ngDevMode ? [{ debugName: "thyType" }] : /* istanbul ignore next */ []));
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
58
|
-
* @deprecated please use thyAppearance
|
|
57
|
+
* 指定警告提示的主题(已废弃,将在 v23 彻底移除),请使用 thyAppearance
|
|
58
|
+
* @deprecated please use thyAppearance, will be removed in v23
|
|
59
59
|
* @type fill | bordered | naked
|
|
60
60
|
* @default fill
|
|
61
61
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-alert.mjs","sources":["../../../src/alert/alert.component.ts","../../../src/alert/alert.component.html","../../../src/alert/alert.directive.ts","../../../src/alert/alert.module.ts","../../../src/alert/ngx-tethys-alert.ts"],"sourcesContent":["import { Component, TemplateRef, input, contentChild, effect, computed } from '@angular/core';\nimport { coerceBooleanProperty, isString } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgTemplateOutlet } from '@angular/common';\n\nconst weakTypes = ['primary-weak', 'success-weak', 'warning-weak', 'danger-weak'];\n\nexport type ThyAlertColor =\n | 'success'\n | 'warning'\n | 'danger'\n | 'info'\n | 'primary'\n | 'primary-weak'\n | 'success-weak'\n | 'warning-weak'\n | 'danger-weak';\n\nexport type ThyAlertAppearance = 'fill' | 'bordered' | 'naked';\n\n/** @deprecated use ThyAlertAppearance */\nexport type ThyAlertTheme = ThyAlertAppearance;\n\n/** @deprecated use ThyAlertColor */\nexport type ThyAlertType = ThyAlertColor;\n\nconst typeIconsMap: Record<string, string> = {\n success: 'check-circle-fill',\n warning: 'waring-fill',\n danger: 'close-circle-fill',\n info: 'minus-circle-fill',\n primary: 'info-circle-fill',\n 'primary-weak': 'info-circle-fill',\n 'success-weak': 'check-circle-fill',\n 'warning-weak': 'waring-fill',\n 'danger-weak': 'close-circle-fill'\n};\n\n/**\n * 警告提示,展现需要关注的信息\n * @name thy-alert\n * @order 10\n */\n@Component({\n selector: 'thy-alert',\n templateUrl: './alert.component.html',\n host: {\n class: 'thy-alert',\n '[class.thy-alert-hidden]': 'hidden'\n },\n imports: [ThyIcon, NgTemplateOutlet]\n})\nexport class ThyAlert {\n protected hidden = false;\n\n private hostRenderer = useHostRenderer();\n\n messageIsTemplate = computed(() => {\n const value = this.thyMessage();\n return value instanceof TemplateRef;\n });\n\n /**\n * 指定警告提示的颜色\n * @type success | warning | danger | info | primary | primary-weak | success-weak | warning-weak | danger-weak\n * @default info\n */\n readonly thyColor = input<ThyAlertColor>();\n\n /**\n * 指定警告提示的外观\n * @type fill | bordered | naked\n * @default fill\n */\n readonly thyAppearance = input<ThyAlertAppearance>();\n\n /**\n * 指定警告提示的类型(已废弃),请使用 thyColor\n * @deprecated please use thyColor\n * @type success | warning | danger | info | primary | primary-weak | success-weak | warning-weak | danger-weak\n * @default info\n */\n readonly thyType = input<ThyAlertType>('info');\n\n /**\n * 指定警告提示的主题(已废弃),请使用 thyAppearance\n * @deprecated please use thyAppearance\n * @type fill | bordered | naked\n * @default fill\n */\n readonly thyTheme = input<ThyAlertTheme>('fill');\n\n readonly color = computed(() => this.thyColor() || this.thyType() || 'info');\n\n readonly appearance = computed(() => this.thyAppearance() || this.thyTheme() || 'fill');\n\n /**\n * 显示警告提示的内容\n */\n thyMessage = input<string | TemplateRef<HTMLElement>>();\n\n /**\n * 显示自定义图标,可传 true/false 控制是否显示图标,或者传字符串去指定图标名称\n */\n thyIcon = input<boolean | string>();\n\n icon = computed(() => {\n const icon = this.thyIcon();\n const color = this.color();\n if (icon) {\n return isString(icon) ? icon : typeIconsMap[color];\n } else {\n return icon === 'false' || icon === false ? '' : typeIconsMap[color];\n }\n });\n\n /**\n * 是否显示关闭警告框按钮,默认不显示\n * @default false\n */\n thyCloseable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 警告框自定义操作\n * @type TemplateRef\n */\n alertOperation = contentChild<TemplateRef<any>>('operation');\n\n constructor() {\n effect(() => {\n this.updateClass();\n });\n }\n\n closeAlert() {\n this.hidden = true;\n }\n\n private updateClass() {\n // 兼容 'primary-weak', 'success-weak', 'warning-weak', 'danger-weak' types\n let appearance = this.appearance();\n let color = this.color();\n if (weakTypes.includes(color)) {\n appearance = 'bordered';\n color = color.split('-')[0] as ThyAlertColor;\n }\n this.hostRenderer.updateClass([`thy-alert-${appearance}`, `thy-alert-${appearance}-${color}`]);\n }\n}\n","<div class=\"thy-alert-content\">\n @if (icon()) {\n <thy-icon class=\"thy-alert-icon\" [thyIconName]=\"icon()\"></thy-icon>\n }\n @if (appearance() === 'naked') {\n <span class=\"thy-alert-tips\">Tips: </span>\n }\n @if (messageIsTemplate()) {\n <ng-template *ngTemplateOutlet=\"thyMessage()\"></ng-template>\n } @else if (thyMessage()) {\n <span>{{ thyMessage() }}</span>\n }\n @if (alertOperation()) {\n <div class=\"thy-alert-operation\">\n <ng-container [ngTemplateOutlet]=\"alertOperation()\"></ng-container>\n </div>\n }\n</div>\n@if (thyCloseable()) {\n <a href=\"javascript:;\" class=\"thy-alert-close\" (click)=\"closeAlert()\">\n <thy-icon thyIconName=\"close\"></thy-icon>\n </a>\n}\n","import { Directive, HostBinding } from '@angular/core';\n\n/**\n * 操作按钮的样式指令,可为警告内容添加自定义操作按钮样式\n * @name thyAlertActionItem\n * @order 20\n */\n@Directive({\n selector: '[thyAlertActionItem]'\n})\nexport class ThyAlertActionItemDirective {\n @HostBinding('class.thy-alert-action') class = true;\n\n constructor() {}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyAlert } from './alert.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyAlertActionItemDirective } from './alert.directive';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyAlert, ThyAlertActionItemDirective],\n exports: [ThyAlert, ThyAlertActionItemDirective]\n})\nexport class ThyAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMA,MAAM,SAAS,GAAG,CAAC,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,CAAC;AAqBjF,MAAM,YAAY,GAA2B;AACzC,IAAA,OAAO,EA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AA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,wBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAHvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE;AACb,iBAAA;;sBAEI,WAAW;uBAAC,wBAAwB;;;MCD5B,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAd,cAAc,EAAA,OAAA,EAAA,CAHb,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,2BAA2B,CAAA,EAAA,OAAA,EAAA,CAClE,QAAQ,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAEtC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAAA,OAAA,EAAA,CAHb,YAAY,EAAE,aAAa,EAAE,QAAQ,CAAA,EAAA,CAAA,CAAA;;2FAGtC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,2BAA2B,CAAC;AAC7E,oBAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,2BAA2B;AAClD,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-alert.mjs","sources":["../../../src/alert/alert.component.ts","../../../src/alert/alert.component.html","../../../src/alert/alert.directive.ts","../../../src/alert/alert.module.ts","../../../src/alert/ngx-tethys-alert.ts"],"sourcesContent":["import { Component, TemplateRef, input, contentChild, effect, computed } from '@angular/core';\nimport { coerceBooleanProperty, isString } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgTemplateOutlet } from '@angular/common';\n\nconst weakTypes = ['primary-weak', 'success-weak', 'warning-weak', 'danger-weak'];\n\nexport type ThyAlertColor =\n | 'success'\n | 'warning'\n | 'danger'\n | 'info'\n | 'primary'\n | 'primary-weak'\n | 'success-weak'\n | 'warning-weak'\n | 'danger-weak';\n\nexport type ThyAlertAppearance = 'fill' | 'bordered' | 'naked';\n\n/** @deprecated use ThyAlertAppearance */\nexport type ThyAlertTheme = ThyAlertAppearance;\n\n/** @deprecated use ThyAlertColor */\nexport type ThyAlertType = ThyAlertColor;\n\nconst typeIconsMap: Record<string, string> = {\n success: 'check-circle-fill',\n warning: 'waring-fill',\n danger: 'close-circle-fill',\n info: 'minus-circle-fill',\n primary: 'info-circle-fill',\n 'primary-weak': 'info-circle-fill',\n 'success-weak': 'check-circle-fill',\n 'warning-weak': 'waring-fill',\n 'danger-weak': 'close-circle-fill'\n};\n\n/**\n * 警告提示,展现需要关注的信息\n * @name thy-alert\n * @order 10\n */\n@Component({\n selector: 'thy-alert',\n templateUrl: './alert.component.html',\n host: {\n class: 'thy-alert',\n '[class.thy-alert-hidden]': 'hidden'\n },\n imports: [ThyIcon, NgTemplateOutlet]\n})\nexport class ThyAlert {\n protected hidden = false;\n\n private hostRenderer = useHostRenderer();\n\n messageIsTemplate = computed(() => {\n const value = this.thyMessage();\n return value instanceof TemplateRef;\n });\n\n /**\n * 指定警告提示的颜色\n * @type success | warning | danger | info | primary | primary-weak | success-weak | warning-weak | danger-weak\n * @default info\n */\n readonly thyColor = input<ThyAlertColor>();\n\n /**\n * 指定警告提示的外观\n * @type fill | bordered | naked\n * @default fill\n */\n readonly thyAppearance = input<ThyAlertAppearance>();\n\n /**\n * 指定警告提示的类型(已废弃),请使用 thyColor\n * @deprecated please use thyColor\n * @type success | warning | danger | info | primary | primary-weak | success-weak | warning-weak | danger-weak\n * @default info\n */\n readonly thyType = input<ThyAlertType>('info');\n\n /**\n * 指定警告提示的主题(已废弃,将在 v23 彻底移除),请使用 thyAppearance\n * @deprecated please use thyAppearance, will be removed in v23\n * @type fill | bordered | naked\n * @default fill\n */\n readonly thyTheme = input<ThyAlertTheme>('fill');\n\n readonly color = computed(() => this.thyColor() || this.thyType() || 'info');\n\n readonly appearance = computed(() => this.thyAppearance() || this.thyTheme() || 'fill');\n\n /**\n * 显示警告提示的内容\n */\n thyMessage = input<string | TemplateRef<HTMLElement>>();\n\n /**\n * 显示自定义图标,可传 true/false 控制是否显示图标,或者传字符串去指定图标名称\n */\n thyIcon = input<boolean | string>();\n\n icon = computed(() => {\n const icon = this.thyIcon();\n const color = this.color();\n if (icon) {\n return isString(icon) ? icon : typeIconsMap[color];\n } else {\n return icon === 'false' || icon === false ? '' : typeIconsMap[color];\n }\n });\n\n /**\n * 是否显示关闭警告框按钮,默认不显示\n * @default false\n */\n thyCloseable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 警告框自定义操作\n * @type TemplateRef\n */\n alertOperation = contentChild<TemplateRef<any>>('operation');\n\n constructor() {\n effect(() => {\n this.updateClass();\n });\n }\n\n closeAlert() {\n this.hidden = true;\n }\n\n private updateClass() {\n // 兼容 'primary-weak', 'success-weak', 'warning-weak', 'danger-weak' types\n let appearance = this.appearance();\n let color = this.color();\n if (weakTypes.includes(color)) {\n appearance = 'bordered';\n color = color.split('-')[0] as ThyAlertColor;\n }\n this.hostRenderer.updateClass([`thy-alert-${appearance}`, `thy-alert-${appearance}-${color}`]);\n }\n}\n","<div class=\"thy-alert-content\">\n @if (icon()) {\n <thy-icon class=\"thy-alert-icon\" [thyIconName]=\"icon()\"></thy-icon>\n }\n @if (appearance() === 'naked') {\n <span class=\"thy-alert-tips\">Tips: </span>\n }\n @if (messageIsTemplate()) {\n <ng-template *ngTemplateOutlet=\"thyMessage()\"></ng-template>\n } @else if (thyMessage()) {\n <span>{{ thyMessage() }}</span>\n }\n @if (alertOperation()) {\n <div class=\"thy-alert-operation\">\n <ng-container [ngTemplateOutlet]=\"alertOperation()\"></ng-container>\n </div>\n }\n</div>\n@if (thyCloseable()) {\n <a href=\"javascript:;\" class=\"thy-alert-close\" (click)=\"closeAlert()\">\n <thy-icon thyIconName=\"close\"></thy-icon>\n </a>\n}\n","import { Directive, HostBinding } from '@angular/core';\n\n/**\n * 操作按钮的样式指令,可为警告内容添加自定义操作按钮样式\n * @name thyAlertActionItem\n * @order 20\n */\n@Directive({\n selector: '[thyAlertActionItem]'\n})\nexport class ThyAlertActionItemDirective {\n @HostBinding('class.thy-alert-action') class = true;\n\n constructor() {}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyAlert } from './alert.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyAlertActionItemDirective } from './alert.directive';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyAlert, ThyAlertActionItemDirective],\n exports: [ThyAlert, ThyAlertActionItemDirective]\n})\nexport class ThyAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMA,MAAM,SAAS,GAAG,CAAC,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,CAAC;AAqBjF,MAAM,YAAY,GAA2B;AACzC,IAAA,OAAO,EAAE,mBAAmB;AAC5B,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,mBAAmB;AAC3B,IAAA,IAAI,EAAE,mBAAmB;AACzB,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,cAAc,EAAE,kBAAkB;AAClC,IAAA,cAAc,EAAE,mBAAmB;AACnC,IAAA,cAAc,EAAE,aAAa;AAC7B,IAAA,aAAa,EAAE;CAClB;AAED;;;;AAIG;MAUU,QAAQ,CAAA;AA4E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CD5B,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAd,cAAc,EAAA,OAAA,EAAA,CAHb,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,2BAA2B,CAAA,EAAA,OAAA,EAAA,CAClE,QAAQ,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAEtC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAAA,OAAA,EAAA,CAHb,YAAY,EAAE,aAAa,EAAE,QAAQ,CAAA,EAAA,CAAA,CAAA;;2FAGtC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,2BAA2B,CAAC;AAC7E,oBAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,2BAA2B;AAClD,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThyTooltipDirective, ThyTooltipModule } from 'ngx-tethys/tooltip';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, ChangeDetectorRef, signal, output, input,
|
|
3
|
+
import { inject, ChangeDetectorRef, signal, output, input, computed, numberAttribute, linkedSignal, forwardRef, Component, NgModule } from '@angular/core';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { ThyButtonIcon, ThyButtonModule } from 'ngx-tethys/button';
|
|
6
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
@@ -36,11 +36,22 @@ class ThyArrowSwitcher {
|
|
|
36
36
|
this.thyNextTooltip = input(/* @ts-ignore */
|
|
37
37
|
...(ngDevMode ? [undefined, { debugName: "thyNextTooltip" }] : /* istanbul ignore next */ []));
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* 展示形态
|
|
40
40
|
* @type default | lite
|
|
41
|
+
* @default default
|
|
42
|
+
*/
|
|
43
|
+
this.thyVariant = input(/* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [undefined, { debugName: "thyVariant" }] : /* istanbul ignore next */ []));
|
|
45
|
+
/**
|
|
46
|
+
* 展示主题(已废弃,将在 v23 彻底删除),请使用 thyVariant
|
|
47
|
+
* @deprecated please use thyVariant, will be removed in v23
|
|
48
|
+
* @type default | lite
|
|
49
|
+
* @default default
|
|
41
50
|
*/
|
|
42
51
|
this.thyTheme = input('default', /* @ts-ignore */
|
|
43
52
|
...(ngDevMode ? [{ debugName: "thyTheme" }] : /* istanbul ignore next */ []));
|
|
53
|
+
this.variant = computed(() => this.thyVariant() || this.thyTheme() || 'default', /* @ts-ignore */
|
|
54
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
44
55
|
/**
|
|
45
56
|
* 总条数
|
|
46
57
|
*/
|
|
@@ -105,13 +116,13 @@ class ThyArrowSwitcher {
|
|
|
105
116
|
this.thyNext.emit({ index: this.index(), event });
|
|
106
117
|
}
|
|
107
118
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThyArrowSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ThyArrowSwitcher, isStandalone: true, selector: "thy-arrow-switcher", inputs: { thyPreviousTooltip: { classPropertyName: "thyPreviousTooltip", publicName: "thyPreviousTooltip", isSignal: true, isRequired: false, transformFunction: null }, thyNextTooltip: { classPropertyName: "thyNextTooltip", publicName: "thyNextTooltip", isSignal: true, isRequired: false, transformFunction: null }, thyTheme: { classPropertyName: "thyTheme", publicName: "thyTheme", isSignal: true, isRequired: false, transformFunction: null }, thyTotal: { classPropertyName: "thyTotal", publicName: "thyTotal", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyPrevious: "thyPrevious", thyNext: "thyNext" }, host: { properties: { "class.thy-arrow-switcher-small": "isSmallSize()" }, classAttribute: "thy-arrow-switcher" }, providers: [
|
|
119
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ThyArrowSwitcher, isStandalone: true, selector: "thy-arrow-switcher", inputs: { thyPreviousTooltip: { classPropertyName: "thyPreviousTooltip", publicName: "thyPreviousTooltip", isSignal: true, isRequired: false, transformFunction: null }, thyNextTooltip: { classPropertyName: "thyNextTooltip", publicName: "thyNextTooltip", isSignal: true, isRequired: false, transformFunction: null }, thyVariant: { classPropertyName: "thyVariant", publicName: "thyVariant", isSignal: true, isRequired: false, transformFunction: null }, thyTheme: { classPropertyName: "thyTheme", publicName: "thyTheme", isSignal: true, isRequired: false, transformFunction: null }, thyTotal: { classPropertyName: "thyTotal", publicName: "thyTotal", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyPrevious: "thyPrevious", thyNext: "thyNext" }, host: { properties: { "class.thy-arrow-switcher-small": "isSmallSize()" }, classAttribute: "thy-arrow-switcher" }, providers: [
|
|
109
120
|
{
|
|
110
121
|
provide: NG_VALUE_ACCESSOR,
|
|
111
122
|
useExisting: forwardRef(() => ThyArrowSwitcher),
|
|
112
123
|
multi: true
|
|
113
124
|
}
|
|
114
|
-
], ngImport: i0, template: "@if (
|
|
125
|
+
], ngImport: i0, template: "@if (variant() === 'lite') {\n <div class=\"switcher-wrapper\">\n <a\n thyAction\n [thyTooltip]=\"previousTooltip()\"\n href=\"javascript:;\"\n [thyDisabled]=\"previousDisabled()\"\n class=\"mr-2\"\n (click)=\"onPreviousClick($event)\"\n ><thy-icon thyIconName=\"angle-up\"></thy-icon\n ></a>\n <a thyAction [thyTooltip]=\"nextTooltip()\" href=\"javascript:;\" [thyDisabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"\n ><thy-icon thyIconName=\"angle-down\"></thy-icon\n ></a>\n </div>\n} @else {\n <div class=\"switcher-wrapper\">\n <button\n thyButtonIcon=\"angle-left\"\n [thyTooltip]=\"previousTooltip()\"\n [disabled]=\"previousDisabled()\"\n (click)=\"onPreviousClick($event)\"></button>\n <span>{{ index() + 1 }} / {{ thyTotal() }}</span>\n <button thyButtonIcon=\"angle-right\" [thyTooltip]=\"nextTooltip()\" [disabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"></button>\n </div>\n}\n", dependencies: [{ kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyColor", "thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyAppearance", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyButtonIcon, selector: "thy-button-icon,[thy-button-icon],[thyButtonIcon]", inputs: ["thySize", "thyIcon", "thyButtonIcon", "thyShape", "thyLight", "thyActive", "thyTheme", "thyColor"] }] }); }
|
|
115
126
|
}
|
|
116
127
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThyArrowSwitcher, decorators: [{
|
|
117
128
|
type: Component,
|
|
@@ -124,8 +135,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
124
135
|
useExisting: forwardRef(() => ThyArrowSwitcher),
|
|
125
136
|
multi: true
|
|
126
137
|
}
|
|
127
|
-
], imports: [ThyAction, ThyTooltipDirective, ThyIcon, ThyButtonIcon], template: "@if (
|
|
128
|
-
}], propDecorators: { thyPrevious: [{ type: i0.Output, args: ["thyPrevious"] }], thyNext: [{ type: i0.Output, args: ["thyNext"] }], thyPreviousTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyPreviousTooltip", required: false }] }], thyNextTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyNextTooltip", required: false }] }], thyTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTheme", required: false }] }], thyTotal: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTotal", required: false }] }], thySize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySize", required: false }] }] } });
|
|
138
|
+
], imports: [ThyAction, ThyTooltipDirective, ThyIcon, ThyButtonIcon], template: "@if (variant() === 'lite') {\n <div class=\"switcher-wrapper\">\n <a\n thyAction\n [thyTooltip]=\"previousTooltip()\"\n href=\"javascript:;\"\n [thyDisabled]=\"previousDisabled()\"\n class=\"mr-2\"\n (click)=\"onPreviousClick($event)\"\n ><thy-icon thyIconName=\"angle-up\"></thy-icon\n ></a>\n <a thyAction [thyTooltip]=\"nextTooltip()\" href=\"javascript:;\" [thyDisabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"\n ><thy-icon thyIconName=\"angle-down\"></thy-icon\n ></a>\n </div>\n} @else {\n <div class=\"switcher-wrapper\">\n <button\n thyButtonIcon=\"angle-left\"\n [thyTooltip]=\"previousTooltip()\"\n [disabled]=\"previousDisabled()\"\n (click)=\"onPreviousClick($event)\"></button>\n <span>{{ index() + 1 }} / {{ thyTotal() }}</span>\n <button thyButtonIcon=\"angle-right\" [thyTooltip]=\"nextTooltip()\" [disabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"></button>\n </div>\n}\n" }]
|
|
139
|
+
}], propDecorators: { thyPrevious: [{ type: i0.Output, args: ["thyPrevious"] }], thyNext: [{ type: i0.Output, args: ["thyNext"] }], thyPreviousTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyPreviousTooltip", required: false }] }], thyNextTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyNextTooltip", required: false }] }], thyVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyVariant", required: false }] }], thyTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTheme", required: false }] }], thyTotal: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTotal", required: false }] }], thySize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySize", required: false }] }] } });
|
|
129
140
|
|
|
130
141
|
class ThyArrowSwitcherModule {
|
|
131
142
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThyArrowSwitcherModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-arrow-switcher.mjs","sources":["../../../src/arrow-switcher/arrow-switcher.component.ts","../../../src/arrow-switcher/arrow-switcher.component.html","../../../src/arrow-switcher/module.ts","../../../src/arrow-switcher/ngx-tethys-arrow-switcher.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectorRef,\n forwardRef,\n numberAttribute,\n inject,\n input,\n output,\n computed,\n Signal,\n WritableSignal,\n signal,\n linkedSignal\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThyButtonIcon } from 'ngx-tethys/button';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyTooltipDirective } from 'ngx-tethys/tooltip';\nimport { ThyAction } from 'ngx-tethys/action';\n\nexport type ThyArrowSwitcherTheme = 'default' | 'lite';\nexport interface ThyArrowSwitcherEvent {\n index: number;\n event: Event;\n}\n\n/**\n * 上下条切换组件\n * @name thy-arrow-switcher\n * @order 10\n */\n@Component({\n selector: 'thy-arrow-switcher',\n templateUrl: './arrow-switcher.component.html',\n host: {\n class: 'thy-arrow-switcher',\n '[class.thy-arrow-switcher-small]': 'isSmallSize()'\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyArrowSwitcher),\n multi: true\n }\n ],\n imports: [ThyAction, ThyTooltipDirective, ThyIcon, ThyButtonIcon]\n})\nexport class ThyArrowSwitcher implements ControlValueAccessor {\n private cd = inject(ChangeDetectorRef);\n\n private disabled: WritableSignal<boolean> = signal(false);\n\n /**\n * 点击上一条事件\n */\n readonly thyPrevious = output<ThyArrowSwitcherEvent>();\n\n /**\n * 点击下一条事件\n */\n readonly thyNext = output<ThyArrowSwitcherEvent>();\n\n /**\n * 设置上一条 Hover Tooltip 提示\n */\n readonly thyPreviousTooltip = input<string>();\n\n /**\n * 设置下一条 Hover Tooltip 提示\n */\n readonly thyNextTooltip = input<string>();\n\n /**\n * 展示主题\n * @type default | lite\n */\n readonly thyTheme = input<ThyArrowSwitcherTheme>('default');\n\n /**\n * 总条数\n */\n readonly thyTotal = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 尺寸大小,默认尺寸为大号,取值为`sm`时展示小号\n */\n readonly thySize = input<string>();\n\n readonly isSmallSize: Signal<boolean> = computed(() => {\n return this.thySize() === 'sm';\n });\n\n protected readonly index: WritableSignal<number> = signal(0);\n\n readonly previousDisabled = computed(() => {\n return this.index() <= 0 || this.disabled();\n });\n\n readonly nextDisabled = computed(() => {\n return this.index() >= this.thyTotal()! - 1 || this.disabled();\n });\n\n private onModelChange!: (value: number) => void;\n\n private onModelTouched!: () => void;\n\n protected readonly previousTooltip = linkedSignal(() => {\n return this.thyPreviousTooltip();\n });\n\n protected readonly nextTooltip = linkedSignal(() => {\n return this.thyNextTooltip();\n });\n\n public setPreviousTooltip(value: string) {\n this.previousTooltip.set(value);\n }\n\n public setNextTooltip(value: string) {\n this.nextTooltip.set(value);\n }\n\n writeValue(value: number): void {\n if (value >= 0) {\n this.index.set(value);\n }\n this.cd.markForCheck();\n }\n\n registerOnChange(fn: () => void) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onModelTouched = fn;\n }\n\n setDisabledState(isDisable: boolean) {\n this.disabled.set(isDisable);\n }\n\n onPreviousClick(event: Event) {\n this.index.set(this.index() - 1);\n this.onModelChange(this.index());\n\n this.thyPrevious.emit({ index: this.index(), event });\n }\n\n onNextClick(event: Event) {\n this.index.set(this.index() + 1);\n this.onModelChange(this.index());\n\n this.thyNext.emit({ index: this.index(), event });\n }\n}\n","@if (thyTheme() === 'lite') {\n <div class=\"switcher-wrapper\">\n <a\n thyAction\n [thyTooltip]=\"previousTooltip()\"\n href=\"javascript:;\"\n [thyDisabled]=\"previousDisabled()\"\n class=\"mr-2\"\n (click)=\"onPreviousClick($event)\"\n ><thy-icon thyIconName=\"angle-up\"></thy-icon\n ></a>\n <a thyAction [thyTooltip]=\"nextTooltip()\" href=\"javascript:;\" [thyDisabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"\n ><thy-icon thyIconName=\"angle-down\"></thy-icon\n ></a>\n </div>\n} @else {\n <div class=\"switcher-wrapper\">\n <button\n thyButtonIcon=\"angle-left\"\n [thyTooltip]=\"previousTooltip()\"\n [disabled]=\"previousDisabled()\"\n (click)=\"onPreviousClick($event)\"></button>\n <span>{{ index() + 1 }} / {{ thyTotal() }}</span>\n <button thyButtonIcon=\"angle-right\" [thyTooltip]=\"nextTooltip()\" [disabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"></button>\n </div>\n}\n","import { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyButtonModule } from 'ngx-tethys/button';\nimport { ThyArrowSwitcher } from './arrow-switcher.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyActionModule } from 'ngx-tethys/action';\n\n@NgModule({\n imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyActionModule, ThyTooltipModule, ThyArrowSwitcher],\n exports: [ThyArrowSwitcher]\n})\nexport class ThyArrowSwitcherModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA0BA;;;;AAIG;MAiBU,gBAAgB,CAAA;AAhB7B,IAAA,WAAA,GAAA;AAiBY,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAE9B,IAAA,CAAA,QAAQ,GAA4B,MAAM,CAAC,KAAK;qFAAC;AAEzD;;AAEG;QACM,IAAA,CAAA,WAAW,GAAG,MAAM,EAAyB;AAEtD;;AAEG;QACM,IAAA,CAAA,OAAO,GAAG,MAAM,EAAyB;AAElD;;AAEG;AACM,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK;0GAAU;AAE7C;;AAEG;AACM,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK;sGAAU;AAEzC;;;AAGG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,SAAS;qFAAC;AAE3D;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAkB,SAAS,gFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAErF;;AAEG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAAU;AAEzB,QAAA,IAAA,CAAA,WAAW,GAAoB,QAAQ,CAAC,MAAK;AAClD,YAAA,OAAO,IAAI,CAAC,OAAO,EAAE,KAAK,IAAI;QAClC,CAAC;wFAAC;QAEiB,IAAA,CAAA,KAAK,GAA2B,MAAM,CAAC,CAAC;kFAAC;AAEnD,QAAA,IAAA,CAAA,gBAAgB,GAAG,QAAQ,CAAC,MAAK;YACtC,OAA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,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA;;2FAGlG,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;oBAC5G,OAAO,EAAE,CAAC,gBAAgB;AAC7B,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-arrow-switcher.mjs","sources":["../../../src/arrow-switcher/arrow-switcher.component.ts","../../../src/arrow-switcher/arrow-switcher.component.html","../../../src/arrow-switcher/module.ts","../../../src/arrow-switcher/ngx-tethys-arrow-switcher.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectorRef,\n forwardRef,\n numberAttribute,\n inject,\n input,\n output,\n computed,\n Signal,\n WritableSignal,\n signal,\n linkedSignal\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThyButtonIcon } from 'ngx-tethys/button';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyTooltipDirective } from 'ngx-tethys/tooltip';\nimport { ThyAction } from 'ngx-tethys/action';\n\nexport type ThyArrowSwitcherVariant = 'default' | 'lite';\n\n/** @deprecated use ThyArrowSwitcherVariant, will be removed in v23 */\nexport type ThyArrowSwitcherTheme = ThyArrowSwitcherVariant;\nexport interface ThyArrowSwitcherEvent {\n index: number;\n event: Event;\n}\n\n/**\n * 上下条切换组件\n * @name thy-arrow-switcher\n * @order 10\n */\n@Component({\n selector: 'thy-arrow-switcher',\n templateUrl: './arrow-switcher.component.html',\n host: {\n class: 'thy-arrow-switcher',\n '[class.thy-arrow-switcher-small]': 'isSmallSize()'\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyArrowSwitcher),\n multi: true\n }\n ],\n imports: [ThyAction, ThyTooltipDirective, ThyIcon, ThyButtonIcon]\n})\nexport class ThyArrowSwitcher implements ControlValueAccessor {\n private cd = inject(ChangeDetectorRef);\n\n private disabled: WritableSignal<boolean> = signal(false);\n\n /**\n * 点击上一条事件\n */\n readonly thyPrevious = output<ThyArrowSwitcherEvent>();\n\n /**\n * 点击下一条事件\n */\n readonly thyNext = output<ThyArrowSwitcherEvent>();\n\n /**\n * 设置上一条 Hover Tooltip 提示\n */\n readonly thyPreviousTooltip = input<string>();\n\n /**\n * 设置下一条 Hover Tooltip 提示\n */\n readonly thyNextTooltip = input<string>();\n\n /**\n * 展示形态\n * @type default | lite\n * @default default\n */\n readonly thyVariant = input<ThyArrowSwitcherVariant>();\n\n /**\n * 展示主题(已废弃,将在 v23 彻底删除),请使用 thyVariant\n * @deprecated please use thyVariant, will be removed in v23\n * @type default | lite\n * @default default\n */\n readonly thyTheme = input<ThyArrowSwitcherTheme>('default');\n\n readonly variant = computed(() => this.thyVariant() || this.thyTheme() || 'default');\n\n /**\n * 总条数\n */\n readonly thyTotal = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 尺寸大小,默认尺寸为大号,取值为`sm`时展示小号\n */\n readonly thySize = input<string>();\n\n readonly isSmallSize: Signal<boolean> = computed(() => {\n return this.thySize() === 'sm';\n });\n\n protected readonly index: WritableSignal<number> = signal(0);\n\n readonly previousDisabled = computed(() => {\n return this.index() <= 0 || this.disabled();\n });\n\n readonly nextDisabled = computed(() => {\n return this.index() >= this.thyTotal()! - 1 || this.disabled();\n });\n\n private onModelChange!: (value: number) => void;\n\n private onModelTouched!: () => void;\n\n protected readonly previousTooltip = linkedSignal(() => {\n return this.thyPreviousTooltip();\n });\n\n protected readonly nextTooltip = linkedSignal(() => {\n return this.thyNextTooltip();\n });\n\n public setPreviousTooltip(value: string) {\n this.previousTooltip.set(value);\n }\n\n public setNextTooltip(value: string) {\n this.nextTooltip.set(value);\n }\n\n writeValue(value: number): void {\n if (value >= 0) {\n this.index.set(value);\n }\n this.cd.markForCheck();\n }\n\n registerOnChange(fn: () => void) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onModelTouched = fn;\n }\n\n setDisabledState(isDisable: boolean) {\n this.disabled.set(isDisable);\n }\n\n onPreviousClick(event: Event) {\n this.index.set(this.index() - 1);\n this.onModelChange(this.index());\n\n this.thyPrevious.emit({ index: this.index(), event });\n }\n\n onNextClick(event: Event) {\n this.index.set(this.index() + 1);\n this.onModelChange(this.index());\n\n this.thyNext.emit({ index: this.index(), event });\n }\n}\n","@if (variant() === 'lite') {\n <div class=\"switcher-wrapper\">\n <a\n thyAction\n [thyTooltip]=\"previousTooltip()\"\n href=\"javascript:;\"\n [thyDisabled]=\"previousDisabled()\"\n class=\"mr-2\"\n (click)=\"onPreviousClick($event)\"\n ><thy-icon thyIconName=\"angle-up\"></thy-icon\n ></a>\n <a thyAction [thyTooltip]=\"nextTooltip()\" href=\"javascript:;\" [thyDisabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"\n ><thy-icon thyIconName=\"angle-down\"></thy-icon\n ></a>\n </div>\n} @else {\n <div class=\"switcher-wrapper\">\n <button\n thyButtonIcon=\"angle-left\"\n [thyTooltip]=\"previousTooltip()\"\n [disabled]=\"previousDisabled()\"\n (click)=\"onPreviousClick($event)\"></button>\n <span>{{ index() + 1 }} / {{ thyTotal() }}</span>\n <button thyButtonIcon=\"angle-right\" [thyTooltip]=\"nextTooltip()\" [disabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"></button>\n </div>\n}\n","import { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyButtonModule } from 'ngx-tethys/button';\nimport { ThyArrowSwitcher } from './arrow-switcher.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyActionModule } from 'ngx-tethys/action';\n\n@NgModule({\n imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyActionModule, ThyTooltipModule, ThyArrowSwitcher],\n exports: [ThyArrowSwitcher]\n})\nexport class ThyArrowSwitcherModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA6BA;;;;AAIG;MAiBU,gBAAgB,CAAA;AAhB7B,IAAA,WAAA,GAAA;AAiBY,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAE9B,IAAA,CAAA,QAAQ,GAA4B,MAAM,CAAC,KAAK;qFAAC;AAEzD;;AAEG;QACM,IAAA,CAAA,WAAW,GAAG,MAAM,EAAyB;AAEtD;;AAEG;QACM,IAAA,CAAA,OAAO,GAAG,MAAM,EAAyB;AAElD;;AAEG;AACM,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK;0GAAU;AAE7C;;AAEG;AACM,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK;sGAAU;AAEzC;;;;AAIG;AACM,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAA2B;AAEtD;;;;;AAKG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,SAAS;qFAAC;AAElD,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,SAAS;oFAAC;AAEpF;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAkB,SAAS,gFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAErF;;AAEG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAAU;AAEzB,QAAA,IAAA,CAAA,WAAW,GAAoB,QAAQ,CAAC,MAAK;AAClD,YAAA,OAAO,IAAI,CAAC,OAAO,EAAE,KAAK,IAAI;QAClC,CAAC;wFAAC;QAEiB,IAAA,CAAA,KAAK,GAA2B,MAAM,CAAC,CAAC;kFAAC;AAEnD,QAAA,I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