@forgeroute/ui 0.5.16 → 0.5.18

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 (345) hide show
  1. package/fesm2022/forgeroute-ui-action-bar.mjs +190 -0
  2. package/fesm2022/forgeroute-ui-action-bar.mjs.map +1 -0
  3. package/fesm2022/forgeroute-ui-address-input.mjs +1164 -0
  4. package/fesm2022/forgeroute-ui-address-input.mjs.map +1 -0
  5. package/fesm2022/forgeroute-ui-alert.mjs +223 -0
  6. package/fesm2022/forgeroute-ui-alert.mjs.map +1 -0
  7. package/fesm2022/forgeroute-ui-avatar.mjs +320 -0
  8. package/fesm2022/forgeroute-ui-avatar.mjs.map +1 -0
  9. package/fesm2022/forgeroute-ui-badge.mjs +158 -0
  10. package/fesm2022/forgeroute-ui-badge.mjs.map +1 -0
  11. package/fesm2022/forgeroute-ui-bar-row.mjs +255 -0
  12. package/fesm2022/forgeroute-ui-bar-row.mjs.map +1 -0
  13. package/fesm2022/forgeroute-ui-boards.mjs +2201 -0
  14. package/fesm2022/forgeroute-ui-boards.mjs.map +1 -0
  15. package/fesm2022/forgeroute-ui-bulk-eligible.mjs +172 -0
  16. package/fesm2022/forgeroute-ui-bulk-eligible.mjs.map +1 -0
  17. package/fesm2022/forgeroute-ui-business-hours.mjs +771 -0
  18. package/fesm2022/forgeroute-ui-business-hours.mjs.map +1 -0
  19. package/fesm2022/forgeroute-ui-calendar.mjs +2006 -0
  20. package/fesm2022/forgeroute-ui-calendar.mjs.map +1 -0
  21. package/fesm2022/forgeroute-ui-card-list-item.mjs +556 -0
  22. package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -0
  23. package/fesm2022/forgeroute-ui-charts.mjs +1 -1
  24. package/fesm2022/forgeroute-ui-charts.mjs.map +1 -1
  25. package/fesm2022/forgeroute-ui-checkbox.mjs +815 -0
  26. package/fesm2022/forgeroute-ui-checkbox.mjs.map +1 -0
  27. package/fesm2022/forgeroute-ui-chip.mjs +379 -0
  28. package/fesm2022/forgeroute-ui-chip.mjs.map +1 -0
  29. package/fesm2022/forgeroute-ui-color-input.mjs +492 -0
  30. package/fesm2022/forgeroute-ui-color-input.mjs.map +1 -0
  31. package/fesm2022/forgeroute-ui-column-filter.mjs +645 -0
  32. package/fesm2022/forgeroute-ui-column-filter.mjs.map +1 -0
  33. package/fesm2022/forgeroute-ui-columns.mjs +351 -0
  34. package/fesm2022/forgeroute-ui-columns.mjs.map +1 -0
  35. package/fesm2022/forgeroute-ui-combobox.mjs +772 -0
  36. package/fesm2022/forgeroute-ui-combobox.mjs.map +1 -0
  37. package/fesm2022/forgeroute-ui-confirm.mjs +48 -0
  38. package/fesm2022/forgeroute-ui-confirm.mjs.map +1 -0
  39. package/fesm2022/forgeroute-ui-contact-picker.mjs +865 -0
  40. package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -0
  41. package/fesm2022/forgeroute-ui-conversations.mjs +3627 -0
  42. package/fesm2022/forgeroute-ui-conversations.mjs.map +1 -0
  43. package/fesm2022/forgeroute-ui-copy-field.mjs +378 -0
  44. package/fesm2022/forgeroute-ui-copy-field.mjs.map +1 -0
  45. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Dzj_XJJM.mjs → forgeroute-ui-core-ui-labels.es-Woi3az70.mjs} +186 -2
  46. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Dzj_XJJM.mjs.map → forgeroute-ui-core-ui-labels.es-Woi3az70.mjs.map} +1 -1
  47. package/fesm2022/forgeroute-ui-core.mjs +186 -2
  48. package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
  49. package/fesm2022/forgeroute-ui-data-table-core.mjs +6150 -0
  50. package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -0
  51. package/fesm2022/forgeroute-ui-date-input.mjs +384 -0
  52. package/fesm2022/forgeroute-ui-date-input.mjs.map +1 -0
  53. package/fesm2022/forgeroute-ui-date-range-picker.mjs +453 -0
  54. package/fesm2022/forgeroute-ui-date-range-picker.mjs.map +1 -0
  55. package/fesm2022/forgeroute-ui-datetime-input.mjs +375 -0
  56. package/fesm2022/forgeroute-ui-datetime-input.mjs.map +1 -0
  57. package/fesm2022/forgeroute-ui-detail-card.mjs +655 -0
  58. package/fesm2022/forgeroute-ui-detail-card.mjs.map +1 -0
  59. package/fesm2022/forgeroute-ui-discount-selector.mjs +259 -0
  60. package/fesm2022/forgeroute-ui-discount-selector.mjs.map +1 -0
  61. package/fesm2022/forgeroute-ui-divider.mjs +111 -0
  62. package/fesm2022/forgeroute-ui-divider.mjs.map +1 -0
  63. package/fesm2022/forgeroute-ui-dropdown.mjs +550 -0
  64. package/fesm2022/forgeroute-ui-dropdown.mjs.map +1 -0
  65. package/fesm2022/forgeroute-ui-editor.mjs +4545 -0
  66. package/fesm2022/forgeroute-ui-editor.mjs.map +1 -0
  67. package/fesm2022/forgeroute-ui-empty-state.mjs +231 -0
  68. package/fesm2022/forgeroute-ui-empty-state.mjs.map +1 -0
  69. package/fesm2022/forgeroute-ui-error-state.mjs +195 -0
  70. package/fesm2022/forgeroute-ui-error-state.mjs.map +1 -0
  71. package/fesm2022/forgeroute-ui-error.mjs +93 -0
  72. package/fesm2022/forgeroute-ui-error.mjs.map +1 -0
  73. package/fesm2022/forgeroute-ui-fade.mjs +117 -0
  74. package/fesm2022/forgeroute-ui-fade.mjs.map +1 -0
  75. package/fesm2022/forgeroute-ui-file-input.mjs +999 -0
  76. package/fesm2022/forgeroute-ui-file-input.mjs.map +1 -0
  77. package/fesm2022/forgeroute-ui-fixed-footer.mjs +115 -0
  78. package/fesm2022/forgeroute-ui-fixed-footer.mjs.map +1 -0
  79. package/fesm2022/forgeroute-ui-form-row.mjs +126 -0
  80. package/fesm2022/forgeroute-ui-form-row.mjs.map +1 -0
  81. package/fesm2022/forgeroute-ui-form-section.mjs +93 -0
  82. package/fesm2022/forgeroute-ui-form-section.mjs.map +1 -0
  83. package/fesm2022/forgeroute-ui-form.mjs +139 -0
  84. package/fesm2022/forgeroute-ui-form.mjs.map +1 -0
  85. package/fesm2022/forgeroute-ui-hint.mjs +47 -0
  86. package/fesm2022/forgeroute-ui-hint.mjs.map +1 -0
  87. package/fesm2022/forgeroute-ui-icon-picker.mjs +424 -0
  88. package/fesm2022/forgeroute-ui-icon-picker.mjs.map +1 -0
  89. package/fesm2022/forgeroute-ui-icon.mjs +311 -0
  90. package/fesm2022/forgeroute-ui-icon.mjs.map +1 -0
  91. package/fesm2022/forgeroute-ui-image-preview.mjs +237 -0
  92. package/fesm2022/forgeroute-ui-image-preview.mjs.map +1 -0
  93. package/fesm2022/forgeroute-ui-keypad.mjs +278 -0
  94. package/fesm2022/forgeroute-ui-keypad.mjs.map +1 -0
  95. package/fesm2022/forgeroute-ui-kpi-card.mjs +490 -0
  96. package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -0
  97. package/fesm2022/forgeroute-ui-language-switcher.mjs +134 -0
  98. package/fesm2022/forgeroute-ui-language-switcher.mjs.map +1 -0
  99. package/fesm2022/forgeroute-ui-layout.mjs +18 -0
  100. package/fesm2022/forgeroute-ui-layout.mjs.map +1 -0
  101. package/fesm2022/forgeroute-ui-list-item.mjs +620 -0
  102. package/fesm2022/forgeroute-ui-list-item.mjs.map +1 -0
  103. package/fesm2022/forgeroute-ui-list.mjs +866 -0
  104. package/fesm2022/forgeroute-ui-list.mjs.map +1 -0
  105. package/fesm2022/forgeroute-ui-live-region.mjs +118 -0
  106. package/fesm2022/forgeroute-ui-live-region.mjs.map +1 -0
  107. package/fesm2022/forgeroute-ui-map.mjs +5 -1
  108. package/fesm2022/forgeroute-ui-map.mjs.map +1 -1
  109. package/fesm2022/forgeroute-ui-maps.mjs +2 -1
  110. package/fesm2022/forgeroute-ui-maps.mjs.map +1 -1
  111. package/fesm2022/forgeroute-ui-media.mjs +4615 -0
  112. package/fesm2022/forgeroute-ui-media.mjs.map +1 -0
  113. package/fesm2022/forgeroute-ui-messaging.mjs +20 -1
  114. package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
  115. package/fesm2022/forgeroute-ui-more-menu.mjs +418 -0
  116. package/fesm2022/forgeroute-ui-more-menu.mjs.map +1 -0
  117. package/fesm2022/forgeroute-ui-multi-select.mjs +532 -0
  118. package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -0
  119. package/fesm2022/forgeroute-ui-notes.mjs +768 -0
  120. package/fesm2022/forgeroute-ui-notes.mjs.map +1 -0
  121. package/fesm2022/forgeroute-ui-notification-bell.mjs +587 -0
  122. package/fesm2022/forgeroute-ui-notification-bell.mjs.map +1 -0
  123. package/fesm2022/forgeroute-ui-offline-banner.mjs +156 -0
  124. package/fesm2022/forgeroute-ui-offline-banner.mjs.map +1 -0
  125. package/fesm2022/forgeroute-ui-option-card.mjs +379 -0
  126. package/fesm2022/forgeroute-ui-option-card.mjs.map +1 -0
  127. package/fesm2022/forgeroute-ui-page.mjs +317 -0
  128. package/fesm2022/forgeroute-ui-page.mjs.map +1 -0
  129. package/fesm2022/forgeroute-ui-pagination.mjs +225 -0
  130. package/fesm2022/forgeroute-ui-pagination.mjs.map +1 -0
  131. package/fesm2022/forgeroute-ui-panel-info-list.mjs +422 -0
  132. package/fesm2022/forgeroute-ui-panel-info-list.mjs.map +1 -0
  133. package/fesm2022/forgeroute-ui-password-requirements.mjs +237 -0
  134. package/fesm2022/forgeroute-ui-password-requirements.mjs.map +1 -0
  135. package/fesm2022/forgeroute-ui-payments.mjs +6258 -0
  136. package/fesm2022/forgeroute-ui-payments.mjs.map +1 -0
  137. package/fesm2022/forgeroute-ui-pdf.mjs +9 -1
  138. package/fesm2022/forgeroute-ui-pdf.mjs.map +1 -1
  139. package/fesm2022/forgeroute-ui-phone-number-picker.mjs +840 -0
  140. package/fesm2022/forgeroute-ui-phone-number-picker.mjs.map +1 -0
  141. package/fesm2022/forgeroute-ui-pill-tabs.mjs +546 -0
  142. package/fesm2022/forgeroute-ui-pill-tabs.mjs.map +1 -0
  143. package/fesm2022/forgeroute-ui-print.mjs +76 -0
  144. package/fesm2022/forgeroute-ui-print.mjs.map +1 -0
  145. package/fesm2022/forgeroute-ui-progress-bar.mjs +252 -0
  146. package/fesm2022/forgeroute-ui-progress-bar.mjs.map +1 -0
  147. package/fesm2022/forgeroute-ui-progress-ring.mjs +277 -0
  148. package/fesm2022/forgeroute-ui-progress-ring.mjs.map +1 -0
  149. package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs +301 -0
  150. package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs.map +1 -0
  151. package/fesm2022/forgeroute-ui-quickbooks.mjs +18 -1
  152. package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
  153. package/fesm2022/forgeroute-ui-radio-matrix.mjs +471 -0
  154. package/fesm2022/forgeroute-ui-radio-matrix.mjs.map +1 -0
  155. package/fesm2022/forgeroute-ui-radio.mjs +911 -0
  156. package/fesm2022/forgeroute-ui-radio.mjs.map +1 -0
  157. package/fesm2022/forgeroute-ui-read-only-mode.mjs +15 -0
  158. package/fesm2022/forgeroute-ui-read-only-mode.mjs.map +1 -0
  159. package/fesm2022/forgeroute-ui-readonly-fieldset.mjs +146 -0
  160. package/fesm2022/forgeroute-ui-readonly-fieldset.mjs.map +1 -0
  161. package/fesm2022/forgeroute-ui-reminder-alerts.mjs +249 -0
  162. package/fesm2022/forgeroute-ui-reminder-alerts.mjs.map +1 -0
  163. package/fesm2022/forgeroute-ui-search-input.mjs +373 -0
  164. package/fesm2022/forgeroute-ui-search-input.mjs.map +1 -0
  165. package/fesm2022/forgeroute-ui-section-header.mjs +296 -0
  166. package/fesm2022/forgeroute-ui-section-header.mjs.map +1 -0
  167. package/fesm2022/forgeroute-ui-select.mjs +498 -0
  168. package/fesm2022/forgeroute-ui-select.mjs.map +1 -0
  169. package/fesm2022/forgeroute-ui-setup.mjs +4649 -0
  170. package/fesm2022/forgeroute-ui-setup.mjs.map +1 -0
  171. package/fesm2022/forgeroute-ui-share-menu.mjs +461 -0
  172. package/fesm2022/forgeroute-ui-share-menu.mjs.map +1 -0
  173. package/fesm2022/forgeroute-ui-shell.mjs +981 -0
  174. package/fesm2022/forgeroute-ui-shell.mjs.map +1 -0
  175. package/fesm2022/forgeroute-ui-show.mjs +129 -0
  176. package/fesm2022/forgeroute-ui-show.mjs.map +1 -0
  177. package/fesm2022/forgeroute-ui-sidebar-layout.mjs +355 -0
  178. package/fesm2022/forgeroute-ui-sidebar-layout.mjs.map +1 -0
  179. package/fesm2022/forgeroute-ui-skeleton.mjs +152 -0
  180. package/fesm2022/forgeroute-ui-skeleton.mjs.map +1 -0
  181. package/fesm2022/forgeroute-ui-skip-link.mjs +129 -0
  182. package/fesm2022/forgeroute-ui-skip-link.mjs.map +1 -0
  183. package/fesm2022/forgeroute-ui-snackbar.mjs +200 -0
  184. package/fesm2022/forgeroute-ui-snackbar.mjs.map +1 -0
  185. package/fesm2022/forgeroute-ui-square.mjs +15 -1
  186. package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
  187. package/fesm2022/forgeroute-ui-stack.mjs +233 -0
  188. package/fesm2022/forgeroute-ui-stack.mjs.map +1 -0
  189. package/fesm2022/forgeroute-ui-stacked-bar.mjs +200 -0
  190. package/fesm2022/forgeroute-ui-stacked-bar.mjs.map +1 -0
  191. package/fesm2022/forgeroute-ui-stacking-plan.mjs +365 -0
  192. package/fesm2022/forgeroute-ui-stacking-plan.mjs.map +1 -0
  193. package/fesm2022/forgeroute-ui-star-rating.mjs +498 -0
  194. package/fesm2022/forgeroute-ui-star-rating.mjs.map +1 -0
  195. package/fesm2022/forgeroute-ui-star.mjs +184 -0
  196. package/fesm2022/forgeroute-ui-star.mjs.map +1 -0
  197. package/fesm2022/forgeroute-ui-stepper.mjs +615 -0
  198. package/fesm2022/forgeroute-ui-stepper.mjs.map +1 -0
  199. package/fesm2022/forgeroute-ui-stripe.mjs +6254 -1188
  200. package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
  201. package/fesm2022/forgeroute-ui-swatch-picker.mjs +416 -0
  202. package/fesm2022/forgeroute-ui-swatch-picker.mjs.map +1 -0
  203. package/fesm2022/forgeroute-ui-table-toolbar.mjs +770 -0
  204. package/fesm2022/forgeroute-ui-table-toolbar.mjs.map +1 -0
  205. package/fesm2022/forgeroute-ui-table-types.mjs +277 -0
  206. package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -0
  207. package/fesm2022/forgeroute-ui-text-input.mjs +1003 -0
  208. package/fesm2022/forgeroute-ui-text-input.mjs.map +1 -0
  209. package/fesm2022/forgeroute-ui-text-template-picker.mjs +356 -0
  210. package/fesm2022/forgeroute-ui-text-template-picker.mjs.map +1 -0
  211. package/fesm2022/forgeroute-ui-text.mjs +195 -0
  212. package/fesm2022/forgeroute-ui-text.mjs.map +1 -0
  213. package/fesm2022/forgeroute-ui-textarea-input.mjs +542 -0
  214. package/fesm2022/forgeroute-ui-textarea-input.mjs.map +1 -0
  215. package/fesm2022/forgeroute-ui-time-input.mjs +401 -0
  216. package/fesm2022/forgeroute-ui-time-input.mjs.map +1 -0
  217. package/fesm2022/forgeroute-ui-timeline.mjs +549 -0
  218. package/fesm2022/forgeroute-ui-timeline.mjs.map +1 -0
  219. package/fesm2022/forgeroute-ui-toast.mjs +507 -0
  220. package/fesm2022/forgeroute-ui-toast.mjs.map +1 -0
  221. package/fesm2022/forgeroute-ui-toggle-badge.mjs +177 -0
  222. package/fesm2022/forgeroute-ui-toggle-badge.mjs.map +1 -0
  223. package/fesm2022/forgeroute-ui-toggle.mjs +275 -0
  224. package/fesm2022/forgeroute-ui-toggle.mjs.map +1 -0
  225. package/fesm2022/forgeroute-ui-tooltip.mjs +155 -0
  226. package/fesm2022/forgeroute-ui-tooltip.mjs.map +1 -0
  227. package/fesm2022/forgeroute-ui-utils.mjs +1071 -0
  228. package/fesm2022/forgeroute-ui-utils.mjs.map +1 -0
  229. package/fesm2022/forgeroute-ui.mjs +105 -70663
  230. package/package.json +422 -2
  231. package/types/forgeroute-ui-action-bar.d.ts +74 -0
  232. package/types/forgeroute-ui-address-input.d.ts +354 -0
  233. package/types/forgeroute-ui-alert.d.ts +89 -0
  234. package/types/forgeroute-ui-avatar.d.ts +85 -0
  235. package/types/forgeroute-ui-badge.d.ts +45 -0
  236. package/types/forgeroute-ui-bar-row.d.ts +90 -0
  237. package/types/forgeroute-ui-boards.d.ts +575 -0
  238. package/types/forgeroute-ui-bulk-eligible.d.ts +53 -0
  239. package/types/forgeroute-ui-business-hours.d.ts +191 -0
  240. package/types/forgeroute-ui-calendar.d.ts +544 -0
  241. package/types/forgeroute-ui-card-list-item.d.ts +186 -0
  242. package/types/forgeroute-ui-charts.d.ts +1 -1
  243. package/types/forgeroute-ui-checkbox.d.ts +270 -0
  244. package/types/forgeroute-ui-chip.d.ts +125 -0
  245. package/types/forgeroute-ui-color-input.d.ts +160 -0
  246. package/types/forgeroute-ui-column-filter.d.ts +130 -0
  247. package/types/forgeroute-ui-columns.d.ts +150 -0
  248. package/types/forgeroute-ui-combobox.d.ts +252 -0
  249. package/types/forgeroute-ui-confirm.d.ts +34 -0
  250. package/types/forgeroute-ui-contact-picker.d.ts +173 -0
  251. package/types/forgeroute-ui-conversations.d.ts +993 -0
  252. package/types/forgeroute-ui-copy-field.d.ts +122 -0
  253. package/types/forgeroute-ui-core.d.ts +188 -4
  254. package/types/forgeroute-ui-data-table-core.d.ts +1221 -0
  255. package/types/forgeroute-ui-date-input.d.ts +101 -0
  256. package/types/forgeroute-ui-date-range-picker.d.ts +109 -0
  257. package/types/forgeroute-ui-datetime-input.d.ts +97 -0
  258. package/types/forgeroute-ui-detail-card.d.ts +252 -0
  259. package/types/forgeroute-ui-discount-selector.d.ts +57 -0
  260. package/types/forgeroute-ui-divider.d.ts +40 -0
  261. package/types/forgeroute-ui-dropdown.d.ts +156 -0
  262. package/types/forgeroute-ui-editor.d.ts +873 -0
  263. package/types/forgeroute-ui-empty-state.d.ts +29 -0
  264. package/types/forgeroute-ui-error-state.d.ts +38 -0
  265. package/types/forgeroute-ui-error.d.ts +29 -0
  266. package/types/forgeroute-ui-fade.d.ts +39 -0
  267. package/types/forgeroute-ui-file-input.d.ts +337 -0
  268. package/types/forgeroute-ui-fixed-footer.d.ts +53 -0
  269. package/types/forgeroute-ui-form-row.d.ts +30 -0
  270. package/types/forgeroute-ui-form-section.d.ts +18 -0
  271. package/types/forgeroute-ui-form.d.ts +68 -0
  272. package/types/forgeroute-ui-hint.d.ts +10 -0
  273. package/types/forgeroute-ui-icon-picker.d.ts +122 -0
  274. package/types/forgeroute-ui-icon.d.ts +95 -0
  275. package/types/forgeroute-ui-image-preview.d.ts +88 -0
  276. package/types/forgeroute-ui-keypad.d.ts +73 -0
  277. package/types/forgeroute-ui-kpi-card.d.ts +161 -0
  278. package/types/forgeroute-ui-language-switcher.d.ts +41 -0
  279. package/types/forgeroute-ui-layout.d.ts +13 -0
  280. package/types/forgeroute-ui-list-item.d.ts +253 -0
  281. package/types/forgeroute-ui-list.d.ts +282 -0
  282. package/types/forgeroute-ui-live-region.d.ts +49 -0
  283. package/types/forgeroute-ui-map.d.ts +1 -1
  284. package/types/forgeroute-ui-maps.d.ts +1 -1
  285. package/types/forgeroute-ui-media.d.ts +1221 -0
  286. package/types/forgeroute-ui-messaging.d.ts +11 -6
  287. package/types/forgeroute-ui-more-menu.d.ts +91 -0
  288. package/types/forgeroute-ui-multi-select.d.ts +119 -0
  289. package/types/forgeroute-ui-notes.d.ts +172 -0
  290. package/types/forgeroute-ui-notification-bell.d.ts +135 -0
  291. package/types/forgeroute-ui-offline-banner.d.ts +44 -0
  292. package/types/forgeroute-ui-option-card.d.ts +106 -0
  293. package/types/forgeroute-ui-page.d.ts +115 -0
  294. package/types/forgeroute-ui-pagination.d.ts +55 -0
  295. package/types/forgeroute-ui-panel-info-list.d.ts +147 -0
  296. package/types/forgeroute-ui-password-requirements.d.ts +89 -0
  297. package/types/forgeroute-ui-payments.d.ts +1826 -0
  298. package/types/forgeroute-ui-pdf.d.ts +1 -1
  299. package/types/forgeroute-ui-phone-number-picker.d.ts +199 -0
  300. package/types/forgeroute-ui-pill-tabs.d.ts +208 -0
  301. package/types/forgeroute-ui-print.d.ts +40 -0
  302. package/types/forgeroute-ui-progress-bar.d.ts +88 -0
  303. package/types/forgeroute-ui-progress-ring.d.ts +102 -0
  304. package/types/forgeroute-ui-quick-filter-tabs.d.ts +51 -0
  305. package/types/forgeroute-ui-quickbooks.d.ts +6 -3
  306. package/types/forgeroute-ui-radio-matrix.d.ts +131 -0
  307. package/types/forgeroute-ui-radio.d.ts +311 -0
  308. package/types/forgeroute-ui-read-only-mode.d.ts +26 -0
  309. package/types/forgeroute-ui-readonly-fieldset.d.ts +62 -0
  310. package/types/forgeroute-ui-reminder-alerts.d.ts +71 -0
  311. package/types/forgeroute-ui-search-input.d.ts +93 -0
  312. package/types/forgeroute-ui-section-header.d.ts +149 -0
  313. package/types/forgeroute-ui-select.d.ts +183 -0
  314. package/types/forgeroute-ui-setup.d.ts +775 -0
  315. package/types/forgeroute-ui-share-menu.d.ts +99 -0
  316. package/types/forgeroute-ui-shell.d.ts +173 -0
  317. package/types/forgeroute-ui-show.d.ts +40 -0
  318. package/types/forgeroute-ui-sidebar-layout.d.ts +161 -0
  319. package/types/forgeroute-ui-skeleton.d.ts +51 -0
  320. package/types/forgeroute-ui-skip-link.d.ts +51 -0
  321. package/types/forgeroute-ui-snackbar.d.ts +50 -0
  322. package/types/forgeroute-ui-square.d.ts +5 -3
  323. package/types/forgeroute-ui-stack.d.ts +99 -0
  324. package/types/forgeroute-ui-stacked-bar.d.ts +84 -0
  325. package/types/forgeroute-ui-stacking-plan.d.ts +116 -0
  326. package/types/forgeroute-ui-star-rating.d.ts +151 -0
  327. package/types/forgeroute-ui-star.d.ts +46 -0
  328. package/types/forgeroute-ui-stepper.d.ts +273 -0
  329. package/types/forgeroute-ui-stripe.d.ts +1458 -3
  330. package/types/forgeroute-ui-swatch-picker.d.ts +118 -0
  331. package/types/forgeroute-ui-table-toolbar.d.ts +116 -0
  332. package/types/forgeroute-ui-table-types.d.ts +624 -0
  333. package/types/forgeroute-ui-text-input.d.ts +359 -0
  334. package/types/forgeroute-ui-text-template-picker.d.ts +100 -0
  335. package/types/forgeroute-ui-text.d.ts +76 -0
  336. package/types/forgeroute-ui-textarea-input.d.ts +174 -0
  337. package/types/forgeroute-ui-time-input.d.ts +105 -0
  338. package/types/forgeroute-ui-timeline.d.ts +196 -0
  339. package/types/forgeroute-ui-toast.d.ts +131 -0
  340. package/types/forgeroute-ui-toggle-badge.d.ts +64 -0
  341. package/types/forgeroute-ui-toggle.d.ts +92 -0
  342. package/types/forgeroute-ui-tooltip.d.ts +36 -0
  343. package/types/forgeroute-ui-utils.d.ts +210 -0
  344. package/types/forgeroute-ui.d.ts +106 -19539
  345. package/fesm2022/forgeroute-ui.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeroute-ui-combobox.mjs","names":[],"sources":["../../../projects/forgeroute-ui/combobox/src/lib/combobox/combobox.component.ts"],"sourcesContent":["import {\n Component, ChangeDetectionStrategy, DestroyRef, ElementRef, Injector, afterNextRender, computed, effect, forwardRef,\n inject, input, linkedSignal, output, signal, untracked, viewChild,\n} from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, issueToErrors, requiredIssue } from '@forgeroute/ui/core';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/** One selectable row. `data` carries any host payload (a typed record, an id, ...) back through `(valueChange)`. */\nexport interface ComboboxOption<T = unknown> {\n value: string;\n label: string;\n /** Secondary line under the label (trade, customer name, ...). */\n description?: string;\n disabled?: boolean;\n data?: T;\n}\n\n/** The selected value: what `[value]` and `ngModel` / `FormControl` hold. */\nexport interface ComboboxSelection { value: string; label: string }\n\nlet nextComboboxId = 0;\n\n/**\n * Search-as-you-type single select (WAI-ARIA 1.2 combobox with listbox popup). The HOST fetches: the combobox emits\n * `(searchChange)` with the typed term (debounced) and renders whatever `[options]` currently is, so a host using\n * `switchMap` is race-safe and a stale array never \"sticks\" (the active option is re-validated on every change).\n *\n * ## API\n * - `[options]` `ComboboxOption[]` current results (`{ value, label, description?, disabled?, data? }`).\n * - `[value]` `{ value, label } | null` the selection. Also what `ngModel` / `formControl` hold (same shape).\n * - `[displayText]` text shown in the field instead of the selected label — use it for legacy / orphaned links:\n * `displayText=\"Not linked: Legacy Co\"` (with `[value]=\"null\"`) or `displayText=\"Acme (no longer exists)\"`.\n * Pair it with `[displayWarning]=\"true\"` for the amber \"needs attention\" style. A `displayText` with no `value` is\n * shown and has a clear button, but counts as EMPTY for `required`.\n * - `[loading]` shows \"Searching…\" and announces it. `[noResultsText]` (default \"No results found\").\n * - `[minChars]` (default 0): below it nothing is searched or listed (\"Type at least N characters\"). 0 = the list opens\n * on focus and `(searchChange)` fires with '' so the host can show its initial results.\n * - `[debounce]` ms between the last keystroke and `(searchChange)` (default 250). Focus / ArrowDown-open emit immediately.\n * - `[label] [ariaLabel] [placeholder] [required] [hint] [error] [disabled] [showErrors]` like `ui-text-input`\n * (host `[error]` wins over the built-in \"<label> is required.\"; messages (built-in and host) show only after the user left the field, `showErrors` also reveals it on an untouched field).\n * - `(searchChange)` string, `(valueChange)` `ComboboxOption | null` (the full chosen option, null when cleared),\n * `(invalidChange)` boolean, `(focused)`, `(blurred)`. Validity: `UiFieldValidity` token + Angular `Validator`.\n *\n * ## Behaviour\n * - The field shows the selected label. Focusing it selects that text; typing starts a NEW search and the old value is\n * kept until another option is picked or the clear (x) button is pressed. Leaving the field (blur / Tab / Escape)\n * discards the typed text and shows the selection again.\n * - Escape: if the list is open it closes the list ONLY (stopPropagation, so a surrounding side panel / modal stays\n * open). If the list is already closed and text was typed, it discards the text (also stopped). Otherwise the key\n * passes through to the panel.\n * - Tab never selects: it closes the list and moves on.\n *\n * ## Keyboard\n * ArrowDown / ArrowUp open the list and move the active option (wraps, skips disabled). Home / End jump to the first /\n * last option while the list is open. Enter picks the active option (and does not submit a surrounding form while open).\n * Escape / Tab as above. Typing opens the list. Mouse: options are picked on mousedown so blur does not swallow it.\n *\n * ## ARIA\n * The inner `<input>` is `role=\"combobox\"` with `aria-expanded`, `aria-controls` (the listbox, while open),\n * `aria-autocomplete=\"list\"`, `aria-activedescendant`, `aria-invalid`, `aria-required`, `aria-describedby` (hint / error);\n * the `<label for>` names it. The popup is `role=\"listbox\"` of `role=\"option\"` rows (`aria-selected` = active row,\n * stable ids). A polite `role=\"status\"` region announces \"Searching\", \"N results available\" or the no-results text.\n *\n * ## Example\n * ```html\n * <ui-combobox label=\"Subcontractor\" [required]=\"true\" [options]=\"opts()\" [loading]=\"loading()\"\n * [value]=\"sub()\" [displayText]=\"legacyName() ? 'Not linked: ' + legacyName() : ''\" [error]=\"err()\"\n * (searchChange)=\"search$.next($event)\" (valueChange)=\"onPick($event)\" />\n * ```\n */\n@Component({\n selector: 'ui-combobox',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ComboboxComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => ComboboxComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => ComboboxComponent),\n }],\n template: `\n <div class=\"cb-field\" [class.cb-error]=\"_activeError()\" [class.cb-disabled]=\"disabled()\" [class.cb-warning]=\"displayWarning()\">\n @if (label()) {\n <label class=\"cb-label\" [for]=\"_inputId\">\n {{ label() }}\n @if (required()) { <span class=\"cb-required\" aria-hidden=\"true\">*</span> }\n </label>\n }\n <div class=\"cb-control\">\n <input\n #field\n class=\"cb-input\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n [id]=\"_inputId\"\n [class.cb-has-clear]=\"_showClear()\"\n [placeholder]=\"placeholder()\"\n [value]=\"_inputText()\"\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-expanded]=\"_open() ? 'true' : 'false'\"\n [attr.aria-controls]=\"_open() ? _listId : null\"\n [attr.aria-activedescendant]=\"_activeDescendant()\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-describedby]=\"(_activeError() || hint()) ? _descId : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (click)=\"onClick()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n @if (_showClear()) {\n <button type=\"button\" class=\"cb-clear\" data-testid=\"combobox-clear\" [attr.aria-label]=\"labels.t('combobox.clearNamed', { name: label() || ariaLabel() || labels.t('combobox.selection') })\"\n (mousedown)=\"$event.preventDefault()\" (click)=\"clear()\">&times;</button>\n }\n @if (_open()) {\n <div class=\"cb-popup\" (mousedown)=\"$event.preventDefault()\">\n <div class=\"cb-list\" role=\"listbox\" [id]=\"_listId\" [attr.aria-label]=\"label() || ariaLabel() || null\">\n @if (_belowMin() === false) {\n @for (o of options(); track o.value; let i = $index) {\n <div class=\"cb-option\" role=\"option\" [id]=\"_optionId(i)\"\n [class.cb-option-active]=\"i === _activeIndex()\"\n [class.cb-option-disabled]=\"o.disabled\"\n [class.cb-option-selected]=\"o.value === _selected()?.value\"\n [attr.aria-selected]=\"i === _activeIndex() ? 'true' : 'false'\"\n [attr.aria-disabled]=\"o.disabled ? 'true' : null\"\n (mousedown)=\"onOptionMouseDown($event, o)\"\n (mousemove)=\"onOptionHover(i, o)\">\n <span class=\"cb-option-label\">{{ o.label }}</span>\n @if (o.description) { <span class=\"cb-option-desc\">{{ o.description }}</span> }\n </div>\n }\n }\n </div>\n @if (_statusText(); as status) {\n <div class=\"cb-status\" data-testid=\"combobox-status\">{{ status }}</div>\n }\n </div>\n }\n </div>\n <span class=\"cb-live\" role=\"status\" aria-live=\"polite\">{{ _liveText() }}</span>\n @if (_activeError()) {\n <p class=\"cb-desc cb-desc-error\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"cb-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </div>\n `,\n styles: [`\n :host { display: block; }\n\n .cb-field { display: flex; flex-direction: column; gap: 6px; }\n .cb-label { font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1; }\n .cb-required { color: #dc2626; margin-left: 2px; }\n\n .cb-control { position: relative; }\n .cb-input {\n width: 100%; box-sizing: border-box;\n padding: 9px 12px; font-size: 0.875rem; font-family: inherit;\n color: #1e293b; background: #fff;\n border: 1px solid #7c8ba1; border-radius: 8px;\n outline: none; transition: border-color 0.15s, box-shadow 0.15s;\n &::placeholder { color: #64748b; opacity: 1; }\n &:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }\n }\n .cb-has-clear { padding-right: 40px; }\n\n .cb-warning .cb-input { border-color: #f59e0b; background: #fffbeb; }\n .cb-error .cb-input {\n border-color: #ef4444;\n &:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }\n }\n .cb-disabled .cb-input { opacity: 0.5; cursor: not-allowed; }\n\n .cb-clear {\n position: absolute; top: 50%; right: 4px; transform: translateY(-50%);\n border: 0; background: transparent; cursor: pointer; color: #64748b;\n font-size: 1.25rem; line-height: 1; min-width: 32px; min-height: 32px; padding: 0 8px; border-radius: 6px;\n &:hover { color: #0f172a; }\n &:focus-visible { outline: 2px solid #3b82f6; }\n }\n\n .cb-popup {\n position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 4px; box-sizing: border-box;\n max-width: 100%; max-height: min(260px, 40vh); overflow-y: auto; overscroll-behavior: contain;\n background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);\n }\n .cb-list:empty { display: none; }\n .cb-status { padding: 12px; font-size: 0.875rem; color: #64748b; }\n .cb-option {\n display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; min-height: 40px; justify-content: center;\n box-sizing: border-box; cursor: pointer;\n }\n .cb-option-active { background: #eff6ff; }\n .cb-option-selected .cb-option-label { font-weight: 600; }\n .cb-option-disabled { opacity: 0.5; cursor: not-allowed; }\n .cb-option-label { font-size: 0.875rem; color: #0f172a; overflow-wrap: anywhere; }\n .cb-option-desc { font-size: 0.75rem; color: #64748b; overflow-wrap: anywhere; }\n\n .cb-desc { margin: 0; font-size: 0.75rem; line-height: 1.4; color: #64748b; }\n .cb-desc-error { color: #dc2626; }\n\n .cb-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n\n /* Reduced motion: no transition on the field. Forced colors (Windows high contrast) drop box-shadow, so the focus\n ring and the active option fall back to real outlines. */\n @media (prefers-reduced-motion: reduce) { .cb-input { transition: none; } }\n @media (forced-colors: active) {\n .cb-input:focus { outline: 2px solid Highlight; outline-offset: 1px; }\n .cb-option-active { outline: 2px solid Highlight; outline-offset: -2px; }\n }\n\n /* Touch targets: the field and its clear (x) button are at least 44px on touch devices and phones. */\n @media (pointer: coarse), (max-width: 480px) {\n .cb-input { min-height: 44px; }\n .cb-clear { min-width: 44px; min-height: 44px; }\n }\n @media (pointer: coarse) { .cb-option { min-height: 44px; } }\n @media (max-width: 480px) {\n .cb-input { font-size: 1rem; }\n .cb-option { min-height: 44px; }\n }\n `],\n})\nexport class ComboboxComponent<T = unknown> implements ControlValueAccessor, Validator, UiFieldValidity {\n protected readonly labels = inject(UiLabelsService);\n readonly label = input('');\n /** Accessible name for a field with no visible label. */\n readonly ariaLabel = input('');\n readonly placeholder = input('');\n readonly required = input(false);\n readonly hint = input('');\n /** Host error message; always wins over the built-in message. */\n readonly error = input('');\n readonly showErrors = input(false);\n /** Current results (host-owned). */\n readonly options = input<ComboboxOption<T>[]>([]);\n readonly loading = input(false);\n readonly noResultsTextInput = input<string | null>(null, { alias: 'noResultsText' });\n readonly noResultsText = computed(() => this.noResultsTextInput() ?? this.labels.t('combobox.noResultsText'));\n /** Characters needed before searching / listing. 0 = open on focus. */\n readonly minChars = input(0);\n /** Milliseconds between the last keystroke and `(searchChange)`. */\n readonly debounce = input(250);\n /** The selection. */\n readonly value = input<ComboboxSelection | null>(null);\n /** Text shown instead of the selected label (legacy / orphaned links). */\n readonly displayText = input('');\n /** Amber style for a legacy / orphaned `displayText`. */\n readonly displayWarning = input(false);\n\n /** Typed term, debounced (immediate on focus / open). */\n readonly searchChange = output<string>();\n /** The chosen option, or null when cleared. */\n readonly valueChange = output<ComboboxOption<T> | null>();\n readonly invalidChange = output<boolean>();\n readonly focused = output<void>();\n readonly blurred = output<void>();\n\n /** Disables the field (`[disabled]=\"x()\"`). Public so templates compile; ngModel / FormControl `disable()` still works (effective disabled = this OR the forms API). */\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n private readonly _field = viewChild<ElementRef<HTMLInputElement>>('field');\n private readonly _host = inject(ElementRef) as ElementRef<HTMLElement>;\n private readonly _injector = inject(Injector);\n private readonly _destroyRef = inject(DestroyRef);\n\n /** Follows `[value]`; ngModel / formControl writes and user picks override it until `[value]` changes. */\n protected readonly _selected = linkedSignal<ComboboxSelection | null>(() => this.value());\n private readonly _text = signal('');\n private readonly _editing = signal(false);\n protected readonly _open = signal(false);\n /** Reset to the first enabled option whenever `[options]` changes, so a stale index never survives new results. */\n protected readonly _activeIndex = linkedSignal<ComboboxOption<T>[], number>({\n source: this.options,\n computation: opts => this._firstEnabled(opts),\n });\n\n protected readonly _uid = ++nextComboboxId;\n protected readonly _inputId = `cb-${this._uid}`;\n protected readonly _listId = `cb-list-${this._uid}`;\n protected readonly _descId = `cb-desc-${this._uid}`;\n\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed(() => this._check(this._selected()));\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n\n protected readonly _inputText = computed(() =>\n this._editing() ? this._text() : (this.displayText() || this._selected()?.label || ''));\n protected readonly _showClear = computed(() => !this.disabled() && !this._editing() && !!(this._selected() || this.displayText()));\n protected readonly _belowMin = computed(() => this._term().length < this.minChars());\n protected readonly _statusText = computed(() => {\n if (this._belowMin()) return this.labels.t(this.minChars() === 1 ? 'combobox.typeAtLeast_one' : 'combobox.typeAtLeast_other', { count: this.minChars() });\n if (this.loading()) return this.labels.t('search.searching') + '…';\n return this.options().length === 0 ? this.noResultsText() : '';\n });\n protected readonly _liveText = computed(() => {\n if (!this._open() || this._belowMin()) return '';\n if (this.loading()) return this.labels.t('search.searching');\n const n = this.options().length;\n if (n === 0) return this.noResultsText();\n return this.labels.t(n === 1 ? 'combobox.resultsAvailable_one' : 'combobox.resultsAvailable_other', { count: n });\n });\n protected readonly _activeDescendant = computed(() => {\n const i = this._activeIndex();\n return this._open() && !this._belowMin() && i >= 0 && i < this.options().length ? this._optionId(i) : null;\n });\n\n private _debounceTimer: ReturnType<typeof setTimeout> | null = null;\n private _onChange = (_: ComboboxSelection | null) => {};\n private _onTouched = () => {};\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n // Becoming disabled closes an open list, drops a pending search and discards typed text.\n effect(() => { if (this.disabled()) untracked(() => { this._cancelTimer(); this._open.set(false); this._editing.set(false); this._text.set(''); }); });\n this._destroyRef.onDestroy(() => this._cancelTimer());\n }\n\n ngOnChanges() { this._onValidatorChange(); }\n\n // ── CVA / Validator ───────────────────────────────────────────────\n writeValue(val: ComboboxSelection | null) { this._selected.set(val ?? null); }\n validate(control: AbstractControl): ValidationErrors | null {\n return issueToErrors(this._check((control.value as ComboboxSelection | null) ?? null));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n registerOnChange(fn: (v: ComboboxSelection | null) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n private _check(sel: ComboboxSelection | null): FieldIssue | null {\n if (this.disabled()) return null;\n return !sel && this.required() ? requiredIssue(this.label()) : null;\n }\n\n // ── Helpers ───────────────────────────────────────────────────────\n /** What the user typed (trimmed); '' while not editing. */\n private _term(): string { return this._editing() ? this._text().trim() : ''; }\n protected _optionId(i: number) { return `${this._listId}-opt-${i}`; }\n private _firstEnabled(opts: ComboboxOption<T>[]) { return opts.findIndex(o => !o.disabled); }\n\n private _emitSearch() { this._cancelTimer(); if (!this._belowMin()) this.searchChange.emit(this._term()); }\n private _cancelTimer() { if (this._debounceTimer != null) { clearTimeout(this._debounceTimer); this._debounceTimer = null; } }\n\n private _revert() { this._cancelTimer(); this._editing.set(false); this._text.set(''); }\n\n private _openList() {\n if (this.disabled()) return;\n if (!this._open()) { this._open.set(true); this._emitSearch(); }\n }\n\n private _move(dir: 1 | -1) {\n const opts = this.options();\n if (!opts.length || opts.every(o => o.disabled)) return;\n let i = this._activeIndex();\n for (let step = 0; step < opts.length; step++) {\n i = ((i < 0 ? (dir === 1 ? -1 : 0) : i) + dir + opts.length) % opts.length;\n if (!opts[i].disabled) break;\n }\n this._setActive(i);\n }\n\n private _setActive(i: number) {\n this._activeIndex.set(i);\n afterNextRender(() => {\n const el = this._host.nativeElement.querySelector(`#${this._optionId(i)}`) as HTMLElement | null;\n if (el && typeof el.scrollIntoView === 'function') el.scrollIntoView({ block: 'nearest' });\n }, { injector: this._injector });\n }\n\n // ── Events ────────────────────────────────────────────────────────\n protected onInput(event: Event) {\n if (this.disabled()) return;\n this._text.set((event.target as HTMLInputElement).value);\n this._editing.set(true);\n this._open.set(true);\n this._cancelTimer();\n if (this._belowMin()) return;\n this._debounceTimer = setTimeout(() => { this._debounceTimer = null; this._emitSearch(); }, this.debounce());\n }\n\n protected onFocus(event: FocusEvent) {\n this.focused.emit();\n const el = event.target as HTMLInputElement;\n if (this._selected() || this.displayText()) el.select?.();\n this._openList();\n }\n\n protected onClick() { this._openList(); }\n\n protected onBlur() {\n this._open.set(false);\n this._revert();\n this._onTouched();\n this.blurred.emit();\n this._reveal.touched.set(true);\n }\n\n protected onKeydown(e: KeyboardEvent) {\n const opts = this.options();\n const listing = this._open() && !this._belowMin();\n switch (e.key) {\n case 'ArrowDown':\n case 'ArrowUp':\n e.preventDefault();\n if (!this._open()) { this._openList(); return; }\n this._move(e.key === 'ArrowDown' ? 1 : -1);\n return;\n case 'Home':\n case 'End':\n if (listing && opts.length) {\n e.preventDefault();\n const idx = e.key === 'Home' ? opts.findIndex(o => !o.disabled) : opts.map(o => !o.disabled).lastIndexOf(true);\n if (idx >= 0) this._setActive(idx);\n }\n return;\n case 'Enter':\n if (this._open()) {\n e.preventDefault();\n const i = this._activeIndex();\n if (listing && i >= 0 && i < opts.length && !opts[i].disabled) this.choose(opts[i]);\n }\n return;\n case 'Escape':\n if (this._open()) { e.preventDefault(); e.stopPropagation(); this._cancelTimer(); this._open.set(false); }\n else if (this._editing()) { e.preventDefault(); e.stopPropagation(); this._revert(); }\n return;\n case 'Tab':\n this._open.set(false);\n return;\n }\n }\n\n protected onOptionMouseDown(e: MouseEvent, o: ComboboxOption<T>) {\n e.preventDefault();\n if (!o.disabled) this.choose(o);\n }\n\n protected onOptionHover(i: number, o: ComboboxOption<T>) {\n if (!o.disabled && i !== this._activeIndex()) this._activeIndex.set(i);\n }\n\n /** Select `o` (also callable by a host through a template ref). */\n choose(o: ComboboxOption<T>) {\n if (this.disabled()) return;\n const sel = { value: o.value, label: o.label };\n this._selected.set(sel);\n this._revert();\n this._open.set(false);\n this._onChange(sel);\n this.valueChange.emit(o);\n }\n\n /** Clear the selection (the x button). */\n clear() {\n if (this.disabled()) return;\n this._selected.set(null);\n this._revert();\n this._open.set(false);\n this._onChange(null);\n this.valueChange.emit(null);\n afterNextRender(() => this._field()?.nativeElement.focus(), { injector: this._injector });\n }\n}\n"],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"@angular/core";
3
+ import { catchError, defer, from, map, of, switchMap, take } from "rxjs";
4
+ import { ConfirmService } from "@forgeroute/ui/core";
5
+ var ConfirmAfterCheckService = class ConfirmAfterCheckService {
6
+ constructor() {
7
+ this.confirmService = inject(ConfirmService);
8
+ }
9
+ run(check, options) {
10
+ const ask = (config) => defer(() => from(this.confirmService.confirm(config)));
11
+ return check.pipe(take(1), switchMap((result) => options.needsConfirm(result) ? ask(options.confirm(result)) : of(true)), catchError(() => {
12
+ const onError = options.onCheckError ?? "block";
13
+ return onError === "proceed" ? of(true) : onError === "block" ? of(false) : ask(onError);
14
+ }), map((answer) => answer === true));
15
+ }
16
+ static {
17
+ this.ɵfac = i0.ɵɵngDeclareFactory({
18
+ minVersion: "12.0.0",
19
+ version: "22.2.2",
20
+ ngImport: i0,
21
+ type: ConfirmAfterCheckService,
22
+ deps: [],
23
+ target: i0.ɵɵFactoryTarget.Injectable
24
+ });
25
+ }
26
+ static {
27
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
28
+ minVersion: "12.0.0",
29
+ version: "22.2.2",
30
+ ngImport: i0,
31
+ type: ConfirmAfterCheckService,
32
+ providedIn: "root"
33
+ });
34
+ }
35
+ };
36
+ i0.ɵɵngDeclareClassMetadata({
37
+ minVersion: "12.0.0",
38
+ version: "22.2.2",
39
+ ngImport: i0,
40
+ type: ConfirmAfterCheckService,
41
+ decorators: [{
42
+ type: Injectable,
43
+ args: [{ providedIn: "root" }]
44
+ }]
45
+ });
46
+ export { ConfirmAfterCheckService };
47
+
48
+ //# sourceMappingURL=forgeroute-ui-confirm.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeroute-ui-confirm.mjs","names":[],"sources":["../../../projects/forgeroute-ui/confirm/src/lib/confirm/confirm-after-check.service.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { Observable, catchError, defer, from, map, of, switchMap, take } from 'rxjs';\nimport { ConfirmService } from '@forgeroute/ui/core';\n\n/** What the confirm dialog shows (the argument of ConfirmService.confirm). */\nexport type ConfirmDialogConfig = Parameters<ConfirmService['confirm']>[0];\n\nexport interface ConfirmAfterCheckOptions<T> {\n /** True when the check result needs the user's decision. False = nothing to warn about, the answer is `true` without a dialog. */\n needsConfirm: (result: T) => boolean;\n /** The dialog for a result that needs a decision. */\n confirm: (result: T) => ConfirmDialogConfig;\n /**\n * What a FAILED check does: `'block'` (default, answer `false`), `'proceed'` (answer `true`, the check is advisory) or a dialog config\n * (the user is asked whether to go on without the check, e.g. \"Signed documents could not be checked. Save anyway?\").\n */\n onCheckError?: 'block' | 'proceed' | ConfirmDialogConfig;\n}\n\n/**\n * \"Ask the server, then ask the user\": runs a check request first and opens the library confirm dialog only when the answer needs a decision.\n * The answer (`true` = go on, `false` = stop) is one emission, then complete.\n *\n * confirmAfterCheck.run(api.get<Impact>('/check-impact', { lotId }), {\n * needsConfirm: r => r.hasSignedDocuments,\n * confirm: r => ({ title: 'Signed documents affected', message: describe(r), confirmLabel: 'Save', variant: 'warning' }),\n * onCheckError: { title: 'Check failed', message: 'Could not check. Save anyway?', variant: 'warning' },\n * }).subscribe(go => { if (go) save(); });\n *\n * Nothing is sent or changed by the helper itself; the check request is the caller's.\n */\n@Injectable({ providedIn: 'root' })\nexport class ConfirmAfterCheckService {\n private readonly confirmService = inject(ConfirmService);\n\n run<T>(check: Observable<T>, options: ConfirmAfterCheckOptions<T>): Observable<boolean> {\n const ask = (config: ConfirmDialogConfig) => defer(() => from(this.confirmService.confirm(config)));\n return check.pipe(\n take(1),\n switchMap(result => options.needsConfirm(result) ? ask(options.confirm(result)) : of(true)),\n catchError(() => {\n const onError = options.onCheckError ?? 'block';\n return onError === 'proceed' ? of(true) : onError === 'block' ? of(false) : ask(onError);\n }),\n map(answer => answer === true),\n );\n }\n}\n"],"mappings":";;;;AAgCA,IAAa,2BAAb,MAAa,yBAAwB;CADrC,cAAA;EAEmB,KAAA,iBAAiB,OAAO,cAAc;CAcxD;CAZC,IAAO,OAAsB,SAAoC;EAC/D,MAAM,OAAO,WAAgC,YAAY,KAAK,KAAK,eAAe,QAAQ,MAAM,CAAC,CAAC;EAClG,OAAO,MAAM,KACX,KAAK,CAAC,GACN,WAAU,WAAU,QAAQ,aAAa,MAAM,IAAI,IAAI,QAAQ,QAAQ,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,GAC1F,iBAAgB;GACd,MAAM,UAAU,QAAQ,gBAAgB;GACxC,OAAO,YAAY,YAAY,GAAG,IAAI,IAAI,YAAY,UAAU,GAAG,KAAK,IAAI,IAAI,OAAO;EACzF,CAAC,GACD,KAAI,WAAU,WAAW,IAAI,CAAC;CAElC;CAdW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAwB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAxB;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAwB,YADX;EAAM,CAAA;CAAA;;AACnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EADpC,MAAA;EAAW,MAAA,CAAA,EAAE,YAAY,OAAM,CAAE"}