@ocelescope/core 0.10.1 → 0.11.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 (40) hide show
  1. package/README.md +2 -2
  2. package/dist/ActivityPicker-CtFSu1YR.js +31 -0
  3. package/dist/{AreaChart-DoD3LM50.js → AreaChart-BSwN1fMp.js} +6 -6
  4. package/dist/AttributePicker-Cq7luTEi.js +94 -0
  5. package/dist/{BarChart-Cixo5Okd.js → BarChart-CyMePf1z.js} +6 -6
  6. package/dist/E2ORelationPicker-C8EmrbFx.js +45 -0
  7. package/dist/EventAttributePicker-BgEdydek.js +26 -0
  8. package/dist/EventPicker-D5uNOTw1.js +38 -0
  9. package/dist/HistogramChart-CJwvvDUu.js +86 -0
  10. package/dist/{LineChart-CVz-dkJI.js → LineChart-Cbxnm338.js} +6 -6
  11. package/dist/O2ORelationPicker-CryAxxUo.js +43 -0
  12. package/dist/ObjectAttributePicker-D_I3LQsY.js +26 -0
  13. package/dist/ObjectPicker-D-ksQveT.js +38 -0
  14. package/dist/ObjectTypePicker-Bw8Fsktx.js +45 -0
  15. package/dist/{OcelChart-DvGTjJXo.js → OcelChart-DJNM5peW.js} +3 -4
  16. package/dist/OptionPicker-DQ-WYFQZ.js +344 -0
  17. package/dist/{PieChart-DBiASngC.js → PieChart-BmMoI0TY.js} +6 -6
  18. package/dist/{ScatterChart-jIQOjQes.js → ScatterChart-CASPRlZU.js} +6 -6
  19. package/dist/{SqlChart-bwDArK2l.js → SqlChart-cxKpWkyh.js} +34 -35
  20. package/dist/{SunburstChart-D6FhYBHI.js → SunburstChart-Ddx9EaL-.js} +5 -5
  21. package/dist/attributeOptions-COiWnKUS.js +36 -0
  22. package/dist/{cartesian-5TPNWjl_.js → cartesian-CtdS2iZb.js} +2 -3
  23. package/dist/index.d.ts +228 -209
  24. package/dist/index.js +83 -172
  25. package/dist/relationOptions-hEEsEQrx.js +32 -0
  26. package/dist/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
  27. package/dist/{series-BBXVjHHY.js → series-Bx0HVnSy.js} +2 -3
  28. package/dist/style.css +630 -745
  29. package/dist/{Plot-CxHHyXot.js → useChart-BK4pjGal.js} +29 -5
  30. package/dist/{useCurrentOCEL-BeBa7K0g.js → useCurrentOCEL-BUH5XGje.js} +2 -4
  31. package/dist/useOcelId-BEC6_yRa.js +8 -0
  32. package/dist/{useOcelQuery-D1QM-Zgv.js → useOcelQuery-6vtgZNzz.js} +2 -3
  33. package/dist/useSearch-CdXjjv-a.js +18 -0
  34. package/package.json +25 -26
  35. package/dist/ActivityPicker-DbrGeiC_.js +0 -18
  36. package/dist/EventAttributePicker-Cf2vVKv5.js +0 -27
  37. package/dist/NamePicker-Be-qmr1x.js +0 -43
  38. package/dist/ObjectAttributePicker-CL43EsYt.js +0 -27
  39. package/dist/ObjectTypePicker-CKmszS0y.js +0 -18
  40. package/dist/useOcelId-BSU0-Srk.js +0 -6
package/dist/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import { Select } from "@mantine/core";
2
- import { AggregatedAttribute, RelationCountSummary, SqlQueryResult, TypedAttribute, ValueType } from "@ocelescope/api-base";
2
+ import { AggregatedAttribute, RelationCountSummary, TypedAttribute, ValueType } from "@ocelescope/api-base";
3
3
  import { DataTableColumn } from "mantine-datatable";
4
- import { ComponentProps, SVGProps } from "react";
4
+ import { ComponentProps, ComponentType, JSX, SVGProps } from "react";
5
5
  import { Dropzone, FileWithPath } from "@mantine/dropzone";
6
6
  import { ViewerConfig, ViewerProps } from "@r4pm/components";
7
7
  import { GetStaticPaths, GetStaticProps, NextApiRequest, NextApiResponse } from "next";
8
- //#region src/components/AttributeTable.d.ts
9
8
  type OcelVersion$1 = "original" | "filtered";
