ngx-tethys 19.0.4 → 19.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 (242) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/anchor/anchor-link.component.d.ts +2 -1
  3. package/anchor/anchor.component.d.ts +2 -1
  4. package/anchor/anchor.token.d.ts +9 -0
  5. package/calendar/calendar-header.component.d.ts +3 -2
  6. package/carousel/carousel.component.d.ts +2 -1
  7. package/carousel/carousel.token.d.ts +7 -0
  8. package/carousel/engine/carousel-base.d.ts +3 -3
  9. package/carousel/engine/carousel-fade.d.ts +2 -2
  10. package/carousel/engine/carousel-noop.d.ts +2 -2
  11. package/carousel/engine/carousel-slide.d.ts +2 -2
  12. package/collapse/collapse-item.component.d.ts +2 -1
  13. package/collapse/collapse.component.d.ts +5 -5
  14. package/collapse/collapse.token.d.ts +15 -0
  15. package/color-picker/color-picker.component.d.ts +15 -3
  16. package/core/theme/enum.d.ts +5 -0
  17. package/core/theme/index.d.ts +1 -0
  18. package/core/theme/store.d.ts +1 -1
  19. package/core/theme/theme.d.ts +0 -5
  20. package/date-picker/abstract-picker.component.d.ts +6 -1
  21. package/date-picker/base-picker.component.d.ts +1 -1
  22. package/date-picker/lib/calendar/calendar-footer.component.d.ts +2 -1
  23. package/date-picker/lib/calendar/calendar-table.component.d.ts +4 -3
  24. package/date-picker/lib/popups/date-popup.component.d.ts +2 -1
  25. package/date-picker/lib/popups/inner-popup.component.d.ts +2 -1
  26. package/date-picker/picker.component.d.ts +2 -1
  27. package/date-picker/picker.util.d.ts +5 -5
  28. package/date-picker/standard-types.d.ts +7 -2
  29. package/drag-drop/drag-drop.service.d.ts +2 -2
  30. package/drag-drop/{drop-container.class.d.ts → drag-drop.token.d.ts} +12 -7
  31. package/drag-drop/drag-handle.directive.d.ts +2 -1
  32. package/drag-drop/drag-ref.d.ts +3 -5
  33. package/drag-drop/drag.directive.d.ts +3 -3
  34. package/drag-drop/drop-container.directive.d.ts +1 -1
  35. package/drag-drop/index.d.ts +1 -1
  36. package/fesm2022/ngx-tethys-action.mjs +11 -12
  37. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  38. package/fesm2022/ngx-tethys-affix.mjs +8 -9
  39. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  40. package/fesm2022/ngx-tethys-alert.mjs +11 -12
  41. package/fesm2022/ngx-tethys-alert.mjs.map +1 -1
  42. package/fesm2022/ngx-tethys-anchor.mjs +26 -13
  43. package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
  44. package/fesm2022/ngx-tethys-arrow-switcher.mjs +7 -7
  45. package/fesm2022/ngx-tethys-autocomplete.mjs +17 -18
  46. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  47. package/fesm2022/ngx-tethys-avatar.mjs +25 -28
  48. package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
  49. package/fesm2022/ngx-tethys-back-top.mjs +7 -7
  50. package/fesm2022/ngx-tethys-badge.mjs +7 -7
  51. package/fesm2022/ngx-tethys-breadcrumb.mjs +10 -10
  52. package/fesm2022/ngx-tethys-button.mjs +14 -15
  53. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  54. package/fesm2022/ngx-tethys-calendar.mjs +18 -20
  55. package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
  56. package/fesm2022/ngx-tethys-card.mjs +15 -17
  57. package/fesm2022/ngx-tethys-card.mjs.map +1 -1
  58. package/fesm2022/ngx-tethys-carousel.mjs +28 -17
  59. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  60. package/fesm2022/ngx-tethys-cascader.mjs +16 -16
  61. package/fesm2022/ngx-tethys-checkbox.mjs +7 -7
  62. package/fesm2022/ngx-tethys-collapse.mjs +97 -85
  63. package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
  64. package/fesm2022/ngx-tethys-color-picker.mjs +34 -36
  65. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  66. package/fesm2022/ngx-tethys-comment.mjs +15 -17
  67. package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
  68. package/fesm2022/ngx-tethys-copy.mjs +8 -9
  69. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  70. package/fesm2022/ngx-tethys-core.mjs +21 -22
  71. package/fesm2022/ngx-tethys-core.mjs.map +1 -1
  72. package/fesm2022/ngx-tethys-date-picker.mjs +232 -248
  73. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  74. package/fesm2022/ngx-tethys-date-range.mjs +10 -10
  75. package/fesm2022/ngx-tethys-dialog.mjs +22 -23
  76. package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-divider.mjs +7 -7
  78. package/fesm2022/ngx-tethys-dot.mjs +8 -9
  79. package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
  80. package/fesm2022/ngx-tethys-drag-drop.mjs +23 -30
  81. package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
  82. package/fesm2022/ngx-tethys-dropdown.mjs +58 -70
  83. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  84. package/fesm2022/ngx-tethys-empty.mjs +10 -10
  85. package/fesm2022/ngx-tethys-flexible-text.mjs +8 -8
  86. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  87. package/fesm2022/ngx-tethys-form.mjs +47 -54
  88. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  89. package/fesm2022/ngx-tethys-fullscreen.mjs +15 -16
  90. package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
  91. package/fesm2022/ngx-tethys-grid.mjs +46 -51
  92. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  93. package/fesm2022/ngx-tethys-guider.mjs +55 -61
  94. package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
  95. package/fesm2022/ngx-tethys-i18n.mjs +51 -54
  96. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  97. package/fesm2022/ngx-tethys-icon.mjs +11 -12
  98. package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
  99. package/fesm2022/ngx-tethys-image.mjs +32 -21
  100. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  101. package/fesm2022/ngx-tethys-input-number.mjs +7 -7
  102. package/fesm2022/ngx-tethys-input.mjs +21 -23
  103. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  104. package/fesm2022/ngx-tethys-layout.mjs +73 -88
  105. package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
  106. package/fesm2022/ngx-tethys-list.mjs +19 -22
  107. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  108. package/fesm2022/ngx-tethys-loading.mjs +7 -7
  109. package/fesm2022/ngx-tethys-mention.mjs +11 -12
  110. package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
  111. package/fesm2022/ngx-tethys-menu.mjs +30 -30
  112. package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
  113. package/fesm2022/ngx-tethys-message.mjs +24 -24
  114. package/fesm2022/ngx-tethys-message.mjs.map +1 -1
  115. package/fesm2022/ngx-tethys-nav.mjs +26 -29
  116. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  117. package/fesm2022/ngx-tethys-notify.mjs +17 -17
  118. package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
  119. package/fesm2022/ngx-tethys-pagination.mjs +15 -17
  120. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  121. package/fesm2022/ngx-tethys-popover.mjs +21 -23
  122. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  123. package/fesm2022/ngx-tethys-progress.mjs +13 -13
  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 +11 -11
  127. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  128. package/fesm2022/ngx-tethys-radio.mjs +125 -115
  129. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  130. package/fesm2022/ngx-tethys-rate.mjs +10 -10
  131. package/fesm2022/ngx-tethys-resizable.mjs +18 -18
  132. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  133. package/fesm2022/ngx-tethys-result.mjs +7 -7
  134. package/fesm2022/ngx-tethys-segment.mjs +10 -10
  135. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  136. package/fesm2022/ngx-tethys-select.mjs +10 -10
  137. package/fesm2022/ngx-tethys-shared.mjs +81 -109
  138. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  139. package/fesm2022/ngx-tethys-skeleton.mjs +23 -24
  140. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  141. package/fesm2022/ngx-tethys-slide.mjs +36 -41
  142. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  143. package/fesm2022/ngx-tethys-slider.mjs +7 -7
  144. package/fesm2022/ngx-tethys-space.mjs +11 -12
  145. package/fesm2022/ngx-tethys-space.mjs.map +1 -1
  146. package/fesm2022/ngx-tethys-statistic.mjs +7 -7
  147. package/fesm2022/ngx-tethys-stepper.mjs +22 -24
  148. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  149. package/fesm2022/ngx-tethys-strength.mjs +8 -8
  150. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  151. package/fesm2022/ngx-tethys-switch.mjs +7 -7
  152. package/fesm2022/ngx-tethys-table.mjs +22 -25
  153. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  154. package/fesm2022/ngx-tethys-tabs.mjs +14 -15
  155. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  156. package/fesm2022/ngx-tethys-tag.mjs +12 -13
  157. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  158. package/fesm2022/ngx-tethys-time-picker.mjs +58 -56
  159. package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
  160. package/fesm2022/ngx-tethys-timeline.mjs +13 -13
  161. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  162. package/fesm2022/ngx-tethys-tooltip.mjs +14 -15
  163. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  164. package/fesm2022/ngx-tethys-transfer.mjs +10 -10
  165. package/fesm2022/ngx-tethys-tree-select.mjs +10 -10
  166. package/fesm2022/ngx-tethys-tree.mjs +17 -21
  167. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  168. package/fesm2022/ngx-tethys-typography.mjs +15 -17
  169. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  170. package/fesm2022/ngx-tethys-upload.mjs +18 -19
  171. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  172. package/fesm2022/ngx-tethys-util.mjs +418 -396
  173. package/fesm2022/ngx-tethys-util.mjs.map +1 -1
  174. package/fesm2022/ngx-tethys-vote.mjs +7 -7
  175. package/fesm2022/ngx-tethys-watermark.mjs +8 -9
  176. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  177. package/fesm2022/ngx-tethys.mjs +1 -1
  178. package/fesm2022/ngx-tethys.mjs.map +1 -1
  179. package/grid/grid.type.d.ts +5 -0
  180. package/grid/index.d.ts +1 -0
  181. package/grid/thy-grid-item.component.d.ts +1 -1
  182. package/grid/thy-grid.component.d.ts +1 -11
  183. package/guider/guider-manager.d.ts +2 -1
  184. package/guider/guider-ref.d.ts +6 -6
  185. package/guider/guider-step-ref.d.ts +3 -4
  186. package/guider/guider.interface.d.ts +26 -0
  187. package/i18n/i18n.service.d.ts +1 -1
  188. package/i18n/index.d.ts +2 -5
  189. package/i18n/locale.d.ts +1 -7
  190. package/i18n/locales/index.d.ts +5 -0
  191. package/i18n/util.d.ts +3 -0
  192. package/icon/index.d.ts +1 -1
  193. package/image/image-group.component.d.ts +4 -4
  194. package/image/image.directive.d.ts +2 -1
  195. package/image/image.token.d.ts +17 -0
  196. package/layout/header.component.d.ts +6 -18
  197. package/list/selection/selection-list.d.ts +2 -1
  198. package/list/selection/selection.interface.d.ts +2 -3
  199. package/message/abstract/abstract-message-queue.service.d.ts +2 -2
  200. package/message/abstract/abstract-message-ref.d.ts +6 -2
  201. package/package.json +2 -1
  202. package/popover/popover.directive.d.ts +6 -2
  203. package/radio/group/radio-group.component.d.ts +2 -1
  204. package/radio/radio.component.d.ts +3 -3
  205. package/radio/radio.token.d.ts +12 -0
  206. package/resizable/interface.d.ts +5 -0
  207. package/resizable/resizable.directive.d.ts +9 -3
  208. package/resizable/resizable.service.d.ts +1 -1
  209. package/resizable/resize-handle.component.d.ts +1 -6
  210. package/schematics/version.d.ts +1 -1
  211. package/schematics/version.js +1 -1
  212. package/segment/segment-item.component.d.ts +2 -1
  213. package/segment/segment.token.d.ts +10 -4
  214. package/shared/index.d.ts +1 -0
  215. package/shared/option/list-option/list-option.component.d.ts +10 -5
  216. package/shared/option/option.component.d.ts +1 -3
  217. package/shared/option/option.token.d.ts +11 -11
  218. package/shared/shared.type.d.ts +1 -0
  219. package/table/index.d.ts +1 -0
  220. package/table/styles/table.scss +9 -1
  221. package/table/table-column.component.d.ts +5 -30
  222. package/table/table-skeleton.component.d.ts +11 -3
  223. package/table/table.component.d.ts +1 -3
  224. package/table/table.type.d.ts +3 -0
  225. package/tag/tag.component.d.ts +2 -4
  226. package/time-picker/inner/inner-time-picker.component.d.ts +3 -1
  227. package/time-picker/inner/inner-time-picker.store.d.ts +5 -5
  228. package/time-picker/time-picker.utils.d.ts +5 -5
  229. package/timeline/index.d.ts +1 -0
  230. package/timeline/timeline-item.component.d.ts +1 -1
  231. package/timeline/timeline.component.d.ts +1 -1
  232. package/timeline/timeline.type.d.ts +1 -0
  233. package/tooltip/tooltip.directive.d.ts +2 -10
  234. package/tree/index.d.ts +0 -1
  235. package/tree/tree-abstract.d.ts +1 -1
  236. package/tree/tree-node.component.d.ts +17 -8
  237. package/tree/tree.class.d.ts +40 -1
  238. package/tree/tree.component.d.ts +1 -1
  239. package/tree/tree.pipe.d.ts +1 -1
  240. package/tree/tree.service.d.ts +3 -9
  241. package/util/helpers/helpers.d.ts +1 -0
  242. package/tree/tree-node.class.d.ts +0 -29
