@open-mercato/core 0.6.8-develop.7100.1.fbf66fca35 → 0.7.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 (967) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/helpers/integration/api.js +1 -13
  3. package/dist/helpers/integration/api.js.map +2 -2
  4. package/dist/helpers/integration/communicationChannelsFixtures.js +0 -19
  5. package/dist/helpers/integration/communicationChannelsFixtures.js.map +2 -2
  6. package/dist/modules/api_keys/api/keys/route.js +1 -1
  7. package/dist/modules/api_keys/api/keys/route.js.map +2 -2
  8. package/dist/modules/api_keys/backend/api-keys/page.js +1 -3
  9. package/dist/modules/api_keys/backend/api-keys/page.js.map +2 -2
  10. package/dist/modules/attachments/api/route.js +2 -2
  11. package/dist/modules/attachments/api/route.js.map +2 -2
  12. package/dist/modules/attachments/components/AttachmentLibrary.js +0 -2
  13. package/dist/modules/attachments/components/AttachmentLibrary.js.map +2 -2
  14. package/dist/modules/attachments/di.js +1 -11
  15. package/dist/modules/attachments/di.js.map +2 -2
  16. package/dist/modules/attachments/index.js.map +1 -1
  17. package/dist/modules/attachments/lib/scoped-upload-service.js +2 -15
  18. package/dist/modules/attachments/lib/scoped-upload-service.js.map +2 -2
  19. package/dist/modules/attachments/lib/upload-limits.js +2 -6
  20. package/dist/modules/attachments/lib/upload-limits.js.map +2 -2
  21. package/dist/modules/audit_logs/backend/audit-logs/page.js +0 -6
  22. package/dist/modules/audit_logs/backend/audit-logs/page.js.map +2 -2
  23. package/dist/modules/audit_logs/lib/display-helpers.js +11 -19
  24. package/dist/modules/audit_logs/lib/display-helpers.js.map +2 -2
  25. package/dist/modules/audit_logs/services/actionLogService.js +12 -57
  26. package/dist/modules/audit_logs/services/actionLogService.js.map +3 -3
  27. package/dist/modules/auth/acl.js +5 -30
  28. package/dist/modules/auth/acl.js.map +2 -2
  29. package/dist/modules/auth/api/feature-check.js +2 -8
  30. package/dist/modules/auth/api/feature-check.js.map +2 -2
  31. package/dist/modules/auth/api/login.js +20 -4
  32. package/dist/modules/auth/api/login.js.map +2 -2
  33. package/dist/modules/auth/api/roles/acl/route.js +33 -28
  34. package/dist/modules/auth/api/roles/acl/route.js.map +2 -2
  35. package/dist/modules/auth/api/routeError.js +11 -0
  36. package/dist/modules/auth/api/routeError.js.map +7 -0
  37. package/dist/modules/auth/api/session/refresh.js +1 -25
  38. package/dist/modules/auth/api/session/refresh.js.map +2 -2
  39. package/dist/modules/auth/api/users/acl/route.js +73 -102
  40. package/dist/modules/auth/api/users/acl/route.js.map +2 -2
  41. package/dist/modules/auth/api/users/route.js +5 -13
  42. package/dist/modules/auth/api/users/route.js.map +2 -2
  43. package/dist/modules/auth/backend/roles/[id]/edit/page.meta.js +1 -5
  44. package/dist/modules/auth/backend/roles/[id]/edit/page.meta.js.map +2 -2
  45. package/dist/modules/auth/backend/roles/page.js +1 -3
  46. package/dist/modules/auth/backend/roles/page.js.map +2 -2
  47. package/dist/modules/auth/backend/users/[id]/edit/page.meta.js +1 -5
  48. package/dist/modules/auth/backend/users/[id]/edit/page.meta.js.map +2 -2
  49. package/dist/modules/auth/backend/users/page.js +1 -2
  50. package/dist/modules/auth/backend/users/page.js.map +2 -2
  51. package/dist/modules/auth/components/AclEditor.js +30 -39
  52. package/dist/modules/auth/components/AclEditor.js.map +2 -2
  53. package/dist/modules/auth/data/entities.js.map +2 -2
  54. package/dist/modules/auth/data/validators.js +1 -5
  55. package/dist/modules/auth/data/validators.js.map +2 -2
  56. package/dist/modules/auth/di.js +9 -35
  57. package/dist/modules/auth/di.js.map +2 -2
  58. package/dist/modules/auth/frontend/reset/[token]/page.js +0 -46
  59. package/dist/modules/auth/frontend/reset/[token]/page.js.map +2 -2
  60. package/dist/modules/auth/lib/grantChecks.js.map +2 -2
  61. package/dist/modules/auth/services/authService.js +2 -16
  62. package/dist/modules/auth/services/authService.js.map +2 -2
  63. package/dist/modules/auth/services/rbacService.js +24 -67
  64. package/dist/modules/auth/services/rbacService.js.map +3 -3
  65. package/dist/modules/business_rules/backend/logs/page.js +1 -3
  66. package/dist/modules/business_rules/backend/logs/page.js.map +2 -2
  67. package/dist/modules/business_rules/backend/rules/[id]/page.meta.js +6 -1
  68. package/dist/modules/business_rules/backend/rules/[id]/page.meta.js.map +2 -2
  69. package/dist/modules/business_rules/backend/rules/create/page.meta.js +5 -1
  70. package/dist/modules/business_rules/backend/rules/create/page.meta.js.map +2 -2
  71. package/dist/modules/business_rules/backend/rules/page.js +1 -3
  72. package/dist/modules/business_rules/backend/rules/page.js.map +2 -2
  73. package/dist/modules/business_rules/backend/sets/[id]/page.meta.js +6 -1
  74. package/dist/modules/business_rules/backend/sets/[id]/page.meta.js.map +2 -2
  75. package/dist/modules/business_rules/backend/sets/create/page.meta.js +5 -1
  76. package/dist/modules/business_rules/backend/sets/create/page.meta.js.map +2 -2
  77. package/dist/modules/business_rules/backend/sets/page.js +1 -3
  78. package/dist/modules/business_rules/backend/sets/page.js.map +2 -2
  79. package/dist/modules/business_rules/lib/expression-evaluator.js +9 -9
  80. package/dist/modules/business_rules/lib/expression-evaluator.js.map +2 -2
  81. package/dist/modules/business_rules/lib/rule-evaluator.js +9 -10
  82. package/dist/modules/business_rules/lib/rule-evaluator.js.map +2 -2
  83. package/dist/modules/catalog/ai-agents.js +1 -1
  84. package/dist/modules/catalog/ai-agents.js.map +1 -1
  85. package/dist/modules/catalog/ai-tools/merchandising-pack.js +2 -2
  86. package/dist/modules/catalog/ai-tools/merchandising-pack.js.map +2 -2
  87. package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js +2 -5
  88. package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js.map +2 -2
  89. package/dist/modules/catalog/components/categories/CategoriesDataTable.js +0 -2
  90. package/dist/modules/catalog/components/categories/CategoriesDataTable.js.map +2 -2
  91. package/dist/modules/catalog/components/products/ProductsDataTable.js +1 -7
  92. package/dist/modules/catalog/components/products/ProductsDataTable.js.map +2 -2
  93. package/dist/modules/catalog/widgets/injection/merchandising-assistant-trigger/widget.client.js +0 -2
  94. package/dist/modules/catalog/widgets/injection/merchandising-assistant-trigger/widget.client.js.map +2 -2
  95. package/dist/modules/communication_channels/api/post/channels/[id]/test-send/route.js +1 -9
  96. package/dist/modules/communication_channels/api/post/channels/[id]/test-send/route.js.map +2 -2
  97. package/dist/modules/communication_channels/api/post/test-seed/route.js +10 -95
  98. package/dist/modules/communication_channels/api/post/test-seed/route.js.map +2 -2
  99. package/dist/modules/communication_channels/backend/communication_channels/channels/page.js +0 -3
  100. package/dist/modules/communication_channels/backend/communication_channels/channels/page.js.map +2 -2
  101. package/dist/modules/communication_channels/commands/ingest-inbound-message.js +1 -14
  102. package/dist/modules/communication_channels/commands/ingest-inbound-message.js.map +2 -2
  103. package/dist/modules/communication_channels/di.js +1 -7
  104. package/dist/modules/communication_channels/di.js.map +2 -2
  105. package/dist/modules/communication_channels/lib/email-capabilities.js +1 -4
  106. package/dist/modules/communication_channels/lib/email-capabilities.js.map +2 -2
  107. package/dist/modules/communication_channels/lib/test-seed.js +2 -41
  108. package/dist/modules/communication_channels/lib/test-seed.js.map +2 -2
  109. package/dist/modules/configs/lib/system-status.js +0 -9
  110. package/dist/modules/configs/lib/system-status.js.map +2 -2
  111. package/dist/modules/currencies/backend/currencies/page.js +1 -3
  112. package/dist/modules/currencies/backend/currencies/page.js.map +2 -2
  113. package/dist/modules/currencies/backend/exchange-rates/page.js +1 -3
  114. package/dist/modules/currencies/backend/exchange-rates/page.js.map +2 -2
  115. package/dist/modules/customer_accounts/api/admin/domain-mappings.js +0 -9
  116. package/dist/modules/customer_accounts/api/admin/domain-mappings.js.map +2 -2
  117. package/dist/modules/customer_accounts/backend/customer_accounts/roles/page.js +1 -3
  118. package/dist/modules/customer_accounts/backend/customer_accounts/roles/page.js.map +2 -2
  119. package/dist/modules/customer_accounts/backend/customer_accounts/settings/CustomerAccountsSettingsPageClient.js +84 -0
  120. package/dist/modules/customer_accounts/backend/customer_accounts/settings/CustomerAccountsSettingsPageClient.js.map +7 -0
  121. package/dist/modules/customer_accounts/backend/customer_accounts/settings/page.js +7 -81
  122. package/dist/modules/customer_accounts/backend/customer_accounts/settings/page.js.map +2 -2
  123. package/dist/modules/customer_accounts/backend/customer_accounts/users/PortalUsersPageClient.js +523 -0
  124. package/dist/modules/customer_accounts/backend/customer_accounts/users/PortalUsersPageClient.js.map +7 -0
  125. package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/PortalUserDetailPageClient.js +731 -0
  126. package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/PortalUserDetailPageClient.js.map +7 -0
  127. package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js +7 -727
  128. package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js.map +2 -2
  129. package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js +7 -521
  130. package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js.map +2 -2
  131. package/dist/modules/customer_accounts/extension-points.js +1 -1
  132. package/dist/modules/customer_accounts/extension-points.js.map +2 -2
  133. package/dist/modules/customer_accounts/lib/portalUrl.js +69 -0
  134. package/dist/modules/customer_accounts/lib/portalUrl.js.map +7 -0
  135. package/dist/modules/customer_accounts/services/domainMappingService.js +0 -10
  136. package/dist/modules/customer_accounts/services/domainMappingService.js.map +2 -2
  137. package/dist/modules/customers/ai-tools/companies-pack.js +1 -4
  138. package/dist/modules/customers/ai-tools/companies-pack.js.map +2 -2
  139. package/dist/modules/customers/ai-tools/deal-analyzer-pack.js +2 -13
  140. package/dist/modules/customers/ai-tools/deal-analyzer-pack.js.map +2 -2
  141. package/dist/modules/customers/ai-tools/deals-pack.js +6 -52
  142. package/dist/modules/customers/ai-tools/deals-pack.js.map +2 -2
  143. package/dist/modules/customers/ai-tools/people-pack.js +1 -4
  144. package/dist/modules/customers/ai-tools/people-pack.js.map +2 -2
  145. package/dist/modules/customers/api/activities/route.js +6 -48
  146. package/dist/modules/customers/api/activities/route.js.map +2 -2
  147. package/dist/modules/customers/api/companies/[id]/people/route.js +64 -20
  148. package/dist/modules/customers/api/companies/[id]/people/route.js.map +2 -2
  149. package/dist/modules/customers/api/companies/[id]/route.js +94 -17
  150. package/dist/modules/customers/api/companies/[id]/route.js.map +2 -2
  151. package/dist/modules/customers/api/dashboard/widgets/customer-todos/route.js +5 -8
  152. package/dist/modules/customers/api/dashboard/widgets/customer-todos/route.js.map +2 -2
  153. package/dist/modules/customers/api/deals/[id]/companies/route.js +1 -1
  154. package/dist/modules/customers/api/deals/[id]/companies/route.js.map +2 -2
  155. package/dist/modules/customers/api/deals/[id]/people/route.js +1 -1
  156. package/dist/modules/customers/api/deals/[id]/people/route.js.map +2 -2
  157. package/dist/modules/customers/api/deals/[id]/route.js +25 -8
  158. package/dist/modules/customers/api/deals/[id]/route.js.map +2 -2
  159. package/dist/modules/customers/api/deals/[id]/stats/route.js +22 -3
  160. package/dist/modules/customers/api/deals/[id]/stats/route.js.map +2 -2
  161. package/dist/modules/customers/api/deals/aggregate/route.js +4 -11
  162. package/dist/modules/customers/api/deals/aggregate/route.js.map +2 -2
  163. package/dist/modules/customers/api/deals/map/route.js +1 -2
  164. package/dist/modules/customers/api/deals/map/route.js.map +2 -2
  165. package/dist/modules/customers/api/deals/route.js +1 -38
  166. package/dist/modules/customers/api/deals/route.js.map +2 -2
  167. package/dist/modules/customers/api/entity-roles-factory.js +4 -4
  168. package/dist/modules/customers/api/entity-roles-factory.js.map +2 -2
  169. package/dist/modules/customers/api/interactions/route.js +1 -3
  170. package/dist/modules/customers/api/interactions/route.js.map +2 -2
  171. package/dist/modules/customers/api/interactions/tasks/route.js +4 -27
  172. package/dist/modules/customers/api/interactions/tasks/route.js.map +2 -2
  173. package/dist/modules/customers/api/people/[id]/companies/[linkId]/route.js +3 -4
  174. package/dist/modules/customers/api/people/[id]/companies/[linkId]/route.js.map +2 -2
  175. package/dist/modules/customers/api/people/[id]/companies/context.js +1 -1
  176. package/dist/modules/customers/api/people/[id]/companies/context.js.map +2 -2
  177. package/dist/modules/customers/api/people/[id]/companies/enriched/route.js +1 -1
  178. package/dist/modules/customers/api/people/[id]/companies/enriched/route.js.map +2 -2
  179. package/dist/modules/customers/api/people/[id]/route.js +10 -11
  180. package/dist/modules/customers/api/people/[id]/route.js.map +2 -2
  181. package/dist/modules/customers/api/people/check-phone/route.js +9 -51
  182. package/dist/modules/customers/api/people/check-phone/route.js.map +2 -2
  183. package/dist/modules/customers/api/todos/route.js +5 -30
  184. package/dist/modules/customers/api/todos/route.js.map +2 -2
  185. package/dist/modules/customers/backend/customers/companies/page.js +4 -6
  186. package/dist/modules/customers/backend/customers/companies/page.js.map +2 -2
  187. package/dist/modules/customers/backend/customers/deals/[id]/page.js +1 -6
  188. package/dist/modules/customers/backend/customers/deals/[id]/page.js.map +2 -2
  189. package/dist/modules/customers/backend/customers/deals/page.js +4 -7
  190. package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
  191. package/dist/modules/customers/backend/customers/deals/pipeline/components/Lane.js +13 -4
  192. package/dist/modules/customers/backend/customers/deals/pipeline/components/Lane.js.map +2 -2
  193. package/dist/modules/customers/backend/customers/deals/pipeline/components/StatusFilterPopover.js +14 -85
  194. package/dist/modules/customers/backend/customers/deals/pipeline/components/StatusFilterPopover.js.map +2 -2
  195. package/dist/modules/customers/backend/customers/people/page.js +4 -6
  196. package/dist/modules/customers/backend/customers/people/page.js.map +2 -2
  197. package/dist/modules/customers/backend/hooks/useEmailDuplicateCheck.js +3 -9
  198. package/dist/modules/customers/backend/hooks/useEmailDuplicateCheck.js.map +2 -2
  199. package/dist/modules/customers/commands/deals.js +34 -21
  200. package/dist/modules/customers/commands/deals.js.map +2 -2
  201. package/dist/modules/customers/commands/interactions.js.map +1 -1
  202. package/dist/modules/customers/commands/personCompanyLinks.js +2 -131
  203. package/dist/modules/customers/commands/personCompanyLinks.js.map +2 -2
  204. package/dist/modules/customers/components/CustomerTodosTable.js +0 -1
  205. package/dist/modules/customers/components/CustomerTodosTable.js.map +2 -2
  206. package/dist/modules/customers/components/DealsKpiStrip.js +6 -7
  207. package/dist/modules/customers/components/DealsKpiStrip.js.map +2 -2
  208. package/dist/modules/customers/components/calendar/AgendaList.js +2 -2
  209. package/dist/modules/customers/components/calendar/AgendaList.js.map +2 -2
  210. package/dist/modules/customers/components/calendar/CalendarEventEditor.js +1 -1
  211. package/dist/modules/customers/components/calendar/CalendarEventEditor.js.map +2 -2
  212. package/dist/modules/customers/components/calendar/CalendarScreen.js +1 -1
  213. package/dist/modules/customers/components/calendar/CalendarScreen.js.map +2 -2
  214. package/dist/modules/customers/components/calendar/CalendarSettingsModal.js +1 -1
  215. package/dist/modules/customers/components/calendar/CalendarSettingsModal.js.map +2 -2
  216. package/dist/modules/customers/components/calendar/EventBlock.js +1 -1
  217. package/dist/modules/customers/components/calendar/EventBlock.js.map +2 -2
  218. package/dist/modules/customers/components/calendar/EventPeekPopover.js +2 -3
  219. package/dist/modules/customers/components/calendar/EventPeekPopover.js.map +2 -2
  220. package/dist/modules/customers/components/calendar/editor/PeopleField.js +5 -40
  221. package/dist/modules/customers/components/calendar/editor/PeopleField.js.map +2 -2
  222. package/dist/modules/customers/components/calendar/editor/hooks.js +1 -2
  223. package/dist/modules/customers/components/calendar/editor/hooks.js.map +2 -2
  224. package/dist/modules/customers/components/calendar/types.js +1 -1
  225. package/dist/modules/customers/components/calendar/types.js.map +2 -2
  226. package/dist/modules/customers/components/detail/AssignRoleDialog.js +33 -28
  227. package/dist/modules/customers/components/detail/AssignRoleDialog.js.map +2 -2
  228. package/dist/modules/customers/components/detail/CompanyKpiBar.js +4 -5
  229. package/dist/modules/customers/components/detail/CompanyKpiBar.js.map +2 -2
  230. package/dist/modules/customers/components/detail/CompanyPeopleSection.js +1 -3
  231. package/dist/modules/customers/components/detail/CompanyPeopleSection.js.map +2 -2
  232. package/dist/modules/customers/components/detail/DealForm.js +7 -19
  233. package/dist/modules/customers/components/detail/DealForm.js.map +2 -2
  234. package/dist/modules/customers/components/detail/DealsSection.js +5 -6
  235. package/dist/modules/customers/components/detail/DealsSection.js.map +2 -2
  236. package/dist/modules/customers/components/detail/EntityTagsDialog.js +11 -35
  237. package/dist/modules/customers/components/detail/EntityTagsDialog.js.map +2 -2
  238. package/dist/modules/customers/components/detail/PersonCompaniesSection.js +1 -3
  239. package/dist/modules/customers/components/detail/PersonCompaniesSection.js.map +2 -2
  240. package/dist/modules/customers/components/detail/hooks/usePersonTasks.js +13 -19
  241. package/dist/modules/customers/components/detail/hooks/usePersonTasks.js.map +2 -2
  242. package/dist/modules/customers/components/detail/schedule/ParticipantsField.js +4 -4
  243. package/dist/modules/customers/components/detail/schedule/ParticipantsField.js.map +2 -2
  244. package/dist/modules/customers/components/detail/schedule/useScheduleFormState.js +3 -3
  245. package/dist/modules/customers/components/detail/schedule/useScheduleFormState.js.map +2 -2
  246. package/dist/modules/customers/components/detail/utils.js +5 -5
  247. package/dist/modules/customers/components/detail/utils.js.map +2 -2
  248. package/dist/modules/customers/data/entities.js.map +1 -1
  249. package/dist/modules/customers/data/validators.js +3 -32
  250. package/dist/modules/customers/data/validators.js.map +2 -2
  251. package/dist/modules/customers/events.js +0 -5
  252. package/dist/modules/customers/events.js.map +2 -2
  253. package/dist/modules/customers/lib/calendar/conflicts.js +2 -8
  254. package/dist/modules/customers/lib/calendar/conflicts.js.map +2 -2
  255. package/dist/modules/customers/lib/calendar/editorPayload.js +2 -3
  256. package/dist/modules/customers/lib/calendar/editorPayload.js.map +2 -2
  257. package/dist/modules/customers/lib/calendar/mapItem.js +3 -8
  258. package/dist/modules/customers/lib/calendar/mapItem.js.map +2 -2
  259. package/dist/modules/customers/lib/dealStatus.js +0 -30
  260. package/dist/modules/customers/lib/dealStatus.js.map +2 -2
  261. package/dist/modules/customers/lib/findPeopleByAddresses.js +0 -1
  262. package/dist/modules/customers/lib/findPeopleByAddresses.js.map +2 -2
  263. package/dist/modules/customers/lib/personCompanies.js +2 -100
  264. package/dist/modules/customers/lib/personCompanies.js.map +2 -2
  265. package/dist/modules/customers/lib/todoCompatibility.js +0 -12
  266. package/dist/modules/customers/lib/todoCompatibility.js.map +2 -2
  267. package/dist/modules/dashboards/lib/widgetScope.js +1 -6
  268. package/dist/modules/dashboards/lib/widgetScope.js.map +2 -2
  269. package/dist/modules/data_sync/backend/data-sync/page.js +1 -3
  270. package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
  271. package/dist/modules/data_sync/lib/sync-engine.js +6 -72
  272. package/dist/modules/data_sync/lib/sync-engine.js.map +2 -2
  273. package/dist/modules/data_sync/workers/sync-export.js +1 -5
  274. package/dist/modules/data_sync/workers/sync-export.js.map +2 -2
  275. package/dist/modules/data_sync/workers/sync-import.js +1 -5
  276. package/dist/modules/data_sync/workers/sync-import.js.map +2 -2
  277. package/dist/modules/devices/acl.js +1 -9
  278. package/dist/modules/devices/acl.js.map +2 -2
  279. package/dist/modules/devices/api/admin/devices/[id]/route.js +32 -5
  280. package/dist/modules/devices/api/admin/devices/[id]/route.js.map +2 -2
  281. package/dist/modules/devices/api/admin/devices/route.js +1 -14
  282. package/dist/modules/devices/api/admin/devices/route.js.map +2 -2
  283. package/dist/modules/devices/api/deviceList.js +12 -99
  284. package/dist/modules/devices/api/deviceList.js.map +2 -2
  285. package/dist/modules/devices/api/openapi.js +1 -3
  286. package/dist/modules/devices/api/openapi.js.map +2 -2
  287. package/dist/modules/devices/api/route.js +1 -9
  288. package/dist/modules/devices/api/route.js.map +2 -2
  289. package/dist/modules/devices/backend/devices/[id]/page.js +26 -10
  290. package/dist/modules/devices/backend/devices/[id]/page.js.map +2 -2
  291. package/dist/modules/devices/backend/devices/create/page.js +1 -17
  292. package/dist/modules/devices/backend/devices/create/page.js.map +2 -2
  293. package/dist/modules/devices/backend/devices/page.js +34 -28
  294. package/dist/modules/devices/backend/devices/page.js.map +2 -2
  295. package/dist/modules/devices/setup.js +2 -6
  296. package/dist/modules/devices/setup.js.map +2 -2
  297. package/dist/modules/directory/backend/directory/organizations/page.js +1 -2
  298. package/dist/modules/directory/backend/directory/organizations/page.js.map +2 -2
  299. package/dist/modules/directory/backend/directory/tenants/page.js +1 -2
  300. package/dist/modules/directory/backend/directory/tenants/page.js.map +2 -2
  301. package/dist/modules/directory/di.js +0 -9
  302. package/dist/modules/directory/di.js.map +2 -2
  303. package/dist/modules/directory/utils/organizationScope.js.map +2 -2
  304. package/dist/modules/entities/api/records.js +2 -4
  305. package/dist/modules/entities/api/records.js.map +2 -2
  306. package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js +1 -3
  307. package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js.map +2 -2
  308. package/dist/modules/eudr/api/plots/route.js +1 -5
  309. package/dist/modules/eudr/api/plots/route.js.map +2 -2
  310. package/dist/modules/eudr/backend/eudr/evidence-submissions/[id]/page.meta.js +3 -1
  311. package/dist/modules/eudr/backend/eudr/evidence-submissions/[id]/page.meta.js.map +2 -2
  312. package/dist/modules/eudr/backend/eudr/evidence-submissions/create/page.meta.js +1 -0
  313. package/dist/modules/eudr/backend/eudr/evidence-submissions/create/page.meta.js.map +2 -2
  314. package/dist/modules/eudr/backend/eudr/evidence-submissions/page.js +0 -3
  315. package/dist/modules/eudr/backend/eudr/evidence-submissions/page.js.map +2 -2
  316. package/dist/modules/eudr/backend/eudr/evidence-submissions/page.meta.js +4 -1
  317. package/dist/modules/eudr/backend/eudr/evidence-submissions/page.meta.js.map +2 -2
  318. package/dist/modules/eudr/backend/eudr/page.meta.js +2 -2
  319. package/dist/modules/eudr/backend/eudr/page.meta.js.map +2 -2
  320. package/dist/modules/eudr/backend/eudr/plots/[id]/page.js +8 -2
  321. package/dist/modules/eudr/backend/eudr/plots/[id]/page.js.map +2 -2
  322. package/dist/modules/eudr/backend/eudr/plots/[id]/page.meta.js +3 -1
  323. package/dist/modules/eudr/backend/eudr/plots/[id]/page.meta.js.map +2 -2
  324. package/dist/modules/eudr/backend/eudr/plots/create/page.js +8 -2
  325. package/dist/modules/eudr/backend/eudr/plots/create/page.js.map +2 -2
  326. package/dist/modules/eudr/backend/eudr/plots/create/page.meta.js +1 -0
  327. package/dist/modules/eudr/backend/eudr/plots/create/page.meta.js.map +2 -2
  328. package/dist/modules/eudr/backend/eudr/plots/page.js +0 -3
  329. package/dist/modules/eudr/backend/eudr/plots/page.js.map +2 -2
  330. package/dist/modules/eudr/backend/eudr/plots/page.meta.js +4 -1
  331. package/dist/modules/eudr/backend/eudr/plots/page.meta.js.map +2 -2
  332. package/dist/modules/eudr/backend/eudr/product-mappings/[id]/page.meta.js +3 -1
  333. package/dist/modules/eudr/backend/eudr/product-mappings/[id]/page.meta.js.map +2 -2
  334. package/dist/modules/eudr/backend/eudr/product-mappings/create/page.meta.js +1 -0
  335. package/dist/modules/eudr/backend/eudr/product-mappings/create/page.meta.js.map +2 -2
  336. package/dist/modules/eudr/backend/eudr/product-mappings/page.js +0 -3
  337. package/dist/modules/eudr/backend/eudr/product-mappings/page.js.map +2 -2
  338. package/dist/modules/eudr/backend/eudr/product-mappings/page.meta.js +4 -1
  339. package/dist/modules/eudr/backend/eudr/product-mappings/page.meta.js.map +2 -2
  340. package/dist/modules/eudr/backend/eudr/risk-assessments/[id]/page.meta.js +3 -1
  341. package/dist/modules/eudr/backend/eudr/risk-assessments/[id]/page.meta.js.map +2 -2
  342. package/dist/modules/eudr/backend/eudr/risk-assessments/create/page.meta.js +1 -0
  343. package/dist/modules/eudr/backend/eudr/risk-assessments/create/page.meta.js.map +2 -2
  344. package/dist/modules/eudr/backend/eudr/risk-assessments/page.js +0 -3
  345. package/dist/modules/eudr/backend/eudr/risk-assessments/page.js.map +2 -2
  346. package/dist/modules/eudr/backend/eudr/risk-assessments/page.meta.js +4 -1
  347. package/dist/modules/eudr/backend/eudr/risk-assessments/page.meta.js.map +2 -2
  348. package/dist/modules/eudr/backend/eudr/statements/[id]/page.js +2 -0
  349. package/dist/modules/eudr/backend/eudr/statements/[id]/page.js.map +2 -2
  350. package/dist/modules/eudr/backend/eudr/statements/[id]/page.meta.js +3 -1
  351. package/dist/modules/eudr/backend/eudr/statements/[id]/page.meta.js.map +2 -2
  352. package/dist/modules/eudr/backend/eudr/statements/create/page.meta.js +1 -0
  353. package/dist/modules/eudr/backend/eudr/statements/create/page.meta.js.map +2 -2
  354. package/dist/modules/eudr/backend/eudr/statements/page.js +30 -28
  355. package/dist/modules/eudr/backend/eudr/statements/page.js.map +2 -2
  356. package/dist/modules/eudr/backend/eudr/statements/page.meta.js +4 -1
  357. package/dist/modules/eudr/backend/eudr/statements/page.meta.js.map +2 -2
  358. package/dist/modules/eudr/commands/statements.js +8 -3
  359. package/dist/modules/eudr/commands/statements.js.map +2 -2
  360. package/dist/modules/eudr/components/crudErrorI18n.js +21 -1
  361. package/dist/modules/eudr/components/crudErrorI18n.js.map +2 -2
  362. package/dist/modules/eudr/components/formConfig.js +6 -2
  363. package/dist/modules/eudr/components/formConfig.js.map +2 -2
  364. package/dist/modules/eudr/data/validators.js +1 -4
  365. package/dist/modules/eudr/data/validators.js.map +2 -2
  366. package/dist/modules/eudr/lib/statement-lifecycle.js +9 -1
  367. package/dist/modules/eudr/lib/statement-lifecycle.js.map +2 -2
  368. package/dist/modules/feature_toggles/components/FeatureTogglesTable.js +0 -1
  369. package/dist/modules/feature_toggles/components/FeatureTogglesTable.js.map +2 -2
  370. package/dist/modules/feature_toggles/components/OverridesTable.js +0 -1
  371. package/dist/modules/feature_toggles/components/OverridesTable.js.map +2 -2
  372. package/dist/modules/feature_toggles/defaults.json +8 -0
  373. package/dist/modules/inbox_ops/backend/inbox-ops/log/page.js +0 -3
  374. package/dist/modules/inbox_ops/backend/inbox-ops/log/page.js.map +2 -2
  375. package/dist/modules/inbox_ops/backend/inbox-ops/page.js +0 -3
  376. package/dist/modules/inbox_ops/backend/inbox-ops/page.js.map +2 -2
  377. package/dist/modules/inbox_ops/lib/htmlToPlainText.js +12 -1
  378. package/dist/modules/inbox_ops/lib/htmlToPlainText.js.map +2 -2
  379. package/dist/modules/integrations/api/[id]/credentials/route.js +1 -6
  380. package/dist/modules/integrations/api/[id]/credentials/route.js.map +2 -2
  381. package/dist/modules/integrations/backend/integrations/[id]/page.js +29 -38
  382. package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
  383. package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js +9 -36
  384. package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js.map +2 -2
  385. package/dist/modules/integrations/data/validators.js +3 -11
  386. package/dist/modules/integrations/data/validators.js.map +2 -2
  387. package/dist/modules/integrations/lib/credentials-masking.js +2 -6
  388. package/dist/modules/integrations/lib/credentials-masking.js.map +2 -2
  389. package/dist/modules/messages/api/[id]/route.js +1 -29
  390. package/dist/modules/messages/api/[id]/route.js.map +2 -2
  391. package/dist/modules/messages/api/openapi.js +2 -17
  392. package/dist/modules/messages/api/openapi.js.map +2 -2
  393. package/dist/modules/messages/api/route.js +2 -17
  394. package/dist/modules/messages/api/route.js.map +2 -2
  395. package/dist/modules/messages/components/MessagesInboxPageClient.js +14 -7
  396. package/dist/modules/messages/components/MessagesInboxPageClient.js.map +2 -2
  397. package/dist/modules/messages/components/inboxFilters.js +0 -15
  398. package/dist/modules/messages/components/inboxFilters.js.map +2 -2
  399. package/dist/modules/messages/components/message-detail/hooks/useMessageDetailsConversation.js +1 -11
  400. package/dist/modules/messages/components/message-detail/hooks/useMessageDetailsConversation.js.map +2 -2
  401. package/dist/modules/messages/components/message-detail/panels/MessageHeader.js +1 -3
  402. package/dist/modules/messages/components/message-detail/panels/MessageHeader.js.map +2 -2
  403. package/dist/modules/messages/components/message-detail/panels/thread-panel.js +1 -2
  404. package/dist/modules/messages/components/message-detail/panels/thread-panel.js.map +2 -2
  405. package/dist/modules/messages/components/messageListLabels.js +2 -14
  406. package/dist/modules/messages/components/messageListLabels.js.map +2 -2
  407. package/dist/modules/messages/data/validators.js +4 -18
  408. package/dist/modules/messages/data/validators.js.map +2 -2
  409. package/dist/modules/payment_gateways/api/webhook/[provider]/route.js +6 -4
  410. package/dist/modules/payment_gateways/api/webhook/[provider]/route.js.map +2 -2
  411. package/dist/modules/payment_gateways/backend/payment-gateways/page.js +1 -3
  412. package/dist/modules/payment_gateways/backend/payment-gateways/page.js.map +2 -2
  413. package/dist/modules/payment_gateways/lib/webhook-processor.js +0 -7
  414. package/dist/modules/payment_gateways/lib/webhook-processor.js.map +2 -2
  415. package/dist/modules/planner/backend/planner/availability-rulesets/page.js +0 -3
  416. package/dist/modules/planner/backend/planner/availability-rulesets/page.js.map +2 -2
  417. package/dist/modules/push_notifications/backend/push_notifications/page.js +1 -3
  418. package/dist/modules/push_notifications/backend/push_notifications/page.js.map +2 -2
  419. package/dist/modules/push_notifications/backend/push_notifications/send/page.js +1 -1
  420. package/dist/modules/push_notifications/backend/push_notifications/send/page.js.map +2 -2
  421. package/dist/modules/query_index/lib/engine.js +51 -150
  422. package/dist/modules/query_index/lib/engine.js.map +2 -2
  423. package/dist/modules/query_index/lib/search-tokens.js +3 -79
  424. package/dist/modules/query_index/lib/search-tokens.js.map +2 -2
  425. package/dist/modules/resources/backend/resources/resource-types/page.js +1 -3
  426. package/dist/modules/resources/backend/resources/resource-types/page.js.map +2 -2
  427. package/dist/modules/resources/backend/resources/resources/page.js +1 -3
  428. package/dist/modules/resources/backend/resources/resources/page.js.map +2 -2
  429. package/dist/modules/sales/backend/sales/channels/offers/page.js +0 -3
  430. package/dist/modules/sales/backend/sales/channels/offers/page.js.map +2 -2
  431. package/dist/modules/sales/backend/sales/channels/page.js +0 -3
  432. package/dist/modules/sales/backend/sales/channels/page.js.map +2 -2
  433. package/dist/modules/sales/backend/sales/documents/[id]/page.js +8 -10
  434. package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
  435. package/dist/modules/sales/commands/documents.js +1 -79
  436. package/dist/modules/sales/commands/documents.js.map +2 -2
  437. package/dist/modules/sales/components/PriceWithCurrency.js +5 -7
  438. package/dist/modules/sales/components/PriceWithCurrency.js.map +2 -2
  439. package/dist/modules/sales/components/channels/SalesChannelOffersPanel.js +0 -3
  440. package/dist/modules/sales/components/channels/SalesChannelOffersPanel.js.map +2 -2
  441. package/dist/modules/sales/components/documents/AdjustmentsSection.js +6 -8
  442. package/dist/modules/sales/components/documents/AdjustmentsSection.js.map +2 -2
  443. package/dist/modules/sales/components/documents/ItemsSection.js +22 -51
  444. package/dist/modules/sales/components/documents/ItemsSection.js.map +2 -2
  445. package/dist/modules/sales/components/documents/LineItemDialog.js +19 -84
  446. package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
  447. package/dist/modules/sales/components/documents/PaymentsSection.js +9 -23
  448. package/dist/modules/sales/components/documents/PaymentsSection.js.map +2 -2
  449. package/dist/modules/sales/components/documents/ReturnsSection.js +6 -8
  450. package/dist/modules/sales/components/documents/ReturnsSection.js.map +2 -2
  451. package/dist/modules/sales/components/documents/SalesDocumentsTable.js +14 -68
  452. package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
  453. package/dist/modules/sales/components/documents/SalesOrderDraftLines.js +5 -6
  454. package/dist/modules/sales/components/documents/SalesOrderDraftLines.js.map +2 -2
  455. package/dist/modules/sales/components/documents/ShipmentDialog.js +4 -5
  456. package/dist/modules/sales/components/documents/ShipmentDialog.js.map +2 -2
  457. package/dist/modules/sales/components/documents/ShipmentsSection.js +6 -8
  458. package/dist/modules/sales/components/documents/ShipmentsSection.js.map +2 -2
  459. package/dist/modules/sales/components/documents/lineItemUtils.js +2 -2
  460. package/dist/modules/sales/components/documents/lineItemUtils.js.map +2 -2
  461. package/dist/modules/sales/data/entities.js +2 -8
  462. package/dist/modules/sales/data/entities.js.map +2 -2
  463. package/dist/modules/sales/extension-points.js +0 -1
  464. package/dist/modules/sales/extension-points.js.map +2 -2
  465. package/dist/modules/sales/setup.js +0 -2
  466. package/dist/modules/sales/setup.js.map +2 -2
  467. package/dist/modules/sales/widgets/injection/document-history/widget.client.js +44 -2
  468. package/dist/modules/sales/widgets/injection/document-history/widget.client.js.map +2 -2
  469. package/dist/modules/sales/widgets/injection/payment-gateway-status-column/widget.js +2 -10
  470. package/dist/modules/sales/widgets/injection/payment-gateway-status-column/widget.js.map +2 -2
  471. package/dist/modules/sales/widgets/injection-table.js +7 -4
  472. package/dist/modules/sales/widgets/injection-table.js.map +2 -2
  473. package/dist/modules/staff/backend/staff/leave-requests/page.js +0 -3
  474. package/dist/modules/staff/backend/staff/leave-requests/page.js.map +2 -2
  475. package/dist/modules/staff/backend/staff/my-leave-requests/page.js +0 -3
  476. package/dist/modules/staff/backend/staff/my-leave-requests/page.js.map +2 -2
  477. package/dist/modules/staff/backend/staff/team-members/page.js +0 -3
  478. package/dist/modules/staff/backend/staff/team-members/page.js.map +2 -2
  479. package/dist/modules/staff/backend/staff/team-roles/page.js +0 -3
  480. package/dist/modules/staff/backend/staff/team-roles/page.js.map +2 -2
  481. package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js +0 -3
  482. package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js.map +2 -2
  483. package/dist/modules/staff/backend/staff/teams/page.js +0 -3
  484. package/dist/modules/staff/backend/staff/teams/page.js.map +2 -2
  485. package/dist/modules/staff/backend/staff/timesheets/page.js +18 -29
  486. package/dist/modules/staff/backend/staff/timesheets/page.js.map +2 -2
  487. package/dist/modules/staff/backend/staff/timesheets/projects/page.js +0 -3
  488. package/dist/modules/staff/backend/staff/timesheets/projects/page.js.map +2 -2
  489. package/dist/modules/sync_excel/lib/adapters/customers.js +0 -1
  490. package/dist/modules/sync_excel/lib/adapters/customers.js.map +2 -2
  491. package/dist/modules/warranty_claims/api/assignees/route.js +3 -3
  492. package/dist/modules/warranty_claims/api/assignees/route.js.map +2 -2
  493. package/dist/modules/warranty_claims/api/portal/attachments/route.js +2 -2
  494. package/dist/modules/warranty_claims/api/portal/attachments/route.js.map +2 -2
  495. package/dist/modules/warranty_claims/api/portal/claims/route.js +9 -12
  496. package/dist/modules/warranty_claims/api/portal/claims/route.js.map +2 -2
  497. package/dist/modules/warranty_claims/backend/page.js +0 -3
  498. package/dist/modules/warranty_claims/backend/page.js.map +2 -2
  499. package/dist/modules/warranty_claims/backend/warranty_claims/registrations/page.js +0 -3
  500. package/dist/modules/warranty_claims/backend/warranty_claims/registrations/page.js.map +2 -2
  501. package/dist/modules/warranty_claims/backend/warranty_claims/troubleshooting-guides/page.js +0 -3
  502. package/dist/modules/warranty_claims/backend/warranty_claims/troubleshooting-guides/page.js.map +2 -2
  503. package/dist/modules/warranty_claims/backend/warranty_claims/vendor-policies/page.js +0 -3
  504. package/dist/modules/warranty_claims/backend/warranty_claims/vendor-policies/page.js.map +2 -2
  505. package/dist/modules/warranty_claims/frontend/[orgSlug]/portal/claims/page.js +0 -3
  506. package/dist/modules/warranty_claims/frontend/[orgSlug]/portal/claims/page.js.map +2 -2
  507. package/dist/modules/wms/api/warehouses/route.js +9 -13
  508. package/dist/modules/wms/api/warehouses/route.js.map +2 -2
  509. package/dist/modules/wms/api/zones/route.js +2 -15
  510. package/dist/modules/wms/api/zones/route.js.map +2 -2
  511. package/dist/modules/wms/commands/configuration.js +9 -121
  512. package/dist/modules/wms/commands/configuration.js.map +2 -2
  513. package/dist/modules/wms/commands/inventory-actions.js +0 -3
  514. package/dist/modules/wms/commands/inventory-actions.js.map +2 -2
  515. package/dist/modules/wms/commands/shared.js +1 -9
  516. package/dist/modules/wms/commands/shared.js.map +2 -2
  517. package/dist/modules/wms/components/backend/WmsConfigurationPage.js +111 -76
  518. package/dist/modules/wms/components/backend/WmsConfigurationPage.js.map +3 -3
  519. package/dist/modules/wms/components/backend/WmsInventoryConsolePage.js +0 -1
  520. package/dist/modules/wms/components/backend/WmsInventoryConsolePage.js.map +2 -2
  521. package/dist/modules/wms/components/backend/WmsLocationDetailPage.js +20 -16
  522. package/dist/modules/wms/components/backend/WmsLocationDetailPage.js.map +2 -2
  523. package/dist/modules/wms/components/backend/WmsLotDetailPage.js +10 -6
  524. package/dist/modules/wms/components/backend/WmsLotDetailPage.js.map +2 -2
  525. package/dist/modules/wms/components/backend/WmsLotsListPage.js +0 -1
  526. package/dist/modules/wms/components/backend/WmsLotsListPage.js.map +2 -2
  527. package/dist/modules/wms/components/backend/WmsOperationalDashboardPage.js +11 -7
  528. package/dist/modules/wms/components/backend/WmsOperationalDashboardPage.js.map +2 -2
  529. package/dist/modules/wms/components/backend/WmsSkuDetailPage.js +10 -6
  530. package/dist/modules/wms/components/backend/WmsSkuDetailPage.js.map +2 -2
  531. package/dist/modules/wms/components/backend/inventoryMutationLoaders.js +20 -27
  532. package/dist/modules/wms/components/backend/inventoryMutationLoaders.js.map +2 -2
  533. package/dist/modules/workflows/backend/definitions/page.js +1 -3
  534. package/dist/modules/workflows/backend/definitions/page.js.map +2 -2
  535. package/dist/modules/workflows/backend/events/page.js +1 -3
  536. package/dist/modules/workflows/backend/events/page.js.map +2 -2
  537. package/dist/modules/workflows/backend/instances/page.js +1 -3
  538. package/dist/modules/workflows/backend/instances/page.js.map +2 -2
  539. package/dist/modules/workflows/backend/tasks/page.js +1 -3
  540. package/dist/modules/workflows/backend/tasks/page.js.map +2 -2
  541. package/dist/modules/workflows/lib/activity-executor.js +0 -4
  542. package/dist/modules/workflows/lib/activity-executor.js.map +2 -2
  543. package/package.json +10 -9
  544. package/src/helpers/integration/api.ts +1 -33
  545. package/src/helpers/integration/communicationChannelsFixtures.ts +1 -69
  546. package/src/modules/api_keys/api/keys/route.ts +1 -3
  547. package/src/modules/api_keys/backend/api-keys/page.tsx +1 -4
  548. package/src/modules/attachments/AGENTS.md +0 -15
  549. package/src/modules/attachments/api/route.ts +2 -2
  550. package/src/modules/attachments/components/AttachmentLibrary.tsx +0 -3
  551. package/src/modules/attachments/di.ts +0 -16
  552. package/src/modules/attachments/i18n/de.json +0 -5
  553. package/src/modules/attachments/i18n/en.json +0 -5
  554. package/src/modules/attachments/i18n/es.json +0 -5
  555. package/src/modules/attachments/i18n/ko.json +0 -5
  556. package/src/modules/attachments/i18n/pl.json +0 -5
  557. package/src/modules/attachments/index.ts +0 -10
  558. package/src/modules/attachments/lib/scoped-upload-service.ts +0 -46
  559. package/src/modules/attachments/lib/upload-limits.ts +2 -6
  560. package/src/modules/audit_logs/backend/audit-logs/page.tsx +0 -8
  561. package/src/modules/audit_logs/lib/display-helpers.tsx +32 -42
  562. package/src/modules/audit_logs/services/actionLogService.ts +11 -74
  563. package/src/modules/auth/acl.ts +6 -30
  564. package/src/modules/auth/api/feature-check.ts +3 -10
  565. package/src/modules/auth/api/login.ts +24 -9
  566. package/src/modules/auth/api/roles/acl/route.ts +39 -42
  567. package/src/modules/auth/api/routeError.ts +30 -0
  568. package/src/modules/auth/api/session/refresh.ts +1 -32
  569. package/src/modules/auth/api/users/acl/route.ts +101 -185
  570. package/src/modules/auth/api/users/route.ts +5 -18
  571. package/src/modules/auth/backend/roles/[id]/edit/page.meta.ts +2 -5
  572. package/src/modules/auth/backend/roles/page.tsx +2 -4
  573. package/src/modules/auth/backend/users/[id]/edit/page.meta.ts +2 -5
  574. package/src/modules/auth/backend/users/page.tsx +2 -3
  575. package/src/modules/auth/components/AclEditor.tsx +33 -63
  576. package/src/modules/auth/data/entities.ts +1 -4
  577. package/src/modules/auth/data/validators.ts +0 -5
  578. package/src/modules/auth/di.ts +16 -46
  579. package/src/modules/auth/frontend/reset/[token]/page.tsx +0 -74
  580. package/src/modules/auth/i18n/de.json +0 -389
  581. package/src/modules/auth/i18n/en.json +0 -389
  582. package/src/modules/auth/i18n/es.json +0 -389
  583. package/src/modules/auth/i18n/ko.json +0 -389
  584. package/src/modules/auth/i18n/pl.json +2 -391
  585. package/src/modules/auth/lib/grantChecks.ts +0 -6
  586. package/src/modules/auth/services/authService.ts +2 -18
  587. package/src/modules/auth/services/rbacService.ts +24 -110
  588. package/src/modules/business_rules/backend/logs/page.tsx +1 -4
  589. package/src/modules/business_rules/backend/rules/[id]/page.meta.ts +5 -0
  590. package/src/modules/business_rules/backend/rules/create/page.meta.ts +5 -1
  591. package/src/modules/business_rules/backend/rules/page.tsx +1 -4
  592. package/src/modules/business_rules/backend/sets/[id]/page.meta.ts +5 -0
  593. package/src/modules/business_rules/backend/sets/create/page.meta.ts +5 -1
  594. package/src/modules/business_rules/backend/sets/page.tsx +1 -4
  595. package/src/modules/business_rules/lib/expression-evaluator.ts +9 -9
  596. package/src/modules/business_rules/lib/rule-evaluator.ts +9 -10
  597. package/src/modules/catalog/ai-agents.ts +1 -1
  598. package/src/modules/catalog/ai-tools/merchandising-pack.ts +2 -2
  599. package/src/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.tsx +5 -12
  600. package/src/modules/catalog/components/categories/CategoriesDataTable.tsx +0 -3
  601. package/src/modules/catalog/components/products/ProductsDataTable.tsx +0 -7
  602. package/src/modules/catalog/i18n/de.json +0 -1
  603. package/src/modules/catalog/i18n/en.json +0 -1
  604. package/src/modules/catalog/i18n/es.json +0 -1
  605. package/src/modules/catalog/i18n/ko.json +0 -1
  606. package/src/modules/catalog/i18n/pl.json +0 -1
  607. package/src/modules/catalog/widgets/injection/merchandising-assistant-trigger/widget.client.tsx +0 -4
  608. package/src/modules/communication_channels/api/post/channels/[id]/test-send/route.ts +1 -17
  609. package/src/modules/communication_channels/api/post/test-seed/route.ts +16 -155
  610. package/src/modules/communication_channels/backend/communication_channels/channels/page.tsx +0 -4
  611. package/src/modules/communication_channels/commands/ingest-inbound-message.ts +1 -38
  612. package/src/modules/communication_channels/di.ts +0 -7
  613. package/src/modules/communication_channels/lib/adapter.ts +0 -14
  614. package/src/modules/communication_channels/lib/email-capabilities.ts +0 -4
  615. package/src/modules/communication_channels/lib/test-seed.ts +4 -64
  616. package/src/modules/configs/i18n/de.json +0 -2
  617. package/src/modules/configs/i18n/en.json +0 -2
  618. package/src/modules/configs/i18n/es.json +0 -2
  619. package/src/modules/configs/i18n/ko.json +0 -2
  620. package/src/modules/configs/i18n/pl.json +0 -2
  621. package/src/modules/configs/lib/system-status.ts +0 -9
  622. package/src/modules/currencies/backend/currencies/page.tsx +1 -4
  623. package/src/modules/currencies/backend/exchange-rates/page.tsx +1 -4
  624. package/src/modules/customer_accounts/api/admin/domain-mappings.ts +0 -7
  625. package/src/modules/customer_accounts/backend/customer_accounts/roles/page.tsx +1 -4
  626. package/src/modules/customer_accounts/backend/customer_accounts/settings/CustomerAccountsSettingsPageClient.tsx +138 -0
  627. package/src/modules/customer_accounts/backend/customer_accounts/settings/page.tsx +8 -132
  628. package/src/modules/customer_accounts/backend/customer_accounts/users/PortalUsersPageClient.tsx +598 -0
  629. package/src/modules/customer_accounts/backend/customer_accounts/users/[id]/PortalUserDetailPageClient.tsx +838 -0
  630. package/src/modules/customer_accounts/backend/customer_accounts/users/[id]/page.tsx +6 -838
  631. package/src/modules/customer_accounts/backend/customer_accounts/users/page.tsx +6 -590
  632. package/src/modules/customer_accounts/extension-points.ts +1 -1
  633. package/src/modules/customer_accounts/lib/portalUrl.ts +112 -0
  634. package/src/modules/customer_accounts/services/domainMappingService.ts +0 -10
  635. package/src/modules/customers/ai-tools/companies-pack.ts +1 -4
  636. package/src/modules/customers/ai-tools/deal-analyzer-pack.ts +2 -17
  637. package/src/modules/customers/ai-tools/deals-pack.ts +1 -66
  638. package/src/modules/customers/ai-tools/people-pack.ts +1 -4
  639. package/src/modules/customers/api/activities/route.ts +0 -45
  640. package/src/modules/customers/api/companies/[id]/people/route.ts +73 -24
  641. package/src/modules/customers/api/companies/[id]/route.ts +107 -24
  642. package/src/modules/customers/api/dashboard/widgets/customer-todos/route.ts +8 -16
  643. package/src/modules/customers/api/deals/[id]/companies/route.ts +1 -4
  644. package/src/modules/customers/api/deals/[id]/people/route.ts +1 -4
  645. package/src/modules/customers/api/deals/[id]/route.ts +28 -17
  646. package/src/modules/customers/api/deals/[id]/stats/route.ts +25 -10
  647. package/src/modules/customers/api/deals/aggregate/route.ts +4 -14
  648. package/src/modules/customers/api/deals/map/route.ts +0 -1
  649. package/src/modules/customers/api/deals/route.ts +1 -50
  650. package/src/modules/customers/api/entity-roles-factory.ts +4 -8
  651. package/src/modules/customers/api/interactions/route.ts +2 -8
  652. package/src/modules/customers/api/interactions/tasks/route.ts +1 -24
  653. package/src/modules/customers/api/people/[id]/companies/[linkId]/route.ts +4 -12
  654. package/src/modules/customers/api/people/[id]/companies/context.ts +1 -4
  655. package/src/modules/customers/api/people/[id]/companies/enriched/route.ts +1 -4
  656. package/src/modules/customers/api/people/[id]/route.ts +11 -16
  657. package/src/modules/customers/api/people/check-phone/route.ts +10 -75
  658. package/src/modules/customers/api/todos/route.ts +2 -27
  659. package/src/modules/customers/backend/customers/companies/page.tsx +4 -7
  660. package/src/modules/customers/backend/customers/deals/[id]/page.tsx +2 -7
  661. package/src/modules/customers/backend/customers/deals/page.tsx +4 -10
  662. package/src/modules/customers/backend/customers/deals/pipeline/components/Lane.tsx +14 -5
  663. package/src/modules/customers/backend/customers/deals/pipeline/components/StatusFilterPopover.tsx +27 -109
  664. package/src/modules/customers/backend/customers/people/page.tsx +4 -7
  665. package/src/modules/customers/backend/hooks/useEmailDuplicateCheck.ts +4 -12
  666. package/src/modules/customers/commands/deals.ts +59 -34
  667. package/src/modules/customers/commands/interactions.ts +1 -1
  668. package/src/modules/customers/commands/personCompanyLinks.ts +8 -224
  669. package/src/modules/customers/components/CustomerTodosTable.tsx +0 -2
  670. package/src/modules/customers/components/DealsKpiStrip.tsx +7 -7
  671. package/src/modules/customers/components/calendar/AgendaList.tsx +3 -3
  672. package/src/modules/customers/components/calendar/CalendarEventEditor.tsx +1 -1
  673. package/src/modules/customers/components/calendar/CalendarScreen.tsx +1 -1
  674. package/src/modules/customers/components/calendar/CalendarSettingsModal.tsx +1 -1
  675. package/src/modules/customers/components/calendar/EventBlock.tsx +2 -2
  676. package/src/modules/customers/components/calendar/EventPeekPopover.tsx +2 -4
  677. package/src/modules/customers/components/calendar/editor/PeopleField.tsx +5 -61
  678. package/src/modules/customers/components/calendar/editor/hooks.ts +1 -7
  679. package/src/modules/customers/components/calendar/types.ts +2 -2
  680. package/src/modules/customers/components/detail/AssignRoleDialog.tsx +12 -7
  681. package/src/modules/customers/components/detail/CompanyKpiBar.tsx +4 -5
  682. package/src/modules/customers/components/detail/CompanyPeopleSection.tsx +1 -8
  683. package/src/modules/customers/components/detail/DealForm.tsx +2 -22
  684. package/src/modules/customers/components/detail/DealsSection.tsx +5 -11
  685. package/src/modules/customers/components/detail/EntityTagsDialog.tsx +12 -58
  686. package/src/modules/customers/components/detail/PersonCompaniesSection.tsx +1 -8
  687. package/src/modules/customers/components/detail/hooks/usePersonTasks.ts +14 -23
  688. package/src/modules/customers/components/detail/schedule/ParticipantsField.tsx +5 -5
  689. package/src/modules/customers/components/detail/schedule/useScheduleFormState.ts +5 -5
  690. package/src/modules/customers/components/detail/types.ts +1 -1
  691. package/src/modules/customers/components/detail/utils.ts +5 -15
  692. package/src/modules/customers/data/entities.ts +1 -1
  693. package/src/modules/customers/data/validators.ts +9 -50
  694. package/src/modules/customers/events.ts +0 -5
  695. package/src/modules/customers/i18n/de.json +1 -9
  696. package/src/modules/customers/i18n/en.json +1 -9
  697. package/src/modules/customers/i18n/es.json +1 -9
  698. package/src/modules/customers/i18n/ko.json +1 -9
  699. package/src/modules/customers/i18n/pl.json +1 -9
  700. package/src/modules/customers/lib/calendar/conflicts.ts +2 -10
  701. package/src/modules/customers/lib/calendar/editorPayload.ts +3 -4
  702. package/src/modules/customers/lib/calendar/mapItem.ts +3 -8
  703. package/src/modules/customers/lib/dealStatus.ts +0 -42
  704. package/src/modules/customers/lib/findPeopleByAddresses.ts +6 -8
  705. package/src/modules/customers/lib/personCompanies.ts +1 -136
  706. package/src/modules/customers/lib/todoCompatibility.ts +1 -19
  707. package/src/modules/dashboards/i18n/es.json +4 -4
  708. package/src/modules/dashboards/i18n/pl.json +7 -7
  709. package/src/modules/dashboards/lib/widgetScope.ts +0 -6
  710. package/src/modules/data_sync/AGENTS.md +1 -1
  711. package/src/modules/data_sync/backend/data-sync/page.tsx +1 -4
  712. package/src/modules/data_sync/lib/adapter.ts +0 -36
  713. package/src/modules/data_sync/lib/sync-engine.ts +5 -113
  714. package/src/modules/data_sync/workers/sync-export.ts +0 -4
  715. package/src/modules/data_sync/workers/sync-import.ts +0 -4
  716. package/src/modules/devices/AGENTS.md +1 -20
  717. package/src/modules/devices/acl.ts +1 -9
  718. package/src/modules/devices/api/admin/devices/[id]/route.ts +34 -5
  719. package/src/modules/devices/api/admin/devices/route.ts +1 -14
  720. package/src/modules/devices/api/deviceList.ts +11 -135
  721. package/src/modules/devices/api/openapi.ts +1 -9
  722. package/src/modules/devices/api/route.ts +1 -9
  723. package/src/modules/devices/backend/devices/[id]/page.tsx +32 -18
  724. package/src/modules/devices/backend/devices/create/page.tsx +1 -17
  725. package/src/modules/devices/backend/devices/page.tsx +45 -44
  726. package/src/modules/devices/i18n/de.json +2 -3
  727. package/src/modules/devices/i18n/en.json +2 -3
  728. package/src/modules/devices/i18n/es.json +2 -3
  729. package/src/modules/devices/i18n/ko.json +2 -3
  730. package/src/modules/devices/i18n/pl.json +2 -3
  731. package/src/modules/devices/setup.ts +2 -6
  732. package/src/modules/directory/backend/directory/organizations/page.tsx +1 -3
  733. package/src/modules/directory/backend/directory/tenants/page.tsx +1 -3
  734. package/src/modules/directory/di.ts +2 -14
  735. package/src/modules/directory/utils/organizationScope.ts +15 -4
  736. package/src/modules/entities/api/records.ts +0 -2
  737. package/src/modules/entities/backend/entities/user/[entityId]/records/page.tsx +1 -4
  738. package/src/modules/eudr/api/plots/route.ts +0 -4
  739. package/src/modules/eudr/backend/eudr/evidence-submissions/[id]/page.meta.ts +2 -0
  740. package/src/modules/eudr/backend/eudr/evidence-submissions/create/page.meta.ts +1 -0
  741. package/src/modules/eudr/backend/eudr/evidence-submissions/page.meta.ts +4 -1
  742. package/src/modules/eudr/backend/eudr/evidence-submissions/page.tsx +0 -4
  743. package/src/modules/eudr/backend/eudr/page.meta.ts +2 -2
  744. package/src/modules/eudr/backend/eudr/plots/[id]/page.meta.ts +2 -0
  745. package/src/modules/eudr/backend/eudr/plots/[id]/page.tsx +8 -2
  746. package/src/modules/eudr/backend/eudr/plots/create/page.meta.ts +1 -0
  747. package/src/modules/eudr/backend/eudr/plots/create/page.tsx +8 -2
  748. package/src/modules/eudr/backend/eudr/plots/page.meta.ts +4 -1
  749. package/src/modules/eudr/backend/eudr/plots/page.tsx +0 -4
  750. package/src/modules/eudr/backend/eudr/product-mappings/[id]/page.meta.ts +2 -0
  751. package/src/modules/eudr/backend/eudr/product-mappings/create/page.meta.ts +1 -0
  752. package/src/modules/eudr/backend/eudr/product-mappings/page.meta.ts +4 -1
  753. package/src/modules/eudr/backend/eudr/product-mappings/page.tsx +0 -4
  754. package/src/modules/eudr/backend/eudr/risk-assessments/[id]/page.meta.ts +2 -0
  755. package/src/modules/eudr/backend/eudr/risk-assessments/create/page.meta.ts +1 -0
  756. package/src/modules/eudr/backend/eudr/risk-assessments/page.meta.ts +4 -1
  757. package/src/modules/eudr/backend/eudr/risk-assessments/page.tsx +0 -4
  758. package/src/modules/eudr/backend/eudr/statements/[id]/page.meta.ts +2 -0
  759. package/src/modules/eudr/backend/eudr/statements/[id]/page.tsx +2 -0
  760. package/src/modules/eudr/backend/eudr/statements/create/page.meta.ts +1 -0
  761. package/src/modules/eudr/backend/eudr/statements/page.meta.ts +4 -1
  762. package/src/modules/eudr/backend/eudr/statements/page.tsx +32 -30
  763. package/src/modules/eudr/commands/statements.ts +7 -2
  764. package/src/modules/eudr/components/crudErrorI18n.ts +31 -0
  765. package/src/modules/eudr/components/formConfig.tsx +9 -1
  766. package/src/modules/eudr/data/validators.ts +1 -16
  767. package/src/modules/eudr/i18n/de.json +3 -2
  768. package/src/modules/eudr/i18n/en.json +3 -2
  769. package/src/modules/eudr/i18n/es.json +3 -2
  770. package/src/modules/eudr/i18n/ko.json +3 -2
  771. package/src/modules/eudr/i18n/pl.json +3 -2
  772. package/src/modules/eudr/lib/statement-lifecycle.ts +8 -0
  773. package/src/modules/feature_toggles/components/FeatureTogglesTable.tsx +1 -2
  774. package/src/modules/feature_toggles/components/OverridesTable.tsx +1 -2
  775. package/src/modules/feature_toggles/defaults.json +8 -0
  776. package/src/modules/inbox_ops/backend/inbox-ops/log/page.tsx +0 -4
  777. package/src/modules/inbox_ops/backend/inbox-ops/page.tsx +0 -4
  778. package/src/modules/inbox_ops/lib/htmlToPlainText.ts +17 -1
  779. package/src/modules/integrations/api/[id]/credentials/route.ts +4 -6
  780. package/src/modules/integrations/backend/integrations/[id]/page.tsx +31 -61
  781. package/src/modules/integrations/backend/integrations/bundle/[id]/page.tsx +9 -44
  782. package/src/modules/integrations/data/validators.ts +2 -12
  783. package/src/modules/integrations/i18n/de.json +0 -1
  784. package/src/modules/integrations/i18n/en.json +0 -1
  785. package/src/modules/integrations/i18n/es.json +0 -1
  786. package/src/modules/integrations/i18n/ko.json +0 -1
  787. package/src/modules/integrations/i18n/pl.json +0 -1
  788. package/src/modules/integrations/lib/credentials-masking.ts +6 -10
  789. package/src/modules/messages/api/[id]/route.ts +1 -55
  790. package/src/modules/messages/api/openapi.ts +0 -20
  791. package/src/modules/messages/api/route.ts +2 -31
  792. package/src/modules/messages/components/MessagesInboxPageClient.tsx +16 -9
  793. package/src/modules/messages/components/inboxFilters.ts +0 -36
  794. package/src/modules/messages/components/message-detail/hooks/useMessageDetailsConversation.ts +1 -14
  795. package/src/modules/messages/components/message-detail/panels/MessageHeader.tsx +1 -3
  796. package/src/modules/messages/components/message-detail/panels/thread-panel.tsx +1 -2
  797. package/src/modules/messages/components/message-detail/types.ts +0 -3
  798. package/src/modules/messages/components/messageListLabels.ts +3 -52
  799. package/src/modules/messages/data/validators.ts +4 -43
  800. package/src/modules/payment_gateways/api/webhook/[provider]/route.ts +6 -4
  801. package/src/modules/payment_gateways/backend/payment-gateways/page.tsx +1 -4
  802. package/src/modules/payment_gateways/lib/webhook-processor.ts +0 -11
  803. package/src/modules/planner/backend/planner/availability-rulesets/page.tsx +0 -4
  804. package/src/modules/push_notifications/backend/push_notifications/page.tsx +1 -4
  805. package/src/modules/push_notifications/backend/push_notifications/send/page.tsx +4 -4
  806. package/src/modules/query_index/lib/engine.ts +61 -249
  807. package/src/modules/query_index/lib/search-tokens.ts +3 -135
  808. package/src/modules/resources/backend/resources/resource-types/page.tsx +1 -4
  809. package/src/modules/resources/backend/resources/resources/page.tsx +1 -4
  810. package/src/modules/sales/backend/sales/channels/offers/page.tsx +0 -4
  811. package/src/modules/sales/backend/sales/channels/page.tsx +0 -4
  812. package/src/modules/sales/backend/sales/documents/[id]/page.tsx +8 -14
  813. package/src/modules/sales/commands/documents.ts +0 -93
  814. package/src/modules/sales/components/PriceWithCurrency.tsx +5 -17
  815. package/src/modules/sales/components/channels/SalesChannelOffersPanel.tsx +0 -4
  816. package/src/modules/sales/components/documents/AdjustmentsSection.tsx +5 -6
  817. package/src/modules/sales/components/documents/ItemsSection.tsx +18 -56
  818. package/src/modules/sales/components/documents/LineItemDialog.tsx +21 -138
  819. package/src/modules/sales/components/documents/PaymentsSection.tsx +9 -20
  820. package/src/modules/sales/components/documents/ReturnsSection.tsx +5 -6
  821. package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +14 -106
  822. package/src/modules/sales/components/documents/SalesOrderDraftLines.tsx +5 -6
  823. package/src/modules/sales/components/documents/ShipmentDialog.tsx +4 -5
  824. package/src/modules/sales/components/documents/ShipmentsSection.tsx +5 -6
  825. package/src/modules/sales/components/documents/lineItemUtils.ts +2 -7
  826. package/src/modules/sales/data/entities.ts +0 -6
  827. package/src/modules/sales/extension-points.ts +0 -1
  828. package/src/modules/sales/i18n/de.json +37 -8
  829. package/src/modules/sales/i18n/en.json +37 -8
  830. package/src/modules/sales/i18n/es.json +37 -8
  831. package/src/modules/sales/i18n/ko.json +37 -8
  832. package/src/modules/sales/i18n/pl.json +37 -8
  833. package/src/modules/sales/migrations/.snapshot-open-mercato.json +0 -60
  834. package/src/modules/sales/setup.ts +0 -2
  835. package/src/modules/sales/widgets/injection/document-history/widget.client.tsx +42 -2
  836. package/src/modules/sales/widgets/injection/payment-gateway-status-column/widget.ts +1 -9
  837. package/src/modules/sales/widgets/injection-table.ts +7 -4
  838. package/src/modules/staff/backend/staff/leave-requests/page.tsx +0 -4
  839. package/src/modules/staff/backend/staff/my-leave-requests/page.tsx +0 -4
  840. package/src/modules/staff/backend/staff/team-members/page.tsx +0 -6
  841. package/src/modules/staff/backend/staff/team-roles/page.tsx +0 -4
  842. package/src/modules/staff/backend/staff/teams/[id]/edit/page.tsx +0 -4
  843. package/src/modules/staff/backend/staff/teams/page.tsx +0 -4
  844. package/src/modules/staff/backend/staff/timesheets/page.tsx +1 -12
  845. package/src/modules/staff/backend/staff/timesheets/projects/page.tsx +0 -4
  846. package/src/modules/sync_excel/lib/adapters/customers.ts +0 -5
  847. package/src/modules/warranty_claims/api/assignees/route.ts +3 -3
  848. package/src/modules/warranty_claims/api/portal/attachments/route.ts +2 -2
  849. package/src/modules/warranty_claims/api/portal/claims/route.ts +9 -12
  850. package/src/modules/warranty_claims/backend/page.tsx +0 -4
  851. package/src/modules/warranty_claims/backend/warranty_claims/registrations/page.tsx +0 -4
  852. package/src/modules/warranty_claims/backend/warranty_claims/troubleshooting-guides/page.tsx +0 -4
  853. package/src/modules/warranty_claims/backend/warranty_claims/vendor-policies/page.tsx +0 -4
  854. package/src/modules/warranty_claims/frontend/[orgSlug]/portal/claims/page.tsx +0 -4
  855. package/src/modules/wms/api/warehouses/route.ts +9 -13
  856. package/src/modules/wms/api/zones/route.ts +0 -16
  857. package/src/modules/wms/commands/configuration.ts +10 -159
  858. package/src/modules/wms/commands/inventory-actions.ts +0 -3
  859. package/src/modules/wms/commands/shared.ts +0 -17
  860. package/src/modules/wms/components/backend/WmsConfigurationPage.tsx +141 -95
  861. package/src/modules/wms/components/backend/WmsInventoryConsolePage.tsx +0 -2
  862. package/src/modules/wms/components/backend/WmsLocationDetailPage.tsx +30 -26
  863. package/src/modules/wms/components/backend/WmsLotDetailPage.tsx +21 -17
  864. package/src/modules/wms/components/backend/WmsLotsListPage.tsx +0 -2
  865. package/src/modules/wms/components/backend/WmsOperationalDashboardPage.tsx +17 -13
  866. package/src/modules/wms/components/backend/WmsSkuDetailPage.tsx +16 -12
  867. package/src/modules/wms/components/backend/inventoryMutationLoaders.ts +20 -36
  868. package/src/modules/wms/i18n/de.json +0 -2
  869. package/src/modules/wms/i18n/en.json +0 -2
  870. package/src/modules/wms/i18n/es.json +0 -2
  871. package/src/modules/wms/i18n/ko.json +0 -2
  872. package/src/modules/wms/i18n/pl.json +0 -2
  873. package/src/modules/workflows/backend/definitions/page.tsx +1 -4
  874. package/src/modules/workflows/backend/events/page.tsx +1 -4
  875. package/src/modules/workflows/backend/instances/page.tsx +1 -4
  876. package/src/modules/workflows/backend/tasks/page.tsx +1 -4
  877. package/src/modules/workflows/lib/activity-executor.ts +0 -9
  878. package/dist/modules/api_keys/di.js +0 -9
  879. package/dist/modules/api_keys/di.js.map +0 -7
  880. package/dist/modules/api_keys/services/principalService.js +0 -31
  881. package/dist/modules/api_keys/services/principalService.js.map +0 -7
  882. package/dist/modules/attachments/lib/attachment-service.js +0 -313
  883. package/dist/modules/attachments/lib/attachment-service.js.map +0 -7
  884. package/dist/modules/auth/api/reset/validate.js +0 -55
  885. package/dist/modules/auth/api/reset/validate.js.map +0 -7
  886. package/dist/modules/auth/commands/acl.js +0 -254
  887. package/dist/modules/auth/commands/acl.js.map +0 -7
  888. package/dist/modules/auth/lib/userIdFilter.js +0 -16
  889. package/dist/modules/auth/lib/userIdFilter.js.map +0 -7
  890. package/dist/modules/auth/services/principalService.js +0 -200
  891. package/dist/modules/auth/services/principalService.js.map +0 -7
  892. package/dist/modules/auth/services/roleOrganizationScope.js +0 -41
  893. package/dist/modules/auth/services/roleOrganizationScope.js.map +0 -7
  894. package/dist/modules/communication_channels/lib/outbound-recipient.js +0 -33
  895. package/dist/modules/communication_channels/lib/outbound-recipient.js.map +0 -7
  896. package/dist/modules/communication_channels/lib/resolve-channel-type.js +0 -51
  897. package/dist/modules/communication_channels/lib/resolve-channel-type.js.map +0 -7
  898. package/dist/modules/customers/backend/customers/deals/pipeline/components/toneClasses.js +0 -18
  899. package/dist/modules/customers/backend/customers/deals/pipeline/components/toneClasses.js.map +0 -7
  900. package/dist/modules/customers/lib/calendar/participantIdentity.js +0 -9
  901. package/dist/modules/customers/lib/calendar/participantIdentity.js.map +0 -7
  902. package/dist/modules/customers/lib/closureStage.js +0 -45
  903. package/dist/modules/customers/lib/closureStage.js.map +0 -7
  904. package/dist/modules/customers/lib/detailReadAccess.js +0 -12
  905. package/dist/modules/customers/lib/detailReadAccess.js.map +0 -7
  906. package/dist/modules/data_sync/lib/abandoned-run.js +0 -19
  907. package/dist/modules/data_sync/lib/abandoned-run.js.map +0 -7
  908. package/dist/modules/devices/api/deviceSerialization.js +0 -46
  909. package/dist/modules/devices/api/deviceSerialization.js.map +0 -7
  910. package/dist/modules/devices/backend/devices/useDeviceUserLabels.js +0 -34
  911. package/dist/modules/devices/backend/devices/useDeviceUserLabels.js.map +0 -7
  912. package/dist/modules/devices/backend/devices/userOptions.js +0 -52
  913. package/dist/modules/devices/backend/devices/userOptions.js.map +0 -7
  914. package/dist/modules/directory/services/organizationHierarchyService.js +0 -29
  915. package/dist/modules/directory/services/organizationHierarchyService.js.map +0 -7
  916. package/dist/modules/directory/services/organizationScopeService.js +0 -56
  917. package/dist/modules/directory/services/organizationScopeService.js.map +0 -7
  918. package/dist/modules/integrations/backend/integrations/credential-secret-fields.js +0 -55
  919. package/dist/modules/integrations/backend/integrations/credential-secret-fields.js.map +0 -7
  920. package/dist/modules/messages/lib/channel-sender-identity.js +0 -26
  921. package/dist/modules/messages/lib/channel-sender-identity.js.map +0 -7
  922. package/dist/modules/messages/lib/composeSourceChannelType.js +0 -41
  923. package/dist/modules/messages/lib/composeSourceChannelType.js.map +0 -7
  924. package/dist/modules/query_index/lib/search-entity-policy.js +0 -14
  925. package/dist/modules/query_index/lib/search-entity-policy.js.map +0 -7
  926. package/dist/modules/sales/components/documents/lineItemShipmentLock.js +0 -54
  927. package/dist/modules/sales/components/documents/lineItemShipmentLock.js.map +0 -7
  928. package/dist/modules/sales/lib/salesChannelsToggleSeed.js +0 -33
  929. package/dist/modules/sales/lib/salesChannelsToggleSeed.js.map +0 -7
  930. package/dist/modules/sales/migrations/Migration20260821120000_sales_notes_addresses_context_idx.js +0 -32
  931. package/dist/modules/sales/migrations/Migration20260821120000_sales_notes_addresses_context_idx.js.map +0 -7
  932. package/dist/modules/wms/api/warehouseSearch.js +0 -21
  933. package/dist/modules/wms/api/warehouseSearch.js.map +0 -7
  934. package/dist/modules/wms/components/backend/WarehouseEditDialog.js +0 -158
  935. package/dist/modules/wms/components/backend/WarehouseEditDialog.js.map +0 -7
  936. package/dist/modules/wms/components/backend/warehouseFormOptions.js +0 -66
  937. package/dist/modules/wms/components/backend/warehouseFormOptions.js.map +0 -7
  938. package/src/modules/api_keys/di.ts +0 -7
  939. package/src/modules/api_keys/services/principalService.ts +0 -33
  940. package/src/modules/attachments/lib/attachment-service.ts +0 -468
  941. package/src/modules/auth/api/reset/validate.ts +0 -57
  942. package/src/modules/auth/commands/acl.ts +0 -495
  943. package/src/modules/auth/lib/userIdFilter.ts +0 -31
  944. package/src/modules/auth/services/principalService.ts +0 -266
  945. package/src/modules/auth/services/roleOrganizationScope.ts +0 -70
  946. package/src/modules/communication_channels/lib/outbound-recipient.ts +0 -71
  947. package/src/modules/communication_channels/lib/resolve-channel-type.ts +0 -99
  948. package/src/modules/customers/backend/customers/deals/pipeline/components/toneClasses.ts +0 -21
  949. package/src/modules/customers/lib/calendar/participantIdentity.ts +0 -17
  950. package/src/modules/customers/lib/closureStage.ts +0 -76
  951. package/src/modules/customers/lib/detailReadAccess.ts +0 -35
  952. package/src/modules/data_sync/lib/abandoned-run.ts +0 -56
  953. package/src/modules/devices/api/deviceSerialization.ts +0 -50
  954. package/src/modules/devices/backend/devices/useDeviceUserLabels.ts +0 -45
  955. package/src/modules/devices/backend/devices/userOptions.ts +0 -99
  956. package/src/modules/directory/services/organizationHierarchyService.ts +0 -34
  957. package/src/modules/directory/services/organizationScopeService.ts +0 -85
  958. package/src/modules/integrations/backend/integrations/credential-secret-fields.ts +0 -84
  959. package/src/modules/messages/lib/channel-sender-identity.ts +0 -55
  960. package/src/modules/messages/lib/composeSourceChannelType.ts +0 -95
  961. package/src/modules/query_index/lib/search-entity-policy.ts +0 -46
  962. package/src/modules/sales/components/documents/lineItemShipmentLock.ts +0 -74
  963. package/src/modules/sales/lib/salesChannelsToggleSeed.ts +0 -42
  964. package/src/modules/sales/migrations/Migration20260821120000_sales_notes_addresses_context_idx.ts +0 -87
  965. package/src/modules/wms/api/warehouseSearch.ts +0 -23
  966. package/src/modules/wms/components/backend/WarehouseEditDialog.tsx +0 -216
  967. package/src/modules/wms/components/backend/warehouseFormOptions.ts +0 -72
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../src/modules/customers/backend/customers/deals/pipeline/components/Lane.tsx"],
4
- "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { useDroppable } from '@dnd-kit/core'\nimport { EmptyState } from '@open-mercato/ui/primitives/empty-state'\nimport type { RowActionItem } from '@open-mercato/ui/backend/RowActions'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { translateWithFallback } from '@open-mercato/shared/lib/i18n/translate'\nimport type { FilterOptionTone } from '@open-mercato/shared/lib/query/advanced-filter'\nimport { toneToDotClass } from './toneClasses'\nimport { DealCard, type DealCardData } from './DealCard'\nimport { DashedTileButton } from './DashedTileButton'\nimport { LANE_WIDTH_PX } from './constants'\nimport { LaneCurrencyBreakdown } from './LaneCurrencyBreakdown'\nimport { LaneResizeHandle } from './LaneResizeHandle'\n\nexport type LaneStage = {\n id: string\n label: string\n tone: FilterOptionTone | null\n}\n\nexport type LaneAggregateProp = {\n count: number\n totalInBaseCurrency: number\n byCurrency: Array<{ currency: string; total: number; count: number }>\n baseCurrencyCode: string | null\n /** `true` when every currency in `byCurrency` was convertible to the base currency. */\n convertedAll: boolean\n /** Currencies present in `byCurrency` that lack an FX rate to base \u2014 excluded from totals. */\n missingRateCurrencies: string[]\n}\n\ntype LaneProps = {\n stage: LaneStage\n deals: DealCardData[]\n /** Server-side aggregate for accurate counts/totals across all deals in this stage, not just loaded ones */\n aggregate?: LaneAggregateProp | null\n selectedDealIds: Set<string>\n buildMenuItems: (deal: DealCardData) => RowActionItem[]\n activeDragDealId?: string | null\n isLoadingMore?: boolean\n /** Pixel width override (when the user has resized the column). Falls back to the default class. */\n width?: number | null\n onToggleSelect: (dealId: string) => void\n onComposeActivity: (dealId: string, type: 'call' | 'email' | 'note') => void\n onOpenDetail: (dealId: string) => void\n onQuickAddClick: (stageId: string) => void\n onLoadMore?: (stageId: string) => void\n /** Drag-resize callbacks. When provided, a vertical drag handle is rendered on the lane edge. */\n onResize?: (stageId: string, deltaPx: number) => void\n onResizeEnd?: (stageId: string) => void\n onResetWidth?: (stageId: string) => void\n}\n\n// 4px color bar tone \u2014 saturated icon tokens shared with the status filter pills\n// (toneClasses.ts) so the lane bar and the filter dots stay in lockstep (#5107 review).\nfunction getAccentClass(tone: FilterOptionTone | null): string {\n return toneToDotClass(tone, 'bg-border')\n}\n\n// Count pill bg uses very-light status background, text uses status text color\nconst COUNT_BADGE_TONE_CLASS: Record<FilterOptionTone, string> = {\n success: 'bg-status-success-bg text-status-success-text',\n error: 'bg-status-error-bg text-status-error-text',\n warning: 'bg-status-warning-bg text-status-warning-text',\n info: 'bg-status-info-bg text-status-info-text',\n neutral: 'bg-status-neutral-bg text-status-neutral-text',\n brand: 'bg-brand-violet/14 text-brand-violet',\n pink: 'bg-status-pink-bg text-status-pink-text',\n}\n\nfunction getCountBadgeClass(tone: FilterOptionTone | null): string {\n if (tone && tone in COUNT_BADGE_TONE_CLASS) return COUNT_BADGE_TONE_CLASS[tone]\n return 'bg-muted text-muted-foreground'\n}\n\nfunction compactCurrency(amount: number): string {\n if (amount >= 1_000_000) {\n const value = amount / 1_000_000\n return value >= 100 ? `${Math.round(value)}M` : `${value.toFixed(1).replace(/\\.0$/, '')}M`\n }\n if (amount >= 1_000) {\n const value = amount / 1_000\n return value >= 100 ? `${Math.round(value)}k` : `${value.toFixed(1).replace(/\\.0$/, '')}k`\n }\n return String(Math.round(amount))\n}\n\ntype CurrencyRow = { currency: string; total: number; count: number }\n\ntype LaneStats = {\n count: number\n /** Headline amount and the currency it is denominated in (largest single currency, raw, never converted). */\n primaryAmount: number\n primaryCurrency: string | null\n /** Per-currency rows sorted desc by total \u2014 the popover renders these one per line. */\n rows: CurrencyRow[]\n /** Sum of `rows` converted to base currency (zero when no base is configured / nothing converted). */\n totalInBaseCurrency: number\n baseCurrencyCode: string | null\n convertedAll: boolean\n missingRateCurrencies: string[]\n}\n\n/**\n * Build display stats.\n * - If a server aggregate is provided, prefer it (covers all deals, converts to tenant base currency).\n * - Otherwise fall back to summing loaded deals (used before aggregate query loads).\n *\n * The headline currency on the lane header is intentionally the LARGEST raw currency\n * (not the base-currency converted total) because the converted total can be misleading\n * when FX rates are missing \u2014 operators see a smaller number than the headline suggests.\n * The base-currency converted total is reserved for the breakdown popover footer, where\n * a partial-conversion indicator can disclose what's excluded.\n */\nfunction buildLaneStats(deals: DealCardData[], aggregate?: LaneAggregateProp | null): LaneStats {\n if (aggregate) {\n const rows = aggregate.byCurrency\n // Pick the single currency with the largest raw total to surface in the header. This\n // is always honest: the operator sees the actual largest cluster of value rather than\n // a synthetic base-currency total that may be partial.\n const headline = rows.length > 0 ? rows[0] : null\n return {\n count: aggregate.count,\n primaryAmount: headline ? headline.total : 0,\n primaryCurrency: headline ? headline.currency : null,\n rows,\n totalInBaseCurrency: aggregate.totalInBaseCurrency,\n baseCurrencyCode: aggregate.baseCurrencyCode,\n convertedAll: aggregate.convertedAll,\n missingRateCurrencies: aggregate.missingRateCurrencies,\n }\n }\n const totalsByCurrency = new Map<string, { total: number; count: number }>()\n for (const deal of deals) {\n if (typeof deal.valueAmount !== 'number' || !Number.isFinite(deal.valueAmount)) continue\n const code = deal.valueCurrency && deal.valueCurrency.length === 3\n ? deal.valueCurrency.toUpperCase()\n : 'USD'\n const entry = totalsByCurrency.get(code) ?? { total: 0, count: 0 }\n entry.total += deal.valueAmount\n entry.count += 1\n totalsByCurrency.set(code, entry)\n }\n const rows: CurrencyRow[] = Array.from(totalsByCurrency.entries())\n .map(([currency, value]) => ({ currency, total: value.total, count: value.count }))\n .sort((a, b) => b.total - a.total)\n if (rows.length === 0) {\n return {\n count: deals.length,\n primaryAmount: 0,\n primaryCurrency: null,\n rows,\n totalInBaseCurrency: 0,\n baseCurrencyCode: null,\n convertedAll: true,\n missingRateCurrencies: [],\n }\n }\n return {\n count: deals.length,\n primaryAmount: rows[0].total,\n primaryCurrency: rows[0].currency,\n rows,\n totalInBaseCurrency: 0,\n baseCurrencyCode: null,\n // We don't have rates client-side; mark as \"not converted\" only when there are\n // multiple currencies so the popover can show a \"configure FX rates\" hint.\n convertedAll: rows.length === 1,\n missingRateCurrencies: rows.length > 1 ? rows.slice(1).map((row) => row.currency) : [],\n }\n}\n\nfunction LaneImpl({\n stage,\n deals,\n aggregate,\n selectedDealIds,\n buildMenuItems,\n activeDragDealId,\n isLoadingMore = false,\n width,\n onToggleSelect,\n onComposeActivity,\n onOpenDetail,\n onQuickAddClick,\n onLoadMore,\n onResize,\n onResizeEnd,\n onResetWidth,\n}: LaneProps): React.ReactElement {\n const t = useT()\n const { setNodeRef, isOver } = useDroppable({\n id: `lane:${stage.id}`,\n data: { type: 'lane', stageId: stage.id },\n })\n const isDragActive = !!activeDragDealId\n const sourceLane = isDragActive && deals.some((deal) => deal.id === activeDragDealId)\n // Highlight drop zone when:\n // - the lane has the pointer over it during a drag, OR\n // - any drag is active and this lane is not the source (so all candidate targets are clearly tagged)\n const showDropHighlight = isOver || (isDragActive && !sourceLane)\n const stats = React.useMemo(() => buildLaneStats(deals, aggregate), [deals, aggregate])\n // Pull boolean out of the Set so each DealCard receives a stable primitive \u2014 that lets\n // React.memo on DealCard skip re-renders when the Set reference changes but its emptiness\n // does not. Flipping false\u2192true (first selection) or true\u2192false (last cleared) forces a\n // full pass over the lane's cards so their checkbox visibility updates atomically.\n const bulkSelectionActive = selectedDealIds.size > 0\n const totalLabel = stats.primaryAmount > 0 && stats.primaryCurrency\n ? `${compactCurrency(stats.primaryAmount)} ${stats.primaryCurrency}`\n : null\n const visibleCount = deals.length\n const totalCount = stats.count\n const hasMoreDeals = totalCount > visibleCount\n const accentClass = getAccentClass(stage.tone)\n const countBadgeClass = getCountBadgeClass(stage.tone)\n\n const handleQuickAdd = React.useCallback(() => {\n onQuickAddClick(stage.id)\n }, [onQuickAddClick, stage.id])\n\n return (\n <div\n className=\"relative flex flex-none flex-col gap-3\"\n style={{ width: typeof width === 'number' && Number.isFinite(width) ? `${width}px` : `${LANE_WIDTH_PX}px` }}\n >\n <div className=\"flex flex-col gap-2.5 overflow-clip rounded-lg bg-muted/40 px-4 py-3.5\">\n <div className={`h-1.5 w-full rounded-sm ${accentClass}`} aria-hidden=\"true\" />\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-2.5\">\n <span className=\"truncate text-sm font-bold uppercase leading-normal text-foreground\">\n {stage.label}\n </span>\n <span\n className={`inline-flex shrink-0 items-center rounded-full px-2 py-1 text-xs font-bold leading-normal ${countBadgeClass}`}\n title={\n hasMoreDeals\n ? translateWithFallback(\n t,\n 'customers.deals.kanban.lane.aria.partialCount',\n 'Showing {visible} of {total}',\n { visible: visibleCount, total: totalCount },\n )\n : undefined\n }\n >\n {totalCount}\n </span>\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {totalLabel ? (\n <span className=\"text-sm font-bold leading-normal text-foreground\">\n {totalLabel}\n </span>\n ) : null}\n {stats.rows.length > 1 ? (\n <LaneCurrencyBreakdown\n rows={stats.rows}\n baseCurrencyCode={stats.baseCurrencyCode}\n totalInBaseCurrency={stats.totalInBaseCurrency}\n convertedAll={stats.convertedAll}\n missingRateCurrencies={stats.missingRateCurrencies}\n triggerLabel={`+${stats.rows.length - 1}`}\n headingLabel={stage.label.toUpperCase()}\n headingCount={totalCount}\n />\n ) : null}\n </div>\n </div>\n </div>\n\n <DashedTileButton\n onClick={handleQuickAdd}\n className=\"h-11\"\n ariaLabel={translateWithFallback(\n t,\n 'customers.deals.kanban.lane.aria.quickAdd',\n 'Quickly add a deal to {stage}',\n { stage: stage.label },\n )}\n >\n <span className=\"text-base font-bold leading-none\">+</span>\n <span>{translateWithFallback(t, 'customers.deals.kanban.cta.quickDeal', 'Quick deal')}</span>\n </DashedTileButton>\n\n <div\n ref={setNodeRef}\n className={`flex min-h-[40vh] flex-col gap-3 rounded-lg p-1.5 ${\n isOver\n ? 'bg-accent-indigo/10 outline-dashed outline-2 outline-accent-indigo -outline-offset-[2px]'\n : showDropHighlight\n ? 'bg-muted/40 outline-dashed outline-1 outline-muted-foreground/40 -outline-offset-[2px]'\n : ''\n }`}\n >\n {deals.length === 0 ? (\n <EmptyState\n size=\"sm\"\n title={translateWithFallback(\n t,\n 'customers.deals.kanban.lane.empty',\n 'No deals in this stage yet.',\n )}\n />\n ) : (\n deals.map((deal) => (\n <DealCard\n key={deal.id}\n deal={deal}\n selected={selectedDealIds.has(deal.id)}\n bulkSelectionActive={bulkSelectionActive}\n buildMenuItems={buildMenuItems}\n isActiveDrag={activeDragDealId === deal.id}\n onToggleSelect={onToggleSelect}\n onComposeActivity={onComposeActivity}\n onOpenDetail={onOpenDetail}\n />\n ))\n )}\n {hasMoreDeals && onLoadMore ? (\n <DashedTileButton\n onClick={() => onLoadMore(stage.id)}\n disabled={isLoadingMore}\n className=\"mt-0.75 px-3 py-2.5 text-muted-foreground\"\n ariaLabel={translateWithFallback(\n t,\n 'customers.deals.kanban.lane.aria.loadMore',\n 'Load more deals in {stage}',\n { stage: stage.label },\n )}\n >\n {isLoadingMore\n ? translateWithFallback(t, 'customers.deals.kanban.lane.loadingMore', 'Loading\u2026')\n : translateWithFallback(\n t,\n 'customers.deals.kanban.lane.loadMore',\n 'Show more ({remaining})',\n { remaining: totalCount - visibleCount },\n )}\n </DashedTileButton>\n ) : null}\n </div>\n {onResize ? (\n <LaneResizeHandle\n onResize={(delta) => onResize(stage.id, delta)}\n onResizeEnd={() => onResizeEnd?.(stage.id)}\n onReset={() => onResetWidth?.(stage.id)}\n />\n ) : null}\n </div>\n )\n}\n\n// Memoize the lane so changes in a different lane (or in the active drag) don't re-render us.\n// Page passes booleans (isDragActive) instead of activeDragDealId so most lanes can skip re-rendering.\nexport const Lane = React.memo(LaneImpl, (prev, next) => {\n if (prev.stage !== next.stage) return false\n if (prev.deals !== next.deals) return false\n if (prev.aggregate !== next.aggregate) return false\n if (prev.selectedDealIds !== next.selectedDealIds) return false\n if (prev.buildMenuItems !== next.buildMenuItems) return false\n if (prev.activeDragDealId !== next.activeDragDealId) return false\n if (prev.isLoadingMore !== next.isLoadingMore) return false\n if (prev.width !== next.width) return false\n return true\n})\n\nexport default Lane\n"],
5
- "mappings": ";AAoOQ,cAEE,YAFF;AAlOR,YAAY,WAAW;AACvB,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAE3B,SAAS,YAAY;AACrB,SAAS,6BAA6B;AAEtC,SAAS,sBAAsB;AAC/B,SAAS,gBAAmC;AAC5C,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AA2CjC,SAAS,eAAe,MAAuC;AAC7D,SAAO,eAAe,MAAM,WAAW;AACzC;AAGA,MAAM,yBAA2D;AAAA,EAC/D,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AACR;AAEA,SAAS,mBAAmB,MAAuC;AACjE,MAAI,QAAQ,QAAQ,uBAAwB,QAAO,uBAAuB,IAAI;AAC9E,SAAO;AACT;AAEA,SAAS,gBAAgB,QAAwB;AAC/C,MAAI,UAAU,KAAW;AACvB,UAAM,QAAQ,SAAS;AACvB,W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AO,MAAM,MAAM;AAAA,kBACvB;AAAA,kBAEC,0BACG,sBAAsB,GAAG,2CAA2C,eAAU,IAC9E;AAAA,oBACE;AAAA,oBACA;AAAA,oBACA;AAAA,oBACA,EAAE,WAAW,aAAa,aAAa;AAAA,kBACzC;AAAA;AAAA,cACN,IACE;AAAA;AAAA;AAAA,QACN;AAAA,QACC,WACC;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,CAAC,UAAU,SAAS,MAAM,IAAI,KAAK;AAAA,YAC7C,aAAa,MAAM,cAAc,MAAM,EAAE;AAAA,YACzC,SAAS,MAAM,eAAe,MAAM,EAAE;AAAA;AAAA,QACxC,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;AAIO,MAAM,OAAO,MAAM,KAAK,UAAU,CAAC,MAAM,SAAS;AACvD,MAAI,KAAK,UAAU,KAAK,MAAO,QAAO;AACtC,MAAI,KAAK,UAAU,KAAK,MAAO,QAAO;AACtC,MAAI,KAAK,cAAc,KAAK,UAAW,QAAO;AAC9C,MAAI,KAAK,oBAAoB,KAAK,gBAAiB,QAAO;AAC1D,MAAI,KAAK,mBAAmB,KAAK,eAAgB,QAAO;AACxD,MAAI,KAAK,qBAAqB,KAAK,iBAAkB,QAAO;AAC5D,MAAI,KAAK,kBAAkB,KAAK,cAAe,QAAO;AACtD,MAAI,KAAK,UAAU,KAAK,MAAO,QAAO;AACtC,SAAO;AACT,CAAC;AAED,IAAO,eAAQ;",
4
+ "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { useDroppable } from '@dnd-kit/core'\nimport { EmptyState } from '@open-mercato/ui/primitives/empty-state'\nimport type { RowActionItem } from '@open-mercato/ui/backend/RowActions'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { translateWithFallback } from '@open-mercato/shared/lib/i18n/translate'\nimport type { FilterOptionTone } from '@open-mercato/shared/lib/query/advanced-filter'\nimport { DealCard, type DealCardData } from './DealCard'\nimport { DashedTileButton } from './DashedTileButton'\nimport { LANE_WIDTH_PX } from './constants'\nimport { LaneCurrencyBreakdown } from './LaneCurrencyBreakdown'\nimport { LaneResizeHandle } from './LaneResizeHandle'\n\nexport type LaneStage = {\n id: string\n label: string\n tone: FilterOptionTone | null\n}\n\nexport type LaneAggregateProp = {\n count: number\n totalInBaseCurrency: number\n byCurrency: Array<{ currency: string; total: number; count: number }>\n baseCurrencyCode: string | null\n /** `true` when every currency in `byCurrency` was convertible to the base currency. */\n convertedAll: boolean\n /** Currencies present in `byCurrency` that lack an FX rate to base \u2014 excluded from totals. */\n missingRateCurrencies: string[]\n}\n\ntype LaneProps = {\n stage: LaneStage\n deals: DealCardData[]\n /** Server-side aggregate for accurate counts/totals across all deals in this stage, not just loaded ones */\n aggregate?: LaneAggregateProp | null\n selectedDealIds: Set<string>\n buildMenuItems: (deal: DealCardData) => RowActionItem[]\n activeDragDealId?: string | null\n isLoadingMore?: boolean\n /** Pixel width override (when the user has resized the column). Falls back to the default class. */\n width?: number | null\n onToggleSelect: (dealId: string) => void\n onComposeActivity: (dealId: string, type: 'call' | 'email' | 'note') => void\n onOpenDetail: (dealId: string) => void\n onQuickAddClick: (stageId: string) => void\n onLoadMore?: (stageId: string) => void\n /** Drag-resize callbacks. When provided, a vertical drag handle is rendered on the lane edge. */\n onResize?: (stageId: string, deltaPx: number) => void\n onResizeEnd?: (stageId: string) => void\n onResetWidth?: (stageId: string) => void\n}\n\n// 4px color bar tone \u2014 uses saturated icon tokens so the bar is visibly colored, not pale\nconst ACCENT_TONE_CLASS: Record<FilterOptionTone, string> = {\n success: 'bg-status-success-icon',\n error: 'bg-status-error-icon',\n warning: 'bg-status-warning-icon',\n info: 'bg-status-info-icon',\n neutral: 'bg-status-neutral-icon',\n brand: 'bg-brand-violet',\n pink: 'bg-status-pink-icon',\n}\n\n// Count pill bg uses very-light status background, text uses status text color\nconst COUNT_BADGE_TONE_CLASS: Record<FilterOptionTone, string> = {\n success: 'bg-status-success-bg text-status-success-text',\n error: 'bg-status-error-bg text-status-error-text',\n warning: 'bg-status-warning-bg text-status-warning-text',\n info: 'bg-status-info-bg text-status-info-text',\n neutral: 'bg-status-neutral-bg text-status-neutral-text',\n brand: 'bg-brand-violet/14 text-brand-violet',\n pink: 'bg-status-pink-bg text-status-pink-text',\n}\n\nfunction getAccentClass(tone: FilterOptionTone | null): string {\n if (tone && tone in ACCENT_TONE_CLASS) return ACCENT_TONE_CLASS[tone]\n return 'bg-border'\n}\n\nfunction getCountBadgeClass(tone: FilterOptionTone | null): string {\n if (tone && tone in COUNT_BADGE_TONE_CLASS) return COUNT_BADGE_TONE_CLASS[tone]\n return 'bg-muted text-muted-foreground'\n}\n\nfunction compactCurrency(amount: number): string {\n if (amount >= 1_000_000) {\n const value = amount / 1_000_000\n return value >= 100 ? `${Math.round(value)}M` : `${value.toFixed(1).replace(/\\.0$/, '')}M`\n }\n if (amount >= 1_000) {\n const value = amount / 1_000\n return value >= 100 ? `${Math.round(value)}k` : `${value.toFixed(1).replace(/\\.0$/, '')}k`\n }\n return String(Math.round(amount))\n}\n\ntype CurrencyRow = { currency: string; total: number; count: number }\n\ntype LaneStats = {\n count: number\n /** Headline amount and the currency it is denominated in (largest single currency, raw, never converted). */\n primaryAmount: number\n primaryCurrency: string | null\n /** Per-currency rows sorted desc by total \u2014 the popover renders these one per line. */\n rows: CurrencyRow[]\n /** Sum of `rows` converted to base currency (zero when no base is configured / nothing converted). */\n totalInBaseCurrency: number\n baseCurrencyCode: string | null\n convertedAll: boolean\n missingRateCurrencies: string[]\n}\n\n/**\n * Build display stats.\n * - If a server aggregate is provided, prefer it (covers all deals, converts to tenant base currency).\n * - Otherwise fall back to summing loaded deals (used before aggregate query loads).\n *\n * The headline currency on the lane header is intentionally the LARGEST raw currency\n * (not the base-currency converted total) because the converted total can be misleading\n * when FX rates are missing \u2014 operators see a smaller number than the headline suggests.\n * The base-currency converted total is reserved for the breakdown popover footer, where\n * a partial-conversion indicator can disclose what's excluded.\n */\nfunction buildLaneStats(deals: DealCardData[], aggregate?: LaneAggregateProp | null): LaneStats {\n if (aggregate) {\n const rows = aggregate.byCurrency\n // Pick the single currency with the largest raw total to surface in the header. This\n // is always honest: the operator sees the actual largest cluster of value rather than\n // a synthetic base-currency total that may be partial.\n const headline = rows.length > 0 ? rows[0] : null\n return {\n count: aggregate.count,\n primaryAmount: headline ? headline.total : 0,\n primaryCurrency: headline ? headline.currency : null,\n rows,\n totalInBaseCurrency: aggregate.totalInBaseCurrency,\n baseCurrencyCode: aggregate.baseCurrencyCode,\n convertedAll: aggregate.convertedAll,\n missingRateCurrencies: aggregate.missingRateCurrencies,\n }\n }\n const totalsByCurrency = new Map<string, { total: number; count: number }>()\n for (const deal of deals) {\n if (typeof deal.valueAmount !== 'number' || !Number.isFinite(deal.valueAmount)) continue\n const code = deal.valueCurrency && deal.valueCurrency.length === 3\n ? deal.valueCurrency.toUpperCase()\n : 'USD'\n const entry = totalsByCurrency.get(code) ?? { total: 0, count: 0 }\n entry.total += deal.valueAmount\n entry.count += 1\n totalsByCurrency.set(code, entry)\n }\n const rows: CurrencyRow[] = Array.from(totalsByCurrency.entries())\n .map(([currency, value]) => ({ currency, total: value.total, count: value.count }))\n .sort((a, b) => b.total - a.total)\n if (rows.length === 0) {\n return {\n count: deals.length,\n primaryAmount: 0,\n primaryCurrency: null,\n rows,\n totalInBaseCurrency: 0,\n baseCurrencyCode: null,\n convertedAll: true,\n missingRateCurrencies: [],\n }\n }\n return {\n count: deals.length,\n primaryAmount: rows[0].total,\n primaryCurrency: rows[0].currency,\n rows,\n totalInBaseCurrency: 0,\n baseCurrencyCode: null,\n // We don't have rates client-side; mark as \"not converted\" only when there are\n // multiple currencies so the popover can show a \"configure FX rates\" hint.\n convertedAll: rows.length === 1,\n missingRateCurrencies: rows.length > 1 ? rows.slice(1).map((row) => row.currency) : [],\n }\n}\n\nfunction LaneImpl({\n stage,\n deals,\n aggregate,\n selectedDealIds,\n buildMenuItems,\n activeDragDealId,\n isLoadingMore = false,\n width,\n onToggleSelect,\n onComposeActivity,\n onOpenDetail,\n onQuickAddClick,\n onLoadMore,\n onResize,\n onResizeEnd,\n onResetWidth,\n}: LaneProps): React.ReactElement {\n const t = useT()\n const { setNodeRef, isOver } = useDroppable({\n id: `lane:${stage.id}`,\n data: { type: 'lane', stageId: stage.id },\n })\n const isDragActive = !!activeDragDealId\n const sourceLane = isDragActive && deals.some((deal) => deal.id === activeDragDealId)\n // Highlight drop zone when:\n // - the lane has the pointer over it during a drag, OR\n // - any drag is active and this lane is not the source (so all candidate targets are clearly tagged)\n const showDropHighlight = isOver || (isDragActive && !sourceLane)\n const stats = React.useMemo(() => buildLaneStats(deals, aggregate), [deals, aggregate])\n // Pull boolean out of the Set so each DealCard receives a stable primitive \u2014 that lets\n // React.memo on DealCard skip re-renders when the Set reference changes but its emptiness\n // does not. Flipping false\u2192true (first selection) or true\u2192false (last cleared) forces a\n // full pass over the lane's cards so their checkbox visibility updates atomically.\n const bulkSelectionActive = selectedDealIds.size > 0\n const totalLabel = stats.primaryAmount > 0 && stats.primaryCurrency\n ? `${compactCurrency(stats.primaryAmount)} ${stats.primaryCurrency}`\n : null\n const visibleCount = deals.length\n const totalCount = stats.count\n const hasMoreDeals = totalCount > visibleCount\n const accentClass = getAccentClass(stage.tone)\n const countBadgeClass = getCountBadgeClass(stage.tone)\n\n const handleQuickAdd = React.useCallback(() => {\n onQuickAddClick(stage.id)\n }, [onQuickAddClick, stage.id])\n\n return (\n <div\n className=\"relative flex flex-none flex-col gap-3\"\n style={{ width: typeof width === 'number' && Number.isFinite(width) ? `${width}px` : `${LANE_WIDTH_PX}px` }}\n >\n <div className=\"flex flex-col gap-2.5 overflow-clip rounded-lg bg-muted/40 px-4 py-3.5\">\n <div className={`h-1.5 w-full rounded-sm ${accentClass}`} aria-hidden=\"true\" />\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-2.5\">\n <span className=\"truncate text-sm font-bold uppercase leading-normal text-foreground\">\n {stage.label}\n </span>\n <span\n className={`inline-flex shrink-0 items-center rounded-full px-2 py-1 text-xs font-bold leading-normal ${countBadgeClass}`}\n title={\n hasMoreDeals\n ? translateWithFallback(\n t,\n 'customers.deals.kanban.lane.aria.partialCount',\n 'Showing {visible} of {total}',\n { visible: visibleCount, total: totalCount },\n )\n : undefined\n }\n >\n {totalCount}\n </span>\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {totalLabel ? (\n <span className=\"text-sm font-bold leading-normal text-foreground\">\n {totalLabel}\n </span>\n ) : null}\n {stats.rows.length > 1 ? (\n <LaneCurrencyBreakdown\n rows={stats.rows}\n baseCurrencyCode={stats.baseCurrencyCode}\n totalInBaseCurrency={stats.totalInBaseCurrency}\n convertedAll={stats.convertedAll}\n missingRateCurrencies={stats.missingRateCurrencies}\n triggerLabel={`+${stats.rows.length - 1}`}\n headingLabel={stage.label.toUpperCase()}\n headingCount={totalCount}\n />\n ) : null}\n </div>\n </div>\n </div>\n\n <DashedTileButton\n onClick={handleQuickAdd}\n className=\"h-11\"\n ariaLabel={translateWithFallback(\n t,\n 'customers.deals.kanban.lane.aria.quickAdd',\n 'Quickly add a deal to {stage}',\n { stage: stage.label },\n )}\n >\n <span className=\"text-base font-bold leading-none\">+</span>\n <span>{translateWithFallback(t, 'customers.deals.kanban.cta.quickDeal', 'Quick deal')}</span>\n </DashedTileButton>\n\n <div\n ref={setNodeRef}\n className={`flex min-h-[40vh] flex-col gap-3 rounded-lg p-1.5 ${\n isOver\n ? 'bg-accent-indigo/10 outline-dashed outline-2 outline-accent-indigo -outline-offset-[2px]'\n : showDropHighlight\n ? 'bg-muted/40 outline-dashed outline-1 outline-muted-foreground/40 -outline-offset-[2px]'\n : ''\n }`}\n >\n {deals.length === 0 ? (\n <EmptyState\n size=\"sm\"\n title={translateWithFallback(\n t,\n 'customers.deals.kanban.lane.empty',\n 'No deals in this stage yet.',\n )}\n />\n ) : (\n deals.map((deal) => (\n <DealCard\n key={deal.id}\n deal={deal}\n selected={selectedDealIds.has(deal.id)}\n bulkSelectionActive={bulkSelectionActive}\n buildMenuItems={buildMenuItems}\n isActiveDrag={activeDragDealId === deal.id}\n onToggleSelect={onToggleSelect}\n onComposeActivity={onComposeActivity}\n onOpenDetail={onOpenDetail}\n />\n ))\n )}\n {hasMoreDeals && onLoadMore ? (\n <DashedTileButton\n onClick={() => onLoadMore(stage.id)}\n disabled={isLoadingMore}\n className=\"mt-0.75 px-3 py-2.5 text-muted-foreground\"\n ariaLabel={translateWithFallback(\n t,\n 'customers.deals.kanban.lane.aria.loadMore',\n 'Load more deals in {stage}',\n { stage: stage.label },\n )}\n >\n {isLoadingMore\n ? translateWithFallback(t, 'customers.deals.kanban.lane.loadingMore', 'Loading\u2026')\n : translateWithFallback(\n t,\n 'customers.deals.kanban.lane.loadMore',\n 'Show more ({remaining})',\n { remaining: totalCount - visibleCount },\n )}\n </DashedTileButton>\n ) : null}\n </div>\n {onResize ? (\n <LaneResizeHandle\n onResize={(delta) => onResize(stage.id, delta)}\n onResizeEnd={() => onResizeEnd?.(stage.id)}\n onReset={() => onResetWidth?.(stage.id)}\n />\n ) : null}\n </div>\n )\n}\n\n// Memoize the lane so changes in a different lane (or in the active drag) don't re-render us.\n// Page passes booleans (isDragActive) instead of activeDragDealId so most lanes can skip re-rendering.\nexport const Lane = React.memo(LaneImpl, (prev, next) => {\n if (prev.stage !== next.stage) return false\n if (prev.deals !== next.deals) return false\n if (prev.aggregate !== next.aggregate) return false\n if (prev.selectedDealIds !== next.selectedDealIds) return false\n if (prev.buildMenuItems !== next.buildMenuItems) return false\n if (prev.activeDragDealId !== next.activeDragDealId) return false\n if (prev.isLoadingMore !== next.isLoadingMore) return false\n if (prev.width !== next.width) return false\n return true\n})\n\nexport default Lane\n"],
5
+ "mappings": ";AA6OQ,cAEE,YAFF;AA3OR,YAAY,WAAW;AACvB,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAE3B,SAAS,YAAY;AACrB,SAAS,6BAA6B;AAEtC,SAAS,gBAAmC;AAC5C,SAAS,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,MAAI,KAAK,cAAc,KAAK,UAAW,QAAO;AAC9C,MAAI,KAAK,oBAAoB,KAAK,gBAAiB,QAAO;AAC1D,MAAI,KAAK,mBAAmB,KAAK,eAAgB,QAAO;AACxD,MAAI,KAAK,qBAAqB,KAAK,iBAAkB,QAAO;AAC5D,MAAI,KAAK,kBAAkB,KAAK,cAAe,QAAO;AACtD,MAAI,KAAK,UAAU,KAAK,MAAO,QAAO;AACtC,SAAO;AACT,CAAC;AAED,IAAO,eAAQ;",
6
6
  "names": ["rows"]
