@ng-nest/ui 21.0.13 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/fesm2022/ng-nest-ui-affix.mjs +12 -12
  2. package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
  3. package/fesm2022/ng-nest-ui-alert.mjs +46 -34
  4. package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
  5. package/fesm2022/ng-nest-ui-anchor.mjs +43 -31
  6. package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
  7. package/fesm2022/ng-nest-ui-api.mjs +7 -7
  8. package/fesm2022/ng-nest-ui-attachments.mjs +74 -48
  9. package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -1
  10. package/fesm2022/ng-nest-ui-auto-complete.mjs +114 -70
  11. package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
  12. package/fesm2022/ng-nest-ui-avatar.mjs +47 -32
  13. package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
  14. package/fesm2022/ng-nest-ui-back-top.mjs +23 -18
  15. package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
  16. package/fesm2022/ng-nest-ui-badge.mjs +30 -23
  17. package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
  18. package/fesm2022/ng-nest-ui-base-form.mjs +75 -44
  19. package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
  20. package/fesm2022/ng-nest-ui-bubble.mjs +76 -48
  21. package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
  22. package/fesm2022/ng-nest-ui-button.mjs +53 -42
  23. package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
  24. package/fesm2022/ng-nest-ui-calendar.mjs +30 -20
  25. package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
  26. package/fesm2022/ng-nest-ui-card.mjs +21 -16
  27. package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
  28. package/fesm2022/ng-nest-ui-carousel.mjs +68 -46
  29. package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
  30. package/fesm2022/ng-nest-ui-cascade.mjs +121 -73
  31. package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
  32. package/fesm2022/ng-nest-ui-checkbox.mjs +54 -38
  33. package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
  34. package/fesm2022/ng-nest-ui-collapse.mjs +38 -30
  35. package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
  36. package/fesm2022/ng-nest-ui-color-picker.mjs +119 -72
  37. package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
  38. package/fesm2022/ng-nest-ui-color.mjs +22 -16
  39. package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
  40. package/fesm2022/ng-nest-ui-comment.mjs +23 -21
  41. package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
  42. package/fesm2022/ng-nest-ui-container.mjs +40 -37
  43. package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
  44. package/fesm2022/ng-nest-ui-contextmenu.mjs +71 -45
  45. package/fesm2022/ng-nest-ui-contextmenu.mjs.map +1 -1
  46. package/fesm2022/ng-nest-ui-core.mjs +24 -21
  47. package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
  48. package/fesm2022/ng-nest-ui-coversations.mjs +25 -18
  49. package/fesm2022/ng-nest-ui-coversations.mjs.map +1 -1
  50. package/fesm2022/ng-nest-ui-crumb.mjs +15 -13
  51. package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
  52. package/fesm2022/ng-nest-ui-date-picker.mjs +425 -256
  53. package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
  54. package/fesm2022/ng-nest-ui-description.mjs +42 -31
  55. package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
  56. package/fesm2022/ng-nest-ui-dialog.mjs +106 -82
  57. package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
  58. package/fesm2022/ng-nest-ui-divider.mjs +24 -17
  59. package/fesm2022/ng-nest-ui-divider.mjs.map +1 -1
  60. package/fesm2022/ng-nest-ui-doc.mjs +7 -7
  61. package/fesm2022/ng-nest-ui-drag.mjs +10 -10
  62. package/fesm2022/ng-nest-ui-drawer.mjs +52 -43
  63. package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
  64. package/fesm2022/ng-nest-ui-dropdown.mjs +94 -58
  65. package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
  66. package/fesm2022/ng-nest-ui-empty.mjs +14 -12
  67. package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
  68. package/fesm2022/ng-nest-ui-examples.mjs +7 -7
  69. package/fesm2022/ng-nest-ui-find.mjs +111 -71
  70. package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
  71. package/fesm2022/ng-nest-ui-form.mjs +45 -33
  72. package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
  73. package/fesm2022/ng-nest-ui-highlight.mjs +26 -20
  74. package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
  75. package/fesm2022/ng-nest-ui-i18n.mjs +16 -15
  76. package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
  77. package/fesm2022/ng-nest-ui-icon.mjs +28 -21
  78. package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
  79. package/fesm2022/ng-nest-ui-image.mjs +57 -51
  80. package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
  81. package/fesm2022/ng-nest-ui-inner.mjs +11 -11
  82. package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
  83. package/fesm2022/ng-nest-ui-input-number.mjs +63 -42
  84. package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
  85. package/fesm2022/ng-nest-ui-input.mjs +130 -85
  86. package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
  87. package/fesm2022/ng-nest-ui-keyword.mjs +19 -15
  88. package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
  89. package/fesm2022/ng-nest-ui-layout.mjs +37 -31
  90. package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
  91. package/fesm2022/ng-nest-ui-link.mjs +23 -18
  92. package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
  93. package/fesm2022/ng-nest-ui-list.mjs +137 -89
  94. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  95. package/fesm2022/ng-nest-ui-loading.mjs +36 -25
  96. package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
  97. package/fesm2022/ng-nest-ui-menu.mjs +68 -45
  98. package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
  99. package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
  100. package/fesm2022/ng-nest-ui-message.mjs +10 -10
  101. package/fesm2022/ng-nest-ui-notification.mjs +10 -10
  102. package/fesm2022/ng-nest-ui-outlet.mjs +11 -9
  103. package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
  104. package/fesm2022/ng-nest-ui-page-header.mjs +20 -15
  105. package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
  106. package/fesm2022/ng-nest-ui-pagination.mjs +69 -48
  107. package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
  108. package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
  109. package/fesm2022/ng-nest-ui-popconfirm.mjs +40 -27
  110. package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
  111. package/fesm2022/ng-nest-ui-popover.mjs +57 -38
  112. package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
  113. package/fesm2022/ng-nest-ui-portal.mjs +7 -7
  114. package/fesm2022/ng-nest-ui-progress.mjs +60 -41
  115. package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
  116. package/fesm2022/ng-nest-ui-prompts.mjs +18 -15
  117. package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
  118. package/fesm2022/ng-nest-ui-radio.mjs +50 -35
  119. package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
  120. package/fesm2022/ng-nest-ui-rate.mjs +43 -29
  121. package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
  122. package/fesm2022/ng-nest-ui-resizable.mjs +18 -16
  123. package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
  124. package/fesm2022/ng-nest-ui-result.mjs +22 -16
  125. package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
  126. package/fesm2022/ng-nest-ui-ripple.mjs +14 -13
  127. package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
  128. package/fesm2022/ng-nest-ui-scrollable.mjs +41 -24
  129. package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
  130. package/fesm2022/ng-nest-ui-select.mjs +197 -118
  131. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  132. package/fesm2022/ng-nest-ui-sender.mjs +43 -31
  133. package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
  134. package/fesm2022/ng-nest-ui-skeleton.mjs +17 -15
  135. package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
  136. package/fesm2022/ng-nest-ui-slider-select.mjs +85 -53
  137. package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
  138. package/fesm2022/ng-nest-ui-slider.mjs +58 -37
  139. package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
  140. package/fesm2022/ng-nest-ui-splitter.mjs +32 -24
  141. package/fesm2022/ng-nest-ui-splitter.mjs.map +1 -1
  142. package/fesm2022/ng-nest-ui-statistic.mjs +44 -30
  143. package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
  144. package/fesm2022/ng-nest-ui-steps.mjs +30 -22
  145. package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
  146. package/fesm2022/ng-nest-ui-suggestion.mjs +23 -20
  147. package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -1
  148. package/fesm2022/ng-nest-ui-switch.mjs +35 -25
  149. package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
  150. package/fesm2022/ng-nest-ui-table-view.mjs +78 -69
  151. package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
  152. package/fesm2022/ng-nest-ui-table.mjs +320 -205
  153. package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
  154. package/fesm2022/ng-nest-ui-tabs.mjs +74 -56
  155. package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
  156. package/fesm2022/ng-nest-ui-tag.mjs +30 -23
  157. package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
  158. package/fesm2022/ng-nest-ui-text-retract.mjs +19 -15
  159. package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
  160. package/fesm2022/ng-nest-ui-textarea.mjs +69 -44
  161. package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
  162. package/fesm2022/ng-nest-ui-theme.mjs +34 -23
  163. package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
  164. package/fesm2022/ng-nest-ui-thought-chain.mjs +26 -19
  165. package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -1
  166. package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
  167. package/fesm2022/ng-nest-ui-time-picker.mjs +164 -96
  168. package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
  169. package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
  170. package/fesm2022/ng-nest-ui-timeline.mjs +26 -19
  171. package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
  172. package/fesm2022/ng-nest-ui-tooltip.mjs +53 -35
  173. package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
  174. package/fesm2022/ng-nest-ui-transfer.mjs +66 -40
  175. package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
  176. package/fesm2022/ng-nest-ui-tree-file.mjs +39 -28
  177. package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
  178. package/fesm2022/ng-nest-ui-tree-select.mjs +186 -111
  179. package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
  180. package/fesm2022/ng-nest-ui-tree.mjs +166 -105
  181. package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
  182. package/fesm2022/ng-nest-ui-typography.mjs +16 -13
  183. package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
  184. package/fesm2022/ng-nest-ui-upload.mjs +81 -53
  185. package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
  186. package/fesm2022/ng-nest-ui-watermark.mjs +45 -35
  187. package/fesm2022/ng-nest-ui-watermark.mjs.map +1 -1
  188. package/fesm2022/ng-nest-ui-welcome.mjs +22 -16
  189. package/fesm2022/ng-nest-ui-welcome.mjs.map +1 -1
  190. package/package.json +3 -2
  191. package/types/ng-nest-ui-base-form.d.ts +3 -3
  192. package/types/ng-nest-ui-carousel.d.ts +1 -1
  193. package/types/ng-nest-ui-container.d.ts +1 -1
  194. package/types/ng-nest-ui-core.d.ts +1 -1
  195. package/types/ng-nest-ui-dialog.d.ts +1 -1
  196. package/types/ng-nest-ui-drawer.d.ts +1 -1
  197. package/types/ng-nest-ui-form.d.ts +12 -12
  198. package/types/ng-nest-ui-layout.d.ts +1 -1
  199. package/types/ng-nest-ui-list.d.ts +1 -1
  200. package/types/ng-nest-ui-portal.d.ts +3 -3
  201. package/types/ng-nest-ui-table-view.d.ts +1 -1
  202. package/types/ng-nest-ui-table.d.ts +1 -1
  203. package/types/ng-nest-ui-tabs.d.ts +1 -1
  204. package/types/ng-nest-ui-tree.d.ts +1 -1
