@spaceinvoices/react-ui 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/cli/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/src/common/autocomplete.tsx +18 -2
  4. package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +0 -1
  5. package/src/components/advance-invoices/create/locales/de.ts +2 -0
  6. package/src/components/advance-invoices/create/locales/es.ts +2 -0
  7. package/src/components/advance-invoices/create/locales/fr.ts +2 -0
  8. package/src/components/advance-invoices/create/locales/hr.ts +1 -0
  9. package/src/components/advance-invoices/create/locales/it.ts +2 -0
  10. package/src/components/advance-invoices/create/locales/nl.ts +2 -0
  11. package/src/components/advance-invoices/create/locales/pl.ts +1 -0
  12. package/src/components/advance-invoices/create/locales/pt.ts +1 -0
  13. package/src/components/advance-invoices/create/locales/sl.ts +1 -0
  14. package/src/components/advance-invoices/create/prepare-advance-invoice-submission.ts +0 -1
  15. package/src/components/advance-invoices/list/list-table.tsx +130 -40
  16. package/src/components/advance-invoices/list/locales/de.ts +6 -0
  17. package/src/components/advance-invoices/list/locales/en.ts +5 -0
  18. package/src/components/advance-invoices/list/locales/es.ts +6 -0
  19. package/src/components/advance-invoices/list/locales/fr.ts +6 -0
  20. package/src/components/advance-invoices/list/locales/hr.ts +6 -0
  21. package/src/components/advance-invoices/list/locales/it.ts +6 -0
  22. package/src/components/advance-invoices/list/locales/nl.ts +6 -0
  23. package/src/components/advance-invoices/list/locales/pl.ts +6 -0
  24. package/src/components/advance-invoices/list/locales/pt.ts +6 -0
  25. package/src/components/advance-invoices/list/locales/sl.ts +6 -0
  26. package/src/components/credit-notes/create/create-credit-note-form.tsx +114 -3
  27. package/src/components/credit-notes/create/locales/de.ts +2 -0
  28. package/src/components/credit-notes/create/locales/es.ts +2 -0
  29. package/src/components/credit-notes/create/locales/fr.ts +2 -0
  30. package/src/components/credit-notes/create/locales/hr.ts +1 -0
  31. package/src/components/credit-notes/create/locales/it.ts +2 -0
  32. package/src/components/credit-notes/create/locales/nl.ts +2 -0
  33. package/src/components/credit-notes/create/locales/pl.ts +1 -0
  34. package/src/components/credit-notes/create/locales/pt.ts +1 -0
  35. package/src/components/credit-notes/create/locales/sl.ts +1 -0
  36. package/src/components/credit-notes/credit-notes.hooks.ts +30 -0
  37. package/src/components/credit-notes/list/list-table.tsx +111 -36
  38. package/src/components/credit-notes/list/locales/de.ts +6 -1
  39. package/src/components/credit-notes/list/locales/en.ts +6 -0
  40. package/src/components/credit-notes/list/locales/es.ts +6 -1
  41. package/src/components/credit-notes/list/locales/fr.ts +6 -1
  42. package/src/components/credit-notes/list/locales/hr.ts +6 -1
  43. package/src/components/credit-notes/list/locales/it.ts +6 -1
  44. package/src/components/credit-notes/list/locales/nl.ts +6 -1
  45. package/src/components/credit-notes/list/locales/pl.ts +6 -1
  46. package/src/components/credit-notes/list/locales/pt.ts +6 -1
  47. package/src/components/credit-notes/list/locales/sl.ts +6 -1
  48. package/src/components/customers/customer-list-table/customer-list-table.tsx +0 -3
  49. package/src/components/customers/customer-list-table/locales/de.ts +1 -0
  50. package/src/components/customers/customer-list-table/locales/es.ts +1 -0
  51. package/src/components/customers/customer-list-table/locales/fr.ts +1 -0
  52. package/src/components/customers/customer-list-table/locales/hr.ts +1 -0
  53. package/src/components/customers/customer-list-table/locales/it.ts +1 -0
  54. package/src/components/customers/customer-list-table/locales/nl.ts +1 -0
  55. package/src/components/customers/customer-list-table/locales/pl.ts +1 -0
  56. package/src/components/customers/customer-list-table/locales/pt.ts +1 -0
  57. package/src/components/customers/customer-list-table/locales/sl.ts +1 -0
  58. package/src/components/dashboard/collection-rate-card/use-collection-rate.ts +2 -2
  59. package/src/components/dashboard/invoice-status-chart/use-invoice-status.ts +3 -3
  60. package/src/components/dashboard/payment-methods-chart/use-payment-methods.ts +1 -1
  61. package/src/components/dashboard/payment-trend-chart/use-payment-trend.ts +1 -1
  62. package/src/components/dashboard/revenue-trend-chart/use-revenue-trend.ts +1 -1
  63. package/src/components/dashboard/shared/use-revenue-data.ts +4 -4
  64. package/src/components/dashboard/shared/use-stats-counts.ts +4 -4
  65. package/src/components/dashboard/shared/use-stats-query.ts +1 -1
  66. package/src/components/dashboard/tax-collected-card/use-tax-collected.ts +2 -2
  67. package/src/components/dashboard/top-customers-chart/use-top-customers.ts +1 -1
  68. package/src/components/delivery-notes/create/create-delivery-note-form.tsx +332 -0
  69. package/src/components/delivery-notes/create/locales/de.ts +50 -0
  70. package/src/components/delivery-notes/create/locales/es.ts +49 -0
  71. package/src/components/delivery-notes/create/locales/fr.ts +50 -0
  72. package/src/components/delivery-notes/create/locales/hr.ts +49 -0
  73. package/src/components/delivery-notes/create/locales/it.ts +49 -0
  74. package/src/components/delivery-notes/create/locales/nl.ts +50 -0
  75. package/src/components/delivery-notes/create/locales/pl.ts +49 -0
  76. package/src/components/delivery-notes/create/locales/pt.ts +50 -0
  77. package/src/components/delivery-notes/create/locales/sl.ts +49 -0
  78. package/src/components/delivery-notes/create/prepare-delivery-note-submission.ts +38 -0
  79. package/src/components/delivery-notes/create/use-delivery-note-customer-form.ts +1 -0
  80. package/src/components/delivery-notes/delivery-notes.hooks.ts +15 -0
  81. package/src/components/delivery-notes/list/index.ts +3 -0
  82. package/src/components/delivery-notes/list/list-row-actions.tsx +122 -0
  83. package/src/components/delivery-notes/list/list-table.tsx +247 -0
  84. package/src/components/delivery-notes/list/locales/de.ts +13 -0
  85. package/src/components/delivery-notes/list/locales/en.ts +13 -0
  86. package/src/components/delivery-notes/list/locales/es.ts +13 -0
  87. package/src/components/delivery-notes/list/locales/fr.ts +13 -0
  88. package/src/components/delivery-notes/list/locales/hr.ts +13 -0
  89. package/src/components/delivery-notes/list/locales/it.ts +13 -0
  90. package/src/components/delivery-notes/list/locales/nl.ts +13 -0
  91. package/src/components/delivery-notes/list/locales/pl.ts +13 -0
  92. package/src/components/delivery-notes/list/locales/pt.ts +13 -0
  93. package/src/components/delivery-notes/list/locales/sl.ts +13 -0
  94. package/src/components/delivery-notes/list/use-delivery-note-download.ts +63 -0
  95. package/src/components/documents/create/document-details-section.tsx +76 -58
  96. package/src/components/documents/create/linked-documents-info.tsx +82 -0
  97. package/src/components/documents/create/live-preview.tsx +38 -11
  98. package/src/components/documents/create/prepare-document-submission.ts +1 -1
  99. package/src/components/documents/documents.hooks.ts +2 -1
  100. package/src/components/documents/shared/document-preview-display.tsx +12 -5
  101. package/src/components/documents/types.ts +12 -3
  102. package/src/components/documents/view/document-activities-list.tsx +65 -47
  103. package/src/components/documents/view/document-details-card.tsx +102 -77
  104. package/src/components/documents/view/document-payments-list.tsx +102 -68
  105. package/src/components/documents/view/document-relations-list.tsx +120 -0
  106. package/src/components/documents/view/document-sidebar.tsx +151 -0
  107. package/src/components/documents/view/index.ts +2 -0
  108. package/src/components/documents/view/locales/de.ts +23 -0
  109. package/src/components/documents/view/locales/es.ts +23 -0
  110. package/src/components/documents/view/locales/fr.ts +23 -0
  111. package/src/components/documents/view/locales/hr.ts +23 -0
  112. package/src/components/documents/view/locales/it.ts +23 -0
  113. package/src/components/documents/view/locales/nl.ts +23 -0
  114. package/src/components/documents/view/locales/pl.ts +23 -0
  115. package/src/components/documents/view/locales/pt.ts +23 -0
  116. package/src/components/documents/view/locales/sl.ts +23 -0
  117. package/src/components/documents/view/use-document-download.ts +8 -5
  118. package/src/components/entities/create-entity-form.tsx +165 -13
  119. package/src/components/entities/entity-settings-form/entity-settings-form.tsx +101 -1
  120. package/src/components/entities/entity-settings-form/locales/de.ts +9 -0
  121. package/src/components/entities/entity-settings-form/locales/es.ts +9 -0
  122. package/src/components/entities/entity-settings-form/locales/fr.ts +9 -0
  123. package/src/components/entities/entity-settings-form/locales/hr.ts +9 -0
  124. package/src/components/entities/entity-settings-form/locales/it.ts +9 -0
  125. package/src/components/entities/entity-settings-form/locales/nl.ts +9 -0
  126. package/src/components/entities/entity-settings-form/locales/pl.ts +9 -0
  127. package/src/components/entities/entity-settings-form/locales/pt.ts +9 -0
  128. package/src/components/entities/entity-settings-form/locales/sl.ts +9 -0
  129. package/src/components/entities/fina-settings-form/fina-settings-form.tsx +83 -71
  130. package/src/components/entities/fina-settings-form/fina-settings.hooks.ts +7 -2
  131. package/src/components/entities/fina-settings-form/locales/de.ts +2 -2
  132. package/src/components/entities/fina-settings-form/locales/en.ts +2 -2
  133. package/src/components/entities/fina-settings-form/locales/es.ts +2 -2
  134. package/src/components/entities/fina-settings-form/locales/fr.ts +2 -2
  135. package/src/components/entities/fina-settings-form/locales/hr.ts +2 -2
  136. package/src/components/entities/fina-settings-form/locales/it.ts +2 -2
  137. package/src/components/entities/fina-settings-form/locales/nl.ts +2 -2
  138. package/src/components/entities/fina-settings-form/locales/pl.ts +2 -2
  139. package/src/components/entities/fina-settings-form/locales/pt.ts +2 -2
  140. package/src/components/entities/fina-settings-form/locales/sl.ts +2 -2
  141. package/src/components/entities/furs-settings-form/furs-settings-form.tsx +10 -1
  142. package/src/components/entities/furs-settings-form/furs-settings.hooks.ts +7 -2
  143. package/src/components/entities/furs-settings-form/locales/en.ts +0 -1
  144. package/src/components/entities/furs-settings-form/sections/general-settings-section.tsx +12 -4
  145. package/src/components/entities/settings/pdf-template-selector/locales/de.ts +3 -1
  146. package/src/components/entities/settings/pdf-template-selector/locales/es.ts +3 -1
  147. package/src/components/entities/settings/pdf-template-selector/locales/fr.ts +4 -1
  148. package/src/components/entities/settings/pdf-template-selector/locales/hr.ts +4 -1
  149. package/src/components/entities/settings/pdf-template-selector/locales/it.ts +3 -1
  150. package/src/components/entities/settings/pdf-template-selector/locales/nl.ts +3 -1
  151. package/src/components/entities/settings/pdf-template-selector/locales/pl.ts +3 -1
  152. package/src/components/entities/settings/pdf-template-selector/locales/pt.ts +3 -1
  153. package/src/components/entities/settings/pdf-template-selector/locales/sl.ts +3 -1
  154. package/src/components/entities/settings/pdf-template-selector/pdf-template-cards.tsx +1 -0
  155. package/src/components/estimates/create/create-estimate-form.tsx +29 -2
  156. package/src/components/estimates/list/list-table.tsx +3 -6
  157. package/src/components/estimates/list/locales/de.ts +1 -0
  158. package/src/components/estimates/list/locales/es.ts +1 -0
  159. package/src/components/estimates/list/locales/fr.ts +1 -0
  160. package/src/components/estimates/list/locales/hr.ts +1 -0
  161. package/src/components/estimates/list/locales/it.ts +1 -0
  162. package/src/components/estimates/list/locales/nl.ts +1 -0
  163. package/src/components/estimates/list/locales/pl.ts +1 -0
  164. package/src/components/estimates/list/locales/pt.ts +1 -0
  165. package/src/components/estimates/list/locales/sl.ts +1 -0
  166. package/src/components/export/document-export-form.tsx +9 -2
  167. package/src/components/export/index.ts +2 -0
  168. package/src/components/export/sales-per-item-export-form.tsx +223 -0
  169. package/src/components/invoices/create/create-invoice-form.tsx +48 -1
  170. package/src/components/invoices/create/locales/de.ts +11 -0
  171. package/src/components/invoices/create/locales/es.ts +11 -0
  172. package/src/components/invoices/create/locales/fr.ts +11 -0
  173. package/src/components/invoices/create/locales/hr.ts +10 -0
  174. package/src/components/invoices/create/locales/it.ts +11 -0
  175. package/src/components/invoices/create/locales/nl.ts +11 -0
  176. package/src/components/invoices/create/locales/pl.ts +10 -0
  177. package/src/components/invoices/create/locales/pt.ts +10 -0
  178. package/src/components/invoices/create/locales/sl.ts +10 -0
  179. package/src/components/invoices/invoices-furs.hooks.ts +27 -9
  180. package/src/components/invoices/list/list-row-actions.tsx +3 -3
  181. package/src/components/invoices/list/list-table.tsx +132 -21
  182. package/src/components/invoices/list/locales/de.ts +6 -0
  183. package/src/components/invoices/list/locales/en.ts +5 -0
  184. package/src/components/invoices/list/locales/es.ts +6 -0
  185. package/src/components/invoices/list/locales/fr.ts +6 -0
  186. package/src/components/invoices/list/locales/hr.ts +6 -0
  187. package/src/components/invoices/list/locales/it.ts +6 -0
  188. package/src/components/invoices/list/locales/nl.ts +6 -0
  189. package/src/components/invoices/list/locales/pl.ts +6 -0
  190. package/src/components/invoices/list/locales/pt.ts +6 -0
  191. package/src/components/invoices/list/locales/sl.ts +6 -0
  192. package/src/components/invoices/view/fiscalization-status-card.tsx +42 -24
  193. package/src/components/items/item-combobox.tsx +5 -3
  194. package/src/components/items/item-list-table/item-list-header.tsx +4 -17
  195. package/src/components/items/item-list-table/item-list-row-actions.tsx +3 -2
  196. package/src/components/items/item-list-table/item-list-row.tsx +3 -2
  197. package/src/components/items/item-list-table/item-list-table.tsx +3 -3
  198. package/src/components/items/item-list-table/locales/de.ts +1 -0
  199. package/src/components/items/item-list-table/locales/es.ts +1 -0
  200. package/src/components/items/item-list-table/locales/fr.ts +1 -0
  201. package/src/components/items/item-list-table/locales/hr.ts +1 -0
  202. package/src/components/items/item-list-table/locales/it.ts +1 -0
  203. package/src/components/items/item-list-table/locales/nl.ts +1 -0
  204. package/src/components/items/item-list-table/locales/pl.ts +1 -0
  205. package/src/components/items/item-list-table/locales/pt.ts +1 -0
  206. package/src/components/items/item-list-table/locales/sl.ts +1 -0
  207. package/src/components/payments/list/list-table.tsx +0 -4
  208. package/src/components/payments/list/locales/de.ts +1 -0
  209. package/src/components/payments/list/locales/es.ts +1 -0
  210. package/src/components/payments/list/locales/fr.ts +1 -0
  211. package/src/components/payments/list/locales/hr.ts +1 -0
  212. package/src/components/payments/list/locales/it.ts +1 -0
  213. package/src/components/payments/list/locales/nl.ts +1 -0
  214. package/src/components/payments/list/locales/pl.ts +1 -0
  215. package/src/components/payments/list/locales/pt.ts +1 -0
  216. package/src/components/payments/list/locales/sl.ts +1 -0
  217. package/src/components/recurring-invoices/list/list-table.tsx +0 -7
  218. package/src/components/recurring-invoices/list/locales/de.ts +1 -0
  219. package/src/components/recurring-invoices/list/locales/es.ts +1 -0
  220. package/src/components/recurring-invoices/list/locales/fr.ts +1 -0
  221. package/src/components/recurring-invoices/list/locales/hr.ts +1 -0
  222. package/src/components/recurring-invoices/list/locales/it.ts +1 -0
  223. package/src/components/recurring-invoices/list/locales/nl.ts +1 -0
  224. package/src/components/recurring-invoices/list/locales/pl.ts +1 -0
  225. package/src/components/recurring-invoices/list/locales/pt.ts +1 -0
  226. package/src/components/recurring-invoices/list/locales/sl.ts +1 -0
  227. package/src/components/request-logs/request-log-list-table.tsx +0 -3
  228. package/src/components/table/README.md +14 -121
  229. package/src/components/table/data-table.tsx +22 -37
  230. package/src/components/table/hooks/use-table-state.ts +3 -27
  231. package/src/components/table/index.ts +0 -2
  232. package/src/components/table/selection-toolbar.tsx +35 -1
  233. package/src/components/table/table-empty-state.tsx +6 -3
  234. package/src/components/table/table-no-results.tsx +10 -5
  235. package/src/components/table/types.ts +0 -5
  236. package/src/components/taxes/tax-list-table/locales/de.ts +1 -0
  237. package/src/components/taxes/tax-list-table/locales/es.ts +1 -0
  238. package/src/components/taxes/tax-list-table/locales/fr.ts +1 -0
  239. package/src/components/taxes/tax-list-table/locales/hr.ts +1 -0
  240. package/src/components/taxes/tax-list-table/locales/it.ts +1 -0
  241. package/src/components/taxes/tax-list-table/locales/nl.ts +1 -0
  242. package/src/components/taxes/tax-list-table/locales/pl.ts +1 -0
  243. package/src/components/taxes/tax-list-table/locales/pt.ts +1 -0
  244. package/src/components/taxes/tax-list-table/locales/sl.ts +1 -0
  245. package/src/components/taxes/tax-list-table/tax-list-header.tsx +3 -14
  246. package/src/components/taxes/tax-list-table/tax-list-table.tsx +3 -3
  247. package/src/components/ui/popover.tsx +3 -1
  248. package/src/components/ui/tooltip.tsx +3 -1
  249. package/src/generated/schemas/deliverynote.ts +134 -0
  250. package/src/generated/schemas/entity.ts +4 -0
  251. package/src/generated/schemas/index.ts +3 -0
  252. package/src/generated/schemas/order.ts +5 -3
  253. package/src/generated/schemas/payment.ts +22 -2
  254. package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +1 -0
  255. package/src/generated/schemas/rendercreditnotepreview_body.ts +1 -0
  256. package/src/generated/schemas/renderdeliverynotepreview_body.ts +185 -0
  257. package/src/generated/schemas/renderestimatepreview_body.ts +1 -0
  258. package/src/generated/schemas/renderinvoicepreview_body.ts +1 -0
  259. package/src/generated/schemas/startpdfexport_body.ts +18 -2
  260. package/src/generated/schemas/userfinasettings.ts +19 -0
  261. package/src/generated/schemas/webhook.ts +12 -0
  262. package/src/hooks/use-duplicate-document.ts +49 -6
  263. package/src/hooks/use-next-document-number.ts +2 -2
  264. package/src/lib/fiscalization.ts +12 -0
  265. package/src/lib/schemas/advance-invoice.ts +0 -1
  266. package/src/providers/sdk-provider.tsx +5 -7
  267. package/src/components/table/sortable-header.tsx +0 -56
