ngx-tethys 19.0.13 → 19.1.0-next.0

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 (280) hide show
  1. package/CHANGELOG.md +29 -2
  2. package/action/action.component.d.ts +12 -20
  3. package/action/actions.component.d.ts +5 -7
  4. package/affix/affix.component.d.ts +7 -10
  5. package/alert/alert.component.d.ts +1 -1
  6. package/anchor/anchor-link.component.d.ts +8 -8
  7. package/anchor/anchor.component.d.ts +15 -21
  8. package/arrow-switcher/arrow-switcher.component.d.ts +15 -22
  9. package/autocomplete/autocomplete.component.d.ts +10 -17
  10. package/autocomplete/autocomplete.trigger.directive.d.ts +10 -18
  11. package/avatar/avatar-list/avatar-list.component.d.ts +8 -14
  12. package/avatar/avatar.component.d.ts +25 -39
  13. package/back-top/back-top.component.d.ts +9 -12
  14. package/badge/badge.component.d.ts +19 -59
  15. package/breadcrumb/breadcrumb.component.d.ts +15 -20
  16. package/button/button-icon.component.d.ts +3 -2
  17. package/button/button.component.d.ts +3 -2
  18. package/calendar/calendar-header.component.d.ts +9 -8
  19. package/calendar/calendar.component.d.ts +16 -16
  20. package/card/card.component.d.ts +5 -11
  21. package/card/content.component.d.ts +3 -8
  22. package/card/header.component.d.ts +7 -8
  23. package/carousel/carousel.component.d.ts +22 -27
  24. package/cascader/cascader-li.component.d.ts +13 -21
  25. package/cascader/cascader-search-option.component.d.ts +8 -16
  26. package/cascader/cascader.component.d.ts +58 -80
  27. package/checkbox/checkbox.component.d.ts +2 -5
  28. package/collapse/collapse-item.component.d.ts +12 -19
  29. package/collapse/collapse.component.d.ts +6 -12
  30. package/collapse/collapse.token.d.ts +3 -3
  31. package/color-picker/color-picker-custom-panel.component.d.ts +5 -5
  32. package/color-picker/color-picker-panel.component.d.ts +7 -11
  33. package/color-picker/color-picker.component.d.ts +19 -35
  34. package/color-picker/parts/alpha/alpha.component.d.ts +8 -8
  35. package/color-picker/parts/hue/hue.component.d.ts +6 -6
  36. package/color-picker/parts/indicator/indicator.component.d.ts +4 -3
  37. package/color-picker/parts/inputs/inputs.component.d.ts +9 -9
  38. package/color-picker/parts/saturation/saturation.component.d.ts +9 -9
  39. package/comment/comment.component.d.ts +4 -5
  40. package/copy/copy.directive.d.ts +8 -9
  41. package/date-picker/abstract-picker.component.d.ts +8 -7
  42. package/date-picker/lib/calendar/calendar-footer.component.d.ts +2 -1
  43. package/date-picker/lib/popups/inner-popup.component.d.ts +2 -1
  44. package/date-picker/picker.component.d.ts +2 -1
  45. package/date-range/date-range.component.d.ts +2 -2
  46. package/dialog/body/dialog-body.component.d.ts +2 -6
  47. package/dialog/confirm/confirm.component.d.ts +2 -2
  48. package/dialog/footer/dialog-footer.component.d.ts +6 -9
  49. package/dialog/header/dialog-header.component.d.ts +9 -11
  50. package/divider/divider.component.d.ts +12 -16
  51. package/dot/dot.component.d.ts +5 -13
  52. package/drag-drop/drag-handle.directive.d.ts +2 -1
  53. package/drag-drop/drag.directive.d.ts +2 -1
  54. package/drag-drop/drop-container.directive.d.ts +2 -1
  55. package/dropdown/dropdown-menu-item.directive.d.ts +3 -2
  56. package/dropdown/dropdown-menu.component.d.ts +2 -1
  57. package/dropdown/dropdown.directive.d.ts +2 -1
  58. package/empty/empty.component.d.ts +21 -27
  59. package/fesm2022/ngx-tethys-action.mjs +54 -91
  60. package/fesm2022/ngx-tethys-action.mjs.map +1 -1
  61. package/fesm2022/ngx-tethys-affix.mjs +29 -26
  62. package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
  63. package/fesm2022/ngx-tethys-anchor.mjs +91 -118
  64. package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
  65. package/fesm2022/ngx-tethys-arrow-switcher.mjs +51 -77
  66. package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
  67. package/fesm2022/ngx-tethys-autocomplete.mjs +69 -103
  68. package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
  69. package/fesm2022/ngx-tethys-avatar.mjs +117 -162
  70. package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
  71. package/fesm2022/ngx-tethys-back-top.mjs +33 -46
  72. package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
  73. package/fesm2022/ngx-tethys-badge.mjs +104 -208
  74. package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
  75. package/fesm2022/ngx-tethys-breadcrumb.mjs +66 -70
  76. package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
  77. package/fesm2022/ngx-tethys-calendar.mjs +85 -87
  78. package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
  79. package/fesm2022/ngx-tethys-card.mjs +72 -77
  80. package/fesm2022/ngx-tethys-card.mjs.map +1 -1
  81. package/fesm2022/ngx-tethys-carousel.mjs +82 -99
  82. package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
  83. package/fesm2022/ngx-tethys-cascader.mjs +313 -468
  84. package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
  85. package/fesm2022/ngx-tethys-checkbox.mjs +10 -17
  86. package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
  87. package/fesm2022/ngx-tethys-collapse.mjs +66 -71
  88. package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
  89. package/fesm2022/ngx-tethys-color-picker.mjs +187 -246
  90. package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
  91. package/fesm2022/ngx-tethys-comment.mjs +16 -10
  92. package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
  93. package/fesm2022/ngx-tethys-copy.mjs +25 -28
  94. package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
  95. package/fesm2022/ngx-tethys-dialog.mjs +81 -82
  96. package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
  97. package/fesm2022/ngx-tethys-divider.mjs +49 -58
  98. package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
  99. package/fesm2022/ngx-tethys-dot.mjs +45 -68
  100. package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
  101. package/fesm2022/ngx-tethys-empty.mjs +107 -95
  102. package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
  103. package/fesm2022/ngx-tethys-form.mjs +161 -200
  104. package/fesm2022/ngx-tethys-form.mjs.map +1 -1
  105. package/fesm2022/ngx-tethys-fullscreen.mjs +21 -23
  106. package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
  107. package/fesm2022/ngx-tethys-grid.mjs +160 -152
  108. package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
  109. package/fesm2022/ngx-tethys-i18n.mjs +25 -25
  110. package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
  111. package/fesm2022/ngx-tethys-input-number.mjs +101 -114
  112. package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
  113. package/fesm2022/ngx-tethys-input.mjs +268 -271
  114. package/fesm2022/ngx-tethys-input.mjs.map +1 -1
  115. package/fesm2022/ngx-tethys-list.mjs +1 -1
  116. package/fesm2022/ngx-tethys-list.mjs.map +1 -1
  117. package/fesm2022/ngx-tethys-loading.mjs +17 -35
  118. package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
  119. package/fesm2022/ngx-tethys-mention.mjs +52 -74
  120. package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
  121. package/fesm2022/ngx-tethys-menu.mjs +106 -179
  122. package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
  123. package/fesm2022/ngx-tethys-nav.mjs +169 -201
  124. package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
  125. package/fesm2022/ngx-tethys-pagination.mjs +230 -294
  126. package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
  127. package/fesm2022/ngx-tethys-popover.mjs +67 -70
  128. package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
  129. package/fesm2022/ngx-tethys-progress.mjs +196 -244
  130. package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
  131. package/fesm2022/ngx-tethys-property.mjs +102 -105
  132. package/fesm2022/ngx-tethys-property.mjs.map +1 -1
  133. package/fesm2022/ngx-tethys-radio.mjs +34 -38
  134. package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
  135. package/fesm2022/ngx-tethys-result.mjs +46 -28
  136. package/fesm2022/ngx-tethys-result.mjs.map +1 -1
  137. package/fesm2022/ngx-tethys-skeleton.mjs +339 -342
  138. package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
  139. package/fesm2022/ngx-tethys-slider.mjs +75 -108
  140. package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
  141. package/fesm2022/ngx-tethys-space.mjs +26 -46
  142. package/fesm2022/ngx-tethys-space.mjs.map +1 -1
  143. package/fesm2022/ngx-tethys-statistic.mjs +114 -151
  144. package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
  145. package/fesm2022/ngx-tethys-stepper.mjs +74 -107
  146. package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
  147. package/fesm2022/ngx-tethys-switch.mjs +80 -140
  148. package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
  149. package/fesm2022/ngx-tethys-table.mjs +1 -1
  150. package/fesm2022/ngx-tethys-table.mjs.map +1 -1
  151. package/fesm2022/ngx-tethys-tabs.mjs +69 -87
  152. package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
  153. package/fesm2022/ngx-tethys-tag.mjs +42 -64
  154. package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
  155. package/fesm2022/ngx-tethys-timeline.mjs +104 -129
  156. package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
  157. package/fesm2022/ngx-tethys-typography.mjs +36 -33
  158. package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
  159. package/fesm2022/ngx-tethys-upload.mjs +91 -130
  160. package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
  161. package/fesm2022/ngx-tethys-util.mjs.map +1 -1
  162. package/fesm2022/ngx-tethys-watermark.mjs +36 -40
  163. package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
  164. package/fesm2022/ngx-tethys.mjs +1 -1
  165. package/fesm2022/ngx-tethys.mjs.map +1 -1
  166. package/form/form-group-error/form-group-error.component.d.ts +2 -3
  167. package/form/form-group-label.directive.d.ts +2 -1
  168. package/form/form-group.component.d.ts +17 -24
  169. package/form/form-submit.directive.d.ts +2 -2
  170. package/form/form.directive.d.ts +6 -8
  171. package/form/from-group-footer/form-group-footer.component.d.ts +2 -2
  172. package/form/validator/confirm-validator.directive.d.ts +2 -2
  173. package/form/validator/unique-validator.directive.d.ts +2 -2
  174. package/fullscreen/fullscreen.component.d.ts +7 -7
  175. package/grid/flex.d.ts +14 -19
  176. package/grid/thy-col.directive.d.ts +6 -9
  177. package/grid/thy-grid-item.component.d.ts +3 -4
  178. package/grid/thy-grid.component.d.ts +11 -12
  179. package/grid/thy-row.directive.d.ts +12 -12
  180. package/icon/icon.component.d.ts +3 -2
  181. package/image/image.directive.d.ts +3 -2
  182. package/input/input-count.component.d.ts +4 -5
  183. package/input/input-group.component.d.ts +20 -20
  184. package/input/input-search.component.d.ts +15 -20
  185. package/input/input.component.d.ts +20 -21
  186. package/input/input.directive.d.ts +4 -6
  187. package/input-number/input-number.component.d.ts +21 -29
  188. package/layout/header.component.d.ts +4 -9
  189. package/layout/sidebar-header.component.d.ts +2 -1
  190. package/layout/sidebar.component.d.ts +8 -7
  191. package/list/list.component.d.ts +2 -1
  192. package/list/selection/selection-list.d.ts +4 -3
  193. package/loading/loading.component.d.ts +4 -10
  194. package/mention/mention.directive.d.ts +6 -7
  195. package/mention/suggestions/suggestions.component.d.ts +8 -9
  196. package/menu/group/menu-group.component.d.ts +16 -33
  197. package/menu/item/action/menu-item-action.component.d.ts +7 -8
  198. package/menu/item/icon/menu-item-icon.component.d.ts +2 -2
  199. package/menu/item/menu-item.component.d.ts +4 -4
  200. package/menu/item/name/menu-item-name.component.d.ts +2 -3
  201. package/menu/menu.component.d.ts +3 -7
  202. package/nav/icon-nav/icon-nav-link.directive.d.ts +3 -7
  203. package/nav/icon-nav/icon-nav.component.d.ts +3 -8
  204. package/nav/nav-ink-bar.directive.d.ts +4 -6
  205. package/nav/nav-item.directive.d.ts +7 -10
  206. package/nav/nav.component.d.ts +20 -48
  207. package/package.json +1 -1
  208. package/pagination/pagination.component.d.ts +48 -109
  209. package/popover/header/popover-header.component.d.ts +7 -6
  210. package/popover/popover.directive.d.ts +11 -18
  211. package/progress/progress-circle.component.d.ts +32 -21
  212. package/progress/progress-strip.component.d.ts +10 -14
  213. package/progress/progress.component.d.ts +15 -23
  214. package/property/examples/single/single.component.scss +6 -0
  215. package/property/properties.component.d.ts +6 -13
  216. package/property/property-item.component.d.ts +21 -26
  217. package/property/styles/properties.scss +124 -52
  218. package/property-operation/property-operation.component.d.ts +6 -5
  219. package/radio/button/radio-button.component.d.ts +2 -2
  220. package/radio/group/radio-group.component.d.ts +8 -7
  221. package/radio/radio.component.d.ts +2 -2
  222. package/radio/radio.token.d.ts +2 -2
  223. package/rate/rate-item.component.d.ts +2 -1
  224. package/rate/rate.component.d.ts +4 -3
  225. package/resizable/resizable.directive.d.ts +4 -9
  226. package/resizable/resize-handle.component.d.ts +2 -1
  227. package/resizable/resize-handles.component.d.ts +2 -1
  228. package/result/result.component.d.ts +9 -10
  229. package/schematics/version.d.ts +1 -1
  230. package/schematics/version.js +1 -1
  231. package/segment/segment-item.component.d.ts +2 -1
  232. package/segment/segment.component.d.ts +2 -1
  233. package/select/custom-select/custom-select.component.d.ts +11 -10
  234. package/select/native-select/native-select.component.d.ts +2 -1
  235. package/shared/base-form-check.component.d.ts +3 -2
  236. package/shared/directives/thy-autofocus.directive.d.ts +3 -2
  237. package/shared/directives/thy-scroll.directive.d.ts +2 -1
  238. package/shared/directives/thy-show.d.ts +2 -1
  239. package/shared/option/group/option-group.component.d.ts +2 -1
  240. package/shared/option/list-option/list-option.component.d.ts +2 -7
  241. package/shared/option/option.component.d.ts +2 -1
  242. package/shared/select/select-control/select-control.component.d.ts +7 -6
  243. package/skeleton/skeleton-circle.component.d.ts +16 -19
  244. package/skeleton/skeleton-rectangle.component.d.ts +20 -23
  245. package/skeleton/skeleton.component.d.ts +5 -6
  246. package/skeleton/stylized/bullet-list.component.d.ts +11 -13
  247. package/skeleton/stylized/list.component.d.ts +10 -12
  248. package/skeleton/stylized/paragraph.component.d.ts +12 -14
  249. package/slide/slide-body/slide-body-section.component.d.ts +2 -1
  250. package/slider/slider.component.d.ts +17 -24
  251. package/space/space.component.d.ts +8 -8
  252. package/statistic/statistic.component.d.ts +35 -40
  253. package/stepper/step-header.component.d.ts +6 -10
  254. package/stepper/step.component.d.ts +6 -6
  255. package/stepper/stepper.component.d.ts +15 -20
  256. package/switch/switch.component.d.ts +24 -35
  257. package/table/table-column.component.d.ts +6 -5
  258. package/table/table-skeleton.component.d.ts +3 -10
  259. package/table/table.component.d.ts +11 -10
  260. package/tabs/tab-content.component.d.ts +4 -4
  261. package/tabs/tab.component.d.ts +4 -5
  262. package/tabs/tabs.component.d.ts +13 -15
  263. package/tag/tag.component.d.ts +10 -16
  264. package/time-picker/time-picker-panel.component.d.ts +3 -2
  265. package/time-picker/time-picker.component.d.ts +6 -5
  266. package/timeline/timeline-item.component.d.ts +9 -13
  267. package/timeline/timeline.component.d.ts +13 -17
  268. package/tooltip/tooltip.directive.d.ts +3 -2
  269. package/tree/tree-node.component.d.ts +6 -15
  270. package/tree/tree.component.d.ts +8 -7
  271. package/tree-select/tree-select.component.d.ts +8 -7
  272. package/typography/bg-color.directive.d.ts +3 -3
  273. package/typography/text/text.component.d.ts +2 -2
  274. package/typography/text-color.directive.d.ts +3 -3
  275. package/upload/file-drop.directive.d.ts +9 -11
  276. package/upload/file-select-base.d.ts +6 -10
  277. package/upload/file-select.component.d.ts +10 -20
  278. package/util/helpers/helpers.d.ts +2 -1
  279. package/vote/vote.component.d.ts +4 -3
  280. package/watermark/watermark.directive.d.ts +7 -9
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-calendar.mjs","sources":["../../../src/calendar/calendar-header.component.ts","../../../src/calendar/calendar-header.component.html","../../../src/calendar/calendar-cells.ts","../../../src/calendar/calendar.component.ts","../../../src/calendar/calendar.component.html","../../../src/calendar/module.ts","../../../src/calendar/ngx-tethys-calendar.ts"],"sourcesContent":["import { DateRangeItemInfo, ThyDateRange } from 'ngx-tethys/date-range';\nimport { endOfMonth, FunctionProp, getMonth, getUnixTime, getYear, startOfMonth, TinyDate } from 'ngx-tethys/util';\n\nimport { JsonPipe, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectorRef, Component, EventEmitter, HostBinding, inject, Input, OnInit, Output, Signal, TemplateRef } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ThyButton } from 'ngx-tethys/button';\nimport { DateHelperService } from 'ngx-tethys/date-picker';\nimport { injectLocale, ThyCalendarLocale } from 'ngx-tethys/i18n';\n\n/**\n * 日历头部操作栏组件\n * @name thy-calendar-header\n * @order 20\n */\n@Component({\n selector: 'thy-calendar-header',\n templateUrl: './calendar-header.component.html',\n imports: [ThyDateRange, FormsModule, ThyButton, NgTemplateOutlet, JsonPipe]\n})\nexport class ThyCalendarHeader implements OnInit {\n private cdr = inject(ChangeDetectorRef);\n private dateHelper = inject(DateHelperService);\n public locale: Signal<ThyCalendarLocale> = injectLocale('calendar');\n\n @HostBinding('class.thy-calendar-full-header-container') className = true;\n\n /**\n * 当前选中日期\n */\n @Input()\n set currentDate(value: TinyDate) {\n this.setDate(value);\n }\n\n /**\n * \t自定义渲染右侧操作项\n */\n @Input() operationRender: FunctionProp<TemplateRef<any>>;\n\n /**\n * 日期选择范围(年)发生变化的回调\n */\n @Output() readonly yearChange: EventEmitter<number> = new EventEmitter();\n\n /**\n * 日期选择范围(月)发生变化的回调\n */\n @Output() readonly monthChange: EventEmitter<number> = new EventEmitter();\n\n /**\n * 日期选择范围(日期)发生变化的回调\n */\n @Output() readonly dateRangeChange: EventEmitter<DateRangeItemInfo> = new EventEmitter();\n\n public pickerFormat = this.locale().yearMonthFormat;\n\n public dateRanges: DateRangeItemInfo[] = [\n {\n key: 'month',\n text: this.dateHelper.format(new TinyDate().nativeDate, this.pickerFormat),\n begin: getUnixTime(startOfMonth(new TinyDate().getTime())),\n end: getUnixTime(endOfMonth(new TinyDate().getTime())),\n timestamp: {\n interval: 1,\n unit: 'month'\n }\n }\n ];\n\n public date: DateRangeItemInfo;\n\n private _currentDate: TinyDate;\n\n public isCurrent: boolean;\n\n ngOnInit(): void {}\n\n onChangeMonth(month: DateRangeItemInfo) {\n const currentMonth = TinyDate.fromUnixTime(month.end).getMonth();\n this.monthChange.emit(currentMonth);\n }\n\n onChangeYear(year: DateRangeItemInfo) {\n const currentYear = TinyDate.fromUnixTime(year.begin).getFullYear();\n this.yearChange.emit(currentYear);\n }\n\n onChangeRange(dateRange: DateRangeItemInfo) {\n this.isCurrentDate(this._currentDate);\n this.onChangeYear(dateRange);\n this.onChangeMonth(dateRange);\n this.dateRangeChange.emit(dateRange);\n }\n\n backToday() {\n this._currentDate = new TinyDate();\n this.date = { ...this.dateRanges[0] };\n this.onChangeRange(this.date);\n this.cdr.detectChanges();\n }\n\n setDate(value: TinyDate) {\n this.isCurrentDate(value);\n if (this.isCurrent) {\n this._currentDate = value;\n const dateRange = {\n ...this.dateRanges[0],\n key: 'exception',\n text: this._currentDate.format(this.pickerFormat),\n begin: getUnixTime(startOfMonth(this._currentDate.getTime())),\n end: getUnixTime(endOfMonth(this._currentDate.getTime()))\n };\n this.date = dateRange;\n } else {\n this._currentDate = new TinyDate();\n this.date = { ...this.dateRanges[0] };\n }\n }\n\n isCurrentDate(currentDate: TinyDate) {\n this.isCurrent =\n currentDate.getMonth() !== getMonth(new TinyDate().getTime()) || currentDate.getYear() !== getYear(new TinyDate().getTime());\n }\n}\n","<div class=\"thy-calendar-full-header-left\">\n <thy-date-range\n class=\"select-date-range\"\n [ngModel]=\"date\"\n [thyHiddenMenu]=\"true\"\n [thyCustomKey]=\"'exception'\"\n [thyPickerFormat]=\"pickerFormat\"\n (ngModelChange)=\"onChangeRange($event)\"></thy-date-range>\n @if (isCurrent) {\n <button thyButton=\"outline-default-square\" thySize=\"md\" (click)=\"backToday()\">{{ locale().today }}</button>\n }\n</div>\n<div class=\"thy-calendar-full-header-right\">\n <ng-container *ngTemplateOutlet=\"$any(operationRender); context: { $implicit: operationRender }\">\n <span>{{ operationRender | json }}</span>\n </ng-container>\n</div>\n","import { Directive } from '@angular/core';\n\n/**\n * 自定义日期单元格,模板内容会被追加到单元格,可通过 *thyDateCell 传入模板\n * @name thyDateCell\n */\n@Directive({\n selector: '[thyDateCell]',\n exportAs: 'thyDateCell'\n})\nexport class ThyDateCellDirective {}\n\n/**\n * 自定义右上角操作项,可通过 *thyCalendarHeaderOperation传入模板\n * @name thyCalendarHeaderOperation\n */\n@Directive({\n selector: '[thyCalendarHeaderOperation]',\n exportAs: 'thyCalendarHeaderOperation'\n})\nexport class ThyCalendarHeaderOperationDirective {}\n","import { DateRangeItemInfo } from 'ngx-tethys/date-range';\nimport { TinyDate } from 'ngx-tethys/util';\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n forwardRef,\n HostBinding,\n inject,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { DateTable, MonthTable } from 'ngx-tethys/date-picker';\nimport { ThyDateCellDirective as DateCell, ThyCalendarHeaderOperationDirective as HeaderOperation } from './calendar-cells';\n\nimport { ThyCalendarHeader } from './calendar-header.component';\n\nexport type CalendarMode = 'month' | 'year';\ntype CalendarDateTemplate = TemplateRef<{ $implicit: Date }>;\n\n/**\n * 日历组件\n * @name thy-calendar\n * @order 10\n */\n@Component({\n selector: 'thy-calendar',\n templateUrl: './calendar.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ThyCalendar), multi: true }],\n imports: [ThyCalendarHeader, DateTable, MonthTable]\n})\nexport class ThyCalendar implements OnInit, OnChanges {\n private cdr = inject(ChangeDetectorRef);\n\n @HostBinding('class.thy-calendar-container') className = true;\n\n @HostBinding('class.thy-calendar-full') className1 = true;\n\n /**\n * 展示模式\n * @type month | year\n */\n @Input() thyMode: CalendarMode = 'month';\n\n /**\n * (可双向绑定)展示日期,默认为当前日期\n */\n @Input() thyValue?: Date;\n\n /**\n * 不可选择的日期\n */\n @Input() thyDisabledDate?: (date: Date) => boolean;\n\n /**\n * 日期选择变化的回调\n */\n @Output() thySelectChange: EventEmitter<Date> = new EventEmitter();\n\n /**\n * 日期选择变化的回调\n */\n @Output() thyValueChange: EventEmitter<Date> = new EventEmitter();\n\n /**\n * 日期选择范围变化的回调\n */\n @Output() thyDateRangeChange: EventEmitter<DateRangeItemInfo> = new EventEmitter();\n\n /**\n * (可作为内容)自定义渲染日期单元格,模板内容会被追加到单元格\n */\n @Input() thyDateCell?: CalendarDateTemplate;\n\n /**\n * 追加到单元格的自定义模板\n */\n @ContentChild(DateCell, { read: TemplateRef }) thyDateCellChild?: CalendarDateTemplate;\n get dateCell(): CalendarDateTemplate {\n return (this.thyDateCell || this.thyDateCellChild)!;\n }\n\n /**\n * (可作为内容)自定义渲染右上角操作项\n */\n @Input() thyCalendarHeaderOperation?: CalendarDateTemplate;\n\n /**\n * 右上角操作项的自定义模板\n */\n @ContentChild(HeaderOperation, { read: TemplateRef }) thyCalendarHeaderOperationChild?: CalendarDateTemplate;\n get headerOperation(): CalendarDateTemplate {\n return (this.thyCalendarHeaderOperation || this.thyCalendarHeaderOperationChild)!;\n }\n\n public currentDate = new TinyDate();\n\n public prefixCls = 'thy-calendar-full';\n\n private onChangeFn: (date: Date) => void = () => {};\n\n private onTouchFn: () => void = () => {};\n\n ngOnInit(): void {}\n\n onYearSelect(year: number): void {\n const date = this.currentDate.setYear(year);\n this.updateDate(date);\n }\n\n onMonthSelect(month: number): void {\n const date = this.currentDate.setMonth(month);\n this.updateDate(date);\n }\n\n onDateSelect(date: TinyDate): void {\n // Only currentDate is enough in calendar\n // this.value = date;\n this.updateDate(date);\n }\n\n onDateRangeSelect(date: DateRangeItemInfo) {\n this.thyDateRangeChange.emit(date);\n }\n\n writeValue(value: Date | null): void {\n this.updateDate(new TinyDate(value as Date), false);\n this.cdr.markForCheck();\n }\n\n registerOnChange(fn: (date: Date) => void): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchFn = fn;\n }\n\n private updateDate(date: TinyDate, touched: boolean = true): void {\n this.currentDate = date;\n\n if (touched) {\n this.onChangeFn(date.nativeDate);\n this.onTouchFn();\n this.thySelectChange.emit(date.nativeDate);\n this.thyValueChange.emit(date.nativeDate);\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.thyValue) {\n this.updateDate(new TinyDate(this.thyValue), false);\n }\n }\n}\n","<thy-calendar-header\n [operationRender]=\"headerOperation\"\n (monthChange)=\"onMonthSelect($event)\"\n (yearChange)=\"onYearSelect($event)\"\n (dateRangeChange)=\"onDateRangeSelect($event)\"\n [currentDate]=\"currentDate\"\n></thy-calendar-header>\n\n<div class=\"thy-calendar-panel\">\n <div class=\"thy-calendar-{{ thyMode === 'month' ? 'date' : 'month' }}-panel\">\n <div class=\"thy-calendar-body\">\n @if (thyMode === 'month') {\n <date-table\n [prefixCls]=\"prefixCls\"\n [value]=\"currentDate\"\n [activeDate]=\"currentDate\"\n [selectedValue]=\"currentDate\"\n [cellRender]=\"dateCell\"\n [disabledDate]=\"thyDisabledDate\"\n (valueChange)=\"onDateSelect($event)\"\n ></date-table>\n } @else {\n <month-table [value]=\"currentDate\" [disabledDate]=\"thyDisabledDate\" (valueChange)=\"onDateSelect($event)\"></month-table>\n }\n </div>\n </div>\n</div>\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyCalendarHeader } from './calendar-header.component';\nimport { ThyCalendar } from './calendar.component';\nimport { ThyCalendarHeaderOperationDirective, ThyDateCellDirective } from './calendar-cells';\nimport { LibPackerModule } from 'ngx-tethys/date-picker';\nimport { ThySelectModule } from 'ngx-tethys/select';\nimport { ThyRadioModule } from 'ngx-tethys/radio';\nimport { ThyButtonModule } from 'ngx-tethys/button';\nimport { ThyDateRangeModule } from 'ngx-tethys/date-range';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ThySharedModule,\n ThyIconModule,\n LibPackerModule,\n ThySelectModule,\n ThyRadioModule,\n ThyButtonModule,\n ThyDateRangeModule,\n ThyCalendarHeader,\n ThyCalendar,\n ThyDateCellDirective,\n ThyCalendarHeaderOperationDirective\n ],\n exports: [ThyCalendarHeader, ThyCalendar, ThyDateCellDirective, ThyCalendarHeaderOperationDirective]\n})\nexport class ThyCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["DateCell","HeaderOperation"],"mappings":";;;;;;;;;;;;;;;AAUA;;;;AAIG;MAMU,iBAAiB,CAAA;AAL9B,IAAA,WAAA,GAAA;AAMY,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACvC,QAAA,IAAA,CAAA,MAAM,GAA8B,YAAY,CAAC,UAAU,CAAC;QAEV,IAAS,CAAA,SAAA,GAAG,IAAI;AAezE;;AAEG;AACgB,QAAA,IAAA,CAAA,UAAU,GAAyB,IAAI,YAAY,EAAE;AAExE;;AAEG;AACgB,QAAA,IAAA,CAAA,WAAW,GAAyB,IAAI,YAAY,EAAE;AAEzE;;AAEG;AACgB,QAAA,IAAA,CAAA,eAAe,GAAoC,IAAI,YAAY,EAAE;AAEjF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,CAAC,MAAM,EAA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AACH,qBAAA;oBACD,OAAO,EAAE,CAAC,iBAAiB,EAAE,WAAW,EAAE,oBAAoB,EAAE,mCAAmC;AACtG,iBAAA;;;AC/BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-calendar.mjs","sources":["../../../src/calendar/calendar-header.component.ts","../../../src/calendar/calendar-header.component.html","../../../src/calendar/calendar-cells.ts","../../../src/calendar/calendar.component.ts","../../../src/calendar/calendar.component.html","../../../src/calendar/module.ts","../../../src/calendar/ngx-tethys-calendar.ts"],"sourcesContent":["import { DateRangeItemInfo, ThyDateRange } from 'ngx-tethys/date-range';\nimport { endOfMonth, FunctionProp, getMonth, getUnixTime, getYear, startOfMonth, TinyDate } from 'ngx-tethys/util';\n\nimport { JsonPipe, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectorRef, Component, effect, HostBinding, inject, input, OnInit, output, Signal, TemplateRef } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ThyButton } from 'ngx-tethys/button';\nimport { DateHelperService } from 'ngx-tethys/date-picker';\nimport { injectLocale, ThyCalendarLocale } from 'ngx-tethys/i18n';\n\n/**\n * 日历头部操作栏组件\n * @name thy-calendar-header\n * @order 20\n */\n@Component({\n selector: 'thy-calendar-header',\n templateUrl: './calendar-header.component.html',\n imports: [ThyDateRange, FormsModule, ThyButton, NgTemplateOutlet, JsonPipe]\n})\nexport class ThyCalendarHeader implements OnInit {\n private cdr = inject(ChangeDetectorRef);\n private dateHelper = inject(DateHelperService);\n public locale: Signal<ThyCalendarLocale> = injectLocale('calendar');\n\n @HostBinding('class.thy-calendar-full-header-container') className = true;\n\n /**\n * 当前选中日期\n */\n readonly currentDate = input<TinyDate>();\n\n /**\n * \t自定义渲染右侧操作项\n */\n readonly operationRender = input<FunctionProp<TemplateRef<any>>>();\n\n /**\n * 日期选择范围(年)发生变化的回调\n */\n readonly yearChange = output<number>();\n\n /**\n * 日期选择范围(月)发生变化的回调\n */\n readonly monthChange = output<number>();\n\n /**\n * 日期选择范围(日期)发生变化的回调\n */\n readonly dateRangeChange = output<DateRangeItemInfo>();\n\n public pickerFormat = this.locale().yearMonthFormat;\n\n public dateRanges: DateRangeItemInfo[] = [\n {\n key: 'month',\n text: this.dateHelper.format(new TinyDate().nativeDate, this.pickerFormat),\n begin: getUnixTime(startOfMonth(new TinyDate().getTime())),\n end: getUnixTime(endOfMonth(new TinyDate().getTime())),\n timestamp: {\n interval: 1,\n unit: 'month'\n }\n }\n ];\n\n public date: DateRangeItemInfo;\n\n private _currentDate: TinyDate;\n\n public isCurrent: boolean;\n\n constructor() {\n effect(() => {\n this.setDate();\n });\n }\n\n ngOnInit(): void {}\n\n onChangeMonth(month: DateRangeItemInfo) {\n const currentMonth = TinyDate.fromUnixTime(month.end).getMonth();\n this.monthChange.emit(currentMonth);\n }\n\n onChangeYear(year: DateRangeItemInfo) {\n const currentYear = TinyDate.fromUnixTime(year.begin).getFullYear();\n this.yearChange.emit(currentYear);\n }\n\n onChangeRange(dateRange: DateRangeItemInfo) {\n this.isCurrentDate(this._currentDate);\n this.onChangeYear(dateRange);\n this.onChangeMonth(dateRange);\n this.dateRangeChange.emit(dateRange);\n }\n\n backToday() {\n this._currentDate = new TinyDate();\n this.date = { ...this.dateRanges[0] };\n this.onChangeRange(this.date);\n this.cdr.detectChanges();\n }\n\n setDate() {\n const currentDate = this.currentDate();\n this.isCurrentDate(currentDate);\n if (this.isCurrent) {\n this._currentDate = currentDate;\n const dateRange = {\n ...this.dateRanges[0],\n key: 'exception',\n text: this._currentDate.format(this.pickerFormat),\n begin: getUnixTime(startOfMonth(this._currentDate.getTime())),\n end: getUnixTime(endOfMonth(this._currentDate.getTime()))\n };\n this.date = dateRange;\n } else {\n this._currentDate = new TinyDate();\n this.date = { ...this.dateRanges[0] };\n }\n }\n\n isCurrentDate(currentDate: TinyDate) {\n this.isCurrent =\n currentDate.getMonth() !== getMonth(new TinyDate().getTime()) || currentDate.getYear() !== getYear(new TinyDate().getTime());\n }\n}\n","<div class=\"thy-calendar-full-header-left\">\n <thy-date-range\n class=\"select-date-range\"\n [ngModel]=\"date\"\n [thyHiddenMenu]=\"true\"\n [thyCustomKey]=\"'exception'\"\n [thyPickerFormat]=\"pickerFormat\"\n (ngModelChange)=\"onChangeRange($event)\"></thy-date-range>\n @if (isCurrent) {\n <button thyButton=\"outline-default-square\" thySize=\"md\" (click)=\"backToday()\">{{ locale().today }}</button>\n }\n</div>\n<div class=\"thy-calendar-full-header-right\">\n <ng-container *ngTemplateOutlet=\"$any(operationRender()); context: { $implicit: operationRender() }\">\n <span>{{ operationRender() | json }}</span>\n </ng-container>\n</div>\n","import { Directive } from '@angular/core';\n\n/**\n * 自定义日期单元格,模板内容会被追加到单元格,可通过 *thyDateCell 传入模板\n * @name thyDateCell\n */\n@Directive({\n selector: '[thyDateCell]',\n exportAs: 'thyDateCell'\n})\nexport class ThyDateCellDirective {}\n\n/**\n * 自定义右上角操作项,可通过 *thyCalendarHeaderOperation传入模板\n * @name thyCalendarHeaderOperation\n */\n@Directive({\n selector: '[thyCalendarHeaderOperation]',\n exportAs: 'thyCalendarHeaderOperation'\n})\nexport class ThyCalendarHeaderOperationDirective {}\n","import { DateRangeItemInfo } from 'ngx-tethys/date-range';\nimport { TinyDate } from 'ngx-tethys/util';\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n contentChild,\n effect,\n forwardRef,\n HostBinding,\n inject,\n input,\n OnInit,\n output,\n Signal,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { DateTable, MonthTable } from 'ngx-tethys/date-picker';\nimport { ThyDateCellDirective as DateCell, ThyCalendarHeaderOperationDirective as HeaderOperation } from './calendar-cells';\n\nimport { ThyCalendarHeader } from './calendar-header.component';\n\nexport type CalendarMode = 'month' | 'year';\ntype CalendarDateTemplate = TemplateRef<{ $implicit: Date }>;\n\n/**\n * 日历组件\n * @name thy-calendar\n * @order 10\n */\n@Component({\n selector: 'thy-calendar',\n templateUrl: './calendar.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ThyCalendar), multi: true }],\n imports: [ThyCalendarHeader, DateTable, MonthTable]\n})\nexport class ThyCalendar implements OnInit {\n private cdr = inject(ChangeDetectorRef);\n\n @HostBinding('class.thy-calendar-container') className = true;\n\n @HostBinding('class.thy-calendar-full') className1 = true;\n\n /**\n * 展示模式\n * @type month | year\n */\n readonly thyMode = input<CalendarMode>('month');\n\n /**\n * (可双向绑定)展示日期,默认为当前日期\n */\n readonly thyValue = input<Date>();\n\n /**\n * 不可选择的日期\n */\n readonly thyDisabledDate = input<(date: Date) => boolean>();\n\n /**\n * 日期选择变化的回调\n */\n readonly thySelectChange = output<Date>();\n\n /**\n * 日期选择变化的回调\n */\n readonly thyValueChange = output<Date>();\n\n /**\n * 日期选择范围变化的回调\n */\n readonly thyDateRangeChange = output<DateRangeItemInfo>();\n\n /**\n * (可作为内容)自定义渲染日期单元格,模板内容会被追加到单元格\n */\n readonly thyDateCell = input<CalendarDateTemplate>();\n\n /**\n * 追加到单元格的自定义模板\n */\n readonly thyDateCellChild = contentChild(DateCell, { read: TemplateRef });\n\n readonly dateCell: Signal<CalendarDateTemplate> = computed(() => {\n return (this.thyDateCell() || this.thyDateCellChild())!;\n });\n\n /**\n * (可作为内容)自定义渲染右上角操作项\n */\n readonly thyCalendarHeaderOperation = input<CalendarDateTemplate>();\n\n /**\n * 右上角操作项的自定义模板\n */\n readonly thyCalendarHeaderOperationChild = contentChild(HeaderOperation, { read: TemplateRef });\n\n readonly headerOperation: Signal<CalendarDateTemplate> = computed(() => {\n return (this.thyCalendarHeaderOperation() || this.thyCalendarHeaderOperationChild())!;\n });\n\n public currentDate = new TinyDate();\n\n public prefixCls = 'thy-calendar-full';\n\n private onChangeFn: (date: Date) => void = () => {};\n\n private onTouchFn: () => void = () => {};\n\n ngOnInit(): void {}\n\n onYearSelect(year: number): void {\n const date = this.currentDate.setYear(year);\n this.updateDate(date);\n }\n\n onMonthSelect(month: number): void {\n const date = this.currentDate.setMonth(month);\n this.updateDate(date);\n }\n\n onDateSelect(date: TinyDate): void {\n // Only currentDate is enough in calendar\n // this.value = date;\n this.updateDate(date);\n }\n\n onDateRangeSelect(date: DateRangeItemInfo) {\n this.thyDateRangeChange.emit(date);\n }\n\n writeValue(value: Date | null): void {\n this.updateDate(new TinyDate(value as Date), false);\n this.cdr.markForCheck();\n }\n\n registerOnChange(fn: (date: Date) => void): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchFn = fn;\n }\n\n private updateDate(date: TinyDate, touched: boolean = true): void {\n this.currentDate = date;\n\n if (touched) {\n this.onChangeFn(date.nativeDate);\n this.onTouchFn();\n this.thySelectChange.emit(date.nativeDate);\n this.thyValueChange.emit(date.nativeDate);\n }\n }\n\n constructor() {\n effect(() => {\n if (this.thyValue()) {\n this.updateDate(new TinyDate(this.thyValue()), false);\n }\n });\n }\n}\n","<thy-calendar-header\n [operationRender]=\"headerOperation()\"\n (monthChange)=\"onMonthSelect($event)\"\n (yearChange)=\"onYearSelect($event)\"\n (dateRangeChange)=\"onDateRangeSelect($event)\"\n [currentDate]=\"currentDate\"></thy-calendar-header>\n\n<div class=\"thy-calendar-panel\">\n <div class=\"thy-calendar-{{ thyMode() === 'month' ? 'date' : 'month' }}-panel\">\n <div class=\"thy-calendar-body\">\n @if (thyMode() === 'month') {\n <date-table\n [prefixCls]=\"prefixCls\"\n [value]=\"currentDate\"\n [activeDate]=\"currentDate\"\n [selectedValue]=\"currentDate\"\n [cellRender]=\"dateCell()\"\n [disabledDate]=\"thyDisabledDate()\"\n (valueChange)=\"onDateSelect($event)\"></date-table>\n } @else {\n <month-table [value]=\"currentDate\" [disabledDate]=\"thyDisabledDate()\" (valueChange)=\"onDateSelect($event)\"></month-table>\n }\n </div>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyCalendarHeader } from './calendar-header.component';\nimport { ThyCalendar } from './calendar.component';\nimport { ThyCalendarHeaderOperationDirective, ThyDateCellDirective } from './calendar-cells';\nimport { LibPackerModule } from 'ngx-tethys/date-picker';\nimport { ThySelectModule } from 'ngx-tethys/select';\nimport { ThyRadioModule } from 'ngx-tethys/radio';\nimport { ThyButtonModule } from 'ngx-tethys/button';\nimport { ThyDateRangeModule } from 'ngx-tethys/date-range';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ThySharedModule,\n ThyIconModule,\n LibPackerModule,\n ThySelectModule,\n ThyRadioModule,\n ThyButtonModule,\n ThyDateRangeModule,\n ThyCalendarHeader,\n ThyCalendar,\n ThyDateCellDirective,\n ThyCalendarHeaderOperationDirective\n ],\n exports: [ThyCalendarHeader, ThyCalendar, ThyDateCellDirective, ThyCalendarHeaderOperationDirective]\n})\nexport class ThyCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["DateCell","HeaderOperation"],"mappings":";;;;;;;;;;;;;;;AAUA;;;;AAIG;MAMU,iBAAiB,CAAA;AAqD1B,IAAA,WAAA,GAAA;AApDQ,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACvC,QAAA,IAAA,CAAA,MAAM,GAA8B,YAAY,CAAC,UAAU,CAAC;QAEV,IAAS,CAAA,SAAA,GAAG,IAAI;AAEzE;;AAEG;QACM,IAAW,CAAA,WAAA,GAAG,KAAK,EAAY;AAExC;;AAEG;QACM,IAAe,CAAA,eAAA,GAAG,KAAK,EAAkC;AAElE;;AAEG;QACM,IAAU,CAAA,UAAA,GAAG,M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ClB,iBAAiB;YACjB,WAAW,CAAA,EAAA,CAAA,CAAA;;2FAMN,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAlB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,eAAe;wBACf,aAAa;wBACb,eAAe;wBACf,eAAe;wBACf,cAAc;wBACd,eAAe;wBACf,kBAAkB;wBAClB,iBAAiB;wBACjB,WAAW;wBACX,oBAAoB;wBACpB;AACH,qBAAA;oBACD,OAAO,EAAE,CAAC,iBAAiB,EAAE,WAAW,EAAE,oBAAoB,EAAE,mCAAmC;AACtG,iBAAA;;;AC/BD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ContentChild, Input, ChangeDetectionStrategy, Component, HostBinding, NgModule } from '@angular/core';
2
+ import { input, contentChild, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
3
  import { NgTemplateOutlet, CommonModule } from '@angular/common';
4
4
  import { coerceBooleanProperty } from 'ngx-tethys/util';
5
5
 
@@ -9,38 +9,49 @@ import { coerceBooleanProperty } from 'ngx-tethys/util';
9
9
  * @order 20
10
10
  */
11
11
  class ThyCardHeader {
12
- constructor() { }
12
+ constructor() {
13
+ /**
14
+ * 头部,标题
15
+ */
16
+ this.thyTitle = input();
17
+ /**
18
+ * 头部,附加信息
19
+ */
20
+ this.thyDescription = input();
21
+ /**
22
+ * 已废弃,头部大小
23
+ * @deprecated
24
+ */
25
+ this.thySize = input('md');
26
+ /**
27
+ * 自定义头部标题
28
+ * @type TemplateRef
29
+ */
30
+ this.titleTemplateRef = contentChild('headerTitle');
31
+ /**
32
+ * 自定义头部描述
33
+ * @type TemplateRef
34
+ */
35
+ this.descriptionTemplateRef = contentChild('headerDescription');
36
+ /**
37
+ * 自定义头部操作区域
38
+ * @type TemplateRef
39
+ */
40
+ this.operationTemplateRef = contentChild('headerOperation');
41
+ }
13
42
  ngOnInit() { }
14
43
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCardHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyCardHeader, isStandalone: true, selector: "thy-card-header", inputs: { thyTitle: "thyTitle", thyDescription: "thyDescription", thySize: "thySize" }, host: { properties: { "class.thy-card-header--sm": "thySize === \"sm\"", "class.thy-card-header--lg": "thySize === \"lg\"", "class.thy-card-header--md": "thySize === \"md\"" }, classAttribute: "thy-card-header" }, queries: [{ propertyName: "titleTemplateRef", first: true, predicate: ["headerTitle"], descendants: true }, { propertyName: "descriptionTemplateRef", first: true, predicate: ["headerDescription"], descendants: true }, { propertyName: "operationTemplateRef", first: true, predicate: ["headerOperation"], descendants: true }], ngImport: i0, template: "<div class=\"card-header-title\">\n <ng-template [ngTemplateOutlet]=\"titleTemplateRef\"></ng-template>\n @if (!titleTemplateRef) {\n <span>{{ thyTitle }}</span>\n }\n</div>\n<div class=\"card-header-description\">\n <ng-template [ngTemplateOutlet]=\"descriptionTemplateRef\"></ng-template>\n @if (!descriptionTemplateRef) {\n <span>{{ thyDescription }}</span>\n }\n</div>\n<div class=\"card-header-operation\">\n <ng-template [ngTemplateOutlet]=\"operationTemplateRef\"></ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
44
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyCardHeader, isStandalone: true, selector: "thy-card-header", inputs: { thyTitle: { classPropertyName: "thyTitle", publicName: "thyTitle", isSignal: true, isRequired: false, transformFunction: null }, thyDescription: { classPropertyName: "thyDescription", publicName: "thyDescription", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-card-header--sm": "thySize() === \"sm\"", "class.thy-card-header--lg": "thySize() === \"lg\"", "class.thy-card-header--md": "thySize() === \"md\"" }, classAttribute: "thy-card-header" }, queries: [{ propertyName: "titleTemplateRef", first: true, predicate: ["headerTitle"], descendants: true, isSignal: true }, { propertyName: "descriptionTemplateRef", first: true, predicate: ["headerDescription"], descendants: true, isSignal: true }, { propertyName: "operationTemplateRef", first: true, predicate: ["headerOperation"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"card-header-title\">\n <ng-template [ngTemplateOutlet]=\"titleTemplateRef()\"></ng-template>\n @if (!titleTemplateRef()) {\n <span>{{ thyTitle() }}</span>\n }\n</div>\n<div class=\"card-header-description\">\n <ng-template [ngTemplateOutlet]=\"descriptionTemplateRef()\"></ng-template>\n @if (!descriptionTemplateRef()) {\n <span>{{ thyDescription() }}</span>\n }\n</div>\n<div class=\"card-header-operation\">\n <ng-template [ngTemplateOutlet]=\"operationTemplateRef()\"></ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16
45
  }
17
46
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCardHeader, decorators: [{
18
47
  type: Component,
19
48
  args: [{ selector: 'thy-card-header', preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, host: {
20
49
  class: 'thy-card-header',
21
- '[class.thy-card-header--sm]': 'thySize === "sm"',
22
- '[class.thy-card-header--lg]': 'thySize === "lg"',
23
- '[class.thy-card-header--md]': 'thySize === "md"'
24
- }, imports: [NgTemplateOutlet], template: "<div class=\"card-header-title\">\n <ng-template [ngTemplateOutlet]=\"titleTemplateRef\"></ng-template>\n @if (!titleTemplateRef) {\n <span>{{ thyTitle }}</span>\n }\n</div>\n<div class=\"card-header-description\">\n <ng-template [ngTemplateOutlet]=\"descriptionTemplateRef\"></ng-template>\n @if (!descriptionTemplateRef) {\n <span>{{ thyDescription }}</span>\n }\n</div>\n<div class=\"card-header-operation\">\n <ng-template [ngTemplateOutlet]=\"operationTemplateRef\"></ng-template>\n</div>\n" }]
25
- }], ctorParameters: () => [], propDecorators: { thyTitle: [{
26
- type: Input,
27
- args: ['thyTitle']
28
- }], thyDescription: [{
29
- type: Input,
30
- args: ['thyDescription']
31
- }], thySize: [{
32
- type: Input,
33
- args: ['thySize']
34
- }], titleTemplateRef: [{
35
- type: ContentChild,
36
- args: ['headerTitle']
37
- }], descriptionTemplateRef: [{
38
- type: ContentChild,
39
- args: ['headerDescription']
40
- }], operationTemplateRef: [{
41
- type: ContentChild,
42
- args: ['headerOperation']
43
- }] } });
50
+ '[class.thy-card-header--sm]': 'thySize() === "sm"',
51
+ '[class.thy-card-header--lg]': 'thySize() === "lg"',
52
+ '[class.thy-card-header--md]': 'thySize() === "md"'
53
+ }, imports: [NgTemplateOutlet], template: "<div class=\"card-header-title\">\n <ng-template [ngTemplateOutlet]=\"titleTemplateRef()\"></ng-template>\n @if (!titleTemplateRef()) {\n <span>{{ thyTitle() }}</span>\n }\n</div>\n<div class=\"card-header-description\">\n <ng-template [ngTemplateOutlet]=\"descriptionTemplateRef()\"></ng-template>\n @if (!descriptionTemplateRef()) {\n <span>{{ thyDescription() }}</span>\n }\n</div>\n<div class=\"card-header-operation\">\n <ng-template [ngTemplateOutlet]=\"operationTemplateRef()\"></ng-template>\n</div>\n" }]
54
+ }], ctorParameters: () => [] });
44
55
 
