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.
Files changed (117) hide show
  1. package/COPYING +674 -0
  2. package/COPYING.LESSER +165 -0
  3. package/NOTICE +41 -0
  4. package/README.md +225 -1
  5. package/dist/cjs/graphwise-reactodia.cjs.entry.js +28519 -41232
  6. package/dist/cjs/graphwise-reactodia.cjs.js +2 -2
  7. package/dist/cjs/{index-CII9aUQC.js → index-DtzCybH4.js} +16 -0
  8. package/dist/cjs/index.cjs.js +29 -0
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/node-action-DkJ5ct17.js +96 -0
  11. package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.css +57 -1
  12. package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.js +135 -40
  13. package/dist/collection/components/graphwise-reactodia/i18n/language-key.js +5 -0
  14. package/dist/collection/components/graphwise-reactodia/i18n/translations.js +6 -1
  15. package/dist/collection/components/graphwise-reactodia/menu/export-diagram-action.js +19 -0
  16. package/dist/collection/components/graphwise-reactodia/menu/graphwise-menu.js +24 -0
  17. package/dist/collection/components/graphwise-reactodia/menu/import-diagram-action.js +31 -0
  18. package/dist/collection/components/graphwise-reactodia/models/clear-diagram-storage-event.js +5 -0
  19. package/dist/collection/components/graphwise-reactodia/models/error/error-cause.js +1 -0
  20. package/dist/collection/components/graphwise-reactodia/models/error/error-code.js +20 -0
  21. package/dist/collection/components/graphwise-reactodia/models/error/error-report.js +1 -0
  22. package/dist/collection/components/graphwise-reactodia/models/event/event-callback.js +1 -0
  23. package/dist/collection/components/graphwise-reactodia/models/event/event-detail.js +4 -0
  24. package/dist/collection/components/graphwise-reactodia/models/event/event-type.js +8 -0
  25. package/dist/collection/components/graphwise-reactodia/models/reactodia-config.js +1 -0
  26. package/dist/collection/components/graphwise-reactodia/models/sparql/sparql-query-function.js +1 -0
  27. package/dist/collection/components/graphwise-reactodia/models/sparql/sparql-query-params.js +1 -0
  28. package/dist/collection/components/graphwise-reactodia/models/subscription-list.js +35 -0
  29. package/dist/collection/components/graphwise-reactodia/models/subscription.js +1 -0
  30. package/dist/collection/components/graphwise-reactodia/models/triple.js +1 -0
  31. package/dist/collection/components/graphwise-reactodia/models/ui/menu-config.js +1 -0
  32. package/dist/collection/components/graphwise-reactodia/models/ui/menu-item.js +18 -0
  33. package/dist/collection/components/graphwise-reactodia/models/ui/node-action.js +22 -0
  34. package/dist/collection/components/graphwise-reactodia/models/ui/resolved-toolbar-position.js +1 -0
  35. package/dist/collection/components/graphwise-reactodia/models/ui/resolved-ui-config.js +1 -0
  36. package/dist/collection/components/graphwise-reactodia/models/ui/toolbar-dock.js +14 -0
  37. package/dist/collection/components/graphwise-reactodia/models/ui/toolbar-position.js +1 -0
  38. package/dist/collection/components/graphwise-reactodia/models/ui/ui-config.js +1 -0
  39. package/dist/collection/components/graphwise-reactodia/node-action/node-actions.js +22 -0
  40. package/dist/collection/components/graphwise-reactodia/providers/service/service-inject.js +15 -0
  41. package/dist/collection/components/graphwise-reactodia/providers/service/service.js +19 -0
  42. package/dist/collection/components/graphwise-reactodia/providers/service/service.provider.js +20 -0
  43. package/dist/collection/components/graphwise-reactodia/reactodia-app.js +188 -26
  44. package/dist/collection/components/graphwise-reactodia/services/diagram/diagram.service.js +71 -0
  45. package/dist/collection/components/graphwise-reactodia/services/diagram-file/diagram-file.service.js +68 -0
  46. package/dist/collection/components/graphwise-reactodia/services/diagram-storage/diagram-storage.service.js +71 -0
  47. package/dist/collection/components/graphwise-reactodia/services/error/error.service.js +78 -0
  48. package/dist/collection/components/graphwise-reactodia/services/event/event.service.js +58 -0
  49. package/dist/collection/components/graphwise-reactodia/services/window/window.service.js +24 -0
  50. package/dist/collection/components/graphwise-reactodia/styles/type-style.resolver.js +52 -0
  51. package/dist/collection/components/graphwise-reactodia/testing/storage.mock.js +35 -0
  52. package/dist/collection/components/graphwise-reactodia/ui-config/default-ui-config.js +30 -0
  53. package/dist/collection/components/graphwise-reactodia/ui-config/ui-config-mapper.js +51 -0
  54. package/dist/collection/components/graphwise-reactodia/utils/object-util.js +30 -0
  55. package/dist/collection/index.js +7 -1
  56. package/dist/collection/pages/graphwise-reactodia/main.js +157 -0
  57. package/dist/collection/pages/graphwise-reactodia/owl-rdfs-settings.js +195 -0
  58. package/dist/esm/graphwise-reactodia.entry.js +28519 -41232
  59. package/dist/esm/graphwise-reactodia.js +3 -3
  60. package/dist/esm/{index-Cypw7ydc.js → index-DpCR6zMg.js} +16 -1
  61. package/dist/esm/index.js +7 -0
  62. package/dist/esm/loader.js +3 -3
  63. package/dist/esm/node-action-fwJ3Zupw.js +94 -0
  64. package/dist/graphwise-reactodia/graphwise-reactodia.esm.js +1 -1
  65. package/dist/graphwise-reactodia/index.esm.js +1 -0
  66. package/dist/graphwise-reactodia/p-DpCR6zMg.js +2 -0
  67. package/dist/graphwise-reactodia/p-c3d8a69a.entry.js +1 -0
  68. package/dist/graphwise-reactodia/p-fwJ3Zupw.js +1 -0
  69. package/dist/types/components/graphwise-reactodia/graphwise-reactodia.d.ts +44 -16
  70. package/dist/types/components/graphwise-reactodia/i18n/language-key.d.ts +4 -0
  71. package/dist/types/components/graphwise-reactodia/i18n/translations.d.ts +2 -343
  72. package/dist/types/components/graphwise-reactodia/menu/export-diagram-action.d.ts +4 -0
  73. package/dist/types/components/graphwise-reactodia/menu/graphwise-menu.d.ts +6 -0
  74. package/dist/types/components/graphwise-reactodia/menu/import-diagram-action.d.ts +4 -0
  75. package/dist/types/components/graphwise-reactodia/models/clear-diagram-storage-event.d.ts +5 -0
  76. package/dist/types/components/graphwise-reactodia/models/error/error-cause.d.ts +10 -0
  77. package/dist/types/components/graphwise-reactodia/models/error/error-code.d.ts +19 -0
  78. package/dist/types/components/graphwise-reactodia/models/error/error-report.d.ts +13 -0
  79. package/dist/types/components/graphwise-reactodia/models/event/event-callback.d.ts +5 -0
  80. package/dist/types/components/graphwise-reactodia/models/event/event-detail.d.ts +55 -0
  81. package/dist/types/components/graphwise-reactodia/models/event/event-type.d.ts +7 -0
  82. package/dist/types/components/graphwise-reactodia/models/reactodia-app-props.d.ts +20 -15
  83. package/dist/types/components/graphwise-reactodia/models/reactodia-config.d.ts +36 -0
  84. package/dist/types/components/graphwise-reactodia/models/sparql/sparql-query-function.d.ts +6 -0
  85. package/dist/types/components/graphwise-reactodia/models/sparql/sparql-query-params.d.ts +12 -0
  86. package/dist/types/components/graphwise-reactodia/models/subscription-list.d.ts +26 -0
  87. package/dist/types/components/graphwise-reactodia/models/subscription.d.ts +4 -0
  88. package/dist/types/components/graphwise-reactodia/models/triple.d.ts +19 -0
  89. package/dist/types/components/graphwise-reactodia/models/ui/menu-config.d.ts +8 -0
  90. package/dist/types/components/graphwise-reactodia/models/ui/menu-item.d.ts +17 -0
  91. package/dist/types/components/graphwise-reactodia/models/ui/node-action.d.ts +21 -0
  92. package/dist/types/components/graphwise-reactodia/models/ui/resolved-toolbar-position.d.ts +8 -0
  93. package/dist/types/components/graphwise-reactodia/models/ui/resolved-ui-config.d.ts +12 -0
  94. package/dist/types/components/graphwise-reactodia/models/ui/toolbar-dock.d.ts +13 -0
  95. package/dist/types/components/graphwise-reactodia/models/ui/toolbar-position.d.ts +11 -0
  96. package/dist/types/components/graphwise-reactodia/models/ui/ui-config.d.ts +17 -0
  97. package/dist/types/components/graphwise-reactodia/node-action/node-actions.d.ts +6 -0
  98. package/dist/types/components/graphwise-reactodia/providers/service/service-inject.d.ts +13 -0
  99. package/dist/types/components/graphwise-reactodia/providers/service/service.d.ts +28 -0
  100. package/dist/types/components/graphwise-reactodia/providers/service/service.provider.d.ts +16 -0
  101. package/dist/types/components/graphwise-reactodia/reactodia-app.d.ts +3 -2
  102. package/dist/types/components/graphwise-reactodia/services/diagram/diagram.service.d.ts +36 -0
  103. package/dist/types/components/graphwise-reactodia/services/diagram-file/diagram-file.service.d.ts +24 -0
  104. package/dist/types/components/graphwise-reactodia/services/diagram-storage/diagram-storage.service.d.ts +27 -0
  105. package/dist/types/components/graphwise-reactodia/services/error/error.service.d.ts +41 -0
  106. package/dist/types/components/graphwise-reactodia/services/event/event.service.d.ts +30 -0
  107. package/dist/types/components/graphwise-reactodia/services/window/window.service.d.ts +7 -0
  108. package/dist/types/components/graphwise-reactodia/styles/type-style.resolver.d.ts +11 -0
  109. package/dist/types/components/graphwise-reactodia/testing/storage.mock.d.ts +18 -0
  110. package/dist/types/components/graphwise-reactodia/ui-config/default-ui-config.d.ts +5 -0
  111. package/dist/types/components/graphwise-reactodia/ui-config/ui-config-mapper.d.ts +14 -0
  112. package/dist/types/components/graphwise-reactodia/utils/object-util.d.ts +15 -0
  113. package/dist/types/components.d.ts +60 -27
  114. package/dist/types/index.d.ts +15 -1
  115. package/package.json +39 -10
  116. package/dist/graphwise-reactodia/p-Cypw7ydc.js +0 -2
  117. 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};