@open-mercato/core 0.4.6-develop-e321a4e2a1 → 0.4.6-main-24e64eef39

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 (180) hide show
  1. package/AGENTS.md +0 -22
  2. package/dist/modules/api_docs/frontend/docs/api/page.js +1 -1
  3. package/dist/modules/api_docs/frontend/docs/api/page.js.map +2 -2
  4. package/dist/modules/attachments/api/library/[id]/route.js +1 -0
  5. package/dist/modules/attachments/api/library/[id]/route.js.map +2 -2
  6. package/dist/modules/attachments/components/AttachmentLibrary.js +1 -1
  7. package/dist/modules/attachments/components/AttachmentLibrary.js.map +2 -2
  8. package/dist/modules/attachments/lib/partitionEnv.js +1 -1
  9. package/dist/modules/attachments/lib/partitionEnv.js.map +2 -2
  10. package/dist/modules/auth/backend/users/page.js +1 -1
  11. package/dist/modules/auth/backend/users/page.js.map +2 -2
  12. package/dist/modules/auth/cli.js +1 -1
  13. package/dist/modules/auth/cli.js.map +2 -2
  14. package/dist/modules/auth/commands/users.js +1 -1
  15. package/dist/modules/auth/commands/users.js.map +2 -2
  16. package/dist/modules/business_rules/components/utils/formHelpers.js +1 -1
  17. package/dist/modules/business_rules/components/utils/formHelpers.js.map +2 -2
  18. package/dist/modules/catalog/backend/catalog/products/create/page.js +1 -1
  19. package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
  20. package/dist/modules/catalog/commands/products.js +1 -1
  21. package/dist/modules/catalog/commands/products.js.map +2 -2
  22. package/dist/modules/catalog/commands/shared.js +1 -1
  23. package/dist/modules/catalog/commands/shared.js.map +2 -2
  24. package/dist/modules/catalog/components/PriceKindSettings.js +1 -1
  25. package/dist/modules/catalog/components/PriceKindSettings.js.map +2 -2
  26. package/dist/modules/catalog/components/products/productForm.js +1 -1
  27. package/dist/modules/catalog/components/products/productForm.js.map +2 -2
  28. package/dist/modules/configs/lib/upgrade-actions.js.map +1 -1
  29. package/dist/modules/currencies/services/providers/raiffeisen.js +1 -1
  30. package/dist/modules/currencies/services/providers/raiffeisen.js.map +2 -2
  31. package/dist/modules/customers/backend/customers/companies/page.js +3 -3
  32. package/dist/modules/customers/backend/customers/companies/page.js.map +2 -2
  33. package/dist/modules/customers/backend/customers/deals/page.js +3 -3
  34. package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
  35. package/dist/modules/customers/backend/customers/people/page.js +3 -3
  36. package/dist/modules/customers/backend/customers/people/page.js.map +2 -2
  37. package/dist/modules/customers/cli.js +2 -2
  38. package/dist/modules/customers/cli.js.map +2 -2
  39. package/dist/modules/customers/lib/detailHelpers.js +1 -1
  40. package/dist/modules/customers/lib/detailHelpers.js.map +2 -2
  41. package/dist/modules/entities/cli.js +1 -1
  42. package/dist/modules/entities/cli.js.map +2 -2
  43. package/dist/modules/entities/lib/field-definitions.js +1 -1
  44. package/dist/modules/entities/lib/field-definitions.js.map +2 -2
  45. package/dist/modules/entities/lib/install-from-ce.js +1 -1
  46. package/dist/modules/entities/lib/install-from-ce.js.map +2 -2
  47. package/dist/modules/inbox_ops/lib/emailParser.js +1 -1
  48. package/dist/modules/inbox_ops/lib/emailParser.js.map +2 -2
  49. package/dist/modules/inbox_ops/widgets/notifications/ProposalCreatedRenderer.js +0 -8
  50. package/dist/modules/inbox_ops/widgets/notifications/ProposalCreatedRenderer.js.map +2 -2
  51. package/dist/modules/perspectives/services/perspectiveService.js +1 -1
  52. package/dist/modules/perspectives/services/perspectiveService.js.map +2 -2
  53. package/dist/modules/planner/backend/planner/availability-rulesets/page.js +3 -3
  54. package/dist/modules/planner/backend/planner/availability-rulesets/page.js.map +2 -2
  55. package/dist/modules/query_index/components/QueryIndexesTable.js +7 -7
  56. package/dist/modules/query_index/components/QueryIndexesTable.js.map +2 -2
  57. package/dist/modules/query_index/lib/engine.js +1 -1
  58. package/dist/modules/query_index/lib/engine.js.map +2 -2
  59. package/dist/modules/resources/backend/resources/resource-types/page.js +2 -2
  60. package/dist/modules/resources/backend/resources/resource-types/page.js.map +2 -2
  61. package/dist/modules/resources/backend/resources/resources/page.js +3 -3
  62. package/dist/modules/resources/backend/resources/resources/page.js.map +2 -2
  63. package/dist/modules/resources/commands/resources.js +1 -1
  64. package/dist/modules/resources/commands/resources.js.map +2 -2
  65. package/dist/modules/resources/lib/seeds.js +1 -1
  66. package/dist/modules/resources/lib/seeds.js.map +2 -2
  67. package/dist/modules/sales/api/dashboard/widgets/new-orders/route.js +1 -1
  68. package/dist/modules/sales/api/dashboard/widgets/new-orders/route.js.map +2 -2
  69. package/dist/modules/sales/api/dashboard/widgets/new-quotes/route.js +1 -1
  70. package/dist/modules/sales/api/dashboard/widgets/new-quotes/route.js.map +2 -2
  71. package/dist/modules/sales/backend/sales/channels/page.js +3 -3
  72. package/dist/modules/sales/backend/sales/channels/page.js.map +2 -2
  73. package/dist/modules/sales/commands/documents.js +2 -2
  74. package/dist/modules/sales/commands/documents.js.map +2 -2
  75. package/dist/modules/sales/components/channels/offerTableUtils.js +2 -3
  76. package/dist/modules/sales/components/channels/offerTableUtils.js.map +2 -2
  77. package/dist/modules/sales/components/documents/SalesDocumentsTable.js +4 -4
  78. package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
  79. package/dist/modules/sales/components/documents/ShipmentDialog.js +1 -1
  80. package/dist/modules/sales/components/documents/ShipmentDialog.js.map +2 -2
  81. package/dist/modules/sales/lib/shipments/snapshots.js.map +1 -1
  82. package/dist/modules/sales/widgets/notifications/SalesOrderCreatedRenderer.js +0 -8
  83. package/dist/modules/sales/widgets/notifications/SalesOrderCreatedRenderer.js.map +2 -2
  84. package/dist/modules/sales/widgets/notifications/SalesQuoteCreatedRenderer.js +0 -8
  85. package/dist/modules/sales/widgets/notifications/SalesQuoteCreatedRenderer.js.map +2 -2
  86. package/dist/modules/staff/backend/staff/leave-requests/page.js +3 -3
  87. package/dist/modules/staff/backend/staff/leave-requests/page.js.map +2 -2
  88. package/dist/modules/staff/backend/staff/my-leave-requests/page.js +3 -3
  89. package/dist/modules/staff/backend/staff/my-leave-requests/page.js.map +2 -2
  90. package/dist/modules/staff/backend/staff/team-members/page.js +3 -3
  91. package/dist/modules/staff/backend/staff/team-members/page.js.map +2 -2
  92. package/dist/modules/staff/backend/staff/team-roles/page.js +2 -2
  93. package/dist/modules/staff/backend/staff/team-roles/page.js.map +2 -2
  94. package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js +3 -3
  95. package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js.map +2 -2
  96. package/dist/modules/staff/backend/staff/teams/page.js +2 -2
  97. package/dist/modules/staff/backend/staff/teams/page.js.map +2 -2
  98. package/dist/modules/workflows/backend/instances/page.js +2 -2
  99. package/dist/modules/workflows/backend/instances/page.js.map +2 -2
  100. package/dist/modules/workflows/backend/tasks/page.js +1 -1
  101. package/dist/modules/workflows/backend/tasks/page.js.map +2 -2
  102. package/dist/modules/workflows/components/DefinitionTriggersEditor.js +1 -1
  103. package/dist/modules/workflows/components/DefinitionTriggersEditor.js.map +2 -2
  104. package/dist/modules/workflows/lib/graph-utils.js +1 -1
  105. package/dist/modules/workflows/lib/graph-utils.js.map +2 -2
  106. package/package.json +2 -2
  107. package/src/modules/api_docs/frontend/docs/api/page.tsx +1 -1
  108. package/src/modules/attachments/api/library/[id]/route.ts +1 -0
  109. package/src/modules/attachments/components/AttachmentLibrary.tsx +1 -1
  110. package/src/modules/attachments/lib/partitionEnv.ts +1 -1
  111. package/src/modules/auth/backend/users/page.tsx +1 -1
  112. package/src/modules/auth/cli.ts +1 -1
  113. package/src/modules/auth/commands/users.ts +1 -1
  114. package/src/modules/business_rules/components/utils/formHelpers.ts +1 -1
  115. package/src/modules/catalog/backend/catalog/products/create/page.tsx +1 -1
  116. package/src/modules/catalog/commands/products.ts +1 -1
  117. package/src/modules/catalog/commands/shared.ts +1 -1
  118. package/src/modules/catalog/components/PriceKindSettings.tsx +1 -1
  119. package/src/modules/catalog/components/products/productForm.ts +1 -1
  120. package/src/modules/configs/lib/upgrade-actions.ts +1 -1
  121. package/src/modules/currencies/services/providers/raiffeisen.ts +1 -1
  122. package/src/modules/customers/backend/customers/companies/page.tsx +3 -3
  123. package/src/modules/customers/backend/customers/deals/page.tsx +3 -3
  124. package/src/modules/customers/backend/customers/people/page.tsx +3 -3
  125. package/src/modules/customers/cli.ts +2 -2
  126. package/src/modules/customers/lib/detailHelpers.ts +1 -1
  127. package/src/modules/entities/cli.ts +1 -1
  128. package/src/modules/entities/lib/field-definitions.ts +1 -1
  129. package/src/modules/entities/lib/install-from-ce.ts +1 -1
  130. package/src/modules/inbox_ops/lib/emailParser.ts +1 -1
  131. package/src/modules/inbox_ops/widgets/notifications/ProposalCreatedRenderer.tsx +0 -8
  132. package/src/modules/perspectives/services/perspectiveService.ts +1 -1
  133. package/src/modules/planner/backend/planner/availability-rulesets/page.tsx +4 -3
  134. package/src/modules/query_index/components/QueryIndexesTable.tsx +7 -7
  135. package/src/modules/query_index/lib/engine.ts +1 -1
  136. package/src/modules/resources/backend/resources/resource-types/page.tsx +3 -2
  137. package/src/modules/resources/backend/resources/resources/page.tsx +3 -3
  138. package/src/modules/resources/commands/resources.ts +1 -1
  139. package/src/modules/resources/lib/seeds.ts +1 -1
  140. package/src/modules/sales/api/dashboard/widgets/new-orders/route.ts +1 -1
  141. package/src/modules/sales/api/dashboard/widgets/new-quotes/route.ts +1 -1
  142. package/src/modules/sales/backend/sales/channels/page.tsx +3 -3
  143. package/src/modules/sales/commands/documents.ts +2 -2
  144. package/src/modules/sales/components/channels/offerTableUtils.tsx +2 -3
  145. package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +4 -4
  146. package/src/modules/sales/components/documents/ShipmentDialog.tsx +1 -1
  147. package/src/modules/sales/lib/shipments/snapshots.ts +1 -1
  148. package/src/modules/sales/widgets/notifications/SalesOrderCreatedRenderer.tsx +0 -8
  149. package/src/modules/sales/widgets/notifications/SalesQuoteCreatedRenderer.tsx +0 -8
  150. package/src/modules/staff/backend/staff/leave-requests/page.tsx +3 -3
  151. package/src/modules/staff/backend/staff/my-leave-requests/page.tsx +3 -3
  152. package/src/modules/staff/backend/staff/team-members/page.tsx +3 -3
  153. package/src/modules/staff/backend/staff/team-roles/page.tsx +2 -2
  154. package/src/modules/staff/backend/staff/teams/[id]/edit/page.tsx +4 -3
  155. package/src/modules/staff/backend/staff/teams/page.tsx +3 -2
  156. package/src/modules/workflows/backend/instances/page.tsx +2 -2
  157. package/src/modules/workflows/backend/tasks/page.tsx +1 -1
  158. package/src/modules/workflows/components/DefinitionTriggersEditor.tsx +1 -1
  159. package/src/modules/workflows/lib/graph-utils.ts +1 -1
  160. package/dist/modules/integrations/acl.js +0 -8
  161. package/dist/modules/integrations/acl.js.map +0 -7
  162. package/dist/modules/integrations/data/enrichers.js +0 -72
  163. package/dist/modules/integrations/data/enrichers.js.map +0 -7
  164. package/dist/modules/integrations/data/entities.js +0 -63
  165. package/dist/modules/integrations/data/entities.js.map +0 -7
  166. package/dist/modules/integrations/index.js +0 -9
  167. package/dist/modules/integrations/index.js.map +0 -7
  168. package/dist/modules/integrations/setup.js +0 -13
  169. package/dist/modules/integrations/setup.js.map +0 -7
  170. package/dist/modules/integrations/widgets/injection/external-ids/widget.client.js +0 -69
  171. package/dist/modules/integrations/widgets/injection/external-ids/widget.client.js.map +0 -7
  172. package/dist/modules/integrations/widgets/injection-table.js +0 -13
  173. package/dist/modules/integrations/widgets/injection-table.js.map +0 -7
  174. package/src/modules/integrations/acl.ts +0 -4
  175. package/src/modules/integrations/data/enrichers.ts +0 -98
  176. package/src/modules/integrations/data/entities.ts +0 -46
  177. package/src/modules/integrations/index.ts +0 -5
  178. package/src/modules/integrations/setup.ts +0 -11
  179. package/src/modules/integrations/widgets/injection/external-ids/widget.client.tsx +0 -94
  180. package/src/modules/integrations/widgets/injection-table.ts +0 -17
