@open-mercato/core 0.6.1-develop.3246.1.dbef9d7392 → 0.6.1-develop.3260.1.dc719cac84

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 (130) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/helpers/integration/authFixtures.js.map +1 -1
  3. package/dist/helpers/integration/authUi.js +10 -2
  4. package/dist/helpers/integration/authUi.js.map +2 -2
  5. package/dist/helpers/integration/salesUi.js +3 -1
  6. package/dist/helpers/integration/salesUi.js.map +2 -2
  7. package/dist/modules/api_docs/frontend/docs/api/Explorer.js +10 -1
  8. package/dist/modules/api_docs/frontend/docs/api/Explorer.js.map +2 -2
  9. package/dist/modules/audit_logs/lib/display-helpers.js +28 -27
  10. package/dist/modules/audit_logs/lib/display-helpers.js.map +2 -2
  11. package/dist/modules/auth/api/users/route.js +21 -3
  12. package/dist/modules/auth/api/users/route.js.map +2 -2
  13. package/dist/modules/auth/backend/users/[id]/edit/page.js +6 -1
  14. package/dist/modules/auth/backend/users/[id]/edit/page.js.map +2 -2
  15. package/dist/modules/auth/backend/users/create/page.js +4 -1
  16. package/dist/modules/auth/backend/users/create/page.js.map +2 -2
  17. package/dist/modules/auth/backend/users/page.js +56 -2
  18. package/dist/modules/auth/backend/users/page.js.map +3 -3
  19. package/dist/modules/auth/commands/users.js +14 -0
  20. package/dist/modules/auth/commands/users.js.map +2 -2
  21. package/dist/modules/auth/data/validators.js +8 -0
  22. package/dist/modules/auth/data/validators.js.map +2 -2
  23. package/dist/modules/catalog/ai-agents.js +4 -0
  24. package/dist/modules/catalog/ai-agents.js.map +2 -2
  25. package/dist/modules/customers/ai-agents.js.map +2 -2
  26. package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +1 -1
  27. package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
  28. package/dist/modules/customers/backend/customers/deals/[id]/page.js +15 -9
  29. package/dist/modules/customers/backend/customers/deals/[id]/page.js.map +2 -2
  30. package/dist/modules/customers/backend/customers/deals/pipeline/page.js +26 -3
  31. package/dist/modules/customers/backend/customers/deals/pipeline/page.js.map +2 -2
  32. package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +1 -1
  33. package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +2 -2
  34. package/dist/modules/customers/components/PipelineSettings.js +108 -99
  35. package/dist/modules/customers/components/PipelineSettings.js.map +2 -2
  36. package/dist/modules/customers/components/detail/AssignRoleDialog.js +13 -5
  37. package/dist/modules/customers/components/detail/AssignRoleDialog.js.map +2 -2
  38. package/dist/modules/customers/components/detail/EntityTagsDialog.js +10 -2
  39. package/dist/modules/customers/components/detail/EntityTagsDialog.js.map +2 -2
  40. package/dist/modules/customers/components/detail/PersonCompaniesSection.js +15 -8
  41. package/dist/modules/customers/components/detail/PersonCompaniesSection.js.map +2 -2
  42. package/dist/modules/customers/components/detail/RolesSection.js +35 -22
  43. package/dist/modules/customers/components/detail/RolesSection.js.map +2 -2
  44. package/dist/modules/customers/components/detail/TasksSection.js +2 -2
  45. package/dist/modules/customers/components/detail/TasksSection.js.map +2 -2
  46. package/dist/modules/customers/components/detail/schedule/DateTimeFields.js +73 -64
  47. package/dist/modules/customers/components/detail/schedule/DateTimeFields.js.map +2 -2
  48. package/dist/modules/customers/components/linking/LinkEntityDialog.js +11 -2
  49. package/dist/modules/customers/components/linking/LinkEntityDialog.js.map +2 -2
  50. package/dist/modules/data_sync/backend/data-sync/page.js +2 -9
  51. package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
  52. package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.js +14 -29
  53. package/dist/modules/data_sync/backend/data-sync/runs/[id]/page.js.map +2 -2
  54. package/dist/modules/dictionaries/components/DictionariesManager.js +10 -2
  55. package/dist/modules/dictionaries/components/DictionariesManager.js.map +2 -2
  56. package/dist/modules/entities/components/EncryptionManager.js +40 -17
  57. package/dist/modules/entities/components/EncryptionManager.js.map +2 -2
  58. package/dist/modules/inbox_ops/lib/llmProvider.js.map +2 -2
  59. package/dist/modules/integrations/backend/integrations/[id]/page.js +79 -95
  60. package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
  61. package/dist/modules/payment_gateways/backend/payment-gateways/page.js +49 -70
  62. package/dist/modules/payment_gateways/backend/payment-gateways/page.js.map +2 -2
  63. package/dist/modules/planner/components/AvailabilityRuleSetForm.js +1 -1
  64. package/dist/modules/planner/components/AvailabilityRuleSetForm.js.map +1 -1
  65. package/dist/modules/planner/components/AvailabilityRulesEditor.js +19 -19
  66. package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
  67. package/dist/modules/resources/components/ResourceCrudForm.js +1 -1
  68. package/dist/modules/resources/components/ResourceCrudForm.js.map +1 -1
  69. package/dist/modules/resources/components/ResourceTypeCrudForm.js +1 -1
  70. package/dist/modules/resources/components/ResourceTypeCrudForm.js.map +2 -2
  71. package/dist/modules/sales/components/documents/ReturnDialog.js +11 -8
  72. package/dist/modules/sales/components/documents/ReturnDialog.js.map +2 -2
  73. package/dist/modules/staff/backend/staff/profile/create/page.js +1 -1
  74. package/dist/modules/staff/backend/staff/profile/create/page.js.map +2 -2
  75. package/dist/modules/staff/components/TeamForm.js +1 -1
  76. package/dist/modules/staff/components/TeamForm.js.map +2 -2
  77. package/dist/modules/staff/components/TeamMemberForm.js +1 -1
  78. package/dist/modules/staff/components/TeamMemberForm.js.map +1 -1
  79. package/dist/modules/staff/components/TeamRoleForm.js +1 -1
  80. package/dist/modules/staff/components/TeamRoleForm.js.map +2 -2
  81. package/package.json +5 -5
  82. package/src/helpers/integration/authFixtures.ts +1 -1
  83. package/src/helpers/integration/authUi.ts +11 -2
  84. package/src/helpers/integration/salesUi.ts +10 -1
  85. package/src/modules/api_docs/frontend/docs/api/Explorer.tsx +7 -3
  86. package/src/modules/audit_logs/lib/display-helpers.tsx +22 -14
  87. package/src/modules/auth/api/users/route.ts +22 -3
  88. package/src/modules/auth/backend/users/[id]/edit/page.tsx +9 -1
  89. package/src/modules/auth/backend/users/create/page.tsx +6 -2
  90. package/src/modules/auth/backend/users/page.tsx +60 -3
  91. package/src/modules/auth/commands/users.ts +15 -0
  92. package/src/modules/auth/data/validators.ts +8 -0
  93. package/src/modules/auth/i18n/de.json +4 -0
  94. package/src/modules/auth/i18n/en.json +4 -0
  95. package/src/modules/auth/i18n/es.json +4 -0
  96. package/src/modules/auth/i18n/pl.json +4 -0
  97. package/src/modules/catalog/ai-agents.ts +8 -49
  98. package/src/modules/customers/ai-agents.ts +4 -51
  99. package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +1 -1
  100. package/src/modules/customers/backend/customers/deals/[id]/page.tsx +12 -13
  101. package/src/modules/customers/backend/customers/deals/pipeline/page.tsx +17 -13
  102. package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +1 -1
  103. package/src/modules/customers/components/PipelineSettings.tsx +95 -95
  104. package/src/modules/customers/components/detail/AssignRoleDialog.tsx +7 -4
  105. package/src/modules/customers/components/detail/EntityTagsDialog.tsx +13 -8
  106. package/src/modules/customers/components/detail/PersonCompaniesSection.tsx +16 -12
  107. package/src/modules/customers/components/detail/RolesSection.tsx +34 -31
  108. package/src/modules/customers/components/detail/TasksSection.tsx +16 -8
  109. package/src/modules/customers/components/detail/schedule/DateTimeFields.tsx +77 -51
  110. package/src/modules/customers/components/linking/LinkEntityDialog.tsx +7 -3
  111. package/src/modules/data_sync/backend/data-sync/page.tsx +4 -7
  112. package/src/modules/data_sync/backend/data-sync/runs/[id]/page.tsx +19 -54
  113. package/src/modules/dictionaries/components/DictionariesManager.tsx +7 -4
  114. package/src/modules/entities/components/EncryptionManager.tsx +50 -21
  115. package/src/modules/inbox_ops/lib/llmProvider.ts +10 -0
  116. package/src/modules/integrations/backend/integrations/[id]/page.tsx +101 -146
  117. package/src/modules/payment_gateways/backend/payment-gateways/page.tsx +60 -103
  118. package/src/modules/planner/components/AvailabilityRuleSetForm.tsx +1 -1
  119. package/src/modules/planner/components/AvailabilityRulesEditor.tsx +17 -17
  120. package/src/modules/resources/components/ResourceCrudForm.tsx +1 -1
  121. package/src/modules/resources/components/ResourceTypeCrudForm.tsx +1 -1
  122. package/src/modules/sales/components/documents/ReturnDialog.tsx +10 -7
  123. package/src/modules/sales/i18n/de.json +2 -0
  124. package/src/modules/sales/i18n/en.json +2 -0
  125. package/src/modules/sales/i18n/es.json +2 -0
  126. package/src/modules/sales/i18n/pl.json +2 -0
  127. package/src/modules/staff/backend/staff/profile/create/page.tsx +1 -1
  128. package/src/modules/staff/components/TeamForm.tsx +1 -1
  129. package/src/modules/staff/components/TeamMemberForm.tsx +1 -1
  130. package/src/modules/staff/components/TeamRoleForm.tsx +1 -1
