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 { Input, HostBinding, Component, inject, ChangeDetectorRef, ChangeDetectionStrategy, ElementRef, NgZone, input, DestroyRef, ContentChildren, forwardRef, Directive, ANIMATION_MODULE_TYPE, Pipe, signal, ViewChild, ContentChild, NgModule } from '@angular/core';
2
+ import { input, Component, effect, HostBinding, ChangeDetectionStrategy, inject, ElementRef, NgZone, contentChildren, forwardRef, DestroyRef, Directive, ANIMATION_MODULE_TYPE, computed, Pipe, ChangeDetectorRef, signal, contentChild, viewChild, ContentChildren, NgModule } from '@angular/core';
3
3
  import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
4
4
  import { coerceBooleanProperty, warnDeprecation } from 'ngx-tethys/util';
5
5
  import { useHostRenderer } from '@tethys/cdk/dom';
@@ -8,79 +8,56 @@ import { RouterLinkActive, RouterModule } from '@angular/router';
8
8
  import { ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
9
9
  import { merge, of, Observable } from 'rxjs';
10
10
  import { take, startWith, tap } from 'rxjs/operators';
11
- import { DomSanitizer } from '@angular/platform-browser';
12
- import { ThyDropdownMenuComponent, ThyDropdownMenuItemDirective, ThyDropdownMenuItemActiveDirective, ThyDropdownModule } from 'ngx-tethys/dropdown';
13
11
  import { NgClass, NgTemplateOutlet, CommonModule } from '@angular/common';
12
+ import { ThyDropdownMenuComponent, ThyDropdownMenuItemDirective, ThyDropdownMenuItemActiveDirective, ThyDropdownModule } from 'ngx-tethys/dropdown';
14
13
  import { injectLocale } from 'ngx-tethys/i18n';
14
+ import { DomSanitizer } from '@angular/platform-browser';
15
15
 
16
16
  /**
17
17
  * @private
18
18
  */
19
19
  class ThyIconNavLink {
20
20
  constructor() {
21
- this.navLinkActive = false;
22
- this.navLinkClass = true;
23
- }
24
- set thyIconNavLinkIcon(icon) {
25
- this.icon = icon;
26
- }
27
- set thyIconNavLinkActive(active) {
28
- this.navLinkActive = active;
21
+ this.thyIconNavLinkIcon = input('');
22
+ this.thyIconNavLinkActive = input(false, { transform: coerceBooleanProperty });
29
23
  }
30
24
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyIconNavLink, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
31
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyIconNavLink, isStandalone: true, selector: "[thyIconNavLink]", inputs: { thyIconNavLinkIcon: "thyIconNavLinkIcon", thyIconNavLinkActive: ["thyIconNavLinkActive", "thyIconNavLinkActive", coerceBooleanProperty] }, host: { properties: { "class.active": "this.navLinkActive", "class.thy-icon-nav-link": "this.navLinkClass" } }, ngImport: i0, template: '<ng-content></ng-content>@if (icon) {<thy-icon [thyIconName]="icon"></thy-icon>}', isInline: true, dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] }); }
25
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyIconNavLink, isStandalone: true, selector: "[thyIconNavLink]", inputs: { thyIconNavLinkIcon: { classPropertyName: "thyIconNavLinkIcon", publicName: "thyIconNavLinkIcon", isSignal: true, isRequired: false, transformFunction: null }, thyIconNavLinkActive: { classPropertyName: "thyIconNavLinkActive", publicName: "thyIconNavLinkActive", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.active": "thyIconNavLinkActive()", "class.thy-icon-nav-link": "true" } }, ngImport: i0, template: '<ng-content></ng-content>@if (thyIconNavLinkIcon()) {<thy-icon [thyIconName]="thyIconNavLinkIcon()"></thy-icon>}', isInline: true, dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] }); }
32
26
  }
33
27
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyIconNavLink, decorators: [{
34
28
  type: Component,
35
29
  args: [{
36
30
  // eslint-disable-next-line @angular-eslint/component-selector
37
31
  selector: '[thyIconNavLink]',
38
- template: '<ng-content></ng-content>@if (icon) {<thy-icon [thyIconName]="icon"></thy-icon>}',
32
+ template: '<ng-content></ng-content>@if (thyIconNavLinkIcon()) {<thy-icon [thyIconName]="thyIconNavLinkIcon()"></thy-icon>}',
33
+ host: {
34
+ '[class.active]': 'thyIconNavLinkActive()',
35
+ '[class.thy-icon-nav-link]': 'true'
36
+ },
39
37
  imports: [ThyIcon]
40
38
  }]
41
- }], propDecorators: { navLinkActive: [{
42
- type: HostBinding,
43
- args: ['class.active']
44
- }], navLinkClass: [{
45
- type: HostBinding,
46
- args: ['class.thy-icon-nav-link']
47
- }], thyIconNavLinkIcon: [{
48
- type: Input
49
- }], thyIconNavLinkActive: [{
50
- type: Input,
51
- args: [{ transform: coerceBooleanProperty }]
52
- }] } });
39
+ }] });
53
40
 
54
41
  /**
55
42
  * @private
56
43
  */