@@ -41,7 +41,7 @@ export function normalizeOptionSchemaCode(value?: string | null): string {
41
41
  .trim()
42
42
  .replace(/[^a-z0-9\-_]+/g, '-')
43
43
  .replace(/-+/g, '-')
44
- .replace(/(?:^-+|-+$)/g, '')
44
+ .replace(/^-+|-+$/g, '')
45
45
  return slug.slice(0, OPTION_SCHEMA_CODE_MAX_LENGTH)
46
46
  }
47
47
 
@@ -85,7 +85,7 @@ const normalizePriceKind = (input: PriceKindApiPayload | null | undefined): Pric
85
85
  }
86
86
  const toBooleanValue = (value: unknown): boolean | null => (typeof value === 'boolean' ? value : null)
87
87
  const resolveDisplayMode = (value: string | null): PriceKind['displayMode'] =>
88
- value === 'including-tax' ? 'including-tax' : 'excluding-tax'
88
+ value === 'including-tax' ? 'including-tax' : value === 'excluding-tax' ? 'excluding-tax' : 'excluding-tax'
89
89
 
90
90
  const displayMode = resolveDisplayMode(
91
91
  toStringValue(raw.displayMode) ?? toStringValue(raw.display_mode),
@@ -284,7 +284,7 @@ export const buildOptionValuesKey = (
284
284
  ): string => {
285
285
  if (!optionValues) return "";
286
286
  return Object.keys(optionValues)
287
- .sort((a, b) => a.localeCompare(b))
287
+ .sort()
288
288
  .map((key) => `${key}:${optionValues[key] ?? ""}`)
289
289
  .join("|");
290
290
  };
@@ -40,7 +40,7 @@ export function compareVersions(a: string, b: string): number {
40
40
  export const upgradeActions: UpgradeActionDefinition[] = []
41
41
 
42
42
  export function actionsUpToVersion(version: string): UpgradeActionDefinition[] {
43
- return upgradeActions // NOSONAR — upgradeActions is populated at boot time by modules
43
+ return upgradeActions
44
44
  .filter((action) => compareVersions(action.version, version) <= 0)
45
45
  .sort((a, b) => compareVersions(a.version, b.version) || a.id.localeCompare(b.id))
46
46
  }
@@ -67,7 +67,7 @@ export class RaiffeisenPolandProvider implements RateProvider {
67
67
  }
68
68
 
69
69
  // Get FIRST time slot (opening rates)
70
- const times = Object.keys(data.rates).sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
70
+ const times = Object.keys(data.rates).sort()
71
71
  const firstTime = times[0]
72
72
  const rates = data.rates[firstTime]
73
73
 
@@ -4,7 +4,7 @@ import * as React from 'react'
4
4
  import Link from 'next/link'
5
5
  import { useRouter } from 'next/navigation'
6
6
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
7
- import { DataTable, type DataTableExportFormat, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
7
+ import { DataTable, type DataTableExportFormat } from '@open-mercato/ui/backend/DataTable'
8
8
  import type { ColumnDef } from '@tanstack/react-table'
9
9
  import { Button } from '@open-mercato/ui/primitives/button'
10
10
  import { RowActions } from '@open-mercato/ui/backend/RowActions'
@@ -85,7 +85,7 @@ function mapApiItem(item: Record<string, unknown>): CompanyRow | null {
85
85
  customFields[key] = value
86
86
  }
87
87
  }
88
- return withDataTableNamespaces({
88
+ return {
89
89
  id,
90
90
  name,
91
91
  description,
@@ -100,7 +100,7 @@ function mapApiItem(item: Record<string, unknown>): CompanyRow | null {
100
100
  organizationId,
101
101
  source,
102
102
  ...customFields,
103
- }, item)
103
+ }
104
104
  }
105
105
 
106
106
  export default function CustomersCompaniesPage() {
@@ -6,7 +6,7 @@ import { usePathname, useRouter, useSearchParams } from 'next/navigation'
6
6
  import { useQueryClient } from '@tanstack/react-query'
7
7
  import type { ColumnDef } from '@tanstack/react-table'
8
8
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
9
- import { DataTable, type DataTableExportFormat, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
9
+ import { DataTable, type DataTableExportFormat } from '@open-mercato/ui/backend/DataTable'
10
10
  import type { FilterDef, FilterValues } from '@open-mercato/ui/backend/FilterBar'
11
11
  import { apiCall } from '@open-mercato/ui/backend/utils/apiCall'
12
12
  import { buildCrudExportUrl, deleteCrud } from '@open-mercato/ui/backend/utils/crud'
@@ -1026,7 +1026,7 @@ function mapDeal(item: Record<string, unknown>): DealRow | null {
1026
1026
  for (const [key, value] of Object.entries(item)) {
1027
1027
  if (key.startsWith('cf_')) customFields[key] = value
1028
1028
  }
1029
- return withDataTableNamespaces({
1029
+ return {
1030
1030
  id,
1031
1031
  title,
1032
1032
  status,
@@ -1041,5 +1041,5 @@ function mapDeal(item: Record<string, unknown>): DealRow | null {
1041
1041
  people,
1042
1042
  companies,
1043
1043
  ...customFields,
1044
- }, item)
1044
+ }
1045
1045
  }
@@ -4,7 +4,7 @@ import * as React from 'react'
4
4
  import Link from 'next/link'
5
5
  import { useRouter } from 'next/navigation'
6
6
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
7
- import { DataTable, type DataTableExportFormat, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
7
+ import { DataTable, type DataTableExportFormat } from '@open-mercato/ui/backend/DataTable'
8
8
  import type { ColumnDef } from '@tanstack/react-table'
9
9
  import { Button } from '@open-mercato/ui/primitives/button'
10
10
  import { RowActions } from '@open-mercato/ui/backend/RowActions'
@@ -101,7 +101,7 @@ function mapApiItem(item: Record<string, unknown>): PersonRow | null {
101
101
  customFields[key] = value
102
102
  }
103
103
  }
104
- return withDataTableNamespaces({
104
+ return {
105
105
  id,
106
106
  name,
107
107
  description,
@@ -116,7 +116,7 @@ function mapApiItem(item: Record<string, unknown>): PersonRow | null {
116
116
  organizationId,
117
117
  source,
118
118
  ...customFields,
119
- }, item)
119
+ }
120
120
  }
121
121
 
122
122
  export default function CustomersPeoplePage() {
@@ -995,7 +995,7 @@ function slugifyValue(value: string): string {
995
995
  return value
996
996
  .toLowerCase()
997
997
  .replace(/[^a-z0-9]+/g, '-')
998
- .replace(/(?:^-+|-+$)/g, '')
998
+ .replace(/^-+|-+$/g, '')
999
999
  }
1000
1000
 
1001
1001
  function buildPhone(index: number): string {
@@ -1171,7 +1171,7 @@ function resolveCurrencyCodes(): string[] {
1171
1171
  console.warn('[customers.cli] Intl.supportedValuesOf("currency") unavailable; seeding minimal currency list.')
1172
1172
  return normalizedPriority
1173
1173
  }
1174
- uniqueSupported.sort((a, b) => a.localeCompare(b))
1174
+ uniqueSupported.sort()
1175
1175
  return [...normalizedPriority, ...uniqueSupported]
1176
1176
  }
1177
1177
 
@@ -30,7 +30,7 @@ export function isValidSocialUrl(
30
30
  if (!pathRequired) {
31
31
  return true
32
32
  }
33
- const normalizedPath = parsed.pathname.replace(/\/+/g, '/').replace(/(?:^\/|\/$)/g, '')
33
+ const normalizedPath = parsed.pathname.replace(/\/+/g, '/').replace(/^\/|\/$/g, '')
34
34
  return normalizedPath.length > 0
35
35
  }
36
36
 
@@ -302,7 +302,7 @@ const seedEncryptionMaps: ModuleCli = {
302
302
  }
303
303
 
304
304
  function normalizeKeyInput(value: string): string {
305
- return value.trim().replace(/(?:^['"]|['"]$)/g, '')
305
+ return value.trim().replace(/^['"]|['"]$/g, '')
306
306
  }
307
307
 
308
308
  class DerivedKeyKmsService implements KmsService {
@@ -48,7 +48,7 @@ function normalizeValue(value: unknown): unknown {
48
48
  if (Array.isArray(value)) return value.map((item) => normalizeValue(item))
49
49
  if (value && typeof value === 'object') {
50
50
  return Object.keys(value as Record<string, unknown>)
51
- .sort((a, b) => a.localeCompare(b))
51
+ .sort()
52
52
  .reduce<Record<string, unknown>>((acc, key) => {
53
53
  acc[key] = normalizeValue((value as Record<string, unknown>)[key])
54
54
  return acc
@@ -58,7 +58,7 @@ function normalizeValue(value: unknown): unknown {
58
58
  if (Array.isArray(value)) return value.map((item) => normalizeValue(item))
59
59
  if (value && typeof value === 'object') {
60
60
  return Object.keys(value as Record<string, unknown>)
61
- .sort((a, b) => a.localeCompare(b))
61
+ .sort()
62
62
  .reduce<Record<string, unknown>>((acc, key) => {
63
63
  acc[key] = normalizeValue((value as Record<string, unknown>)[key])
64
64
  return acc
@@ -106,7 +106,7 @@ function parseAddressField(value: string | undefined | null): { name?: string; e
106
106
  if (!value) return { email: '' }
107
107
  const match = value.match(/^(.+?)\s*<([^>]+)>$/)
108
108
  if (match) {
109
- return { name: match[1].trim().replace(/(?:^["']|["']$)/g, ''), email: match[2].trim().toLowerCase() }
109
+ return { name: match[1].trim().replace(/^["']|["']$/g, ''), email: match[2].trim().toLowerCase() }
110
110
  }
111
111
  return { email: value.trim().toLowerCase() }
112
112
  }
@@ -43,14 +43,6 @@ export function ProposalCreatedRenderer({
43
43
  isUnread && 'bg-amber-50/50 dark:bg-amber-950/20',
44
44
  )}
45
45
  onClick={handleReview}
46
- onKeyDown={(e) => {
47
- if (e.key === 'Enter' || e.key === ' ') {
48
- e.preventDefault()
49
- handleReview()
50
- }
51
- }}
52
- role="button"
53
- tabIndex={0}
54
46
  >
55
47
  {isUnread && (
56
48
  <div className="absolute left-1.5 top-1/2 -translate-y-1/2 h-2 w-2 rounded-full bg-primary" />
@@ -52,7 +52,7 @@ const scopeKey = (scope: PerspectiveScope) =>
52
52
  `${scope.userId}:${scope.tenantId ?? 'null'}:${scope.organizationId ?? 'null'}`
53
53
 
54
54
  const userCacheKey = (scope: PerspectiveScope, tableId: string, roleIds: string[]) =>
55
- `perspectives:user-state:${scopeKey(scope)}:${tableId}:${roleIds.sort((a, b) => a.localeCompare(b)).join(',')}`
55
+ `perspectives:user-state:${scopeKey(scope)}:${tableId}:${roleIds.sort().join(',')}`
56
56
 
57
57
  const userTag = (scope: PerspectiveScope, tableId?: string) =>
58
58
  tableId
@@ -8,7 +8,7 @@ import type { PluggableList } from 'unified'
8
8
  import ReactMarkdown from 'react-markdown'
9
9
  import remarkGfm from 'remark-gfm'
10
10
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
11
- import { DataTable, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
11
+ import { DataTable } from '@open-mercato/ui/backend/DataTable'
12
12
  import { RowActions } from '@open-mercato/ui/backend/RowActions'
13
13
  import { Button } from '@open-mercato/ui/primitives/button'
14
14
  import { readApiResultOrThrow } from '@open-mercato/ui/backend/utils/apiCall'
@@ -233,12 +233,13 @@ function mapRuleSet(item: Record<string, unknown>): RuleSetRow {
233
233
  : typeof item.updated_at === 'string'
234
234
  ? item.updated_at
235
235
  : null
236
- return withDataTableNamespaces({
236
+ return {
237
237
  id,
238
238
  name,
239
239
  description,
240
240
  timezone,
241
241
  updatedAt,
242
- }, item)
242
+ }
243
243
  }
244
244
 
245
+
@@ -376,17 +376,17 @@ export default function QueryIndexesTable() {
376
376
  perspective={{ tableId: 'query_index.status.list' }}
377
377
  rowActions={(row) => {
378
378
  const items: Array<{ id: string; label: string; onSelect: () => void; destructive?: boolean }> = [
379
- { id: 'reindex', label: t('query_index.table.actions.reindex'), onSelect: () => void trigger('reindex', row.entityId) },
379
+ { id: 'reindex', label: t('query_index.table.actions.reindex'), onSelect: () => trigger('reindex', row.entityId) },
380
380
  {
381
381
  id: 'reindex-force',
382
382
  label: t('query_index.table.actions.reindexForce'),
383
- onSelect: () => void trigger('reindex', row.entityId, { force: true }),
383
+ onSelect: () => trigger('reindex', row.entityId, { force: true }),
384
384
  },
385
385
  {
386
386
  id: 'purge',
387
387
  label: t('query_index.table.actions.purge'),
388
388
  destructive: true,
389
- onSelect: () => void trigger('purge', row.entityId),
389
+ onSelect: () => trigger('purge', row.entityId),
390
390
  },
391
391
  ]
392
392
 
@@ -395,13 +395,13 @@ export default function QueryIndexesTable() {
395
395
  {
396
396
  id: 'vector-reindex',
397
397
  label: t('query_index.table.actions.vectorReindex'),
398
- onSelect: () => void triggerVector('reindex', row.entityId),
398
+ onSelect: () => triggerVector('reindex', row.entityId),
399
399
  },
400
400
  {
401
401
  id: 'vector-purge',
402
402
  label: t('query_index.table.actions.vectorPurge'),
403
403
  destructive: true,
404
- onSelect: () => void triggerVector('purge', row.entityId),
404
+ onSelect: () => triggerVector('purge', row.entityId),
405
405
  },
406
406
  )
407
407
  }
@@ -411,13 +411,13 @@ export default function QueryIndexesTable() {
411
411
  {
412
412
  id: 'fulltext-reindex',
413
413
  label: t('query_index.table.actions.fulltextReindex'),
414
- onSelect: () => void triggerFulltext('reindex', row.entityId),
414
+ onSelect: () => triggerFulltext('reindex', row.entityId),
415
415
  },
416
416
  {
417
417
  id: 'fulltext-purge',
418
418
  label: t('query_index.table.actions.fulltextPurge'),
419
419
  destructive: true,
420
- onSelect: () => void triggerFulltext('purge', row.entityId),
420
+ onSelect: () => triggerFulltext('purge', row.entityId),
421
421
  },
422
422
  )
423
423
  }
@@ -1350,7 +1350,7 @@ export class HybridQueryEngine implements QueryEngine {
1350
1350
  }
1351
1351
 
1352
1352
  private customFieldKeysCacheKey(entityIds: string[], tenantId: string | null): string {
1353
- const sorted = entityIds.slice().sort((a, b) => a.localeCompare(b)).join(',')
1353
+ const sorted = entityIds.slice().sort().join(',')
1354
1354
  return `${tenantId ?? '__none__'}|${sorted}`
1355
1355
  }
1356
1356
 
@@ -8,7 +8,7 @@ import type { PluggableList } from 'unified'
8
8
  import ReactMarkdown from 'react-markdown'
9
9
  import remarkGfm from 'remark-gfm'
10
10
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
11
- import { DataTable, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
11
+ import { DataTable } from '@open-mercato/ui/backend/DataTable'
12
12
  import { Button } from '@open-mercato/ui/primitives/button'
13
13
  import { RowActions } from '@open-mercato/ui/backend/RowActions'
14
14
  import { flash } from '@open-mercato/ui/backend/FlashMessages'
@@ -317,6 +317,7 @@ function mapApiResourceType(item: Record<string, unknown>): ResourceTypeRow {
317
317
  : typeof item.resource_count === 'number'
318
318
  ? item.resource_count
319
319
  : 0
320
- return withDataTableNamespaces({ id, name, description, appearanceIcon, appearanceColor, updatedAt, resourceCount }, item)
320
+ return { id, name, description, appearanceIcon, appearanceColor, updatedAt, resourceCount }
321
321
  }
322
322
 
323
+
@@ -5,7 +5,7 @@ import Link from 'next/link'
5
5
  import { usePathname, useRouter, useSearchParams } from 'next/navigation'
6
6
  import type { ColumnDef } from '@tanstack/react-table'
7
7
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
8
- import { DataTable, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
8
+ import { DataTable } from '@open-mercato/ui/backend/DataTable'
9
9
  import { RowActions } from '@open-mercato/ui/backend/RowActions'
10
10
  import { Button } from '@open-mercato/ui/primitives/button'
11
11
  import { BooleanIcon } from '@open-mercato/ui/backend/ValueIcons'
@@ -534,7 +534,7 @@ function mapApiResource(item: Record<string, unknown>): ResourceRow {
534
534
  ? item.appearance_color
535
535
  : null
536
536
  const tags = Array.isArray(item.tags) ? item.tags as TagOption[] : []
537
- return withDataTableNamespaces({
537
+ return {
538
538
  id,
539
539
  name,
540
540
  resourceTypeId,
@@ -543,5 +543,5 @@ function mapApiResource(item: Record<string, unknown>): ResourceRow {
543
543
  isActive,
544
544
  appearanceIcon,
545
545
  appearanceColor,
546
- }, item)
546
+ }
547
547
  }
@@ -134,7 +134,7 @@ async function loadResourceSnapshot(em: EntityManager, id: string): Promise<Reso
134
134
  const tags = assignments
135
135
  .map((assignment) => (assignment.tag as ResourcesResourceTag | undefined)?.id ?? null)
136
136
  .filter((tagId): tagId is string => typeof tagId === 'string' && tagId.length > 0)
137
- .sort((a, b) => a.localeCompare(b))
137
+ .sort()
138
138
  return {
139
139
  id: resource.id,
140
140
  tenantId: resource.tenantId,
@@ -317,7 +317,7 @@ function normalizeAssetTag(value: string): string {
317
317
  const trimmed = value.trim()
318
318
  if (!trimmed) return 'RESOURCE'
319
319
  const upper = trimmed.toUpperCase()
320
- const normalized = upper.replace(/[^A-Z0-9]+/g, '-').replace(/(?:^-+|-+$)/g, '')
320
+ const normalized = upper.replace(/[^A-Z0-9]+/g, '-').replace(/^-+|-+$/g, '')
321
321
  return normalized || 'RESOURCE'
322
322
  }
323
323
 
@@ -63,7 +63,7 @@ type NewOrdersWidgetResponse = {
63
63
  function normalizeOrganizationIds(organizationIds: string[] | null): string[] | null {
64
64
  if (organizationIds === null) return null
65
65
  const set = new Set(organizationIds)
66
- return Array.from(set).sort((a, b) => a.localeCompare(b))
66
+ return Array.from(set).sort()
67
67
  }
68
68
 
69
69
  function buildCacheKey(params: {
@@ -64,7 +64,7 @@ type NewQuotesWidgetResponse = {
64
64
  function normalizeOrganizationIds(organizationIds: string[] | null): string[] | null {
65
65
  if (organizationIds === null) return null
66
66
  const set = new Set(organizationIds)
67
- return Array.from(set).sort((a, b) => a.localeCompare(b))
67
+ return Array.from(set).sort()
68
68
  }
69
69
 
70
70
  function buildCacheKey(params: {
@@ -5,7 +5,7 @@ import { useRouter } from 'next/navigation'
5
5
  import Link from 'next/link'
6
6
  import type { ColumnDef, SortingState } from '@tanstack/react-table'
7
7
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
8
- import { DataTable, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
8
+ import { DataTable } from '@open-mercato/ui/backend/DataTable'
9
9
  import { Button } from '@open-mercato/ui/primitives/button'
10
10
  import { RowActions } from '@open-mercato/ui/backend/RowActions'
11
11
  import { BooleanIcon } from '@open-mercato/ui/backend/ValueIcons'
@@ -217,7 +217,7 @@ export default function SalesChannelsPage() {
217
217
 
218
218
  function mapApiChannel(item: Record<string, unknown>): ChannelRow {
219
219
  const id = typeof item.id === 'string' ? item.id : ''
220
- return withDataTableNamespaces({
220
+ return {
221
221
  id,
222
222
  name: typeof item.name === 'string' ? item.name : id,
223
223
  code: typeof item.code === 'string' && item.code.length ? item.code : null,
@@ -233,5 +233,5 @@ function mapApiChannel(item: Record<string, unknown>): ChannelRow {
233
233
  : typeof item.updated_at === 'string'
234
234
  ? item.updated_at
235
235
  : null,
236
- }, item)
236
+ }
237
237
  }
@@ -3216,8 +3216,8 @@ function buildTagChange(
3216
3216
  ): { from: string[]; to: string[] } | null {
3217
3217
  const beforeIds = normalizeTagIds(beforeTags?.map((tag) => tag.tagId));
3218
3218
  const afterIds = normalizeTagIds(afterTags?.map((tag) => tag.tagId));
3219
- beforeIds.sort((a, b) => a.localeCompare(b));
3220
- afterIds.sort((a, b) => a.localeCompare(b));
3219
+ beforeIds.sort();
3220
+ afterIds.sort();
3221
3221
  if (
3222
3222
  beforeIds.length === afterIds.length &&
3223
3223
  beforeIds.every((id, index) => id === afterIds[index])
@@ -1,5 +1,4 @@
1
1
  import * as React from 'react'
2
- import { withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
3
2
 
4
3
  type Translator = (key: string, fallback: string, vars?: Record<string, unknown>) => string
5
4
 
@@ -46,7 +45,7 @@ export function mapOfferRow(item: Record<string, unknown>): OfferRow {
46
45
  : item.product_channel_price && typeof item.product_channel_price === 'object'
47
46
  ? item.product_channel_price as Record<string, unknown>
48
47
  : null
49
- return withDataTableNamespaces({
48
+ return {
50
49
  id: typeof item.id === 'string' ? item.id : '',
51
50
  channelId: typeof item.channelId === 'string'
52
51
  ? item.channelId
@@ -81,7 +80,7 @@ export function mapOfferRow(item: Record<string, unknown>): OfferRow {
81
80
  : typeof item.updated_at === 'string'
82
81
  ? item.updated_at
83
82
  : null,
84
- }, item)
83
+ }
85
84
  }
86
85
 
87
86
  export function renderOfferPriceSummary(
@@ -5,7 +5,7 @@ import Link from 'next/link'
5
5
  import { useRouter } from 'next/navigation'
6
6
  import type { ColumnDef, SortingState } from '@tanstack/react-table'
7
7
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
8
- import { DataTable, type DataTableExportFormat, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
8
+ import { DataTable, type DataTableExportFormat } from '@open-mercato/ui/backend/DataTable'
9
9
  import type { FilterDef, FilterValues } from '@open-mercato/ui/backend/FilterBar'
10
10
  import { RowActions } from '@open-mercato/ui/backend/RowActions'
11
11
  import { Button } from '@open-mercato/ui/primitives/button'
@@ -232,7 +232,7 @@ export function SalesDocumentsTable({ kind }: { kind: SalesDocumentKind }) {
232
232
  ? item.primary_email.trim()
233
233
  : null
234
234
  const label = email ? `${name} (${email})` : name
235
- return { value: id, label }
235
+ return { value: id, label: kind === 'company' ? label : label }
236
236
  }
237
237
  const options = [...peopleItems.map((i) => parseOption(i, 'person')), ...companyItems.map((i) => parseOption(i, 'company'))]
238
238
  .filter((opt): opt is FilterOption => !!opt)
@@ -449,7 +449,7 @@ export function SalesDocumentsTable({ kind }: { kind: SalesDocumentKind }) {
449
449
  const validUntil = doc.validUntil ?? null
450
450
  const createdAt = doc.createdAt ?? null
451
451
  const date = placedAt ?? validUntil ?? createdAt ?? null
452
- return withDataTableNamespaces({
452
+ return {
453
453
  id,
454
454
  number,
455
455
  status: doc.status ?? null,
@@ -461,7 +461,7 @@ export function SalesDocumentsTable({ kind }: { kind: SalesDocumentKind }) {
461
461
  totalGross,
462
462
  currency: doc.currencyCode ?? null,
463
463
  date,
464
- }, item)
464
+ }
465
465
  },
466
466
  [kind]
467
467
  )
@@ -171,7 +171,7 @@ const snapshotKey = (snapshot?: NormalizedAddressSnapshot | null): string | null
171
171
  if (!snapshot || typeof snapshot !== 'object') return null
172
172
  const normalized: Record<string, unknown> = {}
173
173
  Object.keys(snapshot)
174
- .sort((a, b) => a.localeCompare(b))
174
+ .sort()
175
175
  .forEach((key) => {
176
176
  normalized[key] = snapshot[key]
177
177
  })
@@ -26,7 +26,7 @@ const extractOrderLineId = (entry: SalesShipmentItem): string | null => {
26
26
  return typeof raw === 'string' ? raw : null
27
27
  }
28
28
 
29
- const ensureLineMap = async ( // NOSONAR — returns same Map ref but populated from DB between early return and final return
29
+ const ensureLineMap = async (
30
30
  em: EntityManager,
31
31
  items: SalesShipmentItem[],
32
32
  lineMap?: Map<string, SalesOrderLine>
@@ -63,14 +63,6 @@ export function SalesOrderCreatedRenderer({
63
63
  isUnread && 'bg-blue-50/50 dark:bg-blue-950/20'
64
64
  )}
65
65
  onClick={handleView}
66
- onKeyDown={(e) => {
67
- if (e.key === 'Enter' || e.key === ' ') {
68
- e.preventDefault()
69
- handleView()
70
- }
71
- }}
72
- role="button"
73
- tabIndex={0}
74
66
  >
75
67
  {isUnread && (
76
68
  <div className="absolute left-1.5 top-1/2 -translate-y-1/2 h-2 w-2 rounded-full bg-primary" />
@@ -63,14 +63,6 @@ export function SalesQuoteCreatedRenderer({
63
63
  isUnread && 'bg-amber-50/50 dark:bg-amber-950/20'
64
64
  )}
65
65
  onClick={handleView}
66
- onKeyDown={(e) => {
67
- if (e.key === 'Enter' || e.key === ' ') {
68
- e.preventDefault()
69
- handleView()
70
- }
71
- }}
72
- role="button"
73
- tabIndex={0}
74
66
  >
75
67
  {isUnread && (
76
68
  <div className="absolute left-1.5 top-1/2 -translate-y-1/2 h-2 w-2 rounded-full bg-primary" />
@@ -5,7 +5,7 @@ import Link from 'next/link'
5
5
  import { useRouter } from 'next/navigation'
6
6
  import type { ColumnDef, SortingState } from '@tanstack/react-table'
7
7
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
8
- import { DataTable, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
8
+ import { DataTable } from '@open-mercato/ui/backend/DataTable'
9
9
  import { Badge } from '@open-mercato/ui/primitives/badge'
10
10
  import { Button } from '@open-mercato/ui/primitives/button'
11
11
  import { readApiResultOrThrow } from '@open-mercato/ui/backend/utils/apiCall'
@@ -209,7 +209,7 @@ function mapLeaveRequest(item: Record<string, unknown>): LeaveRequestRow {
209
209
  : typeof item.updated_at === 'string'
210
210
  ? item.updated_at
211
211
  : null
212
- return withDataTableNamespaces({
212
+ return {
213
213
  id,
214
214
  memberName,
215
215
  startDate,
@@ -217,7 +217,7 @@ function mapLeaveRequest(item: Record<string, unknown>): LeaveRequestRow {
217
217
  status,
218
218
  reason,
219
219
  updatedAt,
220
- }, item)
220
+ }
221
221
  }
222
222
 
223
223
  function formatDateRange(start?: string | null, end?: string | null): string {
@@ -5,7 +5,7 @@ import Link from 'next/link'
5
5
  import { useRouter } from 'next/navigation'
6
6
  import type { ColumnDef, SortingState } from '@tanstack/react-table'
7
7
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
8
- import { DataTable, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
8
+ import { DataTable } from '@open-mercato/ui/backend/DataTable'
9
9
  import { Badge } from '@open-mercato/ui/primitives/badge'
10
10
  import { Button } from '@open-mercato/ui/primitives/button'
11
11
  import { readApiResultOrThrow } from '@open-mercato/ui/backend/utils/apiCall'
@@ -215,14 +215,14 @@ function mapLeaveRequest(item: Record<string, unknown>): LeaveRequestRow {
215
215
  : typeof item.updated_at === 'string'
216
216
  ? item.updated_at
217
217
  : null
218
- return withDataTableNamespaces({
218
+ return {
219
219
  id,
220
220
  startDate,
221
221
  endDate,
222
222
  status,
223
223
  reason,
224
224
  updatedAt,
225
- }, item)
225
+ }
226
226
  }
227
227
 
228
228
  function formatDateRange(start?: string | null, end?: string | null): string {
@@ -5,7 +5,7 @@ import Link from 'next/link'
5
5
  import { usePathname, useRouter, useSearchParams } from 'next/navigation'
6
6
  import type { ColumnDef, SortingFn, SortingState } from '@tanstack/react-table'
7
7
  import { Page, PageBody } from '@open-mercato/ui/backend/Page'
8
- import { DataTable, withDataTableNamespaces } from '@open-mercato/ui/backend/DataTable'
8
+ import { DataTable } from '@open-mercato/ui/backend/DataTable'
9
9
  import { RowActions } from '@open-mercato/ui/backend/RowActions'
10
10
  import { Button } from '@open-mercato/ui/primitives/button'
11
11
  import { BooleanIcon } from '@open-mercato/ui/backend/ValueIcons'
@@ -505,7 +505,7 @@ function mapApiTeamMember(item: Record<string, unknown>): TeamMemberApiRow {
505
505
  : null
506
506
  const team = item.team && typeof item.team === 'object' ? item.team as { name?: unknown } : null
507
507
  const teamName = typeof team?.name === 'string' ? team.name : null
508
- return withDataTableNamespaces({
508
+ return {
509
509
  id,
510
510
  displayName,
511
511
  description,
@@ -517,7 +517,7 @@ function mapApiTeamMember(item: Record<string, unknown>): TeamMemberApiRow {
517
517
  updatedAt,
518
518
  teamId,
519
519
  teamName,
520
- }, item)
520
+ }
521
521
  }
522
522
 
523
523
  function compareGroupedRows(