ngx-tethys 20.0.1 → 20.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/action/index.d.ts +3 -3
  3. package/affix/index.d.ts +1 -1
  4. package/alert/index.d.ts +3 -3
  5. package/anchor/index.d.ts +12 -6
  6. package/arrow-switcher/index.d.ts +6 -6
  7. package/autocomplete/index.d.ts +7 -7
  8. package/avatar/index.d.ts +9 -9
  9. package/back-top/index.d.ts +3 -3
  10. package/badge/index.d.ts +6 -6
  11. package/breadcrumb/index.d.ts +7 -7
  12. package/button/index.d.ts +19 -19
  13. package/calendar/index.d.ts +8 -8
  14. package/card/index.d.ts +6 -6
  15. package/carousel/index.d.ts +4 -4
  16. package/cascader/index.d.ts +24 -24
  17. package/collapse/index.d.ts +4 -4
  18. package/color-picker/index.d.ts +16 -16
  19. package/comment/index.d.ts +3 -3
  20. package/copy/index.d.ts +2 -2
  21. package/core/index.d.ts +22 -22
  22. package/date-picker/index.d.ts +111 -111
  23. package/date-range/index.d.ts +5 -5
  24. package/dialog/index.d.ts +18 -18
  25. package/divider/index.d.ts +3 -3
  26. package/drag-drop/index.d.ts +7 -7
  27. package/dropdown/index.d.ts +10 -10
  28. package/empty/index.d.ts +12 -12
  29. package/fesm2022/ngx-tethys-action.mjs +14 -12
  30. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  31. package/fesm2022/ngx-tethys-affix.mjs +7 -7
  32. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  33. package/fesm2022/ngx-tethys-alert.mjs +10 -10
  34. package/fesm2022/ngx-tethys-anchor.mjs +65 -28
  35. package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
  36. package/fesm2022/ngx-tethys-arrow-switcher.mjs +7 -7
  37. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  38. package/fesm2022/ngx-tethys-autocomplete.mjs +19 -18
  39. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  40. package/fesm2022/ngx-tethys-avatar.mjs +23 -22
  41. package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
  42. package/fesm2022/ngx-tethys-back-top.mjs +7 -7
  43. package/fesm2022/ngx-tethys-badge.mjs +7 -7
  44. package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
  45. package/fesm2022/ngx-tethys-breadcrumb.mjs +10 -10
  46. package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
  47. package/fesm2022/ngx-tethys-button.mjs +16 -16
  48. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  49. package/fesm2022/ngx-tethys-calendar.mjs +16 -16
  50. package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
  51. package/fesm2022/ngx-tethys-card.mjs +13 -13
  52. package/fesm2022/ngx-tethys-card.mjs.map +1 -1
  53. package/fesm2022/ngx-tethys-carousel.mjs +15 -15
  54. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  55. package/fesm2022/ngx-tethys-cascader.mjs +41 -34
  56. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  57. package/fesm2022/ngx-tethys-checkbox.mjs +7 -7
  58. package/fesm2022/ngx-tethys-collapse.mjs +10 -10
  59. package/fesm2022/ngx-tethys-color-picker.mjs +65 -57
  60. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-comment.mjs +13 -13
  62. package/fesm2022/ngx-tethys-copy.mjs +10 -10
  63. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  64. package/fesm2022/ngx-tethys-core.mjs +30 -25
  65. package/fesm2022/ngx-tethys-core.mjs.map +1 -1
  66. package/fesm2022/ngx-tethys-date-picker.mjs +184 -174
  67. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  68. package/fesm2022/ngx-tethys-date-range.mjs +16 -16
  69. package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
  70. package/fesm2022/ngx-tethys-dialog.mjs +24 -24
  71. package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
  72. package/fesm2022/ngx-tethys-divider.mjs +7 -7
  73. package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
  74. package/fesm2022/ngx-tethys-dot.mjs +7 -7
  75. package/fesm2022/ngx-tethys-drag-drop.mjs +24 -24
  76. package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-dropdown.mjs +48 -47
  78. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  79. package/fesm2022/ngx-tethys-empty.mjs +13 -13
  80. package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
  81. package/fesm2022/ngx-tethys-flexible-text.mjs +7 -7
  82. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  83. package/fesm2022/ngx-tethys-form.mjs +64 -61
  84. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  85. package/fesm2022/ngx-tethys-fullscreen.mjs +18 -15
  86. package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
  87. package/fesm2022/ngx-tethys-grid.mjs +34 -33
  88. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  89. package/fesm2022/ngx-tethys-guider.mjs +25 -24
  90. package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
  91. package/fesm2022/ngx-tethys-i18n.mjs +3 -3
  92. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  93. package/fesm2022/ngx-tethys-icon.mjs +15 -13
  94. package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
  95. package/fesm2022/ngx-tethys-image.mjs +31 -29
  96. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  97. package/fesm2022/ngx-tethys-input-number.mjs +17 -10
  98. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  99. package/fesm2022/ngx-tethys-input.mjs +27 -26
  100. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  101. package/fesm2022/ngx-tethys-layout.mjs +63 -63
  102. package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
  103. package/fesm2022/ngx-tethys-list.mjs +21 -18
  104. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  105. package/fesm2022/ngx-tethys-loading.mjs +7 -7
  106. package/fesm2022/ngx-tethys-mention.mjs +35 -31
  107. package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
  108. package/fesm2022/ngx-tethys-menu.mjs +26 -26
  109. package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
  110. package/fesm2022/ngx-tethys-message.mjs +24 -24
  111. package/fesm2022/ngx-tethys-message.mjs.map +1 -1
  112. package/fesm2022/ngx-tethys-native-table.mjs +1119 -0
  113. package/fesm2022/ngx-tethys-native-table.mjs.map +1 -0
  114. package/fesm2022/ngx-tethys-nav.mjs +27 -27
  115. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  116. package/fesm2022/ngx-tethys-notify.mjs +20 -20
  117. package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
  118. package/fesm2022/ngx-tethys-pagination.mjs +18 -18
  119. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  120. package/fesm2022/ngx-tethys-popover.mjs +22 -21
  121. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  122. package/fesm2022/ngx-tethys-progress.mjs +17 -17
  123. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  124. package/fesm2022/ngx-tethys-property-operation.mjs +11 -11
  125. package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
  126. package/fesm2022/ngx-tethys-property.mjs +15 -12
  127. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  128. package/fesm2022/ngx-tethys-radio.mjs +17 -17
  129. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  130. package/fesm2022/ngx-tethys-rate.mjs +12 -12
  131. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  132. package/fesm2022/ngx-tethys-resizable.mjs +21 -18
  133. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  134. package/fesm2022/ngx-tethys-result.mjs +11 -11
  135. package/fesm2022/ngx-tethys-result.mjs.map +1 -1
  136. package/fesm2022/ngx-tethys-segment.mjs +19 -16
  137. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  138. package/fesm2022/ngx-tethys-select.mjs +95 -46
  139. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  140. package/fesm2022/ngx-tethys-shared.mjs +85 -81
  141. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  142. package/fesm2022/ngx-tethys-skeleton.mjs +32 -32
  143. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  144. package/fesm2022/ngx-tethys-slide.mjs +37 -36
  145. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  146. package/fesm2022/ngx-tethys-slider.mjs +11 -11
  147. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  148. package/fesm2022/ngx-tethys-space.mjs +10 -10
  149. package/fesm2022/ngx-tethys-statistic.mjs +7 -7
  150. package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
  151. package/fesm2022/ngx-tethys-stepper.mjs +22 -22
  152. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  153. package/fesm2022/ngx-tethys-strength.mjs +7 -7
  154. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  155. package/fesm2022/ngx-tethys-switch.mjs +7 -7
  156. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  157. package/fesm2022/ngx-tethys-table.mjs +28 -28
  158. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  159. package/fesm2022/ngx-tethys-tabs.mjs +13 -13
  160. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  161. package/fesm2022/ngx-tethys-tag.mjs +11 -11
  162. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  163. package/fesm2022/ngx-tethys-testing.mjs +1 -1
  164. package/fesm2022/ngx-tethys-testing.mjs.map +1 -1
  165. package/fesm2022/ngx-tethys-time-picker.mjs +22 -22
  166. package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
  167. package/fesm2022/ngx-tethys-timeline.mjs +14 -14
  168. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  169. package/fesm2022/ngx-tethys-tooltip.mjs +36 -29
  170. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  171. package/fesm2022/ngx-tethys-transfer.mjs +15 -15
  172. package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
  173. package/fesm2022/ngx-tethys-tree-select.mjs +17 -17
  174. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  175. package/fesm2022/ngx-tethys-tree.mjs +50 -43
  176. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  177. package/fesm2022/ngx-tethys-typography.mjs +16 -16
  178. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  179. package/fesm2022/ngx-tethys-upload.mjs +26 -25
  180. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  181. package/fesm2022/ngx-tethys-util.mjs +11 -5
  182. package/fesm2022/ngx-tethys-util.mjs.map +1 -1
  183. package/fesm2022/ngx-tethys-vote.mjs +7 -7
  184. package/fesm2022/ngx-tethys-watermark.mjs +18 -15
  185. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  186. package/fesm2022/ngx-tethys.mjs +1 -1
  187. package/fesm2022/ngx-tethys.mjs.map +1 -1
  188. package/flexible-text/index.d.ts +5 -5
  189. package/form/index.d.ts +26 -22
  190. package/fullscreen/index.d.ts +4 -4
  191. package/grid/index.d.ts +12 -12
  192. package/guider/index.d.ts +10 -10
  193. package/i18n/index.d.ts +1 -1
  194. package/icon/index.d.ts +3 -3
  195. package/image/index.d.ts +12 -12
  196. package/input/index.d.ts +23 -23
  197. package/input-number/index.d.ts +4 -4
  198. package/layout/index.d.ts +16 -16
  199. package/list/index.d.ts +16 -15
  200. package/mention/index.d.ts +4 -4
  201. package/menu/index.d.ts +7 -7
  202. package/message/index.d.ts +5 -5
  203. package/native-table/index.d.ts +305 -0
  204. package/native-table/styles/native-table.scss +174 -0
  205. package/nav/index.d.ts +12 -12
  206. package/notify/index.d.ts +1 -1
  207. package/package.json +5 -1
  208. package/pagination/index.d.ts +21 -17
  209. package/popover/index.d.ts +8 -8
  210. package/progress/index.d.ts +18 -18
  211. package/property/index.d.ts +6 -6
  212. package/property-operation/index.d.ts +3 -3
  213. package/radio/index.d.ts +6 -6
  214. package/rate/index.d.ts +5 -5
  215. package/resizable/index.d.ts +2 -2
  216. package/result/index.d.ts +8 -8
  217. package/schematics/testing/test-workspace.js +1 -0
  218. package/schematics/version.d.ts +1 -1
  219. package/schematics/version.js +1 -1
  220. package/segment/index.d.ts +9 -9
  221. package/select/index.d.ts +28 -22
  222. package/shared/index.d.ts +31 -30
  223. package/shared/option/styles/select-dropdown.scss +5 -2
  224. package/skeleton/index.d.ts +52 -52
  225. package/slide/index.d.ts +5 -5
  226. package/slider/index.d.ts +6 -6
  227. package/space/index.d.ts +1 -1
  228. package/statistic/index.d.ts +18 -18
  229. package/stepper/index.d.ts +8 -8
  230. package/styles/index.scss +1 -0
  231. package/switch/index.d.ts +2 -2
  232. package/table/index.d.ts +24 -24
  233. package/tabs/index.d.ts +6 -6
  234. package/testing/index.d.ts +1 -1
  235. package/time-picker/index.d.ts +21 -21
  236. package/timeline/index.d.ts +8 -8
  237. package/tooltip/index.d.ts +12 -12
  238. package/transfer/index.d.ts +16 -16
  239. package/tree/index.d.ts +28 -28
  240. package/tree-select/index.d.ts +13 -13
  241. package/typography/index.d.ts +3 -3
  242. package/upload/index.d.ts +4 -4
  243. package/util/index.d.ts +17 -7
  244. package/vote/index.d.ts +2 -2
  245. package/watermark/index.d.ts +2 -2
