@open-mercato/core 0.6.6-develop.6094.1.28b081ea16 → 0.6.6-develop.6121.1.5797a901b3

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 (317) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/generated/entities/catalog_product/index.js +52 -0
  3. package/dist/generated/entities/catalog_product/index.js.map +2 -2
  4. package/dist/generated/entities/catalog_product_variant/index.js +4 -0
  5. package/dist/generated/entities/catalog_product_variant/index.js.map +2 -2
  6. package/dist/generated/entity-fields-registry.js +28 -0
  7. package/dist/generated/entity-fields-registry.js.map +2 -2
  8. package/dist/modules/catalog/api/products/route.js +103 -33
  9. package/dist/modules/catalog/api/products/route.js.map +2 -2
  10. package/dist/modules/catalog/api/variants/route.js +4 -0
  11. package/dist/modules/catalog/api/variants/route.js.map +2 -2
  12. package/dist/modules/catalog/backend/catalog/products/[id]/page.js +46 -2
  13. package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
  14. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js +4 -0
  15. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js.map +2 -2
  16. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/create/page.js +2 -0
  17. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/create/page.js.map +2 -2
  18. package/dist/modules/catalog/backend/catalog/products/create/page.js +42 -2
  19. package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
  20. package/dist/modules/catalog/commands/products.js +251 -14
  21. package/dist/modules/catalog/commands/products.js.map +2 -2
  22. package/dist/modules/catalog/commands/variants.js +72 -1
  23. package/dist/modules/catalog/commands/variants.js.map +2 -2
  24. package/dist/modules/catalog/components/products/ProductComplianceSection.js +500 -0
  25. package/dist/modules/catalog/components/products/ProductComplianceSection.js.map +7 -0
  26. package/dist/modules/catalog/components/products/VariantBuilder.js +39 -1
  27. package/dist/modules/catalog/components/products/VariantBuilder.js.map +2 -2
  28. package/dist/modules/catalog/components/products/productForm.js +164 -2
  29. package/dist/modules/catalog/components/products/productForm.js.map +2 -2
  30. package/dist/modules/catalog/components/products/variantForm.js +2 -0
  31. package/dist/modules/catalog/components/products/variantForm.js.map +2 -2
  32. package/dist/modules/catalog/data/entities.js +93 -0
  33. package/dist/modules/catalog/data/entities.js.map +2 -2
  34. package/dist/modules/catalog/data/types.js +28 -0
  35. package/dist/modules/catalog/data/types.js.map +2 -2
  36. package/dist/modules/catalog/data/validators.js +100 -5
  37. package/dist/modules/catalog/data/validators.js.map +2 -2
  38. package/dist/modules/catalog/lib/gtin.js +61 -0
  39. package/dist/modules/catalog/lib/gtin.js.map +7 -0
  40. package/dist/modules/catalog/migrations/Migration20260611090000.js +17 -0
  41. package/dist/modules/catalog/migrations/Migration20260611090000.js.map +7 -0
  42. package/dist/modules/catalog/translations.js +1 -1
  43. package/dist/modules/catalog/translations.js.map +2 -2
  44. package/dist/modules/configs/api/cache/route.js +60 -10
  45. package/dist/modules/configs/api/cache/route.js.map +3 -3
  46. package/dist/modules/configs/components/CachePanel.js +52 -29
  47. package/dist/modules/configs/components/CachePanel.js.map +2 -2
  48. package/dist/modules/currencies/api/currencies/options/route.js +18 -4
  49. package/dist/modules/currencies/api/currencies/options/route.js.map +2 -2
  50. package/dist/modules/currencies/services/rateFetchingService.js +35 -18
  51. package/dist/modules/currencies/services/rateFetchingService.js.map +2 -2
  52. package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js +16 -16
  53. package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js.map +2 -2
  54. package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js +1 -1
  55. package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js.map +2 -2
  56. package/dist/modules/customers/backend/calendar/page.js +10 -0
  57. package/dist/modules/customers/backend/calendar/page.js.map +7 -0
  58. package/dist/modules/customers/backend/calendar/page.meta.js +25 -0
  59. package/dist/modules/customers/backend/calendar/page.meta.js.map +7 -0
  60. package/dist/modules/customers/cli.js +1 -0
  61. package/dist/modules/customers/cli.js.map +2 -2
  62. package/dist/modules/customers/components/calendar/AgendaList.js +182 -0
  63. package/dist/modules/customers/components/calendar/AgendaList.js.map +7 -0
  64. package/dist/modules/customers/components/calendar/CalendarEventEditor.js +331 -0
  65. package/dist/modules/customers/components/calendar/CalendarEventEditor.js.map +7 -0
  66. package/dist/modules/customers/components/calendar/CalendarFooter.js +48 -0
  67. package/dist/modules/customers/components/calendar/CalendarFooter.js.map +7 -0
  68. package/dist/modules/customers/components/calendar/CalendarHeader.js +36 -0
  69. package/dist/modules/customers/components/calendar/CalendarHeader.js.map +7 -0
  70. package/dist/modules/customers/components/calendar/CalendarScreen.js +516 -0
  71. package/dist/modules/customers/components/calendar/CalendarScreen.js.map +7 -0
  72. package/dist/modules/customers/components/calendar/CalendarSettingsModal.js +163 -0
  73. package/dist/modules/customers/components/calendar/CalendarSettingsModal.js.map +7 -0
  74. package/dist/modules/customers/components/calendar/CalendarTabs.js +60 -0
  75. package/dist/modules/customers/components/calendar/CalendarTabs.js.map +7 -0
  76. package/dist/modules/customers/components/calendar/CalendarToolbar.js +262 -0
  77. package/dist/modules/customers/components/calendar/CalendarToolbar.js.map +7 -0
  78. package/dist/modules/customers/components/calendar/EventBlock.js +149 -0
  79. package/dist/modules/customers/components/calendar/EventBlock.js.map +7 -0
  80. package/dist/modules/customers/components/calendar/EventPeekPopover.js +72 -0
  81. package/dist/modules/customers/components/calendar/EventPeekPopover.js.map +7 -0
  82. package/dist/modules/customers/components/calendar/MonthGrid.js +214 -0
  83. package/dist/modules/customers/components/calendar/MonthGrid.js.map +7 -0
  84. package/dist/modules/customers/components/calendar/ShortcutsDialog.js +44 -0
  85. package/dist/modules/customers/components/calendar/ShortcutsDialog.js.map +7 -0
  86. package/dist/modules/customers/components/calendar/TimeGrid.js +410 -0
  87. package/dist/modules/customers/components/calendar/TimeGrid.js.map +7 -0
  88. package/dist/modules/customers/components/calendar/UpcomingCards.js +175 -0
  89. package/dist/modules/customers/components/calendar/UpcomingCards.js.map +7 -0
  90. package/dist/modules/customers/components/calendar/editor/CategoryField.js +75 -0
  91. package/dist/modules/customers/components/calendar/editor/CategoryField.js.map +7 -0
  92. package/dist/modules/customers/components/calendar/editor/LocationField.js +30 -0
  93. package/dist/modules/customers/components/calendar/editor/LocationField.js.map +7 -0
  94. package/dist/modules/customers/components/calendar/editor/PeopleField.js +135 -0
  95. package/dist/modules/customers/components/calendar/editor/PeopleField.js.map +7 -0
  96. package/dist/modules/customers/components/calendar/editor/RelatedToField.js +218 -0
  97. package/dist/modules/customers/components/calendar/editor/RelatedToField.js.map +7 -0
  98. package/dist/modules/customers/components/calendar/editor/RepeatField.js +119 -0
  99. package/dist/modules/customers/components/calendar/editor/RepeatField.js.map +7 -0
  100. package/dist/modules/customers/components/calendar/editor/ScheduleSection.js +83 -0
  101. package/dist/modules/customers/components/calendar/editor/ScheduleSection.js.map +7 -0
  102. package/dist/modules/customers/components/calendar/editor/SegmentGroup.js +44 -0
  103. package/dist/modules/customers/components/calendar/editor/SegmentGroup.js.map +7 -0
  104. package/dist/modules/customers/components/calendar/editor/hooks.js +132 -0
  105. package/dist/modules/customers/components/calendar/editor/hooks.js.map +7 -0
  106. package/dist/modules/customers/components/calendar/editor/inputs.js +160 -0
  107. package/dist/modules/customers/components/calendar/editor/inputs.js.map +7 -0
  108. package/dist/modules/customers/components/calendar/editor/lookups.js +107 -0
  109. package/dist/modules/customers/components/calendar/editor/lookups.js.map +7 -0
  110. package/dist/modules/customers/components/calendar/types.js +30 -0
  111. package/dist/modules/customers/components/calendar/types.js.map +7 -0
  112. package/dist/modules/customers/components/calendar/useCalendarItems.js +131 -0
  113. package/dist/modules/customers/components/calendar/useCalendarItems.js.map +7 -0
  114. package/dist/modules/customers/components/calendar/useCalendarPreferences.js +41 -0
  115. package/dist/modules/customers/components/calendar/useCalendarPreferences.js.map +7 -0
  116. package/dist/modules/customers/lib/calendar/categories.js +28 -0
  117. package/dist/modules/customers/lib/calendar/categories.js.map +7 -0
  118. package/dist/modules/customers/lib/calendar/conflicts.js +72 -0
  119. package/dist/modules/customers/lib/calendar/conflicts.js.map +7 -0
  120. package/dist/modules/customers/lib/calendar/editorPayload.js +271 -0
  121. package/dist/modules/customers/lib/calendar/editorPayload.js.map +7 -0
  122. package/dist/modules/customers/lib/calendar/grid.js +48 -0
  123. package/dist/modules/customers/lib/calendar/grid.js.map +7 -0
  124. package/dist/modules/customers/lib/calendar/layout.js +39 -0
  125. package/dist/modules/customers/lib/calendar/layout.js.map +7 -0
  126. package/dist/modules/customers/lib/calendar/mapItem.js +79 -0
  127. package/dist/modules/customers/lib/calendar/mapItem.js.map +7 -0
  128. package/dist/modules/customers/lib/calendar/preferences.js +71 -0
  129. package/dist/modules/customers/lib/calendar/preferences.js.map +7 -0
  130. package/dist/modules/customers/lib/calendar/range.js +46 -0
  131. package/dist/modules/customers/lib/calendar/range.js.map +7 -0
  132. package/dist/modules/customers/lib/calendar/recurrence.js +113 -0
  133. package/dist/modules/customers/lib/calendar/recurrence.js.map +7 -0
  134. package/dist/modules/dashboards/services/widgetDataService.js +5 -5
  135. package/dist/modules/dashboards/services/widgetDataService.js.map +2 -2
  136. package/dist/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.js +61 -1
  137. package/dist/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.js.map +2 -2
  138. package/dist/modules/dictionaries/api/[dictionaryId]/entries/route.js +33 -1
  139. package/dist/modules/dictionaries/api/[dictionaryId]/entries/route.js.map +2 -2
  140. package/dist/modules/dictionaries/api/[dictionaryId]/route.js +61 -1
  141. package/dist/modules/dictionaries/api/[dictionaryId]/route.js.map +2 -2
  142. package/dist/modules/dictionaries/api/route.js +33 -1
  143. package/dist/modules/dictionaries/api/route.js.map +2 -2
  144. package/dist/modules/feature_toggles/lib/queries.js +36 -52
  145. package/dist/modules/feature_toggles/lib/queries.js.map +2 -2
  146. package/dist/modules/perspectives/api/[tableId]/[perspectiveId]/route.js +32 -1
  147. package/dist/modules/perspectives/api/[tableId]/[perspectiveId]/route.js.map +2 -2
  148. package/dist/modules/perspectives/api/[tableId]/roles/[roleId]/route.js +32 -1
  149. package/dist/modules/perspectives/api/[tableId]/roles/[roleId]/route.js.map +2 -2
  150. package/dist/modules/perspectives/api/[tableId]/route.js +73 -2
  151. package/dist/modules/perspectives/api/[tableId]/route.js.map +2 -2
  152. package/dist/modules/perspectives/services/perspectiveService.js +5 -3
  153. package/dist/modules/perspectives/services/perspectiveService.js.map +2 -2
  154. package/dist/modules/planner/api/access.js +9 -0
  155. package/dist/modules/planner/api/access.js.map +2 -2
  156. package/dist/modules/planner/api/availability-date-specific.js +22 -1
  157. package/dist/modules/planner/api/availability-date-specific.js.map +2 -2
  158. package/dist/modules/planner/api/availability-weekly.js +22 -1
  159. package/dist/modules/planner/api/availability-weekly.js.map +2 -2
  160. package/dist/modules/resources/api/resources/tags/assign/route.js +39 -0
  161. package/dist/modules/resources/api/resources/tags/assign/route.js.map +2 -2
  162. package/dist/modules/resources/api/resources/tags/unassign/route.js +39 -0
  163. package/dist/modules/resources/api/resources/tags/unassign/route.js.map +2 -2
  164. package/dist/modules/sales/api/settings/document-numbers/route.js +33 -1
  165. package/dist/modules/sales/api/settings/document-numbers/route.js.map +2 -2
  166. package/dist/modules/sales/api/settings/order-editing/route.js +35 -3
  167. package/dist/modules/sales/api/settings/order-editing/route.js.map +2 -2
  168. package/dist/modules/staff/api/leave-requests/accept/route.js +41 -0
  169. package/dist/modules/staff/api/leave-requests/accept/route.js.map +2 -2
  170. package/dist/modules/staff/api/leave-requests/reject/route.js +41 -0
  171. package/dist/modules/staff/api/leave-requests/reject/route.js.map +2 -2
  172. package/dist/modules/staff/api/team-members/self/route.js +40 -0
  173. package/dist/modules/staff/api/team-members/self/route.js.map +2 -2
  174. package/dist/modules/staff/api/team-members/tags/assign/route.js +41 -0
  175. package/dist/modules/staff/api/team-members/tags/assign/route.js.map +2 -2
  176. package/dist/modules/staff/api/team-members/tags/unassign/route.js +41 -0
  177. package/dist/modules/staff/api/team-members/tags/unassign/route.js.map +2 -2
  178. package/dist/modules/translations/api/[entityType]/[entityId]/route.js +61 -1
  179. package/dist/modules/translations/api/[entityType]/[entityId]/route.js.map +2 -2
  180. package/dist/modules/translations/api/context.js +7 -0
  181. package/dist/modules/translations/api/context.js.map +2 -2
  182. package/dist/modules/translations/api/put/locales.js +33 -1
  183. package/dist/modules/translations/api/put/locales.js.map +2 -2
  184. package/dist/modules/workflows/backend/definitions/visual-editor/page.js +6 -7
  185. package/dist/modules/workflows/backend/definitions/visual-editor/page.js.map +2 -2
  186. package/dist/modules/workflows/backend/instances/[id]/page.js.map +1 -1
  187. package/dist/modules/workflows/components/EdgeEditDialog.js.map +1 -1
  188. package/dist/modules/workflows/components/EdgeEditDialogCrudForm.js.map +1 -1
  189. package/dist/modules/workflows/components/NodeEditDialog.js.map +1 -1
  190. package/dist/modules/workflows/components/NodeEditDialogCrudForm.js.map +1 -1
  191. package/dist/modules/workflows/components/WorkflowGraph.js.map +1 -1
  192. package/dist/modules/workflows/components/WorkflowGraphImpl.js +17 -9
  193. package/dist/modules/workflows/components/WorkflowGraphImpl.js.map +2 -2
  194. package/dist/modules/workflows/components/mobile/MobileVisualEditor.js.map +1 -1
  195. package/dist/modules/workflows/frontend/checkout-demo/deriveCurrentStep.js +8 -0
  196. package/dist/modules/workflows/frontend/checkout-demo/deriveCurrentStep.js.map +7 -0
  197. package/dist/modules/workflows/frontend/checkout-demo/page.js +2 -20
  198. package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
  199. package/dist/modules/workflows/lib/graph-utils.js +8 -0
  200. package/dist/modules/workflows/lib/graph-utils.js.map +2 -2
  201. package/generated/entities/catalog_product/index.ts +26 -0
  202. package/generated/entities/catalog_product_variant/index.ts +2 -0
  203. package/generated/entity-fields-registry.ts +28 -0
  204. package/package.json +7 -7
  205. package/src/modules/catalog/api/products/route.ts +123 -39
  206. package/src/modules/catalog/api/variants/route.ts +4 -0
  207. package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +43 -0
  208. package/src/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.tsx +14 -0
  209. package/src/modules/catalog/backend/catalog/products/[productId]/variants/create/page.tsx +2 -0
  210. package/src/modules/catalog/backend/catalog/products/create/page.tsx +41 -0
  211. package/src/modules/catalog/commands/products.ts +307 -2
  212. package/src/modules/catalog/commands/variants.ts +90 -1
  213. package/src/modules/catalog/components/products/ProductComplianceSection.tsx +497 -0
  214. package/src/modules/catalog/components/products/VariantBuilder.tsx +43 -0
  215. package/src/modules/catalog/components/products/productForm.ts +262 -0
  216. package/src/modules/catalog/components/products/variantForm.ts +4 -0
  217. package/src/modules/catalog/data/entities.ts +97 -0
  218. package/src/modules/catalog/data/types.ts +36 -0
  219. package/src/modules/catalog/data/validators.ts +159 -3
  220. package/src/modules/catalog/i18n/de.json +64 -0
  221. package/src/modules/catalog/i18n/en.json +64 -0
  222. package/src/modules/catalog/i18n/es.json +64 -0
  223. package/src/modules/catalog/i18n/pl.json +64 -0
  224. package/src/modules/catalog/lib/gtin.ts +66 -0
  225. package/src/modules/catalog/migrations/.snapshot-open-mercato.json +457 -0
  226. package/src/modules/catalog/migrations/Migration20260611090000.ts +17 -0
  227. package/src/modules/catalog/translations.ts +1 -1
  228. package/src/modules/configs/api/cache/route.ts +72 -10
  229. package/src/modules/configs/components/CachePanel.tsx +59 -29
  230. package/src/modules/currencies/api/currencies/options/route.ts +22 -4
  231. package/src/modules/currencies/services/rateFetchingService.ts +63 -26
  232. package/src/modules/customer_accounts/backend/customer_accounts/users/[id]/page.tsx +18 -18
  233. package/src/modules/customer_accounts/backend/customer_accounts/users/page.tsx +1 -1
  234. package/src/modules/customer_accounts/i18n/de.json +1 -1
  235. package/src/modules/customer_accounts/i18n/en.json +1 -1
  236. package/src/modules/customer_accounts/i18n/es.json +1 -1
  237. package/src/modules/customer_accounts/i18n/pl.json +1 -1
  238. package/src/modules/customers/backend/calendar/page.meta.ts +23 -0
  239. package/src/modules/customers/backend/calendar/page.tsx +12 -0
  240. package/src/modules/customers/cli.ts +1 -0
  241. package/src/modules/customers/components/calendar/AgendaList.tsx +219 -0
  242. package/src/modules/customers/components/calendar/CalendarEventEditor.tsx +386 -0
  243. package/src/modules/customers/components/calendar/CalendarFooter.tsx +61 -0
  244. package/src/modules/customers/components/calendar/CalendarHeader.tsx +40 -0
  245. package/src/modules/customers/components/calendar/CalendarScreen.tsx +590 -0
  246. package/src/modules/customers/components/calendar/CalendarSettingsModal.tsx +207 -0
  247. package/src/modules/customers/components/calendar/CalendarTabs.tsx +63 -0
  248. package/src/modules/customers/components/calendar/CalendarToolbar.tsx +295 -0
  249. package/src/modules/customers/components/calendar/EventBlock.tsx +205 -0
  250. package/src/modules/customers/components/calendar/EventPeekPopover.tsx +100 -0
  251. package/src/modules/customers/components/calendar/MonthGrid.tsx +236 -0
  252. package/src/modules/customers/components/calendar/ShortcutsDialog.tsx +57 -0
  253. package/src/modules/customers/components/calendar/TimeGrid.tsx +510 -0
  254. package/src/modules/customers/components/calendar/UpcomingCards.tsx +220 -0
  255. package/src/modules/customers/components/calendar/editor/CategoryField.tsx +79 -0
  256. package/src/modules/customers/components/calendar/editor/LocationField.tsx +37 -0
  257. package/src/modules/customers/components/calendar/editor/PeopleField.tsx +148 -0
  258. package/src/modules/customers/components/calendar/editor/RelatedToField.tsx +242 -0
  259. package/src/modules/customers/components/calendar/editor/RepeatField.tsx +132 -0
  260. package/src/modules/customers/components/calendar/editor/ScheduleSection.tsx +110 -0
  261. package/src/modules/customers/components/calendar/editor/SegmentGroup.tsx +50 -0
  262. package/src/modules/customers/components/calendar/editor/hooks.ts +162 -0
  263. package/src/modules/customers/components/calendar/editor/inputs.tsx +158 -0
  264. package/src/modules/customers/components/calendar/editor/lookups.ts +160 -0
  265. package/src/modules/customers/components/calendar/types.ts +163 -0
  266. package/src/modules/customers/components/calendar/useCalendarItems.ts +162 -0
  267. package/src/modules/customers/components/calendar/useCalendarPreferences.ts +52 -0
  268. package/src/modules/customers/i18n/de.json +195 -0
  269. package/src/modules/customers/i18n/en.json +195 -0
  270. package/src/modules/customers/i18n/es.json +195 -0
  271. package/src/modules/customers/i18n/pl.json +195 -0
  272. package/src/modules/customers/lib/calendar/categories.ts +26 -0
  273. package/src/modules/customers/lib/calendar/conflicts.ts +117 -0
  274. package/src/modules/customers/lib/calendar/editorPayload.ts +388 -0
  275. package/src/modules/customers/lib/calendar/grid.ts +50 -0
  276. package/src/modules/customers/lib/calendar/layout.ts +47 -0
  277. package/src/modules/customers/lib/calendar/mapItem.ts +94 -0
  278. package/src/modules/customers/lib/calendar/preferences.ts +95 -0
  279. package/src/modules/customers/lib/calendar/range.ts +45 -0
  280. package/src/modules/customers/lib/calendar/recurrence.ts +137 -0
  281. package/src/modules/dashboards/services/widgetDataService.ts +8 -6
  282. package/src/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.ts +61 -1
  283. package/src/modules/dictionaries/api/[dictionaryId]/entries/route.ts +33 -1
  284. package/src/modules/dictionaries/api/[dictionaryId]/route.ts +65 -1
  285. package/src/modules/dictionaries/api/route.ts +36 -1
  286. package/src/modules/feature_toggles/lib/queries.ts +41 -60
  287. package/src/modules/perspectives/api/[tableId]/[perspectiveId]/route.ts +34 -1
  288. package/src/modules/perspectives/api/[tableId]/roles/[roleId]/route.ts +34 -1
  289. package/src/modules/perspectives/api/[tableId]/route.ts +107 -32
  290. package/src/modules/perspectives/services/perspectiveService.ts +9 -5
  291. package/src/modules/planner/api/access.ts +9 -0
  292. package/src/modules/planner/api/availability-date-specific.ts +22 -1
  293. package/src/modules/planner/api/availability-weekly.ts +22 -1
  294. package/src/modules/resources/api/resources/tags/assign/route.ts +42 -0
  295. package/src/modules/resources/api/resources/tags/unassign/route.ts +42 -0
  296. package/src/modules/sales/api/settings/document-numbers/route.ts +35 -1
  297. package/src/modules/sales/api/settings/order-editing/route.ts +37 -3
  298. package/src/modules/staff/api/leave-requests/accept/route.ts +45 -0
  299. package/src/modules/staff/api/leave-requests/reject/route.ts +45 -0
  300. package/src/modules/staff/api/team-members/self/route.ts +43 -0
  301. package/src/modules/staff/api/team-members/tags/assign/route.ts +45 -0
  302. package/src/modules/staff/api/team-members/tags/unassign/route.ts +45 -0
  303. package/src/modules/translations/api/[entityType]/[entityId]/route.ts +65 -1
  304. package/src/modules/translations/api/context.ts +7 -0
  305. package/src/modules/translations/api/put/locales.ts +35 -1
  306. package/src/modules/workflows/backend/definitions/visual-editor/page.tsx +11 -9
  307. package/src/modules/workflows/backend/instances/[id]/page.tsx +1 -1
  308. package/src/modules/workflows/components/EdgeEditDialog.tsx +1 -1
  309. package/src/modules/workflows/components/EdgeEditDialogCrudForm.tsx +1 -1
  310. package/src/modules/workflows/components/NodeEditDialog.tsx +1 -1
  311. package/src/modules/workflows/components/NodeEditDialogCrudForm.tsx +1 -1
  312. package/src/modules/workflows/components/WorkflowGraph.tsx +2 -2
  313. package/src/modules/workflows/components/WorkflowGraphImpl.tsx +27 -13
  314. package/src/modules/workflows/components/mobile/MobileVisualEditor.tsx +3 -3
  315. package/src/modules/workflows/frontend/checkout-demo/deriveCurrentStep.ts +12 -0
  316. package/src/modules/workflows/frontend/checkout-demo/page.tsx +3 -23
  317. package/src/modules/workflows/lib/graph-utils.ts +21 -1
