@startinblox/components-ds4go 4.1.0 → 4.1.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/dist/index.js +376 -350
- package/package.json +1 -1
- package/src/components/solid-dsp-connector.ts +13 -0
- package/src/components/solid-fact-list.ts +30 -10
package/dist/index.js
CHANGED
|
@@ -250,7 +250,7 @@ let Tt = class extends HTMLElement {
|
|
|
250
250
|
Tt.elementStyles = [], Tt.shadowRootOptions = { mode: "open" }, Tt[Yt("elementProperties")] = /* @__PURE__ */ new Map(), Tt[Yt("finalized")] = /* @__PURE__ */ new Map(), Ps?.({ ReactiveElement: Tt }), (Ie.reactiveElementVersions ??= []).push("2.1.2");
|
|
251
251
|
const fi = globalThis, qi = (e) => e, $e = fi.trustedTypes, Bi = $e ? $e.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Or = "$lit$", dt = `lit$${Math.random().toFixed(9).slice(2)}$`, Ir = "?" + dt, As = `<${Ir}>`, Ct = document, Zt = () => Ct.createComment(""), Xt = (e) => e === null || typeof e != "object" && typeof e != "function", gi = Array.isArray, Cs = (e) => gi(e) || typeof e?.[Symbol.iterator] == "function", ze = `[
|
|
252
252
|
\f\r]`, Wt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Wi = /-->/g, Gi = />/g, _t = RegExp(`>|${ze}(?:([^\\s"'>=/]+)(${ze}*=${ze}*(?:[^
|
|
253
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Hi = /'/g, Vi = /"/g, Rr = /^(?:script|style|textarea|title)$/i, Ss = (e) => (t, ...i) => ({ _$litType$: e, strings: t, values: i }),
|
|
253
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Hi = /'/g, Vi = /"/g, Rr = /^(?:script|style|textarea|title)$/i, Ss = (e) => (t, ...i) => ({ _$litType$: e, strings: t, values: i }), c = Ss(1), ut = /* @__PURE__ */ Symbol.for("lit-noChange"), p = /* @__PURE__ */ Symbol.for("lit-nothing"), Ki = /* @__PURE__ */ new WeakMap(), At = Ct.createTreeWalker(Ct, 129);
|
|
254
254
|
function Dr(e, t) {
|
|
255
255
|
if (!gi(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
256
256
|
return Bi !== void 0 ? Bi.createHTML(t) : t;
|
|
@@ -259,11 +259,11 @@ const Es = (e, t) => {
|
|
|
259
259
|
const i = e.length - 1, r = [];
|
|
260
260
|
let s, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = Wt;
|
|
261
261
|
for (let n = 0; n < i; n++) {
|
|
262
|
-
const
|
|
262
|
+
const d = e[n];
|
|
263
263
|
let u, m, f = -1, g = 0;
|
|
264
|
-
for (; g <
|
|
264
|
+
for (; g < d.length && (a.lastIndex = g, m = a.exec(d), m !== null); ) g = a.lastIndex, a === Wt ? m[1] === "!--" ? a = Wi : m[1] !== void 0 ? a = Gi : m[2] !== void 0 ? (Rr.test(m[2]) && (s = RegExp("</" + m[2], "g")), a = _t) : m[3] !== void 0 && (a = _t) : a === _t ? m[0] === ">" ? (a = s ?? Wt, f = -1) : m[1] === void 0 ? f = -2 : (f = a.lastIndex - m[2].length, u = m[1], a = m[3] === void 0 ? _t : m[3] === '"' ? Vi : Hi) : a === Vi || a === Hi ? a = _t : a === Wi || a === Gi ? a = Wt : (a = _t, s = void 0);
|
|
265
265
|
const v = a === _t && e[n + 1].startsWith("/>") ? " " : "";
|
|
266
|
-
o += a === Wt ?
|
|
266
|
+
o += a === Wt ? d + As : f >= 0 ? (r.push(u), d.slice(0, f) + Or + d.slice(f) + dt + v) : d + dt + (f === -2 ? n : v);
|
|
267
267
|
}
|
|
268
268
|
return [Dr(e, o + (e[i] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
269
269
|
};
|
|
@@ -272,29 +272,29 @@ class Qt {
|
|
|
272
272
|
let s;
|
|
273
273
|
this.parts = [];
|
|
274
274
|
let o = 0, a = 0;
|
|
275
|
-
const n = t.length - 1,
|
|
275
|
+
const n = t.length - 1, d = this.parts, [u, m] = Es(t, i);
|
|
276
276
|
if (this.el = Qt.createElement(u, r), At.currentNode = this.el.content, i === 2 || i === 3) {
|
|
277
277
|
const f = this.el.content.firstChild;
|
|
278
278
|
f.replaceWith(...f.childNodes);
|
|
279
279
|
}
|
|
280
|
-
for (; (s = At.nextNode()) !== null &&
|
|
280
|
+
for (; (s = At.nextNode()) !== null && d.length < n; ) {
|
|
281
281
|
if (s.nodeType === 1) {
|
|
282
282
|
if (s.hasAttributes()) for (const f of s.getAttributeNames()) if (f.endsWith(Or)) {
|
|
283
283
|
const g = m[a++], v = s.getAttribute(f).split(dt), b = /([.?@])?(.*)/.exec(g);
|
|
284
|
-
|
|
285
|
-
} else f.startsWith(dt) && (
|
|
284
|
+
d.push({ type: 1, index: o, name: b[2], strings: v, ctor: b[1] === "." ? Is : b[1] === "?" ? Rs : b[1] === "@" ? Ds : De }), s.removeAttribute(f);
|
|
285
|
+
} else f.startsWith(dt) && (d.push({ type: 6, index: o }), s.removeAttribute(f));
|
|
286
286
|
if (Rr.test(s.tagName)) {
|
|
287
287
|
const f = s.textContent.split(dt), g = f.length - 1;
|
|
288
288
|
if (g > 0) {
|
|
289
289
|
s.textContent = $e ? $e.emptyScript : "";
|
|
290
|
-
for (let v = 0; v < g; v++) s.append(f[v], Zt()), At.nextNode(),
|
|
290
|
+
for (let v = 0; v < g; v++) s.append(f[v], Zt()), At.nextNode(), d.push({ type: 2, index: ++o });
|
|
291
291
|
s.append(f[g], Zt());
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
} else if (s.nodeType === 8) if (s.data === Ir)
|
|
294
|
+
} else if (s.nodeType === 8) if (s.data === Ir) d.push({ type: 2, index: o });
|
|
295
295
|
else {
|
|
296
296
|
let f = -1;
|
|
297
|
-
for (; (f = s.data.indexOf(dt, f + 1)) !== -1; )
|
|
297
|
+
for (; (f = s.data.indexOf(dt, f + 1)) !== -1; ) d.push({ type: 7, index: o }), f += dt.length - 1;
|
|
298
298
|
}
|
|
299
299
|
o++;
|
|
300
300
|
}
|
|
@@ -323,13 +323,13 @@ let Os = class {
|
|
|
323
323
|
u(t) {
|
|
324
324
|
const { el: { content: i }, parts: r } = this._$AD, s = (t?.creationScope ?? Ct).importNode(i, !0);
|
|
325
325
|
At.currentNode = s;
|
|
326
|
-
let o = At.nextNode(), a = 0, n = 0,
|
|
327
|
-
for (;
|
|
328
|
-
if (a ===
|
|
326
|
+
let o = At.nextNode(), a = 0, n = 0, d = r[0];
|
|
327
|
+
for (; d !== void 0; ) {
|
|
328
|
+
if (a === d.index) {
|
|
329
329
|
let u;
|
|
330
|
-
|
|
330
|
+
d.type === 2 ? u = new ae(o, o.nextSibling, this, t) : d.type === 1 ? u = new d.ctor(o, d.name, d.strings, this, t) : d.type === 6 && (u = new Ts(o, this, t)), this._$AV.push(u), d = r[++n];
|
|
331
331
|
}
|
|
332
|
-
a !==
|
|
332
|
+
a !== d?.index && (o = At.nextNode(), a++);
|
|
333
333
|
}
|
|
334
334
|
return At.currentNode = Ct, s;
|
|
335
335
|
}
|
|
@@ -413,8 +413,8 @@ let De = class {
|
|
|
413
413
|
if (o === void 0) t = jt(this, t, i, 0), a = !Xt(t) || t !== this._$AH && t !== ut, a && (this._$AH = t);
|
|
414
414
|
else {
|
|
415
415
|
const n = t;
|
|
416
|
-
let
|
|
417
|
-
for (t = o[0],
|
|
416
|
+
let d, u;
|
|
417
|
+
for (t = o[0], d = 0; d < o.length - 1; d++) u = jt(this, n[r + d], i, d), u === ut && (u = this._$AH[d]), a ||= !Xt(u) || u !== this._$AH[d], u === p ? t = p : t !== p && (t += (u ?? "") + o[d + 1]), this._$AH[d] = u;
|
|
418
418
|
}
|
|
419
419
|
a && !s && this.j(t);
|
|
420
420
|
}
|
|
@@ -507,8 +507,8 @@ const Ms = { attribute: !0, type: String, converter: be, reflect: !1, hasChanged
|
|
|
507
507
|
if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(i.name, e), r === "accessor") {
|
|
508
508
|
const { name: a } = i;
|
|
509
509
|
return { set(n) {
|
|
510
|
-
const
|
|
511
|
-
t.set.call(this, n), this.requestUpdate(a,
|
|
510
|
+
const d = t.get.call(this);
|
|
511
|
+
t.set.call(this, n), this.requestUpdate(a, d, e, !0, n);
|
|
512
512
|
}, init(n) {
|
|
513
513
|
return n !== void 0 && this.C(a, void 0, e, n), n;
|
|
514
514
|
} };
|
|
@@ -516,8 +516,8 @@ const Ms = { attribute: !0, type: String, converter: be, reflect: !1, hasChanged
|
|
|
516
516
|
if (r === "setter") {
|
|
517
517
|
const { name: a } = i;
|
|
518
518
|
return function(n) {
|
|
519
|
-
const
|
|
520
|
-
t.call(this, n), this.requestUpdate(a,
|
|
519
|
+
const d = this[a];
|
|
520
|
+
t.call(this, n), this.requestUpdate(a, d, e, !0, n);
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
523
|
throw Error("Unsupported decorator location: " + r);
|
|
@@ -588,9 +588,9 @@ let rt = class extends C {
|
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
590
|
renderTags() {
|
|
591
|
-
return !this.tags || this.tags.length === 0 ? p :
|
|
591
|
+
return !this.tags || this.tags.length === 0 ? p : c`<div class="tags">
|
|
592
592
|
${this.tags.filter((e) => typeof e == "string" || e.name).map(
|
|
593
|
-
(e) =>
|
|
593
|
+
(e) => c`<tems-badge
|
|
594
594
|
size="sm"
|
|
595
595
|
label=${typeof e == "string" ? e : e.name}
|
|
596
596
|
type=${typeof e != "string" && Yi(e.type)}
|
|
@@ -600,11 +600,11 @@ let rt = class extends C {
|
|
|
600
600
|
</div>`;
|
|
601
601
|
}
|
|
602
602
|
renderContent() {
|
|
603
|
-
return this.header || this.content ?
|
|
604
|
-
${this.header ?
|
|
603
|
+
return this.header || this.content ? c`<div class="content">
|
|
604
|
+
${this.header ? c`<div class="card-header">
|
|
605
605
|
<tems-division label=${this.header} type="h4"></tems-division>
|
|
606
606
|
</div>` : p}
|
|
607
|
-
${this.content ?
|
|
607
|
+
${this.content ? c`<div class="card-content">
|
|
608
608
|
<tems-division
|
|
609
609
|
label=${this.content}
|
|
610
610
|
type="body-m"
|
|
@@ -613,12 +613,12 @@ let rt = class extends C {
|
|
|
613
613
|
</div>` : p;
|
|
614
614
|
}
|
|
615
615
|
renderDate() {
|
|
616
|
-
return this.date ?
|
|
616
|
+
return this.date ? c`<div class="date">
|
|
617
617
|
<span>${this.date}</span>
|
|
618
618
|
</div>` : p;
|
|
619
619
|
}
|
|
620
620
|
renderImage() {
|
|
621
|
-
return this.image ?
|
|
621
|
+
return this.image ? c`<header
|
|
622
622
|
class="image"
|
|
623
623
|
style="background-image: url("${this.image}")"
|
|
624
624
|
></header>` : p;
|
|
@@ -627,20 +627,20 @@ let rt = class extends C {
|
|
|
627
627
|
const e = {
|
|
628
628
|
...this._getType()
|
|
629
629
|
};
|
|
630
|
-
return this.cardType === "horizontal" ?
|
|
630
|
+
return this.cardType === "horizontal" ? c`<article class=${qe(e)}>
|
|
631
631
|
${this.renderImage()}
|
|
632
632
|
<main>
|
|
633
633
|
${this.renderTags()}
|
|
634
634
|
${this.renderContent()}
|
|
635
635
|
</main>
|
|
636
|
-
</article>` : this.cardType === "bill-image" ?
|
|
636
|
+
</article>` : this.cardType === "bill-image" ? c`<article class=${qe(e)}>
|
|
637
637
|
${this.renderImage()}
|
|
638
638
|
<main>
|
|
639
639
|
${this.renderTags()}
|
|
640
640
|
${this.renderContent()}
|
|
641
641
|
${this.renderDate()}
|
|
642
642
|
</main>
|
|
643
|
-
</article>` :
|
|
643
|
+
</article>` : c`<article class=${qe(e)}>
|
|
644
644
|
${this.renderImage()}
|
|
645
645
|
<main>
|
|
646
646
|
${this.renderDate()}
|
|
@@ -726,10 +726,10 @@ const et = [];
|
|
|
726
726
|
for (let e = 0; e < 256; e++)
|
|
727
727
|
et[e] = (e >> 4 & 15).toString(16) + (e & 15).toString(16);
|
|
728
728
|
function Ks(e) {
|
|
729
|
-
let t = 0, i = 8997, r = 0, s = 33826, o = 0, a = 40164, n = 0,
|
|
729
|
+
let t = 0, i = 8997, r = 0, s = 33826, o = 0, a = 40164, n = 0, d = 52210;
|
|
730
730
|
for (let u = 0; u < e.length; u++)
|
|
731
|
-
i ^= e.charCodeAt(u), t = i * 435, r = s * 435, o = a * 435, n =
|
|
732
|
-
return et[
|
|
731
|
+
i ^= e.charCodeAt(u), t = i * 435, r = s * 435, o = a * 435, n = d * 435, o += i << 8, n += s << 8, r += t >>> 16, i = t & 65535, o += r >>> 16, s = r & 65535, d = n + (o >>> 16) & 65535, a = o & 65535;
|
|
732
|
+
return et[d >> 8] + et[d & 255] + et[a >> 8] + et[a & 255] + et[s >> 8] + et[s & 255] + et[i >> 8] + et[i & 255];
|
|
733
733
|
}
|
|
734
734
|
const Ys = "", Js = "h", Zs = "s";
|
|
735
735
|
function Xs(e, t) {
|
|
@@ -820,7 +820,7 @@ let xe = class extends C {
|
|
|
820
820
|
render() {
|
|
821
821
|
if (!this.object) return p;
|
|
822
822
|
const e = this._getTags();
|
|
823
|
-
return
|
|
823
|
+
return c`<article class="vertical">
|
|
824
824
|
<header
|
|
825
825
|
class="image"
|
|
826
826
|
style='background-image: url("${this._getThumbnail()}")'
|
|
@@ -840,22 +840,22 @@ let xe = class extends C {
|
|
|
840
840
|
></tems-badge>
|
|
841
841
|
</div>
|
|
842
842
|
<div class="content">
|
|
843
|
-
${this.object?.name ?
|
|
843
|
+
${this.object?.name ? c`<div class="card-header">
|
|
844
844
|
<tems-division
|
|
845
845
|
label=${this.object?.name}
|
|
846
846
|
type="h4"
|
|
847
847
|
></tems-division>
|
|
848
848
|
</div>` : p}
|
|
849
|
-
${this.object?.description ?
|
|
849
|
+
${this.object?.description ? c`<div class="card-content">
|
|
850
850
|
<tems-division
|
|
851
851
|
label=${this.object?.description}
|
|
852
852
|
type="body-m"
|
|
853
853
|
></tems-division>
|
|
854
854
|
</div>` : p}
|
|
855
855
|
</div>
|
|
856
|
-
${e.length > 0 ?
|
|
856
|
+
${e.length > 0 ? c`<div class="tags">
|
|
857
857
|
${e.map(
|
|
858
|
-
(t) =>
|
|
858
|
+
(t) => c`<tems-badge
|
|
859
859
|
size="sm"
|
|
860
860
|
label=${t.label}
|
|
861
861
|
type=${t.type}
|
|
@@ -943,7 +943,7 @@ class k extends ne {
|
|
|
943
943
|
const s = i.getAttribute("navigation-subrouter"), o = i.getAttribute("navigation-resource"), a = i.getAttribute("navigation-rdf-type");
|
|
944
944
|
if (a) {
|
|
945
945
|
const n = window.orbit?.components?.filter(
|
|
946
|
-
(
|
|
946
|
+
(d) => d?.routeAttributes?.["rdf-type"] === a
|
|
947
947
|
);
|
|
948
948
|
n && (r = n[0]?.uniq);
|
|
949
949
|
}
|
|
@@ -974,15 +974,15 @@ class k extends ne {
|
|
|
974
974
|
"@type": t["@type"],
|
|
975
975
|
"@context": t.serverContext,
|
|
976
976
|
_originalResource: t
|
|
977
|
-
}, a = r.map(async (
|
|
978
|
-
if (!s?.includes(
|
|
979
|
-
let u = await t.get(
|
|
980
|
-
return
|
|
977
|
+
}, a = r.map(async (d) => {
|
|
978
|
+
if (!s?.includes(d.key)) return;
|
|
979
|
+
let u = await t.get(d.key);
|
|
980
|
+
return d.expand && (u = await this._getProxyValue(u, i, r)), d.cast && (u = await d.cast(u)), { prop: d, value: u };
|
|
981
981
|
}), n = (await Promise.all(a)).filter(
|
|
982
|
-
(
|
|
982
|
+
(d) => d !== void 0
|
|
983
983
|
);
|
|
984
|
-
for (const { prop:
|
|
985
|
-
u !== void 0 && (o[
|
|
984
|
+
for (const { prop: d, value: u } of n)
|
|
985
|
+
u !== void 0 && (o[d.value] = u);
|
|
986
986
|
return await this._responseAdaptator(o);
|
|
987
987
|
}
|
|
988
988
|
async _hasCherryPickedProperties(t) {
|
|
@@ -1226,9 +1226,9 @@ const ai = (e, t, i, r) => {
|
|
|
1226
1226
|
const r = i.toLowerCase(), s = t.split(".");
|
|
1227
1227
|
return e.map((o) => {
|
|
1228
1228
|
let a = o;
|
|
1229
|
-
for (const
|
|
1230
|
-
if (a && typeof a == "object" &&
|
|
1231
|
-
a = a[
|
|
1229
|
+
for (const d of s)
|
|
1230
|
+
if (a && typeof a == "object" && d in a)
|
|
1231
|
+
a = a[d];
|
|
1232
1232
|
else {
|
|
1233
1233
|
a = null;
|
|
1234
1234
|
break;
|
|
@@ -1414,26 +1414,26 @@ const ai = (e, t, i, r) => {
|
|
|
1414
1414
|
return i;
|
|
1415
1415
|
}, G = (e, t, i = "asc") => {
|
|
1416
1416
|
const r = Array.isArray(t) ? t : [t], s = i !== "asc", o = [...e], n = (() => {
|
|
1417
|
-
const
|
|
1418
|
-
if (typeof
|
|
1417
|
+
const d = xt(o[0], r);
|
|
1418
|
+
if (typeof d == "number")
|
|
1419
1419
|
return (u, m) => {
|
|
1420
1420
|
const f = xt(u, r), g = xt(m, r);
|
|
1421
1421
|
return f == null ? g == null ? 0 : 1 : g == null ? -1 : f - g;
|
|
1422
1422
|
};
|
|
1423
|
-
if (typeof
|
|
1423
|
+
if (typeof d == "string")
|
|
1424
1424
|
return (u, m) => {
|
|
1425
1425
|
const f = xt(u, r), g = xt(m, r);
|
|
1426
1426
|
return f == null ? g == null ? 0 : 1 : g == null ? -1 : f.localeCompare(g);
|
|
1427
1427
|
};
|
|
1428
|
-
if (
|
|
1428
|
+
if (d instanceof Date)
|
|
1429
1429
|
return (u, m) => {
|
|
1430
1430
|
const f = xt(u, r), g = xt(m, r);
|
|
1431
1431
|
return f == null ? g == null ? 0 : 1 : g == null ? -1 : f.getTime() - g.getTime();
|
|
1432
1432
|
};
|
|
1433
1433
|
throw new TypeError(`Unsupported data type for key "${t}"`);
|
|
1434
1434
|
})();
|
|
1435
|
-
return o.sort((
|
|
1436
|
-
const m = n(
|
|
1435
|
+
return o.sort((d, u) => {
|
|
1436
|
+
const m = n(d, u);
|
|
1437
1437
|
return s ? -m : m;
|
|
1438
1438
|
}), o;
|
|
1439
1439
|
}, pt = (e) => {
|
|
@@ -1627,8 +1627,8 @@ function Io() {
|
|
|
1627
1627
|
return o && o.__esModule ? o : { default: o };
|
|
1628
1628
|
}
|
|
1629
1629
|
var r = function(a, n) {
|
|
1630
|
-
var
|
|
1631
|
-
return
|
|
1630
|
+
var d = (0, t.default)(a);
|
|
1631
|
+
return d.map(function() {
|
|
1632
1632
|
return n();
|
|
1633
1633
|
});
|
|
1634
1634
|
}, s = r;
|
|
@@ -1672,8 +1672,8 @@ function Gr() {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
});
|
|
1674
1674
|
var t = n(Ao()), i = n(Co()), r = n(So()), s = n(Oo()), o = n(Wr()), a = n(Io());
|
|
1675
|
-
function n(
|
|
1676
|
-
return
|
|
1675
|
+
function n(d) {
|
|
1676
|
+
return d && d.__esModule ? d : { default: d };
|
|
1677
1677
|
}
|
|
1678
1678
|
})(Ke)), Ke;
|
|
1679
1679
|
}
|
|
@@ -1750,8 +1750,8 @@ function Ro() {
|
|
|
1750
1750
|
return this.words[v];
|
|
1751
1751
|
}
|
|
1752
1752
|
}]), u;
|
|
1753
|
-
})(),
|
|
1754
|
-
e.default =
|
|
1753
|
+
})(), d = n;
|
|
1754
|
+
e.default = d;
|
|
1755
1755
|
})(Ve)), Ve;
|
|
1756
1756
|
}
|
|
1757
1757
|
var fr;
|
|
@@ -1774,7 +1774,7 @@ function Do() {
|
|
|
1774
1774
|
P.enumerable = P.enumerable || !1, P.configurable = !0, "value" in P && (P.writable = !0), Object.defineProperty(g, P.key, P);
|
|
1775
1775
|
}
|
|
1776
1776
|
}
|
|
1777
|
-
function
|
|
1777
|
+
function d(g, v, b) {
|
|
1778
1778
|
return v && n(g.prototype, v), Object.defineProperty(g, "prototype", { writable: !1 }), g;
|
|
1779
1779
|
}
|
|
1780
1780
|
function u(g, v, b) {
|
|
@@ -1787,7 +1787,7 @@ function Do() {
|
|
|
1787
1787
|
throw new Error("".concat(b, " is an invalid format. Please use ").concat(t.FORMATS.join(" or "), "."));
|
|
1788
1788
|
this.generator = new r.default(v);
|
|
1789
1789
|
}
|
|
1790
|
-
return
|
|
1790
|
+
return d(g, [{
|
|
1791
1791
|
key: "getLineEnding",
|
|
1792
1792
|
value: function() {
|
|
1793
1793
|
return this.suffix ? this.suffix : !(0, s.isReactNative)() && (0, s.isNode)() && (0, s.isWindows)() ? i.LINE_ENDINGS.WIN32 : i.LINE_ENDINGS.POSIX;
|
|
@@ -1842,7 +1842,7 @@ function To() {
|
|
|
1842
1842
|
return n && n.__esModule ? n : { default: n };
|
|
1843
1843
|
}
|
|
1844
1844
|
var a = function() {
|
|
1845
|
-
var
|
|
1845
|
+
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, u = d.count, m = u === void 0 ? 1 : u, f = d.format, g = f === void 0 ? t.FORMAT_PLAIN : f, v = d.paragraphLowerBound, b = v === void 0 ? 3 : v, P = d.paragraphUpperBound, K = P === void 0 ? 7 : P, wt = d.random, me = d.sentenceLowerBound, cs = me === void 0 ? 5 : me, ji = d.sentenceUpperBound, ds = ji === void 0 ? 15 : ji, ki = d.units, ps = ki === void 0 ? i.UNIT_SENTENCES : ki, Fi = d.words, us = Fi === void 0 ? r.WORDS : Fi, Mi = d.suffix, hs = Mi === void 0 ? "" : Mi, ms = {
|
|
1846
1846
|
random: wt,
|
|
1847
1847
|
sentencesPerParagraph: {
|
|
1848
1848
|
max: K,
|
|
@@ -2129,8 +2129,8 @@ const Vo = { attribute: !0, type: String, converter: Pe, reflect: !1, hasChanged
|
|
|
2129
2129
|
if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(i.name, e), r === "accessor") {
|
|
2130
2130
|
const { name: a } = i;
|
|
2131
2131
|
return { set(n) {
|
|
2132
|
-
const
|
|
2133
|
-
t.set.call(this, n), this.requestUpdate(a,
|
|
2132
|
+
const d = t.get.call(this);
|
|
2133
|
+
t.set.call(this, n), this.requestUpdate(a, d, e, !0, n);
|
|
2134
2134
|
}, init(n) {
|
|
2135
2135
|
return n !== void 0 && this.C(a, void 0, e, n), n;
|
|
2136
2136
|
} };
|
|
@@ -2138,8 +2138,8 @@ const Vo = { attribute: !0, type: String, converter: Pe, reflect: !1, hasChanged
|
|
|
2138
2138
|
if (r === "setter") {
|
|
2139
2139
|
const { name: a } = i;
|
|
2140
2140
|
return function(n) {
|
|
2141
|
-
const
|
|
2142
|
-
t.call(this, n), this.requestUpdate(a,
|
|
2141
|
+
const d = this[a];
|
|
2142
|
+
t.call(this, n), this.requestUpdate(a, d, e, !0, n);
|
|
2143
2143
|
};
|
|
2144
2144
|
}
|
|
2145
2145
|
throw Error("Unsupported decorator location: " + r);
|
|
@@ -2219,7 +2219,7 @@ class Z extends $i {
|
|
|
2219
2219
|
const s = i.getAttribute("navigation-subrouter"), o = i.getAttribute("navigation-resource"), a = i.getAttribute("navigation-rdf-type");
|
|
2220
2220
|
if (a) {
|
|
2221
2221
|
const n = window.orbit?.components?.filter(
|
|
2222
|
-
(
|
|
2222
|
+
(d) => d?.routeAttributes?.["rdf-type"] === a
|
|
2223
2223
|
);
|
|
2224
2224
|
n && (r = n[0]?.uniq);
|
|
2225
2225
|
}
|
|
@@ -2250,15 +2250,15 @@ class Z extends $i {
|
|
|
2250
2250
|
"@type": t["@type"],
|
|
2251
2251
|
"@context": t.serverContext,
|
|
2252
2252
|
_originalResource: t
|
|
2253
|
-
}, a = r.map(async (
|
|
2254
|
-
if (!s?.includes(
|
|
2255
|
-
let u = await t.get(
|
|
2256
|
-
return
|
|
2253
|
+
}, a = r.map(async (d) => {
|
|
2254
|
+
if (!s?.includes(d.key)) return;
|
|
2255
|
+
let u = await t.get(d.key);
|
|
2256
|
+
return d.expand && (u = await this._getProxyValue(u, i, r)), d.cast && (u = await d.cast(u)), { prop: d, value: u };
|
|
2257
2257
|
}), n = (await Promise.all(a)).filter(
|
|
2258
|
-
(
|
|
2258
|
+
(d) => d !== void 0
|
|
2259
2259
|
);
|
|
2260
|
-
for (const { prop:
|
|
2261
|
-
u !== void 0 && (o[
|
|
2260
|
+
for (const { prop: d, value: u } of n)
|
|
2261
|
+
u !== void 0 && (o[d.value] = u);
|
|
2262
2262
|
return await this._responseAdaptator(o);
|
|
2263
2263
|
}
|
|
2264
2264
|
async _hasCherryPickedProperties(t) {
|
|
@@ -2403,12 +2403,12 @@ class X extends Z {
|
|
|
2403
2403
|
);
|
|
2404
2404
|
if (r?.["dcat:dataset"]) {
|
|
2405
2405
|
const s = r["dcat:dataset"], o = Array.isArray(s) ? s : [s], a = r.participantId || r["edc:participantId"] || r["https://w3id.org/edc/v0.0.1/ns/participantId"], n = i.participantId || a;
|
|
2406
|
-
return o.map((
|
|
2406
|
+
return o.map((d) => (d._provider = {
|
|
2407
2407
|
name: i.name,
|
|
2408
2408
|
address: i.address,
|
|
2409
2409
|
color: i.color || "#1976d2",
|
|
2410
2410
|
participantId: n
|
|
2411
|
-
},
|
|
2411
|
+
}, d));
|
|
2412
2412
|
}
|
|
2413
2413
|
return [];
|
|
2414
2414
|
} catch {
|
|
@@ -2525,7 +2525,7 @@ class O extends xi {
|
|
|
2525
2525
|
const s = i.getAttribute("navigation-subrouter"), o = i.getAttribute("navigation-resource"), a = i.getAttribute("navigation-rdf-type");
|
|
2526
2526
|
if (a) {
|
|
2527
2527
|
const n = window.orbit?.components?.filter(
|
|
2528
|
-
(
|
|
2528
|
+
(d) => d?.routeAttributes?.["rdf-type"] === a
|
|
2529
2529
|
);
|
|
2530
2530
|
n && (r = n[0]?.uniq);
|
|
2531
2531
|
}
|
|
@@ -2771,19 +2771,19 @@ class na extends ko {
|
|
|
2771
2771
|
return;
|
|
2772
2772
|
const o = s.match(/(.*)\[(.*)\]/);
|
|
2773
2773
|
if (o) {
|
|
2774
|
-
const a = o[1], n = o[2],
|
|
2775
|
-
if (!Array.isArray(
|
|
2774
|
+
const a = o[1], n = o[2], d = r[a];
|
|
2775
|
+
if (!Array.isArray(d))
|
|
2776
2776
|
return;
|
|
2777
2777
|
if (n === "")
|
|
2778
|
-
return
|
|
2778
|
+
return d.length > 0 ? d : void 0;
|
|
2779
2779
|
const u = Number.parseInt(n, 10);
|
|
2780
|
-
return Number.isNaN(u) || u < 0 || u >=
|
|
2780
|
+
return Number.isNaN(u) || u < 0 || u >= d.length ? void 0 : r[a][u];
|
|
2781
2781
|
}
|
|
2782
2782
|
return r && r[s] !== "undefined" ? r[s] : void 0;
|
|
2783
2783
|
}, i);
|
|
2784
2784
|
}
|
|
2785
2785
|
renderTemplateWhenWith(t, i, r = this.object) {
|
|
2786
|
-
const s = (a, n) => Array.isArray(a) ? a.some((
|
|
2786
|
+
const s = (a, n) => Array.isArray(a) ? a.some((d) => n(d)) : n(a), o = t.filter(
|
|
2787
2787
|
(a) => s(a, (n) => wr.includes(n))
|
|
2788
2788
|
);
|
|
2789
2789
|
return t.filter(
|
|
@@ -3156,8 +3156,8 @@ class la {
|
|
|
3156
3156
|
* Render constraint as human-readable text
|
|
3157
3157
|
*/
|
|
3158
3158
|
renderConstraint(t) {
|
|
3159
|
-
const i = t["odrl:leftOperand"] || t.leftOperand || "", r = t["odrl:operator"] || t.operator || "", s = t["odrl:rightOperand"] || t.rightOperand || "", o = t["odrl:unit"] || t.unit, a = this.humanizeLeftOperand(i), n = this.humanizeOperator(r),
|
|
3160
|
-
return `${a} ${n} ${
|
|
3159
|
+
const i = t["odrl:leftOperand"] || t.leftOperand || "", r = t["odrl:operator"] || t.operator || "", s = t["odrl:rightOperand"] || t.rightOperand || "", o = t["odrl:unit"] || t.unit, a = this.humanizeLeftOperand(i), n = this.humanizeOperator(r), d = this.formatRightOperand(s, o);
|
|
3160
|
+
return `${a} ${n} ${d}`;
|
|
3161
3161
|
}
|
|
3162
3162
|
/**
|
|
3163
3163
|
* Get permissions from policy
|
|
@@ -3214,8 +3214,8 @@ class la {
|
|
|
3214
3214
|
✅ PERMISSIONS:`), i.forEach((o, a) => {
|
|
3215
3215
|
const n = this.extractAction(o["odrl:action"] || o.action || "");
|
|
3216
3216
|
t.push(` ${a + 1}. You MAY: ${n.join(", ")}`);
|
|
3217
|
-
const
|
|
3218
|
-
|
|
3217
|
+
const d = this.getConstraints(o);
|
|
3218
|
+
d.length > 0 && (t.push(" Conditions:"), d.forEach((m) => {
|
|
3219
3219
|
t.push(` - ${this.renderConstraint(m)}`);
|
|
3220
3220
|
}));
|
|
3221
3221
|
const u = this.getDuties(o);
|
|
@@ -3229,8 +3229,8 @@ class la {
|
|
|
3229
3229
|
❌ PROHIBITIONS:`), r.forEach((o, a) => {
|
|
3230
3230
|
const n = this.extractAction(o["odrl:action"] || o.action || "");
|
|
3231
3231
|
t.push(` ${a + 1}. You MUST NOT: ${n.join(", ")}`);
|
|
3232
|
-
const
|
|
3233
|
-
|
|
3232
|
+
const d = this.getConstraints(o);
|
|
3233
|
+
d.length > 0 && (t.push(" Conditions:"), d.forEach((u) => {
|
|
3234
3234
|
t.push(` - ${this.renderConstraint(u)}`);
|
|
3235
3235
|
}));
|
|
3236
3236
|
}));
|
|
@@ -3239,8 +3239,8 @@ class la {
|
|
|
3239
3239
|
⚠️ OBLIGATIONS:`), s.forEach((o, a) => {
|
|
3240
3240
|
const n = this.extractAction(o["odrl:action"] || o.action || "");
|
|
3241
3241
|
t.push(` ${a + 1}. You MUST: ${n.join(", ")}`);
|
|
3242
|
-
const
|
|
3243
|
-
|
|
3242
|
+
const d = this.getConstraints(o);
|
|
3243
|
+
d.length > 0 && (t.push(" Conditions:"), d.forEach((u) => {
|
|
3244
3244
|
t.push(` - ${this.renderConstraint(u)}`);
|
|
3245
3245
|
}));
|
|
3246
3246
|
})), t.join(`
|
|
@@ -3260,8 +3260,8 @@ class la {
|
|
|
3260
3260
|
n.length > 0 && (t.push('<ul class="odrl-constraints">'), n.forEach((u) => {
|
|
3261
3261
|
t.push(`<li>${this.renderConstraint(u)}</li>`);
|
|
3262
3262
|
}), t.push("</ul>"));
|
|
3263
|
-
const
|
|
3264
|
-
|
|
3263
|
+
const d = this.getDuties(o);
|
|
3264
|
+
d.length > 0 && (t.push('<div class="odrl-duties">You must also:</div>'), t.push('<ul class="odrl-duties-list">'), d.forEach((u) => {
|
|
3265
3265
|
const m = this.extractAction(u["odrl:action"] || u.action || "");
|
|
3266
3266
|
t.push(`<li>${m.join(", ")}</li>`);
|
|
3267
3267
|
}), t.push("</ul>")), t.push("</li>");
|
|
@@ -3271,8 +3271,8 @@ class la {
|
|
|
3271
3271
|
const a = this.extractAction(o["odrl:action"] || o.action || "");
|
|
3272
3272
|
t.push(`<li><strong>${a.join(", ")}</strong>`);
|
|
3273
3273
|
const n = this.getConstraints(o);
|
|
3274
|
-
n.length > 0 && (t.push('<ul class="odrl-constraints">'), n.forEach((
|
|
3275
|
-
t.push(`<li>${this.renderConstraint(
|
|
3274
|
+
n.length > 0 && (t.push('<ul class="odrl-constraints">'), n.forEach((d) => {
|
|
3275
|
+
t.push(`<li>${this.renderConstraint(d)}</li>`);
|
|
3276
3276
|
}), t.push("</ul>")), t.push("</li>");
|
|
3277
3277
|
}), t.push("</ul>"), t.push("</div>"));
|
|
3278
3278
|
const s = this.getObligations();
|
|
@@ -3280,8 +3280,8 @@ class la {
|
|
|
3280
3280
|
const a = this.extractAction(o["odrl:action"] || o.action || "");
|
|
3281
3281
|
t.push(`<li><strong>${a.join(", ")}</strong>`);
|
|
3282
3282
|
const n = this.getConstraints(o);
|
|
3283
|
-
n.length > 0 && (t.push('<ul class="odrl-constraints">'), n.forEach((
|
|
3284
|
-
t.push(`<li>${this.renderConstraint(
|
|
3283
|
+
n.length > 0 && (t.push('<ul class="odrl-constraints">'), n.forEach((d) => {
|
|
3284
|
+
t.push(`<li>${this.renderConstraint(d)}</li>`);
|
|
3285
3285
|
}), t.push("</ul>")), t.push("</li>");
|
|
3286
3286
|
}), t.push("</ul>"), t.push("</div>")), t.push("</div>"), t.join(`
|
|
3287
3287
|
`);
|
|
@@ -3797,7 +3797,7 @@ function $a(e, t) {
|
|
|
3797
3797
|
).find(
|
|
3798
3798
|
(a) => a.contractId === t
|
|
3799
3799
|
)) {
|
|
3800
|
-
const a = e["dcat:endpointUrl"], n = e.name || r || "Unknown Asset",
|
|
3800
|
+
const a = e["dcat:endpointUrl"], n = e.name || r || "Unknown Asset", d = n.toLowerCase().includes("index");
|
|
3801
3801
|
it.create({
|
|
3802
3802
|
assetId: r,
|
|
3803
3803
|
datasetId: e["@id"] || e.id || "",
|
|
@@ -3811,7 +3811,7 @@ function $a(e, t) {
|
|
|
3811
3811
|
state: "REQUESTED",
|
|
3812
3812
|
contractId: t,
|
|
3813
3813
|
// Index-specific fields
|
|
3814
|
-
isIndexAsset:
|
|
3814
|
+
isIndexAsset: d,
|
|
3815
3815
|
indexEndpointUrl: a
|
|
3816
3816
|
});
|
|
3817
3817
|
}
|
|
@@ -3831,7 +3831,7 @@ function wa(e, t, i) {
|
|
|
3831
3831
|
r
|
|
3832
3832
|
).find(
|
|
3833
3833
|
(m) => m.contractId === i || m.agreementId === t
|
|
3834
|
-
), n = e["dcat:endpointUrl"],
|
|
3834
|
+
), n = e["dcat:endpointUrl"], d = e.name || s || "Unknown Asset", u = d.toLowerCase().includes("index");
|
|
3835
3835
|
a ? it.updateState(a.id, "FINALIZED", {
|
|
3836
3836
|
agreementId: t,
|
|
3837
3837
|
contractId: i,
|
|
@@ -3840,7 +3840,7 @@ function wa(e, t, i) {
|
|
|
3840
3840
|
}) : it.create({
|
|
3841
3841
|
assetId: s,
|
|
3842
3842
|
datasetId: e["@id"] || e.id || "",
|
|
3843
|
-
assetName:
|
|
3843
|
+
assetName: d,
|
|
3844
3844
|
assetDescription: e.description,
|
|
3845
3845
|
providerName: e._provider?.name || "Unknown Provider",
|
|
3846
3846
|
providerAddress: e._provider?.address || "",
|
|
@@ -3866,7 +3866,7 @@ function ii(e, t, i, r) {
|
|
|
3866
3866
|
o,
|
|
3867
3867
|
s
|
|
3868
3868
|
).find(
|
|
3869
|
-
(
|
|
3869
|
+
(d) => d.contractId === t
|
|
3870
3870
|
);
|
|
3871
3871
|
n && it.updateState(n.id, i, { error: r });
|
|
3872
3872
|
} catch (s) {
|
|
@@ -3901,8 +3901,8 @@ function Pr(e) {
|
|
|
3901
3901
|
const o = e.target, a = [];
|
|
3902
3902
|
for (const n in e)
|
|
3903
3903
|
if (/^\d+$/.test(n)) {
|
|
3904
|
-
let
|
|
3905
|
-
o && !
|
|
3904
|
+
let d = e[n];
|
|
3905
|
+
o && !d.target && !d["odrl:target"] && (d = { ...d, target: o, "odrl:target": o }), a.push(d);
|
|
3906
3906
|
}
|
|
3907
3907
|
t = a, i = t.length > 0 ? t[0] : void 0;
|
|
3908
3908
|
} else
|
|
@@ -3919,29 +3919,29 @@ function Pa(e) {
|
|
|
3919
3919
|
return e && e.length > 1;
|
|
3920
3920
|
}
|
|
3921
3921
|
function Aa(e) {
|
|
3922
|
-
if (!e) return
|
|
3922
|
+
if (!e) return c`${l("No policy details available")}`;
|
|
3923
3923
|
const t = e["odrl:permission"], i = e["odrl:prohibition"], r = e["odrl:obligation"], s = t ? Array.isArray(t) ? t : [t] : [], o = i ? Array.isArray(i) ? i : [i] : [], a = r ? Array.isArray(r) ? r : [r] : [];
|
|
3924
|
-
return
|
|
3924
|
+
return c`${e["@id"] ? c`<div class="policy-detail">
|
|
3925
3925
|
<strong>${l("Policy ID:")}:</strong> ${e["@id"]}
|
|
3926
3926
|
</div>` : p}
|
|
3927
|
-
${e["@type"] ?
|
|
3927
|
+
${e["@type"] ? c`<div class="policy-detail">
|
|
3928
3928
|
<strong>${l("Type:")}:</strong> ${e["@type"]}
|
|
3929
3929
|
</div>` : p}
|
|
3930
|
-
${s.length > 0 ?
|
|
3930
|
+
${s.length > 0 ? c`<div class="policy-detail">
|
|
3931
3931
|
<strong>${l("Permissions:")}:</strong>
|
|
3932
3932
|
<ul>
|
|
3933
3933
|
${s.map(
|
|
3934
|
-
(n) =>
|
|
3934
|
+
(n) => c`
|
|
3935
3935
|
<li>
|
|
3936
3936
|
${l(
|
|
3937
3937
|
$`Action: ${n["odrl:action"]?.["@id"] || n["odrl:action"] || l("use")}`
|
|
3938
3938
|
)}
|
|
3939
3939
|
</li>
|
|
3940
|
-
${n["odrl:constraint"] ?
|
|
3941
|
-
(
|
|
3940
|
+
${n["odrl:constraint"] ? c`${(Array.isArray(n["odrl:constraint"]) ? n["odrl:constraint"] : [n["odrl:constraint"]]).map(
|
|
3941
|
+
(d) => c`
|
|
3942
3942
|
<li style="margin-left: 20px;">
|
|
3943
3943
|
${l(
|
|
3944
|
-
$`Constraint: ${
|
|
3944
|
+
$`Constraint: ${d["odrl:leftOperand"]} ${d["odrl:operator"]} ${d["odrl:rightOperand"]}`
|
|
3945
3945
|
)}
|
|
3946
3946
|
</li>
|
|
3947
3947
|
`
|
|
@@ -3950,11 +3950,11 @@ function Aa(e) {
|
|
|
3950
3950
|
)}
|
|
3951
3951
|
</ul>
|
|
3952
3952
|
</div>` : p}
|
|
3953
|
-
${o.length > 0 ?
|
|
3953
|
+
${o.length > 0 ? c`<div class="policy-detail">
|
|
3954
3954
|
<strong>${l("Prohibitions:")}:</strong>
|
|
3955
3955
|
<ul>
|
|
3956
3956
|
${o.map(
|
|
3957
|
-
(n) =>
|
|
3957
|
+
(n) => c`
|
|
3958
3958
|
<li>
|
|
3959
3959
|
${l(
|
|
3960
3960
|
$`Action: ${n["odrl:action"]?.["@id"] || n["odrl:action"] || l("unknown")}`
|
|
@@ -3964,11 +3964,11 @@ function Aa(e) {
|
|
|
3964
3964
|
)}
|
|
3965
3965
|
</ul>
|
|
3966
3966
|
</div>` : p}
|
|
3967
|
-
${a.length > 0 ?
|
|
3967
|
+
${a.length > 0 ? c`<div class="policy-detail">
|
|
3968
3968
|
<strong>${l("Obligations:")}:</strong>
|
|
3969
3969
|
<ul>
|
|
3970
3970
|
${a.map(
|
|
3971
|
-
(n) =>
|
|
3971
|
+
(n) => c`
|
|
3972
3972
|
<li>
|
|
3973
3973
|
${l(
|
|
3974
3974
|
$`Action: ${n["odrl:action"]?.["@id"] || n["odrl:action"] || l("unknown")}`
|
|
@@ -3978,10 +3978,10 @@ function Aa(e) {
|
|
|
3978
3978
|
)}
|
|
3979
3979
|
</ul>
|
|
3980
3980
|
</div>` : p}
|
|
3981
|
-
${e.target ?
|
|
3981
|
+
${e.target ? c`<div class="policy-detail">
|
|
3982
3982
|
<strong>${l("Target Asset:")}:</strong> ${e.target}
|
|
3983
3983
|
</div>` : p}
|
|
3984
|
-
${e.assigner ?
|
|
3984
|
+
${e.assigner ? c`<div class="policy-detail">
|
|
3985
3985
|
<strong>${l("Assigner:")}:</strong> ${e.assigner}
|
|
3986
3986
|
</div>` : p}`;
|
|
3987
3987
|
}
|
|
@@ -4025,31 +4025,31 @@ let Ce = class extends C {
|
|
|
4025
4025
|
render() {
|
|
4026
4026
|
if (!this.object) return p;
|
|
4027
4027
|
const e = this._getTags(), t = this._getFormattedDate();
|
|
4028
|
-
return
|
|
4028
|
+
return c`<article class="vertical">
|
|
4029
4029
|
<header
|
|
4030
4030
|
class="image"
|
|
4031
4031
|
style='background-image: url("${this._getThumbnail()}")'
|
|
4032
4032
|
></header>
|
|
4033
4033
|
<main>
|
|
4034
|
-
${t ?
|
|
4034
|
+
${t ? c`<div class="meta-info">
|
|
4035
4035
|
<span class="date">${t}</span>
|
|
4036
4036
|
</div>` : p}
|
|
4037
4037
|
<div class="content">
|
|
4038
|
-
${this.object?.name ?
|
|
4038
|
+
${this.object?.name ? c`<div class="card-header">
|
|
4039
4039
|
<tems-division
|
|
4040
4040
|
label=${this.object?.name}
|
|
4041
4041
|
type="h4"
|
|
4042
4042
|
></tems-division>
|
|
4043
4043
|
</div>` : p}
|
|
4044
|
-
${this.object?.description ?
|
|
4044
|
+
${this.object?.description ? c`<div class="card-content">
|
|
4045
4045
|
<tems-division
|
|
4046
4046
|
label=${this.object?.description}
|
|
4047
4047
|
type="body-m"
|
|
4048
4048
|
></tems-division>
|
|
4049
4049
|
</div>` : p}
|
|
4050
|
-
${e.length > 0 ?
|
|
4050
|
+
${e.length > 0 ? c`<div class="tags">
|
|
4051
4051
|
${e.map(
|
|
4052
|
-
(i) =>
|
|
4052
|
+
(i) => c`<tems-badge
|
|
4053
4053
|
size="sm"
|
|
4054
4054
|
label=${i.label}
|
|
4055
4055
|
type=${i.type}
|
|
@@ -4057,7 +4057,7 @@ let Ce = class extends C {
|
|
|
4057
4057
|
></tems-badge>`
|
|
4058
4058
|
)}
|
|
4059
4059
|
</div>` : p}
|
|
4060
|
-
${this.object.author ?
|
|
4060
|
+
${this.object.author ? c`<div class="meta-info">
|
|
4061
4061
|
<span class="author">${l("By")} ${this.object.author}</span>
|
|
4062
4062
|
</div>` : p}
|
|
4063
4063
|
</div>
|
|
@@ -4160,10 +4160,10 @@ let Ft = class extends xi {
|
|
|
4160
4160
|
}
|
|
4161
4161
|
}
|
|
4162
4162
|
render() {
|
|
4163
|
-
return !this._displayObjects || this._displayObjects.length === 0 ? p :
|
|
4163
|
+
return !this._displayObjects || this._displayObjects.length === 0 ? p : c`<div
|
|
4164
4164
|
class="card-grid${this.view === "card" ? " card-grid-vertical" : ""}"
|
|
4165
4165
|
>
|
|
4166
|
-
${this._displayObjects.map((e) =>
|
|
4166
|
+
${this._displayObjects.map((e) => c`<ds4go-card-dataspace-catalog
|
|
4167
4167
|
.object=${e}
|
|
4168
4168
|
type=${this.view === "card" ? "card" : "horizontal"}
|
|
4169
4169
|
@click=${() => this._handleClickEvent(e)}
|
|
@@ -4264,7 +4264,7 @@ let Y = class extends xi {
|
|
|
4264
4264
|
}
|
|
4265
4265
|
// matchId
|
|
4266
4266
|
renderFilterItemsById(e, t) {
|
|
4267
|
-
return e ?
|
|
4267
|
+
return e ? c`${G(
|
|
4268
4268
|
e.flatMap((i) => {
|
|
4269
4269
|
let r = i;
|
|
4270
4270
|
return t && (r = r[t], !r) ? [] : r;
|
|
@@ -4274,7 +4274,7 @@ let Y = class extends xi {
|
|
|
4274
4274
|
const r = !!this._internalFilters.find(
|
|
4275
4275
|
(s) => s.type === "matchId" && s.name === t && s.value === i["@id"]
|
|
4276
4276
|
);
|
|
4277
|
-
return
|
|
4277
|
+
return c`<tems-filter-item
|
|
4278
4278
|
label=${i.name}
|
|
4279
4279
|
type="checkbox"
|
|
4280
4280
|
count=${this.objects?.filter((s) => {
|
|
@@ -4303,7 +4303,7 @@ let Y = class extends xi {
|
|
|
4303
4303
|
const i = this._internalFilters.find(
|
|
4304
4304
|
(r) => r.type === "matchValue" && r.name === t
|
|
4305
4305
|
);
|
|
4306
|
-
return
|
|
4306
|
+
return c`
|
|
4307
4307
|
<tems-input-field
|
|
4308
4308
|
label=${l("Search for...")}
|
|
4309
4309
|
type="text"
|
|
@@ -4327,7 +4327,7 @@ let Y = class extends xi {
|
|
|
4327
4327
|
const i = this._internalFilters.find(
|
|
4328
4328
|
(r) => r.type === "dateAfter" && r.name === t
|
|
4329
4329
|
);
|
|
4330
|
-
return
|
|
4330
|
+
return c`
|
|
4331
4331
|
<tems-input-field
|
|
4332
4332
|
label=${l("Date after")}
|
|
4333
4333
|
type="date"
|
|
@@ -4347,24 +4347,24 @@ let Y = class extends xi {
|
|
|
4347
4347
|
renderFilterItemsByNumberRange(e, t) {
|
|
4348
4348
|
if (!e)
|
|
4349
4349
|
return p;
|
|
4350
|
-
const i = e.map((
|
|
4350
|
+
const i = e.map((d) => Number(d[t]) || 0).filter(Number.isFinite), r = i.length > 0 ? Math.min(...i) : 0, s = i.length > 0 ? Math.max(...i) : 0;
|
|
4351
4351
|
if (r === s)
|
|
4352
4352
|
return p;
|
|
4353
4353
|
const o = this._internalFilters.find(
|
|
4354
|
-
(
|
|
4354
|
+
(d) => d.type === "interval" && d.name === t
|
|
4355
4355
|
), a = o?.value?.split("/")[0] || r, n = o?.value?.split("/")[1] || s;
|
|
4356
|
-
return
|
|
4356
|
+
return c`
|
|
4357
4357
|
<tems-slider
|
|
4358
4358
|
type="multiple"
|
|
4359
4359
|
min=${r}
|
|
4360
4360
|
max=${s}
|
|
4361
4361
|
value=${a}
|
|
4362
4362
|
value-max=${n}
|
|
4363
|
-
@change=${(
|
|
4364
|
-
|
|
4363
|
+
@change=${(d) => {
|
|
4364
|
+
d.preventDefault(), this._internalFilters = this._internalFilters.filter(
|
|
4365
4365
|
(f) => !(f.type === "interval" && f.name === t)
|
|
4366
4366
|
);
|
|
4367
|
-
const u =
|
|
4367
|
+
const u = d.detail.min ?? 0, m = d.detail.max ?? 0;
|
|
4368
4368
|
this._internalFilters.push({
|
|
4369
4369
|
type: "interval",
|
|
4370
4370
|
name: t,
|
|
@@ -4391,7 +4391,7 @@ let Y = class extends xi {
|
|
|
4391
4391
|
}
|
|
4392
4392
|
render() {
|
|
4393
4393
|
const e = this._getFiltersDefinition();
|
|
4394
|
-
return
|
|
4394
|
+
return c`
|
|
4395
4395
|
<div>
|
|
4396
4396
|
<tems-search-bar
|
|
4397
4397
|
.displayFilters=${this.displayFiltering}
|
|
@@ -4408,7 +4408,7 @@ let Y = class extends xi {
|
|
|
4408
4408
|
@change-view=${this._toggleChangeView}
|
|
4409
4409
|
@toggle-filters=${this._displayFilters}
|
|
4410
4410
|
></tems-search-bar>
|
|
4411
|
-
${this.displayFilters ?
|
|
4411
|
+
${this.displayFilters ? c`<div
|
|
4412
4412
|
class="filter-bar"
|
|
4413
4413
|
@click=${this._hideFiltersFromBackground}
|
|
4414
4414
|
>
|
|
@@ -4423,7 +4423,7 @@ let Y = class extends xi {
|
|
|
4423
4423
|
let i = !0;
|
|
4424
4424
|
return t.type && typeof t.type == "string" ? i = this.hasType(t.type, this.objects) : t.type && Array.isArray(t.type) && (i = t.type.flat().some(
|
|
4425
4425
|
(s) => this.hasType(s, this.objects)
|
|
4426
|
-
)), i && t.condition() ?
|
|
4426
|
+
)), i && t.condition() ? c`<tems-vertical-accordion
|
|
4427
4427
|
label=${t.label}
|
|
4428
4428
|
.icon=${t.icon}
|
|
4429
4429
|
.open=${this._accordionStates[t.name] ?? !1}
|
|
@@ -4561,7 +4561,7 @@ let te = class extends ne {
|
|
|
4561
4561
|
));
|
|
4562
4562
|
}
|
|
4563
4563
|
render() {
|
|
4564
|
-
return !this._displayObjects || this._displayObjects.length === 0 ? p :
|
|
4564
|
+
return !this._displayObjects || this._displayObjects.length === 0 ? p : c`<div class="card-grid card-grid-vertical">
|
|
4565
4565
|
${this._displayObjects.map((e) => {
|
|
4566
4566
|
const t = [
|
|
4567
4567
|
{
|
|
@@ -4569,7 +4569,7 @@ let te = class extends ne {
|
|
|
4569
4569
|
type: "information"
|
|
4570
4570
|
}
|
|
4571
4571
|
];
|
|
4572
|
-
return
|
|
4572
|
+
return c`<ds4go-card-catalog
|
|
4573
4573
|
.object=${p}
|
|
4574
4574
|
type=${"vertical"}
|
|
4575
4575
|
.tags=${t}
|
|
@@ -4738,34 +4738,34 @@ let Mt = class extends C {
|
|
|
4738
4738
|
return e.sectorName && t.push({ name: pt(e.sectorName), type: "neutral" }), t;
|
|
4739
4739
|
}
|
|
4740
4740
|
render() {
|
|
4741
|
-
return !this._displayObjects || this._displayObjects.length === 0 ?
|
|
4741
|
+
return !this._displayObjects || this._displayObjects.length === 0 ? c`<p>
|
|
4742
4742
|
${l(
|
|
4743
4743
|
"No data available, data source may be temporarily unavailable."
|
|
4744
4744
|
)}
|
|
4745
4745
|
</p>
|
|
4746
|
-
${this.sectorId || this.catalogId ?
|
|
4746
|
+
${this.sectorId || this.catalogId ? c`<tems-button
|
|
4747
4747
|
type="primary"
|
|
4748
4748
|
label=${l("Back")}
|
|
4749
4749
|
@click=${this.parent._back}
|
|
4750
|
-
></tems-button>` :
|
|
4750
|
+
></tems-button>` : c`<tems-button
|
|
4751
4751
|
type="primary"
|
|
4752
4752
|
label=${l("Retry")}
|
|
4753
4753
|
@click=${this.parent.requestUpdate}
|
|
4754
|
-
></tems-button>`}` :
|
|
4755
|
-
${this.catalogId && this.catalogId !== "*" ?
|
|
4754
|
+
></tems-button>`}` : c`<div>
|
|
4755
|
+
${this.catalogId && this.catalogId !== "*" ? c`<tems-division type="body-m"
|
|
4756
4756
|
>${this._displayObjects["dct:description"]}</tems-division
|
|
4757
4757
|
>` : p}
|
|
4758
4758
|
<div class="card-grid card-grid-vertical">
|
|
4759
|
-
${this.catalogId ?
|
|
4760
|
-
(e) =>
|
|
4759
|
+
${this.catalogId ? c`${this._displayObjects["dcat:dataset"].map(
|
|
4760
|
+
(e) => c`<ds4go-card-catalog
|
|
4761
4761
|
.object=${p}
|
|
4762
4762
|
.header=${e["dct:title"] || p}
|
|
4763
4763
|
.content=${e["dct:description"] || p}
|
|
4764
4764
|
.tags=${this._getDatasetTags(e)}
|
|
4765
4765
|
.image=${this._getDatasetThumbnail(e)}
|
|
4766
4766
|
></ds4go-card-catalog>`
|
|
4767
|
-
)}` : this.sectorId ?
|
|
4768
|
-
(e) =>
|
|
4767
|
+
)}` : this.sectorId ? c`${this._displayObjects.map(
|
|
4768
|
+
(e) => c`<ds4go-card-catalog
|
|
4769
4769
|
class="cursor-pointer"
|
|
4770
4770
|
.object=${p}
|
|
4771
4771
|
.header=${e.catalogId || p}
|
|
@@ -4774,8 +4774,8 @@ let Mt = class extends C {
|
|
|
4774
4774
|
date=${M(e.lastUpdated) || p}
|
|
4775
4775
|
@click=${() => this.parent._selectCatalog(e.catalogId)}
|
|
4776
4776
|
></ds4go-card-catalog>`
|
|
4777
|
-
)}` :
|
|
4778
|
-
(e) =>
|
|
4777
|
+
)}` : c`${this._displayObjects.map(
|
|
4778
|
+
(e) => c`<ds4go-card-catalog
|
|
4779
4779
|
class="cursor-pointer"
|
|
4780
4780
|
.object=${p}
|
|
4781
4781
|
.header=${e.id || p}
|
|
@@ -4907,7 +4907,7 @@ let ee = class extends ne {
|
|
|
4907
4907
|
));
|
|
4908
4908
|
}
|
|
4909
4909
|
render() {
|
|
4910
|
-
return !this._displayObjects || this._displayObjects.length === 0 ? p :
|
|
4910
|
+
return !this._displayObjects || this._displayObjects.length === 0 ? p : c`<div class="card-grid card-grid-vertical">
|
|
4911
4911
|
${this._displayObjects.map((e) => {
|
|
4912
4912
|
const t = [
|
|
4913
4913
|
{
|
|
@@ -4918,7 +4918,7 @@ let ee = class extends ne {
|
|
|
4918
4918
|
return e.category && t.push({
|
|
4919
4919
|
name: e.category,
|
|
4920
4920
|
type: "default"
|
|
4921
|
-
}),
|
|
4921
|
+
}), c`<ds4go-card-catalog
|
|
4922
4922
|
.object=${p}
|
|
4923
4923
|
type=${"bill-image"}
|
|
4924
4924
|
.tags=${t}
|
|
@@ -5043,10 +5043,10 @@ let ie = class extends ne {
|
|
|
5043
5043
|
));
|
|
5044
5044
|
}
|
|
5045
5045
|
render() {
|
|
5046
|
-
return !this._displayObjects || this._displayObjects.length === 0 ? p :
|
|
5046
|
+
return !this._displayObjects || this._displayObjects.length === 0 ? p : c`<div class="card-grid card-grid-vertical">
|
|
5047
5047
|
${this._displayObjects.map((e) => {
|
|
5048
5048
|
const t = e;
|
|
5049
|
-
return
|
|
5049
|
+
return c`<ds4go-card-fact
|
|
5050
5050
|
.object=${p}
|
|
5051
5051
|
@click=${() => this._handleClickEvent(t)}
|
|
5052
5052
|
></ds4go-card-fact>`;
|
|
@@ -5096,7 +5096,7 @@ let re = class extends C {
|
|
|
5096
5096
|
if (!this.contractId || !this.agreementInfo)
|
|
5097
5097
|
return p;
|
|
5098
5098
|
const e = this.agreementInfo.timestamp ? new Date(this.agreementInfo.timestamp).toLocaleString() : null, t = this.offer?.["dcat:endpointUrl"];
|
|
5099
|
-
return
|
|
5099
|
+
return c`<div
|
|
5100
5100
|
style="margin-top: 24px; padding: 16px; background: #e8f5e9; border-radius: 8px;"
|
|
5101
5101
|
>
|
|
5102
5102
|
<tems-division type="h4"
|
|
@@ -5112,7 +5112,7 @@ let re = class extends C {
|
|
|
5112
5112
|
</div>
|
|
5113
5113
|
</div>
|
|
5114
5114
|
|
|
5115
|
-
${t ?
|
|
5115
|
+
${t ? c`
|
|
5116
5116
|
<div style="margin-bottom: 8px;">
|
|
5117
5117
|
<strong>🔗 ${l("Endpoint URL:")}</strong>
|
|
5118
5118
|
<div
|
|
@@ -5122,7 +5122,7 @@ let re = class extends C {
|
|
|
5122
5122
|
</div>
|
|
5123
5123
|
</div>
|
|
5124
5124
|
` : p}
|
|
5125
|
-
${e ?
|
|
5125
|
+
${e ? c`
|
|
5126
5126
|
<div style="opacity: 0.8; font-size: 0.85em;">
|
|
5127
5127
|
<strong>${l("Agreed on:")}</strong> ${e}
|
|
5128
5128
|
</div>
|
|
@@ -5142,7 +5142,7 @@ let re = class extends C {
|
|
|
5142
5142
|
</div>
|
|
5143
5143
|
</div>
|
|
5144
5144
|
|
|
5145
|
-
${this.agreementInfo ?
|
|
5145
|
+
${this.agreementInfo ? c`
|
|
5146
5146
|
<div
|
|
5147
5147
|
style="margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,0.1);"
|
|
5148
5148
|
>
|
|
@@ -5197,7 +5197,7 @@ let pi = class extends C {
|
|
|
5197
5197
|
);
|
|
5198
5198
|
}
|
|
5199
5199
|
render() {
|
|
5200
|
-
return
|
|
5200
|
+
return c`<div class="policy-selection-modal">
|
|
5201
5201
|
<div class="policy-selection-header">
|
|
5202
5202
|
<h3>${l("Select a Policy")}</h3>
|
|
5203
5203
|
<p>
|
|
@@ -5208,13 +5208,13 @@ let pi = class extends C {
|
|
|
5208
5208
|
</div>
|
|
5209
5209
|
<div class="policy-selection-list">
|
|
5210
5210
|
${this.policies.map(
|
|
5211
|
-
(e, t) =>
|
|
5211
|
+
(e, t) => c`<div
|
|
5212
5212
|
class="policy-option"
|
|
5213
5213
|
@click=${() => this._handlePolicySelect(t)}
|
|
5214
5214
|
>
|
|
5215
5215
|
<div class="policy-option-header">
|
|
5216
5216
|
<strong>${l("Policy")} ${t + 1}</strong>
|
|
5217
|
-
${e["@id"] ?
|
|
5217
|
+
${e["@id"] ? c`<code>${e["@id"]}</code>` : p}
|
|
5218
5218
|
</div>
|
|
5219
5219
|
<div class="policy-option-details">
|
|
5220
5220
|
${Aa(e)}
|
|
@@ -5245,10 +5245,10 @@ var Wa = Object.defineProperty, Ga = Object.getOwnPropertyDescriptor, Ri = (e, t
|
|
|
5245
5245
|
let Se = class extends C {
|
|
5246
5246
|
render() {
|
|
5247
5247
|
const e = Pa(this.policies || []), t = this.policies || [];
|
|
5248
|
-
return !this.policy && (!this.policies || this.policies.length === 0) ? p :
|
|
5248
|
+
return !this.policy && (!this.policies || this.policies.length === 0) ? p : c`<div
|
|
5249
5249
|
style="margin-top: 24px; padding: 16px; background: #f0f7ff; border-radius: 8px; border: 1px solid #d0e7ff;"
|
|
5250
5250
|
>
|
|
5251
|
-
${e ?
|
|
5251
|
+
${e ? c`<tems-division type="h4"
|
|
5252
5252
|
><div>${l("Access Policies")}</div></tems-division
|
|
5253
5253
|
>
|
|
5254
5254
|
<div style="margin-bottom: 12px; color: #0066cc; font-size: 0.9em;">
|
|
@@ -5256,14 +5256,14 @@ let Se = class extends C {
|
|
|
5256
5256
|
(${t.length})
|
|
5257
5257
|
</div>
|
|
5258
5258
|
${t.map(
|
|
5259
|
-
(i, r) =>
|
|
5259
|
+
(i, r) => c`<div
|
|
5260
5260
|
style="margin-bottom: 16px; padding: 12px; background: white; border-radius: 6px; border-left: 4px solid #0066cc;"
|
|
5261
5261
|
>
|
|
5262
5262
|
<div
|
|
5263
5263
|
style="font-weight: 600; margin-bottom: 8px; color: #333;"
|
|
5264
5264
|
>
|
|
5265
5265
|
${l("Policy")} ${r + 1}
|
|
5266
|
-
${i["@id"] ?
|
|
5266
|
+
${i["@id"] ? c`<span
|
|
5267
5267
|
style="font-weight: normal; font-size: 0.85em; color: #666; display: block; margin-top: 4px; word-break: break-all; font-family: monospace;"
|
|
5268
5268
|
>
|
|
5269
5269
|
${i["@id"]}
|
|
@@ -5271,7 +5271,7 @@ let Se = class extends C {
|
|
|
5271
5271
|
</div>
|
|
5272
5272
|
<odrl-policy-viewer .policy=${i}></odrl-policy-viewer>
|
|
5273
5273
|
</div>`
|
|
5274
|
-
)}` :
|
|
5274
|
+
)}` : c`<tems-division type="h4"
|
|
5275
5275
|
><div>${l("Access Policy")}</div></tems-division
|
|
5276
5276
|
>
|
|
5277
5277
|
<odrl-policy-viewer .policy=${this.policy}></odrl-policy-viewer>`}
|
|
@@ -5315,31 +5315,31 @@ let st = class extends C {
|
|
|
5315
5315
|
}
|
|
5316
5316
|
render() {
|
|
5317
5317
|
if (!(this.dspStore !== void 0 && this.dspStore !== null))
|
|
5318
|
-
return
|
|
5318
|
+
return c`<tems-button disabled=""
|
|
5319
5319
|
>${l("Activate this service")}</tems-button
|
|
5320
5320
|
>`;
|
|
5321
5321
|
switch (this.negotiationStatus) {
|
|
5322
5322
|
case "idle":
|
|
5323
|
-
return
|
|
5323
|
+
return c`<tems-button @click=${this._handleNegotiate}
|
|
5324
5324
|
>${l("Negotiate access")}</tems-button
|
|
5325
5325
|
>`;
|
|
5326
5326
|
case "negotiating":
|
|
5327
|
-
return
|
|
5327
|
+
return c`<tems-button disabled="">
|
|
5328
5328
|
${l("Negotiating...")}
|
|
5329
5329
|
</tems-button>`;
|
|
5330
5330
|
case "pending":
|
|
5331
|
-
return
|
|
5331
|
+
return c`<tems-button disabled="">
|
|
5332
5332
|
${this.currentState || l("Pending")}
|
|
5333
5333
|
${this.attempt ? `(${this.attempt}/${this.maxAttempts})` : ""}
|
|
5334
5334
|
</tems-button>`;
|
|
5335
5335
|
case "granted":
|
|
5336
|
-
return
|
|
5336
|
+
return c`
|
|
5337
5337
|
<tems-button disabled="" type="success">
|
|
5338
5338
|
✅ ${l("Access Granted")}
|
|
5339
5339
|
</tems-button>
|
|
5340
5340
|
`;
|
|
5341
5341
|
case "failed":
|
|
5342
|
-
return
|
|
5342
|
+
return c`<div
|
|
5343
5343
|
style="display: flex; flex-direction: column; gap: 8px;"
|
|
5344
5344
|
>
|
|
5345
5345
|
<tems-button disabled="" type="error">
|
|
@@ -5351,7 +5351,7 @@ let st = class extends C {
|
|
|
5351
5351
|
</tems-button>
|
|
5352
5352
|
</div>`;
|
|
5353
5353
|
default:
|
|
5354
|
-
return
|
|
5354
|
+
return c`<tems-button disabled=""
|
|
5355
5355
|
>${l("Activate this service")}</tems-button
|
|
5356
5356
|
>`;
|
|
5357
5357
|
}
|
|
@@ -5413,29 +5413,29 @@ let J = class extends C {
|
|
|
5413
5413
|
const i = this.policies?.filter(
|
|
5414
5414
|
(r) => r["@id"] === this.agreement?.policy?.["@id"]
|
|
5415
5415
|
);
|
|
5416
|
-
return
|
|
5416
|
+
return c`<div class="contract-section">
|
|
5417
5417
|
<div class="contract-header">
|
|
5418
5418
|
<tems-division type="h5">${l("Contract Agreement")}</tems-division>
|
|
5419
5419
|
<tems-division type="body-sm"
|
|
5420
5420
|
>${e.split("/").pop()}</tems-division
|
|
5421
5421
|
>
|
|
5422
|
-
${this.agreement.contractSigningDate ?
|
|
5422
|
+
${this.agreement.contractSigningDate ? c`<tems-division type="body-sm"
|
|
5423
5423
|
>${l("Signed")}:
|
|
5424
5424
|
${new Date(
|
|
5425
5425
|
this.agreement.contractSigningDate
|
|
5426
5426
|
).toLocaleString()}</tems-division
|
|
5427
5427
|
>` : p}
|
|
5428
|
-
${this.agreement.consumerId ?
|
|
5428
|
+
${this.agreement.consumerId ? c`<tems-division type="body-sm"
|
|
5429
5429
|
>${l("Consumer")}:
|
|
5430
5430
|
${this.agreement.consumerId.split("/").pop()}</tems-division
|
|
5431
5431
|
>` : p}
|
|
5432
|
-
${this.agreement.providerId ?
|
|
5432
|
+
${this.agreement.providerId ? c`<tems-division type="body-sm"
|
|
5433
5433
|
>${l("Provider")}:
|
|
5434
5434
|
${this.agreement.providerId.split("/").pop()}</tems-division
|
|
5435
5435
|
>` : p}
|
|
5436
5436
|
</div>
|
|
5437
5437
|
|
|
5438
|
-
${t ?
|
|
5438
|
+
${t ? c`<div class="contract-subsection">
|
|
5439
5439
|
<div
|
|
5440
5440
|
class="collapsible-header"
|
|
5441
5441
|
@click=${() => this._toggleSection("assets")}
|
|
@@ -5458,7 +5458,7 @@ let J = class extends C {
|
|
|
5458
5458
|
<tems-division type="body-xs"
|
|
5459
5459
|
>${t.dataAddress?.baseUrl || l("No base URL")}</tems-division
|
|
5460
5460
|
>
|
|
5461
|
-
${t.dataAddress?.type ?
|
|
5461
|
+
${t.dataAddress?.type ? c`<tems-division type="body-xs"
|
|
5462
5462
|
>${l("Type")}:
|
|
5463
5463
|
${t.dataAddress.type}</tems-division
|
|
5464
5464
|
>` : p}
|
|
@@ -5466,7 +5466,7 @@ let J = class extends C {
|
|
|
5466
5466
|
</div>
|
|
5467
5467
|
</div>
|
|
5468
5468
|
</div>` : p}
|
|
5469
|
-
${this.agreement.relatedBundle ?
|
|
5469
|
+
${this.agreement.relatedBundle ? c`<div class="contract-subsection">
|
|
5470
5470
|
<div
|
|
5471
5471
|
class="collapsible-header"
|
|
5472
5472
|
@click=${() => this._toggleSection("facts")}
|
|
@@ -5486,7 +5486,7 @@ let J = class extends C {
|
|
|
5486
5486
|
>${l("Bundle")}:
|
|
5487
5487
|
${this.agreement.relatedBundle.name || this.agreement.relatedBundle["@id"].split("/").pop()}</tems-division
|
|
5488
5488
|
>
|
|
5489
|
-
${this.agreement.relatedBundle.description ?
|
|
5489
|
+
${this.agreement.relatedBundle.description ? c`<tems-division type="body-sm"
|
|
5490
5490
|
>${this.agreement.relatedBundle.description}</tems-division
|
|
5491
5491
|
>` : p}
|
|
5492
5492
|
</div>
|
|
@@ -5506,7 +5506,7 @@ let J = class extends C {
|
|
|
5506
5506
|
type: "information"
|
|
5507
5507
|
});
|
|
5508
5508
|
}
|
|
5509
|
-
return
|
|
5509
|
+
return c`<ds4go-card-catalog
|
|
5510
5510
|
.object=${p}
|
|
5511
5511
|
.tags=${s}
|
|
5512
5512
|
.header=${r.name || p}
|
|
@@ -5517,7 +5517,7 @@ let J = class extends C {
|
|
|
5517
5517
|
</div>
|
|
5518
5518
|
</div>
|
|
5519
5519
|
</div>` : p}
|
|
5520
|
-
${i && i.length > 0 ?
|
|
5520
|
+
${i && i.length > 0 ? c`<div class="contract-subsection">
|
|
5521
5521
|
<div
|
|
5522
5522
|
class="collapsible-header"
|
|
5523
5523
|
@click=${() => this._toggleSection("policies")}
|
|
@@ -5531,7 +5531,7 @@ let J = class extends C {
|
|
|
5531
5531
|
class="collapsible-content ${this.expandedPolicies ? "expanded" : ""}"
|
|
5532
5532
|
>
|
|
5533
5533
|
${i.map(
|
|
5534
|
-
(r) =>
|
|
5534
|
+
(r) => c`<ds4go-odrl-policy-modal-part
|
|
5535
5535
|
.policy=${r}
|
|
5536
5536
|
></ds4go-odrl-policy-modal-part>`
|
|
5537
5537
|
)}
|
|
@@ -5664,13 +5664,13 @@ let I = class extends na {
|
|
|
5664
5664
|
"No participant ID configured. Please provide participant-id attribute."
|
|
5665
5665
|
);
|
|
5666
5666
|
this.negotiationStatus = "negotiating", this.negotiationError = void 0, this.requestUpdate();
|
|
5667
|
-
const
|
|
5667
|
+
const d = await e.negotiateContract(
|
|
5668
5668
|
i,
|
|
5669
5669
|
s,
|
|
5670
5670
|
n,
|
|
5671
5671
|
r
|
|
5672
5672
|
);
|
|
5673
|
-
this.negotiationId =
|
|
5673
|
+
this.negotiationId = d, this.negotiationStatus = "pending", this.requestUpdate(), $a(t, d), await this._pollNegotiationStatus(e, d);
|
|
5674
5674
|
} catch (e) {
|
|
5675
5675
|
if (console.error("Contract negotiation failed:", e), this.negotiationStatus = "failed", this.negotiationError = e.message, this.negotiationId) {
|
|
5676
5676
|
const t = this.object;
|
|
@@ -5692,11 +5692,11 @@ let I = class extends na {
|
|
|
5692
5692
|
try {
|
|
5693
5693
|
const a = await e.getNegotiationStatus(t);
|
|
5694
5694
|
if (this.currentState = a.state, this.attempt = o + 1, this.maxAttempts = 8, this.requestUpdate(), a.state === "FINALIZED" || a.state === "AGREED") {
|
|
5695
|
-
const n = this.object,
|
|
5695
|
+
const n = this.object, d = n._provider?.participantId || this.counterPartyId || this.participantId || "";
|
|
5696
5696
|
try {
|
|
5697
5697
|
const u = await e.getContractAgreement(
|
|
5698
5698
|
t,
|
|
5699
|
-
|
|
5699
|
+
d
|
|
5700
5700
|
);
|
|
5701
5701
|
this.contractId = u ? u["@id"] : a.contractAgreementId || t;
|
|
5702
5702
|
} catch (u) {
|
|
@@ -5751,14 +5751,14 @@ let I = class extends na {
|
|
|
5751
5751
|
const e = this.object, { policies: t, defaultPolicy: i } = Pr(
|
|
5752
5752
|
e["odrl:hasPolicy"]
|
|
5753
5753
|
);
|
|
5754
|
-
return
|
|
5754
|
+
return c`<div class="modal">
|
|
5755
5755
|
<div class="topbar">
|
|
5756
5756
|
<tems-button
|
|
5757
5757
|
@click=${this._closeModal}
|
|
5758
5758
|
type="outline-gray"
|
|
5759
|
-
.iconLeft=${
|
|
5759
|
+
.iconLeft=${c`<icon-material-symbols-close-rounded></icon-material-symbols-close-rounded>`}
|
|
5760
5760
|
></tems-button>
|
|
5761
|
-
${this.showPolicySelection ? p :
|
|
5761
|
+
${this.showPolicySelection ? p : c`<catalog-modal-negotiation-button
|
|
5762
5762
|
.dspStore=${this.dspStore}
|
|
5763
5763
|
.showPolicySelection=${this.showPolicySelection}
|
|
5764
5764
|
.negotiationStatus=${this.negotiationStatus}
|
|
@@ -5773,14 +5773,14 @@ let I = class extends na {
|
|
|
5773
5773
|
<div class="modal-content-wrapper">
|
|
5774
5774
|
<div class="modal-box">
|
|
5775
5775
|
<div class="modal-content">
|
|
5776
|
-
${this.showPolicySelection ?
|
|
5776
|
+
${this.showPolicySelection ? c`<catalog-modal-policy-selection
|
|
5777
5777
|
.policies=${t}
|
|
5778
5778
|
@policy-selected=${this._handlePolicySelected}
|
|
5779
5779
|
@policy-cancel=${this._handlePolicyCancel}
|
|
5780
|
-
></catalog-modal-policy-selection>` :
|
|
5780
|
+
></catalog-modal-policy-selection>` : c`<tems-division type="h2"
|
|
5781
5781
|
><div>${e.name || ""}</div></tems-division
|
|
5782
5782
|
>
|
|
5783
|
-
${e.description ?
|
|
5783
|
+
${e.description ? c`<tems-division type="body-m"
|
|
5784
5784
|
><div>${e.description}</div></tems-division
|
|
5785
5785
|
>` : p}
|
|
5786
5786
|
<div class="multiple-columns flex flex-row flex-1">
|
|
@@ -6050,13 +6050,13 @@ let z = class extends k {
|
|
|
6050
6050
|
}
|
|
6051
6051
|
render() {
|
|
6052
6052
|
return this._getResource.render({
|
|
6053
|
-
pending: () =>
|
|
6054
|
-
complete: (e) => e ?
|
|
6053
|
+
pending: () => c`<solid-loader></solid-loader>`,
|
|
6054
|
+
complete: (e) => e ? c`<div class="modal">
|
|
6055
6055
|
<div class="topbar">
|
|
6056
6056
|
<tems-button
|
|
6057
6057
|
@click=${this._closeModal}
|
|
6058
6058
|
type="outline-gray"
|
|
6059
|
-
.iconLeft=${
|
|
6059
|
+
.iconLeft=${c`<icon-material-symbols-close-rounded></icon-material-symbols-close-rounded>`}
|
|
6060
6060
|
></tems-button>
|
|
6061
6061
|
</div>
|
|
6062
6062
|
<div class="modal-content-wrapper">
|
|
@@ -6070,19 +6070,19 @@ let z = class extends k {
|
|
|
6070
6070
|
${e.participant_id ? l($`Participant ID: ${String(e.participant_id)}`) : ""}
|
|
6071
6071
|
</div></tems-division
|
|
6072
6072
|
>
|
|
6073
|
-
${e.balance !== void 0 && e.balance !== null ?
|
|
6073
|
+
${e.balance !== void 0 && e.balance !== null ? c`<tems-division type="body-m"
|
|
6074
6074
|
><div>
|
|
6075
6075
|
${l($`Balance: ${String(e.balance)}`)}
|
|
6076
6076
|
</div></tems-division
|
|
6077
6077
|
>` : p}
|
|
6078
|
-
${this.providerNegotiations && this.providerNegotiations.length > 0 ?
|
|
6078
|
+
${this.providerNegotiations && this.providerNegotiations.length > 0 ? c`<tems-division type="h4"
|
|
6079
6079
|
><div>
|
|
6080
6080
|
${l("Provider Negotiations")}
|
|
6081
6081
|
</div></tems-division
|
|
6082
6082
|
>
|
|
6083
6083
|
<div class="card-grid card-grid-vertical">
|
|
6084
6084
|
${this.providerNegotiations.map(
|
|
6085
|
-
(t) =>
|
|
6085
|
+
(t) => c`<ds4go-card-catalog
|
|
6086
6086
|
.object=${p}
|
|
6087
6087
|
.header=${t["@id"].split("/").pop()}
|
|
6088
6088
|
.content=${t.agreement ? `Agreement: ${t.agreement["@id"].split("/").pop()}` : l("No agreement")}
|
|
@@ -6093,14 +6093,14 @@ let z = class extends k {
|
|
|
6093
6093
|
></ds4go-card-catalog>`
|
|
6094
6094
|
)}
|
|
6095
6095
|
</div>` : p}
|
|
6096
|
-
${this.consumerNegotiations && this.consumerNegotiations.length > 0 ?
|
|
6096
|
+
${this.consumerNegotiations && this.consumerNegotiations.length > 0 ? c`<tems-division type="h4"
|
|
6097
6097
|
><div>
|
|
6098
6098
|
${l("Customer Negotiations")}
|
|
6099
6099
|
</div></tems-division
|
|
6100
6100
|
>
|
|
6101
6101
|
<div class="card-grid card-grid-vertical">
|
|
6102
6102
|
${this.consumerNegotiations.map(
|
|
6103
|
-
(t) =>
|
|
6103
|
+
(t) => c`<ds4go-card-catalog
|
|
6104
6104
|
.object=${p}
|
|
6105
6105
|
.header=${t["@id"].split("/").pop()}
|
|
6106
6106
|
.content=${t.agreement ? `Agreement: ${t.agreement["@id"].split("/").pop()}` : l("No agreement")}
|
|
@@ -6111,11 +6111,11 @@ let z = class extends k {
|
|
|
6111
6111
|
></ds4go-card-catalog>`
|
|
6112
6112
|
)}
|
|
6113
6113
|
</div>` : p}
|
|
6114
|
-
${this.consumerAgreements && this.consumerAgreements.length > 0 ?
|
|
6114
|
+
${this.consumerAgreements && this.consumerAgreements.length > 0 ? c`<tems-division type="h4"
|
|
6115
6115
|
><div>${l("Customer Agreements")}</div></tems-division
|
|
6116
6116
|
>
|
|
6117
6117
|
${this.consumerAgreements.map(
|
|
6118
|
-
(t) =>
|
|
6118
|
+
(t) => c`<ds4go-customer-contract-modal-part
|
|
6119
6119
|
.agreement=${t}
|
|
6120
6120
|
.assets=${this.assets}
|
|
6121
6121
|
.bundles=${this.bundles}
|
|
@@ -6230,13 +6230,13 @@ let ot = class extends k {
|
|
|
6230
6230
|
}
|
|
6231
6231
|
render() {
|
|
6232
6232
|
return this._getResource.render({
|
|
6233
|
-
pending: () =>
|
|
6234
|
-
complete: (e) => e ?
|
|
6233
|
+
pending: () => c`<solid-loader></solid-loader>`,
|
|
6234
|
+
complete: (e) => e ? c`<div class="modal">
|
|
6235
6235
|
<div class="topbar">
|
|
6236
6236
|
<tems-button
|
|
6237
6237
|
@click=${this._closeModal}
|
|
6238
6238
|
type="outline-gray"
|
|
6239
|
-
.iconLeft=${
|
|
6239
|
+
.iconLeft=${c`<icon-material-symbols-close-rounded></icon-material-symbols-close-rounded>`}
|
|
6240
6240
|
></tems-button>
|
|
6241
6241
|
</div>
|
|
6242
6242
|
<div class="modal-content-wrapper">
|
|
@@ -6264,7 +6264,7 @@ let ot = class extends k {
|
|
|
6264
6264
|
type: "information"
|
|
6265
6265
|
});
|
|
6266
6266
|
}
|
|
6267
|
-
return
|
|
6267
|
+
return c`<ds4go-card-catalog
|
|
6268
6268
|
.object=${p}
|
|
6269
6269
|
.tags=${i}
|
|
6270
6270
|
.header=${t.name || p}
|
|
@@ -6283,22 +6283,22 @@ let ot = class extends k {
|
|
|
6283
6283
|
</div>
|
|
6284
6284
|
</div></tems-division
|
|
6285
6285
|
>
|
|
6286
|
-
${this.contracts && this.contracts.length > 0 || this.negotiations && this.negotiations.length > 0 ?
|
|
6286
|
+
${this.contracts && this.contracts.length > 0 || this.negotiations && this.negotiations.length > 0 ? c`<tems-button
|
|
6287
6287
|
@click=${this._toggleTechnicalInfo}
|
|
6288
6288
|
type="outline-gray"
|
|
6289
6289
|
label=${this.showTechnicalInfo ? l("Hide Technical Informations") : l("Show Technical Informations")}
|
|
6290
6290
|
></tems-button>
|
|
6291
|
-
${this.showTechnicalInfo ?
|
|
6291
|
+
${this.showTechnicalInfo ? c`<tems-division type="h4"
|
|
6292
6292
|
>${l("Technical informations")}</tems-division
|
|
6293
6293
|
>
|
|
6294
|
-
${this.contracts && this.contracts.length > 0 ?
|
|
6295
|
-
(t) =>
|
|
6294
|
+
${this.contracts && this.contracts.length > 0 ? c`${this.contracts.map(
|
|
6295
|
+
(t) => c`<ds4go-contract-modal-part
|
|
6296
6296
|
.contract=${t}
|
|
6297
6297
|
.assets=${this.assets}
|
|
6298
6298
|
.policies=${this.policies}
|
|
6299
6299
|
></ds4go-contract-modal-part>`
|
|
6300
6300
|
)}` : p}
|
|
6301
|
-
${this.negotiations && this.negotiations.length > 0 ?
|
|
6301
|
+
${this.negotiations && this.negotiations.length > 0 ? c`<ds4go-negotiations-modal-part
|
|
6302
6302
|
.negotiations=${this.negotiations}
|
|
6303
6303
|
.assets=${this.assets}
|
|
6304
6304
|
.type=${"PROVIDER"}
|
|
@@ -6416,7 +6416,7 @@ You will be charged 5€ on your account.`
|
|
|
6416
6416
|
}
|
|
6417
6417
|
render() {
|
|
6418
6418
|
return this._getResource.render({
|
|
6419
|
-
pending: () =>
|
|
6419
|
+
pending: () => c`<solid-loader></solid-loader>`,
|
|
6420
6420
|
complete: (e) => {
|
|
6421
6421
|
if (!e)
|
|
6422
6422
|
return this._closeModal(), p;
|
|
@@ -6428,12 +6428,12 @@ You will be charged 5€ on your account.`
|
|
|
6428
6428
|
minute: "2-digit",
|
|
6429
6429
|
hour12: !1
|
|
6430
6430
|
});
|
|
6431
|
-
return
|
|
6431
|
+
return c`<div class="modal">
|
|
6432
6432
|
<div class="topbar">
|
|
6433
6433
|
<tems-button
|
|
6434
6434
|
@click=${this._closeModal}
|
|
6435
6435
|
type="outline-gray"
|
|
6436
|
-
.iconLeft=${
|
|
6436
|
+
.iconLeft=${c`<icon-material-symbols-close-rounded></icon-material-symbols-close-rounded>`}
|
|
6437
6437
|
></tems-button>
|
|
6438
6438
|
<tems-button
|
|
6439
6439
|
@click=${this._generateVideo}
|
|
@@ -6444,10 +6444,10 @@ You will be charged 5€ on your account.`
|
|
|
6444
6444
|
<div class="modal-content-wrapper">
|
|
6445
6445
|
<div class="modal-box">
|
|
6446
6446
|
<div class="modal-content">
|
|
6447
|
-
${e.enclosure ?
|
|
6447
|
+
${e.enclosure ? c`<div class="cover-image">
|
|
6448
6448
|
<img src=${String(e.enclosure)} alt="Cover image" />
|
|
6449
6449
|
</div>` : p}
|
|
6450
|
-
${e.author ?
|
|
6450
|
+
${e.author ? c`<tems-division type="body-sm" class="author-section">
|
|
6451
6451
|
<div>
|
|
6452
6452
|
${l("Published on")} ${t} | ${l("By")}
|
|
6453
6453
|
${String(e.author)}
|
|
@@ -6459,20 +6459,20 @@ You will be charged 5€ on your account.`
|
|
|
6459
6459
|
<tems-division type="body-m"
|
|
6460
6460
|
><div>${String(e.description || "")}</div></tems-division
|
|
6461
6461
|
>
|
|
6462
|
-
${e.link ?
|
|
6462
|
+
${e.link ? c`<tems-division type="body-sm">
|
|
6463
6463
|
<tems-button
|
|
6464
6464
|
type="outline-color"
|
|
6465
6465
|
.label=${l("Open link on a new tab")}
|
|
6466
6466
|
@click=${() => window.open(String(e.link), "_blank")}
|
|
6467
6467
|
></tems-button>
|
|
6468
6468
|
</tems-division>` : p}
|
|
6469
|
-
${(e.medias || []).length > 0 ?
|
|
6469
|
+
${(e.medias || []).length > 0 ? c`<tems-division type="h4"
|
|
6470
6470
|
>${l("Media files")}</tems-division
|
|
6471
6471
|
>
|
|
6472
6472
|
<div class="medias-gallery">
|
|
6473
6473
|
${(e.medias || []).map(
|
|
6474
|
-
(i) =>
|
|
6475
|
-
${i.url ?
|
|
6474
|
+
(i) => c`<div class="media-item">
|
|
6475
|
+
${i.url ? c`<img
|
|
6476
6476
|
src=${String(i.url)}
|
|
6477
6477
|
alt=${i.description || "Media"}
|
|
6478
6478
|
@click=${() => window.open(String(i.url), "_blank")}
|
|
@@ -6480,12 +6480,12 @@ You will be charged 5€ on your account.`
|
|
|
6480
6480
|
</div>`
|
|
6481
6481
|
)}
|
|
6482
6482
|
</div>` : p}
|
|
6483
|
-
${(e.categories || []).length > 0 ?
|
|
6483
|
+
${(e.categories || []).length > 0 ? c`<tems-division type="h4"
|
|
6484
6484
|
>${l("Categories")}</tems-division
|
|
6485
6485
|
>
|
|
6486
6486
|
<div class="categories-list">
|
|
6487
6487
|
${(e.categories || []).map(
|
|
6488
|
-
(i) =>
|
|
6488
|
+
(i) => c`<tems-badge type="neutral" size="sm"
|
|
6489
6489
|
>${pt(String(i.name))}</tems-badge
|
|
6490
6490
|
>`
|
|
6491
6491
|
)}
|
|
@@ -6535,13 +6535,13 @@ let ht = class extends C {
|
|
|
6535
6535
|
) : this.contract.assetsSelector.operandRight === r["@id"] : !1), i = this.policies?.filter(
|
|
6536
6536
|
(r) => r["@id"] === this.contract?.accessPolicyId || r["@id"] === this.contract?.contractPolicyId
|
|
6537
6537
|
);
|
|
6538
|
-
return
|
|
6538
|
+
return c`<div class="contract-section">
|
|
6539
6539
|
<div class="contract-header">
|
|
6540
6540
|
<tems-division type="h5">${l("Contract")}</tems-division>
|
|
6541
6541
|
<tems-division type="body-sm"
|
|
6542
6542
|
>${e.split("/").pop()}</tems-division
|
|
6543
6543
|
>
|
|
6544
|
-
${this.contract.createdAt ?
|
|
6544
|
+
${this.contract.createdAt ? c`<tems-division type="body-sm"
|
|
6545
6545
|
>${l("Created")}:
|
|
6546
6546
|
${new Date(
|
|
6547
6547
|
this.contract.createdAt
|
|
@@ -6549,7 +6549,7 @@ let ht = class extends C {
|
|
|
6549
6549
|
>` : p}
|
|
6550
6550
|
</div>
|
|
6551
6551
|
|
|
6552
|
-
${t && t.length > 0 ?
|
|
6552
|
+
${t && t.length > 0 ? c`<div class="contract-subsection">
|
|
6553
6553
|
<div
|
|
6554
6554
|
class="collapsible-header"
|
|
6555
6555
|
@click=${() => this._toggleSection("assets")}
|
|
@@ -6564,14 +6564,14 @@ let ht = class extends C {
|
|
|
6564
6564
|
>
|
|
6565
6565
|
<div class="assets-list">
|
|
6566
6566
|
${t.map(
|
|
6567
|
-
(r) =>
|
|
6567
|
+
(r) => c`<div class="asset-item">
|
|
6568
6568
|
<tems-division type="body-sm"
|
|
6569
6569
|
>${r["@id"].split("/").pop()}</tems-division
|
|
6570
6570
|
>
|
|
6571
6571
|
<tems-division type="body-xs"
|
|
6572
6572
|
>${r.dataAddress?.baseUrl || l("No base URL")}</tems-division
|
|
6573
6573
|
>
|
|
6574
|
-
${r.dataAddress?.type ?
|
|
6574
|
+
${r.dataAddress?.type ? c`<tems-division type="body-xs"
|
|
6575
6575
|
>${l("Type")}:
|
|
6576
6576
|
${r.dataAddress.type}</tems-division
|
|
6577
6577
|
>` : p}
|
|
@@ -6580,7 +6580,7 @@ let ht = class extends C {
|
|
|
6580
6580
|
</div>
|
|
6581
6581
|
</div>
|
|
6582
6582
|
</div>` : p}
|
|
6583
|
-
${i && i.length > 0 ?
|
|
6583
|
+
${i && i.length > 0 ? c`<div class="contract-subsection">
|
|
6584
6584
|
<div
|
|
6585
6585
|
class="collapsible-header"
|
|
6586
6586
|
@click=${() => this._toggleSection("policies")}
|
|
@@ -6594,7 +6594,7 @@ let ht = class extends C {
|
|
|
6594
6594
|
class="collapsible-content ${this.expandedPolicies ? "expanded" : ""}"
|
|
6595
6595
|
>
|
|
6596
6596
|
${i.map(
|
|
6597
|
-
(r) =>
|
|
6597
|
+
(r) => c`<ds4go-odrl-policy-modal-part
|
|
6598
6598
|
.policy=${r}
|
|
6599
6599
|
></ds4go-odrl-policy-modal-part>`
|
|
6600
6600
|
)}
|
|
@@ -6669,7 +6669,7 @@ let Nt = class extends C {
|
|
|
6669
6669
|
const t = this._getNegotiationTags(e), i = this.assets?.find(
|
|
6670
6670
|
(r) => r["@id"] === e.assetId
|
|
6671
6671
|
);
|
|
6672
|
-
return
|
|
6672
|
+
return c`<ds4go-card-catalog
|
|
6673
6673
|
.object=${p}
|
|
6674
6674
|
.header=${e["@id"].split("/").pop()}
|
|
6675
6675
|
.content=${i ? `Asset: ${i["@id"].split("/").pop()}` : l("No associated asset")}
|
|
@@ -6686,7 +6686,7 @@ let Nt = class extends C {
|
|
|
6686
6686
|
if (e.length === 0)
|
|
6687
6687
|
return p;
|
|
6688
6688
|
const t = this.type === "PROVIDER" ? l("Provider Negotiations") : l("Consumer Negotiations");
|
|
6689
|
-
return
|
|
6689
|
+
return c`<tems-division type="body-m"><div>${t}</div></tems-division>
|
|
6690
6690
|
<div class="card-grid card-grid-vertical">
|
|
6691
6691
|
${e.map(
|
|
6692
6692
|
(i) => this._renderNegotiationCard(i)
|
|
@@ -6721,12 +6721,12 @@ let Oe = class extends C {
|
|
|
6721
6721
|
return Array.isArray(e) ? e.map((t) => t["@id"] ? t["@id"] : t).join(", ") : typeof e == "object" ? e["@id"] : e;
|
|
6722
6722
|
}
|
|
6723
6723
|
_renderConstraint(e) {
|
|
6724
|
-
return
|
|
6724
|
+
return c`<div class="constraint-item">
|
|
6725
6725
|
<tems-division type="body-xs"
|
|
6726
6726
|
>${e.leftOperand} ${e.operator}
|
|
6727
6727
|
${String(e.rightOperand)}</tems-division
|
|
6728
6728
|
>
|
|
6729
|
-
${e["@type"] ?
|
|
6729
|
+
${e["@type"] ? c`<tems-division type="body-xs"
|
|
6730
6730
|
>${l("Type")}: ${e["@type"]}</tems-division
|
|
6731
6731
|
>` : p}
|
|
6732
6732
|
</div>`;
|
|
@@ -6735,7 +6735,7 @@ let Oe = class extends C {
|
|
|
6735
6735
|
if (!this.policy)
|
|
6736
6736
|
return p;
|
|
6737
6737
|
const e = this.policy.policy;
|
|
6738
|
-
return Array.isArray(e?.["odrl:permission"]) || (e["odrl:permission"] = e["odrl:permission"] ? [e["odrl:permission"]] : []), Array.isArray(e?.["odrl:prohibition"]) || (e["odrl:prohibition"] = e["odrl:prohibition"] ? [e["odrl:prohibition"]] : []), Array.isArray(e?.["odrl:obligation"]) || (e["odrl:obligation"] = e["odrl:obligation"] ? [e["odrl:obligation"]] : []),
|
|
6738
|
+
return Array.isArray(e?.["odrl:permission"]) || (e["odrl:permission"] = e["odrl:permission"] ? [e["odrl:permission"]] : []), Array.isArray(e?.["odrl:prohibition"]) || (e["odrl:prohibition"] = e["odrl:prohibition"] ? [e["odrl:prohibition"]] : []), Array.isArray(e?.["odrl:obligation"]) || (e["odrl:obligation"] = e["odrl:obligation"] ? [e["odrl:obligation"]] : []), c`<div class="policy-card">
|
|
6739
6739
|
<div class="policy-header">
|
|
6740
6740
|
<tems-division type="body-m"
|
|
6741
6741
|
>${l("Policy")}:
|
|
@@ -6744,29 +6744,29 @@ let Oe = class extends C {
|
|
|
6744
6744
|
<tems-division type="body-xs"
|
|
6745
6745
|
>${l("Type")}: ${e?.["@type"] || "Unknown"}</tems-division
|
|
6746
6746
|
>
|
|
6747
|
-
${this.policy.createdAt ?
|
|
6747
|
+
${this.policy.createdAt ? c`<tems-division type="body-xs"
|
|
6748
6748
|
>${l("Created")}:
|
|
6749
6749
|
${new Date(this.policy.createdAt).toLocaleString()}</tems-division
|
|
6750
6750
|
>` : p}
|
|
6751
6751
|
</div>
|
|
6752
6752
|
|
|
6753
|
-
${e?.["odrl:permission"] && e["odrl:permission"].length > 0 ?
|
|
6753
|
+
${e?.["odrl:permission"] && e["odrl:permission"].length > 0 ? c`<div class="policy-section">
|
|
6754
6754
|
<tems-division type="body-sm" class="policy-section-title"
|
|
6755
6755
|
>${l("Permissions")}</tems-division
|
|
6756
6756
|
>
|
|
6757
6757
|
${e["odrl:permission"].map(
|
|
6758
|
-
(t) =>
|
|
6758
|
+
(t) => c`<div class="policy-item">
|
|
6759
6759
|
<tems-division type="body-xs"
|
|
6760
6760
|
>${l("Action")}:
|
|
6761
6761
|
${this._formatAction(
|
|
6762
6762
|
t.action || t["odrl:action"]
|
|
6763
6763
|
)}</tems-division
|
|
6764
6764
|
>
|
|
6765
|
-
${t.target || t["odrl:target"] ?
|
|
6765
|
+
${t.target || t["odrl:target"] ? c`<tems-division type="body-xs"
|
|
6766
6766
|
>${l("Target")}:
|
|
6767
6767
|
${(t.target || t["odrl:target"])?.split("/").pop()}</tems-division
|
|
6768
6768
|
>` : p}
|
|
6769
|
-
${(t.constraint || t["odrl:constraint"]) && (t.constraint || t["odrl:constraint"] || []).length > 0 ?
|
|
6769
|
+
${(t.constraint || t["odrl:constraint"]) && (t.constraint || t["odrl:constraint"] || []).length > 0 ? c`<div class="constraints-list">
|
|
6770
6770
|
${(t.constraint || t["odrl:constraint"] || []).map(
|
|
6771
6771
|
(i) => this._renderConstraint(i)
|
|
6772
6772
|
)}
|
|
@@ -6774,23 +6774,23 @@ let Oe = class extends C {
|
|
|
6774
6774
|
</div>`
|
|
6775
6775
|
)}
|
|
6776
6776
|
</div>` : p}
|
|
6777
|
-
${e?.["odrl:prohibition"] && e["odrl:prohibition"].length > 0 ?
|
|
6777
|
+
${e?.["odrl:prohibition"] && e["odrl:prohibition"].length > 0 ? c`<div class="policy-section">
|
|
6778
6778
|
<tems-division type="body-sm" class="policy-section-title"
|
|
6779
6779
|
>${l("Prohibitions")}</tems-division
|
|
6780
6780
|
>
|
|
6781
6781
|
${e["odrl:prohibition"].map(
|
|
6782
|
-
(t) =>
|
|
6782
|
+
(t) => c`<div class="policy-item">
|
|
6783
6783
|
<tems-division type="body-xs"
|
|
6784
6784
|
>${l("Action")}:
|
|
6785
6785
|
${this._formatAction(
|
|
6786
6786
|
t.action || t["odrl:action"]
|
|
6787
6787
|
)}</tems-division
|
|
6788
6788
|
>
|
|
6789
|
-
${t.target || t["odrl:target"] ?
|
|
6789
|
+
${t.target || t["odrl:target"] ? c`<tems-division type="body-xs"
|
|
6790
6790
|
>${l("Target")}:
|
|
6791
6791
|
${(t.target || t["odrl:target"])?.split("/").pop()}</tems-division
|
|
6792
6792
|
>` : p}
|
|
6793
|
-
${(t.constraint || t["odrl:constraint"]) && (t.constraint || t["odrl:constraint"] || []).length > 0 ?
|
|
6793
|
+
${(t.constraint || t["odrl:constraint"]) && (t.constraint || t["odrl:constraint"] || []).length > 0 ? c`<div class="constraints-list">
|
|
6794
6794
|
${(t.constraint || t["odrl:constraint"] || []).map(
|
|
6795
6795
|
(i) => this._renderConstraint(i)
|
|
6796
6796
|
)}
|
|
@@ -6798,19 +6798,19 @@ let Oe = class extends C {
|
|
|
6798
6798
|
</div>`
|
|
6799
6799
|
)}
|
|
6800
6800
|
</div>` : p}
|
|
6801
|
-
${e?.["odrl:obligation"] && e["odrl:obligation"].length > 0 ?
|
|
6801
|
+
${e?.["odrl:obligation"] && e["odrl:obligation"].length > 0 ? c`<div class="policy-section">
|
|
6802
6802
|
<tems-division type="body-sm" class="policy-section-title"
|
|
6803
6803
|
>${l("Obligations")}</tems-division
|
|
6804
6804
|
>
|
|
6805
6805
|
${e["odrl:obligation"].map(
|
|
6806
|
-
(t) =>
|
|
6806
|
+
(t) => c`<div class="policy-item">
|
|
6807
6807
|
<tems-division type="body-xs"
|
|
6808
6808
|
>${l("Action")}:
|
|
6809
6809
|
${this._formatAction(
|
|
6810
6810
|
t.action || t["odrl:action"]
|
|
6811
6811
|
)}</tems-division
|
|
6812
6812
|
>
|
|
6813
|
-
${(t.constraint || t["odrl:constraint"]) && (t.constraint || t["odrl:constraint"] || []).length > 0 ?
|
|
6813
|
+
${(t.constraint || t["odrl:constraint"]) && (t.constraint || t["odrl:constraint"] || []).length > 0 ? c`<div class="constraints-list">
|
|
6814
6814
|
${(t.constraint || t["odrl:constraint"] || []).map(
|
|
6815
6815
|
(i) => this._renderConstraint(i)
|
|
6816
6816
|
)}
|
|
@@ -6858,16 +6858,16 @@ let se = class extends C {
|
|
|
6858
6858
|
}
|
|
6859
6859
|
render() {
|
|
6860
6860
|
if (!this.policy)
|
|
6861
|
-
return
|
|
6861
|
+
return c`<div class="no-policy">No policy available</div>`;
|
|
6862
6862
|
try {
|
|
6863
6863
|
const t = new la(this.policy).renderAsHtml();
|
|
6864
|
-
return
|
|
6864
|
+
return c`
|
|
6865
6865
|
<div class="${this.compact ? "compact" : ""}">
|
|
6866
6866
|
${wn(t)}
|
|
6867
6867
|
</div>
|
|
6868
6868
|
`;
|
|
6869
6869
|
} catch (e) {
|
|
6870
|
-
return console.error("Error rendering ODRL policy:", e),
|
|
6870
|
+
return console.error("Error rendering ODRL policy:", e), c`
|
|
6871
6871
|
<div class="error">
|
|
6872
6872
|
Error rendering policy: ${e.message}
|
|
6873
6873
|
</div>
|
|
@@ -7170,16 +7170,16 @@ let oe = class extends C {
|
|
|
7170
7170
|
return r[t] = { ...r[t], constraint: s }, r;
|
|
7171
7171
|
}
|
|
7172
7172
|
_renderOperatorSelect(e, t) {
|
|
7173
|
-
return
|
|
7173
|
+
return c`<select @change=${t}>
|
|
7174
7174
|
${["eq", "neq", "gt", "gte", "lt", "lte", "isA", "in"].map(
|
|
7175
|
-
(r) =>
|
|
7175
|
+
(r) => c`<option value="${r}" selected=${e === r}>
|
|
7176
7176
|
${r}
|
|
7177
7177
|
</option>`
|
|
7178
7178
|
)}
|
|
7179
7179
|
</select>`;
|
|
7180
7180
|
}
|
|
7181
7181
|
_renderPermission(e, t) {
|
|
7182
|
-
return
|
|
7182
|
+
return c`<fieldset>
|
|
7183
7183
|
<legend>${l($`Permission ${t + 1}`)}</legend>
|
|
7184
7184
|
<tems-input
|
|
7185
7185
|
type="text"
|
|
@@ -7201,10 +7201,10 @@ let oe = class extends C {
|
|
|
7201
7201
|
i.detail.value
|
|
7202
7202
|
)}
|
|
7203
7203
|
></tems-input>
|
|
7204
|
-
${e.constraint && e.constraint.length > 0 ?
|
|
7204
|
+
${e.constraint && e.constraint.length > 0 ? c`<fieldset>
|
|
7205
7205
|
<legend>${l("Constraints")}</legend>
|
|
7206
7206
|
${e.constraint.map(
|
|
7207
|
-
(i, r) =>
|
|
7207
|
+
(i, r) => c`
|
|
7208
7208
|
<div class="flex flex-column spacer-auto">
|
|
7209
7209
|
<tems-input
|
|
7210
7210
|
type="text"
|
|
@@ -7271,10 +7271,10 @@ let oe = class extends C {
|
|
|
7271
7271
|
`
|
|
7272
7272
|
)}
|
|
7273
7273
|
</fieldset>` : p}
|
|
7274
|
-
${e.duty && e.duty.length > 0 ?
|
|
7274
|
+
${e.duty && e.duty.length > 0 ? c`<fieldset>
|
|
7275
7275
|
<legend>${l("Duties")}</legend>
|
|
7276
7276
|
${e.duty.map(
|
|
7277
|
-
(i, r) =>
|
|
7277
|
+
(i, r) => c`
|
|
7278
7278
|
<div class="flex flex-column">
|
|
7279
7279
|
<tems-input
|
|
7280
7280
|
type="text"
|
|
@@ -7289,10 +7289,10 @@ let oe = class extends C {
|
|
|
7289
7289
|
);
|
|
7290
7290
|
}}
|
|
7291
7291
|
></tems-input>
|
|
7292
|
-
${i.constraint && i.constraint.length > 0 ?
|
|
7292
|
+
${i.constraint && i.constraint.length > 0 ? c`<fieldset>
|
|
7293
7293
|
<legend>${l("Constraints")}</legend>
|
|
7294
7294
|
${i.constraint.map(
|
|
7295
|
-
(s, o) =>
|
|
7295
|
+
(s, o) => c`
|
|
7296
7296
|
<div class="flex flex-column spacer-auto">
|
|
7297
7297
|
<tems-input
|
|
7298
7298
|
type="text"
|
|
@@ -7301,18 +7301,18 @@ let oe = class extends C {
|
|
|
7301
7301
|
@change=${(a) => {
|
|
7302
7302
|
const n = [
|
|
7303
7303
|
...this.policy.policy.permission
|
|
7304
|
-
],
|
|
7305
|
-
...
|
|
7304
|
+
], d = [...n[t].duty], u = [
|
|
7305
|
+
...d[r].constraint
|
|
7306
7306
|
];
|
|
7307
7307
|
u[o] = {
|
|
7308
7308
|
...u[o],
|
|
7309
7309
|
leftOperand: a.detail.value
|
|
7310
|
-
},
|
|
7311
|
-
...
|
|
7310
|
+
}, d[r] = {
|
|
7311
|
+
...d[r],
|
|
7312
7312
|
constraint: u
|
|
7313
7313
|
}, n[t] = {
|
|
7314
7314
|
...n[t],
|
|
7315
|
-
duty:
|
|
7315
|
+
duty: d
|
|
7316
7316
|
}, this._updatePolicyField(
|
|
7317
7317
|
"permission",
|
|
7318
7318
|
n
|
|
@@ -7328,20 +7328,20 @@ let oe = class extends C {
|
|
|
7328
7328
|
(a) => {
|
|
7329
7329
|
const n = [
|
|
7330
7330
|
...this.policy.policy.permission
|
|
7331
|
-
],
|
|
7331
|
+
], d = [
|
|
7332
7332
|
...n[t].duty
|
|
7333
7333
|
], u = [
|
|
7334
|
-
...
|
|
7334
|
+
...d[r].constraint
|
|
7335
7335
|
];
|
|
7336
7336
|
u[o] = {
|
|
7337
7337
|
...u[o],
|
|
7338
7338
|
operator: a.target.value
|
|
7339
|
-
},
|
|
7340
|
-
...
|
|
7339
|
+
}, d[r] = {
|
|
7340
|
+
...d[r],
|
|
7341
7341
|
constraint: u
|
|
7342
7342
|
}, n[t] = {
|
|
7343
7343
|
...n[t],
|
|
7344
|
-
duty:
|
|
7344
|
+
duty: d
|
|
7345
7345
|
}, this._updatePolicyField(
|
|
7346
7346
|
"permission",
|
|
7347
7347
|
n
|
|
@@ -7356,18 +7356,18 @@ let oe = class extends C {
|
|
|
7356
7356
|
@change=${(a) => {
|
|
7357
7357
|
const n = [
|
|
7358
7358
|
...this.policy.policy.permission
|
|
7359
|
-
],
|
|
7360
|
-
...
|
|
7359
|
+
], d = [...n[t].duty], u = [
|
|
7360
|
+
...d[r].constraint
|
|
7361
7361
|
];
|
|
7362
7362
|
u[o] = {
|
|
7363
7363
|
...u[o],
|
|
7364
7364
|
rightOperand: a.detail.value
|
|
7365
|
-
},
|
|
7366
|
-
...
|
|
7365
|
+
}, d[r] = {
|
|
7366
|
+
...d[r],
|
|
7367
7367
|
constraint: u
|
|
7368
7368
|
}, n[t] = {
|
|
7369
7369
|
...n[t],
|
|
7370
|
-
duty:
|
|
7370
|
+
duty: d
|
|
7371
7371
|
}, this._updatePolicyField(
|
|
7372
7372
|
"permission",
|
|
7373
7373
|
n
|
|
@@ -7381,10 +7381,10 @@ let oe = class extends C {
|
|
|
7381
7381
|
@click=${() => {
|
|
7382
7382
|
const a = [
|
|
7383
7383
|
...this.policy.policy.permission
|
|
7384
|
-
], n = [...a[t].duty],
|
|
7384
|
+
], n = [...a[t].duty], d = n[r].constraint?.filter((u, m) => m !== o);
|
|
7385
7385
|
n[r] = {
|
|
7386
7386
|
...n[r],
|
|
7387
|
-
constraint:
|
|
7387
|
+
constraint: d
|
|
7388
7388
|
}, a[t] = {
|
|
7389
7389
|
...a[t],
|
|
7390
7390
|
duty: n
|
|
@@ -7470,7 +7470,7 @@ let oe = class extends C {
|
|
|
7470
7470
|
</fieldset>`;
|
|
7471
7471
|
}
|
|
7472
7472
|
_renderProhibition(e, t) {
|
|
7473
|
-
return
|
|
7473
|
+
return c`<fieldset>
|
|
7474
7474
|
<legend>${l($`Prohibition ${t + 1}`)}</legend>
|
|
7475
7475
|
<tems-input
|
|
7476
7476
|
type="text"
|
|
@@ -7492,10 +7492,10 @@ let oe = class extends C {
|
|
|
7492
7492
|
i.detail.value
|
|
7493
7493
|
)}
|
|
7494
7494
|
></tems-input>
|
|
7495
|
-
${e.constraint && e.constraint.length > 0 ?
|
|
7495
|
+
${e.constraint && e.constraint.length > 0 ? c`<fieldset>
|
|
7496
7496
|
<legend>${l("Constraints")}</legend>
|
|
7497
7497
|
${e.constraint.map(
|
|
7498
|
-
(i, r) =>
|
|
7498
|
+
(i, r) => c`
|
|
7499
7499
|
<div class="flex flex-column spacer-auto">
|
|
7500
7500
|
<tems-input
|
|
7501
7501
|
type="text"
|
|
@@ -7587,7 +7587,7 @@ let oe = class extends C {
|
|
|
7587
7587
|
</fieldset>`;
|
|
7588
7588
|
}
|
|
7589
7589
|
_renderObligation(e, t) {
|
|
7590
|
-
return
|
|
7590
|
+
return c`<fieldset>
|
|
7591
7591
|
<legend>${l($`Obligation ${t + 1}`)}</legend>
|
|
7592
7592
|
<tems-input
|
|
7593
7593
|
type="text"
|
|
@@ -7599,10 +7599,10 @@ let oe = class extends C {
|
|
|
7599
7599
|
i.detail.value
|
|
7600
7600
|
)}
|
|
7601
7601
|
></tems-input>
|
|
7602
|
-
${e.constraint && e.constraint.length > 0 ?
|
|
7602
|
+
${e.constraint && e.constraint.length > 0 ? c`<fieldset>
|
|
7603
7603
|
<legend>${l("Constraints")}</legend>
|
|
7604
7604
|
${e.constraint.map(
|
|
7605
|
-
(i, r) =>
|
|
7605
|
+
(i, r) => c`
|
|
7606
7606
|
<div class="flex flex-column spacer-auto">
|
|
7607
7607
|
<tems-input
|
|
7608
7608
|
type="text"
|
|
@@ -7700,7 +7700,7 @@ let oe = class extends C {
|
|
|
7700
7700
|
...this.template.policy,
|
|
7701
7701
|
"@type": "Set"
|
|
7702
7702
|
}
|
|
7703
|
-
}),
|
|
7703
|
+
}), c`<form @submit=${(e) => e.preventDefault()}>
|
|
7704
7704
|
<div class="flex">
|
|
7705
7705
|
<tems-label
|
|
7706
7706
|
class="flex-1"
|
|
@@ -7788,7 +7788,7 @@ let oe = class extends C {
|
|
|
7788
7788
|
${l($`Reset to ${this.template.name} default`)}
|
|
7789
7789
|
</tems-button>
|
|
7790
7790
|
</div>
|
|
7791
|
-
</form>`) :
|
|
7791
|
+
</form>`) : c`<p>${l("No policy template provided")}</p>`;
|
|
7792
7792
|
}
|
|
7793
7793
|
};
|
|
7794
7794
|
oe.styles = [L(Pn)];
|
|
@@ -7875,9 +7875,9 @@ let mt = class extends k {
|
|
|
7875
7875
|
}
|
|
7876
7876
|
render() {
|
|
7877
7877
|
return this.gatekeeper() || this._getResource.render({
|
|
7878
|
-
pending: () =>
|
|
7878
|
+
pending: () => c`<solid-loader></solid-loader>`,
|
|
7879
7879
|
error: (e) => (console.warn("[solid-customer-list] Task error:", e), p),
|
|
7880
|
-
complete: (e) =>
|
|
7880
|
+
complete: (e) => c`<tems-viewport>
|
|
7881
7881
|
<tems-header slot="header" heading=${this.header}></tems-header>
|
|
7882
7882
|
<div slot="content">
|
|
7883
7883
|
<ds4go-catalog-filter-holder
|
|
@@ -7894,7 +7894,7 @@ let mt = class extends k {
|
|
|
7894
7894
|
@clicked=${this._openModal}
|
|
7895
7895
|
@result-count=${this._resultCountUpdate}
|
|
7896
7896
|
></ds4go-customer-holder>
|
|
7897
|
-
${this.object ?
|
|
7897
|
+
${this.object ? c`<div
|
|
7898
7898
|
class="modal"
|
|
7899
7899
|
@click=${this._closeModalFromBackground}
|
|
7900
7900
|
>
|
|
@@ -8002,8 +8002,8 @@ let at = class extends k {
|
|
|
8002
8002
|
this.catalogs.map(async (a) => {
|
|
8003
8003
|
try {
|
|
8004
8004
|
const n = await (await fetch(a.endpoints.catalog)).json();
|
|
8005
|
-
return n["dcat:dataset"].map((
|
|
8006
|
-
...
|
|
8005
|
+
return n["dcat:dataset"].map((d) => ({
|
|
8006
|
+
...d,
|
|
8007
8007
|
catalogTitle: n["dct:title"],
|
|
8008
8008
|
catalogId: a.catalogId,
|
|
8009
8009
|
sectorName: a.sectorName,
|
|
@@ -8092,14 +8092,14 @@ let at = class extends k {
|
|
|
8092
8092
|
}
|
|
8093
8093
|
render() {
|
|
8094
8094
|
return this.gatekeeper() || this._getResource.render({
|
|
8095
|
-
pending: () =>
|
|
8095
|
+
pending: () => c`<solid-loader></solid-loader>`,
|
|
8096
8096
|
error: (e) => (console.warn("[solid-dsif-explorer-poc] Task error:", e), p),
|
|
8097
|
-
complete: (e) =>
|
|
8097
|
+
complete: (e) => c`<tems-viewport>
|
|
8098
8098
|
<tems-header
|
|
8099
8099
|
slot="header"
|
|
8100
8100
|
heading=${this.catalogId ? e ? this.catalogId === "*" ? `${l("All Datasets")}` : `${l("Datasets from")}
|
|
8101
8101
|
${e["dct:title"]} (From ${this.sectorId})` : `${l($`Error while loading catalog ${this.catalogId}`)}` : this.sectorId ? this.sectorId === "*" ? `${l("All Sectors")}` : `${l("Catalogs available in")} ${this.sectorId}` : `${l("Root Authority")}`}
|
|
8102
|
-
>${(this.sectorId || this.catalogId) && !(this.catalogId === "*" && this.sectorId === "*") && !(this.sectorId === "*" && !this.catalogId) ?
|
|
8102
|
+
>${(this.sectorId || this.catalogId) && !(this.catalogId === "*" && this.sectorId === "*") && !(this.sectorId === "*" && !this.catalogId) ? c`<div slot="cta">
|
|
8103
8103
|
<tems-button
|
|
8104
8104
|
type="primary"
|
|
8105
8105
|
label=${l(
|
|
@@ -8218,9 +8218,9 @@ let St = class extends X {
|
|
|
8218
8218
|
}
|
|
8219
8219
|
render() {
|
|
8220
8220
|
return !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute) ? p : this._getResource.render({
|
|
8221
|
-
pending: () =>
|
|
8222
|
-
error: (e) =>
|
|
8223
|
-
complete: (e) => !e || !this.providers ? p :
|
|
8221
|
+
pending: () => c`<solid-loader></solid-loader>`,
|
|
8222
|
+
error: (e) => c`<p>${e}</p>`,
|
|
8223
|
+
complete: (e) => !e || !this.providers ? p : c`<tems-viewport>
|
|
8224
8224
|
<tems-header slot="header" heading=${this.header}></tems-header>
|
|
8225
8225
|
<div slot="content">
|
|
8226
8226
|
<ds4go-catalog-filter-holder
|
|
@@ -8239,7 +8239,7 @@ let St = class extends X {
|
|
|
8239
8239
|
@clicked=${this._openModal}
|
|
8240
8240
|
@result-count=${this._resultCountUpdate}
|
|
8241
8241
|
></ds4go-catalog-data-holder>
|
|
8242
|
-
${this.object ?
|
|
8242
|
+
${this.object ? c`<div
|
|
8243
8243
|
class="modal"
|
|
8244
8244
|
@click=${this._closeModalFromBackground}
|
|
8245
8245
|
>
|
|
@@ -8343,6 +8343,17 @@ let Et = class extends X {
|
|
|
8343
8343
|
console.error("Failed to load assets:", e);
|
|
8344
8344
|
}
|
|
8345
8345
|
}
|
|
8346
|
+
async getAsset(e) {
|
|
8347
|
+
if (!this.storeService) {
|
|
8348
|
+
console.error("Store not initialized. Check connector configuration.");
|
|
8349
|
+
return;
|
|
8350
|
+
}
|
|
8351
|
+
try {
|
|
8352
|
+
return await this.storeService.getAsset(e);
|
|
8353
|
+
} catch (t) {
|
|
8354
|
+
console.error("Failed to get asset:", t);
|
|
8355
|
+
}
|
|
8356
|
+
}
|
|
8346
8357
|
async createAsset(e) {
|
|
8347
8358
|
if (!this.storeService) return !1;
|
|
8348
8359
|
try {
|
|
@@ -8620,10 +8631,10 @@ let S = class extends k {
|
|
|
8620
8631
|
"solid-tems-policies-management"
|
|
8621
8632
|
);
|
|
8622
8633
|
n?.loadPolicies && n.loadPolicies();
|
|
8623
|
-
const
|
|
8634
|
+
const d = document.querySelector(
|
|
8624
8635
|
"solid-tems-contracts-management"
|
|
8625
8636
|
);
|
|
8626
|
-
|
|
8637
|
+
d?.loadData && d.loadData();
|
|
8627
8638
|
}
|
|
8628
8639
|
this._reset();
|
|
8629
8640
|
const r = this.orbit?.components.find(
|
|
@@ -8701,20 +8712,20 @@ let S = class extends k {
|
|
|
8701
8712
|
}
|
|
8702
8713
|
render() {
|
|
8703
8714
|
return this.gatekeeper() || this._getResource.render({
|
|
8704
|
-
pending: () =>
|
|
8715
|
+
pending: () => c`<solid-loader></solid-loader>`,
|
|
8705
8716
|
error: (t) => (console.warn("[solid-fact-bundle-creation] Task error:", t), p),
|
|
8706
8717
|
complete: (t) => {
|
|
8707
8718
|
if (!t) return p;
|
|
8708
8719
|
const i = t.slice(0, this.spliceLength), r = this.selectedFacts.length, s = !!this.bundleName && r > 0 && !!this.bundleLanguage && !!this.bundleAccessPolicy && !!this.bundleContractPolicy;
|
|
8709
|
-
return
|
|
8720
|
+
return c`<tems-viewport>
|
|
8710
8721
|
<tems-header slot="header" heading=${this.header}>
|
|
8711
8722
|
<div slot="cta">
|
|
8712
|
-
${this.step === 0 ?
|
|
8723
|
+
${this.step === 0 ? c`<tems-button
|
|
8713
8724
|
type="primary"
|
|
8714
8725
|
disabled=${this.selectedFacts.length === 0 || p}
|
|
8715
8726
|
label=${l("Next")}
|
|
8716
8727
|
@click=${this._nextStep}
|
|
8717
|
-
></tems-button>` :
|
|
8728
|
+
></tems-button>` : c`<div class="flex">
|
|
8718
8729
|
<tems-button
|
|
8719
8730
|
type="link-color"
|
|
8720
8731
|
label=${l("Cancel bundle creation")}
|
|
@@ -8731,7 +8742,7 @@ let S = class extends k {
|
|
|
8731
8742
|
</tems-header>
|
|
8732
8743
|
<div slot="content">
|
|
8733
8744
|
<section class="flex flex-1">
|
|
8734
|
-
${this.step === 0 ?
|
|
8745
|
+
${this.step === 0 ? c`<div>
|
|
8735
8746
|
<tems-division type="h4">
|
|
8736
8747
|
<div>
|
|
8737
8748
|
${l(
|
|
@@ -8752,7 +8763,7 @@ let S = class extends k {
|
|
|
8752
8763
|
type: "information"
|
|
8753
8764
|
});
|
|
8754
8765
|
}
|
|
8755
|
-
return
|
|
8766
|
+
return c`<ds4go-card-catalog
|
|
8756
8767
|
.object=${p}
|
|
8757
8768
|
.header=${o.name || p}
|
|
8758
8769
|
date=${o.updated_at || p}
|
|
@@ -8765,7 +8776,7 @@ let S = class extends k {
|
|
|
8765
8776
|
})}
|
|
8766
8777
|
</div>
|
|
8767
8778
|
</div>
|
|
8768
|
-
${i.length > 0 || this.filterFactText ?
|
|
8779
|
+
${i.length > 0 || this.filterFactText ? c`<div>
|
|
8769
8780
|
<div>
|
|
8770
8781
|
<tems-search-bar
|
|
8771
8782
|
.displayFilters=${!1}
|
|
@@ -8780,7 +8791,7 @@ let S = class extends k {
|
|
|
8780
8791
|
@search=${this._searchFacts}
|
|
8781
8792
|
></tems-search-bar>
|
|
8782
8793
|
</div>
|
|
8783
|
-
${i.length > 0 ?
|
|
8794
|
+
${i.length > 0 ? c` <div class="card-grid card-grid-vertical">
|
|
8784
8795
|
${i.map((o) => {
|
|
8785
8796
|
const a = (o.categories || []).map(
|
|
8786
8797
|
(n) => ({
|
|
@@ -8795,7 +8806,7 @@ let S = class extends k {
|
|
|
8795
8806
|
type: "information"
|
|
8796
8807
|
});
|
|
8797
8808
|
}
|
|
8798
|
-
return
|
|
8809
|
+
return c`<ds4go-card-catalog
|
|
8799
8810
|
.object=${p}
|
|
8800
8811
|
.tags=${a}
|
|
8801
8812
|
.header=${o.name || p}
|
|
@@ -8808,7 +8819,7 @@ let S = class extends k {
|
|
|
8808
8819
|
></ds4go-card-catalog>`;
|
|
8809
8820
|
})}
|
|
8810
8821
|
</div>
|
|
8811
|
-
${i.length < t.length ?
|
|
8822
|
+
${i.length < t.length ? c`<div
|
|
8812
8823
|
class="flex flex-row justify-content-space-between align-items-flex-end"
|
|
8813
8824
|
>
|
|
8814
8825
|
<div>
|
|
@@ -8830,9 +8841,9 @@ let S = class extends k {
|
|
|
8830
8841
|
label=${l("Show all results")}
|
|
8831
8842
|
></tems-button>
|
|
8832
8843
|
</div>
|
|
8833
|
-
</div>` : p}` :
|
|
8844
|
+
</div>` : p}` : c`${l("No results found")}
|
|
8834
8845
|
${this.filterFactText ? `for "${this.filterFactText}".` : ""}`}
|
|
8835
|
-
</div>` : p}` :
|
|
8846
|
+
</div>` : p}` : c`<div>
|
|
8836
8847
|
<div>
|
|
8837
8848
|
<tems-input
|
|
8838
8849
|
type="text"
|
|
@@ -8874,7 +8885,7 @@ let S = class extends k {
|
|
|
8874
8885
|
)
|
|
8875
8886
|
)
|
|
8876
8887
|
).filter((o) => o).sort((o, a) => o.localeCompare(a)).map(
|
|
8877
|
-
(o) =>
|
|
8888
|
+
(o) => c`<option
|
|
8878
8889
|
value="${o}"
|
|
8879
8890
|
?selected="${o === this.bundleCategory}"
|
|
8880
8891
|
>
|
|
@@ -8894,7 +8905,7 @@ let S = class extends k {
|
|
|
8894
8905
|
@change=${this._updateBundleDescription}
|
|
8895
8906
|
></tems-textarea>
|
|
8896
8907
|
</div>
|
|
8897
|
-
${this.displayAccessPolicyCustomization ?
|
|
8908
|
+
${this.displayAccessPolicyCustomization ? c`<div>
|
|
8898
8909
|
<policy-composer
|
|
8899
8910
|
.template=${this.policyTemplates.find(
|
|
8900
8911
|
(o) => o.id === this.bundleAccessPolicy
|
|
@@ -8903,7 +8914,7 @@ let S = class extends k {
|
|
|
8903
8914
|
@policy-changed=${this._updateBundleAccessPolicyDefinition}
|
|
8904
8915
|
@cancel-policy-customization=${this._resetBundleAccessPolicy}
|
|
8905
8916
|
></policy-composer>
|
|
8906
|
-
</div>` :
|
|
8917
|
+
</div>` : c`<div class="select">
|
|
8907
8918
|
<tems-label
|
|
8908
8919
|
label=${l("Access policy")}
|
|
8909
8920
|
></tems-label>
|
|
@@ -8912,7 +8923,7 @@ let S = class extends k {
|
|
|
8912
8923
|
class="flex-1"
|
|
8913
8924
|
@change=${this._selectBundleAccessPolicy}
|
|
8914
8925
|
>
|
|
8915
|
-
${this.policyTemplates.map((o) =>
|
|
8926
|
+
${this.policyTemplates.map((o) => c`<option
|
|
8916
8927
|
value="${o.id}"
|
|
8917
8928
|
?selected="${o.id === this.bundleAccessPolicy}"
|
|
8918
8929
|
>
|
|
@@ -8927,7 +8938,7 @@ let S = class extends k {
|
|
|
8927
8938
|
></tems-button>
|
|
8928
8939
|
</div>
|
|
8929
8940
|
</div>`}
|
|
8930
|
-
${this.displayContractPolicyCustomization ?
|
|
8941
|
+
${this.displayContractPolicyCustomization ? c`<div>
|
|
8931
8942
|
<policy-composer
|
|
8932
8943
|
.template=${this.policyTemplates.find(
|
|
8933
8944
|
(o) => o.id === this.bundleContractPolicy
|
|
@@ -8936,7 +8947,7 @@ let S = class extends k {
|
|
|
8936
8947
|
@policy-changed=${this._updateBundleContractPolicyDefinition}
|
|
8937
8948
|
@cancel-policy-customization=${this._resetBundleContractPolicy}
|
|
8938
8949
|
></policy-composer>
|
|
8939
|
-
</div>` :
|
|
8950
|
+
</div>` : c`<div class="select">
|
|
8940
8951
|
<tems-label
|
|
8941
8952
|
label=${l("Contract policy")}
|
|
8942
8953
|
></tems-label>
|
|
@@ -8945,7 +8956,7 @@ let S = class extends k {
|
|
|
8945
8956
|
class="flex-1"
|
|
8946
8957
|
@change=${this._selectBundleContractPolicy}
|
|
8947
8958
|
>
|
|
8948
|
-
${this.policyTemplates.map((o) =>
|
|
8959
|
+
${this.policyTemplates.map((o) => c`<option
|
|
8949
8960
|
value="${o.id}"
|
|
8950
8961
|
?selected="${o.id === this.bundleContractPolicy}"
|
|
8951
8962
|
>
|
|
@@ -9131,9 +9142,9 @@ let ft = class extends k {
|
|
|
9131
9142
|
}
|
|
9132
9143
|
render() {
|
|
9133
9144
|
return this.gatekeeper() || this._getResource.render({
|
|
9134
|
-
pending: () =>
|
|
9145
|
+
pending: () => c`<solid-loader></solid-loader>`,
|
|
9135
9146
|
error: (e) => (console.warn("[solid-fact-bundle] Task error:", e), p),
|
|
9136
|
-
complete: (e) =>
|
|
9147
|
+
complete: (e) => c`<tems-viewport>
|
|
9137
9148
|
<tems-header slot="header" heading=${this.header}>
|
|
9138
9149
|
<div slot="cta">
|
|
9139
9150
|
<tems-button
|
|
@@ -9159,7 +9170,7 @@ let ft = class extends k {
|
|
|
9159
9170
|
@clicked=${this._openModal}
|
|
9160
9171
|
@result-count=${this._resultCountUpdate}
|
|
9161
9172
|
></ds4go-fact-bundle-holder>
|
|
9162
|
-
${this.object ?
|
|
9173
|
+
${this.object ? c`<div
|
|
9163
9174
|
class="modal"
|
|
9164
9175
|
@click=${this._closeModalFromBackground}
|
|
9165
9176
|
>
|
|
@@ -9216,38 +9227,50 @@ let nt = class extends k {
|
|
|
9216
9227
|
{ key: "created_at", value: "created_at", cast: M },
|
|
9217
9228
|
{ key: "updated_at", value: "updated_at", cast: M },
|
|
9218
9229
|
{ key: "ldp:contains", value: "facts" }
|
|
9219
|
-
], this._getResource = new Q(this, {
|
|
9230
|
+
], this.assetData = [], this._getResource = new Q(this, {
|
|
9220
9231
|
task: async ([e]) => {
|
|
9221
9232
|
if (!(!this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
|
|
9222
9233
|
if (this.dspConnector?.instance) {
|
|
9223
9234
|
await this.dspConnector.instance.loadAll();
|
|
9224
9235
|
const t = this.dspConnector.parameters["participant-id"];
|
|
9225
9236
|
if (t) {
|
|
9226
|
-
const i = this.dspConnector.instance.negotiations || [], r =
|
|
9237
|
+
const i = this.dspConnector.instance.negotiations || [], r = [];
|
|
9227
9238
|
await Promise.all(
|
|
9228
|
-
i.map(async (
|
|
9229
|
-
if (
|
|
9230
|
-
const
|
|
9231
|
-
|
|
9239
|
+
i.map(async (u) => {
|
|
9240
|
+
if (u.contractAgreementId) {
|
|
9241
|
+
const m = await this.dspConnector?.instance?.loadAgreement(u["@id"]);
|
|
9242
|
+
m && r.push(m);
|
|
9232
9243
|
}
|
|
9233
9244
|
})
|
|
9234
9245
|
);
|
|
9235
|
-
const
|
|
9236
|
-
(
|
|
9237
|
-
),
|
|
9238
|
-
for (const
|
|
9239
|
-
|
|
9240
|
-
(
|
|
9241
|
-
)
|
|
9242
|
-
|
|
9246
|
+
const s = r.filter(
|
|
9247
|
+
(u) => u.consumerId ? u.consumerId.split("/").pop()?.startsWith(t) : !1
|
|
9248
|
+
), o = [];
|
|
9249
|
+
for (const u of s)
|
|
9250
|
+
this.assetData.find(
|
|
9251
|
+
(m) => m["@id"] === u.assetId
|
|
9252
|
+
) || o.push(
|
|
9253
|
+
fetch(
|
|
9254
|
+
`https://afp.connector-dev.startinblox.com/management/v3/assets/${u.assetId}`
|
|
9255
|
+
)
|
|
9256
|
+
);
|
|
9257
|
+
const a = await Promise.all(o);
|
|
9258
|
+
this.assetData = [
|
|
9259
|
+
...this.assetData,
|
|
9260
|
+
...await Promise.all(a.map((u) => u.json()))
|
|
9261
|
+
];
|
|
9262
|
+
const n = [];
|
|
9263
|
+
for (const u of this.assetData) {
|
|
9264
|
+
const m = u?.dataAddress?.baseUrl;
|
|
9265
|
+
m && n.push(this._getProxyValue(m));
|
|
9243
9266
|
}
|
|
9244
|
-
const
|
|
9267
|
+
const d = Array.from(
|
|
9245
9268
|
new Set(
|
|
9246
|
-
(await Promise.all(
|
|
9269
|
+
(await Promise.all(n)).flatMap((u) => u?.facts || []).map((u) => u["@id"])
|
|
9247
9270
|
)
|
|
9248
9271
|
);
|
|
9249
9272
|
this.objects = await Promise.all(
|
|
9250
|
-
|
|
9273
|
+
d.map((u) => this._getProxyValue(u, !0, [
|
|
9251
9274
|
{ key: "created_at", value: "created_at" },
|
|
9252
9275
|
{ key: "updated_at", value: "updated_at", cast: M },
|
|
9253
9276
|
{ key: "name", value: "name" },
|
|
@@ -9259,9 +9282,12 @@ let nt = class extends k {
|
|
|
9259
9282
|
key: "categories",
|
|
9260
9283
|
value: "categories",
|
|
9261
9284
|
expand: !0,
|
|
9262
|
-
cast: async (
|
|
9263
|
-
(await
|
|
9264
|
-
async (
|
|
9285
|
+
cast: async (m) => await Promise.all(
|
|
9286
|
+
(await m._originalResource?.["ldp:contains"]).map(
|
|
9287
|
+
async (f) => ({
|
|
9288
|
+
"@id": f["@id"],
|
|
9289
|
+
name: pt(await f.name || "")
|
|
9290
|
+
})
|
|
9265
9291
|
)
|
|
9266
9292
|
)
|
|
9267
9293
|
},
|
|
@@ -9326,9 +9352,9 @@ let nt = class extends k {
|
|
|
9326
9352
|
}
|
|
9327
9353
|
render() {
|
|
9328
9354
|
return !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute) ? p : this._getResource.render({
|
|
9329
|
-
pending: () =>
|
|
9355
|
+
pending: () => c`<solid-loader></solid-loader>`,
|
|
9330
9356
|
error: (e) => (console.warn("[solid-fact-list] Task error:", e), p),
|
|
9331
|
-
complete: (e) =>
|
|
9357
|
+
complete: (e) => c`<tems-viewport>
|
|
9332
9358
|
<tems-header slot="header" heading=${this.header}></tems-header>
|
|
9333
9359
|
<div slot="content">
|
|
9334
9360
|
<ds4go-catalog-filter-holder
|
|
@@ -9345,7 +9371,7 @@ let nt = class extends k {
|
|
|
9345
9371
|
@clicked=${this._openModal}
|
|
9346
9372
|
@result-count=${this._resultCountUpdate}
|
|
9347
9373
|
></ds4go-fact-holder>
|
|
9348
|
-
${this.object ?
|
|
9374
|
+
${this.object ? c`<div
|
|
9349
9375
|
class="modal"
|
|
9350
9376
|
@click=${this._closeModalFromBackground}
|
|
9351
9377
|
>
|