@lumerahq/ui 0.13.0-dev.0 → 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.
Files changed (37) hide show
  1. package/README.md +21 -40
  2. package/dist/{RecordSheet-BwslIDfX.js → RecordSheet-CawHELpB.js} +7382 -10779
  3. package/dist/audit-log-BPvip04_.js +128 -0
  4. package/dist/{automations-D4tZC_G7.js → automations-EgDXJ43_.js} +1 -162
  5. package/dist/components/index.d.ts +0 -1
  6. package/dist/components/index.d.ts.map +1 -1
  7. package/dist/components/index.js +5 -6
  8. package/dist/{highlighted-body-OFNGDK62-ClrpL6m7.js → highlighted-body-OFNGDK62-TFNZl-GI.js} +1 -1
  9. package/dist/hooks/index.d.ts +2 -1
  10. package/dist/hooks/index.d.ts.map +1 -1
  11. package/dist/hooks/index.js +7 -6
  12. package/dist/hooks/use-record-audit-log-snapshot.d.ts +15 -0
  13. package/dist/hooks/use-record-audit-log-snapshot.d.ts.map +1 -0
  14. package/dist/hooks/use-record-audit-log.d.ts +23 -0
  15. package/dist/hooks/use-record-audit-log.d.ts.map +1 -0
  16. package/dist/index.js +33 -28
  17. package/dist/lib/audit-log-core.d.ts +36 -54
  18. package/dist/lib/audit-log-core.d.ts.map +1 -1
  19. package/dist/lib/audit-log.d.ts +5 -5
  20. package/dist/lib/audit-log.d.ts.map +1 -1
  21. package/dist/lib/index.d.ts +1 -1
  22. package/dist/lib/index.d.ts.map +1 -1
  23. package/dist/lib/index.js +13 -8
  24. package/dist/mermaid-GHXKKRXX-9ec0sPET.js +4 -0
  25. package/dist/ui.css +1 -185
  26. package/dist/{use-automation-run-BHa7eyZU.js → use-automation-run-IypX1vtN.js} +3 -48
  27. package/dist/{use-sql-table-CkRTvZmH.js → use-sql-table-By700ZAo.js} +72 -3
  28. package/package.json +1 -1
  29. package/dist/components/audit-log/AuditLog.d.ts +0 -51
  30. package/dist/components/audit-log/AuditLog.d.ts.map +0 -1
  31. package/dist/components/audit-log/AuditLogEntry.d.ts +0 -19
  32. package/dist/components/audit-log/AuditLogEntry.d.ts.map +0 -1
  33. package/dist/components/audit-log/index.d.ts +0 -2
  34. package/dist/components/audit-log/index.d.ts.map +0 -1
  35. package/dist/hooks/use-audit-log.d.ts +0 -18
  36. package/dist/hooks/use-audit-log.d.ts.map +0 -1
  37. package/dist/mermaid-GHXKKRXX-B_NhCUBg.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
- Show one globally ordered history across up to 20 audited collections:
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 { AuditLog } from '@lumerahq/ui';
59
-
60
- <AuditLog
61
- collections={['invoices', 'payments']}
62
- collectionLabels={{
63
- invoices: 'Invoices',
64
- payments: 'Payments',
65
- }}
66
- activityNouns={{
67
- invoices: 'invoice',
68
- payments: 'payment',
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
- Inside a project app, pass the same bare collection names used for CRUD. The
77
- bridge supplies project context and the backend resolves the physical
78
- namespaced collections. Outside a project context, pass physical API names.
79
-
80
- The component includes collection, date/time, event, and actor filters with
81
- visible active-filter chips, quick date presets, lazy before/after details,
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