@lumerahq/ui 0.13.0 → 0.14.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.
- package/README.md +27 -29
- package/dist/{RecordSheet-BGs3rudM.js → RecordSheet-aoDqWNaZ.js} +7397 -10728
- package/dist/audit-log-B2-PFKpH.js +128 -0
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -6
- package/dist/{highlighted-body-OFNGDK62-V6FEuBTg.js → highlighted-body-OFNGDK62-B9aPs2O1.js} +1 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +7 -6
- package/dist/hooks/use-record-audit-log-snapshot.d.ts +15 -0
- package/dist/hooks/use-record-audit-log-snapshot.d.ts.map +1 -0
- package/dist/hooks/use-record-audit-log.d.ts +23 -0
- package/dist/hooks/use-record-audit-log.d.ts.map +1 -0
- package/dist/index.js +33 -21
- package/dist/lib/audit-log-core.d.ts +40 -46
- package/dist/lib/audit-log-core.d.ts.map +1 -1
- package/dist/lib/audit-log.d.ts +5 -5
- package/dist/lib/audit-log.d.ts.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +12 -0
- package/dist/mermaid-GHXKKRXX-RyLkx3ak.js +4 -0
- package/dist/ui.css +1 -185
- package/dist/{use-automation-run-D6DIaHy3.js → use-automation-run-BeBkcUQz.js} +3 -189
- package/dist/{use-sql-table-BfA0A-w3.js → use-sql-table-BpMNl9bf.js} +71 -2
- package/package.json +1 -1
- package/dist/components/audit-log/AuditLog.d.ts +0 -51
- package/dist/components/audit-log/AuditLog.d.ts.map +0 -1
- package/dist/components/audit-log/AuditLogEntry.d.ts +0 -19
- package/dist/components/audit-log/AuditLogEntry.d.ts.map +0 -1
- package/dist/components/audit-log/index.d.ts +0 -2
- package/dist/components/audit-log/index.d.ts.map +0 -1
- package/dist/hooks/use-audit-log.d.ts +0 -18
- package/dist/hooks/use-audit-log.d.ts.map +0 -1
- package/dist/mermaid-GHXKKRXX-AvjGDhsO.js +0 -4
package/README.md
CHANGED
|
@@ -52,39 +52,37 @@ import { AutomationRunner, DataTable, RecordSheet } from '@lumerahq/ui';
|
|
|
52
52
|
|
|
53
53
|
### Record Audit Log
|
|
54
54
|
|
|
55
|
-
|
|
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:
|
|
56
58
|
|
|
57
59
|
```tsx
|
|
58
|
-
import {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
collections
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
fieldLabels={{ customer_id: 'Customer' }}
|
|
71
|
-
showSystemFields={false}
|
|
72
|
-
exportFilename="finance-activity.csv"
|
|
73
|
-
/>;
|
|
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
|
+
});
|
|
74
72
|
```
|
|
75
73
|
|
|
76
|
-
The
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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.
|
|
80
|
+
|
|
81
|
+
`changed_fields` describes update events only. For created and deleted records,
|
|
82
|
+
show the action itself and use the after or before snapshot for expanded detail.
|
|
83
|
+
The actor identifies the principal that performed the mutation, so human, agent,
|
|
84
|
+
and automation actions intentionally remain distinct; display the friendly
|
|
85
|
+
name/email or typed fallback and retain the full actor id for traceability.
|
|
88
86
|
|
|
89
87
|
### Assistant Chat
|
|
90
88
|
|