57
44
  class ThyIconNav {
58
- set thyType(type) {
59
- this.type = type;
60
- this.updateClasses();
61
- this.changeDetectorRef.markForCheck();
62
- }
63
- updateClasses(bypassInitialized) {
64
- if (!bypassInitialized && !this.initialized) {
65
- return;
66
- }
67
- this.hostRenderer.updateClass(this.type ? [`thy-icon-nav-${this.type}`] : []);
45
+ updateClasses() {
46
+ this.hostRenderer.updateClass(this.thyType() ? [`thy-icon-nav-${this.thyType()}`] : []);
68
47
  }
69
48
  constructor() {
70
- this.changeDetectorRef = inject(ChangeDetectorRef);
71
- this.initialized = false;
72
49
  this.hostRenderer = useHostRenderer();
73
50
  this.isIconNav = true;
51
+ this.thyType = input('');
74
52
  if (typeof ngDevMode === 'undefined' || ngDevMode) {
75
53
  warnDeprecation('thy-icon-nav has been deprecated, please use thyAction and thy-space components instead of it');
76
54
  }
77
- }
78
- ngOnInit() {
79
- this.initialized = true;
80
- this.updateClasses(true);
55
+ effect(() => {
56
+ this.updateClasses();
57
+ });
81
58
  }
82
59
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyIconNav, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
83
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.8", type: ThyIconNav, isStandalone: true, selector: "thy-icon-nav", inputs: { thyType: "thyType" }, host: { properties: { "class.thy-icon-nav": "this.isIconNav" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
60
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyIconNav, isStandalone: true, selector: "thy-icon-nav", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-icon-nav": "this.isIconNav" } }, ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
84
61
  }
85
62
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyIconNav, decorators: [{
86
63
  type: Component,
@@ -88,8 +65,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
88
65
  }], ctorParameters: () => [], propDecorators: { isIconNav: [{
89
66
  type: HostBinding,
90
67
  args: [`class.thy-icon-nav`]
91
- }], thyType: [{
92
- type: Input
93
68
  }] } });
94
69
 
95
70
  /**
@@ -106,6 +81,30 @@ class ThyNavItemDirective {
106
81
  * 唯一标识
107
82
  */
108
83
  this.id = input();
84
+ /**
85
+ * 是否激活状态
86
+ * @default false
87
+ */
88
+ this.thyNavItemActive = input(false, { transform: coerceBooleanProperty });
89
+ /**
90
+ * 已经废弃,请使用 thyNavItemActive
91
+ * @deprecated please use thyNavItemActive
92
+ * @default false
93
+ */
94
+ this.thyNavLinkActive = input(false, { transform: coerceBooleanProperty });
95
+ /**
96
+ * 是否禁用
97
+ * @default false
98
+ */
99
+ this.thyNavItemDisabled = input(false, { transform: coerceBooleanProperty });
100
+ /**
101
+ * @private
102
+ */
103
+ this.links = contentChildren(forwardRef(() => ThyNavItemDirective), { descendants: true });
104
+ /**
105
+ * @private
106
+ */
107
+ this.routers = contentChildren(RouterLinkActive, { descendants: true });
109
108
  // @HostBinding('attr.href') navLinkHref = 'javascript:;';
110
109
  this.offset = {
111
110
  width: 0,
@@ -132,12 +131,13 @@ class ThyNavItemDirective {
132
131
  };
133
132
  }
134
133
  linkIsActive() {
135
- return (this.thyNavItemActive ||
136
- this.thyNavLinkActive ||
134
+ const links = this.links();
135
+ return (this.thyNavItemActive() ||
136
+ this.thyNavLinkActive() ||
137
137
  (this.routerLinkActive && this.routerLinkActive.isActive) ||
138
- this.routers.some(router => router.isActive) ||
139
- this.links.some(item => item.thyNavItemActive) ||
140
- this.links.some(item => item.thyNavLinkActive));
138
+ this.routers().some(router => router.isActive) ||
139
+ links.some(item => item.thyNavItemActive()) ||
140
+ links.some(item => item.thyNavLinkActive()));
141
141
  }
142
142
  setNavLinkHidden(value) {
143
143
  if (value) {
@@ -154,7 +154,7 @@ class ThyNavItemDirective {
154
154
  this.hostRenderer.removeClass(className);
155
155
  }
156
156
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyNavItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
157
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: ThyNavItemDirective, isStandalone: true, selector: "[thyNavLink],[thyNavItem]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, thyNavItemActive: { classPropertyName: "thyNavItemActive", publicName: "thyNavItemActive", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thyNavLinkActive: { classPropertyName: "thyNavLinkActive", publicName: "thyNavLinkActive", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thyNavItemDisabled: { classPropertyName: "thyNavItemDisabled", publicName: "thyNavItemDisabled", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty } }, host: { properties: { "class.active": "thyNavItemActive || thyNavLinkActive", "class.disabled": "thyNavItemDisabled" }, classAttribute: "thy-nav-item" }, queries: [{ propertyName: "links", predicate: i0.forwardRef(() => ThyNavItemDirective), descendants: true }, { propertyName: "routers", predicate: RouterLinkActive, descendants: true }], ngImport: i0 }); }
157
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.8", type: ThyNavItemDirective, isStandalone: true, selector: "[thyNavLink],[thyNavItem]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, thyNavItemActive: { classPropertyName: "thyNavItemActive", publicName: "thyNavItemActive", isSignal: true, isRequired: false, transformFunction: null }, thyNavLinkActive: { classPropertyName: "thyNavLinkActive", publicName: "thyNavLinkActive", isSignal: true, isRequired: false, transformFunction: null }, thyNavItemDisabled: { classPropertyName: "thyNavItemDisabled", publicName: "thyNavItemDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.active": "thyNavItemActive() || thyNavLinkActive()", "class.disabled": "thyNavItemDisabled()" }, classAttribute: "thy-nav-item" }, queries: [{ propertyName: "links", predicate: i0.forwardRef(() => ThyNavItemDirective), descendants: true, isSignal: true }, { propertyName: "routers", predicate: RouterLinkActive, descendants: true, isSignal: true }], ngImport: i0 }); }
158
158
  }
