ngx-tethys 21.0.4 → 21.0.6

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.
Files changed (186) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +19 -20
  3. package/fesm2022/ngx-tethys-action.mjs +10 -10
  4. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  5. package/fesm2022/ngx-tethys-affix.mjs +7 -7
  6. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  7. package/fesm2022/ngx-tethys-alert.mjs +10 -10
  8. package/fesm2022/ngx-tethys-alert.mjs.map +1 -1
  9. package/fesm2022/ngx-tethys-anchor.mjs +10 -10
  10. package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
  11. package/fesm2022/ngx-tethys-arrow-switcher.mjs +7 -7
  12. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  13. package/fesm2022/ngx-tethys-autocomplete.mjs +20 -18
  14. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  15. package/fesm2022/ngx-tethys-avatar.mjs +22 -22
  16. package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
  17. package/fesm2022/ngx-tethys-back-top.mjs +7 -7
  18. package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
  19. package/fesm2022/ngx-tethys-badge.mjs +7 -7
  20. package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
  21. package/fesm2022/ngx-tethys-breadcrumb.mjs +10 -10
  22. package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
  23. package/fesm2022/ngx-tethys-button.mjs +13 -13
  24. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  25. package/fesm2022/ngx-tethys-calendar.mjs +16 -16
  26. package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
  27. package/fesm2022/ngx-tethys-card.mjs +13 -13
  28. package/fesm2022/ngx-tethys-card.mjs.map +1 -1
  29. package/fesm2022/ngx-tethys-carousel.mjs +13 -13
  30. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  31. package/fesm2022/ngx-tethys-cascader.mjs +19 -19
  32. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  33. package/fesm2022/ngx-tethys-checkbox.mjs +7 -7
  34. package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
  35. package/fesm2022/ngx-tethys-collapse.mjs +10 -10
  36. package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
  37. package/fesm2022/ngx-tethys-color-picker.mjs +31 -31
  38. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  39. package/fesm2022/ngx-tethys-comment.mjs +13 -13
  40. package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
  41. package/fesm2022/ngx-tethys-copy.mjs +7 -7
  42. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  43. package/fesm2022/ngx-tethys-core.mjs +42 -28
  44. package/fesm2022/ngx-tethys-core.mjs.map +1 -1
  45. package/fesm2022/ngx-tethys-date-picker.mjs +125 -120
  46. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  47. package/fesm2022/ngx-tethys-date-range.mjs +10 -10
  48. package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
  49. package/fesm2022/ngx-tethys-dialog.mjs +22 -22
  50. package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
  51. package/fesm2022/ngx-tethys-divider.mjs +7 -7
  52. package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
  53. package/fesm2022/ngx-tethys-dot.mjs +7 -7
  54. package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
  55. package/fesm2022/ngx-tethys-dropdown.mjs +46 -46
  56. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  57. package/fesm2022/ngx-tethys-empty.mjs +10 -10
  58. package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
  59. package/fesm2022/ngx-tethys-flexible-text.mjs +7 -7
  60. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-form.mjs +40 -40
  62. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  63. package/fesm2022/ngx-tethys-fullscreen.mjs +13 -13
  64. package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
  65. package/fesm2022/ngx-tethys-grid.mjs +31 -31
  66. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  67. package/fesm2022/ngx-tethys-guider.mjs +16 -16
  68. package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
  69. package/fesm2022/ngx-tethys-i18n.mjs +3 -3
  70. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  71. package/fesm2022/ngx-tethys-icon.mjs +10 -10
  72. package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
  73. package/fesm2022/ngx-tethys-image.mjs +16 -16
  74. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  75. package/fesm2022/ngx-tethys-input-number.mjs +7 -7
  76. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-input.mjs +19 -19
  78. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  79. package/fesm2022/ngx-tethys-layout.mjs +58 -58
  80. package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
  81. package/fesm2022/ngx-tethys-list.mjs +16 -16
  82. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  83. package/fesm2022/ngx-tethys-loading.mjs +7 -7
  84. package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
  85. package/fesm2022/ngx-tethys-mention.mjs +10 -10
  86. package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
  87. package/fesm2022/ngx-tethys-menu.mjs +25 -25
  88. package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
  89. package/fesm2022/ngx-tethys-message.mjs +22 -22
  90. package/fesm2022/ngx-tethys-message.mjs.map +1 -1
  91. package/fesm2022/ngx-tethys-native-table.mjs +70 -70
  92. package/fesm2022/ngx-tethys-native-table.mjs.map +1 -1
  93. package/fesm2022/ngx-tethys-nav.mjs +22 -22
  94. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  95. package/fesm2022/ngx-tethys-notify.mjs +16 -16
  96. package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
  97. package/fesm2022/ngx-tethys-pagination.mjs +13 -13
  98. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  99. package/fesm2022/ngx-tethys-popover.mjs +36 -27
  100. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  101. package/fesm2022/ngx-tethys-progress.mjs +13 -13
  102. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  103. package/fesm2022/ngx-tethys-property-operation.mjs +10 -10
  104. package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
  105. package/fesm2022/ngx-tethys-property.mjs +10 -10
  106. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  107. package/fesm2022/ngx-tethys-radio.mjs +13 -13
  108. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  109. package/fesm2022/ngx-tethys-rate.mjs +10 -10
  110. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  111. package/fesm2022/ngx-tethys-resizable.mjs +16 -16
  112. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  113. package/fesm2022/ngx-tethys-result.mjs +7 -7
  114. package/fesm2022/ngx-tethys-result.mjs.map +1 -1
  115. package/fesm2022/ngx-tethys-segment.mjs +10 -10
  116. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  117. package/fesm2022/ngx-tethys-select.mjs +21 -14
  118. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  119. package/fesm2022/ngx-tethys-shared.mjs +69 -69
  120. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  121. package/fesm2022/ngx-tethys-skeleton.mjs +22 -22
  122. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  123. package/fesm2022/ngx-tethys-slide.mjs +31 -31
  124. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  125. package/fesm2022/ngx-tethys-slider.mjs +7 -7
  126. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  127. package/fesm2022/ngx-tethys-space.mjs +10 -10
  128. package/fesm2022/ngx-tethys-space.mjs.map +1 -1
  129. package/fesm2022/ngx-tethys-statistic.mjs +7 -7
  130. package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
  131. package/fesm2022/ngx-tethys-stepper.mjs +19 -19
  132. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  133. package/fesm2022/ngx-tethys-strength.mjs +7 -7
  134. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  135. package/fesm2022/ngx-tethys-switch.mjs +7 -7
  136. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  137. package/fesm2022/ngx-tethys-table.mjs +19 -19
  138. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  139. package/fesm2022/ngx-tethys-tabs.mjs +13 -13
  140. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  141. package/fesm2022/ngx-tethys-tag.mjs +10 -10
  142. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  143. package/fesm2022/ngx-tethys-time-picker.mjs +30 -26
  144. package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
  145. package/fesm2022/ngx-tethys-timeline.mjs +13 -13
  146. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  147. package/fesm2022/ngx-tethys-tooltip.mjs +13 -13
  148. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  149. package/fesm2022/ngx-tethys-transfer.mjs +10 -10
  150. package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
  151. package/fesm2022/ngx-tethys-tree-select.mjs +41 -15
  152. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  153. package/fesm2022/ngx-tethys-tree.mjs +16 -16
  154. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  155. package/fesm2022/ngx-tethys-typography.mjs +13 -13
  156. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  157. package/fesm2022/ngx-tethys-upload.mjs +16 -16
  158. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  159. package/fesm2022/ngx-tethys-vote.mjs +7 -7
  160. package/fesm2022/ngx-tethys-vote.mjs.map +1 -1
  161. package/fesm2022/ngx-tethys-watermark.mjs +7 -7
  162. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  163. package/fesm2022/ngx-tethys.mjs +15 -3
  164. package/fesm2022/ngx-tethys.mjs.map +1 -1
  165. package/package.json +1 -1
  166. package/popover/examples/flexible-position/flexible-position.component.scss +11 -0
  167. package/schematics/utils/create-tree-compiler-host.d.ts +0 -3
  168. package/schematics/utils/create-tree-compiler-host.js +28 -32
  169. package/schematics/utils/create-tree-ts-parse-config-host.d.ts +0 -14
  170. package/schematics/utils/create-tree-ts-parse-config-host.js +54 -46
  171. package/schematics/utils/get-angular-json.d.ts +0 -2
  172. package/schematics/utils/get-angular-json.js +5 -7
  173. package/schematics/utils/get-workspace-tsconfig.d.ts +0 -1
  174. package/schematics/utils/get-workspace-tsconfig.js +40 -43
  175. package/schematics/utils/index.d.ts +0 -4
  176. package/schematics/utils/index.js +4 -4
  177. package/schematics/version.d.ts +1 -1
  178. package/schematics/version.js +1 -1
  179. package/types/ngx-tethys-autocomplete.d.ts +1 -0
  180. package/types/ngx-tethys-core.d.ts +25 -4
  181. package/types/ngx-tethys-date-picker.d.ts +6 -4
  182. package/types/ngx-tethys-popover.d.ts +4 -2
  183. package/types/ngx-tethys-select.d.ts +4 -2
  184. package/types/ngx-tethys-time-picker.d.ts +9 -7
  185. package/types/ngx-tethys-tree-select.d.ts +20 -2
  186. package/types/ngx-tethys.d.ts +24 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
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
+ ## [21.0.6](github.com/atinc/ngx-tethys/compare/21.0.5...21.0.6) (2026-07-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * add flexiblePosition config for overlays #NEXUS-2762 ([#3826](/github.com/atinc/ngx-tethys/issues/3826)) ([9771c12](github.com/atinc/ngx-tethys/commits/9771c123245b5518a5f2b6f15123f34ccf1f4249)), closes [#NEXUS-2762](github.com/atinc/ngx-tethys/issues/NEXUS-2762)
11
+
12
+ ## [21.0.5](github.com/atinc/ngx-tethys/compare/21.0.4...21.0.5) (2026-06-25)
13
+
14
+
15
+ ### Features
16
+
17
+ * **tree-select:** #TINFR-3744 【TreeSelect】支持服务端搜索 ([#3819](/github.com/atinc/ngx-tethys/issues/3819)) ([84d4cdb](github.com/atinc/ngx-tethys/commits/84d4cdb447c6e6b1776749290733299ab27cd75b)), closes [#TINFR-3744](github.com/atinc/ngx-tethys/issues/TINFR-3744)
18
+
5
19
  ## [21.0.4](https://github.com/atinc/ngx-tethys/compare/21.0.3...21.0.4) (2026-05-19)
