ngx-tethys 18.0.8 → 18.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 (607) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/action/action.component.d.ts +1 -2
  3. package/affix/affix.component.d.ts +2 -4
  4. package/alert/alert.component.d.ts +11 -19
  5. package/anchor/anchor-link.component.d.ts +2 -4
  6. package/anchor/anchor.component.d.ts +2 -7
  7. package/arrow-switcher/arrow-switcher.component.d.ts +1 -2
  8. package/autocomplete/autocomplete.component.d.ts +1 -2
  9. package/autocomplete/autocomplete.trigger.directive.d.ts +3 -5
  10. package/autocomplete/overlay/autocomplete-container.component.d.ts +4 -4
  11. package/autocomplete/overlay/autocomplete.service.d.ts +3 -5
  12. package/avatar/avatar.component.d.ts +1 -3
  13. package/avatar/avatar.pipe.d.ts +0 -2
  14. package/back-top/back-top.component.d.ts +2 -4
  15. package/badge/badge.component.d.ts +2 -2
  16. package/breadcrumb/breadcrumb-item.component.d.ts +1 -2
  17. package/breadcrumb/breadcrumb.component.d.ts +1 -2
  18. package/button/button.component.d.ts +1 -2
  19. package/calendar/calendar-header.component.d.ts +1 -2
  20. package/calendar/calendar.component.d.ts +1 -2
  21. package/carousel/carousel-item.directive.d.ts +1 -2
  22. package/carousel/carousel.component.d.ts +1 -4
  23. package/carousel/carousel.service.d.ts +1 -2
  24. package/cascader/cascader.component.d.ts +4 -4
  25. package/checkbox/checkbox.component.d.ts +0 -2
  26. package/collapse/collapse-item.component.d.ts +2 -4
  27. package/color-picker/color-picker-panel.component.d.ts +2 -3
  28. package/color-picker/color-picker.component.d.ts +2 -4
  29. package/color-picker/coordinates.directive.d.ts +1 -2
  30. package/color-picker/parts/alpha/alpha.component.d.ts +1 -2
  31. package/color-picker/parts/hue/hue.component.d.ts +1 -2
  32. package/color-picker/parts/saturation/saturation.component.d.ts +1 -2
  33. package/copy/copy.directive.d.ts +0 -2
  34. package/core/click-positioner.d.ts +0 -2
  35. package/core/scroll.d.ts +1 -2
  36. package/core/update-host-class.service.d.ts +1 -2
  37. package/date-picker/abstract-picker.component.d.ts +1 -1
  38. package/date-picker/abstract-picker.directive.d.ts +2 -3
  39. package/date-picker/base-picker.component.d.ts +2 -3
  40. package/date-picker/date-picker.component.d.ts +2 -2
  41. package/date-picker/date-picker.directive.d.ts +1 -3
  42. package/date-picker/date-picker.service.d.ts +2 -2
  43. package/date-picker/index.d.ts +26 -27
  44. package/date-picker/lib/calendar/calendar-footer.component.d.ts +1 -2
  45. package/date-picker/lib/calendar/calendar-header.component.d.ts +0 -1
  46. package/date-picker/lib/date/date-header.component.d.ts +0 -3
  47. package/date-picker/lib/date/date-table-cell.component.d.ts +1 -1
  48. package/date-picker/lib/date/date-table.component.d.ts +1 -3
  49. package/date-picker/lib/date-carousel/date-carousel.component.d.ts +1 -2
  50. package/date-picker/lib/decade/decade-header.component.d.ts +1 -1
  51. package/date-picker/lib/month/month-header.component.d.ts +0 -3
  52. package/date-picker/lib/month/month-table.component.d.ts +1 -2
  53. package/date-picker/lib/popups/date-popup.component.d.ts +1 -4
  54. package/date-picker/lib/popups/inner-popup.component.d.ts +0 -2
  55. package/date-picker/lib/quarter/quarter-table.component.d.ts +1 -2
  56. package/date-picker/lib/year/year-header.component.d.ts +0 -1
  57. package/date-picker/month-picker.component.d.ts +2 -2
  58. package/date-picker/picker.component.d.ts +1 -3
  59. package/date-picker/picker.pipes.d.ts +0 -3
  60. package/date-picker/quarter-picker.component.d.ts +2 -2
  61. package/date-picker/range-picker.component.d.ts +2 -2
  62. package/date-picker/range-picker.directive.d.ts +2 -3
  63. package/date-picker/week-picker.component.d.ts +2 -2
  64. package/date-picker/year-picker.component.d.ts +2 -2
  65. package/date-range/date-range.component.d.ts +3 -11
  66. package/date-range/optional-dates/optional-dates.component.d.ts +0 -2
  67. package/dialog/body/dialog-body.component.d.ts +0 -2
  68. package/dialog/confirm/confirm.component.d.ts +2 -3
  69. package/dialog/dialog-container.component.d.ts +4 -5
  70. package/dialog/dialog.service.d.ts +4 -4
  71. package/dialog/footer/dialog-footer.component.d.ts +2 -2
  72. package/dialog/header/dialog-header.component.d.ts +2 -6
  73. package/divider/divider.component.d.ts +8 -2
  74. package/dot/dot.component.d.ts +1 -2
  75. package/drag-drop/drag-content.directive.d.ts +2 -3
  76. package/drag-drop/drag-handle.directive.d.ts +2 -3
  77. package/drag-drop/drag.directive.d.ts +4 -5
  78. package/drag-drop/drop-container.directive.d.ts +6 -3
  79. package/dropdown/dropdown-active.directive.d.ts +3 -4
  80. package/dropdown/dropdown-menu-item.directive.d.ts +1 -2
  81. package/dropdown/dropdown-submenu.component.d.ts +1 -3
  82. package/dropdown/dropdown.directive.d.ts +3 -5
  83. package/empty/empty.component.d.ts +6 -6
  84. package/esm2022/action/action.component.mjs +20 -21
  85. package/esm2022/affix/affix.component.mjs +11 -14
  86. package/esm2022/alert/alert.component.mjs +55 -81
  87. package/esm2022/anchor/anchor-link.component.mjs +23 -16
  88. package/esm2022/anchor/anchor.component.mjs +27 -24
  89. package/esm2022/arrow-switcher/arrow-switcher.component.mjs +25 -26
  90. package/esm2022/autocomplete/autocomplete.component.mjs +11 -11
  91. package/esm2022/autocomplete/autocomplete.trigger.directive.mjs +30 -37
  92. package/esm2022/autocomplete/overlay/autocomplete-container.component.mjs +11 -15
  93. package/esm2022/autocomplete/overlay/autocomplete.service.mjs +14 -21
  94. package/esm2022/avatar/avatar-list/avatar-list.component.mjs +4 -4
  95. package/esm2022/avatar/avatar.component.mjs +27 -28
  96. package/esm2022/avatar/avatar.pipe.mjs +6 -7
  97. package/esm2022/back-top/back-top.component.mjs +14 -18
  98. package/esm2022/badge/badge.component.mjs +8 -9
  99. package/esm2022/breadcrumb/breadcrumb-item.component.mjs +7 -7
  100. package/esm2022/breadcrumb/breadcrumb.component.mjs +15 -17
  101. package/esm2022/button/button-icon.component.mjs +4 -4
  102. package/esm2022/button/button.component.mjs +15 -15
  103. package/esm2022/calendar/calendar-header.component.mjs +15 -15
  104. package/esm2022/calendar/calendar.component.mjs +14 -15
  105. package/esm2022/card/header.component.mjs +4 -4
  106. package/esm2022/carousel/carousel-item.directive.mjs +7 -6
  107. package/esm2022/carousel/carousel.component.mjs +13 -15
  108. package/esm2022/carousel/carousel.service.mjs +7 -9
  109. package/esm2022/cascader/cascader-li.component.mjs +4 -4
  110. package/esm2022/cascader/cascader-search-option.component.mjs +4 -4
  111. package/esm2022/cascader/cascader.component.mjs +15 -22
  112. package/esm2022/checkbox/checkbox.component.mjs +11 -13
  113. package/esm2022/collapse/collapse-item.component.mjs +21 -24
  114. package/esm2022/color-picker/color-picker-panel.component.mjs +14 -15
  115. package/esm2022/color-picker/color-picker.component.mjs +10 -11
  116. package/esm2022/color-picker/coordinates.directive.mjs +10 -10
  117. package/esm2022/color-picker/parts/alpha/alpha.component.mjs +6 -6
  118. package/esm2022/color-picker/parts/hue/hue.component.mjs +6 -6
  119. package/esm2022/color-picker/parts/saturation/saturation.component.mjs +9 -9
  120. package/esm2022/comment/comment.component.mjs +4 -4
  121. package/esm2022/copy/copy.directive.mjs +8 -12
  122. package/esm2022/core/click-positioner.mjs +6 -7
  123. package/esm2022/core/scroll.mjs +7 -9
  124. package/esm2022/core/store/store.mjs +1 -1
  125. package/esm2022/core/update-host-class.service.mjs +6 -6
  126. package/esm2022/date-picker/abstract-picker.component.mjs +5 -5
  127. package/esm2022/date-picker/abstract-picker.directive.mjs +42 -44
  128. package/esm2022/date-picker/base-picker.component.mjs +26 -26
  129. package/esm2022/date-picker/date-picker.component.mjs +10 -11
  130. package/esm2022/date-picker/date-picker.directive.mjs +6 -8
  131. package/esm2022/date-picker/date-picker.service.mjs +6 -10
  132. package/esm2022/date-picker/index.mjs +27 -28
  133. package/esm2022/date-picker/lib/calendar/calendar-footer.component.mjs +7 -8
  134. package/esm2022/date-picker/lib/calendar/calendar-header.component.mjs +6 -7
  135. package/esm2022/date-picker/lib/date/date-header.component.mjs +6 -12
  136. package/esm2022/date-picker/lib/date/date-table-cell.component.mjs +4 -4
  137. package/esm2022/date-picker/lib/date/date-table.component.mjs +10 -12
  138. package/esm2022/date-picker/lib/date-carousel/date-carousel.component.mjs +16 -16
  139. package/esm2022/date-picker/lib/decade/decade-header.component.mjs +8 -11
  140. package/esm2022/date-picker/lib/decade/decade-table.component.mjs +4 -4
  141. package/esm2022/date-picker/lib/month/month-header.component.mjs +6 -12
  142. package/esm2022/date-picker/lib/month/month-table.component.mjs +9 -10
  143. package/esm2022/date-picker/lib/popups/date-popup.component.mjs +14 -29
  144. package/esm2022/date-picker/lib/popups/inner-popup.component.mjs +14 -20
  145. package/esm2022/date-picker/lib/quarter/quarter-table.component.mjs +9 -10
  146. package/esm2022/date-picker/lib/year/year-header.component.mjs +6 -12
  147. package/esm2022/date-picker/lib/year/year-table.component.mjs +4 -4
  148. package/esm2022/date-picker/month-picker.component.mjs +9 -11
  149. package/esm2022/date-picker/picker.component.mjs +24 -35
  150. package/esm2022/date-picker/picker.pipes.mjs +10 -11
  151. package/esm2022/date-picker/quarter-picker.component.mjs +9 -11
  152. package/esm2022/date-picker/range-picker.component.mjs +9 -11
  153. package/esm2022/date-picker/range-picker.directive.mjs +6 -8
  154. package/esm2022/date-picker/week-picker.component.mjs +9 -11
  155. package/esm2022/date-picker/year-picker.component.mjs +9 -11
  156. package/esm2022/date-range/date-range.component.mjs +17 -18
  157. package/esm2022/date-range/optional-dates/optional-dates.component.mjs +9 -13
  158. package/esm2022/dialog/body/dialog-body.component.mjs +11 -12
  159. package/esm2022/dialog/confirm/confirm.component.mjs +10 -14
  160. package/esm2022/dialog/dialog-container.component.mjs +13 -18
  161. package/esm2022/dialog/dialog.service.mjs +10 -17
  162. package/esm2022/dialog/footer/dialog-footer.component.mjs +10 -14
  163. package/esm2022/dialog/header/dialog-header.component.mjs +17 -22
  164. package/esm2022/divider/divider.component.mjs +21 -13
  165. package/esm2022/dot/dot.component.mjs +7 -7
  166. package/esm2022/drag-drop/drag-content.directive.mjs +7 -9
  167. package/esm2022/drag-drop/drag-handle.directive.mjs +7 -9
  168. package/esm2022/drag-drop/drag.directive.mjs +13 -16
  169. package/esm2022/drag-drop/drop-container.directive.mjs +13 -13
  170. package/esm2022/dropdown/dropdown-active.directive.mjs +9 -12
  171. package/esm2022/dropdown/dropdown-menu-item.directive.mjs +12 -12
  172. package/esm2022/dropdown/dropdown-menu.component.mjs +11 -7
  173. package/esm2022/dropdown/dropdown-submenu.component.mjs +9 -10
  174. package/esm2022/dropdown/dropdown.directive.mjs +12 -10
  175. package/esm2022/empty/empty.component.mjs +17 -20
  176. package/esm2022/flexible-text/flexible-text.component.mjs +16 -17
  177. package/esm2022/form/form-group-error/form-group-error.component.mjs +12 -15
  178. package/esm2022/form/form-group-label.directive.mjs +9 -10
  179. package/esm2022/form/form-group.component.mjs +18 -22
  180. package/esm2022/form/form-submit.directive.mjs +6 -7
  181. package/esm2022/form/form-validator-loader.mjs +1 -1
  182. package/esm2022/form/form-validator.service.mjs +12 -13
  183. package/esm2022/form/form.directive.mjs +11 -16
  184. package/esm2022/form/from-group-footer/form-group-footer.component.mjs +13 -19
  185. package/esm2022/form/validator/unique-validator.directive.mjs +7 -10
  186. package/esm2022/fullscreen/fullscreen.component.mjs +10 -11
  187. package/esm2022/fullscreen/fullscreen.service.mjs +7 -10
  188. package/esm2022/grid/thy-col.directive.mjs +9 -14
  189. package/esm2022/grid/thy-grid-item.component.mjs +8 -14
  190. package/esm2022/grid/thy-grid.component.mjs +7 -8
  191. package/esm2022/guider/guider-hint/guider-hint.component.mjs +4 -4
  192. package/esm2022/guider/guider.directive.mjs +8 -9
  193. package/esm2022/guider/guider.service.mjs +12 -19
  194. package/esm2022/icon/icon-registry.mjs +11 -16
  195. package/esm2022/icon/icon.component.mjs +8 -9
  196. package/esm2022/image/image-group.component.mjs +7 -7
  197. package/esm2022/image/image.directive.mjs +11 -12
  198. package/esm2022/image/image.service.mjs +8 -14
  199. package/esm2022/image/preview/image-preview.component.mjs +36 -41
  200. package/esm2022/input/input-count.component.mjs +7 -10
  201. package/esm2022/input/input-group.component.mjs +15 -16
  202. package/esm2022/input/input-search.component.mjs +9 -10
  203. package/esm2022/input/input.component.mjs +17 -17
  204. package/esm2022/input/input.directive.mjs +12 -17
  205. package/esm2022/input-number/input-number.component.mjs +6 -6
  206. package/esm2022/layout/header.component.mjs +4 -4
  207. package/esm2022/layout/sidebar-header.component.mjs +4 -4
  208. package/esm2022/layout/sidebar.component.mjs +125 -121
  209. package/esm2022/list/list-item-meta.component.mjs +4 -4
  210. package/esm2022/list/selection/selection-list.mjs +25 -25
  211. package/esm2022/loading/loading.component.mjs +10 -11
  212. package/esm2022/mention/mention.directive.mjs +9 -14
  213. package/esm2022/mention/suggestions/suggestions.component.mjs +11 -12
  214. package/esm2022/menu/group/menu-group.component.mjs +37 -38
  215. package/esm2022/menu/item/action/menu-item-action.component.mjs +15 -16
  216. package/esm2022/menu/item/menu-item.component.mjs +8 -9
  217. package/esm2022/message/abstract/abstract-message-container.component.mjs +5 -5
  218. package/esm2022/message/abstract/abstract-message.component.mjs +6 -6
  219. package/esm2022/message/message-container.component.mjs +21 -15
  220. package/esm2022/message/message-queue.service.mjs +6 -8
  221. package/esm2022/message/message.component.mjs +9 -10
  222. package/esm2022/message/message.service.mjs +10 -11
  223. package/esm2022/nav/icon-nav/icon-nav-link.directive.mjs +4 -5
  224. package/esm2022/nav/icon-nav/icon-nav.component.mjs +6 -6
  225. package/esm2022/nav/nav-ink-bar.directive.mjs +9 -14
  226. package/esm2022/nav/nav-item.directive.mjs +8 -11
  227. package/esm2022/nav/nav.component.mjs +35 -38
  228. package/esm2022/nav/nav.pipe.mjs +6 -7
  229. package/esm2022/notify/notify-container.component.mjs +11 -14
  230. package/esm2022/notify/notify-queue.service.mjs +6 -8
  231. package/esm2022/notify/notify.component.mjs +10 -10
  232. package/esm2022/notify/notify.service.mjs +11 -12
  233. package/esm2022/pagination/pagination.component.mjs +41 -46
  234. package/esm2022/pagination/pagination.pipe.mjs +6 -7
  235. package/esm2022/popover/header/popover-header.component.mjs +15 -17
  236. package/esm2022/popover/popover-container.component.mjs +11 -13
  237. package/esm2022/popover/popover.directive.mjs +13 -12
  238. package/esm2022/popover/popover.service.mjs +14 -26
  239. package/esm2022/progress/progress-circle.component.mjs +4 -7
  240. package/esm2022/progress/progress-strip.component.mjs +10 -13
  241. package/esm2022/progress/progress.component.mjs +5 -8
  242. package/esm2022/property/property-item.component.mjs +13 -16
  243. package/esm2022/property-operation/property-operation.component.mjs +27 -28
  244. package/esm2022/radio/button/radio-button.component.mjs +9 -15
  245. package/esm2022/radio/group/radio-group.component.mjs +17 -17
  246. package/esm2022/radio/radio.component.mjs +12 -18
  247. package/esm2022/rate/rate.component.mjs +10 -10
  248. package/esm2022/resizable/resizable.directive.mjs +10 -12
  249. package/esm2022/resizable/resizable.service.mjs +7 -9
  250. package/esm2022/resizable/resize-handle.component.mjs +16 -14
  251. package/esm2022/resizable/resize-handles.component.mjs +12 -5
  252. package/esm2022/result/result.component.mjs +4 -4
  253. package/esm2022/segment/segment-item.component.mjs +15 -18
  254. package/esm2022/segment/segment.component.mjs +29 -30
  255. package/esm2022/select/custom-select/custom-select.component.mjs +19 -35
  256. package/esm2022/select/native-select/native-select.component.mjs +10 -11
  257. package/esm2022/shared/base-form-check.component.mjs +7 -8
  258. package/esm2022/shared/directives/string-or-template-outlet.directive.mjs +7 -7
  259. package/esm2022/shared/directives/thy-autofocus.directive.mjs +10 -10
  260. package/esm2022/shared/directives/thy-contextmenu.directive.mjs +8 -8
  261. package/esm2022/shared/directives/thy-ctrl-enter.directive.mjs +8 -8
  262. package/esm2022/shared/directives/thy-enter.directive.mjs +8 -8
  263. package/esm2022/shared/directives/thy-scroll.directive.mjs +21 -21
  264. package/esm2022/shared/directives/thy-show.mjs +11 -11
  265. package/esm2022/shared/directives/thy-stop-propagation.directive.mjs +7 -5
  266. package/esm2022/shared/directives/view-outlet.directive.mjs +7 -7
  267. package/esm2022/shared/ng-transclude.directive.mjs +6 -5
  268. package/esm2022/shared/option/group/option-group.component.mjs +10 -10
  269. package/esm2022/shared/option/list-option/list-option.component.mjs +14 -22
  270. package/esm2022/shared/option/option.component.mjs +11 -22
  271. package/esm2022/shared/select/select-control/select-control.component.mjs +27 -27
  272. package/esm2022/skeleton/skeleton-circle.component.mjs +7 -15
  273. package/esm2022/skeleton/skeleton-rectangle.component.mjs +7 -15
  274. package/esm2022/skeleton/stylized/bullet-list.component.mjs +8 -9
  275. package/esm2022/skeleton/stylized/list.component.mjs +8 -9
  276. package/esm2022/skeleton/stylized/paragraph.component.mjs +8 -9
  277. package/esm2022/slide/drawer/drawer-container.directive.mjs +6 -6
  278. package/esm2022/slide/slide-container.component.mjs +12 -16
  279. package/esm2022/slide/slide-header/slide-header.component.mjs +13 -14
  280. package/esm2022/slide/slide-ref.service.mjs +1 -1
  281. package/esm2022/slide/slide.service.mjs +8 -12
  282. package/esm2022/slider/slider.component.mjs +8 -8
  283. package/esm2022/space/space.component.mjs +16 -16
  284. package/esm2022/statistic/statistic.component.mjs +23 -23
  285. package/esm2022/stepper/step.component.mjs +6 -11
  286. package/esm2022/stepper/stepper-button.directive.mjs +10 -11
  287. package/esm2022/stepper/stepper.component.mjs +5 -5
  288. package/esm2022/strength/strength.component.mjs +11 -12
  289. package/esm2022/switch/switch.component.mjs +11 -11
  290. package/esm2022/table/table-column.component.mjs +58 -63
  291. package/esm2022/table/table-skeleton.component.mjs +35 -38
  292. package/esm2022/table/table.component.mjs +19 -29
  293. package/esm2022/tabs/tab-content.component.mjs +9 -9
  294. package/esm2022/tabs/tabs.component.mjs +22 -25
  295. package/esm2022/tag/tag.component.mjs +22 -22
  296. package/esm2022/time-picker/inner/inner-time-picker.component.mjs +12 -12
  297. package/esm2022/time-picker/time-picker-panel.component.mjs +31 -34
  298. package/esm2022/time-picker/time-picker.component.mjs +33 -43
  299. package/esm2022/timeline/timeline-item.component.mjs +15 -16
  300. package/esm2022/timeline/timeline.component.mjs +15 -16
  301. package/esm2022/tooltip/tooltip.component.mjs +17 -17
  302. package/esm2022/tooltip/tooltip.directive.mjs +11 -10
  303. package/esm2022/tooltip/tooltip.service.mjs +9 -13
  304. package/esm2022/transfer/transfer-list.component.mjs +9 -9
  305. package/esm2022/transfer/transfer.component.mjs +4 -4
  306. package/esm2022/tree/tree-node.component.mjs +16 -20
  307. package/esm2022/tree/tree.component.mjs +90 -96
  308. package/esm2022/tree-select/tree-select.component.mjs +28 -36
  309. package/esm2022/typography/bg-color.directive.mjs +9 -9
  310. package/esm2022/typography/text/text.component.mjs +3 -4
  311. package/esm2022/typography/text-color.directive.mjs +9 -9
  312. package/esm2022/upload/file-drop.directive.mjs +1 -1
  313. package/esm2022/upload/file-select-base.mjs +5 -6
  314. package/esm2022/upload/file-select.component.mjs +4 -3
  315. package/esm2022/upload/upload.service.mjs +6 -7
  316. package/esm2022/version.mjs +2 -2
  317. package/esm2022/vote/vote.component.mjs +4 -4
  318. package/esm2022/watermark/watermark.directive.mjs +12 -12
  319. package/fesm2022/ngx-tethys-action.mjs +20 -20
  320. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  321. package/fesm2022/ngx-tethys-affix.mjs +12 -14
  322. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  323. package/fesm2022/ngx-tethys-alert.mjs +54 -80
  324. package/fesm2022/ngx-tethys-alert.mjs.map +1 -1
  325. package/fesm2022/ngx-tethys-anchor.mjs +48 -35
  326. package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
  327. package/fesm2022/ngx-tethys-arrow-switcher.mjs +25 -25
  328. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  329. package/fesm2022/ngx-tethys-autocomplete.mjs +63 -75
  330. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  331. package/fesm2022/ngx-tethys-avatar.mjs +32 -32
  332. package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
  333. package/fesm2022/ngx-tethys-back-top.mjs +15 -18
  334. package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
  335. package/fesm2022/ngx-tethys-badge.mjs +8 -8
  336. package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
  337. package/fesm2022/ngx-tethys-breadcrumb.mjs +19 -21
  338. package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
  339. package/fesm2022/ngx-tethys-button.mjs +16 -16
  340. package/fesm2022/ngx-tethys-button.mjs.map +1 -1
  341. package/fesm2022/ngx-tethys-calendar.mjs +26 -26
  342. package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
  343. package/fesm2022/ngx-tethys-card.mjs +3 -3
  344. package/fesm2022/ngx-tethys-card.mjs.map +1 -1
  345. package/fesm2022/ngx-tethys-carousel.mjs +23 -24
  346. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  347. package/fesm2022/ngx-tethys-cascader.mjs +19 -25
  348. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  349. package/fesm2022/ngx-tethys-checkbox.mjs +10 -11
  350. package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
  351. package/fesm2022/ngx-tethys-collapse.mjs +20 -22
  352. package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
  353. package/fesm2022/ngx-tethys-color-picker.mjs +47 -45
  354. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  355. package/fesm2022/ngx-tethys-comment.mjs +3 -3
  356. package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
  357. package/fesm2022/ngx-tethys-copy.mjs +8 -12
  358. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  359. package/fesm2022/ngx-tethys-core.mjs +14 -16
  360. package/fesm2022/ngx-tethys-core.mjs.map +1 -1
  361. package/fesm2022/ngx-tethys-date-picker.mjs +2872 -2924
  362. package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
  363. package/fesm2022/ngx-tethys-date-range.mjs +24 -26
  364. package/fesm2022/ngx-tethys-date-range.mjs.map +1 -1
  365. package/fesm2022/ngx-tethys-dialog.mjs +61 -77
  366. package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
  367. package/fesm2022/ngx-tethys-divider.mjs +20 -12
  368. package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
  369. package/fesm2022/ngx-tethys-dot.mjs +6 -6
  370. package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
  371. package/fesm2022/ngx-tethys-drag-drop.mjs +33 -37
  372. package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
  373. package/fesm2022/ngx-tethys-dropdown.mjs +49 -43
  374. package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
  375. package/fesm2022/ngx-tethys-empty.mjs +18 -18
  376. package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
  377. package/fesm2022/ngx-tethys-flexible-text.mjs +16 -17
  378. package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
  379. package/fesm2022/ngx-tethys-form.mjs +74 -89
  380. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  381. package/fesm2022/ngx-tethys-fullscreen.mjs +14 -17
  382. package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
  383. package/fesm2022/ngx-tethys-grid.mjs +20 -29
  384. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  385. package/fesm2022/ngx-tethys-guider.mjs +20 -26
  386. package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
  387. package/fesm2022/ngx-tethys-icon.mjs +18 -22
  388. package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
  389. package/fesm2022/ngx-tethys-image.mjs +60 -65
  390. package/fesm2022/ngx-tethys-image.mjs.map +1 -1
  391. package/fesm2022/ngx-tethys-input-number.mjs +5 -5
  392. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  393. package/fesm2022/ngx-tethys-input.mjs +53 -60
  394. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  395. package/fesm2022/ngx-tethys-layout.mjs +129 -124
  396. package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
  397. package/fesm2022/ngx-tethys-list.mjs +27 -27
  398. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  399. package/fesm2022/ngx-tethys-loading.mjs +10 -10
  400. package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
  401. package/fesm2022/ngx-tethys-mention.mjs +19 -24
  402. package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
  403. package/fesm2022/ngx-tethys-menu.mjs +56 -57
  404. package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
  405. package/fesm2022/ngx-tethys-message.mjs +47 -41
  406. package/fesm2022/ngx-tethys-message.mjs.map +1 -1
  407. package/fesm2022/ngx-tethys-nav.mjs +61 -72
  408. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  409. package/fesm2022/ngx-tethys-notify.mjs +31 -34
  410. package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
  411. package/fesm2022/ngx-tethys-pagination.mjs +46 -51
  412. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  413. package/fesm2022/ngx-tethys-popover.mjs +51 -57
  414. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  415. package/fesm2022/ngx-tethys-progress.mjs +15 -24
  416. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  417. package/fesm2022/ngx-tethys-property-operation.mjs +27 -27
  418. package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
  419. package/fesm2022/ngx-tethys-property.mjs +14 -14
  420. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  421. package/fesm2022/ngx-tethys-radio.mjs +33 -39
  422. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  423. package/fesm2022/ngx-tethys-rate.mjs +9 -9
  424. package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
  425. package/fesm2022/ngx-tethys-resizable.mjs +43 -34
  426. package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
  427. package/fesm2022/ngx-tethys-result.mjs +3 -3
  428. package/fesm2022/ngx-tethys-result.mjs.map +1 -1
  429. package/fesm2022/ngx-tethys-segment.mjs +41 -44
  430. package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
  431. package/fesm2022/ngx-tethys-select.mjs +28 -44
  432. package/fesm2022/ngx-tethys-select.mjs.map +1 -1
  433. package/fesm2022/ngx-tethys-shared.mjs +135 -150
  434. package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
  435. package/fesm2022/ngx-tethys-skeleton.mjs +33 -47
  436. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  437. package/fesm2022/ngx-tethys-slide.mjs +33 -37
  438. package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
  439. package/fesm2022/ngx-tethys-slider.mjs +7 -7
  440. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  441. package/fesm2022/ngx-tethys-space.mjs +16 -16
  442. package/fesm2022/ngx-tethys-space.mjs.map +1 -1
  443. package/fesm2022/ngx-tethys-statistic.mjs +22 -22
  444. package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
  445. package/fesm2022/ngx-tethys-stepper.mjs +17 -22
  446. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  447. package/fesm2022/ngx-tethys-strength.mjs +11 -11
  448. package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
  449. package/fesm2022/ngx-tethys-switch.mjs +10 -10
  450. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  451. package/fesm2022/ngx-tethys-table.mjs +107 -124
  452. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  453. package/fesm2022/ngx-tethys-tabs.mjs +29 -32
  454. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  455. package/fesm2022/ngx-tethys-tag.mjs +21 -21
  456. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  457. package/fesm2022/ngx-tethys-time-picker.mjs +70 -80
  458. package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
  459. package/fesm2022/ngx-tethys-timeline.mjs +26 -26
  460. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  461. package/fesm2022/ngx-tethys-tooltip.mjs +35 -36
  462. package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
  463. package/fesm2022/ngx-tethys-transfer.mjs +10 -10
  464. package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
  465. package/fesm2022/ngx-tethys-tree-select.mjs +29 -37
  466. package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
  467. package/fesm2022/ngx-tethys-tree.mjs +102 -110
  468. package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
  469. package/fesm2022/ngx-tethys-typography.mjs +18 -18
  470. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  471. package/fesm2022/ngx-tethys-upload.mjs +11 -12
  472. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  473. package/fesm2022/ngx-tethys-vote.mjs +3 -3
  474. package/fesm2022/ngx-tethys-vote.mjs.map +1 -1
  475. package/fesm2022/ngx-tethys-watermark.mjs +12 -12
  476. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  477. package/fesm2022/ngx-tethys.mjs +1 -1
  478. package/fesm2022/ngx-tethys.mjs.map +1 -1
  479. package/flexible-text/flexible-text.component.d.ts +1 -3
  480. package/form/form-group-error/form-group-error.component.d.ts +1 -3
  481. package/form/form-group-label.directive.d.ts +0 -2
  482. package/form/form-group.component.d.ts +1 -4
  483. package/form/form-submit.directive.d.ts +0 -2
  484. package/form/form-validator.service.d.ts +0 -2
  485. package/form/form.directive.d.ts +4 -4
  486. package/form/from-group-footer/form-group-footer.component.d.ts +2 -4
  487. package/form/validator/unique-validator.directive.d.ts +1 -4
  488. package/fullscreen/fullscreen.component.d.ts +0 -2
  489. package/fullscreen/fullscreen.service.d.ts +0 -2
  490. package/grid/thy-col.directive.d.ts +1 -2
  491. package/grid/thy-grid-item.component.d.ts +2 -4
  492. package/grid/thy-grid.component.d.ts +1 -3
  493. package/guider/guider.directive.d.ts +1 -3
  494. package/guider/guider.service.d.ts +0 -7
  495. package/icon/icon-registry.d.ts +1 -3
  496. package/icon/icon.component.d.ts +1 -3
  497. package/image/image-group.component.d.ts +1 -2
  498. package/image/image.directive.d.ts +1 -3
  499. package/image/image.service.d.ts +2 -2
  500. package/image/preview/image-preview.component.d.ts +1 -4
  501. package/input/input-count.component.d.ts +3 -4
  502. package/input/input-group.component.d.ts +1 -3
  503. package/input/input-search.component.d.ts +2 -2
  504. package/input/input.component.d.ts +1 -2
  505. package/input/input.directive.d.ts +2 -3
  506. package/input-number/input-number.component.d.ts +2 -2
  507. package/layout/sidebar.component.d.ts +44 -13
  508. package/list/selection/selection-list.d.ts +1 -2
  509. package/loading/loading.component.d.ts +0 -2
  510. package/loading/styles/loading.scss +3 -1
  511. package/mention/mention.directive.d.ts +4 -5
  512. package/mention/suggestions/suggestions.component.d.ts +2 -3
  513. package/menu/group/menu-group.component.d.ts +30 -8
  514. package/menu/item/action/menu-item-action.component.d.ts +2 -3
  515. package/menu/item/menu-item.component.d.ts +1 -2
  516. package/message/abstract/abstract-message-container.component.d.ts +1 -2
  517. package/message/abstract/abstract-message.component.d.ts +2 -2
  518. package/message/message-container.component.d.ts +1 -3
  519. package/message/message-queue.service.d.ts +1 -2
  520. package/message/message.component.d.ts +1 -3
  521. package/message/message.service.d.ts +3 -5
  522. package/nav/icon-nav/icon-nav.component.d.ts +2 -2
  523. package/nav/nav-ink-bar.directive.d.ts +2 -4
  524. package/nav/nav-item.directive.d.ts +3 -4
  525. package/nav/nav.component.d.ts +1 -3
  526. package/nav/nav.pipe.d.ts +0 -2
  527. package/notify/notify-container.component.d.ts +1 -3
  528. package/notify/notify-queue.service.d.ts +1 -2
  529. package/notify/notify.component.d.ts +2 -3
  530. package/notify/notify.service.d.ts +1 -4
  531. package/package.json +1 -1
  532. package/pagination/pagination.component.d.ts +2 -4
  533. package/pagination/pagination.pipe.d.ts +0 -2
  534. package/popover/header/popover-header.component.d.ts +0 -3
  535. package/popover/popover-container.component.d.ts +3 -4
  536. package/popover/popover.directive.d.ts +2 -5
  537. package/popover/popover.service.d.ts +4 -6
  538. package/progress/progress-circle.component.d.ts +0 -1
  539. package/progress/progress-strip.component.d.ts +0 -1
  540. package/progress/progress.component.d.ts +0 -1
  541. package/property/property-item.component.d.ts +6 -9
  542. package/property-operation/property-operation.component.d.ts +1 -3
  543. package/radio/button/radio-button.component.d.ts +2 -5
  544. package/radio/group/radio-group.component.d.ts +1 -2
  545. package/radio/radio.component.d.ts +2 -3
  546. package/rate/rate.component.d.ts +2 -2
  547. package/resizable/resizable.directive.d.ts +2 -4
  548. package/resizable/resizable.service.d.ts +2 -2
  549. package/resizable/resize-handle.component.d.ts +2 -7
  550. package/schematics/version.d.ts +1 -1
  551. package/schematics/version.js +1 -1
  552. package/segment/segment-item.component.d.ts +4 -5
  553. package/segment/segment.component.d.ts +2 -7
  554. package/select/custom-select/custom-select.component.d.ts +5 -5
  555. package/select/native-select/native-select.component.d.ts +1 -1
  556. package/shared/base-form-check.component.d.ts +1 -1
  557. package/shared/directives/string-or-template-outlet.directive.d.ts +1 -2
  558. package/shared/directives/thy-autofocus.directive.d.ts +0 -2
  559. package/shared/directives/thy-contextmenu.directive.d.ts +1 -2
  560. package/shared/directives/thy-ctrl-enter.directive.d.ts +1 -2
  561. package/shared/directives/thy-enter.directive.d.ts +1 -2
  562. package/shared/directives/thy-scroll.directive.d.ts +1 -2
  563. package/shared/directives/thy-show.d.ts +1 -2
  564. package/shared/directives/thy-stop-propagation.directive.d.ts +2 -2
  565. package/shared/directives/view-outlet.directive.d.ts +1 -2
  566. package/shared/ng-transclude.directive.d.ts +1 -1
  567. package/shared/option/group/option-group.component.d.ts +1 -2
  568. package/shared/option/list-option/list-option.component.d.ts +6 -7
  569. package/shared/option/option.component.d.ts +5 -5
  570. package/shared/select/select-control/select-control.component.d.ts +1 -2
  571. package/skeleton/skeleton-circle.component.d.ts +1 -4
  572. package/skeleton/skeleton-rectangle.component.d.ts +5 -5
  573. package/skeleton/stylized/bullet-list.component.d.ts +9 -1
  574. package/slide/drawer/drawer-container.directive.d.ts +1 -2
  575. package/slide/slide-container.component.d.ts +3 -4
  576. package/slide/slide-header/slide-header.component.d.ts +0 -2
  577. package/slide/slide.service.d.ts +3 -3
  578. package/slider/slider.component.d.ts +2 -2
  579. package/space/space.component.d.ts +1 -2
  580. package/statistic/statistic.component.d.ts +1 -2
  581. package/stepper/step.component.d.ts +1 -2
  582. package/stepper/stepper-button.directive.d.ts +0 -3
  583. package/strength/strength.component.d.ts +0 -1
  584. package/switch/switch.component.d.ts +1 -1
  585. package/table/table-column.component.d.ts +32 -8
  586. package/table/table-skeleton.component.d.ts +1 -3
  587. package/table/table.component.d.ts +3 -5
  588. package/tabs/tabs.component.d.ts +1 -3
  589. package/tag/tag.component.d.ts +7 -3
  590. package/time-picker/inner/inner-time-picker.component.d.ts +2 -4
  591. package/time-picker/time-picker-panel.component.d.ts +1 -3
  592. package/time-picker/time-picker.component.d.ts +1 -2
  593. package/timeline/timeline-item.component.d.ts +1 -3
  594. package/timeline/timeline.component.d.ts +1 -3
  595. package/tooltip/tooltip.component.d.ts +1 -2
  596. package/tooltip/tooltip.directive.d.ts +6 -9
  597. package/tooltip/tooltip.service.d.ts +2 -4
  598. package/transfer/transfer-list.component.d.ts +1 -2
  599. package/tree/tree-node.component.d.ts +5 -21
  600. package/tree/tree.component.d.ts +1 -2
  601. package/tree-select/tree-select.component.d.ts +5 -6
  602. package/typography/bg-color.directive.d.ts +0 -2
  603. package/typography/text-color.directive.d.ts +1 -2
  604. package/upload/file-select-base.d.ts +2 -3
  605. package/upload/file-select.component.d.ts +1 -0
  606. package/upload/upload.service.d.ts +0 -2
  607. package/watermark/watermark.directive.d.ts +1 -2