@@ -33,7 +33,9 @@ import {
33
33
  LEGACY_INTEGRATION_DETAIL_TABS_SPOT_ID
34
34
  } from "@open-mercato/shared/modules/integrations/types";
35
35
  import { LoadingMessage, ErrorMessage } from "@open-mercato/ui/backend/detail";
36
- import { Activity, AlertTriangle, Bell, Calendar, CheckCircle2, ChevronDown, ChevronRight, CreditCard, FileText, HardDrive, Key, MessageSquare, RefreshCw, Settings, Truck, Webhook, XCircle, Zap } from "lucide-react";
36
+ import { LogList } from "@open-mercato/ui/backend/LogList";
37
+ import { Activity, AlertTriangle, Bell, Calendar, CheckCircle2, CreditCard, FileText, FileX, HardDrive, Key, MessageSquare, RefreshCw, Settings, Truck, Webhook, XCircle, Zap } from "lucide-react";
38
+ import { EmptyState } from "@open-mercato/ui/primitives/empty-state";
37
39
  import { IntegrationScheduleTab } from "../../../../data_sync/components/IntegrationScheduleTab.js";
38
40
  import {
39
41
  buildIntegrationDetailInjectedTabs,
@@ -45,11 +47,6 @@ const UNSUPPORTED_CREDENTIAL_FIELD_TYPES = /* @__PURE__ */ new Set(["oauth", "ss
45
47
  function isEditableCredentialField(field) {
46
48
  return !UNSUPPORTED_CREDENTIAL_FIELD_TYPES.has(field.type);
47
49
  }
48
- const LOG_LEVEL_STYLES = {
49
- info: "bg-blue-100 text-blue-800",
50
- warn: "bg-yellow-100 text-yellow-800",
51
- error: "bg-red-100 text-red-800"
52
- };
53
50
  const HEALTH_STATUS_STYLES = {
54
51
  healthy: "bg-green-100 text-green-800",
55
52
  degraded: "bg-yellow-100 text-yellow-800",
@@ -218,7 +215,6 @@ function IntegrationDetailPage({ params }) {
218
215
  const [logs, setLogs] = React.useState([]);
219
216
  const [logLevel, setLogLevel] = React.useState("");
220
217
  const [isLoadingLogs, setIsLoadingLogs] = React.useState(false);
221
- const [expandedLogId, setExpandedLogId] = React.useState(null);
222
218
  const [isCheckingHealth, setIsCheckingHealth] = React.useState(false);
223
219
  const [isTogglingState, setIsTogglingState] = React.useState(false);
224
220
  const [latestHealthResult, setLatestHealthResult] = React.useState(null);
@@ -385,9 +381,6 @@ function IntegrationDetailPage({ params }) {
385
381
  React.useEffect(() => {
386
382
  void loadLogs();
387
383
  }, [loadLogs]);
388
- React.useEffect(() => {
389
- setExpandedLogId((current) => current && logs.some((log) => log.id === current) ? current : null);
390
- }, [logs]);
391
384
  const handleToggleState = React.useCallback(async (enabled) => {
392
385
  const currentIntegrationId = resolveCurrentIntegrationId();
393
386
  if (!currentIntegrationId) return;
@@ -924,94 +917,85 @@ function IntegrationDetailPage({ params }) {
924
917
  ]
925
918
  }
926
919
  ) }) }),
927
- isLoadingLogs ? /* @__PURE__ */ jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ jsx(Spinner, {}) }) : logs.length === 0 ? /* @__PURE__ */ jsx("p", { className: "py-4 text-sm text-muted-foreground", children: t("integrations.detail.logs.empty") }) : /* @__PURE__ */ jsx("div", { className: "rounded-lg border", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-sm", children: [
928
- /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: "border-b bg-muted/50", children: [
929
- /* @__PURE__ */ jsx("th", { className: "px-4 py-2 text-left font-medium", children: t("integrations.detail.logs.columns.time") }),
930
- /* @__PURE__ */ jsx("th", { className: "px-4 py-2 text-left font-medium", children: t("integrations.detail.logs.columns.level") }),
931
- /* @__PURE__ */ jsx("th", { className: "px-4 py-2 text-left font-medium", children: t("integrations.detail.logs.columns.message") })
932
- ] }) }),
933
- /* @__PURE__ */ jsx("tbody", { children: logs.map((log) => {
934
- const isExpanded = expandedLogId === log.id;
935
- const metadataEntries = [
936
- ["Time", new Date(log.createdAt).toLocaleString()],
937
- ["Level", log.level],
938
- ["Code", log.code ?? null],
939
- ["Run ID", log.runId ?? null],
940
- ["Entity Type", log.scopeEntityType ?? null],
941
- ["Entity ID", log.scopeEntityId ?? null]
942
- ].filter((entry) => typeof entry[1] === "string" && entry[1].trim().length > 0);
943
- const { inlineEntries, nestedEntries } = splitLogPayload(log.payload);
944
- return /* @__PURE__ */ jsxs(React.Fragment, { children: [
945
- /* @__PURE__ */ jsxs("tr", { className: "border-b last:border-0", children: [
946
- /* @__PURE__ */ jsx("td", { className: "whitespace-nowrap px-4 py-2 text-muted-foreground", children: new Date(log.createdAt).toLocaleString() }),
947
- /* @__PURE__ */ jsx("td", { className: "px-4 py-2", children: /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: LOG_LEVEL_STYLES[log.level] ?? "", children: log.level }) }),
948
- /* @__PURE__ */ jsx("td", { className: "px-4 py-2", children: /* @__PURE__ */ jsxs(
949
- Button,
950
- {
951
- type: "button",
952
- variant: "ghost",
953
- size: "sm",
954
- className: "h-auto w-full justify-start gap-2 px-0 py-0 text-left hover:bg-transparent",
955
- onClick: () => setExpandedLogId((current) => current === log.id ? null : log.id),
956
- children: [
957
- isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 shrink-0" }),
958
- /* @__PURE__ */ jsx("span", { className: "truncate", children: log.message })
959
- ]
960
- }
961
- ) })
962
- ] }),
963
- isExpanded ? /* @__PURE__ */ jsx("tr", { className: "border-b bg-muted/30 last:border-0", children: /* @__PURE__ */ jsx("td", { colSpan: 3, className: "px-4 py-4", children: /* @__PURE__ */ jsx("div", { className: "space-y-4 rounded-lg border bg-card p-4", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)]", children: [
964
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
965
- /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
966
- /* @__PURE__ */ jsxs("div", { children: [
967
- /* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: t("integrations.detail.logs.details.summary", "Summary") }),
968
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm font-medium", children: log.message })
920
+ isLoadingLogs ? /* @__PURE__ */ jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ jsx(Spinner, {}) }) : /* @__PURE__ */ jsx(
921
+ LogList,
922
+ {
923
+ entries: logs.map((log) => {
924
+ const metadataEntries = [
925
+ ["Time", new Date(log.createdAt).toLocaleString()],
926
+ ["Level", log.level],
927
+ ["Code", log.code ?? null],
928
+ ["Run ID", log.runId ?? null],
929
+ ["Entity Type", log.scopeEntityType ?? null],
930
+ ["Entity ID", log.scopeEntityId ?? null]
931
+ ].filter((entry) => typeof entry[1] === "string" && entry[1].trim().length > 0);
932
+ const { inlineEntries, nestedEntries } = splitLogPayload(log.payload);
933
+ return {
934
+ id: log.id,
935
+ time: new Date(log.createdAt).toLocaleString(),
936
+ level: log.level,
937
+ message: log.message,
938
+ body: /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)]", children: [
939
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
940
+ /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
941
+ /* @__PURE__ */ jsxs("div", { children: [
942
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: t("integrations.detail.logs.details.summary", "Summary") }),
943
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm font-medium", children: log.message })
944
+ ] }),
945
+ metadataEntries.length > 0 ? /* @__PURE__ */ jsx("dl", { className: "grid gap-3 sm:grid-cols-2", children: metadataEntries.map(([label, value]) => /* @__PURE__ */ jsxs("div", { className: "rounded-md border bg-muted/30 px-3 py-2", children: [
946
+ /* @__PURE__ */ jsx("dt", { className: "text-overline font-medium uppercase tracking-wide text-muted-foreground", children: label }),
947
+ /* @__PURE__ */ jsx("dd", { className: "mt-1 break-all text-sm", children: value })
948
+ ] }, label)) }) : null
969
949
  ] }),
970
- metadataEntries.length > 0 ? /* @__PURE__ */ jsx("dl", { className: "grid gap-3 sm:grid-cols-2", children: metadataEntries.map(([label, value]) => /* @__PURE__ */ jsxs("div", { className: "rounded-md border bg-muted/30 px-3 py-2", children: [
971
- /* @__PURE__ */ jsx("dt", { className: "text-overline font-medium uppercase tracking-wide text-muted-foreground", children: label }),
972
- /* @__PURE__ */ jsx("dd", { className: "mt-1 break-all text-sm", children: value })
973
- ] }, label)) }) : null
950
+ inlineEntries.length > 0 ? /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
951
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: t("integrations.detail.logs.details.fields", "Fields") }),
952
+ /* @__PURE__ */ jsx("dl", { className: "grid gap-3 sm:grid-cols-2", children: inlineEntries.map(([key, value]) => /* @__PURE__ */ jsxs("div", { className: "rounded-md border bg-muted/30 px-3 py-2", children: [
953
+ /* @__PURE__ */ jsx("dt", { className: "text-overline font-medium uppercase tracking-wide text-muted-foreground", children: formatLogDetailLabel(key) }),
954
+ /* @__PURE__ */ jsx("dd", { className: "mt-1 break-words text-sm", children: formatLogPrimitiveValue(value) })
955
+ ] }, key)) })
956
+ ] }) : null
974
957
  ] }),
