@trismegisto/angular 3.3.3 → 3.3.4

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 (550) hide show
  1. package/fesm2022/trismegisto-angular-access-control.mjs +823 -0
  2. package/fesm2022/trismegisto-angular-access-control.mjs.map +1 -0
  3. package/fesm2022/trismegisto-angular-account-avatar.mjs +54 -3
  4. package/fesm2022/trismegisto-angular-account-avatar.mjs.map +1 -1
  5. package/fesm2022/trismegisto-angular-account-closure.mjs +221 -0
  6. package/fesm2022/trismegisto-angular-account-closure.mjs.map +1 -0
  7. package/fesm2022/trismegisto-angular-account-forms.mjs +924 -0
  8. package/fesm2022/trismegisto-angular-account-forms.mjs.map +1 -0
  9. package/fesm2022/trismegisto-angular-account-switcher.mjs +202 -0
  10. package/fesm2022/trismegisto-angular-account-switcher.mjs.map +1 -0
  11. package/fesm2022/trismegisto-angular-address.mjs +631 -0
  12. package/fesm2022/trismegisto-angular-address.mjs.map +1 -0
  13. package/fesm2022/trismegisto-angular-alert-history.mjs +294 -0
  14. package/fesm2022/trismegisto-angular-alert-history.mjs.map +1 -0
  15. package/fesm2022/trismegisto-angular-alert-rule-editor.mjs +450 -0
  16. package/fesm2022/trismegisto-angular-alert-rule-editor.mjs.map +1 -0
  17. package/fesm2022/trismegisto-angular-anchor-nav.mjs +157 -0
  18. package/fesm2022/trismegisto-angular-anchor-nav.mjs.map +1 -0
  19. package/fesm2022/trismegisto-angular-announcer.mjs +79 -0
  20. package/fesm2022/trismegisto-angular-announcer.mjs.map +1 -0
  21. package/fesm2022/trismegisto-angular-api-exchange.mjs +202 -0
  22. package/fesm2022/trismegisto-angular-api-exchange.mjs.map +1 -0
  23. package/fesm2022/trismegisto-angular-appointment-details.mjs +254 -0
  24. package/fesm2022/trismegisto-angular-appointment-details.mjs.map +1 -0
  25. package/fesm2022/trismegisto-angular-approval.mjs +242 -0
  26. package/fesm2022/trismegisto-angular-approval.mjs.map +1 -0
  27. package/fesm2022/trismegisto-angular-assignee.mjs +271 -0
  28. package/fesm2022/trismegisto-angular-assignee.mjs.map +1 -0
  29. package/fesm2022/trismegisto-angular-attachment.mjs +1 -1
  30. package/fesm2022/trismegisto-angular-attachment.mjs.map +1 -1
  31. package/fesm2022/trismegisto-angular-availability-editor.mjs +187 -0
  32. package/fesm2022/trismegisto-angular-availability-editor.mjs.map +1 -0
  33. package/fesm2022/trismegisto-angular-avatar-group.mjs +1 -1
  34. package/fesm2022/trismegisto-angular-avatar-group.mjs.map +1 -1
  35. package/fesm2022/trismegisto-angular-backlog.mjs +244 -0
  36. package/fesm2022/trismegisto-angular-backlog.mjs.map +1 -0
  37. package/fesm2022/trismegisto-angular-billing.mjs +1007 -0
  38. package/fesm2022/trismegisto-angular-billing.mjs.map +1 -0
  39. package/fesm2022/trismegisto-angular-bottom-navigation.mjs +203 -0
  40. package/fesm2022/trismegisto-angular-bottom-navigation.mjs.map +1 -0
  41. package/fesm2022/trismegisto-angular-bottom-sheet.mjs +428 -0
  42. package/fesm2022/trismegisto-angular-bottom-sheet.mjs.map +1 -0
  43. package/fesm2022/trismegisto-angular-card-container.mjs +1 -1
  44. package/fesm2022/trismegisto-angular-card-container.mjs.map +1 -1
  45. package/fesm2022/trismegisto-angular-cart.mjs +677 -0
  46. package/fesm2022/trismegisto-angular-cart.mjs.map +1 -0
  47. package/fesm2022/trismegisto-angular-cascader.mjs +419 -0
  48. package/fesm2022/trismegisto-angular-cascader.mjs.map +1 -0
  49. package/fesm2022/trismegisto-angular-change-history.mjs +148 -0
  50. package/fesm2022/trismegisto-angular-change-history.mjs.map +1 -0
  51. package/fesm2022/trismegisto-angular-code-diff.mjs +2 -2
  52. package/fesm2022/trismegisto-angular-code-diff.mjs.map +1 -1
  53. package/fesm2022/trismegisto-angular-color-picker.mjs +145 -0
  54. package/fesm2022/trismegisto-angular-color-picker.mjs.map +1 -0
  55. package/fesm2022/trismegisto-angular-combobox-multi.mjs +6 -4
  56. package/fesm2022/trismegisto-angular-combobox-multi.mjs.map +1 -1
  57. package/fesm2022/trismegisto-angular-commerce-format.mjs +103 -0
  58. package/fesm2022/trismegisto-angular-commerce-format.mjs.map +1 -0
  59. package/fesm2022/trismegisto-angular-connection-wizard.mjs +159 -0
  60. package/fesm2022/trismegisto-angular-connection-wizard.mjs.map +1 -0
  61. package/fesm2022/trismegisto-angular-consent.mjs +382 -0
  62. package/fesm2022/trismegisto-angular-consent.mjs.map +1 -0
  63. package/fesm2022/trismegisto-angular-credentials-form.mjs +461 -0
  64. package/fesm2022/trismegisto-angular-credentials-form.mjs.map +1 -0
  65. package/fesm2022/trismegisto-angular-data-grid.mjs +690 -18
  66. package/fesm2022/trismegisto-angular-data-grid.mjs.map +1 -1
  67. package/fesm2022/trismegisto-angular-data-source-picker.mjs +115 -0
  68. package/fesm2022/trismegisto-angular-data-source-picker.mjs.map +1 -0
  69. package/fesm2022/trismegisto-angular-date-picker.mjs +99 -10
  70. package/fesm2022/trismegisto-angular-date-picker.mjs.map +1 -1
  71. package/fesm2022/trismegisto-angular-datetime-picker.mjs +183 -0
  72. package/fesm2022/trismegisto-angular-datetime-picker.mjs.map +1 -0
  73. package/fesm2022/trismegisto-angular-deadline.mjs +326 -0
  74. package/fesm2022/trismegisto-angular-deadline.mjs.map +1 -0
  75. package/fesm2022/trismegisto-angular-deploy-pipeline.mjs +259 -0
  76. package/fesm2022/trismegisto-angular-deploy-pipeline.mjs.map +1 -0
  77. package/fesm2022/trismegisto-angular-drawer.mjs +11 -5
  78. package/fesm2022/trismegisto-angular-drawer.mjs.map +1 -1
  79. package/fesm2022/trismegisto-angular-endpoint-card.mjs +143 -0
  80. package/fesm2022/trismegisto-angular-endpoint-card.mjs.map +1 -0
  81. package/fesm2022/trismegisto-angular-entity-picker.mjs +246 -0
  82. package/fesm2022/trismegisto-angular-entity-picker.mjs.map +1 -0
  83. package/fesm2022/trismegisto-angular-environment-picker.mjs +217 -0
  84. package/fesm2022/trismegisto-angular-environment-picker.mjs.map +1 -0
  85. package/fesm2022/trismegisto-angular-event-calendar.mjs +234 -11
  86. package/fesm2022/trismegisto-angular-event-calendar.mjs.map +1 -1
  87. package/fesm2022/trismegisto-angular-execution-status.mjs +211 -0
  88. package/fesm2022/trismegisto-angular-execution-status.mjs.map +1 -0
  89. package/fesm2022/trismegisto-angular-feature-flags.mjs +153 -0
  90. package/fesm2022/trismegisto-angular-feature-flags.mjs.map +1 -0
  91. package/fesm2022/trismegisto-angular-field-mapping.mjs +178 -0
  92. package/fesm2022/trismegisto-angular-field-mapping.mjs.map +1 -0
  93. package/fesm2022/trismegisto-angular-file-list.mjs +222 -0
  94. package/fesm2022/trismegisto-angular-file-list.mjs.map +1 -0
  95. package/fesm2022/trismegisto-angular-file-permissions.mjs +273 -0
  96. package/fesm2022/trismegisto-angular-file-permissions.mjs.map +1 -0
  97. package/fesm2022/trismegisto-angular-file-upload.mjs +1 -1
  98. package/fesm2022/trismegisto-angular-file-upload.mjs.map +1 -1
  99. package/fesm2022/trismegisto-angular-file-versions.mjs +139 -0
  100. package/fesm2022/trismegisto-angular-file-versions.mjs.map +1 -0
  101. package/fesm2022/trismegisto-angular-filter-bar.mjs +1 -1
  102. package/fesm2022/trismegisto-angular-filter-bar.mjs.map +1 -1
  103. package/fesm2022/trismegisto-angular-finance.mjs +912 -0
  104. package/fesm2022/trismegisto-angular-finance.mjs.map +1 -0
  105. package/fesm2022/trismegisto-angular-form-error-summary.mjs +195 -0
  106. package/fesm2022/trismegisto-angular-form-error-summary.mjs.map +1 -0
  107. package/fesm2022/trismegisto-angular-forms.mjs +21 -3
  108. package/fesm2022/trismegisto-angular-forms.mjs.map +1 -1
  109. package/fesm2022/trismegisto-angular-gantt.mjs +453 -0
  110. package/fesm2022/trismegisto-angular-gantt.mjs.map +1 -0
  111. package/fesm2022/trismegisto-angular-header.mjs +22 -5
  112. package/fesm2022/trismegisto-angular-header.mjs.map +1 -1
  113. package/fesm2022/trismegisto-angular-health-status.mjs +204 -0
  114. package/fesm2022/trismegisto-angular-health-status.mjs.map +1 -0
  115. package/fesm2022/trismegisto-angular-icon.mjs +96 -1
  116. package/fesm2022/trismegisto-angular-icon.mjs.map +1 -1
  117. package/fesm2022/trismegisto-angular-identity-document.mjs +274 -0
  118. package/fesm2022/trismegisto-angular-identity-document.mjs.map +1 -0
  119. package/fesm2022/trismegisto-angular-image-gallery.mjs +320 -0
  120. package/fesm2022/trismegisto-angular-image-gallery.mjs.map +1 -0
  121. package/fesm2022/trismegisto-angular-incident.mjs +735 -0
  122. package/fesm2022/trismegisto-angular-incident.mjs.map +1 -0
  123. package/fesm2022/trismegisto-angular-input.mjs +2 -1
  124. package/fesm2022/trismegisto-angular-input.mjs.map +1 -1
  125. package/fesm2022/trismegisto-angular-integration-text.mjs +82 -0
  126. package/fesm2022/trismegisto-angular-integration-text.mjs.map +1 -0
  127. package/fesm2022/trismegisto-angular-integration.mjs +423 -0
  128. package/fesm2022/trismegisto-angular-integration.mjs.map +1 -0
  129. package/fesm2022/trismegisto-angular-invoice.mjs +381 -0
  130. package/fesm2022/trismegisto-angular-invoice.mjs.map +1 -0
  131. package/fesm2022/trismegisto-angular-json-viewer.mjs +388 -0
  132. package/fesm2022/trismegisto-angular-json-viewer.mjs.map +1 -0
  133. package/fesm2022/trismegisto-angular-kanban.mjs +49 -9
  134. package/fesm2022/trismegisto-angular-kanban.mjs.map +1 -1
  135. package/fesm2022/trismegisto-angular-level-badge.mjs +192 -0
  136. package/fesm2022/trismegisto-angular-level-badge.mjs.map +1 -0
  137. package/fesm2022/trismegisto-angular-location-select.mjs +213 -0
  138. package/fesm2022/trismegisto-angular-location-select.mjs.map +1 -0
  139. package/fesm2022/trismegisto-angular-log-viewer.mjs +260 -0
  140. package/fesm2022/trismegisto-angular-log-viewer.mjs.map +1 -0
  141. package/fesm2022/trismegisto-angular-maintenance-window.mjs +286 -0
  142. package/fesm2022/trismegisto-angular-maintenance-window.mjs.map +1 -0
  143. package/fesm2022/trismegisto-angular-member-list.mjs +303 -0
  144. package/fesm2022/trismegisto-angular-member-list.mjs.map +1 -0
  145. package/fesm2022/trismegisto-angular-mention-text.mjs +44 -0
  146. package/fesm2022/trismegisto-angular-mention-text.mjs.map +1 -0
  147. package/fesm2022/trismegisto-angular-menu.mjs +10 -4
  148. package/fesm2022/trismegisto-angular-menu.mjs.map +1 -1
  149. package/fesm2022/trismegisto-angular-message.mjs +132 -7
  150. package/fesm2022/trismegisto-angular-message.mjs.map +1 -1
  151. package/fesm2022/trismegisto-angular-metric-explorer.mjs +367 -0
  152. package/fesm2022/trismegisto-angular-metric-explorer.mjs.map +1 -0
  153. package/fesm2022/trismegisto-angular-modal.mjs +14 -5
  154. package/fesm2022/trismegisto-angular-modal.mjs.map +1 -1
  155. package/fesm2022/trismegisto-angular-monitoring-text.mjs +121 -0
  156. package/fesm2022/trismegisto-angular-monitoring-text.mjs.map +1 -0
  157. package/fesm2022/trismegisto-angular-month-picker.mjs +232 -0
  158. package/fesm2022/trismegisto-angular-month-picker.mjs.map +1 -0
  159. package/fesm2022/trismegisto-angular-navigation-menu.mjs +68 -9
  160. package/fesm2022/trismegisto-angular-navigation-menu.mjs.map +1 -1
  161. package/fesm2022/trismegisto-angular-number-field.mjs +275 -0
  162. package/fesm2022/trismegisto-angular-number-field.mjs.map +1 -0
  163. package/fesm2022/trismegisto-angular-observability-text.mjs +244 -0
  164. package/fesm2022/trismegisto-angular-observability-text.mjs.map +1 -0
  165. package/fesm2022/trismegisto-angular-order.mjs +443 -0
  166. package/fesm2022/trismegisto-angular-order.mjs.map +1 -0
  167. package/fesm2022/trismegisto-angular-org-chart.mjs +678 -0
  168. package/fesm2022/trismegisto-angular-org-chart.mjs.map +1 -0
  169. package/fesm2022/trismegisto-angular-password-strength.mjs +204 -0
  170. package/fesm2022/trismegisto-angular-password-strength.mjs.map +1 -0
  171. package/fesm2022/trismegisto-angular-payment-fields.mjs +818 -0
  172. package/fesm2022/trismegisto-angular-payment-fields.mjs.map +1 -0
  173. package/fesm2022/trismegisto-angular-payment-form.mjs +405 -0
  174. package/fesm2022/trismegisto-angular-payment-form.mjs.map +1 -0
  175. package/fesm2022/trismegisto-angular-payment-method.mjs +331 -0
  176. package/fesm2022/trismegisto-angular-payment-method.mjs.map +1 -0
  177. package/fesm2022/trismegisto-angular-pdf-viewer.mjs +113 -0
  178. package/fesm2022/trismegisto-angular-pdf-viewer.mjs.map +1 -0
  179. package/fesm2022/trismegisto-angular-permission-matrix.mjs +266 -0
  180. package/fesm2022/trismegisto-angular-permission-matrix.mjs.map +1 -0
  181. package/fesm2022/trismegisto-angular-pipes.mjs +171 -2
  182. package/fesm2022/trismegisto-angular-pipes.mjs.map +1 -1
  183. package/fesm2022/trismegisto-angular-popconfirm.mjs +239 -0
  184. package/fesm2022/trismegisto-angular-popconfirm.mjs.map +1 -0
  185. package/fesm2022/trismegisto-angular-popover.mjs +6 -2
  186. package/fesm2022/trismegisto-angular-popover.mjs.map +1 -1
  187. package/fesm2022/trismegisto-angular-price.mjs +276 -0
  188. package/fesm2022/trismegisto-angular-price.mjs.map +1 -0
  189. package/fesm2022/trismegisto-angular-product.mjs +800 -0
  190. package/fesm2022/trismegisto-angular-product.mjs.map +1 -0
  191. package/fesm2022/trismegisto-angular-progress.mjs +119 -4
  192. package/fesm2022/trismegisto-angular-progress.mjs.map +1 -1
  193. package/fesm2022/trismegisto-angular-rating.mjs +166 -0
  194. package/fesm2022/trismegisto-angular-rating.mjs.map +1 -0
  195. package/fesm2022/trismegisto-angular-reason-dialog.mjs +137 -0
  196. package/fesm2022/trismegisto-angular-reason-dialog.mjs.map +1 -0
  197. package/fesm2022/trismegisto-angular-recurrence-editor.mjs +429 -0
  198. package/fesm2022/trismegisto-angular-recurrence-editor.mjs.map +1 -0
  199. package/fesm2022/trismegisto-angular-release-timeline.mjs +175 -0
  200. package/fesm2022/trismegisto-angular-release-timeline.mjs.map +1 -0
  201. package/fesm2022/trismegisto-angular-report-history.mjs +251 -0
  202. package/fesm2022/trismegisto-angular-report-history.mjs.map +1 -0
  203. package/fesm2022/trismegisto-angular-report-schedule.mjs +240 -0
  204. package/fesm2022/trismegisto-angular-report-schedule.mjs.map +1 -0
  205. package/fesm2022/trismegisto-angular-resource-calendar.mjs +172 -0
  206. package/fesm2022/trismegisto-angular-resource-calendar.mjs.map +1 -0
  207. package/fesm2022/trismegisto-angular-resource-usage.mjs +208 -0
  208. package/fesm2022/trismegisto-angular-resource-usage.mjs.map +1 -0
  209. package/fesm2022/trismegisto-angular-return-request.mjs +316 -0
  210. package/fesm2022/trismegisto-angular-return-request.mjs.map +1 -0
  211. package/fesm2022/trismegisto-angular-rich-text.mjs +1 -1
  212. package/fesm2022/trismegisto-angular-rich-text.mjs.map +1 -1
  213. package/fesm2022/trismegisto-angular-risk-register.mjs +342 -0
  214. package/fesm2022/trismegisto-angular-risk-register.mjs.map +1 -0
  215. package/fesm2022/trismegisto-angular-save-status.mjs +166 -0
  216. package/fesm2022/trismegisto-angular-save-status.mjs.map +1 -0
  217. package/fesm2022/trismegisto-angular-service-map.mjs +471 -0
  218. package/fesm2022/trismegisto-angular-service-map.mjs.map +1 -0
  219. package/fesm2022/trismegisto-angular-service-status.mjs +278 -0
  220. package/fesm2022/trismegisto-angular-service-status.mjs.map +1 -0
  221. package/fesm2022/trismegisto-angular-shipping.mjs +410 -0
  222. package/fesm2022/trismegisto-angular-shipping.mjs.map +1 -0
  223. package/fesm2022/trismegisto-angular-sidebar.mjs +3 -0
  224. package/fesm2022/trismegisto-angular-sidebar.mjs.map +1 -1
  225. package/fesm2022/trismegisto-angular-skip-link.mjs +74 -0
  226. package/fesm2022/trismegisto-angular-skip-link.mjs.map +1 -0
  227. package/fesm2022/trismegisto-angular-sla-summary.mjs +349 -0
  228. package/fesm2022/trismegisto-angular-sla-summary.mjs.map +1 -0
  229. package/fesm2022/trismegisto-angular-slot-picker.mjs +229 -0
  230. package/fesm2022/trismegisto-angular-slot-picker.mjs.map +1 -0
  231. package/fesm2022/trismegisto-angular-split-button.mjs +190 -0
  232. package/fesm2022/trismegisto-angular-split-button.mjs.map +1 -0
  233. package/fesm2022/trismegisto-angular-status-badge.mjs +80 -0
  234. package/fesm2022/trismegisto-angular-status-badge.mjs.map +1 -0
  235. package/fesm2022/trismegisto-angular-status-select.mjs +156 -0
  236. package/fesm2022/trismegisto-angular-status-select.mjs.map +1 -0
  237. package/fesm2022/trismegisto-angular-storage-usage.mjs +136 -0
  238. package/fesm2022/trismegisto-angular-storage-usage.mjs.map +1 -0
  239. package/fesm2022/trismegisto-angular-swimlane-board.mjs +237 -0
  240. package/fesm2022/trismegisto-angular-swimlane-board.mjs.map +1 -0
  241. package/fesm2022/trismegisto-angular-sync-status.mjs +269 -0
  242. package/fesm2022/trismegisto-angular-sync-status.mjs.map +1 -0
  243. package/fesm2022/trismegisto-angular-tag-input.mjs +345 -0
  244. package/fesm2022/trismegisto-angular-tag-input.mjs.map +1 -0
  245. package/fesm2022/trismegisto-angular-task-card.mjs +315 -0
  246. package/fesm2022/trismegisto-angular-task-card.mjs.map +1 -0
  247. package/fesm2022/trismegisto-angular-task-detail.mjs +737 -0
  248. package/fesm2022/trismegisto-angular-task-detail.mjs.map +1 -0
  249. package/fesm2022/trismegisto-angular-textarea.mjs +129 -8
  250. package/fesm2022/trismegisto-angular-textarea.mjs.map +1 -1
  251. package/fesm2022/trismegisto-angular-time-range.mjs +201 -0
  252. package/fesm2022/trismegisto-angular-time-range.mjs.map +1 -0
  253. package/fesm2022/trismegisto-angular-tour.mjs +385 -0
  254. package/fesm2022/trismegisto-angular-tour.mjs.map +1 -0
  255. package/fesm2022/trismegisto-angular-trace-waterfall.mjs +511 -0
  256. package/fesm2022/trismegisto-angular-trace-waterfall.mjs.map +1 -0
  257. package/fesm2022/trismegisto-angular-transaction.mjs +616 -0
  258. package/fesm2022/trismegisto-angular-transaction.mjs.map +1 -0
  259. package/fesm2022/trismegisto-angular-tree-select.mjs +444 -0
  260. package/fesm2022/trismegisto-angular-tree-select.mjs.map +1 -0
  261. package/fesm2022/trismegisto-angular-tree.mjs +1 -1
  262. package/fesm2022/trismegisto-angular-tree.mjs.map +1 -1
  263. package/fesm2022/trismegisto-angular-unsaved-changes.mjs +147 -0
  264. package/fesm2022/trismegisto-angular-unsaved-changes.mjs.map +1 -0
  265. package/fesm2022/trismegisto-angular-uptime-bar.mjs +271 -0
  266. package/fesm2022/trismegisto-angular-uptime-bar.mjs.map +1 -0
  267. package/fesm2022/trismegisto-angular-user-card.mjs +298 -0
  268. package/fesm2022/trismegisto-angular-user-card.mjs.map +1 -0
  269. package/fesm2022/trismegisto-angular-vehicle-plate.mjs +245 -0
  270. package/fesm2022/trismegisto-angular-vehicle-plate.mjs.map +1 -0
  271. package/fesm2022/trismegisto-angular-webhook.mjs +358 -0
  272. package/fesm2022/trismegisto-angular-webhook.mjs.map +1 -0
  273. package/fesm2022/trismegisto-angular-wizard.mjs +2 -2
  274. package/fesm2022/trismegisto-angular-wizard.mjs.map +1 -1
  275. package/fesm2022/trismegisto-angular-workflow-diagram.mjs +441 -0
  276. package/fesm2022/trismegisto-angular-workflow-diagram.mjs.map +1 -0
  277. package/fesm2022/trismegisto-angular-workflow-i18n.mjs +890 -0
  278. package/fesm2022/trismegisto-angular-workflow-i18n.mjs.map +1 -0
  279. package/fesm2022/trismegisto-angular-workload.mjs +172 -0
  280. package/fesm2022/trismegisto-angular-workload.mjs.map +1 -0
  281. package/fesm2022/trismegisto-angular-workspace.mjs +229 -44
  282. package/fesm2022/trismegisto-angular-workspace.mjs.map +1 -1
  283. package/fesm2022/trismegisto-angular.mjs +116 -6
  284. package/fesm2022/trismegisto-angular.mjs.map +1 -1
  285. package/package.json +449 -5
  286. package/types/trismegisto-angular-access-control.d.ts +330 -0
  287. package/types/trismegisto-angular-access-control.d.ts.map +1 -0
  288. package/types/trismegisto-angular-account-avatar.d.ts +18 -1
  289. package/types/trismegisto-angular-account-avatar.d.ts.map +1 -1
  290. package/types/trismegisto-angular-account-closure.d.ts +85 -0
  291. package/types/trismegisto-angular-account-closure.d.ts.map +1 -0
  292. package/types/trismegisto-angular-account-forms.d.ts +381 -0
  293. package/types/trismegisto-angular-account-forms.d.ts.map +1 -0
  294. package/types/trismegisto-angular-account-switcher.d.ts +60 -0
  295. package/types/trismegisto-angular-account-switcher.d.ts.map +1 -0
  296. package/types/trismegisto-angular-address.d.ts +267 -0
  297. package/types/trismegisto-angular-address.d.ts.map +1 -0
  298. package/types/trismegisto-angular-alert-history.d.ts +77 -0
  299. package/types/trismegisto-angular-alert-history.d.ts.map +1 -0
  300. package/types/trismegisto-angular-alert-rule-editor.d.ts +123 -0
  301. package/types/trismegisto-angular-alert-rule-editor.d.ts.map +1 -0
  302. package/types/trismegisto-angular-anchor-nav.d.ts +78 -0
  303. package/types/trismegisto-angular-anchor-nav.d.ts.map +1 -0
  304. package/types/trismegisto-angular-announcer.d.ts +49 -0
  305. package/types/trismegisto-angular-announcer.d.ts.map +1 -0
  306. package/types/trismegisto-angular-api-exchange.d.ts +155 -0
  307. package/types/trismegisto-angular-api-exchange.d.ts.map +1 -0
  308. package/types/trismegisto-angular-appointment-details.d.ts +123 -0
  309. package/types/trismegisto-angular-appointment-details.d.ts.map +1 -0
  310. package/types/trismegisto-angular-approval.d.ts +109 -0
  311. package/types/trismegisto-angular-approval.d.ts.map +1 -0
  312. package/types/trismegisto-angular-assignee.d.ts +120 -0
  313. package/types/trismegisto-angular-assignee.d.ts.map +1 -0
  314. package/types/trismegisto-angular-availability-editor.d.ts +100 -0
  315. package/types/trismegisto-angular-availability-editor.d.ts.map +1 -0
  316. package/types/trismegisto-angular-backlog.d.ts +98 -0
  317. package/types/trismegisto-angular-backlog.d.ts.map +1 -0
  318. package/types/trismegisto-angular-billing.d.ts +851 -0
  319. package/types/trismegisto-angular-billing.d.ts.map +1 -0
  320. package/types/trismegisto-angular-bottom-navigation.d.ts +83 -0
  321. package/types/trismegisto-angular-bottom-navigation.d.ts.map +1 -0
  322. package/types/trismegisto-angular-bottom-sheet.d.ts +121 -0
  323. package/types/trismegisto-angular-bottom-sheet.d.ts.map +1 -0
  324. package/types/trismegisto-angular-cart.d.ts +267 -0
  325. package/types/trismegisto-angular-cart.d.ts.map +1 -0
  326. package/types/trismegisto-angular-cascader.d.ts +133 -0
  327. package/types/trismegisto-angular-cascader.d.ts.map +1 -0
  328. package/types/trismegisto-angular-change-history.d.ts +58 -0
  329. package/types/trismegisto-angular-change-history.d.ts.map +1 -0
  330. package/types/trismegisto-angular-color-picker.d.ts +73 -0
  331. package/types/trismegisto-angular-color-picker.d.ts.map +1 -0
  332. package/types/trismegisto-angular-combobox-multi.d.ts +3 -1
  333. package/types/trismegisto-angular-combobox-multi.d.ts.map +1 -1
  334. package/types/trismegisto-angular-commerce-format.d.ts +43 -0
  335. package/types/trismegisto-angular-commerce-format.d.ts.map +1 -0
  336. package/types/trismegisto-angular-connection-wizard.d.ts +110 -0
  337. package/types/trismegisto-angular-connection-wizard.d.ts.map +1 -0
  338. package/types/trismegisto-angular-consent.d.ts +142 -0
  339. package/types/trismegisto-angular-consent.d.ts.map +1 -0
  340. package/types/trismegisto-angular-credentials-form.d.ts +242 -0
  341. package/types/trismegisto-angular-credentials-form.d.ts.map +1 -0
  342. package/types/trismegisto-angular-data-grid.d.ts +382 -48
  343. package/types/trismegisto-angular-data-grid.d.ts.map +1 -1
  344. package/types/trismegisto-angular-data-source-picker.d.ts +73 -0
  345. package/types/trismegisto-angular-data-source-picker.d.ts.map +1 -0
  346. package/types/trismegisto-angular-date-picker.d.ts +75 -4
  347. package/types/trismegisto-angular-date-picker.d.ts.map +1 -1
  348. package/types/trismegisto-angular-datetime-picker.d.ts +89 -0
  349. package/types/trismegisto-angular-datetime-picker.d.ts.map +1 -0
  350. package/types/trismegisto-angular-deadline.d.ts +143 -0
  351. package/types/trismegisto-angular-deadline.d.ts.map +1 -0
  352. package/types/trismegisto-angular-deploy-pipeline.d.ts +100 -0
  353. package/types/trismegisto-angular-deploy-pipeline.d.ts.map +1 -0
  354. package/types/trismegisto-angular-drawer.d.ts +6 -3
  355. package/types/trismegisto-angular-drawer.d.ts.map +1 -1
  356. package/types/trismegisto-angular-endpoint-card.d.ts +113 -0
  357. package/types/trismegisto-angular-endpoint-card.d.ts.map +1 -0
  358. package/types/trismegisto-angular-entity-picker.d.ts +88 -0
  359. package/types/trismegisto-angular-entity-picker.d.ts.map +1 -0
  360. package/types/trismegisto-angular-environment-picker.d.ts +72 -0
  361. package/types/trismegisto-angular-environment-picker.d.ts.map +1 -0
  362. package/types/trismegisto-angular-event-calendar.d.ts +52 -6
  363. package/types/trismegisto-angular-event-calendar.d.ts.map +1 -1
  364. package/types/trismegisto-angular-execution-status.d.ts +76 -0
  365. package/types/trismegisto-angular-execution-status.d.ts.map +1 -0
  366. package/types/trismegisto-angular-feature-flags.d.ts +97 -0
  367. package/types/trismegisto-angular-feature-flags.d.ts.map +1 -0
  368. package/types/trismegisto-angular-field-mapping.d.ts +118 -0
  369. package/types/trismegisto-angular-field-mapping.d.ts.map +1 -0
  370. package/types/trismegisto-angular-file-list.d.ts +136 -0
  371. package/types/trismegisto-angular-file-list.d.ts.map +1 -0
  372. package/types/trismegisto-angular-file-permissions.d.ts +171 -0
  373. package/types/trismegisto-angular-file-permissions.d.ts.map +1 -0
  374. package/types/trismegisto-angular-file-versions.d.ts +93 -0
  375. package/types/trismegisto-angular-file-versions.d.ts.map +1 -0
  376. package/types/trismegisto-angular-finance.d.ts +623 -0
  377. package/types/trismegisto-angular-finance.d.ts.map +1 -0
  378. package/types/trismegisto-angular-form-error-summary.d.ts +98 -0
  379. package/types/trismegisto-angular-form-error-summary.d.ts.map +1 -0
  380. package/types/trismegisto-angular-forms.d.ts +14 -1
  381. package/types/trismegisto-angular-forms.d.ts.map +1 -1
  382. package/types/trismegisto-angular-gantt.d.ts +128 -0
  383. package/types/trismegisto-angular-gantt.d.ts.map +1 -0
  384. package/types/trismegisto-angular-header.d.ts +5 -1
  385. package/types/trismegisto-angular-header.d.ts.map +1 -1
  386. package/types/trismegisto-angular-health-status.d.ts +71 -0
  387. package/types/trismegisto-angular-health-status.d.ts.map +1 -0
  388. package/types/trismegisto-angular-icon.d.ts +96 -1
  389. package/types/trismegisto-angular-icon.d.ts.map +1 -1
  390. package/types/trismegisto-angular-identity-document.d.ts +112 -0
  391. package/types/trismegisto-angular-identity-document.d.ts.map +1 -0
  392. package/types/trismegisto-angular-image-gallery.d.ts +129 -0
  393. package/types/trismegisto-angular-image-gallery.d.ts.map +1 -0
  394. package/types/trismegisto-angular-incident.d.ts +212 -0
  395. package/types/trismegisto-angular-incident.d.ts.map +1 -0
  396. package/types/trismegisto-angular-input.d.ts.map +1 -1
  397. package/types/trismegisto-angular-integration-text.d.ts +42 -0
  398. package/types/trismegisto-angular-integration-text.d.ts.map +1 -0
  399. package/types/trismegisto-angular-integration.d.ts +283 -0
  400. package/types/trismegisto-angular-integration.d.ts.map +1 -0
  401. package/types/trismegisto-angular-invoice.d.ts +221 -0
  402. package/types/trismegisto-angular-invoice.d.ts.map +1 -0
  403. package/types/trismegisto-angular-json-viewer.d.ts +117 -0
  404. package/types/trismegisto-angular-json-viewer.d.ts.map +1 -0
  405. package/types/trismegisto-angular-kanban.d.ts +38 -3
  406. package/types/trismegisto-angular-kanban.d.ts.map +1 -1
  407. package/types/trismegisto-angular-level-badge.d.ts +87 -0
  408. package/types/trismegisto-angular-level-badge.d.ts.map +1 -0
  409. package/types/trismegisto-angular-location-select.d.ts +80 -0
  410. package/types/trismegisto-angular-location-select.d.ts.map +1 -0
  411. package/types/trismegisto-angular-log-viewer.d.ts +125 -0
  412. package/types/trismegisto-angular-log-viewer.d.ts.map +1 -0
  413. package/types/trismegisto-angular-maintenance-window.d.ts +89 -0
  414. package/types/trismegisto-angular-maintenance-window.d.ts.map +1 -0
  415. package/types/trismegisto-angular-member-list.d.ts +80 -0
  416. package/types/trismegisto-angular-member-list.d.ts.map +1 -0
  417. package/types/trismegisto-angular-mention-text.d.ts +28 -0
  418. package/types/trismegisto-angular-mention-text.d.ts.map +1 -0
  419. package/types/trismegisto-angular-menu.d.ts +4 -1
  420. package/types/trismegisto-angular-menu.d.ts.map +1 -1
  421. package/types/trismegisto-angular-message.d.ts +31 -2
  422. package/types/trismegisto-angular-message.d.ts.map +1 -1
  423. package/types/trismegisto-angular-metric-explorer.d.ts +117 -0
  424. package/types/trismegisto-angular-metric-explorer.d.ts.map +1 -0
  425. package/types/trismegisto-angular-modal.d.ts +1 -0
  426. package/types/trismegisto-angular-modal.d.ts.map +1 -1
  427. package/types/trismegisto-angular-monitoring-text.d.ts +57 -0
  428. package/types/trismegisto-angular-monitoring-text.d.ts.map +1 -0
  429. package/types/trismegisto-angular-month-picker.d.ts +104 -0
  430. package/types/trismegisto-angular-month-picker.d.ts.map +1 -0
  431. package/types/trismegisto-angular-navigation-menu.d.ts +35 -2
  432. package/types/trismegisto-angular-navigation-menu.d.ts.map +1 -1
  433. package/types/trismegisto-angular-number-field.d.ts +148 -0
  434. package/types/trismegisto-angular-number-field.d.ts.map +1 -0
  435. package/types/trismegisto-angular-observability-text.d.ts +85 -0
  436. package/types/trismegisto-angular-observability-text.d.ts.map +1 -0
  437. package/types/trismegisto-angular-order.d.ts +268 -0
  438. package/types/trismegisto-angular-order.d.ts.map +1 -0
  439. package/types/trismegisto-angular-org-chart.d.ts +145 -0
  440. package/types/trismegisto-angular-org-chart.d.ts.map +1 -0
  441. package/types/trismegisto-angular-password-strength.d.ts +74 -0
  442. package/types/trismegisto-angular-password-strength.d.ts.map +1 -0
  443. package/types/trismegisto-angular-payment-fields.d.ts +450 -0
  444. package/types/trismegisto-angular-payment-fields.d.ts.map +1 -0
  445. package/types/trismegisto-angular-payment-form.d.ts +189 -0
  446. package/types/trismegisto-angular-payment-form.d.ts.map +1 -0
  447. package/types/trismegisto-angular-payment-method.d.ts +238 -0
  448. package/types/trismegisto-angular-payment-method.d.ts.map +1 -0
  449. package/types/trismegisto-angular-pdf-viewer.d.ts +70 -0
  450. package/types/trismegisto-angular-pdf-viewer.d.ts.map +1 -0
  451. package/types/trismegisto-angular-permission-matrix.d.ts +70 -0
  452. package/types/trismegisto-angular-permission-matrix.d.ts.map +1 -0
  453. package/types/trismegisto-angular-pipes.d.ts +108 -2
  454. package/types/trismegisto-angular-pipes.d.ts.map +1 -1
  455. package/types/trismegisto-angular-popconfirm.d.ts +115 -0
  456. package/types/trismegisto-angular-popconfirm.d.ts.map +1 -0
  457. package/types/trismegisto-angular-popover.d.ts +3 -1
  458. package/types/trismegisto-angular-popover.d.ts.map +1 -1
  459. package/types/trismegisto-angular-price.d.ts +185 -0
  460. package/types/trismegisto-angular-price.d.ts.map +1 -0
  461. package/types/trismegisto-angular-product.d.ts +391 -0
  462. package/types/trismegisto-angular-product.d.ts.map +1 -0
  463. package/types/trismegisto-angular-progress.d.ts +20 -3
  464. package/types/trismegisto-angular-progress.d.ts.map +1 -1
  465. package/types/trismegisto-angular-rating.d.ts +83 -0
  466. package/types/trismegisto-angular-rating.d.ts.map +1 -0
  467. package/types/trismegisto-angular-reason-dialog.d.ts +65 -0
  468. package/types/trismegisto-angular-reason-dialog.d.ts.map +1 -0
  469. package/types/trismegisto-angular-recurrence-editor.d.ts +151 -0
  470. package/types/trismegisto-angular-recurrence-editor.d.ts.map +1 -0
  471. package/types/trismegisto-angular-release-timeline.d.ts +79 -0
  472. package/types/trismegisto-angular-release-timeline.d.ts.map +1 -0
  473. package/types/trismegisto-angular-report-history.d.ts +144 -0
  474. package/types/trismegisto-angular-report-history.d.ts.map +1 -0
  475. package/types/trismegisto-angular-report-schedule.d.ts +138 -0
  476. package/types/trismegisto-angular-report-schedule.d.ts.map +1 -0
  477. package/types/trismegisto-angular-resource-calendar.d.ts +107 -0
  478. package/types/trismegisto-angular-resource-calendar.d.ts.map +1 -0
  479. package/types/trismegisto-angular-resource-usage.d.ts +91 -0
  480. package/types/trismegisto-angular-resource-usage.d.ts.map +1 -0
  481. package/types/trismegisto-angular-return-request.d.ts +158 -0
  482. package/types/trismegisto-angular-return-request.d.ts.map +1 -0
  483. package/types/trismegisto-angular-risk-register.d.ts +130 -0
  484. package/types/trismegisto-angular-risk-register.d.ts.map +1 -0
  485. package/types/trismegisto-angular-save-status.d.ts +67 -0
  486. package/types/trismegisto-angular-save-status.d.ts.map +1 -0
  487. package/types/trismegisto-angular-service-map.d.ts +111 -0
  488. package/types/trismegisto-angular-service-map.d.ts.map +1 -0
  489. package/types/trismegisto-angular-service-status.d.ts +82 -0
  490. package/types/trismegisto-angular-service-status.d.ts.map +1 -0
  491. package/types/trismegisto-angular-shipping.d.ts +221 -0
  492. package/types/trismegisto-angular-shipping.d.ts.map +1 -0
  493. package/types/trismegisto-angular-sidebar.d.ts +1 -0
  494. package/types/trismegisto-angular-sidebar.d.ts.map +1 -1
  495. package/types/trismegisto-angular-skip-link.d.ts +53 -0
  496. package/types/trismegisto-angular-skip-link.d.ts.map +1 -0
  497. package/types/trismegisto-angular-sla-summary.d.ts +104 -0
  498. package/types/trismegisto-angular-sla-summary.d.ts.map +1 -0
  499. package/types/trismegisto-angular-slot-picker.d.ts +128 -0
  500. package/types/trismegisto-angular-slot-picker.d.ts.map +1 -0
  501. package/types/trismegisto-angular-split-button.d.ts +81 -0
  502. package/types/trismegisto-angular-split-button.d.ts.map +1 -0
  503. package/types/trismegisto-angular-status-badge.d.ts +40 -0
  504. package/types/trismegisto-angular-status-badge.d.ts.map +1 -0
  505. package/types/trismegisto-angular-status-select.d.ts +76 -0
  506. package/types/trismegisto-angular-status-select.d.ts.map +1 -0
  507. package/types/trismegisto-angular-storage-usage.d.ts +82 -0
  508. package/types/trismegisto-angular-storage-usage.d.ts.map +1 -0
  509. package/types/trismegisto-angular-swimlane-board.d.ts +114 -0
  510. package/types/trismegisto-angular-swimlane-board.d.ts.map +1 -0
  511. package/types/trismegisto-angular-sync-status.d.ts +191 -0
  512. package/types/trismegisto-angular-sync-status.d.ts.map +1 -0
  513. package/types/trismegisto-angular-tag-input.d.ts +121 -0
  514. package/types/trismegisto-angular-tag-input.d.ts.map +1 -0
  515. package/types/trismegisto-angular-task-card.d.ts +106 -0
  516. package/types/trismegisto-angular-task-card.d.ts.map +1 -0
  517. package/types/trismegisto-angular-task-detail.d.ts +248 -0
  518. package/types/trismegisto-angular-task-detail.d.ts.map +1 -0
  519. package/types/trismegisto-angular-textarea.d.ts +31 -1
  520. package/types/trismegisto-angular-textarea.d.ts.map +1 -1
  521. package/types/trismegisto-angular-time-range.d.ts +92 -0
  522. package/types/trismegisto-angular-time-range.d.ts.map +1 -0
  523. package/types/trismegisto-angular-tour.d.ts +116 -0
  524. package/types/trismegisto-angular-tour.d.ts.map +1 -0
  525. package/types/trismegisto-angular-trace-waterfall.d.ts +111 -0
  526. package/types/trismegisto-angular-trace-waterfall.d.ts.map +1 -0
  527. package/types/trismegisto-angular-transaction.d.ts +542 -0
  528. package/types/trismegisto-angular-transaction.d.ts.map +1 -0
  529. package/types/trismegisto-angular-tree-select.d.ts +197 -0
  530. package/types/trismegisto-angular-tree-select.d.ts.map +1 -0
  531. package/types/trismegisto-angular-unsaved-changes.d.ts +101 -0
  532. package/types/trismegisto-angular-unsaved-changes.d.ts.map +1 -0
  533. package/types/trismegisto-angular-uptime-bar.d.ts +90 -0
  534. package/types/trismegisto-angular-uptime-bar.d.ts.map +1 -0
  535. package/types/trismegisto-angular-user-card.d.ts +126 -0
  536. package/types/trismegisto-angular-user-card.d.ts.map +1 -0
  537. package/types/trismegisto-angular-vehicle-plate.d.ts +107 -0
  538. package/types/trismegisto-angular-vehicle-plate.d.ts.map +1 -0
  539. package/types/trismegisto-angular-webhook.d.ts +244 -0
  540. package/types/trismegisto-angular-webhook.d.ts.map +1 -0
  541. package/types/trismegisto-angular-workflow-diagram.d.ts +136 -0
  542. package/types/trismegisto-angular-workflow-diagram.d.ts.map +1 -0
  543. package/types/trismegisto-angular-workflow-i18n.d.ts +358 -0
  544. package/types/trismegisto-angular-workflow-i18n.d.ts.map +1 -0
  545. package/types/trismegisto-angular-workload.d.ts +64 -0
  546. package/types/trismegisto-angular-workload.d.ts.map +1 -0
  547. package/types/trismegisto-angular-workspace.d.ts +79 -7
  548. package/types/trismegisto-angular-workspace.d.ts.map +1 -1
  549. package/types/trismegisto-angular.d.ts +119 -9
  550. package/types/trismegisto-angular.d.ts.map +1 -1