@@ -1,10 +1,10 @@
1
1
  import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
2
2
  import * as i0 from '@angular/core';
3
- import { Component, forwardRef, EventEmitter, Input, Output, NgModule } from '@angular/core';
4
- import { NgIf, NgFor, NgClass, CommonModule } from '@angular/common';
5
- import * as i2 from '@angular/forms';
3
+ import { inject, Component, forwardRef, ChangeDetectorRef, EventEmitter, Input, Output, NgModule } from '@angular/core';
4
+ import { NgClass, CommonModule } from '@angular/common';
5
+ import * as i1 from '@angular/forms';
6
6
  import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
7
- import * as i1 from 'ngx-tethys/popover';
7
+ import { ThyPopover } from 'ngx-tethys/popover';
8
8
  import { ThyRangePickerDirective, ThyDatePickerFormatPipe, ThyDatePickerModule } from 'ngx-tethys/date-picker';
9
9
  import { ThyDropdownMenuComponent, ThyDropdownMenuItemDirective, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemExtendIconDirective, ThyDropdownModule } from 'ngx-tethys/dropdown';
10
10
  import { getUnixTime, startOfISOWeek, endOfISOWeek, startOfMonth, endOfMonth, addDays, addMonths, endOfDay, isSameDay, startOfDay, addYears } from 'date-fns';
