graphwise-reactodia 0.0.1-TR1
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 +2 -0
- package/dist/cjs/app-globals-CcJr5lkF.js +23 -0
- package/dist/cjs/graphwise-reactodia.cjs.entry.js +45058 -0
- package/dist/cjs/graphwise-reactodia.cjs.js +25 -0
- package/dist/cjs/index-CII9aUQC.js +1212 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.css +10 -0
- package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.js +182 -0
- package/dist/collection/components/graphwise-reactodia/i18n/translations.js +4 -0
- package/dist/collection/components/graphwise-reactodia/models/reactodia-app-props.js +1 -0
- package/dist/collection/components/graphwise-reactodia/reactodia-app.js +109 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/polyfill/polyfill-node.js +17 -0
- package/dist/esm/app-globals-CalY52z6.js +21 -0
- package/dist/esm/graphwise-reactodia.entry.js +45056 -0
- package/dist/esm/graphwise-reactodia.js +21 -0
- package/dist/esm/index-Cypw7ydc.js +1204 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/graphwise-reactodia/graphwise-reactodia.esm.js +1 -0
- package/dist/graphwise-reactodia/index.esm.js +0 -0
- package/dist/graphwise-reactodia/p-CalY52z6.js +1 -0
- package/dist/graphwise-reactodia/p-Cypw7ydc.js +2 -0
- package/dist/graphwise-reactodia/p-bafd6be5.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/graphwise-reactodia/graphwise-reactodia.d.ts +44 -0
- package/dist/types/components/graphwise-reactodia/i18n/translations.d.ts +343 -0
- package/dist/types/components/graphwise-reactodia/models/reactodia-app-props.d.ts +34 -0
- package/dist/types/components/graphwise-reactodia/reactodia-app.d.ts +21 -0
- package/dist/types/components.d.ts +109 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/polyfill/polyfill-node.d.ts +9 -0
- package/dist/types/stencil-public-runtime.d.ts +1702 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +30 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./cjs/index.cjs.js');
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './esm/index.js';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SparqlDataProviderSettings, SparqlQueryFunction } from '@reactodia/workspace';
|
|
2
|
+
/**
|
|
3
|
+
* A web component that renders a graph with the Reactodia workspace.
|
|
4
|
+
*
|
|
5
|
+
* The component is backed by a SPARQL endpoint but is endpoint-agnostic: the host passes
|
|
6
|
+
* the active repository's endpoint via `current-repository` and a `queryFunction` that
|
|
7
|
+
* performs the actual HTTP request. Reactodia fetches all node, link and type data lazily
|
|
8
|
+
* through them; the canvas starts empty and the user populates it via the search bar.
|
|
9
|
+
*
|
|
10
|
+
* The component is a thin wrapper around Reactodia: query configuration lives outside the
|
|
11
|
+
* wrapper and is supplied through the `providerSettings` prop.
|
|
12
|
+
*/
|
|
13
|
+
export declare class GraphwiseReactodia {
|
|
14
|
+
private readonly hostElement;
|
|
15
|
+
/**
|
|
16
|
+
* The active repository id. Appended to {@link queryFunction} as the request `url`;
|
|
17
|
+
* changing it re-points the graph at the new repository (and resets the canvas),
|
|
18
|
+
* which is how runtime repository changes are handled.
|
|
19
|
+
*/
|
|
20
|
+
currentRepository: string;
|
|
21
|
+
/**
|
|
22
|
+
* HTTP transport for the SPARQL requests. Set by the host so requests go through the host's HTTP layer (auth,
|
|
23
|
+
* interceptors) instead of a built-in `fetch`.
|
|
24
|
+
*/
|
|
25
|
+
queryFunction: SparqlQueryFunction;
|
|
26
|
+
/**
|
|
27
|
+
* UI language code (e.g. `en`, `fr`) for the Reactodia interface. Defaults to English.
|
|
28
|
+
*/
|
|
29
|
+
language: string;
|
|
30
|
+
/**
|
|
31
|
+
* Query preset for the SPARQL data provider, owned and configured by the host. A DOM
|
|
32
|
+
* property (an object, not an attribute) passed in from outside the wrapper. When omitted,
|
|
33
|
+
* the data provider falls back to Reactodia's generic OWL/RDFS preset. Changing it rebuilds
|
|
34
|
+
* the data provider and resets the canvas.
|
|
35
|
+
*/
|
|
36
|
+
providerSettings?: SparqlDataProviderSettings;
|
|
37
|
+
private reactRoot;
|
|
38
|
+
onProviderSettingsChange(): void;
|
|
39
|
+
onLanguageChange(): void;
|
|
40
|
+
componentDidLoad(): void;
|
|
41
|
+
disconnectedCallback(): void;
|
|
42
|
+
render(): any;
|
|
43
|
+
private renderGraph;
|
|
44
|
+
}
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
export declare const TRANSLATIONS: {
|
|
2
|
+
fr: {
|
|
3
|
+
authoring_state: {
|
|
4
|
+
"entity_action_delete.label": string;
|
|
5
|
+
"entity_action_delete.title": string;
|
|
6
|
+
"entity_action_delete.title_disabled": string;
|
|
7
|
+
"entity_action_discard.label": string;
|
|
8
|
+
"entity_action_discard.title": string;
|
|
9
|
+
"entity_action_edit.label": string;
|
|
10
|
+
"entity_action_edit.title": string;
|
|
11
|
+
"entity_action_edit.title_disabled": string;
|
|
12
|
+
"entity_add.label": string;
|
|
13
|
+
"entity_change.label": string;
|
|
14
|
+
"entity_delete.label": string;
|
|
15
|
+
"relation_action_discard.label": string;
|
|
16
|
+
"relation_action_discard.title": string;
|
|
17
|
+
"relation_add.label": string;
|
|
18
|
+
"relation_change.label": string;
|
|
19
|
+
"relation_delete.label": string;
|
|
20
|
+
};
|
|
21
|
+
classic_workspace: {
|
|
22
|
+
"canvas.label": string;
|
|
23
|
+
"class_tree.heading": string;
|
|
24
|
+
"connections.heading": string;
|
|
25
|
+
"instances.heading": string;
|
|
26
|
+
};
|
|
27
|
+
commands: {
|
|
28
|
+
"change_entity.title": string;
|
|
29
|
+
"change_link_type_visibility.title": string;
|
|
30
|
+
"change_relation.title": string;
|
|
31
|
+
"collapse_element.title": string;
|
|
32
|
+
"expand_element.title": string;
|
|
33
|
+
"place_elements_around.title": string;
|
|
34
|
+
"restore_geometry.title": string;
|
|
35
|
+
"restore_link_vertices.title": string;
|
|
36
|
+
"restore_viewport.title": string;
|
|
37
|
+
"set_element_state.title": string;
|
|
38
|
+
"set_entity_data.title": string;
|
|
39
|
+
"set_entity_group_items.title": string;
|
|
40
|
+
"set_link_state.title": string;
|
|
41
|
+
"set_relation_data.title": string;
|
|
42
|
+
"set_relation_group_items.title": string;
|
|
43
|
+
"transform_elements.title": string;
|
|
44
|
+
};
|
|
45
|
+
connections_menu: {
|
|
46
|
+
"all_link.label": string;
|
|
47
|
+
"breadcrumbs_root.label": string;
|
|
48
|
+
"dialog.caption": string;
|
|
49
|
+
"entities.add_all": string;
|
|
50
|
+
"entities.add_group": string;
|
|
51
|
+
"entities.add_selected": string;
|
|
52
|
+
"entities.counter_label": string;
|
|
53
|
+
"entities.extra_label": string;
|
|
54
|
+
"entities.extra_title": string;
|
|
55
|
+
"entities.missing_label": string;
|
|
56
|
+
"entities.missing_title": string;
|
|
57
|
+
"entities.no_results": string;
|
|
58
|
+
"entities.truncated_results": string;
|
|
59
|
+
"entities.truncated_results_expand": string;
|
|
60
|
+
"input.placeholder": any;
|
|
61
|
+
"link.both_navigate_title": string;
|
|
62
|
+
"link.both_title": string;
|
|
63
|
+
"link.source_navigate_title": string;
|
|
64
|
+
"link.source_title": string;
|
|
65
|
+
"link.target_navigate_title": string;
|
|
66
|
+
"link.target_title": string;
|
|
67
|
+
"link.move_to_filter.title": string;
|
|
68
|
+
"links.no_results": string;
|
|
69
|
+
"links.suggest_similar": string;
|
|
70
|
+
"place_elements.command": string;
|
|
71
|
+
"select_all.label": string;
|
|
72
|
+
"select_all.title": string;
|
|
73
|
+
"sort_alphabetically.title": string;
|
|
74
|
+
"sort_smart.title": string;
|
|
75
|
+
};
|
|
76
|
+
data_diagram_model: {
|
|
77
|
+
"add_element.command": string;
|
|
78
|
+
"add_link.command": string;
|
|
79
|
+
"create_links.command": string;
|
|
80
|
+
"group_entities.command": string;
|
|
81
|
+
"import_layout.command": string;
|
|
82
|
+
"regroup_relations.command": string;
|
|
83
|
+
"request_entities.command": string;
|
|
84
|
+
"request_relations.command": string;
|
|
85
|
+
"remove_element.command": string;
|
|
86
|
+
"remove_link.command": string;
|
|
87
|
+
"ungroup_entities.command": string;
|
|
88
|
+
};
|
|
89
|
+
default_data_locale: {
|
|
90
|
+
iri: string;
|
|
91
|
+
iri_blank: string;
|
|
92
|
+
};
|
|
93
|
+
default_workspace: {
|
|
94
|
+
"search_section_entities.label": string;
|
|
95
|
+
"search_section_entities.title": string;
|
|
96
|
+
"search_section_entity_types.label": string;
|
|
97
|
+
"search_section_entity_types.title": string;
|
|
98
|
+
"search_section_link_types.label": string;
|
|
99
|
+
"search_section_link_types.title": string;
|
|
100
|
+
};
|
|
101
|
+
drop_on_canvas: {
|
|
102
|
+
"drop.command": string;
|
|
103
|
+
};
|
|
104
|
+
editor_controller: {
|
|
105
|
+
"apply_authored_changes.command": string;
|
|
106
|
+
"discard_change.command": string;
|
|
107
|
+
"entity_add.command": string;
|
|
108
|
+
"entity_change.command": string;
|
|
109
|
+
"entity_delete.command": string;
|
|
110
|
+
"relation_add.command": string;
|
|
111
|
+
"relation_change.command": string;
|
|
112
|
+
"relation_delete.command": string;
|
|
113
|
+
"relation_move_source.command": string;
|
|
114
|
+
"relation_move_target.command": string;
|
|
115
|
+
"remove_items.command": string;
|
|
116
|
+
"set_authoring_state.command": string;
|
|
117
|
+
"validate_entity_failed.message": string;
|
|
118
|
+
};
|
|
119
|
+
forms: {
|
|
120
|
+
"input_file.drag_hint": string;
|
|
121
|
+
"input_file.remove_value.title": string;
|
|
122
|
+
"input_file.select_files.label": string;
|
|
123
|
+
"input_list.add_value.title": string;
|
|
124
|
+
"input_list.remove_value.title": string;
|
|
125
|
+
};
|
|
126
|
+
group_paginator: {
|
|
127
|
+
"current_page.label": string;
|
|
128
|
+
"go_next.title": string;
|
|
129
|
+
"go_previous.title": string;
|
|
130
|
+
"page_size.title": string;
|
|
131
|
+
};
|
|
132
|
+
inline_entity: {
|
|
133
|
+
title: string;
|
|
134
|
+
title_extra: string;
|
|
135
|
+
};
|
|
136
|
+
link_action: {
|
|
137
|
+
"delete_annotation.title": string;
|
|
138
|
+
"delete_relation.title": string;
|
|
139
|
+
"delete_relation.title_disabled": string;
|
|
140
|
+
"edit_relation.title": string;
|
|
141
|
+
"edit_relation.title_disabled": string;
|
|
142
|
+
"rename_link.title": string;
|
|
143
|
+
"move_relation.move_source_title": string;
|
|
144
|
+
"move_relation.move_target_title": string;
|
|
145
|
+
"vertex.remove_title": string;
|
|
146
|
+
};
|
|
147
|
+
navigator: {
|
|
148
|
+
"toggle_collapse.title": string;
|
|
149
|
+
"toggle_expand.title": string;
|
|
150
|
+
};
|
|
151
|
+
note_annotation: {
|
|
152
|
+
"change_text.command": string;
|
|
153
|
+
"style_align_center.title": string;
|
|
154
|
+
"style_align_left.title": string;
|
|
155
|
+
"style_align_right.title": string;
|
|
156
|
+
"style_bold.title": string;
|
|
157
|
+
"style_color_variant.title": string;
|
|
158
|
+
"style_italic.title": string;
|
|
159
|
+
"style_strikethrough.title": string;
|
|
160
|
+
"style_underline.title": string;
|
|
161
|
+
};
|
|
162
|
+
overlay_controller: {
|
|
163
|
+
multiple_tasks_in_progress: string;
|
|
164
|
+
unknown_error: string;
|
|
165
|
+
};
|
|
166
|
+
search_defaults: {
|
|
167
|
+
empty_input_term: string;
|
|
168
|
+
"input.placeholder": string;
|
|
169
|
+
"input_clear.title": string;
|
|
170
|
+
"input_submit.title": string;
|
|
171
|
+
input_term_too_short: string;
|
|
172
|
+
no_results: string;
|
|
173
|
+
};
|
|
174
|
+
search_element_types: {
|
|
175
|
+
"drag_create.title": string;
|
|
176
|
+
"input.placeholder": any;
|
|
177
|
+
no_results: string;
|
|
178
|
+
"refresh_progress.title": string;
|
|
179
|
+
show_only_creatable: string;
|
|
180
|
+
};
|
|
181
|
+
search_entities: {
|
|
182
|
+
"add_group.label": string;
|
|
183
|
+
"add_group.title": string;
|
|
184
|
+
"add_selected.label": string;
|
|
185
|
+
"add_selected.title": string;
|
|
186
|
+
criteria_has_type: string;
|
|
187
|
+
criteria_connected: string;
|
|
188
|
+
criteria_connected_via: string;
|
|
189
|
+
criteria_connected_to_source: string;
|
|
190
|
+
criteria_connected_to_target: string;
|
|
191
|
+
"input.placeholder": any;
|
|
192
|
+
"place_elements.command": string;
|
|
193
|
+
"query_progress.title": string;
|
|
194
|
+
"show_more_results.label": string;
|
|
195
|
+
"show_more_results.title": string;
|
|
196
|
+
};
|
|
197
|
+
search_link_types: {
|
|
198
|
+
"add_to_filter.title": string;
|
|
199
|
+
heading_connected: string;
|
|
200
|
+
heading_connected_single: string;
|
|
201
|
+
heading_other: string;
|
|
202
|
+
"input.placeholder": any;
|
|
203
|
+
no_results: string;
|
|
204
|
+
"switch.command": string;
|
|
205
|
+
"switch_all.label": string;
|
|
206
|
+
"switch_hidden.title": string;
|
|
207
|
+
"switch_visible.title": string;
|
|
208
|
+
"switch_without_label.title": string;
|
|
209
|
+
};
|
|
210
|
+
selection_action: {
|
|
211
|
+
"add_to_filter.title": string;
|
|
212
|
+
"anchor.title": string;
|
|
213
|
+
"annotate.defaultContent": string;
|
|
214
|
+
"annotate.title": string;
|
|
215
|
+
"connections.title": string;
|
|
216
|
+
"expand.collapse_command": string;
|
|
217
|
+
"expand.expand_command": string;
|
|
218
|
+
"expand.title": string;
|
|
219
|
+
"expand.title_single": string;
|
|
220
|
+
"establish_relation.title": string;
|
|
221
|
+
"establish_relation.title_disabled": string;
|
|
222
|
+
"group.title": string;
|
|
223
|
+
"group.title_ungroup": string;
|
|
224
|
+
"layout.title": string;
|
|
225
|
+
"remove.title": string;
|
|
226
|
+
"remove.title_new": string;
|
|
227
|
+
"remove.title_single": string;
|
|
228
|
+
"zoom_to_fit.title": string;
|
|
229
|
+
};
|
|
230
|
+
standard_element: {
|
|
231
|
+
blank_node: string;
|
|
232
|
+
default_type: string;
|
|
233
|
+
"delete.label": string;
|
|
234
|
+
"delete.title": string;
|
|
235
|
+
"delete.title_disabled": string;
|
|
236
|
+
"edit.label": string;
|
|
237
|
+
"edit.title": string;
|
|
238
|
+
"edit.title_disabled": string;
|
|
239
|
+
"group_item.title": string;
|
|
240
|
+
"iri.label": string;
|
|
241
|
+
"iri.label_modified": string;
|
|
242
|
+
no_properties: string;
|
|
243
|
+
"property.title": string;
|
|
244
|
+
"ungroup.title": string;
|
|
245
|
+
};
|
|
246
|
+
standard_link: {
|
|
247
|
+
"group_source.title": string;
|
|
248
|
+
"group_source.value": string;
|
|
249
|
+
"group_target.title": string;
|
|
250
|
+
"group_target.value": string;
|
|
251
|
+
"label.title": string;
|
|
252
|
+
"property.title": string;
|
|
253
|
+
};
|
|
254
|
+
toolbar: {
|
|
255
|
+
"menu_toggle.title": string;
|
|
256
|
+
};
|
|
257
|
+
toolbar_action: {
|
|
258
|
+
"clear_all.command": string;
|
|
259
|
+
"clear_all.title": string;
|
|
260
|
+
"clear_all.label": string;
|
|
261
|
+
"export_print.label": string;
|
|
262
|
+
"export_print.title": string;
|
|
263
|
+
"export_raster.label": string;
|
|
264
|
+
"export_raster.title": string;
|
|
265
|
+
"export_svg.label": string;
|
|
266
|
+
"export_svg.title": string;
|
|
267
|
+
"redo.label": string;
|
|
268
|
+
"redo.title": string;
|
|
269
|
+
"redo.title_named": string;
|
|
270
|
+
"save_authoring.title": string;
|
|
271
|
+
"save_layout.title": string;
|
|
272
|
+
"language_selector.title": string;
|
|
273
|
+
"layout.label": string;
|
|
274
|
+
"layout.title": string;
|
|
275
|
+
"undo.label": string;
|
|
276
|
+
"undo.title": string;
|
|
277
|
+
"undo.title_named": string;
|
|
278
|
+
};
|
|
279
|
+
unified_search: {
|
|
280
|
+
"input.placeholder": any;
|
|
281
|
+
"input_clear.title": string;
|
|
282
|
+
"input_collapse.title": string;
|
|
283
|
+
};
|
|
284
|
+
visual_authoring: {
|
|
285
|
+
"dialog.apply.label": string;
|
|
286
|
+
"dialog.apply.title": string;
|
|
287
|
+
"dialog.cancel.label": string;
|
|
288
|
+
"dialog.cancel.title": string;
|
|
289
|
+
"edit_entity.dialog.apply.label": any;
|
|
290
|
+
"edit_entity.dialog.apply.title": any;
|
|
291
|
+
"edit_entity.dialog.caption": string;
|
|
292
|
+
"edit_entity.iri.label": string;
|
|
293
|
+
"edit_entity.iri.placeholder": string;
|
|
294
|
+
"edit_relation.dialog.apply.label": any;
|
|
295
|
+
"edit_relation.dialog.apply.title": any;
|
|
296
|
+
"edit_relation.dialog.caption": string;
|
|
297
|
+
"edit_relation.dialog.caption_new": string;
|
|
298
|
+
"edit_relation.validation_progress.title": string;
|
|
299
|
+
"find_or_create.connect_command": string;
|
|
300
|
+
"find_or_create.create_command": string;
|
|
301
|
+
"find_or_create.dialog.apply.label": any;
|
|
302
|
+
"find_or_create.dialog.apply.title": any;
|
|
303
|
+
"find_or_create.dialog.caption": string;
|
|
304
|
+
"find_or_create.loading.label": string;
|
|
305
|
+
"find_or_create.validation_progress.title": string;
|
|
306
|
+
"property.label": string;
|
|
307
|
+
"property.text_value.placeholder": string;
|
|
308
|
+
"property.title": string;
|
|
309
|
+
"rename_link.dialog.apply.label": any;
|
|
310
|
+
"rename_link.dialog.apply.title": any;
|
|
311
|
+
"rename_link.dialog.caption": string;
|
|
312
|
+
"rename_link.label.label": string;
|
|
313
|
+
"select_entity.entity_type.label": string;
|
|
314
|
+
"select_entity.input.placeholder": any;
|
|
315
|
+
"select_entity.type.label": string;
|
|
316
|
+
"select_entity.type.placeholder": string;
|
|
317
|
+
"select_entity.results.aria_label": string;
|
|
318
|
+
"select_entity.separator.label": string;
|
|
319
|
+
"select_entity.validation.error_required": string;
|
|
320
|
+
"select_relation.relation_type.label": string;
|
|
321
|
+
"select_relation.type.label": string;
|
|
322
|
+
"select_relation.type.placeholder": string;
|
|
323
|
+
"select_relation.validation.error_duplicate": string;
|
|
324
|
+
"select_relation.validation.error_required": string;
|
|
325
|
+
};
|
|
326
|
+
workspace: {
|
|
327
|
+
"group_entities.command": string;
|
|
328
|
+
"perform_layout.task": string;
|
|
329
|
+
"perform_layout.command": string;
|
|
330
|
+
"ungroup_entities.command": string;
|
|
331
|
+
};
|
|
332
|
+
workspace_layout: {
|
|
333
|
+
"toggle_collapse.title": string;
|
|
334
|
+
"toggle_expand.title": string;
|
|
335
|
+
};
|
|
336
|
+
zoom_control: {
|
|
337
|
+
"pointer_mode.title": string;
|
|
338
|
+
"zoom_in.title": string;
|
|
339
|
+
"zoom_out.title": string;
|
|
340
|
+
"zoom_to_fit.title": string;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SerializedDiagram, SparqlDataProviderSettings, SparqlQueryFunction } from '@reactodia/workspace';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the internal Reactodia React application.
|
|
4
|
+
*/
|
|
5
|
+
export interface ReactodiaAppProps {
|
|
6
|
+
/**
|
|
7
|
+
* The active repository id. Passed to the SPARQL data provider as its `endpointUrl` and
|
|
8
|
+
* surfaced to {@link queryFunction} as the request `url`, which the host transport uses to
|
|
9
|
+
* target the repository. Changing it re-points the diagram at a different repository.
|
|
10
|
+
*/
|
|
11
|
+
currentRepository: string;
|
|
12
|
+
/**
|
|
13
|
+
* Transport for the SPARQL requests. The host owns the connection (auth, interceptors,
|
|
14
|
+
* base URL) inside this function; Reactodia delegates every SPARQL call to it instead
|
|
15
|
+
* of using the built-in `fetch`.
|
|
16
|
+
*/
|
|
17
|
+
queryFunction: SparqlQueryFunction;
|
|
18
|
+
/**
|
|
19
|
+
* UI language code (e.g. `en`, `fr`); selects the Reactodia translation bundle
|
|
20
|
+
* and is also used as the initial graph-data language.
|
|
21
|
+
*/
|
|
22
|
+
language: string;
|
|
23
|
+
/**
|
|
24
|
+
* A previously exported diagram to restore on mount. Used to carry the user's current
|
|
25
|
+
* canvas across a remount (e.g. forced by a language change). When omitted, the canvas
|
|
26
|
+
* starts empty.
|
|
27
|
+
*/
|
|
28
|
+
initialDiagram?: SerializedDiagram;
|
|
29
|
+
/**
|
|
30
|
+
* Query preset for the SPARQL data provider, owned and configured by the host. Falls back
|
|
31
|
+
* to Reactodia's generic `OwlRdfsSettings` OWL/RDFS preset when omitted.
|
|
32
|
+
*/
|
|
33
|
+
providerSettings?: SparqlDataProviderSettings;
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Root } from 'react-dom/client';
|
|
2
|
+
import { SerializedDiagram } from '@reactodia/workspace';
|
|
3
|
+
import { ReactodiaAppProps } from './models/reactodia-app-props';
|
|
4
|
+
/**
|
|
5
|
+
* Mounts the Reactodia application into the given container and returns the React root.
|
|
6
|
+
*/
|
|
7
|
+
export declare function mountReactodia(container: HTMLElement, props: ReactodiaAppProps): Root;
|
|
8
|
+
/**
|
|
9
|
+
* Re-points the diagram at a new SPARQL endpoint or query preset by recreating it with a
|
|
10
|
+
* fresh data provider. The canvas is reset to empty, matching the initial mount.
|
|
11
|
+
*/
|
|
12
|
+
export declare function updateReactodia(props: ReactodiaAppProps): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Serializes the current diagram so it can be restored after a remount (e.g. when a
|
|
15
|
+
* language change rebuilds the workspace). Returns `undefined` if nothing is mounted yet.
|
|
16
|
+
*/
|
|
17
|
+
export declare function exportReactodiaLayout(): SerializedDiagram | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Unmounts the Reactodia application.
|
|
20
|
+
*/
|
|
21
|
+
export declare function unmountReactodia(root: Root): void;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
import { SparqlDataProviderSettings, SparqlQueryFunction } from "@reactodia/workspace";
|
|
9
|
+
export { SparqlDataProviderSettings, SparqlQueryFunction } from "@reactodia/workspace";
|
|
10
|
+
export namespace Components {
|
|
11
|
+
/**
|
|
12
|
+
* A web component that renders a graph with the Reactodia workspace.
|
|
13
|
+
* The component is backed by a SPARQL endpoint but is endpoint-agnostic: the host passes
|
|
14
|
+
* the active repository's endpoint via `current-repository` and a `queryFunction` that
|
|
15
|
+
* performs the actual HTTP request. Reactodia fetches all node, link and type data lazily
|
|
16
|
+
* through them; the canvas starts empty and the user populates it via the search bar.
|
|
17
|
+
* The component is a thin wrapper around Reactodia: query configuration lives outside the
|
|
18
|
+
* wrapper and is supplied through the `providerSettings` prop.
|
|
19
|
+
*/
|
|
20
|
+
interface GraphwiseReactodia {
|
|
21
|
+
/**
|
|
22
|
+
* The active repository id. Appended to {@link queryFunction} as the request `url`; changing it re-points the graph at the new repository (and resets the canvas), which is how runtime repository changes are handled.
|
|
23
|
+
*/
|
|
24
|
+
"currentRepository": string;
|
|
25
|
+
/**
|
|
26
|
+
* UI language code (e.g. `en`, `fr`) for the Reactodia interface. Defaults to English.
|
|
27
|
+
* @default 'en'
|
|
28
|
+
*/
|
|
29
|
+
"language": string;
|
|
30
|
+
/**
|
|
31
|
+
* 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. When omitted, the data provider falls back to Reactodia's generic OWL/RDFS preset. Changing it rebuilds the data provider and resets the canvas.
|
|
32
|
+
*/
|
|
33
|
+
"providerSettings"?: SparqlDataProviderSettings;
|
|
34
|
+
/**
|
|
35
|
+
* HTTP transport for the SPARQL requests. Set by the host so requests go through the host's HTTP layer (auth, interceptors) instead of a built-in `fetch`.
|
|
36
|
+
*/
|
|
37
|
+
"queryFunction": SparqlQueryFunction;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
declare global {
|
|
41
|
+
/**
|
|
42
|
+
* A web component that renders a graph with the Reactodia workspace.
|
|
43
|
+
* The component is backed by a SPARQL endpoint but is endpoint-agnostic: the host passes
|
|
44
|
+
* the active repository's endpoint via `current-repository` and a `queryFunction` that
|
|
45
|
+
* performs the actual HTTP request. Reactodia fetches all node, link and type data lazily
|
|
46
|
+
* through them; the canvas starts empty and the user populates it via the search bar.
|
|
47
|
+
* The component is a thin wrapper around Reactodia: query configuration lives outside the
|
|
48
|
+
* wrapper and is supplied through the `providerSettings` prop.
|
|
49
|
+
*/
|
|
50
|
+
interface HTMLGraphwiseReactodiaElement extends Components.GraphwiseReactodia, HTMLStencilElement {
|
|
51
|
+
}
|
|
52
|
+
var HTMLGraphwiseReactodiaElement: {
|
|
53
|
+
prototype: HTMLGraphwiseReactodiaElement;
|
|
54
|
+
new (): HTMLGraphwiseReactodiaElement;
|
|
55
|
+
};
|
|
56
|
+
interface HTMLElementTagNameMap {
|
|
57
|
+
"graphwise-reactodia": HTMLGraphwiseReactodiaElement;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
declare namespace LocalJSX {
|
|
61
|
+
/**
|
|
62
|
+
* A web component that renders a graph with the Reactodia workspace.
|
|
63
|
+
* The component is backed by a SPARQL endpoint but is endpoint-agnostic: the host passes
|
|
64
|
+
* the active repository's endpoint via `current-repository` and a `queryFunction` that
|
|
65
|
+
* performs the actual HTTP request. Reactodia fetches all node, link and type data lazily
|
|
66
|
+
* through them; the canvas starts empty and the user populates it via the search bar.
|
|
67
|
+
* The component is a thin wrapper around Reactodia: query configuration lives outside the
|
|
68
|
+
* wrapper and is supplied through the `providerSettings` prop.
|
|
69
|
+
*/
|
|
70
|
+
interface GraphwiseReactodia {
|
|
71
|
+
/**
|
|
72
|
+
* The active repository id. Appended to {@link queryFunction} as the request `url`; changing it re-points the graph at the new repository (and resets the canvas), which is how runtime repository changes are handled.
|
|
73
|
+
*/
|
|
74
|
+
"currentRepository"?: string;
|
|
75
|
+
/**
|
|
76
|
+
* UI language code (e.g. `en`, `fr`) for the Reactodia interface. Defaults to English.
|
|
77
|
+
* @default 'en'
|
|
78
|
+
*/
|
|
79
|
+
"language"?: string;
|
|
80
|
+
/**
|
|
81
|
+
* 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. When omitted, the data provider falls back to Reactodia's generic OWL/RDFS preset. Changing it rebuilds the data provider and resets the canvas.
|
|
82
|
+
*/
|
|
83
|
+
"providerSettings"?: SparqlDataProviderSettings;
|
|
84
|
+
/**
|
|
85
|
+
* HTTP transport for the SPARQL requests. Set by the host so requests go through the host's HTTP layer (auth, interceptors) instead of a built-in `fetch`.
|
|
86
|
+
*/
|
|
87
|
+
"queryFunction"?: SparqlQueryFunction;
|
|
88
|
+
}
|
|
89
|
+
interface IntrinsicElements {
|
|
90
|
+
"graphwise-reactodia": GraphwiseReactodia;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export { LocalJSX as JSX };
|
|
94
|
+
declare module "@stencil/core" {
|
|
95
|
+
export namespace JSX {
|
|
96
|
+
interface IntrinsicElements {
|
|
97
|
+
/**
|
|
98
|
+
* A web component that renders a graph with the Reactodia workspace.
|
|
99
|
+
* The component is backed by a SPARQL endpoint but is endpoint-agnostic: the host passes
|
|
100
|
+
* the active repository's endpoint via `current-repository` and a `queryFunction` that
|
|
101
|
+
* performs the actual HTTP request. Reactodia fetches all node, link and type data lazily
|
|
102
|
+
* through them; the canvas starts empty and the user populates it via the search bar.
|
|
103
|
+
* The component is a thin wrapper around Reactodia: query configuration lives outside the
|
|
104
|
+
* wrapper and is supplied through the `providerSettings` prop.
|
|
105
|
+
*/
|
|
106
|
+
"graphwise-reactodia": LocalJSX.GraphwiseReactodia & JSXBase.HTMLAttributes<HTMLGraphwiseReactodiaElement>;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stencil global script, executed once before any component bundle loads.
|
|
3
|
+
*
|
|
4
|
+
* Reactodia's transitive dependencies (n3 / readable-stream) reference the Node.js
|
|
5
|
+
* `process` global at module-evaluation time (e.g. `util.debuglog` reads
|
|
6
|
+
* `process.env.NODE_DEBUG`). That global does not exist in the browser, so we provide
|
|
7
|
+
* a minimal shim here to keep those modules from crashing
|
|
8
|
+
*/
|
|
9
|
+
export default function polyfillNode(): void;
|