@@ -1,6 +1,6 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  import { DragRef } from './drag-ref';
3
- import { IThyDropContainerDirective } from './drop-container.class';
3
+ import { IThyDragDirective } from './drag-drop.token';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * 拖拽项
@@ -8,8 +8,8 @@ import * as i0 from "@angular/core";
8
8
  * @order 10
9
9
  * @deprecated please use @angular/cdk/drag-drop
10
10
  */
11
- export declare class ThyDragDirective<T = any> implements OnDestroy {
12
- container: IThyDropContainerDirective<any>;
11
+ export declare class ThyDragDirective<T = any> implements IThyDragDirective, OnDestroy {
12
+ container: import("./drag-drop.token").IThyDropContainerDirective<any>;
13
13
  private elementRef;
14
14
  /**
15
15
  * 元数据
@@ -1,7 +1,7 @@
1
1
  import { OnInit, EventEmitter, QueryList, AfterContentInit, OnDestroy } from '@angular/core';
2
2
  import { ThyDragDirective } from './drag.directive';
3
3
  import { ThyDragDropEvent, ThyDragStartEvent, ThyDragEndEvent, ThyDragOverEvent } from './drag-drop.class';
4
- import { IThyDropContainerDirective } from './drop-container.class';
4
+ import { IThyDropContainerDirective } from './drag-drop.token';
5
5
  import * as i0 from "@angular/core";
6
6
  /**
7
7
  * @name thy-drop-container,[thyDropContainer]
@@ -4,6 +4,6 @@ export * from './drag-handle.directive';
4
4
  export * from './drag-content.directive';
5
5
  export * from './drag-drop.class';
6
6
  export * from './drop-container.directive';
7
- export * from './drop-container.class';
7
+ export * from './drag-drop.token';
8
8
  export * from './module';
9
9
  export * from './drag-drop.service';
@@ -142,10 +142,10 @@ class ThyAction {
142
142
  ngOnDestroy() {
143
143
  this.feedbackTimer?.unsubscribe();
144
144
  }
145
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAction, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
146
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: ThyAction, isStandalone: true, selector: "thy-action, [thyAction]", inputs: { thyType: "thyType", thyIcon: "thyIcon", thyActionIcon: "thyActionIcon", thyActive: ["thyActive", "thyActive", coerceBooleanProperty], thyActionActive: ["thyActionActive", "thyActionActive", coerceBooleanProperty], thyTheme: "thyTheme", thyHoverIcon: "thyHoverIcon", thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty] }, host: { properties: { "class.active": "active", "class.thy-action-hover-icon": "thyHoverIcon", "class.thy-action-has-feedback": "!!feedback", "class.disabled": "thyDisabled" }, classAttribute: "thy-action" }, usesOnChanges: true, 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 }); }
145
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAction, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
146
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ThyAction, isStandalone: true, selector: "thy-action, [thyAction]", inputs: { thyType: "thyType", thyIcon: "thyIcon", thyActionIcon: "thyActionIcon", thyActive: ["thyActive", "thyActive", coerceBooleanProperty], thyActionActive: ["thyActionActive", "thyActionActive", coerceBooleanProperty], thyTheme: "thyTheme", thyHoverIcon: "thyHoverIcon", thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty] }, host: { properties: { "class.active": "active", "class.thy-action-hover-icon": "thyHoverIcon", "class.thy-action-has-feedback": "!!feedback", "class.disabled": "thyDisabled" }, classAttribute: "thy-action" }, usesOnChanges: true, 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 }); }
147
147
  }
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAction, decorators: [{
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAction, decorators: [{
149
149
  type: Component,
150
150
  args: [{ selector: 'thy-action, [thyAction]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
151
151
  class: 'thy-action',
@@ -207,10 +207,10 @@ class ThyActions {
207
207
  }
208
208
  });
209
209
  }
210
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyActions, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
211
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: ThyActions, isStandalone: true, selector: "thy-actions", inputs: { thySize: "thySize" }, host: { classAttribute: "thy-actions" }, queries: [{ propertyName: "actions", predicate: ThyAction }], usesOnChanges: true, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
210
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyActions, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
211
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ThyActions, isStandalone: true, selector: "thy-actions", inputs: { thySize: "thySize" }, host: { classAttribute: "thy-actions" }, queries: [{ propertyName: "actions", predicate: ThyAction }], usesOnChanges: true, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
212
212
  }
213
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyActions, decorators: [{
213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyActions, decorators: [{
214
214
  type: Component,
215
215
  args: [{
216
216
  selector: 'thy-actions',
@@ -218,8 +218,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
218
218
  changeDetection: ChangeDetectionStrategy.OnPush,
219
219
  host: {
220
220
  class: 'thy-actions'
221
- },
222
- standalone: true
221
+ }
223
222
  }]
224
223
  }], ctorParameters: () => [], propDecorators: { actions: [{
225
224
  type: ContentChildren,
@@ -229,11 +228,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
229
228
  }] } });
230
229
 
231
230
  class ThyActionModule {
232
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
233
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: ThyActionModule, imports: [CommonModule, ThyIconModule, ThyAction, ThyActions], exports: [ThyAction, ThyActions] }); }
234
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyActionModule, imports: [CommonModule, ThyIconModule, ThyAction] }); }
231
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
232
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: ThyActionModule, imports: [CommonModule, ThyIconModule, ThyAction, ThyActions], exports: [ThyAction, ThyActions] }); }
233
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyActionModule, imports: [CommonModule, ThyIconModule, ThyAction] }); }
235
234
  }
236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyActionModule, decorators: [{
235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyActionModule, decorators: [{
237
236
  type: NgModule,
238
237
  args: [{
239
238
  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 ChangeDetectionStrategy,\n Component,\n Input,\n OnInit,\n AfterViewInit,\n OnChanges,\n ElementRef,\n Renderer2,\n SimpleChanges,\n ChangeDetectorRef,\n OnDestroy,\n inject\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyIcon } from 'ngx-tethys/icon';\n\nimport { Subscription, timer } from 'rxjs';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\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, OnChanges, OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private renderer = inject(Renderer2);\n private cdr = inject(ChangeDetectorRef);\n\n icon: string;\n\n feedback: ThyActionFeedback = null;\n\n feedbackOptions: ThyActionFeedbackOptions;\n\n active = false;\n\n private type: string = 'primary';\n\n private hostRenderer = useHostRenderer();\n\n private feedbackTimer: Subscription;\n\n /**\n * 操作图标的类型\n * @type primary | success | danger | warning\n * @default primary\n */\n @Input()\n set thyType(value: ThyActionType) {\n this.setActionType(value || 'primary');\n }\n\n /**\n * 操作图标,支持传参同时也支持在投影中写 thy-icon 组件\n */\n @Input()\n set thyIcon(icon: string) {\n this.icon = icon;\n }\n\n /**\n * 操作图标,当 thyIcon 和其他指令参数名有冲突时使用 thyActionIcon\n */\n @Input()\n set thyActionIcon(icon: string) {\n this.icon = icon;\n }\n\n /**\n * 操作的图标 Active 状态,设置为 true 时会在 Item 上添加 active class\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n set thyActive(value: boolean) {\n this.active = value;\n }\n\n /**\n * 操作的图标 Active 状态,当 thyActive 和其他指令参数名有冲突时使用 thyActionActive\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n set thyActionActive(value: boolean) {\n this.active = value;\n }\n\n /**\n * 操作图标的主题\n * @type fill(背景色填充) | lite(简单文本颜色变化)\n */\n @Input() thyTheme: 'fill' | 'lite' = 'fill';\n\n /**\n * Hover 展示的图标\n */\n @Input() thyHoverIcon: string;\n\n /**\n * 是否处于禁用状态\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n thyDisabled: boolean;\n\n ngOnInit(): void {\n this.updateClasses();\n }\n\n ngAfterViewInit() {\n this.wrapSpanForText(this.elementRef.nativeElement.childNodes);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ((changes.thyType && !changes.thyType.firstChange) || (changes.thyTheme && !changes.thyTheme.firstChange)) {\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) {\n if (this.thyDisabled) {\n return;\n }\n options = Object.assign({}, defaultFeedbackOptions[feedback], options);\n this.feedback = feedback;\n this.feedbackOptions = options;\n this.cdr.markForCheck();\n if (options.duration) {\n if (this.feedbackTimer) {\n this.feedbackTimer.unsubscribe();\n }\n this.feedbackTimer = timer(options.duration).subscribe(() => {\n this.feedback = null;\n this.feedbackOptions = null;\n this.cdr.markForCheck();\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 setActionType(value: ThyActionType) {\n this.type = value;\n }\n\n private updateClasses() {\n let classNames: string[] = [];\n classNames.push(`action-${this.type}`);\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 {\n Component,\n OnInit,\n OnChanges,\n ChangeDetectionStrategy,\n Input,\n ContentChildren,\n QueryList,\n AfterContentInit,\n SimpleChanges\n} 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 standalone: true\n})\nexport class ThyActions implements OnInit, AfterContentInit, OnChanges {\n @ContentChildren(ThyAction) actions: QueryList<ThyAction>;\n\n /**\n * 大小,支持 `zero` | `xxs` | `xs` | `sm` | `md` | `lg` | `xlg` 和自定义数字大小\n * @type string | number\n */\n @Input() thySize: ThySpacingSize = 'md';\n\n constructor() {}\n\n ngOnInit(): void {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.thySize && !changes.thySize.firstChange && this.actions) {\n this.setActionsSize(this.actions.toArray());\n }\n }\n\n ngAfterContentInit(): void {\n this.actions.changes.subscribe((actions: ThyAction[]) => {\n this.setActionsSize(actions);\n });\n this.setActionsSize(this.actions.toArray());\n }\n\n private setActionsSize(actions: ThyAction[]) {\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":";;;;;;;;;AA8BA,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;AAbtB,IAAA,WAAA,GAAA;AAcY,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAIvC,IAAQ,CAAA,QAAA,GAAsB,IAAI;QAIlC,IAAM,CAAA,MAAA,GAAG,KAAK;QAEN,IAAI,CAAA,IAAA,GAAW,SAAS;QAExB,IAAY,CAAA,YAAA,GAAG,eAAe,EAAE;AAgDxC;;;AAGG;QACM,IAAQ,CAAA,QAAA,GAAoB,MAAM;AA8F9C;AA9IG;;;;AAIG;IACH,IACI,OAAO,CAAC,KAAoB,EAAA;AAC5B,QAAA,IAAI,CAAC,aAAa,CAAC,KAAK,IAAI,SAAS,CAAC;;AAG1C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,EAAE;AACf,iBAAA;wDAE+B,OAAO,EAAA,CAAA;sBAAlC,eAAe;uBAAC,SAAS;gBAMjB,OAAO,EAAA,CAAA;sBAAf;;;MCvBQ,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAf,eAAe,EAAA,OAAA,EAAA,CAHd,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CAClD,SAAS,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;AAEtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAHd,OAAA,EAAA,CAAA,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 ChangeDetectionStrategy,\n Component,\n Input,\n OnInit,\n AfterViewInit,\n OnChanges,\n ElementRef,\n Renderer2,\n SimpleChanges,\n ChangeDetectorRef,\n OnDestroy,\n inject\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyIcon } from 'ngx-tethys/icon';\n\nimport { Subscription, timer } from 'rxjs';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\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, OnChanges, OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private renderer = inject(Renderer2);\n private cdr = inject(ChangeDetectorRef);\n\n icon: string;\n\n feedback: ThyActionFeedback = null;\n\n feedbackOptions: ThyActionFeedbackOptions;\n\n active = false;\n\n private type: string = 'primary';\n\n private hostRenderer = useHostRenderer();\n\n private feedbackTimer: Subscription;\n\n /**\n * 操作图标的类型\n * @type primary | success | danger | warning\n * @default primary\n */\n @Input()\n set thyType(value: ThyActionType) {\n this.setActionType(value || 'primary');\n }\n\n /**\n * 操作图标,支持传参同时也支持在投影中写 thy-icon 组件\n */\n @Input()\n set thyIcon(icon: string) {\n this.icon = icon;\n }\n\n /**\n * 操作图标,当 thyIcon 和其他指令参数名有冲突时使用 thyActionIcon\n */\n @Input()\n set thyActionIcon(icon: string) {\n this.icon = icon;\n }\n\n /**\n * 操作的图标 Active 状态,设置为 true 时会在 Item 上添加 active class\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n set thyActive(value: boolean) {\n this.active = value;\n }\n\n /**\n * 操作的图标 Active 状态,当 thyActive 和其他指令参数名有冲突时使用 thyActionActive\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n set thyActionActive(value: boolean) {\n this.active = value;\n }\n\n /**\n * 操作图标的主题\n * @type fill(背景色填充) | lite(简单文本颜色变化)\n */\n @Input() thyTheme: 'fill' | 'lite' = 'fill';\n\n /**\n * Hover 展示的图标\n */\n @Input() thyHoverIcon: string;\n\n /**\n * 是否处于禁用状态\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n thyDisabled: boolean;\n\n ngOnInit(): void {\n this.updateClasses();\n }\n\n ngAfterViewInit() {\n this.wrapSpanForText(this.elementRef.nativeElement.childNodes);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ((changes.thyType && !changes.thyType.firstChange) || (changes.thyTheme && !changes.thyTheme.firstChange)) {\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) {\n if (this.thyDisabled) {\n return;\n }\n options = Object.assign({}, defaultFeedbackOptions[feedback], options);\n this.feedback = feedback;\n this.feedbackOptions = options;\n this.cdr.markForCheck();\n if (options.duration) {\n if (this.feedbackTimer) {\n this.feedbackTimer.unsubscribe();\n }\n this.feedbackTimer = timer(options.duration).subscribe(() => {\n this.feedback = null;\n this.feedbackOptions = null;\n this.cdr.markForCheck();\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 setActionType(value: ThyActionType) {\n this.type = value;\n }\n\n private updateClasses() {\n let classNames: string[] = [];\n classNames.push(`action-${this.type}`);\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 {\n Component,\n OnInit,\n OnChanges,\n ChangeDetectionStrategy,\n Input,\n ContentChildren,\n QueryList,\n AfterContentInit,\n SimpleChanges\n} 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, AfterContentInit, OnChanges {\n @ContentChildren(ThyAction) actions: QueryList<ThyAction>;\n\n /**\n * 大小,支持 `zero` | `xxs` | `xs` | `sm` | `md` | `lg` | `xlg` 和自定义数字大小\n * @type string | number\n */\n @Input() thySize: ThySpacingSize = 'md';\n\n constructor() {}\n\n ngOnInit(): void {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.thySize && !changes.thySize.firstChange && this.actions) {\n this.setActionsSize(this.actions.toArray());\n }\n }\n\n ngAfterContentInit(): void {\n this.actions.changes.subscribe((actions: ThyAction[]) => {\n this.setActionsSize(actions);\n });\n this.setActionsSize(this.actions.toArray());\n }\n\n private setActionsSize(actions: ThyAction[]) {\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":";;;;;;;;;AA8BA,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;AAbtB,IAAA,WAAA,GAAA;AAcY,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAIvC,IAAQ,CAAA,QAAA,GAAsB,IAAI;QAIlC,IAAM,CAAA,MAAA,GAAG,KAAK;QAEN,IAAI,CAAA,IAAA,GAAW,SAAS;QAExB,IAAY,CAAA,YAAA,GAAG,eAAe,EAAE;AAgDxC;;;AAGG;QACM,IAAQ,CAAA,QAAA,GAAoB,MAAM;AA8F9C;AA9IG;;;;AAIG;IACH,IACI,OAAO,CAAC,KAAoB,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C,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE;AACV;AACJ,iBAAA;wDAE+B,OAAO,EAAA,CAAA;sBAAlC,eAAe;uBAAC,SAAS;gBAMjB,OAAO,EAAA,CAAA;sBAAf;;;MCtBQ,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAf,eAAe,EAAA,OAAA,EAAA,CAHd,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CAClD,SAAS,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;AAEtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAHd,OAAA,EAAA,CAAA,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;;;;"}
@@ -216,14 +216,14 @@ class ThyAffix {
216
216
  this.syncPlaceholderStyle(e);
217
217
  }
218
218
  }