975
- inlineEntries.length > 0 ? /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
976
- /* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: t("integrations.detail.logs.details.fields", "Fields") }),
977
- /* @__PURE__ */ jsx("dl", { className: "grid gap-3 sm:grid-cols-2", children: inlineEntries.map(([key, value]) => /* @__PURE__ */ jsxs("div", { className: "rounded-md border bg-muted/30 px-3 py-2", children: [
978
- /* @__PURE__ */ jsx("dt", { className: "text-overline font-medium uppercase tracking-wide text-muted-foreground", children: formatLogDetailLabel(key) }),
979
- /* @__PURE__ */ jsx("dd", { className: "mt-1 break-words text-sm", children: formatLogPrimitiveValue(value) })
980
- ] }, key)) })
981
- ] }) : null
982
- ] }),
983
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
984
- nestedEntries.map(([key, value]) => /* @__PURE__ */ jsx(
985
- JsonDisplay,
986
- {
987
- data: value,
988
- title: formatLogDetailLabel(key),
989
- defaultExpanded: true,
990
- maxInitialDepth: 1,
991
- theme: "dark",
992
- maxHeight: "16rem",
993
- className: "p-4"
994
- },
995
- key
996
- )),
997
- log.payload && nestedEntries.length === 0 ? /* @__PURE__ */ jsx(
998
- JsonDisplay,
999
- {
1000
- data: log.payload,
1001
- title: t("integrations.detail.logs.details.payload", "Payload"),
1002
- defaultExpanded: true,
1003
- maxInitialDepth: 1,
1004
- theme: "dark",
1005
- maxHeight: "16rem",
1006
- className: "p-4"
1007
- }
1008
- ) : null,
1009
- !log.payload ? /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-dashed px-4 py-6 text-sm text-muted-foreground", children: t("integrations.detail.logs.details.noPayload", "No structured payload was stored for this log entry.") }) : null
958
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
959
+ nestedEntries.map(([key, value]) => /* @__PURE__ */ jsx(
960
+ JsonDisplay,
961
+ {
962
+ data: value,
963
+ title: formatLogDetailLabel(key),
964
+ defaultExpanded: true,
965
+ maxInitialDepth: 1,
966
+ theme: "dark",
967
+ maxHeight: "16rem",
968
+ className: "p-4"
969
+ },
970
+ key
971
+ )),
972
+ log.payload && nestedEntries.length === 0 ? /* @__PURE__ */ jsx(
973
+ JsonDisplay,
974
+ {
975
+ data: log.payload,
976
+ title: t("integrations.detail.logs.details.payload", "Payload"),
977
+ defaultExpanded: true,
978
+ maxInitialDepth: 1,
979
+ theme: "dark",
980
+ maxHeight: "16rem",
981
+ className: "p-4"
982
+ }
983
+ ) : null,
984
+ !log.payload ? /* @__PURE__ */ jsx(
985
+ EmptyState,
986
+ {
987
+ size: "sm",
988
+ icon: /* @__PURE__ */ jsx(FileX, { className: "h-8 w-8", "aria-hidden": "true" }),
989
+ title: t("integrations.detail.logs.details.noPayload", "No structured payload was stored for this log entry.")
990
+ }
991
+ ) : null
992
+ ] })
1010
993
  ] })
1011
- ] }) }) }) }) : null
1012
- ] }, log.id);
1013
- }) })
1014
- ] }) })
994
+ };
995
+ }),
996
+ emptyMessage: t("integrations.detail.logs.empty")
997
+ }
998
+ )
1015
999
  ] }) : null,
1016
1000
  injectedTabs.map((tab) => /* @__PURE__ */ jsx(TabsContent, { value: tab.id, className: "mt-0 space-y-4", children: /* @__PURE__ */ jsx(
1017
1001
  InjectionSpot,