@ocelescope/core 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.
Files changed (34) hide show
  1. package/README.md +2 -2
  2. package/dist/{ActivityPicker-BfA34hBU.js → ActivityPicker-CtFSu1YR.js} +8 -6
  3. package/dist/{AreaChart-q6rVcUIp.js → AreaChart-BSwN1fMp.js} +4 -5
  4. package/dist/{AttributePicker-Dd8eKA_3.js → AttributePicker-Cq7luTEi.js} +4 -5
  5. package/dist/{BarChart-BLZS87ex.js → BarChart-CyMePf1z.js} +4 -5
  6. package/dist/{E2ORelationPicker-CcDSJWc0.js → E2ORelationPicker-C8EmrbFx.js} +4 -5
  7. package/dist/{EventAttributePicker-Ch0rYS1h.js → EventAttributePicker-BgEdydek.js} +4 -5
  8. package/dist/{EventPicker-DbqFMMr2.js → EventPicker-D5uNOTw1.js} +4 -5
  9. package/dist/{HistogramChart-GgiQdlsk.js → HistogramChart-CJwvvDUu.js} +3 -4
  10. package/dist/{LineChart-Cq935Tk2.js → LineChart-Cbxnm338.js} +4 -5
  11. package/dist/{O2ORelationPicker-_XU1FfIX.js → O2ORelationPicker-CryAxxUo.js} +4 -5
  12. package/dist/{ObjectAttributePicker-Dpt3IfC5.js → ObjectAttributePicker-D_I3LQsY.js} +4 -5
  13. package/dist/{ObjectPicker-Bd68wl9p.js → ObjectPicker-D-ksQveT.js} +4 -5
  14. package/dist/{ObjectTypePicker-CXCMky34.js → ObjectTypePicker-Bw8Fsktx.js} +9 -6
  15. package/dist/{OcelChart-BnXjHb_r.js → OcelChart-DJNM5peW.js} +3 -4
  16. package/dist/{OptionPicker-D9rUIwbY.js → OptionPicker-DQ-WYFQZ.js} +7 -14
  17. package/dist/{PieChart-DZFHaTXD.js → PieChart-BmMoI0TY.js} +4 -5
  18. package/dist/{ScatterChart-DJfJmABJ.js → ScatterChart-CASPRlZU.js} +4 -5
  19. package/dist/{SqlChart-Bf7D5o5P.js → SqlChart-cxKpWkyh.js} +8 -9
  20. package/dist/{SunburstChart-CMNYlKon.js → SunburstChart-Ddx9EaL-.js} +3 -4
  21. package/dist/{attributeOptions-D4slIoZx.js → attributeOptions-COiWnKUS.js} +1 -2
  22. package/dist/{cartesian-Dt7weMqK.js → cartesian-CtdS2iZb.js} +2 -3
  23. package/dist/index.d.ts +6 -84
  24. package/dist/index.js +75 -92
  25. package/dist/{relationOptions-DTtIOIr1.js → relationOptions-hEEsEQrx.js} +1 -2
  26. package/dist/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
  27. package/dist/{series-W1jsVape.js → series-Bx0HVnSy.js} +2 -3
  28. package/dist/style.css +34 -14
  29. package/dist/{useChart-jzzXgs0j.js → useChart-BK4pjGal.js} +3 -6
  30. package/dist/{useCurrentOCEL-BeBa7K0g.js → useCurrentOCEL-BUH5XGje.js} +2 -4
  31. package/dist/{useOcelId-DIu_aGLH.js → useOcelId-BEC6_yRa.js} +2 -3
  32. package/dist/{useOcelQuery-D1QM-Zgv.js → useOcelQuery-6vtgZNzz.js} +2 -3
  33. package/dist/{useSearch-Ad3AtTVj.js → useSearch-CdXjjv-a.js} +1 -2
  34. package/package.json +24 -24
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { t as useCurrentOcel } from "./useCurrentOCEL-BeBa7K0g.js";
2
- import { t as useOcelQuery } from "./useOcelQuery-D1QM-Zgv.js";
1
+ import { t as useCurrentOcel } from "./useCurrentOCEL-BUH5XGje.js";
2
+ import { t as useOcelQuery } from "./useOcelQuery-6vtgZNzz.js";
3
3
  import { ActionIcon, Anchor, AppShell, Box, Burger, Button, Center, ColorSchemeScript, CopyButton, Divider, Group, LoadingOverlay, MantineProvider, Modal, MultiSelect, NavLink, Select, Stack, Table, Text, ThemeIcon, Tooltip, UnstyledButton, createTheme, mantineHtmlProps, useMantineTheme } from "@mantine/core";
4
4
  import { getDownloadFlatLogQueryKey, getDownloadOCELQueryKey, getDownloadResourceAsPnmlQueryKey, getDownloadResourceQueryKey, getDownloadVariantFlatLogQueryKey, useActivities, useAggregatedAttributes, useAttributeNames, useE2o, useE2oCombinations, useEventAttributes, useGetDefaultOcel, useGetOcels, useImportDefaultOcel, useLogout, useO2o, useO2oCombinations, useObjectAttributes, useObjectTypes, useUpload } from "@ocelescope/api-base";
5
5
  import { HydrationBoundary, QueryClient, QueryClientProvider, keepPreviousData, useQueryClient } from "@tanstack/react-query";
