@ng-nest/ui 20.0.7 → 20.1.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 (210) hide show
  1. package/auto-complete/index.d.ts +30 -5
  2. package/avatar/index.d.ts +64 -2
  3. package/base-form/index.d.ts +3 -3
  4. package/bubble/index.d.ts +170 -0
  5. package/cascade/index.d.ts +30 -5
  6. package/checkbox/index.d.ts +4 -4
  7. package/color-picker/index.d.ts +31 -5
  8. package/core/index.d.ts +48 -4
  9. package/date-picker/index.d.ts +53 -8
  10. package/fesm2022/ng-nest-ui-affix.mjs +12 -12
  11. package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
  12. package/fesm2022/ng-nest-ui-alert.mjs +35 -35
  13. package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
  14. package/fesm2022/ng-nest-ui-anchor.mjs +31 -31
  15. package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
  16. package/fesm2022/ng-nest-ui-api.mjs +7 -7
  17. package/fesm2022/ng-nest-ui-api.mjs.map +1 -1
  18. package/fesm2022/ng-nest-ui-auto-complete.mjs +82 -72
  19. package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
  20. package/fesm2022/ng-nest-ui-avatar.mjs +43 -31
  21. package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
  22. package/fesm2022/ng-nest-ui-back-top.mjs +18 -18
  23. package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
  24. package/fesm2022/ng-nest-ui-badge.mjs +23 -23
  25. package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
  26. package/fesm2022/ng-nest-ui-base-form.mjs +45 -45
  27. package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
  28. package/fesm2022/ng-nest-ui-bubble.mjs +350 -0
  29. package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -0
  30. package/fesm2022/ng-nest-ui-button.mjs +42 -42
  31. package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
  32. package/fesm2022/ng-nest-ui-calendar.mjs +20 -20
  33. package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
  34. package/fesm2022/ng-nest-ui-card.mjs +15 -15
  35. package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
  36. package/fesm2022/ng-nest-ui-carousel.mjs +46 -46
  37. package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
  38. package/fesm2022/ng-nest-ui-cascade.mjs +86 -76
  39. package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
  40. package/fesm2022/ng-nest-ui-checkbox.mjs +39 -39
  41. package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
  42. package/fesm2022/ng-nest-ui-collapse.mjs +31 -31
  43. package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
  44. package/fesm2022/ng-nest-ui-color-picker.mjs +91 -72
  45. package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
  46. package/fesm2022/ng-nest-ui-color.mjs +16 -16
  47. package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
  48. package/fesm2022/ng-nest-ui-comment.mjs +21 -21
  49. package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
  50. package/fesm2022/ng-nest-ui-container.mjs +37 -37
  51. package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
  52. package/fesm2022/ng-nest-ui-core.mjs +41 -22
  53. package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
  54. package/fesm2022/ng-nest-ui-crumb.mjs +13 -13
  55. package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
  56. package/fesm2022/ng-nest-ui-date-picker.mjs +273 -253
  57. package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
  58. package/fesm2022/ng-nest-ui-description.mjs +31 -31
  59. package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
  60. package/fesm2022/ng-nest-ui-dialog.mjs +81 -81
  61. package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
  62. package/fesm2022/ng-nest-ui-doc.mjs +7 -7
  63. package/fesm2022/ng-nest-ui-doc.mjs.map +1 -1
  64. package/fesm2022/ng-nest-ui-drag.mjs +10 -10
  65. package/fesm2022/ng-nest-ui-drag.mjs.map +1 -1
  66. package/fesm2022/ng-nest-ui-drawer.mjs +42 -42
  67. package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
  68. package/fesm2022/ng-nest-ui-dropdown.mjs +49 -49
  69. package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
  70. package/fesm2022/ng-nest-ui-empty.mjs +12 -12
  71. package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
  72. package/fesm2022/ng-nest-ui-examples.mjs +7 -7
  73. package/fesm2022/ng-nest-ui-examples.mjs.map +1 -1
  74. package/fesm2022/ng-nest-ui-find.mjs +79 -77
  75. package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
  76. package/fesm2022/ng-nest-ui-form.mjs +33 -33
  77. package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
  78. package/fesm2022/ng-nest-ui-highlight.mjs +20 -20
  79. package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
  80. package/fesm2022/ng-nest-ui-i18n.mjs +15 -15
  81. package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
  82. package/fesm2022/ng-nest-ui-icon.mjs +21 -21
  83. package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
  84. package/fesm2022/ng-nest-ui-image.mjs +39 -39
  85. package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
  86. package/fesm2022/ng-nest-ui-inner.mjs +11 -11
  87. package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
  88. package/fesm2022/ng-nest-ui-input-number.mjs +42 -42
  89. package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
  90. package/fesm2022/ng-nest-ui-input.mjs +103 -82
  91. package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
  92. package/fesm2022/ng-nest-ui-keyword.mjs +15 -15
  93. package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
  94. package/fesm2022/ng-nest-ui-layout.mjs +31 -31
  95. package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
  96. package/fesm2022/ng-nest-ui-link.mjs +18 -18
  97. package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
  98. package/fesm2022/ng-nest-ui-list.mjs +80 -80
  99. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  100. package/fesm2022/ng-nest-ui-loading.mjs +28 -23
  101. package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
  102. package/fesm2022/ng-nest-ui-menu.mjs +45 -45
  103. package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
  104. package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
  105. package/fesm2022/ng-nest-ui-message-box.mjs.map +1 -1
  106. package/fesm2022/ng-nest-ui-message.mjs +10 -10
  107. package/fesm2022/ng-nest-ui-message.mjs.map +1 -1
  108. package/fesm2022/ng-nest-ui-notification.mjs +10 -10
  109. package/fesm2022/ng-nest-ui-notification.mjs.map +1 -1
  110. package/fesm2022/ng-nest-ui-outlet.mjs +9 -9
  111. package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
  112. package/fesm2022/ng-nest-ui-page-header.mjs +15 -15
  113. package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
  114. package/fesm2022/ng-nest-ui-pagination.mjs +53 -53
  115. package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
  116. package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
  117. package/fesm2022/ng-nest-ui-pattern.mjs.map +1 -1
  118. package/fesm2022/ng-nest-ui-popconfirm.mjs +27 -27
  119. package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
  120. package/fesm2022/ng-nest-ui-popover.mjs +38 -38
  121. package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
  122. package/fesm2022/ng-nest-ui-portal.mjs +7 -7
  123. package/fesm2022/ng-nest-ui-portal.mjs.map +1 -1
  124. package/fesm2022/ng-nest-ui-progress.mjs +38 -38
  125. package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
  126. package/fesm2022/ng-nest-ui-radio.mjs +36 -36
  127. package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
  128. package/fesm2022/ng-nest-ui-rate.mjs +30 -30
  129. package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
  130. package/fesm2022/ng-nest-ui-resizable.mjs +16 -16
  131. package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
  132. package/fesm2022/ng-nest-ui-result.mjs +16 -16
  133. package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
  134. package/fesm2022/ng-nest-ui-ripple.mjs +13 -13
  135. package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
  136. package/fesm2022/ng-nest-ui-scrollable.mjs +102 -19
  137. package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
  138. package/fesm2022/ng-nest-ui-select.mjs +121 -111
  139. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  140. package/fesm2022/ng-nest-ui-skeleton.mjs +15 -15
  141. package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
  142. package/fesm2022/ng-nest-ui-slider-select.mjs +54 -54
  143. package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
  144. package/fesm2022/ng-nest-ui-slider.mjs +39 -39
  145. package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
  146. package/fesm2022/ng-nest-ui-statistic.mjs +30 -30
  147. package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
  148. package/fesm2022/ng-nest-ui-steps.mjs +19 -19
  149. package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
  150. package/fesm2022/ng-nest-ui-switch.mjs +26 -26
  151. package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
  152. package/fesm2022/ng-nest-ui-table-view.mjs +490 -242
  153. package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
  154. package/fesm2022/ng-nest-ui-table.mjs +221 -221
  155. package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
  156. package/fesm2022/ng-nest-ui-tabs.mjs +58 -58
  157. package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
  158. package/fesm2022/ng-nest-ui-tag.mjs +22 -22
  159. package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
  160. package/fesm2022/ng-nest-ui-text-retract.mjs +15 -15
  161. package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
  162. package/fesm2022/ng-nest-ui-textarea.mjs +41 -41
  163. package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
  164. package/fesm2022/ng-nest-ui-theme.mjs +23 -23
  165. package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
  166. package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
  167. package/fesm2022/ng-nest-ui-time-ago.mjs.map +1 -1
  168. package/fesm2022/ng-nest-ui-time-picker.mjs +104 -94
  169. package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
  170. package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
  171. package/fesm2022/ng-nest-ui-time-range.mjs.map +1 -1
  172. package/fesm2022/ng-nest-ui-timeline.mjs +15 -15
  173. package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
  174. package/fesm2022/ng-nest-ui-tooltip.mjs +38 -38
  175. package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
  176. package/fesm2022/ng-nest-ui-transfer.mjs +40 -40
  177. package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
  178. package/fesm2022/ng-nest-ui-tree-file.mjs +28 -28
  179. package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
  180. package/fesm2022/ng-nest-ui-tree-select.mjs +126 -116
  181. package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
  182. package/fesm2022/ng-nest-ui-tree.mjs +107 -107
  183. package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
  184. package/fesm2022/ng-nest-ui-typography.mjs +13 -13
  185. package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
  186. package/fesm2022/ng-nest-ui-upload.mjs +37 -37
  187. package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
  188. package/fesm2022/ng-nest-ui.mjs +1 -0
  189. package/fesm2022/ng-nest-ui.mjs.map +1 -1
  190. package/find/index.d.ts +5 -5
  191. package/form/index.d.ts +1 -1
  192. package/index.d.ts +1 -0
  193. package/input/index.d.ts +32 -5
  194. package/input-number/index.d.ts +5 -5
  195. package/list/index.d.ts +2 -2
  196. package/loading/index.d.ts +6 -1
  197. package/package.json +60 -56
  198. package/radio/index.d.ts +4 -4
  199. package/rate/index.d.ts +5 -5
  200. package/scrollable/index.d.ts +15 -7
  201. package/select/index.d.ts +35 -5
  202. package/slider-select/index.d.ts +3 -3
  203. package/switch/index.d.ts +3 -3
  204. package/table-view/index.d.ts +121 -79
  205. package/textarea/index.d.ts +3 -3
  206. package/theme/index.d.ts +1 -1
  207. package/time-picker/index.d.ts +30 -5
  208. package/transfer/index.d.ts +1 -1
  209. package/tree-select/index.d.ts +30 -5
  210. package/upload/index.d.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-button.mjs","sources":["../../../../lib/ng-nest/ui/button/button.property.ts","../../../../lib/ng-nest/ui/button/buttons.component.ts","../../../../lib/ng-nest/ui/button/button.component.ts","../../../../lib/ng-nest/ui/button/button.component.html","../../../../lib/ng-nest/ui/button/button.module.ts","../../../../lib/ng-nest/ui/button/ng-nest-ui-button.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\r\nimport { XPropertyFunction, XToNumber, XToBoolean, XToCssPixelValue } from '@ng-nest/ui/core';\r\nimport type { XDirection, XSize, XNumber, XBoolean, XType } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Button\r\n * @selector x-button\r\n * @decorator component\r\n */\r\nexport const XButtonPrefix = 'x-button';\r\nconst X_BUTTON_CONFIG_NAME = 'button';\r\n\r\n/**\r\n * Button Property\r\n */\r\n@Component({ selector: `${XButtonPrefix}-property`, template: '' })\r\nexport class XButtonProperty extends XPropertyFunction(X_BUTTON_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 按钮类型\r\n * @en_US Button type\r\n * @example\r\n *\r\n * ```html\r\n * <x-button>Initial</x-button>\r\n * <x-button type=\"primary\">Primary</x-button>\r\n * <x-button type=\"success\">Success</x-button>\r\n * <x-button type=\"warning\">Warning</x-button>\r\n * <x-button type=\"danger\">Danger</x-button>\r\n * <x-button type=\"info\">Info</x-button>\r\n * <x-button [type]=\"'primary'\">Primary</x-button>\r\n * ```\r\n *\r\n */\r\n readonly type = input<XButtonType>(this.config?.type ?? 'initial');\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n * @example\r\n *\r\n * ```html\r\n * <x-button icon=\"fto-edit\"></x-button>\r\n * <x-button icon=\"fto-edit\">Edit</x-button>\r\n * <x-button [icon]=\"'fto-edit'\">Edit</x-button>\r\n * ```\r\n *\r\n */\r\n readonly icon = input<string>('');\r\n /**\r\n * @zh_CN 提示\r\n * @en_US Title\r\n * @example\r\n *\r\n * ```html\r\n * <x-button title=\"information\"></x-button>\r\n * <x-button [title]=\"'information'\"></x-button>\r\n * ```\r\n *\r\n */\r\n readonly title = input<string>('');\r\n /**\r\n * @zh_CN 按钮中元素的布局方式\r\n * @en_US Button elements in the layout\r\n * @example\r\n *\r\n * ```html\r\n * <x-button direction=\"column\" icon=\"edit\">Button</x-button>\r\n * <x-button direction=\"column-reverse\" icon=\"edit\">Button</x-button>\r\n * <x-button direction=\"row\" icon=\"edit\">Button</x-button>\r\n * <x-button direction=\"row-reverse\" icon=\"edit\">Button</x-button>\r\n * <x-button [direction]=\"row\" icon=\"edit\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly direction = input<XDirection>('row');\r\n /**\r\n * @zh_CN tab 键控制次序\r\n * @en_US Tab key control order\r\n * @example\r\n *\r\n * ```html\r\n * <x-button tabindex=\"0\"></x-button>\r\n * <x-button [tabindex]=\"0\"></x-button>\r\n * ```\r\n *\r\n */\r\n readonly tabindex = input<number, XNumber>(0, { transform: XToNumber });\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n * @example\r\n *\r\n * ```html\r\n * <x-button size=\"big\">Big</x-button>\r\n * <x-button size=\"large\">Large</x-button>\r\n * <x-button size=\"medium\">Medium</x-button>\r\n * <x-button size=\"small\">Small</x-button>\r\n * <x-button size=\"mini\">Mini</x-button>\r\n * <x-button [size]=\"'medium'\">Medium</x-button>\r\n * ```\r\n *\r\n */\r\n readonly size = input<XSize>(this.config?.size ?? 'medium');\r\n /**\r\n * @zh_CN 仅显示图标\r\n * @en_US Icon only\r\n * @example\r\n *\r\n * ```html\r\n * <x-button icon=\"fto-edit\" onlyIcon></x-button>\r\n * <x-button icon=\"fto-edit\" onlyIcon=\"true\"></x-button>\r\n * <x-button icon=\"fto-edit\" [onlyIcon]=\"true\"></x-button>\r\n * ```\r\n *\r\n */\r\n readonly onlyIcon = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 激活的按钮(样式差异)\r\n * @en_US Active button (style difference)\r\n * @example\r\n *\r\n * ```html\r\n * <x-button activated>Button</x-button>\r\n * <x-button activated=\"true\">Button</x-button>\r\n * <x-button [activated]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly activated = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 禁用按钮\r\n * @en_US Disable button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button disabled>Button</x-button>\r\n * <x-button disabled=\"true\">Button</x-button>\r\n * <x-button [disabled]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 朴素按钮\r\n * @en_US Plain button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button plain>Button</x-button>\r\n * <x-button plain=\"true\">Button</x-button>\r\n * <x-button [plain]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly plain = input<boolean, XBoolean>(this.config?.plain ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 平铺按钮\r\n * @en_US Flat button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button flat>Button</x-button>\r\n * <x-button flat=\"true\">Button</x-button>\r\n * <x-button [flat]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly flat = input<boolean, XBoolean>(this.config?.flat ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 文字按钮\r\n * @en_US Text button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button text>Button</x-button>\r\n * <x-button text=\"true\">Button</x-button>\r\n * <x-button [text]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly text = input<boolean, XBoolean>(this.config?.text ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 圆角按钮\r\n * @en_US Round button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button round>Button</x-button>\r\n * <x-button round=\"true\">Button</x-button>\r\n * <x-button [round]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly round = input<boolean, XBoolean>(this.config?.round ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 圆型按钮(配合图标来使用)\r\n * @en_US Round button (use with icon)\r\n * @example\r\n *\r\n * ```html\r\n * <x-button circle>Button</x-button>\r\n * <x-button circle=\"true\">Button</x-button>\r\n * <x-button [circle]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly circle = input<boolean, XBoolean>(this.config?.circle ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 加载中\r\n * @en_US Loading\r\n * @example\r\n *\r\n * ```html\r\n * <x-button loading>Button</x-button>\r\n * <x-button loading=\"true\">Button</x-button>\r\n * <x-button [loading]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly loading = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 关闭按钮\r\n * @en_US Close button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button closable>Button</x-button>\r\n * <x-button closable=\"true\">Button</x-button>\r\n * <x-button [closable]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly closable = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 按钮类型属性 submit, button, reset\r\n * @en_US Button type attribute. submit, button, reset\r\n * @example\r\n *\r\n * ```html\r\n * <x-button attrType=\"button\">Button</x-button>\r\n * <x-button attrType=\"submit\">Button</x-button>\r\n * <x-button attrType=\"reset\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly attrType = input<XButtonAttrType>(this.config?.attrType ?? 'button');\r\n}\r\n\r\n/**\r\n * @zh_CN 按钮类型\r\n * @en_US Button type\r\n */\r\nexport type XButtonType = XType;\r\n\r\n/**\r\n * @zh_CN 按钮类型属性\r\n * - `'submit'` : 此类型用于提交表单数据\r\n * - `'reset'` : 此类型用于重置表单中的数据\r\n * - `'button'` : 此类型用于自定义按钮行为\r\n * @en_US Button attr type\r\n * - `'submit'` : This type is used to submit the form data\r\n * - `'reset'` : This type is used to reset the form data\r\n * - `'button'` : This type is used to the custom button\r\n */\r\nexport type XButtonAttrType = 'submit' | 'button' | 'reset';\r\n\r\n/**\r\n * Buttons\r\n * @selector x-buttons\r\n * @decorator component\r\n */\r\nexport const XButtonsPrefix = 'x-buttons';\r\nconst X_BUTTONS_CONFIG_NAME = 'buttons';\r\n\r\n/**\r\n * Buttons Property\r\n */\r\n@Component({ selector: `${XButtonsPrefix}-property`, template: '' })\r\nexport class XButtonsProperty extends XPropertyFunction(X_BUTTONS_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 按钮间距\r\n * @en_US Button spacing\r\n * @example\r\n *\r\n * ```html\r\n * // ex: 10,'10px','1rem'\r\n * <x-buttons space=\"1rem\">\r\n * <x-button>Button1</button>\r\n * <x-button>Button2</button>\r\n * </x-buttons>\r\n * ```\r\n *\r\n */\r\n readonly space = input<string, XNumber>(this.config?.space ?? '', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 隐藏边框\r\n * @en_US Hide border\r\n * @example\r\n *\r\n * ```html\r\n * <x-buttons hiddenBorder>\r\n * <x-button>Button1</button>\r\n * <x-button>Button2</button>\r\n * </x-buttons>\r\n * ```\r\n *\r\n */\r\n readonly hiddenBorder = input<boolean, XBoolean>(this.config?.hiddenBorder ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示阴影\r\n * @en_US show box shadow\r\n * @example\r\n *\r\n * ```html\r\n * <x-buttons boxShadow>\r\n * <x-button>Button1</button>\r\n * <x-button>Button2</button>\r\n * </x-buttons>\r\n * ```\r\n *\r\n */\r\n readonly boxShadow = input<boolean, XBoolean>(this.config?.boxShadow ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 圆角按钮\r\n * @en_US Round button\r\n * @example\r\n *\r\n * ```html\r\n * <x-buttons round>\r\n * <x-button>Button1</button>\r\n * <x-button>Button2</button>\r\n * </x-buttons>\r\n * ```\r\n *\r\n */\r\n readonly round = input<boolean, XBoolean>(this.config?.round ?? false, { transform: XToBoolean });\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding } from '@angular/core';\r\nimport { XButtonsPrefix, XButtonsProperty } from './button.property';\r\n\r\n@Component({\r\n selector: `${XButtonsPrefix}`,\r\n template: '<ng-content></ng-content>',\r\n styleUrls: ['./buttons.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XButtonsComponent extends XButtonsProperty {\r\n @HostBinding('class') className = XButtonsPrefix;\r\n @HostBinding('class.x-buttons-space') get getSpace() {\r\n return !!this.space();\r\n }\r\n @HostBinding('class.x-buttons-hiddenBorder') get getHiddenBorder() {\r\n return this.hiddenBorder();\r\n }\r\n @HostBinding('class.x-buttons-box-shadow') get getBoxShadow() {\r\n return this.boxShadow();\r\n }\r\n @HostBinding('class.x-buttons-round') get getRound() {\r\n return this.round();\r\n }\r\n @HostBinding('style.marginLeft') get getMarginLeft() {\r\n return '-' + this.space();\r\n }\r\n @HostBinding('style.marginRight') get getMarginRight() {\r\n return '-' + this.space();\r\n }\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n inject,\r\n AfterViewInit,\r\n OnDestroy,\r\n computed,\r\n HostBinding,\r\n signal,\r\n viewChild,\r\n AfterContentChecked,\r\n afterEveryRender\r\n} from '@angular/core';\r\nimport { XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XButtonPrefix, XButtonProperty } from './button.property';\r\nimport { XButtonsComponent } from './buttons.component';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XRippleDirective } from '@ng-nest/ui/ripple';\r\nimport { NgClass } from '@angular/common';\r\nimport { FocusMonitor } from '@angular/cdk/a11y';\r\n\r\n@Component({\r\n selector: `${XButtonPrefix}`,\r\n imports: [NgClass, XIconComponent, XRippleDirective],\r\n templateUrl: './button.component.html',\r\n styleUrls: ['./button.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XButtonComponent extends XButtonProperty implements AfterViewInit, AfterContentChecked, OnDestroy {\r\n buttonRef = viewChild.required('buttonRef', { read: ElementRef<HTMLElement> });\r\n contentRef = viewChild.required('content', { read: ElementRef<HTMLElement> });\r\n private buttons = inject(XButtonsComponent, { optional: true, host: true });\r\n private focusMontitor = inject(FocusMonitor);\r\n contentIsEmpty = signal(false);\r\n transition = signal(false);\r\n\r\n @HostBinding('style.marginLeft') get marginLeft() {\r\n return this.buttons?.space();\r\n }\r\n @HostBinding('style.marginRight') get marginRight() {\r\n return this.buttons?.space();\r\n }\r\n @HostBinding('style.pointerEvents') get pointerEvents() {\r\n return this.disabledComputed() ? 'none' : '';\r\n }\r\n\r\n constructor() {\r\n super();\r\n afterEveryRender(() => {\r\n this.transition.set(true);\r\n });\r\n }\r\n\r\n classMap = computed(() => ({\r\n [`${XButtonPrefix}-${this.type()}`]: !XIsEmpty(this.type()) && !this.plain(),\r\n [`${XButtonPrefix}-${this.type()}-plain`]: !XIsEmpty(this.type()) && this.plain(),\r\n [`${XButtonPrefix}-${this.type()}-text`]: !XIsEmpty(this.type()) && this.text(),\r\n [`${XButtonPrefix}-${this.type()}-flat`]: !XIsEmpty(this.type()) && this.flat(),\r\n [`x-size-${this.size()}`]: !XIsEmpty(this.size()),\r\n [`x-direction-${this.direction()}`]: !XIsEmpty(this.direction())\r\n }));\r\n\r\n roundSignal = computed(() => {\r\n return this.buttons?.round() || this.round();\r\n });\r\n\r\n disabledComputed = computed(() => {\r\n return this.loading() || this.disabled();\r\n });\r\n\r\n ngAfterViewInit() {\r\n this.focusMontitor.monitor(this.buttonRef(), true);\r\n }\r\n\r\n ngAfterContentChecked() {\r\n this.contentIsEmpty.set(XIsEmpty(this.contentRef().nativeElement.innerHTML.trim()));\r\n }\r\n\r\n ngOnDestroy() {\r\n this.focusMontitor.stopMonitoring(this.buttonRef());\r\n }\r\n}\r\n","<button\r\n #buttonRef\r\n class=\"x-button\"\r\n [tabindex]=\"tabindex()\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-button-only-icon]=\"onlyIcon()\"\r\n [class.x-button-activated]=\"activated()\"\r\n [class.x-button-disabled]=\"disabledComputed()\"\r\n [class.x-button-round]=\"roundSignal()\"\r\n [class.x-button-circle]=\"circle()\"\r\n [class.x-button-icon]=\"icon() && !contentIsEmpty()\"\r\n [class.x-button-icon-not-content]=\"icon() && contentIsEmpty()\"\r\n [class.x-button-closable]=\"closable()\"\r\n [class.x-button-transition]=\"transition()\"\r\n [title]=\"title()\"\r\n x-ripple\r\n [type]=\"type()\"\r\n [disabled]=\"disabledComputed()\"\r\n [attr.type]=\"attrType()\"\r\n [attr.disabled]=\"disabledComputed() || null\"\r\n>\r\n @if (direction() === 'row' && icon() && !loading()) {\r\n <x-icon [type]=\"icon()\"></x-icon>\r\n }\r\n @if (loading()) {\r\n <span class=\"x-button-loading\">\r\n <svg class=\"x-button-circular\" viewBox=\"25 25 50 50\">\r\n <circle class=\"x-button-path\" cx=\"50\" cy=\"50\" r=\"20\" fill=\"none\" />\r\n </svg>\r\n </span>\r\n }\r\n <span #content><ng-content></ng-content></span>\r\n @if (direction() === 'row-reverse' && icon() && !loading()) {\r\n <x-icon [type]=\"icon()\"></x-icon>\r\n }\r\n</button>\r\n","import { NgModule } from '@angular/core';\r\nimport { XButtonComponent } from './button.component';\r\nimport { XButtonsComponent } from './buttons.component';\r\n\r\n@NgModule({\r\n exports: [XButtonComponent, XButtonsComponent],\r\n imports: [XButtonComponent, XButtonsComponent]\r\n})\r\nexport class XButtonModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAIA;;;;AAIG;AACI,MAAM,aAAa,GAAG;AAC7B,MAAM,oBAAoB,GAAG,QAAQ;AAErC;;AAEG;MAEU,eAAgB,SAAQ,iBAAiB,CAAC,oBAAoB,CAAC,CAAA;AAD5E,IAAA,WAAA,GAAA;;AAEE;;;;;;;;;;;;;;;AAeG;QACM,IAAI,CAAA,IAAA,GAAG,KAAK,CAAc,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,SAAS,CAAC;AAClE;;;;;;;;;;;AAWG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;AACjC;;;;;;;;;;AAUG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;AAClC;;;;;;;;;;;;;AAaG;AACM,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAa,KAAK,CAAC;AAC7C;;;;;;;;;;AAUG;QACM,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAkB,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;AACvE;;;;;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IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAFd,gBAAgB,CAAA,EAAA,CAAA,CAAA;;2FAEf,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;AAC9C,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,iBAAiB;AAC9C,iBAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-button.mjs","sources":["../../../../lib/ng-nest/ui/button/button.property.ts","../../../../lib/ng-nest/ui/button/buttons.component.ts","../../../../lib/ng-nest/ui/button/button.component.ts","../../../../lib/ng-nest/ui/button/button.component.html","../../../../lib/ng-nest/ui/button/button.module.ts","../../../../lib/ng-nest/ui/button/ng-nest-ui-button.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\r\nimport { XPropertyFunction, XToNumber, XToBoolean, XToCssPixelValue } from '@ng-nest/ui/core';\r\nimport type { XDirection, XSize, XNumber, XBoolean, XType } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Button\r\n * @selector x-button\r\n * @decorator component\r\n */\r\nexport const XButtonPrefix = 'x-button';\r\nconst X_BUTTON_CONFIG_NAME = 'button';\r\n\r\n/**\r\n * Button Property\r\n */\r\n@Component({ selector: `${XButtonPrefix}-property`, template: '' })\r\nexport class XButtonProperty extends XPropertyFunction(X_BUTTON_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 按钮类型\r\n * @en_US Button type\r\n * @example\r\n *\r\n * ```html\r\n * <x-button>Initial</x-button>\r\n * <x-button type=\"primary\">Primary</x-button>\r\n * <x-button type=\"success\">Success</x-button>\r\n * <x-button type=\"warning\">Warning</x-button>\r\n * <x-button type=\"danger\">Danger</x-button>\r\n * <x-button type=\"info\">Info</x-button>\r\n * <x-button [type]=\"'primary'\">Primary</x-button>\r\n * ```\r\n *\r\n */\r\n readonly type = input<XButtonType>(this.config?.type ?? 'initial');\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n * @example\r\n *\r\n * ```html\r\n * <x-button icon=\"fto-edit\"></x-button>\r\n * <x-button icon=\"fto-edit\">Edit</x-button>\r\n * <x-button [icon]=\"'fto-edit'\">Edit</x-button>\r\n * ```\r\n *\r\n */\r\n readonly icon = input<string>('');\r\n /**\r\n * @zh_CN 提示\r\n * @en_US Title\r\n * @example\r\n *\r\n * ```html\r\n * <x-button title=\"information\"></x-button>\r\n * <x-button [title]=\"'information'\"></x-button>\r\n * ```\r\n *\r\n */\r\n readonly title = input<string>('');\r\n /**\r\n * @zh_CN 按钮中元素的布局方式\r\n * @en_US Button elements in the layout\r\n * @example\r\n *\r\n * ```html\r\n * <x-button direction=\"column\" icon=\"edit\">Button</x-button>\r\n * <x-button direction=\"column-reverse\" icon=\"edit\">Button</x-button>\r\n * <x-button direction=\"row\" icon=\"edit\">Button</x-button>\r\n * <x-button direction=\"row-reverse\" icon=\"edit\">Button</x-button>\r\n * <x-button [direction]=\"row\" icon=\"edit\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly direction = input<XDirection>('row');\r\n /**\r\n * @zh_CN tab 键控制次序\r\n * @en_US Tab key control order\r\n * @example\r\n *\r\n * ```html\r\n * <x-button tabindex=\"0\"></x-button>\r\n * <x-button [tabindex]=\"0\"></x-button>\r\n * ```\r\n *\r\n */\r\n readonly tabindex = input<number, XNumber>(0, { transform: XToNumber });\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n * @example\r\n *\r\n * ```html\r\n * <x-button size=\"big\">Big</x-button>\r\n * <x-button size=\"large\">Large</x-button>\r\n * <x-button size=\"medium\">Medium</x-button>\r\n * <x-button size=\"small\">Small</x-button>\r\n * <x-button size=\"mini\">Mini</x-button>\r\n * <x-button [size]=\"'medium'\">Medium</x-button>\r\n * ```\r\n *\r\n */\r\n readonly size = input<XSize>(this.config?.size ?? 'medium');\r\n /**\r\n * @zh_CN 仅显示图标\r\n * @en_US Icon only\r\n * @example\r\n *\r\n * ```html\r\n * <x-button icon=\"fto-edit\" onlyIcon></x-button>\r\n * <x-button icon=\"fto-edit\" onlyIcon=\"true\"></x-button>\r\n * <x-button icon=\"fto-edit\" [onlyIcon]=\"true\"></x-button>\r\n * ```\r\n *\r\n */\r\n readonly onlyIcon = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 激活的按钮(样式差异)\r\n * @en_US Active button (style difference)\r\n * @example\r\n *\r\n * ```html\r\n * <x-button activated>Button</x-button>\r\n * <x-button activated=\"true\">Button</x-button>\r\n * <x-button [activated]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly activated = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 禁用按钮\r\n * @en_US Disable button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button disabled>Button</x-button>\r\n * <x-button disabled=\"true\">Button</x-button>\r\n * <x-button [disabled]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 朴素按钮\r\n * @en_US Plain button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button plain>Button</x-button>\r\n * <x-button plain=\"true\">Button</x-button>\r\n * <x-button [plain]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly plain = input<boolean, XBoolean>(this.config?.plain ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 平铺按钮\r\n * @en_US Flat button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button flat>Button</x-button>\r\n * <x-button flat=\"true\">Button</x-button>\r\n * <x-button [flat]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly flat = input<boolean, XBoolean>(this.config?.flat ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 文字按钮\r\n * @en_US Text button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button text>Button</x-button>\r\n * <x-button text=\"true\">Button</x-button>\r\n * <x-button [text]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly text = input<boolean, XBoolean>(this.config?.text ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 圆角按钮\r\n * @en_US Round button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button round>Button</x-button>\r\n * <x-button round=\"true\">Button</x-button>\r\n * <x-button [round]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly round = input<boolean, XBoolean>(this.config?.round ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 圆型按钮(配合图标来使用)\r\n * @en_US Round button (use with icon)\r\n * @example\r\n *\r\n * ```html\r\n * <x-button circle>Button</x-button>\r\n * <x-button circle=\"true\">Button</x-button>\r\n * <x-button [circle]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly circle = input<boolean, XBoolean>(this.config?.circle ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 加载中\r\n * @en_US Loading\r\n * @example\r\n *\r\n * ```html\r\n * <x-button loading>Button</x-button>\r\n * <x-button loading=\"true\">Button</x-button>\r\n * <x-button [loading]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly loading = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 关闭按钮\r\n * @en_US Close button\r\n * @example\r\n *\r\n * ```html\r\n * <x-button closable>Button</x-button>\r\n * <x-button closable=\"true\">Button</x-button>\r\n * <x-button [closable]=\"true\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly closable = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 按钮类型属性 submit, button, reset\r\n * @en_US Button type attribute. submit, button, reset\r\n * @example\r\n *\r\n * ```html\r\n * <x-button attrType=\"button\">Button</x-button>\r\n * <x-button attrType=\"submit\">Button</x-button>\r\n * <x-button attrType=\"reset\">Button</x-button>\r\n * ```\r\n *\r\n */\r\n readonly attrType = input<XButtonAttrType>(this.config?.attrType ?? 'button');\r\n}\r\n\r\n/**\r\n * @zh_CN 按钮类型\r\n * @en_US Button type\r\n */\r\nexport type XButtonType = XType;\r\n\r\n/**\r\n * @zh_CN 按钮类型属性\r\n * - `'submit'` : 此类型用于提交表单数据\r\n * - `'reset'` : 此类型用于重置表单中的数据\r\n * - `'button'` : 此类型用于自定义按钮行为\r\n * @en_US Button attr type\r\n * - `'submit'` : This type is used to submit the form data\r\n * - `'reset'` : This type is used to reset the form data\r\n * - `'button'` : This type is used to the custom button\r\n */\r\nexport type XButtonAttrType = 'submit' | 'button' | 'reset';\r\n\r\n/**\r\n * Buttons\r\n * @selector x-buttons\r\n * @decorator component\r\n */\r\nexport const XButtonsPrefix = 'x-buttons';\r\nconst X_BUTTONS_CONFIG_NAME = 'buttons';\r\n\r\n/**\r\n * Buttons Property\r\n */\r\n@Component({ selector: `${XButtonsPrefix}-property`, template: '' })\r\nexport class XButtonsProperty extends XPropertyFunction(X_BUTTONS_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 按钮间距\r\n * @en_US Button spacing\r\n * @example\r\n *\r\n * ```html\r\n * // ex: 10,'10px','1rem'\r\n * <x-buttons space=\"1rem\">\r\n * <x-button>Button1</button>\r\n * <x-button>Button2</button>\r\n * </x-buttons>\r\n * ```\r\n *\r\n */\r\n readonly space = input<string, XNumber>(this.config?.space ?? '', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 隐藏边框\r\n * @en_US Hide border\r\n * @example\r\n *\r\n * ```html\r\n * <x-buttons hiddenBorder>\r\n * <x-button>Button1</button>\r\n * <x-button>Button2</button>\r\n * </x-buttons>\r\n * ```\r\n *\r\n */\r\n readonly hiddenBorder = input<boolean, XBoolean>(this.config?.hiddenBorder ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示阴影\r\n * @en_US show box shadow\r\n * @example\r\n *\r\n * ```html\r\n * <x-buttons boxShadow>\r\n * <x-button>Button1</button>\r\n * <x-button>Button2</button>\r\n * </x-buttons>\r\n * ```\r\n *\r\n */\r\n readonly boxShadow = input<boolean, XBoolean>(this.config?.boxShadow ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 圆角按钮\r\n * @en_US Round button\r\n * @example\r\n *\r\n * ```html\r\n * <x-buttons round>\r\n * <x-button>Button1</button>\r\n * <x-button>Button2</button>\r\n * </x-buttons>\r\n * ```\r\n *\r\n */\r\n readonly round = input<boolean, XBoolean>(this.config?.round ?? false, { transform: XToBoolean });\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding } from '@angular/core';\r\nimport { XButtonsPrefix, XButtonsProperty } from './button.property';\r\n\r\n@Component({\r\n selector: `${XButtonsPrefix}`,\r\n template: '<ng-content></ng-content>',\r\n styleUrls: ['./buttons.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XButtonsComponent extends XButtonsProperty {\r\n @HostBinding('class') className = XButtonsPrefix;\r\n @HostBinding('class.x-buttons-space') get getSpace() {\r\n return !!this.space();\r\n }\r\n @HostBinding('class.x-buttons-hiddenBorder') get getHiddenBorder() {\r\n return this.hiddenBorder();\r\n }\r\n @HostBinding('class.x-buttons-box-shadow') get getBoxShadow() {\r\n return this.boxShadow();\r\n }\r\n @HostBinding('class.x-buttons-round') get getRound() {\r\n return this.round();\r\n }\r\n @HostBinding('style.marginLeft') get getMarginLeft() {\r\n return '-' + this.space();\r\n }\r\n @HostBinding('style.marginRight') get getMarginRight() {\r\n return '-' + this.space();\r\n }\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n inject,\r\n AfterViewInit,\r\n OnDestroy,\r\n computed,\r\n HostBinding,\r\n signal,\r\n viewChild,\r\n AfterContentChecked,\r\n afterEveryRender\r\n} from '@angular/core';\r\nimport { XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XButtonPrefix, XButtonProperty } from './button.property';\r\nimport { XButtonsComponent } from './buttons.component';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XRippleDirective } from '@ng-nest/ui/ripple';\r\nimport { NgClass } from '@angular/common';\r\nimport { FocusMonitor } from '@angular/cdk/a11y';\r\n\r\n@Component({\r\n selector: `${XButtonPrefix}`,\r\n imports: [NgClass, XIconComponent, XRippleDirective],\r\n templateUrl: './button.component.html',\r\n styleUrls: ['./button.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XButtonComponent extends XButtonProperty implements AfterViewInit, AfterContentChecked, OnDestroy {\r\n buttonRef = viewChild.required('buttonRef', { read: ElementRef<HTMLElement> });\r\n contentRef = viewChild.required('content', { read: ElementRef<HTMLElement> });\r\n private buttons = inject(XButtonsComponent, { optional: true, host: true });\r\n private focusMontitor = inject(FocusMonitor);\r\n contentIsEmpty = signal(false);\r\n transition = signal(false);\r\n\r\n @HostBinding('style.marginLeft') get marginLeft() {\r\n return this.buttons?.space();\r\n }\r\n @HostBinding('style.marginRight') get marginRight() {\r\n return this.buttons?.space();\r\n }\r\n @HostBinding('style.pointerEvents') get pointerEvents() {\r\n return this.disabledComputed() ? 'none' : '';\r\n }\r\n\r\n constructor() {\r\n super();\r\n afterEveryRender(() => {\r\n this.transition.set(true);\r\n });\r\n }\r\n\r\n classMap = computed(() => ({\r\n [`${XButtonPrefix}-${this.type()}`]: !XIsEmpty(this.type()) && !this.plain(),\r\n [`${XButtonPrefix}-${this.type()}-plain`]: !XIsEmpty(this.type()) && this.plain(),\r\n [`${XButtonPrefix}-${this.type()}-text`]: !XIsEmpty(this.type()) && this.text(),\r\n [`${XButtonPrefix}-${this.type()}-flat`]: !XIsEmpty(this.type()) && this.flat(),\r\n [`x-size-${this.size()}`]: !XIsEmpty(this.size()),\r\n [`x-direction-${this.direction()}`]: !XIsEmpty(this.direction())\r\n }));\r\n\r\n roundSignal = computed(() => {\r\n return this.buttons?.round() || this.round();\r\n });\r\n\r\n disabledComputed = computed(() => {\r\n return this.loading() || this.disabled();\r\n });\r\n\r\n ngAfterViewInit() {\r\n this.focusMontitor.monitor(this.buttonRef(), true);\r\n }\r\n\r\n ngAfterContentChecked() {\r\n this.contentIsEmpty.set(XIsEmpty(this.contentRef().nativeElement.innerHTML.trim()));\r\n }\r\n\r\n ngOnDestroy() {\r\n this.focusMontitor.stopMonitoring(this.buttonRef());\r\n }\r\n}\r\n","<button\r\n #buttonRef\r\n class=\"x-button\"\r\n [tabindex]=\"tabindex()\"\r\n [ngClass]=\"classMap()\"\r\n [class.x-button-only-icon]=\"onlyIcon()\"\r\n [class.x-button-activated]=\"activated()\"\r\n [class.x-button-disabled]=\"disabledComputed()\"\r\n [class.x-button-round]=\"roundSignal()\"\r\n [class.x-button-circle]=\"circle()\"\r\n [class.x-button-icon]=\"icon() && !contentIsEmpty()\"\r\n [class.x-button-icon-not-content]=\"icon() && contentIsEmpty()\"\r\n [class.x-button-closable]=\"closable()\"\r\n [class.x-button-transition]=\"transition()\"\r\n [title]=\"title()\"\r\n x-ripple\r\n [type]=\"type()\"\r\n [disabled]=\"disabledComputed()\"\r\n [attr.type]=\"attrType()\"\r\n [attr.disabled]=\"disabledComputed() || null\"\r\n>\r\n @if (direction() === 'row' && icon() && !loading()) {\r\n <x-icon [type]=\"icon()\"></x-icon>\r\n }\r\n @if (loading()) {\r\n <span class=\"x-button-loading\">\r\n <svg class=\"x-button-circular\" viewBox=\"25 25 50 50\">\r\n <circle class=\"x-button-path\" cx=\"50\" cy=\"50\" r=\"20\" fill=\"none\" />\r\n </svg>\r\n </span>\r\n }\r\n <span #content><ng-content></ng-content></span>\r\n @if (direction() === 'row-reverse' && icon() && !loading()) {\r\n <x-icon [type]=\"icon()\"></x-icon>\r\n }\r\n</button>\r\n","import { NgModule } from '@angular/core';\r\nimport { XButtonComponent } from './button.component';\r\nimport { XButtonsComponent } from './buttons.component';\r\n\r\n@NgModule({\r\n exports: [XButtonComponent, XButtonsComponent],\r\n imports: [XButtonComponent, XButtonsComponent]\r\n})\r\nexport class XButtonModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAIA;;;;AAIG;AACI,MAAM,aAAa,GAAG;AAC7B,MAAM,oBAAoB,GAAG,QAAQ;AAErC;;AAEG;MAEU,eAAgB,SAAQ,iBAAiB,CAAC,oBAAoB,CAAC,CAAA;AAD5E,IAAA,WAAA,GAAA;;AAEE;;;;;;;;;;;;;;;AAeG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAc,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,SAAS,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAClE;;;;;;;;;;;AAWG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,gDAAC;AACjC;;;;;;;;;;AAUG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AAClC;;;;;;;;;;;;;AAaG;AACM,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAa,KAAK,qDAAC;AAC7C;;;;;;;;;;AAUG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAkB,CAAC,4CAAI,SAAS,EAAE,SAAS,EAAA,CAAA,GAAA,CAAtB,EAAE,SAAS,EAAE,SAAS,EAAE,GAAC;AACvE;;;;;;;;;;;;;;AAcG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAQ,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,QAAQ,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,C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unction(X_CALENDAR_CONFIG_NAME) {
36
36
  * ```
37
37
  *
38
38
  */
39
- this.data = input({});
39
+ this.data = input({}, ...(ngDevMode ? [{ debugName: "data" }] : []));
40
40
  /**
41
41
  * @zh_CN 显示模式
42
42
  * @en_US Display mode
@@ -48,7 +48,7 @@ class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {
48
48
  * ```
49
49
  *
50
50
  */
51
- this.model = input('month');
51
+ this.model = input('month', ...(ngDevMode ? [{ debugName: "model" }] : []));
52
52
  /**
53
53
  * @zh_CN 显示类型
54
54
  * @en_US Display type
@@ -60,7 +60,7 @@ class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {
60
60
  * ```
61
61
  *
62
62
  */
63
- this.displayType = input('calendar');
63
+ this.displayType = input('calendar', ...(ngDevMode ? [{ debugName: "displayType" }] : []));
64
64
  /**
65
65
  * @zh_CN 头部显示模版
66
66
  * @en_US Head display template
@@ -72,7 +72,7 @@ class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {
72
72
  * ```
73
73
  *
74
74
  */
75
- this.headerLeftTemp = input();
75
+ this.headerLeftTemp = input(...(ngDevMode ? [undefined, { debugName: "headerLeftTemp" }] : []));
76
76
  /**
77
77
  * @zh_CN 选择日期变化的事件
78
78
  * @en_US Select the event of the date change
@@ -112,10 +112,10 @@ class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {
112
112
  */
113
113
  this.rangeChange = output();
114
114
  }
115
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCalendarProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
116
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.0", type: XCalendarProperty, isStandalone: true, selector: "x-calendar-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, displayType: { classPropertyName: "displayType", publicName: "displayType", isSignal: true, isRequired: false, transformFunction: null }, headerLeftTemp: { classPropertyName: "headerLeftTemp", publicName: "headerLeftTemp", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange", rangeChange: "rangeChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
115
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCalendarProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
116
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.0", type: XCalendarProperty, isStandalone: true, selector: "x-calendar-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, displayType: { classPropertyName: "displayType", publicName: "displayType", isSignal: true, isRequired: false, transformFunction: null }, headerLeftTemp: { classPropertyName: "headerLeftTemp", publicName: "headerLeftTemp", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange", rangeChange: "rangeChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
117
117
  }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCalendarProperty, decorators: [{
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCalendarProperty, decorators: [{
119
119
  type: Component,
120
120
  args: [{ selector: `${XCalendarPrefix}-property`, template: '' }]
121
121
  }] });
@@ -126,13 +126,13 @@ class XCalendarComponent extends XCalendarProperty {
126
126
  this.datePipe = inject(DatePipe);
127
127
  this.lowerCasePipe = inject(LowerCasePipe);
128
128
  this.i18n = inject(XI18nService);
129
- this.datetime = signal(new Date());
130
- this.activatedDate = signal(new Date());
129
+ this.datetime = signal(new Date(), ...(ngDevMode ? [{ debugName: "datetime" }] : []));
130
+ this.activatedDate = signal(new Date(), ...(ngDevMode ? [{ debugName: "activatedDate" }] : []));
131
131
  this.radioDataBase = [
132
132
  { label: '', id: 'month' },
133
133
  { label: '', id: 'year' }
134
134
  ];
135
- this.modelSignal = signal(this.model());
135
+ this.modelSignal = signal(this.model(), ...(ngDevMode ? [{ debugName: "modelSignal" }] : []));
136
136
  this.locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.calendar)), {
137
137
  initialValue: zh_CN.calendar
138
138
  });
