Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dim-search
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Dec 30, 2024
2 parents 15a8d6b + cdfe35e commit d7be4e6
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-coats-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cube-creator/shared-dimensions-api": minor
---

Added I14Y properties to Shared Dimensions (re https://gitlab.ldbar.ch/zazuko/misc/-/issues/195)
2 changes: 1 addition & 1 deletion apis/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"jwks-rsa": "^3.0.0",
"merge2": "^1.4.1",
"middleware-async": "^1.2.7",
"nanoid": "^3.1.16",
"nanoid": "^3.3.8",
"node-fetch": "^2.6.1",
"once": "^1.4.0",
"parse-prefer-header": "^1.0.0",
Expand Down
45 changes: 43 additions & 2 deletions apis/shared-dimensions/lib/shapes/shared-dimension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import { editor, iso6391, md, meta, sh1 } from '@cube-creator/core/namespace'
import { fromPointer as nodeShape } from '@rdfine/shacl/lib/NodeShape'
import { fromPointer as propertyGroup } from '@rdfine/shacl/lib/PropertyGroup'
import { fromPointer as resource } from '@rdfine/rdfs/lib/Resource'
import { owl } from '@tpluscode/rdf-ns-builders'
import { dcat, owl } from '@tpluscode/rdf-ns-builders'

const defaultGroup = $rdf.namedNode('#default-group')
const i14yGroup = $rdf.namedNode('#i14y-group')
const datatypeUri = [xsd.anyURI, ['URI']]

const commonProperties = [
Expand All @@ -21,6 +22,46 @@ const commonProperties = [
schema.multipleValues,
]

const i14yProperties = [{
name: 'Identifier',
path: schema.identifier,
order: 10,
datatype: xsd.string,
maxCount: 1,
group: propertyGroup(i14yGroup, {
label: 'I14Y',
}),
}, {
name: 'Version',
path: schema.version,
order: 20,
datatype: xsd.string,
maxCount: 1,
pattern: '^\\d+(\\.\\d+(\\.\\d+)?)?$',
group: i14yGroup,
message: 'Version must be one of the formats: x, x.y, x.y.z',
}, {
name: 'Themes',
path: dcat.theme,
order: 30,
nodeKind: sh.IRI,
editor: dash.URIEditor,
group: i14yGroup,
}, {
name: 'Keywords',
path: dcat.keyword,
order: 40,
nodeKind: sh.Literal,
group: i14yGroup,
}, {
name: 'Conforms to',
path: dcterms.conformsTo,
order: 50,
nodeKind: sh.IRI,
editor: dash.URIEditor,
group: i14yGroup,
}]

const properties: Initializer<PropertyShape>[] = [{
name: 'Name',
path: schema.name,
Expand Down Expand Up @@ -320,7 +361,7 @@ const properties: Initializer<PropertyShape>[] = [{
maxCount: 1,
}],
},
}]
}, ...i14yProperties]

export const create = (): Initializer<NodeShape> => ({
[sh1.xoneDiscriminator.value]: md.createAs,
Expand Down
16 changes: 16 additions & 0 deletions apis/shared-dimensions/lib/store/shapes.ttl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX dcterm: <http://purl.org/dc/terms/>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX qudt: <http://qudt.org/schema/qudt/>
Expand Down Expand Up @@ -27,6 +28,21 @@ PREFIX sh: <http://www.w3.org/ns/shacl#>
[
sh:path schema:alternateName ;
],
[
sh:path schema:identifier ;
],
[
sh:path schema:version ;
],
[
sh:path dcat:theme ;
],
[
sh:path dcat:keyword ;
],
[
sh:path dcterm:conformsTo ;
],
[
sh:path sh:property ;
sh:node
Expand Down
2 changes: 1 addition & 1 deletion apis/shared-dimensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"hydra-box-middleware-shacl": "1.1.0",
"is-graph-pointer": "^1.2.2",
"middleware-async": "^1.2.7",
"nanoid": "^3.1.23",
"nanoid": "^3.3.8",
"once": "^1.4.0",
"onetime": "^5",
"parse-prefer-header": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"iso8601-duration": "^1.3.0",
"merge2": "^1.4.1",
"middleware-async": "^1.2.7",
"nanoid": "^3.1.20",
"nanoid": "^3.3.8",
"nanoid-dictionary": "^4.2.0",
"node-fetch": "^2.6.1",
"null-writable": "^1.0.5",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/forms/editors/TagsWithLanguageEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script lang="ts">
import { defineComponent, PropType } from 'vue'
import { PropertyState } from '@hydrofoil/shaperone-core/models/forms'
import $rdf from '@rdfjs/data-model'
import $rdf from '@rdf-esm/data-model'
import type { Literal, Term } from '@rdfjs/types'
export default defineComponent({
Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/ResourcePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import { defineComponent, ref, Ref } from 'vue'
import { mapState } from 'vuex'
import { useRoute } from 'vue-router'
import $rdf from '@rdfjs/data-model'
import $rdf from '@rdf-esm/data-model'
import type { NamedNode, Term } from '@rdfjs/types'
import TermSet from '@rdf-esm/term-set'
import RdfResource from '@tpluscode/rdfine/RdfResource'
Expand Down
38 changes: 34 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11500,11 +11500,16 @@ nanoid-dictionary@^4.2.0:
resolved "https://registry.yarnpkg.com/nanoid-dictionary/-/nanoid-dictionary-4.3.0.tgz#d4cefa1e4c06b1f576789eeb2646101f8c5419e8"
integrity sha512-Xw1+/QnRGWO1KJ0rLfU1xR85qXmAHyLbE3TUkklu9gOIDburP6CsUnLmTaNECGpBh5SHb2uPFmx0VT8UPyoeyw==

[email protected], nanoid@^3.1.16, nanoid@^3.1.20, nanoid@^3.1.23, nanoid@^3.3.1:
[email protected]:
version "3.3.3"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25"
integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==

nanoid@^3.3.1, nanoid@^3.3.8:
version "3.3.8"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf"
integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==

nanoid@^4, nanoid@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-4.0.0.tgz#6e144dee117609232c3f415c34b0e550e64999a5"
Expand Down Expand Up @@ -14282,7 +14287,7 @@ string-to-stream@^3.0.1:
dependencies:
readable-stream "^3.4.0"

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand All @@ -14299,6 +14304,15 @@ string-width@^2.1.1:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^5.0.0, string-width@^5.0.1, string-width@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
Expand Down Expand Up @@ -14368,7 +14382,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand All @@ -14382,6 +14396,13 @@ strip-ansi@^4.0.0:
dependencies:
ansi-regex "^3.0.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2"
Expand Down Expand Up @@ -15556,7 +15577,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -15582,6 +15603,15 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit d7be4e6

Please sign in to comment.