@krak-stack/registry 0.11.6 → 0.11.7

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 (42) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/components/audit-log-table/classes.d.ts +1 -0
  3. package/dist/components/audit-log-table/html.d.ts +158 -0
  4. package/dist/components/audit-log-table/html.js +3260 -0
  5. package/dist/components/audit-log-table/index.d.ts +37 -0
  6. package/dist/components/audit-log-table/react.d.ts +3 -51
  7. package/dist/components/audit-log-table/react.js +94 -77
  8. package/dist/components/audit-log-table/schema.d.ts +122 -0
  9. package/dist/components/copy-button/html.d.ts +2 -2
  10. package/dist/components/danger-confirmation/index.d.ts +2 -2
  11. package/dist/components/data-table/classes.d.ts +1 -0
  12. package/dist/components/data-table/html.d.ts +12 -12
  13. package/dist/components/data-table/html.js +9 -6
  14. package/dist/components/data-table/react.js +10 -4
  15. package/dist/components/date-input/html.d.ts +2 -2
  16. package/dist/components/editable-text/html.d.ts +2 -2
  17. package/dist/components/editable-text/index.d.ts +4 -4
  18. package/dist/components/editing-locale-switcher/html.d.ts +2 -2
  19. package/dist/components/email-editor/legacy-editor.html.d.ts +6 -6
  20. package/dist/components/form/react.d.ts +5 -5
  21. package/dist/components/locale-switcher/html.d.ts +2 -2
  22. package/dist/components/map-menu/html.d.ts +4 -4
  23. package/dist/components/presence-transition/index.d.ts +2 -2
  24. package/dist/components/select-with-custom-input/html.d.ts +2 -2
  25. package/dist/components/switch/react.d.ts +14 -0
  26. package/dist/components/switch/react.js +55 -0
  27. package/dist/components/theme-switcher/html.d.ts +2 -2
  28. package/dist/components/tracking-notice/classes.d.ts +6 -0
  29. package/dist/components/tracking-notice/html.d.ts +85 -0
  30. package/dist/components/tracking-notice/html.js +354 -0
  31. package/dist/components/tracking-notice/index.d.ts +95 -0
  32. package/dist/components/tracking-notice/react.d.ts +5 -27
  33. package/dist/components/tracking-notice/react.js +189 -59
  34. package/dist/components/tracking-notice/schema.d.ts +45 -0
  35. package/dist/components/upload-attachment/html.d.ts +4 -4
  36. package/dist/components/virtualized-combobox/html.d.ts +3 -3
  37. package/dist/components/webhook-delivery-table/html.js +9 -6
  38. package/dist/components/webhook-delivery-table/react.js +10 -4
  39. package/dist/services/events/browser.js +39 -26
  40. package/dist/services/events/index.js +23 -19
  41. package/dist/services/opentelemetry/web-vitals.js +27 -23
  42. package/package.json +9 -1
@@ -0,0 +1,37 @@
1
+ import type { EventLogRecord, EventQuery } from "../../services/events/schema.js";
2
+ import type { AuditLogMessages, AuditLogTableProps } from "./schema.js";
3
+ export declare const auditLogMessages: (locale: string, messages?: AuditLogTableProps["messages"]) => {
4
+ title: string;
5
+ event: string;
6
+ allEvents: string;
7
+ time: string;
8
+ action: string;
9
+ target: string;
10
+ actor: string;
11
+ method: string;
12
+ actorMember: string;
13
+ impersonatedBy: string;
14
+ actorOrganization: string;
15
+ methodApiKey: string;
16
+ methodSession: string;
17
+ methodUnknown: string;
18
+ };
19
+ export declare const auditTableState: (state?: EventQuery) => EventQuery | undefined;
20
+ export declare const auditRowId: (entry: EventLogRecord) => string;
21
+ export declare const auditRowTime: (entry: EventLogRecord) => number;
22
+ export declare const auditActionLabel: (entry: EventLogRecord, events: NonNullable<AuditLogTableProps["events"]>) => string;
23
+ export declare const auditActor: (entry: EventLogRecord, labels: AuditLogMessages) => {
24
+ label: string;
25
+ description: string | undefined;
26
+ };
27
+ export declare const auditTarget: (entry: EventLogRecord, labels: AuditLogMessages) => {
28
+ label: string;
29
+ description: string;
30
+ } | null;
31
+ export declare const auditImpersonation: (entry: EventLogRecord, labels: AuditLogMessages) => string | undefined;
32
+ export declare const auditMethod: (entry: EventLogRecord) => "api_key" | "session" | "unknown";
33
+ export declare const auditMethods: (labels: AuditLogMessages) => {
34
+ session: string;
35
+ api_key: string;
36
+ unknown: string;
37
+ };
@@ -1,58 +1,10 @@
1
1
  import type { ReactNode } from "react";