@@ -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,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,GA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AA,CAAA;AAGlC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,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;iFAAC;AAClE;;;;;;;;;;;AAWG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE;iFAAC;AACjC;;;;;;;;;;AAUG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE;kFAAC;AAClC;;;;;;;;;;;;;AAaG;QACM,IAAA,CAAA,SAAS,GAAG,KAAK,CAAa,KAAK;sFAAC;AAC7C;;;;;;;;;;AAUG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAkB,CAAC,gFAAI,SAAS,EAAE,SAAS,EAAA,CAAG;AACvE;;;;;;;;;;;;;;AAcG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAQ,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,QAAQ;iFAAC;AAC3D;;;;;;;;;;;AAWG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAoB,KAAK,gFAAI,SAAS,EAAE,UAAU,EAAA,CAAG;AAC9E;;;;;;;;;;;AAWG;QACM,IAAA,CAAA,SAAS,GAAG,KAAK,CAAoB,KAAK,i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AAA,CAAA,EAAA,UAAA,EAAA,CAAA;sBAM3E,WAAW;uBAAC,kBAAkB;;sBAG9B,WAAW;uBAAC,mBAAmB;;sBAG/B,WAAW;uBAAC,qBAAqB;;;MErCvB,aAAa,CAAA;iIAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAFd,gBAAgB,EAAE,iBAAiB,CAAA,EAAA,OAAA,EAAA,CADnC,gBAAgB,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAGlC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,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;;;;"}
@@ -36,7 +36,8 @@ class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {
36
36
  * ```
37
37
  *
38
38
  */
39
- this.data = input({}, ...(ngDevMode ? [{ debugName: "data" }] : []));
39
+ this.data = input({}, /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
40
41
  /**
41
42
  * @zh_CN 显示模式
42
43
  * @en_US Display mode
@@ -48,7 +49,8 @@ class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {
48
49
  * ```
49
50
  *
50
51
  */
51
- this.model = input('month', ...(ngDevMode ? [{ debugName: "model" }] : []));
52
+ this.model = input('month', /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
52
54
  /**
53
55
  * @zh_CN 显示类型
54
56
  * @en_US Display type
@@ -60,7 +62,8 @@ class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {
60
62
  * ```
61
63
  *
62
64
  */
63
- this.displayType = input('calendar', ...(ngDevMode ? [{ debugName: "displayType" }] : []));
65
+ this.displayType = input('calendar', /* @ts-ignore */
66
+ ...(ngDevMode ? [{ debugName: "displayType" }] : /* istanbul ignore next */ []));
64
67
  /**
65
68
  * @zh_CN 头部显示模版
66
69
  * @en_US Head display template
@@ -72,7 +75,8 @@ class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {
72
75
  * ```
73
76
  *
74
77
  */
75
- this.headerLeftTemp = input(...(ngDevMode ? [undefined, { debugName: "headerLeftTemp" }] : []));
78
+ this.headerLeftTemp = input(/* @ts-ignore */
79
+ ...(ngDevMode ? [undefined, { debugName: "headerLeftTemp" }] : /* istanbul ignore next */ []));
76
80
  /**
77
81
  * @zh_CN 选择日期变化的事件
78
82
  * @en_US Select the event of the date change
@@ -112,10 +116,10 @@ class XCalendarProperty extends XPropertyFunction(X_CALENDAR_CONFIG_NAME) {
112
116
  */
113
117
  this.rangeChange = output();
114
118
  }
115
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCalendarProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
116
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", 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 }); }
119
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCalendarProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
120
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", 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
121
  }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCalendarProperty, decorators: [{
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCalendarProperty, decorators: [{
119
123
  type: Component,
120
124
  args: [{ selector: `${XCalendarPrefix}-property`, template: '' }]
121
125
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }], displayType: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayType", required: false }] }], headerLeftTemp: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerLeftTemp", required: false }] }], dateChange: [{ type: i0.Output, args: ["dateChange"] }], rangeChange: [{ type: i0.Output, args: ["rangeChange"] }] } });
@@ -126,13 +130,16 @@ class XCalendarComponent extends XCalendarProperty {
126
130
  this.datePipe = inject(DatePipe);
127
131
  this.lowerCasePipe = inject(LowerCasePipe);
128
132
  this.i18n = inject(XI18nService);
129
- this.datetime = signal(new Date(), ...(ngDevMode ? [{ debugName: "datetime" }] : []));
130
- this.activatedDate = signal(new Date(), ...(ngDevMode ? [{ debugName: "activatedDate" }] : []));
133
+ this.datetime = signal(new Date(), /* @ts-ignore */
134
+ ...(ngDevMode ? [{ debugName: "datetime" }] : /* istanbul ignore next */ []));
135
+ this.activatedDate = signal(new Date(), /* @ts-ignore */
136
+ ...(ngDevMode ? [{ debugName: "activatedDate" }] : /* istanbul ignore next */ []));
131
137
  this.radioDataBase = [
132
138
  { label: '', id: 'month' },
133
139
  { label: '', id: 'year' }
134
140
  ];
135
- this.modelSignal = signal(this.model(), ...(ngDevMode ? [{ debugName: "modelSignal" }] : []));
141
+ this.modelSignal = signal(this.model(), /* @ts-ignore */
142
+ ...(ngDevMode ? [{ debugName: "modelSignal" }] : /* istanbul ignore next */ []));
136
143
  this.locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.calendar)), {
137
144
  initialValue: zh_CN.calendar
138
145
  });