6
20
 
7
21
 
package/README.md CHANGED
@@ -1,4 +1,5 @@
1
- # ngx-tethys
1
+ # ngx-tethys
2
+
2
3
  Fast and reliable Tethys Design components for Angular by Worktile & PingCode FE Team.
3
4
 
4
5
  [![CircleCI](https://circleci.com/gh/atinc/ngx-tethys.svg?style=shield)](https://circleci.com/gh/atinc/ngx-tethys)
@@ -6,22 +7,21 @@ Fast and reliable Tethys Design components for Angular by Worktile & PingCode FE
6
7
  ![](https://img.shields.io/badge/Made%20with%20Angular-red?logo=angular)
7
8
  [![npm (scoped)](https://img.shields.io/npm/v/ngx-tethys?style=flat)](https://www.npmjs.com/package/ngx-tethys)
8
9
  [![npm](https://img.shields.io/npm/dm/ngx-tethys)](https://www.npmjs.com/package/ngx-tethys)
9
- [![release](https://img.shields.io/github/release-date/atinc/ngx-tethys.svg?style=flat-square
10
- )](https://github.com/atinc/ngx-tethys)
10
+ [![release](https://img.shields.io/github/release-date/atinc/ngx-tethys.svg?style=flat-square)](https://github.com/atinc/ngx-tethys)
11
11
  [![docgeni](https://img.shields.io/badge/docs%20by-docgeni-348fe4)](https://github.com/docgeni/docgeni)
12
12
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
13
13
 
14
-
15
14
  [coveralls-image]: https://coveralls.io/repos/github/atinc/ngx-tethys/badge.svg?branch=master
16
15
  [coveralls-url]: https://coveralls.io/github/atinc/ngx-tethys
17
16
 
18
17
  English | [中文文档](https://github.com/atinc/ngx-tethys/blob/master/README.zh-CN.md)
19
18
 
20
19
  # ✨ Features
20
+
21
21
  - 📦 Out of the box
22
22
  - 🚀 Powerful and 60+ rich components
23
23
  - 🔰 Perfect support for TypeScript, Provide complete type definition
24
- - 🎨 Extract enterprise level interactive language and design style
24
+ - 🎨 Extract enterprise level interactive language and design style
25
25
  - 💫 Synchronize with Angular version
26
26
  - ❤️ High-Quality, Each component has complete testing coverage and documentation, and high quality is equivalent to using it with confidence
27
27
 
@@ -41,31 +41,30 @@ English | [中文文档](https://github.com/atinc/ngx-tethys/blob/master/README.
41
41
  ```
42
42
  $ git clone git@github.com:atinc/ngx-tethys.git
43
43
  $ cd ngx-tethys
44
- $ npm install
45
- $ npm run start
44
+ $ pnpm install
45
+ $ pnpm run start
46
46
  ```
47
47
 
48
48
  ## Release & Publish
49
49
 
50
- 1. Run `npm run release` to release new version, this command will does the following:
51
- - Checkout to `master` and identifies current version and latest tag.
52
- - Prompts for a new version to select.
53
- - Create a release branch as `release-v1.0.0`
54
- - Modifies package metadata (package.json, version.ts) to reflect new release and generate changelog
55
- - Commits those changes to release branch.
56
- - Pushes to the git remote.
50
+ 1. Run `pnpm run release` to release new version, this command will does the following:
51
+ - Checkout to `master` and identifies current version and latest tag.
52
+ - Prompts for a new version to select.
53
+ - Create a release branch as `release-v1.0.0`
54
+ - Modifies package metadata (package.json, version.ts) to reflect new release and generate changelog
55
+ - Commits those changes to release branch.
56
+ - Pushes to the git remote.
57
+
58
+ You can run `pnpm run release -- [patch|minor|major|2.0.0]` to skip the version selection prompt and increment the version by that keyword or specify version.
57
59
 
58
- You can run `npm run release -- [patch|minor|major|2.0.0]` to skip the version selection prompt and increment the version by that keyword or specify version.
59
60
  1. Submit pull request from release branch to master(don't merge it)
60
61
  1. GitHub Actions will auto build and publish lib
61
62
 
63
+ Release the next version requires executing `pnpm run release-next`
62
64
 
63
- Release the next version requires executing `npm run release-next`
64
-
65
- Manually release version requires executing `npm run release-manual`
66
-
65
+ Manually release version requires executing `pnpm run release-manual`
67
66
 
68
- `npm run release -- --dry-run` or `npm run pub -- --dry-run`
67
+ `pnpm run release -- --dry-run` or `pnpm run pub -- --dry-run`
69
68
 
70
69
  running with the flag `--dry-run` allows you to see what commands would be run, without committing to git or updating files. (意思就是打印一下日志让你看看做了哪些步骤,但是并不会真的执行脚本,你可以放心的执行)
71
70
 
@@ -135,10 +135,10 @@ class ThyAction {
135
135
  ngOnDestroy() {
136
136
  this.feedbackTimer?.unsubscribe();
137
137
  }
138
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAction, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
139
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", 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 }, thyTheme: { classPropertyName: "thyTheme", publicName: "thyTheme", 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]=\"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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
138
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAction, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
139
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", 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 }, thyTheme: { classPropertyName: "thyTheme", publicName: "thyTheme", 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]=\"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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
140
140
  }
141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAction, decorators: [{
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAction, decorators: [{
142
142
  type: Component,
143
143
  args: [{ selector: 'thy-action, [thyAction]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
144
144
  class: 'thy-action',
@@ -175,10 +175,10 @@ class ThyActions {
175
175
  }
176
176
  });
177
177
  }
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyActions, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
179
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: ThyActions, isStandalone: true, selector: "thy-actions", inputs: { thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "thy-actions" }, queries: [{ propertyName: "actions", predicate: ThyAction, isSignal: true }], ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyActions, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
179
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.14", type: ThyActions, isStandalone: true, selector: "thy-actions", inputs: { thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "thy-actions" }, queries: [{ propertyName: "actions", predicate: ThyAction, isSignal: true }], ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
180
180
  }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyActions, decorators: [{
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyActions, decorators: [{
182
182
  type: Component,
183
183
  args: [{
184
184
  selector: 'thy-actions',
@@ -191,11 +191,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
191
191
  }], ctorParameters: () => [], propDecorators: { actions: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ThyAction), { isSignal: true }] }], thySize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySize", required: false }] }] } });
192
192
 
193
193
  class ThyActionModule {
194
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
195
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: ThyActionModule, imports: [CommonModule, ThyIconModule, ThyAction, ThyActions], exports: [ThyAction, ThyActions] }); }
196
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyActionModule, imports: [CommonModule, ThyIconModule, ThyAction] }); }
194
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
195
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: ThyActionModule, imports: [CommonModule, ThyIconModule, ThyAction, ThyActions], exports: [ThyAction, ThyActions] }); }
196
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyActionModule, imports: [CommonModule, ThyIconModule, ThyAction] }); }
197
197
  }
198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyActionModule, decorators: [{
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyActionModule, decorators: [{
199
199
  type: NgModule,
200
200
  args: [{
201
201
  imports: [CommonModule, ThyIconModule, ThyAction, ThyActions],
@@ -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 ChangeDetectionStrategy,\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 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 changeDetection: ChangeDetectionStrategy.OnPush,\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 * 操作图标的主题\n * @type fill(背景色填充) | lite(简单文本颜色变化)\n */\n readonly thyTheme = input<'fill' | 'lite'>('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.thyTheme() === '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]=\"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 { ChangeDetectionStrategy, 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 changeDetection: ChangeDetectionStrategy.OnPush,\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":";;;;;;;;;;AAiCA,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;MAcU,SAAS,CAAA;IA6DlB,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;AApEQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvB,QAAA,IAAA,CAAA,IAAI,GAAmB,QAAQ,CAAC,MAAM,IAAI,CAAC,aAAa,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE,2EAAC;AAE7F,QAAA,IAAA,CAAA,QAAQ,GAA6C,MAAM,CAAC,IAAI,+EAAC;AAEjE,QAAA,IAAA,CAAA,eAAe,GAAoD,MAAM,CAAC,IAAI,sFAAC;AAEtE,QAAA,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A,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 ChangeDetectionStrategy,\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 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 changeDetection: ChangeDetectionStrategy.OnPush,\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 * 操作图标的主题\n * @type fill(背景色填充) | lite(简单文本颜色变化)\n */\n readonly thyTheme = input<'fill' | 'lite'>('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.thyTheme() === '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]=\"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 { ChangeDetectionStrategy, 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 changeDetection: ChangeDetectionStrategy.OnPush,\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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,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAAA,OAAA,EAAA,CAHd,YAAY,EAAE,aAAa,EAAE,SAAS,CAAA,EAAA,CAAA,CAAA;;4FAGvC,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;;;;"}
@@ -228,14 +228,14 @@ class ThyAffix {
228
228
  this.syncPlaceholderStyle(e);
229
229
  }
230
230
  }
231
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAffix, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
232
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: ThyAffix, isStandalone: true, selector: "thy-affix", inputs: { thyContainer: { classPropertyName: "thyContainer", publicName: "thyContainer", isSignal: true, isRequired: false, transformFunction: null }, thyOffsetTop: { classPropertyName: "thyOffsetTop", publicName: "thyOffsetTop", isSignal: true, isRequired: false, transformFunction: null }, thyOffsetBottom: { classPropertyName: "thyOffsetBottom", publicName: "thyOffsetBottom", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyChange: "thyChange" }, viewQueries: [{ propertyName: "fixedElement", first: true, predicate: ["fixedElement"], descendants: true, isSignal: true }], exportAs: ["thyAffix"], ngImport: i0, template: `
231
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAffix, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
232
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.14", type: ThyAffix, isStandalone: true, selector: "thy-affix", inputs: { thyContainer: { classPropertyName: "thyContainer", publicName: "thyContainer", isSignal: true, isRequired: false, transformFunction: null }, thyOffsetTop: { classPropertyName: "thyOffsetTop", publicName: "thyOffsetTop", isSignal: true, isRequired: false, transformFunction: null }, thyOffsetBottom: { classPropertyName: "thyOffsetBottom", publicName: "thyOffsetBottom", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyChange: "thyChange" }, viewQueries: [{ propertyName: "fixedElement", first: true, predicate: ["fixedElement"], descendants: true, isSignal: true }], exportAs: ["thyAffix"], ngImport: i0, template: `
233
233
  <div #fixedElement>
234
234
  <ng-content></ng-content>
235
235
  </div>
236
236
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
237
237
  }
238
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAffix, decorators: [{
238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAffix, decorators: [{
239
239
  type: Component,
240
240
  args: [{
241
241
  selector: 'thy-affix',
@@ -251,11 +251,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
251
251
  }], ctorParameters: () => [], propDecorators: { fixedElement: [{ type: i0.ViewChild, args: ['fixedElement', { isSignal: true }] }], thyContainer: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyContainer", required: false }] }], thyOffsetTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyOffsetTop", required: false }] }], thyOffsetBottom: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyOffsetBottom", required: false }] }], thyChange: [{ type: i0.Output, args: ["thyChange"] }] } });
252
252
 
253
253
  class ThyAffixModule {
254
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
255
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: ThyAffixModule, imports: [CommonModule, PlatformModule, ThyAffix], exports: [ThyAffix] }); }
256
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAffixModule, imports: [CommonModule, PlatformModule] }); }
254
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
255
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: ThyAffixModule, imports: [CommonModule, PlatformModule, ThyAffix], exports: [ThyAffix] }); }
256
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAffixModule, imports: [CommonModule, PlatformModule] }); }
257
257
  }