159
159
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyNavItemDirective, decorators: [{
160
160
  type: Directive,
@@ -162,26 +162,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
162
162
  selector: '[thyNavLink],[thyNavItem]',
163
163
  host: {
164
164
  class: 'thy-nav-item',
165
- '[class.active]': 'thyNavItemActive || thyNavLinkActive',
166
- '[class.disabled]': 'thyNavItemDisabled'
165
+ '[class.active]': 'thyNavItemActive() || thyNavLinkActive()',
166
+ '[class.disabled]': 'thyNavItemDisabled()'
167
167
  }
168
168
  }]
169
- }], propDecorators: { thyNavItemActive: [{
170
- type: Input,
171
- args: [{ transform: coerceBooleanProperty }]
172
- }], thyNavLinkActive: [{
173
- type: Input,
174
- args: [{ transform: coerceBooleanProperty }]
175
- }], thyNavItemDisabled: [{
176
- type: Input,
177
- args: [{ transform: coerceBooleanProperty }]
178
- }], links: [{
179
- type: ContentChildren,
180
- args: [forwardRef(() => ThyNavItemDirective), { descendants: true }]
181
- }], routers: [{
182
- type: ContentChildren,
183
- args: [RouterLinkActive, { descendants: true }]
184
- }] } });
169
+ }] });
185
170
 
186
171
  /**
187
172
  * @internal
@@ -191,9 +176,9 @@ class ThyNavInkBarDirective {
191
176
  this.elementRef = inject(ElementRef);
192
177
  this.ngZone = inject(NgZone);
193
178
  this.animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });
194
- }
195
- get animated() {
196
- return this.animationMode !== 'NoopAnimations' && this.showInkBar;
179
+ this.isVertical = input(false, { transform: coerceBooleanProperty });
180
+ this.showInkBar = input(false, { transform: coerceBooleanProperty });
181
+ this.animated = computed(() => this.animationMode !== 'NoopAnimations' && this.showInkBar());
197
182
  }
198
183
  alignToElement(element) {
199
184
  this.show();
@@ -205,7 +190,7 @@ class ThyNavInkBarDirective {
205
190
  }
206
191
  setStyles(element) {
207
192
  const inkBar = this.elementRef.nativeElement;
208
- if (!this.isVertical) {
193
+ if (!this.isVertical()) {
209
194
  inkBar.style.top = '';
210
195
  inkBar.style.bottom = '0px';
211
196
  inkBar.style.height = '2px';
@@ -238,7 +223,7 @@ class ThyNavInkBarDirective {
238
223
  this.elementRef.nativeElement.style.visibility = 'hidden';
239
224
  }
240
225
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyNavInkBarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
241
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.8", type: ThyNavInkBarDirective, isStandalone: true, selector: "thy-nav-ink-bar, [thyNavInkBar]", inputs: { isVertical: ["isVertical", "isVertical", coerceBooleanProperty], showInkBar: ["showInkBar", "showInkBar", coerceBooleanProperty] }, host: { properties: { "class.thy-nav-ink-bar-animated": "animated" }, classAttribute: "thy-nav-ink-bar" }, ngImport: i0 }); }
226
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: ThyNavInkBarDirective, isStandalone: true, selector: "thy-nav-ink-bar, [thyNavInkBar]", inputs: { isVertical: { classPropertyName: "isVertical", publicName: "isVertical", isSignal: true, isRequired: false, transformFunction: null }, showInkBar: { classPropertyName: "showInkBar", publicName: "showInkBar", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-nav-ink-bar-animated": "animated()" }, classAttribute: "thy-nav-ink-bar" }, ngImport: i0 }); }
242
227
  }
243
228
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyNavInkBarDirective, decorators: [{
244
229
  type: Directive,
@@ -246,16 +231,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
246
231
  selector: 'thy-nav-ink-bar, [thyNavInkBar]',
247
232
  host: {
248
233
  class: 'thy-nav-ink-bar',
249
- '[class.thy-nav-ink-bar-animated]': 'animated'
234
+ '[class.thy-nav-ink-bar-animated]': 'animated()'
250
235
  }
251
236
  }]
252
- }], propDecorators: { isVertical: [{
253
- type: Input,
254
- args: [{ transform: coerceBooleanProperty }]
255
- }], showInkBar: [{
256
- type: Input,
257
- args: [{ transform: coerceBooleanProperty }]
258
- }] } });
237
+ }] });
259
238
 
260
239
  /**
261
240
  * @private
@@ -301,14 +280,36 @@ const tabItemRight = 20;
301
280
  * @order 10
302
281
  */
