ngx-tethys 19.1.0-next.0 → 19.1.0-next.10

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 (221) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/README.md +0 -1
  3. package/action/action.component.d.ts +7 -8
  4. package/affix/affix.component.d.ts +3 -4
  5. package/arrow-switcher/arrow-switcher.component.d.ts +5 -1
  6. package/badge/badge.component.d.ts +1 -1
  7. package/button/button-group.component.d.ts +5 -12
  8. package/button/button-icon.component.d.ts +14 -28
  9. package/button/button.component.d.ts +17 -27
  10. package/color-picker/coordinates.directive.d.ts +1 -2
  11. package/date-picker/abstract-picker.component.d.ts +50 -52
  12. package/date-picker/abstract-picker.directive.d.ts +15 -40
  13. package/date-picker/base-picker.component.d.ts +12 -40
  14. package/date-picker/date-picker.config.d.ts +3 -0
  15. package/date-picker/lib/calendar/calendar-footer.component.d.ts +24 -19
  16. package/date-picker/lib/calendar/calendar-header.component.d.ts +15 -15
  17. package/date-picker/lib/calendar/calendar-table.component.d.ts +15 -16
  18. package/date-picker/lib/date/date-table-cell.component.d.ts +6 -3
  19. package/date-picker/lib/date/date-table.component.d.ts +2 -3
  20. package/date-picker/lib/date-carousel/date-carousel.component.d.ts +2 -3
  21. package/date-picker/lib/decade/decade-header.component.d.ts +2 -5
  22. package/date-picker/lib/decade/decade-table.component.d.ts +3 -5
  23. package/date-picker/lib/month/month-table.component.d.ts +1 -2
  24. package/date-picker/lib/popups/date-popup.component.d.ts +33 -34
  25. package/date-picker/lib/popups/inner-popup.component.d.ts +22 -29
  26. package/date-picker/lib/quarter/quarter-table.component.d.ts +1 -4
  27. package/date-picker/lib/year/year-header.component.d.ts +2 -4
  28. package/date-picker/lib/year/year-table.component.d.ts +2 -4
  29. package/date-picker/month-picker.component.d.ts +2 -2
  30. package/date-picker/picker.component.d.ts +31 -36
  31. package/date-picker/picker.pipes.d.ts +4 -5
  32. package/date-picker/picker.util.d.ts +5 -5
  33. package/date-picker/picker.validators.d.ts +4 -8
  34. package/date-picker/quarter-picker.component.d.ts +2 -3
  35. package/date-picker/styles/calendar.scss +1 -1
  36. package/date-picker/styles/range-picker.scss +1 -0
  37. package/date-picker/styles/week-picker.scss +1 -0
  38. package/date-picker/week-picker.component.d.ts +0 -1
  39. package/date-picker/year-picker.component.d.ts +2 -3
  40. package/dropdown/dropdown-active.directive.d.ts +4 -5
  41. package/dropdown/dropdown-menu-item.directive.d.ts +7 -15
  42. package/dropdown/dropdown-menu.component.d.ts +6 -13
  43. package/dropdown/dropdown-submenu.component.d.ts +2 -4
  44. package/dropdown/dropdown.directive.d.ts +15 -25
  45. package/empty/empty.component.d.ts +2 -1
  46. package/fesm2022/ngx-tethys-action.mjs +15 -16
  47. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  48. package/fesm2022/ngx-tethys-affix.mjs +14 -18
  49. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  50. package/fesm2022/ngx-tethys-arrow-switcher.mjs +15 -3
  51. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  52. package/fesm2022/ngx-tethys-autocomplete.mjs +4 -4
  53. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  54. package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
  55. package/fesm2022/ngx-tethys-button.mjs +225 -322
  56. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  57. package/fesm2022/ngx-tethys-carousel.mjs +1 -0
  58. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  59. package/fesm2022/ngx-tethys-cascader.mjs +1 -1
  60. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-checkbox.mjs +2 -2
  62. package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
  63. package/fesm2022/ngx-tethys-collapse.mjs +2 -2
  64. package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
  65. package/fesm2022/ngx-tethys-color-picker.mjs +4 -6
  66. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  67. package/fesm2022/ngx-tethys-copy.mjs +2 -2
  68. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  69. package/fesm2022/ngx-tethys-date-picker.mjs +861 -1078
  70. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  71. package/fesm2022/ngx-tethys-divider.mjs +5 -5
  72. package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
  73. package/fesm2022/ngx-tethys-dropdown.mjs +159 -209
  74. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  75. package/fesm2022/ngx-tethys-empty.mjs +5 -2
  76. package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-flexible-text.mjs +68 -88
  78. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  79. package/fesm2022/ngx-tethys-grid.mjs +10 -15
  80. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  81. package/fesm2022/ngx-tethys-i18n.mjs +26 -6
  82. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  83. package/fesm2022/ngx-tethys-icon.mjs +44 -59
  84. package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
  85. package/fesm2022/ngx-tethys-image.mjs +44 -42
  86. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  87. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  88. package/fesm2022/ngx-tethys-layout.mjs +291 -334
  89. package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
  90. package/fesm2022/ngx-tethys-list.mjs +183 -217
  91. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  92. package/fesm2022/ngx-tethys-message.mjs +29 -36
  93. package/fesm2022/ngx-tethys-message.mjs.map +1 -1
  94. package/fesm2022/ngx-tethys-notify.mjs +33 -41
  95. package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
  96. package/fesm2022/ngx-tethys-progress.mjs +7 -11
  97. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  98. package/fesm2022/ngx-tethys-property.mjs +8 -19
  99. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  100. package/fesm2022/ngx-tethys-radio.mjs +46 -58
  101. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  102. package/fesm2022/ngx-tethys-rate.mjs +115 -157
  103. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  104. package/fesm2022/ngx-tethys-resizable.mjs +100 -143
  105. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  106. package/fesm2022/ngx-tethys-segment.mjs +84 -103
  107. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  108. package/fesm2022/ngx-tethys-select.mjs +164 -228
  109. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  110. package/fesm2022/ngx-tethys-shared.mjs +423 -586
  111. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  112. package/fesm2022/ngx-tethys-skeleton.mjs +1 -2
  113. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  114. package/fesm2022/ngx-tethys-slide.mjs +37 -56
  115. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  116. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  117. package/fesm2022/ngx-tethys-space.mjs +2 -8
  118. package/fesm2022/ngx-tethys-space.mjs.map +1 -1
  119. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  120. package/fesm2022/ngx-tethys-strength.mjs +52 -66
  121. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  122. package/fesm2022/ngx-tethys-table.mjs +1 -2
  123. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  124. package/fesm2022/ngx-tethys-time-picker.mjs +244 -271
  125. package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
  126. package/fesm2022/ngx-tethys-tooltip.mjs +109 -93
  127. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  128. package/fesm2022/ngx-tethys-transfer.mjs +98 -119
  129. package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
  130. package/fesm2022/ngx-tethys-tree-select.mjs +216 -284
  131. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  132. package/fesm2022/ngx-tethys-tree.mjs +281 -401
  133. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  134. package/fesm2022/ngx-tethys-upload.mjs +2 -2
  135. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  136. package/fesm2022/ngx-tethys-vote.mjs +53 -99
  137. package/fesm2022/ngx-tethys-vote.mjs.map +1 -1
  138. package/fesm2022/ngx-tethys.mjs +1 -1
  139. package/fesm2022/ngx-tethys.mjs.map +1 -1
  140. package/flexible-text/flexible-text.component.d.ts +9 -15
  141. package/grid/flex.d.ts +1 -3
  142. package/grid/thy-row.directive.d.ts +1 -4
  143. package/i18n/i18n.d.ts +7 -2
  144. package/i18n/locales/de-de.d.ts +5 -1
  145. package/i18n/locales/en-us.d.ts +5 -1
  146. package/i18n/locales/ja-jp.d.ts +5 -1
  147. package/i18n/locales/zh-hans.d.ts +5 -1
  148. package/i18n/locales/zh-hant.d.ts +5 -1
  149. package/icon/icon.component.d.ts +10 -18
  150. package/image/image.directive.d.ts +10 -13
  151. package/image/image.token.d.ts +5 -5
  152. package/image/preview/image-preview.component.d.ts +2 -2
  153. package/input-number/input-number.component.d.ts +1 -1
  154. package/layout/header.component.d.ts +15 -19
  155. package/layout/layout.component.d.ts +3 -2
  156. package/layout/sidebar-header.component.d.ts +7 -8
  157. package/layout/sidebar.component.d.ts +32 -62
  158. package/list/list-item-meta.component.d.ts +7 -9
  159. package/list/list-item.component.d.ts +0 -2
  160. package/list/list.component.d.ts +2 -8
  161. package/list/selection/selection-list.d.ts +33 -46
  162. package/message/abstract/abstract-message.component.d.ts +2 -3
  163. package/message/message-container.component.d.ts +0 -1
  164. package/message/message.component.d.ts +1 -3
  165. package/notify/notify-container.component.d.ts +0 -1
  166. package/notify/notify.component.d.ts +7 -12
  167. package/package.json +1 -1
  168. package/progress/progress-circle.component.d.ts +3 -5
  169. package/progress/progress.component.d.ts +2 -4
  170. package/property/properties.component.d.ts +0 -2
  171. package/property/property-item.component.d.ts +3 -10
  172. package/radio/group/radio-group.component.d.ts +5 -9
  173. package/rate/rate-item.component.d.ts +8 -11
  174. package/rate/rate.component.d.ts +18 -29
  175. package/resizable/resizable.directive.d.ts +20 -32
  176. package/resizable/resize-handle.component.d.ts +6 -7
  177. package/resizable/resize-handles.component.d.ts +5 -9
  178. package/schematics/version.d.ts +1 -1
  179. package/schematics/version.js +1 -1
  180. package/segment/segment-item.component.d.ts +9 -15
  181. package/segment/segment.component.d.ts +11 -15
  182. package/segment/segment.token.d.ts +4 -3
  183. package/select/custom-select/custom-select.component.d.ts +33 -56
  184. package/select/native-select/native-select.component.d.ts +7 -13
  185. package/shared/base-form-check.component.d.ts +6 -8
  186. package/shared/directives/string-or-template-outlet.directive.d.ts +5 -6
  187. package/shared/directives/thy-autofocus.directive.d.ts +4 -6
  188. package/shared/directives/thy-contextmenu.directive.d.ts +2 -2
  189. package/shared/directives/thy-ctrl-enter.directive.d.ts +2 -2
  190. package/shared/directives/thy-enter.directive.d.ts +2 -2
  191. package/shared/directives/thy-scroll.directive.d.ts +5 -8
  192. package/shared/directives/thy-show.d.ts +5 -6
  193. package/shared/directives/thy-stop-propagation.directive.d.ts +4 -4
  194. package/shared/directives/view-outlet.directive.d.ts +6 -7
  195. package/shared/ng-transclude.directive.d.ts +2 -3
  196. package/shared/option/group/option-group.component.d.ts +5 -9
  197. package/shared/option/list-option/list-option.component.d.ts +9 -13
  198. package/shared/option/option.component.d.ts +10 -17
  199. package/shared/option/option.token.d.ts +4 -3
  200. package/shared/option/options-container.component.d.ts +1 -1
  201. package/shared/select/select-control/select-control.component.d.ts +38 -53
  202. package/slide/slide-body/slide-body-section.component.d.ts +2 -6
  203. package/slide/slide-header/slide-header.component.d.ts +6 -9
  204. package/space/space.component.d.ts +5 -11
  205. package/stepper/stepper.component.d.ts +1 -1
  206. package/strength/strength.component.d.ts +8 -13
  207. package/table/table-column.component.d.ts +15 -5
  208. package/time-picker/inner/inner-time-picker.class.d.ts +15 -13
  209. package/time-picker/inner/inner-time-picker.component.d.ts +26 -26
  210. package/time-picker/time-picker-panel.component.d.ts +18 -20
  211. package/time-picker/time-picker.component.d.ts +22 -30
  212. package/tooltip/tooltip.directive.d.ts +20 -22
  213. package/transfer/transfer-list.component.d.ts +15 -15
  214. package/transfer/transfer.component.d.ts +20 -23
  215. package/tree/tree-abstract.d.ts +5 -5
  216. package/tree/tree-node.component.d.ts +24 -37
  217. package/tree/tree.class.d.ts +4 -4
  218. package/tree/tree.component.d.ts +47 -75
  219. package/tree/tree.service.d.ts +3 -4
  220. package/tree-select/tree-select.component.d.ts +54 -71
  221. package/vote/vote.component.d.ts +13 -33
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-checkbox.mjs","sources":["../../../src/checkbox/checkbox.component.ts","../../../src/checkbox/checkbox.component.html","../../../src/checkbox/module.ts","../../../src/checkbox/index.ts","../../../src/checkbox/ngx-tethys-checkbox.ts"],"sourcesContent":["import { Component, forwardRef, input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThyFormCheckBaseComponent } from 'ngx-tethys/shared';\nimport { NgClass } from '@angular/common';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 多选框组件\n * @name thy-checkbox,[thy-checkbox],[thyCheckbox]\n * @order 10\n */\n@Component({\n selector: 'thy-checkbox,[thy-checkbox],[thyCheckbox]',\n templateUrl: './checkbox.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyCheckbox),\n multi: true\n }\n ],\n host: {\n '[attr.tabindex]': '-1',\n class: 'thy-checkbox',\n '[class.disabled]': '_disabled'\n },\n imports: [NgClass]\n})\nexport class ThyCheckbox extends ThyFormCheckBaseComponent {\n /**\n * 设置 indeterminate 状态,只负责样式控制\n * @description.en-us Set the indeterminate state, responsible only for style control\n */\n readonly thyIndeterminate = input(false, { transform: coerceBooleanProperty });\n}\n","<input\n class=\"form-check-input\"\n [ngClass]=\"{ 'form-check-indeterminate': thyIndeterminate(), 'form-check-no-label-text': !_labelText }\"\n [checked]=\"_innerValue\"\n (change)=\"change()\"\n type=\"checkbox\"\n [attr.tabindex]=\"tabIndex\"\n [disabled]=\"_disabled\" />\n@if (_labelText) {\n <span class=\"form-check-label\">{{ _labelText }}</span>\n}\n<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ThyCheckbox } from './checkbox.component';\n\n@NgModule({\n imports: [CommonModule, FormsModule, ThyCheckbox],\n exports: [ThyCheckbox]\n})\nexport class ThyCheckboxModule {}\n","export * from './module';\nexport * from './checkbox.component';\n// export * from './checkbox-group.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMA;;;;AAIG;AAkBG,MAAO,WAAY,SAAQ,yBAAyB,CAAA;AAjB1D,IAAA,WAAA,GAAA;;AAkBI;;;AAGG;QACM,IAAgB,CAAA,gBAAA,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;AACjF;8GANY,WAAW,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,WAAW,EAdT,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,MAAA,EAAA,EAAA,gBAAA,EAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,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A,IAAA,EAAA,iBAAiB,YAHhB,YAAY,EAAE,WAAW,EAAE,WAAW,aACtC,WAAW,CAAA,EAAA,CAAA,CAAA;+GAEZ,iBAAiB,EAAA,OAAA,EAAA,CAHhB,YAAY,EAAE,WAAW,CAAA,EAAA,CAAA,CAAA;;2FAG1B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,WAAW,CAAC;oBACjD,OAAO,EAAE,CAAC,WAAW;AACxB,iBAAA;;;ACND;;ACFA;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-checkbox.mjs","sources":["../../../src/checkbox/checkbox.component.ts","../../../src/checkbox/checkbox.component.html","../../../src/checkbox/module.ts","../../../src/checkbox/index.ts","../../../src/checkbox/ngx-tethys-checkbox.ts"],"sourcesContent":["import { Component, forwardRef, input } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThyFormCheckBaseComponent } from 'ngx-tethys/shared';\nimport { NgClass } from '@angular/common';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 多选框组件\n * @name thy-checkbox,[thy-checkbox],[thyCheckbox]\n * @order 10\n */\n@Component({\n selector: 'thy-checkbox,[thy-checkbox],[thyCheckbox]',\n templateUrl: './checkbox.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyCheckbox),\n multi: true\n }\n ],\n host: {\n '[attr.tabindex]': '-1',\n class: 'thy-checkbox',\n '[class.disabled]': '_disabled'\n },\n imports: [NgClass]\n})\nexport class ThyCheckbox extends ThyFormCheckBaseComponent {\n /**\n * 设置 indeterminate 状态,只负责样式控制\n * @description.en-us Set the indeterminate state, responsible only for style control\n */\n readonly thyIndeterminate = input(false, { transform: coerceBooleanProperty });\n}\n","<input\n class=\"form-check-input\"\n [ngClass]=\"{ 'form-check-indeterminate': thyIndeterminate(), 'form-check-no-label-text': !_labelText() }\"\n [checked]=\"_innerValue\"\n (change)=\"change()\"\n type=\"checkbox\"\n [attr.tabindex]=\"tabIndex\"\n [disabled]=\"_disabled\" />\n@if (_labelText()) {\n <span class=\"form-check-label\">{{ _labelText() }}</span>\n}\n<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ThyCheckbox } from './checkbox.component';\n\n@NgModule({\n imports: [CommonModule, FormsModule, ThyCheckbox],\n exports: [ThyCheckbox]\n})\nexport class ThyCheckboxModule {}\n","export * from './module';\nexport * from './checkbox.component';\n// export * from './checkbox-group.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMA;;;;AAIG;AAkBG,MAAO,WAAY,SAAQ,yBAAyB,CAAA;AAjB1D,IAAA,WAAA,GAAA;;AAkBI;;;AAGG;QACM,IAAgB,CAAA,gBAAA,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;AACjF;8GANY,WAAW,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,WAAW,EAdT,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,MAAA,EAAA,EAAA,gBAAA,EAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA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AiB,EAAA,OAAA,EAAA,CAHhB,YAAY,EAAE,WAAW,CAAA,EAAA,CAAA,CAAA;;2FAG1B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,WAAW,CAAC;oBACjD,OAAO,EAAE,CAAC,WAAW;AACxB,iBAAA;;;ACND;;ACFA;;AAEG;;;;"}
@@ -79,7 +79,7 @@ class ThyCollapseItem {
79
79
  this.thyCollapseComponent.removePanel(this);
80
80
  }
81
81
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCollapseItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
82
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyCollapseItem, isStandalone: true, selector: "thy-collapse-panel, thy-collapse-item", inputs: { thyTitle: { classPropertyName: "thyTitle", publicName: "thyTitle", isSignal: true, isRequired: false, transformFunction: null }, thyActive: { classPropertyName: "thyActive", publicName: "thyActive", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null }, thyHeaderTemplate: { classPropertyName: "thyHeaderTemplate", publicName: "thyHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, thyArrowIcon: { classPropertyName: "thyArrowIcon", publicName: "thyArrowIcon", isSignal: true, isRequired: false, transformFunction: null }, thyExtra: { classPropertyName: "thyExtra", publicName: "thyExtra", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyActive: "thyActiveChange", thyArrowIcon: "thyArrowIconChange", thyActiveChange: "thyActiveChange" }, host: { properties: { "class.thy-collapse-item": "true", "class.thy-collapse-no-arrow": "!showArrow()", "class.thy-collapse-item-active": "thyActive()", "class.thy-collapse-item-disabled": "thyDisabled()" } }, exportAs: ["ThyCollapseComponent"], ngImport: i0, template: "<div class=\"thy-collapse-header\" (click)=\"activeChange($event)\">\n @if (showArrow()) {\n @if (arrowIconTemplate()) {\n <ng-template [ngTemplateOutlet]=\"arrowIconTemplate()\"></ng-template>\n } @else {\n <thy-icon [thyIconName]=\"arrowIcon() || 'angle-right'\" class=\"thy-collapse-icon\" [thyIconRotate]=\"thyActive() ? -90 : 0\"></thy-icon>\n }\n }\n\n @if (thyHeaderTemplate()) {\n <ng-template [ngTemplateOutlet]=\"thyHeaderTemplate()\"></ng-template>\n } @else {\n <ng-container>\n <span class=\"d-flex thy-collapse-title\"> {{ thyTitle() }}</span></ng-container\n >\n }\n\n @if (thyExtra()) {\n <div class=\"thy-collapse-extra\">\n <ng-template [ngTemplateOutlet]=\"thyExtra()\"></ng-template>\n </div>\n }\n</div>\n<div class=\"thy-collapse-content\" [@collapseMotion]=\"thyActive() ? 'expanded' : 'hidden'\">\n <div class=\"thy-collapse-content-box\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], animations: [collapseMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
82
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyCollapseItem, isStandalone: true, selector: "thy-collapse-panel, thy-collapse-item", inputs: { thyTitle: { classPropertyName: "thyTitle", publicName: "thyTitle", isSignal: true, isRequired: false, transformFunction: null }, thyActive: { classPropertyName: "thyActive", publicName: "thyActive", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null }, thyHeaderTemplate: { classPropertyName: "thyHeaderTemplate", publicName: "thyHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, thyArrowIcon: { classPropertyName: "thyArrowIcon", publicName: "thyArrowIcon", isSignal: true, isRequired: false, transformFunction: null }, thyExtra: { classPropertyName: "thyExtra", publicName: "thyExtra", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyActive: "thyActiveChange", thyArrowIcon: "thyArrowIconChange", thyActiveChange: "thyActiveChange" }, host: { properties: { "class.thy-collapse-item": "true", "class.thy-collapse-no-arrow": "!showArrow()", "class.thy-collapse-item-active": "thyActive()", "class.thy-collapse-item-disabled": "thyDisabled()" } }, exportAs: ["ThyCollapseComponent"], ngImport: i0, template: "<div class=\"thy-collapse-header\" (click)=\"activeChange($event)\">\n @if (showArrow()) {\n @if (arrowIconTemplate()) {\n <ng-template [ngTemplateOutlet]=\"arrowIconTemplate()\"></ng-template>\n } @else {\n <thy-icon [thyIconName]=\"arrowIcon() || 'angle-right'\" class=\"thy-collapse-icon\" [thyIconRotate]=\"thyActive() ? -90 : 0\"></thy-icon>\n }\n }\n\n @if (thyHeaderTemplate()) {\n <ng-template [ngTemplateOutlet]=\"thyHeaderTemplate()\"></ng-template>\n } @else {\n <ng-container>\n <span class=\"d-flex thy-collapse-title\">{{ thyTitle() }}</span></ng-container\n >\n }\n\n @if (thyExtra()) {\n <div class=\"thy-collapse-extra\">\n <ng-template [ngTemplateOutlet]=\"thyExtra()\"></ng-template>\n </div>\n }\n</div>\n<div class=\"thy-collapse-content\" [@collapseMotion]=\"thyActive() ? 'expanded' : 'hidden'\">\n <div class=\"thy-collapse-content-box\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], animations: [collapseMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
83
83
  }
84
84
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCollapseItem, decorators: [{
85
85
  type: Component,
@@ -88,7 +88,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
88
88
  '[class.thy-collapse-no-arrow]': '!showArrow()',
89
89
  '[class.thy-collapse-item-active]': 'thyActive()',
90
90
  '[class.thy-collapse-item-disabled]': 'thyDisabled()'
91
- }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, ThyIcon], template: "<div class=\"thy-collapse-header\" (click)=\"activeChange($event)\">\n @if (showArrow()) {\n @if (arrowIconTemplate()) {\n <ng-template [ngTemplateOutlet]=\"arrowIconTemplate()\"></ng-template>\n } @else {\n <thy-icon [thyIconName]=\"arrowIcon() || 'angle-right'\" class=\"thy-collapse-icon\" [thyIconRotate]=\"thyActive() ? -90 : 0\"></thy-icon>\n }\n }\n\n @if (thyHeaderTemplate()) {\n <ng-template [ngTemplateOutlet]=\"thyHeaderTemplate()\"></ng-template>\n } @else {\n <ng-container>\n <span class=\"d-flex thy-collapse-title\"> {{ thyTitle() }}</span></ng-container\n >\n }\n\n @if (thyExtra()) {\n <div class=\"thy-collapse-extra\">\n <ng-template [ngTemplateOutlet]=\"thyExtra()\"></ng-template>\n </div>\n }\n</div>\n<div class=\"thy-collapse-content\" [@collapseMotion]=\"thyActive() ? 'expanded' : 'hidden'\">\n <div class=\"thy-collapse-content-box\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
91
+ }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, ThyIcon], template: "<div class=\"thy-collapse-header\" (click)=\"activeChange($event)\">\n @if (showArrow()) {\n @if (arrowIconTemplate()) {\n <ng-template [ngTemplateOutlet]=\"arrowIconTemplate()\"></ng-template>\n } @else {\n <thy-icon [thyIconName]=\"arrowIcon() || 'angle-right'\" class=\"thy-collapse-icon\" [thyIconRotate]=\"thyActive() ? -90 : 0\"></thy-icon>\n }\n }\n\n @if (thyHeaderTemplate()) {\n <ng-template [ngTemplateOutlet]=\"thyHeaderTemplate()\"></ng-template>\n } @else {\n <ng-container>\n <span class=\"d-flex thy-collapse-title\">{{ thyTitle() }}</span></ng-container\n >\n }\n\n @if (thyExtra()) {\n <div class=\"thy-collapse-extra\">\n <ng-template [ngTemplateOutlet]=\"thyExtra()\"></ng-template>\n </div>\n }\n</div>\n<div class=\"thy-collapse-content\" [@collapseMotion]=\"thyActive() ? 'expanded' : 'hidden'\">\n <div class=\"thy-collapse-content-box\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
92
92
  }] });