10
9
  declare const AttributesTable: React.FC<{
11
10
  ocelId: string;
@@ -15,26 +14,38 @@ declare const AttributesTable: React.FC<{
15
14
  hideRange?: boolean;
16
15
  hideValues?: boolean;
17
16
  ocelVersion?: OcelVersion$1;
17
+ viewId?: string;
18
18
  alwaysExpandable?: boolean;
19
19
  visibleAttributes?: string[];
20
20
  height?: string | number;
21
21
  className?: string;
22
22
  style?: React.CSSProperties;
23
23
  }>;
24
- //#endregion
25
- //#region src/components/BarList/BarList.d.ts
26
24
  export declare const BarList: React.FC<{
27
25
  data: Record<string, number>;
28
26
  labelHeader: string;
29
27
  valueHeader?: string;
30
28
  maxVisibleItems?: number;
29
+ className?: string;
30
+ style?: React.CSSProperties;
31
31
  }>;
32
- //#endregion
33
- //#region src/components/charts/types.d.ts
34
32
  /** One row of a tidy result: a value per column. */
35
33
  type Row = Record<string, unknown>;
36
- /** What every chart is given: rows, and which columns to read them by. */
37
- interface ChartProps {
34
+ /** A tidy table: its rows, and the type its source reported per column. */
35
+ interface Table$1 {
36
+ columns: readonly {
37
+ name: string;
38
+ type: string;
39
+ }[];
40
+ rows: readonly Row[];
41
+ }
42
+ /**
43
+ * What every chart is given: rows, and which columns to read them by.
44
+ *
45
+ * Colour and selection follow the r4pm viewer contract: `colorOf` and
46
+ * `onSelect` come from the ambient `ViewerConfig` unless given here.
47
+ */
48
+ interface ChartProps extends Pick<ViewerConfig, "colorOf" | "onSelect"> {
38
49
  rows: readonly Row[];
39
50
  /** Column whose values name the categories. */
40
51
  x: string;
@@ -42,10 +53,10 @@ interface ChartProps {
42
53
  y: string | readonly string[];
43
54
  /** Column unfolded into one series per distinct value. */
44
55
  series?: string;
45
- /** Colour for a name, e.g. the one the graph viewers give it. */
46
- colorOf?: (name: string) => string;
47
- /** A click on a mark, by the name that mark carries. */
48
- onSelect?: (name: string, point: unknown) => void;
56
+ /** Scope the marks are coloured and selected under ("activity",
57
+ * "objectType"), so a name keeps the colour the other viewers give it.
58
+ * Without one the plot's own colours are used. */
59
+ colorScope?: string;
49
60
  }
50
61
  /** What the charts drawn against two axes take on top of the rest. */
51
62
  interface CartesianChartProps extends ChartProps {
@@ -54,6 +65,34 @@ interface CartesianChartProps extends ChartProps {
54
65
  * the axis down to the millisecond around itself. */
55
66
  xRange?: readonly [unknown, unknown];
56
67
  }
68
+ type ChartType = "bar" | "histogram" | "line" | "area" | "scatter" | "pie" | "sunburst";
69
+ /** How a table is drawn, when its columns alone should not decide. */
70
+ interface ChartOptions {
71
+ type?: ChartType;
72
+ /** Types offered in the header switch. Fewer than two hides it. */
73
+ types?: ChartType[];
74
+ /** Category column. Defaults to the first non-numeric column. For a
75
+ * histogram, the column holding each bin's lower edge. */
76
+ x?: string;
77
+ /** Histogram only: the column holding each bin's upper edge. */
78
+ xEnd?: string;
79
+ /** Measure column(s). Defaults to every numeric column. */
80
+ y?: string | string[];
81
+ /** Column unfolded into one series per distinct value. */
82
+ series?: string;
83
+ /** Sunburst rings, innermost first. Defaults to `[x, series]`. */
84
+ path?: string[];
85
+ stacked?: boolean;
86
+ horizontal?: boolean;
87
+ /** For line charts, overlay one y scale per line rather than sharing one. */
88
+ yAxes?: "shared" | "independent";
89
+ /** Colour through the host's resolver under this scope ("activity",
90
+ * "objectType"), so a category keeps the colour the graph viewers give it. */
91
+ colorScope?: string;
92
+ title?: string;
93
+ height?: number | string;
94
+ }
95
+ type SqlChartProps = ViewerProps<Table$1> & ChartOptions;
57
96
  /** One trace's worth of rows: what it is called, and what it draws. */
58
97
  interface Series {
59
98
  name: string;
@@ -63,16 +102,19 @@ interface Series {
63
102
  * zero. Plotly decides the axis from what it is given. */
64
103
  values: Array<number | string>;
65
104
  }
66
- //#endregion
67
- //#region src/components/charts/BarChart.d.ts
68
105
  interface BarChartProps extends CartesianChartProps {
69
106
  /** Stack the traces instead of standing them side by side. */
70
107
  stacked?: boolean;
71
108
  /** Bars along the x axis, which long category names need. */
72
109
  horizontal?: boolean;
73
110
  }
74
- //#endregion
75
- //#region src/components/charts/LineChart.d.ts
111
+ interface HistogramChartProps extends Omit<ChartProps, "series"> {
112
+ /** Column holding each bin's upper edge; `x` holds its lower one. A row
113
+ * without a lower edge counts everything below its upper one, and the
114
+ * other way round - so outliers get a bar of their own instead of
115
+ * stretching the axis. */
116
+ xEnd: string;
117
+ }
76
118
  interface LineChartProps extends CartesianChartProps {
77
119
  /** Hold each value until the next one, instead of sloping between them.
78
120
  * What a thing was worth between two readings is what it last read. */
@@ -82,51 +124,16 @@ interface LineChartProps extends CartesianChartProps {
82
124
  * line colour, so the association stays visible without separate plots. */
83
125
  yAxes?: "shared" | "independent";
84
126
  }
85
- //#endregion
86
- //#region src/components/charts/PieChart.d.ts
87
127
  interface PieChartProps extends ChartProps {
88
128
  /** The hole in the middle, as a share of the radius. 0 for a full pie. */
89
129
  hole?: number;
90
130
  }
91
- //#endregion
92
- //#region src/components/charts/SunburstChart.d.ts
93
131
  interface SunburstChartProps extends ChartProps {
94
132
  /** The rings, innermost first. Defaults to the category, then the series. */
95
133
  path?: readonly string[];
96
134
  }
97
- //#endregion
98
- //#region src/components/charts/AreaChart.d.ts
99
135
  type AreaChartProps = CartesianChartProps;
100
- //#endregion
101
- //#region src/components/charts/ScatterChart.d.ts
102
136
  type ScatterChartProps = CartesianChartProps;
103
- //#endregion
104
- //#region src/components/charts/index.d.ts
105
- type ChartType = "bar" | "line" | "area" | "scatter" | "pie" | "sunburst";
106
- /** How a query's result is drawn, when the columns alone should not decide. */
107
- interface ChartOptions {
108
- type?: ChartType;
109
- /** Types offered in the header switch. Fewer than two hides it. */
110
- types?: ChartType[];
111
- /** Category column. Defaults to the first non-numeric column. */
112
- x?: string;
113
- /** Measure column(s). Defaults to every numeric column. */
114
- y?: string | string[];
115
- /** Column unfolded into one series per distinct value. */
116
- series?: string;
117
- /** Sunburst rings, innermost first. Defaults to `[x, series]`. */
118
- path?: string[];
119
- stacked?: boolean;
120
- horizontal?: boolean;
121
- /** For line charts, overlay one y scale per line rather than sharing one. */
122
- yAxes?: "shared" | "independent";
123
- /** Colour through the host's resolver under this scope ("activity",
124
- * "objectType"), so a category keeps the colour the graph viewers give it. */
125
- colorScope?: string;
126
- title?: string;
127
- height?: number | string;
128
- }
129
- type SqlChartProps = ViewerProps<SqlQueryResult> & ChartOptions;
130
137
  interface OcelChartProps extends ChartOptions, ViewerConfig {
131
138
  /** DuckDB SQL over the OCEL's stored tables: `events`, `objects`, `e2o`,
132
139
  * `o2o`, `object_changes`. One `SELECT`; the backend refuses anything else. */
@@ -140,6 +147,7 @@ interface OcelChartProps extends ChartOptions, ViewerConfig {
140
147
  enabled?: boolean;
141
148
  }
142
149
  export declare const BarChart: import("react").ComponentType<BarChartProps>;
150
+ export declare const HistogramChart: import("react").ComponentType<HistogramChartProps>;
143
151
  export declare const LineChart: import("react").ComponentType<LineChartProps>;
144
152
  export declare const AreaChart: import("react").ComponentType<CartesianChartProps>;
145
153
  export declare const ScatterChart: import("react").ComponentType<CartesianChartProps>;
@@ -147,8 +155,6 @@ export declare const PieChart: import("react").ComponentType<PieChartProps>;
147
155
  export declare const SunburstChart: import("react").ComponentType<SunburstChartProps>;
148
156
  export declare const SqlChart: import("react").ComponentType<SqlChartProps>;
149
157
  export declare const OcelChart: import("react").ComponentType<OcelChartProps>;
150
- //#endregion
151
- //#region src/components/Dropzone/Dropzone.d.ts
152
158
  export declare const FileDropzone: React.FC<{
153
159
  onUpload: (files: FileWithPath[]) => void;
154
160
  accept?: ComponentProps<typeof Dropzone>["accept"];
@@ -159,25 +165,17 @@ export declare const FileDropzone: React.FC<{
159
165
  description?: React.ReactNode;
160
166
  };
161
167
  }>;
162
- //#endregion
163
- //#region src/components/Dropzone/FullScreenUpload.d.ts
164
168
  export declare const FullScreenUpload: React.FC<{
165
169
  onSuccess?: () => void;
166
170
  accept?: ComponentProps<typeof Dropzone.FullScreen>["accept"];
167
171
  label?: React.ReactNode;
168
172
  active?: boolean;
169
173
  }>;
170
- //#endregion
171
- //#region src/components/EventHandler.d.ts
172
174
  export declare const sseHandler: (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
173
- //#endregion
174
- //#region src/components/HelpModal/HelpModal.d.ts
175
175
  export declare const HelpModal: React.FC<{
176
176
  visible: boolean;
177
177
  onClose: () => void;
178
178
  }>;
179
- //#endregion
180
- //#region src/lib/config.d.ts
181
179
  type Author = {
182
180
  name: string;
183
181
  link?: string;
@@ -205,8 +203,6 @@ export type OcelescopeConfig = {
205
203
  };
206
204
  export declare const defineModule: (def: ModuleDefinition) => ModuleDefinition;
207
205
  export declare const defineModuleRoute: (def: ModuleRouteDefinition) => ModuleRouteDefinition;
208
- //#endregion
209
- //#region src/components/ModulePage.d.ts
210
206
  type ModulePageProps = {
211
207
  moduleName: string;
212
208
  routeName: string;
@@ -218,135 +214,176 @@ export declare const createModulesPage: (config: OcelescopeConfig) => {
218
214
  getInitialProps?(context: import("next").NextPageContext): ModulePageProps | Promise<ModulePageProps>;
219
215
  };
220
216
  };
221
- //#endregion
222
- //#region src/components/OcelescopeApp.d.ts
223
217
  export declare const OcelescopeApp: (config: OcelescopeConfig) => React.FC<any>;
224
- //#endregion
225
- //#region src/components/OcelescopeDocument.d.ts
226
218
  export declare const OcelescopeDocument: React.FC;
227
- //#endregion
228
- //#region src/components/OcelSelect/OcelSelect.d.ts
229
219
  export declare const OcelSelect: ({ value, ...props }: Omit<ComponentProps<typeof Select<string>>, "data">) => import("react").JSX.Element;
230
- //#endregion
231
- //#region src/components/pickers/types.d.ts
232
- /** Which OCEL a picker reads its choices from. */
233
- interface OcelSource {
234
- /** Defaults to the OCEL the app has selected. */
235
- ocelId?: string;
236
- /** The unfiltered log, for choices that must not shift under a filter. */
237
- ocelVersion?: "filtered" | "original";
238
- }
239
- /** Picking one name, or none. */
240
- interface SinglePicker {
220
+ /** Picking one value, or none. */
221
+ interface SingleSelection<T> {
241
222
  multiple?: false;
242
- value: string | null | undefined;
243
- onChange: (value: string | undefined) => void;
223
+ value: T | null | undefined;
224
+ onChange: (value: T | undefined) => void;
244
225
  }
245
- /** Picking any number of names. */
246
- interface MultiPicker {
226
+ /** Picking any number of values. */
227
+ interface MultiSelection<T> {
247
228
  multiple: true;
248
- value: readonly string[];
249
- onChange: (value: string[]) => void;
229
+ value: readonly T[];
230
+ onChange: (value: T[]) => void;
250
231
  }
251
- /** What a picker picks. Single unless it says otherwise. */
252
- type Selection = SinglePicker | MultiPicker;
253
- //#endregion
254
- //#region src/components/pickers/NamePicker.d.ts
255
- /** A name to pick, and how often it occurs. */
256
- interface NameItem {
257
- key: string;
258
- count: number;
259
- }
260
- interface NamePickerProps {
261
- /** Name to count, or the same as a list. */
262
- items: Record<string, number> | readonly NameItem[];
232
+ /** What a picker picks. Single unless `multiple` is set. */
233
+ type Selection<T> = SingleSelection<T> | MultiSelection<T>;
234
+ /** How a picker looks and reads, whatever it picks. */
235
+ interface PickerProps {
236
+ /**
237
+ * `"dropdown"` (default) is a compact field that opens a searchable list,
238
+ * for forms. `"list"` shows every choice at once, with frequency bars, for
239
+ * side panels and filters.
240
+ */
241
+ variant?: "dropdown" | "list";
263
242
  label?: string;
264
- /** A search box above the list. */
265
- searchable?: boolean;
266
- /** A bar behind each name, as long as its share of the largest count. */
267
- bars?: boolean;
268
- /** The count itself, beside each name. */
269
- counts?: boolean;
270
- /** The rail that drags a cut through the list, taking the top names. */
271
- cutoff?: boolean;
272
- sort?: "count" | "name";
273
- /** Colour scope, so a name keeps the colour the viewers give it. */
274
- scope?: string;
275
- loading?: boolean;
243
+ /** A line of help under the label. */
244
+ description?: string;
245
+ /** Trigger text of the dropdown while nothing is picked. */
246
+ placeholder?: string;
247
+ /** Shown when there is nothing to pick from. */
276
248
  emptyText?: string;
277
249
  disabled?: boolean;
250
+ /** Focus the search on mount (list), or open the dropdown on mount. */
278
251
  autoFocus?: boolean;
252
+ /** The count beside each choice. */
253
+ counts?: boolean;
254
+ /** List only: a bar behind each choice, as long as its share of the largest count. */
255
+ bars?: boolean;
256
+ /** List only: the rail that drags a cut through the list, taking the top choices. */
257
+ cutoff?: boolean;
258
+ sort?: "count" | "name";
259
+ }
260
+ /** Which OCEL a picker reads its choices from. */
261
+ interface OcelSource {
262
+ /** Defaults to the OCEL the app has selected. */
263
+ ocelId?: string;
264
+ /** The unfiltered log, for choices that must not shift under a filter. */
265
+ ocelVersion?: "filtered" | "original";
266
+ /** A view of the OCEL; takes precedence over `ocelVersion`. */
267
+ viewId?: string;
268
+ }
269
+ /** The props of a picker that reads its choices from an OCEL endpoint. */
270
+ type OcelPickerProps<T> = OcelSource & PickerProps & Selection<T>;
271
+ /** How events of a type, or objects of a type, relate to objects of a type. */
272
+ interface Relation {
273
+ /** The event type (E2O) or object type (O2O) the relation starts from. */
274
+ source: string;
275
+ /** The object type it points to. */
276
+ target: string;
277
+ qualifier: string;
279
278
  }
280
- //#endregion
281
- //#region src/components/pickers/ActivityPicker.d.ts
282
- type ActivityPickerProps = OcelSource & Omit<NamePickerProps, "items" | "scope" | "loading">;
283
- //#endregion
284
- //#region src/components/pickers/EventAttributePicker.d.ts
285
- type EventAttributePickerProps = OcelSource & Omit<NamePickerProps, "items" | "scope" | "loading"> & {
286
- /** Offer only what this activity's events carry. Without it, every
287
- * attribute any event in the log carries. */
279
+ /** An attribute of an activity's events, or of an object type's objects. */
280
+ type AttributeRef = {
281
+ target: "event";
282
+ activity: string;
283
+ name: string;
284
+ } | {
285
+ target: "object";
286
+ objectType: string;
287
+ name: string;
288
+ };
289
+ type ActivityPickerProps = OcelPickerProps<string>;
290
+ type ObjectTypePickerProps = OcelPickerProps<string> & {
291
+ /** Offer only the object types that events of this activity relate to. */
288
292
  activity?: string;
289
293
  };
290
- //#endregion
291
- //#region src/components/pickers/IdPicker.d.ts
292
- interface IdPickerProps {
293
- /** The ids to offer. Usually a page of them, from a search. */
294
- ids: readonly string[];
295
- label?: string;
296
- placeholder?: string;
297
- /** What the reader has typed, when the caller searches for them. */
298
- search?: string;
299
- onSearch?: (search: string) => void;
300
- loading?: boolean;
301
- emptyText?: string;
302
- disabled?: boolean;
303
- }
304
- /**
305
- * Picking ids by typing.
306
- *
307
- * Presentational: a log holds far more events and objects than a list can
308
- * show, so the caller decides which ids a search turns up.
309
- */
310
- export declare const IdPicker: ({ ids, label, placeholder, search, onSearch, loading, emptyText, disabled, ...selection }: IdPickerProps & Selection) => import("react").JSX.Element;
311
- //#endregion
312
- //#region src/components/pickers/EventPicker.d.ts
313
- type EventPickerProps = OcelSource & Omit<IdPickerProps, "ids" | "search" | "onSearch" | "loading"> & {
294
+ type EventPickerProps = OcelPickerProps<string> & {
314
295
  /** How many ids a search turns up. */
315
296
  limit?: number;
316
297
  };
317
- /** Events of the log, found by typing part of an id. */
318
- export declare const EventPicker: ({ ocelId, ocelVersion, limit, ...picker }: EventPickerProps & Selection) => import("react").JSX.Element;
319
- //#endregion
320
- //#region src/components/pickers/ObjectAttributePicker.d.ts
321
- type ObjectAttributePickerProps = OcelSource & Omit<NamePickerProps, "items" | "scope" | "loading"> & {
322
- /** Offer only what objects of this type carry. Without it, every
323
- * attribute any object in the log carries. */
324
- objectType?: string;
325
- };
326
- //#endregion
327
- //#region src/components/pickers/ObjectPicker.d.ts
328
- type ObjectPickerProps = OcelSource & Omit<IdPickerProps, "ids" | "search" | "onSearch" | "loading"> & {
298
+ type ObjectPickerProps = OcelPickerProps<string> & {
329
299
  /** How many ids a search turns up. */
330
300
  limit?: number;
331
301
  };
332
- /** Objects of the log, found by typing part of an id. */
333
- export declare const ObjectPicker: ({ ocelId, ocelVersion, limit, ...picker }: ObjectPickerProps & Selection) => import("react").JSX.Element;
334
- //#endregion
335
- //#region src/components/pickers/ObjectTypePicker.d.ts
336
- type ObjectTypePickerProps = OcelSource & Omit<NamePickerProps, "items" | "scope" | "loading">;
337
- //#endregion
338
- //#region src/components/pickers/index.d.ts
339
- export declare const NamePicker: import("react").ComponentType<NamePickerProps & Selection>;
340
- export declare const ActivityPicker: import("react").ComponentType<OcelSource & Omit<NamePickerProps, "loading" | "items" | "scope"> & Selection>;
341
- export declare const ObjectTypePicker: import("react").ComponentType<OcelSource & Omit<NamePickerProps, "loading" | "items" | "scope"> & Selection>;
342
- export declare const EventAttributePicker: import("react").ComponentType<OcelSource & Omit<NamePickerProps, "loading" | "items" | "scope"> & {
302
+ type EventAttributePickerProps = OcelPickerProps<string> & {
303
+ /** Offer only what events of this type carry. Without it, every attribute
304
+ * any event in the log carries. */
343
305
  activity?: string;
344
- } & Selection>;
345
- export declare const ObjectAttributePicker: import("react").ComponentType<OcelSource & Omit<NamePickerProps, "loading" | "items" | "scope"> & {
306
+ /** Offer only attributes of these value types, e.g. `["int", "float"]`. */
307
+ valueTypes?: readonly ValueType[];
308
+ };
309
+ type ObjectAttributePickerProps = OcelPickerProps<string> & {
310
+ /** Offer only what objects of this type carry. Without it, every attribute
311
+ * any object in the log carries. */
346
312
  objectType?: string;
347
- } & Selection>;
348
- //#endregion
349
- //#region src/components/RelationTable.d.ts
313
+ /** Offer only attributes of these value types, e.g. `["int", "float"]`. */
314
+ valueTypes?: readonly ValueType[];
315
+ };
316
+ type AttributePickerProps = OcelPickerProps<AttributeRef> & {
317
+ /** The activity whose attributes, and whose related objects'
318
+ * attributes, are offered. */
319
+ activity: string | undefined;
320
+ /** Offer attributes of only these related object types. Default: all. */
321
+ objectTypes?: readonly string[];
322
+ /** Offer only object types every event relates to exactly one object of,
323
+ * so an object attribute has one value per event. */
324
+ onlyUniquelyRelated?: boolean;
325
+ /** Offer only attributes of these value types, e.g. `["int", "float"]`. */
326
+ valueTypes?: readonly ValueType[];
327
+ };
328
+ type E2ORelationPickerProps = OcelPickerProps<Relation> & {
329
+ /** Offer only relations of events of this type. Without it, every event
330
+ * type's, grouped by event type. */
331
+ activity?: string;
332
+ };
333
+ type O2ORelationPickerProps = OcelPickerProps<Relation> & {
334
+ /** Offer only relations of objects of this type. Without it, every object
335
+ * type's, grouped by object type. */
336
+ objectType?: string;
337
+ };
338
+ /** A heading that options are shown together under. */
339
+ interface PickerGroup {
340
+ label: string;
341
+ color?: string;
342
+ /** Muted text beside the heading, e.g. "event attributes". */
343
+ caption?: string;
344
+ }
345
+ /** One choice of a picker. */
346
+ interface PickerOption<T> {
347
+ value: T;
348
+ /** What the reader sees. Unique within the option's group. */
349
+ label: string;
350
+ /** Muted text beside the label in the dropdown, e.g. a value type. */
351
+ description?: string;
352
+ count?: number;
353
+ color?: string;
354
+ group?: PickerGroup;
355
+ }
356
+ /** Everything the presentational pickers need, beyond the options. */
357
+ type OptionPickerProps<T> = PickerProps & Selection<T> & {
358
+ options: readonly PickerOption<T>[];
359
+ /** Stable identity of a value. Defaults to the value itself for strings,
360
+ * else its JSON. */
361
+ idOf?: (value: T) => string;
362
+ /** Label of a picked value that is not among the options, as with ids a
363
+ * search no longer turns up. Defaults to its id. */
364
+ labelOf?: (value: T) => string;
365
+ loading?: boolean;
366
+ error?: unknown;
367
+ /** Set when a choice has to be made elsewhere first, and says which. */
368
+ missing?: string;
369
+ /** Server-side search: the options are what `search` turns up, and the
370
+ * picker only reports what the reader types. */
371
+ search?: string;
372
+ onSearch?: (search: string) => void;
373
+ /** How many there are to pick from, when the options are only the page
374
+ * of them a search turned up. Defaults to the number of options. */
375
+ total?: number;
376
+ };
377
+ export declare const OptionPicker: <T>(props: OptionPickerProps<T>) => JSX.Element;
378
+ export declare const ActivityPicker: ComponentType<ActivityPickerProps>;
379
+ export declare const ObjectTypePicker: ComponentType<ObjectTypePickerProps>;
380
+ export declare const EventPicker: ComponentType<EventPickerProps>;
381
+ export declare const ObjectPicker: ComponentType<ObjectPickerProps>;
382
+ export declare const EventAttributePicker: ComponentType<EventAttributePickerProps>;
383
+ export declare const ObjectAttributePicker: ComponentType<ObjectAttributePickerProps>;
384
+ export declare const AttributePicker: ComponentType<AttributePickerProps>;
385
+ export declare const E2ORelationPicker: ComponentType<E2ORelationPickerProps>;
386
+ export declare const O2ORelationPicker: ComponentType<O2ORelationPickerProps>;
350
387
  type RelationType = "o2o" | "e2o";
351
388
  type Direction = "source" | "target";
352
389
  type OcelVersion = "original" | "filtered";
@@ -359,6 +396,7 @@ declare const RelationTable: React.FC<{
359
396
  hideRange?: boolean;
360
397
  hideTotal?: boolean;
361
398
  ocelVersion?: OcelVersion;
399
+ viewId?: string;
362
400
  visibleRelations?: {
363
401
  source: string;
364
402
  target: string;
@@ -367,25 +405,17 @@ declare const RelationTable: React.FC<{
367
405
  className?: string;
368
406
  style?: React.CSSProperties;
369
407
  }>;
370
- //#endregion
371
- //#region src/components/UploadModal/UploadModal.d.ts
372
408
  export declare const UploadModal: React.FC<{
373
409
  visible: boolean;
374
410
  onClose: () => void;
375
411
  }>;
376
- //#endregion
377
- //#region src/components/UploadSection/UploadSection.d.ts
378
412
  export declare const UploadSection: React.FC<{
379
413
  onSuccess?: () => void;
380
414
  }>;
381
- //#endregion
382
- //#region src/hooks/useCurrentOCEL.d.ts
383
415
  export declare const useCurrentOcel: () => {
384
416
  id: string | null;
385
417
  setCurrentOcel: (id: string) => void;
386
418
  };
387
- //#endregion
388
- //#region src/hooks/useDownload.d.ts
389
419
  export declare const useDownloadFile: () => (path: string) => Promise<void>;
390
420
  export declare const useDownloadOCEL: () => {
391
421
  download: (ocelId: string, params?: import("@ocelescope/api-base").DownloadOCELParams | undefined) => void;
@@ -402,12 +432,8 @@ export declare const useDownloadResource: () => {
402
432
  export declare const useDownloadResourceAsPnml: () => {
403
433
  download: (resourceId: string) => void;
404
434
  };
405
- //#endregion
406
- //#region src/hooks/useInvalidate.d.ts
407
435
  type InvalidationRouteName = "ocels" | "resources" | "tasks" | "plugins" | "discoveryMethods";
408
436
  export declare const useInvalidate: () => (routeNames: InvalidationRouteName[]) => Promise<void>;
409
- //#endregion
410
- //#region src/hooks/useOcelQuery.d.ts
411
437
  interface OcelQueryOptions {
412
438
  /** DuckDB SQL over the OCEL's stored tables: `events`, `objects`, `e2o`,
413
439
  * `o2o`, `object_changes`. One `SELECT`; the backend refuses anything else. */
@@ -442,7 +468,7 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
442
468
  dataUpdatedAt: number;
443
469
  errorUpdatedAt: number;
444
470
  failureCount: number;
445
- failureReason: import("@ocelescope/api-base").HTTPValidationError$1 | null;
471
+ failureReason: unknown;
446
472
  errorUpdateCount: number;
447
473
  isFetched: boolean;
448
474
  isFetchedAfterMount: boolean;
@@ -452,11 +478,11 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
452
478
  isRefetching: boolean;
453
479
  isStale: boolean;
454
480
  isEnabled: boolean;
455
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, import("@ocelescope/api-base").HTTPValidationError$1>>;
481
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, unknown>>;
456
482
  fetchStatus: import("@tanstack/react-query").FetchStatus;
457
483
  queryKey: readonly unknown[] & {
458
484
  [dataTagSymbol]: import("@ocelescope/api-base").SqlQueryResult;
459
- [dataTagErrorSymbol]: import("@ocelescope/api-base").HTTPValidationError$1;
485
+ [dataTagErrorSymbol]: unknown;
460
486
  };
461
487
  } | {
462
488
  ocelId: string | null;
@@ -473,7 +499,7 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
473
499
  dataUpdatedAt: number;
474
500
  errorUpdatedAt: number;
475
501
  failureCount: number;
476
- failureReason: import("@ocelescope/api-base").HTTPValidationError$1 | null;
502
+ failureReason: unknown;
477
503
  errorUpdateCount: number;
478
504
  isFetched: boolean;
479
505
  isFetchedAfterMount: boolean;
@@ -483,11 +509,11 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
483
509
  isRefetching: boolean;
484
510
  isStale: boolean;
485
511
  isEnabled: boolean;
486
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, import("@ocelescope/api-base").HTTPValidationError$1>>;
512
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, unknown>>;
487
513
  fetchStatus: import("@tanstack/react-query").FetchStatus;
488
514
  queryKey: readonly unknown[] & {
489
515
  [dataTagSymbol]: import("@ocelescope/api-base").SqlQueryResult;
490
- [dataTagErrorSymbol]: import("@ocelescope/api-base").HTTPValidationError$1;
516
+ [dataTagErrorSymbol]: unknown;
491
517
  };
492
518
  } | {
493
519
  ocelId: string | null;
@@ -504,7 +530,7 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
504
530
  dataUpdatedAt: number;
505
531
  errorUpdatedAt: number;
506
532
  failureCount: number;
507
- failureReason: import("@ocelescope/api-base").HTTPValidationError$1 | null;
533
+ failureReason: unknown;
508
534
  errorUpdateCount: number;
509
535
  isFetched: boolean;
510
536
  isFetchedAfterMount: boolean;
@@ -514,11 +540,11 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
514
540
  isRefetching: boolean;
515
541
  isStale: boolean;
516
542
  isEnabled: boolean;
517
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, import("@ocelescope/api-base").HTTPValidationError$1>>;
543
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, unknown>>;
518
544
  fetchStatus: import("@tanstack/react-query").FetchStatus;
519
545
  queryKey: readonly unknown[] & {
520
546
  [dataTagSymbol]: import("@ocelescope/api-base").SqlQueryResult;
521
- [dataTagErrorSymbol]: import("@ocelescope/api-base").HTTPValidationError$1;
547
+ [dataTagErrorSymbol]: unknown;
522
548
  };
523
549
  } | {
524
550
  ocelId: string | null;
@@ -535,7 +561,7 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
535
561
  dataUpdatedAt: number;
536
562
  errorUpdatedAt: number;
537
563
  failureCount: number;
538
- failureReason: import("@ocelescope/api-base").HTTPValidationError$1 | null;
564
+ failureReason: unknown;
539
565
  errorUpdateCount: number;
540
566
  isFetched: boolean;
541
567
  isFetchedAfterMount: boolean;
@@ -545,11 +571,11 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
545
571
  isRefetching: boolean;
546
572
  isStale: boolean;
547
573
  isEnabled: boolean;
548
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, import("@ocelescope/api-base").HTTPValidationError$1>>;
574
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, unknown>>;
549
575
  fetchStatus: import("@tanstack/react-query").FetchStatus;
550
576
  queryKey: readonly unknown[] & {
551
577
  [dataTagSymbol]: import("@ocelescope/api-base").SqlQueryResult;
552
- [dataTagErrorSymbol]: import("@ocelescope/api-base").HTTPValidationError$1;
578
+ [dataTagErrorSymbol]: unknown;
553
579
  };
554
580
  } | {
555
581
  ocelId: string | null;
@@ -565,7 +591,7 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
565
591
  dataUpdatedAt: number;
566
592
  errorUpdatedAt: number;
567
593
  failureCount: number;
568
- failureReason: import("@ocelescope/api-base").HTTPValidationError$1 | null;
594
+ failureReason: unknown;
569
595
  errorUpdateCount: number;
570
596
  isFetched: boolean;
571
597
  isFetchedAfterMount: boolean;
@@ -576,11 +602,11 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
576
602
  isRefetching: boolean;
577
603
  isStale: boolean;
578
604
  isEnabled: boolean;
579
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, import("@ocelescope/api-base").HTTPValidationError$1>>;
605
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, unknown>>;
580
606
  fetchStatus: import("@tanstack/react-query").FetchStatus;
581
607
  queryKey: readonly unknown[] & {
582
608
  [dataTagSymbol]: import("@ocelescope/api-base").SqlQueryResult;
583
- [dataTagErrorSymbol]: import("@ocelescope/api-base").HTTPValidationError$1;
609
+ [dataTagErrorSymbol]: unknown;
584
610
  };
585
611
  } | {
586
612
  ocelId: string | null;
@@ -597,7 +623,7 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
597
623
  dataUpdatedAt: number;
598
624
  errorUpdatedAt: number;
599
625
  failureCount: number;
600
- failureReason: import("@ocelescope/api-base").HTTPValidationError$1 | null;
626
+ failureReason: unknown;
601
627
  errorUpdateCount: number;
602
628
  isFetched: boolean;
603
629
  isFetchedAfterMount: boolean;
@@ -607,18 +633,14 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
607
633
  isRefetching: boolean;
608
634
  isStale: boolean;
609
635
  isEnabled: boolean;
610
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, import("@ocelescope/api-base").HTTPValidationError$1>>;
636
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@ocelescope/api-base").SqlQueryResult, unknown>>;
611
637
  fetchStatus: import("@tanstack/react-query").FetchStatus;
612
638
  queryKey: readonly unknown[] & {
613
639
  [dataTagSymbol]: import("@ocelescope/api-base").SqlQueryResult;
614
- [dataTagErrorSymbol]: import("@ocelescope/api-base").HTTPValidationError$1;
640
+ [dataTagErrorSymbol]: unknown;
615
641
  };
616
642
  };
617
- //#endregion
618
- //#region src/lib/attributes.d.ts
619
643
  export declare const formatAttributeValue: (type: ValueType, value: string | number) => string | number;
620
- //#endregion
621
- //#region src/lib/env.d.ts
622
644
  export declare const env: {
623
645
  appVersion: string;
624
646
  projectPage: string;
@@ -632,8 +654,6 @@ export declare const env: {
632
654
  requestEnvironmentUrl: string;
633
655
  contactEmail: string;
634
656
  };
635
- //#endregion
636
- //#region src/lib/getModuleRoute.d.ts
637
657
  export declare const getModuleRoute: ({ moduleName, routeName, query }: {
638
658
  moduleName: string;
639
659
  routeName?: string;
@@ -644,5 +664,4 @@ export declare const getModuleRoute: ({ moduleName, routeName, query }: {
644
664
  } | undefined;
645
665
  pathname: string;
646
666
  };
647
- //#endregion
648
- export { type ActivityPickerProps, type AreaChartProps, AttributesTable, type BarChartProps, type CartesianChartProps, type ChartOptions, type ChartProps, type ChartType, type EventAttributePickerProps, type EventPickerProps, type IdPickerProps, type LineChartProps, type MultiPicker, type NameItem, type NamePickerProps, type ObjectAttributePickerProps, type ObjectPickerProps, type ObjectTypePickerProps, type OcelChartProps, type OcelQueryOptions, type OcelSource, type PieChartProps, RelationTable, type Row, type ScatterChartProps, type Selection, type Series, type SinglePicker, type SqlChartProps, type SunburstChartProps };
667
+ export { type ActivityPickerProps, type AreaChartProps, type AttributePickerProps, type AttributeRef, AttributesTable, type BarChartProps, type CartesianChartProps, type ChartOptions, type ChartProps, type ChartType, type E2ORelationPickerProps, type EventAttributePickerProps, type EventPickerProps, type HistogramChartProps, type LineChartProps, type MultiSelection, type O2ORelationPickerProps, type ObjectAttributePickerProps, type ObjectPickerProps, type ObjectTypePickerProps, type OcelChartProps, type OcelPickerProps, type OcelQueryOptions, type OcelSource, type OptionPickerProps, type PickerGroup, type PickerOption, type PickerProps, type PieChartProps, type Relation, RelationTable, type Row, type ScatterChartProps, type Selection, type Series, type SingleSelection, type SqlChartProps, type SunburstChartProps };