@asteby/metacore-runtime-react 50.2.0 → 52.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +26 -0
  3. package/dist/activity-diff.d.ts +5 -0
  4. package/dist/activity-diff.d.ts.map +1 -1
  5. package/dist/activity-timeline.d.ts.map +1 -1
  6. package/dist/activity-timeline.js +10 -3
  7. package/dist/audit-info.d.ts.map +1 -1
  8. package/dist/audit-info.js +17 -3
  9. package/dist/barcode-scanner.js +4 -4
  10. package/dist/dialogs/dynamic-record.d.ts +3 -1
  11. package/dist/dialogs/dynamic-record.d.ts.map +1 -1
  12. package/dist/dialogs/dynamic-record.js +19 -6
  13. package/dist/dynamic-columns.d.ts +6 -0
  14. package/dist/dynamic-columns.d.ts.map +1 -1
  15. package/dist/dynamic-columns.js +41 -7
  16. package/dist/dynamic-date-field.js +1 -1
  17. package/dist/dynamic-form.js +2 -2
  18. package/dist/dynamic-kanban.js +6 -5
  19. package/dist/dynamic-table.d.ts.map +1 -1
  20. package/dist/dynamic-table.js +6 -4
  21. package/dist/index.d.ts +2 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +2 -1
  24. package/dist/org-runtime-context.d.ts +65 -0
  25. package/dist/org-runtime-context.d.ts.map +1 -1
  26. package/dist/org-runtime-context.js +24 -0
  27. package/dist/org-runtime-provider.d.ts +25 -1
  28. package/dist/org-runtime-provider.d.ts.map +1 -1
  29. package/dist/org-runtime-provider.js +3 -3
  30. package/dist/provenance.d.ts +216 -0
  31. package/dist/provenance.d.ts.map +1 -0
  32. package/dist/provenance.js +386 -0
  33. package/dist/record-history.d.ts.map +1 -1
  34. package/dist/record-history.js +6 -2
  35. package/dist/sidebar-layout-manager.js +2 -2
  36. package/dist/widgets/widget-card.d.ts +7 -2
  37. package/dist/widgets/widget-card.d.ts.map +1 -1
  38. package/dist/widgets/widget-card.js +6 -3
  39. package/package.json +3 -3
  40. package/src/__tests__/org-runtime-number-locale-system-actor.test.tsx +80 -0
  41. package/src/__tests__/provenance.test.tsx +209 -0
  42. package/src/activity-diff.tsx +5 -0
  43. package/src/activity-timeline.tsx +16 -2
  44. package/src/audit-info.tsx +20 -3
  45. package/src/barcode-scanner.tsx +4 -4
  46. package/src/dialogs/dynamic-record.tsx +26 -5
  47. package/src/dynamic-columns.tsx +68 -6
  48. package/src/dynamic-date-field.tsx +1 -1
  49. package/src/dynamic-form.tsx +2 -2
  50. package/src/dynamic-kanban.tsx +6 -5
  51. package/src/dynamic-table.tsx +6 -4
  52. package/src/index.ts +2 -0
  53. package/src/org-runtime-context.ts +92 -0
  54. package/src/org-runtime-provider.tsx +50 -3
  55. package/src/provenance.tsx +585 -0
  56. package/src/record-history.tsx +17 -4
  57. package/src/sidebar-layout-manager.tsx +2 -2
  58. package/src/widgets/widget-card.tsx +26 -3
@@ -114,12 +114,35 @@ export function WidgetEmpty({ message }: { message: string }) {
114
114
  )
115
115
  }
116
116
 
117
- /** Per-widget error state — isolated so a broken widget never tumbles the grid. */
118
- export function WidgetError({ message }: { message: string }) {
117
+ /**
118
+ * Per-widget error state — isolated so a broken widget never tumbles the grid.
119
+ * Pass `onRetry` to offer a retry (e.g. the widget query's `refetch`).
120
+ */
121
+ export function WidgetError({
122
+ message,
123
+ onRetry,
124
+ retryLabel = 'Reintentar',
125
+ }: {
126
+ message: string
127
+ onRetry?: () => void
128
+ retryLabel?: string
129
+ }) {
119
130
  return (
120
- <div className="flex flex-1 items-center justify-center gap-2 py-6 text-center text-xs text-destructive">
131
+ <div
132
+ role="alert"
133
+ className="flex flex-1 flex-wrap items-center justify-center gap-2 py-6 text-center text-xs text-destructive"
134
+ >
121
135
  <DynamicIcon name="TriangleAlert" className="size-4" />
122
136
  <span>{message}</span>
137
+ {onRetry && (
138
+ <button
139
+ type="button"
140
+ onClick={onRetry}
141
+ className="rounded-md border px-2 py-0.5 font-medium text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
142
+ >
143
+ {retryLabel}
144
+ </button>
145
+ )}
123
146
  </div>
124
147
  )
125
148
  }