@ocelescope/exploration 0.10.2 → 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.
- package/README.md +7 -7
- package/dist/{Dashboard-DlIf2ec5.js → Dashboard-jE93H3NS.js} +5 -10
- package/dist/index.d.ts +0 -2
- package/dist/index.js +3 -5
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -6,13 +6,13 @@ backend, so an analysis is only ever one place in the code.
|
|
|
6
6
|
|
|
7
7
|
## Layout
|
|
8
8
|
|
|
9
|
-
| File
|
|
10
|
-
|
|
|
11
|
-
| `analyses.ts`
|
|
12
|
-
| `Dashboard.tsx` | The searchable analysis catalog and responsive card grid
|
|
13
|
-
| `Card.tsx`
|
|
14
|
-
| `Controls.tsx`
|
|
15
|
-
| `store.ts`
|
|
9
|
+
| File | Contents |
|
|
10
|
+
| --------------- | ------------------------------------------------------------ |
|
|
11
|
+
| `analyses.ts` | Every analysis: its question, parameters, SQL and chart |
|
|
12
|
+
| `Dashboard.tsx` | The searchable analysis catalog and responsive card grid |
|
|
13
|
+
| `Card.tsx` | One card: information, configuration, chart and export frame |
|
|
14
|
+
| `Controls.tsx` | The parameter inputs, and the log facts they offer |
|
|
15
|
+
| `store.ts` | The cards a reader has added, kept per OCEL in the browser |
|
|
16
16
|
|
|
17
17
|
To add an analysis, add an entry to `analyses.ts`.
|
|
18
18
|
|
|
@@ -5,7 +5,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { useEffect, useMemo, useState } from "react";
|
|
6
6
|
import { AsyncBoundary, ViewerExportFrame } from "@r4pm/components";
|
|
7
7
|
import { ValueType, useEventAttributes, useObjectAttributes } from "@ocelescope/api-base";
|
|
8
|
-
|
|
8
|
+
// src/analyses.ts
|
|
9
9
|
const ident = (name) => `"${String(name ?? "").replaceAll("\"", "\"\"")}"`;
|
|
10
10
|
const lit = (value) => `'${String(value ?? "").replaceAll("'", "''")}'`;
|
|
11
11
|
const int = (value, fallback) => Number.isFinite(Number(value)) ? Math.trunc(Number(value)) : fallback;
|
|
@@ -532,8 +532,7 @@ const isConfigured = (analysis, values) => {
|
|
|
532
532
|
const resolved = resolve(analysis, values);
|
|
533
533
|
return analysis.params.every((param) => param.required === false || hasValue(resolved[param.name]));
|
|
534
534
|
};
|
|
535
|
-
|
|
536
|
-
//#region src/Controls.tsx
|
|
535
|
+
// src/Controls.tsx
|
|
537
536
|
/**
|
|
538
537
|
* The parameter inputs a card is configured with.
|
|
539
538
|
*
|
|
@@ -670,8 +669,7 @@ const Control = ({ analysis, param, values, onChange }) => {
|
|
|
670
669
|
});
|
|
671
670
|
return null;
|
|
672
671
|
};
|
|
673
|
-
|
|
674
|
-
//#region src/Card.tsx
|
|
672
|
+
// src/Card.tsx
|
|
675
673
|
/** One analysis on the dashboard: its parameters, and the chart they produce. */
|
|
676
674
|
const AnalysisCard = ({ analysis, values: stored, onChange, onRemove, configurationOpened, onConfigure, onCloseConfiguration }) => {
|
|
677
675
|
const values = resolve(analysis, stored);
|
|
@@ -1058,8 +1056,7 @@ const Changes = ({ analysis, values }) => {
|
|
|
1058
1056
|
}
|
|
1059
1057
|
});
|
|
1060
1058
|
};
|
|
1061
|
-
|
|
1062
|
-
//#region src/store.ts
|
|
1059
|
+
// src/store.ts
|
|
1063
1060
|
/** The dashboard a reader has built, kept per OCEL in browser storage. */
|
|
1064
1061
|
const key = (ocelId) => `ocelescope:exploration:${ocelId}`;
|
|
1065
1062
|
const useCards = (ocelId) => {
|
|
@@ -1108,8 +1105,7 @@ const read = (ocelId) => {
|
|
|
1108
1105
|
return [];
|
|
1109
1106
|
}
|
|
1110
1107
|
};
|
|
1111
|
-
|
|
1112
|
-
//#region src/Dashboard.tsx
|
|
1108
|
+
// src/Dashboard.tsx
|
|
1113
1109
|
/** The exploration dashboard: choose a question, configure it, keep the result. */
|
|
1114
1110
|
const Dashboard = ({ ocelId }) => {
|
|
1115
1111
|
const { cards, loaded, add, update, remove } = useCards(ocelId);
|
|
@@ -1326,5 +1322,4 @@ const CatalogItem = ({ analysis, onAdd }) => {
|
|
|
1326
1322
|
})
|
|
1327
1323
|
});
|
|
1328
1324
|
};
|
|
1329
|
-
//#endregion
|
|
1330
1325
|
export { Dashboard };
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { ChartNoAxesCombinedIcon } from "lucide-react";
|
|
|
3
3
|
import { LoadingOverlay } from "@mantine/core";
|
|
4
4
|
import dynamic from "next/dynamic";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
const Dashboard = dynamic(() => import("./Dashboard-
|
|
6
|
+
// src/pages/dashboard.tsx
|
|
7
|
+
const Dashboard = dynamic(() => import("./Dashboard-jE93H3NS.js").then((module) => module.Dashboard), { ssr: false });
|
|
8
8
|
const DashboardPage = () => {
|
|
9
9
|
const { id } = useCurrentOcel();
|
|
10
10
|
return id ? /* @__PURE__ */ jsx(Dashboard, { ocelId: id }, id) : /* @__PURE__ */ jsx(LoadingOverlay, { visible: true });
|
|
@@ -15,8 +15,7 @@ var dashboard_default = defineModuleRoute({
|
|
|
15
15
|
name: "dashboard",
|
|
16
16
|
requiresOcel: true
|
|
17
17
|
});
|
|
18
|
-
|
|
19
|
-
//#region src/index.ts
|
|
18
|
+
// src/index.ts
|
|
20
19
|
var src_default = defineModule({
|
|
21
20
|
name: "exploration",
|
|
22
21
|
description: "Explore the active OCEL through configurable visualizations.",
|
|
@@ -25,5 +24,4 @@ var src_default = defineModule({
|
|
|
25
24
|
routes: [dashboard_default],
|
|
26
25
|
icon: ChartNoAxesCombinedIcon
|
|
27
26
|
});
|
|
28
|
-
//#endregion
|
|
29
27
|
export { src_default as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocelescope/exploration",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"description": "Interactive analytical dashboards for OCEL data",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@mantine/core": "^9.7.
|
|
23
|
-
"@ocelescope/api-base": "^0.
|
|
24
|
-
"@ocelescope/core": "^0.
|
|
25
|
-
"@r4pm/components": "^0.
|
|
26
|
-
"@tanstack/react-query": "^5.
|
|
27
|
-
"lucide-react": "^1.
|
|
28
|
-
"next": "16.4.
|
|
29
|
-
"react": "^19.3.
|
|
22
|
+
"@mantine/core": "^9.7.4",
|
|
23
|
+
"@ocelescope/api-base": "^0.11.0",
|
|
24
|
+
"@ocelescope/core": "^0.11.0",
|
|
25
|
+
"@r4pm/components": "^0.4.0",
|
|
26
|
+
"@tanstack/react-query": "^5.105.0",
|
|
27
|
+
"lucide-react": "^1.63.0",
|
|
28
|
+
"next": "16.4.3",
|
|
29
|
+
"react": "^19.3.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^26.6.
|
|
32
|
+
"@types/node": "^26.6.5",
|
|
33
33
|
"@types/react": "^19.3.0",
|
|
34
|
-
"tsdown": "^0.23.
|
|
34
|
+
"tsdown": "^0.23.3",
|
|
35
35
|
"typescript": "^6.0.3"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|