@ocelescope/resources 0.0.0 → 0.1.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/LICENSE +661 -0
- package/README.md +19 -18
- package/dist/index.d.ts +33 -11
- package/dist/index.js +1710 -504
- package/package.json +18 -16
- package/dist/Cytoscape-BpEZfi09.js +0 -110
- package/dist/CytoscapeContext-DrvVpY9-.js +0 -10
package/README.md
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @ocelescope/resources
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Helpers and React UI components for rendering and exporting Ocelescope
|
|
4
|
+
**resources** (the visual artifacts produced by plugins and modules, such as
|
|
5
|
+
graphs, tables and plots).
|
|
4
6
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
- Install dependencies:
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
pnpm add @ocelescope/resources
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Usage
|
|
14
14
|
|
|
15
|
-
```
|
|
16
|
-
|
|
15
|
+
```tsx
|
|
16
|
+
import {
|
|
17
|
+
ResourceViewer,
|
|
18
|
+
Visualization,
|
|
19
|
+
ResourceModal,
|
|
20
|
+
ResourceSelect,
|
|
21
|
+
} from "@ocelescope/resources";
|
|
17
22
|
```
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
## About
|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
Part of [Ocelescope](https://github.com/promi4s/ocelescope), a framework for
|
|
27
|
+
working with Object-Centric Event Logs (OCEL) developed at the Chair of Process
|
|
28
|
+
and Data Science (PADS), RWTH Aachen University.
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
npm run build
|
|
29
|
-
```
|
|
30
|
+
📖 Documentation: <https://www.ocelescope.org>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,49 @@
|
|
|
1
|
+
import { Select } from "@mantine/core";
|
|
1
2
|
import { GetResourceResponse } from "@ocelescope/api-base";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
2
4
|
|
|
5
|
+
//#region src/components/ResourceModal/ResourceModal.d.ts
|
|
6
|
+
declare const ResourceModal: React.FC<{
|
|
7
|
+
id: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}>;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/components/ResourceSelect/ResourceSelect.d.ts
|
|
12
|
+
declare const ResourceSelect: React.FC<ComponentProps<typeof Select> & {
|
|
13
|
+
type: string;
|
|
14
|
+
}>;
|
|
15
|
+
//#endregion
|
|
3
16
|
//#region src/types/index.d.ts
|
|
4
17
|
type RequireType<T> = T extends {
|
|
5
18
|
type?: infer L;
|
|
6
19
|
} ? Omit<T, "type"> & {
|
|
7
20
|
type: L;
|
|
8
21
|
} : T;
|
|
9
|
-
type
|
|
22
|
+
type VisualizationsType = RequireType<NonNullable<GetResourceResponse["visualization"]>>;
|
|
23
|
+
type VisualizationsTypes = NonNullable<VisualizationsType["type"]>;
|
|
24
|
+
type VisualizationByType<T extends VisualizationsTypes> = Extract<VisualizationsType, {
|
|
25
|
+
type: T;
|
|
26
|
+
}>;
|
|
10
27
|
//#endregion
|
|
11
28
|
//#region src/components/ResourceView/index.d.ts
|
|
12
|
-
|
|
13
|
-
|
|
29
|
+
type ExtraMenuItem = {
|
|
30
|
+
icon: React.ReactNode;
|
|
31
|
+
label: string;
|
|
32
|
+
onClick: () => void;
|
|
33
|
+
};
|
|
34
|
+
type VisualizationProps<T extends VisualizationsTypes> = {
|
|
35
|
+
visualization: VisualizationByType<T>;
|
|
14
36
|
isPreview?: boolean;
|
|
15
|
-
|
|
37
|
+
menuItems?: ExtraMenuItem[];
|
|
38
|
+
};
|
|
39
|
+
declare const Visualization: ({
|
|
40
|
+
visualization,
|
|
41
|
+
isPreview,
|
|
42
|
+
menuItems
|
|
43
|
+
}: VisualizationProps<VisualizationsTypes>) => import("react").JSX.Element;
|
|
16
44
|
declare const ResourceViewer: React.FC<{
|
|
17
45
|
id: string;
|
|
18
46
|
isPreview?: boolean;
|
|
19
47
|
}>;
|
|
20
48
|
//#endregion
|
|
21
|
-
|
|
22
|
-
declare const ResourceModal: React.FC<{
|
|
23
|
-
id: string;
|
|
24
|
-
onClose: () => void;
|
|
25
|
-
}>;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { ResourceModal, ResourceViewer, Visualization };
|
|
49
|
+
export { ResourceModal, ResourceSelect, ResourceViewer, Visualization, type VisualizationsType };
|