@@ -17,8 +17,8 @@ import { ThyNavModule } from 'ngx-tethys/nav';
17
17
  * @private
18
18
  */
19
19
  class OptionalDateRanges {
20
- constructor(thyPopover) {
21
- this.thyPopover = thyPopover;
20
+ constructor() {
21
+ this.thyPopover = inject(ThyPopover);
22
22
  this.hiddenMenu = false;
23
23
  this.customValue = '自定义';
24
24
  }
@@ -37,23 +37,21 @@ class OptionalDateRanges {
37
37
  };
38
38
  this.selectedDateRange(this.selectedDate);
39
39
  }
40
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OptionalDateRanges, deps: [{ token: i1.ThyPopover }], target: i0.ɵɵFactoryTarget.Component }); }
41
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: OptionalDateRanges, isStandalone: true, selector: "date-range-optional", ngImport: i0, template: "<thy-dropdown-menu thyImmediateRender *ngIf=\"!hiddenMenu\" class=\"thy-date-range-dropdown-menu-container\">\n <a thyDropdownMenuItem href=\"javascript:;\" *ngFor=\"let dateRange of optionalDateRanges\" (click)=\"_selectDateRange(dateRange)\">\n <span thyDropdownMenuItemName>{{ dateRange?.text }}</span>\n <span thyDropdownMenuItemExtendIcon *ngIf=\"dateRange.key === selectedDate?.key\">\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n </a>\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n thyRangePicker\n [(ngModel)]=\"selectedDate\"\n [thyMinDate]=\"minDate\"\n [thyMaxDate]=\"maxDate\"\n [thyDisabledDate]=\"disabledDate\"\n (ngModelChange)=\"_selectedCustomDate($event)\"\n (thyOnCalendarChange)=\"calendarChange($event)\"\n >\n <span thyDropdownMenuItemName>{{ customValue }}</span>\n <span thyDropdownMenuItemExtendIcon *ngIf=\"customKey === selectedDate?.key\">\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n </a>\n</thy-dropdown-menu>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth", "thyImmediateRender"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemExtendIconDirective, selector: "[thyDropdownMenuItemExtendIcon]" }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: ThyRangePickerDirective, selector: "[thyRangePicker]", exportAs: ["thyRangePicker"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OptionalDateRanges, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
41
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: OptionalDateRanges, isStandalone: true, selector: "date-range-optional", ngImport: i0, template: "@if (!hiddenMenu) {\n <thy-dropdown-menu thyImmediateRender class=\"thy-date-range-dropdown-menu-container\">\n @for (dateRange of optionalDateRanges; track $index) {\n <a thyDropdownMenuItem href=\"javascript:;\" (click)=\"_selectDateRange(dateRange)\">\n <span thyDropdownMenuItemName>{{ dateRange?.text }}</span>\n @if (dateRange.key === selectedDate?.key) {\n <span thyDropdownMenuItemExtendIcon>\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n }\n </a>\n }\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n thyRangePicker\n [(ngModel)]=\"selectedDate\"\n [thyMinDate]=\"minDate\"\n [thyMaxDate]=\"maxDate\"\n [thyDisabledDate]=\"disabledDate\"\n (ngModelChange)=\"_selectedCustomDate($event)\"\n (thyOnCalendarChange)=\"calendarChange($event)\">\n <span thyDropdownMenuItemName>{{ customValue }}</span>\n @if (customKey === selectedDate?.key) {\n <span thyDropdownMenuItemExtendIcon>\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n }\n </a>\n </thy-dropdown-menu>\n}\n", dependencies: [{ kind: "component", type: ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth", "thyImmediateRender"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemExtendIconDirective, selector: "[thyDropdownMenuItemExtendIcon]" }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: ThyRangePickerDirective, selector: "[thyRangePicker]", exportAs: ["thyRangePicker"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
42
42
  }
43
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OptionalDateRanges, decorators: [{
44
44
  type: Component,
45
45
  args: [{ selector: 'date-range-optional', standalone: true, imports: [
46
- NgIf,
47
46
  ThyDropdownMenuComponent,
48
- NgFor,
49
47
  ThyDropdownMenuItemDirective,
50
48
  ThyDropdownMenuItemNameDirective,
51
49
  ThyDropdownMenuItemExtendIconDirective,
52
50
  ThyIcon,
53
51
  ThyRangePickerDirective,
54
52
  FormsModule
55
- ], template: "<thy-dropdown-menu thyImmediateRender *ngIf=\"!hiddenMenu\" class=\"thy-date-range-dropdown-menu-container\">\n <a thyDropdownMenuItem href=\"javascript:;\" *ngFor=\"let dateRange of optionalDateRanges\" (click)=\"_selectDateRange(dateRange)\">\n <span thyDropdownMenuItemName>{{ dateRange?.text }}</span>\n <span thyDropdownMenuItemExtendIcon *ngIf=\"dateRange.key === selectedDate?.key\">\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n </a>\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n thyRangePicker\n [(ngModel)]=\"selectedDate\"\n [thyMinDate]=\"minDate\"\n [thyMaxDate]=\"maxDate\"\n [thyDisabledDate]=\"disabledDate\"\n (ngModelChange)=\"_selectedCustomDate($event)\"\n (thyOnCalendarChange)=\"calendarChange($event)\"\n >\n <span thyDropdownMenuItemName>{{ customValue }}</span>\n <span thyDropdownMenuItemExtendIcon *ngIf=\"customKey === selectedDate?.key\">\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n </a>\n</thy-dropdown-menu>\n" }]
56
- }], ctorParameters: () => [{ type: i1.ThyPopover }] });
53
+ ], template: "@if (!hiddenMenu) {\n <thy-dropdown-menu thyImmediateRender class=\"thy-date-range-dropdown-menu-container\">\n @for (dateRange of optionalDateRanges; track $index) {\n <a thyDropdownMenuItem href=\"javascript:;\" (click)=\"_selectDateRange(dateRange)\">\n <span thyDropdownMenuItemName>{{ dateRange?.text }}</span>\n @if (dateRange.key === selectedDate?.key) {\n <span thyDropdownMenuItemExtendIcon>\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n }\n </a>\n }\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n thyRangePicker\n [(ngModel)]=\"selectedDate\"\n [thyMinDate]=\"minDate\"\n [thyMaxDate]=\"maxDate\"\n [thyDisabledDate]=\"disabledDate\"\n (ngModelChange)=\"_selectedCustomDate($event)\"\n (thyOnCalendarChange)=\"calendarChange($event)\">\n <span thyDropdownMenuItemName>{{ customValue }}</span>\n @if (customKey === selectedDate?.key) {\n <span thyDropdownMenuItemExtendIcon>\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n }\n </a>\n </thy-dropdown-menu>\n}\n" }]
54
+ }] });
57
55
 