219
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAffix, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
220
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.4", type: ThyAffix, isStandalone: true, selector: "thy-affix", inputs: { thyContainer: "thyContainer", thyOffsetTop: ["thyOffsetTop", "thyOffsetTop", numberAttribute], thyOffsetBottom: ["thyOffsetBottom", "thyOffsetBottom", numberAttribute] }, outputs: { thyChange: "thyChange" }, viewQueries: [{ propertyName: "fixedElement", first: true, predicate: ["fixedElement"], descendants: true, static: true }], exportAs: ["thyAffix"], usesOnChanges: true, ngImport: i0, template: `
219
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAffix, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
220
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.6", type: ThyAffix, isStandalone: true, selector: "thy-affix", inputs: { thyContainer: "thyContainer", thyOffsetTop: ["thyOffsetTop", "thyOffsetTop", numberAttribute], thyOffsetBottom: ["thyOffsetBottom", "thyOffsetBottom", numberAttribute] }, outputs: { thyChange: "thyChange" }, viewQueries: [{ propertyName: "fixedElement", first: true, predicate: ["fixedElement"], descendants: true, static: true }], exportAs: ["thyAffix"], usesOnChanges: true, ngImport: i0, template: `
221
221
  <div #fixedElement>
222
222
  <ng-content></ng-content>