@@ -141,10 +148,12 @@ class XCalendarComponent extends XCalendarProperty {
141
148
  x.label = this.locale()[x.id];
142
149
  return x;
143
150
  });
144
- }, ...(ngDevMode ? [{ debugName: "radioData" }] : []));
151
+ }, /* @ts-ignore */
152
+ ...(ngDevMode ? [{ debugName: "radioData" }] : /* istanbul ignore next */ []));
145
153
  this.classMap = computed(() => ({
146
154
  [`${XCalendarPrefix}-${this.displayType()}`]: !XIsEmpty(this.displayType())
147
- }), ...(ngDevMode ? [{ debugName: "classMap" }] : []));
155
+ }), /* @ts-ignore */
156
+ ...(ngDevMode ? [{ debugName: "classMap" }] : /* istanbul ignore next */ []));
148
157
  this.monthData = computed(() => {
149
158
  let dt = {};
150
159
  for (let key in this.data()) {
@@ -162,7 +171,8 @@ class XCalendarComponent extends XCalendarProperty {
162
171
  }
163
172
  }
164
173
  return dt;
165
- }, ...(ngDevMode ? [{ debugName: "monthData" }] : []));
174
+ }, /* @ts-ignore */
175
+ ...(ngDevMode ? [{ debugName: "monthData" }] : /* istanbul ignore next */ []));
166
176
  effect(() => {
167
177
  this.modelSignal.set(this.model());
168
178
  });