45
56
  /**
46
57
  * 卡片组件
@@ -53,10 +64,23 @@ class ThyCard {
53
64
  * 左右是否有内边距,已废弃,如需配置间距使用 spacing 工具样式覆盖默认间距
54
65
  * @deprecated
55
66
  */
56
- this.thyHasLeftRightPadding = true;
67
+ this.thyHasLeftRightPadding = input(true, { transform: coerceBooleanProperty });
68
+ /**
69
+ * 是否是分割模式,分割模式头部和内容区之间有一条分割线
70
+ */
71
+ this.thyDivided = input(false, { transform: coerceBooleanProperty });
72
+ /**
73
+ * 是否有边框,边框颜色为#eee
74
+ */
75
+ this.thyBordered = input(false, { transform: coerceBooleanProperty });
76
+ /**
77
+ * 大小
78
+ * @type sm | md | lg
79
+ */
80
+ this.thySize = input('md');
57
81
  }
58
82
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
59
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.8", type: ThyCard, isStandalone: true, selector: "thy-card", inputs: { thyHasLeftRightPadding: ["thyHasLeftRightPadding", "thyHasLeftRightPadding", coerceBooleanProperty], thyDivided: ["thyDivided", "thyDivided", coerceBooleanProperty], thyBordered: ["thyBordered", "thyBordered", coerceBooleanProperty], thySize: "thySize" }, host: { properties: { "class.thy-card--divided": "!!thyDivided", "class.thy-card--bordered": "!!thyBordered", "class.thy-card--clear-left-right-padding": "!thyHasLeftRightPadding", "class.thy-card-sm": "thySize === \"sm\"", "class.thy-card-lg": "thySize === \"lg\"" }, classAttribute: "thy-card" }, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
83
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyCard, isStandalone: true, selector: "thy-card", inputs: { thyHasLeftRightPadding: { classPropertyName: "thyHasLeftRightPadding", publicName: "thyHasLeftRightPadding", isSignal: true, isRequired: false, transformFunction: null }, thyDivided: { classPropertyName: "thyDivided", publicName: "thyDivided", isSignal: true, isRequired: false, transformFunction: null }, thyBordered: { classPropertyName: "thyBordered", publicName: "thyBordered", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-card--divided": "!!thyDivided()", "class.thy-card--bordered": "!!thyBordered()", "class.thy-card--clear-left-right-padding": "!thyHasLeftRightPadding()", "class.thy-card-sm": "thySize() === \"sm\"", "class.thy-card-lg": "thySize() === \"lg\"" }, classAttribute: "thy-card" }, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
60
84
  }