@@ -790,6 +790,32 @@ async function loadProductSnapshot(em, id) {
790
790
  weightValue,
791
791
  weightUnit,
792
792
  dimensions,
793
+ countryOfOriginCode: record.countryOfOriginCode ?? null,
794
+ pkwiuCode: record.pkwiuCode ?? null,
795
+ cnCode: record.cnCode ?? null,
796
+ hsCode: record.hsCode ?? null,
797
+ taxClassificationCode: record.taxClassificationCode ?? null,
798
+ gtuCodes: record.gtuCodes?.length ? [...record.gtuCodes] : null,
799
+ ageMin: record.ageMin ?? null,
800
+ isExciseGood: record.isExciseGood ?? false,
801
+ exciseCategory: record.exciseCategory ?? null,
802
+ requiresPrescription: record.requiresPrescription ?? false,
803
+ hazmatClass: record.hazmatClass ?? null,
804
+ unNumber: record.unNumber ?? null,
805
+ hazmatPackingGroup: record.hazmatPackingGroup ?? null,
806
+ containsLithiumBattery: record.containsLithiumBattery ?? false,
807
+ launchAt: record.launchAt ? record.launchAt.toISOString() : null,
808
+ endOfLifeAt: record.endOfLifeAt ? record.endOfLifeAt.toISOString() : null,
809
+ availableFrom: record.availableFrom ? record.availableFrom.toISOString() : null,
810
+ availableUntil: record.availableUntil ? record.availableUntil.toISOString() : null,
811
+ minOrderQty: record.minOrderQty ?? null,
812
+ maxOrderQty: record.maxOrderQty ?? null,
813
+ orderQtyIncrement: record.orderQtyIncrement ?? null,
814
+ requiresShipping: record.requiresShipping ?? true,
815
+ isQuoteOnly: record.isQuoteOnly ?? false,
816
+ seoTitle: record.seoTitle ?? null,
817
+ seoDescription: record.seoDescription ?? null,
818
+ canonicalUrl: record.canonicalUrl ?? null,
793
819
  customFieldsetCode: record.customFieldsetCode ?? null,
794
820
  metadata,
795
821
  isConfigurable: record.isConfigurable,
@@ -831,6 +857,32 @@ function productSeedFromSnapshot(snapshot) {
831
857
  weightValue: snapshot.weightValue ?? null,
832
858
  weightUnit: snapshot.weightUnit ?? null,
833
859
  dimensions: snapshot.dimensions ? cloneJson(snapshot.dimensions) : null,
860
+ countryOfOriginCode: snapshot.countryOfOriginCode ?? null,
861
+ pkwiuCode: snapshot.pkwiuCode ?? null,
862
+ cnCode: snapshot.cnCode ?? null,
863
+ hsCode: snapshot.hsCode ?? null,
864
+ taxClassificationCode: snapshot.taxClassificationCode ?? null,
865
+ gtuCodes: snapshot.gtuCodes ? [...snapshot.gtuCodes] : null,
866
+ ageMin: snapshot.ageMin ?? null,
867
+ isExciseGood: snapshot.isExciseGood ?? false,
868
+ exciseCategory: snapshot.exciseCategory ?? null,
869
+ requiresPrescription: snapshot.requiresPrescription ?? false,
870
+ hazmatClass: snapshot.hazmatClass ?? null,
871
+ unNumber: snapshot.unNumber ?? null,
872
+ hazmatPackingGroup: snapshot.hazmatPackingGroup ?? null,
873
+ containsLithiumBattery: snapshot.containsLithiumBattery ?? false,
874
+ launchAt: snapshot.launchAt ? new Date(snapshot.launchAt) : null,
875
+ endOfLifeAt: snapshot.endOfLifeAt ? new Date(snapshot.endOfLifeAt) : null,
876
+ availableFrom: snapshot.availableFrom ? new Date(snapshot.availableFrom) : null,
877
+ availableUntil: snapshot.availableUntil ? new Date(snapshot.availableUntil) : null,
878
+ minOrderQty: snapshot.minOrderQty ?? null,
879
+ maxOrderQty: snapshot.maxOrderQty ?? null,
880
+ orderQtyIncrement: snapshot.orderQtyIncrement ?? null,
881
+ requiresShipping: snapshot.requiresShipping ?? true,
882
+ isQuoteOnly: snapshot.isQuoteOnly ?? false,
883
+ seoTitle: snapshot.seoTitle ?? null,
884
+ seoDescription: snapshot.seoDescription ?? null,
885
+ canonicalUrl: snapshot.canonicalUrl ?? null,
834
886
  metadata: snapshot.metadata ? cloneJson(snapshot.metadata) : null,
835
887
  customFieldsetCode: snapshot.customFieldsetCode ?? null,
836
888
  isConfigurable: snapshot.isConfigurable,
@@ -865,6 +917,32 @@ function applyProductSnapshot(em, record, snapshot) {
865
917
  record.weightValue = snapshot.weightValue ?? null;
866
918
  record.weightUnit = snapshot.weightUnit ?? null;
867
919
  record.dimensions = snapshot.dimensions ? cloneJson(snapshot.dimensions) : null;
920
+ record.countryOfOriginCode = snapshot.countryOfOriginCode ?? null;
921
+ record.pkwiuCode = snapshot.pkwiuCode ?? null;
922
+ record.cnCode = snapshot.cnCode ?? null;
923
+ record.hsCode = snapshot.hsCode ?? null;
924
+ record.taxClassificationCode = snapshot.taxClassificationCode ?? null;
925
+ record.gtuCodes = snapshot.gtuCodes ? [...snapshot.gtuCodes] : null;
926
+ record.ageMin = snapshot.ageMin ?? null;
927
+ record.isExciseGood = snapshot.isExciseGood ?? false;
928
+ record.exciseCategory = snapshot.exciseCategory ?? null;
929
+ record.requiresPrescription = snapshot.requiresPrescription ?? false;
930
+ record.hazmatClass = snapshot.hazmatClass ?? null;
931
+ record.unNumber = snapshot.unNumber ?? null;
932
+ record.hazmatPackingGroup = snapshot.hazmatPackingGroup ?? null;
933
+ record.containsLithiumBattery = snapshot.containsLithiumBattery ?? false;
934
+ record.launchAt = snapshot.launchAt ? new Date(snapshot.launchAt) : null;
935
+ record.endOfLifeAt = snapshot.endOfLifeAt ? new Date(snapshot.endOfLifeAt) : null;
936
+ record.availableFrom = snapshot.availableFrom ? new Date(snapshot.availableFrom) : null;
937
+ record.availableUntil = snapshot.availableUntil ? new Date(snapshot.availableUntil) : null;
938
+ record.minOrderQty = snapshot.minOrderQty ?? null;
939
+ record.maxOrderQty = snapshot.maxOrderQty ?? null;
940
+ record.orderQtyIncrement = snapshot.orderQtyIncrement ?? null;
941
+ record.requiresShipping = snapshot.requiresShipping ?? true;
942
+ record.isQuoteOnly = snapshot.isQuoteOnly ?? false;
943
+ record.seoTitle = snapshot.seoTitle ?? null;
944
+ record.seoDescription = snapshot.seoDescription ?? null;
945
+ record.canonicalUrl = snapshot.canonicalUrl ?? null;
868
946
  record.metadata = snapshot.metadata ? cloneJson(snapshot.metadata) : null;
869
947
  record.customFieldsetCode = snapshot.customFieldsetCode ?? null;
870
948
  record.optionSchemaTemplate = snapshot.optionSchemaId ? em.getReference(CatalogOptionSchemaTemplate, snapshot.optionSchemaId) : null;
@@ -934,6 +1012,32 @@ const createProductCommand = {
934
1012
  weightValue,
935
1013
  weightUnit,
936
1014
  dimensions,
1015
+ countryOfOriginCode: parsed.countryOfOriginCode ?? null,
1016
+ pkwiuCode: parsed.pkwiuCode ?? null,
1017
+ cnCode: parsed.cnCode ?? null,
1018
+ hsCode: parsed.hsCode ?? null,
1019
+ taxClassificationCode: parsed.taxClassificationCode ?? null,
1020
+ gtuCodes: parsed.gtuCodes ?? null,
1021
+ ageMin: parsed.ageMin ?? null,
1022
+ isExciseGood: parsed.isExciseGood ?? false,
1023
+ exciseCategory: parsed.exciseCategory ?? null,
1024
+ requiresPrescription: parsed.requiresPrescription ?? false,
1025
+ hazmatClass: parsed.hazmatClass ?? null,
1026
+ unNumber: parsed.unNumber ?? null,
1027
+ hazmatPackingGroup: parsed.hazmatPackingGroup ?? null,
1028
+ containsLithiumBattery: parsed.containsLithiumBattery ?? false,
1029
+ launchAt: parsed.launchAt ?? null,
1030
+ endOfLifeAt: parsed.endOfLifeAt ?? null,
1031
+ availableFrom: parsed.availableFrom ?? null,
1032
+ availableUntil: parsed.availableUntil ?? null,
1033
+ minOrderQty: parsed.minOrderQty ?? null,
1034
+ maxOrderQty: parsed.maxOrderQty ?? null,
1035
+ orderQtyIncrement: parsed.orderQtyIncrement ?? null,
1036
+ requiresShipping: parsed.requiresShipping ?? true,
1037
+ isQuoteOnly: parsed.isQuoteOnly ?? false,
1038
+ seoTitle: parsed.seoTitle ?? null,
1039
+ seoDescription: parsed.seoDescription ?? null,
1040
+ canonicalUrl: parsed.canonicalUrl ?? null,
937
1041
  metadata,
938
1042
  customFieldsetCode: parsed.customFieldsetCode ?? null,
939
1043
  isConfigurable: parsed.isConfigurable ?? false,
@@ -1140,6 +1244,54 @@ const updateProductCommand = {
1140
1244
  ensureTenantScope(ctx, tenantId);
1141
1245
  ensureOrganizationScope(ctx, organizationId);
1142
1246
  ensureSameScope(record, organizationId, tenantId);
1247
+ const mergedRangeViolation = (() => {
1248
+ const minOrderQty = parsed.minOrderQty !== void 0 ? parsed.minOrderQty ?? null : record.minOrderQty ?? null;
1249
+ const maxOrderQty = parsed.maxOrderQty !== void 0 ? parsed.maxOrderQty ?? null : record.maxOrderQty ?? null;
1250
+ if (minOrderQty != null && maxOrderQty != null && maxOrderQty < minOrderQty) {
1251
+ return {
1252
+ field: "maxOrderQty",
1253
+ key: "catalog.products.validation.orderQtyRange",
1254
+ fallback: "Maximum order quantity cannot be lower than the minimum."
1255
+ };
1256
+ }
1257
+ const launchAt = parsed.launchAt !== void 0 ? parsed.launchAt ?? null : record.launchAt ?? null;
1258
+ const endOfLifeAt = parsed.endOfLifeAt !== void 0 ? parsed.endOfLifeAt ?? null : record.endOfLifeAt ?? null;
1259
+ if (launchAt && endOfLifeAt && endOfLifeAt < launchAt) {
1260
+ return {
1261
+ field: "endOfLifeAt",
1262
+ key: "catalog.products.validation.lifecycleDateRange",
1263
+ fallback: "End of life cannot be before the launch date."
1264
+ };
1265
+ }
1266
+ const availableFrom = parsed.availableFrom !== void 0 ? parsed.availableFrom ?? null : record.availableFrom ?? null;
1267
+ const availableUntil = parsed.availableUntil !== void 0 ? parsed.availableUntil ?? null : record.availableUntil ?? null;
1268
+ if (availableFrom && availableUntil && availableUntil < availableFrom) {
1269
+ return {
1270
+ field: "availableUntil",
1271
+ key: "catalog.products.validation.availabilityDateRange",
1272
+ fallback: "Available until cannot be before available from."
1273
+ };
1274
+ }
1275
+ return null;
1276
+ })();
1277
+ if (mergedRangeViolation) {
1278
+ const message = translate(
1279
+ mergedRangeViolation.key,
1280
+ mergedRangeViolation.fallback
1281
+ );
1282
+ throw new CrudHttpError(400, {
1283
+ error: message,
1284
+ fieldErrors: { [mergedRangeViolation.field]: message },
1285
+ details: [
1286
+ {
1287
+ path: [mergedRangeViolation.field],
1288
+ message,
1289
+ code: "invalid",
1290
+ origin: "validation"
1291
+ }
1292
+ ]
1293
+ });
1294
+ }
1143
1295
  const dataEngine = ctx.container.resolve("dataEngine");
1144
1296
  const lookupEm = em.fork();
1145
1297
  const taxRateProvided = parsed.taxRateId !== void 0 || parsed.taxRate !== void 0;
@@ -1262,6 +1414,55 @@ const updateProductCommand = {
1262
1414
  if (parsed.isConfigurable !== void 0)
1263
1415
  record.isConfigurable = parsed.isConfigurable;
1264
1416
  if (parsed.isActive !== void 0) record.isActive = parsed.isActive;
1417
+ if (parsed.countryOfOriginCode !== void 0)
1418
+ record.countryOfOriginCode = parsed.countryOfOriginCode ?? null;
1419
+ if (parsed.pkwiuCode !== void 0)
1420
+ record.pkwiuCode = parsed.pkwiuCode ?? null;
1421
+ if (parsed.cnCode !== void 0) record.cnCode = parsed.cnCode ?? null;
1422
+ if (parsed.hsCode !== void 0) record.hsCode = parsed.hsCode ?? null;
1423
+ if (parsed.taxClassificationCode !== void 0)
1424
+ record.taxClassificationCode = parsed.taxClassificationCode ?? null;
1425
+ if (parsed.gtuCodes !== void 0)
1426
+ record.gtuCodes = parsed.gtuCodes ?? null;
1427
+ if (parsed.ageMin !== void 0) record.ageMin = parsed.ageMin ?? null;
1428
+ if (parsed.isExciseGood !== void 0)
1429
+ record.isExciseGood = parsed.isExciseGood;
1430
+ if (parsed.exciseCategory !== void 0)
1431
+ record.exciseCategory = parsed.exciseCategory ?? null;
1432
+ if (parsed.requiresPrescription !== void 0)
1433
+ record.requiresPrescription = parsed.requiresPrescription;
1434
+ if (parsed.hazmatClass !== void 0)
1435
+ record.hazmatClass = parsed.hazmatClass ?? null;
1436
+ if (parsed.unNumber !== void 0)
1437
+ record.unNumber = parsed.unNumber ?? null;
1438
+ if (parsed.hazmatPackingGroup !== void 0)
1439
+ record.hazmatPackingGroup = parsed.hazmatPackingGroup ?? null;
1440
+ if (parsed.containsLithiumBattery !== void 0)
1441
+ record.containsLithiumBattery = parsed.containsLithiumBattery;
1442
+ if (parsed.launchAt !== void 0)
1443
+ record.launchAt = parsed.launchAt ?? null;
1444
+ if (parsed.endOfLifeAt !== void 0)
1445
+ record.endOfLifeAt = parsed.endOfLifeAt ?? null;
1446
+ if (parsed.availableFrom !== void 0)
1447
+ record.availableFrom = parsed.availableFrom ?? null;
1448
+ if (parsed.availableUntil !== void 0)
1449
+ record.availableUntil = parsed.availableUntil ?? null;
1450
+ if (parsed.minOrderQty !== void 0)
1451
+ record.minOrderQty = parsed.minOrderQty ?? null;
1452
+ if (parsed.maxOrderQty !== void 0)
1453
+ record.maxOrderQty = parsed.maxOrderQty ?? null;
1454
+ if (parsed.orderQtyIncrement !== void 0)
1455
+ record.orderQtyIncrement = parsed.orderQtyIncrement ?? null;
1456
+ if (parsed.requiresShipping !== void 0)
1457
+ record.requiresShipping = parsed.requiresShipping;
1458
+ if (parsed.isQuoteOnly !== void 0)
1459
+ record.isQuoteOnly = parsed.isQuoteOnly;
1460
+ if (parsed.seoTitle !== void 0)
1461
+ record.seoTitle = parsed.seoTitle ?? null;
1462
+ if (parsed.seoDescription !== void 0)
1463
+ record.seoDescription = parsed.seoDescription ?? null;
1464
+ if (parsed.canonicalUrl !== void 0)
1465
+ record.canonicalUrl = parsed.canonicalUrl ?? null;
1265
1466
  try {
1266
1467
  await withAtomicFlush(
1267
1468
  em,
@@ -1302,6 +1503,14 @@ const updateProductCommand = {
1302
1503
  const after = snapshots.after;
1303
1504
  if (!before || !after) return null;
1304
1505
  const { translate } = await resolveTranslations();
1506
+ const beforeGtuCodes = (before.gtuCodes ?? []).join(",");
1507
+ const afterGtuCodes = (after.gtuCodes ?? []).join(",");
1508
+ const gtuCodesChange = beforeGtuCodes !== afterGtuCodes ? {
1509
+ gtuCodes: {
1510
+ from: before.gtuCodes ?? null,
1511
+ to: after.gtuCodes ?? null
1512
+ }
1513
+ } : null;
1305
1514
  return {
1306
1515
  actionLabel: translate(
1307
1516
  "catalog.audit.products.update",
@@ -1311,20 +1520,48 @@ const updateProductCommand = {
1311
1520
  resourceId: before.id,
1312
1521
  tenantId: before.tenantId,
1313
1522
  organizationId: before.organizationId,
1314
- changes: buildChanges(before, after, [
1315
- "title",
1316
- "sku",
1317
- "productType",
1318
- "defaultUnit",
1319
- "defaultSalesUnit",
1320
- "defaultSalesUnitQuantity",
1321
- "uomRoundingScale",
1322
- "uomRoundingMode",
1323
- "unitPriceEnabled",
1324
- "unitPriceReferenceUnit",
1325
- "unitPriceBaseQuantity",
1326
- "isActive"
1327
- ]),
1523
+ changes: {
1524
+ ...buildChanges(before, after, [
1525
+ "title",
1526
+ "sku",
1527
+ "productType",
1528
+ "defaultUnit",
1529
+ "defaultSalesUnit",
1530
+ "defaultSalesUnitQuantity",
1531
+ "uomRoundingScale",
1532
+ "uomRoundingMode",
1533
+ "unitPriceEnabled",
1534
+ "unitPriceReferenceUnit",
1535
+ "unitPriceBaseQuantity",
1536
+ "isActive",
1537
+ "countryOfOriginCode",
1538
+ "pkwiuCode",
1539
+ "cnCode",
1540
+ "hsCode",
1541
+ "taxClassificationCode",
1542
+ "ageMin",
1543
+ "isExciseGood",
1544
+ "exciseCategory",
1545
+ "requiresPrescription",
1546
+ "hazmatClass",
1547
+ "unNumber",
1548
+ "hazmatPackingGroup",
1549
+ "containsLithiumBattery",
1550
+ "launchAt",
1551
+ "endOfLifeAt",
1552
+ "availableFrom",
1553
+ "availableUntil",
1554
+ "minOrderQty",
1555
+ "maxOrderQty",
1556
+ "orderQtyIncrement",
1557
+ "requiresShipping",
1558
+ "isQuoteOnly",
1559
+ "seoTitle",
1560
+ "seoDescription",
1561
+ "canonicalUrl"
1562
+ ]),
1563
+ ...gtuCodesChange
1564
+ },
1328
1565
  snapshotBefore: before,
1329
1566
  snapshotAfter: after,
1330
1567
  payload: {