@@ -9,6 +9,7 @@ import { Fragment, useCallback, useEffect, useLayoutEffect, useMemo, useRef, use
9
9
  import dayjs from "dayjs";
10
10
  import isBetween from "dayjs/plugin/isBetween.js";
11
11
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
+ import clsx from "clsx";
12
13
  import dynamic from "next/dynamic.js";
13
14
  import { Dropzone } from "@mantine/dropzone";
14
15
  import { Readable } from "node:stream";
@@ -24,11 +25,10 @@ import { Head, Html, Main, NextScript } from "next/document.js";
24
25
  import { parse } from "content-disposition-attachment";
25
26
  import FileSaver from "file-saver";
26
27
  import qs from "qs";
27
- //#region src/lib/dayjs.ts
28
+ // src/lib/dayjs.ts
28
29
  dayjs.extend(isBetween);
29
30
  const formatDateTime = (dateString) => dayjs(dateString).format("YYYY-MM-DD HH:mm");
30
- //#endregion
31
- //#region src/lib/attributes.ts
31
+ // src/lib/attributes.ts
32
32
  const formatAttributeValue = (type, value) => {
33
33
  switch (type) {
34
34
  case "int": return value.toLocaleString("en-US");
@@ -37,8 +37,7 @@ const formatAttributeValue = (type, value) => {
37
37
  default: return value;
38
38
  }
39
39
  };
40
- //#endregion
41
- //#region src/components/AttributeTable.tsx
40
+ // src/components/AttributeTable.tsx
42
41
  const PAGE_SIZE$1 = 10;
43
42
  const COLUMN_WIDTHS$1 = {
44
43
  selector: 30,
@@ -48,12 +47,13 @@ const COLUMN_WIDTHS$1 = {
48
47
  range: 200,
49
48
  distinctValues: 120
50
49
  };
51
- const SubAttributeTable = ({ ocelId, entityType = "objects", attributeName, entityNames, hideRange = false, hideValues = false, ocelVersion, extraColumns = [] }) => {
50
+ const SubAttributeTable = ({ ocelId, entityType = "objects", attributeName, entityNames, hideRange = false, hideValues = false, ocelVersion, viewId, extraColumns = [] }) => {
52
51
  const isEvent = entityType === "events";
53
52
  const { data, isFetching } = (isEvent ? useEventAttributes : useObjectAttributes)(ocelId, {
54
53
  attribute_names: [attributeName],
55
54
  names: entityNames,
56
- ocel_version: ocelVersion
55
+ ocel_version: ocelVersion,
56
+ view_id: viewId
57
57
  }, { query: { placeholderData: keepPreviousData } });
58
58
  const columns = useMemo(() => [
59
59
  {
@@ -108,15 +108,19 @@ const SubAttributeTable = ({ ocelId, entityType = "objects", attributeName, enti
108
108
  }
109
109
  });
110
110
  };
111
- const AttributesTable = ({ ocelId, entityType = "objects", extraColumns = [], hideRange = false, hideValues = false, subTableExtraColumns, ocelVersion, alwaysExpandable = false, visibleAttributes, height, className, style }) => {
111
+ const AttributesTable = ({ ocelId, entityType = "objects", extraColumns = [], hideRange = false, hideValues = false, subTableExtraColumns, ocelVersion, viewId, alwaysExpandable = false, visibleAttributes, height, className, style }) => {
112
112
  const isEvent = entityType === "events";
113
113
  const [currentPage, setCurrentPage] = useState(1);
114
114
  const { data: attributeNames } = useAttributeNames(ocelId, {
115
115
  entity_type: entityType,
116
- ocel_version: ocelVersion
116
+ ocel_version: ocelVersion,
117
+ view_id: viewId
117
118
  });
118
119
  const [filteredAttributes, setFilteredAttributes] = useState([]);
119
- const { data: entityNames } = (isEvent ? useActivities : useObjectTypes)(ocelId, { ocel_version: ocelVersion });
120
+ const { data: entityNames } = (isEvent ? useActivities : useObjectTypes)(ocelId, {
121
+ ocel_version: ocelVersion,
122
+ view_id: viewId
123
+ });
120
124
  const [filteredEntityNames, setFilteredEntityNames] = useState([]);
121
125
  const isConstrained = visibleAttributes !== void 0;
122
126
  const attributeNameOptions = useMemo(() => {
@@ -141,6 +145,7 @@ const AttributesTable = ({ ocelId, entityType = "objects", extraColumns = [], hi
141
145
  page: currentPage,
142
146
  page_size: PAGE_SIZE$1,
143
147
  ocel_version: ocelVersion,
148
+ view_id: viewId,
144
149
  ...effectiveAttributeNames.length > 0 && { attribute_names: effectiveAttributeNames },
145
150
  ...filteredEntityNames.length > 0 && { entity_names: filteredEntityNames }
146
151
  }, { query: {
@@ -257,13 +262,13 @@ const AttributesTable = ({ ocelId, entityType = "objects", extraColumns = [], hi
257
262
  hideRange,
258
263
  hideValues,
259
264
  ocelVersion,
265
+ viewId,
260
266
  ...filteredEntityNames.length > 0 && { entityNames: filteredEntityNames }
261
267
  })
262
268
  }
263
269
  });
264
270
  };
265
- //#endregion
266
- //#region src/components/BarList/BarList.module.css
271
+ // src/components/BarList/BarList.module.css
267
272
  var BarList_module_default = {
268
273
  "bar": "uf8oba_bar",
269
274
  "barCell": "uf8oba_barCell",
@@ -276,9 +281,8 @@ var BarList_module_default = {
276
281
  "scrollArea": "uf8oba_scrollArea",
277
282
  "toggleRow": "uf8oba_toggleRow"
278
283
  };
279
- //#endregion
280
- //#region src/components/BarList/BarList.tsx
281
- const BarList = ({ data, labelHeader, valueHeader = "Frequency", maxVisibleItems = 8 }) => {
284
+ // src/components/BarList/BarList.tsx
285
+ const BarList = ({ data, labelHeader, valueHeader = "Frequency", maxVisibleItems = 8, className, style }) => {
282
286
  const [expanded, setExpanded] = useState(false);
283
287
  const entries = useMemo(() => Object.entries(data).sort((a, b) => b[1] - a[1]), [data]);
284
288
  const max = useMemo(() => Math.max(0, ...entries.map(([, c]) => c)), [entries]);
@@ -296,7 +300,8 @@ const BarList = ({ data, labelHeader, valueHeader = "Frequency", maxVisibleItems
296
300
  maxVisibleItems
297
301
  ]);
298
302
  return /* @__PURE__ */ jsxs("div", {
299
- className: BarList_module_default.container,
303
+ className: clsx(BarList_module_default.container, className),
304
+ style,
300
305
  children: [/* @__PURE__ */ jsx("div", {
301
306
  ref: scrollRef,
302
307
  className: BarList_module_default.scrollArea,
@@ -361,20 +366,18 @@ const BarList = ({ data, labelHeader, valueHeader = "Frequency", maxVisibleItems
361
366
  })]
362
367
  });
363
368
  };
364
- //#endregion
365
- //#region src/components/charts/index.tsx
369
+ // src/components/charts/index.tsx
366
370
  const browserOnly = (load) => dynamic(load, { ssr: false });
367
- const BarChart = browserOnly(() => import("./BarChart-BLZS87ex.js").then((n) => n.n).then((module) => module.BarChart));
368
- const HistogramChart = browserOnly(() => import("./HistogramChart-GgiQdlsk.js").then((n) => n.n).then((module) => module.HistogramChart));
369
- const LineChart = browserOnly(() => import("./LineChart-Cq935Tk2.js").then((n) => n.n).then((module) => module.LineChart));
370
- const AreaChart = browserOnly(() => import("./AreaChart-q6rVcUIp.js").then((n) => n.n).then((module) => module.AreaChart));
371
- const ScatterChart = browserOnly(() => import("./ScatterChart-DJfJmABJ.js").then((n) => n.n).then((module) => module.ScatterChart));
372
- const PieChart = browserOnly(() => import("./PieChart-DZFHaTXD.js").then((n) => n.n).then((module) => module.PieChart));
373
- const SunburstChart = browserOnly(() => import("./SunburstChart-CMNYlKon.js").then((n) => n.n).then((module) => module.SunburstChart));
374
- const SqlChart = browserOnly(() => import("./SqlChart-Bf7D5o5P.js").then((module) => module.SqlChart));
375
- const OcelChart = browserOnly(() => import("./OcelChart-BnXjHb_r.js").then((module) => module.OcelChart));
376
- //#endregion
377
- //#region src/components/Dropzone/Dropzone.module.css
371
+ const BarChart = browserOnly(() => import("./BarChart-CyMePf1z.js").then((n) => n.n).then((module) => module.BarChart));
372
+ const HistogramChart = browserOnly(() => import("./HistogramChart-CJwvvDUu.js").then((n) => n.n).then((module) => module.HistogramChart));
373
+ const LineChart = browserOnly(() => import("./LineChart-Cbxnm338.js").then((n) => n.n).then((module) => module.LineChart));
374
+ const AreaChart = browserOnly(() => import("./AreaChart-BSwN1fMp.js").then((n) => n.n).then((module) => module.AreaChart));
375
+ const ScatterChart = browserOnly(() => import("./ScatterChart-CASPRlZU.js").then((n) => n.n).then((module) => module.ScatterChart));
376
+ const PieChart = browserOnly(() => import("./PieChart-BmMoI0TY.js").then((n) => n.n).then((module) => module.PieChart));
377
+ const SunburstChart = browserOnly(() => import("./SunburstChart-Ddx9EaL-.js").then((n) => n.n).then((module) => module.SunburstChart));
378
+ const SqlChart = browserOnly(() => import("./SqlChart-cxKpWkyh.js").then((module) => module.SqlChart));
379
+ const OcelChart = browserOnly(() => import("./OcelChart-DJNM5peW.js").then((module) => module.OcelChart));
380
+ // src/components/Dropzone/Dropzone.module.css
378
381
  var Dropzone_module_default = {
379
382
  "control": "IgW5Wa_control",
380
383
  "description": "IgW5Wa_description",
@@ -382,8 +385,7 @@ var Dropzone_module_default = {
382
385
  "icon": "IgW5Wa_icon",
383
386
  "wrapper": "IgW5Wa_wrapper"
384
387
  };
385
- //#endregion
386
- //#region src/components/Dropzone/Dropzone.tsx
388
+ // src/components/Dropzone/Dropzone.tsx
387
389
  const FileDropzone = ({ onUpload, accept, content }) => {
388
390
  const theme = useMantineTheme();
389
391
  const openRef = useRef(null);
@@ -441,8 +443,7 @@ const FileDropzone = ({ onUpload, accept, content }) => {
441
443
  })]
442
444
  });
443
445
  };
444
- //#endregion
445
- //#region src/hooks/useInvalidate.ts
446
+ // src/hooks/useInvalidate.ts
446
447
  const ROUTE_PATH = {
447
448
  ocels: "modules/ocel/",
448
449
  resources: "resources",
@@ -454,8 +455,7 @@ const useInvalidate = () => {
454
455
  const queryClient = useQueryClient();
455
456
  return async (routeNames) => await queryClient.invalidateQueries({ predicate: (query) => typeof query.queryKey[0] === "string" && routeNames.some((route) => query.queryKey[0].includes(`/${ROUTE_PATH[route]}`)) });
456
457
  };
457
- //#endregion
458
- //#region src/components/Dropzone/FullScreenUpload.tsx
458
+ // src/components/Dropzone/FullScreenUpload.tsx
459
459
  const defaultLabel = `Drag'n'drop your ${[
460
460
  "OCELs",
461
461
  "Plugins",
@@ -527,8 +527,7 @@ const FullScreenUpload = ({ onSuccess, accept, label = defaultLabel, active = tr
527
527
  })
528
528
  })] });
529
529
  };
530
- //#endregion
531
- //#region src/components/EventHandler.ts
530
+ // src/components/EventHandler.ts
532
531
  const apiBase = process.env.EXTERNAL_API_BASE_URL ?? "http://localhost:8000";
533
532
  const sseHandler = async (req, res) => {
534
533
  const session_id = req.query.sessionId;
@@ -603,8 +602,7 @@ const env = z.object({
603
602
  NEXT_PUBLIC_REQUEST_ENVIRONMENT_URL: process.env.NEXT_PUBLIC_REQUEST_ENVIRONMENT_URL,
604
603
  NEXT_PUBLIC_CONTACT_EMAIL: process.env.NEXT_PUBLIC_CONTACT_EMAIL
605
604
  });
606
- //#endregion
607
- //#region src/components/HelpModal/HelpModal.tsx
605
+ // src/components/HelpModal/HelpModal.tsx
608
606
  const HelpLink = ({ icon: Icon, label, href }) => /* @__PURE__ */ jsx(Anchor, {
609
607
  href,
610
608
  target: "_blank",
@@ -679,8 +677,7 @@ const HelpModal = ({ visible, onClose }) => {
679
677
  })
680
678
  });
681
679
  };
682
- //#endregion
683
- //#region src/components/ModulePage.tsx
680
+ // src/components/ModulePage.tsx
684
681
  const createModulesPage = (config) => {
685
682
  const { modules = [] } = config;
686
683
  const getStaticPaths = async () => {
@@ -709,8 +706,7 @@ const createModulesPage = (config) => {
709
706
  ModulePage
710
707
  };
711
708
  };
712
- //#endregion
713
- //#region src/components/OcelSelect/OcelSelect.tsx
709
+ // src/components/OcelSelect/OcelSelect.tsx
714
710
  const iconProps = {
715
711
  color: "currentColor",
716
712
  opacity: .6,
@@ -777,8 +773,7 @@ const CurrentOcelSelect = () => {
777
773
  }
778
774
  });
779
775
  };
780
- //#endregion
781
- //#region src/components/UploadSection/UploadSection.tsx
776
+ // src/components/UploadSection/UploadSection.tsx
782
777
  const DefaultOcels = ({ onSuccess, setIsPending }) => {
783
778
  const { data: ocels = [] } = useGetDefaultOcel({});
784
779
  const invalidate = useInvalidate();
@@ -863,8 +858,7 @@ const UploadSection = ({ onSuccess }) => {
863
858
  ]
864
859
  });
865
860
  };
866
- //#endregion
867
- //#region src/components/UploadModal/UploadModal.tsx
861
+ // src/components/UploadModal/UploadModal.tsx
868
862
  const UploadModal = ({ visible, onClose }) => {
869
863
  return /* @__PURE__ */ jsx(Modal, {
870
864
  title: /* @__PURE__ */ jsx(Text, {
@@ -877,8 +871,7 @@ const UploadModal = ({ visible, onClose }) => {
877
871
  children: /* @__PURE__ */ jsx(UploadSection, { onSuccess: onClose })
878
872
  });
879
873
  };
880
- //#endregion
881
- //#region src/hooks/useModulePath.ts
874
+ // src/hooks/useModulePath.ts
882
875
  const useModulePath = (config) => {
883
876
  const { slug } = useRouter().query;
884
877
  const [moduleName, routeName] = [slug?.[0], slug?.[1]];
@@ -891,16 +884,14 @@ const useModulePath = (config) => {
891
884
  };
892
885
  }, [moduleName, routeName]);
893
886
  };
894
- //#endregion
895
- //#region src/lib/getModuleRoute.ts
887
+ // src/lib/getModuleRoute.ts
896
888
  const getModuleRoute = ({ moduleName, routeName, query }) => {
897
889
  return {
898
890
  pathname: `/${moduleName}${routeName ? `/${routeName}` : ""}`,
899
891
  ...query && { query: { ...query } }
900
892
  };
901
893
  };
902
- //#endregion
903
- //#region src/components/AppShell/AppShell.module.css
894
+ // src/components/AppShell/AppShell.module.css
904
895
  var AppShell_module_default = {
905
896
  "button": "rZS5FG_button",
906
897
  "buttonIcon": "rZS5FG_buttonIcon",
@@ -913,8 +904,7 @@ var AppShell_module_default = {
913
904
  "links": "rZS5FG_links",
914
905
  "navbar": "rZS5FG_navbar"
915
906
  };
916
- //#endregion
917
- //#region src/components/AppShell/components/NavBar.tsx
907
+ // src/components/AppShell/components/NavBar.tsx
918
908
  const LogoutButton = () => {
919
909
  const [isModalOpen, setIsModalOpen] = useState(false);
920
910
  const queryClient = useQueryClient();
@@ -1029,8 +1019,7 @@ const NavBar = ({ config }) => {
1029
1019
  })
1030
1020
  });
1031
1021
  };
1032
- //#endregion
1033
- //#region src/components/AppShell/components/OcelescopeLogo.tsx
1022
+ // src/components/AppShell/components/OcelescopeLogo.tsx
1034
1023
  const OcelescopeLogo = ({ size = 32 }) => /* @__PURE__ */ jsxs("svg", {
1035
1024
  width: size,
1036
1025
  height: size * 32 / 40,
@@ -1085,8 +1074,7 @@ const OcelescopeLogo = ({ size = 32 }) => /* @__PURE__ */ jsxs("svg", {
1085
1074
  })
1086
1075
  ]
1087
1076
  });
1088
- //#endregion
1089
- //#region src/components/AppShell/AppShell.tsx
1077
+ // src/components/AppShell/AppShell.tsx
1090
1078
  const AppShell$1 = ({ config, children }) => {
1091
1079
  const [mobileOpened, { toggle: toggleMobile }] = useDisclosure(true);
1092
1080
  const [desktopOpened, { toggle: toggleDesktop }] = useDisclosure(true);
@@ -1168,8 +1156,7 @@ const AppShell$1 = ({ config, children }) => {
1168
1156
  ]
1169
1157
  });
1170
1158
  };
1171
- //#endregion
1172
- //#region src/lib/sse.ts
1159
+ // src/lib/sse.ts
1173
1160
  const OCELLink = z.object({
1174
1161
  type: z.literal("ocel"),
1175
1162
  ocel_id: z.string()
@@ -1221,8 +1208,7 @@ const ServerEventMessage = z.discriminatedUnion("type", [
1221
1208
  InvalidationRequest,
1222
1209
  ErrorNotification
1223
1210
  ]);
1224
- //#endregion
1225
- //#region src/components/SSEWrapper.tsx
1211
+ // src/components/SSEWrapper.tsx
1226
1212
  const NotificationColorMap = {
1227
1213
  warning: "yellow",
1228
1214
  info: "blue",
@@ -1291,8 +1277,7 @@ const SSEWrapper = () => {
1291
1277
  }, [sessionId, invalidate]);
1292
1278
  return null;
1293
1279
  };
1294
- //#endregion
1295
- //#region src/components/OcelescopeApp.tsx
1280
+ // src/components/OcelescopeApp.tsx
1296
1281
  const theme = createTheme({ fontWeights: { medium: "500" } });
1297
1282
  const OcelescopeApp = (config) => ({ Component, pageProps }) => {
1298
1283
  const [client] = useState(() => new QueryClient());
@@ -1314,8 +1299,7 @@ const OcelescopeApp = (config) => ({ Component, pageProps }) => {
1314
1299
  }), /* @__PURE__ */ jsx(ReactQueryDevtools, {})]
1315
1300
  });
1316
1301
  };
1317
- //#endregion
1318
- //#region src/components/OcelescopeDocument.tsx
1302
+ // src/components/OcelescopeDocument.tsx
1319
1303
  const OcelescopeDocument = () => {
1320
1304
  return /* @__PURE__ */ jsxs(Html, {
1321
1305
  lang: "en",
@@ -1327,21 +1311,19 @@ const OcelescopeDocument = () => {
1327
1311
  })] }), /* @__PURE__ */ jsxs("body", { children: [/* @__PURE__ */ jsx(Main, {}), /* @__PURE__ */ jsx(NextScript, {})] })]
1328
1312
  });
1329
1313
  };
1330
- //#endregion
1331
- //#region src/components/Pickers/index.tsx
1314
+ // src/components/Pickers/index.tsx
1332
1315
  const clientOnly = (load) => dynamic(load, { ssr: false });
1333
- const OptionPicker = clientOnly(() => import("./OptionPicker-D9rUIwbY.js").then((m) => m.OptionPicker));
1334
- const ActivityPicker = clientOnly(() => import("./ActivityPicker-BfA34hBU.js").then((m) => m.ActivityPicker));
1335
- const ObjectTypePicker = clientOnly(() => import("./ObjectTypePicker-CXCMky34.js").then((m) => m.ObjectTypePicker));
1336
- const EventPicker = clientOnly(() => import("./EventPicker-DbqFMMr2.js").then((m) => m.EventPicker));
1337
- const ObjectPicker = clientOnly(() => import("./ObjectPicker-Bd68wl9p.js").then((m) => m.ObjectPicker));
1338
- const EventAttributePicker = clientOnly(() => import("./EventAttributePicker-Ch0rYS1h.js").then((m) => m.EventAttributePicker));
1339
- const ObjectAttributePicker = clientOnly(() => import("./ObjectAttributePicker-Dpt3IfC5.js").then((m) => m.ObjectAttributePicker));
1340
- const AttributePicker = clientOnly(() => import("./AttributePicker-Dd8eKA_3.js").then((m) => m.AttributePicker));
1341
- const E2ORelationPicker = clientOnly(() => import("./E2ORelationPicker-CcDSJWc0.js").then((m) => m.E2ORelationPicker));
1342
- const O2ORelationPicker = clientOnly(() => import("./O2ORelationPicker-_XU1FfIX.js").then((m) => m.O2ORelationPicker));
1343
- //#endregion
1344
- //#region src/components/RelationTable.tsx
1316
+ const OptionPicker = clientOnly(() => import("./OptionPicker-DQ-WYFQZ.js").then((m) => m.OptionPicker));
1317
+ const ActivityPicker = clientOnly(() => import("./ActivityPicker-CtFSu1YR.js").then((m) => m.ActivityPicker));
1318
+ const ObjectTypePicker = clientOnly(() => import("./ObjectTypePicker-Bw8Fsktx.js").then((m) => m.ObjectTypePicker));
1319
+ const EventPicker = clientOnly(() => import("./EventPicker-D5uNOTw1.js").then((m) => m.EventPicker));
1320
+ const ObjectPicker = clientOnly(() => import("./ObjectPicker-D-ksQveT.js").then((m) => m.ObjectPicker));
1321
+ const EventAttributePicker = clientOnly(() => import("./EventAttributePicker-BgEdydek.js").then((m) => m.EventAttributePicker));
1322
+ const ObjectAttributePicker = clientOnly(() => import("./ObjectAttributePicker-D_I3LQsY.js").then((m) => m.ObjectAttributePicker));
1323
+ const AttributePicker = clientOnly(() => import("./AttributePicker-Cq7luTEi.js").then((m) => m.AttributePicker));
1324
+ const E2ORelationPicker = clientOnly(() => import("./E2ORelationPicker-C8EmrbFx.js").then((m) => m.E2ORelationPicker));
1325
+ const O2ORelationPicker = clientOnly(() => import("./O2ORelationPicker-CryAxxUo.js").then((m) => m.O2ORelationPicker));
1326
+ // src/components/RelationTable.tsx
1345
1327
  const PAGE_SIZE = 10;
1346
1328
  const COLUMN_WIDTHS = {
1347
1329
  selector: 30,
@@ -1352,13 +1334,14 @@ const COLUMN_WIDTHS = {
1352
1334
  total: 120
1353
1335
  };
1354
1336
  const relationId = ({ source, target }) => `${source} ${target}`;
1355
- const SubRelationTable = ({ ocelId, relationType, direction, source, target, hideRange = false, hideTotal = false, ocelVersion, extraColumns = [] }) => {
1337
+ const SubRelationTable = ({ ocelId, relationType, direction, source, target, hideRange = false, hideTotal = false, ocelVersion, viewId, extraColumns = [] }) => {
1356
1338
  const { data, isFetching } = (relationType === "e2o" ? useE2o : useO2o)(ocelId, {
1357
1339
  direction,
1358
1340
  source_types: [source],
1359
1341
  target_types: [target],
1360
1342
  with_qualifier: true,
1361
- ocel_version: ocelVersion
1343
+ ocel_version: ocelVersion,
1344
+ view_id: viewId
1362
1345
  }, { query: { placeholderData: keepPreviousData } });
1363
1346
  const columns = useMemo(() => [
1364
1347
  {
@@ -1415,13 +1398,14 @@ const SubRelationTable = ({ ocelId, relationType, direction, source, target, hid
1415
1398
  }
1416
1399
  });
1417
1400
  };
1418
- const RelationTable = ({ ocelId, relationType = "o2o", direction = "source", extraColumns = [], subTableExtraColumns, hideRange = false, hideTotal = false, ocelVersion, visibleRelations, height, className, style }) => {
1401
+ const RelationTable = ({ ocelId, relationType = "o2o", direction = "source", extraColumns = [], subTableExtraColumns, hideRange = false, hideTotal = false, ocelVersion, viewId, visibleRelations, height, className, style }) => {
1419
1402
  const isE2O = relationType === "e2o";
1420
1403
  const isSource = direction === "source";
1421
1404
  const [currentPage, setCurrentPage] = useState(1);
1422
1405
  const { data: combinations = [] } = (isE2O ? useE2oCombinations : useO2oCombinations)(ocelId, {
1423
1406
  direction,
1424
- ocel_version: ocelVersion
1407
+ ocel_version: ocelVersion,
1408
+ view_id: viewId
1425
1409
  });
1426
1410
  const sourceOptions = useMemo(() => Array.from(new Set(combinations.map(({ source }) => source))), [combinations]);
1427
1411
  const targetOptions = useMemo(() => Array.from(new Set(combinations.map(({ target }) => target))), [combinations]);
@@ -1459,6 +1443,7 @@ const RelationTable = ({ ocelId, relationType = "o2o", direction = "source", ext
1459
1443
  page_size: PAGE_SIZE,
1460
1444
  with_qualifier: false,
1461
1445
  ocel_version: ocelVersion,
1446
+ view_id: viewId,
1462
1447
  ...effectiveSources.length > 0 && { source_types: effectiveSources },
1463
1448
  ...effectiveTargets.length > 0 && { target_types: effectiveTargets },
1464
1449
  ...filteredQualifiers.length > 0 && { qualifiers: filteredQualifiers }
@@ -1592,13 +1577,13 @@ const RelationTable = ({ ocelId, relationType = "o2o", direction = "source", ext
1592
1577
  hideRange,
1593
1578
  hideTotal,
1594
1579
  ocelVersion,
1580
+ viewId,
1595
1581
  extraColumns: subTableExtraColumns
1596
1582
  })
1597
1583
  }
1598
1584
  });
1599
1585
  };
1600
- //#endregion
1601
- //#region src/hooks/useDownload.ts
1586
+ // src/hooks/useDownload.ts
1602
1587
  const useDownloadFile = () => {
1603
1588
  const { sessionId } = useSessionStore();
1604
1589
  const downloadFile = async (path) => {
@@ -1636,9 +1621,7 @@ const useDownloadFlatOCEL = useDownloadFromServer(getDownloadFlatLogQueryKey);
1636
1621
  const useDownloadVariantFlatLog = useDownloadFromServer(getDownloadVariantFlatLogQueryKey);
1637
1622
  const useDownloadResource = useDownloadFromServer(getDownloadResourceQueryKey);
1638
1623
  const useDownloadResourceAsPnml = useDownloadFromServer(getDownloadResourceAsPnmlQueryKey);
1639
- //#endregion
1640
- //#region src/lib/config.ts
1624
+ // src/lib/config.ts
1641
1625
  const defineModule = (def) => def;
1642
1626
  const defineModuleRoute = (def) => def;
1643
- //#endregion
1644
1627
  export { ActivityPicker, AreaChart, AttributePicker, AttributesTable, BarChart, BarList, E2ORelationPicker, EventAttributePicker, EventPicker, FileDropzone, FullScreenUpload, HelpModal, HistogramChart, LineChart, O2ORelationPicker, ObjectAttributePicker, ObjectPicker, ObjectTypePicker, OcelChart, OcelSelect, OcelescopeApp, OcelescopeDocument, OptionPicker, PieChart, RelationTable, ScatterChart, SqlChart, SunburstChart, UploadModal, UploadSection, createModulesPage, defineModule, defineModuleRoute, env, formatAttributeValue, getModuleRoute, sseHandler, useCurrentOcel, useDownloadFile, useDownloadFlatOCEL, useDownloadOCEL, useDownloadResource, useDownloadResourceAsPnml, useDownloadVariantFlatLog, useInvalidate, useOcelQuery };
@@ -1,4 +1,4 @@
1
- //#region src/components/Pickers/internal/relationOptions.ts
1
+ // src/components/Pickers/internal/relationOptions.ts
2
2
  const relationId = (relation) => JSON.stringify([
3
3
  relation.source,
4
4
  relation.target,
@@ -29,5 +29,4 @@ const relationOptions = ({ rows, source, unit, sourceColor, targetColor }) => ro
29
29
  } : void 0
30
30
  };
31
31
  });
32
- //#endregion
33
32
  export { relationLabel as n, relationOptions as r, relationId as t };
@@ -1,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var __defProp = Object.defineProperty;
3
3
  var __exportAll = (all, no_symbols) => {
4
4
  let target = {};
@@ -9,5 +9,4 @@ var __exportAll = (all, no_symbols) => {
9
9
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
10
  return target;
11
11
  };
12
- //#endregion
13
12
  export { __exportAll as t };
@@ -1,5 +1,5 @@
1
- import { a as measureOf, i as label, o as plotted } from "./useChart-jzzXgs0j.js";
2
- //#region src/components/charts/internal/series.ts
1
+ import { a as measureOf, i as label, o as plotted } from "./useChart-BK4pjGal.js";
2
+ // src/components/charts/internal/series.ts
3
3
  /**
4
4
  * The rows as traces: one per value of the `series` column, or one per measure
5
5
  * when there is no series column.
@@ -28,5 +28,4 @@ const paint = (series, colorOf, alone) => {
28
28
  if (!colorOf) return void 0;
29
29
  return alone ? series.labels.map(colorOf) : colorOf(series.name);
30
30
  };
31
- //#endregion
32
31
  export { toSeries as n, paint as t };
package/dist/style.css CHANGED
@@ -609,19 +609,19 @@ fieldset:disabled .mantine-active:active {
609
609
 
610
610
  .m_c0783ff9:where([data-scrollbars="xy"], [data-scrollbars="y"]):where([data-offset-scrollbars="xy"], [data-offset-scrollbars="y"], [data-offset-scrollbars="present"]):not([data-vertical-hidden]) {
611
611
  padding-inline-start: unset;
612
- padding-inline-end: var(--scrollarea-scrollbar-size);
612
+ padding-inline-end: var(--scrollarea-offset-size, var(--scrollarea-scrollbar-size));
613
613
  }
614
614
 
615
615
  .m_c0783ff9:where([data-scrollbars="xy"], [data-scrollbars="y"]):where([data-offset-scrollbars="xy"], [data-offset-scrollbars="y"], [data-offset-scrollbars="present"]):not([data-vertical-hidden]):where([data-vertical-scrollbar-position="left"]) {
616
616
  padding-inline-end: unset;
617
- padding-left: var(--scrollarea-scrollbar-size);
617
+ padding-left: var(--scrollarea-offset-size, var(--scrollarea-scrollbar-size));
618
618
  padding-right: unset;
619
619
  }
620
620
 
621
621
  .m_c0783ff9:where([data-scrollbars="xy"], [data-scrollbars="y"]):where([data-offset-scrollbars="xy"], [data-offset-scrollbars="y"], [data-offset-scrollbars="present"]):not([data-vertical-hidden]):where([data-vertical-scrollbar-position="right"]) {
622
622
  padding-inline-end: unset;
623
623
  padding-left: unset;
624
- padding-right: var(--scrollarea-scrollbar-size);
624
+ padding-right: var(--scrollarea-offset-size, var(--scrollarea-scrollbar-size));
625
625
  }
626
626
 
627
627
  .m_c0783ff9:where([data-scrollbars="xy"], [data-scrollbars="x"]):where([data-offset-scrollbars="xy"], [data-offset-scrollbars="x"], [data-offset-scrollbars="present"]):where([data-horizontal-hidden]) {
@@ -629,7 +629,7 @@ fieldset:disabled .mantine-active:active {
629
629
  }
630
630
 
631
631
  .m_c0783ff9:where([data-scrollbars="xy"], [data-scrollbars="x"]):where([data-offset-scrollbars="xy"], [data-offset-scrollbars="x"], [data-offset-scrollbars="present"]):not([data-horizontal-hidden]) {
632
- padding-bottom: var(--scrollarea-scrollbar-size);
632
+ padding-bottom: var(--scrollarea-offset-size, var(--scrollarea-scrollbar-size));
633
633
  }
634
634
 
635
635
  .m_f8f631dd {
@@ -13025,6 +13025,11 @@ svg.react-flow__connectionline {
13025
13025
  height: calc(var(--spacing) * 5);
13026
13026
  }
13027
13027
 
13028
+ .size-\[22px\] {
13029
+ width: 22px;
13030
+ height: 22px;
13031
+ }
13032
+
13028
13033
  .\!h-24 {
13029
13034
  height: calc(var(--spacing) * 24) !important;
13030
13035
  }
@@ -13165,6 +13170,10 @@ svg.react-flow__connectionline {
13165
13170
  max-width: calc(var(--spacing) * 56);
13166
13171
  }
13167
13172
 
13173
+ .max-w-\[7rem\] {
13174
+ max-width: 7rem;
13175
+ }
13176
+
13168
13177
  .max-w-\[8rem\] {
13169
13178
  max-width: 8rem;
13170
13179
  }
@@ -13367,10 +13376,6 @@ svg.react-flow__connectionline {
13367
13376
  column-gap: var(--spacing);
13368
13377
  }
13369
13378
 
13370
- .gap-x-1\.5 {
13371
- column-gap: calc(var(--spacing) * 1.5);
13372
- }
13373
-
13374
13379
  .gap-x-2 {
13375
13380
  column-gap: calc(var(--spacing) * 2);
13376
13381
  }
@@ -13886,6 +13891,11 @@ svg.react-flow__connectionline {
13886
13891
  line-height: 1.5;
13887
13892
  }
13888
13893
 
13894
+ .leading-\[1\.35\] {
13895
+ --tw-leading: 1.35;
13896
+ line-height: 1.35;
13897
+ }
13898
+
13889
13899
  .leading-none {
13890
13900
  --tw-leading: 1;
13891
13901
  line-height: 1;
@@ -14001,6 +14011,10 @@ svg.react-flow__connectionline {
14001
14011
  color: var(--gray-9);
14002
14012
  }
14003
14013
 
14014
+ .text-\(--gray-10\) {
14015
+ color: var(--gray-10);
14016
+ }
14017
+
14004
14018
  .text-\[var\(--accent-11\)\] {
14005
14019
  color: var(--accent-11);
14006
14020
  }
@@ -14066,6 +14080,10 @@ svg.react-flow__connectionline {
14066
14080
  opacity: 0;
14067
14081
  }
14068
14082
 
14083
+ .opacity-35 {
14084
+ opacity: .35;
14085
+ }
14086
+
14069
14087
  .opacity-50 {
14070
14088
  opacity: .5;
14071
14089
  }
@@ -14144,12 +14162,6 @@ svg.react-flow__connectionline {
14144
14162
  transition-duration: var(--tw-duration, var(--default-transition-duration));
14145
14163
  }
14146
14164
 
14147
- .transition-all {
14148
- transition-property: all;
14149
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
14150
- transition-duration: var(--tw-duration, var(--default-transition-duration));
14151
- }
14152
-
14153
14165
  .transition-colors {
14154
14166
  transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
14155
14167
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -14236,6 +14248,10 @@ svg.react-flow__connectionline {
14236
14248
  background-color: var(--gray-2);
14237
14249
  }
14238
14250
 
14251
+ .hover\:bg-\(--gray-a2\):hover {
14252
+ background-color: var(--gray-a2);
14253
+ }
14254
+
14239
14255
  .hover\:bg-\(--gray-a3\):hover {
14240
14256
  background-color: var(--gray-a3);
14241
14257
  }
@@ -46456,10 +46472,14 @@ svg.react-flow__connectionline {
46456
46472
  .uf8oba_container {
46457
46473
  border: 1px solid var(--mantine-color-default-border);
46458
46474
  border-radius: var(--mantine-radius-default);
46475
+ flex-direction: column;
46476
+ display: flex;
46459
46477
  overflow: hidden;
46460
46478
  }
46461
46479
 
46462
46480
  .uf8oba_scrollArea {
46481
+ flex: 1;
46482
+ min-height: 0;
46463
46483
  overflow-y: auto;
46464
46484
  }
46465
46485
 
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { colorForSeed, useViewerConfig } from "@r4pm/components";
3
3
  import { ThemedPlot } from "@r4pm/components/charts";
4
- //#region src/components/charts/types.ts
4
+ // src/components/charts/types.ts
5
5
  /** How a cell reads once it is a label. */
6
6
  const label = (value) => value == null ? "∅" : String(value);
7
7
  /** A cell as the chart plots it: a number where it is one, else its text. */
@@ -13,8 +13,7 @@ const plotted = (value) => {
13
13
  };
14
14
  /** The first, or only, column holding numbers. */
15
15
  const measureOf = (y) => (Array.isArray(y) ? y[0] : y) ?? "";
16
- //#endregion
17
- //#region src/components/charts/internal/Plot.tsx
16
+ // src/components/charts/internal/Plot.tsx
18
17
  /**
19
18
  * The plot every chart draws on: r4pm's themed Plotly, with the parts that
20
19
  * should look the same everywhere - margins, legend, no mode bar - already set.
@@ -72,8 +71,7 @@ const axis = (title, range) => ({
72
71
  } },
73
72
  ...range && { range: [...range] }
74
73
  });
75
- //#endregion
76
- //#region src/components/charts/internal/useChart.ts
74
+ // src/components/charts/internal/useChart.ts
77
75
  /**
78
76
  * A chart's props with colour and selection resolved the way every r4pm
79
77
  * viewer does: the chart's own prop, else the ambient `ViewerConfig`, else
@@ -98,5 +96,4 @@ const useChart = ({ rows, x, y, series, colorScope, colorOf, onSelect }) => {
98
96
  }) }
99
97
  };
100
98
  };
101
- //#endregion
102
99
  export { measureOf as a, label as i, Plot as n, plotted as o, axis as r, useChart as t };