58
56
  const allDayTimestamp = 24 * 60 * 60;
59
57
  const INPUT_CONTROL_VALUE_ACCESSOR = {
@@ -67,16 +65,9 @@ const INPUT_CONTROL_VALUE_ACCESSOR = {
67
65
  * @order 10
68
66
  */
69
67
  class ThyDateRange {
70
- /**
71
- * 自定义可选值列表项
72
- * @type DateRangeItemInfo[]
73
- */
74
- set thyOptionalDateRanges(value) {
75
- this.optionalDateRanges = value.length > 0 ? value : this.optionalDateRanges;
76
- }
77
- constructor(thyPopover, cdr) {
78
- this.thyPopover = thyPopover;
79
- this.cdr = cdr;
68
+ constructor() {
69
+ this.thyPopover = inject(ThyPopover);
70
+ this.cdr = inject(ChangeDetectorRef);
80
71
  /**
81
72
  * 隐藏下拉选择时间段
82
73
  * @default false
@@ -127,6 +118,13 @@ class ThyDateRange {
127
118
  this.onModelChange = () => { };
128
119
  this.onModelTouched = () => { };
129
120
  }
121
+ /**
122
+ * 自定义可选值列表项
123
+ * @type DateRangeItemInfo[]
124
+ */
125
+ set thyOptionalDateRanges(value) {
126
+ this.optionalDateRanges = value.length > 0 ? value : this.optionalDateRanges;
127
+ }
130
128
  writeValue(value) {
131
129
  if (value) {
132
130
  this.selectedDate = value;
@@ -267,13 +265,13 @@ class ThyDateRange {
267
265
  }
268
266
  });
269
267
  }
270
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDateRange, deps: [{ token: i1.ThyPopover }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
271
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.0", type: ThyDateRange, isStandalone: true, selector: "thy-date-range", inputs: { thyOptionalDateRanges: "thyOptionalDateRanges", thyHiddenMenu: ["thyHiddenMenu", "thyHiddenMenu", coerceBooleanProperty], thyDisabledSwitch: ["thyDisabledSwitch", "thyDisabledSwitch", coerceBooleanProperty], thyCustomTextValue: "thyCustomTextValue", thyMinDate: "thyMinDate", thyMaxDate: "thyMaxDate", thyCustomKey: "thyCustomKey", thyPickerFormat: "thyPickerFormat", thyDisabledDate: "thyDisabledDate" }, outputs: { thyOnCalendarChange: "thyOnCalendarChange" }, providers: [INPUT_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"thy-date-range-container\">\n <ng-container *ngIf=\"!thyDisabledSwitch\">\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n </ng-container>\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu }\">\n <ng-container *ngIf=\"selectedDate?.key === 'custom'\">\n {{ selectedDate?.begin | thyDatePickerFormat }} ~ {{ selectedDate?.end | thyDatePickerFormat }}\n </ng-container>\n <ng-container *ngIf=\"selectedDate?.key === 'exception'\">\n {{ selectedDate?.begin | thyDatePickerFormat : thyPickerFormat }}\n </ng-container>\n <ng-container *ngIf=\"selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception'\">{{ selectedDate?.text }}</ng-container>\n <thy-icon *ngIf=\"!thyHiddenMenu\" class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n </span>\n <ng-container *ngIf=\"!thyDisabledSwitch\">\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n </ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: ThyDatePickerFormatPipe, name: "thyDatePickerFormat" }] }); }
268
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDateRange, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
269
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyDateRange, isStandalone: true, selector: "thy-date-range", inputs: { thyOptionalDateRanges: "thyOptionalDateRanges", thyHiddenMenu: ["thyHiddenMenu", "thyHiddenMenu", coerceBooleanProperty], thyDisabledSwitch: ["thyDisabledSwitch", "thyDisabledSwitch", coerceBooleanProperty], thyCustomTextValue: "thyCustomTextValue", thyMinDate: "thyMinDate", thyMaxDate: "thyMaxDate", thyCustomKey: "thyCustomKey", thyPickerFormat: "thyPickerFormat", thyDisabledDate: "thyDisabledDate" }, outputs: { thyOnCalendarChange: "thyOnCalendarChange" }, providers: [INPUT_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<div class=\"thy-date-range-container\">\n @if (!thyDisabledSwitch) {\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n }\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu }\">\n @if (selectedDate?.key === 'custom') {\n {{ selectedDate?.begin | thyDatePickerFormat }} ~ {{ selectedDate?.end | thyDatePickerFormat }}\n }\n @if (selectedDate?.key === 'exception') {\n {{ selectedDate?.begin | thyDatePickerFormat : thyPickerFormat }}\n }\n @if (selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception') {\n {{ selectedDate?.text }}\n }\n @if (!thyHiddenMenu) {\n <thy-icon class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n }\n </span>\n @if (!thyDisabledSwitch) {\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n }\n</div>\n", dependencies: [{ kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: ThyDatePickerFormatPipe, name: "thyDatePickerFormat" }] }); }
272
270
  }
273
271
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDateRange, decorators: [{
274
272
  type: Component,
275
- args: [{ selector: 'thy-date-range', providers: [INPUT_CONTROL_VALUE_ACCESSOR], standalone: true, imports: [NgIf, ThyAction, ThyIcon, NgClass, ThyDatePickerFormatPipe], template: "<div class=\"thy-date-range-container\">\n <ng-container *ngIf=\"!thyDisabledSwitch\">\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n </ng-container>\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu }\">\n <ng-container *ngIf=\"selectedDate?.key === 'custom'\">\n {{ selectedDate?.begin | thyDatePickerFormat }} ~ {{ selectedDate?.end | thyDatePickerFormat }}\n </ng-container>\n <ng-container *ngIf=\"selectedDate?.key === 'exception'\">\n {{ selectedDate?.begin | thyDatePickerFormat : thyPickerFormat }}\n </ng-container>\n <ng-container *ngIf=\"selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception'\">{{ selectedDate?.text }}</ng-container>\n <thy-icon *ngIf=\"!thyHiddenMenu\" class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n </span>\n <ng-container *ngIf=\"!thyDisabledSwitch\">\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n </ng-container>\n</div>\n" }]
276
- }], ctorParameters: () => [{ type: i1.ThyPopover }, { type: i0.ChangeDetectorRef }], propDecorators: { thyOptionalDateRanges: [{
273
+ args: [{ selector: 'thy-date-range', providers: [INPUT_CONTROL_VALUE_ACCESSOR], standalone: true, imports: [ThyAction, ThyIcon, NgClass, ThyDatePickerFormatPipe], template: "<div class=\"thy-date-range-container\">\n @if (!thyDisabledSwitch) {\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n }\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu }\">\n @if (selectedDate?.key === 'custom') {\n {{ selectedDate?.begin | thyDatePickerFormat }} ~ {{ selectedDate?.end | thyDatePickerFormat }}\n }\n @if (selectedDate?.key === 'exception') {\n {{ selectedDate?.begin | thyDatePickerFormat : thyPickerFormat }}\n }\n @if (selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception') {\n {{ selectedDate?.text }}\n }\n @if (!thyHiddenMenu) {\n <thy-icon class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n }\n </span>\n @if (!thyDisabledSwitch) {\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n }\n</div>\n" }]
274
+ }], propDecorators: { thyOptionalDateRanges: [{
277
275
  type: Input
278
276
  }], thyHiddenMenu: [{
279
277
  type: Input,
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-date-range.mjs","sources":["../../../src/date-range/optional-dates/optional-dates.component.ts","../../../src/date-range/optional-dates/optional-dates.component.html","../../../src/date-range/date-range.component.ts","../../../src/date-range/date-range.component.html","../../../src/date-range/module.ts","../../../src/date-range/date-range.class.ts","../../../src/date-range/ngx-tethys-date-range.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { DateRangeItemInfo } from '../date-range.class';\nimport { ThyPopover } from 'ngx-tethys/popover';\nimport { FormsModule } from '@angular/forms';\nimport { ThyRangePickerDirective } from 'ngx-tethys/date-picker';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport {\n ThyDropdownMenuComponent,\n ThyDropdownMenuItemDirective,\n ThyDropdownMenuItemNameDirective,\n ThyDropdownMenuItemExtendIconDirective\n} from 'ngx-tethys/dropdown';\nimport { NgIf, NgFor } from '@angular/common';\n\n/**\n * @private\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'date-range-optional',\n templateUrl: './optional-dates.component.html',\n standalone: true,\n imports: [\n NgIf,\n ThyDropdownMenuComponent,\n NgFor,\n ThyDropdownMenuItemDirective,\n ThyDropdownMenuItemNameDirective,\n ThyDropdownMenuItemExtendIconDirective,\n ThyIcon,\n ThyRangePickerDirective,\n FormsModule\n ]\n})\nexport class OptionalDateRanges implements OnInit {\n hiddenMenu = false;\n\n optionalDateRanges: DateRangeItemInfo[];\n\n customValue = '自定义';\n\n customKey: string;\n\n minDate: number | Date;\n\n maxDate: number | Date;\n\n disabledDate: (d: Date) => boolean;\n\n selectedDateRange: (date: DateRangeItemInfo) => void;\n\n calendarChange: (date: Date[]) => void;\n\n selectedDate: DateRangeItemInfo;\n\n constructor(private thyPopover: ThyPopover) {}\n\n ngOnInit() {}\n\n _selectDateRange(dateRange: DateRangeItemInfo) {\n this.selectedDate = dateRange;\n this.selectedDateRange(dateRange);\n this.thyPopover.close();\n }\n\n _selectedCustomDate(date: DateRangeItemInfo) {\n this.selectedDate = {\n begin: date.begin,\n end: date.end,\n key: this.customKey,\n text: this.customValue\n };\n this.selectedDateRange(this.selectedDate);\n }\n}\n","<thy-dropdown-menu thyImmediateRender *ngIf=\"!hiddenMenu\" class=\"thy-date-range-dropdown-menu-container\">\n <a thyDropdownMenuItem href=\"javascript:;\" *ngFor=\"let dateRange of optionalDateRanges\" (click)=\"_selectDateRange(dateRange)\">\n <span thyDropdownMenuItemName>{{ dateRange?.text }}</span>\n <span thyDropdownMenuItemExtendIcon *ngIf=\"dateRange.key === selectedDate?.key\">\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n </a>\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n thyRangePicker\n [(ngModel)]=\"selectedDate\"\n [thyMinDate]=\"minDate\"\n [thyMaxDate]=\"maxDate\"\n [thyDisabledDate]=\"disabledDate\"\n (ngModelChange)=\"_selectedCustomDate($event)\"\n (thyOnCalendarChange)=\"calendarChange($event)\"\n >\n <span thyDropdownMenuItemName>{{ customValue }}</span>\n <span thyDropdownMenuItemExtendIcon *ngIf=\"customKey === selectedDate?.key\">\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n </a>\n</thy-dropdown-menu>\n","import { Component, forwardRef, OnInit, Input, ChangeDetectorRef, Output, EventEmitter } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { DateRangeItemInfo } from './date-range.class';\nimport { ThyPopover } from 'ngx-tethys/popover';\nimport { OptionalDateRanges } from './optional-dates/optional-dates.component';\n\nimport {\n getUnixTime,\n startOfISOWeek,\n endOfISOWeek,\n endOfMonth,\n startOfMonth,\n addDays,\n addMonths,\n addYears,\n isSameDay,\n endOfDay,\n startOfDay\n} from 'date-fns';\nimport { ThyDatePickerFormatPipe } from 'ngx-tethys/date-picker';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyAction } from 'ngx-tethys/action';\nimport { NgIf, NgClass } from '@angular/common';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nconst allDayTimestamp = 24 * 60 * 60;\n\nconst INPUT_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyDateRange),\n multi: true\n};\n\n/**\n * 预设时间段及自定义时间段选择组件\n * @name thy-date-range\n * @order 10\n */\n@Component({\n selector: 'thy-date-range',\n templateUrl: './date-range.component.html',\n providers: [INPUT_CONTROL_VALUE_ACCESSOR],\n standalone: true,\n imports: [NgIf, ThyAction, ThyIcon, NgClass, ThyDatePickerFormatPipe]\n})\nexport class ThyDateRange implements OnInit, ControlValueAccessor {\n /**\n * 自定义可选值列表项\n * @type DateRangeItemInfo[]\n */\n @Input()\n set thyOptionalDateRanges(value: DateRangeItemInfo[]) {\n this.optionalDateRanges = value.length > 0 ? value : this.optionalDateRanges;\n }\n\n /**\n * 隐藏下拉选择时间段\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyHiddenMenu = false;\n\n /**\n * 禁用左右切换时间段\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyDisabledSwitch = false;\n\n /**\n * 自定义日期选择的展示文字\n */\n @Input() thyCustomTextValue = '自定义';\n\n /**\n * 自定义日期选择中可选择的最小时间\n * @type Date | number\n */\n @Input() thyMinDate: Date | number;\n\n /**\n * 自定义日期选择中可选择的最大时间\n * @type Date | number\n */\n @Input() thyMaxDate: Date | number;\n\n /**\n * 选中的时间段的展示形式,\n * <br/> `custom`形式:`2023-07-01 ~ 2023-07-31`;\n * <br/> `exception`形式:`2023-07-01`,具体展示还与`thyPickerFormat`有关。\n */\n @Input() thyCustomKey: 'custom' | 'exception' = 'custom';\n\n /**\n * 自定义日期展示格式,比如`yyyy年MM月`,只有当`thyCustomKey`值设为`exception`时才会生效\n */\n @Input() thyPickerFormat: string;\n\n /**\n * 自定义日期禁用日期\n */\n @Input() thyDisabledDate: (d: Date) => boolean;\n\n /**\n * 自定义日期选择日期回调\n * @type EventEmitter<Date[]>\n */\n @Output() readonly thyOnCalendarChange = new EventEmitter<Date[]>();\n\n public selectedDate?: DateRangeItemInfo;\n\n public optionalDateRanges: DateRangeItemInfo[] = [\n {\n key: 'week',\n text: '本周',\n begin: getUnixTime(startOfISOWeek(new Date())),\n end: getUnixTime(endOfISOWeek(new Date())),\n timestamp: {\n interval: 7,\n unit: 'day'\n }\n },\n {\n key: 'month',\n text: '本月',\n begin: getUnixTime(startOfMonth(new Date())),\n end: getUnixTime(endOfMonth(new Date())),\n timestamp: {\n interval: 1,\n unit: 'month'\n }\n }\n ];\n\n public selectedDateRange: {\n begin: number;\n end: number;\n };\n\n public onModelChange: Function = () => {};\n\n public onModelTouched: Function = () => {};\n\n constructor(\n private thyPopover: ThyPopover,\n private cdr: ChangeDetectorRef\n ) {}\n\n writeValue(value: any): void {\n if (value) {\n this.selectedDate = value;\n } else if (this.optionalDateRanges.length > 0) {\n this.selectedDate = this.optionalDateRanges[0];\n this.onModelChange(this.selectedDate);\n }\n this._setSelectedDateRange();\n this.cdr.detectChanges();\n }\n\n registerOnChange(fn: any): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onModelTouched = fn;\n }\n\n ngOnInit() {}\n\n private _setSelectedDateRange() {\n this.selectedDateRange = {\n begin: this.selectedDate.begin,\n end: this.selectedDate.end\n };\n }\n\n private _calculateNewTime(type: string) {\n if (this.selectedDate.timestamp) {\n const beginDate = new Date(this.selectedDate.begin * 1000);\n const endDate = new Date(this.selectedDate.end * 1000);\n const interval = this.selectedDate.timestamp.interval;\n\n if (this.selectedDate.timestamp.unit === 'day') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addDays(beginDate, -1 * interval)),\n end: getUnixTime(addDays(endDate, -1 * interval)),\n key: this.thyCustomKey\n };\n } else {\n return {\n begin: getUnixTime(addDays(beginDate, 1 * interval)),\n end: getUnixTime(addDays(endDate, 1 * interval)),\n key: this.thyCustomKey\n };\n }\n } else if (this.selectedDate.timestamp.unit === 'month') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addMonths(beginDate, -1 * interval)),\n end: getUnixTime(endOfDay(addDays(beginDate, -1))),\n key: this.thyCustomKey\n };\n } else {\n const endIsEndDayOfMonth = isSameDay(endDate, endOfMonth(endDate));\n return {\n begin: getUnixTime(startOfDay(addDays(endDate, 1))),\n end: endIsEndDayOfMonth\n ? getUnixTime(endOfMonth(addMonths(endDate, 1 * interval)))\n : getUnixTime(addMonths(endDate, 1 * interval)),\n key: this.thyCustomKey\n };\n }\n } else if (this.selectedDate.timestamp.unit === 'year') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addYears(beginDate, -1 * interval)),\n end: getUnixTime(addYears(endDate, -1 * interval)),\n key: this.thyCustomKey\n };\n } else {\n return {\n begin: getUnixTime(addYears(beginDate, 1 * interval)),\n end: getUnixTime(addYears(endDate, 1 * interval)),\n key: this.thyCustomKey\n };\n }\n }\n } else {\n const interval: number = this.selectedDate.end - this.selectedDate.begin + allDayTimestamp;\n if (type === 'previous') {\n return {\n begin: this.selectedDate.begin - interval,\n end: this.selectedDate.end - interval,\n key: this.thyCustomKey\n };\n } else {\n return {\n begin: this.selectedDate.begin + interval,\n end: this.selectedDate.end + interval,\n key: this.thyCustomKey\n };\n }\n }\n }\n\n private _setPreviousOrNextDate(type: string) {\n this.selectedDate = Object.assign({}, this.selectedDate, this._calculateNewTime(type));\n this._setSelectedDateRange();\n this.onModelChange(this.selectedDate);\n }\n\n public previous() {\n this._setPreviousOrNextDate('previous');\n }\n\n public next() {\n this._setPreviousOrNextDate('next');\n }\n\n public openOptionalDateRangesMenu(event: Event) {\n if (this.thyHiddenMenu) {\n return;\n }\n this.thyPopover.open(OptionalDateRanges, {\n origin: event.currentTarget as HTMLElement,\n hasBackdrop: true,\n backdropClass: 'thy-overlay-transparent-backdrop',\n offset: 0,\n manualClosure: true,\n originActiveClass: 'thy-date-range-text-active',\n initialState: {\n hiddenMenu: this.thyHiddenMenu,\n optionalDateRanges: this.optionalDateRanges,\n selectedDate: this.selectedDate,\n minDate: this.thyMinDate,\n maxDate: this.thyMaxDate,\n customValue: this.thyCustomTextValue,\n customKey: this.thyCustomKey,\n disabledDate: this.thyDisabledDate,\n selectedDateRange: (dateRange: DateRangeItemInfo) => {\n this.onModelChange(dateRange);\n this.selectedDate = dateRange;\n },\n calendarChange: (date: Date[]) => {\n this.thyOnCalendarChange.emit(date);\n }\n }\n });\n }\n}\n","<div class=\"thy-date-range-container\">\n <ng-container *ngIf=\"!thyDisabledSwitch\">\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n </ng-container>\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu }\">\n <ng-container *ngIf=\"selectedDate?.key === 'custom'\">\n {{ selectedDate?.begin | thyDatePickerFormat }} ~ {{ selectedDate?.end | thyDatePickerFormat }}\n </ng-container>\n <ng-container *ngIf=\"selectedDate?.key === 'exception'\">\n {{ selectedDate?.begin | thyDatePickerFormat : thyPickerFormat }}\n </ng-container>\n <ng-container *ngIf=\"selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception'\">{{ selectedDate?.text }}</ng-container>\n <thy-icon *ngIf=\"!thyHiddenMenu\" class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n </span>\n <ng-container *ngIf=\"!thyDisabledSwitch\">\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n </ng-container>\n</div>\n","import { ThyIconModule } from 'ngx-tethys/icon';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ThyDateRange } from './date-range.component';\nimport { ThyDropdownModule } from 'ngx-tethys/dropdown';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyDatePickerModule } from 'ngx-tethys/date-picker';\nimport { OptionalDateRanges } from './optional-dates/optional-dates.component';\nimport { ThyNavModule } from 'ngx-tethys/nav';\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ThyDropdownModule,\n ThySharedModule,\n ThyIconModule,\n ThyDatePickerModule,\n ThyNavModule,\n ThyDateRange,\n OptionalDateRanges\n ],\n exports: [ThyDateRange]\n})\nexport class ThyDateRangeModule {}\n","export type AttachTypes = 'day' | 'month' | 'year';\n\n/**\n * @order 20\n */\nexport class DateRangeItemInfo {\n /**\n * 开始时间\n */\n begin?: number;\n\n /**\n * 截止时间\n */\n end?: number;\n\n /**\n * 时间段的唯一标识,如'week'、'month'\n */\n key?: string;\n\n /**\n * 时间段的展示文本\n */\n text?: string;\n\n /**\n * 自定义时间段规则,interval为时间间隔;unit可选值有'day' | 'month' | 'year'\n */\n timestamp?: { interval?: number; unit?: AttachTypes };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAcA;;AAEG;MAkBU,kBAAkB,CAAA;AAqB3B,IAAA,WAAA,CAAoB,UAAsB,EAAA;QAAtB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QApB1C,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;QAInB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;KAgB0B;AAE9C,IAAA,QAAQ,MAAK;AAEb,IAAA,gBAAgB,CAAC,SAA4B,EAAA;AACzC,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;AAClC,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;KAC3B;AAED,IAAA,mBAAmB,CAAC,IAAuB,EAAA;QACvC,IAAI,CAAC,YAAY,GAAG;YAChB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,GAAG,EAAE,IAAI,CAAC,SAAS;YACnB,IAAI,EAAE,IAAI,CAAC,WAAW;SACzB,CAAC;AACF,QAAA,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC7C;8GAvCQ,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,I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AA,EAAA,IAAA,EAAA,kBAAkB,YAZvB,YAAY;YACZ,WAAW;YACX,iBAAiB;YACjB,eAAe;YACf,aAAa;YACb,mBAAmB;YACnB,YAAY;YACZ,YAAY;AACZ,YAAA,kBAAkB,aAEZ,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AAEb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAZvB,YAAY;YACZ,WAAW;YACX,iBAAiB;YACjB,eAAe;YACf,aAAa;YACb,mBAAmB;YACnB,YAAY;YACZ,YAAY;YACZ,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIb,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAd9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,iBAAiB;wBACjB,eAAe;wBACf,aAAa;wBACb,mBAAmB;wBACnB,YAAY;wBACZ,YAAY;wBACZ,kBAAkB;AACrB,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;AAC1B,iBAAA,CAAA;;;ACrBD;;AAEG;MACU,iBAAiB,CAAA;AAyB7B;;AC9BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-date-range.mjs","sources":["../../../src/date-range/optional-dates/optional-dates.component.ts","../../../src/date-range/optional-dates/optional-dates.component.html","../../../src/date-range/date-range.component.ts","../../../src/date-range/date-range.component.html","../../../src/date-range/module.ts","../../../src/date-range/date-range.class.ts","../../../src/date-range/ngx-tethys-date-range.ts"],"sourcesContent":["import { Component, OnInit, inject } from '@angular/core';\nimport { DateRangeItemInfo } from '../date-range.class';\nimport { ThyPopover } from 'ngx-tethys/popover';\nimport { FormsModule } from '@angular/forms';\nimport { ThyRangePickerDirective } from 'ngx-tethys/date-picker';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport {\n ThyDropdownMenuComponent,\n ThyDropdownMenuItemDirective,\n ThyDropdownMenuItemNameDirective,\n ThyDropdownMenuItemExtendIconDirective\n} from 'ngx-tethys/dropdown';\n\n/**\n * @private\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'date-range-optional',\n templateUrl: './optional-dates.component.html',\n standalone: true,\n imports: [\n ThyDropdownMenuComponent,\n ThyDropdownMenuItemDirective,\n ThyDropdownMenuItemNameDirective,\n ThyDropdownMenuItemExtendIconDirective,\n ThyIcon,\n ThyRangePickerDirective,\n FormsModule\n ]\n})\nexport class OptionalDateRanges implements OnInit {\n private thyPopover = inject(ThyPopover);\n\n hiddenMenu = false;\n\n optionalDateRanges: DateRangeItemInfo[];\n\n customValue = '自定义';\n\n customKey: string;\n\n minDate: number | Date;\n\n maxDate: number | Date;\n\n disabledDate: (d: Date) => boolean;\n\n selectedDateRange: (date: DateRangeItemInfo) => void;\n\n calendarChange: (date: Date[]) => void;\n\n selectedDate: DateRangeItemInfo;\n\n ngOnInit() {}\n\n _selectDateRange(dateRange: DateRangeItemInfo) {\n this.selectedDate = dateRange;\n this.selectedDateRange(dateRange);\n this.thyPopover.close();\n }\n\n _selectedCustomDate(date: DateRangeItemInfo) {\n this.selectedDate = {\n begin: date.begin,\n end: date.end,\n key: this.customKey,\n text: this.customValue\n };\n this.selectedDateRange(this.selectedDate);\n }\n}\n","@if (!hiddenMenu) {\n <thy-dropdown-menu thyImmediateRender class=\"thy-date-range-dropdown-menu-container\">\n @for (dateRange of optionalDateRanges; track $index) {\n <a thyDropdownMenuItem href=\"javascript:;\" (click)=\"_selectDateRange(dateRange)\">\n <span thyDropdownMenuItemName>{{ dateRange?.text }}</span>\n @if (dateRange.key === selectedDate?.key) {\n <span thyDropdownMenuItemExtendIcon>\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n }\n </a>\n }\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n thyRangePicker\n [(ngModel)]=\"selectedDate\"\n [thyMinDate]=\"minDate\"\n [thyMaxDate]=\"maxDate\"\n [thyDisabledDate]=\"disabledDate\"\n (ngModelChange)=\"_selectedCustomDate($event)\"\n (thyOnCalendarChange)=\"calendarChange($event)\">\n <span thyDropdownMenuItemName>{{ customValue }}</span>\n @if (customKey === selectedDate?.key) {\n <span thyDropdownMenuItemExtendIcon>\n <thy-icon class=\"text-primary\" thyIconName=\"check\"></thy-icon>\n </span>\n }\n </a>\n </thy-dropdown-menu>\n}\n","import { Component, forwardRef, OnInit, Input, ChangeDetectorRef, Output, EventEmitter, inject } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { DateRangeItemInfo } from './date-range.class';\nimport { ThyPopover } from 'ngx-tethys/popover';\nimport { OptionalDateRanges } from './optional-dates/optional-dates.component';\n\nimport {\n getUnixTime,\n startOfISOWeek,\n endOfISOWeek,\n endOfMonth,\n startOfMonth,\n addDays,\n addMonths,\n addYears,\n isSameDay,\n endOfDay,\n startOfDay\n} from 'date-fns';\nimport { ThyDatePickerFormatPipe } from 'ngx-tethys/date-picker';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyAction } from 'ngx-tethys/action';\nimport { NgClass } from '@angular/common';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nconst allDayTimestamp = 24 * 60 * 60;\n\nconst INPUT_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ThyDateRange),\n multi: true\n};\n\n/**\n * 预设时间段及自定义时间段选择组件\n * @name thy-date-range\n * @order 10\n */\n@Component({\n selector: 'thy-date-range',\n templateUrl: './date-range.component.html',\n providers: [INPUT_CONTROL_VALUE_ACCESSOR],\n standalone: true,\n imports: [ThyAction, ThyIcon, NgClass, ThyDatePickerFormatPipe]\n})\nexport class ThyDateRange implements OnInit, ControlValueAccessor {\n private thyPopover = inject(ThyPopover);\n private cdr = inject(ChangeDetectorRef);\n\n /**\n * 自定义可选值列表项\n * @type DateRangeItemInfo[]\n */\n @Input()\n set thyOptionalDateRanges(value: DateRangeItemInfo[]) {\n this.optionalDateRanges = value.length > 0 ? value : this.optionalDateRanges;\n }\n\n /**\n * 隐藏下拉选择时间段\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyHiddenMenu = false;\n\n /**\n * 禁用左右切换时间段\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyDisabledSwitch = false;\n\n /**\n * 自定义日期选择的展示文字\n */\n @Input() thyCustomTextValue = '自定义';\n\n /**\n * 自定义日期选择中可选择的最小时间\n * @type Date | number\n */\n @Input() thyMinDate: Date | number;\n\n /**\n * 自定义日期选择中可选择的最大时间\n * @type Date | number\n */\n @Input() thyMaxDate: Date | number;\n\n /**\n * 选中的时间段的展示形式,\n * <br/> `custom`形式:`2023-07-01 ~ 2023-07-31`;\n * <br/> `exception`形式:`2023-07-01`,具体展示还与`thyPickerFormat`有关。\n */\n @Input() thyCustomKey: 'custom' | 'exception' = 'custom';\n\n /**\n * 自定义日期展示格式,比如`yyyy年MM月`,只有当`thyCustomKey`值设为`exception`时才会生效\n */\n @Input() thyPickerFormat: string;\n\n /**\n * 自定义日期禁用日期\n */\n @Input() thyDisabledDate: (d: Date) => boolean;\n\n /**\n * 自定义日期选择日期回调\n * @type EventEmitter<Date[]>\n */\n @Output() readonly thyOnCalendarChange = new EventEmitter<Date[]>();\n\n public selectedDate?: DateRangeItemInfo;\n\n public optionalDateRanges: DateRangeItemInfo[] = [\n {\n key: 'week',\n text: '本周',\n begin: getUnixTime(startOfISOWeek(new Date())),\n end: getUnixTime(endOfISOWeek(new Date())),\n timestamp: {\n interval: 7,\n unit: 'day'\n }\n },\n {\n key: 'month',\n text: '本月',\n begin: getUnixTime(startOfMonth(new Date())),\n end: getUnixTime(endOfMonth(new Date())),\n timestamp: {\n interval: 1,\n unit: 'month'\n }\n }\n ];\n\n public selectedDateRange: {\n begin: number;\n end: number;\n };\n\n public onModelChange: Function = () => {};\n\n public onModelTouched: Function = () => {};\n\n writeValue(value: any): void {\n if (value) {\n this.selectedDate = value;\n } else if (this.optionalDateRanges.length > 0) {\n this.selectedDate = this.optionalDateRanges[0];\n this.onModelChange(this.selectedDate);\n }\n this._setSelectedDateRange();\n this.cdr.detectChanges();\n }\n\n registerOnChange(fn: any): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onModelTouched = fn;\n }\n\n ngOnInit() {}\n\n private _setSelectedDateRange() {\n this.selectedDateRange = {\n begin: this.selectedDate.begin,\n end: this.selectedDate.end\n };\n }\n\n private _calculateNewTime(type: string) {\n if (this.selectedDate.timestamp) {\n const beginDate = new Date(this.selectedDate.begin * 1000);\n const endDate = new Date(this.selectedDate.end * 1000);\n const interval = this.selectedDate.timestamp.interval;\n\n if (this.selectedDate.timestamp.unit === 'day') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addDays(beginDate, -1 * interval)),\n end: getUnixTime(addDays(endDate, -1 * interval)),\n key: this.thyCustomKey\n };\n } else {\n return {\n begin: getUnixTime(addDays(beginDate, 1 * interval)),\n end: getUnixTime(addDays(endDate, 1 * interval)),\n key: this.thyCustomKey\n };\n }\n } else if (this.selectedDate.timestamp.unit === 'month') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addMonths(beginDate, -1 * interval)),\n end: getUnixTime(endOfDay(addDays(beginDate, -1))),\n key: this.thyCustomKey\n };\n } else {\n const endIsEndDayOfMonth = isSameDay(endDate, endOfMonth(endDate));\n return {\n begin: getUnixTime(startOfDay(addDays(endDate, 1))),\n end: endIsEndDayOfMonth\n ? getUnixTime(endOfMonth(addMonths(endDate, 1 * interval)))\n : getUnixTime(addMonths(endDate, 1 * interval)),\n key: this.thyCustomKey\n };\n }\n } else if (this.selectedDate.timestamp.unit === 'year') {\n if (type === 'previous') {\n return {\n begin: getUnixTime(addYears(beginDate, -1 * interval)),\n end: getUnixTime(addYears(endDate, -1 * interval)),\n key: this.thyCustomKey\n };\n } else {\n return {\n begin: getUnixTime(addYears(beginDate, 1 * interval)),\n end: getUnixTime(addYears(endDate, 1 * interval)),\n key: this.thyCustomKey\n };\n }\n }\n } else {\n const interval: number = this.selectedDate.end - this.selectedDate.begin + allDayTimestamp;\n if (type === 'previous') {\n return {\n begin: this.selectedDate.begin - interval,\n end: this.selectedDate.end - interval,\n key: this.thyCustomKey\n };\n } else {\n return {\n begin: this.selectedDate.begin + interval,\n end: this.selectedDate.end + interval,\n key: this.thyCustomKey\n };\n }\n }\n }\n\n private _setPreviousOrNextDate(type: string) {\n this.selectedDate = Object.assign({}, this.selectedDate, this._calculateNewTime(type));\n this._setSelectedDateRange();\n this.onModelChange(this.selectedDate);\n }\n\n public previous() {\n this._setPreviousOrNextDate('previous');\n }\n\n public next() {\n this._setPreviousOrNextDate('next');\n }\n\n public openOptionalDateRangesMenu(event: Event) {\n if (this.thyHiddenMenu) {\n return;\n }\n this.thyPopover.open(OptionalDateRanges, {\n origin: event.currentTarget as HTMLElement,\n hasBackdrop: true,\n backdropClass: 'thy-overlay-transparent-backdrop',\n offset: 0,\n manualClosure: true,\n originActiveClass: 'thy-date-range-text-active',\n initialState: {\n hiddenMenu: this.thyHiddenMenu,\n optionalDateRanges: this.optionalDateRanges,\n selectedDate: this.selectedDate,\n minDate: this.thyMinDate,\n maxDate: this.thyMaxDate,\n customValue: this.thyCustomTextValue,\n customKey: this.thyCustomKey,\n disabledDate: this.thyDisabledDate,\n selectedDateRange: (dateRange: DateRangeItemInfo) => {\n this.onModelChange(dateRange);\n this.selectedDate = dateRange;\n },\n calendarChange: (date: Date[]) => {\n this.thyOnCalendarChange.emit(date);\n }\n }\n });\n }\n}\n","<div class=\"thy-date-range-container\">\n @if (!thyDisabledSwitch) {\n <a thyAction thyIcon=\"angle-left\" href=\"javascript:;\" (click)=\"previous()\"></a>\n }\n <span\n href=\"javascript:;\"\n (click)=\"openOptionalDateRangesMenu($event)\"\n class=\"thy-date-range-text\"\n [ngClass]=\"{ 'thy-date-range-disabled': thyHiddenMenu }\">\n @if (selectedDate?.key === 'custom') {\n {{ selectedDate?.begin | thyDatePickerFormat }} ~ {{ selectedDate?.end | thyDatePickerFormat }}\n }\n @if (selectedDate?.key === 'exception') {\n {{ selectedDate?.begin | thyDatePickerFormat : thyPickerFormat }}\n }\n @if (selectedDate?.key !== 'custom' && selectedDate?.key !== 'exception') {\n {{ selectedDate?.text }}\n }\n @if (!thyHiddenMenu) {\n <thy-icon class=\"thy-date-range-text-caret-down ml-2\" thyIconName=\"angle-down\"></thy-icon>\n }\n </span>\n @if (!thyDisabledSwitch) {\n <a thyAction thyIcon=\"angle-right\" href=\"javascript:;\" (click)=\"next()\"></a>\n }\n</div>\n","import { ThyIconModule } from 'ngx-tethys/icon';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ThyDateRange } from './date-range.component';\nimport { ThyDropdownModule } from 'ngx-tethys/dropdown';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyDatePickerModule } from 'ngx-tethys/date-picker';\nimport { OptionalDateRanges } from './optional-dates/optional-dates.component';\nimport { ThyNavModule } from 'ngx-tethys/nav';\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ThyDropdownModule,\n ThySharedModule,\n ThyIconModule,\n ThyDatePickerModule,\n ThyNavModule,\n ThyDateRange,\n OptionalDateRanges\n ],\n exports: [ThyDateRange]\n})\nexport class ThyDateRangeModule {}\n","export type AttachTypes = 'day' | 'month' | 'year';\n\n/**\n * @order 20\n */\nexport class DateRangeItemInfo {\n /**\n * 开始时间\n */\n begin?: number;\n\n /**\n * 截止时间\n */\n end?: number;\n\n /**\n * 时间段的唯一标识,如'week'、'month'\n */\n key?: string;\n\n /**\n * 时间段的展示文本\n */\n text?: string;\n\n /**\n * 自定义时间段规则,interval为时间间隔;unit可选值有'day' | 'month' | 'year'\n */\n tim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AA,UAAA,EAAA,CAAA;kBAd9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,iBAAiB;wBACjB,eAAe;wBACf,aAAa;wBACb,mBAAmB;wBACnB,YAAY;wBACZ,YAAY;wBACZ,kBAAkB;AACrB,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;AAC1B,iBAAA,CAAA;;;ACrBD;;AAEG;MACU,iBAAiB,CAAA;AAyB7B;;AC9BD;;AAEG;;;;"}
@@ -1,24 +1,22 @@
1
- import * as i1 from '@angular/cdk/overlay';
2
- import { OverlayModule } from '@angular/cdk/overlay';
1
+ import { Overlay, OverlayModule } from '@angular/cdk/overlay';
3
2
  import { PortalModule, ComponentPortal } from '@angular/cdk/portal';
