@hub-kit/core 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (499) hide show
  1. package/README.md +125 -0
  2. package/cli/hub-kit.mjs +112 -0
  3. package/dist/adapters/bank-reconciliation.d.ts +100 -0
  4. package/dist/adapters/bank-reconciliation.js +1 -0
  5. package/dist/adapters/bank-sync-log.d.ts +46 -0
  6. package/dist/adapters/bank-sync-log.js +1 -0
  7. package/dist/adapters/category-rules.d.ts +94 -0
  8. package/dist/adapters/category-rules.js +1 -0
  9. package/dist/adapters/companies.d.ts +85 -0
  10. package/dist/adapters/companies.js +3 -0
  11. package/dist/adapters/customers.d.ts +71 -0
  12. package/dist/adapters/customers.js +1 -0
  13. package/dist/adapters/exclusion-rules.d.ts +34 -0
  14. package/dist/adapters/exclusion-rules.js +15 -0
  15. package/dist/adapters/file-naming.d.ts +36 -0
  16. package/dist/adapters/file-naming.js +1 -0
  17. package/dist/adapters/index.d.ts +24 -0
  18. package/dist/adapters/index.js +1 -0
  19. package/dist/adapters/invoice-detail.d.ts +126 -0
  20. package/dist/adapters/invoice-detail.js +1 -0
  21. package/dist/adapters/invoice-list.d.ts +63 -0
  22. package/dist/adapters/invoice-list.js +1 -0
  23. package/dist/adapters/invoice-upload.d.ts +26 -0
  24. package/dist/adapters/invoice-upload.js +1 -0
  25. package/dist/adapters/manual-bookings.d.ts +56 -0
  26. package/dist/adapters/manual-bookings.js +1 -0
  27. package/dist/adapters/notifications.d.ts +31 -0
  28. package/dist/adapters/notifications.js +1 -0
  29. package/dist/adapters/open-items.d.ts +42 -0
  30. package/dist/adapters/open-items.js +1 -0
  31. package/dist/adapters/opos-whitelist.d.ts +38 -0
  32. package/dist/adapters/opos-whitelist.js +1 -0
  33. package/dist/adapters/outgoing-invoices.d.ts +32 -0
  34. package/dist/adapters/outgoing-invoices.js +1 -0
  35. package/dist/adapters/overview.d.ts +68 -0
  36. package/dist/adapters/overview.js +1 -0
  37. package/dist/adapters/processing-log.d.ts +48 -0
  38. package/dist/adapters/processing-log.js +1 -0
  39. package/dist/adapters/properties.d.ts +87 -0
  40. package/dist/adapters/properties.js +1 -0
  41. package/dist/adapters/supplier-detail.d.ts +64 -0
  42. package/dist/adapters/supplier-detail.js +1 -0
  43. package/dist/adapters/supplier-list.d.ts +21 -0
  44. package/dist/adapters/supplier-list.js +1 -0
  45. package/dist/adapters/team.d.ts +79 -0
  46. package/dist/adapters/team.js +1 -0
  47. package/dist/adapters/trash.d.ts +26 -0
  48. package/dist/adapters/trash.js +1 -0
  49. package/dist/adapters/vat-rules.d.ts +83 -0
  50. package/dist/adapters/vat-rules.js +1 -0
  51. package/dist/components/access/index.d.ts +3 -0
  52. package/dist/components/access/index.js +3 -0
  53. package/dist/components/access/permission-checklist.d.ts +13 -0
  54. package/dist/components/access/permission-checklist.js +19 -0
  55. package/dist/components/access/permission-matrix.d.ts +12 -0
  56. package/dist/components/access/permission-matrix.js +18 -0
  57. package/dist/components/access/types.d.ts +15 -0
  58. package/dist/components/access/types.js +1 -0
  59. package/dist/components/dashboard/date-range-calendar.d.ts +19 -0
  60. package/dist/components/dashboard/date-range-calendar.js +97 -0
  61. package/dist/components/dashboard/index.d.ts +23 -0
  62. package/dist/components/dashboard/index.js +14 -0
  63. package/dist/components/dashboard/kpi-card.d.ts +13 -0
  64. package/dist/components/dashboard/kpi-card.js +7 -0
  65. package/dist/components/dashboard/money-cards-row.d.ts +29 -0
  66. package/dist/components/dashboard/money-cards-row.js +28 -0
  67. package/dist/components/dashboard/money-trend-chart.d.ts +13 -0
  68. package/dist/components/dashboard/money-trend-chart.js +16 -0
  69. package/dist/components/dashboard/panel.d.ts +9 -0
  70. package/dist/components/dashboard/panel.js +5 -0
  71. package/dist/components/dashboard/period-picker.d.ts +25 -0
  72. package/dist/components/dashboard/period-picker.js +82 -0
  73. package/dist/components/dashboard/periods.d.ts +13 -0
  74. package/dist/components/dashboard/periods.js +63 -0
  75. package/dist/components/dashboard/pipeline-stages-panel.d.ts +14 -0
  76. package/dist/components/dashboard/pipeline-stages-panel.js +12 -0
  77. package/dist/components/dashboard/processing-summary-panel.d.ts +34 -0
  78. package/dist/components/dashboard/processing-summary-panel.js +11 -0
  79. package/dist/components/dashboard/ranked-bars.d.ts +15 -0
  80. package/dist/components/dashboard/ranked-bars.js +16 -0
  81. package/dist/components/dashboard/ranked-list-panel.d.ts +14 -0
  82. package/dist/components/dashboard/ranked-list-panel.js +9 -0
  83. package/dist/components/dashboard/stage-tiles.d.ts +15 -0
  84. package/dist/components/dashboard/stage-tiles.js +6 -0
  85. package/dist/components/dashboard/stat-rows-panel.d.ts +25 -0
  86. package/dist/components/dashboard/stat-rows-panel.js +7 -0
  87. package/dist/components/dashboard/stat-tile.d.ts +20 -0
  88. package/dist/components/dashboard/stat-tile.js +9 -0
  89. package/dist/components/feedback/index.d.ts +4 -0
  90. package/dist/components/feedback/index.js +2 -0
  91. package/dist/components/feedback/query-states.d.ts +27 -0
  92. package/dist/components/feedback/query-states.js +38 -0
  93. package/dist/components/feedback/table-pagination.d.ts +20 -0
  94. package/dist/components/feedback/table-pagination.js +15 -0
  95. package/dist/components/invoice-queue/index.d.ts +5 -0
  96. package/dist/components/invoice-queue/index.js +3 -0
  97. package/dist/components/invoice-queue/next-action-cell.d.ts +5 -0
  98. package/dist/components/invoice-queue/next-action-cell.js +9 -0
  99. package/dist/components/invoice-queue/queue-kpi-card.d.ts +19 -0
  100. package/dist/components/invoice-queue/queue-kpi-card.js +31 -0
  101. package/dist/components/invoice-queue/queue-kpi-row.d.ts +22 -0
  102. package/dist/components/invoice-queue/queue-kpi-row.js +12 -0
  103. package/dist/components/notifications/alerts.d.ts +25 -0
  104. package/dist/components/notifications/alerts.js +66 -0
  105. package/dist/components/notifications/bell.d.ts +14 -0
  106. package/dist/components/notifications/bell.js +17 -0
  107. package/dist/components/notifications/highlight.d.ts +4 -0
  108. package/dist/components/notifications/highlight.js +7 -0
  109. package/dist/components/notifications/index.d.ts +7 -0
  110. package/dist/components/notifications/index.js +6 -0
  111. package/dist/components/notifications/reminder-dialog.d.ts +24 -0
  112. package/dist/components/notifications/reminder-dialog.js +54 -0
  113. package/dist/components/notifications/types.d.ts +27 -0
  114. package/dist/components/notifications/types.js +1 -0
  115. package/dist/components/notifications/use-notification-acks.d.ts +7 -0
  116. package/dist/components/notifications/use-notification-acks.js +37 -0
  117. package/dist/components/shell/breadcrumbs.d.ts +7 -0
  118. package/dist/components/shell/breadcrumbs.js +38 -0
  119. package/dist/components/shell/index.d.ts +3 -0
  120. package/dist/components/shell/index.js +3 -0
  121. package/dist/components/shell/shell.d.ts +30 -0
  122. package/dist/components/shell/shell.js +110 -0
  123. package/dist/components/shell/types.d.ts +23 -0
  124. package/dist/components/shell/types.js +3 -0
  125. package/dist/components/tour/find-target.d.ts +1 -0
  126. package/dist/components/tour/find-target.js +3 -0
  127. package/dist/components/tour/index.d.ts +14 -0
  128. package/dist/components/tour/index.js +8 -0
  129. package/dist/components/tour/labels.d.ts +10 -0
  130. package/dist/components/tour/labels.js +9 -0
  131. package/dist/components/tour/seen-store.d.ts +3 -0
  132. package/dist/components/tour/seen-store.js +34 -0
  133. package/dist/components/tour/tour-blocks.d.ts +4 -0
  134. package/dist/components/tour/tour-blocks.js +27 -0
  135. package/dist/components/tour/tour-button.d.ts +4 -0
  136. package/dist/components/tour/tour-button.js +12 -0
  137. package/dist/components/tour/tour-card.d.ts +11 -0
  138. package/dist/components/tour/tour-card.js +7 -0
  139. package/dist/components/tour/tour-context.d.ts +16 -0
  140. package/dist/components/tour/tour-context.js +2 -0
  141. package/dist/components/tour/tour-overlay.d.ts +1 -0
  142. package/dist/components/tour/tour-overlay.js +165 -0
  143. package/dist/components/tour/tour-provider.d.ts +9 -0
  144. package/dist/components/tour/tour-provider.js +80 -0
  145. package/dist/components/tour/types.d.ts +44 -0
  146. package/dist/components/tour/types.js +1 -0
  147. package/dist/components/tour/use-tour.d.ts +3 -0
  148. package/dist/components/tour/use-tour.js +9 -0
  149. package/dist/hooks/use-mobile.d.ts +1 -0
  150. package/dist/hooks/use-mobile.js +15 -0
  151. package/dist/i18n/index.d.ts +15 -0
  152. package/dist/i18n/index.js +15 -0
  153. package/dist/lib/bank-import/classify.d.ts +8 -0
  154. package/dist/lib/bank-import/classify.js +89 -0
  155. package/dist/lib/bank-import/column-guess.d.ts +2 -0
  156. package/dist/lib/bank-import/column-guess.js +40 -0
  157. package/dist/lib/bank-import/csv.d.ts +3 -0
  158. package/dist/lib/bank-import/csv.js +20 -0
  159. package/dist/lib/bank-import/duplicates.d.ts +2 -0
  160. package/dist/lib/bank-import/duplicates.js +21 -0
  161. package/dist/lib/bank-import/index.d.ts +12 -0
  162. package/dist/lib/bank-import/index.js +9 -0
  163. package/dist/lib/bank-import/mapping-storage.d.ts +3 -0
  164. package/dist/lib/bank-import/mapping-storage.js +29 -0
  165. package/dist/lib/bank-import/normalize.d.ts +4 -0
  166. package/dist/lib/bank-import/normalize.js +82 -0
  167. package/dist/lib/bank-import/parse-file.d.ts +7 -0
  168. package/dist/lib/bank-import/parse-file.js +23 -0
  169. package/dist/lib/bank-import/types.d.ts +31 -0
  170. package/dist/lib/bank-import/types.js +1 -0
  171. package/dist/lib/bank-import/xlsx.d.ts +2 -0
  172. package/dist/lib/bank-import/xlsx.js +25 -0
  173. package/dist/lib/class-names.d.ts +2 -0
  174. package/dist/lib/class-names.js +5 -0
  175. package/dist/lib/download.d.ts +2 -0
  176. package/dist/lib/download.js +14 -0
  177. package/dist/lib/formatters.d.ts +6 -0
  178. package/dist/lib/formatters.js +24 -0
  179. package/dist/lib/index.d.ts +9 -0
  180. package/dist/lib/index.js +6 -0
  181. package/dist/lib/opos-whitelist/index.d.ts +2 -0
  182. package/dist/lib/opos-whitelist/index.js +1 -0
  183. package/dist/lib/opos-whitelist/opos.d.ts +14 -0
  184. package/dist/lib/opos-whitelist/opos.js +49 -0
  185. package/dist/lib/query-result.d.ts +12 -0
  186. package/dist/lib/query-result.js +1 -0
  187. package/dist/lib/tour-placeholders/index.d.ts +2 -0
  188. package/dist/lib/tour-placeholders/index.js +1 -0
  189. package/dist/lib/tour-placeholders/overview.d.ts +12 -0
  190. package/dist/lib/tour-placeholders/overview.js +139 -0
  191. package/dist/pages/bank-accounts/BankAccountsPage.d.ts +7 -0
  192. package/dist/pages/bank-accounts/BankAccountsPage.js +21 -0
  193. package/dist/pages/bank-accounts/index.d.ts +4 -0
  194. package/dist/pages/bank-accounts/index.js +2 -0
  195. package/dist/pages/bank-accounts/labels.d.ts +15 -0
  196. package/dist/pages/bank-accounts/labels.js +14 -0
  197. package/dist/pages/bank-import/BankImportWizard.d.ts +9 -0
  198. package/dist/pages/bank-import/BankImportWizard.js +158 -0
  199. package/dist/pages/bank-import/index.d.ts +4 -0
  200. package/dist/pages/bank-import/index.js +2 -0
  201. package/dist/pages/bank-import/labels.d.ts +44 -0
  202. package/dist/pages/bank-import/labels.js +43 -0
  203. package/dist/pages/bank-sync-log/BankSyncLogPage.d.ts +7 -0
  204. package/dist/pages/bank-sync-log/BankSyncLogPage.js +77 -0
  205. package/dist/pages/bank-sync-log/index.d.ts +4 -0
  206. package/dist/pages/bank-sync-log/index.js +2 -0
  207. package/dist/pages/bank-sync-log/labels.d.ts +21 -0
  208. package/dist/pages/bank-sync-log/labels.js +20 -0
  209. package/dist/pages/bank-transactions/BankMatchPanel.d.ts +8 -0
  210. package/dist/pages/bank-transactions/BankMatchPanel.js +75 -0
  211. package/dist/pages/bank-transactions/BankTransactionsPage.d.ts +7 -0
  212. package/dist/pages/bank-transactions/BankTransactionsPage.js +59 -0
  213. package/dist/pages/bank-transactions/badges.d.ts +8 -0
  214. package/dist/pages/bank-transactions/badges.js +24 -0
  215. package/dist/pages/bank-transactions/index.d.ts +6 -0
  216. package/dist/pages/bank-transactions/index.js +4 -0
  217. package/dist/pages/bank-transactions/labels.d.ts +41 -0
  218. package/dist/pages/bank-transactions/labels.js +40 -0
  219. package/dist/pages/bank-transactions/sort-control.d.ts +17 -0
  220. package/dist/pages/bank-transactions/sort-control.js +8 -0
  221. package/dist/pages/bank-transactions/use-table-view.d.ts +23 -0
  222. package/dist/pages/bank-transactions/use-table-view.js +54 -0
  223. package/dist/pages/category-rules/CategoryRulesPage.d.ts +7 -0
  224. package/dist/pages/category-rules/CategoryRulesPage.js +160 -0
  225. package/dist/pages/category-rules/index.d.ts +4 -0
  226. package/dist/pages/category-rules/index.js +2 -0
  227. package/dist/pages/category-rules/labels.d.ts +66 -0
  228. package/dist/pages/category-rules/labels.js +72 -0
  229. package/dist/pages/companies/company-detail-page.d.ts +10 -0
  230. package/dist/pages/companies/company-detail-page.js +184 -0
  231. package/dist/pages/companies/company-form.d.ts +20 -0
  232. package/dist/pages/companies/company-form.js +23 -0
  233. package/dist/pages/companies/company-list-page.d.ts +9 -0
  234. package/dist/pages/companies/company-list-page.js +109 -0
  235. package/dist/pages/companies/known-spellings-card.d.ts +8 -0
  236. package/dist/pages/companies/known-spellings-card.js +65 -0
  237. package/dist/pages/companies/labels.d.ts +105 -0
  238. package/dist/pages/companies/labels.js +104 -0
  239. package/dist/pages/companies/sort-control.d.ts +17 -0
  240. package/dist/pages/companies/sort-control.js +8 -0
  241. package/dist/pages/companies/use-infinite-rows.d.ts +6 -0
  242. package/dist/pages/companies/use-infinite-rows.js +24 -0
  243. package/dist/pages/companies/use-table-view.d.ts +23 -0
  244. package/dist/pages/companies/use-table-view.js +56 -0
  245. package/dist/pages/customers/company-chip.d.ts +6 -0
  246. package/dist/pages/customers/company-chip.js +9 -0
  247. package/dist/pages/customers/copy-button.d.ts +6 -0
  248. package/dist/pages/customers/copy-button.js +31 -0
  249. package/dist/pages/customers/customer-detail-page.d.ts +10 -0
  250. package/dist/pages/customers/customer-detail-page.js +83 -0
  251. package/dist/pages/customers/customer-list-page.d.ts +9 -0
  252. package/dist/pages/customers/customer-list-page.js +65 -0
  253. package/dist/pages/customers/edit-customer-dialog.d.ts +9 -0
  254. package/dist/pages/customers/edit-customer-dialog.js +72 -0
  255. package/dist/pages/customers/form-hints.d.ts +6 -0
  256. package/dist/pages/customers/form-hints.js +9 -0
  257. package/dist/pages/customers/invoice-status-badge.d.ts +10 -0
  258. package/dist/pages/customers/invoice-status-badge.js +22 -0
  259. package/dist/pages/customers/labels.d.ts +116 -0
  260. package/dist/pages/customers/labels.js +117 -0
  261. package/dist/pages/customers/new-customer-dialog.d.ts +6 -0
  262. package/dist/pages/customers/new-customer-dialog.js +93 -0
  263. package/dist/pages/customers/sort-control.d.ts +14 -0
  264. package/dist/pages/customers/sort-control.js +9 -0
  265. package/dist/pages/customers/use-table-view.d.ts +23 -0
  266. package/dist/pages/customers/use-table-view.js +56 -0
  267. package/dist/pages/exclusion-rules/exclusion-rules-page.d.ts +7 -0
  268. package/dist/pages/exclusion-rules/exclusion-rules-page.js +114 -0
  269. package/dist/pages/exclusion-rules/labels.d.ts +53 -0
  270. package/dist/pages/exclusion-rules/labels.js +61 -0
  271. package/dist/pages/file-naming/build-filename.d.ts +3 -0
  272. package/dist/pages/file-naming/build-filename.js +82 -0
  273. package/dist/pages/file-naming/file-naming-page.d.ts +10 -0
  274. package/dist/pages/file-naming/file-naming-page.js +120 -0
  275. package/dist/pages/file-naming/labels.d.ts +44 -0
  276. package/dist/pages/file-naming/labels.js +44 -0
  277. package/dist/pages/index.d.ts +63 -0
  278. package/dist/pages/index.js +48 -0
  279. package/dist/pages/invoice-detail/InvoiceDetailPage.d.ts +11 -0
  280. package/dist/pages/invoice-detail/InvoiceDetailPage.js +292 -0
  281. package/dist/pages/invoice-detail/OutgoingInvoiceFlag.d.ts +26 -0
  282. package/dist/pages/invoice-detail/OutgoingInvoiceFlag.js +16 -0
  283. package/dist/pages/invoice-detail/ReviewBadge.d.ts +15 -0
  284. package/dist/pages/invoice-detail/ReviewBadge.js +23 -0
  285. package/dist/pages/invoice-detail/ReviewCard.d.ts +17 -0
  286. package/dist/pages/invoice-detail/ReviewCard.js +12 -0
  287. package/dist/pages/invoice-detail/SideBySide.d.ts +5 -0
  288. package/dist/pages/invoice-detail/SideBySide.js +5 -0
  289. package/dist/pages/invoice-detail/WorkflowHistoryList.d.ts +23 -0
  290. package/dist/pages/invoice-detail/WorkflowHistoryList.js +32 -0
  291. package/dist/pages/invoice-detail/WorkflowLadder.d.ts +20 -0
  292. package/dist/pages/invoice-detail/WorkflowLadder.js +16 -0
  293. package/dist/pages/invoice-detail/history.d.ts +23 -0
  294. package/dist/pages/invoice-detail/history.js +76 -0
  295. package/dist/pages/invoice-detail/index.d.ts +21 -0
  296. package/dist/pages/invoice-detail/index.js +11 -0
  297. package/dist/pages/invoice-detail/labels.d.ts +79 -0
  298. package/dist/pages/invoice-detail/labels.js +139 -0
  299. package/dist/pages/invoice-detail/pipeline-types.d.ts +58 -0
  300. package/dist/pages/invoice-detail/pipeline-types.js +1 -0
  301. package/dist/pages/invoice-detail/review-recheck.d.ts +8 -0
  302. package/dist/pages/invoice-detail/review-recheck.js +103 -0
  303. package/dist/pages/invoice-detail/review.d.ts +91 -0
  304. package/dist/pages/invoice-detail/review.js +310 -0
  305. package/dist/pages/invoice-list/badges.d.ts +23 -0
  306. package/dist/pages/invoice-list/badges.js +26 -0
  307. package/dist/pages/invoice-list/index.d.ts +5 -0
  308. package/dist/pages/invoice-list/index.js +3 -0
  309. package/dist/pages/invoice-list/invoice-list-page.d.ts +13 -0
  310. package/dist/pages/invoice-list/invoice-list-page.js +114 -0
  311. package/dist/pages/invoice-list/labels.d.ts +36 -0
  312. package/dist/pages/invoice-list/labels.js +29 -0
  313. package/dist/pages/invoice-list/sort-control.d.ts +17 -0
  314. package/dist/pages/invoice-list/sort-control.js +8 -0
  315. package/dist/pages/invoice-list/use-table-view.d.ts +23 -0
  316. package/dist/pages/invoice-list/use-table-view.js +54 -0
  317. package/dist/pages/invoice-upload/InvoiceUploadPage.d.ts +7 -0
  318. package/dist/pages/invoice-upload/InvoiceUploadPage.js +115 -0
  319. package/dist/pages/invoice-upload/index.d.ts +4 -0
  320. package/dist/pages/invoice-upload/index.js +2 -0
  321. package/dist/pages/invoice-upload/labels.d.ts +29 -0
  322. package/dist/pages/invoice-upload/labels.js +28 -0
  323. package/dist/pages/manual-bookings/ManualBookingsPage.d.ts +7 -0
  324. package/dist/pages/manual-bookings/ManualBookingsPage.js +161 -0
  325. package/dist/pages/manual-bookings/index.d.ts +4 -0
  326. package/dist/pages/manual-bookings/index.js +2 -0
  327. package/dist/pages/manual-bookings/labels.d.ts +53 -0
  328. package/dist/pages/manual-bookings/labels.js +52 -0
  329. package/dist/pages/notifications/labels.d.ts +22 -0
  330. package/dist/pages/notifications/labels.js +21 -0
  331. package/dist/pages/notifications/notifications-page.d.ts +14 -0
  332. package/dist/pages/notifications/notifications-page.js +81 -0
  333. package/dist/pages/open-items/OpenItemsPage.d.ts +11 -0
  334. package/dist/pages/open-items/OpenItemsPage.js +110 -0
  335. package/dist/pages/open-items/index.d.ts +6 -0
  336. package/dist/pages/open-items/index.js +3 -0
  337. package/dist/pages/open-items/labels.d.ts +37 -0
  338. package/dist/pages/open-items/labels.js +36 -0
  339. package/dist/pages/open-items/urgency.d.ts +8 -0
  340. package/dist/pages/open-items/urgency.js +27 -0
  341. package/dist/pages/opos-whitelist/OposWhitelistPage.d.ts +7 -0
  342. package/dist/pages/opos-whitelist/OposWhitelistPage.js +165 -0
  343. package/dist/pages/opos-whitelist/index.d.ts +4 -0
  344. package/dist/pages/opos-whitelist/index.js +2 -0
  345. package/dist/pages/opos-whitelist/labels.d.ts +56 -0
  346. package/dist/pages/opos-whitelist/labels.js +70 -0
  347. package/dist/pages/outgoing-invoices/OutgoingInvoicesPage.d.ts +7 -0
  348. package/dist/pages/outgoing-invoices/OutgoingInvoicesPage.js +169 -0
  349. package/dist/pages/outgoing-invoices/index.d.ts +4 -0
  350. package/dist/pages/outgoing-invoices/index.js +2 -0
  351. package/dist/pages/outgoing-invoices/labels.d.ts +43 -0
  352. package/dist/pages/outgoing-invoices/labels.js +42 -0
  353. package/dist/pages/outgoing-invoices/sort-control.d.ts +17 -0
  354. package/dist/pages/outgoing-invoices/sort-control.js +8 -0
  355. package/dist/pages/outgoing-invoices/use-table-view.d.ts +23 -0
  356. package/dist/pages/outgoing-invoices/use-table-view.js +54 -0
  357. package/dist/pages/overview/labels.d.ts +35 -0
  358. package/dist/pages/overview/labels.js +34 -0
  359. package/dist/pages/overview/overview-page.d.ts +22 -0
  360. package/dist/pages/overview/overview-page.js +127 -0
  361. package/dist/pages/processing-log/labels.d.ts +54 -0
  362. package/dist/pages/processing-log/labels.js +53 -0
  363. package/dist/pages/processing-log/mail-parsing.d.ts +21 -0
  364. package/dist/pages/processing-log/mail-parsing.js +52 -0
  365. package/dist/pages/processing-log/processing-log-page.d.ts +9 -0
  366. package/dist/pages/processing-log/processing-log-page.js +206 -0
  367. package/dist/pages/properties/badges.d.ts +20 -0
  368. package/dist/pages/properties/badges.js +45 -0
  369. package/dist/pages/properties/company-assignment-field.d.ts +11 -0
  370. package/dist/pages/properties/company-assignment-field.js +13 -0
  371. package/dist/pages/properties/form-field.d.ts +6 -0
  372. package/dist/pages/properties/form-field.js +9 -0
  373. package/dist/pages/properties/labels.d.ts +124 -0
  374. package/dist/pages/properties/labels.js +128 -0
  375. package/dist/pages/properties/name-variants-card.d.ts +7 -0
  376. package/dist/pages/properties/name-variants-card.js +60 -0
  377. package/dist/pages/properties/property-detail-page.d.ts +10 -0
  378. package/dist/pages/properties/property-detail-page.js +150 -0
  379. package/dist/pages/properties/property-list-page.d.ts +13 -0
  380. package/dist/pages/properties/property-list-page.js +201 -0
  381. package/dist/pages/properties/sort-control.d.ts +14 -0
  382. package/dist/pages/properties/sort-control.js +9 -0
  383. package/dist/pages/properties/use-infinite-rows.d.ts +6 -0
  384. package/dist/pages/properties/use-infinite-rows.js +26 -0
  385. package/dist/pages/properties/use-table-view.d.ts +23 -0
  386. package/dist/pages/properties/use-table-view.js +56 -0
  387. package/dist/pages/supplier-detail/SupplierDetailPage.d.ts +10 -0
  388. package/dist/pages/supplier-detail/SupplierDetailPage.js +157 -0
  389. package/dist/pages/supplier-detail/index.d.ts +4 -0
  390. package/dist/pages/supplier-detail/index.js +2 -0
  391. package/dist/pages/supplier-detail/labels.d.ts +46 -0
  392. package/dist/pages/supplier-detail/labels.js +45 -0
  393. package/dist/pages/supplier-list/SupplierListPage.d.ts +9 -0
  394. package/dist/pages/supplier-list/SupplierListPage.js +102 -0
  395. package/dist/pages/supplier-list/index.d.ts +4 -0
  396. package/dist/pages/supplier-list/index.js +2 -0
  397. package/dist/pages/supplier-list/labels.d.ts +33 -0
  398. package/dist/pages/supplier-list/labels.js +32 -0
  399. package/dist/pages/supplier-list/sort-control.d.ts +17 -0
  400. package/dist/pages/supplier-list/sort-control.js +8 -0
  401. package/dist/pages/supplier-list/use-table-view.d.ts +23 -0
  402. package/dist/pages/supplier-list/use-table-view.js +54 -0
  403. package/dist/pages/team/account-dialogs.d.ts +12 -0
  404. package/dist/pages/team/account-dialogs.js +49 -0
  405. package/dist/pages/team/employee-editor.d.ts +19 -0
  406. package/dist/pages/team/employee-editor.js +124 -0
  407. package/dist/pages/team/labels.d.ts +99 -0
  408. package/dist/pages/team/labels.js +98 -0
  409. package/dist/pages/team/new-employee.d.ts +8 -0
  410. package/dist/pages/team/new-employee.js +103 -0
  411. package/dist/pages/team/roles-tab.d.ts +6 -0
  412. package/dist/pages/team/roles-tab.js +46 -0
  413. package/dist/pages/team/team-page.d.ts +7 -0
  414. package/dist/pages/team/team-page.js +81 -0
  415. package/dist/pages/team/temp-password-dialog.d.ts +11 -0
  416. package/dist/pages/team/temp-password-dialog.js +23 -0
  417. package/dist/pages/trash/labels.d.ts +68 -0
  418. package/dist/pages/trash/labels.js +69 -0
  419. package/dist/pages/trash/trash-page.d.ts +9 -0
  420. package/dist/pages/trash/trash-page.js +259 -0
  421. package/dist/pages/vat-rules/labels.d.ts +110 -0
  422. package/dist/pages/vat-rules/labels.js +109 -0
  423. package/dist/pages/vat-rules/new-rule-dialog.d.ts +7 -0
  424. package/dist/pages/vat-rules/new-rule-dialog.js +134 -0
  425. package/dist/pages/vat-rules/rule-row.d.ts +20 -0
  426. package/dist/pages/vat-rules/rule-row.js +120 -0
  427. package/dist/pages/vat-rules/vat-rules-page.d.ts +9 -0
  428. package/dist/pages/vat-rules/vat-rules-page.js +61 -0
  429. package/dist/ui/alert-dialog.d.ts +20 -0
  430. package/dist/ui/alert-dialog.js +41 -0
  431. package/dist/ui/badge.d.ts +9 -0
  432. package/dist/ui/badge.js +20 -0
  433. package/dist/ui/breadcrumb.d.ts +19 -0
  434. package/dist/ui/breadcrumb.js +23 -0
  435. package/dist/ui/button.d.ts +11 -0
  436. package/dist/ui/button.js +33 -0
  437. package/dist/ui/calendar.d.ts +8 -0
  438. package/dist/ui/calendar.js +75 -0
  439. package/dist/ui/card.d.ts +8 -0
  440. package/dist/ui/card.js +16 -0
  441. package/dist/ui/chart.d.ts +62 -0
  442. package/dist/ui/chart.js +118 -0
  443. package/dist/ui/checkbox.d.ts +4 -0
  444. package/dist/ui/checkbox.js +11 -0
  445. package/dist/ui/collapsible.d.ts +5 -0
  446. package/dist/ui/collapsible.js +5 -0
  447. package/dist/ui/combobox.d.ts +24 -0
  448. package/dist/ui/combobox.js +55 -0
  449. package/dist/ui/command.d.ts +80 -0
  450. package/dist/ui/command.js +29 -0
  451. package/dist/ui/dialog.d.ts +19 -0
  452. package/dist/ui/dialog.js +58 -0
  453. package/dist/ui/dropdown-menu.d.ts +27 -0
  454. package/dist/ui/dropdown-menu.js +33 -0
  455. package/dist/ui/field-context.d.ts +4 -0
  456. package/dist/ui/field-context.js +6 -0
  457. package/dist/ui/field.d.ts +3 -0
  458. package/dist/ui/field.js +8 -0
  459. package/dist/ui/icon-action.d.ts +3 -0
  460. package/dist/ui/icon-action.js +8 -0
  461. package/dist/ui/index.d.ts +32 -0
  462. package/dist/ui/index.js +32 -0
  463. package/dist/ui/input.d.ts +3 -0
  464. package/dist/ui/input.js +11 -0
  465. package/dist/ui/label.d.ts +5 -0
  466. package/dist/ui/label.js +15 -0
  467. package/dist/ui/multi-combobox.d.ts +18 -0
  468. package/dist/ui/multi-combobox.js +40 -0
  469. package/dist/ui/popover.d.ts +9 -0
  470. package/dist/ui/popover.js +12 -0
  471. package/dist/ui/scroll-area.d.ts +5 -0
  472. package/dist/ui/scroll-area.js +9 -0
  473. package/dist/ui/scroll-shadow.d.ts +8 -0
  474. package/dist/ui/scroll-shadow.js +57 -0
  475. package/dist/ui/select.d.ts +13 -0
  476. package/dist/ui/select.js +31 -0
  477. package/dist/ui/separator.d.ts +4 -0
  478. package/dist/ui/separator.js +7 -0
  479. package/dist/ui/sheet.d.ts +25 -0
  480. package/dist/ui/sheet.js +40 -0
  481. package/dist/ui/sidebar.d.ts +65 -0
  482. package/dist/ui/sidebar.js +207 -0
  483. package/dist/ui/skeleton.d.ts +2 -0
  484. package/dist/ui/skeleton.js +6 -0
  485. package/dist/ui/sonner.d.ts +5 -0
  486. package/dist/ui/sonner.js +13 -0
  487. package/dist/ui/switch.d.ts +4 -0
  488. package/dist/ui/switch.js +7 -0
  489. package/dist/ui/table.d.ts +12 -0
  490. package/dist/ui/table.js +24 -0
  491. package/dist/ui/tabs.d.ts +7 -0
  492. package/dist/ui/tabs.js +12 -0
  493. package/dist/ui/textarea.d.ts +3 -0
  494. package/dist/ui/textarea.js +11 -0
  495. package/dist/ui/tooltip.d.ts +7 -0
  496. package/dist/ui/tooltip.js +11 -0
  497. package/package.json +80 -0
  498. package/themes/TOKENS.md +57 -0
  499. package/themes/default.css +60 -0