7
7
  }
@@ -10,107 +10,43 @@ import {
10
10
  } from "@open-mercato/ui/primitives/popover";
11
11
  import { useT } from "@open-mercato/shared/lib/i18n/context";
12
12
  import { translateWithFallback } from "@open-mercato/shared/lib/i18n/translate";
13
- import { useOrganizationScopeVersion } from "@open-mercato/shared/lib/frontend/useOrganizationScope";
14
- import { mapDictionaryColorToTone } from "@open-mercato/shared/lib/query/advanced-filter";
15
- import { Spinner } from "@open-mercato/ui/primitives/spinner";
16
- import { useCustomerDictionary } from "../../../../../components/detail/hooks/useCustomerDictionary.js";
17
- import { canonicalDealStatus } from "../../../../../lib/dealStatus.js";
18
- import { toneToDotClass } from "./toneClasses.js";
19
13
  import { ChipButton } from "./ChipButton.js";
20
14
  import { FilterPopoverShell } from "./FilterPopoverShell.js";
21
- const FALLBACK_STATUS_OPTIONS = [
15
+ const STATUS_OPTIONS = [
22
16
  {
23
17
  value: "open",
24
18
  labelKey: "customers.deals.kanban.filter.status.open",
25
19
  labelFallback: "Open",
26
- // Tones mirror mapDictionaryColorToTone over the seeded dictionary colors
27
- // (#2563eb → info, #22c55e → success, #ef4444 → error) so the fallback pills
28
- // render identically to the dictionary-driven ones.
29
- dotClass: "bg-status-info-icon"
20
+ dotClass: "bg-status-success-icon"
30
21
  },
31
22
  {
32
23
  value: "win",
33
24
  labelKey: "customers.deals.kanban.filter.status.won",
34
25
  labelFallback: "Won",
35
- dotClass: "bg-status-success-icon"
26
+ dotClass: "bg-status-warning-icon"
36
27
  },
37
28
  {
38
29
  value: "loose",
39
30
  labelKey: "customers.deals.kanban.filter.status.lost",
40
31
  labelFallback: "Lost",
41
- dotClass: "bg-status-error-icon"
42
- },
43
- {
44
- value: "closed",
45
- labelKey: "customers.deals.kanban.filter.status.closed",
46
- labelFallback: "Closed",
47
32
  dotClass: "bg-status-neutral-icon"
48
- },
49
- {
50
- value: "in_progress",
51
- labelKey: "customers.deals.kanban.filter.status.inProgress",
52
- labelFallback: "In progress",
53
- dotClass: "bg-status-warning-icon"
54
33
  }
55
34
  ];
56
35
  function StatusFilterPopover({ values, onApply }) {
57
36
  const t = useT();
58
- const scopeVersion = useOrganizationScopeVersion();
59
- const { data: dictionaryData, isLoading: dictionaryLoading } = useCustomerDictionary(
60
- "deal-statuses",
61
- scopeVersion
62
- );
63
37
  const [open, setOpen] = React.useState(false);
64
- const normalizedValues = React.useMemo(
65
- () => Array.from(new Set(values.map(canonicalDealStatus))),
66
- [values]
67
- );
68
- const [draft, setDraft] = React.useState(normalizedValues);
38
+ const [draft, setDraft] = React.useState(values);
69
39
  React.useEffect(() => {
70
- if (open) setDraft(normalizedValues);
71
- }, [open, normalizedValues]);
72
- const statusOptions = React.useMemo(() => {
73
- const entries = dictionaryData?.entries;
74
- if (entries && entries.length > 0) {
75
- const byCanonical = /* @__PURE__ */ new Map();
76
- for (const entry of entries) {
77
- const canonical = canonicalDealStatus(entry.value);
78
- if (byCanonical.has(canonical)) continue;
79
- const tone = mapDictionaryColorToTone(entry.color ?? null);
80
- byCanonical.set(canonical, {
81
- value: canonical,
82
- label: entry.label,
83
- dotClass: toneToDotClass(tone)
84
- });
85
- }
86
- return Array.from(byCanonical.values()).sort(
87
- (a, b) => a.label.localeCompare(b.label, void 0, { sensitivity: "base" })
88
- );
89
- }
90
- return FALLBACK_STATUS_OPTIONS.map((entry) => ({
91
- value: entry.value,
92
- label: translateWithFallback(t, entry.labelKey, entry.labelFallback),
93
- dotClass: entry.dotClass
94
- }));
95
- }, [dictionaryData, t]);
96
- const labelByValue = React.useMemo(() => {
97
- const map = /* @__PURE__ */ new Map();
98
- for (const option of statusOptions) {
99
- map.set(option.value, option.label);
100
- }
101
- for (const fallback of FALLBACK_STATUS_OPTIONS) {
102
- if (!map.has(fallback.value)) {
103
- map.set(fallback.value, translateWithFallback(t, fallback.labelKey, fallback.labelFallback));
104
- }
105
- }
106
- return map;
107
- }, [statusOptions, t]);
40
+ if (open) setDraft(values);
41
+ }, [open, values]);
108
42
  const chipLabel = translateWithFallback(t, "customers.deals.kanban.filter.status", "Status");
