@lumerahq/ui 0.13.0-dev.1 → 0.13.0-dev.2
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 +21 -40
- package/dist/{RecordSheet-CmOeQ0M-.js → RecordSheet-CawHELpB.js} +7412 -10823
- package/dist/audit-log-BPvip04_.js +128 -0
- package/dist/{automations-DOek1EjJ.js → automations-EgDXJ43_.js} +1 -181
- 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-CkZgLnjq.js → highlighted-body-OFNGDK62-TFNZl-GI.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 -28
- package/dist/lib/audit-log-core.d.ts +36 -54
- 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 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +13 -8
- package/dist/mermaid-GHXKKRXX-9ec0sPET.js +4 -0
- package/dist/ui.css +1 -185
- package/dist/{use-automation-run-Vo2NXx-h.js → use-automation-run-IypX1vtN.js} +3 -48
- package/dist/{use-sql-table-yjz6z8nW.js → use-sql-table-By700ZAo.js} +72 -3
- 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-DXYmvmZa.js +0 -4
package/README.md
CHANGED
|
@@ -52,50 +52,31 @@ 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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
pagination, and CSV export with filename/count/truncation feedback. It also
|
|
83
|
-
supports controlled filters, column and density options, record navigation
|
|
84
|
-
callbacks, and custom loading, empty, and error states. Friendly collection
|
|
85
|
-
labels are used in the collection column and CSV export. Pass
|
|
86
|
-
`activityNouns` when the collection label is plural, so activity text can read
|
|
87
|
-
naturally, for example "Updated invoice" instead of "Updated Invoices". If an
|
|
88
|
-
activity noun is not provided, the component falls back to the friendly
|
|
89
|
-
collection label. If a selected collection has auditing turned off, existing
|
|
90
|
-
history remains visible and the component shows a warning that future changes
|
|
91
|
-
will not be recorded.
|
|
92
|
-
|
|
93
|
-
For custom audit tooling, `@lumerahq/ui/lib` publicly exports
|
|
94
|
-
`listRecordAuditLog`, `getRecordAuditLogSnapshot`, and
|
|
95
|
-
`fetchRecordAuditLogCsv`. Each record entry includes stable `collection`,
|
|
96
|
-
`collection_id`, `record_id`, `record_label`, and `changed_fields` properties;
|
|
97
|
-
do not parse display labels from `details`. Built-in controls and states also
|
|
98
|
-
carry stable `data-audit-log-*` attributes for preview automation.
|
|
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.
|
|
99
80
|
|
|
100
81
|
### Assistant Chat
|
|
101
82
|
|