@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.
- package/AGENTS.md +0 -22
- package/dist/modules/api_docs/frontend/docs/api/page.js +1 -1
- package/dist/modules/api_docs/frontend/docs/api/page.js.map +2 -2
- package/dist/modules/attachments/api/library/[id]/route.js +1 -0
- package/dist/modules/attachments/api/library/[id]/route.js.map +2 -2
- package/dist/modules/attachments/components/AttachmentLibrary.js +1 -1
- package/dist/modules/attachments/components/AttachmentLibrary.js.map +2 -2
- package/dist/modules/attachments/lib/partitionEnv.js +1 -1
- package/dist/modules/attachments/lib/partitionEnv.js.map +2 -2
- package/dist/modules/auth/backend/users/page.js +1 -1
- package/dist/modules/auth/backend/users/page.js.map +2 -2
- package/dist/modules/auth/cli.js +1 -1
- package/dist/modules/auth/cli.js.map +2 -2
- package/dist/modules/auth/commands/users.js +1 -1
- package/dist/modules/auth/commands/users.js.map +2 -2
- package/dist/modules/business_rules/components/utils/formHelpers.js +1 -1
- package/dist/modules/business_rules/components/utils/formHelpers.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/create/page.js +1 -1
- package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
- package/dist/modules/catalog/commands/products.js +1 -1
- package/dist/modules/catalog/commands/products.js.map +2 -2
- package/dist/modules/catalog/commands/shared.js +1 -1
- package/dist/modules/catalog/commands/shared.js.map +2 -2
- package/dist/modules/catalog/components/PriceKindSettings.js +1 -1
- package/dist/modules/catalog/components/PriceKindSettings.js.map +2 -2
- package/dist/modules/catalog/components/products/productForm.js +1 -1
- package/dist/modules/catalog/components/products/productForm.js.map +2 -2
- package/dist/modules/configs/lib/upgrade-actions.js.map +1 -1
- package/dist/modules/currencies/services/providers/raiffeisen.js +1 -1
- package/dist/modules/currencies/services/providers/raiffeisen.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies/page.js +3 -3
- package/dist/modules/customers/backend/customers/companies/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/page.js +3 -3
- package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people/page.js +3 -3
- package/dist/modules/customers/backend/customers/people/page.js.map +2 -2
- package/dist/modules/customers/cli.js +2 -2
- package/dist/modules/customers/cli.js.map +2 -2
- package/dist/modules/customers/lib/detailHelpers.js +1 -1
- package/dist/modules/customers/lib/detailHelpers.js.map +2 -2
- package/dist/modules/entities/cli.js +1 -1
- package/dist/modules/entities/cli.js.map +2 -2
- package/dist/modules/entities/lib/field-definitions.js +1 -1
- package/dist/modules/entities/lib/field-definitions.js.map +2 -2
- package/dist/modules/entities/lib/install-from-ce.js +1 -1
- package/dist/modules/entities/lib/install-from-ce.js.map +2 -2
- package/dist/modules/inbox_ops/lib/emailParser.js +1 -1
- package/dist/modules/inbox_ops/lib/emailParser.js.map +2 -2
- package/dist/modules/inbox_ops/widgets/notifications/ProposalCreatedRenderer.js +0 -8
- package/dist/modules/inbox_ops/widgets/notifications/ProposalCreatedRenderer.js.map +2 -2
- package/dist/modules/perspectives/services/perspectiveService.js +1 -1
- package/dist/modules/perspectives/services/perspectiveService.js.map +2 -2
- package/dist/modules/planner/backend/planner/availability-rulesets/page.js +3 -3
- package/dist/modules/planner/backend/planner/availability-rulesets/page.js.map +2 -2
- package/dist/modules/query_index/components/QueryIndexesTable.js +7 -7
- package/dist/modules/query_index/components/QueryIndexesTable.js.map +2 -2
- package/dist/modules/query_index/lib/engine.js +1 -1
- package/dist/modules/query_index/lib/engine.js.map +2 -2
- package/dist/modules/resources/backend/resources/resource-types/page.js +2 -2
- package/dist/modules/resources/backend/resources/resource-types/page.js.map +2 -2
- package/dist/modules/resources/backend/resources/resources/page.js +3 -3
- package/dist/modules/resources/backend/resources/resources/page.js.map +2 -2
- package/dist/modules/resources/commands/resources.js +1 -1
- package/dist/modules/resources/commands/resources.js.map +2 -2
- package/dist/modules/resources/lib/seeds.js +1 -1
- package/dist/modules/resources/lib/seeds.js.map +2 -2
- package/dist/modules/sales/api/dashboard/widgets/new-orders/route.js +1 -1
- package/dist/modules/sales/api/dashboard/widgets/new-orders/route.js.map +2 -2
- package/dist/modules/sales/api/dashboard/widgets/new-quotes/route.js +1 -1
- package/dist/modules/sales/api/dashboard/widgets/new-quotes/route.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/page.js +3 -3
- package/dist/modules/sales/backend/sales/channels/page.js.map +2 -2
- package/dist/modules/sales/commands/documents.js +2 -2
- package/dist/modules/sales/commands/documents.js.map +2 -2
- package/dist/modules/sales/components/channels/offerTableUtils.js +2 -3
- package/dist/modules/sales/components/channels/offerTableUtils.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js +4 -4
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
- package/dist/modules/sales/components/documents/ShipmentDialog.js +1 -1
- package/dist/modules/sales/components/documents/ShipmentDialog.js.map +2 -2
- package/dist/modules/sales/lib/shipments/snapshots.js.map +1 -1
- package/dist/modules/sales/widgets/notifications/SalesOrderCreatedRenderer.js +0 -8
- package/dist/modules/sales/widgets/notifications/SalesOrderCreatedRenderer.js.map +2 -2
- package/dist/modules/sales/widgets/notifications/SalesQuoteCreatedRenderer.js +0 -8
- package/dist/modules/sales/widgets/notifications/SalesQuoteCreatedRenderer.js.map +2 -2
- package/dist/modules/staff/backend/staff/leave-requests/page.js +3 -3
- package/dist/modules/staff/backend/staff/leave-requests/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/my-leave-requests/page.js +3 -3
- package/dist/modules/staff/backend/staff/my-leave-requests/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/team-members/page.js +3 -3
- package/dist/modules/staff/backend/staff/team-members/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/team-roles/page.js +2 -2
- package/dist/modules/staff/backend/staff/team-roles/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js +3 -3
- package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/teams/page.js +2 -2
- package/dist/modules/staff/backend/staff/teams/page.js.map +2 -2
- package/dist/modules/workflows/backend/instances/page.js +2 -2
- package/dist/modules/workflows/backend/instances/page.js.map +2 -2
- package/dist/modules/workflows/backend/tasks/page.js +1 -1
- package/dist/modules/workflows/backend/tasks/page.js.map +2 -2
- package/dist/modules/workflows/components/DefinitionTriggersEditor.js +1 -1
- package/dist/modules/workflows/components/DefinitionTriggersEditor.js.map +2 -2
- package/dist/modules/workflows/lib/graph-utils.js +1 -1
- package/dist/modules/workflows/lib/graph-utils.js.map +2 -2
- package/package.json +2 -2
- package/src/modules/api_docs/frontend/docs/api/page.tsx +1 -1
- package/src/modules/attachments/api/library/[id]/route.ts +1 -0
- package/src/modules/attachments/components/AttachmentLibrary.tsx +1 -1
- package/src/modules/attachments/lib/partitionEnv.ts +1 -1
- package/src/modules/auth/backend/users/page.tsx +1 -1
- package/src/modules/auth/cli.ts +1 -1
- package/src/modules/auth/commands/users.ts +1 -1
- package/src/modules/business_rules/components/utils/formHelpers.ts +1 -1
- package/src/modules/catalog/backend/catalog/products/create/page.tsx +1 -1
- package/src/modules/catalog/commands/products.ts +1 -1
- package/src/modules/catalog/commands/shared.ts +1 -1
- package/src/modules/catalog/components/PriceKindSettings.tsx +1 -1
- package/src/modules/catalog/components/products/productForm.ts +1 -1
- package/src/modules/configs/lib/upgrade-actions.ts +1 -1
- package/src/modules/currencies/services/providers/raiffeisen.ts +1 -1
- package/src/modules/customers/backend/customers/companies/page.tsx +3 -3
- package/src/modules/customers/backend/customers/deals/page.tsx +3 -3
- package/src/modules/customers/backend/customers/people/page.tsx +3 -3
- package/src/modules/customers/cli.ts +2 -2
- package/src/modules/customers/lib/detailHelpers.ts +1 -1
- package/src/modules/entities/cli.ts +1 -1
- package/src/modules/entities/lib/field-definitions.ts +1 -1
- package/src/modules/entities/lib/install-from-ce.ts +1 -1
- package/src/modules/inbox_ops/lib/emailParser.ts +1 -1
- package/src/modules/inbox_ops/widgets/notifications/ProposalCreatedRenderer.tsx +0 -8
- package/src/modules/perspectives/services/perspectiveService.ts +1 -1
- package/src/modules/planner/backend/planner/availability-rulesets/page.tsx +4 -3
- package/src/modules/query_index/components/QueryIndexesTable.tsx +7 -7
- package/src/modules/query_index/lib/engine.ts +1 -1
- package/src/modules/resources/backend/resources/resource-types/page.tsx +3 -2
- package/src/modules/resources/backend/resources/resources/page.tsx +3 -3
- package/src/modules/resources/commands/resources.ts +1 -1
- package/src/modules/resources/lib/seeds.ts +1 -1
- package/src/modules/sales/api/dashboard/widgets/new-orders/route.ts +1 -1
- package/src/modules/sales/api/dashboard/widgets/new-quotes/route.ts +1 -1
- package/src/modules/sales/backend/sales/channels/page.tsx +3 -3
- package/src/modules/sales/commands/documents.ts +2 -2
- package/src/modules/sales/components/channels/offerTableUtils.tsx +2 -3
- package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +4 -4
- package/src/modules/sales/components/documents/ShipmentDialog.tsx +1 -1
- package/src/modules/sales/lib/shipments/snapshots.ts +1 -1
- package/src/modules/sales/widgets/notifications/SalesOrderCreatedRenderer.tsx +0 -8
- package/src/modules/sales/widgets/notifications/SalesQuoteCreatedRenderer.tsx +0 -8
- package/src/modules/staff/backend/staff/leave-requests/page.tsx +3 -3
- package/src/modules/staff/backend/staff/my-leave-requests/page.tsx +3 -3
- package/src/modules/staff/backend/staff/team-members/page.tsx +3 -3
- package/src/modules/staff/backend/staff/team-roles/page.tsx +2 -2
- package/src/modules/staff/backend/staff/teams/[id]/edit/page.tsx +4 -3
- package/src/modules/staff/backend/staff/teams/page.tsx +3 -2
- package/src/modules/workflows/backend/instances/page.tsx +2 -2
- package/src/modules/workflows/backend/tasks/page.tsx +1 -1
- package/src/modules/workflows/components/DefinitionTriggersEditor.tsx +1 -1
- package/src/modules/workflows/lib/graph-utils.ts +1 -1
- package/dist/modules/integrations/acl.js +0 -8
- package/dist/modules/integrations/acl.js.map +0 -7
- package/dist/modules/integrations/data/enrichers.js +0 -72
- package/dist/modules/integrations/data/enrichers.js.map +0 -7
- package/dist/modules/integrations/data/entities.js +0 -63
- package/dist/modules/integrations/data/entities.js.map +0 -7
- package/dist/modules/integrations/index.js +0 -9
- package/dist/modules/integrations/index.js.map +0 -7
- package/dist/modules/integrations/setup.js +0 -13
- package/dist/modules/integrations/setup.js.map +0 -7
- package/dist/modules/integrations/widgets/injection/external-ids/widget.client.js +0 -69
- package/dist/modules/integrations/widgets/injection/external-ids/widget.client.js.map +0 -7
- package/dist/modules/integrations/widgets/injection-table.js +0 -13
- package/dist/modules/integrations/widgets/injection-table.js.map +0 -7
- package/src/modules/integrations/acl.ts +0 -4
- package/src/modules/integrations/data/enrichers.ts +0 -98
- package/src/modules/integrations/data/entities.ts +0 -46
- package/src/modules/integrations/index.ts +0 -5
- package/src/modules/integrations/setup.ts +0 -11
- package/src/modules/integrations/widgets/injection/external-ids/widget.client.tsx +0 -94
- 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
|