@@ -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: "20.3.14", ngImport: i0, type: ThyAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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 }); }
89
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", 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: "20.3.14", ngImport: i0, type: ThyAlert, decorators: [{
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", 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: "20.3.14", ngImport: i0, type: ThyAlertActionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
110
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", 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: "20.3.15", ngImport: i0, type: ThyAlertActionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
110
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", 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: "20.3.14", ngImport: i0, type: ThyAlertActionItemDirective, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", 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: "20.3.14", ngImpo
120
120
  }] } });
121
121
 
122
122
  class ThyAlertModule {
123
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
124
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert, ThyAlertActionItemDirective], exports: [ThyAlert, ThyAlertActionItemDirective] }); }
125
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert] }); }
123
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
124
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert, ThyAlertActionItemDirective], exports: [ThyAlert, ThyAlertActionItemDirective] }); }
125
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert] }); }
126
126
  }
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyAlertModule, decorators: [{
127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAlertModule, decorators: [{
128
128
  type: NgModule,
129
129
  args: [{
130
130
  imports: [CommonModule, ThyIconModule, ThyAlert, ThyAlertActionItemDirective],
@@ -46,11 +46,15 @@ class ThyAnchor {
46
46
  /**
47
47
  * 指定滚动的容器
48
48
  */
49
- this.thyContainer = input(undefined, ...(ngDevMode ? [{ debugName: "thyContainer" }] : []));
49
+ this.thyContainer = input(...(ngDevMode ? [undefined, { debugName: "thyContainer" }] : []));
50
50
  /**
51
51
  * 设置导航方向
52
52
  */
53
53
  this.thyDirection = input('vertical', ...(ngDevMode ? [{ debugName: "thyDirection" }] : []));
54
+ /**
55
+ * 是否禁用容器滚动
56
+ */
57
+ this.thyDisabledContainerScroll = input(false, ...(ngDevMode ? [{ debugName: "thyDisabledContainerScroll", transform: coerceBooleanProperty }] : [{ transform: coerceBooleanProperty }]));
54
58
  /**
55
59
  * 点击项触发
56
60
  */
@@ -74,6 +78,7 @@ class ThyAnchor {
74
78
  this.animating = false;
75
79
  this.destroy$ = new Subject();
76
80
  this.handleScrollTimeoutID = -1;
81
+ this.wrapper = viewChild.required('wrapper');
77
82
  effect(() => {
78
83
  if (this.thyContainer()) {
79
84
  this.registerScrollEvent();
@@ -101,6 +106,9 @@ class ThyAnchor {
101
106
  if (!this.platform.isBrowser) {
102
107
  return;
103
108
  }
109
+ if (this.thyDisabledContainerScroll()) {
110
+ return;
111
+ }
104
112
  this.destroy$.next();
105
113
  this.zone.runOutsideAngular(() => {
106
114
  fromEvent(this.container(), 'scroll', { passive: true })
@@ -156,14 +164,39 @@ class ThyAnchor {
156
164
  const linkNode = linkComponent.getLinkTitleElement();
157
165
  const horizontalAnchor = this.thyDirection() === 'horizontal';
158
166
  const ink = this.ink();
159
- ink.nativeElement.style.top = horizontalAnchor ? '' : `${linkNode.offsetTop}px`;
160
- ink.nativeElement.style.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;
161
- ink.nativeElement.style.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';
162
- ink.nativeElement.style.width = horizontalAnchor ? `${linkNode.clientWidth}px` : '';
167
+ const linkOffset = {
168
+ top: linkNode.offsetTop,
169
+ left: linkNode.offsetLeft,
170
+ height: linkNode.clientHeight,
171
+ width: linkNode.clientWidth
172
+ };
173
+ ink.nativeElement.style.top = horizontalAnchor ? '' : `${linkOffset.top}px`;
174
+ ink.nativeElement.style.height = horizontalAnchor ? '' : `${linkOffset.height}px`;
175
+ ink.nativeElement.style.left = horizontalAnchor ? `${linkOffset.left}px` : '';
176
+ ink.nativeElement.style.width = horizontalAnchor ? `${linkOffset.width}px` : '';
163
177
  this.visible = true;
164
178
  this.setVisible();
179
+ this.linkVisible(linkOffset, horizontalAnchor);
165
180
  this.thyScroll.emit(linkComponent);
166
181
  }
182
+ linkVisible(linkOffset, horizontalAnchor) {
183
+ const wrapper = this.wrapper()?.nativeElement;
184
+ if (!wrapper) {
185
+ return;
186
+ }
187
+ const scrollTo = horizontalAnchor ? linkOffset.left : linkOffset.top;
188
+ const scrollPos = horizontalAnchor ? wrapper.scrollLeft : wrapper.scrollTop;
189
+ const wrapperSize = horizontalAnchor ? wrapper.offsetWidth : wrapper.offsetHeight;
190
+ const linkSize = horizontalAnchor ? linkOffset.width : linkOffset.height;
191
+ if (scrollTo < scrollPos || scrollTo + linkSize > scrollPos + wrapperSize) {
192
+ if (horizontalAnchor) {
193
+ wrapper.scrollLeft = scrollTo;
194
+ }
195
+ else {
196
+ wrapper.scrollTop = scrollTo;
197
+ }
198
+ }
199
+ }
167
200
  setVisible() {
168
201
  const visible = this.visible;
169
202
  const visibleClassname = 'visible';
@@ -178,28 +211,30 @@ class ThyAnchor {
178
211
  }
179
212
  }
180
213
  handleScrollTo(linkComponent) {
181
- const container = this.container() instanceof HTMLElement ? this.container() : this.document;
182
- const linkElement = container.querySelector(linkComponent.thyHref());
183
- if (!linkElement) {
184
- return;
214
+ if (!this.thyDisabledContainerScroll()) {
215
+ const container = this.container() instanceof HTMLElement ? this.container() : this.document;
216
+ const linkElement = container.querySelector(linkComponent.thyHref());
217
+ if (!linkElement) {
218
+ return;
219
+ }
220
+ this.animating = true;
221
+ const containerScrollTop = this.scrollService.getScroll(this.container());
222
+ const elementOffsetTop = getOffset(linkElement, this.container()).top;
223
+ const targetScrollTop = containerScrollTop + elementOffsetTop - (this.thyOffsetTop() || 0);
224
+ this.scrollService.scrollTo(this.container(), targetScrollTop, undefined, () => {
225
+ this.animating = false;
226
+ });
185
227
  }
186
- this.animating = true;
187
- const containerScrollTop = this.scrollService.getScroll(this.container());
188
- const elementOffsetTop = getOffset(linkElement, this.container()).top;
189
- const targetScrollTop = containerScrollTop + elementOffsetTop - (this.thyOffsetTop() || 0);
190
- this.scrollService.scrollTo(this.container(), targetScrollTop, undefined, () => {
191
- this.animating = false;
192
- });
193
228
  this.handleActive(linkComponent);
194
229
  this.thyClick.emit(linkComponent);
195
230
  }
196
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
197
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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 } }, outputs: { thyClick: "thyClick", thyScroll: "thyScroll" }, providers: [
231
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
232
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", 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: [
198
233
  {
199
234
  provide: THY_ANCHOR_COMPONENT,
200
235
  useExisting: ThyAnchor
201
236
  }
202
- ], viewQueries: [{ propertyName: "ink", first: true, predicate: ["ink"], descendants: true, isSignal: true }], exportAs: ["thyAnchor"], ngImport: i0, template: `
237
+ ], viewQueries: [{ propertyName: "ink", first: true, predicate: ["ink"], descendants: true, isSignal: true }, { propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }], exportAs: ["thyAnchor"], ngImport: i0, template: `
203
238
  @if (thyAffix()) {
204
239
  <thy-affix [thyOffsetTop]="thyOffsetTop()" [thyContainer]="container()">
205
240
  <ng-template [ngTemplateOutlet]="content"></ng-template>
@@ -209,6 +244,7 @@ class ThyAnchor {
209
244
  }
210
245
  <ng-template #content>
211
246
  <div
247
+ #wrapper
212
248
  class="thy-anchor-wrapper"
213
249
  [ngClass]="{ 'thy-anchor-wrapper-horizontal': thyDirection() === 'horizontal' }"
214
250
  [ngStyle]="wrapperStyle()">
@@ -222,7 +258,7 @@ class ThyAnchor {
222
258
  </ng-template>
223
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 }); }
224
260
  }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyAnchor, decorators: [{
261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAnchor, decorators: [{
226
262
  type: Component,
227
263
  args: [{
228
264
  selector: 'thy-anchor',
@@ -238,6 +274,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
238
274
  }
239
275
  <ng-template #content>
240
276
  <div
277
+ #wrapper
241
278
  class="thy-anchor-wrapper"
242
279
  [ngClass]="{ 'thy-anchor-wrapper-horizontal': thyDirection() === 'horizontal' }"
243
280
  [ngStyle]="wrapperStyle()">
@@ -260,7 +297,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
260
297
  }
261
298
  ]
262
299
  }]
263
- }], ctorParameters: () => [], propDecorators: { ink: [{ type: i0.ViewChild, args: ['ink', { isSignal: true }] }], thyAffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAffix", required: false }] }], thyBounds: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyBounds", required: false }] }], thyOffsetTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyOffsetTop", required: false }] }], thyContainer: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyContainer", required: false }] }], thyDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyDirection", required: false }] }], thyClick: [{ type: i0.Output, args: ["thyClick"] }], thyScroll: [{ type: i0.Output, args: ["thyScroll"] }] } });
300
+ }], ctorParameters: () => [], propDecorators: { ink: [{ type: i0.ViewChild, args: ['ink', { isSignal: true }] }], thyAffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyAffix", required: false }] }], thyBounds: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyBounds", required: false }] }], thyOffsetTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyOffsetTop", required: false }] }], thyContainer: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyContainer", required: false }] }], thyDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyDirection", required: false }] }], thyDisabledContainerScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyDisabledContainerScroll", required: false }] }], thyClick: [{ type: i0.Output, args: ["thyClick"] }], thyScroll: [{ type: i0.Output, args: ["thyScroll"] }], wrapper: [{ type: i0.ViewChild, args: ['wrapper', { isSignal: true }] }] } });
264
301
 