258
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAffixModule, decorators: [{
258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAffixModule, decorators: [{
259
259
  type: NgModule,
260
260
  args: [{
261
261
  exports: [ThyAffix],
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-affix.mjs","sources":["../../../src/affix/respond-events.ts","../../../src/affix/affix.component.ts","../../../src/affix/affix.module.ts","../../../src/affix/ngx-tethys-affix.ts"],"sourcesContent":["export enum AffixRespondEvents {\n resize = 'resize',\n scroll = 'scroll',\n touchstart = 'touchstart',\n touchmove = 'touchmove',\n touchend = 'touchend',\n pageshow = 'pageshow',\n load = 'LOAD'\n}\n","import { ThyScrollService } from 'ngx-tethys/core';\nimport { dom, shallowEqual, SimpleRect } from 'ngx-tethys/util';\nimport { fromEvent, merge, ReplaySubject, Subject, Subscription } from 'rxjs';\nimport { auditTime, map, takeUntil } from 'rxjs/operators';\n\nimport { Platform } from '@angular/cdk/platform';\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n NgZone,\n numberAttribute,\n OnDestroy,\n output,\n Renderer2,\n Signal,\n viewChild,\n ViewEncapsulation,\n DOCUMENT\n} from '@angular/core';\n\nimport { AffixRespondEvents } from './respond-events';\n\nconst THY_AFFIX_CLS_PREFIX = 'thy-affix';\nconst THY_AFFIX_DEFAULT_SCROLL_TIME = 20;\n\n/**\n * 固钉组件\n * @name thy-affix\n * @order 10\n */\n@Component({\n selector: 'thy-affix',\n exportAs: 'thyAffix',\n template: `\n <div #fixedElement>\n <ng-content></ng-content>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class ThyAffix implements AfterViewInit, OnDestroy {\n private scrollService = inject(ThyScrollService);\n private ngZone = inject(NgZone);\n private platform = inject(Platform);\n private renderer = inject(Renderer2);\n\n private readonly fixedElement = viewChild.required<ElementRef<HTMLDivElement>>('fixedElement');\n\n /**\n * 设置 thy-affix 需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数\n * @default window\n * @type string | Element | Window\n */\n readonly thyContainer = input<string | Element | Window>();\n\n /**\n * 距离窗口顶部缓冲的偏移量阈值\n */\n readonly thyOffsetTop = input<number, unknown>(0, { transform: numberAttribute });\n\n /**\n * 距离窗口底部缓冲的偏移量阈值\n */\n readonly thyOffsetBottom = input<number, unknown>(0, { transform: numberAttribute });\n\n /**\n * 固定状态改变时触发的回调函数\n */\n readonly thyChange = output<boolean>();\n\n private readonly placeholderNode: HTMLElement;\n\n private affixStyle?: any;\n private placeholderStyle?: any;\n private positionChangeSubscription: Subscription = Subscription.EMPTY;\n private offsetChanged$ = new ReplaySubject(1);\n private destroy$ = new Subject<void>();\n private timeout?: any;\n private document: any;\n\n private readonly container: Signal<Element | Window> = computed(() => {\n const el = this.thyContainer();\n return (typeof el === 'string' ? this.document.querySelector(el) : el) || window;\n });\n\n constructor() {\n const el = inject(ElementRef);\n const document = inject(DOCUMENT);\n\n // The wrapper would stay at the original position as a placeholder.\n this.placeholderNode = el.nativeElement;\n this.document = document;\n effect(() => {\n if (this.thyOffsetBottom() || this.thyOffsetTop()) {\n this.offsetChanged$.next(undefined);\n }\n });\n }\n\n ngAfterViewInit(): void {\n this.registerListeners();\n }\n\n ngOnDestroy(): void {\n this.removeListeners();\n }\n\n private registerListeners(): void {\n this.removeListeners();\n this.positionChangeSubscription = this.ngZone.runOutsideAngular(() => {\n return merge(\n ...Object.keys(AffixRespondEvents).map(evName => fromEvent(this.container(), evName)),\n this.offsetChanged$.pipe(\n takeUntil(this.destroy$),\n map(() => ({}))\n )\n )\n .pipe(auditTime(THY_AFFIX_DEFAULT_SCROLL_TIME))\n .subscribe(e => this.updatePosition(e as Event));\n });\n this.timeout = setTimeout(() => this.updatePosition({} as Event));\n }\n\n private removeListeners(): void {\n clearTimeout(this.timeout);\n this.positionChangeSubscription.unsubscribe();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n getOffset(element: Element, target: Element | Window | undefined): SimpleRect {\n const elemRect = element.getBoundingClientRect();\n const containerRect = dom.getContainerRect(target!);\n\n const scrollTop = this.scrollService.getScroll(target, true);\n const scrollLeft = this.scrollService.getScroll(target, false);\n\n const docElem = this.document.body;\n const clientTop = docElem.clientTop || 0;\n const clientLeft = docElem.clientLeft || 0;\n\n return {\n top: elemRect.top - containerRect.top + scrollTop - clientTop,\n left: elemRect.left - containerRect.left + scrollLeft - clientLeft,\n width: elemRect.width,\n height: elemRect.height\n };\n }\n\n private setAffixStyle(e: Event, affixStyle?: any): void {\n const originalAffixStyle = this.affixStyle;\n const isWindow = this.container() === window;\n if (e.type === 'scroll' && originalAffixStyle && affixStyle && isWindow) {\n return;\n }\n if (shallowEqual(originalAffixStyle, affixStyle)) {\n return;\n }\n\n const fixed = !!affixStyle;\n const wrapElement = this.fixedElement().nativeElement;\n this.renderer.setStyle(wrapElement, 'cssText', dom.getStyleAsText(affixStyle));\n this.affixStyle = affixStyle;\n if (fixed) {\n wrapElement.classList.add(THY_AFFIX_CLS_PREFIX);\n } else {\n wrapElement.classList.remove(THY_AFFIX_CLS_PREFIX);\n }\n\n if ((affixStyle && !originalAffixStyle) || (!affixStyle && originalAffixStyle)) {\n this.thyChange.emit(fixed);\n }\n }\n\n private setPlaceholderStyle(placeholderStyle?: any): void {\n const originalPlaceholderStyle = this.placeholderStyle;\n if (shallowEqual(placeholderStyle, originalPlaceholderStyle)) {\n return;\n }\n this.renderer.setStyle(this.placeholderNode, 'cssText', dom.getStyleAsText(placeholderStyle));\n this.placeholderStyle = placeholderStyle;\n }\n\n private syncPlaceholderStyle(e: Event): void {\n if (!this.affixStyle) {\n return;\n }\n this.renderer.setStyle(this.placeholderNode, 'cssText', '');\n this.placeholderStyle = undefined;\n const styleObj = {\n width: this.placeholderNode.offsetWidth,\n height: this.fixedElement().nativeElement.offsetHeight\n };\n this.setAffixStyle(e, {\n ...this.affixStyle,\n ...styleObj\n });\n this.setPlaceholderStyle(styleObj);\n }\n\n updatePosition(e: Event): void {\n if (!this.platform.isBrowser) {\n return;\n }\n\n const containerNode = this.container();\n let offsetTop = this.thyOffsetTop();\n const scrollTop = this.scrollService.getScroll(containerNode, true);\n const elementOffset = this.getOffset(this.placeholderNode, containerNode);\n const fixedNode = this.fixedElement().nativeElement;\n const elemSize = {\n width: fixedNode.offsetWidth,\n height: fixedNode.offsetHeight\n };\n const offsetMode = {\n top: false,\n bottom: false\n };\n // Default to `offsetTop=0`.\n const thyOffsetBottom = this.thyOffsetBottom();\n if (typeof offsetTop !== 'number' && typeof thyOffsetBottom !== 'number') {\n offsetMode.top = true;\n offsetTop = 0;\n } else {\n offsetMode.top = typeof offsetTop === 'number';\n offsetMode.bottom = typeof thyOffsetBottom === 'number';\n }\n const containerRect = dom.getContainerRect(containerNode as Window);\n const targetInnerHeight = (containerNode as Window).innerHeight || (containerNode as HTMLElement).clientHeight;\n if (scrollTop >= elementOffset.top - (offsetTop as number) && offsetMode.top) {\n const width = elementOffset.width;\n const top = containerRect.top + (offsetTop as number);\n this.setAffixStyle(e, {\n position: 'fixed',\n top,\n left: containerRect.left + elementOffset.left,\n width\n });\n this.setPlaceholderStyle({\n width,\n height: elemSize.height\n });\n } else if (\n scrollTop <= elementOffset.top + elemSize.height + (thyOffsetBottom as number) - targetInnerHeight &&\n offsetMode.bottom\n ) {\n const targetBottomOffset = containerNode === window ? 0 : window.innerHeight - containerRect.bottom!;\n const width = elementOffset.width;\n this.setAffixStyle(e, {\n position: 'fixed',\n bottom: targetBottomOffset + (thyOffsetBottom as number),\n left: containerRect.left + elementOffset.left,\n width\n });\n this.setPlaceholderStyle({\n width,\n height: elementOffset.height\n });\n } else {\n if (\n e.type === AffixRespondEvents.resize &&\n this.affixStyle &&\n this.affixStyle.position === 'fixed' &&\n this.placeholderNode.offsetWidth\n ) {\n this.setAffixStyle(e, {\n ...this.affixStyle,\n width: this.placeholderNode.offsetWidth\n });\n } else {\n this.setAffixStyle(e);\n }\n this.setPlaceholderStyle();\n }\n\n if (e.type === 'resize') {\n this.syncPlaceholderStyle(e);\n }\n }\n}\n","import { PlatformModule } from '@angular/cdk/platform';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ThyAffix } from './affix.component';\n\n@NgModule({\n exports: [ThyAffix],\n imports: [CommonModule, PlatformModule, ThyAffix]\n})\nexport class ThyAffixModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA,IAAY,kBAQX;AARD,CAAA,UAAY,kBAAkB,EAAA;AAC1B,IAAA,kBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,kBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,kBAA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c,EAAA,OAAA,EAAA,CAFb,YAAY,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAE7B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,QAAQ,CAAC;AACnB,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,QAAQ;AACnD,iBAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-affix.mjs","sources":["../../../src/affix/respond-events.ts","../../../src/affix/affix.component.ts","../../../src/affix/affix.module.ts","../../../src/affix/ngx-tethys-affix.ts"],"sourcesContent":["export enum AffixRespondEvents {\n resize = 'resize',\n scroll = 'scroll',\n touchstart = 'touchstart',\n touchmove = 'touchmove',\n touchend = 'touchend',\n pageshow = 'pageshow',\n load = 'LOAD'\n}\n","import { ThyScrollService } from 'ngx-tethys/core';\nimport { dom, shallowEqual, SimpleRect } from 'ngx-tethys/util';\nimport { fromEvent, merge, ReplaySubject, Subject, Subscription } from 'rxjs';\nimport { auditTime, map, takeUntil } from 'rxjs/operators';\n\nimport { Platform } from '@angular/cdk/platform';\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n NgZone,\n numberAttribute,\n OnDestroy,\n output,\n Renderer2,\n Signal,\n viewChild,\n ViewEncapsulation,\n DOCUMENT\n} from '@angular/core';\n\nimport { AffixRespondEvents } from './respond-events';\n\nconst THY_AFFIX_CLS_PREFIX = 'thy-affix';\nconst THY_AFFIX_DEFAULT_SCROLL_TIME = 20;\n\n/**\n * 固钉组件\n * @name thy-affix\n * @order 10\n */\n@Component({\n selector: 'thy-affix',\n exportAs: 'thyAffix',\n template: `\n <div #fixedElement>\n <ng-content></ng-content>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class ThyAffix implements AfterViewInit, OnDestroy {\n private scrollService = inject(ThyScrollService);\n private ngZone = inject(NgZone);\n private platform = inject(Platform);\n private renderer = inject(Renderer2);\n\n private readonly fixedElement = viewChild.required<ElementRef<HTMLDivElement>>('fixedElement');\n\n /**\n * 设置 thy-affix 需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数\n * @default window\n * @type string | Element | Window\n */\n readonly thyContainer = input<string | Element | Window>();\n\n /**\n * 距离窗口顶部缓冲的偏移量阈值\n */\n readonly thyOffsetTop = input<number, unknown>(0, { transform: numberAttribute });\n\n /**\n * 距离窗口底部缓冲的偏移量阈值\n */\n readonly thyOffsetBottom = input<number, unknown>(0, { transform: numberAttribute });\n\n /**\n * 固定状态改变时触发的回调函数\n */\n readonly thyChange = output<boolean>();\n\n private readonly placeholderNode: HTMLElement;\n\n private affixStyle?: any;\n private placeholderStyle?: any;\n private positionChangeSubscription: Subscription = Subscription.EMPTY;\n private offsetChanged$ = new ReplaySubject(1);\n private destroy$ = new Subject<void>();\n private timeout?: any;\n private document: any;\n\n private readonly container: Signal<Element | Window> = computed(() => {\n const el = this.thyContainer();\n return (typeof el === 'string' ? this.document.querySelector(el) : el) || window;\n });\n\n constructor() {\n const el = inject(ElementRef);\n const document = inject(DOCUMENT);\n\n // The wrapper would stay at the original position as a placeholder.\n this.placeholderNode = el.nativeElement;\n this.document = document;\n effect(() => {\n if (this.thyOffsetBottom() || this.thyOffsetTop()) {\n this.offsetChanged$.next(undefined);\n }\n });\n }\n\n ngAfterViewInit(): void {\n this.registerListeners();\n }\n\n ngOnDestroy(): void {\n this.removeListeners();\n }\n\n private registerListeners(): void {\n this.removeListeners();\n this.positionChangeSubscription = this.ngZone.runOutsideAngular(() => {\n return merge(\n ...Object.keys(AffixRespondEvents).map(evName => fromEvent(this.container(), evName)),\n this.offsetChanged$.pipe(\n takeUntil(this.destroy$),\n map(() => ({}))\n )\n )\n .pipe(auditTime(THY_AFFIX_DEFAULT_SCROLL_TIME))\n .subscribe(e => this.updatePosition(e as Event));\n });\n this.timeout = setTimeout(() => this.updatePosition({} as Event));\n }\n\n private removeListeners(): void {\n clearTimeout(this.timeout);\n this.positionChangeSubscription.unsubscribe();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n getOffset(element: Element, target: Element | Window | undefined): SimpleRect {\n const elemRect = element.getBoundingClientRect();\n const containerRect = dom.getContainerRect(target!);\n\n const scrollTop = this.scrollService.getScroll(target, true);\n const scrollLeft = this.scrollService.getScroll(target, false);\n\n const docElem = this.document.body;\n const clientTop = docElem.clientTop || 0;\n const clientLeft = docElem.clientLeft || 0;\n\n return {\n top: elemRect.top - containerRect.top + scrollTop - clientTop,\n left: elemRect.left - containerRect.left + scrollLeft - clientLeft,\n width: elemRect.width,\n height: elemRect.height\n };\n }\n\n private setAffixStyle(e: Event, affixStyle?: any): void {\n const originalAffixStyle = this.affixStyle;\n const isWindow = this.container() === window;\n if (e.type === 'scroll' && originalAffixStyle && affixStyle && isWindow) {\n return;\n }\n if (shallowEqual(originalAffixStyle, affixStyle)) {\n return;\n }\n\n const fixed = !!affixStyle;\n const wrapElement = this.fixedElement().nativeElement;\n this.renderer.setStyle(wrapElement, 'cssText', dom.getStyleAsText(affixStyle));\n this.affixStyle = affixStyle;\n if (fixed) {\n wrapElement.classList.add(THY_AFFIX_CLS_PREFIX);\n } else {\n wrapElement.classList.remove(THY_AFFIX_CLS_PREFIX);\n }\n\n if ((affixStyle && !originalAffixStyle) || (!affixStyle && originalAffixStyle)) {\n this.thyChange.emit(fixed);\n }\n }\n\n private setPlaceholderStyle(placeholderStyle?: any): void {\n const originalPlaceholderStyle = this.placeholderStyle;\n if (shallowEqual(placeholderStyle, originalPlaceholderStyle)) {\n return;\n }\n this.renderer.setStyle(this.placeholderNode, 'cssText', dom.getStyleAsText(placeholderStyle));\n this.placeholderStyle = placeholderStyle;\n }\n\n private syncPlaceholderStyle(e: Event): void {\n if (!this.affixStyle) {\n return;\n }\n this.renderer.setStyle(this.placeholderNode, 'cssText', '');\n this.placeholderStyle = undefined;\n const styleObj = {\n width: this.placeholderNode.offsetWidth,\n height: this.fixedElement().nativeElement.offsetHeight\n };\n this.setAffixStyle(e, {\n ...this.affixStyle,\n ...styleObj\n });\n this.setPlaceholderStyle(styleObj);\n }\n\n updatePosition(e: Event): void {\n if (!this.platform.isBrowser) {\n return;\n }\n\n const containerNode = this.container();\n let offsetTop = this.thyOffsetTop();\n const scrollTop = this.scrollService.getScroll(containerNode, true);\n const elementOffset = this.getOffset(this.placeholderNode, containerNode);\n const fixedNode = this.fixedElement().nativeElement;\n const elemSize = {\n width: fixedNode.offsetWidth,\n height: fixedNode.offsetHeight\n };\n const offsetMode = {\n top: false,\n bottom: false\n };\n // Default to `offsetTop=0`.\n const thyOffsetBottom = this.thyOffsetBottom();\n if (typeof offsetTop !== 'number' && typeof thyOffsetBottom !== 'number') {\n offsetMode.top = true;\n offsetTop = 0;\n } else {\n offsetMode.top = typeof offsetTop === 'number';\n offsetMode.bottom = typeof thyOffsetBottom === 'number';\n }\n const containerRect = dom.getContainerRect(containerNode as Window);\n const targetInnerHeight = (containerNode as Window).innerHeight || (containerNode as HTMLElement).clientHeight;\n if (scrollTop >= elementOffset.top - (offsetTop as number) && offsetMode.top) {\n const width = elementOffset.width;\n const top = containerRect.top + (offsetTop as number);\n this.setAffixStyle(e, {\n position: 'fixed',\n top,\n left: containerRect.left + elementOffset.left,\n width\n });\n this.setPlaceholderStyle({\n width,\n height: elemSize.height\n });\n } else if (\n scrollTop <= elementOffset.top + elemSize.height + (thyOffsetBottom as number) - targetInnerHeight &&\n offsetMode.bottom\n ) {\n const targetBottomOffset = containerNode === window ? 0 : window.innerHeight - containerRect.bottom!;\n const width = elementOffset.width;\n this.setAffixStyle(e, {\n position: 'fixed',\n bottom: targetBottomOffset + (thyOffsetBottom as number),\n left: containerRect.left + elementOffset.left,\n width\n });\n this.setPlaceholderStyle({\n width,\n height: elementOffset.height\n });\n } else {\n if (\n e.type === AffixRespondEvents.resize &&\n this.affixStyle &&\n this.affixStyle.position === 'fixed' &&\n this.placeholderNode.offsetWidth\n ) {\n this.setAffixStyle(e, {\n ...this.affixStyle,\n width: this.placeholderNode.offsetWidth\n });\n } else {\n this.setAffixStyle(e);\n }\n this.setPlaceholderStyle();\n }\n\n if (e.type === 'resize') {\n this.syncPlaceholderStyle(e);\n }\n }\n}\n","import { PlatformModule } from '@angular/cdk/platform';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ThyAffix } from './affix.component';\n\n@NgModule({\n exports: [ThyAffix],\n imports: [CommonModule, PlatformModule, ThyAffix]\n})\nexport class ThyAffixModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA,IAAY,kBAQX;AARD,CAAA,UAAY,kBAAkB,EAAA;AAC1B,IAAA,kBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,kBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,kBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,kBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,kBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,kBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,kBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACjB,CAAC,EARW,kBAAkB,KAAlB,kBAAkB,GAAA,EAAA,CAAA,CAAA;;AC6B9B,MAAM,oBAAoB,GAAG,WAAW;AACxC,MAAM,6BAA6B,GAAG,EAAE;AAExC;;;;AAIG;MAYU,QAAQ,CAAA;AA6CjB,IAAA,WAAA,GAAA;AA5CQ,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QA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AA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;MC5CpF,cAAc,CAAA;+GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,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,cAAc,YAFb,YAAY,EAAE,cAAc,EAAE,QAAQ,aADtC,QAAQ,CAAA,EAAA,CAAA,CAAA;gHAGT,cAAc,EAAA,OAAA,EAAA,CAFb,YAAY,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAE7B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,QAAQ,CAAC;AACnB,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,QAAQ;AACnD,iBAAA;;;ACTD;;AAEG;;;;"}
@@ -86,10 +86,10 @@ class ThyAlert {
86
86
  }
87
87
  this.hostRenderer.updateClass([`thy-alert-${theme}`, `thy-alert-${theme}-${type}`]);
88
88
  }
89
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ThyAlert, isStandalone: true, selector: "thy-alert", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thyTheme: { classPropertyName: "thyTheme", publicName: "thyTheme", isSignal: true, isRequired: false, transformFunction: null }, thyMessage: { classPropertyName: "thyMessage", publicName: "thyMessage", isSignal: true, isRequired: false, transformFunction: null }, thyIcon: { classPropertyName: "thyIcon", publicName: "thyIcon", isSignal: true, isRequired: false, transformFunction: null }, thyCloseable: { classPropertyName: "thyCloseable", publicName: "thyCloseable", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-alert-hidden": "hidden" }, classAttribute: "thy-alert" }, queries: [{ propertyName: "alertOperation", first: true, predicate: ["operation"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"thy-alert-content\">\n @if (icon()) {\n <thy-icon class=\"thy-alert-icon\" [thyIconName]=\"icon()\"></thy-icon>\n }\n @if (thyTheme() === 'naked') {\n <span class=\"thy-alert-tips\">Tips\uFF1A </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", 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
89
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: ThyAlert, isStandalone: true, selector: "thy-alert", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thyTheme: { classPropertyName: "thyTheme", publicName: "thyTheme", isSignal: true, isRequired: false, transformFunction: null }, thyMessage: { classPropertyName: "thyMessage", publicName: "thyMessage", isSignal: true, isRequired: false, transformFunction: null }, thyIcon: { classPropertyName: "thyIcon", publicName: "thyIcon", isSignal: true, isRequired: false, transformFunction: null }, thyCloseable: { classPropertyName: "thyCloseable", publicName: "thyCloseable", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-alert-hidden": "hidden" }, classAttribute: "thy-alert" }, queries: [{ propertyName: "alertOperation", first: true, predicate: ["operation"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"thy-alert-content\">\n @if (icon()) {\n <thy-icon class=\"thy-alert-icon\" [thyIconName]=\"icon()\"></thy-icon>\n }\n @if (thyTheme() === 'naked') {\n <span class=\"thy-alert-tips\">Tips\uFF1A </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", 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
91
91
  }
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAlert, decorators: [{
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAlert, decorators: [{
93
93
  type: Component,
94
94
  args: [{ selector: 'thy-alert', changeDetection: ChangeDetectionStrategy.OnPush, host: {
95
95
  class: 'thy-alert',
@@ -106,10 +106,10 @@ class ThyAlertActionItemDirective {
106
106
  constructor() {
107
107
  this.class = true;
108
108
  }
109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAlertActionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
110
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: ThyAlertActionItemDirective, isStandalone: true, selector: "[thyAlertActionItem]", host: { properties: { "class.thy-alert-action": "this.class" } }, ngImport: i0 }); }
109
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAlertActionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
110
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: ThyAlertActionItemDirective, isStandalone: true, selector: "[thyAlertActionItem]", host: { properties: { "class.thy-alert-action": "this.class" } }, ngImport: i0 }); }
111
111
  }
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAlertActionItemDirective, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAlertActionItemDirective, decorators: [{
113
113
  type: Directive,
114
114
  args: [{
115
115
  selector: '[thyAlertActionItem]'
@@ -120,11 +120,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
120
120
  }] } });
121
121
 
122
122
  class ThyAlertModule {
123
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
124
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert, ThyAlertActionItemDirective], exports: [ThyAlert, ThyAlertActionItemDirective] }); }
125
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert] }); }
123
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
124
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert, ThyAlertActionItemDirective], exports: [ThyAlert, ThyAlertActionItemDirective] }); }
125
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert] }); }
126
126
  }
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAlertModule, decorators: [{
127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAlertModule, decorators: [{
128
128
  type: NgModule,
129
129
  args: [{
130
130
  imports: [CommonModule, ThyIconModule, ThyAlert, ThyAlertActionItemDirective],
@@ -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, ChangeDetectionStrategy, 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\ntype ThyAlertType =\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 ThyAlertTheme = 'fill' | 'bordered' | 'naked';\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 changeDetection: ChangeDetectionStrategy.OnPush,\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 thyType = input<ThyAlertType>('info');\n\n /**\n * 指定警告提示的主题\n * @type fill | bordered | naked\n * @default fill\n */\n thyTheme = input<ThyAlertTheme>('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 if (icon) {\n return isString(icon) ? icon : typeIconsMap[this.thyType()];\n } else {\n return icon === 'false' || icon === false ? '' : typeIconsMap[this.thyType()];\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 theme = this.thyTheme();\n let type = this.thyType();\n if (weakTypes.includes(type)) {\n theme = 'bordered';\n type = type.split('-')[0] as ThyAlertType;\n }\n this.hostRenderer.updateClass([`thy-alert-${theme}`, `thy-alert-${theme}-${type}`]);\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 (thyTheme() === '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;AAejF,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;MAWU,QAAQ,CAAA;AAuDjB,IAAA,WAAA,GAAA;QAtDU,IAAA,CAAA,MAAM,GAAG,KAAK;QAEhB,IAAA,CAAA,YAAY,GAAG,eAAe,EAAE;AAExC,QAAA,IAAA,CAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAK;AAC9B,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE;YAC/B,OAAO,KAAK,YAAY,WAAW;AACvC,QAAA,CAAC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B,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, ChangeDetectionStrategy, 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\ntype ThyAlertType =\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 ThyAlertTheme = 'fill' | 'bordered' | 'naked';\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 changeDetection: ChangeDetectionStrategy.OnPush,\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 thyType = input<ThyAlertType>('info');\n\n /**\n * 指定警告提示的主题\n * @type fill | bordered | naked\n * @default fill\n */\n thyTheme = input<ThyAlertTheme>('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 if (icon) {\n return isString(icon) ? icon : typeIconsMap[this.thyType()];\n } else {\n return icon === 'false' || icon === false ? '' : typeIconsMap[this.thyType()];\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 theme = this.thyTheme();\n let type = this.thyType();\n if (weakTypes.includes(type)) {\n theme = 'bordered';\n type = type.split('-')[0] as ThyAlertType;\n }\n this.hostRenderer.updateClass([`thy-alert-${theme}`, `thy-alert-${theme}-${type}`]);\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 (thyTheme() === '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;AAejF,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;MAWU,QAAQ,CAAA;AAuDjB,IAAA,WAAA,GAAA;QAtDU,IAAA,CAAA,MAAM,GAAG,KAAK;QAEhB,IAAA,CAAA,YAAY,GAAG,eAAe,EAAE;AAExC,QAAA,IAAA,CAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAK;AAC9B,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,EAA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,CAAC,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,2BAA2B,CAAC;AAC7E,oBAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,2BAA2B;AAClD,iBAAA;;;ACTD;;AAEG;;;;"}
@@ -228,8 +228,8 @@ class ThyAnchor {
228
228
  this.handleActive(linkComponent);
229
229
  this.thyClick.emit(linkComponent);
230
230
  }
231
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
232
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ThyAnchor, isStandalone: true, selector: "thy-anchor", inputs: { thyAffix: { classPropertyName: "thyAffix", publicName: "thyAffix", isSignal: true, isRequired: false, transformFunction: null }, thyBounds: { classPropertyName: "thyBounds", publicName: "thyBounds", isSignal: true, isRequired: false, transformFunction: null }, thyOffsetTop: { classPropertyName: "thyOffsetTop", publicName: "thyOffsetTop", isSignal: true, isRequired: false, transformFunction: null }, thyContainer: { classPropertyName: "thyContainer", publicName: "thyContainer", isSignal: true, isRequired: false, transformFunction: null }, thyDirection: { classPropertyName: "thyDirection", publicName: "thyDirection", isSignal: true, isRequired: false, transformFunction: null }, thyDisabledContainerScroll: { classPropertyName: "thyDisabledContainerScroll", publicName: "thyDisabledContainerScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyClick: "thyClick", thyScroll: "thyScroll" }, providers: [
231
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
232
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: ThyAnchor, isStandalone: true, selector: "thy-anchor", inputs: { thyAffix: { classPropertyName: "thyAffix", publicName: "thyAffix", isSignal: true, isRequired: false, transformFunction: null }, thyBounds: { classPropertyName: "thyBounds", publicName: "thyBounds", isSignal: true, isRequired: false, transformFunction: null }, thyOffsetTop: { classPropertyName: "thyOffsetTop", publicName: "thyOffsetTop", isSignal: true, isRequired: false, transformFunction: null }, thyContainer: { classPropertyName: "thyContainer", publicName: "thyContainer", isSignal: true, isRequired: false, transformFunction: null }, thyDirection: { classPropertyName: "thyDirection", publicName: "thyDirection", isSignal: true, isRequired: false, transformFunction: null }, thyDisabledContainerScroll: { classPropertyName: "thyDisabledContainerScroll", publicName: "thyDisabledContainerScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyClick: "thyClick", thyScroll: "thyScroll" }, providers: [
233
233
  {
234
234
  provide: THY_ANCHOR_COMPONENT,
235
235
  useExisting: ThyAnchor
@@ -258,7 +258,7 @@ class ThyAnchor {
258
258
  </ng-template>
259
259
  `, isInline: true, dependencies: [{ kind: "component", type: ThyAffix, selector: "thy-affix", inputs: ["thyContainer", "thyOffsetTop", "thyOffsetBottom"], outputs: ["thyChange"], exportAs: ["thyAffix"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
260
260
  }
261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAnchor, decorators: [{
261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAnchor, decorators: [{
262
262
  type: Component,
263
263
  args: [{
264
264
  selector: 'thy-anchor',
@@ -353,8 +353,8 @@ class ThyAnchorLink {
353
353
  ngOnDestroy() {
354
354
  this.anchorComponent.unregisterLink(this);
355
355
  }
356
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAnchorLink, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
357
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ThyAnchorLink, isStandalone: true, selector: "thy-link,thy-anchor-link", inputs: { thyHref: { classPropertyName: "thyHref", publicName: "thyHref", isSignal: true, isRequired: false, transformFunction: null }, thyTitle: { classPropertyName: "thyTitle", publicName: "thyTitle", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "thyTemplate", first: true, predicate: ["thyTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "linkTitle", first: true, predicate: ["linkTitle"], descendants: true, isSignal: true }], exportAs: ["thyLink", "thyAnchorLink"], ngImport: i0, template: `
356
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAnchorLink, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
357
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: ThyAnchorLink, isStandalone: true, selector: "thy-link,thy-anchor-link", inputs: { thyHref: { classPropertyName: "thyHref", publicName: "thyHref", isSignal: true, isRequired: false, transformFunction: null }, thyTitle: { classPropertyName: "thyTitle", publicName: "thyTitle", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "thyTemplate", first: true, predicate: ["thyTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "linkTitle", first: true, predicate: ["linkTitle"], descendants: true, isSignal: true }], exportAs: ["thyLink", "thyAnchorLink"], ngImport: i0, template: `
358
358
  <a #linkTitle (click)="goToClick($event)" href="{{ thyHref() }}" class="thy-anchor-link-title" title="{{ title() }}">
359
359
  @if (title()) {
360
360
  <span>{{ title() }}</span>
@@ -365,7 +365,7 @@ class ThyAnchorLink {
365
365
  <ng-content></ng-content>
366
366
  `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
367
367
  }
368
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAnchorLink, decorators: [{
368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAnchorLink, decorators: [{
369
369
  type: Component,
370
370
  args: [{
371
371
  selector: 'thy-link,thy-anchor-link',
@@ -388,11 +388,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
388
388
  }], ctorParameters: () => [], propDecorators: { thyHref: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyHref", required: false }] }], thyTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTitle", required: false }] }], thyTemplate: [{ type: i0.ContentChild, args: ['thyTemplate', { isSignal: true }] }], linkTitle: [{ type: i0.ViewChild, args: ['linkTitle', { isSignal: true }] }] } });
389
389
 
390
390
  class ThyAnchorModule {
391
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAnchorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
392
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor, ThyAnchorLink], exports: [ThyAnchor, ThyAnchorLink] }); }
393
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor] }); }
391
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAnchorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
392
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor, ThyAnchorLink], exports: [ThyAnchor, ThyAnchorLink] }); }
393
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor] }); }
394
394
  }
395
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThyAnchorModule, decorators: [{
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ThyAnchorModule, decorators: [{
396
396
  type: NgModule,
397
397
  args: [{
398
398
  exports: [ThyAnchor, ThyAnchorLink],