@@ -141,10 +141,10 @@ class XCalendarComponent extends XCalendarProperty {
141
141
  x.label = this.locale()[x.id];
142
142
  return x;
143
143
  });
144
- });
144
+ }, ...(ngDevMode ? [{ debugName: "radioData" }] : []));
145
145
  this.classMap = computed(() => ({
146
146
  [`${XCalendarPrefix}-${this.displayType()}`]: !XIsEmpty(this.displayType())
147
- }));
147
+ }), ...(ngDevMode ? [{ debugName: "classMap" }] : []));
148
148
  this.monthData = computed(() => {
149
149
  let dt = {};
150
150
  for (let key in this.data()) {
@@ -162,7 +162,7 @@ class XCalendarComponent extends XCalendarProperty {
162
162
  }
163
163
  }
164
164
  return dt;
165
- });
165
+ }, ...(ngDevMode ? [{ debugName: "monthData" }] : []));
166
166
  effect(() => {
167
167
  this.modelSignal.set(this.model());
168
168
  });
@@ -195,10 +195,10 @@ class XCalendarComponent extends XCalendarProperty {
195
195
  getMonth(date) {
196
196
  return this.monthData()?.[this.datePipe.transform(date, 'yyyy-MM')];
197
197
  }
198
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
199
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: XCalendarComponent, isStandalone: true, selector: "x-calendar", providers: [DatePipe, LowerCasePipe], usesInheritance: true, ngImport: i0, template: "<div #calendar class=\"x-calendar\" [ngClass]=\"classMap()\">\r\n <div class=\"x-calendar-header\">\r\n <div class=\"x-calendar-header-left\">\r\n @if (headerLeftTemp()) {\r\n <ng-container *ngTemplateOutlet=\"headerLeftTemp()!\"></ng-container>\r\n }\r\n </div>\r\n <div class=\"x-calendar-header-right\">\r\n <x-date-picker\r\n [(ngModel)]=\"datetime\"\r\n [type]=\"modelSignal()\"\r\n showHeader=\"false\"\r\n [clearable]=\"false\"\r\n ></x-date-picker>\r\n <x-buttons [boxShadow]=\"false\">\r\n <x-button (click)=\"action(-1)\" plain>{{\r\n modelSignal() === 'month' ? locale().lastMonth : locale().lastYear\r\n }}</x-button>\r\n <x-button (click)=\"action(1)\" plain>{{\r\n modelSignal() === 'month' ? locale().nextMonth : locale().nextYear\r\n }}</x-button>\r\n </x-buttons>\r\n <x-radio [data]=\"radioData()\" [(ngModel)]=\"modelSignal\" button></x-radio>\r\n </div>\r\n </div>\r\n <div class=\"x-calendar-body\">\r\n @if (modelSignal() === 'month') {\r\n <x-picker-date\r\n [display]=\"datetime()\"\r\n (modelChange)=\"dateOnChange($event!)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [dateTemp]=\"dateTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-date>\r\n }\r\n @if (modelSignal() === 'year') {\r\n <x-picker-month\r\n [display]=\"datetime()\"\r\n (modelChange)=\"dateOnChange($event!)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [monthTemp]=\"monthTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-month>\r\n }\r\n </div>\r\n</div>\r\n\r\n<ng-template #dateTemp let-date=\"date$\">\r\n <div class=\"x-calendar-date\" [class.x-activated]=\"(date | date: 'yyyyMMdd') === (activatedDate() | date: 'yyyyMMdd')\">\r\n <span [title]=\"date | date: 'yyyy-MM-dd'\">{{ date | date: 'd' }}</span>\r\n @if (displayType() === 'calendar') {\r\n <div class=\"x-calendar-date-content\">\r\n @if (getDate(date)) {\r\n <ul>\r\n @for (item of getDate(date); track item.id + item.label) {\r\n <li>\r\n <span [title]=\"item.id + item.label\">{{ item.id }}{{ item.label }}</span>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #monthTemp let-date=\"date$\">\r\n <div class=\"x-calendar-month\" [class.x-activated]=\"(date | date: 'yyyyMM') === (activatedDate() | date: 'yyyyMM')\">\r\n <span [title]=\"date | date: 'yyyy-MM'\">{{ getLocaleMonth(date) }}</span>\r\n @if (displayType() === 'calendar') {\r\n <div class=\"x-calendar-month-content\">\r\n @if (getMonth(date)) {\r\n <ul>\r\n @for (item of getMonth(date); track item.id) {\r\n <li>\r\n <x-link x-tooltip [content]=\"item.label\" placement=\"top\">{{ item.id }}</x-link>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: ["x-calendar{display:inline-block}.x-calendar{margin:0;padding:0}.x-calendar{box-sizing:border-box}.x-calendar-header{display:flex;align-items:center;justify-content:space-between}.x-calendar-header-right{display:flex;align-items:center;justify-content:flex-end}.x-calendar-header-right>x-date-picker{display:inline-block;width:8rem}.x-calendar-header-right>x-buttons,.x-calendar-header-right>x-radio{margin-left:.5rem}.x-calendar-body>x-picker-date .x-picker-date tr,.x-calendar-body>x-picker-month .x-picker-month tr{display:flex}.x-calendar-body>x-picker-date .x-picker-date tr th,.x-calendar-body>x-picker-month .x-picker-month tr th{padding:.325rem;margin:0 .25rem;display:inline-block;flex:1;overflow:hidden}.x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-body>x-picker-month .x-picker-month tr td{padding:0;cursor:pointer;position:relative;flex:1;overflow:hidden;margin:0 .25rem;transition:.3s}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{display:block}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content{padding-left:.325rem;position:static;width:auto;overflow-y:auto}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content ul,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content li,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content ul,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content ul,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content ul,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content li{margin:0;padding:0;list-style:none}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li{line-height:1.5;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;display:inline-block;position:relative}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li>span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-calendar-calendar{margin:.25rem -.25rem 0}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr th,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr th{height:2.25rem;line-height:2.25rem;text-align:right}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td{height:6.75rem;border-top:var(--x-border-width) var(--x-border-style) var(--x-border);text-align:left}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{text-align:right;padding:.325rem}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content{height:4.5rem}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month.x-activated{background-color:var(--x-primary-900)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td:hover,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td:hover{background-color:var(--x-background-a200)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-last-or-next,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-last-or-next{color:var(--x-text-400)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now{color:var(--x-primary);border-top-color:var(--x-primary)}.x-calendar-calendar .x-calendar-body .x-picker-date-body>table td:first-child,.x-calendar-calendar .x-calendar-body .x-picker-date-body>table td:last-child{border-radius:0}.x-calendar-card{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius)}.x-calendar-card .x-calendar-header{padding:.5rem;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);justify-content:center}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td{margin:.25rem}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-color:transparent}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{padding:.125rem}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date.x-activated,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month.x-activated,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date.x-activated,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month.x-activated{background-color:var(--x-primary);color:var(--x-background-100)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td:hover,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td:hover{background-color:var(--x-background-a200);color:var(--x-primary)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-last-or-next,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-last-or-next{color:var(--x-text-700)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now .x-calendar-date:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now .x-calendar-month:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now .x-calendar-date:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now .x-calendar-month:not(.x-activated){color:var(--x-primary);background-color:transparent;border-color:var(--x-primary)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: DatePipe, name: "date" }, { 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"] }, { kind: "component", type: XLinkComponent, selector: "x-link" }, { kind: "directive", type: XTooltipDirective, selector: "[x-tooltip], x-tooltip" }, { kind: "component", type: XRadioComponent, selector: "x-radio" }, { kind: "component", type: XDatePickerComponent, selector: "x-date-picker" }, { kind: "component", type: XPickerDateComponent, selector: "x-picker-date" }, { kind: "component", type: XPickerMonthComponent, selector: "x-picker-month" }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
198
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
199
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: XCalendarComponent, isStandalone: true, selector: "x-calendar", providers: [DatePipe, LowerCasePipe], usesInheritance: true, ngImport: i0, template: "<div #calendar class=\"x-calendar\" [ngClass]=\"classMap()\">\r\n <div class=\"x-calendar-header\">\r\n <div class=\"x-calendar-header-left\">\r\n @if (headerLeftTemp()) {\r\n <ng-container *ngTemplateOutlet=\"headerLeftTemp()!\"></ng-container>\r\n }\r\n </div>\r\n <div class=\"x-calendar-header-right\">\r\n <x-date-picker\r\n [(ngModel)]=\"datetime\"\r\n [type]=\"modelSignal()\"\r\n showHeader=\"false\"\r\n [clearable]=\"false\"\r\n ></x-date-picker>\r\n <x-buttons [boxShadow]=\"false\">\r\n <x-button (click)=\"action(-1)\" plain>{{\r\n modelSignal() === 'month' ? locale().lastMonth : locale().lastYear\r\n }}</x-button>\r\n <x-button (click)=\"action(1)\" plain>{{\r\n modelSignal() === 'month' ? locale().nextMonth : locale().nextYear\r\n }}</x-button>\r\n </x-buttons>\r\n <x-radio [data]=\"radioData()\" [(ngModel)]=\"modelSignal\" button></x-radio>\r\n </div>\r\n </div>\r\n <div class=\"x-calendar-body\">\r\n @if (modelSignal() === 'month') {\r\n <x-picker-date\r\n [display]=\"datetime()\"\r\n (modelChange)=\"dateOnChange($event!)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [dateTemp]=\"dateTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-date>\r\n }\r\n @if (modelSignal() === 'year') {\r\n <x-picker-month\r\n [display]=\"datetime()\"\r\n (modelChange)=\"dateOnChange($event!)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [monthTemp]=\"monthTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-month>\r\n }\r\n </div>\r\n</div>\r\n\r\n<ng-template #dateTemp let-date=\"date$\">\r\n <div class=\"x-calendar-date\" [class.x-activated]=\"(date | date: 'yyyyMMdd') === (activatedDate() | date: 'yyyyMMdd')\">\r\n <span [title]=\"date | date: 'yyyy-MM-dd'\">{{ date | date: 'd' }}</span>\r\n @if (displayType() === 'calendar') {\r\n <div class=\"x-calendar-date-content\">\r\n @if (getDate(date)) {\r\n <ul>\r\n @for (item of getDate(date); track item.id + item.label) {\r\n <li>\r\n <span [title]=\"item.id + item.label\">{{ item.id }}{{ item.label }}</span>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #monthTemp let-date=\"date$\">\r\n <div class=\"x-calendar-month\" [class.x-activated]=\"(date | date: 'yyyyMM') === (activatedDate() | date: 'yyyyMM')\">\r\n <span [title]=\"date | date: 'yyyy-MM'\">{{ getLocaleMonth(date) }}</span>\r\n @if (displayType() === 'calendar') {\r\n <div class=\"x-calendar-month-content\">\r\n @if (getMonth(date)) {\r\n <ul>\r\n @for (item of getMonth(date); track item.id) {\r\n <li>\r\n <x-link x-tooltip [content]=\"item.label\" placement=\"top\">{{ item.id }}</x-link>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: ["x-calendar{display:inline-block}.x-calendar{margin:0;padding:0}.x-calendar{box-sizing:border-box}.x-calendar-header{display:flex;align-items:center;justify-content:space-between}.x-calendar-header-right{display:flex;align-items:center;justify-content:flex-end}.x-calendar-header-right>x-date-picker{display:inline-block;width:8rem}.x-calendar-header-right>x-buttons,.x-calendar-header-right>x-radio{margin-left:.5rem}.x-calendar-body>x-picker-date .x-picker-date tr,.x-calendar-body>x-picker-month .x-picker-month tr{display:flex}.x-calendar-body>x-picker-date .x-picker-date tr th,.x-calendar-body>x-picker-month .x-picker-month tr th{padding:.325rem;margin:0 .25rem;display:inline-block;flex:1;overflow:hidden}.x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-body>x-picker-month .x-picker-month tr td{padding:0;cursor:pointer;position:relative;flex:1;overflow:hidden;margin:0 .25rem;transition:.3s}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{display:block}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content{padding-left:.325rem;position:static;width:auto;overflow-y:auto}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content ul,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content li,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content ul,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content ul,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content ul,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content li{margin:0;padding:0;list-style:none}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li{line-height:1.5;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;display:inline-block;position:relative}.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content>ul li>span,.x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content>ul li>span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-calendar-calendar{margin:.25rem -.25rem 0}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr th,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr th{height:2.25rem;line-height:2.25rem;text-align:right}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td{height:6.75rem;border-top:var(--x-border-width) var(--x-border-style) var(--x-border);text-align:left}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{text-align:right;padding:.325rem}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date-content,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month-content,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date-content,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month-content{height:4.5rem}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date.x-activated,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month.x-activated{background-color:var(--x-primary-900)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td:hover,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td:hover{background-color:var(--x-background-a200)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-last-or-next,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-last-or-next{color:var(--x-text-400)}.x-calendar-calendar .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now,.x-calendar-calendar .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now{color:var(--x-primary);border-top-color:var(--x-primary)}.x-calendar-calendar .x-calendar-body .x-picker-date-body>table td:first-child,.x-calendar-calendar .x-calendar-body .x-picker-date-body>table td:last-child{border-radius:0}.x-calendar-card{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius)}.x-calendar-card .x-calendar-header{padding:.5rem;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);justify-content:center}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td{margin:.25rem}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-color:transparent}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date>span,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month>span,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date>span,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month>span{padding:.125rem}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-date.x-activated,.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td .x-calendar-month.x-activated,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-date.x-activated,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td .x-calendar-month.x-activated{background-color:var(--x-primary);color:var(--x-background-100)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td:hover,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td:hover{background-color:var(--x-background-a200);color:var(--x-primary)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-last-or-next,.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-last-or-next{color:var(--x-text-700)}.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now .x-calendar-date:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-date .x-picker-date tr td.x-date-now .x-calendar-month:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now .x-calendar-date:not(.x-activated),.x-calendar-card .x-calendar-body>x-picker-month .x-picker-month tr td.x-date-now .x-calendar-month:not(.x-activated){color:var(--x-primary);background-color:transparent;border-color:var(--x-primary)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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"] }, { kind: "component", type: XLinkComponent, selector: "x-link" }, { kind: "directive", type: XTooltipDirective, selector: "[x-tooltip], x-tooltip" }, { kind: "component", type: XRadioComponent, selector: "x-radio" }, { kind: "component", type: XDatePickerComponent, selector: "x-date-picker" }, { kind: "component", type: XPickerDateComponent, selector: "x-picker-date" }, { kind: "component", type: XPickerMonthComponent, selector: "x-picker-month" }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
200
200
  }
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCalendarComponent, decorators: [{
201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCalendarComponent, decorators: [{
202
202
  type: Component,
203
203
  args: [{ selector: `${XCalendarPrefix}`, imports: [
204
204
  NgClass,
@@ -217,11 +217,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
217
217
  }], ctorParameters: () => [] });
218
218
 
219
219
  class XCalendarModule {
220
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
221
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: XCalendarModule, imports: [XCalendarComponent], exports: [XCalendarComponent] }); }
222
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCalendarModule, imports: [XCalendarComponent] }); }
220
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
221
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: XCalendarModule, imports: [XCalendarComponent], exports: [XCalendarComponent] }); }
222
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCalendarModule, imports: [XCalendarComponent] }); }
223
223
  }