223
223
  </div>
224
224
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
225
225
  }
226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAffix, decorators: [{
226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAffix, decorators: [{
227
227
  type: Component,
228
228
  args: [{
229
229
  selector: 'thy-affix',
@@ -234,8 +234,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
234
234
  </div>
235
235
  `,
236
236
  changeDetection: ChangeDetectionStrategy.OnPush,
237
- encapsulation: ViewEncapsulation.None,
238
- standalone: true
237
+ encapsulation: ViewEncapsulation.None
239
238
  }]
240
239
  }], ctorParameters: () => [], propDecorators: { fixedElement: [{
241
240
  type: ViewChild,
@@ -253,11 +252,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
253
252
  }] } });
254
253
 
255
254
  class ThyAffixModule {
256
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
257
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: ThyAffixModule, imports: [CommonModule, PlatformModule, ThyAffix], exports: [ThyAffix] }); }
258
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAffixModule, imports: [CommonModule, PlatformModule] }); }
255
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAffixModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
256
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: ThyAffixModule, imports: [CommonModule, PlatformModule, ThyAffix], exports: [ThyAffix] }); }
257
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAffixModule, imports: [CommonModule, PlatformModule] }); }
259
258
  }
260
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAffixModule, decorators: [{
259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAffixModule, decorators: [{
261
260
  type: NgModule,
262
261
  args: [{
263
262
  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';\nimport { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n numberAttribute,\n OnChanges,\n OnDestroy,\n Output,\n Renderer2,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n inject\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 standalone: true\n})\nexport class ThyAffix implements AfterViewInit, OnChanges, OnDestroy {\n private scrollService = inject(ThyScrollService);\n private ngZone = inject(NgZone);\n private platform = inject(Platform);\n private renderer = inject(Renderer2);\n\n @ViewChild('fixedElement', { static: true }) private fixedElement!: ElementRef<HTMLDivElement>;\n\n /**\n * 设置 thy-affix 需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数\n * @default window\n * @type string | Element | Window\n */\n @Input() thyContainer?: string | Element | Window;\n\n /**\n * 距离窗口顶部缓冲的偏移量阈值\n * @default 0\n */\n @Input({ transform: numberAttribute })\n thyOffsetTop?: null | number;\n\n /**\n * 距离窗口底部缓冲的偏移量阈值\n */\n @Input({ transform: numberAttribute })\n thyOffsetBottom?: null | number;\n\n /**\n * 固定状态改变时触发的回调函数\n */\n @Output() readonly thyChange = new EventEmitter<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 get container(): Element | Window {\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 }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thyOffsetBottom, thyOffsetTop, thyContainer } = changes;\n\n if (thyOffsetBottom || thyOffsetTop) {\n this.offsetChanged$.next(undefined);\n }\n if (thyContainer) {\n this.registerListeners();\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 if (typeof offsetTop !== 'number' && typeof this.thyOffsetBottom !== 'number') {\n offsetMode.top = true;\n offsetTop = 0;\n } else {\n offsetMode.top = typeof offsetTop === 'number';\n offsetMode.bottom = typeof this.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 + (this.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 + (this.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,GAQ7B,EAAA,CAAA,CAAA;;ACoBD,MAAM,oBAAoB,GAAG,WAAW;AACxC,MAAM,6BAA6B,GAAG,EAAE;AAExC;;;;AAIG;MAaU,QAAQ,CAAA;AA2CjB,IAAA,IAAY,SAAS,GAAA;AACjB,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY;QAC5B,OAAO,CAAC,OAAO,EAAE,KAAK,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,MAAM;;AAGpF,IAAA,WAAA,GAAA;AA/CQ,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,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS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AAe,EAAE;gBAMlB,SAAS,EAAA,CAAA;sBAA3B;;;MCrEQ,cAAc,CAAA;8GAAd,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,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAFb,YAAY,EAAE,cAAc,EAAE,QAAQ,aADtC,QAAQ,CAAA,EAAA,CAAA,CAAA;+GAGT,cAAc,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';\nimport { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n numberAttribute,\n OnChanges,\n OnDestroy,\n Output,\n Renderer2,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n inject\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, OnChanges, OnDestroy {\n private scrollService = inject(ThyScrollService);\n private ngZone = inject(NgZone);\n private platform = inject(Platform);\n private renderer = inject(Renderer2);\n\n @ViewChild('fixedElement', { static: true }) private fixedElement!: ElementRef<HTMLDivElement>;\n\n /**\n * 设置 thy-affix 需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数\n * @default window\n * @type string | Element | Window\n */\n @Input() thyContainer?: string | Element | Window;\n\n /**\n * 距离窗口顶部缓冲的偏移量阈值\n * @default 0\n */\n @Input({ transform: numberAttribute })\n thyOffsetTop?: null | number;\n\n /**\n * 距离窗口底部缓冲的偏移量阈值\n */\n @Input({ transform: numberAttribute })\n thyOffsetBottom?: null | number;\n\n /**\n * 固定状态改变时触发的回调函数\n */\n @Output() readonly thyChange = new EventEmitter<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 get container(): Element | Window {\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 }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thyOffsetBottom, thyOffsetTop, thyContainer } = changes;\n\n if (thyOffsetBottom || thyOffsetTop) {\n this.offsetChanged$.next(undefined);\n }\n if (thyContainer) {\n this.registerListeners();\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 if (typeof offsetTop !== 'number' && typeof this.thyOffsetBottom !== 'number') {\n offsetMode.top = true;\n offsetTop = 0;\n } else {\n offsetMode.top = typeof offsetTop === 'number';\n offsetMode.bottom = typeof this.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 + (this.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 + (this.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,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AA,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;;;;"}
@@ -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: "19.2.4", ngImport: i0, type: ThyAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", 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: "19.2.6", ngImport: i0, type: ThyAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", 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: "19.2.4", ngImport: i0, type: ThyAlert, decorators: [{
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", 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,14 +106,13 @@ class ThyAlertActionItemDirective {
106
106
  constructor() {
107
107
  this.class = true;
108
108
  }
109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAlertActionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
110
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.4", 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: "19.2.6", ngImport: i0, type: ThyAlertActionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
110
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", 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: "19.2.4", ngImport: i0, type: ThyAlertActionItemDirective, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAlertActionItemDirective, decorators: [{
113
113
  type: Directive,
114
114
  args: [{
115
- selector: '[thyAlertActionItem]',
116
- standalone: true
115
+ selector: '[thyAlertActionItem]'
117
116
  }]
118
117
  }], ctorParameters: () => [], propDecorators: { class: [{
119
118
  type: HostBinding,
@@ -121,11 +120,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
121
120
  }] } });
122
121
 
123
122
  class ThyAlertModule {
124
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
125
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert, ThyAlertActionItemDirective], exports: [ThyAlert, ThyAlertActionItemDirective] }); }
126
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert] }); }
123
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
124
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert, ThyAlertActionItemDirective], exports: [ThyAlert, ThyAlertActionItemDirective] }); }
125
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAlertModule, imports: [CommonModule, ThyIconModule, ThyAlert] }); }
127
126
  }
128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAlertModule, decorators: [{
127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAlertModule, decorators: [{
129
128
  type: NgModule,
130
129
  args: [{
131
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 private 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 standalone: true\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,EA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AAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAHb,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAAE,QAAQ,CAAA,EAAA,CAAA,CAAA;;2FAGtC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,2BAA2B,CAAC;AAC7E,oBAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,2BAA2B;AAClD,iBAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-alert.mjs","sources":["../../../src/alert/alert.component.ts","../../../src/alert/alert.component.html","../../../src/alert/alert.directive.ts","../../../src/alert/alert.module.ts","../../../src/alert/ngx-tethys-alert.ts"],"sourcesContent":["import { Component, TemplateRef, 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 private 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,kBAA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EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,2BAA2B,CAAC;AAC7E,oBAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,2BAA2B;AAClD,iBAAA;;;ACTD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectorRef, NgZone, Renderer2, EventEmitter, numberAttribute, Output, Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, TemplateRef, ElementRef, ContentChild, NgModule } from '@angular/core';
2
+ import { InjectionToken, inject, ChangeDetectorRef, NgZone, Renderer2, EventEmitter, numberAttribute, Output, Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, TemplateRef, ElementRef, ContentChild, NgModule } from '@angular/core';
3
3
  import { DOCUMENT, NgTemplateOutlet, NgStyle, NgClass, CommonModule } from '@angular/common';
4
4
  import { Platform, PlatformModule } from '@angular/cdk/platform';
5
5
  import { Subject, fromEvent } from 'rxjs';
@@ -9,6 +9,8 @@ import { ThyScrollService } from 'ngx-tethys/core';
9
9
  import { getOffset, coerceBooleanProperty } from 'ngx-tethys/util';
10
10
  import { useHostRenderer } from '@tethys/cdk/dom';
11
11
 
12
+ const THY_ANCHOR_COMPONENT = new InjectionToken('THY_ANCHOR_COMPONENT');
13
+
12
14
  const sharpMatcherRegx = /#([^#]+)$/;
13
15
  /**
14
16
  * 锚点组件
@@ -187,8 +189,13 @@ class ThyAnchor {
187
189
  this.registerScrollEvent();
188
190
  }
189
191
  }
190
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
191
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: ThyAnchor, isStandalone: true, selector: "thy-anchor", inputs: { thyAffix: ["thyAffix", "thyAffix", coerceBooleanProperty], thyBounds: ["thyBounds", "thyBounds", numberAttribute], thyOffsetTop: ["thyOffsetTop", "thyOffsetTop", numberAttribute], thyContainer: "thyContainer", thyDirection: "thyDirection" }, outputs: { thyClick: "thyClick", thyScroll: "thyScroll" }, viewQueries: [{ propertyName: "ink", first: true, predicate: ["ink"], descendants: true }], exportAs: ["thyAnchor"], usesOnChanges: true, ngImport: i0, template: `
192
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
193
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ThyAnchor, isStandalone: true, selector: "thy-anchor", inputs: { thyAffix: ["thyAffix", "thyAffix", coerceBooleanProperty], thyBounds: ["thyBounds", "thyBounds", numberAttribute], thyOffsetTop: ["thyOffsetTop", "thyOffsetTop", numberAttribute], thyContainer: "thyContainer", thyDirection: "thyDirection" }, outputs: { thyClick: "thyClick", thyScroll: "thyScroll" }, providers: [
194
+ {
195
+ provide: THY_ANCHOR_COMPONENT,
196
+ useExisting: ThyAnchor
197
+ }
198
+ ], viewQueries: [{ propertyName: "ink", first: true, predicate: ["ink"], descendants: true }], exportAs: ["thyAnchor"], usesOnChanges: true, ngImport: i0, template: `
192
199
  @if (thyAffix) {
193
200
  <thy-affix [thyOffsetTop]="thyOffsetTop" [thyContainer]="container">
194
201
  <ng-template [ngTemplateOutlet]="content"></ng-template>
@@ -211,7 +218,7 @@ class ThyAnchor {
211
218
  </ng-template>
212
219
  `, 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 }); }
213
220
  }
214
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAnchor, decorators: [{
221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAnchor, decorators: [{
215
222
  type: Component,
216
223
  args: [{
217
224
  selector: 'thy-anchor',
@@ -241,7 +248,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
241
248
  `,
242
249
  encapsulation: ViewEncapsulation.None,
243
250
  changeDetection: ChangeDetectionStrategy.OnPush,
244
- imports: [ThyAffix, NgTemplateOutlet, NgStyle, NgClass]
251
+ imports: [ThyAffix, NgTemplateOutlet, NgStyle, NgClass],
252
+ providers: [
253
+ {
254
+ provide: THY_ANCHOR_COMPONENT,
255
+ useExisting: ThyAnchor
256
+ }
257
+ ]
245
258
  }]
246
259
  }], propDecorators: { ink: [{
247
260
  type: ViewChild,
@@ -284,7 +297,7 @@ class ThyAnchorLink {
284
297
  }
285
298
  constructor() {
286
299
  this.elementRef = inject(ElementRef);
287
- this.anchorComponent = inject(ThyAnchor);
300
+ this.anchorComponent = inject(THY_ANCHOR_COMPONENT, { optional: true });
288
301
  this.platform = inject(Platform);
289
302
  this.title = '';
290
303
  this.hostRenderer = useHostRenderer();
@@ -320,8 +333,8 @@ class ThyAnchorLink {
320
333
  ngOnDestroy() {
321
334
  this.anchorComponent.unregisterLink(this);
322
335
  }
323
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAnchorLink, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
324
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: ThyAnchorLink, isStandalone: true, selector: "thy-link,thy-anchor-link", inputs: { thyHref: "thyHref", thyTitle: "thyTitle" }, queries: [{ propertyName: "thyTemplate", first: true, predicate: ["thyTemplate"], descendants: true }], viewQueries: [{ propertyName: "linkTitle", first: true, predicate: ["linkTitle"], descendants: true, static: true }], exportAs: ["thyLink", "thyAnchorLink"], ngImport: i0, template: `
336
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAnchorLink, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
337
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ThyAnchorLink, isStandalone: true, selector: "thy-link,thy-anchor-link", inputs: { thyHref: "thyHref", thyTitle: "thyTitle" }, queries: [{ propertyName: "thyTemplate", first: true, predicate: ["thyTemplate"], descendants: true }], viewQueries: [{ propertyName: "linkTitle", first: true, predicate: ["linkTitle"], descendants: true, static: true }], exportAs: ["thyLink", "thyAnchorLink"], ngImport: i0, template: `
325
338
  <a #linkTitle (click)="goToClick($event)" href="{{ thyHref }}" class="thy-anchor-link-title" title="{{ title }}">
326
339
  @if (title) {
327
340
  <span>{{ title }}</span>
@@ -332,7 +345,7 @@ class ThyAnchorLink {
332
345
  <ng-content></ng-content>
333
346
  `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
334
347
  }
335
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAnchorLink, decorators: [{
348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAnchorLink, decorators: [{
336
349
  type: Component,
337
350
  args: [{
338
351
  selector: 'thy-link,thy-anchor-link',
@@ -365,11 +378,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
365
378
  }] } });
366
379
 
367
380
  class ThyAnchorModule {
368
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAnchorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
369
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor, ThyAnchorLink], exports: [ThyAnchor, ThyAnchorLink] }); }
370
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor] }); }
381
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAnchorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
382
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor, ThyAnchorLink], exports: [ThyAnchor, ThyAnchorLink] }); }
383
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAnchorModule, imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor] }); }
371
384
  }
372
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ThyAnchorModule, decorators: [{
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAnchorModule, decorators: [{
373
386
  type: NgModule,
374
387
  args: [{
375
388
  exports: [ThyAnchor, ThyAnchorLink],