4
- import { DOCUMENT, NgIf, NgTemplateOutlet, NgClass, CommonModule } from '@angular/common';
3
+ import { DOCUMENT, NgTemplateOutlet, NgClass, CommonModule } from '@angular/common';
5
4
  import * as i0 from '@angular/core';
6
- import { InjectionToken, EventEmitter, Component, ChangeDetectionStrategy, Inject, ViewChild, HostBinding, Injector, Injectable, Optional, Input, ContentChild, Output, NgModule } from '@angular/core';
7
- import * as i2$2 from '@angular/forms';
5
+ import { InjectionToken, inject, ChangeDetectorRef, ElementRef, NgZone, Renderer2, EventEmitter, Component, ChangeDetectionStrategy, ViewChild, HostBinding, Injector, Injectable, Input, ContentChild, Output, NgModule } from '@angular/core';
6
+ import * as i1$1 from '@angular/forms';
8
7
  import { FormsModule } from '@angular/forms';
9
8
  import { ThyAction, ThyActionModule } from 'ngx-tethys/action';
10
9
  import { ThyButton, ThyButtonModule } from 'ngx-tethys/button';
11
10
  import { ThyFormDirective, ThyFormGroupFooter, ThyFormModule } from 'ngx-tethys/form';
12
11
  import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