303
282
  class ThyNav {
283
+ /**
284
+ * @private
285
+ */
286
+ set links(value) {
287
+ this.innerLinks = value;
288
+ this.prevActiveIndex = NaN;
289
+ }
290
+ get links() {
291
+ return this.innerLinks;
292
+ }
293
+ get showInkBar() {
294
+ const showTypes = ['pulled', 'tabs'];
295
+ return showTypes.includes(this.type());
296
+ }
297
+ updateClasses() {
298
+ let classNames = [];
299
+ if (navTypeClassesMap[this.type()]) {
300
+ classNames = [...navTypeClassesMap[this.type()]];
301
+ }
302
+ if (navSizeClassesMap[this.thySize()]) {
303
+ classNames.push(navSizeClassesMap[this.thySize()]);
304
+ }
305
+ this.hostRenderer.updateClass(classNames);
306
+ }
304
307
  constructor() {
305
308
  this.elementRef = inject(ElementRef);
306
309
  this.ngZone = inject(NgZone);
307
310
  this.changeDetectorRef = inject(ChangeDetectorRef);
308
311
  this.popover = inject(ThyPopover);
309
312
  this.destroyRef = inject(DestroyRef);
310
- this.type = 'pulled';
311
- this.size = 'md';
312
313
  this.initialized = false;
313
314
  this.wrapperOffset = {
314
315
  height: 0,
@@ -321,10 +322,38 @@ class ThyNav {
321
322
  this.moreBtnOffset = { height: 0, width: 0 };
322
323
  this.hostRenderer = useHostRenderer();
323
324
  this.locale = injectLocale('nav');
325
+ /**
326
+ * 导航类型
327
+ * @type pulled | tabs | pills | lite | primary | secondary | thirdly | secondary-divider
328
+ * @default pulled
329
+ */
330
+ this.thyType = input();
331
+ /**
332
+ * 导航大小
333
+ * @type lg | md | sm
334
+ * @default md
335
+ */
336
+ this.thySize = input('md');
337
+ /**
338
+ * 水平排列
339
+ * @type '' | 'start' | 'center' | 'end'
340
+ * @default false
341
+ */
342
+ this.thyHorizontal = input('');
343
+ /**
344
+ * 是否垂直排列
345
+ * @default false
346
+ */
347
+ this.thyVertical = input(false, { transform: coerceBooleanProperty });
324
348
  /**
325
349
  * 是否是填充模式
326
350
  */
327
- this.thyFill = false;
351
+ this.thyFill = input(false, { transform: coerceBooleanProperty });
352
+ /**
353
+ * 是否响应式,自动计算宽度存放 thyNavItem,并添加更多弹框
354
+ * @default false
355
+ */
356
+ this.thyResponsive = input(undefined, { transform: coerceBooleanProperty });
328
357
  /**
329
358
  * 支持暂停自适应计算
330
359
  */
@@ -333,77 +362,57 @@ class ThyNav {
333
362
  * 更多操作的菜单点击内部是否可关闭
334
363
  * @deprecated please use thyPopoverOptions
335
364
  */
336
- this.thyInsideClosable = true;
365
+ this.thyInsideClosable = input(true, { transform: coerceBooleanProperty });
337
366
  /**
338
367
  * 更多菜单弹出框的参数,底层使用 Popover 组件
339
368
  * @type ThyPopoverConfig
340
369
  */
341
370
  this.thyPopoverOptions = input(null);
371
+ /**
372
+ * 右侧额外区域模板
373
+ * @type TemplateRef
374
+ */
375
+ this.thyExtra = input();
376
+ /**
377
+ * @private
378
+ */
379
+ this.routers = contentChildren(RouterLinkActive, { descendants: true });
380
+ /**
381
+ * 响应式模式下更多操作模板
382
+ * @type TemplateRef
383
+ */
384
+ this.moreOperation = contentChild('more');
385
+ /**
386
+ * 响应式模式下更多弹框模板
387
+ * @type TemplateRef
388
+ */
389
+ this.morePopover = contentChild('morePopover');
390
+ /**
391
+ * 右侧额外区域模板,支持 thyExtra 传参和 <ng-template #extra></ng-template> 模板
392
+ * @name extra
393
+ * @type TemplateRef
394
+ */
395
+ this.extra = contentChild('extra');
396
+ this.defaultMoreOperation = viewChild('moreOperationContainer');
397
+ this.inkBar = viewChild.required(ThyNavInkBarDirective);
398
+ this.horizontal = computed(() => {
399
+ const horizontalValue = this.thyHorizontal();
400
+ return horizontalValue === 'right' ? 'end' : horizontalValue;
401
+ });
342
402
  this.prevActiveIndex = NaN;
343
403
  this.navSubscription = null;
344
- }
345
- /**
346
- * 导航类型
347
- * @type pulled | tabs | pills | lite | primary | secondary | thirdly | secondary-divider
348
- * @default pulled
349
- */
350
- set thyType(type) {
351
- this.type = type || 'pulled';
352
- if (this.initialized) {
404
+ this.type = computed(() => this.thyType() || 'pulled');
405
+ effect(() => {
353
406
  this.updateClasses();
354
- }
355
- }
356
- /**
357
- * 导航大小
358
- * @type lg | md | sm
359
- * @default md
360
- */
361
- set thySize(size) {
362
- this.size = size;
363
- if (this.initialized) {
364
- this.updateClasses();
365
- }
366
- }
367
- /**
368
- * 水平排列
369
- * @type '' | 'start' | 'center' | 'end'
370
- * @default false
371
- */
372
- set thyHorizontal(horizontal) {
373
- this.horizontal = horizontal === 'right' ? 'end' : horizontal;
374
- }
375
- /**
376
- * @private
377
- */
378
- set links(value) {
379
- this.innerLinks = value;
380
- this.prevActiveIndex = NaN;
381
- }
382
- get links() {
383
- return this.innerLinks;
384
- }
385
- get showInkBar() {
386
- const showTypes = ['pulled', 'tabs'];
387
- return showTypes.includes(this.type);
388
- }
389
- updateClasses() {
390
- let classNames = [];
391
- if (navTypeClassesMap[this.type]) {
392
- classNames = [...navTypeClassesMap[this.type]];
393
- }
394
- if (navSizeClassesMap[this.size]) {
395
- classNames.push(navSizeClassesMap[this.size]);
396
- }
397
- this.hostRenderer.updateClass(classNames);
407
+ });
398
408
  }
399
409
  ngOnInit() {
400
- if (!this.thyResponsive) {
410
+ if (!this.thyResponsive()) {
401
411
  this.initialized = true;
402
412
  }
403
- this.updateClasses();
404
413
  }
405
414
  ngAfterViewInit() {
406
- if (this.thyResponsive) {
415
+ if (this.thyResponsive()) {
407
416
  this.setMoreBtnOffset();
408
417
  this.ngZone.onStable.pipe(take(1)).subscribe(() => {
409
418
  this.setMoreBtnOffset();
@@ -416,18 +425,18 @@ class ThyNav {
416
425
  if (this.navSubscription) {
417
426
  this.navSubscription.unsubscribe();
418
427
  }
419
- this.navSubscription = merge(this.createResizeObserver(this.elementRef.nativeElement), ...this.links.map(item => this.createResizeObserver(item.elementRef.nativeElement).pipe(tap(() => item.setOffset()))), ...(this.routers || []).map(router => router?.isActiveChange))
428
+ this.navSubscription = merge(this.createResizeObserver(this.elementRef.nativeElement), ...this.links.map(item => this.createResizeObserver(item.elementRef.nativeElement).pipe(tap(() => item.setOffset()))), ...(this.routers() || []).map(router => router?.isActiveChange))
420
429
  .pipe(takeUntilDestroyed(this.destroyRef), tap(() => {
421
430
  if (this.thyPauseReCalculate()) {
422
431
  return;
423
432
  }
424
- if (this.thyResponsive) {
433
+ if (this.thyResponsive()) {
425
434
  this.setMoreBtnOffset();
426
435
  this.resetSizes();
427
436
  this.setHiddenItems();
428
437
  this.calculateMoreIsActive();
429
438
  }
430
- if (this.type === 'card') {
439
+ if (this.type() === 'card') {
431
440
  this.setNavItemDivider();
432
441
  }
433
442
  }))
@@ -438,7 +447,7 @@ class ThyNav {
438
447
  });
439
448
  }
440
449
  ngAfterContentInit() {
441
- if (this.thyResponsive) {
450
+ if (this.thyResponsive()) {
442
451
  this.ngZone.onStable.pipe(take(1)).subscribe(() => {
443
452
  this.resetSizes();
444
453
  });
@@ -448,17 +457,18 @@ class ThyNav {
448
457
  this.calculateMoreIsActive();
449
458
  this.curActiveIndex = this.links && this.links.length ? this.links.toArray().findIndex(item => item.linkIsActive()) : -1;
450
459
  if (this.curActiveIndex < 0) {
451
- this.inkBar.hide();
460
+ this.inkBar().hide();
452
461
  }
453
462
  else if (this.curActiveIndex !== this.prevActiveIndex) {
454
463
  this.alignInkBarToSelectedTab();
455
464
  }
456
465
  }
457
466
  setMoreBtnOffset() {
458
- const computedStyle = window.getComputedStyle(this.defaultMoreOperation?.nativeElement);
467
+ const defaultMoreOperation = this.defaultMoreOperation();
468
+ const computedStyle = window.getComputedStyle(defaultMoreOperation?.nativeElement);
459
469
  this.moreBtnOffset = {
460
- height: this.defaultMoreOperation?.nativeElement?.offsetHeight + parseFloat(computedStyle?.marginBottom) || 0,
461
- width: this.defaultMoreOperation?.nativeElement?.offsetWidth + parseFloat(computedStyle?.marginRight) || 0
470
+ height: defaultMoreOperation?.nativeElement?.offsetHeight + parseFloat(computedStyle?.marginBottom) || 0,
471
+ width: defaultMoreOperation?.nativeElement?.offsetWidth + parseFloat(computedStyle?.marginRight) || 0
462
472
  };
463
473
  }
464
474
  setNavItemDivider() {
@@ -500,7 +510,7 @@ class ThyNav {
500
510
  this.showMore.set(false);
501
511
  return;
502
512
  }
503
- const endIndex = this.thyVertical ? this.getShowItemsEndIndexWhenVertical(tabs) : this.getShowItemsEndIndexWhenHorizontal(tabs);
513
+ const endIndex = this.thyVertical() ? this.getShowItemsEndIndexWhenVertical(tabs) : this.getShowItemsEndIndexWhenHorizontal(tabs);
504
514
  const showItems = tabs.slice(0, endIndex + 1);
505
515
  (showItems || []).forEach(item => {
506
516
  item.setNavLinkHidden(false);
@@ -582,18 +592,18 @@ class ThyNav {
582
592
  }
583
593
  alignInkBarToSelectedTab() {
584
594
  if (!this.showInkBar) {
585
- this.inkBar.hide();
595
+ this.inkBar().hide();
586
596
  return;
587
597
  }
588
598
  const tabs = this.links?.toArray() ?? [];
589
599
  const selectedItem = tabs.find(item => item.linkIsActive());
590
600
  let selectedItemElement = selectedItem && selectedItem.elementRef.nativeElement;
591
601
  if (selectedItem && this.moreActive) {
592
- selectedItemElement = this.defaultMoreOperation.nativeElement;
602
+ selectedItemElement = this.defaultMoreOperation().nativeElement;
593
603
  }
594
604
  if (selectedItemElement) {
595
605
  this.prevActiveIndex = this.curActiveIndex;
596
- this.inkBar.alignToElement(selectedItemElement);
606
+ this.inkBar().alignToElement(selectedItemElement);
597
607
  }
598
608
  }
599
609
  ngOnChanges(changes) {
@@ -608,12 +618,14 @@ class ThyNav {
608
618
  }
609
619
  }
610
620
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyNav, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
611
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyNav, isStandalone: true, selector: "thy-nav", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: false, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: false, isRequired: false, transformFunction: null }, thyHorizontal: { classPropertyName: "thyHorizontal", publicName: "thyHorizontal", isSignal: false, isRequired: false, transformFunction: null }, thyVertical: { classPropertyName: "thyVertical", publicName: "thyVertical", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thyFill: { classPropertyName: "thyFill", publicName: "thyFill", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thyResponsive: { classPropertyName: "thyResponsive", publicName: "thyResponsive", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thyPauseReCalculate: { classPropertyName: "thyPauseReCalculate", publicName: "thyPauseReCalculate", isSignal: true, isRequired: false, transformFunction: null }, thyInsideClosable: { classPropertyName: "thyInsideClosable", publicName: "thyInsideClosable", isSignal: false, isRequired: false, transformFunction: coerceBooleanProperty }, thyPopoverOptions: { classPropertyName: "thyPopoverOptions", publicName: "thyPopoverOptions", isSignal: true, isRequired: false, transformFunction: null }, thyExtra: { classPropertyName: "thyExtra", publicName: "thyExtra", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-nav--vertical": "this.thyVertical", "class.thy-nav--fill": "this.thyFill" }, classAttribute: "thy-nav" }, queries: [{ propertyName: "moreOperation", first: true, predicate: ["more"], descendants: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true }, { propertyName: "extra", first: true, predicate: ["extra"], descendants: true }, { propertyName: "links", predicate: ThyNavItemDirective, descendants: true }, { propertyName: "routers", predicate: RouterLinkActive, descendants: true }], viewQueries: [{ propertyName: "defaultMoreOperation", first: true, predicate: ["moreOperationContainer"], descendants: true }, { propertyName: "inkBar", first: true, predicate: ThyNavInkBarDirective, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"thy-nav-list\" [ngClass]=\"horizontal ? 'justify-content-' + horizontal : ''\" #navList>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n @if (thyResponsive) {\n <a\n href=\"javascript:;\"\n class=\"thy-nav-more-container\"\n [class.d-none]=\"!showMore()\"\n [class.invisible]=\"!initialized\"\n #moreOperationContainer\n thyNavLink\n [thyNavItemActive]=\"moreActive\"\n (click)=\"openMoreMenu($event, navListPopover)\">\n @if (moreOperation) {\n <ng-container [ngTemplateOutlet]=\"moreOperation\"></ng-container>\n } @else {\n {{ locale().more }}\n <thy-icon thyIconName=\"angle-down\" class=\"thy-nav-more-icon\"></thy-icon>\n }\n </a>\n }\n @if (thyExtra || extra) {\n <div class=\"thy-nav-extra\">\n <ng-container [ngTemplateOutlet]=\"thyExtra || extra\"></ng-container>\n </div>\n }\n <thy-nav-ink-bar [showInkBar]=\"showInkBar\" [isVertical]=\"thyVertical\"></thy-nav-ink-bar>\n</div>\n\n<ng-template #navListPopover>\n @if (morePopover) {\n <ng-container [ngTemplateOutlet]=\"morePopover\" [ngTemplateOutletContext]=\"{ $implicit: hiddenItems }\"></ng-container>\n } @else {\n <thy-dropdown-menu thyImmediateRender>\n @for (item of hiddenItems; track $index) {\n <span\n class=\"thy-nav-item-more\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"item.isActive\"\n (click)=\"navItemClick(item)\"\n [innerHTML]=\"item.elementRef.nativeElement.innerHTML | bypassSecurityTrustHtml\"></span>\n }\n </thy-dropdown-menu>\n }\n</ng-template>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ThyNavItemDirective, selector: "[thyNavLink],[thyNavItem]", inputs: ["id", "thyNavItemActive", "thyNavLinkActive", "thyNavItemDisabled"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: ThyNavInkBarDirective, selector: "thy-nav-ink-bar, [thyNavInkBar]", inputs: ["isVertical", "showInkBar"] }, { kind: "component", type: ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth", "thyImmediateRender"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }, { kind: "pipe", type: BypassSecurityTrustHtmlPipe, name: "bypassSecurityTrustHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
621
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyNav, isStandalone: true, selector: "thy-nav", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyHorizontal: { classPropertyName: "thyHorizontal", publicName: "thyHorizontal", isSignal: true, isRequired: false, transformFunction: null }, thyVertical: { classPropertyName: "thyVertical", publicName: "thyVertical", isSignal: true, isRequired: false, transformFunction: null }, thyFill: { classPropertyName: "thyFill", publicName: "thyFill", isSignal: true, isRequired: false, transformFunction: null }, thyResponsive: { classPropertyName: "thyResponsive", publicName: "thyResponsive", isSignal: true, isRequired: false, transformFunction: null }, thyPauseReCalculate: { classPropertyName: "thyPauseReCalculate", publicName: "thyPauseReCalculate", isSignal: true, isRequired: false, transformFunction: null }, thyInsideClosable: { classPropertyName: "thyInsideClosable", publicName: "thyInsideClosable", isSignal: true, isRequired: false, transformFunction: null }, thyPopoverOptions: { classPropertyName: "thyPopoverOptions", publicName: "thyPopoverOptions", isSignal: true, isRequired: false, transformFunction: null }, thyExtra: { classPropertyName: "thyExtra", publicName: "thyExtra", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-nav": "true", "class.thy-nav--vertical": "thyVertical()", "class.thy-nav--fill": "thyFill()" } }, queries: [{ propertyName: "routers", predicate: RouterLinkActive, descendants: true, isSignal: true }, { propertyName: "moreOperation", first: true, predicate: ["more"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }, { propertyName: "extra", first: true, predicate: ["extra"], descendants: true, isSignal: true }, { propertyName: "links", predicate: ThyNavItemDirective, descendants: true }], viewQueries: [{ propertyName: "defaultMoreOperation", first: true, predicate: ["moreOperationContainer"], descendants: true, isSignal: true }, { propertyName: "inkBar", first: true, predicate: ThyNavInkBarDirective, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"thy-nav-list\" [ngClass]=\"horizontal() ? 'justify-content-' + horizontal() : ''\" #navList>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n @if (thyResponsive()) {\n <a\n href=\"javascript:;\"\n class=\"thy-nav-more-container\"\n [class.d-none]=\"!showMore()\"\n [class.invisible]=\"!initialized\"\n #moreOperationContainer\n thyNavLink\n [thyNavItemActive]=\"moreActive\"\n (click)=\"openMoreMenu($event, navListPopover)\">\n @if (moreOperation()) {\n <ng-container [ngTemplateOutlet]=\"moreOperation()\"></ng-container>\n } @else {\n {{ locale().more }}\n <thy-icon thyIconName=\"angle-down\" class=\"thy-nav-more-icon\"></thy-icon>\n }\n </a>\n }\n @if (thyExtra() || extra()) {\n <div class=\"thy-nav-extra\">\n <ng-container [ngTemplateOutlet]=\"thyExtra() || extra()\"></ng-container>\n </div>\n }\n <thy-nav-ink-bar [showInkBar]=\"showInkBar\" [isVertical]=\"thyVertical()\"></thy-nav-ink-bar>\n</div>\n\n<ng-template #navListPopover>\n @if (morePopover()) {\n <ng-container [ngTemplateOutlet]=\"morePopover()\" [ngTemplateOutletContext]=\"{ $implicit: hiddenItems }\"></ng-container>\n } @else {\n <thy-dropdown-menu thyImmediateRender>\n @for (item of hiddenItems; track $index) {\n <span\n class=\"thy-nav-item-more\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"item.isActive\"\n (click)=\"navItemClick(item)\"\n [innerHTML]=\"item.elementRef.nativeElement.innerHTML | bypassSecurityTrustHtml\"></span>\n }\n </thy-dropdown-menu>\n }\n</ng-template>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ThyNavItemDirective, selector: "[thyNavLink],[thyNavItem]", inputs: ["id", "thyNavItemActive", "thyNavLinkActive", "thyNavItemDisabled"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: ThyNavInkBarDirective, selector: "thy-nav-ink-bar, [thyNavInkBar]", inputs: ["isVertical", "showInkBar"] }, { kind: "component", type: ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth", "thyImmediateRender"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }, { kind: "pipe", type: BypassSecurityTrustHtmlPipe, name: "bypassSecurityTrustHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
612
622
  }
613
623
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyNav, decorators: [{
614
624
  type: Component,
615
625
  args: [{ selector: 'thy-nav', host: {
616
- class: 'thy-nav'
626
+ '[class.thy-nav]': 'true',
627
+ '[class.thy-nav--vertical]': 'thyVertical()',
628
+ '[class.thy-nav--fill]': 'thyFill()'
617
629
  }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
618
630
  NgClass,
619
631
  NgTemplateOutlet,
@@ -624,54 +636,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
624
636
  ThyDropdownMenuItemDirective,
625
637
  ThyDropdownMenuItemActiveDirective,
626
638
  BypassSecurityTrustHtmlPipe
627
- ], template: "<div class=\"thy-nav-list\" [ngClass]=\"horizontal ? 'justify-content-' + horizontal : ''\" #navList>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n @if (thyResponsive) {\n <a\n href=\"javascript:;\"\n class=\"thy-nav-more-container\"\n [class.d-none]=\"!showMore()\"\n [class.invisible]=\"!initialized\"\n #moreOperationContainer\n thyNavLink\n [thyNavItemActive]=\"moreActive\"\n (click)=\"openMoreMenu($event, navListPopover)\">\n @if (moreOperation) {\n <ng-container [ngTemplateOutlet]=\"moreOperation\"></ng-container>\n } @else {\n {{ locale().more }}\n <thy-icon thyIconName=\"angle-down\" class=\"thy-nav-more-icon\"></thy-icon>\n }\n </a>\n }\n @if (thyExtra || extra) {\n <div class=\"thy-nav-extra\">\n <ng-container [ngTemplateOutlet]=\"thyExtra || extra\"></ng-container>\n </div>\n }\n <thy-nav-ink-bar [showInkBar]=\"showInkBar\" [isVertical]=\"thyVertical\"></thy-nav-ink-bar>\n</div>\n\n<ng-template #navListPopover>\n @if (morePopover) {\n <ng-container [ngTemplateOutlet]=\"morePopover\" [ngTemplateOutletContext]=\"{ $implicit: hiddenItems }\"></ng-container>\n } @else {\n <thy-dropdown-menu thyImmediateRender>\n @for (item of hiddenItems; track $index) {\n <span\n class=\"thy-nav-item-more\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"item.isActive\"\n (click)=\"navItemClick(item)\"\n [innerHTML]=\"item.elementRef.nativeElement.innerHTML | bypassSecurityTrustHtml\"></span>\n }\n </thy-dropdown-menu>\n }\n</ng-template>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n" }]
628
- }], propDecorators: { thyType: [{
629
- type: Input
630
- }], thySize: [{
631
- type: Input
632
- }], thyHorizontal: [{
633
- type: Input
634
- }], thyVertical: [{
635
- type: HostBinding,
636
- args: ['class.thy-nav--vertical']
637
- }, {
638
- type: Input,
639
- args: [{ transform: coerceBooleanProperty }]
640
- }], thyFill: [{
641
- type: HostBinding,
642
- args: ['class.thy-nav--fill']
643
- }, {
644
- type: Input,
645
- args: [{ transform: coerceBooleanProperty }]
646
- }], thyResponsive: [{
647
- type: Input,
648
- args: [{ transform: coerceBooleanProperty }]
649
- }], thyInsideClosable: [{
650
- type: Input,
651
- args: [{ transform: coerceBooleanProperty }]
652
- }], thyExtra: [{
653
- type: Input
654
- }], links: [{
639
+ ], template: "<div class=\"thy-nav-list\" [ngClass]=\"horizontal() ? 'justify-content-' + horizontal() : ''\" #navList>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n @if (thyResponsive()) {\n <a\n href=\"javascript:;\"\n class=\"thy-nav-more-container\"\n [class.d-none]=\"!showMore()\"\n [class.invisible]=\"!initialized\"\n #moreOperationContainer\n thyNavLink\n [thyNavItemActive]=\"moreActive\"\n (click)=\"openMoreMenu($event, navListPopover)\">\n @if (moreOperation()) {\n <ng-container [ngTemplateOutlet]=\"moreOperation()\"></ng-container>\n } @else {\n {{ locale().more }}\n <thy-icon thyIconName=\"angle-down\" class=\"thy-nav-more-icon\"></thy-icon>\n }\n </a>\n }\n @if (thyExtra() || extra()) {\n <div class=\"thy-nav-extra\">\n <ng-container [ngTemplateOutlet]=\"thyExtra() || extra()\"></ng-container>\n </div>\n }\n <thy-nav-ink-bar [showInkBar]=\"showInkBar\" [isVertical]=\"thyVertical()\"></thy-nav-ink-bar>\n</div>\n\n<ng-template #navListPopover>\n @if (morePopover()) {\n <ng-container [ngTemplateOutlet]=\"morePopover()\" [ngTemplateOutletContext]=\"{ $implicit: hiddenItems }\"></ng-container>\n } @else {\n <thy-dropdown-menu thyImmediateRender>\n @for (item of hiddenItems; track $index) {\n <span\n class=\"thy-nav-item-more\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"item.isActive\"\n (click)=\"navItemClick(item)\"\n [innerHTML]=\"item.elementRef.nativeElement.innerHTML | bypassSecurityTrustHtml\"></span>\n }\n </thy-dropdown-menu>\n }\n</ng-template>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n" }]
640
+ }], ctorParameters: () => [], propDecorators: { links: [{
655
641
  type: ContentChildren,
656
642
  args: [ThyNavItemDirective, { descendants: true }]
657
- }], routers: [{
658
- type: ContentChildren,
659
- args: [RouterLinkActive, { descendants: true }]
660
- }], moreOperation: [{
661
- type: ContentChild,
662
- args: ['more']
663
- }], morePopover: [{
664
- type: ContentChild,
665
- args: ['morePopover']
666
- }], extra: [{
667
- type: ContentChild,
668
- args: ['extra']
669
- }], defaultMoreOperation: [{
670
- type: ViewChild,
671
- args: ['moreOperationContainer']
672
- }], inkBar: [{
673
- type: ViewChild,
674
- args: [ThyNavInkBarDirective, { static: true }]
675
643
  }] } });
676
644
 
677
645
  class ThyNavModule {