61
85
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCard, decorators: [{
62
86
  type: Component,
@@ -66,25 +90,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
66
90
  changeDetection: ChangeDetectionStrategy.OnPush,
67
91
  host: {
68
92
  class: 'thy-card',
69
- '[class.thy-card--divided]': '!!thyDivided',
70
- '[class.thy-card--bordered]': '!!thyBordered',
71
- '[class.thy-card--clear-left-right-padding]': '!thyHasLeftRightPadding',
72
- '[class.thy-card-sm]': 'thySize === "sm"',
73
- '[class.thy-card-lg]': 'thySize === "lg"'
93
+ '[class.thy-card--divided]': '!!thyDivided()',
94
+ '[class.thy-card--bordered]': '!!thyBordered()',
95
+ '[class.thy-card--clear-left-right-padding]': '!thyHasLeftRightPadding()',
96
+ '[class.thy-card-sm]': 'thySize() === "sm"',
97
+ '[class.thy-card-lg]': 'thySize() === "lg"'
74
98
  }
75
99
  }]
76
- }], propDecorators: { thyHasLeftRightPadding: [{
77
- type: Input,
78
- args: [{ transform: coerceBooleanProperty }]
79
- }], thyDivided: [{
80
- type: Input,
81
- args: [{ transform: coerceBooleanProperty }]
82
- }], thyBordered: [{
83
- type: Input,
84
- args: [{ transform: coerceBooleanProperty }]
85
- }], thySize: [{
86
- type: Input
87
- }] } });
100
+ }] });
88
101
 