224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCalendarModule, decorators: [{
224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCalendarModule, decorators: [{
225
225
  type: NgModule,
226
226
  args: [{
227
227
  exports: [XCalendarComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-calendar.mjs","sources":["../../../../lib/ng-nest/ui/calendar/calendar.property.ts","../../../../lib/ng-nest/ui/calendar/calendar.component.ts","../../../../lib/ng-nest/ui/calendar/calendar.component.html","../../../../lib/ng-nest/ui/calendar/calendar.module.ts","../../../../lib/ng-nest/ui/calendar/ng-nest-ui-calendar.ts"],"sourcesContent":["import { XPropertyFunction } from '@ng-nest/ui/core';\r\nimport { Component, TemplateRef, input, output } from '@angular/core';\r\nimport type { XIdentityProperty } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Calendar\r\n * @selector x-calendar\r\n * @decorator component\r\n */\r\nexport const XCalendarPrefix = 'x-calendar';\r\nconst X_CALENDAR_CONFIG_NAME = 'calendar';\r\n\r\n/**\r\n * Calendar Property\r\n */\r\n@Component({ selector: `${XCalendarPrefix}-property`, template: '' })\r\nexport class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 事务数据对象\r\n * @en_US Transaction data object\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar [data]=\"{ '2020-2-22': [{id: '1',label: '1'}], '2020-2-24': [{id: '2, label: '2'}] }\"></x-calendar>\r\n * ```\r\n *\r\n */\r\n readonly data = input<XCalendarData>({});\r\n /**\r\n * @zh_CN 显示模式\r\n * @en_US Display mode\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar model=\"month\"></x-calendar>\r\n * <x-calendar model=\"year\"></x-calendar>\r\n * ```\r\n *\r\n */\r\n readonly model = input<XCalendarModel>('month');\r\n /**\r\n * @zh_CN 显示类型\r\n * @en_US Display type\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar displayType=\"calendar\"></x-calendar>\r\n * <x-calendar displayType=\"card\"></x-calendar>\r\n * ```\r\n *\r\n */\r\n readonly displayType = input<XCalendarType>('calendar');\r\n /**\r\n * @zh_CN 头部显示模版\r\n * @en_US Head display template\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar [headerLeftTemp]=\"headerLeftTemp\"></x-calendar>\r\n * <ng-template #headerLeftTemp> custom title </ng-template>\r\n * ```\r\n *\r\n */\r\n readonly headerLeftTemp = input<TemplateRef<any>>();\r\n /**\r\n * @zh_CN 选择日期变化的事件\r\n * @en_US Select the event of the date change\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar (dateChange)=\"onDateChange($event)\"></x-calendar>\r\n * ```\r\n *\r\n * ```typescript\r\n * ...\r\n * onDateChange(date: Date) {\r\n * console.log(date)\r\n * }\r\n * ...\r\n * ```\r\n *\r\n */\r\n readonly dateChange = output<Date>();\r\n /**\r\n * @zh_CN 日期范围变化的事件\r\n * @en_US Date range change event\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar (rangeChange)=\"onRangeChange($event)\"></x-calendar>\r\n * ```\r\n *\r\n * ```typescript\r\n * ...\r\n * onRangeChange(dates: Date[]) {\r\n * console.log(dates)\r\n * }\r\n * ...\r\n * ```\r\n *\r\n */\r\n readonly rangeChange = output<Date[]>();\r\n}\r\n\r\n/**\r\n * @zh_CN Calendar 数据对象\r\n * @en_US Calendar data object\r\n */\r\nexport interface XCalendarData {\r\n /**\r\n * key-value\r\n * { \"2020-2-22\": [{id:\"1\",label:\"1\"}] }\r\n */\r\n [property: string]: XCalendarNode[];\r\n}\r\n\r\n/**\r\n * @zh_CN Calendar 数据对象\r\n * @en_US Calendar data object\r\n */\r\nexport interface XCalendarNode extends XIdentityProperty {}\r\n\r\n/**\r\n * @zh_CN 显示模式\r\n * @en_US Display mode\r\n */\r\nexport type XCalendarModel = 'month' | 'year';\r\n\r\n/**\r\n * @zh_CN 显示类型\r\n * @en_US Display type\r\n */\r\nexport type XCalendarType = 'calendar' | 'card';\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, computed, signal, effect } from '@angular/core';\r\nimport { XCalendarPrefix, XCalendarProperty } from './calendar.property';\r\nimport { XIsEmpty } from '@ng-nest/ui/core';\r\nimport { DatePipe, LowerCasePipe, NgClass, NgTemplateOutlet } from '@angular/common';\r\nimport { XI18nService, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { XLinkComponent } from '@ng-nest/ui/link';\r\nimport { XDatePickerComponent, XPickerDateComponent, XPickerMonthComponent } from '@ng-nest/ui/date-picker';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XRadioComponent } from '@ng-nest/ui/radio';\r\nimport { XTooltipDirective } from '@ng-nest/ui/tooltip';\r\nimport { map } from 'rxjs/operators';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\nimport type { XCalendarNode } from './calendar.property';\r\nimport type { XI18nCalendar } from '@ng-nest/ui/i18n';\r\n\r\n@Component({\r\n selector: `${XCalendarPrefix}`,\r\n imports: [\r\n NgClass,\r\n NgTemplateOutlet,\r\n DatePipe,\r\n FormsModule,\r\n XLinkComponent,\r\n XTooltipDirective,\r\n XRadioComponent,\r\n XDatePickerComponent,\r\n XPickerDateComponent,\r\n XPickerMonthComponent,\r\n XButtonComponent,\r\n XButtonsComponent\r\n ],\r\n templateUrl: './calendar.component.html',\r\n styleUrls: ['./calendar.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [DatePipe, LowerCasePipe]\r\n})\r\nexport class XCalendarComponent extends XCalendarProperty {\r\n private datePipe = inject(DatePipe);\r\n private lowerCasePipe = inject(LowerCasePipe);\r\n private i18n = inject(XI18nService);\r\n datetime = signal(new Date());\r\n activatedDate = signal(new Date());\r\n radioDataBase = [\r\n { label: '', id: 'month' },\r\n { label: '', id: 'year' }\r\n ];\r\n modelSignal = signal(this.model());\r\n\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.calendar as XI18nCalendar)), {\r\n initialValue: zh_CN.calendar\r\n });\r\n radioData = computed(() => {\r\n return this.radioDataBase.map((x) => {\r\n x.label = (this.locale() as any)[x.id];\r\n return x;\r\n });\r\n });\r\n classMap = computed(() => ({\r\n [`${XCalendarPrefix}-${this.displayType()}`]: !XIsEmpty(this.displayType())\r\n }));\r\n monthData = computed(() => {\r\n let dt: { [property: string]: XCalendarNode[] } = {};\r\n for (let key in this.data()) {\r\n let month = this.datePipe.transform(key, 'yyyy-MM') as string;\r\n let value = '';\r\n this.data()[key].forEach((x) => {\r\n value += `${x.id}${x.label} <br/>`;\r\n });\r\n let item = { id: key, label: value };\r\n if (dt[month]) {\r\n dt[month] = [...dt[month], item];\r\n } else {\r\n dt[month] = [item];\r\n }\r\n }\r\n\r\n return dt;\r\n });\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n this.modelSignal.set(this.model());\r\n });\r\n }\r\n\r\n action(next: number) {\r\n let datetime = new Date(this.datetime().getTime());\r\n if (this.modelSignal() === 'month') {\r\n datetime.setMonth(datetime.getMonth() + next);\r\n } else if (this.modelSignal() === 'year') {\r\n datetime.setFullYear(datetime.getFullYear() + next);\r\n }\r\n this.datetime.set(datetime);\r\n }\r\n\r\n getLocaleMonth(date: Date) {\r\n return (this.locale() as any)[this.lowerCasePipe.transform(this.datePipe.transform(date, 'LLLL') as string)];\r\n }\r\n\r\n dateOnChange(date: Date) {\r\n if (this.datePipe.transform(date, 'yyyy-MM-dd') !== this.datePipe.transform(this.activatedDate(), 'yyyy-MM-dd')) {\r\n this.activatedDate.set(date);\r\n this.dateChange.emit(this.activatedDate());\r\n }\r\n }\r\n\r\n rangeOnChange(range: Date[]) {\r\n this.rangeChange.emit(range);\r\n }\r\n\r\n getDate(date: Date): XCalendarNode[] {\r\n return this.data()?.[this.datePipe.transform(date, 'yyyy-MM-dd') as string];\r\n }\r\n\r\n getMonth(date: Date): XCalendarNode[] {\r\n return this.monthData()?.[this.datePipe.transform(date, 'yyyy-MM') as string];\r\n }\r\n}\r\n","<div #calendar class=\"x-calendar\" [ngClass]=\"classMap()\">\r\n <div class=\"x-calendar-header\">\r\n <div class=\"x-calendar-header-left\">\r\n @if (headerLeftTemp()) {\r\n <ng-container *ngTemplateOutlet=\"headerLeftTemp()!\"></ng-container>\r\n }\r\n </div>\r\n <div class=\"x-calendar-header-right\">\r\n <x-date-picker\r\n [(ngModel)]=\"datetime\"\r\n [type]=\"modelSignal()\"\r\n showHeader=\"false\"\r\n [clearable]=\"false\"\r\n ></x-date-picker>\r\n <x-buttons [boxShadow]=\"false\">\r\n <x-button (click)=\"action(-1)\" plain>{{\r\n modelSignal() === 'month' ? locale().lastMonth : locale().lastYear\r\n }}</x-button>\r\n <x-button (click)=\"action(1)\" plain>{{\r\n modelSignal() === 'month' ? locale().nextMonth : locale().nextYear\r\n }}</x-button>\r\n </x-buttons>\r\n <x-radio [data]=\"radioData()\" [(ngModel)]=\"modelSignal\" button></x-radio>\r\n </div>\r\n </div>\r\n <div class=\"x-calendar-body\">\r\n @if (modelSignal() === 'month') {\r\n <x-picker-date\r\n [display]=\"datetime()\"\r\n (modelChange)=\"dateOnChange($event!)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [dateTemp]=\"dateTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-date>\r\n }\r\n @if (modelSignal() === 'year') {\r\n <x-picker-month\r\n [display]=\"datetime()\"\r\n (modelChange)=\"dateOnChange($event!)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [monthTemp]=\"monthTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-month>\r\n }\r\n </div>\r\n</div>\r\n\r\n<ng-template #dateTemp let-date=\"date$\">\r\n <div class=\"x-calendar-date\" [class.x-activated]=\"(date | date: 'yyyyMMdd') === (activatedDate() | date: 'yyyyMMdd')\">\r\n <span [title]=\"date | date: 'yyyy-MM-dd'\">{{ date | date: 'd' }}</span>\r\n @if (displayType() === 'calendar') {\r\n <div class=\"x-calendar-date-content\">\r\n @if (getDate(date)) {\r\n <ul>\r\n @for (item of getDate(date); track item.id + item.label) {\r\n <li>\r\n <span [title]=\"item.id + item.label\">{{ item.id }}{{ item.label }}</span>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #monthTemp let-date=\"date$\">\r\n <div class=\"x-calendar-month\" [class.x-activated]=\"(date | date: 'yyyyMM') === (activatedDate() | date: 'yyyyMM')\">\r\n <span [title]=\"date | date: 'yyyy-MM'\">{{ getLocaleMonth(date) }}</span>\r\n @if (displayType() === 'calendar') {\r\n <div class=\"x-calendar-month-content\">\r\n @if (getMonth(date)) {\r\n <ul>\r\n @for (item of getMonth(date); track item.id) {\r\n <li>\r\n <x-link x-tooltip [content]=\"item.label\" placement=\"top\">{{ item.id }}</x-link>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCalendarComponent } from './calendar.component';\r\n\r\n@NgModule({\r\n exports: [XCalendarComponent],\r\n imports: [XCalendarComponent]\r\n})\r\nexport class XCalendarModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,eAAe,GAAG;AAC/B,MAAM,sBAAsB,GAAG,UAAU;AAEzC;;AAEG;MAEU,iBAAkB,SAAQ,iBAAiB,CAAC,sBAAsB,CAAC,CAAA;AADhF,IAAA,WAAA,GAAA;;AAEE;;;;;;;;;AASG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,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,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,OAAO,EAAE,CAAC,kBAAkB;AAC7B,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-calendar.mjs","sources":["../../../../lib/ng-nest/ui/calendar/calendar.property.ts","../../../../lib/ng-nest/ui/calendar/calendar.component.ts","../../../../lib/ng-nest/ui/calendar/calendar.component.html","../../../../lib/ng-nest/ui/calendar/calendar.module.ts","../../../../lib/ng-nest/ui/calendar/ng-nest-ui-calendar.ts"],"sourcesContent":["import { XPropertyFunction } from '@ng-nest/ui/core';\r\nimport { Component, TemplateRef, input, output } from '@angular/core';\r\nimport type { XIdentityProperty } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Calendar\r\n * @selector x-calendar\r\n * @decorator component\r\n */\r\nexport const XCalendarPrefix = 'x-calendar';\r\nconst X_CALENDAR_CONFIG_NAME = 'calendar';\r\n\r\n/**\r\n * Calendar Property\r\n */\r\n@Component({ selector: `${XCalendarPrefix}-property`, template: '' })\r\nexport class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 事务数据对象\r\n * @en_US Transaction data object\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar [data]=\"{ '2020-2-22': [{id: '1',label: '1'}], '2020-2-24': [{id: '2, label: '2'}] }\"></x-calendar>\r\n * ```\r\n *\r\n */\r\n readonly data = input<XCalendarData>({});\r\n /**\r\n * @zh_CN 显示模式\r\n * @en_US Display mode\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar model=\"month\"></x-calendar>\r\n * <x-calendar model=\"year\"></x-calendar>\r\n * ```\r\n *\r\n */\r\n readonly model = input<XCalendarModel>('month');\r\n /**\r\n * @zh_CN 显示类型\r\n * @en_US Display type\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar displayType=\"calendar\"></x-calendar>\r\n * <x-calendar displayType=\"card\"></x-calendar>\r\n * ```\r\n *\r\n */\r\n readonly displayType = input<XCalendarType>('calendar');\r\n /**\r\n * @zh_CN 头部显示模版\r\n * @en_US Head display template\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar [headerLeftTemp]=\"headerLeftTemp\"></x-calendar>\r\n * <ng-template #headerLeftTemp> custom title </ng-template>\r\n * ```\r\n *\r\n */\r\n readonly headerLeftTemp = input<TemplateRef<any>>();\r\n /**\r\n * @zh_CN 选择日期变化的事件\r\n * @en_US Select the event of the date change\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar (dateChange)=\"onDateChange($event)\"></x-calendar>\r\n * ```\r\n *\r\n * ```typescript\r\n * ...\r\n * onDateChange(date: Date) {\r\n * console.log(date)\r\n * }\r\n * ...\r\n * ```\r\n *\r\n */\r\n readonly dateChange = output<Date>();\r\n /**\r\n * @zh_CN 日期范围变化的事件\r\n * @en_US Date range change event\r\n * @example\r\n *\r\n * ```html\r\n * <x-calendar (rangeChange)=\"onRangeChange($event)\"></x-calendar>\r\n * ```\r\n *\r\n * ```typescript\r\n * ...\r\n * onRangeChange(dates: Date[]) {\r\n * console.log(dates)\r\n * }\r\n * ...\r\n * ```\r\n *\r\n */\r\n readonly rangeChange = output<Date[]>();\r\n}\r\n\r\n/**\r\n * @zh_CN Calendar 数据对象\r\n * @en_US Calendar data object\r\n */\r\nexport interface XCalendarData {\r\n /**\r\n * key-value\r\n * { \"2020-2-22\": [{id:\"1\",label:\"1\"}] }\r\n */\r\n [property: string]: XCalendarNode[];\r\n}\r\n\r\n/**\r\n * @zh_CN Calendar 数据对象\r\n * @en_US Calendar data object\r\n */\r\nexport interface XCalendarNode extends XIdentityProperty {}\r\n\r\n/**\r\n * @zh_CN 显示模式\r\n * @en_US Display mode\r\n */\r\nexport type XCalendarModel = 'month' | 'year';\r\n\r\n/**\r\n * @zh_CN 显示类型\r\n * @en_US Display type\r\n */\r\nexport type XCalendarType = 'calendar' | 'card';\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, computed, signal, effect } from '@angular/core';\r\nimport { XCalendarPrefix, XCalendarProperty } from './calendar.property';\r\nimport { XIsEmpty } from '@ng-nest/ui/core';\r\nimport { DatePipe, LowerCasePipe, NgClass, NgTemplateOutlet } from '@angular/common';\r\nimport { XI18nService, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { XLinkComponent } from '@ng-nest/ui/link';\r\nimport { XDatePickerComponent, XPickerDateComponent, XPickerMonthComponent } from '@ng-nest/ui/date-picker';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XRadioComponent } from '@ng-nest/ui/radio';\r\nimport { XTooltipDirective } from '@ng-nest/ui/tooltip';\r\nimport { map } from 'rxjs/operators';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\nimport type { XCalendarNode } from './calendar.property';\r\nimport type { XI18nCalendar } from '@ng-nest/ui/i18n';\r\n\r\n@Component({\r\n selector: `${XCalendarPrefix}`,\r\n imports: [\r\n NgClass,\r\n NgTemplateOutlet,\r\n DatePipe,\r\n FormsModule,\r\n XLinkComponent,\r\n XTooltipDirective,\r\n XRadioComponent,\r\n XDatePickerComponent,\r\n XPickerDateComponent,\r\n XPickerMonthComponent,\r\n XButtonComponent,\r\n XButtonsComponent\r\n ],\r\n templateUrl: './calendar.component.html',\r\n styleUrls: ['./calendar.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [DatePipe, LowerCasePipe]\r\n})\r\nexport class XCalendarComponent extends XCalendarProperty {\r\n private datePipe = inject(DatePipe);\r\n private lowerCasePipe = inject(LowerCasePipe);\r\n private i18n = inject(XI18nService);\r\n datetime = signal(new Date());\r\n activatedDate = signal(new Date());\r\n radioDataBase = [\r\n { label: '', id: 'month' },\r\n { label: '', id: 'year' }\r\n ];\r\n modelSignal = signal(this.model());\r\n\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.calendar as XI18nCalendar)), {\r\n initialValue: zh_CN.calendar\r\n });\r\n radioData = computed(() => {\r\n return this.radioDataBase.map((x) => {\r\n x.label = (this.locale() as any)[x.id];\r\n return x;\r\n });\r\n });\r\n classMap = computed(() => ({\r\n [`${XCalendarPrefix}-${this.displayType()}`]: !XIsEmpty(this.displayType())\r\n }));\r\n monthData = computed(() => {\r\n let dt: { [property: string]: XCalendarNode[] } = {};\r\n for (let key in this.data()) {\r\n let month = this.datePipe.transform(key, 'yyyy-MM') as string;\r\n let value = '';\r\n this.data()[key].forEach((x) => {\r\n value += `${x.id}${x.label} <br/>`;\r\n });\r\n let item = { id: key, label: value };\r\n if (dt[month]) {\r\n dt[month] = [...dt[month], item];\r\n } else {\r\n dt[month] = [item];\r\n }\r\n }\r\n\r\n return dt;\r\n });\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n this.modelSignal.set(this.model());\r\n });\r\n }\r\n\r\n action(next: number) {\r\n let datetime = new Date(this.datetime().getTime());\r\n if (this.modelSignal() === 'month') {\r\n datetime.setMonth(datetime.getMonth() + next);\r\n } else if (this.modelSignal() === 'year') {\r\n datetime.setFullYear(datetime.getFullYear() + next);\r\n }\r\n this.datetime.set(datetime);\r\n }\r\n\r\n getLocaleMonth(date: Date) {\r\n return (this.locale() as any)[this.lowerCasePipe.transform(this.datePipe.transform(date, 'LLLL') as string)];\r\n }\r\n\r\n dateOnChange(date: Date) {\r\n if (this.datePipe.transform(date, 'yyyy-MM-dd') !== this.datePipe.transform(this.activatedDate(), 'yyyy-MM-dd')) {\r\n this.activatedDate.set(date);\r\n this.dateChange.emit(this.activatedDate());\r\n }\r\n }\r\n\r\n rangeOnChange(range: Date[]) {\r\n this.rangeChange.emit(range);\r\n }\r\n\r\n getDate(date: Date): XCalendarNode[] {\r\n return this.data()?.[this.datePipe.transform(date, 'yyyy-MM-dd') as string];\r\n }\r\n\r\n getMonth(date: Date): XCalendarNode[] {\r\n return this.monthData()?.[this.datePipe.transform(date, 'yyyy-MM') as string];\r\n }\r\n}\r\n","<div #calendar class=\"x-calendar\" [ngClass]=\"classMap()\">\r\n <div class=\"x-calendar-header\">\r\n <div class=\"x-calendar-header-left\">\r\n @if (headerLeftTemp()) {\r\n <ng-container *ngTemplateOutlet=\"headerLeftTemp()!\"></ng-container>\r\n }\r\n </div>\r\n <div class=\"x-calendar-header-right\">\r\n <x-date-picker\r\n [(ngModel)]=\"datetime\"\r\n [type]=\"modelSignal()\"\r\n showHeader=\"false\"\r\n [clearable]=\"false\"\r\n ></x-date-picker>\r\n <x-buttons [boxShadow]=\"false\">\r\n <x-button (click)=\"action(-1)\" plain>{{\r\n modelSignal() === 'month' ? locale().lastMonth : locale().lastYear\r\n }}</x-button>\r\n <x-button (click)=\"action(1)\" plain>{{\r\n modelSignal() === 'month' ? locale().nextMonth : locale().nextYear\r\n }}</x-button>\r\n </x-buttons>\r\n <x-radio [data]=\"radioData()\" [(ngModel)]=\"modelSignal\" button></x-radio>\r\n </div>\r\n </div>\r\n <div class=\"x-calendar-body\">\r\n @if (modelSignal() === 'month') {\r\n <x-picker-date\r\n [display]=\"datetime()\"\r\n (modelChange)=\"dateOnChange($event!)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [dateTemp]=\"dateTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-date>\r\n }\r\n @if (modelSignal() === 'year') {\r\n <x-picker-month\r\n [display]=\"datetime()\"\r\n (modelChange)=\"dateOnChange($event!)\"\r\n (rangeChange)=\"rangeOnChange($event)\"\r\n [monthTemp]=\"monthTemp\"\r\n showHeader=\"false\"\r\n ></x-picker-month>\r\n }\r\n </div>\r\n</div>\r\n\r\n<ng-template #dateTemp let-date=\"date$\">\r\n <div class=\"x-calendar-date\" [class.x-activated]=\"(date | date: 'yyyyMMdd') === (activatedDate() | date: 'yyyyMMdd')\">\r\n <span [title]=\"date | date: 'yyyy-MM-dd'\">{{ date | date: 'd' }}</span>\r\n @if (displayType() === 'calendar') {\r\n <div class=\"x-calendar-date-content\">\r\n @if (getDate(date)) {\r\n <ul>\r\n @for (item of getDate(date); track item.id + item.label) {\r\n <li>\r\n <span [title]=\"item.id + item.label\">{{ item.id }}{{ item.label }}</span>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #monthTemp let-date=\"date$\">\r\n <div class=\"x-calendar-month\" [class.x-activated]=\"(date | date: 'yyyyMM') === (activatedDate() | date: 'yyyyMM')\">\r\n <span [title]=\"date | date: 'yyyy-MM'\">{{ getLocaleMonth(date) }}</span>\r\n @if (displayType() === 'calendar') {\r\n <div class=\"x-calendar-month-content\">\r\n @if (getMonth(date)) {\r\n <ul>\r\n @for (item of getMonth(date); track item.id) {\r\n <li>\r\n <x-link x-tooltip [content]=\"item.label\" placement=\"top\">{{ item.id }}</x-link>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCalendarComponent } from './calendar.component';\r\n\r\n@NgModule({\r\n exports: [XCalendarComponent],\r\n imports: [XCalendarComponent]\r\n})\r\nexport class XCalendarModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,eAAe,GAAG;AAC/B,MAAM,sBAAsB,GAAG,UAAU;AAEzC;;AAEG;MAEU,iBAAkB,SAAQ,iBAAiB,CAAC,sBAAsB,CAAC,CAAA;AADhF,IAAA,WAAA,GAAA;;AAEE;;;;;;;;;AASG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,EAAE,gDAAC;AACxC;;;;;;;;;;AAUG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAiB,OAAO,iDAAC;AAC/C;;;;;;;;;;AAUG;AACM,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgB,UAAU,uDAAC;AACvD;;;;;;;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YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,OAAO,EAAE,CAAC,kBAAkB;AAC7B,iBAAA;;;ACND;;AAEG;;;;"}
@@ -27,7 +27,7 @@ class XCardProperty extends XPropertyFunction(X_CARD_CONFIG_NAME) {
27
27
  * ```
28
28
  *
29
29
  */
30
- this.width = input('', { transform: XToCssPixelValue });
30
+ this.width = input('', ...(ngDevMode ? [{ debugName: "width", transform: XToCssPixelValue }] : [{ transform: XToCssPixelValue }]));
31
31
  /**
32
32
  * @zh_CN 内容样式
33
33
  * @en_US Content style
@@ -38,7 +38,7 @@ class XCardProperty extends XPropertyFunction(X_CARD_CONFIG_NAME) {
38
38
  * ```
39
39
  *
40
40
  */
41
- this.bodyStyle = input({});
41
+ this.bodyStyle = input({}, ...(ngDevMode ? [{ debugName: "bodyStyle" }] : []));
42
42
  /**
43
43
  * @zh_CN 头部模板
44
44
  * @en_US Head template
@@ -55,7 +55,7 @@ class XCardProperty extends XPropertyFunction(X_CARD_CONFIG_NAME) {
55
55
  * ```
56
56
  *
57
57
  */
58
- this.header = input();
58
+ this.header = input(...(ngDevMode ? [undefined, { debugName: "header" }] : []));
59
59
  /**
60
60
  * @zh_CN 阴影显示方式
61
61
  * @en_US Shadow display method
@@ -68,12 +68,12 @@ class XCardProperty extends XPropertyFunction(X_CARD_CONFIG_NAME) {
68
68
  * ```
69
69
  *
70
70
  */
71
- this.shadow = input(this.config?.shadow ?? 'always');
71
+ this.shadow = input(this.config?.shadow ?? 'always', ...(ngDevMode ? [{ debugName: "shadow" }] : []));
72
72
  }
73
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCardProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
74
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.0", type: XCardProperty, isStandalone: true, selector: "x-card-property", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, bodyStyle: { classPropertyName: "bodyStyle", publicName: "bodyStyle", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
73
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCardProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
74
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.0", type: XCardProperty, isStandalone: true, selector: "x-card-property", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, bodyStyle: { classPropertyName: "bodyStyle", publicName: "bodyStyle", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
75
75
  }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCardProperty, decorators: [{
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCardProperty, decorators: [{
77
77
  type: Component,
78
78
  args: [{ selector: `${XCardPrefix}-property`, template: '' }]
79
79
  }] });
@@ -83,22 +83,22 @@ class XCardComponent extends XCardProperty {
83
83
  super(...arguments);
84
84
  this.classMap = computed(() => ({
85
85
  [`${XCardPrefix}-${this.shadow()}`]: !XIsEmpty(this.shadow())
86
- }));
86
+ }), ...(ngDevMode ? [{ debugName: "classMap" }] : []));
87
87
  }
88
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
89
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: XCardComponent, isStandalone: true, selector: "x-card", usesInheritance: true, ngImport: i0, template: "<div #card class=\"x-card\" [ngClass]=\"classMap()\" [style.width]=\"width()\">\r\n @if (header()) {\r\n <div class=\"x-card-header\">\r\n <ng-container *xOutlet=\"header()\">{{ header() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-card-body\" [ngStyle]=\"bodyStyle()\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [".x-card{margin:0;padding:0}.x-card{font-size:var(--x-font-size);box-sizing:border-box;position:relative;border-radius:var(--x-border-radius);transition:box-shadow .3s}.x-card-always,.x-card-hover:hover{box-shadow:var(--x-box-shadow)}.x-card-header{display:flex;align-items:center;justify-content:space-between;padding:.675rem;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-card-body{padding:var(--x-font-size);width:100%}.x-card-body>ul li:not(:last-child){margin-bottom:var(--x-font-size)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
88
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
89
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: XCardComponent, isStandalone: true, selector: "x-card", usesInheritance: true, ngImport: i0, template: "<div #card class=\"x-card\" [ngClass]=\"classMap()\" [style.width]=\"width()\">\r\n @if (header()) {\r\n <div class=\"x-card-header\">\r\n <ng-container *xOutlet=\"header()\">{{ header() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-card-body\" [ngStyle]=\"bodyStyle()\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [".x-card{margin:0;padding:0}.x-card{font-size:var(--x-font-size);box-sizing:border-box;position:relative;border-radius:var(--x-border-radius);transition:box-shadow .3s}.x-card-always,.x-card-hover:hover{box-shadow:var(--x-box-shadow)}.x-card-header{display:flex;align-items:center;justify-content:space-between;padding:.675rem;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-card-body{padding:var(--x-font-size);width:100%}.x-card-body>ul li:not(:last-child){margin-bottom:var(--x-font-size)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
90
90
  }
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCardComponent, decorators: [{
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCardComponent, decorators: [{
92
92
  type: Component,
93
93
  args: [{ selector: `${XCardPrefix}`, imports: [NgClass, NgStyle, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #card class=\"x-card\" [ngClass]=\"classMap()\" [style.width]=\"width()\">\r\n @if (header()) {\r\n <div class=\"x-card-header\">\r\n <ng-container *xOutlet=\"header()\">{{ header() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-card-body\" [ngStyle]=\"bodyStyle()\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [".x-card{margin:0;padding:0}.x-card{font-size:var(--x-font-size);box-sizing:border-box;position:relative;border-radius:var(--x-border-radius);transition:box-shadow .3s}.x-card-always,.x-card-hover:hover{box-shadow:var(--x-box-shadow)}.x-card-header{display:flex;align-items:center;justify-content:space-between;padding:.675rem;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-card-body{padding:var(--x-font-size);width:100%}.x-card-body>ul li:not(:last-child){margin-bottom:var(--x-font-size)}\n"] }]
94
94
  }] });
95
95
 
96
96
  class XCardModule {
97
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
98
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: XCardModule, imports: [XCardComponent], exports: [XCardComponent] }); }
99
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCardModule }); }
97
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
98
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: XCardModule, imports: [XCardComponent], exports: [XCardComponent] }); }
99
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCardModule }); }
100
100
  }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: XCardModule, decorators: [{
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XCardModule, decorators: [{
102
102
  type: NgModule,
103
103
  args: [{
104
104
  exports: [XCardComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-card.mjs","sources":["../../../../lib/ng-nest/ui/card/card.property.ts","../../../../lib/ng-nest/ui/card/card.component.ts","../../../../lib/ng-nest/ui/card/card.component.html","../../../../lib/ng-nest/ui/card/card.module.ts","../../../../lib/ng-nest/ui/card/ng-nest-ui-card.ts"],"sourcesContent":["import { XPropertyFunction, XToCssPixelValue } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport type { XTemplate, XNumber, XShadow } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Card\r\n * @selector x-card\r\n * @decorator component\r\n */\r\nexport const XCardPrefix = 'x-card';\r\nconst X_CARD_CONFIG_NAME = 'card';\r\n\r\n/**\r\n * Card Property\r\n */\r\n@Component({ selector: `${XCardPrefix}-property`, template: '' })\r\nexport class XCardProperty extends XPropertyFunction(X_CARD_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 卡片宽度\r\n * @en_US Card width\r\n * @example\r\n *\r\n * ```html\r\n * <x-card width=\"20rem\">Card</div>\r\n * ```\r\n *\r\n */\r\n readonly width = input<string, XNumber>('', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 内容样式\r\n * @en_US Content style\r\n * @example\r\n *\r\n * ```html\r\n * <x-card [bodyStyle]=\"{ padding: 0 }\">Card</div>\r\n * ```\r\n *\r\n */\r\n readonly bodyStyle = input<XCardBodyStyle>({});\r\n /**\r\n * @zh_CN 头部模板\r\n * @en_US Head template\r\n * @example\r\n *\r\n * ```html\r\n * <x-card width=\"20rem\" [header]=\"header\">\r\n * <ng-template #header>\r\n * <span>Title</span>\r\n * <x-button type=\"text\">action</x-button>\r\n * </ng-template>\r\n * Card\r\n * </x-card>\r\n * ```\r\n *\r\n */\r\n readonly header = input<XTemplate>();\r\n /**\r\n * @zh_CN 阴影显示方式\r\n * @en_US Shadow display method\r\n * @example\r\n *\r\n * ```html\r\n * <x-card shadow=\"always\">Always</x-card>\r\n * <x-card shadow=\"hover\">Hover</x-card>\r\n * <x-card shadow=\"never\">Never</x-card>\r\n * ```\r\n *\r\n */\r\n readonly shadow = input<XCardShadow>(this.config?.shadow ?? 'always');\r\n}\r\n\r\n/**\r\n * @zh_CN 阴影显示配置\r\n * @en_US Shadow display configuration\r\n */\r\nexport type XCardShadow = XShadow;\r\n\r\n/**\r\n * @zh_CN 卡片内容样式类型\r\n * @en_US Card content style type\r\n */\r\nexport type XCardBodyStyle = { [property: string]: XNumber };\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, computed } from '@angular/core';\r\nimport { XCardPrefix, XCardProperty } from './card.property';\r\nimport { XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { NgClass, NgStyle } from '@angular/common';\r\n\r\n@Component({\r\n selector: `${XCardPrefix}`,\r\n imports: [NgClass, NgStyle, XOutletDirective],\r\n templateUrl: './card.component.html',\r\n styleUrls: ['./card.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCardComponent extends XCardProperty {\r\n classMap = computed(() => ({\r\n [`${XCardPrefix}-${this.shadow()}`]: !XIsEmpty(this.shadow())\r\n }));\r\n}\r\n","<div #card class=\"x-card\" [ngClass]=\"classMap()\" [style.width]=\"width()\">\r\n @if (header()) {\r\n <div class=\"x-card-header\">\r\n <ng-container *xOutlet=\"header()\">{{ header() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-card-body\" [ngStyle]=\"bodyStyle()\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCardComponent } from './card.component';\r\n\r\n@NgModule({\r\n exports: [XCardComponent],\r\n imports: [XCardComponent]\r\n})\r\nexport class XCard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,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAX,WAAW,EAAA,OAAA,EAAA,CAFZ,cAAc,CAAA,EAAA,OAAA,EAAA,CADd,cAAc,CAAA,EAAA,CAAA,CAAA;kIAGb,WAAW,EAAA,CAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc;AACzB,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-card.mjs","sources":["../../../../lib/ng-nest/ui/card/card.property.ts","../../../../lib/ng-nest/ui/card/card.component.ts","../../../../lib/ng-nest/ui/card/card.component.html","../../../../lib/ng-nest/ui/card/card.module.ts","../../../../lib/ng-nest/ui/card/ng-nest-ui-card.ts"],"sourcesContent":["import { XPropertyFunction, XToCssPixelValue } from '@ng-nest/ui/core';\r\nimport { Component, input } from '@angular/core';\r\nimport type { XTemplate, XNumber, XShadow } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Card\r\n * @selector x-card\r\n * @decorator component\r\n */\r\nexport const XCardPrefix = 'x-card';\r\nconst X_CARD_CONFIG_NAME = 'card';\r\n\r\n/**\r\n * Card Property\r\n */\r\n@Component({ selector: `${XCardPrefix}-property`, template: '' })\r\nexport class XCardProperty extends XPropertyFunction(X_CARD_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 卡片宽度\r\n * @en_US Card width\r\n * @example\r\n *\r\n * ```html\r\n * <x-card width=\"20rem\">Card</div>\r\n * ```\r\n *\r\n */\r\n readonly width = input<string, XNumber>('', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 内容样式\r\n * @en_US Content style\r\n * @example\r\n *\r\n * ```html\r\n * <x-card [bodyStyle]=\"{ padding: 0 }\">Card</div>\r\n * ```\r\n *\r\n */\r\n readonly bodyStyle = input<XCardBodyStyle>({});\r\n /**\r\n * @zh_CN 头部模板\r\n * @en_US Head template\r\n * @example\r\n *\r\n * ```html\r\n * <x-card width=\"20rem\" [header]=\"header\">\r\n * <ng-template #header>\r\n * <span>Title</span>\r\n * <x-button type=\"text\">action</x-button>\r\n * </ng-template>\r\n * Card\r\n * </x-card>\r\n * ```\r\n *\r\n */\r\n readonly header = input<XTemplate>();\r\n /**\r\n * @zh_CN 阴影显示方式\r\n * @en_US Shadow display method\r\n * @example\r\n *\r\n * ```html\r\n * <x-card shadow=\"always\">Always</x-card>\r\n * <x-card shadow=\"hover\">Hover</x-card>\r\n * <x-card shadow=\"never\">Never</x-card>\r\n * ```\r\n *\r\n */\r\n readonly shadow = input<XCardShadow>(this.config?.shadow ?? 'always');\r\n}\r\n\r\n/**\r\n * @zh_CN 阴影显示配置\r\n * @en_US Shadow display configuration\r\n */\r\nexport type XCardShadow = XShadow;\r\n\r\n/**\r\n * @zh_CN 卡片内容样式类型\r\n * @en_US Card content style type\r\n */\r\nexport type XCardBodyStyle = { [property: string]: XNumber };\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, computed } from '@angular/core';\r\nimport { XCardPrefix, XCardProperty } from './card.property';\r\nimport { XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { NgClass, NgStyle } from '@angular/common';\r\n\r\n@Component({\r\n selector: `${XCardPrefix}`,\r\n imports: [NgClass, NgStyle, XOutletDirective],\r\n templateUrl: './card.component.html',\r\n styleUrls: ['./card.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XCardComponent extends XCardProperty {\r\n classMap = computed(() => ({\r\n [`${XCardPrefix}-${this.shadow()}`]: !XIsEmpty(this.shadow())\r\n }));\r\n}\r\n","<div #card class=\"x-card\" [ngClass]=\"classMap()\" [style.width]=\"width()\">\r\n @if (header()) {\r\n <div class=\"x-card-header\">\r\n <ng-container *xOutlet=\"header()\">{{ header() }}</ng-container>\r\n </div>\r\n }\r\n <div class=\"x-card-body\" [ngStyle]=\"bodyStyle()\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XCardComponent } from './card.component';\r\n\r\n@NgModule({\r\n exports: [XCardComponent],\r\n imports: [XCardComponent]\r\n})\r\nexport class XCardModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIA;;;;AAIG;AACI,MAAM,WAAW,GAAG;AAC3B,MAAM,kBAAkB,GAAG,MAAM;AAEjC;;AAEG;MAEU,aAAc,SAAQ,iBAAiB,CAAC,kBAAkB,CAAC,CAAA;AADxE,IAAA,WAAA,GAAA;;AAEE;;;;;;;;;AASG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAkB,EAAE,yCAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;AAC5E;;;;;;;;;AASG;AACM,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAiB,EAAE,qDAAC;AAC9C;;;;;;;;;;;;;;;AAeG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;AACpC;;;;;;;;;;;AAWG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK,CAAc,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,QAAQ,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AACtE,IAAA;iIArDY,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,uBAA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