109
- const chipValue = normalizedValues.length === 0 ? translateWithFallback(t, "customers.deals.kanban.filter.all", "All") : normalizedValues.map((value) => labelByValue.get(value) ?? value).join(", ");
43
+ const chipValue = values.length === 0 ? translateWithFallback(t, "customers.deals.kanban.filter.all", "All") : values.map((value) => {
44
+ const option = STATUS_OPTIONS.find((entry) => entry.value === value);
45
+ return option ? translateWithFallback(t, option.labelKey, option.labelFallback) : value;
46
+ }).join(", ");
110
47
  const toggleDraft = (value) => {
111
- const normalized = canonicalDealStatus(value);
112
48
  setDraft(
113
- (prev) => prev.includes(normalized) ? prev.filter((entry) => entry !== normalized) : [...prev, normalized]
49
+ (prev) => prev.includes(value) ? prev.filter((entry) => entry !== value) : [...prev, value]
114
50
  );
115
51
  };
116
52
  const handleApply = () => {
@@ -124,7 +60,7 @@ function StatusFilterPopover({ values, onApply }) {
124
60
  }
125
61
  };
126
62
  return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
127
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ChipButton, { label: chipLabel, value: chipValue, active: normalizedValues.length > 0 }) }),
63
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(ChipButton, { label: chipLabel, value: chipValue, active: values.length > 0 }) }),
128
64
  /* @__PURE__ */ jsx(
129
65
  PopoverContent,
130
66
  {
@@ -148,16 +84,9 @@ function StatusFilterPopover({ values, onApply }) {
148
84
  ] }),
