ngx-tethys 19.0.16 → 19.1.0-next.1

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 (322) hide show
  1. package/CHANGELOG.md +31 -11
  2. package/README.md +0 -1
  3. package/action/action.component.d.ts +14 -23
  4. package/action/actions.component.d.ts +5 -7
  5. package/affix/affix.component.d.ts +9 -13
  6. package/alert/alert.component.d.ts +1 -1
  7. package/anchor/anchor-link.component.d.ts +8 -8
  8. package/anchor/anchor.component.d.ts +15 -21
  9. package/arrow-switcher/arrow-switcher.component.d.ts +15 -22
  10. package/autocomplete/autocomplete.component.d.ts +10 -17
  11. package/autocomplete/autocomplete.trigger.directive.d.ts +10 -18
  12. package/avatar/avatar-list/avatar-list.component.d.ts +8 -14
  13. package/avatar/avatar.component.d.ts +25 -39
  14. package/back-top/back-top.component.d.ts +9 -12
  15. package/badge/badge.component.d.ts +19 -59
  16. package/breadcrumb/breadcrumb.component.d.ts +15 -20
  17. package/button/button-group.component.d.ts +5 -12
  18. package/button/button-icon.component.d.ts +14 -27
  19. package/button/button.component.d.ts +17 -26
  20. package/calendar/calendar-header.component.d.ts +9 -8
  21. package/calendar/calendar.component.d.ts +16 -16
  22. package/card/card.component.d.ts +5 -11
  23. package/card/content.component.d.ts +3 -8
  24. package/card/header.component.d.ts +7 -8
  25. package/carousel/carousel.component.d.ts +22 -27
  26. package/cascader/cascader-li.component.d.ts +13 -21
  27. package/cascader/cascader-search-option.component.d.ts +8 -16
  28. package/cascader/cascader.component.d.ts +58 -80
  29. package/checkbox/checkbox.component.d.ts +2 -5
  30. package/collapse/collapse-item.component.d.ts +12 -19
  31. package/collapse/collapse.component.d.ts +6 -12
  32. package/collapse/collapse.token.d.ts +3 -3
  33. package/color-picker/color-picker-custom-panel.component.d.ts +5 -5
  34. package/color-picker/color-picker-panel.component.d.ts +7 -11
  35. package/color-picker/color-picker.component.d.ts +19 -35
  36. package/color-picker/parts/alpha/alpha.component.d.ts +8 -8
  37. package/color-picker/parts/hue/hue.component.d.ts +6 -6
  38. package/color-picker/parts/indicator/indicator.component.d.ts +4 -3
  39. package/color-picker/parts/inputs/inputs.component.d.ts +9 -9
  40. package/color-picker/parts/saturation/saturation.component.d.ts +9 -9
  41. package/comment/comment.component.d.ts +4 -5
  42. package/copy/copy.directive.d.ts +8 -9
  43. package/date-picker/abstract-picker.component.d.ts +8 -7
  44. package/date-picker/lib/calendar/calendar-footer.component.d.ts +2 -1
  45. package/date-picker/lib/popups/inner-popup.component.d.ts +2 -1
  46. package/date-picker/picker.component.d.ts +2 -1
  47. package/date-range/date-range.component.d.ts +2 -2
  48. package/dialog/body/dialog-body.component.d.ts +2 -6
  49. package/dialog/confirm/confirm.component.d.ts +2 -2
  50. package/dialog/footer/dialog-footer.component.d.ts +6 -9
  51. package/dialog/header/dialog-header.component.d.ts +9 -11
  52. package/divider/divider.component.d.ts +12 -16
  53. package/dot/dot.component.d.ts +5 -13
  54. package/drag-drop/drag-handle.directive.d.ts +2 -1
  55. package/drag-drop/drag.directive.d.ts +2 -1
  56. package/drag-drop/drop-container.directive.d.ts +2 -1
  57. package/dropdown/dropdown-active.directive.d.ts +4 -5
  58. package/dropdown/dropdown-menu-item.directive.d.ts +7 -14
  59. package/dropdown/dropdown-menu.component.d.ts +6 -12
  60. package/dropdown/dropdown-submenu.component.d.ts +2 -4
  61. package/dropdown/dropdown.directive.d.ts +14 -24
  62. package/empty/empty.component.d.ts +21 -27
  63. package/fesm2022/ngx-tethys-action.mjs +63 -101
  64. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  65. package/fesm2022/ngx-tethys-affix.mjs +40 -41
  66. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  67. package/fesm2022/ngx-tethys-anchor.mjs +91 -118
  68. package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
  69. package/fesm2022/ngx-tethys-arrow-switcher.mjs +51 -77
  70. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  71. package/fesm2022/ngx-tethys-autocomplete.mjs +69 -103
  72. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  73. package/fesm2022/ngx-tethys-avatar.mjs +117 -162
  74. package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
  75. package/fesm2022/ngx-tethys-back-top.mjs +33 -46
  76. package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-badge.mjs +104 -208
  78. package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
  79. package/fesm2022/ngx-tethys-breadcrumb.mjs +66 -70
  80. package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
  81. package/fesm2022/ngx-tethys-button.mjs +225 -322
  82. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  83. package/fesm2022/ngx-tethys-calendar.mjs +85 -87
  84. package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
  85. package/fesm2022/ngx-tethys-card.mjs +72 -77
  86. package/fesm2022/ngx-tethys-card.mjs.map +1 -1
  87. package/fesm2022/ngx-tethys-carousel.mjs +83 -99
  88. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  89. package/fesm2022/ngx-tethys-cascader.mjs +313 -468
  90. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  91. package/fesm2022/ngx-tethys-checkbox.mjs +10 -17
  92. package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
  93. package/fesm2022/ngx-tethys-collapse.mjs +66 -71
  94. package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
  95. package/fesm2022/ngx-tethys-color-picker.mjs +187 -246
  96. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  97. package/fesm2022/ngx-tethys-comment.mjs +16 -10
  98. package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
  99. package/fesm2022/ngx-tethys-copy.mjs +25 -28
  100. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  101. package/fesm2022/ngx-tethys-dialog.mjs +81 -82
  102. package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
  103. package/fesm2022/ngx-tethys-divider.mjs +49 -58
  104. package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
  105. package/fesm2022/ngx-tethys-dot.mjs +45 -68
  106. package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
  107. package/fesm2022/ngx-tethys-dropdown.mjs +155 -203
  108. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  109. package/fesm2022/ngx-tethys-empty.mjs +107 -95
  110. package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
  111. package/fesm2022/ngx-tethys-flexible-text.mjs +67 -86
  112. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  113. package/fesm2022/ngx-tethys-form.mjs +161 -200
  114. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  115. package/fesm2022/ngx-tethys-fullscreen.mjs +21 -23
  116. package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
  117. package/fesm2022/ngx-tethys-grid.mjs +161 -158
  118. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  119. package/fesm2022/ngx-tethys-i18n.mjs +25 -25
  120. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  121. package/fesm2022/ngx-tethys-icon.mjs +44 -59
  122. package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
  123. package/fesm2022/ngx-tethys-image.mjs +40 -36
  124. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  125. package/fesm2022/ngx-tethys-input-number.mjs +101 -114
  126. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  127. package/fesm2022/ngx-tethys-input.mjs +268 -271
  128. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  129. package/fesm2022/ngx-tethys-list.mjs +1 -1
  130. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  131. package/fesm2022/ngx-tethys-loading.mjs +17 -35
  132. package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
  133. package/fesm2022/ngx-tethys-mention.mjs +52 -74
  134. package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
  135. package/fesm2022/ngx-tethys-menu.mjs +106 -179
  136. package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
  137. package/fesm2022/ngx-tethys-nav.mjs +169 -201
  138. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  139. package/fesm2022/ngx-tethys-pagination.mjs +230 -294
  140. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  141. package/fesm2022/ngx-tethys-popover.mjs +67 -70
  142. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  143. package/fesm2022/ngx-tethys-progress.mjs +194 -246
  144. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  145. package/fesm2022/ngx-tethys-property.mjs +99 -113
  146. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  147. package/fesm2022/ngx-tethys-radio.mjs +60 -76
  148. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  149. package/fesm2022/ngx-tethys-rate.mjs +115 -157
  150. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  151. package/fesm2022/ngx-tethys-resizable.mjs +111 -157
  152. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  153. package/fesm2022/ngx-tethys-result.mjs +46 -28
  154. package/fesm2022/ngx-tethys-result.mjs.map +1 -1
  155. package/fesm2022/ngx-tethys-segment.mjs +84 -103
  156. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  157. package/fesm2022/ngx-tethys-skeleton.mjs +339 -342
  158. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  159. package/fesm2022/ngx-tethys-slide.mjs +37 -56
  160. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  161. package/fesm2022/ngx-tethys-slider.mjs +75 -108
  162. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  163. package/fesm2022/ngx-tethys-space.mjs +25 -51
  164. package/fesm2022/ngx-tethys-space.mjs.map +1 -1
  165. package/fesm2022/ngx-tethys-statistic.mjs +114 -151
  166. package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
  167. package/fesm2022/ngx-tethys-stepper.mjs +74 -107
  168. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  169. package/fesm2022/ngx-tethys-strength.mjs +52 -66
  170. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  171. package/fesm2022/ngx-tethys-switch.mjs +80 -140
  172. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  173. package/fesm2022/ngx-tethys-table.mjs +1 -1
  174. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  175. package/fesm2022/ngx-tethys-tabs.mjs +69 -87
  176. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  177. package/fesm2022/ngx-tethys-tag.mjs +42 -64
  178. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  179. package/fesm2022/ngx-tethys-timeline.mjs +104 -129
  180. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  181. package/fesm2022/ngx-tethys-transfer.mjs +98 -119
  182. package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
  183. package/fesm2022/ngx-tethys-tree-select.mjs +2 -4
  184. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  185. package/fesm2022/ngx-tethys-tree.mjs +281 -401
  186. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  187. package/fesm2022/ngx-tethys-typography.mjs +36 -33
  188. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  189. package/fesm2022/ngx-tethys-upload.mjs +93 -132
  190. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  191. package/fesm2022/ngx-tethys-util.mjs.map +1 -1
  192. package/fesm2022/ngx-tethys-vote.mjs +53 -99
  193. package/fesm2022/ngx-tethys-vote.mjs.map +1 -1
  194. package/fesm2022/ngx-tethys-watermark.mjs +36 -40
  195. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  196. package/fesm2022/ngx-tethys.mjs +1 -1
  197. package/fesm2022/ngx-tethys.mjs.map +1 -1
  198. package/flexible-text/flexible-text.component.d.ts +9 -15
  199. package/form/form-group-error/form-group-error.component.d.ts +2 -3
  200. package/form/form-group-label.directive.d.ts +2 -1
  201. package/form/form-group.component.d.ts +17 -24
  202. package/form/form-submit.directive.d.ts +2 -2
  203. package/form/form.directive.d.ts +6 -8
  204. package/form/from-group-footer/form-group-footer.component.d.ts +2 -2
  205. package/form/validator/confirm-validator.directive.d.ts +2 -2
  206. package/form/validator/unique-validator.directive.d.ts +2 -2
  207. package/fullscreen/fullscreen.component.d.ts +7 -7
  208. package/grid/flex.d.ts +13 -20
  209. package/grid/thy-col.directive.d.ts +6 -9
  210. package/grid/thy-grid-item.component.d.ts +3 -4
  211. package/grid/thy-grid.component.d.ts +11 -12
  212. package/grid/thy-row.directive.d.ts +11 -14
  213. package/icon/icon.component.d.ts +10 -17
  214. package/image/image.directive.d.ts +10 -12
  215. package/image/image.token.d.ts +5 -5
  216. package/input/input-count.component.d.ts +4 -5
  217. package/input/input-group.component.d.ts +20 -20
  218. package/input/input-search.component.d.ts +15 -20
  219. package/input/input.component.d.ts +20 -21
  220. package/input/input.directive.d.ts +4 -6
  221. package/input-number/input-number.component.d.ts +21 -29
  222. package/layout/header.component.d.ts +4 -9
  223. package/layout/sidebar-header.component.d.ts +2 -1
  224. package/layout/sidebar.component.d.ts +8 -7
  225. package/list/list.component.d.ts +2 -1
  226. package/list/selection/selection-list.d.ts +4 -3
  227. package/loading/loading.component.d.ts +4 -10
  228. package/mention/mention.directive.d.ts +6 -7
  229. package/mention/suggestions/suggestions.component.d.ts +8 -9
  230. package/menu/group/menu-group.component.d.ts +16 -33
  231. package/menu/item/action/menu-item-action.component.d.ts +7 -8
  232. package/menu/item/icon/menu-item-icon.component.d.ts +2 -2
  233. package/menu/item/menu-item.component.d.ts +4 -4
  234. package/menu/item/name/menu-item-name.component.d.ts +2 -3
  235. package/menu/menu.component.d.ts +3 -7
  236. package/nav/icon-nav/icon-nav-link.directive.d.ts +3 -7
  237. package/nav/icon-nav/icon-nav.component.d.ts +3 -8
  238. package/nav/nav-ink-bar.directive.d.ts +4 -6
  239. package/nav/nav-item.directive.d.ts +7 -10
  240. package/nav/nav.component.d.ts +20 -48
  241. package/package.json +1 -1
  242. package/pagination/pagination.component.d.ts +48 -109
  243. package/popover/header/popover-header.component.d.ts +7 -6
  244. package/popover/popover.directive.d.ts +11 -18
  245. package/progress/progress-circle.component.d.ts +35 -26
  246. package/progress/progress-strip.component.d.ts +10 -14
  247. package/progress/progress.component.d.ts +16 -26
  248. package/property/examples/single/single.component.scss +6 -0
  249. package/property/properties.component.d.ts +6 -15
  250. package/property/property-item.component.d.ts +22 -34
  251. package/property/styles/properties.scss +124 -52
  252. package/property-operation/property-operation.component.d.ts +6 -5
  253. package/radio/button/radio-button.component.d.ts +2 -2
  254. package/radio/group/radio-group.component.d.ts +13 -16
  255. package/radio/radio.component.d.ts +2 -2
  256. package/radio/radio.token.d.ts +2 -2
  257. package/rate/rate-item.component.d.ts +8 -10
  258. package/rate/rate.component.d.ts +20 -30
  259. package/resizable/resizable.directive.d.ts +18 -36
  260. package/resizable/resize-handle.component.d.ts +6 -6
  261. package/resizable/resize-handles.component.d.ts +5 -8
  262. package/result/result.component.d.ts +9 -10
  263. package/schematics/version.d.ts +1 -1
  264. package/schematics/version.js +1 -1
  265. package/segment/segment-item.component.d.ts +9 -14
  266. package/segment/segment.component.d.ts +11 -14
  267. package/segment/segment.token.d.ts +4 -3
  268. package/select/custom-select/custom-select.component.d.ts +11 -10
  269. package/select/native-select/native-select.component.d.ts +2 -1
  270. package/shared/base-form-check.component.d.ts +3 -2
  271. package/shared/directives/thy-autofocus.directive.d.ts +3 -2
  272. package/shared/directives/thy-scroll.directive.d.ts +2 -1
  273. package/shared/directives/thy-show.d.ts +2 -1
  274. package/shared/option/group/option-group.component.d.ts +2 -1
  275. package/shared/option/list-option/list-option.component.d.ts +2 -7
  276. package/shared/option/option.component.d.ts +2 -1
  277. package/shared/select/select-control/select-control.component.d.ts +7 -6
  278. package/skeleton/skeleton-circle.component.d.ts +16 -19
  279. package/skeleton/skeleton-rectangle.component.d.ts +20 -23
  280. package/skeleton/skeleton.component.d.ts +5 -6
  281. package/skeleton/stylized/bullet-list.component.d.ts +11 -13
  282. package/skeleton/stylized/list.component.d.ts +10 -12
  283. package/skeleton/stylized/paragraph.component.d.ts +12 -14
  284. package/slide/slide-body/slide-body-section.component.d.ts +2 -5
  285. package/slide/slide-header/slide-header.component.d.ts +6 -9
  286. package/slider/slider.component.d.ts +17 -24
  287. package/space/space.component.d.ts +10 -16
  288. package/statistic/statistic.component.d.ts +35 -40
  289. package/stepper/step-header.component.d.ts +6 -10
  290. package/stepper/step.component.d.ts +6 -6
  291. package/stepper/stepper.component.d.ts +15 -20
  292. package/strength/strength.component.d.ts +8 -13
  293. package/switch/switch.component.d.ts +24 -35
  294. package/table/table-column.component.d.ts +6 -5
  295. package/table/table-skeleton.component.d.ts +3 -10
  296. package/table/table.component.d.ts +11 -10
  297. package/tabs/tab-content.component.d.ts +4 -4
  298. package/tabs/tab.component.d.ts +4 -5
  299. package/tabs/tabs.component.d.ts +13 -15
  300. package/tag/tag.component.d.ts +10 -16
  301. package/time-picker/time-picker-panel.component.d.ts +3 -2
  302. package/time-picker/time-picker.component.d.ts +6 -5
  303. package/timeline/timeline-item.component.d.ts +9 -13
  304. package/timeline/timeline.component.d.ts +13 -17
  305. package/tooltip/tooltip.directive.d.ts +3 -2
  306. package/transfer/transfer-list.component.d.ts +15 -15
  307. package/transfer/transfer.component.d.ts +20 -23
  308. package/tree/tree-abstract.d.ts +5 -5
  309. package/tree/tree-node.component.d.ts +24 -46
  310. package/tree/tree.class.d.ts +4 -4
  311. package/tree/tree.component.d.ts +47 -74
  312. package/tree/tree.service.d.ts +3 -4
  313. package/tree-select/tree-select.component.d.ts +10 -9
  314. package/typography/bg-color.directive.d.ts +3 -3
  315. package/typography/text/text.component.d.ts +2 -2
  316. package/typography/text-color.directive.d.ts +3 -3
  317. package/upload/file-drop.directive.d.ts +9 -11
  318. package/upload/file-select-base.d.ts +6 -10
  319. package/upload/file-select.component.d.ts +10 -20
  320. package/util/helpers/helpers.d.ts +2 -1
  321. package/vote/vote.component.d.ts +13 -32
  322. package/watermark/watermark.directive.d.ts +7 -9
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, NgZone, Injectable, ElementRef, Renderer2, ChangeDetectorRef, EventEmitter, DestroyRef, numberAttribute, Output, Input, Directive, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
2
+ import { inject, NgZone, Injectable, ElementRef, Renderer2, input, numberAttribute, output, signal, DestroyRef, afterNextRender, Directive, ChangeDetectionStrategy, Component, computed, NgModule } from '@angular/core';
3
3
  import { DOCUMENT, CommonModule } from '@angular/common';