13
12
  import { ThySharedModule } from 'ngx-tethys/shared';
14
- import * as i2 from 'ngx-tethys/core';
15
- import { ThyAbstractOverlayConfig, ThyAbstractOverlayContainer, reqAnimFrame, ThyPortalOutlet, ThyAbstractOverlayRef, ThyAbstractInternalOverlayRef, ThyAbstractOverlayService } from 'ngx-tethys/core';
13
+ import { ThyAbstractOverlayConfig, ThyAbstractOverlayContainer, reqAnimFrame, ThyClickPositioner, ThyPortalOutlet, ThyAbstractOverlayRef, ThyAbstractInternalOverlayRef, ThyAbstractOverlayService, ThyTranslate } from 'ngx-tethys/core';
16
14
  import { of } from 'rxjs';
17
15
  import { Directionality } from '@angular/cdk/bidi';
18
16
  import { filter, finalize } from 'rxjs/operators';
19
- import * as i3 from '@angular/cdk/a11y';
17
+ import { FocusTrapFactory } from '@angular/cdk/a11y';
20
18
  import { state, style, transition, animate, trigger } from '@angular/animations';
21
- import * as i2$1 from '@angular/cdk/scrolling';
19
+ import * as i1 from '@angular/cdk/scrolling';
22
20
  import { CdkScrollable } from '@angular/cdk/scrolling';
