@startinblox/components-ds4go 2.2.1 → 2.2.2
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 +25 -0
- package/dist/index.js +105 -86
- package/package.json +1 -1
- package/src/components/solid-dsif-explorer-poc.ts +42 -7
package/README.md
CHANGED
|
@@ -150,6 +150,31 @@ config.json, components:
|
|
|
150
150
|
},
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
+
### Fetch all catalogs
|
|
154
|
+
|
|
155
|
+
config.json, components:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"type": "dsif-explorer-poc",
|
|
160
|
+
"parameters": {
|
|
161
|
+
"menu": {
|
|
162
|
+
"name": "DSIF Explorer",
|
|
163
|
+
"category": "none",
|
|
164
|
+
"icon": "mage-globe-fill"
|
|
165
|
+
},
|
|
166
|
+
"dataSrc": "https://poc.root-authority.dsif.eu/sectors",
|
|
167
|
+
"sectorId": "*",
|
|
168
|
+
"catalogId": "*"
|
|
169
|
+
},
|
|
170
|
+
"route": "dsif-explorer",
|
|
171
|
+
"integration": [
|
|
172
|
+
"menu",
|
|
173
|
+
"routing"
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
```
|
|
177
|
+
|
|
153
178
|
## DSP Connector
|
|
154
179
|
|
|
155
180
|
config.json, components:
|
package/dist/index.js
CHANGED
|
@@ -64,7 +64,7 @@ const { is: me, defineProperty: ge, getOwnPropertyDescriptor: ye, getOwnProperty
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
return r;
|
|
67
|
-
} }, ht = (e, t) => !me(e, t),
|
|
67
|
+
} }, ht = (e, t) => !me(e, t), It = { attribute: !0, type: String, converter: ot, reflect: !1, useDefault: !1, hasChanged: ht };
|
|
68
68
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), dt.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
69
69
|
let F = class extends HTMLElement {
|
|
70
70
|
static addInitializer(t) {
|
|
@@ -73,7 +73,7 @@ let F = class extends HTMLElement {
|
|
|
73
73
|
static get observedAttributes() {
|
|
74
74
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
75
75
|
}
|
|
76
|
-
static createProperty(t, r =
|
|
76
|
+
static createProperty(t, r = It) {
|
|
77
77
|
if (r.state && (r.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((r = Object.create(r)).wrapped = !0), this.elementProperties.set(t, r), !r.noAccessor) {
|
|
78
78
|
const i = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(t, i, r);
|
|
79
79
|
s !== void 0 && ge(this.prototype, t, s);
|
|
@@ -91,7 +91,7 @@ let F = class extends HTMLElement {
|
|
|
91
91
|
}, configurable: !0, enumerable: !0 };
|
|
92
92
|
}
|
|
93
93
|
static getPropertyOptions(t) {
|
|
94
|
-
return this.elementProperties.get(t) ??
|
|
94
|
+
return this.elementProperties.get(t) ?? It;
|
|
95
95
|
}
|
|
96
96
|
static _$Ei() {
|
|
97
97
|
if (this.hasOwnProperty(K("elementProperties"))) return;
|
|
@@ -248,9 +248,9 @@ let F = class extends HTMLElement {
|
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
250
|
F.elementStyles = [], F.shadowRootOptions = { mode: "open" }, F[K("elementProperties")] = /* @__PURE__ */ new Map(), F[K("finalized")] = /* @__PURE__ */ new Map(), we?.({ ReactiveElement: F }), (dt.reactiveElementVersions ??= []).push("2.1.2");
|
|
251
|
-
const Pt = globalThis,
|
|
251
|
+
const Pt = globalThis, Lt = (e) => e, nt = Pt.trustedTypes, Tt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Yt = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, te = "?" + x, Ae = `<${te}>`, L = document, G = () => L.createComment(""), J = (e) => e === null || typeof e != "object" && typeof e != "function", jt = Array.isArray, Ce = (e) => jt(e) || typeof e?.[Symbol.iterator] == "function", mt = `[
|
|
252
252
|
\f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ft = /-->/g, Nt = />/g, O = RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
|
|
253
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, Bt = /"/g, ee = /^(?:script|style|textarea|title)$/i, xe = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), d = xe(1), H = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), qt = /* @__PURE__ */ new WeakMap(), D =
|
|
253
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, Bt = /"/g, ee = /^(?:script|style|textarea|title)$/i, xe = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), d = xe(1), H = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), qt = /* @__PURE__ */ new WeakMap(), D = L.createTreeWalker(L, 129);
|
|
254
254
|
function re(e, t) {
|
|
255
255
|
if (!jt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
256
256
|
return Tt !== void 0 ? Tt.createHTML(t) : t;
|
|
@@ -260,10 +260,10 @@ const Se = (e, t) => {
|
|
|
260
260
|
let s, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = W;
|
|
261
261
|
for (let a = 0; a < r; a++) {
|
|
262
262
|
const l = e[a];
|
|
263
|
-
let
|
|
264
|
-
for (; b < l.length && (n.lastIndex = b, f = n.exec(l), f !== null); ) b = n.lastIndex, n === W ? f[1] === "!--" ? n = Ft : f[1] !== void 0 ? n = Nt : f[2] !== void 0 ? (ee.test(f[2]) && (s = RegExp("</" + f[2], "g")), n = O) : f[3] !== void 0 && (n = O) : n === O ? f[0] === ">" ? (n = s ?? W,
|
|
263
|
+
let u, f, p = -1, b = 0;
|
|
264
|
+
for (; b < l.length && (n.lastIndex = b, f = n.exec(l), f !== null); ) b = n.lastIndex, n === W ? f[1] === "!--" ? n = Ft : f[1] !== void 0 ? n = Nt : f[2] !== void 0 ? (ee.test(f[2]) && (s = RegExp("</" + f[2], "g")), n = O) : f[3] !== void 0 && (n = O) : n === O ? f[0] === ">" ? (n = s ?? W, p = -1) : f[1] === void 0 ? p = -2 : (p = n.lastIndex - f[2].length, u = f[1], n = f[3] === void 0 ? O : f[3] === '"' ? Bt : Mt) : n === Bt || n === Mt ? n = O : n === Ft || n === Nt ? n = W : (n = O, s = void 0);
|
|
265
265
|
const $ = n === O && e[a + 1].startsWith("/>") ? " " : "";
|
|
266
|
-
o += n === W ? l + Ae :
|
|
266
|
+
o += n === W ? l + Ae : p >= 0 ? (i.push(u), l.slice(0, p) + Yt + l.slice(p) + x + $) : l + x + (p === -2 ? a : $);
|
|
267
267
|
}
|
|
268
268
|
return [re(e, o + (e[r] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
269
269
|
};
|
|
@@ -272,35 +272,35 @@ class Z {
|
|
|
272
272
|
let s;
|
|
273
273
|
this.parts = [];
|
|
274
274
|
let o = 0, n = 0;
|
|
275
|
-
const a = t.length - 1, l = this.parts, [
|
|
276
|
-
if (this.el = Z.createElement(
|
|
277
|
-
const
|
|
278
|
-
|
|
275
|
+
const a = t.length - 1, l = this.parts, [u, f] = Se(t, r);
|
|
276
|
+
if (this.el = Z.createElement(u, i), D.currentNode = this.el.content, r === 2 || r === 3) {
|
|
277
|
+
const p = this.el.content.firstChild;
|
|
278
|
+
p.replaceWith(...p.childNodes);
|
|
279
279
|
}
|
|
280
280
|
for (; (s = D.nextNode()) !== null && l.length < a; ) {
|
|
281
281
|
if (s.nodeType === 1) {
|
|
282
|
-
if (s.hasAttributes()) for (const
|
|
283
|
-
const b = f[n++], $ = s.getAttribute(
|
|
284
|
-
l.push({ type: 1, index: o, name: rt[2], strings: $, ctor: rt[1] === "." ? je : rt[1] === "?" ? Ee : rt[1] === "@" ? Re : ut }), s.removeAttribute(
|
|
285
|
-
} else
|
|
282
|
+
if (s.hasAttributes()) for (const p of s.getAttributeNames()) if (p.endsWith(Yt)) {
|
|
283
|
+
const b = f[n++], $ = s.getAttribute(p).split(x), rt = /([.?@])?(.*)/.exec(b);
|
|
284
|
+
l.push({ type: 1, index: o, name: rt[2], strings: $, ctor: rt[1] === "." ? je : rt[1] === "?" ? Ee : rt[1] === "@" ? Re : ut }), s.removeAttribute(p);
|
|
285
|
+
} else p.startsWith(x) && (l.push({ type: 6, index: o }), s.removeAttribute(p));
|
|
286
286
|
if (ee.test(s.tagName)) {
|
|
287
|
-
const
|
|
287
|
+
const p = s.textContent.split(x), b = p.length - 1;
|
|
288
288
|
if (b > 0) {
|
|
289
289
|
s.textContent = nt ? nt.emptyScript : "";
|
|
290
|
-
for (let $ = 0; $ < b; $++) s.append(
|
|
291
|
-
s.append(
|
|
290
|
+
for (let $ = 0; $ < b; $++) s.append(p[$], G()), D.nextNode(), l.push({ type: 2, index: ++o });
|
|
291
|
+
s.append(p[b], G());
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
} else if (s.nodeType === 8) if (s.data === te) l.push({ type: 2, index: o });
|
|
295
295
|
else {
|
|
296
|
-
let
|
|
297
|
-
for (; (
|
|
296
|
+
let p = -1;
|
|
297
|
+
for (; (p = s.data.indexOf(x, p + 1)) !== -1; ) l.push({ type: 7, index: o }), p += x.length - 1;
|
|
298
298
|
}
|
|
299
299
|
o++;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
static createElement(t, r) {
|
|
303
|
-
const i =
|
|
303
|
+
const i = L.createElement("template");
|
|
304
304
|
return i.innerHTML = t, i;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
@@ -321,17 +321,17 @@ class Pe {
|
|
|
321
321
|
return this._$AM._$AU;
|
|
322
322
|
}
|
|
323
323
|
u(t) {
|
|
324
|
-
const { el: { content: r }, parts: i } = this._$AD, s = (t?.creationScope ??
|
|
324
|
+
const { el: { content: r }, parts: i } = this._$AD, s = (t?.creationScope ?? L).importNode(r, !0);
|
|
325
325
|
D.currentNode = s;
|
|
326
326
|
let o = D.nextNode(), n = 0, a = 0, l = i[0];
|
|
327
327
|
for (; l !== void 0; ) {
|
|
328
328
|
if (n === l.index) {
|
|
329
|
-
let
|
|
330
|
-
l.type === 2 ?
|
|
329
|
+
let u;
|
|
330
|
+
l.type === 2 ? u = new tt(o, o.nextSibling, this, t) : l.type === 1 ? u = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (u = new Ue(o, this, t)), this._$AV.push(u), l = i[++a];
|
|
331
331
|
}
|
|
332
332
|
n !== l?.index && (o = D.nextNode(), n++);
|
|
333
333
|
}
|
|
334
|
-
return D.currentNode =
|
|
334
|
+
return D.currentNode = L, s;
|
|
335
335
|
}
|
|
336
336
|
p(t) {
|
|
337
337
|
let r = 0;
|
|
@@ -366,7 +366,7 @@ class tt {
|
|
|
366
366
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
367
367
|
}
|
|
368
368
|
_(t) {
|
|
369
|
-
this._$AH !== c && J(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
369
|
+
this._$AH !== c && J(this._$AH) ? this._$AA.nextSibling.data = t : this.T(L.createTextNode(t)), this._$AH = t;
|
|
370
370
|
}
|
|
371
371
|
$(t) {
|
|
372
372
|
const { values: r, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = Z.createElement(re(i.h, i.h[0]), this.options)), i);
|
|
@@ -389,8 +389,8 @@ class tt {
|
|
|
389
389
|
}
|
|
390
390
|
_$AR(t = this._$AA.nextSibling, r) {
|
|
391
391
|
for (this._$AP?.(!1, !0, r); t !== this._$AB; ) {
|
|
392
|
-
const i =
|
|
393
|
-
|
|
392
|
+
const i = Lt(t).nextSibling;
|
|
393
|
+
Lt(t).remove(), t = i;
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
setConnected(t) {
|
|
@@ -413,8 +413,8 @@ class ut {
|
|
|
413
413
|
if (o === void 0) t = z(this, t, r, 0), n = !J(t) || t !== this._$AH && t !== H, n && (this._$AH = t);
|
|
414
414
|
else {
|
|
415
415
|
const a = t;
|
|
416
|
-
let l,
|
|
417
|
-
for (t = o[0], l = 0; l < o.length - 1; l++)
|
|
416
|
+
let l, u;
|
|
417
|
+
for (t = o[0], l = 0; l < o.length - 1; l++) u = z(this, a[i + l], r, l), u === H && (u = this._$AH[l]), n ||= !J(u) || u !== this._$AH[l], u === c ? t = c : t !== c && (t += (u ?? "") + o[l + 1]), this._$AH[l] = u;
|
|
418
418
|
}
|
|
419
419
|
n && !s && this.j(t);
|
|
420
420
|
}
|
|
@@ -500,7 +500,7 @@ q._$litElement$ = !0, q.finalized = !0, Et.litElementHydrateSupport?.({ LitEleme
|
|
|
500
500
|
const De = Et.litElementPolyfillSupport;
|
|
501
501
|
De?.({ LitElement: q });
|
|
502
502
|
(Et.litElementVersions ??= []).push("4.2.2");
|
|
503
|
-
class
|
|
503
|
+
class Ie extends q {
|
|
504
504
|
constructor() {
|
|
505
505
|
super(...arguments), this.object = {
|
|
506
506
|
"@id": ""
|
|
@@ -515,7 +515,7 @@ const V = (e) => (t, r) => {
|
|
|
515
515
|
customElements.define(e, t);
|
|
516
516
|
}) : customElements.define(e, t);
|
|
517
517
|
};
|
|
518
|
-
const
|
|
518
|
+
const Le = { attribute: !0, type: String, converter: ot, reflect: !1, hasChanged: ht }, Te = (e = Le, t, r) => {
|
|
519
519
|
const { kind: i, metadata: s } = r;
|
|
520
520
|
let o = globalThis.litPropertyMetadata.get(s);
|
|
521
521
|
if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(r.name, e), i === "accessor") {
|
|
@@ -784,9 +784,9 @@ class qe {
|
|
|
784
784
|
const l = {
|
|
785
785
|
"@type": r.itemType
|
|
786
786
|
};
|
|
787
|
-
for (const [
|
|
788
|
-
const
|
|
789
|
-
|
|
787
|
+
for (const [u, f] of Object.entries(r.itemFields)) {
|
|
788
|
+
const p = f(n, a, i);
|
|
789
|
+
p !== void 0 && (l[u] = p);
|
|
790
790
|
}
|
|
791
791
|
return l;
|
|
792
792
|
});
|
|
@@ -1184,8 +1184,8 @@ class C extends v {
|
|
|
1184
1184
|
try {
|
|
1185
1185
|
const a = await this.storeService.getCatalog(n.address);
|
|
1186
1186
|
if (a?.["dcat:dataset"]) {
|
|
1187
|
-
const l = a["dcat:dataset"],
|
|
1188
|
-
return
|
|
1187
|
+
const l = a["dcat:dataset"], u = Array.isArray(l) ? l : [l], f = a.participantId || a["edc:participantId"] || a["https://w3id.org/edc/v0.0.1/ns/participantId"], p = n.participantId || f;
|
|
1188
|
+
return u.map((b) => {
|
|
1189
1189
|
const $ = {
|
|
1190
1190
|
temsServiceBase: t,
|
|
1191
1191
|
temsCategoryBase: t.replace(
|
|
@@ -1201,7 +1201,7 @@ class C extends v {
|
|
|
1201
1201
|
providerName: n.name,
|
|
1202
1202
|
providerAddress: n.address,
|
|
1203
1203
|
providerColor: n.color,
|
|
1204
|
-
providerParticipantId:
|
|
1204
|
+
providerParticipantId: p
|
|
1205
1205
|
};
|
|
1206
1206
|
return r.map(b, $);
|
|
1207
1207
|
});
|
|
@@ -1401,8 +1401,8 @@ const bt = (e, t, r, i) => {
|
|
|
1401
1401
|
a = null;
|
|
1402
1402
|
break;
|
|
1403
1403
|
}
|
|
1404
|
-
let
|
|
1405
|
-
return a && (
|
|
1404
|
+
let u = 0;
|
|
1405
|
+
return a && (u = $t(a, i)), { obj: n, score: u };
|
|
1406
1406
|
}).filter((n) => n.score > 0);
|
|
1407
1407
|
return o.sort((n, a) => a.score - n.score), o.map((n) => n.obj);
|
|
1408
1408
|
}, Qe = (e, t) => t ? e.filter((r) => {
|
|
@@ -1461,7 +1461,7 @@ const bt = (e, t, r, i) => {
|
|
|
1461
1461
|
else
|
|
1462
1462
|
throw new TypeError(`Unsupported data type for key "${t}"`);
|
|
1463
1463
|
return r === "asc" ? a : -a;
|
|
1464
|
-
}),
|
|
1464
|
+
}), I = (e, t = {
|
|
1465
1465
|
day: "2-digit",
|
|
1466
1466
|
month: "2-digit",
|
|
1467
1467
|
year: "2-digit"
|
|
@@ -1496,11 +1496,11 @@ const sr = (e, ...t) => ({
|
|
|
1496
1496
|
return i;
|
|
1497
1497
|
};
|
|
1498
1498
|
const ne = ((e) => ir(e) ? oe(e.strings, e.values) : e);
|
|
1499
|
-
let
|
|
1499
|
+
let h = ne, Kt = !1;
|
|
1500
1500
|
function or(e) {
|
|
1501
1501
|
if (Kt)
|
|
1502
1502
|
throw new Error("lit-localize can only be configured once");
|
|
1503
|
-
|
|
1503
|
+
h = e, Kt = !0;
|
|
1504
1504
|
}
|
|
1505
1505
|
class nr {
|
|
1506
1506
|
constructor(t) {
|
|
@@ -1535,8 +1535,8 @@ for (let e = 0; e < 256; e++)
|
|
|
1535
1535
|
A[e] = (e >> 4 & 15).toString(16) + (e & 15).toString(16);
|
|
1536
1536
|
function dr(e) {
|
|
1537
1537
|
let t = 0, r = 8997, i = 0, s = 33826, o = 0, n = 40164, a = 0, l = 52210;
|
|
1538
|
-
for (let
|
|
1539
|
-
r ^= e.charCodeAt(
|
|
1538
|
+
for (let u = 0; u < e.length; u++)
|
|
1539
|
+
r ^= e.charCodeAt(u), t = r * 435, i = s * 435, o = n * 435, a = l * 435, o += r << 8, a += s << 8, i += t >>> 16, r = t & 65535, o += i >>> 16, s = i & 65535, l = a + (o >>> 16) & 65535, n = o & 65535;
|
|
1540
1540
|
return A[l >> 8] + A[l & 255] + A[n >> 8] + A[n & 255] + A[s >> 8] + A[s & 255] + A[r >> 8] + A[r & 255];
|
|
1541
1541
|
}
|
|
1542
1542
|
const hr = "", ur = "h", pr = "s";
|
|
@@ -1693,7 +1693,7 @@ let X = class extends Rt {
|
|
|
1693
1693
|
${this._displayObjects.map((e) => {
|
|
1694
1694
|
const t = [
|
|
1695
1695
|
{
|
|
1696
|
-
name: `${e.facts.length} ${e.facts.length > 1 ?
|
|
1696
|
+
name: `${e.facts.length} ${e.facts.length > 1 ? h("facts") : h("fact")}`,
|
|
1697
1697
|
type: "information"
|
|
1698
1698
|
}
|
|
1699
1699
|
];
|
|
@@ -1743,7 +1743,7 @@ var Ar = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, de = (e, t
|
|
|
1743
1743
|
(n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
1744
1744
|
return i && s && Ar(t, r, s), s;
|
|
1745
1745
|
};
|
|
1746
|
-
let lt = class extends
|
|
1746
|
+
let lt = class extends Ie {
|
|
1747
1747
|
constructor() {
|
|
1748
1748
|
super(...arguments), this.object = { "@id": "" };
|
|
1749
1749
|
}
|
|
@@ -1769,7 +1769,7 @@ let lt = class extends Le {
|
|
|
1769
1769
|
><div>${String(this.object.description)}</div></tems-division
|
|
1770
1770
|
>
|
|
1771
1771
|
<tems-division type="h4"
|
|
1772
|
-
><div>${
|
|
1772
|
+
><div>${h("All facts in this bundle")}</div></tems-division
|
|
1773
1773
|
>
|
|
1774
1774
|
<div class="card-grid card-grid-vertical">
|
|
1775
1775
|
${this.object.facts.map((e) => {
|
|
@@ -1780,7 +1780,7 @@ let lt = class extends Le {
|
|
|
1780
1780
|
if (t.length > 3) {
|
|
1781
1781
|
const r = t.length - 3;
|
|
1782
1782
|
t.splice(3, r), t.push({
|
|
1783
|
-
name: `+${r} ${
|
|
1783
|
+
name: `+${r} ${h("more")}`,
|
|
1784
1784
|
type: "information"
|
|
1785
1785
|
});
|
|
1786
1786
|
}
|
|
@@ -1796,10 +1796,10 @@ let lt = class extends Le {
|
|
|
1796
1796
|
<tems-division type="body-sm"
|
|
1797
1797
|
><div>
|
|
1798
1798
|
<div>
|
|
1799
|
-
${
|
|
1799
|
+
${h("Bundle created on")} ${String(this.object.created_at)}
|
|
1800
1800
|
</div>
|
|
1801
1801
|
<div>
|
|
1802
|
-
${
|
|
1802
|
+
${h("Bundle updated on")} ${String(this.object.updated_at)}
|
|
1803
1803
|
</div>
|
|
1804
1804
|
</div></tems-division
|
|
1805
1805
|
>
|
|
@@ -1935,9 +1935,7 @@ let _ = class extends v {
|
|
|
1935
1935
|
}
|
|
1936
1936
|
if (t) {
|
|
1937
1937
|
this.catalogs = [];
|
|
1938
|
-
const i = this.sectors.filter(
|
|
1939
|
-
(s) => s.id === t
|
|
1940
|
-
);
|
|
1938
|
+
const i = t === "*" ? this.sectors : this.sectors.filter((s) => s.id === t);
|
|
1941
1939
|
if (i.length > 0 && (this.catalogs = (await Promise.all(
|
|
1942
1940
|
i.map(async (s) => {
|
|
1943
1941
|
try {
|
|
@@ -1952,6 +1950,24 @@ let _ = class extends v {
|
|
|
1952
1950
|
}
|
|
1953
1951
|
})
|
|
1954
1952
|
)).flat()), r) {
|
|
1953
|
+
if (r === "*")
|
|
1954
|
+
return this.object = {
|
|
1955
|
+
"@id": "urn:uuid:all-catalogs",
|
|
1956
|
+
"dct:title": h("All Catalogs"),
|
|
1957
|
+
"dct:description": "",
|
|
1958
|
+
"dcat:dataset": (await Promise.all(
|
|
1959
|
+
this.catalogs.map(async (o) => {
|
|
1960
|
+
try {
|
|
1961
|
+
return (await (await fetch(o.endpoints.catalog)).json())["dcat:dataset"];
|
|
1962
|
+
} catch (n) {
|
|
1963
|
+
return console.warn(
|
|
1964
|
+
`Failed to fetch catalog from ${o.endpoints.catalog}`,
|
|
1965
|
+
n
|
|
1966
|
+
), [];
|
|
1967
|
+
}
|
|
1968
|
+
})
|
|
1969
|
+
)).flat()
|
|
1970
|
+
}, this.object;
|
|
1955
1971
|
const s = this.catalogs.find(
|
|
1956
1972
|
(o) => o.catalogId === r
|
|
1957
1973
|
);
|
|
@@ -2011,12 +2027,12 @@ let _ = class extends v {
|
|
|
2011
2027
|
complete: (e) => d`<tems-viewport>
|
|
2012
2028
|
<tems-header
|
|
2013
2029
|
slot="header"
|
|
2014
|
-
heading=${this.catalogId ? e ? `${
|
|
2015
|
-
${e["dct:title"]} (From ${this.sectorId})` : `${
|
|
2016
|
-
>${this.sectorId || this.catalogId ? d
|
|
2030
|
+
heading=${this.catalogId ? e ? this.catalogId === "*" ? `${h("All Datasets")}` : `${h("Datasets from")}
|
|
2031
|
+
${e["dct:title"]} (From ${this.sectorId})` : `${h(S`Error while loading catalog ${this.catalogId}`)}` : this.sectorId ? this.sectorId === "*" ? `${h("All Sectors")}` : `${h("Catalogs available in")} ${this.sectorId}` : `${h("Root Authority")}`}
|
|
2032
|
+
>${(this.sectorId || this.catalogId) && !(this.catalogId === "*" && this.sectorId === "*") && !(this.sectorId === "*" && !this.catalogId) ? d`<div slot="cta">
|
|
2017
2033
|
<tems-button
|
|
2018
2034
|
type="primary"
|
|
2019
|
-
label=${
|
|
2035
|
+
label=${h(
|
|
2020
2036
|
S`Back to ${this.catalogId ? this.sectorId : "Root Authority"}`
|
|
2021
2037
|
)}
|
|
2022
2038
|
@click=${this._back}
|
|
@@ -2043,7 +2059,7 @@ let _ = class extends v {
|
|
|
2043
2059
|
type=${"bill-image"}
|
|
2044
2060
|
.header=${t.catalogId || c}
|
|
2045
2061
|
.content=${t.description || c}
|
|
2046
|
-
date=${
|
|
2062
|
+
date=${I(t.lastUpdated) || c}
|
|
2047
2063
|
@click=${() => this._selectCatalog(t.catalogId)}
|
|
2048
2064
|
></tems-card-catalog>`
|
|
2049
2065
|
)}` : d`${e.map(
|
|
@@ -2053,23 +2069,23 @@ let _ = class extends v {
|
|
|
2053
2069
|
type=${"bill-image"}
|
|
2054
2070
|
.header=${t.id || c}
|
|
2055
2071
|
.content=${t.description || c}
|
|
2056
|
-
date=${
|
|
2072
|
+
date=${I(t.lastUpdated) || c}
|
|
2057
2073
|
@click=${() => this._selectSector(t.id)}
|
|
2058
2074
|
></tems-card-catalog>`
|
|
2059
2075
|
)}`}
|
|
2060
2076
|
</div>
|
|
2061
2077
|
</div>` : d`<p>
|
|
2062
|
-
${
|
|
2078
|
+
${h(
|
|
2063
2079
|
"No data available, data source may be temporarily unavailable."
|
|
2064
2080
|
)}
|
|
2065
2081
|
</p>
|
|
2066
2082
|
${this.sectorId || this.catalogId ? d`<tems-button
|
|
2067
2083
|
type="primary"
|
|
2068
|
-
label=${
|
|
2084
|
+
label=${h("Back")}
|
|
2069
2085
|
@click=${this._back}
|
|
2070
2086
|
></tems-button>` : d`<tems-button
|
|
2071
2087
|
type="primary"
|
|
2072
|
-
label=${
|
|
2088
|
+
label=${h("Retry")}
|
|
2073
2089
|
@click=${this.requestUpdate}
|
|
2074
2090
|
></tems-button>`}`}
|
|
2075
2091
|
</div>
|
|
@@ -2257,8 +2273,8 @@ var Or = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, U = (e, t,
|
|
|
2257
2273
|
let w = class extends v {
|
|
2258
2274
|
constructor() {
|
|
2259
2275
|
super(...arguments), this.header = "DS4GO Fact Bundling Creation", this.selectedFacts = [], this.bundleName = "", this.bundleDescription = "", this.filterFactText = "", this.spliceLength = 0, this.cherryPickedProperties = [
|
|
2260
|
-
{ key: "created_at", value: "created_at", cast:
|
|
2261
|
-
{ key: "updated_at", value: "updated_at", cast:
|
|
2276
|
+
{ key: "created_at", value: "created_at", cast: I },
|
|
2277
|
+
{ key: "updated_at", value: "updated_at", cast: I },
|
|
2262
2278
|
{ key: "name", value: "name" },
|
|
2263
2279
|
{ key: "description", value: "description" },
|
|
2264
2280
|
{ key: "author", value: "author" },
|
|
@@ -2361,7 +2377,7 @@ let w = class extends v {
|
|
|
2361
2377
|
<tems-button
|
|
2362
2378
|
type="primary"
|
|
2363
2379
|
disabled=${!s || c}
|
|
2364
|
-
label=${
|
|
2380
|
+
label=${h("Create bundle")}
|
|
2365
2381
|
@click=${this._createFactBundle}
|
|
2366
2382
|
></tems-button>
|
|
2367
2383
|
</div>
|
|
@@ -2372,8 +2388,8 @@ let w = class extends v {
|
|
|
2372
2388
|
<div>
|
|
2373
2389
|
<tems-input
|
|
2374
2390
|
type="text"
|
|
2375
|
-
label=${
|
|
2376
|
-
placeholder=${
|
|
2391
|
+
label=${h("Bundle name")}
|
|
2392
|
+
placeholder=${h("Bundle name")}
|
|
2377
2393
|
required=""
|
|
2378
2394
|
.value=${this.bundleName}
|
|
2379
2395
|
@change=${this._updateBundleName}
|
|
@@ -2382,15 +2398,15 @@ let w = class extends v {
|
|
|
2382
2398
|
<div>
|
|
2383
2399
|
<tems-textarea
|
|
2384
2400
|
rows="4"
|
|
2385
|
-
label=${
|
|
2386
|
-
placeholder=${
|
|
2401
|
+
label=${h("Bundle description")}
|
|
2402
|
+
placeholder=${h("Bundle description")}
|
|
2387
2403
|
.value=${this.bundleDescription}
|
|
2388
2404
|
@change=${this._updateBundleDescription}
|
|
2389
2405
|
></tems-textarea>
|
|
2390
2406
|
</div>
|
|
2391
2407
|
${i > 0 ? d`<tems-division type="h4">
|
|
2392
2408
|
<div>
|
|
2393
|
-
${
|
|
2409
|
+
${h(
|
|
2394
2410
|
S`${i} selected fact${i > 1 ? "s" : ""}`
|
|
2395
2411
|
)}
|
|
2396
2412
|
</div></tems-division
|
|
@@ -2404,7 +2420,7 @@ let w = class extends v {
|
|
|
2404
2420
|
if (n.length > 3) {
|
|
2405
2421
|
const a = n.length - 3;
|
|
2406
2422
|
n.splice(3, a), n.push({
|
|
2407
|
-
name: `+${a} ${
|
|
2423
|
+
name: `+${a} ${h("more")}`,
|
|
2408
2424
|
type: "information"
|
|
2409
2425
|
});
|
|
2410
2426
|
}
|
|
@@ -2447,7 +2463,7 @@ let w = class extends v {
|
|
|
2447
2463
|
if (n.length > 3) {
|
|
2448
2464
|
const a = n.length - 3;
|
|
2449
2465
|
n.splice(3, a), n.push({
|
|
2450
|
-
name: `+${a} ${
|
|
2466
|
+
name: `+${a} ${h("more")}`,
|
|
2451
2467
|
type: "information"
|
|
2452
2468
|
});
|
|
2453
2469
|
}
|
|
@@ -2468,7 +2484,7 @@ let w = class extends v {
|
|
|
2468
2484
|
class="flex flex-row justify-content-space-between align-items-flex-end"
|
|
2469
2485
|
>
|
|
2470
2486
|
<div>
|
|
2471
|
-
${
|
|
2487
|
+
${h(
|
|
2472
2488
|
S`Displaying ${r.length} of ${t.length} result${t.length > 1 ? "s" : ""}`
|
|
2473
2489
|
)}
|
|
2474
2490
|
</div>
|
|
@@ -2477,16 +2493,16 @@ let w = class extends v {
|
|
|
2477
2493
|
@click=${this._showMoreResults}
|
|
2478
2494
|
type="primary"
|
|
2479
2495
|
size="sm"
|
|
2480
|
-
label=${
|
|
2496
|
+
label=${h("Show more results")}
|
|
2481
2497
|
></tems-button>
|
|
2482
2498
|
<tems-button
|
|
2483
2499
|
@click=${this._showAllResults}
|
|
2484
2500
|
type="primary"
|
|
2485
2501
|
size="sm"
|
|
2486
|
-
label=${
|
|
2502
|
+
label=${h("Show all results")}
|
|
2487
2503
|
></tems-button>
|
|
2488
2504
|
</div>
|
|
2489
|
-
</div>` : c}` : d`${
|
|
2505
|
+
</div>` : c}` : d`${h("No results found")} ${this.filterFactText ? `for "${this.filterFactText}".` : ""}`}
|
|
2490
2506
|
</div>` : c}
|
|
2491
2507
|
</section>
|
|
2492
2508
|
</div>
|
|
@@ -2570,16 +2586,16 @@ U([
|
|
|
2570
2586
|
w = U([
|
|
2571
2587
|
V("solid-fact-bundle-creation")
|
|
2572
2588
|
], w);
|
|
2573
|
-
var Dr = Object.defineProperty,
|
|
2574
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
2589
|
+
var Dr = Object.defineProperty, Ir = Object.getOwnPropertyDescriptor, et = (e, t, r, i) => {
|
|
2590
|
+
for (var s = i > 1 ? void 0 : i ? Ir(t, r) : t, o = e.length - 1, n; o >= 0; o--)
|
|
2575
2591
|
(n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
2576
2592
|
return i && s && Dr(t, r, s), s;
|
|
2577
2593
|
};
|
|
2578
2594
|
let T = class extends v {
|
|
2579
2595
|
constructor() {
|
|
2580
2596
|
super(...arguments), this.header = "DS4GO Fact Bundling", this.search = [], this.resultCount = this.objects?.length || 0, this.cherryPickedProperties = [
|
|
2581
|
-
{ key: "created_at", value: "created_at", cast:
|
|
2582
|
-
{ key: "updated_at", value: "updated_at", cast:
|
|
2597
|
+
{ key: "created_at", value: "created_at", cast: I },
|
|
2598
|
+
{ key: "updated_at", value: "updated_at", cast: I },
|
|
2583
2599
|
{ key: "name", value: "name" },
|
|
2584
2600
|
{ key: "description", value: "description" }
|
|
2585
2601
|
], this._getResource = new pt(this, {
|
|
@@ -2608,7 +2624,7 @@ let T = class extends v {
|
|
|
2608
2624
|
return e?._originalResource?.hasType("ds4go:FactBundle") && (e.facts = await Promise.all(
|
|
2609
2625
|
(await e._originalResource["ldp:contains"]).map(
|
|
2610
2626
|
(t) => this._getProxyValue(t["@id"], !1, [
|
|
2611
|
-
{ key: "updated_at", value: "updated_at", cast:
|
|
2627
|
+
{ key: "updated_at", value: "updated_at", cast: I },
|
|
2612
2628
|
{ key: "name", value: "name" },
|
|
2613
2629
|
{ key: "description", value: "description" },
|
|
2614
2630
|
{
|
|
@@ -2678,7 +2694,7 @@ let T = class extends v {
|
|
|
2678
2694
|
<tems-button
|
|
2679
2695
|
type="primary"
|
|
2680
2696
|
disabled=${!this.bundleCreationComponent?.route || c}
|
|
2681
|
-
label=${
|
|
2697
|
+
label=${h("Create a bundle")}
|
|
2682
2698
|
@click=${this._goToBundleCreation}
|
|
2683
2699
|
></tems-button>
|
|
2684
2700
|
</div>
|
|
@@ -2741,9 +2757,12 @@ et([
|
|
|
2741
2757
|
T = et([
|
|
2742
2758
|
V("solid-fact-bundle")
|
|
2743
2759
|
], T);
|
|
2744
|
-
const
|
|
2760
|
+
const Lr = {
|
|
2761
|
+
s20acf344316637a0: "All Catalogs",
|
|
2745
2762
|
s67269ab6dc51ec41: S`Error while loading catalog ${0}`,
|
|
2763
|
+
s0b88896b7338837d: "All Datasets",
|
|
2746
2764
|
s541d9cd11a5bc840: "Datasets from",
|
|
2765
|
+
s01ceffa02fa6bd7f: "All Sectors",
|
|
2747
2766
|
s4aaac20ff7887391: "Catalogs available in",
|
|
2748
2767
|
sa89a60c3e1230cec: "Root Authority",
|
|
2749
2768
|
se5784a16a6799dad: S`Back to ${0}`,
|
|
@@ -2767,7 +2786,7 @@ const Ir = {
|
|
|
2767
2786
|
sd3682395cf86f913: "Bundle updated on"
|
|
2768
2787
|
}, Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2769
2788
|
__proto__: null,
|
|
2770
|
-
templates:
|
|
2789
|
+
templates: Lr
|
|
2771
2790
|
}, Symbol.toStringTag, { value: "Module" })), Fr = "en", he = [
|
|
2772
2791
|
"en"
|
|
2773
2792
|
], Nr = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": Tr }), Mr = new Map(
|
package/package.json
CHANGED
|
@@ -131,9 +131,10 @@ export class SolidDsifExplorerPoc extends OrbitComponent {
|
|
|
131
131
|
if (sectorId) {
|
|
132
132
|
this.catalogs = [];
|
|
133
133
|
|
|
134
|
-
const selectedSectors =
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
const selectedSectors =
|
|
135
|
+
sectorId === "*"
|
|
136
|
+
? this.sectors
|
|
137
|
+
: this.sectors.filter((sector) => sector.id === sectorId);
|
|
137
138
|
|
|
138
139
|
if (selectedSectors.length > 0) {
|
|
139
140
|
this.catalogs = (
|
|
@@ -157,6 +158,34 @@ export class SolidDsifExplorerPoc extends OrbitComponent {
|
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
if (catalogId) {
|
|
161
|
+
if (catalogId === "*") {
|
|
162
|
+
this.object = {
|
|
163
|
+
"@id": "urn:uuid:all-catalogs",
|
|
164
|
+
"dct:title": msg("All Catalogs"),
|
|
165
|
+
"dct:description": "",
|
|
166
|
+
"dcat:dataset": (
|
|
167
|
+
await Promise.all(
|
|
168
|
+
this.catalogs.map(async (catalog) => {
|
|
169
|
+
try {
|
|
170
|
+
return (
|
|
171
|
+
(await (
|
|
172
|
+
await fetch(catalog.endpoints.catalog)
|
|
173
|
+
).json()) as CatalogEntry
|
|
174
|
+
)["dcat:dataset"];
|
|
175
|
+
} catch (error) {
|
|
176
|
+
console.warn(
|
|
177
|
+
`Failed to fetch catalog from ${catalog.endpoints.catalog}`,
|
|
178
|
+
error,
|
|
179
|
+
);
|
|
180
|
+
return [];
|
|
181
|
+
}
|
|
182
|
+
}),
|
|
183
|
+
)
|
|
184
|
+
).flat() as Dataset[],
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
return this.object;
|
|
188
|
+
}
|
|
160
189
|
// FIXME: What if both sbx and sa use the same catalogId?
|
|
161
190
|
const selectedCatalog = this.catalogs.find(
|
|
162
191
|
(catalog) => catalog.catalogId === catalogId,
|
|
@@ -247,13 +276,19 @@ export class SolidDsifExplorerPoc extends OrbitComponent {
|
|
|
247
276
|
heading=${this.catalogId
|
|
248
277
|
? !datas
|
|
249
278
|
? `${msg(str`Error while loading catalog ${this.catalogId}`)}`
|
|
250
|
-
:
|
|
279
|
+
: this.catalogId === "*"
|
|
280
|
+
? `${msg("All Datasets")}`
|
|
281
|
+
: `${msg("Datasets from")}
|
|
251
282
|
${(datas as CatalogEntry)["dct:title"]} (From ${this.sectorId})`
|
|
252
283
|
: this.sectorId
|
|
253
|
-
?
|
|
284
|
+
? this.sectorId === "*"
|
|
285
|
+
? `${msg("All Sectors")}`
|
|
286
|
+
: `${msg("Catalogs available in")} ${this.sectorId}`
|
|
254
287
|
: `${msg("Root Authority")}`}
|
|
255
|
-
>${this.sectorId || this.catalogId
|
|
256
|
-
|
|
288
|
+
>${(this.sectorId || this.catalogId) &&
|
|
289
|
+
!(this.catalogId === "*" && this.sectorId === "*") &&
|
|
290
|
+
!(this.sectorId === "*" && !this.catalogId)
|
|
291
|
+
? html`<div slot="cta">
|
|
257
292
|
<tems-button
|
|
258
293
|
type="primary"
|
|
259
294
|
label=${msg(
|