@@ -195,10 +205,10 @@ class XCalendarComponent extends XCalendarProperty {
195
205
  getMonth(date) {
196
206
  return this.monthData()?.[this.datePipe.transform(date, 'yyyy-MM')];
197
207
  }
198
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
199
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", 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 }); }
208
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
209
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", 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
210
  }
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCalendarComponent, decorators: [{
211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCalendarComponent, decorators: [{
202
212
  type: Component,
203
213
  args: [{ selector: `${XCalendarPrefix}`, imports: [
204
214
  NgClass,
@@ -217,11 +227,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
217
227
  }], ctorParameters: () => [] });
218
228
 
219
229
  class XCalendarModule {
220
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
221
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: XCalendarModule, imports: [XCalendarComponent], exports: [XCalendarComponent] }); }
222
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCalendarModule, imports: [XCalendarComponent] }); }
230
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
231
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XCalendarModule, imports: [XCalendarComponent], exports: [XCalendarComponent] }); }
232
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCalendarModule, imports: [XCalendarComponent] }); }
223
233
  }
224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCalendarModule, decorators: [{
234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCalendarModule, decorators: [{
225
235
  type: NgModule,
226
236
  args: [{
227
237
  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,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;;;;;;;;;;AAUG;QACM,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAoB;AACnD;;;;;;;;;;;;;;;;;AAiBG;QACM,IAAA,CAAA,UAAU,GAAG,MAAM,EAAQ;AACpC;;;;;;;;;;;;;;;;;AAiBG;QACM,IAAA,CAAA,WAAW,GAAG,MAAM,EAA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BAtB9B,SAAS;+BACE,CAAA,EAAG,eAAe,EAAE,EAAA,OAAA,EACrB;wBACP,OAAO;wBACP,gBAAgB;wBAChB,QAAQ;wBACR,WAAW;wBACX,cAAc;wBACd,iBAAiB;wBACjB,eAAe;wBACf,oBAAoB;wBACpB,oBAAoB;wBACpB,qBAAqB;wBACrB,gBAAgB;wBAChB;AACD,qBAAA,EAAA,aAAA,EAGc,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,6jGAAA,EAAA,MAAA,EAAA,CAAA,8wQAAA,CAAA,EAAA;;;ME7BzB,eAAe,CAAA;iIAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAf,eAAe,EAAA,OAAA,EAAA,CAFhB,kBAAkB,CAAA,EAAA,OAAA,EAAA,CADlB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGjB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFhB,kBAAkB,CAAA,EAAA,CAAA,CAAA;;2FAEjB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,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;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,EAAE;iFAAC;AACxC;;;;;;;;;;AAUG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAiB,OAAO;kFAAC;AAC/C;;;;;;;;;;AAUG;QACM,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgB,UAAU;wFAAC;AACvD;;;;;;;;;;AAUG;AACM,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK;sGAAoB;AACnD;;;;;;;;;;;;;;;;;AAiBG;QACM,IAAA,CAAA,UAAU,GAAG,MAAM,EAAQ;AACpC;;;;;;;;;;;;;;;;;AAiBG;QACM,IAAA,CAAA,WAAW,GAAG,MAAM,EAAU;AACxC,IAAA;iIAtFY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,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wBACX,cAAc;wBACd,iBAAiB;wBACjB,eAAe;wBACf,oBAAoB;wBACpB,oBAAoB;wBACpB,qBAAqB;wBACrB,gBAAgB;wBAChB;AACD,qBAAA,EAAA,aAAA,EAGc,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,6jGAAA,EAAA,MAAA,EAAA,CAAA,8wQAAA,CAAA,EAAA;;;ME7BzB,eAAe,CAAA;iIAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAf,eAAe,EAAA,OAAA,EAAA,CAFhB,kBAAkB,CAAA,EAAA,OAAA,EAAA,CADlB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGjB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFhB,kBAAkB,CAAA,EAAA,CAAA,CAAA;;2FAEjB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,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('', { ...(ngDevMode ? { debugName: "width" } : {}), transform: XToCssPixelValue });
30
+ this.width = input('', { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
31
31
  /**
32
32
  * @zh_CN 内容样式
33
33
  * @en_US Content style
@@ -38,7 +38,8 @@ class XCardProperty extends XPropertyFunction(X_CARD_CONFIG_NAME) {
38
38
  * ```
39
39
  *
40
40
  */
41
- this.bodyStyle = input({}, ...(ngDevMode ? [{ debugName: "bodyStyle" }] : []));
41
+ this.bodyStyle = input({}, /* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "bodyStyle" }] : /* istanbul ignore next */ []));
42
43
  /**
43
44
  * @zh_CN 头部模板
44
45
  * @en_US Head template
@@ -55,7 +56,8 @@ class XCardProperty extends XPropertyFunction(X_CARD_CONFIG_NAME) {
55
56
  * ```
56
57
  *
57
58
  */
58
- this.header = input(...(ngDevMode ? [undefined, { debugName: "header" }] : []));
59
+ this.header = input(/* @ts-ignore */
60
+ ...(ngDevMode ? [undefined, { debugName: "header" }] : /* istanbul ignore next */ []));
59
61
  /**
60
62
  * @zh_CN 阴影显示方式
61
63
  * @en_US Shadow display method
@@ -68,17 +70,19 @@ class XCardProperty extends XPropertyFunction(X_CARD_CONFIG_NAME) {
68
70
  * ```
69
71
  *
70
72
  */
71
- this.shadow = input(this.config?.shadow ?? 'never', ...(ngDevMode ? [{ debugName: "shadow" }] : []));
73
+ this.shadow = input(this.config?.shadow ?? 'never', /* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "shadow" }] : /* istanbul ignore next */ []));
72
75
  /**
73
76
  * @zh_CN 形态变体
74
77
  * @en_US Card variant
75
78
  */
76
- this.variant = input(this.config?.variant ?? 'outlined', ...(ngDevMode ? [{ debugName: "variant" }] : []));
79
+ this.variant = input(this.config?.variant ?? 'outlined', /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
77
81
  }
78
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCardProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
79
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", 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 }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
82
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCardProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
83
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", 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 }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
80
84
  }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCardProperty, decorators: [{
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCardProperty, decorators: [{
82
86
  type: Component,
83
87
  args: [{ selector: `${XCardPrefix}-property`, template: '' }]
84
88
  }], propDecorators: { width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], bodyStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "bodyStyle", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
@@ -89,22 +93,23 @@ class XCardComponent extends XCardProperty {
89
93
  this.classMap = computed(() => ({
90
94
  [`${XCardPrefix}-${this.shadow()}`]: !XIsEmpty(this.shadow()),
91
95
  [`${XCardPrefix}-${this.variant()}`]: !XIsEmpty(this.variant())
92
- }), ...(ngDevMode ? [{ debugName: "classMap" }] : []));
96
+ }), /* @ts-ignore */
97
+ ...(ngDevMode ? [{ debugName: "classMap" }] : /* istanbul ignore next */ []));
93
98
  }
94
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
95
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", 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{display:block}.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)}.x-card-outlined{border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-card-filled{background-color:var(--x-background-a200)}.x-card-shadow{box-shadow:var(--x-box-shadow)}\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 }); }
99
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
100
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", 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{display:block}.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)}.x-card-outlined{border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-card-filled{background-color:var(--x-background-a200)}.x-card-shadow{box-shadow:var(--x-box-shadow)}\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 }); }
96
101
  }
97
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCardComponent, decorators: [{
102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCardComponent, decorators: [{
98
103
  type: Component,
99
104
  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{display:block}.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)}.x-card-outlined{border:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-card-filled{background-color:var(--x-background-a200)}.x-card-shadow{box-shadow:var(--x-box-shadow)}\n"] }]
100
105
  }] });
101
106
 
102
107
  class XCardModule {
103
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
104
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: XCardModule, imports: [XCardComponent], exports: [XCardComponent] }); }
105
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCardModule }); }
108
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
109
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XCardModule, imports: [XCardComponent], exports: [XCardComponent] }); }
110
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCardModule }); }
106
111
  }