23
21
  import { coerceBooleanProperty } from 'ngx-tethys/util';
24
22
  import { useHostRenderer } from '@tethys/cdk/dom';
@@ -178,15 +176,16 @@ class ThyDialogContainer extends ThyAbstractOverlayContainer {
178
176
  this.changeDetectorRef.markForCheck();
179
177
  });
180
178
  }
181
- constructor(elementRef, document, config, changeDetectorRef, clickPositioner, focusTrapFactory, ngZone, renderer) {
179
+ constructor() {
180
+ const changeDetectorRef = inject(ChangeDetectorRef);
182
181
  super(dialogAbstractOverlayOptions, changeDetectorRef);
183
- this.elementRef = elementRef;
184
- this.document = document;
185
- this.config = config;
186
- this.clickPositioner = clickPositioner;
187
- this.focusTrapFactory = focusTrapFactory;
188
- this.ngZone = ngZone;
189
- this.renderer = renderer;
182
+ this.elementRef = inject(ElementRef);
183
+ this.document = inject(DOCUMENT);
184
+ this.config = inject(ThyDialogConfig);
185
+ this.clickPositioner = inject(ThyClickPositioner);
186
+ this.focusTrapFactory = inject(FocusTrapFactory);
187
+ this.ngZone = inject(NgZone);
188
+ this.renderer = inject(Renderer2);
190
189
  /** State of the dialog animation. */
191
190
  this.animationState = 'void';
192
191
  /** Emits when an animation state changes. */
@@ -231,7 +230,7 @@ class ThyDialogContainer extends ThyAbstractOverlayContainer {
231
230
  ngOnDestroy() {
232
231
  super.destroy();
233
232
  }
234
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogContainer, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: ThyDialogConfig }, { token: i0.ChangeDetectorRef }, { token: i2.ThyClickPositioner }, { token: i3.FocusTrapFactory }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
233
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogContainer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
235
234
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: ThyDialogContainer, isStandalone: true, selector: "thy-dialog-container", host: { attributes: { "tabindex": "-1", "aria-modal": "true" }, listeners: { "@dialogContainer.start": "onAnimationStart($event)", "@dialogContainer.done": "onAnimationDone($event)" }, properties: { "attr.id": "this.id", "attr.role": "config.role", "attr.aria-labelledby": "config.ariaLabel ? null : ariaLabelledBy", "attr.aria-label": "config.ariaLabel", "attr.aria-describedby": "config.ariaDescribedBy || null", "@dialogContainer": "animationState" }, classAttribute: "thy-dialog-container" }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: ThyPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: ` <ng-template thyPortalOutlet></ng-template> `, isInline: true, dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: ThyPortalOutlet, selector: "[thyPortalOutlet]", inputs: ["thyPortalOutlet"], exportAs: ["thyPortalOutlet"] }], animations: [thyDialogAnimations.dialogContainer], changeDetection: i0.ChangeDetectionStrategy.Default }); }
236
235
  }
237
236
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogContainer, decorators: [{
@@ -259,10 +258,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
259
258
  standalone: true,
260
259
  imports: [PortalModule, ThyPortalOutlet]
261
260
  }]