149
85
  children: [
150
86
  /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold uppercase leading-normal tracking-wide text-muted-foreground", children: translateWithFallback(t, "customers.deals.kanban.filter.status", "Status") }),
151
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-x-1.5 gap-y-2", children: dictionaryLoading ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-xs text-muted-foreground", role: "status", "aria-live": "polite", children: [
152
- /* @__PURE__ */ jsx(Spinner, { className: "size-3" }),
153
- translateWithFallback(
154
- t,
155
- "customers.deals.kanban.filter.status.loading",
156
- "Loading statuses\u2026"
157
- )
158
- ] }) : statusOptions.map((option) => {
87
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-x-1.5 gap-y-2", children: STATUS_OPTIONS.map((option) => {
159
88
  const isSelected = draft.includes(option.value);
160
- const label = option.label;
89
+ const label = translateWithFallback(t, option.labelKey, option.labelFallback);
161
90
  return /* @__PURE__ */ jsxs(
162
91
  Button,
163
92
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../src/modules/customers/backend/customers/deals/pipeline/components/StatusFilterPopover.tsx"],
4
- "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { X } from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@open-mercato/ui/primitives/popover'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { translateWithFallback } from '@open-mercato/shared/lib/i18n/translate'\nimport { useOrganizationScopeVersion } from '@open-mercato/shared/lib/frontend/useOrganizationScope'\nimport { mapDictionaryColorToTone } from '@open-mercato/shared/lib/query/advanced-filter'\nimport { Spinner } from '@open-mercato/ui/primitives/spinner'\nimport { useCustomerDictionary } from '../../../../../components/detail/hooks/useCustomerDictionary'\nimport { canonicalDealStatus } from '../../../../../lib/dealStatus'\nimport { toneToDotClass } from './toneClasses'\nimport { ChipButton } from './ChipButton'\nimport { FilterPopoverShell } from './FilterPopoverShell'\n\n/**\n * Filter options exposed to the operator.\n *\n * The deal `status` column is dictionary-driven (`deal-statuses`); the seeded dictionary\n * carries five values (`open`, `closed`, `win`, `loose`, `in_progress`) plus any\n * tenant-custom entries. We render every dictionary entry de-duplicated by canonical\n * spelling so the kanban Status pill stays aligned with the list page's advanced filter\n * (which also uses the dictionary). A hard-coded fallback keeps the popover usable while\n * the dictionary is loading or when a tenant has no entries.\n *\n * `won` / `lost` are accepted as aliases for `win` / `loose` at the API layer (see\n * `lib/dealStatus.ts:expandDealStatusAliases`, shared by the deals list route and the\n * kanban aggregate route). The UI only exposes the canonical values to avoid duplicate\n * pills, but `canonicalDealStatus` normalizes any alias passed in through `values` so\n * the chip and draft selection render the correct label.\n */\nconst FALLBACK_STATUS_OPTIONS: Array<{\n value: string\n labelKey: string\n labelFallback: string\n dotClass: string\n}> = [\n {\n value: 'open',\n labelKey: 'customers.deals.kanban.filter.status.open',\n labelFallback: 'Open',\n // Tones mirror mapDictionaryColorToTone over the seeded dictionary colors\n // (#2563eb \u2192 info, #22c55e \u2192 success, #ef4444 \u2192 error) so the fallback pills\n // render identically to the dictionary-driven ones.\n dotClass: 'bg-status-info-icon',\n },\n {\n value: 'win',\n labelKey: 'customers.deals.kanban.filter.status.won',\n labelFallback: 'Won',\n dotClass: 'bg-status-success-icon',\n },\n {\n value: 'loose',\n labelKey: 'customers.deals.kanban.filter.status.lost',\n labelFallback: 'Lost',\n dotClass: 'bg-status-error-icon',\n },\n {\n value: 'closed',\n labelKey: 'customers.deals.kanban.filter.status.closed',\n labelFallback: 'Closed',\n dotClass: 'bg-status-neutral-icon',\n },\n {\n value: 'in_progress',\n labelKey: 'customers.deals.kanban.filter.status.inProgress',\n labelFallback: 'In progress',\n dotClass: 'bg-status-warning-icon',\n },\n]\n\ntype StatusFilterPopoverProps = {\n values: string[]\n onApply: (next: string[]) => void\n}\n\nexport function StatusFilterPopover({ values, onApply }: StatusFilterPopoverProps): React.ReactElement {\n const t = useT()\n const scopeVersion = useOrganizationScopeVersion()\n const { data: dictionaryData, isLoading: dictionaryLoading } = useCustomerDictionary(\n 'deal-statuses',\n scopeVersion,\n )\n const [open, setOpen] = React.useState(false)\n const normalizedValues = React.useMemo(\n () => Array.from(new Set(values.map(canonicalDealStatus))),\n [values],\n )\n const [draft, setDraft] = React.useState<string[]>(normalizedValues)\n\n React.useEffect(() => {\n if (open) setDraft(normalizedValues)\n }, [open, normalizedValues])\n\n const statusOptions = React.useMemo(() => {\n const entries = dictionaryData?.entries\n if (entries && entries.length > 0) {\n const byCanonical = new Map<string, { value: string; label: string; dotClass: string }>()\n for (const entry of entries) {\n const canonical = canonicalDealStatus(entry.value)\n if (byCanonical.has(canonical)) continue\n const tone = mapDictionaryColorToTone(entry.color ?? null)\n byCanonical.set(canonical, {\n value: canonical,\n label: entry.label,\n dotClass: toneToDotClass(tone),\n })\n }\n // Sort by label exactly like the List page's advanced filter\n // (backend/customers/deals/page.tsx dictionaryOptions) so both surfaces render\n // the same pills in the same order.\n return Array.from(byCanonical.values()).sort((a, b) =>\n a.label.localeCompare(b.label, undefined, { sensitivity: 'base' }),\n )\n }\n return FALLBACK_STATUS_OPTIONS.map((entry) => ({\n value: entry.value,\n label: translateWithFallback(t, entry.labelKey, entry.labelFallback),\n dotClass: entry.dotClass,\n }))\n }, [dictionaryData, t])\n\n const labelByValue = React.useMemo(() => {\n const map = new Map<string, string>()\n for (const option of statusOptions) {\n map.set(option.value, option.label)\n }\n for (const fallback of FALLBACK_STATUS_OPTIONS) {\n if (!map.has(fallback.value)) {\n map.set(fallback.value, translateWithFallback(t, fallback.labelKey, fallback.labelFallback))\n }\n }\n return map\n }, [statusOptions, t])\n\n const chipLabel = translateWithFallback(t, 'customers.deals.kanban.filter.status', 'Status')\n const chipValue =\n normalizedValues.length === 0\n ? translateWithFallback(t, 'customers.deals.kanban.filter.all', 'All')\n : normalizedValues\n .map((value) => labelByValue.get(value) ?? value)\n .join(', ')\n\n const toggleDraft = (value: string) => {\n const normalized = canonicalDealStatus(value)\n setDraft((prev) =>\n prev.includes(normalized) ? prev.filter((entry) => entry !== normalized) : [...prev, normalized],\n )\n }\n\n const handleApply = () => {\n onApply(draft)\n setOpen(false)\n }\n\n // Cmd/Ctrl+Enter from anywhere inside the popover confirms \u2014 parity with the dialog\n // primary-action shortcut (`AGENTS.md` UI Interaction rules).\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') {\n event.preventDefault()\n handleApply()\n }\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <ChipButton label={chipLabel} value={chipValue} active={normalizedValues.length > 0} />\n </PopoverTrigger>\n <PopoverContent\n className=\"w-96 rounded-2xl border-border bg-transparent p-0 shadow-xl\"\n align=\"start\"\n onKeyDown={handleKeyDown}\n >\n <FilterPopoverShell\n title={\n <>\n <span className=\"font-bold\">\n {translateWithFallback(t, 'customers.deals.kanban.filter.status.title.label', 'Filter : ')}\n </span>\n <span className=\"font-normal\">\n {translateWithFallback(t, 'customers.deals.kanban.filter.status', 'Status')}\n </span>\n </>\n }\n onClose={() => setOpen(false)}\n onCancel={() => setOpen(false)}\n onApply={handleApply}\n footerLeft={\n <span>\n {draft.length}{' '}\n {translateWithFallback(t, 'customers.deals.kanban.filter.selected', 'selected')}\n </span>\n }\n >\n <span className=\"text-xs font-semibold uppercase leading-normal tracking-wide text-muted-foreground\">\n {translateWithFallback(t, 'customers.deals.kanban.filter.status', 'Status')}\n </span>\n <div className=\"flex flex-wrap items-center gap-x-1.5 gap-y-2\">\n {dictionaryLoading ? (\n <span className=\"flex items-center gap-2 text-xs text-muted-foreground\" role=\"status\" aria-live=\"polite\">\n <Spinner className=\"size-3\" />\n {translateWithFallback(\n t,\n 'customers.deals.kanban.filter.status.loading',\n 'Loading statuses\u2026',\n )}\n </span>\n ) : (\n statusOptions.map((option) => {\n const isSelected = draft.includes(option.value)\n const label = option.label\n return (\n <Button\n key={option.value}\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n onClick={() => toggleDraft(option.value)}\n aria-pressed={isSelected}\n className={`gap-1.5 rounded-full px-2.5 py-1.5 text-xs leading-normal ${\n isSelected\n ? 'bg-muted font-semibold text-foreground'\n : 'border border-border bg-card font-normal text-muted-foreground hover:bg-muted'\n }`}\n >\n <span\n className={`inline-block size-2 shrink-0 rounded-full ${option.dotClass}`}\n aria-hidden=\"true\"\n />\n <span>{label}</span>\n {isSelected ? (\n <X className=\"size-2.5 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n ) : null}\n </Button>\n )\n })\n )}\n </div>\n </FilterPopoverShell>\n </PopoverContent>\n </Popover>\n )\n}\n\nexport default StatusFilterPopover\n"],
5
- "mappings": ";AA8KQ,SASI,UATJ,KASI,YATJ;AA5KR,YAAY,WAAW;AACvB,SAAS,SAAS;AAClB,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,YAAY;AACrB,SAAS,6BAA6B;AACtC,SAAS,mCAAmC;AAC5C,SAAS,gCAAgC;AACzC,SAAS,eAAe;AACxB,SAAS,6BAA6B;AACtC,SAAS,2BAA2B;AACpC,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,0BAA0B;AAkBnC,MAAM,0BAKD;AAAA,EACH;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,eAAe;AAAA;AAAA;AAAA;AAAA,IAIf,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,eAAe;AAAA,IACf,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,eAAe;AAAA,IACf,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU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,0BACC,WAAW,6CAA6C,OAAO,QAAQ;AAAA,0BACvE,eAAY;AAAA;AAAA,sBACd;AAAA,sBACA,oBAAC,UAAM,iBAAM;AAAA,sBACZ,aACC,oBAAC,KAAE,WAAU,2CAA0C,eAAY,QAAO,IACxE;AAAA;AAAA;AAAA,kBAnBC,OAAO;AAAA,gBAoBd;AAAA,cAEF,CAAC,GAEL;AAAA;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,IAAO,8BAAQ;",
4
+ "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { X } from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@open-mercato/ui/primitives/popover'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { translateWithFallback } from '@open-mercato/shared/lib/i18n/translate'\nimport { ChipButton } from './ChipButton'\nimport { FilterPopoverShell } from './FilterPopoverShell'\n\n/**\n * Filter options exposed to the operator.\n *\n * The deal `status` column accepts the historical 4-value enum (`open` | `closed` | `win` |\n * `loose`), but the codebase only ever **writes** `loose` for a lost deal \u2014 `closed` was a\n * latent unused state from an earlier iteration. Exposing a separate \"Lost (closed)\" filter\n * option therefore filtered to nothing and confused operators. We display a single \"Lost\"\n * choice and intentionally map it to the canonical wire value `loose` so the filter matches\n * what the rest of the app actually persists. (Renaming the column / migrating the data to\n * `lost` is a deeper data-model change tracked separately.)\n */\nconst STATUS_OPTIONS: Array<{\n value: string\n labelKey: string\n labelFallback: string\n /** Tone selects the small \u25CF-dot color on the pill (per Figma: green / amber / gray) */\n dotClass: string\n}> = [\n {\n value: 'open',\n labelKey: 'customers.deals.kanban.filter.status.open',\n labelFallback: 'Open',\n dotClass: 'bg-status-success-icon',\n },\n {\n value: 'win',\n labelKey: 'customers.deals.kanban.filter.status.won',\n labelFallback: 'Won',\n dotClass: 'bg-status-warning-icon',\n },\n {\n value: 'loose',\n labelKey: 'customers.deals.kanban.filter.status.lost',\n labelFallback: 'Lost',\n dotClass: 'bg-status-neutral-icon',\n },\n]\n\ntype StatusFilterPopoverProps = {\n values: string[]\n onApply: (next: string[]) => void\n}\n\nexport function StatusFilterPopover({ values, onApply }: StatusFilterPopoverProps): React.ReactElement {\n const t = useT()\n const [open, setOpen] = React.useState(false)\n const [draft, setDraft] = React.useState<string[]>(values)\n\n React.useEffect(() => {\n if (open) setDraft(values)\n }, [open, values])\n\n const chipLabel = translateWithFallback(t, 'customers.deals.kanban.filter.status', 'Status')\n const chipValue =\n values.length === 0\n ? translateWithFallback(t, 'customers.deals.kanban.filter.all', 'All')\n : values\n .map((value) => {\n const option = STATUS_OPTIONS.find((entry) => entry.value === value)\n return option\n ? translateWithFallback(t, option.labelKey, option.labelFallback)\n : value\n })\n .join(', ')\n\n const toggleDraft = (value: string) => {\n setDraft((prev) =>\n prev.includes(value) ? prev.filter((entry) => entry !== value) : [...prev, value],\n )\n }\n\n const handleApply = () => {\n onApply(draft)\n setOpen(false)\n }\n\n // Cmd/Ctrl+Enter from anywhere inside the popover confirms \u2014 parity with the dialog\n // primary-action shortcut (`AGENTS.md` UI Interaction rules).\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') {\n event.preventDefault()\n handleApply()\n }\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <ChipButton label={chipLabel} value={chipValue} active={values.length > 0} />\n </PopoverTrigger>\n <PopoverContent\n className=\"w-96 rounded-2xl border-border bg-transparent p-0 shadow-xl\"\n align=\"start\"\n onKeyDown={handleKeyDown}\n >\n <FilterPopoverShell\n title={\n <>\n <span className=\"font-bold\">\n {translateWithFallback(t, 'customers.deals.kanban.filter.status.title.label', 'Filter : ')}\n </span>\n <span className=\"font-normal\">\n {translateWithFallback(t, 'customers.deals.kanban.filter.status', 'Status')}\n </span>\n </>\n }\n onClose={() => setOpen(false)}\n onCancel={() => setOpen(false)}\n onApply={handleApply}\n footerLeft={\n <span>\n {draft.length}{' '}\n {translateWithFallback(t, 'customers.deals.kanban.filter.selected', 'selected')}\n </span>\n }\n >\n <span className=\"text-xs font-semibold uppercase leading-normal tracking-wide text-muted-foreground\">\n {translateWithFallback(t, 'customers.deals.kanban.filter.status', 'Status')}\n </span>\n <div className=\"flex flex-wrap items-center gap-x-1.5 gap-y-2\">\n {STATUS_OPTIONS.map((option) => {\n const isSelected = draft.includes(option.value)\n const label = translateWithFallback(t, option.labelKey, option.labelFallback)\n return (\n <Button\n key={option.value}\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n onClick={() => toggleDraft(option.value)}\n aria-pressed={isSelected}\n className={`gap-1.5 rounded-full px-2.5 py-1.5 text-xs leading-normal ${\n isSelected\n ? 'bg-muted font-semibold text-foreground'\n : 'border border-border bg-card font-normal text-muted-foreground hover:bg-muted'\n }`}\n >\n <span\n className={`inline-block size-2 shrink-0 rounded-full ${option.dotClass}`}\n aria-hidden=\"true\"\n />\n <span>{label}</span>\n {isSelected ? (\n <X className=\"size-2.5 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n ) : null}\n </Button>\n )\n })}\n </div>\n </FilterPopoverShell>\n </PopoverContent>\n </Popover>\n )\n}\n\nexport default StatusFilterPopover\n"],
5
+ "mappings": ";AAuGQ,SASI,UATJ,KASI,YATJ;AArGR,YAAY,WAAW;AACvB,SAAS,SAAS;AAClB,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,YAAY;AACrB,SAAS,6BAA6B;AACtC,SAAS,kBAAkB;AAC3B,SAAS,0BAA0B;AAanC,MAAM,iBAMD;AAAA,EACH;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,eAAe;AAAA,IACf,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,eAAe;AAAA,IACf,UAAU;AAAA,EACZ;AA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EJ;AAEA,IAAO,8BAAQ;",
6
6
  "names": []
7
7
  }