93
93
 
94
94
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-collapse.mjs","sources":["../../../src/collapse/collapse.token.ts","../../../src/collapse/collapse-item.component.ts","../../../src/collapse/collapse-item.component.html","../../../src/collapse/collapse.component.ts","../../../src/collapse/module.ts","../../../src/collapse/ngx-tethys-collapse.ts"],"sourcesContent":["import { InjectionToken, ModelSignal, OutputEmitterRef } from '@angular/core';\n\nexport interface IThyCollapseItemComponent {\n thyActive: ModelSignal<boolean>;\n thyActiveChange: OutputEmitterRef<{ active: boolean; event: Event }>;\n markForCheck: () => void;\n}\n\nexport interface IThyCollapseComponent {\n addPanel: (value: IThyCollapseItemComponent) => void;\n removePanel: (value: IThyCollapseItemComponent) => void;\n click: (collapseItem: IThyCollapseItemComponent, event: Event) => void;\n}\n\nexport const THY_COLLAPSE_COMPONENT = new InjectionToken<IThyCollapseComponent>('THY_COLLAPSE_COMPONENT');\n","import { collapseMotion } from 'ngx-tethys/core';\n\nimport {\n ChangeDetectorRef,\n Component,\n ChangeDetectionStrategy,\n OnDestroy,\n OnInit,\n TemplateRef,\n inject,\n input,\n output,\n computed,\n model\n} from '@angular/core';\n\nimport { IThyCollapseItemComponent, THY_COLLAPSE_COMPONENT } from './collapse.token';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { coerceBooleanProperty, isString } from 'ngx-tethys/util';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgTemplateOutlet } from '@angular/common';\n\nconst DEFAULT_ARROW_ICON = 'angle-right';\n\n/**\n * 折叠面板项组件\n * @name thy-collapse-panel,thy-collapse-item\n * @order 20\n */\n@Component({\n selector: 'thy-collapse-panel, thy-collapse-item',\n templateUrl: './collapse-item.component.html',\n exportAs: 'ThyCollapseComponent',\n animations: [collapseMotion],\n host: {\n '[class.thy-collapse-item]': 'true',\n '[class.thy-collapse-no-arrow]': '!showArrow()',\n '[class.thy-collapse-item-active]': 'thyActive()',\n '[class.thy-collapse-item-disabled]': 'thyDisabled()'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, ThyIcon]\n})\nexport class ThyCollapseItem implements IThyCollapseItemComponent, OnInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n private thyCollapseComponent = inject(THY_COLLAPSE_COMPONENT, { host: true })!;\n\n /**\n * 标题\n */\n readonly thyTitle = input<string>();\n\n /**\n * 是否处于激活展开状态\n */\n thyActive = model<boolean>(false);\n\n /**\n * 是否禁用当前面板\n */\n readonly thyDisabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 自定义面板头\n */\n readonly thyHeaderTemplate = input<TemplateRef<SafeAny>>();\n\n /**\n * 自定义箭头(展开收起)图标,设置为 false 表示隐藏图标\n */\n thyArrowIcon = model<string | TemplateRef<SafeAny> | boolean>(DEFAULT_ARROW_ICON);\n\n readonly arrowIconTemplate = computed(() => {\n const arrowIcon = this.thyArrowIcon();\n return arrowIcon instanceof TemplateRef ? arrowIcon : null;\n });\n\n readonly arrowIcon = computed(() => {\n const arrowIcon = this.thyArrowIcon();\n return isString(arrowIcon) ? arrowIcon : DEFAULT_ARROW_ICON;\n });\n\n readonly showArrow = computed(() => {\n const arrowIcon = this.thyArrowIcon();\n if (!(arrowIcon instanceof TemplateRef) && !isString(arrowIcon)) {\n return this.thyArrowIcon();\n }\n return true;\n });\n\n /**\n * 额外附加模板\n */\n readonly thyExtra = input<TemplateRef<SafeAny>>();\n\n /**\n * 展开收起事件\n */\n readonly thyActiveChange = output<{ active: boolean; event: Event }>();\n\n ngOnInit() {\n this.thyCollapseComponent.addPanel(this);\n }\n\n markForCheck(): void {\n this.cdr.markForCheck();\n }\n\n activeChange(event: Event) {\n if (!this.thyDisabled()) {\n this.thyCollapseComponent.click(this, event);\n }\n }\n\n ngOnDestroy(): void {\n this.thyCollapseComponent.removePanel(this);\n }\n}\n","<div class=\"thy-collapse-header\" (click)=\"activeChange($event)\">\n @if (showArrow()) {\n @if (arrowIconTemplate()) {\n <ng-template [ngTemplateOutlet]=\"arrowIconTemplate()\"></ng-template>\n } @else {\n <thy-icon [thyIconName]=\"arrowIcon() || 'angle-right'\" class=\"thy-collapse-icon\" [thyIconRotate]=\"thyActive() ? -90 : 0\"></thy-icon>\n }\n }\n\n @if (thyHeaderTemplate()) {\n <ng-template [ngTemplateOutlet]=\"thyHeaderTemplate()\"></ng-template>\n } @else {\n <ng-container>\n <span class=\"d-flex thy-collapse-title\"> {{ thyTitle() }}</span></ng-container\n >\n }\n\n @if (thyExtra()) {\n <div class=\"thy-collapse-extra\">\n <ng-template [ngTemplateOutlet]=\"thyExtra()\"></ng-template>\n </div>\n }\n</div>\n<div class=\"thy-collapse-content\" [@collapseMotion]=\"thyActive() ? 'expanded' : 'hidden'\">\n <div class=\"thy-collapse-content-box\">\n <ng-content></ng-content>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { IThyCollapseItemComponent, IThyCollapseComponent, THY_COLLAPSE_COMPONENT } from './collapse.token';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport type ThyCollapseTheme = 'divided' | 'bordered' | 'ghost';\n\nexport type ThyCollapsedIconPosition = 'left' | 'right';\n\n/**\n * 折叠面板组件\n * @name thy-collapse\n * @order 10\n */\n@Component({\n selector: 'thy-collapse',\n template: `\n <ng-container>\n <ng-content></ng-content>\n </ng-container>\n `,\n host: {\n class: 'thy-collapse',\n '[class.thy-collapse-divided]': `thyTheme() === 'divided'`,\n '[class.thy-collapse-bordered]': `thyTheme() === 'bordered'`,\n '[class.thy-collapse-ghost]': `thyTheme() === 'ghost'`,\n '[class.thy-collapse-icon-position-right]': `thyArrowIconPosition() === 'right'`,\n '[class.thy-collapse-icon-position-left]': `thyArrowIconPosition() === 'left'`\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: THY_COLLAPSE_COMPONENT,\n useExisting: ThyCollapse\n }\n ]\n})\nexport class ThyCollapse implements IThyCollapseComponent {\n /**\n * 折叠面板主题,支持 `divided` | `bordered` | `ghost`\n */\n readonly thyTheme = input<ThyCollapseTheme>('divided');\n\n /**\n * 是否为手风琴模式,手风琴模式下,只能展开一个面板\n */\n readonly thyAccordion = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 展开收起图标的位置,支持 `left` | `right`\n */\n readonly thyArrowIconPosition = input<ThyCollapsedIconPosition>('left');\n\n private listOfCollapsePanelComponent: IThyCollapseItemComponent[] = [];\n\n addPanel(value: IThyCollapseItemComponent): void {\n this.listOfCollapsePanelComponent.push(value);\n }\n\n removePanel(value: IThyCollapseItemComponent): void {\n this.listOfCollapsePanelComponent.splice(this.listOfCollapsePanelComponent.indexOf(value), 1);\n }\n\n click(collapseItem: IThyCollapseItemComponent, event: Event): void {\n if (this.thyAccordion() && !collapseItem.thyActive()) {\n this.listOfCollapsePanelComponent\n .filter(item => item !== collapseItem)\n .forEach(item => {\n if (item.thyActive()) {\n item.thyActive.set(false);\n item.thyActiveChange.emit({ active: collapseItem.thyActive(), event });\n item.markForCheck();\n }\n });\n }\n collapseItem.thyActive.set(!collapseItem.thyActive());\n collapseItem.thyActiveChange.emit({ active: collapseItem.thyActive(), event });\n }\n}\n","import { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyInputModule } from 'ngx-tethys/input';\n\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { ThyCollapseItem } from './collapse-item.component';\nimport { ThyCollapse } from './collapse.component';\n\n@NgModule({\n imports: [CommonModule, FormsModule, OverlayModule, ThyInputModule, ThyIconModule, ThyCollapse, ThyCollapseItem],\n exports: [ThyCollapse, ThyCollapseItem]\n})\nexport class ThyCollapseModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAcO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAwB,wBAAwB,CAAC;;ACQzG,MAAM,kBAAkB,GAAG,aAAa;AAExC;;;;AAIG;MAeU,eAAe,CAAA;AAd5B,IAAA,WAAA,GAAA;AAeY,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAC/B,IAAoB,CAAA,oBAAA,GAAG,MAAM,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAE;AAE9E;;AAEG;QACM,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAU;AAEnC;;AAEG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAU,KAAK,CAAC;AAEjC;;AAEG;QACM,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;AAEzE;;AAEG;QACM,IAAiB,CAAA,iBAAA,GAAG,KAAK,EAAwB;AAE1D;;AAEG;AACH,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAA0C,kBAAkB,CAAC;AAExE,QAAA,IAAA,CAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAK;AACvC,YAAA,MAAM,SAAS,GAAG,IAAI,CA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s","sources":["../../../src/collapse/collapse.token.ts","../../../src/collapse/collapse-item.component.ts","../../../src/collapse/collapse-item.component.html","../../../src/collapse/collapse.component.ts","../../../src/collapse/module.ts","../../../src/collapse/ngx-tethys-collapse.ts"],"sourcesContent":["import { InjectionToken, ModelSignal, OutputEmitterRef } from '@angular/core';\n\nexport interface IThyCollapseItemComponent {\n thyActive: ModelSignal<boolean>;\n thyActiveChange: OutputEmitterRef<{ active: boolean; event: Event }>;\n markForCheck: () => void;\n}\n\nexport interface IThyCollapseComponent {\n addPanel: (value: IThyCollapseItemComponent) => void;\n removePanel: (value: IThyCollapseItemComponent) => void;\n click: (collapseItem: IThyCollapseItemComponent, event: Event) => void;\n}\n\nexport const THY_COLLAPSE_COMPONENT = new InjectionToken<IThyCollapseComponent>('THY_COLLAPSE_COMPONENT');\n","import { collapseMotion } from 'ngx-tethys/core';\n\nimport {\n ChangeDetectorRef,\n Component,\n ChangeDetectionStrategy,\n OnDestroy,\n OnInit,\n TemplateRef,\n inject,\n input,\n output,\n computed,\n model\n} from '@angular/core';\n\nimport { IThyCollapseItemComponent, THY_COLLAPSE_COMPONENT } from './collapse.token';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { coerceBooleanProperty, isString } from 'ngx-tethys/util';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { NgTemplateOutlet } from '@angular/common';\n\nconst DEFAULT_ARROW_ICON = 'angle-right';\n\n/**\n * 折叠面板项组件\n * @name thy-collapse-panel,thy-collapse-item\n * @order 20\n */\n@Component({\n selector: 'thy-collapse-panel, thy-collapse-item',\n templateUrl: './collapse-item.component.html',\n exportAs: 'ThyCollapseComponent',\n animations: [collapseMotion],\n host: {\n '[class.thy-collapse-item]': 'true',\n '[class.thy-collapse-no-arrow]': '!showArrow()',\n '[class.thy-collapse-item-active]': 'thyActive()',\n '[class.thy-collapse-item-disabled]': 'thyDisabled()'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, ThyIcon]\n})\nexport class ThyCollapseItem implements IThyCollapseItemComponent, OnInit, OnDestroy {\n private cdr = inject(ChangeDetectorRef);\n private thyCollapseComponent = inject(THY_COLLAPSE_COMPONENT, { host: true })!;\n\n /**\n * 标题\n */\n readonly thyTitle = input<string>();\n\n /**\n * 是否处于激活展开状态\n */\n thyActive = model<boolean>(false);\n\n /**\n * 是否禁用当前面板\n */\n readonly thyDisabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 自定义面板头\n */\n readonly thyHeaderTemplate = input<TemplateRef<SafeAny>>();\n\n /**\n * 自定义箭头(展开收起)图标,设置为 false 表示隐藏图标\n */\n thyArrowIcon = model<string | TemplateRef<SafeAny> | boolean>(DEFAULT_ARROW_ICON);\n\n readonly arrowIconTemplate = computed(() => {\n const arrowIcon = this.thyArrowIcon();\n return arrowIcon instanceof TemplateRef ? arrowIcon : null;\n });\n\n readonly arrowIcon = computed(() => {\n const arrowIcon = this.thyArrowIcon();\n return isString(arrowIcon) ? arrowIcon : DEFAULT_ARROW_ICON;\n });\n\n readonly showArrow = computed(() => {\n const arrowIcon = this.thyArrowIcon();\n if (!(arrowIcon instanceof TemplateRef) && !isString(arrowIcon)) {\n return this.thyArrowIcon();\n }\n return true;\n });\n\n /**\n * 额外附加模板\n */\n readonly thyExtra = input<TemplateRef<SafeAny>>();\n\n /**\n * 展开收起事件\n */\n readonly thyActiveChange = output<{ active: boolean; event: Event }>();\n\n ngOnInit() {\n this.thyCollapseComponent.addPanel(this);\n }\n\n markForCheck(): void {\n this.cdr.markForCheck();\n }\n\n activeChange(event: Event) {\n if (!this.thyDisabled()) {\n this.thyCollapseComponent.click(this, event);\n }\n }\n\n ngOnDestroy(): void {\n this.thyCollapseComponent.removePanel(this);\n }\n}\n","<div class=\"thy-collapse-header\" (click)=\"activeChange($event)\">\n @if (showArrow()) {\n @if (arrowIconTemplate()) {\n <ng-template [ngTemplateOutlet]=\"arrowIconTemplate()\"></ng-template>\n } @else {\n <thy-icon [thyIconName]=\"arrowIcon() || 'angle-right'\" class=\"thy-collapse-icon\" [thyIconRotate]=\"thyActive() ? -90 : 0\"></thy-icon>\n }\n }\n\n @if (thyHeaderTemplate()) {\n <ng-template [ngTemplateOutlet]=\"thyHeaderTemplate()\"></ng-template>\n } @else {\n <ng-container>\n <span class=\"d-flex thy-collapse-title\">{{ thyTitle() }}</span></ng-container\n >\n }\n\n @if (thyExtra()) {\n <div class=\"thy-collapse-extra\">\n <ng-template [ngTemplateOutlet]=\"thyExtra()\"></ng-template>\n </div>\n }\n</div>\n<div class=\"thy-collapse-content\" [@collapseMotion]=\"thyActive() ? 'expanded' : 'hidden'\">\n <div class=\"thy-collapse-content-box\">\n <ng-content></ng-content>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { IThyCollapseItemComponent, IThyCollapseComponent, THY_COLLAPSE_COMPONENT } from './collapse.token';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport type ThyCollapseTheme = 'divided' | 'bordered' | 'ghost';\n\nexport type ThyCollapsedIconPosition = 'left' | 'right';\n\n/**\n * 折叠面板组件\n * @name thy-collapse\n * @order 10\n */\n@Component({\n selector: 'thy-collapse',\n template: `\n <ng-container>\n <ng-content></ng-content>\n </ng-container>\n `,\n host: {\n class: 'thy-collapse',\n '[class.thy-collapse-divided]': `thyTheme() === 'divided'`,\n '[class.thy-collapse-bordered]': `thyTheme() === 'bordered'`,\n '[class.thy-collapse-ghost]': `thyTheme() === 'ghost'`,\n '[class.thy-collapse-icon-position-right]': `thyArrowIconPosition() === 'right'`,\n '[class.thy-collapse-icon-position-left]': `thyArrowIconPosition() === 'left'`\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: THY_COLLAPSE_COMPONENT,\n useExisting: ThyCollapse\n }\n ]\n})\nexport class ThyCollapse implements IThyCollapseComponent {\n /**\n * 折叠面板主题,支持 `divided` | `bordered` | `ghost`\n */\n readonly thyTheme = input<ThyCollapseTheme>('divided');\n\n /**\n * 是否为手风琴模式,手风琴模式下,只能展开一个面板\n */\n readonly thyAccordion = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 展开收起图标的位置,支持 `left` | `right`\n */\n readonly thyArrowIconPosition = input<ThyCollapsedIconPosition>('left');\n\n private listOfCollapsePanelComponent: IThyCollapseItemComponent[] = [];\n\n addPanel(value: IThyCollapseItemComponent): void {\n this.listOfCollapsePanelComponent.push(value);\n }\n\n removePanel(value: IThyCollapseItemComponent): void {\n this.listOfCollapsePanelComponent.splice(this.listOfCollapsePanelComponent.indexOf(value), 1);\n }\n\n click(collapseItem: IThyCollapseItemComponent, event: Event): void {\n if (this.thyAccordion() && !collapseItem.thyActive()) {\n this.listOfCollapsePanelComponent\n .filter(item => item !== collapseItem)\n .forEach(item => {\n if (item.thyActive()) {\n item.thyActive.set(false);\n item.thyActiveChange.emit({ active: collapseItem.thyActive(), event });\n item.markForCheck();\n }\n });\n }\n collapseItem.thyActive.set(!collapseItem.thyActive());\n collapseItem.thyActiveChange.emit({ active: collapseItem.thyActive(), event });\n }\n}\n","import { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyInputModule } from 'ngx-tethys/input';\n\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { ThyCollapseItem } from './collapse-item.component';\nimport { ThyCollapse } from './collapse.component';\n\n@NgModule({\n imports: [CommonModule, FormsModule, OverlayModule, ThyInputModule, ThyIconModule, ThyCollapse, ThyCollapseItem],\n exports: [ThyCollapse, ThyCollapseItem]\n})\nexport class ThyCollapseModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAcO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAwB,wBAAwB,CAAC;;ACQzG,MAAM,kBAAkB,GAAG,aAAa;AAExC;;;;AAIG;MAeU,eAAe,CAAA;AAd5B,IAAA,WAA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A,IAAA,EAAA,iBAAiB,YAHhB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,CACrG,EAAA,OAAA,EAAA,CAAA,WAAW,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;+GAE7B,iBAAiB,EAAA,OAAA,EAAA,CAHhB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAe,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAGtG,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,CAAC;AAChH,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe;AACzC,iBAAA;;;ACdD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, HostListener, Output, Directive, Renderer2, input, viewChild, output, effect, HostBinding, ChangeDetectionStrategy, Component, ViewChild, computed, signal, model, ViewContainerRef, NgZone, numberAttribute, forwardRef, Input, NgModule } from '@angular/core';
2
+ import { inject, ElementRef, output, HostListener, Directive, Renderer2, input, viewChild, effect, HostBinding, ChangeDetectionStrategy, Component, ViewChild, computed, signal, model, ViewContainerRef, NgZone, numberAttribute, forwardRef, Input, NgModule } from '@angular/core';
3
3
  import { Subject, fromEvent } from 'rxjs';
4
4
  import { distinctUntilChanged, takeUntil } from 'rxjs/operators';
5
5
  import * as i1 from '@angular/forms';
@@ -490,7 +490,7 @@ class ThyColor {
490
490
  class ThyCoordinatesDirective {
491
491
  constructor() {
492
492
  this.el = inject(ElementRef);
493
- this.coordinatesChange = new Subject();
493
+ this.coordinatesChange = output();
494
494
  this.mousechange = new Subject();
495
495
  this.mouseListening = false;
496
496
  }
@@ -518,7 +518,7 @@ class ThyCoordinatesDirective {
518
518
  const containerHeight = this.el.nativeElement.clientHeight;
519
519
  const left = x - (this.el.nativeElement.getBoundingClientRect().left + window.pageXOffset);
520
520
  const top = y - (this.el.nativeElement.getBoundingClientRect().top + window.pageYOffset);
521
- this.coordinatesChange.next({
521
+ this.coordinatesChange.emit({
522
522
  x,
523
523
  y,
524
524
  top,
@@ -539,9 +539,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
539
539
  args: [{
540
540
  selector: '[thyColorCoordinates]'
541
541
  }]
542
- }], propDecorators: { coordinatesChange: [{
543
- type: Output
544
- }], mousedown: [{
542
+ }], propDecorators: { mousedown: [{
545
543
  type: HostListener,
546
544
  args: ['mousedown', ['$event', '$event.pageX', '$event.pageY']]
547
545
  }], mousemove: [{