graphwise-reactodia 0.0.1-TR2 → 0.0.1-TR20
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/COPYING +674 -0
- package/COPYING.LESSER +165 -0
- package/NOTICE +41 -0
- package/README.md +225 -1
- package/dist/cjs/graphwise-reactodia.cjs.entry.js +28519 -41232
- package/dist/cjs/graphwise-reactodia.cjs.js +2 -2
- package/dist/cjs/{index-CII9aUQC.js → index-DtzCybH4.js} +16 -0
- package/dist/cjs/index.cjs.js +29 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/node-action-DkJ5ct17.js +96 -0
- package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.css +57 -1
- package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.js +135 -40
- package/dist/collection/components/graphwise-reactodia/i18n/language-key.js +5 -0
- package/dist/collection/components/graphwise-reactodia/i18n/translations.js +6 -1
- package/dist/collection/components/graphwise-reactodia/menu/export-diagram-action.js +19 -0
- package/dist/collection/components/graphwise-reactodia/menu/graphwise-menu.js +24 -0
- package/dist/collection/components/graphwise-reactodia/menu/import-diagram-action.js +31 -0
- package/dist/collection/components/graphwise-reactodia/models/clear-diagram-storage-event.js +5 -0
- package/dist/collection/components/graphwise-reactodia/models/error/error-cause.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/error/error-code.js +20 -0
- package/dist/collection/components/graphwise-reactodia/models/error/error-report.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/event/event-callback.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/event/event-detail.js +4 -0
- package/dist/collection/components/graphwise-reactodia/models/event/event-type.js +8 -0
- package/dist/collection/components/graphwise-reactodia/models/reactodia-config.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/sparql/sparql-query-function.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/sparql/sparql-query-params.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/subscription-list.js +35 -0
- package/dist/collection/components/graphwise-reactodia/models/subscription.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/triple.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/ui/menu-config.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/ui/menu-item.js +18 -0
- package/dist/collection/components/graphwise-reactodia/models/ui/node-action.js +22 -0
- package/dist/collection/components/graphwise-reactodia/models/ui/resolved-toolbar-position.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/ui/resolved-ui-config.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/ui/toolbar-dock.js +14 -0
- package/dist/collection/components/graphwise-reactodia/models/ui/toolbar-position.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/ui/ui-config.js +1 -0
- package/dist/collection/components/graphwise-reactodia/node-action/node-actions.js +22 -0
- package/dist/collection/components/graphwise-reactodia/providers/service/service-inject.js +15 -0
- package/dist/collection/components/graphwise-reactodia/providers/service/service.js +19 -0
- package/dist/collection/components/graphwise-reactodia/providers/service/service.provider.js +20 -0
- package/dist/collection/components/graphwise-reactodia/reactodia-app.js +188 -26
- package/dist/collection/components/graphwise-reactodia/services/diagram/diagram.service.js +71 -0
- package/dist/collection/components/graphwise-reactodia/services/diagram-file/diagram-file.service.js +68 -0
- package/dist/collection/components/graphwise-reactodia/services/diagram-storage/diagram-storage.service.js +71 -0
- package/dist/collection/components/graphwise-reactodia/services/error/error.service.js +78 -0
- package/dist/collection/components/graphwise-reactodia/services/event/event.service.js +58 -0
- package/dist/collection/components/graphwise-reactodia/services/window/window.service.js +24 -0
- package/dist/collection/components/graphwise-reactodia/styles/type-style.resolver.js +52 -0
- package/dist/collection/components/graphwise-reactodia/testing/storage.mock.js +35 -0
- package/dist/collection/components/graphwise-reactodia/ui-config/default-ui-config.js +30 -0
- package/dist/collection/components/graphwise-reactodia/ui-config/ui-config-mapper.js +51 -0
- package/dist/collection/components/graphwise-reactodia/utils/object-util.js +30 -0
- package/dist/collection/index.js +7 -1
- package/dist/collection/pages/graphwise-reactodia/main.js +157 -0
- package/dist/collection/pages/graphwise-reactodia/owl-rdfs-settings.js +195 -0
- package/dist/esm/graphwise-reactodia.entry.js +28519 -41232
- package/dist/esm/graphwise-reactodia.js +3 -3
- package/dist/esm/{index-Cypw7ydc.js → index-DpCR6zMg.js} +16 -1
- package/dist/esm/index.js +7 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/node-action-fwJ3Zupw.js +94 -0
- package/dist/graphwise-reactodia/graphwise-reactodia.esm.js +1 -1
- package/dist/graphwise-reactodia/index.esm.js +1 -0
- package/dist/graphwise-reactodia/p-DpCR6zMg.js +2 -0
- package/dist/graphwise-reactodia/p-c3d8a69a.entry.js +1 -0
- package/dist/graphwise-reactodia/p-fwJ3Zupw.js +1 -0
- package/dist/types/components/graphwise-reactodia/graphwise-reactodia.d.ts +44 -16
- package/dist/types/components/graphwise-reactodia/i18n/language-key.d.ts +4 -0
- package/dist/types/components/graphwise-reactodia/i18n/translations.d.ts +2 -343
- package/dist/types/components/graphwise-reactodia/menu/export-diagram-action.d.ts +4 -0
- package/dist/types/components/graphwise-reactodia/menu/graphwise-menu.d.ts +6 -0
- package/dist/types/components/graphwise-reactodia/menu/import-diagram-action.d.ts +4 -0
- package/dist/types/components/graphwise-reactodia/models/clear-diagram-storage-event.d.ts +5 -0
- package/dist/types/components/graphwise-reactodia/models/error/error-cause.d.ts +10 -0
- package/dist/types/components/graphwise-reactodia/models/error/error-code.d.ts +19 -0
- package/dist/types/components/graphwise-reactodia/models/error/error-report.d.ts +13 -0
- package/dist/types/components/graphwise-reactodia/models/event/event-callback.d.ts +5 -0
- package/dist/types/components/graphwise-reactodia/models/event/event-detail.d.ts +55 -0
- package/dist/types/components/graphwise-reactodia/models/event/event-type.d.ts +7 -0
- package/dist/types/components/graphwise-reactodia/models/reactodia-app-props.d.ts +20 -15
- package/dist/types/components/graphwise-reactodia/models/reactodia-config.d.ts +36 -0
- package/dist/types/components/graphwise-reactodia/models/sparql/sparql-query-function.d.ts +6 -0
- package/dist/types/components/graphwise-reactodia/models/sparql/sparql-query-params.d.ts +12 -0
- package/dist/types/components/graphwise-reactodia/models/subscription-list.d.ts +26 -0
- package/dist/types/components/graphwise-reactodia/models/subscription.d.ts +4 -0
- package/dist/types/components/graphwise-reactodia/models/triple.d.ts +19 -0
- package/dist/types/components/graphwise-reactodia/models/ui/menu-config.d.ts +8 -0
- package/dist/types/components/graphwise-reactodia/models/ui/menu-item.d.ts +17 -0
- package/dist/types/components/graphwise-reactodia/models/ui/node-action.d.ts +21 -0
- package/dist/types/components/graphwise-reactodia/models/ui/resolved-toolbar-position.d.ts +8 -0
- package/dist/types/components/graphwise-reactodia/models/ui/resolved-ui-config.d.ts +12 -0
- package/dist/types/components/graphwise-reactodia/models/ui/toolbar-dock.d.ts +13 -0
- package/dist/types/components/graphwise-reactodia/models/ui/toolbar-position.d.ts +11 -0
- package/dist/types/components/graphwise-reactodia/models/ui/ui-config.d.ts +17 -0
- package/dist/types/components/graphwise-reactodia/node-action/node-actions.d.ts +6 -0
- package/dist/types/components/graphwise-reactodia/providers/service/service-inject.d.ts +13 -0
- package/dist/types/components/graphwise-reactodia/providers/service/service.d.ts +28 -0
- package/dist/types/components/graphwise-reactodia/providers/service/service.provider.d.ts +16 -0
- package/dist/types/components/graphwise-reactodia/reactodia-app.d.ts +3 -2
- package/dist/types/components/graphwise-reactodia/services/diagram/diagram.service.d.ts +36 -0
- package/dist/types/components/graphwise-reactodia/services/diagram-file/diagram-file.service.d.ts +24 -0
- package/dist/types/components/graphwise-reactodia/services/diagram-storage/diagram-storage.service.d.ts +27 -0
- package/dist/types/components/graphwise-reactodia/services/error/error.service.d.ts +41 -0
- package/dist/types/components/graphwise-reactodia/services/event/event.service.d.ts +30 -0
- package/dist/types/components/graphwise-reactodia/services/window/window.service.d.ts +7 -0
- package/dist/types/components/graphwise-reactodia/styles/type-style.resolver.d.ts +11 -0
- package/dist/types/components/graphwise-reactodia/testing/storage.mock.d.ts +18 -0
- package/dist/types/components/graphwise-reactodia/ui-config/default-ui-config.d.ts +5 -0
- package/dist/types/components/graphwise-reactodia/ui-config/ui-config-mapper.d.ts +14 -0
- package/dist/types/components/graphwise-reactodia/utils/object-util.d.ts +15 -0
- package/dist/types/components.d.ts +60 -27
- package/dist/types/index.d.ts +15 -1
- package/package.json +39 -10
- package/dist/graphwise-reactodia/p-Cypw7ydc.js +0 -2
- package/dist/graphwise-reactodia/p-bafd6be5.entry.js +0 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// A copy of Reactodia's `OwlRdfsSettings` preset (`src/data/sparql/sparqlDataProviderSettings.ts` in the
|
|
2
|
+
// reactodia-workspace fork), which the demo page passes to the wrapper as its `providerSettings`. The wrapper
|
|
3
|
+
// requires the host to pass the settings, and this plain script can't import them from `@reactodia/workspace`.
|
|
4
|
+
// Keep it in sync with the fork: `RDF_SETTINGS` mirrors `RdfSettings`, `OWL_RDFS_SETTINGS_OVERRIDE` mirrors
|
|
5
|
+
// `OwlRdfsSettingsOverride`.
|
|
6
|
+
|
|
7
|
+
const RDF_SETTINGS = {
|
|
8
|
+
linkConfigurations: [],
|
|
9
|
+
openWorldLinks: false,
|
|
10
|
+
|
|
11
|
+
propertyConfigurations: [],
|
|
12
|
+
openWorldProperties: false,
|
|
13
|
+
|
|
14
|
+
linksInfoQuery: `SELECT ?source ?type ?target
|
|
15
|
+
WHERE {
|
|
16
|
+
\${linkConfigurations}
|
|
17
|
+
VALUES (?source) {\${sourceIris}}
|
|
18
|
+
VALUES (?target) {\${targetIris}}
|
|
19
|
+
}`,
|
|
20
|
+
|
|
21
|
+
defaultPrefix: '',
|
|
22
|
+
|
|
23
|
+
schemaLabelProperty: 'rdfs:label',
|
|
24
|
+
dataLabelProperty: 'rdfs:label',
|
|
25
|
+
|
|
26
|
+
fullTextSearch: {
|
|
27
|
+
prefix: '',
|
|
28
|
+
queryPattern: '',
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
classTreeQuery: '',
|
|
32
|
+
|
|
33
|
+
classInfoQuery:
|
|
34
|
+
`SELECT ?class ?label ?instcount WHERE {
|
|
35
|
+
VALUES(?class) {\${ids}}
|
|
36
|
+
OPTIONAL {
|
|
37
|
+
?class \${schemaLabelProperty} ?label
|
|
38
|
+
\${labelLanguageFilter}
|
|
39
|
+
}
|
|
40
|
+
BIND("" as ?instcount)
|
|
41
|
+
}`,
|
|
42
|
+
|
|
43
|
+
linkTypesQuery:
|
|
44
|
+
`SELECT DISTINCT ?link ?instcount ?label WHERE {
|
|
45
|
+
\${linkTypesPattern}
|
|
46
|
+
OPTIONAL {
|
|
47
|
+
?link \${schemaLabelProperty} ?label
|
|
48
|
+
\${labelLanguageFilter}
|
|
49
|
+
}
|
|
50
|
+
}`,
|
|
51
|
+
|
|
52
|
+
linkTypesPattern: '',
|
|
53
|
+
|
|
54
|
+
linkTypesInfoQuery:
|
|
55
|
+
`SELECT ?link ?label WHERE {
|
|
56
|
+
VALUES(?link) {\${ids}}
|
|
57
|
+
OPTIONAL {
|
|
58
|
+
?link \${schemaLabelProperty} ?label
|
|
59
|
+
\${labelLanguageFilter}
|
|
60
|
+
}
|
|
61
|
+
}`,
|
|
62
|
+
|
|
63
|
+
propertyInfoQuery:
|
|
64
|
+
`SELECT ?property ?label WHERE {
|
|
65
|
+
VALUES(?property) {\${ids}}
|
|
66
|
+
OPTIONAL {
|
|
67
|
+
?property \${schemaLabelProperty} ?label
|
|
68
|
+
\${labelLanguageFilter}
|
|
69
|
+
}
|
|
70
|
+
}`,
|
|
71
|
+
|
|
72
|
+
elementInfoQuery: '',
|
|
73
|
+
imageQueryPattern: '',
|
|
74
|
+
|
|
75
|
+
linkTypesOfQuery: '',
|
|
76
|
+
linkTypesStatisticsQuery: '',
|
|
77
|
+
|
|
78
|
+
lookupQuery:
|
|
79
|
+
`SELECT \${outerProjection} WHERE {
|
|
80
|
+
\${filterInnerPrelude}
|
|
81
|
+
{
|
|
82
|
+
SELECT DISTINCT \${innerProjection} WHERE {
|
|
83
|
+
\${filterByType}
|
|
84
|
+
\${filterByRefElementLink}
|
|
85
|
+
\${filterByText}
|
|
86
|
+
\${filterAdditionalRestriction}
|
|
87
|
+
} \${orderBy} \${limit}
|
|
88
|
+
}
|
|
89
|
+
\${queryTypes}
|
|
90
|
+
\${queryElementInfo}
|
|
91
|
+
} \${orderBy}`,
|
|
92
|
+
|
|
93
|
+
filterRefElementLinkPattern: '',
|
|
94
|
+
filterTypePattern: '',
|
|
95
|
+
filterAdditionalRestriction: '',
|
|
96
|
+
filterElementInfoPattern: '',
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const OWL_RDFS_SETTINGS_OVERRIDE = {
|
|
100
|
+
defaultPrefix:
|
|
101
|
+
`PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
|
102
|
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
103
|
+
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
|
104
|
+
`,
|
|
105
|
+
schemaLabelProperty: 'rdfs:label',
|
|
106
|
+
dataLabelProperty: 'rdfs:label',
|
|
107
|
+
fullTextSearch: {
|
|
108
|
+
prefix: '',
|
|
109
|
+
queryPattern:
|
|
110
|
+
`?inst \${dataLabelProperty} ?search1
|
|
111
|
+
FILTER regex(COALESCE(str(?search1)), "\${text}", "i")
|
|
112
|
+
BIND(0 as ?score)
|
|
113
|
+
`,
|
|
114
|
+
extractLabel: true,
|
|
115
|
+
},
|
|
116
|
+
classTreeQuery: `
|
|
117
|
+
SELECT ?class ?label ?parent
|
|
118
|
+
WHERE {
|
|
119
|
+
{
|
|
120
|
+
?class a rdfs:Class
|
|
121
|
+
} UNION {
|
|
122
|
+
?class a owl:Class
|
|
123
|
+
}
|
|
124
|
+
FILTER ISIRI(?class)
|
|
125
|
+
OPTIONAL {
|
|
126
|
+
?class rdfs:label ?label
|
|
127
|
+
\${labelLanguageFilter}
|
|
128
|
+
}
|
|
129
|
+
OPTIONAL {?class rdfs:subClassOf ?parent. FILTER ISIRI(?parent)}
|
|
130
|
+
}
|
|
131
|
+
`,
|
|
132
|
+
|
|
133
|
+
// todo: think more, maybe add a limit here?
|
|
134
|
+
linkTypesPattern: `
|
|
135
|
+
{ ?link a rdf:Property }
|
|
136
|
+
UNION
|
|
137
|
+
{ ?link a owl:ObjectProperty }
|
|
138
|
+
BIND('' as ?instcount)
|
|
139
|
+
`,
|
|
140
|
+
elementInfoQuery: `
|
|
141
|
+
CONSTRUCT {
|
|
142
|
+
?inst <urn:reactodia:sparql:type> ?class .
|
|
143
|
+
?inst <urn:reactodia:sparql:label> ?label .
|
|
144
|
+
?inst ?propType ?propValue.
|
|
145
|
+
} WHERE {
|
|
146
|
+
VALUES (?inst) {\${ids}}
|
|
147
|
+
OPTIONAL { ?inst a ?class }
|
|
148
|
+
OPTIONAL {
|
|
149
|
+
?inst \${dataLabelProperty} ?label
|
|
150
|
+
\${labelLanguageFilter}
|
|
151
|
+
}
|
|
152
|
+
OPTIONAL {
|
|
153
|
+
\${propertyConfigurations}
|
|
154
|
+
FILTER (isLiteral(?propValue))
|
|
155
|
+
\${valueLanguageFilter}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
`,
|
|
159
|
+
imageQueryPattern: '{ ?inst ?linkType ?image } UNION { [] ?linkType ?inst. BIND(?inst as ?image) }',
|
|
160
|
+
linkTypesOfQuery: `
|
|
161
|
+
SELECT DISTINCT ?link ?direction
|
|
162
|
+
WHERE {
|
|
163
|
+
\${linkConfigurations}
|
|
164
|
+
}
|
|
165
|
+
`,
|
|
166
|
+
linkTypesStatisticsQuery: `
|
|
167
|
+
SELECT ?link ?outCount ?inCount
|
|
168
|
+
WHERE {
|
|
169
|
+
{
|
|
170
|
+
SELECT (\${linkId} as ?link) (count(?outObject) as ?outCount) WHERE {
|
|
171
|
+
\${linkConfigurationOut}
|
|
172
|
+
\${navigateElementFilterOut}
|
|
173
|
+
} LIMIT 101
|
|
174
|
+
} {
|
|
175
|
+
SELECT (\${linkId} as ?link) (count(?inObject) as ?inCount) WHERE {
|
|
176
|
+
\${linkConfigurationIn}
|
|
177
|
+
\${navigateElementFilterIn}
|
|
178
|
+
} LIMIT 101
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
`,
|
|
182
|
+
filterRefElementLinkPattern: '',
|
|
183
|
+
filterTypePattern: '?inst a ?instType. ?instType rdfs:subClassOf* ?class',
|
|
184
|
+
filterElementInfoPattern: `
|
|
185
|
+
OPTIONAL {?inst rdf:type ?foundClass}
|
|
186
|
+
BIND (coalesce(?foundClass, owl:Thing) as ?class)
|
|
187
|
+
OPTIONAL {
|
|
188
|
+
?inst \${dataLabelProperty} ?label
|
|
189
|
+
\${labelLanguageFilter}
|
|
190
|
+
}
|
|
191
|
+
`,
|
|
192
|
+
filterAdditionalRestriction: '',
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
const OWL_RDFS_SETTINGS = {...RDF_SETTINGS, ...OWL_RDFS_SETTINGS_OVERRIDE};
|