@@ -154,10 +154,9 @@ function CustomersPeoplePage() {
154
154
  const [sorting, setSorting] = React.useState([]);
155
155
  const [total, setTotal] = React.useState(0);
156
156
  const [totalPages, setTotalPages] = React.useState(1);
157
- const [totalIsCapped, setTotalIsCapped] = React.useState(false);
157
+ const [search, setSearch] = React.useState("");
158
158
  const pathname = usePathname();
159
159
  const searchParams = useSearchParams();
160
- const [search, setSearch] = React.useState(() => searchParams?.get("search")?.trim() ?? "");
161
160
  const initialFilterTree = React.useMemo(() => {
162
161
  if (!searchParams) return createEmptyTree();
163
162
  const record = {};
@@ -341,7 +340,6 @@ function CustomersPeoplePage() {
341
340
  setRows(items.map((item) => mapApiItem(item)).filter((row) => !!row));
342
341
  setTotal(typeof payload.total === "number" ? payload.total : items.length);
343
342
  setTotalPages(typeof payload.totalPages === "number" ? payload.totalPages : 1);
344
- setTotalIsCapped(payload?.totalIsCapped === true);
345
343
  } catch (err) {
346
344
  if (!cancelled) {
347
345
  setCacheStatus(null);
@@ -720,8 +718,8 @@ function CustomersPeoplePage() {
720
718
  header: def.label || def.key,
721
719
  enableSorting: true,
722
720
  meta: {
723
- columnChooserGroup: def.group?.title ?? "Custom Fields",
724
- filterGroup: def.group?.title ?? "Custom Fields",
721
+ columnChooserGroup: def.group?.title ?? t("ui.columnChooser.customFieldsGroup", "Custom Fields"),
722
+ filterGroup: def.group?.title ?? t("ui.columnChooser.customFieldsGroup", "Custom Fields"),
725
723
  filterType: mapCustomFieldKindToFilterType(def.kind),
726
724
  filterOptions: normalizeCustomFieldFilterOptions(def.options),
727
725
  hidden: def.listVisible === false,
@@ -856,7 +854,7 @@ function CustomersPeoplePage() {
856
854
  }
857
855
  ),
858
856
  virtualized: true,
859
- pagination: { page, pageSize, total, totalPages, totalIsCapped, onPageChange: setPage, cacheStatus, pageSizeOptions: [10, 25, 50, 100], onPageSizeChange: handlePageSizeChange },
857
+ pagination: { page, pageSize, total, totalPages, onPageChange: setPage, cacheStatus, pageSizeOptions: [10, 25, 50, 100], onPageSizeChange: handlePageSizeChange },
860
858
  isLoading
861
859
  }
862
860
  ),