107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: XCardModule, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XCardModule, decorators: [{
108
113
  type: NgModule,
109
114
  args: [{
110
115
  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 ?? 'never');\r\n /**\r\n * @zh_CN 形态变体\r\n * @en_US Card variant\r\n */\r\n readonly variant = input<XCardVariant>(this.config?.variant ?? 'outlined');\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 variant\r\n */\r\nexport type XCardVariant = 'outlined' | 'filled' | 'shadow' | 'borderless';\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 [`${XCardPrefix}-${this.variant()}`]: !XIsEmpty(this.variant())\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,kBAA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,cAAc,EAAA,UAAA,EAAA,CAAA;kBAR1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAG,WAAW,CAAA,CAAE,EAAA,OAAA,EACjB,CAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,CAAC,iBAG9B,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kWAAA,EAAA,MAAA,EAAA,CAAA,4tBAAA,CAAA,EAAA;;;MELpC,WAAW,CAAA;iIAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,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 ?? 'never');\r\n /**\r\n * @zh_CN 形态变体\r\n * @en_US Card variant\r\n */\r\n readonly variant = input<XCardVariant>(this.config?.variant ?? 'outlined');\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 variant\r\n */\r\nexport type XCardVariant = 'outlined' | 'filled' | 'shadow' | 'borderless';\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 [`${XCardPrefix}-${this.variant()}`]: !XIsEmpty(this.variant())\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;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAkB,EAAE,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC5E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