@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
@@ -1,94 +0,0 @@
1
- "use client"
2
-
3
- import * as React from 'react'
4
- import type { InjectionWidgetComponentProps } from '@open-mercato/shared/modules/widgets/injection'
5
- import type { ExternalIdMapping } from '@open-mercato/shared/modules/integrations/types'
6
- import { getIntegrationTitle } from '@open-mercato/shared/modules/integrations/types'
7
- import { useT } from '@open-mercato/shared/lib/i18n/context'
8
- import { cn } from '@open-mercato/shared/lib/utils'
9
-
10
- type IntegrationsData = Record<string, ExternalIdMapping>
11
-
12
- const SYNC_STATUS_STYLES: Record<ExternalIdMapping['syncStatus'], { dot: string; label: string }> = {
13
- synced: { dot: 'bg-green-500', label: 'integrations.syncStatus.synced' },
14
- pending: { dot: 'bg-yellow-500', label: 'integrations.syncStatus.pending' },
15
- error: { dot: 'bg-red-500', label: 'integrations.syncStatus.error' },
16
- not_synced: { dot: 'bg-gray-400', label: 'integrations.syncStatus.notSynced' },
17
- }
18
-
19
- function SyncStatusBadge({ status, lastSynced }: { status: ExternalIdMapping['syncStatus']; lastSynced?: string }) {
20
- const t = useT()
21
- const config = SYNC_STATUS_STYLES[status]
22
- const label = t(config.label, status)
23
-
24
- return (
25
- <span className="inline-flex items-center gap-1 text-xs text-muted-foreground">
26
- <span className={cn('inline-block size-1.5 rounded-full', config.dot)} aria-hidden="true" />
27
- <span>{label}</span>
28
- {lastSynced && (
29
- <span title={lastSynced}>
30
- {new Date(lastSynced).toLocaleDateString()}
31
- </span>
32
- )}
33
- </span>
34
- )
35
- }
36
-
37
- function ExternalLinkIcon() {
38
- return (
39
- <svg className="size-3.5" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5">
40
- <path d="M6.5 3.5H3a1 1 0 0 0-1 1V13a1 1 0 0 0 1 1h8.5a1 1 0 0 0 1-1V9.5" />
41
- <path d="M9.5 2h4.5v4.5M14 2 7.5 8.5" />
42
- </svg>
43
- )
44
- }
45
-
46
- export default function ExternalIdsWidget({ data }: InjectionWidgetComponentProps) {
47
- const t = useT()
48
- const integrations = (data as Record<string, unknown>)?._integrations as IntegrationsData | undefined
49
-
50
- if (!integrations || Object.keys(integrations).length === 0) return null
51
-
52
- return (
53
- <div className="rounded-lg border bg-card p-4">
54
- <h3 className="mb-3 text-sm font-medium">
55
- {t('integrations.externalIds.title', 'External IDs')}
56
- </h3>
57
- <div className="space-y-2">
58
- {Object.entries(integrations).map(([integrationId, mapping]) => (
59
- <div
60
- key={integrationId}
61
- className="flex items-center justify-between gap-2 rounded-md bg-muted/50 px-3 py-2"
62
- >
63
- <div className="flex items-center gap-2 min-w-0">
64
- <span className="text-sm font-medium truncate">
65
- {getIntegrationTitle(integrationId)}
66
- </span>
67
- <code className="rounded bg-muted px-1.5 py-0.5 text-xs font-mono text-muted-foreground">
68
- {mapping.externalId}
69
- </code>
70
- {mapping.externalUrl && (
71
- <a
72
- href={mapping.externalUrl}
73
- target="_blank"
74
- rel="noopener noreferrer"
75
- className="text-muted-foreground hover:text-foreground transition-colors"
76
- aria-label={t('integrations.externalIds.openExternal', 'Open in external system')}
77
- >
78
- <ExternalLinkIcon />
79
- </a>
80
- )}
81
- </div>
82
- <SyncStatusBadge status={mapping.syncStatus} lastSynced={mapping.lastSyncedAt} />
83
- </div>
84
- ))}
85
- </div>
86
- </div>
87
- )
88
- }
89
-
90
- ExternalIdsWidget.metadata = {
91
- id: 'integrations.injection.external-ids',
92
- title: 'External IDs',
93
- features: ['integrations.view'],
94
- }
@@ -1,17 +0,0 @@
1
- import type { ModuleInjectionTable } from '@open-mercato/shared/modules/widgets/injection'
2
-
3
- /**
4
- * Integrations module injection table.
5
- *
6
- * The external-ids widget auto-appears on entity detail pages via wildcard spot matching.
7
- * Status badge widgets are registered by individual integration modules (e.g. sync_medusa).
8
- */
9
- export const injectionTable: ModuleInjectionTable = {
10
- // External IDs widget appears in detail page sidebars for all entities
11
- 'detail:*:sidebar': {
12
- widgetId: 'integrations.injection.external-ids',
13
- priority: -10,
14
- },
15
- }
16
-
17
- export default injectionTable