2
2
  import { type DataTableStatus } from "../ui/data-table.js";
3
3
  import type { EventLogRecord, EventQuery } from "../../services/events/schema.js";
4
- declare const translations: {
5
- en: {
6
- title: string;
7
- event: string;
8
- allEvents: string;
9
- time: string;
10
- action: string;
11
- target: string;
12
- actor: string;
13
- method: string;
14
- actorMember: string;
15
- impersonatedBy: string;
16
- actorOrganization: string;
17
- methodApiKey: string;
18
- methodSession: string;
19
- methodUnknown: string;
20
- };
21
- fr: {
22
- title: string;
23
- event: string;
24
- allEvents: string;
25
- time: string;
26
- action: string;
27
- target: string;
28
- actor: string;
29
- method: string;
30
- actorMember: string;
31
- impersonatedBy: string;
32
- actorOrganization: string;
33
- methodApiKey: string;
34
- methodSession: string;
35
- methodUnknown: string;
36
- };
37
- };
38
- export type AuditLogMessages = typeof translations.en;
39
- export type AuditLogTableProps = DataTableStatus & {
40
- /** Full application-owned event catalog, with localized display labels. */
41
- events?: readonly {
42
- value: string;
43
- label: string;
44
- }[];
45
- state?: EventQuery;
4
+ import type { AuditLogTableProps as CommonProps } from "./schema.js";
5
+ export type { AuditLogMessages } from "./schema.js";
6
+ export type AuditLogTableProps = Omit<CommonProps, keyof DataTableStatus> & DataTableStatus & {
46
7
  onStateChange?: (state: EventQuery) => void;
47
- entries: readonly EventLogRecord[];
48
- /** Total matching records from the query response; paging lives in state. */
49
- rowCount: number;
50
- /** Display time zone for the dateTime column. Defaults to America/New_York. */
51
- timeZone?: string;
52
- /** Overrides the shared KrakstackProvider locale when supplied. */
53
- locale?: string;
54
- messages?: Readonly<Record<string, Partial<AuditLogMessages>>>;
55
8
  renderAction?: (entry: EventLogRecord) => ReactNode;
56
9
  };
57
10
  export declare const AuditLogTable: ({ entries, events, rowCount, timeZone, locale: localeOverride, messages, renderAction, state, onStateChange, ...status }: AuditLogTableProps) => import("react").JSX.Element;
58
- export {};
@@ -652,6 +652,7 @@ var tableClasses = {
652
652
  referenceName: "truncate font-medium",
653
653
  referenceDescription: "text-muted-foreground truncate text-xs"
654
654
  };
655
+ var tableResultsFooterClass = "bg-background text-muted-foreground sticky bottom-0 z-30 shrink-0 border-t px-2 py-2 text-sm";
655
656
  var resolveTableClasses = (overrides) => ({
656
657
  ...tableClasses,
657
658
  ...overrides
@@ -4384,7 +4385,7 @@ var DataTableGallery = ({
4384
4385
  children: renderSections(sections)
4385
4386
  });
4386
4387
  };
4387
- var DataTablePagination = ({
4388
+ var DataTableFooter = ({
4388
4389
  table
4389
4390
  }) => {
4390
4391
  const styles = useContext(DataTableStylesContext);
@@ -4398,8 +4399,13 @@ var DataTablePagination = ({
4398
4399
  send(DataTableMessage.PageRequested({ page }));
4399
4400
  }
4400
4401
  }, [page, pageIndex, pagination, paginationVisible, send]);
4401
- if (!paginationVisible || !pagination)
4402
- return null;
4402
+ if (!paginationVisible || !pagination) {
4403
+ return /* @__PURE__ */ jsx3("div", {
4404
+ className: tableResultsFooterClass,
4405
+ role: "status",
4406
+ children: store.config.labels.results(model.totalRows)
4407
+ });
4408
+ }
4403
4409
  const selected = model.rows.filter((row) => store.state.rowSelection[row.id]).length;
4404
4410
  return /* @__PURE__ */ jsx3("div", {
4405
4411
  "data-table-slot": "pagination",
@@ -4596,7 +4602,7 @@ var HydratedDataTable = (props) => {
4596
4602
  /* @__PURE__ */ jsx3(DataTableContent, {
4597
4603
  table
4598
4604
  }),
4599
- /* @__PURE__ */ jsx3(DataTablePagination, {
4605
+ /* @__PURE__ */ jsx3(DataTableFooter, {
4600
4606
  table
4601
4607
  })
4602
4608
  ]
@@ -5241,9 +5247,11 @@ var TextArrayValue = Schema7.Struct({
5241
5247
  }).annotate({ identifier: "EventTextArrayValue" });
5242
5248
  var eventTextAttribute = (record, key) => Schema7.decodeUnknownOption(TextValue)(record.attributes.find((attribute) => attribute.key === key)?.value).pipe(Option5.map((value) => value.stringValue), Option5.getOrNull);
5243
5249
 
5244
- // ../../src/components/audit-log-table/react.tsx
5245
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
5246
- var translations = {
5250
+ // ../../src/components/audit-log-table/classes.ts
5251
+ var auditTableLayout = "flex min-h-0 flex-1 flex-col";
5252
+
5253
+ // ../../src/components/audit-log-table/index.ts
5254
+ var defaultMessages2 = {
5247
5255
  en: {
5248
5256
  title: "Activity history",
5249
5257
  event: "Action",
@@ -5277,6 +5285,65 @@ var translations = {
5277
5285
  methodUnknown: "Inconnue"
5278
5286
  }
5279
5287
  };
5288
+ var auditLogMessages = (locale, messages) => {
5289
+ const base = locale.split("-")[0];
5290
+ return {
5291
+ ...base === "fr" ? defaultMessages2.fr : defaultMessages2.en,
5292
+ ...messages?.[base],
5293
+ ...messages?.[locale]
5294
+ };
5295
+ };
5296
+ var auditTableState = (state) => state?.eventName && !state.filters?.some(({ id }) => id === "eventName") ? {
5297
+ ...state,
5298
+ filters: [
5299
+ ...state.filters ?? [],
5300
+ { id: "eventName", kind: "values", values: [state.eventName] }
5301
+ ]
5302
+ } : state;
5303
+ var auditRowId = (entry) => eventTextAttribute(entry, "log.record.uid") ?? `${entry.timeUnixNano}:${entry.eventName}`;
5304
+ var auditRowTime = (entry) => Number(BigInt(entry.timeUnixNano) / 1000000n);
5305
+ var auditActionLabel = (entry, events) => events.find(({ value }) => value === entry.eventName)?.label ?? entry.eventName;
5306
+ var auditActor = (entry, labels) => {
5307
+ const type = eventTextAttribute(entry, "app.actor.type");
5308
+ const userId = eventTextAttribute(entry, "user.id");
5309
+ const id = eventTextAttribute(entry, "app.actor.id") ?? userId;
5310
+ if (type === "organization")
5311
+ return { label: labels.actorOrganization, description: id ?? undefined };
5312
+ if (type === "user" || userId !== null) {
5313
+ const name = eventTextAttribute(entry, "user.full_name") || eventTextAttribute(entry, "user.name");
5314
+ const email = eventTextAttribute(entry, "user.email");
5315
+ return {
5316
+ label: name || email || labels.actorMember,
5317
+ description: (name ? email || id : id) ?? undefined
5318
+ };
5319
+ }
5320
+ return { label: type ?? labels.actor, description: id ?? undefined };
5321
+ };
5322
+ var auditTarget = (entry, labels) => {
5323
+ const id = eventTextAttribute(entry, "app.audit.target.id");
5324
+ const name = eventTextAttribute(entry, "app.audit.target.name");
5325
+ const type = eventTextAttribute(entry, "app.audit.target.type");
5326
+ return id === null ? null : {
5327
+ label: name && name !== id ? name : type || labels.target,
5328
+ description: name && name !== id && type ? `${type} · ${id}` : id
5329
+ };
5330
+ };
5331
+ var auditImpersonation = (entry, labels) => {
5332
+ const id = eventTextAttribute(entry, "app.auth.impersonator.id");
5333
+ return id === null ? undefined : `${labels.impersonatedBy}: ${id}`;
5334
+ };
5335
+ var auditMethod = (entry) => {
5336
+ const method = eventTextAttribute(entry, "app.auth.method");
5337
+ return method === "session" || method === "api_key" ? method : "unknown";
5338
+ };
5339
+ var auditMethods = (labels) => ({
5340
+ session: labels.methodSession,
5341
+ api_key: labels.methodApiKey,
5342
+ unknown: labels.methodUnknown
5343
+ });
5344
+
5345
+ // ../../src/components/audit-log-table/react.tsx
5346
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
5280
5347
  var AuditLogTable = ({
5281
5348
  entries,
5282
5349
  events = [],
@@ -5290,54 +5357,22 @@ var AuditLogTable = ({
5290
5357
  ...status
5291
5358
  }) => {
5292
5359
  const locale = useKrakstackLocale4(localeOverride);
5293
- const base = locale.split("-")[0];
5294
- const labels = {
5295
- ...translations.en,
5296
- ...base === "fr" ? translations.fr : translations.en,
5297
- ...messages?.[base],
5298
- ...messages?.[locale]
5299
- };
5300
- const methods = new Map([
5301
- ["session", labels.methodSession],
5302
- ["api_key", labels.methodApiKey]
5303
- ]);
5304
- const tableState = state?.eventName && !state.filters?.some((filter) => filter.id === "eventName") ? {
5305
- ...state,
5306
- filters: [
5307
- ...state.filters ?? [],
5308
- { id: "eventName", kind: "values", values: [state.eventName] }
5309
- ]
5310
- } : state;
5311
- const getActor = (entry) => {
5312
- const type = eventTextAttribute(entry, "app.actor.type");
5313
- const id = eventTextAttribute(entry, "app.actor.id") ?? eventTextAttribute(entry, "user.id");
5314
- if (type === "organization") {
5315
- return { label: labels.actorOrganization, description: id };
5316
- }
5317
- if (type === "user" || eventTextAttribute(entry, "user.id") !== null) {
5318
- const fullName = eventTextAttribute(entry, "user.full_name");
5319
- const name = eventTextAttribute(entry, "user.name");
5320
- const email = eventTextAttribute(entry, "user.email");
5321
- return {
5322
- label: fullName || name || email || labels.actorMember,
5323
- description: fullName || name ? email || id : id
5324
- };
5325
- }
5326
- return { label: type ?? labels.actor, description: id };
5327
- };
5360
+ const labels = auditLogMessages(locale, messages);
5361
+ const methods = auditMethods(labels);
5362
+ const getActor = (entry) => auditActor(entry, labels);
5328
5363
  const columns = [
5329
5364
  {
5330
5365
  colId: "time",
5331
5366
  headerName: labels.time,
5332
5367
  type: "dateTime",
5333
5368
  typeOptions: { timeZone },
5334
- valueGetter: ({ data }) => new Date(Number(BigInt(data.timeUnixNano) / 1000000n))
5369
+ valueGetter: ({ data }) => new Date(auditRowTime(data))
5335
5370
  },
5336
5371
  {
5337
5372
  field: "eventName",
5338
5373
  headerName: labels.action,
5339
5374
  filterOptions: events,
5340
- cellRenderer: ({ data }) => renderAction?.(data) ?? events.find((event) => event.value === data.eventName)?.label ?? data.eventName
5375
+ cellRenderer: ({ data }) => renderAction?.(data) ?? auditActionLabel(data, events)
5341
5376
  },
5342
5377
  {
5343
5378
  colId: "record",
@@ -5350,15 +5385,7 @@ var AuditLogTable = ({
5350
5385
  type: "reference",
5351
5386
  typeOptions: {
5352
5387
  imageVariant: "square",
5353
- getItem: (entry) => {
5354
- const id = eventTextAttribute(entry, "app.audit.target.id");
5355
- const name = eventTextAttribute(entry, "app.audit.target.name");
5356
- const type = eventTextAttribute(entry, "app.audit.target.type");
5357
- return id === null ? null : {
5358
- label: name && name !== id ? name : type || labels.target,
5359
- description: name && name !== id && type ? `${type} · ${id}` : id
5360
- };
5361
- }
5388
+ getItem: (entry) => auditTarget(entry, labels)
5362
5389
  }
5363
5390
  },
5364
5391
  {
@@ -5375,20 +5402,16 @@ var AuditLogTable = ({
5375
5402
  getItem: getActor
5376
5403
  },
5377
5404
  cellRenderer: ({ data }) => {
5378
- const impersonatorId = eventTextAttribute(data, "app.auth.impersonator.id");
5405
+ const impersonation = auditImpersonation(data, labels);
5379
5406
  return /* @__PURE__ */ jsxs4("div", {
5380
5407
  className: "flex min-w-0 flex-col gap-1",
5381
5408
  children: [
5382
5409
  /* @__PURE__ */ jsx4(DataTableReferenceCell, {
5383
5410
  item: getActor(data)
5384
5411
  }),
5385
- impersonatorId !== null ? /* @__PURE__ */ jsxs4("span", {
5412
+ impersonation !== undefined ? /* @__PURE__ */ jsx4("span", {
5386
5413
  className: "text-muted-foreground text-xs",
5387
- children: [
5388
- labels.impersonatedBy,
5389
- ": ",
5390
- impersonatorId
5391
- ]
5414
+ children: impersonation
5392
5415
  }) : null
5393
5416
  ]
5394
5417
  });
@@ -5397,40 +5420,34 @@ var AuditLogTable = ({
5397
5420
  {
5398
5421
  colId: "method",
5399
5422
  headerName: labels.method,
5400
- filterOptions: [
5401
- { value: "session", label: labels.methodSession },
5402
- { value: "api_key", label: labels.methodApiKey },
5403
- { value: "unknown", label: labels.methodUnknown }
5404
- ],
5405
- filterValueGetter: ({ data }) => {
5406
- const method = eventTextAttribute(data, "app.auth.method");
5407
- return method === "session" || method === "api_key" ? method : "unknown";
5408
- },
5423
+ filterOptions: Object.entries(methods).map(([value, label]) => ({
5424
+ value,
5425
+ label
5426
+ })),
5427
+ filterValueGetter: ({ data }) => auditMethod(data),
5409
5428
  sortable: false,
5410
- valueGetter: ({ data }) => {
5411
- const method = eventTextAttribute(data, "app.auth.method");
5412
- return method === null ? labels.methodUnknown : methods.get(method) ?? labels.methodUnknown;
5413
- }
5429
+ valueGetter: ({ data }) => methods[auditMethod(data)]
5414
5430
  }
5415
5431
  ];
5416
5432
  return /* @__PURE__ */ jsx4("section", {
5417
5433
  "aria-label": labels.title,
5418
- className: "flex flex-col gap-4",
5434
+ className: auditTableLayout,
5419
5435
  children: /* @__PURE__ */ jsx4(DataTable, {
5420
5436
  locale,
5421
5437
  status,
5422
- state: tableState,
5438
+ state: auditTableState(state),
5423
5439
  onStateChange: onStateChange ? (next) => onStateChange({
5424
5440
  ...next,
5425
5441
  eventName: undefined
5426
5442
  }) : undefined,
5427
5443
  features: {
5428
5444
  filtering: !!onStateChange,
5429
- pagination: { mode: "server", rowCount }
5445
+ pagination: { mode: "server", rowCount },
5446
+ virtualization: { scroll: "internal" }
5430
5447
  },
5431
5448
  columnDefs: columns,
5432
5449
  rowData: entries,
5433
- getRowId: (entry) => eventTextAttribute(entry, "log.record.uid") ?? `${entry.timeUnixNano}:${entry.eventName}`
5450
+ getRowId: auditRowId
5434
5451
  })
5435
5452
  });
5436
5453
  };
@@ -0,0 +1,122 @@
1
+ import { Schema } from "effect";
2
+ declare const AuditLogMessagesSchema: Schema.Struct<{
3
+ readonly title: Schema.String;
4
+ readonly event: Schema.String;
5
+ readonly allEvents: Schema.String;
6
+ readonly time: Schema.String;
7
+ readonly action: Schema.String;
8
+ readonly target: Schema.String;
9
+ readonly actor: Schema.String;
10
+ readonly method: Schema.String;
11
+ readonly actorMember: Schema.String;
12
+ readonly impersonatedBy: Schema.String;
13
+ readonly actorOrganization: Schema.String;
14
+ readonly methodApiKey: Schema.String;
15
+ readonly methodSession: Schema.String;
16
+ readonly methodUnknown: Schema.String;
17
+ }>;
18
+ export type AuditLogMessages = typeof AuditLogMessagesSchema.Type;
19
+ export declare const AuditLogTablePropsSchema: Schema.Struct<{
20
+ readonly entries: Schema.$Array<Schema.Struct<{
21
+ readonly eventName: Schema.NonEmptyString;
22
+ readonly timeUnixNano: Schema.String;
23
+ readonly observedTimeUnixNano: Schema.optional<Schema.String>;
24
+ readonly severityNumber: Schema.optional<Schema.Int>;
25
+ readonly traceId: Schema.optional<Schema.String>;
26
+ readonly spanId: Schema.optional<Schema.String>;
27
+ readonly attributes: Schema.$Array<Schema.Struct<{
28
+ readonly key: Schema.NonEmptyString;
29
+ readonly value: Schema.StructWithRest<Schema.Struct<{
30
+ readonly stringValue: Schema.optional<Schema.String>;
31
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
32
+ }>>;
33
+ }>>;
34
+ readonly rowCount: Schema.Int;
35
+ readonly events: Schema.optionalKey<Schema.$Array<Schema.Struct<{
36
+ readonly value: Schema.String;
37
+ readonly label: Schema.String;
38
+ }>>>;
39
+ readonly state: Schema.optionalKey<Schema.Struct<{
40
+ readonly page: Schema.decodeTo<Schema.Int, Schema.optional<Schema.Union<readonly [Schema.Finite, Schema.FiniteFromString]>>, never, never>;
41
+ readonly pageSize: Schema.decodeTo<Schema.Int, Schema.optional<Schema.Union<readonly [Schema.Finite, Schema.FiniteFromString]>>, never, never>;
42
+ readonly globalFilter: Schema.optional<Schema.String>;
43
+ readonly sort: Schema.optional<Schema.declare<readonly {
44
+ readonly id: string;
45
+ readonly direction: "asc" | "desc";
46
+ }[], readonly {
47
+ readonly id: string;
48
+ readonly direction: "asc" | "desc";
49
+ }[]>>;
50
+ readonly filters: Schema.optional<Schema.declare<readonly ({
51
+ readonly id: string;
52
+ readonly kind: "number";
53
+ readonly min?: number | undefined;
54
+ readonly max?: number | undefined;
55
+ } | {
56
+ readonly id: string;
57
+ readonly kind: "date";
58
+ readonly from?: string | undefined;
59
+ readonly to?: string | undefined;
60
+ } | {
61
+ readonly id: string;
62
+ readonly kind: "text";
63
+ readonly operator: "contains" | "endsWith" | "equals" | "startsWith";
64
+ readonly value: string;
65
+ } | {
66
+ readonly id: string;
67
+ readonly kind: "boolean";
68
+ readonly value: boolean;
69
+ } | {
70
+ readonly id: string;
71
+ readonly kind: "values";
72
+ readonly values: readonly [string, ...string[]];
73
+ })[], readonly ({
74
+ readonly id: string;
75
+ readonly kind: "number";
76
+ readonly min?: number | undefined;
77
+ readonly max?: number | undefined;
78
+ } | {
79
+ readonly id: string;
80
+ readonly kind: "date";
81
+ readonly from?: string | undefined;
82
+ readonly to?: string | undefined;
83
+ } | {
84
+ readonly id: string;
85
+ readonly kind: "text";
86
+ readonly operator: "contains" | "endsWith" | "equals" | "startsWith";
87
+ readonly value: string;
88
+ } | {
89
+ readonly id: string;
90
+ readonly kind: "boolean";
91
+ readonly value: boolean;
92
+ } | {
93
+ readonly id: string;
94
+ readonly kind: "values";
95
+ readonly values: readonly [string, ...string[]];
96
+ })[]>>;
97
+ readonly eventName: Schema.optional<Schema.NonEmptyString>;
98
+ }>>;
99
+ readonly timeZone: Schema.optionalKey<Schema.String>;
100
+ readonly locale: Schema.optionalKey<Schema.String>;
101
+ readonly messages: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
102
+ readonly title: Schema.optional<Schema.String>;
103
+ readonly event: Schema.optional<Schema.String>;
104
+ readonly allEvents: Schema.optional<Schema.String>;
105
+ readonly time: Schema.optional<Schema.String>;
106
+ readonly action: Schema.optional<Schema.String>;
107
+ readonly target: Schema.optional<Schema.String>;
108
+ readonly actor: Schema.optional<Schema.String>;
109
+ readonly method: Schema.optional<Schema.String>;
110
+ readonly actorMember: Schema.optional<Schema.String>;
111
+ readonly impersonatedBy: Schema.optional<Schema.String>;
112
+ readonly actorOrganization: Schema.optional<Schema.String>;
113
+ readonly methodApiKey: Schema.optional<Schema.String>;
114
+ readonly methodSession: Schema.optional<Schema.String>;
115
+ readonly methodUnknown: Schema.optional<Schema.String>;
116
+ }>>>;
117
+ readonly loading: Schema.optionalKey<Schema.Boolean>;
118
+ readonly error: Schema.optionalKey<Schema.String>;
119
+ readonly empty: Schema.optionalKey<Schema.String>;
120
+ }>;
121
+ export type AuditLogTableProps = typeof AuditLogTablePropsSchema.Type;
122
+ export {};
@@ -39,10 +39,10 @@ export declare const CopyButton: Component.Component<"CopyButton", {
39
39
  }, {
40
40
  readonly status: "copied" | "failed" | "idle";
41
41
  }, {
42
- readonly _tag: "Reset";
43
- } | {
44
42
  readonly _tag: "Finished";
45
43
  readonly success: boolean;
46
44
  } | {
47
45
  readonly _tag: "Pressed";
46
+ } | {
47
+ readonly _tag: "Reset";
48
48
  }, never, never, Html.Elements, {}, never>;
@@ -98,8 +98,6 @@ export declare const DangerConfirmationModel: Component.Component<"DangerConfirm
98
98
  readonly text: string;
99
99
  readonly status: "failed" | "idle" | "pending" | "succeeded";
100
100
  }, {
101
- readonly _tag: "Opened";
102
- } | {
103
101
  readonly _tag: "Confirmed";
104
102
  } | {
105
103
  readonly _tag: "Dismissed";
@@ -109,5 +107,7 @@ export declare const DangerConfirmationModel: Component.Component<"DangerConfirm
109
107
  } | {
110
108
  readonly _tag: "Finished";
111
109
  readonly success: boolean;
110
+ } | {
111
+ readonly _tag: "Opened";
112
112
  }, never, RunConfirmation, never, {}, never>;
113
113
  export {};
@@ -36,6 +36,7 @@ export declare const tableClasses: {
36
36
  readonly referenceName: "truncate font-medium";
37
37
  readonly referenceDescription: "text-muted-foreground truncate text-xs";
38
38
  };
39
+ export declare const tableResultsFooterClass = "bg-background text-muted-foreground sticky bottom-0 z-30 shrink-0 border-t px-2 py-2 text-sm";
39
40
  export declare const resolveTableClasses: (overrides?: TableClassesOverrides) => {
40
41
  selectionCell: string;
41
42
  selectionCenter: string;
@@ -1711,6 +1711,18 @@ export declare const DataTable: Component.Component<"DataTable", {
1711
1711
  } | null;
1712
1712
  readonly invalidFilter: boolean;
1713
1713
  }, {
1714
+ readonly _tag: "PreferencesLoaded";
1715
+ readonly preferences: {
1716
+ readonly columnVisibility: {
1717
+ readonly [x: string]: boolean;
1718
+ };
1719
+ readonly columnSizing: {
1720
+ readonly [x: string]: number;
1721
+ };
1722
+ readonly grouping?: readonly string[] | undefined;
1723
+ readonly view: "gallery" | "table";
1724
+ } | null;
1725
+ } | {
1714
1726
  readonly _tag: "BuiltInExportRequested";
1715
1727
  readonly format: "csv" | "json";
1716
1728
  readonly locale?: string | undefined;
@@ -1850,18 +1862,6 @@ export declare const DataTable: Component.Component<"DataTable", {
1850
1862
  } | {
1851
1863
  readonly _tag: "PageSizeRequested";
1852
1864
  readonly pageSize: number;
1853
- } | {
1854
- readonly _tag: "PreferencesLoaded";
1855
- readonly preferences: {
1856
- readonly columnVisibility: {
1857
- readonly [x: string]: boolean;
1858
- };
1859
- readonly columnSizing: {
1860
- readonly [x: string]: number;
1861
- };
1862
- readonly grouping?: readonly string[] | undefined;
1863
- readonly view: "gallery" | "table";
1864
- } | null;
1865
1865
  } | {
1866
1866
  readonly _tag: "ReferenceImageFailed";
1867
1867
  readonly src: string;
@@ -506,6 +506,7 @@ var tableClasses = {
506
506
  referenceName: "truncate font-medium",
507
507
  referenceDescription: "text-muted-foreground truncate text-xs"
508
508
  };
509
+ var tableResultsFooterClass = "bg-background text-muted-foreground sticky bottom-0 z-30 shrink-0 border-t px-2 py-2 text-sm";
509
510
  var resolveTableClasses = (overrides) => ({
510
511
  ...tableClasses,
511
512
  ...overrides
@@ -1997,7 +1998,9 @@ var DataTable = Html2.component({
1997
1998
  const dropOnRow = (rowId, group) => group ? DataTableMessage.GroupDropped(group) : reorder ? DataTableMessage.DragDropped({ targetId: rowId }) : undefined;
1998
1999
  const rowActions = reorder || props.rowData.some(({ actions }) => actions?.length);
1999
2000
  const span = Math.max(1, columns.length + Number(!!selection) + Number(rowActions) + Number(draggable));
2000
- const virtual = tableVirtualization(rows.length, features.virtualization, !grouping.length && !gallery && !features.reordering && props.status?.error === undefined && rows.length > 0);
2001
+ const virtualization = features.virtualization;
2002
+ const fillHeight = virtualization && virtualization !== true && virtualization.scroll === "internal";
2003
+ const virtual = tableVirtualization(rows.length, virtualization, !grouping.length && !gallery && !features.reordering && props.status?.error === undefined && rows.length > 0);
2001
2004
  const ids = rows.filter(({ selectable }) => selectable !== false).map(({ id }) => id);
2002
2005
  const selectedHere = ids.filter((id) => selected.has(id)).length;
2003
2006
  const status = props.status;
@@ -2448,7 +2451,7 @@ var DataTable = Html2.component({
2448
2451
  ];
2449
2452
  });
2450
2453
  };
2451
- return h.section.class(cn("grid min-w-0 gap-2", props.className)).onMount(PersistPreferences({
2454
+ return h.section.class(cn("min-w-0 gap-2", fillHeight ? "flex min-h-0 flex-1 flex-col" : "grid", props.className)).onMount(PersistPreferences({
2452
2455
  columns: props.columnDefs.map(({ id }) => id),
2453
2456
  gallery: !!features.gallery,
2454
2457
  preferences: tablePreferences(model)
@@ -2682,7 +2685,7 @@ var DataTable = Html2.component({
2682
2685
  ] : [];
2683
2686
  }) : renderGroups(rows, 0, "")));
2684
2687
  };
2685
- const viewport = () => h.div.class("@container overflow-auto");
2688
+ const viewport = () => h.div.class(cn("@container overflow-auto", fillHeight && "min-h-0 flex-1"));
2686
2689
  if (!virtual)
2687
2690
  return viewport().children(renderTable());
2688
2691
  return VirtualList(h, {
@@ -2694,11 +2697,11 @@ var DataTable = Html2.component({
2694
2697
  overscan: virtual.overscan,
2695
2698
  initialCount: virtual.initialCount
2696
2699
  },
2697
- view: (list) => virtual.scroll === "page" ? h.div.children(renderTable(list)) : list.viewport(viewport().style({
2700
+ view: (list) => virtual.scroll === "page" ? h.div.children(renderTable(list)) : list.viewport(fillHeight ? viewport() : viewport().style({
2698
2701
  maxHeight: `${virtual.height}px`
2699
2702
  })).children(renderTable(list))
2700
2703
  });
2701
- })(), paginationVisible && Pagination(h, {
2704
+ })(), paginationVisible ? Pagination(h, {
2702
2705
  props: {
2703
2706
  locale,
2704
2707
  page,
@@ -2712,7 +2715,7 @@ var DataTable = Html2.component({
2712
2715
  PageChanged: ({ page }) => DataTableMessage.PageRequested({ page }),
2713
2716
  PageSizeChanged: ({ pageSize }) => DataTableMessage.PageSizeRequested({ pageSize })
2714
2717
  }
2715
- }));
2718
+ }) : h.div.attr("role", "status").class(tableResultsFooterClass).children(paginationMessages(locale).results(totalRows)));
2716
2719
  }
2717
2720
  });
2718
2721
  export {
@@ -652,6 +652,7 @@ var tableClasses = {
652
652
  referenceName: "truncate font-medium",
653
653
  referenceDescription: "text-muted-foreground truncate text-xs"
654
654
  };
655
+ var tableResultsFooterClass = "bg-background text-muted-foreground sticky bottom-0 z-30 shrink-0 border-t px-2 py-2 text-sm";
655
656
  var resolveTableClasses = (overrides) => ({
656
657
  ...tableClasses,
657
658
  ...overrides
@@ -4389,7 +4390,7 @@ var DataTableGallery = ({
4389
4390
  children: renderSections(sections)
4390
4391
  });
4391
4392
  };
4392
- var DataTablePagination = ({
4393
+ var DataTableFooter = ({
4393
4394
  table
4394
4395
  }) => {
4395
4396
  const styles = useContext(DataTableStylesContext);
@@ -4403,8 +4404,13 @@ var DataTablePagination = ({
4403
4404
  send(DataTableMessage.PageRequested({ page }));
4404
4405
  }
4405
4406
  }, [page, pageIndex, pagination, paginationVisible, send]);
4406
- if (!paginationVisible || !pagination)
4407
- return null;
4407
+ if (!paginationVisible || !pagination) {
4408
+ return /* @__PURE__ */ jsx3("div", {
4409
+ className: tableResultsFooterClass,
4410
+ role: "status",
4411
+ children: store.config.labels.results(model.totalRows)
4412
+ });
4413
+ }
4408
4414
  const selected = model.rows.filter((row) => store.state.rowSelection[row.id]).length;
4409
4415
  return /* @__PURE__ */ jsx3("div", {
4410
4416
  "data-table-slot": "pagination",
@@ -4601,7 +4607,7 @@ var HydratedDataTable = (props) => {
4601
4607
  /* @__PURE__ */ jsx3(DataTableContent, {
4602
4608
  table
4603
4609
  }),
4604
- /* @__PURE__ */ jsx3(DataTablePagination, {
4610
+ /* @__PURE__ */ jsx3(DataTableFooter, {
4605
4611
  table
4606
4612
  })
4607
4613
  ]