@@ -0,0 +1,183 @@
1
+ import * as i0 from '@angular/core';
2
+ import { model, input, booleanAttribute, computed, inject, ElementRef, signal, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { dateTimePartBounds, toIsoTimeValue, splitIsoDateTime, toIsoDate, joinIsoDateTime, isDateTimeOutOfRange, toIsoDateTime } from '@trismegisto/primitives';
4
+ import { HermesFormFieldBase } from '@trismegisto/angular/forms';
5
+ import { HermesI18nService } from '@trismegisto/angular/i18n';
6
+ import { ICON_EXCLAMATION_TRIANGLE, useHermesIcons, IconComponent } from '@trismegisto/angular/icon';
7
+ import { DatePickerComponent } from '@trismegisto/angular/date-picker';
8
+ import { TimePickerComponent } from '@trismegisto/angular/time-picker';
9
+
10
+ // Textos do hm-datetime-picker, fora do HERMES_MESSAGES de propósito: só entram no bundle de quem usa a peça.
11
+ const DATETIME_PICKER_MESSAGES_PT_BR = {
12
+ date: 'Data',
13
+ time: 'Hora',
14
+ incomplete: 'Informe a data e a hora.',
15
+ outOfRange: 'Data e hora fora do período permitido.',
16
+ };
17
+ const DATETIME_PICKER_MESSAGES_EN = {
18
+ date: 'Date',
19
+ time: 'Time',
20
+ incomplete: 'Enter both the date and the time.',
21
+ outOfRange: 'Date and time outside the allowed period.',
22
+ };
23
+ const DATETIME_PICKER_MESSAGES_ES = {
24
+ date: 'Fecha',
25
+ time: 'Hora',
26
+ incomplete: 'Indique la fecha y la hora.',
27
+ outOfRange: 'Fecha y hora fuera del período permitido.',
28
+ };
29
+ const DATETIME_PICKER_MESSAGES = {
30
+ 'pt-BR': DATETIME_PICKER_MESSAGES_PT_BR,
31
+ en: DATETIME_PICKER_MESSAGES_EN,
32
+ es: DATETIME_PICKER_MESSAGES_ES,
33
+ };
34
+
35
+ const DATETIME_PICKER_ICONS = [ICON_EXCLAMATION_TRIANGLE];
36
+
37
+ let sequence = 0;
38
+ /**
39
+ * Data e hora num campo só (início de um evento, agendamento). Junta o `hm-date-picker` (digitação com
40
+ * máscara e calendário) e o `hm-time-picker` (relógio do idioma e horários sugeridos) num grupo com um
41
+ * rótulo, e grava UM valor: ISO local `AAAA-MM-DDTHH:mm`, o do `<input type="datetime-local">` (sem fuso;
42
+ * a leitura aceita segundos, `Z` e espaço no lugar do `T`, sem converter o relógio).
43
+ *
44
+ * Enquanto só uma das partes está preenchida o valor é `null`; ao sair do grupo com uma parte faltando,
45
+ * aparece "Informe a data e a hora". `defaultTime` preenche a hora sozinho quando a pessoa escolhe a data.
46
+ * `min`/`max` (data com hora) limitam o calendário e, nos dias dos limites, os horários sugeridos; um
47
+ * conjunto fora do período não é gravado.
48
+ *
49
+ * Mesmo contrato dos outros campos (`HermesFormFieldBase`): Reactive Forms, `[(ngModel)]`, Signal Forms
50
+ * ou `[(value)]`.
51
+ */
52
+ class DateTimePickerComponent extends HermesFormFieldBase {
53
+ #icons = useHermesIcons(DATETIME_PICKER_ICONS);
54
+ value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
55
+ label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
56
+ labelHidden = input(false, { ...(ngDevMode ? { debugName: "labelHidden" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
57
+ hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
58
+ /** Primeiro instante aceito (`AAAA-MM-DDTHH:mm`). Número (o `min()` do Signal Forms) é ignorado. */
59
+ min = input(null, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
60
+ /** Último instante aceito (`AAAA-MM-DDTHH:mm`). Número é ignorado, como no `min`. */
61
+ max = input(null, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
62
+ /** Intervalo, em minutos, entre os horários sugeridos. */
63
+ interval = input(30, ...(ngDevMode ? [{ debugName: "interval" }] : /* istanbul ignore next */ []));
64
+ /** Força o relógio (`h12`/`h23`); `null` segue o idioma. */
65
+ hourCycle = input(null, ...(ngDevMode ? [{ debugName: "hourCycle" }] : /* istanbul ignore next */ []));
66
+ /** Hora preenchida sozinha quando a pessoa escolhe a data e a hora ainda está vazia (`HH:mm`). */
67
+ defaultTime = input(null, ...(ngDevMode ? [{ debugName: "defaultTime" }] : /* istanbul ignore next */ []));
68
+ /** Nome da parte de data (padrão: catálogo, "Data"). */
69
+ dateLabel = input('', ...(ngDevMode ? [{ debugName: "dateLabel" }] : /* istanbul ignore next */ []));
70
+ /** Nome da parte de hora (padrão: catálogo, "Hora"). */
71
+ timeLabel = input('', ...(ngDevMode ? [{ debugName: "timeLabel" }] : /* istanbul ignore next */ []));
72
+ /** Textos próprios (sobrescrevem os do catálogo da peça, por chave). */
73
+ texts = input({}, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
74
+ /** `min`/`max` em texto (o número que o Signal Forms liga é ignorado). */
75
+ minValue = computed(() => {
76
+ const v = this.min();
77
+ return typeof v === 'string' ? v : null;
78
+ }, ...(ngDevMode ? [{ debugName: "minValue" }] : /* istanbul ignore next */ []));
79
+ maxValue = computed(() => {
80
+ const v = this.max();
81
+ return typeof v === 'string' ? v : null;
82
+ }, ...(ngDevMode ? [{ debugName: "maxValue" }] : /* istanbul ignore next */ []));
83
+ #i18n = inject(HermesI18nService);
84
+ text = computed(() => ({
85
+ ...this.#i18n.pick(DATETIME_PICKER_MESSAGES, DATETIME_PICKER_MESSAGES_PT_BR),
86
+ ...this.texts(),
87
+ }), ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
88
+ valueModel = this.value;
89
+ id = `hm-datetime-${++sequence}`;
90
+ labelId = `${this.id}-label`;
91
+ hintId = `${this.id}-hint`;
92
+ errorId = `${this.id}-error`;
93
+ #host = inject(ElementRef).nativeElement;
94
+ /** As duas partes como a pessoa deixou (uma pode faltar). */
95
+ datePart = signal(null, ...(ngDevMode ? [{ debugName: "datePart" }] : /* istanbul ignore next */ []));
96
+ timePart = signal(null, ...(ngDevMode ? [{ debugName: "timePart" }] : /* istanbul ignore next */ []));
97
+ /** Último valor que este campo gravou: um `value` diferente veio de fora e reescreve as partes. */
98
+ #emitted = undefined;
99
+ bounds = computed(() => dateTimePartBounds(this.datePart(), this.minValue(), this.maxValue()), ...(ngDevMode ? [{ debugName: "bounds" }] : /* istanbul ignore next */ []));
100
+ #left = signal(false, ...(ngDevMode ? [{ debugName: "#left" }] : /* istanbul ignore next */ []));
101
+ #outOfRange = signal(false, ...(ngDevMode ? [{ debugName: "#outOfRange" }] : /* istanbul ignore next */ []));
102
+ incomplete = computed(() => this.#left() && !!this.datePart() !== !!toIsoTimeValue(this.timePart()), ...(ngDevMode ? [{ debugName: "incomplete" }] : /* istanbul ignore next */ []));
103
+ groupError = computed(() => {
104
+ if (this.#outOfRange())
105
+ return this.text().outOfRange;
106
+ if (this.incomplete())
107
+ return this.text().incomplete;
108
+ return this.errorText();
109
+ }, ...(ngDevMode ? [{ debugName: "groupError" }] : /* istanbul ignore next */ []));
110
+ describedBy = computed(() => [this.hint() ? this.hintId : '', this.groupError() ? this.errorId : ''].filter(Boolean).join(' ') || null, ...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
111
+ constructor() {
112
+ super();
113
+ effect(() => {
114
+ const value = this.value();
115
+ if (value === this.#emitted)
116
+ return;
117
+ untracked(() => this.#applyExternal(value));
118
+ });
119
+ }
120
+ writeValue(value) {
121
+ // Reset do formulário com o campo pela metade: o valor continua null, mas as partes precisam limpar.
122
+ this.#applyExternal(value);
123
+ super.writeValue(value);
124
+ }
125
+ #applyExternal(value) {
126
+ const parts = splitIsoDateTime(value);
127
+ this.datePart.set(parts.date);
128
+ this.timePart.set(parts.time);
129
+ this.#emitted = value ?? null;
130
+ this.#outOfRange.set(false);
131
+ this.#left.set(false);
132
+ }
133
+ onDate(date) {
134
+ this.datePart.set(toIsoDate(date));
135
+ const fallback = this.defaultTime();
136
+ if (this.datePart() && !this.timePart() && fallback)
137
+ this.timePart.set(toIsoTimeValue(fallback));
138
+ this.#sync();
139
+ }
140
+ onTime(time) {
141
+ this.timePart.set(toIsoTimeValue(time));
142
+ this.#sync();
143
+ }
144
+ /** Junta as partes e grava. Fora do período grava `null` (e mostra o erro); incompleto também é `null`. */
145
+ #sync() {
146
+ const joined = joinIsoDateTime(this.datePart(), this.timePart());
147
+ const outside = !!joined && isDateTimeOutOfRange(joined, this.minValue(), this.maxValue());
148
+ this.#outOfRange.set(outside);
149
+ const next = outside ? null : joined;
150
+ if (toIsoDateTime(this.value()) === next)
151
+ return;
152
+ const bound = this.activeControl();
153
+ const out = next ?? (bound?.defaultValue === '' ? '' : null);
154
+ this.#emitted = out;
155
+ this.commit(out);
156
+ }
157
+ onFocusOut(event) {
158
+ const next = event.relatedTarget;
159
+ if (next && this.#host.contains(next))
160
+ return;
161
+ // O calendário e a lista de horários moram no <body>: foco indo para eles não é sair do campo.
162
+ if (next instanceof Element && next.closest('.hm-date-popover, .hm-time-picker__list'))
163
+ return;
164
+ this.#left.set(true);
165
+ this.markTouched();
166
+ }
167
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: DateTimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
168
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: DateTimePickerComponent, isStandalone: true, selector: "hm-datetime-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, labelHidden: { classPropertyName: "labelHidden", publicName: "labelHidden", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null }, hourCycle: { classPropertyName: "hourCycle", publicName: "hourCycle", isSignal: true, isRequired: false, transformFunction: null }, defaultTime: { classPropertyName: "defaultTime", publicName: "defaultTime", isSignal: true, isRequired: false, transformFunction: null }, dateLabel: { classPropertyName: "dateLabel", publicName: "dateLabel", isSignal: true, isRequired: false, transformFunction: null }, timeLabel: { classPropertyName: "timeLabel", publicName: "timeLabel", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { listeners: { "focusout": "onFocusOut($event)" }, classAttribute: "hm-field hm-datetime-picker" }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"hm-field hm-datetime-picker__group\"\n role=\"group\"\n [attr.aria-labelledby]=\"labelId\"\n [attr.aria-describedby]=\"describedBy()\"\n [class.hm-datetime-picker__group--invalid]=\"!!groupError()\"\n>\n <div class=\"hm-field__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-field__label\" [id]=\"labelId\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-field__required\">{{ fieldText.required }}</span>\n }\n </div>\n\n <div class=\"hm-datetime-picker__parts\">\n <hm-date-picker\n class=\"hm-datetime-picker__date\"\n labelHidden\n [label]=\"dateLabel() || text().date\"\n [value]=\"datePart()\"\n [min]=\"bounds().minDate\"\n [max]=\"bounds().maxDate\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"onDate($event)\"\n />\n <hm-time-picker\n class=\"hm-datetime-picker__time\"\n labelHidden\n [label]=\"timeLabel() || text().time\"\n [value]=\"timePart()\"\n [min]=\"bounds().minTime\"\n [max]=\"bounds().maxTime\"\n [interval]=\"interval()\"\n [hourCycle]=\"hourCycle()\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"onTime($event)\"\n />\n </div>\n\n @if (hint()) {\n <p class=\"hm-field__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (groupError()) {\n <p class=\"hm-field__error\" [id]=\"errorId\" role=\"alert\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ groupError() }}\n </p>\n }\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: DatePickerComponent, selector: "hm-date-picker", inputs: ["value", "label", "labelHidden", "hint", "placeholder", "min", "max", "valueFormat"], outputs: ["valueChange"] }, { kind: "component", type: TimePickerComponent, selector: "hm-time-picker", inputs: ["value", "label", "labelHidden", "hint", "placeholder", "min", "max", "interval", "hourCycle"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
169
+ }
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: DateTimePickerComponent, decorators: [{
171
+ type: Component,
172
+ args: [{ selector: 'hm-datetime-picker', imports: [IconComponent, DatePickerComponent, TimePickerComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'hm-field hm-datetime-picker', '(focusout)': 'onFocusOut($event)' }, template: "<div\n class=\"hm-field hm-datetime-picker__group\"\n role=\"group\"\n [attr.aria-labelledby]=\"labelId\"\n [attr.aria-describedby]=\"describedBy()\"\n [class.hm-datetime-picker__group--invalid]=\"!!groupError()\"\n>\n <div class=\"hm-field__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-field__label\" [id]=\"labelId\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-field__required\">{{ fieldText.required }}</span>\n }\n </div>\n\n <div class=\"hm-datetime-picker__parts\">\n <hm-date-picker\n class=\"hm-datetime-picker__date\"\n labelHidden\n [label]=\"dateLabel() || text().date\"\n [value]=\"datePart()\"\n [min]=\"bounds().minDate\"\n [max]=\"bounds().maxDate\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"onDate($event)\"\n />\n <hm-time-picker\n class=\"hm-datetime-picker__time\"\n labelHidden\n [label]=\"timeLabel() || text().time\"\n [value]=\"timePart()\"\n [min]=\"bounds().minTime\"\n [max]=\"bounds().maxTime\"\n [interval]=\"interval()\"\n [hourCycle]=\"hourCycle()\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"onTime($event)\"\n />\n </div>\n\n @if (hint()) {\n <p class=\"hm-field__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (groupError()) {\n <p class=\"hm-field__error\" [id]=\"errorId\" role=\"alert\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ groupError() }}\n </p>\n }\n</div>\n" }]
173
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], labelHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelHidden", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], interval: [{ type: i0.Input, args: [{ isSignal: true, alias: "interval", required: false }] }], hourCycle: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourCycle", required: false }] }], defaultTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultTime", required: false }] }], dateLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateLabel", required: false }] }], timeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeLabel", required: false }] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
174
+
175
+ // Ponto de import `@trismegisto/angular/datetime-picker` (secundário do ng-packagr): o que o public-api e as outras pastas
176
+ // usam daqui. Ao criar arquivo público novo na pasta, acrescente a linha.
177
+
178
+ /**
179
+ * Generated bundle index. Do not edit.
180
+ */
181
+
182
+ export { DATETIME_PICKER_MESSAGES, DATETIME_PICKER_MESSAGES_EN, DATETIME_PICKER_MESSAGES_ES, DATETIME_PICKER_MESSAGES_PT_BR, DateTimePickerComponent };
183
+ //# sourceMappingURL=trismegisto-angular-datetime-picker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trismegisto-angular-datetime-picker.mjs","sources":["../../src/datetime-picker/datetime-picker-messages.ts","../../src/datetime-picker/icons.generated.ts","../../src/datetime-picker/datetime-picker.component.ts","../../src/datetime-picker/datetime-picker.component.html","../../src/datetime-picker/index.ts","../../src/datetime-picker/trismegisto-angular-datetime-picker.ts"],"sourcesContent":["// Textos do hm-datetime-picker, fora do HERMES_MESSAGES de propósito: só entram no bundle de quem usa a peça.\n\nexport interface DateTimePickerMessages {\n date: string;\n time: string;\n incomplete: string;\n outOfRange: string;\n}\n\nexport const DATETIME_PICKER_MESSAGES_PT_BR: DateTimePickerMessages = {\n date: 'Data',\n time: 'Hora',\n incomplete: 'Informe a data e a hora.',\n outOfRange: 'Data e hora fora do período permitido.',\n};\n\nexport const DATETIME_PICKER_MESSAGES_EN: DateTimePickerMessages = {\n date: 'Date',\n time: 'Time',\n incomplete: 'Enter both the date and the time.',\n outOfRange: 'Date and time outside the allowed period.',\n};\n\nexport const DATETIME_PICKER_MESSAGES_ES: DateTimePickerMessages = {\n date: 'Fecha',\n time: 'Hora',\n incomplete: 'Indique la fecha y la hora.',\n outOfRange: 'Fecha y hora fuera del período permitido.',\n};\n\nexport const DATETIME_PICKER_MESSAGES = {\n 'pt-BR': DATETIME_PICKER_MESSAGES_PT_BR,\n en: DATETIME_PICKER_MESSAGES_EN,\n es: DATETIME_PICKER_MESSAGES_ES,\n};\n","// GERADO por scripts/generate-internal-icons.mjs — não editar à mão.\n// Ícones que esta pasta usa por dentro; cada @Component/@Directive daqui os registra com\n// `readonly #icons = useHermesIcons(DATETIME_PICKER_ICONS);`.\nimport type { RegisteredIcon } from '@trismegisto/icons';\nimport {\n ICON_EXCLAMATION_TRIANGLE,\n} from '@trismegisto/angular/icon';\n\nexport const DATETIME_PICKER_ICONS: readonly RegisteredIcon[] = [ICON_EXCLAMATION_TRIANGLE];\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n signal,\n untracked,\n} from '@angular/core';\nimport {\n IsoTime,\n TimeHourCycle,\n dateTimePartBounds,\n isDateTimeOutOfRange,\n joinIsoDateTime,\n splitIsoDateTime,\n toIsoDate,\n toIsoDateTime,\n toIsoTimeValue,\n} from '@trismegisto/primitives';\nimport { HermesFormFieldBase } from '@trismegisto/angular/forms';\nimport { HermesI18nService } from '@trismegisto/angular/i18n';\nimport { DATETIME_PICKER_MESSAGES, DATETIME_PICKER_MESSAGES_PT_BR, DateTimePickerMessages } from './datetime-picker-messages';\nimport { IconComponent, useHermesIcons } from '@trismegisto/angular/icon';\nimport { DatePickerComponent } from '@trismegisto/angular/date-picker';\nimport { TimePickerComponent } from '@trismegisto/angular/time-picker';\nimport { DATETIME_PICKER_ICONS } from './icons.generated';\n\nlet sequence = 0;\n\n/**\n * Data e hora num campo só (início de um evento, agendamento). Junta o `hm-date-picker` (digitação com\n * máscara e calendário) e o `hm-time-picker` (relógio do idioma e horários sugeridos) num grupo com um\n * rótulo, e grava UM valor: ISO local `AAAA-MM-DDTHH:mm`, o do `<input type=\"datetime-local\">` (sem fuso;\n * a leitura aceita segundos, `Z` e espaço no lugar do `T`, sem converter o relógio).\n *\n * Enquanto só uma das partes está preenchida o valor é `null`; ao sair do grupo com uma parte faltando,\n * aparece \"Informe a data e a hora\". `defaultTime` preenche a hora sozinho quando a pessoa escolhe a data.\n * `min`/`max` (data com hora) limitam o calendário e, nos dias dos limites, os horários sugeridos; um\n * conjunto fora do período não é gravado.\n *\n * Mesmo contrato dos outros campos (`HermesFormFieldBase`): Reactive Forms, `[(ngModel)]`, Signal Forms\n * ou `[(value)]`.\n */\n@Component({\n selector: 'hm-datetime-picker',\n imports: [IconComponent, DatePickerComponent, TimePickerComponent],\n templateUrl: './datetime-picker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'hm-field hm-datetime-picker', '(focusout)': 'onFocusOut($event)' },\n})\nexport class DateTimePickerComponent extends HermesFormFieldBase<string | null> {\n readonly #icons = useHermesIcons(DATETIME_PICKER_ICONS);\n readonly value = model<string | null>(null);\n readonly label = input.required<string>();\n readonly labelHidden = input(false, { transform: booleanAttribute });\n readonly hint = input('');\n /** Primeiro instante aceito (`AAAA-MM-DDTHH:mm`). Número (o `min()` do Signal Forms) é ignorado. */\n readonly min = input<string | number | null | undefined>(null);\n /** Último instante aceito (`AAAA-MM-DDTHH:mm`). Número é ignorado, como no `min`. */\n readonly max = input<string | number | null | undefined>(null);\n /** Intervalo, em minutos, entre os horários sugeridos. */\n readonly interval = input(30);\n /** Força o relógio (`h12`/`h23`); `null` segue o idioma. */\n readonly hourCycle = input<TimeHourCycle | null>(null);\n /** Hora preenchida sozinha quando a pessoa escolhe a data e a hora ainda está vazia (`HH:mm`). */\n readonly defaultTime = input<IsoTime | null>(null);\n /** Nome da parte de data (padrão: catálogo, \"Data\"). */\n readonly dateLabel = input('');\n /** Nome da parte de hora (padrão: catálogo, \"Hora\"). */\n readonly timeLabel = input('');\n /** Textos próprios (sobrescrevem os do catálogo da peça, por chave). */\n readonly texts = input<Partial<DateTimePickerMessages>>({});\n\n /** `min`/`max` em texto (o número que o Signal Forms liga é ignorado). */\n protected readonly minValue = computed(() => {\n const v = this.min();\n return typeof v === 'string' ? v : null;\n });\n protected readonly maxValue = computed(() => {\n const v = this.max();\n return typeof v === 'string' ? v : null;\n });\n readonly #i18n = inject(HermesI18nService);\n protected readonly text = computed<DateTimePickerMessages>(() => ({\n ...this.#i18n.pick(DATETIME_PICKER_MESSAGES, DATETIME_PICKER_MESSAGES_PT_BR),\n ...this.texts(),\n }));\n protected readonly valueModel = this.value;\n protected readonly id = `hm-datetime-${++sequence}`;\n protected readonly labelId = `${this.id}-label`;\n protected readonly hintId = `${this.id}-hint`;\n protected readonly errorId = `${this.id}-error`;\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** As duas partes como a pessoa deixou (uma pode faltar). */\n protected readonly datePart = signal<string | null>(null);\n protected readonly timePart = signal<string | null>(null);\n /** Último valor que este campo gravou: um `value` diferente veio de fora e reescreve as partes. */\n #emitted: string | null | undefined = undefined;\n\n protected readonly bounds = computed(() => dateTimePartBounds(this.datePart(), this.minValue(), this.maxValue()));\n\n readonly #left = signal(false);\n readonly #outOfRange = signal(false);\n protected readonly incomplete = computed(() => this.#left() && !!this.datePart() !== !!toIsoTimeValue(this.timePart()));\n protected readonly groupError = computed(() => {\n if (this.#outOfRange()) return this.text().outOfRange;\n if (this.incomplete()) return this.text().incomplete;\n return this.errorText();\n });\n protected readonly describedBy = computed(\n () => [this.hint() ? this.hintId : '', this.groupError() ? this.errorId : ''].filter(Boolean).join(' ') || null,\n );\n\n constructor() {\n super();\n effect(() => {\n const value = this.value();\n if (value === this.#emitted) return;\n untracked(() => this.#applyExternal(value));\n });\n }\n\n override writeValue(value: string | null): void {\n // Reset do formulário com o campo pela metade: o valor continua null, mas as partes precisam limpar.\n this.#applyExternal(value);\n super.writeValue(value);\n }\n\n #applyExternal(value: unknown): void {\n const parts = splitIsoDateTime(value);\n this.datePart.set(parts.date);\n this.timePart.set(parts.time);\n this.#emitted = (value as string | null) ?? null;\n this.#outOfRange.set(false);\n this.#left.set(false);\n }\n\n protected onDate(date: string | null): void {\n this.datePart.set(toIsoDate(date));\n const fallback = this.defaultTime();\n if (this.datePart() && !this.timePart() && fallback) this.timePart.set(toIsoTimeValue(fallback));\n this.#sync();\n }\n\n protected onTime(time: string | null): void {\n this.timePart.set(toIsoTimeValue(time));\n this.#sync();\n }\n\n /** Junta as partes e grava. Fora do período grava `null` (e mostra o erro); incompleto também é `null`. */\n #sync(): void {\n const joined = joinIsoDateTime(this.datePart(), this.timePart());\n const outside = !!joined && isDateTimeOutOfRange(joined, this.minValue(), this.maxValue());\n this.#outOfRange.set(outside);\n const next = outside ? null : joined;\n if (toIsoDateTime(this.value()) === next) return;\n const bound = this.activeControl() as { defaultValue?: unknown } | null;\n const out = next ?? (bound?.defaultValue === '' ? '' : null);\n this.#emitted = out;\n this.commit(out);\n }\n\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (next && this.#host.contains(next)) return;\n // O calendário e a lista de horários moram no <body>: foco indo para eles não é sair do campo.\n if (next instanceof Element && next.closest('.hm-date-popover, .hm-time-picker__list')) return;\n this.#left.set(true);\n this.markTouched();\n }\n}\n","<div\n class=\"hm-field hm-datetime-picker__group\"\n role=\"group\"\n [attr.aria-labelledby]=\"labelId\"\n [attr.aria-describedby]=\"describedBy()\"\n [class.hm-datetime-picker__group--invalid]=\"!!groupError()\"\n>\n <div class=\"hm-field__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-field__label\" [id]=\"labelId\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-field__required\">{{ fieldText.required }}</span>\n }\n </div>\n\n <div class=\"hm-datetime-picker__parts\">\n <hm-date-picker\n class=\"hm-datetime-picker__date\"\n labelHidden\n [label]=\"dateLabel() || text().date\"\n [value]=\"datePart()\"\n [min]=\"bounds().minDate\"\n [max]=\"bounds().maxDate\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"onDate($event)\"\n />\n <hm-time-picker\n class=\"hm-datetime-picker__time\"\n labelHidden\n [label]=\"timeLabel() || text().time\"\n [value]=\"timePart()\"\n [min]=\"bounds().minTime\"\n [max]=\"bounds().maxTime\"\n [interval]=\"interval()\"\n [hourCycle]=\"hourCycle()\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"onTime($event)\"\n />\n </div>\n\n @if (hint()) {\n <p class=\"hm-field__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (groupError()) {\n <p class=\"hm-field__error\" [id]=\"errorId\" role=\"alert\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ groupError() }}\n </p>\n }\n</div>\n","// Ponto de import `@trismegisto/angular/datetime-picker` (secundário do ng-packagr): o que o public-api e as outras pastas\n// usam daqui. Ao criar arquivo público novo na pasta, acrescente a linha.\nexport * from './datetime-picker.component';\nexport * from './datetime-picker-messages';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;AASO,MAAM,8BAA8B,GAA2B;AACpE,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,UAAU,EAAE,0BAA0B;AACtC,IAAA,UAAU,EAAE,wCAAwC;;AAG/C,MAAM,2BAA2B,GAA2B;AACjE,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,UAAU,EAAE,mCAAmC;AAC/C,IAAA,UAAU,EAAE,2CAA2C;;AAGlD,MAAM,2BAA2B,GAA2B;AACjE,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,UAAU,EAAE,6BAA6B;AACzC,IAAA,UAAU,EAAE,2CAA2C;;AAGlD,MAAM,wBAAwB,GAAG;AACtC,IAAA,OAAO,EAAE,8BAA8B;AACvC,IAAA,EAAE,EAAE,2BAA2B;AAC/B,IAAA,EAAE,EAAE,2BAA2B;;;ACzB1B,MAAM,qBAAqB,GAA8B,CAAC,yBAAyB,CAAC;;ACwB3F,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;AAaG;AAQG,MAAO,uBAAwB,SAAQ,mBAAkC,CAAA;AACpE,IAAA,MAAM,GAAG,cAAc,CAAC,qBAAqB,CAAC;AAC9C,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;AAClC,IAAA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,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;+BACE,oBAAoB,EAAA,OAAA,EACrB,CAAC,aAAa,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAEjD,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAE,KAAK,EAAE,6BAA6B,EAAE,YAAY,EAAE,oBAAoB,EAAE,EAAA,QAAA,EAAA,q/CAAA,EAAA;;;AErDpF;AACA;;ACDA;;AAEG;;"}
@@ -0,0 +1,326 @@
1
+ import * as i0 from '@angular/core';
2
+ import { signal, inject, DestroyRef, effect, computed, input, output, ChangeDetectionStrategy, Component, booleanAttribute } from '@angular/core';
3
+ import { workflowTime, deadlineStatus, formatTimelineDate, formatCountdown, formatMessage, slaStatus } from '@trismegisto/primitives';
4
+ import { workflowMessages } from '@trismegisto/angular/workflow-i18n';
5
+ import { ICON_CHECK_CIRCLE, ICON_CLOCK, ICON_CLOCK_TIMER, ICON_EXCLAMATION_CIRCLE, ICON_EXCLAMATION_TRIANGLE, ICON_HOURGLASS, ICON_PAUSE, useHermesIcons, IconComponent } from '@trismegisto/angular/icon';
6
+
7
+ /**
8
+ * Relógio dos indicadores de prazo: devolve o "agora" em ms. Com `fixed()` (o input `now` do componente)
9
+ * preenchido, usa esse valor e não agenda nada (testes, capturas, servidor); senão, avança a cada
10
+ * `intervalMs()` enquanto `active()` for verdade. Chamar no contexto de injeção (campo da classe).
11
+ */
12
+ function hermesClock(fixed, intervalMs, active = () => true) {
13
+ const tick = signal(Date.now(), ...(ngDevMode ? [{ debugName: "tick" }] : /* istanbul ignore next */ []));
14
+ const destroyRef = inject(DestroyRef);
15
+ let timer = null;
16
+ const stop = () => {
17
+ if (timer !== null)
18
+ clearInterval(timer);
19
+ timer = null;
20
+ };
21
+ effect(() => {
22
+ const ms = intervalMs();
23
+ const run = workflowTime(fixed()) === null && active() && typeof window !== 'undefined';
24
+ stop();
25
+ if (!run)
26
+ return;
27
+ tick.set(Date.now());
28
+ timer = setInterval(() => tick.set(Date.now()), Math.max(250, ms));
29
+ });
30
+ destroyRef.onDestroy(stop);
31
+ return computed(() => workflowTime(fixed()) ?? tick());
32
+ }
33
+
34
+ const DEADLINE_ICONS = [ICON_CHECK_CIRCLE, ICON_CLOCK, ICON_CLOCK_TIMER, ICON_EXCLAMATION_CIRCLE, ICON_EXCLAMATION_TRIANGLE, ICON_HOURGLASS, ICON_PAUSE];
35
+
36
+ const TONE$1 = {
37
+ onTrack: 'neutral',
38
+ dueSoon: 'warning',
39
+ overdue: 'danger',
40
+ met: 'success',
41
+ late: 'danger',
42
+ };
43
+ const GLYPH$1 = {
44
+ onTrack: 'clock',
45
+ dueSoon: 'hourglass',
46
+ overdue: 'exclamation-triangle',
47
+ met: 'check-circle',
48
+ late: 'exclamation-circle',
49
+ };
50
+ /**
51
+ * Indicador de prazo e contagem regressiva.
52
+ *
53
+ * ```html
54
+ * <hm-deadline [due]="tarefa.prazo" />
55
+ * <hm-deadline [due]="leilao.fim" variant="countdown" (expired)="encerrar()" />
56
+ * <hm-deadline [due]="tarefa.prazo" [completedAt]="tarefa.concluidaEm" />
57
+ * ```
58
+ *
59
+ * - Situação (`deadlineStatus`): no prazo, vence logo (dentro de `soonHours`, padrão 24 h), atrasado e, com
60
+ * `completedAt`, concluído no prazo ou com atraso. A situação está no texto e no ícone, não só na cor.
61
+ * - O texto relativo ("Vence em 2 d 4 h", "Atrasado há 3 h") se atualiza sozinho (a cada minuto no selo, a cada
62
+ * segundo na contagem); a data absoluta vai junto para o leitor de tela e na dica do ponteiro.
63
+ * - `countdown` usa `role="timer"` (não anuncia cada segundo) e emite `expired` uma vez ao zerar.
64
+ * - `now` fixa o relógio (testes, servidor, capturas); vazio = hora atual.
65
+ */
66
+ class DeadlineComponent {
67
+ #icons = useHermesIcons(DEADLINE_ICONS);
68
+ due = input(null, ...(ngDevMode ? [{ debugName: "due" }] : /* istanbul ignore next */ []));
69
+ completedAt = input(null, ...(ngDevMode ? [{ debugName: "completedAt" }] : /* istanbul ignore next */ []));
70
+ variant = input('badge', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
71
+ /** Janela de "vence logo", em horas. */
72
+ soonHours = input(24, ...(ngDevMode ? [{ debugName: "soonHours" }] : /* istanbul ignore next */ []));
73
+ /** Fixa o "agora". Vazio = relógio real. */
74
+ now = input(null, ...(ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []));
75
+ /** A contagem chegou a zero (uma vez por prazo). */
76
+ expired = output();
77
+ /** Sobrescreve textos desta peça (parcial; o resto segue o idioma ativo). */
78
+ texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
79
+ #messages = workflowMessages(() => this.texts());
80
+ text = computed(() => this.#messages.workflow.deadline, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
81
+ #clock = hermesClock(() => this.now(), () => (this.variant() === 'countdown' ? 1000 : 60_000), () => !this.completedAt() && !!this.due());
82
+ status = computed(() => deadlineStatus(this.due(), this.#clock(), { soonMs: this.soonHours() * 3_600_000, completedAt: this.completedAt() }), ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
83
+ tone = computed(() => TONE$1[this.status()?.state ?? 'onTrack'], ...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
84
+ glyph = computed(() => (this.variant() === 'countdown' ? 'clock-timer' : GLYPH$1[this.status()?.state ?? 'onTrack']), ...(ngDevMode ? [{ debugName: "glyph" }] : /* istanbul ignore next */ []));
85
+ date = computed(() => formatTimelineDate(this.due(), this.#messages.meta.locale), ...(ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []));
86
+ phrase = computed(() => {
87
+ const status = this.status();
88
+ if (!status)
89
+ return '';
90
+ const text = this.text();
91
+ const locale = this.#messages.meta.locale;
92
+ const countdown = this.variant() === 'countdown';
93
+ const time = formatCountdown(status.remainingMs, locale, countdown ? { maxUnits: 4, seconds: true, unitDisplay: 'narrow' } : {});
94
+ switch (status.state) {
95
+ case 'met':
96
+ return text.met;
97
+ case 'late':
98
+ return formatMessage(text.late, { time });
99
+ case 'overdue':
100
+ return countdown ? text.expired : formatMessage(text.overdue, { time });
101
+ default:
102
+ return formatMessage(countdown ? text.countdown : text.dueIn, { time });
103
+ }
104
+ }, ...(ngDevMode ? [{ debugName: "phrase" }] : /* istanbul ignore next */ []));
105
+ #fired = null;
106
+ constructor() {
107
+ effect(() => {
108
+ const status = this.status();
109
+ const due = this.due();
110
+ if (this.variant() === 'countdown' && status?.state === 'overdue' && this.#fired !== due) {
111
+ this.#fired = due;
112
+ this.expired.emit();
113
+ }
114
+ });
115
+ }
116
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: DeadlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
117
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: DeadlineComponent, isStandalone: true, selector: "hm-deadline", inputs: { due: { classPropertyName: "due", publicName: "due", isSignal: true, isRequired: false, transformFunction: null }, completedAt: { classPropertyName: "completedAt", publicName: "completedAt", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, soonHours: { classPropertyName: "soonHours", publicName: "soonHours", isSignal: true, isRequired: false, transformFunction: null }, now: { classPropertyName: "now", publicName: "now", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expired: "expired" }, host: { classAttribute: "hm-deadline-host" }, ngImport: i0, template: `
118
+ @if (status(); as status) {
119
+ <span
120
+ [class]="'hm-deadline hm-deadline--' + variant() + ' hm-deadline--' + tone()"
121
+ [attr.role]="variant() === 'countdown' ? 'timer' : null"
122
+ [attr.title]="date()?.text"
123
+ >
124
+ <hm-icon class="hm-deadline__icon" [shape]="glyph()" />
125
+ <span class="hm-deadline__text">{{ phrase() }}</span>
126
+ @if (date(); as date) {
127
+ <span class="hm-visually-hidden">, <time [attr.datetime]="date.iso">{{ date.text }}</time></span>
128
+ }
129
+ </span>
130
+ } @else {
131
+ <span class="hm-deadline hm-deadline--badge hm-deadline--none">{{ text().none }}</span>
132
+ }
133
+ `, isInline: true, dependencies: [{ kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
134
+ }
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: DeadlineComponent, decorators: [{
136
+ type: Component,
137
+ args: [{
138
+ selector: 'hm-deadline',
139
+ imports: [IconComponent],
140
+ changeDetection: ChangeDetectionStrategy.OnPush,
141
+ host: { class: 'hm-deadline-host' },
142
+ template: `
143
+ @if (status(); as status) {
144
+ <span
145
+ [class]="'hm-deadline hm-deadline--' + variant() + ' hm-deadline--' + tone()"
146
+ [attr.role]="variant() === 'countdown' ? 'timer' : null"
147
+ [attr.title]="date()?.text"
148
+ >
149
+ <hm-icon class="hm-deadline__icon" [shape]="glyph()" />
150
+ <span class="hm-deadline__text">{{ phrase() }}</span>
151
+ @if (date(); as date) {
152
+ <span class="hm-visually-hidden">, <time [attr.datetime]="date.iso">{{ date.text }}</time></span>
153
+ }
154
+ </span>
155
+ } @else {
156
+ <span class="hm-deadline hm-deadline--badge hm-deadline--none">{{ text().none }}</span>
157
+ }
158
+ `,
159
+ }]
160
+ }], ctorParameters: () => [], propDecorators: { due: [{ type: i0.Input, args: [{ isSignal: true, alias: "due", required: false }] }], completedAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "completedAt", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], soonHours: [{ type: i0.Input, args: [{ isSignal: true, alias: "soonHours", required: false }] }], now: [{ type: i0.Input, args: [{ isSignal: true, alias: "now", required: false }] }], expired: [{ type: i0.Output, args: ["expired"] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
161
+
162
+ const TONE = {
163
+ onTrack: 'success',
164
+ atRisk: 'warning',
165
+ breached: 'danger',
166
+ paused: 'neutral',
167
+ met: 'success',
168
+ missed: 'danger',
169
+ };
170
+ const GLYPH = {
171
+ onTrack: 'clock',
172
+ atRisk: 'hourglass',
173
+ breached: 'exclamation-triangle',
174
+ paused: 'pause',
175
+ met: 'check-circle',
176
+ missed: 'exclamation-circle',
177
+ };
178
+ const STATE_KEY = {
179
+ onTrack: 'onTrack',
180
+ atRisk: 'atRisk',
181
+ breached: 'breached',
182
+ paused: 'paused',
183
+ met: 'slaMet',
184
+ missed: 'slaMissed',
185
+ };
186
+ /**
187
+ * Indicador de SLA: quanto do tempo-alvo já foi consumido, a situação (no prazo, em risco, estourado,
188
+ * pausado, cumprido, descumprido) e o tempo que resta (ou passou).
189
+ *
190
+ * ```html
191
+ * <hm-sla label="Primeira resposta" [start]="chamado.abertoEm" [due]="chamado.respostaAte" />
192
+ * <hm-sla [start]="inicio" [due]="meta" [pausedMs]="aguardandoCliente" [paused]="aguardando" />
193
+ * ```
194
+ *
195
+ * - A barra é um `role="meter"` com o percentual consumido (`aria-valuetext` com a situação e o restante);
196
+ * passa de 100 % visualmente cheia, em perigo.
197
+ * - `pausedMs` desconta o tempo parado; `paused` congela a situação em "Pausado"; `atRiskRatio` (padrão
198
+ * 0,75) decide quando vira "Em risco". Regra em `slaStatus` (`@trismegisto/primitives`).
199
+ * - Atualiza sozinho a cada minuto enquanto corre; `now` fixa o relógio.
200
+ */
201
+ class SlaComponent {
202
+ #icons = useHermesIcons(DEADLINE_ICONS);
203
+ start = input(null, ...(ngDevMode ? [{ debugName: "start" }] : /* istanbul ignore next */ []));
204
+ due = input(null, ...(ngDevMode ? [{ debugName: "due" }] : /* istanbul ignore next */ []));
205
+ completedAt = input(null, ...(ngDevMode ? [{ debugName: "completedAt" }] : /* istanbul ignore next */ []));
206
+ /** Tempo já parado (ms) que não conta. */
207
+ pausedMs = input(0, ...(ngDevMode ? [{ debugName: "pausedMs" }] : /* istanbul ignore next */ []));
208
+ paused = input(false, { ...(ngDevMode ? { debugName: "paused" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
209
+ atRiskRatio = input(0.75, ...(ngDevMode ? [{ debugName: "atRiskRatio" }] : /* istanbul ignore next */ []));
210
+ /** Nome do SLA ("Primeira resposta"). Vazio = "SLA". */
211
+ label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
212
+ /** Sem a linha de restante/meta (listas). */
213
+ compact = input(false, { ...(ngDevMode ? { debugName: "compact" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
214
+ now = input(null, ...(ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []));
215
+ /** Sobrescreve textos desta peça (parcial; o resto segue o idioma ativo). */
216
+ texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
217
+ #messages = workflowMessages(() => this.texts());
218
+ text = computed(() => this.#messages.workflow.deadline, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
219
+ #clock = hermesClock(() => this.now(), () => 60_000, () => !this.completedAt() && !this.paused());
220
+ status = computed(() => slaStatus({
221
+ start: this.start(),
222
+ due: this.due(),
223
+ now: this.#clock(),
224
+ completedAt: this.completedAt(),
225
+ pausedMs: this.pausedMs(),
226
+ paused: this.paused(),
227
+ atRiskRatio: this.atRiskRatio(),
228
+ }), ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
229
+ tone = computed(() => TONE[this.status()?.state ?? 'onTrack'], ...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
230
+ glyph = computed(() => GLYPH[this.status()?.state ?? 'onTrack'], ...(ngDevMode ? [{ debugName: "glyph" }] : /* istanbul ignore next */ []));
231
+ stateText = computed(() => this.text()[STATE_KEY[this.status()?.state ?? 'onTrack']], ...(ngDevMode ? [{ debugName: "stateText" }] : /* istanbul ignore next */ []));
232
+ percent = computed(() => Math.round((this.status()?.ratio ?? 0) * 100), ...(ngDevMode ? [{ debugName: "percent" }] : /* istanbul ignore next */ []));
233
+ fill = computed(() => Math.min(100, Math.max(0, this.percent())), ...(ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []));
234
+ #format = (ms) => formatCountdown(ms, this.#messages.meta.locale);
235
+ remainingText = computed(() => {
236
+ const status = this.status();
237
+ if (!status)
238
+ return '';
239
+ const time = this.#format(status.remainingMs);
240
+ return formatMessage(status.remainingMs >= 0 ? this.text().remaining : this.text().over, { time });
241
+ }, ...(ngDevMode ? [{ debugName: "remainingText" }] : /* istanbul ignore next */ []));
242
+ targetText = computed(() => formatMessage(this.text().target, { time: this.#format(this.status()?.targetMs ?? 0) }), ...(ngDevMode ? [{ debugName: "targetText" }] : /* istanbul ignore next */ []));
243
+ valueText = computed(() => {
244
+ const percent = new Intl.NumberFormat(this.#messages.meta.locale, { style: 'percent' }).format((this.status()?.ratio ?? 0));
245
+ return `${this.stateText()}. ${formatMessage(this.text().consumed, { percent })}. ${this.remainingText()}`;
246
+ }, ...(ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []));
247
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: SlaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
248
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: SlaComponent, isStandalone: true, selector: "hm-sla", inputs: { start: { classPropertyName: "start", publicName: "start", isSignal: true, isRequired: false, transformFunction: null }, due: { classPropertyName: "due", publicName: "due", isSignal: true, isRequired: false, transformFunction: null }, completedAt: { classPropertyName: "completedAt", publicName: "completedAt", isSignal: true, isRequired: false, transformFunction: null }, pausedMs: { classPropertyName: "pausedMs", publicName: "pausedMs", isSignal: true, isRequired: false, transformFunction: null }, paused: { classPropertyName: "paused", publicName: "paused", isSignal: true, isRequired: false, transformFunction: null }, atRiskRatio: { classPropertyName: "atRiskRatio", publicName: "atRiskRatio", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, now: { classPropertyName: "now", publicName: "now", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "hm-sla-host" }, ngImport: i0, template: `
249
+ @if (status(); as status) {
250
+ <div [class]="'hm-sla hm-sla--' + tone()" [class.hm-sla--compact]="compact()">
251
+ <div class="hm-sla__header">
252
+ <span class="hm-sla__label">{{ label() || text().sla }}</span>
253
+ <span class="hm-sla__state">
254
+ <hm-icon class="hm-sla__icon" [shape]="glyph()" />
255
+ {{ stateText() }}
256
+ </span>
257
+ </div>
258
+ <div
259
+ class="hm-sla__track"
260
+ role="meter"
261
+ aria-valuemin="0"
262
+ aria-valuemax="100"
263
+ [attr.aria-valuenow]="percent()"
264
+ [attr.aria-valuetext]="valueText()"
265
+ [attr.aria-label]="label() || text().sla"
266
+ >
267
+ <span class="hm-sla__fill" [style.inline-size.%]="fill()"></span>
268
+ </div>
269
+ @if (!compact()) {
270
+ <div class="hm-sla__footer">
271
+ <span>{{ remainingText() }}</span>
272
+ <span>{{ targetText() }}</span>
273
+ </div>
274
+ }
275
+ </div>
276
+ }
277
+ `, isInline: true, dependencies: [{ kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
278
+ }
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: SlaComponent, decorators: [{
280
+ type: Component,
281
+ args: [{
282
+ selector: 'hm-sla',
283
+ imports: [IconComponent],
284
+ changeDetection: ChangeDetectionStrategy.OnPush,
285
+ host: { class: 'hm-sla-host' },
286
+ template: `
287
+ @if (status(); as status) {
288
+ <div [class]="'hm-sla hm-sla--' + tone()" [class.hm-sla--compact]="compact()">
289
+ <div class="hm-sla__header">
290
+ <span class="hm-sla__label">{{ label() || text().sla }}</span>
291
+ <span class="hm-sla__state">
292
+ <hm-icon class="hm-sla__icon" [shape]="glyph()" />
293
+ {{ stateText() }}
294
+ </span>
295
+ </div>
296
+ <div
297
+ class="hm-sla__track"
298
+ role="meter"
299
+ aria-valuemin="0"
300
+ aria-valuemax="100"
301
+ [attr.aria-valuenow]="percent()"
302
+ [attr.aria-valuetext]="valueText()"
303
+ [attr.aria-label]="label() || text().sla"
304
+ >
305
+ <span class="hm-sla__fill" [style.inline-size.%]="fill()"></span>
306
+ </div>
307
+ @if (!compact()) {
308
+ <div class="hm-sla__footer">
309
+ <span>{{ remainingText() }}</span>
310
+ <span>{{ targetText() }}</span>
311
+ </div>
312
+ }
313
+ </div>
314
+ }
315
+ `,
316
+ }]
317
+ }], propDecorators: { start: [{ type: i0.Input, args: [{ isSignal: true, alias: "start", required: false }] }], due: [{ type: i0.Input, args: [{ isSignal: true, alias: "due", required: false }] }], completedAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "completedAt", required: false }] }], pausedMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "pausedMs", required: false }] }], paused: [{ type: i0.Input, args: [{ isSignal: true, alias: "paused", required: false }] }], atRiskRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "atRiskRatio", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], now: [{ type: i0.Input, args: [{ isSignal: true, alias: "now", required: false }] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
318
+
319
+ // Ponto de import `@trismegisto/angular/deadline` (secundário do ng-packagr).
320
+
321
+ /**
322
+ * Generated bundle index. Do not edit.
323
+ */
324
+
325
+ export { DeadlineComponent, SlaComponent, hermesClock };
326
+ //# sourceMappingURL=trismegisto-angular-deadline.mjs.map