89
102
  /**
90
103
  * 卡片内容组件
@@ -93,27 +106,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
93
106
  */
94
107
  class ThyCardContent {
95
108
  constructor() {
96
- this.scrollClassName = false;
97
- this._thySizeSm = false;
98
- }
99
- /**
100
- * 内容区,滚动
101
- * @default false
102
- */
103
- set thyScroll(value) {
104
- this.scrollClassName = value;
105
- }
106
- /**
107
- * 已废弃,Content 大小,sm 时 padding-top 间距变小
108
- * @deprecated
109
- * @default md
110
- */
111
- set thySize(value) {
112
- this._thySizeSm = value === 'sm';
109
+ /**
110
+ * 内容区,滚动
111
+ */
112
+ this.thyScroll = input(false, { transform: coerceBooleanProperty });
113
+ /**
114
+ * 已废弃,Content 大小,sm 时 padding-top 间距变小
115
+ * @deprecated
116
+ */
117
+ this.thySize = input('md');
113
118
  }
114
119
  ngOnInit() { }
115
120
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCardContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
116
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.8", type: ThyCardContent, isStandalone: true, selector: "thy-card-content", inputs: { thyScroll: ["thyScroll", "thyScroll", coerceBooleanProperty], thySize: "thySize" }, host: { properties: { "class.thy-card-content--scroll": "this.scrollClassName", "class.thy-card-content--sm": "this._thySizeSm" }, classAttribute: "thy-card-content" }, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
121
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyCardContent, isStandalone: true, selector: "thy-card-content", inputs: { thyScroll: { classPropertyName: "thyScroll", publicName: "thyScroll", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.thy-card-content--scroll": "!!thyScroll()", "class.thy-card-content--sm": "thySize() === \"sm\"" }, classAttribute: "thy-card-content" }, ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
117
122
  }