@@ -14,4 +14,5 @@ export default {
14
14
  "No results found": "Geen belastingen gevonden",
15
15
  "Try adjusting your search criteria": "Probeer uw zoekcriteria aan te passen",
16
16
  "Clear search": "Zoekopdracht wissen",
17
+ "Clear all": "Alles wissen",
17
18
  };
@@ -14,4 +14,5 @@ export default {
14
14
  "No results found": "Nie znaleziono podatków",
15
15
  "Try adjusting your search criteria": "Spróbuj dostosować kryteria wyszukiwania",
16
16
  "Clear search": "Wyczyść wyszukiwanie",
17
+ "Clear all": "Wyczyść wszystko",
17
18
  };
@@ -14,4 +14,5 @@ export default {
14
14
  "No results found": "Nenhum imposto encontrado",
15
15
  "Try adjusting your search criteria": "Tente ajustar os seus critérios de pesquisa",
16
16
  "Clear search": "Limpar pesquisa",
17
+ "Clear all": "Limpar tudo",
17
18
  };
@@ -14,4 +14,5 @@ export default {
14
14
  "No results found": "Ni najdenih davkov",
15
15
  "Try adjusting your search criteria": "Poskusite prilagoditi iskalne kriterije",
16
16
  "Clear search": "Počisti iskanje",
17
+ "Clear all": "Počisti vse",
17
18
  };