4
4
  import { isTouchEvent, coerceBooleanProperty } from 'ngx-tethys/util';
5
5
  import { Subject, fromEvent, merge } from 'rxjs';
@@ -95,109 +95,113 @@ class ThyResizableDirective {
95
95
  this.platform = inject(Platform);
96
96
  this.ngZone = inject(NgZone);
97
97
  this.thyResizableService = inject(ThyResizableService);
98
- this.changeDetectorRef = inject(ChangeDetectorRef);
99
98
  /**
100
99
  * 调整尺寸的边界
101
100
  * @default parent
102
101
  * @type 'window' | 'parent' | ElementRef<HTMLElement>
103
102
  */
104
- this.thyBounds = 'parent';
103
+ this.thyBounds = input('parent');
104
+ /**
105
+ * 最大高度(超过边界部分忽略)
106
+ */
107
+ this.thyMaxHeight = input(undefined, { transform: numberAttribute });
108
+ /**
109
+ * 最大宽度(超过边界部分忽略)
110
+ */
111
+ this.thyMaxWidth = input(undefined, { transform: numberAttribute });
105
112
  /**
106
113
  * 最小高度
107
114
  */
108
- this.thyMinHeight = 40;
115
+ this.thyMinHeight = input(40, { transform: numberAttribute });
109
116
  /**
110
117
  * 最小宽度
111
118
  */
112
- this.thyMinWidth = 40;
119
+ this.thyMinWidth = input(40, { transform: numberAttribute });
113
120
  /**
114
121
  * 栅格列数(-1 为不栅格)
115
122
  */
116
- this.thyGridColumnCount = -1;
123
+ this.thyGridColumnCount = input(-1, { transform: numberAttribute });
117
124
  /**
118
125
  * 栅格最大列数
119
126
  */
120
- this.thyMaxColumn = -1;
127
+ this.thyMaxColumn = input(-1, { transform: numberAttribute });
121
128
  /**
122
129
  * 栅格最小列数
123
130
  */
124
- this.thyMinColumn = -1;
131
+ this.thyMinColumn = input(-1, { transform: numberAttribute });
125
132
  /**
126
133
  * 锁定宽高比
127
134
  */
128
- this.thyLockAspectRatio = false;
135
+ this.thyLockAspectRatio = input(false, { transform: coerceBooleanProperty });
129
136
  /**
130
137
  * 是否预览模式
131
138
  */
132
- this.thyPreview = false;
139
+ this.thyPreview = input(false, { transform: coerceBooleanProperty });
133
140
  /**
134
141
  * 是否禁用调整大小
135
142
  */
136
- this.thyDisabled = false;
143
+ this.thyDisabled = input(false, { transform: coerceBooleanProperty });
137
144
  /**
138
145
  * 调整尺寸时的事件
139
146
  */
140
- this.thyResize = new EventEmitter();
147
+ this.thyResize = output();
141
148
  /**
142
149
  * 开始调整尺寸时的事件
143
150
  */
144
- this.thyResizeStart = new EventEmitter();
151
+ this.thyResizeStart = output();
145
152
  /**
146
153
  * 结束调整尺寸时的事件
147
154
  */
148
- this.thyResizeEnd = new EventEmitter();
149
- this.resizing = false;
155
+ this.thyResizeEnd = output();
156
+ this.resizing = signal(false);
150
157
  this.sizeCache = null;
151
158
  this.ghostElement = null;
152
159
  this.currentHandleEvent = null;
153
160
  this.destroyRef = inject(DestroyRef);
154
161
  this.thyResizableService.handleMouseDownOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {
155
- if (this.thyDisabled) {
162
+ if (this.thyDisabled()) {
156
163
  return;
157
164
  }
158
- this.resizing = true;
165
+ this.resizing.set(true);
159
166
  const { mouseEvent } = event;
160
167
  this.thyResizableService.startResizing(mouseEvent);
161
168
  this.currentHandleEvent = event;
162
169
  this.setCursor();
163
170
  // Re-enter the Angular zone and run the change detection only if there're any `thyResizeStart` listeners,
164
171
  // e.g.: `<div thyResizable (thyResizeStart)="..."></div>`.
165
- if (this.thyResizeStart.observers.length) {
166
- this.ngZone.run(() => this.thyResizeStart.emit({ mouseEvent }));
167
- }
172
+ this.ngZone.run(() => this.thyResizeStart.emit({ mouseEvent }));
168
173
  this.nativeElementRect = this.nativeElement.getBoundingClientRect();
169
174
  });
170
175
  this.thyResizableService.documentMouseUpOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {
171
- if (this.resizing) {
176
+ if (this.resizing()) {
172
177
  this.ngZone.run(() => {
173
- this.resizing = false;
174
- this.changeDetectorRef.markForCheck();
178
+ this.resizing.set(false);
175
179
  });
176
180
  this.thyResizableService.documentMouseUpOutsideAngular$.next(event);
177
181
  this.endResize(event);
178
182
  }
179
183
  });
180
184
  this.thyResizableService.documentMouseMoveOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {
181
- if (this.resizing) {
185
+ if (this.resizing()) {
182
186
  this.resize(event);
183
187
  }
184
188
  });
185
- }
186
- ngAfterViewInit() {
187
- if (!this.platform.isBrowser) {
188
- return;
189
- }
190
- this.nativeElement = this.elementRef.nativeElement;
191
- this.ngZone.runOutsideAngular(() => {
192
- fromEvent(this.nativeElement, 'mouseenter')
193
- .pipe(takeUntilDestroyed(this.destroyRef))
194
- .subscribe(() => {
195
- this.thyResizableService.mouseEnteredOutsideAngular$.next(true);
196
- });
197
- fromEvent(this.nativeElement, 'mouseleave')
198
- .pipe(takeUntilDestroyed(this.destroyRef))
199
- .subscribe(() => {
200
- this.thyResizableService.mouseEnteredOutsideAngular$.next(false);
189
+ afterNextRender(() => {
190
+ if (!this.platform.isBrowser) {
191
+ return;
192
+ }
193
+ this.nativeElement = this.elementRef.nativeElement;
194
+ this.ngZone.runOutsideAngular(() => {
195
+ fromEvent(this.nativeElement, 'mouseenter')
196
+ .pipe(takeUntilDestroyed(this.destroyRef))
197
+ .subscribe(() => {
198
+ this.thyResizableService.mouseEnteredOutsideAngular$.next(true);
199
+ });
200
+ fromEvent(this.nativeElement, 'mouseleave')
201
+ .pipe(takeUntilDestroyed(this.destroyRef))
202
+ .subscribe(() => {
203
+ this.thyResizableService.mouseEnteredOutsideAngular$.next(false);
204
+ });
201
205
  });
202
206
  });
203
207
  }
@@ -234,14 +238,12 @@ class ThyResizableDirective {
234
238
  };
235
239
  // Re-enter the Angular zone and run the change detection only if there're any `thyResizeEnd` listeners,
236
240
  // e.g.: `<div thyResizable (thyResizeEnd)="..."></div>`.
237
- if (this.thyResizeEnd.observers.length) {
238
- this.ngZone.run(() => {
239
- this.thyResizeEnd.emit({
240
- ...size,
241
- mouseEvent: event
242
- });
241
+ this.ngZone.run(() => {
242
+ this.thyResizeEnd.emit({
243
+ ...size,
244
+ mouseEvent: event
243
245
  });
244
- }
246
+ });
245
247
  this.sizeCache = null;
246
248
  this.currentHandleEvent = null;
247
249
  }
@@ -251,7 +253,7 @@ class ThyResizableDirective {
251
253
  const handleEvent = getEventWithPoint(this.currentHandleEvent.mouseEvent);
252
254
  let width = nativeElementRect.width;
253
255
  let height = nativeElementRect.height;
254
- const ratio = this.thyLockAspectRatio ? width / height : -1;
256
+ const ratio = this.thyLockAspectRatio() ? width / height : -1;
255
257
  switch (this.currentHandleEvent.direction) {
256
258
  case 'bottomRight':
257
259
  width = resizeEvent.clientX - nativeElementRect.left;
@@ -285,15 +287,13 @@ class ThyResizableDirective {
285
287
  this.sizeCache = { ...size };
286
288
  // Re-enter the Angular zone and run the change detection only if there're any `thyResize` listeners,
287
289
  // e.g.: `<div thyResizable (thyResize)="..."></div>`.
288
- if (this.thyResize.observers.length) {
289
- this.ngZone.run(() => {
290
- this.thyResize.emit({
291
- ...size,
292
- mouseEvent: event
293
- });
290
+ this.ngZone.run(() => {
291
+ this.thyResize.emit({
292
+ ...size,
293
+ mouseEvent: event
294
294
  });
295
- }
296
- if (this.thyPreview) {
295
+ });
296
+ if (this.thyPreview()) {
297
297
  this.previewResize(size);
298
298
  }
299
299
  }
@@ -304,10 +304,11 @@ class ThyResizableDirective {
304
304
  let maxHeight;
305
305
  let col = 0;
306
306
  let spanWidth = 0;
307
- let minWidth = this.thyMinWidth;
307
+ let minWidth = this.thyMinWidth();
308
308
  let boundWidth = Infinity;
309
309
  let boundHeight = Infinity;
310
- if (this.thyBounds === 'parent') {
310
+ const bounds = this.thyBounds();
311
+ if (bounds === 'parent') {
311
312
  const parent = this.renderer.parentNode(this.nativeElement);
312
313
  if (parent instanceof HTMLElement) {
313
314
  const parentRect = parent.getBoundingClientRect();
@@ -315,45 +316,49 @@ class ThyResizableDirective {
315
316
  boundHeight = parentRect.height;
316
317
  }
317
318
  }
318
- else if (this.thyBounds === 'window') {
319
+ else if (bounds === 'window') {
319
320
  if (typeof window !== 'undefined') {
320
321
  boundWidth = window.innerWidth;
321
322
  boundHeight = window.innerHeight;
322
323
  }
323
324
  }
324
- else if (this.thyBounds && this.thyBounds.nativeElement && this.thyBounds.nativeElement instanceof HTMLElement) {
325
- const boundsRect = this.thyBounds.nativeElement.getBoundingClientRect();
325
+ else if (bounds && bounds.nativeElement && bounds.nativeElement instanceof HTMLElement) {
326
+ const boundsRect = bounds.nativeElement.getBoundingClientRect();
326
327
  boundWidth = boundsRect.width;
327
328
  boundHeight = boundsRect.height;
328
329
  }
329
- maxWidth = ensureInBounds(this.thyMaxWidth, boundWidth);
330
- maxHeight = ensureInBounds(this.thyMaxHeight, boundHeight);
331
- if (this.thyGridColumnCount !== -1) {
332
- spanWidth = maxWidth / this.thyGridColumnCount;
333
- minWidth = this.thyMinColumn !== -1 ? spanWidth * this.thyMinColumn : minWidth;
334
- maxWidth = this.thyMaxColumn !== -1 ? spanWidth * this.thyMaxColumn : maxWidth;
330
+ maxWidth = ensureInBounds(this.thyMaxWidth(), boundWidth);
331
+ maxHeight = ensureInBounds(this.thyMaxHeight(), boundHeight);
332
+ const gridColumnCount = this.thyGridColumnCount();
333
+ if (gridColumnCount !== -1) {
334
+ spanWidth = maxWidth / gridColumnCount;
335
+ const minColumn = this.thyMinColumn();
336
+ minWidth = minColumn !== -1 ? spanWidth * minColumn : minWidth;
337
+ const maxColumn = this.thyMaxColumn();
338
+ maxWidth = maxColumn !== -1 ? spanWidth * maxColumn : maxWidth;
335
339
  }
340
+ const minHeight = this.thyMinHeight();
336
341
  if (ratio !== -1) {
337
342
  if (/(left|right)/i.test(this.currentHandleEvent.direction)) {
338
343
  newWidth = Math.min(Math.max(width, minWidth), maxWidth);
339
- newHeight = Math.min(Math.max(newWidth / ratio, this.thyMinHeight), maxHeight);
340
- if (newHeight >= maxHeight || newHeight <= this.thyMinHeight) {
344
+ newHeight = Math.min(Math.max(newWidth / ratio, minHeight), maxHeight);
345
+ if (newHeight >= maxHeight || newHeight <= minHeight) {
341
346
  newWidth = Math.min(Math.max(newHeight * ratio, minWidth), maxWidth);
342
347
  }
343
348
  }
344
349
  else {
345
- newHeight = Math.min(Math.max(height, this.thyMinHeight), maxHeight);
350
+ newHeight = Math.min(Math.max(height, minHeight), maxHeight);
346
351
  newWidth = Math.min(Math.max(newHeight * ratio, minWidth), maxWidth);
347
352
  if (newWidth >= maxWidth || newWidth <= minWidth) {
348
- newHeight = Math.min(Math.max(newWidth / ratio, this.thyMinHeight), maxHeight);
353
+ newHeight = Math.min(Math.max(newWidth / ratio, minHeight), maxHeight);
349
354
  }
350
355
  }
351
356
  }
352
357
  else {
353
358
  newWidth = Math.min(Math.max(width, minWidth), maxWidth);
354
- newHeight = Math.min(Math.max(height, this.thyMinHeight), maxHeight);
359
+ newHeight = Math.min(Math.max(height, minHeight), maxHeight);
355
360
  }
356
- if (this.thyGridColumnCount !== -1) {
361
+ if (gridColumnCount !== -1) {
357
362
  col = Math.round(newWidth / spanWidth);
358
363
  newWidth = col * spanWidth;
359
364
  }
@@ -385,7 +390,7 @@ class ThyResizableDirective {
385
390
  this.sizeCache = null;
386
391
  }
387
392
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyResizableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
388
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.8", type: ThyResizableDirective, isStandalone: true, selector: "[thyResizable]", inputs: { thyBounds: "thyBounds", thyMaxHeight: ["thyMaxHeight", "thyMaxHeight", numberAttribute], thyMaxWidth: ["thyMaxWidth", "thyMaxWidth", numberAttribute], thyMinHeight: ["thyMinHeight", "thyMinHeight", numberAttribute], thyMinWidth: ["thyMinWidth", "thyMinWidth", numberAttribute], thyGridColumnCount: ["thyGridColumnCount", "thyGridColumnCount", numberAttribute], thyMaxColumn: ["thyMaxColumn", "thyMaxColumn", numberAttribute], thyMinColumn: ["thyMinColumn", "thyMinColumn", numberAttribute], thyLockAspectRatio: ["thyLockAspectRatio", "thyLockAspectRatio", coerceBooleanProperty], thyPreview: ["thyPreview", "thyPreview", coerceBooleanProperty], thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty] }, outputs: { thyResize: "thyResize", thyResizeStart: "thyResizeStart", thyResizeEnd: "thyResizeEnd" }, host: { properties: { "class.thy-resizable-resizing": "resizing", "class.thy-resizable-disabled": "thyDisabled" }, classAttribute: "thy-resizable" }, providers: [ThyResizableService], ngImport: i0 }); }
393
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: ThyResizableDirective, isStandalone: true, selector: "[thyResizable]", inputs: { thyBounds: { classPropertyName: "thyBounds", publicName: "thyBounds", isSignal: true, isRequired: false, transformFunction: null }, thyMaxHeight: { classPropertyName: "thyMaxHeight", publicName: "thyMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, thyMaxWidth: { classPropertyName: "thyMaxWidth", publicName: "thyMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, thyMinHeight: { classPropertyName: "thyMinHeight", publicName: "thyMinHeight", isSignal: true, isRequired: false, transformFunction: null }, thyMinWidth: { classPropertyName: "thyMinWidth", publicName: "thyMinWidth", isSignal: true, isRequired: false, transformFunction: null }, thyGridColumnCount: { classPropertyName: "thyGridColumnCount", publicName: "thyGridColumnCount", isSignal: true, isRequired: false, transformFunction: null }, thyMaxColumn: { classPropertyName: "thyMaxColumn", publicName: "thyMaxColumn", isSignal: true, isRequired: false, transformFunction: null }, thyMinColumn: { classPropertyName: "thyMinColumn", publicName: "thyMinColumn", isSignal: true, isRequired: false, transformFunction: null }, thyLockAspectRatio: { classPropertyName: "thyLockAspectRatio", publicName: "thyLockAspectRatio", isSignal: true, isRequired: false, transformFunction: null }, thyPreview: { classPropertyName: "thyPreview", publicName: "thyPreview", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyResize: "thyResize", thyResizeStart: "thyResizeStart", thyResizeEnd: "thyResizeEnd" }, host: { properties: { "class.thy-resizable-resizing": "resizing()", "class.thy-resizable-disabled": "thyDisabled()" }, classAttribute: "thy-resizable" }, providers: [ThyResizableService], ngImport: i0 }); }
389
394
  }
390
395
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyResizableDirective, decorators: [{
391
396
  type: Directive,
@@ -394,49 +399,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
394
399
  providers: [ThyResizableService],
395
400
  host: {
396
401
  class: 'thy-resizable',
397
- '[class.thy-resizable-resizing]': 'resizing',
398
- '[class.thy-resizable-disabled]': 'thyDisabled'
402
+ '[class.thy-resizable-resizing]': 'resizing()',
403
+ '[class.thy-resizable-disabled]': 'thyDisabled()'
399
404
  }
400
405
  }]
401
- }], ctorParameters: () => [], propDecorators: { thyBounds: [{
402
- type: Input
403
- }], thyMaxHeight: [{
404
- type: Input,
405
- args: [{ transform: numberAttribute }]
406
- }], thyMaxWidth: [{
407
- type: Input,
408
- args: [{ transform: numberAttribute }]
409
- }], thyMinHeight: [{
410
- type: Input,
411
- args: [{ transform: numberAttribute }]
412
- }], thyMinWidth: [{
413
- type: Input,
414
- args: [{ transform: numberAttribute }]
415
- }], thyGridColumnCount: [{
416
- type: Input,
417
- args: [{ transform: numberAttribute }]
418
- }], thyMaxColumn: [{
419
- type: Input,
420
- args: [{ transform: numberAttribute }]
421
- }], thyMinColumn: [{
422
- type: Input,
423
- args: [{ transform: numberAttribute }]
424
- }], thyLockAspectRatio: [{
425
- type: Input,
426
- args: [{ transform: coerceBooleanProperty }]
427
- }], thyPreview: [{
428
- type: Input,
429
- args: [{ transform: coerceBooleanProperty }]
430
- }], thyDisabled: [{
431
- type: Input,
432
- args: [{ transform: coerceBooleanProperty }]
433
- }], thyResize: [{
434
- type: Output
435
- }], thyResizeStart: [{
436
- type: Output
437
- }], thyResizeEnd: [{
438
- type: Output
439
- }] } });
406
+ }], ctorParameters: () => [] });
440
407
 
441
408
  class ThyResizeHandleMouseDownEvent {
442
409
  constructor(direction, mouseEvent) {
@@ -459,15 +426,16 @@ class ThyResizeHandle {
459
426
  * 调整方向
460
427
  * @type top | right | bottom | left | topRight | bottomRight | bottomLeft | topLeft
461
428
  */
462
- this.thyDirection = 'bottomRight';
429
+ this.thyDirection = input('bottomRight');
463
430
  /**
464
431
  * 是否展示拖拽线
432
+ * @type boolean
465
433
  */
466
- this.thyLine = false;
434
+ this.thyLine = input(false, { transform: coerceBooleanProperty });
467
435
  /**
468
436
  * MouseDown 回调事件
469
437
  */
470
- this.thyMouseDown = new EventEmitter();
438
+ this.thyMouseDown = output();
471
439
  this.hostRenderer = useHostRenderer();
472
440
  this.destroyRef = inject(DestroyRef);
473
441
  }
@@ -487,14 +455,14 @@ class ThyResizeHandle {
487
455
  merge(fromEvent(this.host.nativeElement, 'mousedown', passiveEventListenerOptions), fromEvent(this.host.nativeElement, 'touchstart', passiveEventListenerOptions))
488
456
  .pipe(takeUntilDestroyed(this.destroyRef))
489
457
  .subscribe((event) => {
490
- this.thyResizableService.handleMouseDownOutsideAngular$.next(new ThyResizeHandleMouseDownEvent(this.thyDirection, event));
458
+ this.thyResizableService.handleMouseDownOutsideAngular$.next(new ThyResizeHandleMouseDownEvent(this.thyDirection(), event));
491
459
  });
492
460
  });
493
461
  }
494
462
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyResizeHandle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
495
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyResizeHandle, isStandalone: true, selector: "thy-resize-handle, [thy-resize-handle]", inputs: { thyDirection: "thyDirection", thyLine: ["thyLine", "thyLine", coerceBooleanProperty] }, outputs: { thyMouseDown: "thyMouseDown" }, host: { properties: { "class.thy-resizable-handle-top": "thyDirection === 'top'", "class.thy-resizable-handle-right": "thyDirection === 'right'", "class.thy-resizable-handle-bottom": "thyDirection === 'bottom'", "class.thy-resizable-handle-left": "thyDirection === 'left'", "class.thy-resizable-handle-topRight": "thyDirection === 'topRight'", "class.thy-resizable-handle-bottomRight": "thyDirection === 'bottomRight'", "class.thy-resizable-handle-bottomLeft": "thyDirection === 'bottomLeft'", "class.thy-resizable-handle-topLeft": "thyDirection === 'topLeft'", "class.thy-resizable-handle-box-hover": "entered" }, classAttribute: "thy-resizable-handle" }, exportAs: ["thyResizeHandle"], ngImport: i0, template: `
463
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyResizeHandle, isStandalone: true, selector: "thy-resize-handle, [thy-resize-handle]", inputs: { thyDirection: { classPropertyName: "thyDirection", publicName: "thyDirection", isSignal: true, isRequired: false, transformFunction: null }, thyLine: { classPropertyName: "thyLine", publicName: "thyLine", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyMouseDown: "thyMouseDown" }, host: { properties: { "class.thy-resizable-handle-top": "thyDirection() === 'top'", "class.thy-resizable-handle-right": "thyDirection() === 'right'", "class.thy-resizable-handle-bottom": "thyDirection() === 'bottom'", "class.thy-resizable-handle-left": "thyDirection() === 'left'", "class.thy-resizable-handle-topRight": "thyDirection() === 'topRight'", "class.thy-resizable-handle-bottomRight": "thyDirection() === 'bottomRight'", "class.thy-resizable-handle-bottomLeft": "thyDirection() === 'bottomLeft'", "class.thy-resizable-handle-topLeft": "thyDirection() === 'topLeft'", "class.thy-resizable-handle-box-hover": "entered" }, classAttribute: "thy-resizable-handle" }, exportAs: ["thyResizeHandle"], ngImport: i0, template: `
496
464
  <ng-content></ng-content>
497
- @if (thyLine) {
465
+ @if (thyLine()) {
498
466
  <div class="thy-resizable-handle-line"></div>
499
467
  }
500
468
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -506,33 +474,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
506
474
  exportAs: 'thyResizeHandle',
507
475
  template: `
508
476
  <ng-content></ng-content>
509
- @if (thyLine) {
477
+ @if (thyLine()) {
510
478
  <div class="thy-resizable-handle-line"></div>
511
479
  }
512
480
  `,
513
481
  changeDetection: ChangeDetectionStrategy.OnPush,
514
482
  host: {
515
483
  class: 'thy-resizable-handle',
516
- '[class.thy-resizable-handle-top]': `thyDirection === 'top'`,
517
- '[class.thy-resizable-handle-right]': `thyDirection === 'right'`,
518
- '[class.thy-resizable-handle-bottom]': `thyDirection === 'bottom'`,
519
- '[class.thy-resizable-handle-left]': `thyDirection === 'left'`,
520
- '[class.thy-resizable-handle-topRight]': `thyDirection === 'topRight'`,
521
- '[class.thy-resizable-handle-bottomRight]': `thyDirection === 'bottomRight'`,
522
- '[class.thy-resizable-handle-bottomLeft]': `thyDirection === 'bottomLeft'`,
523
- '[class.thy-resizable-handle-topLeft]': `thyDirection === 'topLeft'`,
484
+ '[class.thy-resizable-handle-top]': `thyDirection() === 'top'`,
485
+ '[class.thy-resizable-handle-right]': `thyDirection() === 'right'`,
486
+ '[class.thy-resizable-handle-bottom]': `thyDirection() === 'bottom'`,
487
+ '[class.thy-resizable-handle-left]': `thyDirection() === 'left'`,
488
+ '[class.thy-resizable-handle-topRight]': `thyDirection() === 'topRight'`,
489
+ '[class.thy-resizable-handle-bottomRight]': `thyDirection() === 'bottomRight'`,
490
+ '[class.thy-resizable-handle-bottomLeft]': `thyDirection() === 'bottomLeft'`,
491
+ '[class.thy-resizable-handle-topLeft]': `thyDirection() === 'topLeft'`,
524
492
  '[class.thy-resizable-handle-box-hover]': 'entered'
525
493
  },
526
494
  imports: []
527
495
  }]
528
- }], propDecorators: { thyDirection: [{
529
- type: Input
530
- }], thyLine: [{
531
- type: Input,
532
- args: [{ transform: coerceBooleanProperty }]
533
- }], thyMouseDown: [{
534
- type: Output
535
- }] } });
496
+ }] });
536
497
 