@@ -0,0 +1,87 @@
1
+ import type { QueryResult } from "../lib/query-result";
2
+ import type { StatusTone } from "./processing-log";
3
+ export type PropertyVatStatus = "taxable" | "taxExempt" | "mixed";
4
+ export interface Property {
5
+ id: string;
6
+ code: string;
7
+ name: string | null;
8
+ address: string | null;
9
+ vatStatus: PropertyVatStatus | null;
10
+ createdAt: string | null;
11
+ updatedAt: string | null;
12
+ }
13
+ export interface PropertyCompany {
14
+ id: string;
15
+ code: string;
16
+ name: string;
17
+ }
18
+ export interface PropertyInvoiceTotals {
19
+ bookedAmount: number;
20
+ invoiceCount: number;
21
+ }
22
+ export interface PropertyInvoiceVatLine {
23
+ rate: number | null;
24
+ netAmount: number | null;
25
+ }
26
+ export interface PropertyInvoice {
27
+ id: string;
28
+ supplierName: string | null;
29
+ invoiceNumber: string | null;
30
+ companyCode: string | null;
31
+ documentDate: string | null;
32
+ vatRate: number | null;
33
+ vatLines: PropertyInvoiceVatLine[] | null;
34
+ amountGross: number | null;
35
+ status: string | null;
36
+ }
37
+ export interface PropertyNameVariant {
38
+ id: string;
39
+ text: string;
40
+ }
41
+ export type NameVariantRejectionReason = "alreadyExists" | "claimedByOther";
42
+ export interface PropertyChanges {
43
+ name?: string | null;
44
+ address?: string | null;
45
+ vatStatus?: PropertyVatStatus | null;
46
+ }
47
+ export interface PropertiesAdapter {
48
+ useProperties(): QueryResult<Property[]>;
49
+ useProperty(code: string): QueryResult<Property | null>;
50
+ useCompanies(): QueryResult<PropertyCompany[]>;
51
+ /** Company ids assigned to each property, keyed by property id. */
52
+ useCompanyIdsByPropertyId(): QueryResult<Record<string, string[]>>;
53
+ /** Booked invoice volume and count per property, keyed by property id. */
54
+ useInvoiceTotalsByPropertyId(): QueryResult<Record<string, PropertyInvoiceTotals>>;
55
+ usePropertyInvoices(code: string): QueryResult<PropertyInvoice[]>;
56
+ useNameVariants(propertyCode: string): QueryResult<PropertyNameVariant[]>;
57
+ createProperty(input: {
58
+ code: string;
59
+ name: string | null;
60
+ address: string | null;
61
+ vatStatus: PropertyVatStatus | null;
62
+ }): Promise<Property>;
63
+ updateProperty(input: {
64
+ propertyId: string;
65
+ changes: PropertyChanges;
66
+ }): Promise<void>;
67
+ setPropertyCompanies(input: {
68
+ propertyId: string;
69
+ companyIds: string[];
70
+ }): Promise<void>;
71
+ addNameVariant(input: {
72
+ propertyCode: string;
73
+ text: string;
74
+ }): Promise<void>;
75
+ removeNameVariant(input: {
76
+ propertyCode: string;
77
+ variantId: string;
78
+ }): Promise<void>;
79
+ /** Classify an addNameVariant rejection so the page can word it; null means a generic failure. */
80
+ nameVariantRejectionReason(error: unknown): NameVariantRejectionReason | null;
81
+ invoiceStatusTone: Record<string, StatusTone>;
82
+ openPropertyList(): void;
83
+ openProperty(code: string): void;
84
+ /** Open the property list with its create dialog pre-filled with this code. */
85
+ openPropertyCreate(code: string): void;
86
+ openInvoice(invoiceId: string): void;
87
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,64 @@
1
+ export interface SupplierRecord {
2
+ id: string;
3
+ name: string;
4
+ vat_id: string | null;
5
+ iban: string | null;
6
+ bic: string | null;
7
+ bank_name: string | null;
8
+ address: string | null;
9
+ phone: string | null;
10
+ email: string | null;
11
+ contact_person: string | null;
12
+ deleted_at: string | null;
13
+ delete_reason: string | null;
14
+ created_at: string;
15
+ }
16
+ export interface SupplierBankAccountRecord {
17
+ id: string;
18
+ iban: string;
19
+ bic: string | null;
20
+ bank_name: string | null;
21
+ is_active: boolean;
22
+ is_default: boolean;
23
+ confirmed_at?: string | null;
24
+ }
25
+ export interface SupplierInvoiceRow {
26
+ id: string;
27
+ invoiceNumber: string | null;
28
+ documentDate: string | null;
29
+ amountGross: number | null;
30
+ status: string | null;
31
+ paidAt: string | null;
32
+ }
33
+ export interface NewSupplierBankAccount {
34
+ iban: string;
35
+ bic: string;
36
+ bankName: string;
37
+ }
38
+ export interface SupplierDetailAdapter {
39
+ useSupplier(id: string): {
40
+ data: SupplierRecord | undefined;
41
+ loading: boolean;
42
+ error: unknown;
43
+ refetch: () => void;
44
+ };
45
+ useInvoices(supplierId: string): {
46
+ data: SupplierInvoiceRow[];
47
+ loading: boolean;
48
+ };
49
+ canEdit: boolean;
50
+ updateSupplier(id: string, changes: Record<string, unknown>): Promise<void>;
51
+ softDelete(id: string, reason: string): Promise<void>;
52
+ restore(id: string): Promise<void>;
53
+ openInvoice: (invoiceId: string) => void;
54
+ openSupplierList: () => void;
55
+ bankAccounts?: {
56
+ useAccounts(supplierId: string): {
57
+ data: SupplierBankAccountRecord[];
58
+ loading: boolean;
59
+ };
60
+ addAccount(supplierId: string, account: NewSupplierBankAccount): Promise<void>;
61
+ deleteAccount(accountId: string): Promise<void>;
62
+ setDefault(supplierId: string, accountId: string): Promise<void>;
63
+ };
64
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { SupplierRecord } from "./supplier-detail";
2
+ export interface SupplierListRow extends SupplierRecord {
3
+ bookedTotal: number;
4
+ invoiceCount: number;
5
+ hasUnconfirmedAccount: boolean;
6
+ }
7
+ export interface NewSupplierInput {
8
+ name: string;
9
+ }
10
+ export interface SupplierListAdapter {
11
+ useSuppliers(includeDeleted: boolean): {
12
+ data: SupplierListRow[];
13
+ loading: boolean;
14
+ error: unknown;
15
+ };
16
+ canCreate: boolean;
17
+ createSupplier(input: NewSupplierInput): Promise<{
18
+ id: string;
19
+ }>;
20
+ openSupplier: (supplierId: string) => void;
21
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,79 @@
1
+ import type { QueryResult } from "../lib/query-result";
2
+ import type { AccessPermission } from "../components/access/types";
3
+ export interface TeamEmployee {
4
+ id: string;
5
+ name: string | null;
6
+ email: string;
7
+ roleName: string;
8
+ permissions: string[];
9
+ allowedCompanyIds: string[];
10
+ isActive: boolean;
11
+ mustChangePassword: boolean;
12
+ }
13
+ export interface TeamCompany {
14
+ id: string;
15
+ code: string;
16
+ name: string;
17
+ }
18
+ export interface TeamRole {
19
+ id: string;
20
+ name: string;
21
+ }
22
+ export interface CreatedAccount {
23
+ employeeId: string;
24
+ email: string;
25
+ tempPassword: string;
26
+ }
27
+ export interface TeamAdapter {
28
+ useEmployees(): QueryResult<TeamEmployee[]>;
29
+ useCompanies(): QueryResult<TeamCompany[]>;
30
+ usePermissionCatalogue(): QueryResult<AccessPermission[]>;
31
+ useRoles(): QueryResult<TeamRole[]>;
32
+ useRolePermissions(): QueryResult<Record<string, string[]>>;
33
+ createEmployee(input: {
34
+ email: string;
35
+ name: string;
36
+ roleName: string;
37
+ companyIds: string[];
38
+ }): Promise<CreatedAccount>;
39
+ updateEmployeeProfile(input: {
40
+ employeeId: string;
41
+ name: string;
42
+ email: string;
43
+ }): Promise<void>;
44
+ updateEmployeeRole(input: {
45
+ employeeId: string;
46
+ roleName: string;
47
+ }): Promise<void>;
48
+ setCompanyAccess(input: {
49
+ employeeId: string;
50
+ companyIds: string[];
51
+ }): Promise<void>;
52
+ setEmployeeRight(input: {
53
+ employeeId: string;
54
+ right: string;
55
+ value: boolean;
56
+ }): Promise<void>;
57
+ setRolePermission(input: {
58
+ roleId: string;
59
+ roleName: string;
60
+ key: string;
61
+ value: boolean;
62
+ }): Promise<void>;
63
+ setEmployeeActive(input: {
64
+ employeeId: string;
65
+ isActive: boolean;
66
+ }): Promise<void>;
67
+ resetPassword(input: {
68
+ employeeId: string;
69
+ }): Promise<{
70
+ email: string;
71
+ tempPassword: string;
72
+ }>;
73
+ /** Email of the signed-in admin, so the page can stop self-demotion and self-deactivation. */
74
+ currentUserEmail: string | null;
75
+ /** Roles an admin may assign. The owner role stays out of this list. */
76
+ assignableRoles: string[];
77
+ /** Placeholder domain for the new-employee email field, e.g. "example.com". */
78
+ emailDomain: string;
79
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,26 @@
1
+ import type { QueryResult } from "../lib/query-result";
2
+ export interface TrashedRecord {
3
+ tableName: string;
4
+ id: string;
5
+ label: string;
6
+ deletedAt: string;
7
+ deletedBy: string | null;
8
+ deleteReason: string | null;
9
+ }
10
+ export interface TrashTableNames {
11
+ eligible: string[];
12
+ purgeable: string[];
13
+ }
14
+ export interface TrashAdapter {
15
+ useTrashedRecords(tableFilter: string | undefined): QueryResult<TrashedRecord[]>;
16
+ useTrashTableNames(): QueryResult<TrashTableNames>;
17
+ restoreRecord(input: {
18
+ tableName: string;
19
+ id: string;
20
+ reason: string | null;
21
+ }): Promise<void>;
22
+ purgeRecord(input: {
23
+ tableName: string;
24
+ id: string;
25
+ }): Promise<void>;
26
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,83 @@
1
+ import type { QueryResult } from "../lib/query-result";
2
+ export interface VatRule {
3
+ id: string;
4
+ vatRate: number | null;
5
+ vatTreatment: string | null;
6
+ vatDeductiblePercent: number | null;
7
+ vatSpecialCase: string | null;
8
+ supplierId: string | null;
9
+ propertyId: string | null;
10
+ companyId: string | null;
11
+ referencePattern: string | null;
12
+ note: string | null;
13
+ isActive: boolean;
14
+ }
15
+ export interface VatRuleDraft {
16
+ vatRate: number;
17
+ vatTreatment: string | null;
18
+ vatDeductiblePercent: number | null;
19
+ vatSpecialCase: string | null;
20
+ supplierId: string | null;
21
+ propertyId: string | null;
22
+ companyId: string | null;
23
+ referencePattern: string | null;
24
+ }
25
+ export interface VatRuleInput extends VatRuleDraft {
26
+ note: string | null;
27
+ }
28
+ export interface VatRuleCompany {
29
+ id: string;
30
+ code: string;
31
+ name: string;
32
+ }
33
+ export interface VatRuleSupplier {
34
+ id: string;
35
+ name: string;
36
+ }
37
+ export interface VatRuleProperty {
38
+ id: string;
39
+ code: string;
40
+ name: string | null;
41
+ }
42
+ export interface RuleImpact {
43
+ wouldChange: number;
44
+ matches: number;
45
+ }
46
+ export interface BulkApplyResult {
47
+ changed: number;
48
+ matches: number;
49
+ skipped: number;
50
+ }
51
+ export interface VatReserveSummary {
52
+ companyId: string;
53
+ inputVatTotal: number;
54
+ inputVatDeductible: number;
55
+ inputVatNondeductible: number;
56
+ outputVat: number;
57
+ reserve: number;
58
+ unresolvedCount: number;
59
+ unresolvedAmount: number;
60
+ }
61
+ export interface VatRulesAdapter {
62
+ useVatRules(): QueryResult<VatRule[]>;
63
+ useCompanies(): QueryResult<VatRuleCompany[]>;
64
+ useSuppliers(): QueryResult<VatRuleSupplier[]>;
65
+ useProperties(): QueryResult<VatRuleProperty[]>;
66
+ useRuleImpact(ruleId: string): QueryResult<RuleImpact>;
67
+ useDraftImpact(draft: VatRuleDraft | null): QueryResult<RuleImpact>;
68
+ useVatReserve(companyId: string | null): QueryResult<VatReserveSummary>;
69
+ useVatReserveForCompanies(companyIds: string[]): QueryResult<VatReserveSummary[]>;
70
+ createVatRule(input: VatRuleInput): Promise<void>;
71
+ setVatRuleActive(input: {
72
+ id: string;
73
+ isActive: boolean;
74
+ }): Promise<void>;
75
+ applyVatRuleToExisting(ruleId: string): Promise<BulkApplyResult>;
76
+ deleteVatRule(input: {
77
+ id: string;
78
+ reason: string;
79
+ }): Promise<void>;
80
+ isDuplicateRuleError(error: unknown): boolean;
81
+ vatTreatmentValues: string[];
82
+ vatSpecialCaseValues: string[];
83
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export { PermissionChecklist } from "./permission-checklist";
3
+ export { PermissionMatrix } from "./permission-matrix";
@@ -0,0 +1,3 @@
1
+ export * from "./types.js";
2
+ export { PermissionChecklist } from "./permission-checklist.js";
3
+ export { PermissionMatrix } from "./permission-matrix.js";
@@ -0,0 +1,13 @@
1
+ import type { AccessPermission, AccessToggle } from "./types";
2
+ export declare function PermissionChecklist({ permissions, held, onToggle, disabled, readOnlyNote, categoryLabel, className, }: {
3
+ permissions: AccessPermission[];
4
+ /** Keys currently in force for this subject. */
5
+ held: string[];
6
+ onToggle: AccessToggle;
7
+ /** Locks every box — used for a subject whose access is not editable (e.g. an owner account). */
8
+ disabled?: boolean;
9
+ /** Shown instead of nothing when `disabled`, so a locked list explains itself. */
10
+ readOnlyNote?: string;
11
+ categoryLabel?: (category: string) => string;
12
+ className?: string;
13
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { Checkbox } from "../../ui/checkbox.js";
4
+ import { cn } from "../../lib/class-names.js";
5
+ export function PermissionChecklist({ permissions, held, onToggle, disabled = false, readOnlyNote, categoryLabel = (c) => c, className, }) {
6
+ const gruppen = useMemo(() => {
7
+ const nach = new Map();
8
+ for (const p of permissions) {
9
+ if (!nach.has(p.category))
10
+ nach.set(p.category, []);
11
+ nach.get(p.category).push(p);
12
+ }
13
+ return [...nach.entries()];
14
+ }, [permissions]);
15
+ const gehalten = useMemo(() => new Set(held), [held]);
16
+ if (gruppen.length === 0)
17
+ return null;
18
+ return (_jsxs("div", { className: cn("space-y-3", className), children: [disabled && readOnlyNote && _jsx("p", { className: "text-sm text-muted-foreground", children: readOnlyNote }), gruppen.map(([kategorie, eintraege]) => (_jsxs("div", { children: [_jsx("div", { className: "text-sm font-semibold text-foreground", children: categoryLabel(kategorie) }), _jsx("div", { className: "mt-1.5 grid gap-x-3 gap-y-0.5 sm:grid-cols-2", children: eintraege.map((p) => (_jsxs("label", { title: p.description ?? undefined, className: cn("flex items-center gap-2.5 rounded-md px-2 py-1.5 text-sm", disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-muted/50"), children: [_jsx(Checkbox, { checked: gehalten.has(p.key), disabled: disabled, onCheckedChange: (checked) => onToggle(p.key, checked === true), "aria-label": p.label }), _jsx("span", { className: "min-w-0 text-sm font-medium leading-snug text-foreground", children: p.label })] }, p.key))) })] }, kategorie)))] }));
19
+ }
@@ -0,0 +1,12 @@
1
+ import type { AccessPermission, AccessRole } from "./types";
2
+ export declare function PermissionMatrix({ permissions, roles, grantedByRole, onToggle, disabled, permissionColumnLabel, categoryLabel, className, }: {
3
+ permissions: AccessPermission[];
4
+ roles: AccessRole[];
5
+ /** role id → permission keys that role grants. */
6
+ grantedByRole: Record<string, string[]>;
7
+ onToggle: (roleId: string, key: string, next: boolean) => void;
8
+ disabled?: boolean;
9
+ permissionColumnLabel: string;
10
+ categoryLabel?: (category: string) => string;
11
+ className?: string;
12
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { Checkbox } from "../../ui/checkbox.js";
4
+ import { cn } from "../../lib/class-names.js";
5
+ export function PermissionMatrix({ permissions, roles, grantedByRole, onToggle, disabled = false, permissionColumnLabel, categoryLabel = (c) => c, className, }) {
6
+ const gruppen = useMemo(() => {
7
+ const nach = new Map();
8
+ for (const p of permissions) {
9
+ if (!nach.has(p.category))
10
+ nach.set(p.category, []);
11
+ nach.get(p.category).push(p);
12
+ }
13
+ return [...nach.entries()];
14
+ }, [permissions]);
15
+ if (gruppen.length === 0 || roles.length === 0)
16
+ return null;
17
+ return (_jsx("div", { className: cn("max-w-4xl space-y-5", className), children: gruppen.map(([kategorie, eintraege], gruppenIndex) => (_jsx("section", { className: "overflow-hidden rounded-xl border border-border bg-card", children: _jsx("div", { className: "overflow-x-auto", children: _jsxs("div", { className: "min-w-[38rem]", children: [_jsxs("header", { className: "flex items-end gap-4 border-b border-border bg-muted/40 px-4 py-3", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "text-base font-semibold text-foreground", children: categoryLabel(kategorie) }), gruppenIndex === 0 && (_jsx("div", { className: "text-sm text-muted-foreground", children: permissionColumnLabel }))] }), roles.map((r) => (_jsx("div", { className: "w-28 shrink-0 text-center text-sm font-medium text-foreground", children: r.label }, r.id)))] }), _jsx("div", { className: "divide-y divide-border", children: eintraege.map((p) => (_jsxs("div", { className: "flex items-center gap-4 px-4 py-3 transition-colors hover:bg-muted/40", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "text-base font-medium leading-snug text-foreground", children: p.label }), p.description && (_jsx("div", { className: "mt-1 text-sm leading-snug text-muted-foreground", children: p.description }))] }), roles.map((r) => (_jsx("div", { className: "flex w-28 shrink-0 justify-center", children: _jsx(Checkbox, { checked: (grantedByRole[r.id] ?? []).includes(p.key), disabled: disabled, onCheckedChange: (checked) => onToggle(r.id, p.key, checked === true), "aria-label": `${r.label}: ${p.label}` }) }, r.id)))] }, p.key))) })] }) }) }, kategorie))) }));
18
+ }
@@ -0,0 +1,15 @@
1
+ /** One grantable thing, as the catalogue describes it. */
2
+ export interface AccessPermission {
3
+ key: string;
4
+ /** Groups rows under a heading. Free text — the host maps it to a label. */
5
+ category: string;
6
+ label: string;
7
+ description?: string | null;
8
+ }
9
+ /** A role, as a column in the matrix. */
10
+ export interface AccessRole {
11
+ id: string;
12
+ label: string;
13
+ }
14
+ /** Called when a box is ticked or cleared. Rejections should surface as a toast by the host. */
15
+ export type AccessToggle = (key: string, next: boolean) => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ import { type ReactNode } from "react";
2
+ export type IsoDay = string;
3
+ export interface DateRangeCalendarLabels {
4
+ reset: string;
5
+ apply: string;
6
+ previousMonth: string;
7
+ nextMonth: string;
8
+ pickSecond: string;
9
+ }
10
+ export declare const englishDateRangeCalendarLabels: DateRangeCalendarLabels;
11
+ export declare function DateRangeCalendar({ from, to, onApply, labels, locale, open, footerExtra, }: {
12
+ from: IsoDay;
13
+ to: IsoDay;
14
+ onApply: (from: IsoDay, to: IsoDay) => void;
15
+ labels: DateRangeCalendarLabels;
16
+ locale: string;
17
+ open: boolean;
18
+ footerExtra?: ReactNode;
19
+ }): import("react").JSX.Element;
@@ -0,0 +1,97 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useState } from "react";
3
+ import { ChevronLeft, ChevronRight } from "lucide-react";
4
+ import { Button } from "../../ui/button.js";
5
+ import { cn } from "../../lib/class-names.js";
6
+ export const englishDateRangeCalendarLabels = {
7
+ reset: "Reset",
8
+ apply: "Apply",
9
+ previousMonth: "Previous month",
10
+ nextMonth: "Next month",
11
+ pickSecond: "Pick the second date",
12
+ };
13
+ export function DateRangeCalendar({ from, to, onApply, labels, locale, open, footerExtra, }) {
14
+ const [draftFrom, setDraftFrom] = useState(null);
15
+ const [draftTo, setDraftTo] = useState(null);
16
+ const [month, setMonth] = useState(() => startOfMonth(parseDay(from) ?? new Date()));
17
+ useEffect(() => {
18
+ if (!open)
19
+ return;
20
+ setDraftFrom(null);
21
+ setDraftTo(null);
22
+ setMonth(startOfMonth(parseDay(from) ?? parseDay(to) ?? new Date()));
23
+ }, [open, from, to]);
24
+ const appliedFrom = parseDay(from);
25
+ const appliedTo = parseDay(to);
26
+ const shownFrom = draftFrom ?? (draftTo ? null : appliedFrom);
27
+ const shownTo = draftTo ?? (draftFrom ? null : appliedTo);
28
+ const halfPicked = !!draftFrom !== !!draftTo;
29
+ const days = useMemo(() => monthGrid(month), [month]);
30
+ const weekdayNames = useMemo(() => weekdays(locale), [locale]);
31
+ const monthName = useMemo(() => new Intl.DateTimeFormat(locale, { month: "long", year: "numeric" }).format(month), [month, locale]);
32
+ function pick(day) {
33
+ if (!draftFrom || draftTo) {
34
+ setDraftFrom(day);
35
+ setDraftTo(null);
36
+ return;
37
+ }
38
+ if (day < draftFrom) {
39
+ setDraftTo(draftFrom);
40
+ setDraftFrom(day);
41
+ }
42
+ else {
43
+ setDraftTo(day);
44
+ }
45
+ }
46
+ const canApply = !!draftFrom && !!draftTo;
47
+ return (_jsxs("div", { children: [_jsxs("div", { className: "mb-2 flex items-center justify-between gap-2", children: [_jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-7", "aria-label": labels.previousMonth, onClick: () => setMonth(shiftMonth(month, -1)), children: _jsx(ChevronLeft, { className: "size-4" }) }), _jsx("span", { className: "text-sm font-medium text-foreground", children: monthName }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-7", "aria-label": labels.nextMonth, onClick: () => setMonth(shiftMonth(month, 1)), children: _jsx(ChevronRight, { className: "size-4" }) })] }), _jsxs("div", { className: "grid grid-cols-7 gap-0.5", children: [weekdayNames.map((name) => (_jsx("div", { className: "flex h-7 items-center justify-center text-xs font-medium text-muted-foreground", children: name }, name))), days.map((day) => {
48
+ const inMonth = day.getMonth() === month.getMonth();
49
+ const isStart = isSameDay(day, shownFrom);
50
+ const isEnd = isSameDay(day, shownTo);
51
+ const isBetween = !!shownFrom && !!shownTo && day > shownFrom && day < shownTo;
52
+ const isEdge = isStart || isEnd;
53
+ return (_jsx("button", { type: "button", onClick: () => pick(day), className: cn("flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-sm transition-colors", !inMonth && "text-muted-foreground/40", inMonth && !isEdge && !isBetween && "hover:bg-accent", isBetween && "bg-accent text-accent-foreground", isEdge && "bg-primary font-medium text-primary-foreground", isToday(day) && !isEdge && "ring-1 ring-inset ring-border"), "aria-pressed": isEdge || isBetween, children: day.getDate() }, day.toISOString()));
54
+ })] }), _jsx("p", { className: "mt-2 min-h-[1.25rem] text-xs text-muted-foreground", children: halfPicked ? labels.pickSecond : null }), _jsxs("div", { className: "mt-1 flex items-center justify-between gap-2", children: [_jsx("div", { children: footerExtra }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onApply("", ""), children: labels.reset }), _jsx(Button, { type: "button", size: "sm", disabled: !canApply, onClick: () => {
55
+ if (!draftFrom || !draftTo)
56
+ return;
57
+ onApply(isoDay(draftFrom), isoDay(draftTo));
58
+ }, children: labels.apply })] })] })] }));
59
+ }
60
+ function parseDay(value) {
61
+ if (!value)
62
+ return null;
63
+ const [year, month, day] = value.split("-").map(Number);
64
+ if (!year || !month || !day)
65
+ return null;
66
+ const date = new Date(year, month - 1, day, 12);
67
+ return Number.isNaN(date.getTime()) ? null : date;
68
+ }
69
+ function isoDay(date) {
70
+ const month = `${date.getMonth() + 1}`.padStart(2, "0");
71
+ const day = `${date.getDate()}`.padStart(2, "0");
72
+ return `${date.getFullYear()}-${month}-${day}`;
73
+ }
74
+ function startOfMonth(date) {
75
+ return new Date(date.getFullYear(), date.getMonth(), 1, 12);
76
+ }
77
+ function shiftMonth(date, months) {
78
+ return new Date(date.getFullYear(), date.getMonth() + months, 1, 12);
79
+ }
80
+ function isSameDay(left, right) {
81
+ return (!!right &&
82
+ left.getFullYear() === right.getFullYear() &&
83
+ left.getMonth() === right.getMonth() &&
84
+ left.getDate() === right.getDate());
85
+ }
86
+ function isToday(date) {
87
+ return isSameDay(date, new Date());
88
+ }
89
+ function monthGrid(month) {
90
+ const firstWeekday = (new Date(month.getFullYear(), month.getMonth(), 1, 12).getDay() + 6) % 7;
91
+ const start = new Date(month.getFullYear(), month.getMonth(), 1 - firstWeekday, 12);
92
+ return Array.from({ length: 42 }, (_, index) => new Date(start.getFullYear(), start.getMonth(), start.getDate() + index, 12));
93
+ }
94
+ function weekdays(locale) {
95
+ const format = new Intl.DateTimeFormat(locale, { weekday: "short" });
96
+ return Array.from({ length: 7 }, (_, index) => format.format(new Date(2024, 0, 1 + index, 12)));
97
+ }
@@ -0,0 +1,23 @@
1
+ export { DashboardPanel } from "./panel";
2
+ export { KpiCard } from "./kpi-card";
3
+ export { StatTile, StatRow } from "./stat-tile";
4
+ export { StageTiles } from "./stage-tiles";
5
+ export type { StageTile } from "./stage-tiles";
6
+ export { RankedBars, RankedBarsSkeleton } from "./ranked-bars";
7
+ export type { RankedBarRow } from "./ranked-bars";
8
+ export { OVERVIEW_PERIODS, OVERVIEW_PERIOD_DEFAULT, isOverviewPeriod, overviewPeriodRange, previousPeriodRange, } from "./periods";
9
+ export type { OverviewPeriod, PeriodRange } from "./periods";
10
+ export { PeriodPicker, useStoredPeriod, readStoredPeriod, writeStoredPeriod, englishPeriodLabels, } from "./period-picker";
11
+ export type { PeriodValue, PeriodLabels } from "./period-picker";
12
+ export { MoneyTrendChart } from "./money-trend-chart";
13
+ export type { MoneyTrendPoint } from "./money-trend-chart";
14
+ export { StatRowsPanel } from "./stat-rows-panel";
15
+ export type { StatRowConfig } from "./stat-rows-panel";
16
+ export { MoneyCardsRow } from "./money-cards-row";
17
+ export type { MoneyFigure, MoneyCardSpec } from "./money-cards-row";
18
+ export { PipelineStagesPanel } from "./pipeline-stages-panel";
19
+ export { RankedListPanel } from "./ranked-list-panel";
20
+ export { ProcessingSummaryPanel } from "./processing-summary-panel";
21
+ export type { ProcessingSummary } from "./processing-summary-panel";
22
+ export { DateRangeCalendar, englishDateRangeCalendarLabels } from "./date-range-calendar";
23
+ export type { DateRangeCalendarLabels, IsoDay } from "./date-range-calendar";
@@ -0,0 +1,14 @@
1
+ export { DashboardPanel } from "./panel.js";
2
+ export { KpiCard } from "./kpi-card.js";
3
+ export { StatTile, StatRow } from "./stat-tile.js";
4
+ export { StageTiles } from "./stage-tiles.js";
5
+ export { RankedBars, RankedBarsSkeleton } from "./ranked-bars.js";
6
+ export { OVERVIEW_PERIODS, OVERVIEW_PERIOD_DEFAULT, isOverviewPeriod, overviewPeriodRange, previousPeriodRange, } from "./periods.js";
7
+ export { PeriodPicker, useStoredPeriod, readStoredPeriod, writeStoredPeriod, englishPeriodLabels, } from "./period-picker.js";
8
+ export { MoneyTrendChart } from "./money-trend-chart.js";
9
+ export { StatRowsPanel } from "./stat-rows-panel.js";
10
+ export { MoneyCardsRow } from "./money-cards-row.js";
11
+ export { PipelineStagesPanel } from "./pipeline-stages-panel.js";
12
+ export { RankedListPanel } from "./ranked-list-panel.js";
13
+ export { ProcessingSummaryPanel } from "./processing-summary-panel.js";
14
+ export { DateRangeCalendar, englishDateRangeCalendarLabels } from "./date-range-calendar.js";
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from "react";
2
+ import type { LucideIcon } from "lucide-react";
3
+ export declare function KpiCard({ icon: Icon, iconTint, label, to, loading, value, delta, headerRight, className, }: {
4
+ icon: LucideIcon;
5
+ iconTint: string;
6
+ label: string;
7
+ to: string;
8
+ loading: boolean;
9
+ value: ReactNode;
10
+ delta?: ReactNode;
11
+ headerRight?: ReactNode;
12
+ className?: string;
13
+ }): import("react").JSX.Element;