@@ -1,27 +1,16 @@
1
1
  import { TableHead, TableHeader, TableRow } from "@/ui/components/ui/table";
2
- import { SortableHeader } from "../../table/sortable-header";
3
2
 
4
3
  type TaxListHeaderProps = {
5
- orderBy?: string;
6
- onSort?: (order: string | null) => void;
7
4
  t: (key: string) => string;
8
5
  };
9
6
 
10
- export default function TaxListHeader({ orderBy, onSort, t }: TaxListHeaderProps) {
7
+ export default function TaxListHeader({ t }: TaxListHeaderProps) {
11
8
  return (
12
9
  <TableHeader>
13
10
  <TableRow>
14
- <TableHead>
15
- <SortableHeader field="name" currentOrder={orderBy} onSort={onSort}>
16
- {t("Name")}
17
- </SortableHeader>
18
- </TableHead>
11
+ <TableHead>{t("Name")}</TableHead>
19
12
  <TableHead>{t("Tax Rates")}</TableHead>
20
- <TableHead>
21
- <SortableHeader field="created_at" currentOrder={orderBy} onSort={onSort}>
22
- {t("Created")}
23
- </SortableHeader>
24
- </TableHead>
13
+ <TableHead>{t("Created")}</TableHead>
25
14
  <TableHead className="text-right" />
26
15
  </TableRow>
27
16
  </TableHeader>
@@ -58,15 +58,15 @@ export default function TaxListTable({
58
58
  return (
59
59
  <DataTable
60
60
  columns={[
61
- { id: "name", header: t("Name"), sortable: true },
61
+ { id: "name", header: t("Name") },
62
62
  { id: "tax_rates", header: t("Tax Rates") },
63
- { id: "created_at", header: t("Created"), sortable: true },
63
+ { id: "created_at", header: t("Created") },
64
64
  { id: "actions", header: "", align: "right" },
65
65
  ]}
66
66
  renderRow={(tax) => (
67
67
  <TaxListRow tax={tax} key={tax.id} onRowClick={(tax) => onRowClick?.(tax)} onView={onView} t={t} />
68
68
  )}
69
- renderHeader={(headerProps) => <TaxListHeader orderBy={headerProps.orderBy} onSort={headerProps.onSort} t={t} />}
69
+ renderHeader={() => <TaxListHeader t={t} />}
70
70
  queryParams={queryParams}
71
71
  resourceName="tax"
72
72
  cacheKey={TAXES_CACHE_KEY}
@@ -37,11 +37,12 @@ function PopoverContent({
37
37
  alignOffset = 0,
38
38
  side = "bottom",
39
39
  sideOffset = 4,
40
+ positionMethod = "fixed",
40
41
  ...props
41
42
  }: PopoverPrimitive.Popup.Props &
42
43
  Pick<
43
44
  PopoverPrimitive.Positioner.Props,
44
- "align" | "alignOffset" | "side" | "sideOffset"
45
+ "align" | "alignOffset" | "side" | "sideOffset" | "positionMethod"
45
46
  >) {
46
47
  return (
47
48
  <PopoverPrimitive.Portal>
@@ -50,6 +51,7 @@ function PopoverContent({
50
51
  alignOffset={alignOffset}
51
52
  side={side}
52
53
  sideOffset={sideOffset}
54
+ positionMethod={positionMethod}
53
55
  className="isolate z-50"
54
56
  >
55
57
  <PopoverPrimitive.Popup
@@ -54,12 +54,13 @@ function TooltipContent({
54
54
  sideOffset = 4,
55
55
  align = "center",
56
56
  alignOffset = 0,
57
+ positionMethod = "fixed",
57
58
  children,
58
59
  ...props
59
60
  }: TooltipPrimitive.Popup.Props &
60
61
  Pick<
61
62
  TooltipPrimitive.Positioner.Props,
62
- "align" | "alignOffset" | "side" | "sideOffset"
63
+ "align" | "alignOffset" | "side" | "sideOffset" | "positionMethod"
63
64
  >) {
64
65
  return (
65
66
  <TooltipPrimitive.Portal>
@@ -68,6 +69,7 @@ function TooltipContent({
68
69
  alignOffset={alignOffset}
69
70
  side={side}
70
71
  sideOffset={sideOffset}
72
+ positionMethod={positionMethod}
71
73
  className="isolate z-50"
72
74
  >
73
75
  <TooltipPrimitive.Popup
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Delivery note schema for form validation.
3
+ * Based on the estimate schema pattern, adapted for delivery notes.
4
+ * Delivery notes differ from estimates: no date_valid_till, no title_type, has hide_prices.
5
+ */
6
+
7
+ import { z } from 'zod';
8
+
9
+ // Dependency schema for delivery note
10
+ const LineDiscount = z.object({
11
+ value: z.number().gte(0),
12
+ type: z.enum(["percent", "amount"]).optional().default("percent"),
13
+ });
14
+
15
+
16
+ // Dependency schema for delivery note
17
+ const DocumentItemTax = z
18
+ .object({
19
+ rate: z.number(),
20
+ tax_id: z.string(),
21
+ classification: z.string(),
22
+ reverse_charge: z.boolean(),
23
+ amount: z.number(),
24
+ })
25
+ .partial();
26
+
27
+
28
+ // Dependency schema for delivery note
29
+ const DocumentEntity = z
30
+ .object({
31
+ name: z.union([z.string(), z.null()]),
32
+ email: z.union([z.string(), z.null()]),
33
+ address: z.union([z.string(), z.null()]),
34
+ address_2: z.union([z.string(), z.null()]),
35
+ post_code: z.union([z.string(), z.null()]),
36
+ city: z.union([z.string(), z.null()]),
37
+ state: z.union([z.string(), z.null()]),
38
+ country: z.union([z.string(), z.null()]),
39
+ country_code: z.union([z.string(), z.null()]),
40
+ tax_number: z.union([z.string(), z.null()]),
41
+ tax_number_2: z.union([z.string(), z.null()]),
42
+ company_number: z.union([z.string(), z.null()]),
43
+ bank_account: z.union([
44
+ z
45
+ .object({
46
+ type: z
47
+ .enum(["iban", "us_domestic", "uk_domestic", "other"])
48
+ .default("iban"),
49
+ name: z.string(),
50
+ bank_name: z.string(),
51
+ iban: z.string(),
52
+ account_number: z.string(),
53
+ bic: z.string(),
54
+ routing_number: z.string(),
55
+ sort_code: z.string(),
56
+ })
57
+ .partial()
58
+ .passthrough(),
59
+ z.null(),
60
+ ]),
61
+ })
62
+ .partial()
63
+ .passthrough();
64
+
65
+
66
+ // Schema for create delivery note operation
67
+ const createDeliveryNoteSchemaDefinition = z.object({
68
+ is_draft: z.boolean().optional(),
69
+ date: z
70
+ .string()
71
+ .regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
72
+ .optional(),
73
+ issuer: DocumentEntity.optional(),
74
+ customer_id: z.union([z.string(), z.null()]).optional(),
75
+ customer: DocumentEntity.and(
76
+ z.union([
77
+ z
78
+ .object({ save_customer: z.boolean().default(true) })
79
+ .partial()
80
+ .passthrough(),
81
+ z.null(),
82
+ ])
83
+ ).optional(),
84
+ note: z.union([z.string(), z.null()]).optional(),
85
+ payment_terms: z.union([z.string(), z.null()]).optional(),
86
+ tax_clause: z.union([z.string(), z.null()]).optional(),
87
+ currency_code: z.string().max(3).optional(),
88
+ metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
89
+ hide_prices: z.boolean().optional(),
90
+ date_due: z.union([z.string(), z.null()]).optional(),
91
+ date_service: z.union([z.string(), z.null()]).optional(),
92
+ date_service_to: z.union([z.string(), z.null()]).optional(),
93
+ items: z
94
+ .array(
95
+ z.object({
96
+ name: z.string().min(1).optional(),
97
+ description: z.union([z.string().max(4000, "Description must not exceed 4000 characters"), z.null()]).optional(),
98
+ price: z.number().optional(),
99
+ gross_price: z.number().optional(),
100
+ quantity: z.number().gte(-140737488355328).lte(140737488355327),
101
+ unit: z.union([z.string(), z.null()]).optional(),
102
+ taxes: z.array(DocumentItemTax).optional(),
103
+ discounts: z.array(LineDiscount).max(5).optional(),
104
+ metadata: z
105
+ .union([
106
+ z.string(),
107
+ z.number(),
108
+ z.boolean(),
109
+ z.null(),
110
+ z.object({}).partial().passthrough(),
111
+ z.array(z.unknown()),
112
+ z.null(),
113
+ ])
114
+ .optional(),
115
+ item_id: z.string().optional(),
116
+ })
117
+ )
118
+ .min(1),
119
+ eslog: z
120
+ .union([
121
+ z
122
+ .object({ validation_enabled: z.union([z.boolean(), z.null()]) })
123
+ .partial()
124
+ .passthrough(),
125
+ z.null(),
126
+ ])
127
+ .optional(),
128
+ expected_total_with_tax: z.number().gt(0).optional(),
129
+ });
130
+
131
+ // Type for create delivery note operation
132
+ export type CreateDeliveryNoteSchema = z.infer<typeof createDeliveryNoteSchemaDefinition>;
133
+
134
+ export const createDeliveryNoteSchema = createDeliveryNoteSchemaDefinition;
@@ -40,6 +40,7 @@ const createEntitySchemaDefinition = z.object({
40
40
  estimate: z.union([z.string(), z.null()]),
41
41
  credit_note: z.union([z.string(), z.null()]),
42
42
  advance_invoice: z.union([z.string(), z.null()]),
43
+ delivery_note: z.union([z.string(), z.null()]),
43
44
  })
44
45
  .partial()
45
46
  .passthrough(),
@@ -136,6 +137,7 @@ const createEntitySchemaDefinition = z.object({
136
137
  ]),
137
138
  bank_accounts: z.union([z.array(z.any()), z.null()]),
138
139
  eslog_validation_enabled: z.union([z.boolean(), z.null()]),
140
+ delivery_note_hide_prices: z.union([z.boolean(), z.null()]),
139
141
  tax_clause_defaults: z.union([
140
142
  z
141
143
  .object({
@@ -189,6 +191,7 @@ const patchEntitySchemaDefinition = z
189
191
  estimate: z.union([z.string(), z.null()]),
190
192
  credit_note: z.union([z.string(), z.null()]),
191
193
  advance_invoice: z.union([z.string(), z.null()]),
194
+ delivery_note: z.union([z.string(), z.null()]),
192
195
  })
193
196
  .partial()
194
197
  .passthrough(),
@@ -285,6 +288,7 @@ const patchEntitySchemaDefinition = z
285
288
  ]),
286
289
  bank_accounts: z.union([z.array(z.any()), z.null()]),
287
290
  eslog_validation_enabled: z.union([z.boolean(), z.null()]),
291
+ delivery_note_hide_prices: z.union([z.boolean(), z.null()]),
288
292
  tax_clause_defaults: z.union([
289
293
  z
290
294
  .object({
@@ -14,6 +14,7 @@ export * from './customcreditnote';
14
14
  export * from './customer';
15
15
  export * from './customestimate';
16
16
  export * from './custominvoice';
17
+ export * from './deliverynote';
17
18
  export * from './entity';
18
19
  export * from './entityuserrole';
19
20
  export * from './estimate';
@@ -34,6 +35,7 @@ export * from './registerfursmovablepremise_body';
34
35
  export * from './registerfursrealestatepremise_body';
35
36
  export * from './renderadvanceinvoicepreview_body';
36
37
  export * from './rendercreditnotepreview_body';
38
+ export * from './renderdeliverynotepreview_body';
37
39
  export * from './renderdocument_body';
38
40
  export * from './renderestimatepreview_body';
39
41
  export * from './renderinvoicepreview_body';
@@ -46,6 +48,7 @@ export * from './stripeappupdatesettings_body';
46
48
  export * from './tax';
47
49
  export * from './uploadfile_body';
48
50
  export * from './uploadfurscertificate_body';
51
+ export * from './userfinasettings';
49
52
  export * from './userfurssettings';
50
53
  export * from './webhook';
51
54
 
@@ -64,7 +64,7 @@ const OrderItem = z
64
64
  // Schema for create order operation
65
65
  const createOrderSchemaDefinition = z.object({
66
66
  order_integration_id: z.string().max(36),
67
- source: z.string().max(50),
67
+ source: z.enum(["shopify", "woocommerce", "manual"]),
68
68
  source_id: z.string().max(255),
69
69
  source_order_number: z.union([z.string(), z.null()]).optional(),
70
70
  customer_name: z.union([z.string(), z.null()]).optional(),
@@ -86,7 +86,9 @@ const createOrderSchemaDefinition = z.object({
86
86
  .lte(140737488355327)
87
87
  .optional(),
88
88
  items: z.array(OrderItem).min(1),
89
- payment_status: z.string().max(30).optional(),
89
+ payment_status: z
90
+ .enum(["unpaid", "paid", "partially_paid", "refunded"])
91
+ .optional(),
90
92
  payment_method: z.union([z.string(), z.null()]).optional(),
91
93
  payment_gateway: z.union([z.string(), z.null()]).optional(),
92
94
  ordered_at: z.union([z.string(), z.null()]).optional(),
@@ -112,7 +114,7 @@ const updateOrderSchemaDefinition = z
112
114
  total_discount: z.number().gte(-140737488355328).lte(140737488355327),
113
115
  total_shipping: z.number().gte(-140737488355328).lte(140737488355327),
114
116
  items: z.array(OrderItem).min(1),
115
- payment_status: z.string().max(30),
117
+ payment_status: z.enum(["unpaid", "paid", "partially_paid", "refunded"]),
116
118
  payment_method: z.union([z.string(), z.null()]),
117
119
  payment_gateway: z.union([z.string(), z.null()]),
118
120
  ordered_at: z.union([z.string(), z.null()]),
@@ -14,7 +14,17 @@ const createPaymentSchemaDefinition = z.object({
14
14
  credit_note_id: z.union([z.string(), z.null()]).optional(),
15
15
  advance_invoice_id: z.union([z.string(), z.null()]).optional(),
16
16
  amount: z.number().gt(0),
17
- type: z.string().max(20),
17
+ type: z.enum([
18
+ "cash",
19
+ "bank_transfer",
20
+ "card",
21
+ "check",
22
+ "paypal",
23
+ "coupon",
24
+ "other",
25
+ "credit_note",
26
+ "advance",
27
+ ]),
18
28
  date: z.string().optional(),
19
29
  tag: z.union([z.string(), z.null()]).optional(),
20
30
  reference: z.union([z.string(), z.null()]).optional(),
@@ -30,7 +40,17 @@ export type CreatePaymentSchema = z.infer<typeof createPaymentSchemaDefinition>;
30
40
  const updatePaymentSchemaDefinition = z
31
41
  .object({
32
42
  amount: z.number().gt(0),
33
- type: z.string().max(20),
43
+ type: z.enum([
44
+ "cash",
45
+ "bank_transfer",
46
+ "card",
47
+ "check",
48
+ "paypal",
49
+ "coupon",
50
+ "other",
51
+ "credit_note",
52
+ "advance",
53
+ ]),
34
54
  date: z.string(),
35
55
  tag: z.union([z.string(), z.null()]),
36
56
  reference: z.union([z.string(), z.null()]),
@@ -163,6 +163,7 @@ const CreateDocumentItem = z.object({
163
163
  unit: z.union([z.string(), z.null()]).optional(),
164
164
  taxes: z.array(DocumentItemTax).optional(),
165
165
  discounts: z.array(LineDiscount).max(5).optional(),
166
+ delivery_note_id: z.union([z.string(), z.null()]).optional(),
166
167
  metadata: z
167
168
  .union([
168
169
  z.string(),
@@ -164,6 +164,7 @@ const CreateDocumentItem = z.object({
164
164
  unit: z.union([z.string(), z.null()]).optional(),
165
165
  taxes: z.array(DocumentItemTax).optional(),
166
166
  discounts: z.array(LineDiscount).max(5).optional(),
167
+ delivery_note_id: z.union([z.string(), z.null()]).optional(),
167
168
  metadata: z
168
169
  .union([
169
170
  z.string(),
@@ -0,0 +1,185 @@
1
+ /**
2
+ * This file was automatically generated using 'bun generate-schemas'.
3
+ * Do not edit this file manually. To update, run the generator again.
4
+ * @generated
5
+ */
6
+
7
+ import { z } from 'zod';
8
+
9
+ // Schemas for renderdeliverynotepreview_body endpoints
10
+
11
+ // Dependency schema for renderdeliverynotepreview_body
12
+ const DocumentEntity = z
13
+ .object({
14
+ name: z.union([z.string(), z.null()]),
15
+ email: z.union([z.string(), z.null()]),
16
+ address: z.union([z.string(), z.null()]),
17
+ address_2: z.union([z.string(), z.null()]),
18
+ post_code: z.union([z.string(), z.null()]),
19
+ city: z.union([z.string(), z.null()]),
20
+ state: z.union([z.string(), z.null()]),
21
+ country: z.union([z.string(), z.null()]),
22
+ country_code: z.union([z.string(), z.null()]),
23
+ tax_number: z.union([z.string(), z.null()]),
24
+ tax_number_2: z.union([z.string(), z.null()]),
25
+ company_number: z.union([z.string(), z.null()]),
26
+ bank_account: z.union([
27
+ z
28
+ .object({
29
+ type: z
30
+ .enum(["iban", "us_domestic", "uk_domestic", "other"])
31
+ .default("iban"),
32
+ name: z.string(),
33
+ bank_name: z.string(),
34
+ iban: z.string(),
35
+ account_number: z.string(),
36
+ bic: z.string(),
37
+ routing_number: z.string(),
38
+ sort_code: z.string(),
39
+ })
40
+ .partial()
41
+ .passthrough(),
42
+ z.null(),
43
+ ]),
44
+ })
45
+ .partial()
46
+ .passthrough();
47
+
48
+
49
+ // Dependency schema for renderdeliverynotepreview_body
50
+ const CreateDocumentCustomer = DocumentEntity.and(
51
+ z.union([
52
+ z
53
+ .object({ save_customer: z.boolean().default(true) })
54
+ .partial()
55
+ .passthrough(),
56
+ z.null(),
57
+ ])
58
+ );
59
+
60
+
61
+ // Dependency schema for renderdeliverynotepreview_body
62
+ const PartialDeliveryNotePreview = z.object({
63
+ is_draft: z.boolean().optional(),
64
+ date: z
65
+ .string()
66
+ .regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
67
+ .optional(),
68
+ issuer: DocumentEntity.optional(),
69
+ customer_id: z.union([z.string(), z.null()]).optional(),
70
+ customer: CreateDocumentCustomer.optional(),
71
+ note: z.union([z.string(), z.null()]).optional(),
72
+ payment_terms: z.union([z.string(), z.null()]).optional(),
73
+ tax_clause: z.union([z.string(), z.null()]).optional(),
74
+ currency_code: z.string().max(3).optional(),
75
+ metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
76
+ hide_prices: z.boolean().optional(),
77
+ date_due: z.union([z.string(), z.null()]).optional(),
78
+ date_service: z.union([z.string(), z.null()]).optional(),
79
+ date_service_to: z.union([z.string(), z.null()]).optional(),
80
+ items: z
81
+ .array(
82
+ z
83
+ .object({
84
+ name: z.string(),
85
+ quantity: z.number(),
86
+ price: z.number(),
87
+ gross_price: z.number(),
88
+ description: z.string(),
89
+ taxes: z.array(
90
+ z
91
+ .object({ rate: z.number(), tax_id: z.string() })
92
+ .partial()
93
+ .passthrough()
94
+ ),
95
+ metadata: z.record(z.string(), z.any()),
96
+ })
97
+ .partial()
98
+ .passthrough()
99
+ )
100
+ .min(1),
101
+ linked_documents: z.array(z.string().min(1)).optional(),
102
+ expected_total_with_tax: z.number().gt(0).optional(),
103
+ });
104
+
105
+
106
+ // Dependency schema for renderdeliverynotepreview_body
107
+ const DocumentItemTax = z
108
+ .object({
109
+ rate: z.number(),
110
+ tax_id: z.string(),
111
+ classification: z.string(),
112
+ reverse_charge: z.boolean(),
113
+ amount: z.number(),
114
+ })
115
+ .partial();
116
+
117
+
118
+ // Dependency schema for renderdeliverynotepreview_body
119
+ const LineDiscount = z.object({
120
+ value: z.number().gte(0),
121
+ type: z.enum(["percent", "amount"]).optional().default("percent"),
122
+ });
123
+
124
+
125
+ // Dependency schema for renderdeliverynotepreview_body
126
+ const CreateDocumentItem = z.object({
127
+ name: z.string().min(1).optional(),
128
+ description: z.union([z.string(), z.null()]).optional(),
129
+ price: z.number().optional(),
130
+ gross_price: z.number().optional(),
131
+ quantity: z.number().gte(-140737488355328).lte(140737488355327),
132
+ unit: z.union([z.string(), z.null()]).optional(),
133
+ taxes: z.array(DocumentItemTax).optional(),
134
+ discounts: z.array(LineDiscount).max(5).optional(),
135
+ delivery_note_id: z.union([z.string(), z.null()]).optional(),
136
+ metadata: z
137
+ .union([
138
+ z.string(),
139
+ z.number(),
140
+ z.boolean(),
141
+ z.null(),
142
+ z.object({}).partial().passthrough(),
143
+ z.array(z.unknown()),
144
+ z.null(),
145
+ ])
146
+ .optional(),
147
+ item_id: z.string().optional(),
148
+ });
149
+
150
+
151
+ // Dependency schema for renderdeliverynotepreview_body
152
+ const CompleteDeliveryNotePreview = z.object({
153
+ is_draft: z.boolean().optional(),
154
+ date: z
155
+ .string()
156
+ .regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
157
+ .optional(),
158
+ issuer: DocumentEntity.optional(),
159
+ customer_id: z.union([z.string(), z.null()]).optional(),
160
+ customer: CreateDocumentCustomer.optional(),
161
+ note: z.union([z.string(), z.null()]).optional(),
162
+ payment_terms: z.union([z.string(), z.null()]).optional(),
163
+ tax_clause: z.union([z.string(), z.null()]).optional(),
164
+ currency_code: z.string().max(3).optional(),
165
+ metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
166
+ hide_prices: z.boolean().optional(),
167
+ date_due: z.union([z.string(), z.null()]).optional(),
168
+ date_service: z.union([z.string(), z.null()]).optional(),
169
+ date_service_to: z.union([z.string(), z.null()]).optional(),
170
+ items: z.array(CreateDocumentItem).min(1),
171
+ linked_documents: z.array(z.string().min(1)).optional(),
172
+ expected_total_with_tax: z.number().gt(0).optional(),
173
+ });
174
+
175
+
176
+ // Schema for render deliverynotepreview operation
177
+ const renderDeliveryNotePreviewSchemaDefinition = z.union([
178
+ PartialDeliveryNotePreview,
179
+ CompleteDeliveryNotePreview,
180
+ ]);
181
+
182
+ // Type for render deliverynotepreview operation
183
+ export type RenderDeliveryNotePreviewSchema = z.infer<typeof renderDeliveryNotePreviewSchemaDefinition>;
184
+
185
+ export const renderDeliveryNotePreviewSchema = renderDeliveryNotePreviewSchemaDefinition;
@@ -132,6 +132,7 @@ const CreateDocumentItem = z.object({
132
132
  unit: z.union([z.string(), z.null()]).optional(),
133
133
  taxes: z.array(DocumentItemTax).optional(),
134
134
  discounts: z.array(LineDiscount).max(5).optional(),
135
+ delivery_note_id: z.union([z.string(), z.null()]).optional(),
135
136
  metadata: z
136
137
  .union([
137
138
  z.string(),
@@ -164,6 +164,7 @@ const CreateDocumentItem = z.object({
164
164
  unit: z.union([z.string(), z.null()]).optional(),
165
165
  taxes: z.array(DocumentItemTax).optional(),
166
166
  discounts: z.array(LineDiscount).max(5).optional(),
167
+ delivery_note_id: z.union([z.string(), z.null()]).optional(),
167
168
  metadata: z
168
169
  .union([
169
170
  z.string(),
@@ -9,12 +9,28 @@ import { z } from 'zod';
9
9
  // Schemas for startpdfexport_body endpoints
10
10
 
11
11
  // Dependency schema for startpdfexport_body
12
- const startPdfExport_Body = z
12
+ const PdfExportByDocumentIds = z
13
13
  .object({
14
- type: z.enum(["invoice", "estimate", "credit_note"]),
14
+ type: z.enum(["invoice", "estimate", "credit_note", "advance_invoice"]),
15
+ document_ids: z.array(z.string()).min(1),
16
+ })
17
+ .passthrough();
18
+
19
+
20
+ // Dependency schema for startpdfexport_body
21
+ const PdfExportByDateRange = z
22
+ .object({
23
+ type: z.enum(["invoice", "estimate", "credit_note", "advance_invoice"]),
15
24
  date_from: z.string().optional(),
16
25
  date_to: z.string().optional(),
17
26
  })
18
27
  .passthrough();
19
28
 
20
29
 
30
+ // Dependency schema for startpdfexport_body
31
+ const startPdfExport_Body = z.union([
32
+ PdfExportByDocumentIds,
33
+ PdfExportByDateRange,
34
+ ]);
35
+
36
+
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was automatically generated using 'bun generate-schemas'.
3
+ * Do not edit this file manually. To update, run the generator again.
4
+ * @generated
5
+ */
6
+
7
+ import { z } from 'zod';
8
+
9
+ // Schemas for userfinasettings endpoints
10
+
11
+ // Schema for update userfinasettings operation
12
+ const updateUserFinaSettingsSchemaDefinition = z
13
+ .object({ operator_oib: z.string(), operator_label: z.string() })
14
+ .partial();
15
+
16
+ // Type for update userfinasettings operation
17
+ export type UpdateUserFinaSettingsSchema = z.infer<typeof updateUserFinaSettingsSchemaDefinition>;
18
+
19
+ export const updateUserFinaSettingsSchema = updateUserFinaSettingsSchemaDefinition;