265
302
  /**
266
303
  * 锚点链接组件,可供锚点跳转
@@ -316,8 +353,8 @@ class ThyAnchorLink {
316
353
  ngOnDestroy() {
317
354
  this.anchorComponent.unregisterLink(this);
318
355
  }
319
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyAnchorLink, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
320
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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: `
356
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAnchorLink, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
357
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", 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: `
321
358
  <a #linkTitle (click)="goToClick($event)" href="{{ thyHref() }}" class="thy-anchor-link-title" title="{{ title() }}">
322
359
  @if (title()) {
323
360
  <span>{{ title() }}</span>
@@ -328,7 +365,7 @@ class ThyAnchorLink {
328
365
  <ng-content></ng-content>
329
366
  `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
330
367
  }
331
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyAnchorLink, decorators: [{
368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAnchorLink, decorators: [{
332
369
  type: Component,
333
370
  args: [{
334
371
  selector: 'thy-link,thy-anchor-link',
@@ -351,11 +388,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
351
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 }] }] } });
352
389
 
353
390
  class ThyAnchorModule {
354
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyAnchorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
355
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor, ThyAnchorLink], exports: [ThyAnchor, ThyAnchorLink] }); }
356
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor] }); }
391
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAnchorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
392
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor, ThyAnchorLink], exports: [ThyAnchor, ThyAnchorLink] }); }
393
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor] }); }
357
394
  }
358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyAnchorModule, decorators: [{
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyAnchorModule, decorators: [{
359
396
  type: NgModule,
360
397
  args: [{
361
398
  exports: [ThyAnchor, ThyAnchorLink],
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-anchor.mjs","sources":["../../../src/anchor/anchor.token.ts","../../../src/anchor/anchor.component.ts","../../../src/anchor/anchor-link.component.ts","../../../src/anchor/anchor.module.ts","../../../src/anchor/ngx-tethys-anchor.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport interface IThyAnchorLinkComponent {}\n\nexport interface IThyAnchorComponent {\n registerLink(link: IThyAnchorLinkComponent): void;\n unregisterLink(link: IThyAnchorLinkComponent): void;\n handleScrollTo(linkComponent: IThyAnchorLinkComponent): void;\n}\n\nexport const THY_ANCHOR_COMPONENT = new InjectionToken<IThyAnchorComponent>('THY_ANCHOR_COMPONENT');\n","import { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n NgZone,\n OnDestroy,\n Renderer2,\n ViewEncapsulation,\n numberAttribute,\n inject,\n input,\n viewChild,\n output,\n effect,\n computed,\n Signal,\n DOCUMENT\n} from '@angular/core';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil, throttleTime } from 'rxjs/operators';\n\nimport { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport { ThyAffix } from 'ngx-tethys/affix';\nimport { ThyScrollService } from 'ngx-tethys/core';\nimport { coerceBooleanProperty, getOffset } from 'ngx-tethys/util';\nimport { ThyAnchorLink } from './anchor-link.component';\nimport { IThyAnchorComponent, THY_ANCHOR_COMPONENT } from './anchor.token';\n\ninterface Section {\n linkComponent: ThyAnchorLink;\n top: number;\n}\n\nconst sharpMatcherRegx = /#([^#]+)$/;\n\n/**\n * 锚点组件\n * @name thy-anchor\n */\n@Component({\n selector: 'thy-anchor',\n exportAs: 'thyAnchor',\n preserveWhitespaces: false,\n template: `\n @if (thyAffix()) {\n <thy-affix [thyOffsetTop]=\"thyOffsetTop()\" [thyContainer]=\"container()\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </thy-affix>\n } @else {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n }\n <ng-template #content>\n <div\n class=\"thy-anchor-wrapper\"\n [ngClass]=\"{ 'thy-anchor-wrapper-horizontal': thyDirection() === 'horizontal' }\"\n [ngStyle]=\"wrapperStyle()\">\n <div class=\"thy-anchor\">\n <div class=\"thy-anchor-ink\">\n <div class=\"thy-anchor-ink-full\" #ink></div>\n </div>\n <ng-content></ng-content>\n </div>\n </div>\n </ng-template>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ThyAffix, NgTemplateOutlet, NgStyle, NgClass],\n providers: [\n {\n provide: THY_ANCHOR_COMPONENT,\n useExisting: ThyAnchor\n }\n ]\n})\nexport class ThyAnchor implements IThyAnchorComponent, OnDestroy, AfterViewInit {\n private document = inject(DOCUMENT);\n private cdr = inject(ChangeDetectorRef);\n private platform = inject(Platform);\n private zone = inject(NgZone);\n private renderer = inject(Renderer2);\n private scrollService = inject(ThyScrollService);\n\n readonly ink = viewChild.required<ElementRef>('ink');\n\n /**\n * 固定模式\n */\n readonly thyAffix = input(true, { transform: coerceBooleanProperty });\n\n /**\n * 锚点区域边界,单位:px\n */\n readonly thyBounds = input(5, { transform: numberAttribute });\n\n /**\n * 缓冲的偏移量阈值\n */\n readonly thyOffsetTop = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 指定滚动的容器\n */\n readonly thyContainer = input<string | HTMLElement>(undefined);\n\n /**\n * 设置导航方向\n */\n readonly thyDirection = input<'vertical' | 'horizontal'>('vertical');\n\n /**\n * 点击项触发\n */\n readonly thyClick = output<ThyAnchorLink>();\n\n /**\n * 滚动到某锚点时触发\n */\n readonly thyScroll = output<ThyAnchorLink>();\n\n visible = false;\n\n readonly wrapperStyle = computed(() => {\n return {\n 'max-height': this.thyOffsetTop() ? `calc(100vh - ${this.thyOffsetTop()}px)` : '100vh'\n };\n });\n\n readonly container: Signal<HTMLElement | Window> = computed(() => {\n return (\n (typeof this.thyContainer() === 'string'\n ? (this.document.querySelector(this.thyContainer() as string) as HTMLElement)\n : (this.thyContainer() as HTMLElement)) || window\n );\n });\n\n private links: ThyAnchorLink[] = [];\n\n private animating = false;\n\n private destroy$ = new Subject<void>();\n\n private handleScrollTimeoutID: any = -1;\n\n registerLink(link: ThyAnchorLink): void {\n this.links.push(link);\n }\n\n unregisterLink(link: ThyAnchorLink): void {\n this.links.splice(this.links.indexOf(link), 1);\n }\n\n constructor() {\n effect(() => {\n if (this.thyContainer()) {\n this.registerScrollEvent();\n }\n });\n }\n\n ngAfterViewInit(): void {\n this.warningPrompt();\n this.registerScrollEvent();\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.handleScrollTimeoutID);\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private warningPrompt() {\n if (this.thyDirection() === 'horizontal') {\n const hasChildren = this.links.some(link =>\n Array.from(link?.elementRef?.nativeElement?.childNodes)?.some((item: HTMLElement) => item?.nodeName === 'THY-ANCHOR-LINK')\n );\n if (hasChildren) {\n console.warn(\"Anchor link nesting is not supported when 'Anchor' direction is horizontal.\");\n }\n }\n }\n\n private registerScrollEvent(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.destroy$.next();\n this.zone.runOutsideAngular(() => {\n fromEvent(this.container(), 'scroll', { passive: true })\n .pipe(throttleTime(50), takeUntil(this.destroy$))\n .subscribe(() => this.handleScroll());\n });\n // Browser would maintain the scrolling position when refreshing.\n // So we have to delay calculation in avoid of getting a incorrect result.\n this.handleScrollTimeoutID = setTimeout(() => this.handleScroll());\n }\n\n handleScroll(): void {\n if (typeof document === 'undefined' || this.animating) {\n return;\n }\n const container: HTMLElement =\n this.container() instanceof HTMLElement ? (this.container() as HTMLElement) : (this.document as unknown as HTMLElement);\n\n const sections: Section[] = [];\n const scope = (this.thyOffsetTop() || 0) + this.thyBounds();\n this.links.forEach(linkComponent => {\n const sharpLinkMatch = sharpMatcherRegx.exec(linkComponent.thyHref().toString());\n if (!sharpLinkMatch) {\n return;\n }\n const target = container.querySelector(`#${sharpLinkMatch[1]}`) as HTMLElement;\n if (target) {\n const top = getOffset(target, this.container()).top;\n if (top < scope) {\n sections.push({\n top,\n linkComponent\n });\n }\n }\n });\n\n this.visible = !!sections.length;\n if (!this.visible) {\n this.clearActive();\n this.cdr.detectChanges();\n } else {\n const maxSection = sections.reduce((prev, curr) => (curr.top > prev.top ? curr : prev));\n this.handleActive(maxSection.linkComponent);\n }\n this.setVisible();\n }\n\n private clearActive(): void {\n this.links.forEach(i => {\n i.unsetActive();\n });\n }\n\n private handleActive(linkComponent: ThyAnchorLink): void {\n this.clearActive();\n linkComponent.setActive();\n const linkNode = linkComponent.getLinkTitleElement();\n const horizontalAnchor = this.thyDirection() === 'horizontal';\n\n const ink = this.ink();\n ink.nativeElement.style.top = horizontalAnchor ? '' : `${linkNode.offsetTop}px`;\n ink.nativeElement.style.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;\n ink.nativeElement.style.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';\n ink.nativeElement.style.width = horizontalAnchor ? `${linkNode.clientWidth}px` : '';\n this.visible = true;\n this.setVisible();\n this.thyScroll.emit(linkComponent);\n }\n\n private setVisible(): void {\n const visible = this.visible;\n const visibleClassname = 'visible';\n const ink = this.ink();\n if (ink) {\n if (visible) {\n this.renderer.addClass(ink.nativeElement, visibleClassname);\n } else {\n this.renderer.removeClass(ink.nativeElement, visibleClassname);\n }\n }\n }\n\n handleScrollTo(linkComponent: ThyAnchorLink): void {\n const container: HTMLElement =\n this.container() instanceof HTMLElement ? (this.container() as HTMLElement) : (this.document as unknown as HTMLElement);\n const linkElement: HTMLElement = container.querySelector(linkComponent.thyHref());\n if (!linkElement) {\n return;\n }\n\n this.animating = true;\n const containerScrollTop = this.scrollService.getScroll(this.container());\n const elementOffsetTop = getOffset(linkElement, this.container()).top;\n const targetScrollTop = containerScrollTop + elementOffsetTop - (this.thyOffsetTop() || 0);\n this.scrollService.scrollTo(this.container(), targetScrollTop, undefined, () => {\n this.animating = false;\n });\n this.handleActive(linkComponent);\n this.thyClick.emit(linkComponent);\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewEncapsulation,\n inject,\n input,\n contentChild,\n viewChild,\n Signal,\n computed\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\n\nimport { IThyAnchorLinkComponent, THY_ANCHOR_COMPONENT } from './anchor.token';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * 锚点链接组件,可供锚点跳转\n * @name thy-anchor-link,thyAnchorLink\n */\n@Component({\n selector: 'thy-link,thy-anchor-link',\n exportAs: 'thyLink,thyAnchorLink',\n preserveWhitespaces: false,\n template: `\n <a #linkTitle (click)=\"goToClick($event)\" href=\"{{ thyHref() }}\" class=\"thy-anchor-link-title\" title=\"{{ title() }}\">\n @if (title()) {\n <span>{{ title() }}</span>\n } @else {\n <ng-template [ngTemplateOutlet]=\"titleTemplate() || thyTemplate()\"></ng-template>\n }\n </a>\n <ng-content></ng-content>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet]\n})\nexport class ThyAnchorLink implements IThyAnchorLinkComponent, OnInit, OnDestroy {\n elementRef = inject(ElementRef);\n private anchorComponent = inject(THY_ANCHOR_COMPONENT, { optional: true })!;\n private platform = inject(Platform);\n\n readonly title: Signal<string | null> = computed(() => {\n return this.thyTitle() instanceof TemplateRef ? null : (this.thyTitle() as string);\n });\n\n readonly titleTemplate: Signal<TemplateRef<any>> = computed(() => {\n return this.thyTitle() instanceof TemplateRef ? (this.thyTitle() as TemplateRef<any>) : null;\n });\n\n private hostRenderer = useHostRenderer();\n\n /**\n * 锚点链接\n */\n readonly thyHref = input('#');\n\n /**\n * 文字内容\n */\n readonly thyTitle = input<string | TemplateRef<void>>('');\n\n readonly thyTemplate = contentChild.required<TemplateRef<void>>('thyTemplate');\n\n readonly linkTitle = viewChild.required<ElementRef<HTMLAnchorElement>>('linkTitle');\n\n constructor() {\n const elementRef = this.elementRef;\n\n this.hostRenderer.addClass('thy-anchor-link');\n if (elementRef.nativeElement.tagName.toLowerCase() === 'thy-link') {\n console.warn(`'thy-link' and 'thyLink' are deprecated, please use 'thy-anchor-link' and 'thyAnchorLink' instead.`);\n }\n }\n\n ngOnInit(): void {\n this.anchorComponent.registerLink(this);\n }\n\n getLinkTitleElement(): HTMLAnchorElement {\n return this.linkTitle().nativeElement;\n }\n\n setActive(): void {\n this.hostRenderer.addClass('thy-anchor-link-active');\n }\n\n unsetActive(): void {\n this.hostRenderer.removeClass('thy-anchor-link-active');\n }\n\n goToClick(e: Event): void {\n e.preventDefault();\n e.stopPropagation();\n if (this.platform.isBrowser) {\n this.anchorComponent.handleScrollTo(this);\n }\n }\n\n ngOnDestroy(): void {\n this.anchorComponent.unregisterLink(this);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { ThyAnchor } from './anchor.component';\nimport { ThyAnchorLink } from './anchor-link.component';\nimport { ThyAffixModule } from 'ngx-tethys/affix';\n\n@NgModule({\n exports: [ThyAnchor, ThyAnchorLink],\n imports: [CommonModule, Platform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AA,EAAA,eAAe,EAAA,OAAA,EAAA,CAFd,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CADtE,SAAS,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;AAGzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFd,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,CAAA,EAAA,CAAA,CAAA;;4FAExD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;oBACnC,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa;AACnF,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-anchor.mjs","sources":["../../../src/anchor/anchor.token.ts","../../../src/anchor/anchor.component.ts","../../../src/anchor/anchor-link.component.ts","../../../src/anchor/anchor.module.ts","../../../src/anchor/ngx-tethys-anchor.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport interface IThyAnchorLinkComponent {}\n\nexport interface IThyAnchorComponent {\n registerLink(link: IThyAnchorLinkComponent): void;\n unregisterLink(link: IThyAnchorLinkComponent): void;\n handleScrollTo(linkComponent: IThyAnchorLinkComponent): void;\n}\n\nexport const THY_ANCHOR_COMPONENT = new InjectionToken<IThyAnchorComponent>('THY_ANCHOR_COMPONENT');\n","import { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n NgZone,\n OnDestroy,\n Renderer2,\n ViewEncapsulation,\n numberAttribute,\n inject,\n input,\n viewChild,\n output,\n effect,\n computed,\n Signal,\n DOCUMENT\n} from '@angular/core';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil, throttleTime } from 'rxjs/operators';\n\nimport { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport { ThyAffix } from 'ngx-tethys/affix';\nimport { ThyScrollService } from 'ngx-tethys/core';\nimport { coerceBooleanProperty, getOffset } from 'ngx-tethys/util';\nimport { ThyAnchorLink } from './anchor-link.component';\nimport { IThyAnchorComponent, THY_ANCHOR_COMPONENT } from './anchor.token';\n\ninterface Section {\n linkComponent: ThyAnchorLink;\n top: number;\n}\n\nconst sharpMatcherRegx = /#([^#]+)$/;\n\n/**\n * 锚点组件\n * @name thy-anchor\n */\n@Component({\n selector: 'thy-anchor',\n exportAs: 'thyAnchor',\n preserveWhitespaces: false,\n template: `\n @if (thyAffix()) {\n <thy-affix [thyOffsetTop]=\"thyOffsetTop()\" [thyContainer]=\"container()\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </thy-affix>\n } @else {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n }\n <ng-template #content>\n <div\n #wrapper\n class=\"thy-anchor-wrapper\"\n [ngClass]=\"{ 'thy-anchor-wrapper-horizontal': thyDirection() === 'horizontal' }\"\n [ngStyle]=\"wrapperStyle()\">\n <div class=\"thy-anchor\">\n <div class=\"thy-anchor-ink\">\n <div class=\"thy-anchor-ink-full\" #ink></div>\n </div>\n <ng-content></ng-content>\n </div>\n </div>\n </ng-template>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ThyAffix, NgTemplateOutlet, NgStyle, NgClass],\n providers: [\n {\n provide: THY_ANCHOR_COMPONENT,\n useExisting: ThyAnchor\n }\n ]\n})\nexport class ThyAnchor implements IThyAnchorComponent, OnDestroy, AfterViewInit {\n private document = inject(DOCUMENT);\n private cdr = inject(ChangeDetectorRef);\n private platform = inject(Platform);\n private zone = inject(NgZone);\n private renderer = inject(Renderer2);\n private scrollService = inject(ThyScrollService);\n\n readonly ink = viewChild.required<ElementRef>('ink');\n\n /**\n * 固定模式\n */\n readonly thyAffix = input(true, { transform: coerceBooleanProperty });\n\n /**\n * 锚点区域边界,单位:px\n */\n readonly thyBounds = input(5, { transform: numberAttribute });\n\n /**\n * 缓冲的偏移量阈值\n */\n readonly thyOffsetTop = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 指定滚动的容器\n */\n readonly thyContainer = input<string | HTMLElement>();\n\n /**\n * 设置导航方向\n */\n readonly thyDirection = input<'vertical' | 'horizontal'>('vertical');\n\n /**\n * 是否禁用容器滚动\n */\n readonly thyDisabledContainerScroll = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 点击项触发\n */\n readonly thyClick = output<ThyAnchorLink>();\n\n /**\n * 滚动到某锚点时触发\n */\n readonly thyScroll = output<ThyAnchorLink>();\n\n visible = false;\n\n readonly wrapperStyle = computed(() => {\n return {\n 'max-height': this.thyOffsetTop() ? `calc(100vh - ${this.thyOffsetTop()}px)` : '100vh'\n };\n });\n\n readonly container: Signal<HTMLElement | Window> = computed(() => {\n return (\n (typeof this.thyContainer() === 'string'\n ? (this.document.querySelector(this.thyContainer() as string) as HTMLElement)\n : (this.thyContainer() as HTMLElement)) || window\n );\n });\n\n public links: ThyAnchorLink[] = [];\n\n private animating = false;\n\n private destroy$ = new Subject<void>();\n\n private handleScrollTimeoutID: any = -1;\n\n private wrapper = viewChild.required<ElementRef<HTMLDivElement>>('wrapper');\n\n registerLink(link: ThyAnchorLink): void {\n this.links.push(link);\n }\n\n unregisterLink(link: ThyAnchorLink): void {\n this.links.splice(this.links.indexOf(link), 1);\n }\n\n constructor() {\n effect(() => {\n if (this.thyContainer()) {\n this.registerScrollEvent();\n }\n });\n }\n\n ngAfterViewInit(): void {\n this.warningPrompt();\n this.registerScrollEvent();\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.handleScrollTimeoutID);\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private warningPrompt() {\n if (this.thyDirection() === 'horizontal') {\n const hasChildren = this.links.some(link =>\n Array.from(link?.elementRef?.nativeElement?.childNodes as HTMLElement[])?.some(\n (item: HTMLElement) => item?.nodeName === 'THY-ANCHOR-LINK'\n )\n );\n if (hasChildren) {\n console.warn(\"Anchor link nesting is not supported when 'Anchor' direction is horizontal.\");\n }\n }\n }\n\n private registerScrollEvent(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n if (this.thyDisabledContainerScroll()) {\n return;\n }\n this.destroy$.next();\n this.zone.runOutsideAngular(() => {\n fromEvent(this.container(), 'scroll', { passive: true })\n .pipe(throttleTime(50), takeUntil(this.destroy$))\n .subscribe(() => this.handleScroll());\n });\n // Browser would maintain the scrolling position when refreshing.\n // So we have to delay calculation in avoid of getting a incorrect result.\n this.handleScrollTimeoutID = setTimeout(() => this.handleScroll());\n }\n\n handleScroll(): void {\n if (typeof document === 'undefined' || this.animating) {\n return;\n }\n const container: HTMLElement =\n this.container() instanceof HTMLElement ? (this.container() as HTMLElement) : (this.document as unknown as HTMLElement);\n\n const sections: Section[] = [];\n const scope = (this.thyOffsetTop() || 0) + this.thyBounds();\n this.links.forEach(linkComponent => {\n const sharpLinkMatch = sharpMatcherRegx.exec(linkComponent.thyHref().toString());\n if (!sharpLinkMatch) {\n return;\n }\n const target = container.querySelector(`#${sharpLinkMatch[1]}`) as HTMLElement;\n if (target) {\n const top = getOffset(target, this.container())!.top;\n if (top < scope) {\n sections.push({\n top,\n linkComponent\n });\n }\n }\n });\n\n this.visible = !!sections.length;\n if (!this.visible) {\n this.clearActive();\n this.cdr.detectChanges();\n } else {\n const maxSection = sections.reduce((prev, curr) => (curr.top > prev.top ? curr : prev));\n this.handleActive(maxSection.linkComponent);\n }\n this.setVisible();\n }\n\n private clearActive(): void {\n this.links.forEach(i => {\n i.unsetActive();\n });\n }\n\n public handleActive(linkComponent: ThyAnchorLink): void {\n this.clearActive();\n linkComponent.setActive();\n const linkNode = linkComponent.getLinkTitleElement();\n const horizontalAnchor = this.thyDirection() === 'horizontal';\n\n const ink = this.ink();\n const linkOffset = {\n top: linkNode.offsetTop,\n left: linkNode.offsetLeft,\n height: linkNode.clientHeight,\n width: linkNode.clientWidth\n };\n ink.nativeElement.style.top = horizontalAnchor ? '' : `${linkOffset.top}px`;\n ink.nativeElement.style.height = horizontalAnchor ? '' : `${linkOffset.height}px`;\n ink.nativeElement.style.left = horizontalAnchor ? `${linkOffset.left}px` : '';\n ink.nativeElement.style.width = horizontalAnchor ? `${linkOffset.width}px` : '';\n this.visible = true;\n this.setVisible();\n this.linkVisible(linkOffset, horizontalAnchor);\n this.thyScroll.emit(linkComponent);\n }\n\n private linkVisible(linkOffset: { top: number; left: number; height: number; width: number }, horizontalAnchor: boolean): void {\n const wrapper = this.wrapper()?.nativeElement;\n if (!wrapper) {\n return;\n }\n const scrollTo = horizontalAnchor ? linkOffset.left : linkOffset.top;\n const scrollPos = horizontalAnchor ? wrapper.scrollLeft : wrapper.scrollTop;\n const wrapperSize = horizontalAnchor ? wrapper.offsetWidth : wrapper.offsetHeight;\n const linkSize = horizontalAnchor ? linkOffset.width : linkOffset.height;\n if (scrollTo < scrollPos || scrollTo + linkSize > scrollPos + wrapperSize) {\n if (horizontalAnchor) {\n wrapper.scrollLeft = scrollTo;\n } else {\n wrapper.scrollTop = scrollTo;\n }\n }\n }\n\n private setVisible(): void {\n const visible = this.visible;\n const visibleClassname = 'visible';\n const ink = this.ink();\n if (ink) {\n if (visible) {\n this.renderer.addClass(ink.nativeElement, visibleClassname);\n } else {\n this.renderer.removeClass(ink.nativeElement, visibleClassname);\n }\n }\n }\n\n handleScrollTo(linkComponent: ThyAnchorLink): void {\n if (!this.thyDisabledContainerScroll()) {\n const container: HTMLElement =\n this.container() instanceof HTMLElement ? (this.container() as HTMLElement) : (this.document as unknown as HTMLElement);\n const linkElement: HTMLElement | null = container.querySelector(linkComponent.thyHref());\n if (!linkElement) {\n return;\n }\n\n this.animating = true;\n const containerScrollTop = this.scrollService.getScroll(this.container());\n const elementOffsetTop = getOffset(linkElement, this.container())!.top;\n const targetScrollTop = containerScrollTop + elementOffsetTop - (this.thyOffsetTop() || 0);\n this.scrollService.scrollTo(this.container(), targetScrollTop, undefined, () => {\n this.animating = false;\n });\n }\n this.handleActive(linkComponent);\n this.thyClick.emit(linkComponent);\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewEncapsulation,\n inject,\n input,\n contentChild,\n viewChild,\n Signal,\n computed\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\n\nimport { IThyAnchorLinkComponent, THY_ANCHOR_COMPONENT } from './anchor.token';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * 锚点链接组件,可供锚点跳转\n * @name thy-anchor-link,thyAnchorLink\n */\n@Component({\n selector: 'thy-link,thy-anchor-link',\n exportAs: 'thyLink,thyAnchorLink',\n preserveWhitespaces: false,\n template: `\n <a #linkTitle (click)=\"goToClick($event)\" href=\"{{ thyHref() }}\" class=\"thy-anchor-link-title\" title=\"{{ title() }}\">\n @if (title()) {\n <span>{{ title() }}</span>\n } @else {\n <ng-template [ngTemplateOutlet]=\"titleTemplate() || thyTemplate()\"></ng-template>\n }\n </a>\n <ng-content></ng-content>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet]\n})\nexport class ThyAnchorLink implements IThyAnchorLinkComponent, OnInit, OnDestroy {\n elementRef = inject(ElementRef);\n private anchorComponent = inject(THY_ANCHOR_COMPONENT, { optional: true })!;\n private platform = inject(Platform);\n\n readonly title: Signal<string | null> = computed(() => {\n return this.thyTitle() instanceof TemplateRef ? null : (this.thyTitle() as string);\n });\n\n readonly titleTemplate: Signal<TemplateRef<any> | null> = computed(() => {\n return this.thyTitle() instanceof TemplateRef ? (this.thyTitle() as TemplateRef<any>) : null;\n });\n\n private hostRenderer = useHostRenderer();\n\n /**\n * 锚点链接\n */\n readonly thyHref = input('#');\n\n /**\n * 文字内容\n */\n readonly thyTitle = input<string | TemplateRef<void>>('');\n\n readonly thyTemplate = contentChild.required<TemplateRef<void>>('thyTemplate');\n\n readonly linkTitle = viewChild.required<ElementRef<HTMLAnchorElement>>('linkTitle');\n\n constructor() {\n const elementRef = this.elementRef;\n\n this.hostRenderer.addClass('thy-anchor-link');\n if (elementRef.nativeElement.tagName.toLowerCase() === 'thy-link') {\n console.warn(`'thy-link' and 'thyLink' are deprecated, please use 'thy-anchor-link' and 'thyAnchorLink' instead.`);\n }\n }\n\n ngOnInit(): void {\n this.anchorComponent.registerLink(this);\n }\n\n getLinkTitleElement(): HTMLAnchorElement {\n return this.linkTitle().nativeElement;\n }\n\n setActive(): void {\n this.hostRenderer.addClass('thy-anchor-link-active');\n }\n\n unsetActive(): void {\n this.hostRenderer.removeClass('thy-anchor-link-active');\n }\n\n goToClick(e: Event): void {\n e.preventDefault();\n e.stopPropagation();\n if (this.platform.isBrowser) {\n this.anchorComponent.handleScrollTo(this);\n }\n }\n\n ngOnDestroy(): void {\n this.anchorComponent.unregisterLink(this);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { ThyAnchor } from './anchor.component';\nimport { ThyAnchorLink } from './anchor-link.component';\nimport { ThyAffixModule } from 'ngx-tethys/affix';\n\n@NgModule({\n exports: [ThyAnchor, ThyAnchorLink],\n imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor, ThyAnchorLink]\n})\nexport class ThyAnchorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAUO,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAsB,sBAAsB,CAAC;;AC0BnG,MAAM,gBAAgB,GAAG,WAAW;AAEpC;;;AAGG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.thyNext.emit({ index: this.index(), event });
95
95
  }
96
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyArrowSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
97
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ThyArrowSwitcher, isStandalone: true, selector: "thy-arrow-switcher", inputs: { thyPreviousTooltip: { classPropertyName: "thyPreviousTooltip", publicName: "thyPreviousTooltip", isSignal: true, isRequired: false, transformFunction: null }, thyNextTooltip: { classPropertyName: "thyNextTooltip", publicName: "thyNextTooltip", isSignal: true, isRequired: false, transformFunction: null }, thyTheme: { classPropertyName: "thyTheme", publicName: "thyTheme", isSignal: true, isRequired: false, transformFunction: null }, thyTotal: { classPropertyName: "thyTotal", publicName: "thyTotal", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyPrevious: "thyPrevious", thyNext: "thyNext" }, host: { properties: { "class.thy-arrow-switcher-small": "isSmallSize()" }, classAttribute: "thy-arrow-switcher" }, providers: [
96
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyArrowSwitcher, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
97
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ThyArrowSwitcher, isStandalone: true, selector: "thy-arrow-switcher", inputs: { thyPreviousTooltip: { classPropertyName: "thyPreviousTooltip", publicName: "thyPreviousTooltip", isSignal: true, isRequired: false, transformFunction: null }, thyNextTooltip: { classPropertyName: "thyNextTooltip", publicName: "thyNextTooltip", isSignal: true, isRequired: false, transformFunction: null }, thyTheme: { classPropertyName: "thyTheme", publicName: "thyTheme", isSignal: true, isRequired: false, transformFunction: null }, thyTotal: { classPropertyName: "thyTotal", publicName: "thyTotal", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyPrevious: "thyPrevious", thyNext: "thyNext" }, host: { properties: { "class.thy-arrow-switcher-small": "isSmallSize()" }, classAttribute: "thy-arrow-switcher" }, providers: [
98
98
  {
99
99
  provide: NG_VALUE_ACCESSOR,
100
100
  useExisting: forwardRef(() => ThyArrowSwitcher),
@@ -102,7 +102,7 @@ class ThyArrowSwitcher {
102
102
  }
103
103
  ], ngImport: i0, template: "@if (thyTheme() === 'lite') {\n <div class=\"switcher-wrapper\">\n <a\n thyAction\n [thyTooltip]=\"previousTooltip()\"\n href=\"javascript:;\"\n [thyDisabled]=\"previousDisabled()\"\n class=\"mr-2\"\n (click)=\"onPreviousClick($event)\"\n ><thy-icon thyIconName=\"angle-up\"></thy-icon\n ></a>\n <a thyAction [thyTooltip]=\"nextTooltip()\" href=\"javascript:;\" [thyDisabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"\n ><thy-icon thyIconName=\"angle-down\"></thy-icon\n ></a>\n </div>\n} @else {\n <div class=\"switcher-wrapper\">\n <button\n thyButtonIcon=\"angle-left\"\n [thyTooltip]=\"previousTooltip()\"\n [disabled]=\"previousDisabled()\"\n (click)=\"onPreviousClick($event)\"></button>\n <span>{{ index() + 1 }} / {{ thyTotal() }}</span>\n <button thyButtonIcon=\"angle-right\" [thyTooltip]=\"nextTooltip()\" [disabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"></button>\n </div>\n}\n", dependencies: [{ kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyButtonIcon, selector: "thy-button-icon,[thy-button-icon],[thyButtonIcon]", inputs: ["thySize", "thyIcon", "thyButtonIcon", "thyShape", "thyLight", "thyActive", "thyTheme", "thyColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
104
104
  }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyArrowSwitcher, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyArrowSwitcher, decorators: [{
106
106
  type: Component,
107
107
  args: [{ selector: 'thy-arrow-switcher', host: {
108
108
  class: 'thy-arrow-switcher',
@@ -117,11 +117,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
117
117
  }], propDecorators: { thyPrevious: [{ type: i0.Output, args: ["thyPrevious"] }], thyNext: [{ type: i0.Output, args: ["thyNext"] }], thyPreviousTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyPreviousTooltip", required: false }] }], thyNextTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyNextTooltip", required: false }] }], thyTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTheme", required: false }] }], thyTotal: [{ type: i0.Input, args: [{ isSignal: true, alias: "thyTotal", required: false }] }], thySize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thySize", required: false }] }] } });
118
118
 
119
119
  class ThyArrowSwitcherModule {
120
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyArrowSwitcherModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
121
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: ThyArrowSwitcherModule, imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyActionModule, ThyTooltipModule, ThyArrowSwitcher], exports: [ThyArrowSwitcher] }); }
122
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyArrowSwitcherModule, imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyActionModule, ThyTooltipModule, ThyArrowSwitcher] }); }
120
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyArrowSwitcherModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
121
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: ThyArrowSwitcherModule, imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyActionModule, ThyTooltipModule, ThyArrowSwitcher], exports: [ThyArrowSwitcher] }); }
122
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyArrowSwitcherModule, imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyActionModule, ThyTooltipModule, ThyArrowSwitcher] }); }
123
123
  }
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ThyArrowSwitcherModule, decorators: [{
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ThyArrowSwitcherModule, decorators: [{
125
125
  type: NgModule,
126
126
  args: [{
127
127
  imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyActionModule, ThyTooltipModule, ThyArrowSwitcher],
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-arrow-switcher.mjs","sources":["../../../src/arrow-switcher/arrow-switcher.component.ts","../../../src/arrow-switcher/arrow-switcher.component.html","../../../src/arrow-switcher/module.ts","../../../src/arrow-switcher/ngx-tethys-arrow-switcher.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n forwardRef,\n numberAttribute,\n inject,\n input,\n output,\n computed,\n Signal,\n WritableSignal,\n signal,\n linkedSignal\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThyButtonIcon } from 'ngx-tethys/button';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyTooltipDirective } from 'ngx-tethys/tooltip';\nimport { ThyAction } from 'ngx-tethys/action';\n\nexport type ThyArrowSwitcherTheme = 'default' | 'lite';\nexport interface ThyArrowSwitcherEvent {\n index: number;\n event: Event;\n}\n\n/**\n * 上下条切换组件\n * @name thy-arrow-switcher\n * @order 10\n */\n@Component({\n selector: 'thy-arrow-switcher',\n templateUrl: './arrow-switcher.component.html',\n host: {\n class: 'thy-arrow-switcher',\n '[class.thy-arrow-switcher-small]': 'isSmallSize()'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyArrowSwitcher),\n multi: true\n }\n ],\n imports: [ThyAction, ThyTooltipDirective, ThyIcon, ThyButtonIcon]\n})\nexport class ThyArrowSwitcher implements ControlValueAccessor {\n private cd = inject(ChangeDetectorRef);\n\n private disabled: WritableSignal<boolean> = signal(false);\n\n /**\n * 点击上一条事件\n */\n readonly thyPrevious = output<ThyArrowSwitcherEvent>();\n\n /**\n * 点击下一条事件\n */\n readonly thyNext = output<ThyArrowSwitcherEvent>();\n\n /**\n * 设置上一条 Hover Tooltip 提示\n */\n readonly thyPreviousTooltip = input<string>();\n\n /**\n * 设置下一条 Hover Tooltip 提示\n */\n readonly thyNextTooltip = input<string>();\n\n /**\n * 展示主题\n * @type default | lite\n */\n readonly thyTheme = input<ThyArrowSwitcherTheme>('default');\n\n /**\n * 总条数\n */\n readonly thyTotal = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 尺寸大小,默认尺寸为大号,取值为`sm`时展示小号\n */\n readonly thySize = input<string>();\n\n readonly isSmallSize: Signal<boolean> = computed(() => {\n return this.thySize() === 'sm';\n });\n\n protected readonly index: WritableSignal<number> = signal(0);\n\n readonly previousDisabled = computed(() => {\n return this.index() <= 0 || this.disabled();\n });\n\n readonly nextDisabled = computed(() => {\n return this.index() >= this.thyTotal() - 1 || this.disabled();\n });\n\n private onModelChange: (value: number) => void;\n\n private onModelTouched: () => void;\n\n protected readonly previousTooltip = linkedSignal(() => {\n return this.thyPreviousTooltip();\n });\n\n protected readonly nextTooltip = linkedSignal(() => {\n return this.thyNextTooltip();\n });\n\n public setPreviousTooltip(value: string) {\n this.previousTooltip.set(value);\n }\n\n public setNextTooltip(value: string) {\n this.nextTooltip.set(value);\n }\n\n writeValue(value: number): void {\n if (value >= 0) {\n this.index.set(value);\n }\n this.cd.markForCheck();\n }\n\n registerOnChange(fn: () => void) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onModelTouched = fn;\n }\n\n setDisabledState(isDisable: boolean) {\n this.disabled.set(isDisable);\n }\n\n onPreviousClick(event: Event) {\n this.index.set(this.index() - 1);\n this.onModelChange(this.index());\n\n this.thyPrevious.emit({ index: this.index(), event });\n }\n\n onNextClick(event: Event) {\n this.index.set(this.index() + 1);\n this.onModelChange(this.index());\n\n this.thyNext.emit({ index: this.index(), event });\n }\n}\n","@if (thyTheme() === 'lite') {\n <div class=\"switcher-wrapper\">\n <a\n thyAction\n [thyTooltip]=\"previousTooltip()\"\n href=\"javascript:;\"\n [thyDisabled]=\"previousDisabled()\"\n class=\"mr-2\"\n (click)=\"onPreviousClick($event)\"\n ><thy-icon thyIconName=\"angle-up\"></thy-icon\n ></a>\n <a thyAction [thyTooltip]=\"nextTooltip()\" href=\"javascript:;\" [thyDisabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"\n ><thy-icon thyIconName=\"angle-down\"></thy-icon\n ></a>\n </div>\n} @else {\n <div class=\"switcher-wrapper\">\n <button\n thyButtonIcon=\"angle-left\"\n [thyTooltip]=\"previousTooltip()\"\n [disabled]=\"previousDisabled()\"\n (click)=\"onPreviousClick($event)\"></button>\n <span>{{ index() + 1 }} / {{ thyTotal() }}</span>\n <button thyButtonIcon=\"angle-right\" [thyTooltip]=\"nextTooltip()\" [disabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"></button>\n </div>\n}\n","import { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyButtonModule } from 'ngx-tethys/button';\nimport { ThyArrowSwitcher } from './arrow-switcher.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyActionModule } from 'ngx-tethys/action';\n\n@NgModule({\n imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyActionModule, ThyTooltipModule, ThyArrowSwitcher],\n exports: [ThyArrowSwitcher]\n})\nexport class ThyArrowSwitcherModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA2BA;;;;AAIG;MAkBU,gBAAgB,CAAA;AAjB7B,IAAA,WAAA,GAAA;AAkBY,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAE9B,QAAA,IAAA,CAAA,QAAQ,GAA4B,MAAM,CAAC,KAAK,oDAAC;AAEzD;;AAEG;QACM,IAAA,CAAA,WAAW,GAAG,MAAM,EAAyB;AAEtD;;AAEG;QACM,IAAA,CAAA,OAAO,GAAG,MAAM,EAAyB;AAElD;;AAEG;QACM,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,oBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAE7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BAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-arrow-switcher.mjs","sources":["../../../src/arrow-switcher/arrow-switcher.component.ts","../../../src/arrow-switcher/arrow-switcher.component.html","../../../src/arrow-switcher/module.ts","../../../src/arrow-switcher/ngx-tethys-arrow-switcher.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n forwardRef,\n numberAttribute,\n inject,\n input,\n output,\n computed,\n Signal,\n WritableSignal,\n signal,\n linkedSignal\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThyButtonIcon } from 'ngx-tethys/button';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyTooltipDirective } from 'ngx-tethys/tooltip';\nimport { ThyAction } from 'ngx-tethys/action';\n\nexport type ThyArrowSwitcherTheme = 'default' | 'lite';\nexport interface ThyArrowSwitcherEvent {\n index: number;\n event: Event;\n}\n\n/**\n * 上下条切换组件\n * @name thy-arrow-switcher\n * @order 10\n */\n@Component({\n selector: 'thy-arrow-switcher',\n templateUrl: './arrow-switcher.component.html',\n host: {\n class: 'thy-arrow-switcher',\n '[class.thy-arrow-switcher-small]': 'isSmallSize()'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyArrowSwitcher),\n multi: true\n }\n ],\n imports: [ThyAction, ThyTooltipDirective, ThyIcon, ThyButtonIcon]\n})\nexport class ThyArrowSwitcher implements ControlValueAccessor {\n private cd = inject(ChangeDetectorRef);\n\n private disabled: WritableSignal<boolean> = signal(false);\n\n /**\n * 点击上一条事件\n */\n readonly thyPrevious = output<ThyArrowSwitcherEvent>();\n\n /**\n * 点击下一条事件\n */\n readonly thyNext = output<ThyArrowSwitcherEvent>();\n\n /**\n * 设置上一条 Hover Tooltip 提示\n */\n readonly thyPreviousTooltip = input<string>();\n\n /**\n * 设置下一条 Hover Tooltip 提示\n */\n readonly thyNextTooltip = input<string>();\n\n /**\n * 展示主题\n * @type default | lite\n */\n readonly thyTheme = input<ThyArrowSwitcherTheme>('default');\n\n /**\n * 总条数\n */\n readonly thyTotal = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 尺寸大小,默认尺寸为大号,取值为`sm`时展示小号\n */\n readonly thySize = input<string>();\n\n readonly isSmallSize: Signal<boolean> = computed(() => {\n return this.thySize() === 'sm';\n });\n\n protected readonly index: WritableSignal<number> = signal(0);\n\n readonly previousDisabled = computed(() => {\n return this.index() <= 0 || this.disabled();\n });\n\n readonly nextDisabled = computed(() => {\n return this.index() >= this.thyTotal()! - 1 || this.disabled();\n });\n\n private onModelChange!: (value: number) => void;\n\n private onModelTouched!: () => void;\n\n protected readonly previousTooltip = linkedSignal(() => {\n return this.thyPreviousTooltip();\n });\n\n protected readonly nextTooltip = linkedSignal(() => {\n return this.thyNextTooltip();\n });\n\n public setPreviousTooltip(value: string) {\n this.previousTooltip.set(value);\n }\n\n public setNextTooltip(value: string) {\n this.nextTooltip.set(value);\n }\n\n writeValue(value: number): void {\n if (value >= 0) {\n this.index.set(value);\n }\n this.cd.markForCheck();\n }\n\n registerOnChange(fn: () => void) {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onModelTouched = fn;\n }\n\n setDisabledState(isDisable: boolean) {\n this.disabled.set(isDisable);\n }\n\n onPreviousClick(event: Event) {\n this.index.set(this.index() - 1);\n this.onModelChange(this.index());\n\n this.thyPrevious.emit({ index: this.index(), event });\n }\n\n onNextClick(event: Event) {\n this.index.set(this.index() + 1);\n this.onModelChange(this.index());\n\n this.thyNext.emit({ index: this.index(), event });\n }\n}\n","@if (thyTheme() === 'lite') {\n <div class=\"switcher-wrapper\">\n <a\n thyAction\n [thyTooltip]=\"previousTooltip()\"\n href=\"javascript:;\"\n [thyDisabled]=\"previousDisabled()\"\n class=\"mr-2\"\n (click)=\"onPreviousClick($event)\"\n ><thy-icon thyIconName=\"angle-up\"></thy-icon\n ></a>\n <a thyAction [thyTooltip]=\"nextTooltip()\" href=\"javascript:;\" [thyDisabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"\n ><thy-icon thyIconName=\"angle-down\"></thy-icon\n ></a>\n </div>\n} @else {\n <div class=\"switcher-wrapper\">\n <button\n thyButtonIcon=\"angle-left\"\n [thyTooltip]=\"previousTooltip()\"\n [disabled]=\"previousDisabled()\"\n (click)=\"onPreviousClick($event)\"></button>\n <span>{{ index() + 1 }} / {{ thyTotal() }}</span>\n <button thyButtonIcon=\"angle-right\" [thyTooltip]=\"nextTooltip()\" [disabled]=\"nextDisabled()\" (click)=\"onNextClick($event)\"></button>\n </div>\n}\n","import { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyButtonModule } from 'ngx-tethys/button';\nimport { ThyArrowSwitcher } from './arrow-switcher.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyActionModule } from 'ngx-tethys/action';\n\n@NgModule({\n imports: [CommonModule, ThyButtonModule, ThyIconModule, ThyActionModule, ThyTooltipModule, ThyArrowSwitcher],\n exports: [ThyArrowSwitcher]\n})\nexport class ThyArrowSwitcherModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA2BA;;;;AAIG;MAkBU,gBAAgB,CAAA;AAjB7B,IAAA,WAAA,GAAA;AAkBY,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAE9B,QAAA,IAAA,CAAA,QAAQ,GAA4B,MAAM,CAAC,KAAK,oDAAC;AAEzD;;AAEG;QACM,IAAA,CAAA,WAAW,GAAG,MAAM,EAAyB;AAEtD;;AAEG;QACM,IAAA,CAAA,OAAO,GAAG,MAAM,EAAyB;AAElD;;AAEG;QACM,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAA,IAAA,SAA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