262
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: undefined, decorators: [{
263
- type: Inject,
264
- args: [DOCUMENT]
265
- }] }, { type: ThyDialogConfig }, { type: i0.ChangeDetectorRef }, { type: i2.ThyClickPositioner }, { type: i3.FocusTrapFactory }, { type: i0.NgZone }, { type: i0.Renderer2 }], propDecorators: { portalOutlet: [{
261
+ }], ctorParameters: () => [], propDecorators: { portalOutlet: [{
266
262
  type: ViewChild,
267
263
  args: [ThyPortalOutlet, { static: true }]
268
264
  }], id: [{
@@ -345,9 +341,13 @@ class ThyDialog extends ThyAbstractOverlayService {
345
341
  }
346
342
  return Injector.create({ parent: userInjector || this.injector, providers: injectionTokens });
347
343
  }
348
- constructor(overlay, injector, defaultConfig, clickPositioner, confirmComponentType) {
344
+ constructor() {
345
+ const overlay = inject(Overlay);
346
+ const injector = inject(Injector);
347
+ const defaultConfig = inject(THY_DIALOG_DEFAULT_OPTIONS, { optional: true });
348
+ const clickPositioner = inject(ThyClickPositioner);
349
349
  super(dialogAbstractOverlayOptions, overlay, injector, defaultConfig);
350
- this.confirmComponentType = confirmComponentType;
350
+ this.confirmComponentType = inject(THY_CONFIRM_COMPONENT_TOKEN);
351
351
  clickPositioner.initialize();
352
352
  }
353
353
  /**
@@ -398,20 +398,12 @@ class ThyDialog extends ThyAbstractOverlayService {
398
398
  ngOnDestroy() {
399
399
  this.dispose();
400
400
  }
401
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialog, deps: [{ token: i1.Overlay }, { token: i0.Injector }, { token: THY_DIALOG_DEFAULT_OPTIONS, optional: true }, { token: i2.ThyClickPositioner }, { token: THY_CONFIRM_COMPONENT_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
401
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialog, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
402
402
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialog }); }
403
403
  }
404
404
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialog, decorators: [{
405
405
  type: Injectable
406
- }], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Injector }, { type: ThyDialogConfig, decorators: [{
407
- type: Optional
408
- }, {
409
- type: Inject,
410
- args: [THY_DIALOG_DEFAULT_OPTIONS]
411
- }] }, { type: i2.ThyClickPositioner }, { type: undefined, decorators: [{
412
- type: Inject,
413
- args: [THY_CONFIRM_COMPONENT_TOKEN]
414
- }] }] });
406
+ }], ctorParameters: () => [] });
415
407
 
416
408
  /**
417
409
  * 模态框的主体组件
@@ -419,6 +411,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
419
411
  * @order 50
420
412
  */
421
413
  class ThyDialogBody {
414
+ constructor() {
415
+ this.dialog = inject(ThyDialog);
416
+ this._isDialogBody = true;
417
+ this.thyClearPaddingClassName = false;
418
+ }
422
419
  /**
423
420
  * 清除间距
424
421
  * @default false
@@ -426,14 +423,9 @@ class ThyDialogBody {
426
423
  set thyClearPadding(value) {
427
424
  this.thyClearPaddingClassName = value;
428
425
  }
429
- constructor(dialog) {
430
- this.dialog = dialog;
431
- this._isDialogBody = true;
432
- this.thyClearPaddingClassName = false;
433
- }
434
426
  ngOnInit() { }
435
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogBody, deps: [{ token: ThyDialog }], target: i0.ɵɵFactoryTarget.Component }); }
436
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.0", type: ThyDialogBody, isStandalone: true, selector: "thy-dialog-body", inputs: { thyClearPadding: ["thyClearPadding", "thyClearPadding", coerceBooleanProperty] }, host: { properties: { "class.dialog-body": "this._isDialogBody", "class.dialog-body-clear-padding": "this.thyClearPaddingClassName" } }, exportAs: ["thyDialogBody"], hostDirectives: [{ directive: i2$1.CdkScrollable }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
427
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogBody, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
428
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.0", type: ThyDialogBody, isStandalone: true, selector: "thy-dialog-body", inputs: { thyClearPadding: ["thyClearPadding", "thyClearPadding", coerceBooleanProperty] }, host: { properties: { "class.dialog-body": "this._isDialogBody", "class.dialog-body-clear-padding": "this.thyClearPaddingClassName" } }, exportAs: ["thyDialogBody"], hostDirectives: [{ directive: i1.CdkScrollable }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
437
429
  }
438
430
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogBody, decorators: [{
439
431
  type: Component,
@@ -445,7 +437,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
445
437
  standalone: true,
446
438
  hostDirectives: [CdkScrollable]
447
439
  }]
448
- }], ctorParameters: () => [{ type: ThyDialog }], propDecorators: { _isDialogBody: [{
440
+ }], propDecorators: { _isDialogBody: [{
449
441
  type: HostBinding,
450
442
  args: [`class.dialog-body`]
451
443
  }], thyClearPaddingClassName: [{
@@ -475,6 +467,16 @@ const THY_CONFIRM_DEFAULT_OPTIONS_PROVIDER = {
475
467
  * @order 40
476
468
  */
477
469
  class ThyDialogHeader {
470
+ constructor() {
471
+ this.elementRef = inject(ElementRef);
472
+ this.dialog = inject(ThyDialog);
473
+ this.translate = inject(ThyTranslate);
474
+ this.dialogContainer = inject(ThyDialogContainer, { optional: true });
475
+ /**
476
+ * 关闭事件
477
+ */
478
+ this.thyOnClose = new EventEmitter();
479
+ }
478
480
  /**
479
481
  * 标题的多语言 Key
480
482
  */
@@ -483,16 +485,6 @@ class ThyDialogHeader {
483
485
  this.thyTitle = this.translate.instant(key);
484
486
  }
485
487
  }
486
- constructor(elementRef, dialog, translate, dialogContainer) {
487
- this.elementRef = elementRef;
488
- this.dialog = dialog;
489
- this.translate = translate;
490
- this.dialogContainer = dialogContainer;
491
- /**
492
- * 关闭事件
493
- */
494
- this.thyOnClose = new EventEmitter();
495
- }
496
488
  ngOnInit() {
497
489
  if (!this.dialogContainer) {
498
490
  // When this directive is included in a dialog via TemplateRef (rather than being
@@ -519,8 +511,8 @@ class ThyDialogHeader {
519
511
  this.dialog.close();
520
512
  }
521
513
  }
522
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogHeader, deps: [{ token: i0.ElementRef }, { token: ThyDialog }, { token: i2.ThyTranslate }, { token: ThyDialogContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
523
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.0", type: ThyDialogHeader, isStandalone: true, selector: "thy-dialog-header", inputs: { thyTitle: "thyTitle", thySize: "thySize", thyDivided: ["thyDivided", "thyDivided", coerceBooleanProperty], thyTitleTranslationKey: "thyTitleTranslationKey", thyIcon: "thyIcon" }, outputs: { thyOnClose: "thyOnClose" }, host: { properties: { "class.thy-dialog-header-lg": "thySize === 'lg'", "class.thy-dialog-header-divided": "thyDivided" }, classAttribute: "dialog-header thy-dialog-header" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["dialogHeader"], descendants: true }], exportAs: ["thyDialogHeader"], ngImport: i0, template: "<ng-container *ngIf=\"headerTemplate; else defaultHeader\">\n <template [ngTemplateOutlet]=\"headerTemplate\"></template>\n</ng-container>\n<ng-template #defaultHeader>\n <h3 class=\"dialog-title\"><thy-icon [thyIconName]=\"thyIcon\"></thy-icon>{{ thyTitle }}</h3>\n <a href=\"javascript:;\" class=\"mr-n2\" thyAction thyActionIcon=\"close\" (click)=\"close($event)\"></a>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] }); }
514
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
515
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyDialogHeader, isStandalone: true, selector: "thy-dialog-header", inputs: { thyTitle: "thyTitle", thySize: "thySize", thyDivided: ["thyDivided", "thyDivided", coerceBooleanProperty], thyTitleTranslationKey: "thyTitleTranslationKey", thyIcon: "thyIcon" }, outputs: { thyOnClose: "thyOnClose" }, host: { properties: { "class.thy-dialog-header-lg": "thySize === 'lg'", "class.thy-dialog-header-divided": "thyDivided" }, classAttribute: "dialog-header thy-dialog-header" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["dialogHeader"], descendants: true }], exportAs: ["thyDialogHeader"], ngImport: i0, template: "@if (headerTemplate) {\n <template [ngTemplateOutlet]=\"headerTemplate\"></template>\n} @else {\n <h3 class=\"dialog-title\"><thy-icon [thyIconName]=\"thyIcon\"></thy-icon>{{ thyTitle }}</h3>\n <a href=\"javascript:;\" class=\"mr-n2\" thyAction thyActionIcon=\"close\" (click)=\"close($event)\"></a>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] }); }
524
516
  }
525
517
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogHeader, decorators: [{
526
518
  type: Component,
@@ -528,10 +520,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
528
520
  class: 'dialog-header thy-dialog-header',
529
521
  '[class.thy-dialog-header-lg]': `thySize === 'lg'`,
530
522
  '[class.thy-dialog-header-divided]': `thyDivided`
531
- }, standalone: true, imports: [NgIf, NgTemplateOutlet, ThyIcon, ThyAction], template: "<ng-container *ngIf=\"headerTemplate; else defaultHeader\">\n <template [ngTemplateOutlet]=\"headerTemplate\"></template>\n</ng-container>\n<ng-template #defaultHeader>\n <h3 class=\"dialog-title\"><thy-icon [thyIconName]=\"thyIcon\"></thy-icon>{{ thyTitle }}</h3>\n <a href=\"javascript:;\" class=\"mr-n2\" thyAction thyActionIcon=\"close\" (click)=\"close($event)\"></a>\n</ng-template>\n" }]
532
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: ThyDialog }, { type: i2.ThyTranslate }, { type: ThyDialogContainer, decorators: [{
533
- type: Optional
534
- }] }], propDecorators: { headerTemplate: [{
523
+ }, standalone: true, imports: [NgTemplateOutlet, ThyIcon, ThyAction], template: "@if (headerTemplate) {\n <template [ngTemplateOutlet]=\"headerTemplate\"></template>\n} @else {\n <h3 class=\"dialog-title\"><thy-icon [thyIconName]=\"thyIcon\"></thy-icon>{{ thyTitle }}</h3>\n <a href=\"javascript:;\" class=\"mr-n2\" thyAction thyActionIcon=\"close\" (click)=\"close($event)\"></a>\n}\n" }]
524
+ }], propDecorators: { headerTemplate: [{
535
525
  type: ContentChild,
536
526
  args: ['dialogHeader']
537
527
  }], thyTitle: [{
@@ -553,10 +543,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
553
543
  * @private
554
544
  */
555
545
  class ThyConfirm {
556
- constructor(dialogRef, changeDetectorRef, defaultConfig) {
557
- this.dialogRef = dialogRef;
558
- this.changeDetectorRef = changeDetectorRef;
559
- this.defaultConfig = defaultConfig;
546
+ constructor() {
547
+ this.dialogRef = inject(ThyDialogRef);
548
+ this.changeDetectorRef = inject(ChangeDetectorRef);
549
+ this.defaultConfig = inject(THY_CONFIRM_DEFAULT_OPTIONS);
560
550
  this.defaultConfig = { ...THY_CONFIRM_DEFAULT_OPTIONS_VALUE, ...this.defaultConfig };
561
551
  }
562
552
  ngOnInit() {
@@ -593,16 +583,13 @@ class ThyConfirm {
593
583
  this.dialogRef.close();
594
584
  }
595
585
  ngOnDestroy() { }
596
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyConfirm, deps: [{ token: ThyDialogRef }, { token: i0.ChangeDetectorRef }, { token: THY_CONFIRM_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Component }); }
597
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: ThyConfirm, isStandalone: true, selector: "thy-confirm-default", inputs: { options: "options" }, ngImport: i0, template: "<thy-dialog-header [thyTitle]=\"title || 'Install Angular'\" (thyOnClose)=\"close()\"> </thy-dialog-header>\n<thy-dialog-body class=\"thy-form\">\n <form thyForm name=\"thyConfirm\" thyLayout=\"vertical\">\n <div class=\"form-group\">\n <p [innerHTML]=\"content\"></p>\n </div>\n <thy-form-group-footer [thyAlign]=\"footerAlign\">\n <div class=\"thy-confirm-footer\" [ngClass]=\"'thy-confirm-footer-' + footerAlign\">\n <button [thyButton]=\"okType\" (click)=\"confirm()\" [thyLoading]=\"loading\" [thyLoadingText]=\"okLoadingText\">{{ okText }}</button>\n <button thyButton=\"link-secondary\" (click)=\"close()\" class=\"thy-confirm-cancel\">{{ cancelText }}</button>\n </div>\n </thy-form-group-footer>\n </form>\n</thy-dialog-body>\n", dependencies: [{ kind: "component", type: ThyDialogHeader, selector: "thy-dialog-header", inputs: ["thyTitle", "thySize", "thyDivided", "thyTitleTranslationKey", "thyIcon"], outputs: ["thyOnClose"], exportAs: ["thyDialogHeader"] }, { kind: "component", type: ThyDialogBody, selector: "thy-dialog-body", inputs: ["thyClearPadding"], exportAs: ["thyDialogBody"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: ThyFormGroupFooter, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
586
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyConfirm, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
587
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: ThyConfirm, isStandalone: true, selector: "thy-confirm-default", inputs: { options: "options" }, ngImport: i0, template: "<thy-dialog-header [thyTitle]=\"title || 'Install Angular'\" (thyOnClose)=\"close()\"> </thy-dialog-header>\n<thy-dialog-body class=\"thy-form\">\n <form thyForm name=\"thyConfirm\" thyLayout=\"vertical\">\n <div class=\"form-group\">\n <p [innerHTML]=\"content\"></p>\n </div>\n <thy-form-group-footer [thyAlign]=\"footerAlign\">\n <div class=\"thy-confirm-footer\" [ngClass]=\"'thy-confirm-footer-' + footerAlign\">\n <button [thyButton]=\"okType\" (click)=\"confirm()\" [thyLoading]=\"loading\" [thyLoadingText]=\"okLoadingText\">{{ okText }}</button>\n <button thyButton=\"link-secondary\" (click)=\"close()\" class=\"thy-confirm-cancel\">{{ cancelText }}</button>\n </div>\n </thy-form-group-footer>\n </form>\n</thy-dialog-body>\n", dependencies: [{ kind: "component", type: ThyDialogHeader, selector: "thy-dialog-header", inputs: ["thyTitle", "thySize", "thyDivided", "thyTitleTranslationKey", "thyIcon"], outputs: ["thyOnClose"], exportAs: ["thyDialogHeader"] }, { kind: "component", type: ThyDialogBody, selector: "thy-dialog-body", inputs: ["thyClearPadding"], exportAs: ["thyDialogBody"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: ThyFormGroupFooter, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
598
588
  }
599
589
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyConfirm, decorators: [{
600
590
  type: Component,
601
591
  args: [{ selector: 'thy-confirm-default', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ThyDialogHeader, ThyDialogBody, FormsModule, ThyFormDirective, ThyFormGroupFooter, NgClass, ThyButton], template: "<thy-dialog-header [thyTitle]=\"title || 'Install Angular'\" (thyOnClose)=\"close()\"> </thy-dialog-header>\n<thy-dialog-body class=\"thy-form\">\n <form thyForm name=\"thyConfirm\" thyLayout=\"vertical\">\n <div class=\"form-group\">\n <p [innerHTML]=\"content\"></p>\n </div>\n <thy-form-group-footer [thyAlign]=\"footerAlign\">\n <div class=\"thy-confirm-footer\" [ngClass]=\"'thy-confirm-footer-' + footerAlign\">\n <button [thyButton]=\"okType\" (click)=\"confirm()\" [thyLoading]=\"loading\" [thyLoadingText]=\"okLoadingText\">{{ okText }}</button>\n <button thyButton=\"link-secondary\" (click)=\"close()\" class=\"thy-confirm-cancel\">{{ cancelText }}</button>\n </div>\n </thy-form-group-footer>\n </form>\n</thy-dialog-body>\n" }]
602
- }], ctorParameters: () => [{ type: ThyDialogRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
603
- type: Inject,
604
- args: [THY_CONFIRM_DEFAULT_OPTIONS]
605
- }] }], propDecorators: { options: [{
592
+ }], ctorParameters: () => [], propDecorators: { options: [{
606
593
  type: Input
607
594
  }] } });
608
595
 
@@ -623,8 +610,8 @@ class ThyDialogFooter {
623
610
  get align() {
624
611
  return !!this.thyAlign ? this.thyAlign : this.dialogLayoutConfig.footerAlign;
625
612
  }
626
- constructor(dialogLayoutConfig) {
627
- this.dialogLayoutConfig = dialogLayoutConfig;
613
+ constructor() {
614
+ this.dialogLayoutConfig = inject(THY_DIALOG_LAYOUT_CONFIG);
628
615
  this.hostRenderer = useHostRenderer();
629
616
  this.divided = this.dialogLayoutConfig.footerDivided;
630
617
  }
@@ -635,16 +622,13 @@ class ThyDialogFooter {
635
622
  'dialog-footer-border-top': this.divided
636
623
  });
637
624
  }
638
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogFooter, deps: [{ token: THY_DIALOG_LAYOUT_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
639
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.0", type: ThyDialogFooter, isStandalone: true, selector: "thy-dialog-footer", inputs: { thyDivided: ["thyDivided", "thyDivided", coerceBooleanProperty], thyAlign: "thyAlign" }, queries: [{ propertyName: "description", first: true, predicate: ["description"], descendants: true }], exportAs: ["thyDialogFooter"], ngImport: i0, template: "<div class=\"dialog-footer-actions btn-pair\">\n <ng-content></ng-content>\n</div>\n<div class=\"dialog-footer-description\" *ngIf=\"description\">\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
625
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
626
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ThyDialogFooter, isStandalone: true, selector: "thy-dialog-footer", inputs: { thyDivided: ["thyDivided", "thyDivided", coerceBooleanProperty], thyAlign: "thyAlign" }, queries: [{ propertyName: "description", first: true, predicate: ["description"], descendants: true }], exportAs: ["thyDialogFooter"], ngImport: i0, template: "<div class=\"dialog-footer-actions btn-pair\">\n <ng-content></ng-content>\n</div>\n@if (description) {\n <div class=\"dialog-footer-description\">\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
640
627
  }
641
628
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ThyDialogFooter, decorators: [{
642
629
  type: Component,
643
- args: [{ selector: 'thy-dialog-footer', exportAs: 'thyDialogFooter', standalone: true, imports: [NgIf, NgTemplateOutlet], template: "<div class=\"dialog-footer-actions btn-pair\">\n <ng-content></ng-content>\n</div>\n<div class=\"dialog-footer-description\" *ngIf=\"description\">\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\n</div>\n" }]
644
- }], ctorParameters: () => [{ type: ThyDialogLayoutConfig, decorators: [{
645
- type: Inject,
646
- args: [THY_DIALOG_LAYOUT_CONFIG]
647
- }] }], propDecorators: { description: [{
630
+ args: [{ selector: 'thy-dialog-footer', exportAs: 'thyDialogFooter', standalone: true, imports: [NgTemplateOutlet], template: "<div class=\"dialog-footer-actions btn-pair\">\n <ng-content></ng-content>\n</div>\n@if (description) {\n <div class=\"dialog-footer-description\">\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\n </div>\n}\n" }]
631
+ }], ctorParameters: () => [], propDecorators: { description: [{
648
632
  type: ContentChild,
649
633
  args: ['description']
650
634
  }], thyDivided: [{