537
498
  const DEFAULT_RESIZE_DIRECTION = [
538
499
  'bottomRight',
@@ -554,22 +515,20 @@ class ThyResizeHandles {
554
515
  * 定义调整手柄的方向
555
516
  * @type ThyResizeDirection[]
556
517
  */
557
- this.thyDirections = DEFAULT_RESIZE_DIRECTION;
518
+ this.thyDirections = input(DEFAULT_RESIZE_DIRECTION);
558
519
  /**
559
520
  * 是否展示拖拽线
560
521
  */
561
- this.thyLine = false;
562
- this.directions = new Set(this.thyDirections);
563
- }
564
- ngOnChanges(changes) {
565
- if (changes.thyDirections) {
566
- this.directions = new Set(changes.thyDirections.currentValue);
567
- }
522
+ this.thyLine = input(false, { transform: coerceBooleanProperty });
523
+ this.directions = computed(() => {
524
+ const directions = this.thyDirections();
525
+ return new Set(directions);
526
+ });
568
527
  }
569
528
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyResizeHandles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
570
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyResizeHandles, isStandalone: true, selector: "thy-resize-handles", inputs: { thyDirections: "thyDirections", thyLine: ["thyLine", "thyLine", coerceBooleanProperty] }, exportAs: ["thyResizeHandles"], usesOnChanges: true, ngImport: i0, template: `
571
- @for (dir of directions; track $index) {
572
- <thy-resize-handle [thyLine]="thyLine" [thyDirection]="dir"></thy-resize-handle>
529
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyResizeHandles, isStandalone: true, selector: "thy-resize-handles", inputs: { thyDirections: { classPropertyName: "thyDirections", publicName: "thyDirections", isSignal: true, isRequired: false, transformFunction: null }, thyLine: { classPropertyName: "thyLine", publicName: "thyLine", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["thyResizeHandles"], ngImport: i0, template: `
530
+ @for (dir of directions(); track $index) {
531
+ <thy-resize-handle [thyLine]="thyLine()" [thyDirection]="dir"></thy-resize-handle>
573
532
  }
574
533
  `, isInline: true, dependencies: [{ kind: "component", type: ThyResizeHandle, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection", "thyLine"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
575
534
  }
@@ -579,19 +538,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
579
538
  selector: 'thy-resize-handles',
580
539
  exportAs: 'thyResizeHandles',
581
540
  template: `
582
- @for (dir of directions; track $index) {
583
- <thy-resize-handle [thyLine]="thyLine" [thyDirection]="dir"></thy-resize-handle>
541
+ @for (dir of directions(); track $index) {
542
+ <thy-resize-handle [thyLine]="thyLine()" [thyDirection]="dir"></thy-resize-handle>
584
543
  }
585
544
  `,
586
545
  changeDetection: ChangeDetectionStrategy.OnPush,
587
546
  imports: [ThyResizeHandle]
588
547
  }]
589
- }], propDecorators: { thyDirections: [{
590
- type: Input
591
- }], thyLine: [{
592
- type: Input,
593
- args: [{ transform: coerceBooleanProperty }]
594
- }] } });
548
+ }] });
595
549
 
596
550
  class ThyResizableModule {
597
551
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyResizableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }