@lumerahq/ui 0.13.0-dev.2 → 0.13.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 (39) hide show
  1. package/README.md +29 -21
  2. package/dist/{RecordSheet-CawHELpB.js → RecordSheet-BGs3rudM.js} +9146 -5815
  3. package/dist/{automations-EgDXJ43_.js → automations-DGUEnAYR.js} +199 -38
  4. package/dist/components/audit-log/AuditLog.d.ts +51 -0
  5. package/dist/components/audit-log/AuditLog.d.ts.map +1 -0
  6. package/dist/components/audit-log/AuditLogEntry.d.ts +19 -0
  7. package/dist/components/audit-log/AuditLogEntry.d.ts.map +1 -0
  8. package/dist/components/audit-log/index.d.ts +2 -0
  9. package/dist/components/audit-log/index.d.ts.map +1 -0
  10. package/dist/components/index.d.ts +1 -0
  11. package/dist/components/index.d.ts.map +1 -1
  12. package/dist/components/index.js +6 -5
  13. package/dist/{highlighted-body-OFNGDK62-TFNZl-GI.js → highlighted-body-OFNGDK62-V6FEuBTg.js} +1 -1
  14. package/dist/hooks/index.d.ts +1 -2
  15. package/dist/hooks/index.d.ts.map +1 -1
  16. package/dist/hooks/index.js +6 -7
  17. package/dist/hooks/use-audit-log.d.ts +18 -0
  18. package/dist/hooks/use-audit-log.d.ts.map +1 -0
  19. package/dist/index.js +55 -65
  20. package/dist/lib/audit-log-core.d.ts +46 -40
  21. package/dist/lib/audit-log-core.d.ts.map +1 -1
  22. package/dist/lib/audit-log.d.ts +5 -5
  23. package/dist/lib/audit-log.d.ts.map +1 -1
  24. package/dist/lib/bridge.d.ts +28 -0
  25. package/dist/lib/bridge.d.ts.map +1 -1
  26. package/dist/lib/index.d.ts +1 -2
  27. package/dist/lib/index.d.ts.map +1 -1
  28. package/dist/lib/index.js +36 -46
  29. package/dist/mermaid-GHXKKRXX-AvjGDhsO.js +4 -0
  30. package/dist/ui.css +185 -1
  31. package/dist/{use-automation-run-IypX1vtN.js → use-automation-run-D6DIaHy3.js} +189 -3
  32. package/dist/{use-sql-table-By700ZAo.js → use-sql-table-BfA0A-w3.js} +3 -72
  33. package/package.json +1 -1
  34. package/dist/audit-log-BPvip04_.js +0 -128
  35. package/dist/hooks/use-record-audit-log-snapshot.d.ts +0 -15
  36. package/dist/hooks/use-record-audit-log-snapshot.d.ts.map +0 -1
  37. package/dist/hooks/use-record-audit-log.d.ts +0 -23
  38. package/dist/hooks/use-record-audit-log.d.ts.map +0 -1
  39. package/dist/mermaid-GHXKKRXX-9ec0sPET.js +0 -4
package/README.md CHANGED
@@ -52,31 +52,39 @@ import { AutomationRunner, DataTable, RecordSheet } from '@lumerahq/ui';
52
52
 
53
53
  ### Record Audit Log
54
54
 
55
- Build an app-native activity view from one globally ordered feed across up to
56
- 20 audited collections. Pass the same bare collection names used by record
57
- CRUD:
55
+ Show one globally ordered history across up to 20 audited collections:
58
56
 
59
57
  ```tsx
60
- import { useRecordAuditLog, useRecordAuditLogSnapshot } from '@lumerahq/ui/hooks';
61
-
62
- const audit = useRecordAuditLog({
63
- collections: ['invoices', 'payments'],
64
- event: 'updated',
65
- });
66
-
67
- const snapshot = useRecordAuditLogSnapshot({
68
- id: expandedEntry?.id,
69
- store: expandedEntry?.store,
70
- enabled: Boolean(expandedEntry?.has_snapshot),
71
- });
58
+ import { AuditLog } from '@lumerahq/ui';
59
+
60
+ <AuditLog
61
+ collections={['finance__invoices', 'finance__payments']}
62
+ collectionLabels={{
63
+ finance__invoices: 'Invoices',
64
+ finance__payments: 'Payments',
65
+ }}
66
+ activityNouns={{
67
+ finance__invoices: 'invoice',
68
+ finance__payments: 'payment',
69
+ }}
70
+ fieldLabels={{ customer_id: 'Customer' }}
71
+ showSystemFields={false}
72
+ exportFilename="finance-activity.csv"
73
+ />;
72
74
  ```
73
75
 
74
- The hook returns entries, current per-collection audit status, loading/error
75
- state, refresh, and cursor-based load-more state. Entries include stable
76
- collection and record identity fields for links and custom rendering. Public
77
- helpers under `@lumerahq/ui/lib` support direct list/snapshot requests and a
78
- capped CSV export. A disabled collection can still have visible history; its
79
- status means only that future changes are not being captured.
76
+ The component includes collection, date/time, event, and actor filters with
77
+ visible active-filter chips, quick date presets, lazy before/after details,
78
+ pagination, and CSV export with filename/count/truncation feedback. It also
79
+ supports controlled filters, column and density options, record navigation
80
+ callbacks, and custom loading, empty, and error states. Friendly collection
81
+ labels are used in the collection column and CSV export. Pass
82
+ `activityNouns` when the collection label is plural, so activity text can read
83
+ naturally, for example "Updated invoice" instead of "Updated Invoices". If an
84
+ activity noun is not provided, the component falls back to the friendly
85
+ collection label. If a selected collection has auditing turned off, existing
86
+ history remains visible and the component shows a warning that future changes
87
+ will not be recorded.
80
88
 
81
89
  ### Assistant Chat
82
90