118
123
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCardContent, decorators: [{
119
124
  type: Component,
@@ -123,22 +128,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
123
128
  template: ` <ng-content></ng-content> `,
124
129
  changeDetection: ChangeDetectionStrategy.OnPush,
125
130
  host: {
126
- class: 'thy-card-content'
131
+ class: 'thy-card-content',
132
+ '[class.thy-card-content--scroll]': '!!thyScroll()',
133
+ '[class.thy-card-content--sm]': 'thySize() === "sm"'
127
134
  }
128
135
  }]
129
- }], propDecorators: { scrollClassName: [{
130
- type: HostBinding,
131
- args: ['class.thy-card-content--scroll']
132
- }], thyScroll: [{
133
- type: Input,
134
- args: [{ transform: coerceBooleanProperty }]
135
- }], _thySizeSm: [{
136
- type: HostBinding,
137
- args: ['class.thy-card-content--sm']
138
- }], thySize: [{
139
- type: Input,
140
- args: ['thySize']
141
- }] } });
136
+ }] });
142
137
 
143
138
  class ThyCardModule {
144
139
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-card.mjs","sources":["../../../src/card/header.component.ts","../../../src/card/header.component.html","../../../src/card/card.component.ts","../../../src/card/content.component.ts","../../../src/card/card.module.ts","../../../src/card/ngx-tethys-card.ts"],"sourcesContent":["import { Component, Input, OnInit, TemplateRef, ContentChild, ChangeDetectionStrategy } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * 卡片头部组件\n * @name thy-card-header\n * @order 20\n */\n@Component({\n selector: 'thy-card-header',\n preserveWhitespaces: false,\n templateUrl: './header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-card-header',\n '[class.thy-card-header--sm]': 'thySize === \"sm\"',\n '[class.thy-card-header--lg]': 'thySize === \"lg\"',\n '[class.thy-card-header--md]': 'thySize === \"md\"'\n },\n imports: [NgTemplateOutlet]\n})\nexport class ThyCardHeader implements OnInit {\n public iconClass: string;\n\n /**\n * 头部,标题\n */\n @Input('thyTitle') thyTitle: string;\n\n /**\n * 头部,附加信息\n */\n @Input('thyDescription') thyDescription: string;\n\n /**\n * 已废弃,头部大小\n * @deprecated\n * @default md\n */\n @Input('thySize') thySize: 'sm' | 'lg' | 'md' | '';\n\n /**\n * 自定义头部标题\n * @type TemplateRef\n */\n @ContentChild('headerTitle')\n public titleTemplateRef: TemplateRef<any>;\n\n /**\n * 自定义头部描述\n * @type TemplateRef\n */\n @ContentChild('headerDescription')\n public descriptionTemplateRef: TemplateRef<any>;\n\n /**\n * 自定义头部操作区域\n * @type TemplateRef\n */\n @ContentChild('headerOperation')\n public operationTemplateRef: TemplateRef<any>;\n\n constructor() {}\n\n ngOnInit() {}\n}\n","<div class=\"card-header-title\">\n <ng-template [ngTemplateOutlet]=\"titleTemplateRef\"></ng-template>\n @if (!titleTemplateRef) {\n <span>{{ thyTitle }}</span>\n }\n</div>\n<div class=\"card-header-description\">\n <ng-template [ngTemplateOutlet]=\"descriptionTemplateRef\"></ng-template>\n @if (!descriptionTemplateRef) {\n <span>{{ thyDescription }}</span>\n }\n</div>\n<div class=\"card-header-operation\">\n <ng-template [ngTemplateOutlet]=\"operationTemplateRef\"></ng-template>\n</div>\n","import { Component, Input, ChangeDetectionStrategy } from '@angular/core';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 卡片组件\n * @name thy-card\n * @order 10\n */\n@Component({\n selector: 'thy-card',\n template: ` <ng-content></ng-content> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-card',\n '[class.thy-card--divided]': '!!thyDivided',\n '[class.thy-card--bordered]': '!!thyBordered',\n '[class.thy-card--clear-left-right-padding]': '!thyHasLeftRightPadding',\n '[class.thy-card-sm]': 'thySize === \"sm\"',\n '[class.thy-card-lg]': 'thySize === \"lg\"'\n }\n})\nexport class ThyCard {\n /**\n * 左右是否有内边距,已废弃,如需配置间距使用 spacing 工具样式覆盖默认间距\n * @deprecated\n */\n @Input({ transform: coerceBooleanProperty })\n thyHasLeftRightPadding: boolean | string = true;\n\n /**\n * 是否是分割模式,分割模式头部和内容区之间有一条分割线\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n thyDivided: boolean | string;\n\n /**\n * 是否有边框,边框颜色为#eee\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n thyBordered: boolean | string;\n\n /**\n * 大小\n * @type sm | md | lg\n * @default md\n */\n @Input()\n thySize: 'md' | 'sm' | 'lg';\n}\n","import { ChangeDetectionStrategy, Component, HostBinding, Input, OnInit } from '@angular/core';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 卡片内容组件\n * @name thy-card-content\n * @order 30\n */\n@Component({\n selector: 'thy-card-content',\n preserveWhitespaces: false,\n template: ` <ng-content></ng-content> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-card-content'\n }\n})\nexport class ThyCardContent implements OnInit {\n @HostBinding('class.thy-card-content--scroll') scrollClassName = false;\n\n /**\n * 内容区,滚动\n * @default false\n */\n @Input({ transform: coerceBooleanProperty })\n set thyScroll(value: boolean) {\n this.scrollClassName = value;\n }\n\n @HostBinding('class.thy-card-content--sm') _thySizeSm = false;\n\n /**\n * 已废弃,Content 大小,sm 时 padding-top 间距变小\n * @deprecated\n * @default md\n */\n @Input('thySize')\n set thySize(value: string) {\n this._thySizeSm = value === 'sm';\n }\n\n ngOnInit() {}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyCard } from './card.component';\nimport { ThyCardHeader } from './header.component';\nimport { ThyCardContent } from './content.component';\n\n@NgModule({\n imports: [CommonModule, ThyCard, ThyCardHeader, ThyCardContent],\n exports: [ThyCard, ThyCardHeader, ThyCardContent]\n})\nexport class ThyCardModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;AAIG;MAcU,aAAa,CAAA;AAyCtB,IAAA,WAAA,GAAA;AAEA,IAAA,QAAQ;8GA3CC,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,2BAAA,EAAA,oBAAA,EAAA,2BAAA,EAAA,oBAAA,EAAA,2BAAA,EAAA,oBAAA,EAAA,EAAA,cAAA,EAAA,iBAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,aAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,wBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,sBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrB1B,8fAeA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDIc,gBAAgB,EAAA,QA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;uBAAC,SAAS;;;MC1BP,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,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,aAAa,EAHZ,OAAA,EAAA,CAAA,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,CACpD,EAAA,OAAA,EAAA,CAAA,OAAO,EAAE,aAAa,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;AAEvC,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,aAAa,YAHZ,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,CAAC;AAC/D,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc;AACnD,iBAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-card.mjs","sources":["../../../src/card/header.component.ts","../../../src/card/header.component.html","../../../src/card/card.component.ts","../../../src/card/content.component.ts","../../../src/card/card.module.ts","../../../src/card/ngx-tethys-card.ts"],"sourcesContent":["import { Component, OnInit, TemplateRef, ChangeDetectionStrategy, input, contentChild } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * 卡片头部组件\n * @name thy-card-header\n * @order 20\n */\n@Component({\n selector: 'thy-card-header',\n preserveWhitespaces: false,\n templateUrl: './header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-card-header',\n '[class.thy-card-header--sm]': 'thySize() === \"sm\"',\n '[class.thy-card-header--lg]': 'thySize() === \"lg\"',\n '[class.thy-card-header--md]': 'thySize() === \"md\"'\n },\n imports: [NgTemplateOutlet]\n})\nexport class ThyCardHeader implements OnInit {\n public iconClass: string;\n\n /**\n * 头部,标题\n */\n readonly thyTitle = input<string>();\n\n /**\n * 头部,附加信息\n */\n readonly thyDescription = input<string>();\n\n /**\n * 已废弃,头部大小\n * @deprecated\n */\n readonly thySize = input<'sm' | 'lg' | 'md' | ''>('md');\n\n /**\n * 自定义头部标题\n * @type TemplateRef\n */\n public readonly titleTemplateRef = contentChild<TemplateRef<any>>('headerTitle');\n\n /**\n * 自定义头部描述\n * @type TemplateRef\n */\n public readonly descriptionTemplateRef = contentChild<TemplateRef<any>>('headerDescription');\n\n /**\n * 自定义头部操作区域\n * @type TemplateRef\n */\n public readonly operationTemplateRef = contentChild<TemplateRef<any>>('headerOperation');\n\n constructor() {}\n\n ngOnInit() {}\n}\n","<div class=\"card-header-title\">\n <ng-template [ngTemplateOutlet]=\"titleTemplateRef()\"></ng-template>\n @if (!titleTemplateRef()) {\n <span>{{ thyTitle() }}</span>\n }\n</div>\n<div class=\"card-header-description\">\n <ng-template [ngTemplateOutlet]=\"descriptionTemplateRef()\"></ng-template>\n @if (!descriptionTemplateRef()) {\n <span>{{ thyDescription() }}</span>\n }\n</div>\n<div class=\"card-header-operation\">\n <ng-template [ngTemplateOutlet]=\"operationTemplateRef()\"></ng-template>\n</div>\n","import { Component, ChangeDetectionStrategy, input } from '@angular/core';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 卡片组件\n * @name thy-card\n * @order 10\n */\n@Component({\n selector: 'thy-card',\n template: ` <ng-content></ng-content> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-card',\n '[class.thy-card--divided]': '!!thyDivided()',\n '[class.thy-card--bordered]': '!!thyBordered()',\n '[class.thy-card--clear-left-right-padding]': '!thyHasLeftRightPadding()',\n '[class.thy-card-sm]': 'thySize() === \"sm\"',\n '[class.thy-card-lg]': 'thySize() === \"lg\"'\n }\n})\nexport class ThyCard {\n /**\n * 左右是否有内边距,已废弃,如需配置间距使用 spacing 工具样式覆盖默认间距\n * @deprecated\n */\n readonly thyHasLeftRightPadding = input(true, { transform: coerceBooleanProperty });\n\n /**\n * 是否是分割模式,分割模式头部和内容区之间有一条分割线\n */\n readonly thyDivided = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 是否有边框,边框颜色为#eee\n */\n readonly thyBordered = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 大小\n * @type sm | md | lg\n */\n readonly thySize = input<'md' | 'sm' | 'lg'>('md');\n}\n","import { ChangeDetectionStrategy, Component, input, OnInit } from '@angular/core';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 卡片内容组件\n * @name thy-card-content\n * @order 30\n */\n@Component({\n selector: 'thy-card-content',\n preserveWhitespaces: false,\n template: ` <ng-content></ng-content> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-card-content',\n '[class.thy-card-content--scroll]': '!!thyScroll()',\n '[class.thy-card-content--sm]': 'thySize() === \"sm\"'\n }\n})\nexport class ThyCardContent implements OnInit {\n /**\n * 内容区,滚动\n */\n readonly thyScroll = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 已废弃,Content 大小,sm 时 padding-top 间距变小\n * @deprecated\n */\n readonly thySize = input<string>('md');\n\n ngOnInit() {}\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyCard } from './card.component';\nimport { ThyCardHeader } from './header.component';\nimport { ThyCardContent } from './content.component';\n\n@NgModule({\n imports: [CommonModule, ThyCard, ThyCardHeader, ThyCardContent],\n exports: [ThyCard, ThyCardHeader, ThyCardContent]\n})\nexport class ThyCardModule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