graphwise-reactodia 0.0.1-TR11 → 0.0.1-TR13
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/dist/cjs/graphwise-reactodia.cjs.entry.js +192 -26
- package/dist/cjs/graphwise-reactodia.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.css +3 -0
- package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.js +13 -9
- package/dist/collection/components/graphwise-reactodia/i18n/translations.js +4 -1
- package/dist/collection/components/graphwise-reactodia/menu/graphwise-menu.js +37 -0
- package/dist/collection/components/graphwise-reactodia/reactodia-app.js +17 -10
- package/dist/collection/components/graphwise-reactodia/services/diagram/diagram.service.js +14 -0
- package/dist/collection/components/graphwise-reactodia/services/diagram-file/diagram-file.service.js +68 -0
- package/dist/collection/pages/graphwise-reactodia/main.js +6 -0
- package/dist/collection/pages/graphwise-reactodia/owl-rdfs-settings.js +195 -0
- package/dist/esm/graphwise-reactodia.entry.js +192 -26
- package/dist/esm/graphwise-reactodia.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/graphwise-reactodia/graphwise-reactodia.esm.js +1 -1
- package/dist/graphwise-reactodia/{p-81eeb4c3.entry.js → p-420b9dce.entry.js} +1 -1
- package/dist/types/components/graphwise-reactodia/graphwise-reactodia.d.ts +5 -5
- package/dist/types/components/graphwise-reactodia/menu/graphwise-menu.d.ts +9 -0
- package/dist/types/components/graphwise-reactodia/models/reactodia-app-props.d.ts +4 -4
- package/dist/types/components/graphwise-reactodia/reactodia-app.d.ts +3 -2
- package/dist/types/components/graphwise-reactodia/services/diagram/diagram.service.d.ts +11 -1
- package/dist/types/components/graphwise-reactodia/services/diagram-file/diagram-file.service.d.ts +24 -0
- package/dist/types/components.d.ts +2 -2
- package/package.json +2 -2
|
@@ -34,9 +34,9 @@ export declare class GraphwiseReactodia {
|
|
|
34
34
|
language: LanguageKey;
|
|
35
35
|
/**
|
|
36
36
|
* Query preset for the SPARQL data provider, owned and configured by the host. A DOM
|
|
37
|
-
* property (an object, not an attribute) passed in from outside the wrapper.
|
|
38
|
-
*
|
|
39
|
-
* the
|
|
37
|
+
* property (an object, not an attribute) passed in from outside the wrapper. Required: the
|
|
38
|
+
* wrapper has no default preset and throws when it is missing. Changing it rebuilds the data
|
|
39
|
+
* provider and reloads the graph with it, keeping the current diagram.
|
|
40
40
|
*/
|
|
41
41
|
providerSettings?: SparqlDataProviderSettings;
|
|
42
42
|
/**
|
|
@@ -47,8 +47,8 @@ export declare class GraphwiseReactodia {
|
|
|
47
47
|
*/
|
|
48
48
|
theme?: string;
|
|
49
49
|
private reactRoot?;
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
onCurrentRepositoryChange(): void;
|
|
51
|
+
onLanguageOrSettingsChange(): void;
|
|
52
52
|
onThemeChange(): void;
|
|
53
53
|
connectedCallback(): void;
|
|
54
54
|
disconnectedCallback(): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The workspace main menu: Reactodia's default actions, followed by the diagram download and upload.
|
|
3
|
+
*
|
|
4
|
+
* Passing a `menu` to the `DefaultWorkspace` replaces its default actions, so they are listed here again.
|
|
5
|
+
* Rendered inside the workspace, so the actions can use the workspace hooks.
|
|
6
|
+
*/
|
|
7
|
+
export declare function GraphwiseMenu(): import("react").FunctionComponentElement<{
|
|
8
|
+
children?: import("react").ReactNode | undefined;
|
|
9
|
+
}>;
|
|
@@ -23,12 +23,12 @@ export interface ReactodiaAppProps {
|
|
|
23
23
|
*/
|
|
24
24
|
language: LanguageKey;
|
|
25
25
|
/**
|
|
26
|
-
* Query preset for the SPARQL data provider, owned and configured by the host.
|
|
27
|
-
* to Reactodia's generic `OwlRdfsSettings` OWL/RDFS preset when omitted.
|
|
26
|
+
* Query preset for the SPARQL data provider, owned and configured by the host.
|
|
28
27
|
*/
|
|
29
|
-
providerSettings
|
|
28
|
+
providerSettings: SparqlDataProviderSettings;
|
|
30
29
|
/**
|
|
31
|
-
* When true, the host is remounting the component switch languages
|
|
30
|
+
* When true, the host is remounting the component to switch languages or to apply new provider
|
|
31
|
+
* settings, so the workspace should not be seeded, if a seed is present.
|
|
32
32
|
* Rather, the current state should simply be reloaded.
|
|
33
33
|
*/
|
|
34
34
|
isReload?: boolean;
|
|
@@ -6,8 +6,9 @@ import { ReactodiaAppProps } from './models/reactodia-app-props';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function mountReactodia(container: HTMLElement, props: ReactodiaAppProps): Root;
|
|
8
8
|
/**
|
|
9
|
-
* Re-points the diagram at a new SPARQL endpoint
|
|
10
|
-
*
|
|
9
|
+
* Re-points the diagram at a new SPARQL endpoint by recreating it with a fresh data provider.
|
|
10
|
+
* The canvas is reset to empty, matching the initial mount, since the data of another repository
|
|
11
|
+
* has nothing to do with the current graph.
|
|
11
12
|
*/
|
|
12
13
|
export declare function updateReactodia(props: ReactodiaAppProps): Promise<void>;
|
|
13
14
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataDiagramModel, SerializedDiagram } from '@reactodia/workspace';
|
|
1
|
+
import type { DataDiagramModel, DataProvider, SerializedDiagram } from '@reactodia/workspace';
|
|
2
2
|
import { Subscription } from '../../models/subscription';
|
|
3
3
|
/**
|
|
4
4
|
* Callback invoked with the current diagram layout whenever it changes.
|
|
@@ -11,6 +11,16 @@ export declare class DiagramService {
|
|
|
11
11
|
static readonly ID = "DiagramService";
|
|
12
12
|
private static readonly NOTIFY_DEBOUNCE_MS;
|
|
13
13
|
private static readonly HISTORY_CHANGED_EVENT;
|
|
14
|
+
/**
|
|
15
|
+
* Replaces the diagram content with the given serialization. Element data is requested from the data provider and
|
|
16
|
+
* the links between the imported elements are validated against it.
|
|
17
|
+
*
|
|
18
|
+
* @param model The diagram model to import into.
|
|
19
|
+
* @param dataProvider The data provider to bind to the diagram.
|
|
20
|
+
* @param diagram The serialization to import. When `undefined`, the diagram is cleared.
|
|
21
|
+
* @param signal Optional signal to abort the import.
|
|
22
|
+
*/
|
|
23
|
+
importDiagram(model: DataDiagramModel, dataProvider: DataProvider, diagram: SerializedDiagram | undefined, signal?: AbortSignal): Promise<void>;
|
|
14
24
|
/**
|
|
15
25
|
* Subscribes to diagram changes. On every debounced change the current layout is
|
|
16
26
|
* exported and passed to the callback.
|
package/dist/types/components/graphwise-reactodia/services/diagram-file/diagram-file.service.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SerializedDiagram } from '@reactodia/workspace';
|
|
2
|
+
/**
|
|
3
|
+
* Service for downloading and uploading the diagram as a file. The file content is the same
|
|
4
|
+
* {@link SerializedDiagram} that is persisted to the local store.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DiagramFileService {
|
|
7
|
+
static readonly ID = "DiagramFileService";
|
|
8
|
+
static readonly FILE_EXTENSION = ".json";
|
|
9
|
+
private static readonly MIME_TYPE;
|
|
10
|
+
/**
|
|
11
|
+
* Downloads the given diagram serialization as a file with the given name.
|
|
12
|
+
*/
|
|
13
|
+
download(diagram: SerializedDiagram, fileName: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Reads a diagram serialization from the given file.
|
|
16
|
+
*
|
|
17
|
+
* @throws Error when the file is not valid JSON or is not a serialized diagram.
|
|
18
|
+
*/
|
|
19
|
+
read(file: File): Promise<SerializedDiagram>;
|
|
20
|
+
/**
|
|
21
|
+
* Checks if the provided value is a serialized diagram
|
|
22
|
+
*/
|
|
23
|
+
private isSerializedDiagram;
|
|
24
|
+
}
|
|
@@ -36,7 +36,7 @@ export namespace Components {
|
|
|
36
36
|
*/
|
|
37
37
|
"language": LanguageKey;
|
|
38
38
|
/**
|
|
39
|
-
* Query preset for the SPARQL data provider, owned and configured by the host. A DOM property (an object, not an attribute) passed in from outside the wrapper.
|
|
39
|
+
* Query preset for the SPARQL data provider, owned and configured by the host. A DOM property (an object, not an attribute) passed in from outside the wrapper. Required: the wrapper has no default preset and throws when it is missing. Changing it rebuilds the data provider and reloads the graph with it, keeping the current diagram.
|
|
40
40
|
*/
|
|
41
41
|
"providerSettings"?: SparqlDataProviderSettings;
|
|
42
42
|
/**
|
|
@@ -90,7 +90,7 @@ declare namespace LocalJSX {
|
|
|
90
90
|
*/
|
|
91
91
|
"language"?: LanguageKey;
|
|
92
92
|
/**
|
|
93
|
-
* Query preset for the SPARQL data provider, owned and configured by the host. A DOM property (an object, not an attribute) passed in from outside the wrapper.
|
|
93
|
+
* Query preset for the SPARQL data provider, owned and configured by the host. A DOM property (an object, not an attribute) passed in from outside the wrapper. Required: the wrapper has no default preset and throws when it is missing. Changing it rebuilds the data provider and reloads the graph with it, keeping the current diagram.
|
|
94
94
|
*/
|
|
95
95
|
"providerSettings"?: SparqlDataProviderSettings;
|
|
96
96
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphwise-reactodia",
|
|
3
|
-
"version": "0.0.1-
|
|
3
|
+
"version": "0.0.1-TR13",
|
|
4
4
|
"description": "Graphwise wrapper around the Reactodia graph explorer.",
|
|
5
5
|
"license": "LGPL-3.0-or-later",
|
|
6
6
|
"author": "Ontotext AD",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/jest": "^29.5.14",
|
|
47
47
|
"@types/react": "^18.3.12",
|
|
48
48
|
"@types/react-dom": "^18.3.1",
|
|
49
|
-
"cypress": "
|
|
49
|
+
"cypress": "15.17.0",
|
|
50
50
|
"jest": "^29.7.0",
|
|
51
51
|
"jest-cli": "^29.7.0",
|
|
52
52
|
"react": "^18.3.1",
|