@startinblox/components-ds4go 2.2.2 → 2.2.4
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
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StoreType as ue, StoreService as pe } from "https://cdn.jsdelivr.net/npm/@startinblox/core@beta/+esm";
|
|
2
|
-
const it = globalThis, Ct = it.ShadowRoot && (it.ShadyCSS === void 0 || it.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
2
|
+
const it = globalThis, Ct = it.ShadowRoot && (it.ShadyCSS === void 0 || it.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, St = /* @__PURE__ */ Symbol(), Ot = /* @__PURE__ */ new WeakMap();
|
|
3
3
|
let Qt = class {
|
|
4
4
|
constructor(t, r, i) {
|
|
5
|
-
if (this._$cssResult$ = !0, i !==
|
|
5
|
+
if (this._$cssResult$ = !0, i !== St) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
6
6
|
this.cssText = t, this.t = r;
|
|
7
7
|
}
|
|
8
8
|
get styleSheet() {
|
|
@@ -18,13 +18,13 @@ let Qt = class {
|
|
|
18
18
|
return this.cssText;
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
const
|
|
21
|
+
const xt = (e) => new Qt(typeof e == "string" ? e : e + "", void 0, St), Y = (e, ...t) => {
|
|
22
22
|
const r = e.length === 1 ? e[0] : t.reduce((i, s, o) => i + ((n) => {
|
|
23
23
|
if (n._$cssResult$ === !0) return n.cssText;
|
|
24
24
|
if (typeof n == "number") return n;
|
|
25
25
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
26
26
|
})(s) + e[o + 1], e[0]);
|
|
27
|
-
return new Qt(r, e,
|
|
27
|
+
return new Qt(r, e, St);
|
|
28
28
|
}, fe = (e, t) => {
|
|
29
29
|
if (Ct) e.adoptedStyleSheets = t.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet);
|
|
30
30
|
else for (const r of t) {
|
|
@@ -34,7 +34,7 @@ const St = (e) => new Qt(typeof e == "string" ? e : e + "", void 0, xt), Y = (e,
|
|
|
34
34
|
}, kt = Ct ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
35
35
|
let r = "";
|
|
36
36
|
for (const i of t.cssRules) r += i.cssText;
|
|
37
|
-
return
|
|
37
|
+
return xt(r);
|
|
38
38
|
})(e) : e;
|
|
39
39
|
const { is: me, defineProperty: ge, getOwnPropertyDescriptor: ye, getOwnPropertyNames: ve, getOwnPropertySymbols: be, getPrototypeOf: $e } = Object, dt = globalThis, Dt = dt.trustedTypes, _e = Dt ? Dt.emptyScript : "", we = dt.reactiveElementPolyfillSupport, K = (e, t) => e, ot = { toAttribute(e, t) {
|
|
40
40
|
switch (t) {
|
|
@@ -66,7 +66,7 @@ const { is: me, defineProperty: ge, getOwnPropertyDescriptor: ye, getOwnProperty
|
|
|
66
66
|
return r;
|
|
67
67
|
} }, ht = (e, t) => !me(e, t), It = { attribute: !0, type: String, converter: ot, reflect: !1, useDefault: !1, hasChanged: ht };
|
|
68
68
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), dt.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
69
|
-
let
|
|
69
|
+
let N = class extends HTMLElement {
|
|
70
70
|
static addInitializer(t) {
|
|
71
71
|
this._$Ei(), (this.l ??= []).push(t);
|
|
72
72
|
}
|
|
@@ -247,15 +247,15 @@ let F = class extends HTMLElement {
|
|
|
247
247
|
firstUpdated(t) {
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
|
|
251
|
-
const Pt = globalThis, Lt = (e) => e, nt = Pt.trustedTypes, Tt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Yt = "$lit$",
|
|
250
|
+
N.elementStyles = [], N.shadowRootOptions = { mode: "open" }, N[K("elementProperties")] = /* @__PURE__ */ new Map(), N[K("finalized")] = /* @__PURE__ */ new Map(), we?.({ ReactiveElement: N }), (dt.reactiveElementVersions ??= []).push("2.1.2");
|
|
251
|
+
const Pt = globalThis, Lt = (e) => e, nt = Pt.trustedTypes, Tt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Yt = "$lit$", S = `lit$${Math.random().toFixed(9).slice(2)}$`, te = "?" + S, Ae = `<${te}>`, T = document, G = () => T.createComment(""), J = (e) => e === null || typeof e != "object" && typeof e != "function", jt = Array.isArray, Ce = (e) => jt(e) || typeof e?.[Symbol.iterator] == "function", mt = `[
|
|
252
252
|
\f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ft = /-->/g, Nt = />/g, O = RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
|
|
253
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, Bt = /"/g, ee = /^(?:script|style|textarea|title)$/i,
|
|
253
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, Bt = /"/g, ee = /^(?:script|style|textarea|title)$/i, Se = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), d = Se(1), H = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), qt = /* @__PURE__ */ new WeakMap(), I = T.createTreeWalker(T, 129);
|
|
254
254
|
function re(e, t) {
|
|
255
255
|
if (!jt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
256
256
|
return Tt !== void 0 ? Tt.createHTML(t) : t;
|
|
257
257
|
}
|
|
258
|
-
const
|
|
258
|
+
const xe = (e, t) => {
|
|
259
259
|
const r = e.length - 1, i = [];
|
|
260
260
|
let s, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = W;
|
|
261
261
|
for (let a = 0; a < r; a++) {
|
|
@@ -263,7 +263,7 @@ const Se = (e, t) => {
|
|
|
263
263
|
let u, f, p = -1, b = 0;
|
|
264
264
|
for (; b < l.length && (n.lastIndex = b, f = n.exec(l), f !== null); ) b = n.lastIndex, n === W ? f[1] === "!--" ? n = Ft : f[1] !== void 0 ? n = Nt : f[2] !== void 0 ? (ee.test(f[2]) && (s = RegExp("</" + f[2], "g")), n = O) : f[3] !== void 0 && (n = O) : n === O ? f[0] === ">" ? (n = s ?? W, p = -1) : f[1] === void 0 ? p = -2 : (p = n.lastIndex - f[2].length, u = f[1], n = f[3] === void 0 ? O : f[3] === '"' ? Bt : Mt) : n === Bt || n === Mt ? n = O : n === Ft || n === Nt ? n = W : (n = O, s = void 0);
|
|
265
265
|
const $ = n === O && e[a + 1].startsWith("/>") ? " " : "";
|
|
266
|
-
o += n === W ? l + Ae : p >= 0 ? (i.push(u), l.slice(0, p) + Yt + l.slice(p) +
|
|
266
|
+
o += n === W ? l + Ae : p >= 0 ? (i.push(u), l.slice(0, p) + Yt + l.slice(p) + S + $) : l + S + (p === -2 ? a : $);
|
|
267
267
|
}
|
|
268
268
|
return [re(e, o + (e[r] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
269
269
|
};
|
|
@@ -272,35 +272,35 @@ class Z {
|
|
|
272
272
|
let s;
|
|
273
273
|
this.parts = [];
|
|
274
274
|
let o = 0, n = 0;
|
|
275
|
-
const a = t.length - 1, l = this.parts, [u, f] =
|
|
276
|
-
if (this.el = Z.createElement(u, i),
|
|
275
|
+
const a = t.length - 1, l = this.parts, [u, f] = xe(t, r);
|
|
276
|
+
if (this.el = Z.createElement(u, i), I.currentNode = this.el.content, r === 2 || r === 3) {
|
|
277
277
|
const p = this.el.content.firstChild;
|
|
278
278
|
p.replaceWith(...p.childNodes);
|
|
279
279
|
}
|
|
280
|
-
for (; (s =
|
|
280
|
+
for (; (s = I.nextNode()) !== null && l.length < a; ) {
|
|
281
281
|
if (s.nodeType === 1) {
|
|
282
282
|
if (s.hasAttributes()) for (const p of s.getAttributeNames()) if (p.endsWith(Yt)) {
|
|
283
|
-
const b = f[n++], $ = s.getAttribute(p).split(
|
|
283
|
+
const b = f[n++], $ = s.getAttribute(p).split(S), rt = /([.?@])?(.*)/.exec(b);
|
|
284
284
|
l.push({ type: 1, index: o, name: rt[2], strings: $, ctor: rt[1] === "." ? je : rt[1] === "?" ? Ee : rt[1] === "@" ? Re : ut }), s.removeAttribute(p);
|
|
285
|
-
} else p.startsWith(
|
|
285
|
+
} else p.startsWith(S) && (l.push({ type: 6, index: o }), s.removeAttribute(p));
|
|
286
286
|
if (ee.test(s.tagName)) {
|
|
287
|
-
const p = s.textContent.split(
|
|
287
|
+
const p = s.textContent.split(S), b = p.length - 1;
|
|
288
288
|
if (b > 0) {
|
|
289
289
|
s.textContent = nt ? nt.emptyScript : "";
|
|
290
|
-
for (let $ = 0; $ < b; $++) s.append(p[$], G()),
|
|
290
|
+
for (let $ = 0; $ < b; $++) s.append(p[$], G()), I.nextNode(), l.push({ type: 2, index: ++o });
|
|
291
291
|
s.append(p[b], G());
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
} else if (s.nodeType === 8) if (s.data === te) l.push({ type: 2, index: o });
|
|
295
295
|
else {
|
|
296
296
|
let p = -1;
|
|
297
|
-
for (; (p = s.data.indexOf(
|
|
297
|
+
for (; (p = s.data.indexOf(S, p + 1)) !== -1; ) l.push({ type: 7, index: o }), p += S.length - 1;
|
|
298
298
|
}
|
|
299
299
|
o++;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
static createElement(t, r) {
|
|
303
|
-
const i =
|
|
303
|
+
const i = T.createElement("template");
|
|
304
304
|
return i.innerHTML = t, i;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
@@ -321,17 +321,17 @@ class Pe {
|
|
|
321
321
|
return this._$AM._$AU;
|
|
322
322
|
}
|
|
323
323
|
u(t) {
|
|
324
|
-
const { el: { content: r }, parts: i } = this._$AD, s = (t?.creationScope ??
|
|
325
|
-
|
|
326
|
-
let o =
|
|
324
|
+
const { el: { content: r }, parts: i } = this._$AD, s = (t?.creationScope ?? T).importNode(r, !0);
|
|
325
|
+
I.currentNode = s;
|
|
326
|
+
let o = I.nextNode(), n = 0, a = 0, l = i[0];
|
|
327
327
|
for (; l !== void 0; ) {
|
|
328
328
|
if (n === l.index) {
|
|
329
329
|
let u;
|
|
330
330
|
l.type === 2 ? u = new tt(o, o.nextSibling, this, t) : l.type === 1 ? u = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (u = new Ue(o, this, t)), this._$AV.push(u), l = i[++a];
|
|
331
331
|
}
|
|
332
|
-
n !== l?.index && (o =
|
|
332
|
+
n !== l?.index && (o = I.nextNode(), n++);
|
|
333
333
|
}
|
|
334
|
-
return
|
|
334
|
+
return I.currentNode = T, s;
|
|
335
335
|
}
|
|
336
336
|
p(t) {
|
|
337
337
|
let r = 0;
|
|
@@ -366,7 +366,7 @@ class tt {
|
|
|
366
366
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
367
367
|
}
|
|
368
368
|
_(t) {
|
|
369
|
-
this._$AH !== c && J(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
369
|
+
this._$AH !== c && J(this._$AH) ? this._$AA.nextSibling.data = t : this.T(T.createTextNode(t)), this._$AH = t;
|
|
370
370
|
}
|
|
371
371
|
$(t) {
|
|
372
372
|
const { values: r, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = Z.createElement(re(i.h, i.h[0]), this.options)), i);
|
|
@@ -474,7 +474,7 @@ const ke = (e, t, r) => {
|
|
|
474
474
|
return s._$AI(e), s;
|
|
475
475
|
};
|
|
476
476
|
const Et = globalThis;
|
|
477
|
-
let q = class extends
|
|
477
|
+
let q = class extends N {
|
|
478
478
|
constructor() {
|
|
479
479
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
480
480
|
}
|
|
@@ -600,7 +600,7 @@ class v extends Rt {
|
|
|
600
600
|
);
|
|
601
601
|
a && (i = a[0]?.uniq);
|
|
602
602
|
}
|
|
603
|
-
i &&
|
|
603
|
+
i && D(
|
|
604
604
|
(window.orbit ? window.orbit.getRoute(i, !0) : i) + (s ? `-${s}` : ""),
|
|
605
605
|
o
|
|
606
606
|
), t.preventDefault();
|
|
@@ -713,10 +713,10 @@ function Be(e, t, r) {
|
|
|
713
713
|
if (!e) return null;
|
|
714
714
|
const i = JSON.parse(JSON.stringify(e));
|
|
715
715
|
i["@id"] && (i["@id"] = B(i["@id"]));
|
|
716
|
-
const s =
|
|
716
|
+
const s = M(t, ["@id"]) || "";
|
|
717
717
|
return i.target = B(s), i;
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function M(e, t) {
|
|
720
720
|
if (t.length === 0)
|
|
721
721
|
return;
|
|
722
722
|
let r = e;
|
|
@@ -767,14 +767,14 @@ class qe {
|
|
|
767
767
|
* Maps a single field
|
|
768
768
|
*/
|
|
769
769
|
mapField(t, r, i) {
|
|
770
|
-
let s =
|
|
771
|
-
return r.transform && (s = r.transform(s, t, i)), (s == null || s === "") && r.fallback && (typeof r.fallback == "function" ? s = r.fallback(t, i) : s =
|
|
770
|
+
let s = M(t, r.source);
|
|
771
|
+
return r.transform && (s = r.transform(s, t, i)), (s == null || s === "") && r.fallback && (typeof r.fallback == "function" ? s = r.fallback(t, i) : s = M(t, [r.fallback])), (s == null || s === "") && (s = r.defaultValue), s;
|
|
772
772
|
}
|
|
773
773
|
/**
|
|
774
774
|
* Maps a container field (array wrapped in LDP container)
|
|
775
775
|
*/
|
|
776
776
|
mapContainerField(t, r, i) {
|
|
777
|
-
let s =
|
|
777
|
+
let s = M(t, r.source);
|
|
778
778
|
if (!s)
|
|
779
779
|
return null;
|
|
780
780
|
r.transform && (s = r.transform(s, t, i)), Array.isArray(s) || (s = [s]), r.filter && (s = s.filter(
|
|
@@ -799,14 +799,14 @@ class qe {
|
|
|
799
799
|
* Maps a nested object
|
|
800
800
|
*/
|
|
801
801
|
mapNestedObject(t, r, i) {
|
|
802
|
-
const s =
|
|
802
|
+
const s = M(t, r.source);
|
|
803
803
|
if (!s)
|
|
804
804
|
return null;
|
|
805
805
|
const o = {};
|
|
806
806
|
r.type && (o["@type"] = r.type);
|
|
807
807
|
for (const [n, a] of Object.entries(r.fields)) {
|
|
808
808
|
let l;
|
|
809
|
-
Array.isArray(a) ? l =
|
|
809
|
+
Array.isArray(a) ? l = M(s, a) : l = this.mapField(s, a, i), l !== void 0 && (o[n] = l);
|
|
810
810
|
}
|
|
811
811
|
return Object.keys(o).length > (r.type ? 1 : 0) ? o : null;
|
|
812
812
|
}
|
|
@@ -1247,7 +1247,20 @@ E([
|
|
|
1247
1247
|
E([
|
|
1248
1248
|
y({ type: Array })
|
|
1249
1249
|
], C.prototype, "providers");
|
|
1250
|
-
|
|
1250
|
+
const We = (e, { keywords: t = [], attributes: r = ["dataSrc"] } = {}) => {
|
|
1251
|
+
const i = () => {
|
|
1252
|
+
t && r && (e.caching === void 0 && (e.caching = 0), e.hasCachedDatas === void 0 && (e.hasCachedDatas = !1), e.cacheListener = (s) => {
|
|
1253
|
+
const o = s.detail.id || s.detail.resource["@id"];
|
|
1254
|
+
if (t.some((n) => o?.includes(n))) {
|
|
1255
|
+
for (const n of r)
|
|
1256
|
+
e[n] && o !== e[n] && window.sibStore.clearCache(e[n]);
|
|
1257
|
+
e.caching++, e.hasCachedDatas = !1, e.requestUpdate();
|
|
1258
|
+
}
|
|
1259
|
+
}, e._subscriptions.add(["save", e.cacheListener]), e._subscribe());
|
|
1260
|
+
};
|
|
1261
|
+
document.readyState !== "complete" ? document.addEventListener("DOMContentLoaded", i) : i();
|
|
1262
|
+
};
|
|
1263
|
+
function Ke() {
|
|
1251
1264
|
return Math.random().toString(16).slice(2);
|
|
1252
1265
|
}
|
|
1253
1266
|
const se = ({
|
|
@@ -1255,7 +1268,7 @@ const se = ({
|
|
|
1255
1268
|
defaultRoute: t = !1,
|
|
1256
1269
|
ignoreRouter: r = !1
|
|
1257
1270
|
}) => {
|
|
1258
|
-
if (e.uniq || (e.uniq =
|
|
1271
|
+
if (e.uniq || (e.uniq = Ke(), t && !e.route && !r && (e.route = t)), e._subscriptions = /* @__PURE__ */ new Set(), !r) {
|
|
1259
1272
|
e.route || (e.route = e.uniq, window.orbit && (e.route = window.orbit.getRoute(e.uniq))), e.noRouter = !0;
|
|
1260
1273
|
let i = document.querySelector("solid-router");
|
|
1261
1274
|
for (; i; )
|
|
@@ -1301,14 +1314,14 @@ const vt = (e, t, r) => {
|
|
|
1301
1314
|
return Array.isArray(e) ? e.some(
|
|
1302
1315
|
(o) => vt(o, t, r)
|
|
1303
1316
|
) : typeof e == "object" ? Object.entries(e).some(([o, n]) => o === t && zt(n) ? !1 : vt(n, t, r)) : !1;
|
|
1304
|
-
},
|
|
1317
|
+
}, Ge = (e, t, r) => {
|
|
1305
1318
|
if (!t || !r || typeof r != "string")
|
|
1306
1319
|
return e;
|
|
1307
1320
|
const i = new Date(r);
|
|
1308
1321
|
return Number.isNaN(i.getTime()) ? (console.warn(`Invalid threshold date provided: ${r}`), e) : e.filter(
|
|
1309
1322
|
(s) => vt(s, t, i)
|
|
1310
1323
|
);
|
|
1311
|
-
},
|
|
1324
|
+
}, Je = (e, t, r) => !t || !r ? e : e.filter((i) => {
|
|
1312
1325
|
let s = i;
|
|
1313
1326
|
const o = t.split(".");
|
|
1314
1327
|
for (const a of o)
|
|
@@ -1321,7 +1334,7 @@ const vt = (e, t, r) => {
|
|
|
1321
1334
|
(a) => typeof a == "object" && a !== null && "@id" in a && a["@id"] === r
|
|
1322
1335
|
) : !1 : !1;
|
|
1323
1336
|
});
|
|
1324
|
-
function
|
|
1337
|
+
function Ze(e) {
|
|
1325
1338
|
return typeof e != "string" && typeof e != "number" && !(e instanceof Date) ? !1 : !Number.isNaN(new Date(e).getTime());
|
|
1326
1339
|
}
|
|
1327
1340
|
const bt = (e, t, r, i) => {
|
|
@@ -1337,7 +1350,7 @@ const bt = (e, t, r, i) => {
|
|
|
1337
1350
|
if (typeof o == "number") {
|
|
1338
1351
|
if (typeof r == "number" && typeof i == "number" && r <= o && o <= i)
|
|
1339
1352
|
return !0;
|
|
1340
|
-
} else if (
|
|
1353
|
+
} else if (Ze(o)) {
|
|
1341
1354
|
const n = new Date(o);
|
|
1342
1355
|
if (r instanceof Date && i instanceof Date && r <= n && n <= i)
|
|
1343
1356
|
return !0;
|
|
@@ -1348,7 +1361,7 @@ const bt = (e, t, r, i) => {
|
|
|
1348
1361
|
) : typeof e == "object" ? Object.entries(e).some(
|
|
1349
1362
|
([n, a]) => bt(a, t, r, i)
|
|
1350
1363
|
) : !1;
|
|
1351
|
-
},
|
|
1364
|
+
}, Xe = (e, t, r) => {
|
|
1352
1365
|
if (!t || !r || typeof r != "string")
|
|
1353
1366
|
return e;
|
|
1354
1367
|
const [i, s] = r.split("/").map(Number);
|
|
@@ -1388,7 +1401,7 @@ const bt = (e, t, r, i) => {
|
|
|
1388
1401
|
)
|
|
1389
1402
|
), i === 2) break;
|
|
1390
1403
|
return i;
|
|
1391
|
-
},
|
|
1404
|
+
}, Qe = (e, t, r) => {
|
|
1392
1405
|
if (!t || !r || r.trim() === "")
|
|
1393
1406
|
return e;
|
|
1394
1407
|
const i = r.toLowerCase(), o = e.map((n) => {
|
|
@@ -1405,7 +1418,7 @@ const bt = (e, t, r, i) => {
|
|
|
1405
1418
|
return a && (u = $t(a, i)), { obj: n, score: u };
|
|
1406
1419
|
}).filter((n) => n.score > 0);
|
|
1407
1420
|
return o.sort((n, a) => a.score - n.score), o.map((n) => n.obj);
|
|
1408
|
-
},
|
|
1421
|
+
}, Ye = (e, t) => t ? e.filter((r) => {
|
|
1409
1422
|
const i = r["@type"];
|
|
1410
1423
|
return i ? typeof i == "string" ? i === t : Array.isArray(i) ? i.some((s) => s === t) : !1 : !1;
|
|
1411
1424
|
}) : e, _t = (e, t, r) => {
|
|
@@ -1461,7 +1474,7 @@ const bt = (e, t, r, i) => {
|
|
|
1461
1474
|
else
|
|
1462
1475
|
throw new TypeError(`Unsupported data type for key "${t}"`);
|
|
1463
1476
|
return r === "asc" ? a : -a;
|
|
1464
|
-
}),
|
|
1477
|
+
}), L = (e, t = {
|
|
1465
1478
|
day: "2-digit",
|
|
1466
1479
|
month: "2-digit",
|
|
1467
1480
|
year: "2-digit"
|
|
@@ -1469,7 +1482,7 @@ const bt = (e, t, r, i) => {
|
|
|
1469
1482
|
if (!e) return "";
|
|
1470
1483
|
const i = (typeof e == "string" ? new Date(e) : e).toLocaleString(void 0, t);
|
|
1471
1484
|
return typeof e == "string" && i === "Invalid Date" ? e : i;
|
|
1472
|
-
},
|
|
1485
|
+
}, D = (e, t = !1) => {
|
|
1473
1486
|
window.dispatchEvent(
|
|
1474
1487
|
new CustomEvent("requestNavigation", {
|
|
1475
1488
|
detail: {
|
|
@@ -1478,31 +1491,31 @@ const bt = (e, t, r, i) => {
|
|
|
1478
1491
|
}
|
|
1479
1492
|
})
|
|
1480
1493
|
);
|
|
1481
|
-
},
|
|
1482
|
-
ds4go:
|
|
1483
|
-
link:
|
|
1484
|
-
enclosure:
|
|
1485
|
-
url:
|
|
1494
|
+
}, tr = "https://cdn.startinblox.com/owl/ds4go.jsonld#", er = { "@id": "ds4go:link", "@type": "@id" }, rr = { "@id": "ds4go:enclosure", "@type": "@id" }, sr = { "@id": "ds4go:url", "@type": "@id" }, Wt = {
|
|
1495
|
+
ds4go: tr,
|
|
1496
|
+
link: er,
|
|
1497
|
+
enclosure: rr,
|
|
1498
|
+
url: sr
|
|
1486
1499
|
};
|
|
1487
1500
|
const wt = "lit-localize-status";
|
|
1488
|
-
const
|
|
1501
|
+
const ir = (e, ...t) => ({
|
|
1489
1502
|
strTag: !0,
|
|
1490
1503
|
strings: e,
|
|
1491
1504
|
values: t
|
|
1492
|
-
}),
|
|
1505
|
+
}), x = ir, or = (e) => typeof e != "string" && "strTag" in e, oe = (e, t, r) => {
|
|
1493
1506
|
let i = e[0];
|
|
1494
1507
|
for (let s = 1; s < e.length; s++)
|
|
1495
1508
|
i += t[r ? r[s - 1] : s - 1], i += e[s];
|
|
1496
1509
|
return i;
|
|
1497
1510
|
};
|
|
1498
|
-
const ne = ((e) =>
|
|
1511
|
+
const ne = ((e) => or(e) ? oe(e.strings, e.values) : e);
|
|
1499
1512
|
let h = ne, Kt = !1;
|
|
1500
|
-
function
|
|
1513
|
+
function nr(e) {
|
|
1501
1514
|
if (Kt)
|
|
1502
1515
|
throw new Error("lit-localize can only be configured once");
|
|
1503
1516
|
h = e, Kt = !0;
|
|
1504
1517
|
}
|
|
1505
|
-
class
|
|
1518
|
+
class ar {
|
|
1506
1519
|
constructor(t) {
|
|
1507
1520
|
this.__litLocalizeEventHandler = (r) => {
|
|
1508
1521
|
r.detail.status === "ready" && this.host.requestUpdate();
|
|
@@ -1515,8 +1528,8 @@ class nr {
|
|
|
1515
1528
|
window.removeEventListener(wt, this.__litLocalizeEventHandler);
|
|
1516
1529
|
}
|
|
1517
1530
|
}
|
|
1518
|
-
const
|
|
1519
|
-
const
|
|
1531
|
+
const cr = (e) => e.addController(new ar(e)), lr = cr;
|
|
1532
|
+
const dr = () => (e, t) => (e.addInitializer(lr), e);
|
|
1520
1533
|
class ae {
|
|
1521
1534
|
constructor() {
|
|
1522
1535
|
this.settled = !1, this.promise = new Promise((t, r) => {
|
|
@@ -1533,20 +1546,20 @@ class ae {
|
|
|
1533
1546
|
const A = [];
|
|
1534
1547
|
for (let e = 0; e < 256; e++)
|
|
1535
1548
|
A[e] = (e >> 4 & 15).toString(16) + (e & 15).toString(16);
|
|
1536
|
-
function
|
|
1549
|
+
function hr(e) {
|
|
1537
1550
|
let t = 0, r = 8997, i = 0, s = 33826, o = 0, n = 40164, a = 0, l = 52210;
|
|
1538
1551
|
for (let u = 0; u < e.length; u++)
|
|
1539
1552
|
r ^= e.charCodeAt(u), t = r * 435, i = s * 435, o = n * 435, a = l * 435, o += r << 8, a += s << 8, i += t >>> 16, r = t & 65535, o += i >>> 16, s = i & 65535, l = a + (o >>> 16) & 65535, n = o & 65535;
|
|
1540
1553
|
return A[l >> 8] + A[l & 255] + A[n >> 8] + A[n & 255] + A[s >> 8] + A[s & 255] + A[r >> 8] + A[r & 255];
|
|
1541
1554
|
}
|
|
1542
|
-
const
|
|
1543
|
-
function
|
|
1544
|
-
return (t ?
|
|
1555
|
+
const ur = "", pr = "h", fr = "s";
|
|
1556
|
+
function mr(e, t) {
|
|
1557
|
+
return (t ? pr : fr) + hr(typeof e == "string" ? e : e.join(ur));
|
|
1545
1558
|
}
|
|
1546
1559
|
const Gt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new Map();
|
|
1547
|
-
function
|
|
1560
|
+
function gr(e, t, r) {
|
|
1548
1561
|
if (e) {
|
|
1549
|
-
const i = r?.id ??
|
|
1562
|
+
const i = r?.id ?? yr(t), s = e[i];
|
|
1550
1563
|
if (s) {
|
|
1551
1564
|
if (typeof s == "string")
|
|
1552
1565
|
return s;
|
|
@@ -1569,10 +1582,10 @@ function mr(e, t, r) {
|
|
|
1569
1582
|
}
|
|
1570
1583
|
return ne(t);
|
|
1571
1584
|
}
|
|
1572
|
-
function
|
|
1585
|
+
function yr(e) {
|
|
1573
1586
|
const t = typeof e == "string" ? e : e.strings;
|
|
1574
1587
|
let r = Jt.get(t);
|
|
1575
|
-
return r === void 0 && (r =
|
|
1588
|
+
return r === void 0 && (r = mr(t, typeof e != "string" && !("strTag" in e)), Jt.set(t, r)), r;
|
|
1576
1589
|
}
|
|
1577
1590
|
function gt(e) {
|
|
1578
1591
|
window.dispatchEvent(new CustomEvent(wt, { detail: e }));
|
|
@@ -1580,7 +1593,7 @@ function gt(e) {
|
|
|
1580
1593
|
let at = "", yt, ce, ct, At, le, k = new ae();
|
|
1581
1594
|
k.resolve();
|
|
1582
1595
|
let st = 0;
|
|
1583
|
-
const
|
|
1596
|
+
const vr = (e) => (nr(((t, r) => gr(le, t, r))), at = ce = e.sourceLocale, ct = new Set(e.targetLocales), ct.add(e.sourceLocale), At = e.loadLocale, { getLocale: br, setLocale: $r }), br = () => at, $r = (e) => {
|
|
1584
1597
|
if (e === (yt ?? at))
|
|
1585
1598
|
return k.promise;
|
|
1586
1599
|
if (!ct || !At)
|
|
@@ -1604,10 +1617,10 @@ const yr = (e) => (or(((t, r) => mr(le, t, r))), at = ce = e.sourceLocale, ct =
|
|
|
1604
1617
|
}), k.reject(i));
|
|
1605
1618
|
}), k.promise;
|
|
1606
1619
|
};
|
|
1607
|
-
var
|
|
1608
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
1620
|
+
var _r = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, Ut = (e, t, r, i) => {
|
|
1621
|
+
for (var s = i > 1 ? void 0 : i ? wr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
|
|
1609
1622
|
(n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
1610
|
-
return i && s &&
|
|
1623
|
+
return i && s && _r(t, r, s), s;
|
|
1611
1624
|
};
|
|
1612
1625
|
let X = class extends Rt {
|
|
1613
1626
|
constructor() {
|
|
@@ -1630,7 +1643,7 @@ let X = class extends Rt {
|
|
|
1630
1643
|
switch (n.type) {
|
|
1631
1644
|
case "interval":
|
|
1632
1645
|
o.push(
|
|
1633
|
-
|
|
1646
|
+
Xe(
|
|
1634
1647
|
i,
|
|
1635
1648
|
n.name,
|
|
1636
1649
|
n.value
|
|
@@ -1639,7 +1652,7 @@ let X = class extends Rt {
|
|
|
1639
1652
|
break;
|
|
1640
1653
|
case "dateAfter":
|
|
1641
1654
|
o.push(
|
|
1642
|
-
|
|
1655
|
+
Ge(
|
|
1643
1656
|
i,
|
|
1644
1657
|
n.name,
|
|
1645
1658
|
n.value
|
|
@@ -1648,7 +1661,7 @@ let X = class extends Rt {
|
|
|
1648
1661
|
break;
|
|
1649
1662
|
case "matchId":
|
|
1650
1663
|
o.push(
|
|
1651
|
-
|
|
1664
|
+
Je(
|
|
1652
1665
|
i,
|
|
1653
1666
|
n.name,
|
|
1654
1667
|
n.value
|
|
@@ -1657,12 +1670,12 @@ let X = class extends Rt {
|
|
|
1657
1670
|
break;
|
|
1658
1671
|
case "matchType":
|
|
1659
1672
|
o.push(
|
|
1660
|
-
|
|
1673
|
+
Ye(i, n.value)
|
|
1661
1674
|
);
|
|
1662
1675
|
break;
|
|
1663
1676
|
case "exact":
|
|
1664
1677
|
o.push(
|
|
1665
|
-
|
|
1678
|
+
Qe(
|
|
1666
1679
|
i,
|
|
1667
1680
|
n.name,
|
|
1668
1681
|
n.value
|
|
@@ -1737,11 +1750,11 @@ Ut([
|
|
|
1737
1750
|
X = Ut([
|
|
1738
1751
|
V("ds4go-fact-bundle-holder")
|
|
1739
1752
|
], X);
|
|
1740
|
-
const
|
|
1741
|
-
var
|
|
1742
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
1753
|
+
const Ar = ".flex{display:flex}.flex.flex-row{flex-direction:row}.flex.flex-column{flex-direction:column}.flex.wrap{flex-wrap:wrap}.flex.flex-1{flex:1}.flex .half,.flex.half{flex-basis:50%}.flex.justify-content-center{justify-content:center}.flex.justify-content-space-between{justify-content:space-between}.flex.align-items-center{align-items:center}.flex.align-items-flex-start{align-items:flex-start}.flex .align-items-flex-end{align-items:flex-end}.full-width{width:100%}.modal{background-color:var(--color-surface-primary);border:var(--border-width-sm) solid var(--color-border-primary);border-radius:var(--border-radius-lg);color:var(--color-text-body);display:flex;flex-direction:column;font-family:var(--font-family-body);font-size:var(--typography-size-body-md);font-style:normal;font-weight:var(--font-weight-regular);gap:var(--scale-600);height:90vh;letter-spacing:var(--font-letter-spacing-default);line-height:var(--line-height-body-md);padding:var(--scale-600) var(--scale-900);width:90vw}.modal .topbar{display:flex;flex-direction:row;gap:var(--scale-400);width:100%}.modal .topbar tems-button:nth-child(2){margin-left:auto}.modal .modal-content-wrapper{display:flex;flex:1;flex-direction:column;overflow:hidden}.modal .modal-content-wrapper .modal-box{display:flex;flex:1;overflow-x:hidden;overflow-y:scroll}.modal .modal-content-wrapper .modal-content{display:flex;flex-direction:column;gap:var(--scale-400);height:fit-content;width:100%}.modal .modal-content-wrapper tems-division{width:fit-content}.modal .modal-content-wrapper tems-division div{display:block;height:auto;overflow:hidden;text-overflow:ellipsis}.modal .modal-content-wrapper .card-grid{display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.modal .modal-content-wrapper .card-grid-vertical{justify-content:stretch}.modal .modal-content-wrapper .card-grid-vertical tems-card-catalog{height:auto;width:354px}@media screen and (min-width:1100px){div.modal{height:fit-content;max-height:80vw;max-width:80vw;width:fit-content}}";
|
|
1754
|
+
var Cr = Object.defineProperty, Sr = Object.getOwnPropertyDescriptor, de = (e, t, r, i) => {
|
|
1755
|
+
for (var s = i > 1 ? void 0 : i ? Sr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
|
|
1743
1756
|
(n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
1744
|
-
return i && s &&
|
|
1757
|
+
return i && s && Cr(t, r, s), s;
|
|
1745
1758
|
};
|
|
1746
1759
|
let lt = class extends Ie {
|
|
1747
1760
|
constructor() {
|
|
@@ -1763,10 +1776,10 @@ let lt = class extends Ie {
|
|
|
1763
1776
|
<div class="modal-box">
|
|
1764
1777
|
<div class="modal-content">
|
|
1765
1778
|
<tems-division type="h3"
|
|
1766
|
-
><div>${String(this.object.name)}</div></tems-division
|
|
1779
|
+
><div>${String(this.object.name || "")}</div></tems-division
|
|
1767
1780
|
>
|
|
1768
1781
|
<tems-division type="body-m"
|
|
1769
|
-
><div>${String(this.object.description)}</div></tems-division
|
|
1782
|
+
><div>${String(this.object.description || "")}</div></tems-division
|
|
1770
1783
|
>
|
|
1771
1784
|
<tems-division type="h4"
|
|
1772
1785
|
><div>${h("All facts in this bundle")}</div></tems-division
|
|
@@ -1810,14 +1823,14 @@ let lt = class extends Ie {
|
|
|
1810
1823
|
}
|
|
1811
1824
|
};
|
|
1812
1825
|
lt.styles = Y`
|
|
1813
|
-
${
|
|
1826
|
+
${xt(Ar)}
|
|
1814
1827
|
`;
|
|
1815
1828
|
de([
|
|
1816
1829
|
y({ attribute: !1, type: Object })
|
|
1817
1830
|
], lt.prototype, "object", 2);
|
|
1818
1831
|
lt = de([
|
|
1819
1832
|
V("ds4go-fact-bundle-modal"),
|
|
1820
|
-
|
|
1833
|
+
dr()
|
|
1821
1834
|
], lt);
|
|
1822
1835
|
const xr = /* @__PURE__ */ Symbol();
|
|
1823
1836
|
class pt {
|
|
@@ -1829,7 +1842,7 @@ class pt {
|
|
|
1829
1842
|
constructor(t, r, i) {
|
|
1830
1843
|
this.p = 0, this.i = 0, (this._ = t).addController(this);
|
|
1831
1844
|
const s = typeof r == "object" ? r : { task: r, args: i };
|
|
1832
|
-
this.v = s.task, this.j = s.args, this.m = s.argsEqual ??
|
|
1845
|
+
this.v = s.task, this.j = s.args, this.m = s.argsEqual ?? Pr, this.k = s.onComplete, this.A = s.onError, this.autoRun = s.autoRun ?? !0, "initialValue" in s && (this.u = s.initialValue, this.i = 2, this.O = this.T?.());
|
|
1833
1846
|
}
|
|
1834
1847
|
hostUpdate() {
|
|
1835
1848
|
this.autoRun === !0 && this.S();
|
|
@@ -1906,11 +1919,11 @@ class pt {
|
|
|
1906
1919
|
}
|
|
1907
1920
|
}
|
|
1908
1921
|
}
|
|
1909
|
-
const
|
|
1910
|
-
var
|
|
1911
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
1922
|
+
const Pr = (e, t) => e === t || e.length === t.length && e.every(((r, i) => !ht(r, t[i])));
|
|
1923
|
+
var jr = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, R = (e, t, r, i) => {
|
|
1924
|
+
for (var s = i > 1 ? void 0 : i ? Er(t, r) : t, o = e.length - 1, n; o >= 0; o--)
|
|
1912
1925
|
(n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
1913
|
-
return i && s &&
|
|
1926
|
+
return i && s && jr(t, r, s), s;
|
|
1914
1927
|
};
|
|
1915
1928
|
let _ = class extends v {
|
|
1916
1929
|
constructor() {
|
|
@@ -2028,12 +2041,12 @@ let _ = class extends v {
|
|
|
2028
2041
|
<tems-header
|
|
2029
2042
|
slot="header"
|
|
2030
2043
|
heading=${this.catalogId ? e ? this.catalogId === "*" ? `${h("All Datasets")}` : `${h("Datasets from")}
|
|
2031
|
-
${e["dct:title"]} (From ${this.sectorId})` : `${h(
|
|
2044
|
+
${e["dct:title"]} (From ${this.sectorId})` : `${h(x`Error while loading catalog ${this.catalogId}`)}` : this.sectorId ? this.sectorId === "*" ? `${h("All Sectors")}` : `${h("Catalogs available in")} ${this.sectorId}` : `${h("Root Authority")}`}
|
|
2032
2045
|
>${(this.sectorId || this.catalogId) && !(this.catalogId === "*" && this.sectorId === "*") && !(this.sectorId === "*" && !this.catalogId) ? d`<div slot="cta">
|
|
2033
2046
|
<tems-button
|
|
2034
2047
|
type="primary"
|
|
2035
2048
|
label=${h(
|
|
2036
|
-
|
|
2049
|
+
x`Back to ${this.catalogId ? this.sectorId : "Root Authority"}`
|
|
2037
2050
|
)}
|
|
2038
2051
|
@click=${this._back}
|
|
2039
2052
|
></tems-button>
|
|
@@ -2059,7 +2072,7 @@ let _ = class extends v {
|
|
|
2059
2072
|
type=${"bill-image"}
|
|
2060
2073
|
.header=${t.catalogId || c}
|
|
2061
2074
|
.content=${t.description || c}
|
|
2062
|
-
date=${
|
|
2075
|
+
date=${L(t.lastUpdated) || c}
|
|
2063
2076
|
@click=${() => this._selectCatalog(t.catalogId)}
|
|
2064
2077
|
></tems-card-catalog>`
|
|
2065
2078
|
)}` : d`${e.map(
|
|
@@ -2069,7 +2082,7 @@ let _ = class extends v {
|
|
|
2069
2082
|
type=${"bill-image"}
|
|
2070
2083
|
.header=${t.id || c}
|
|
2071
2084
|
.content=${t.description || c}
|
|
2072
|
-
date=${
|
|
2085
|
+
date=${L(t.lastUpdated) || c}
|
|
2073
2086
|
@click=${() => this._selectSector(t.id)}
|
|
2074
2087
|
></tems-card-catalog>`
|
|
2075
2088
|
)}`}
|
|
@@ -2139,10 +2152,10 @@ R([
|
|
|
2139
2152
|
_ = R([
|
|
2140
2153
|
V("solid-dsif-explorer-poc")
|
|
2141
2154
|
], _);
|
|
2142
|
-
var
|
|
2143
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
2155
|
+
var Rr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, ft = (e, t, r, i) => {
|
|
2156
|
+
for (var s = i > 1 ? void 0 : i ? Ur(t, r) : t, o = e.length - 1, n; o >= 0; o--)
|
|
2144
2157
|
(n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
2145
|
-
return i && s &&
|
|
2158
|
+
return i && s && Rr(t, r, s), s;
|
|
2146
2159
|
};
|
|
2147
2160
|
let Q = class extends C {
|
|
2148
2161
|
constructor() {
|
|
@@ -2264,17 +2277,17 @@ ft([
|
|
|
2264
2277
|
Q = ft([
|
|
2265
2278
|
V("solid-dsp-connector")
|
|
2266
2279
|
], Q);
|
|
2267
|
-
const
|
|
2268
|
-
var
|
|
2269
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
2280
|
+
const Or = ".flex{display:flex}.flex.flex-row{flex-direction:row}.flex.flex-column{flex-direction:column}.flex.wrap{flex-wrap:wrap}.flex.flex-1{flex:1}.flex .half,.flex.half{flex-basis:50%}.flex.justify-content-center{justify-content:center}.flex.justify-content-space-between{justify-content:space-between}.flex.align-items-center{align-items:center}.flex.align-items-flex-start{align-items:flex-start}.flex .align-items-flex-end{align-items:flex-end}.full-width{width:100%}";
|
|
2281
|
+
var kr = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, U = (e, t, r, i) => {
|
|
2282
|
+
for (var s = i > 1 ? void 0 : i ? Dr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
|
|
2270
2283
|
(n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
2271
|
-
return i && s &&
|
|
2284
|
+
return i && s && kr(t, r, s), s;
|
|
2272
2285
|
};
|
|
2273
2286
|
let w = class extends v {
|
|
2274
2287
|
constructor() {
|
|
2275
2288
|
super(...arguments), this.header = "DS4GO Fact Bundling Creation", this.selectedFacts = [], this.bundleName = "", this.bundleDescription = "", this.filterFactText = "", this.spliceLength = 0, this.cherryPickedProperties = [
|
|
2276
|
-
{ key: "created_at", value: "created_at", cast:
|
|
2277
|
-
{ key: "updated_at", value: "updated_at", cast:
|
|
2289
|
+
{ key: "created_at", value: "created_at", cast: L },
|
|
2290
|
+
{ key: "updated_at", value: "updated_at", cast: L },
|
|
2278
2291
|
{ key: "name", value: "name" },
|
|
2279
2292
|
{ key: "description", value: "description" },
|
|
2280
2293
|
{ key: "author", value: "author" },
|
|
@@ -2334,8 +2347,8 @@ let w = class extends v {
|
|
|
2334
2347
|
],
|
|
2335
2348
|
"@type": ["ldp:Container", "ds4go:FactBundle"],
|
|
2336
2349
|
name: this.bundleName,
|
|
2337
|
-
description: this.bundleDescription,
|
|
2338
|
-
|
|
2350
|
+
description: this.bundleDescription || "",
|
|
2351
|
+
"ldp:contains": this.selectedFacts.map((s) => ({ "@id": s["@id"] }))
|
|
2339
2352
|
}, r = await window.sibStore.post(
|
|
2340
2353
|
t,
|
|
2341
2354
|
this.dataSrc
|
|
@@ -2350,7 +2363,14 @@ let w = class extends v {
|
|
|
2350
2363
|
detail: { resource: { "@id": this.dataSrc } },
|
|
2351
2364
|
bubbles: !0
|
|
2352
2365
|
})
|
|
2353
|
-
);
|
|
2366
|
+
), this.bundleName = "", this.bundleDescription = "", this.selectedFacts = [];
|
|
2367
|
+
const i = this.orbit?.getComponent("fact-bundle");
|
|
2368
|
+
document.dispatchEvent(
|
|
2369
|
+
new CustomEvent("save", {
|
|
2370
|
+
detail: { resource: { "@id": i?.defaultDataSrc } },
|
|
2371
|
+
bubbles: !0
|
|
2372
|
+
})
|
|
2373
|
+
), i && D(i?.route, i?.defaultDataSrc);
|
|
2354
2374
|
}
|
|
2355
2375
|
_updateBundleName(t) {
|
|
2356
2376
|
this.bundleName = t.detail.value;
|
|
@@ -2407,7 +2427,7 @@ let w = class extends v {
|
|
|
2407
2427
|
${i > 0 ? d`<tems-division type="h4">
|
|
2408
2428
|
<div>
|
|
2409
2429
|
${h(
|
|
2410
|
-
|
|
2430
|
+
x`${i} selected fact${i > 1 ? "s" : ""}`
|
|
2411
2431
|
)}
|
|
2412
2432
|
</div></tems-division
|
|
2413
2433
|
>
|
|
@@ -2485,7 +2505,7 @@ let w = class extends v {
|
|
|
2485
2505
|
>
|
|
2486
2506
|
<div>
|
|
2487
2507
|
${h(
|
|
2488
|
-
|
|
2508
|
+
x`Displaying ${r.length} of ${t.length} result${t.length > 1 ? "s" : ""}`
|
|
2489
2509
|
)}
|
|
2490
2510
|
</div>
|
|
2491
2511
|
<div class="flex flex-row gap-400">
|
|
@@ -2512,7 +2532,7 @@ let w = class extends v {
|
|
|
2512
2532
|
}
|
|
2513
2533
|
};
|
|
2514
2534
|
w.styles = [
|
|
2515
|
-
|
|
2535
|
+
xt(Or),
|
|
2516
2536
|
Y`
|
|
2517
2537
|
[slot="content"] {
|
|
2518
2538
|
height: 100%;
|
|
@@ -2586,21 +2606,21 @@ U([
|
|
|
2586
2606
|
w = U([
|
|
2587
2607
|
V("solid-fact-bundle-creation")
|
|
2588
2608
|
], w);
|
|
2589
|
-
var
|
|
2590
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
2609
|
+
var Ir = Object.defineProperty, Lr = Object.getOwnPropertyDescriptor, et = (e, t, r, i) => {
|
|
2610
|
+
for (var s = i > 1 ? void 0 : i ? Lr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
|
|
2591
2611
|
(n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
2592
|
-
return i && s &&
|
|
2612
|
+
return i && s && Ir(t, r, s), s;
|
|
2593
2613
|
};
|
|
2594
|
-
let
|
|
2614
|
+
let F = class extends v {
|
|
2595
2615
|
constructor() {
|
|
2596
2616
|
super(...arguments), this.header = "DS4GO Fact Bundling", this.search = [], this.resultCount = this.objects?.length || 0, this.cherryPickedProperties = [
|
|
2597
|
-
{ key: "created_at", value: "created_at", cast:
|
|
2598
|
-
{ key: "updated_at", value: "updated_at", cast:
|
|
2617
|
+
{ key: "created_at", value: "created_at", cast: L },
|
|
2618
|
+
{ key: "updated_at", value: "updated_at", cast: L },
|
|
2599
2619
|
{ key: "name", value: "name" },
|
|
2600
2620
|
{ key: "description", value: "description" }
|
|
2601
2621
|
], this._getResource = new pt(this, {
|
|
2602
2622
|
task: async ([e, t]) => {
|
|
2603
|
-
if (!(!e
|
|
2623
|
+
if (!(!e || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
|
|
2604
2624
|
if (this.menuComponent.ready || await new Promise((r) => {
|
|
2605
2625
|
this.menuComponent.addEventListener("user-ready", () => {
|
|
2606
2626
|
r(!0);
|
|
@@ -2609,7 +2629,9 @@ let T = class extends v {
|
|
|
2609
2629
|
if (!e) return;
|
|
2610
2630
|
this.objects = await this._getProxyValue(e), this.hasCachedDatas = !0;
|
|
2611
2631
|
}
|
|
2612
|
-
return this.oldDataSrc !== e && (this.oldDataSrc = e), Array.isArray(this.objects) || (this.objects = []), this.object = this.objects.find(
|
|
2632
|
+
return this.oldDataSrc !== e && (this.oldDataSrc = e), Array.isArray(this.objects) || (this.objects = []), t ? this.object = this.objects.find(
|
|
2633
|
+
(r) => r["@id"] === t
|
|
2634
|
+
) : this.dataSrc = e, P(this.objects, "name", "asc");
|
|
2613
2635
|
}
|
|
2614
2636
|
},
|
|
2615
2637
|
args: () => [
|
|
@@ -2624,7 +2646,7 @@ let T = class extends v {
|
|
|
2624
2646
|
return e?._originalResource?.hasType("ds4go:FactBundle") && (e.facts = await Promise.all(
|
|
2625
2647
|
(await e._originalResource["ldp:contains"]).map(
|
|
2626
2648
|
(t) => this._getProxyValue(t["@id"], !1, [
|
|
2627
|
-
{ key: "updated_at", value: "updated_at", cast:
|
|
2649
|
+
{ key: "updated_at", value: "updated_at", cast: L },
|
|
2628
2650
|
{ key: "name", value: "name" },
|
|
2629
2651
|
{ key: "description", value: "description" },
|
|
2630
2652
|
{
|
|
@@ -2649,7 +2671,9 @@ let T = class extends v {
|
|
|
2649
2671
|
)), Promise.resolve(e);
|
|
2650
2672
|
}
|
|
2651
2673
|
async _afterAttach() {
|
|
2652
|
-
return this
|
|
2674
|
+
return We(this, {
|
|
2675
|
+
keywords: ["factbundles"]
|
|
2676
|
+
}), this.menuComponent = document.querySelector(
|
|
2653
2677
|
`[uniq="${this.orbit?.getComponent("menu")?.uniq}"]`
|
|
2654
2678
|
), this.bundleCreationComponent = this.orbit?.getComponent(
|
|
2655
2679
|
"fact-bundle-creation"
|
|
@@ -2661,28 +2685,28 @@ let T = class extends v {
|
|
|
2661
2685
|
_openModal(e) {
|
|
2662
2686
|
if (e.preventDefault(), this.route)
|
|
2663
2687
|
if ("use-id" in (this.component.routeAttributes || {}))
|
|
2664
|
-
|
|
2688
|
+
D(this.route, e.detail["@id"]);
|
|
2665
2689
|
else {
|
|
2666
2690
|
const t = e.detail["@type"]?.at(-1) ?? e.detail["@type"];
|
|
2667
2691
|
if (t) {
|
|
2668
2692
|
const r = window.orbit?.components?.filter(
|
|
2669
2693
|
(i) => i?.routeAttributes?.["rdf-type"] === t
|
|
2670
2694
|
);
|
|
2671
|
-
r?.[0]?.route &&
|
|
2695
|
+
r?.[0]?.route && D(r[0]?.route, e.detail["@id"]);
|
|
2672
2696
|
}
|
|
2673
2697
|
}
|
|
2674
2698
|
}
|
|
2675
2699
|
_closeModal(e) {
|
|
2676
|
-
e.preventDefault(), this.route &&
|
|
2700
|
+
e.preventDefault(), this.route && D(this.route, this.defaultDataSrc);
|
|
2677
2701
|
}
|
|
2678
2702
|
_closeModalFromBackground(e) {
|
|
2679
|
-
e.preventDefault(), this.route && e.target?.classList.contains("modal") &&
|
|
2703
|
+
e.preventDefault(), this.route && e.target?.classList.contains("modal") && D(this.route, this.defaultDataSrc);
|
|
2680
2704
|
}
|
|
2681
2705
|
_resultCountUpdate(e) {
|
|
2682
2706
|
this.resultCount = e.detail ?? 0;
|
|
2683
2707
|
}
|
|
2684
2708
|
_goToBundleCreation(e) {
|
|
2685
|
-
e.preventDefault(), this.bundleCreationComponent?.route &&
|
|
2709
|
+
e.preventDefault(), this.bundleCreationComponent?.route && D(this.bundleCreationComponent.route);
|
|
2686
2710
|
}
|
|
2687
2711
|
render() {
|
|
2688
2712
|
return this.gatekeeper() || this._getResource.render({
|
|
@@ -2728,7 +2752,7 @@ let T = class extends v {
|
|
|
2728
2752
|
});
|
|
2729
2753
|
}
|
|
2730
2754
|
};
|
|
2731
|
-
|
|
2755
|
+
F.styles = Y`
|
|
2732
2756
|
.modal {
|
|
2733
2757
|
position: fixed;
|
|
2734
2758
|
top: 0;
|
|
@@ -2744,37 +2768,37 @@ T.styles = Y`
|
|
|
2744
2768
|
`;
|
|
2745
2769
|
et([
|
|
2746
2770
|
y({ attribute: "header", type: String })
|
|
2747
|
-
],
|
|
2771
|
+
], F.prototype, "header", 2);
|
|
2748
2772
|
et([
|
|
2749
2773
|
m()
|
|
2750
|
-
],
|
|
2774
|
+
], F.prototype, "search", 2);
|
|
2751
2775
|
et([
|
|
2752
2776
|
m()
|
|
2753
|
-
],
|
|
2777
|
+
], F.prototype, "resultCount", 2);
|
|
2754
2778
|
et([
|
|
2755
2779
|
m()
|
|
2756
|
-
],
|
|
2757
|
-
|
|
2780
|
+
], F.prototype, "bundleCreationComponent", 2);
|
|
2781
|
+
F = et([
|
|
2758
2782
|
V("solid-fact-bundle")
|
|
2759
|
-
],
|
|
2760
|
-
const
|
|
2783
|
+
], F);
|
|
2784
|
+
const Tr = {
|
|
2761
2785
|
s20acf344316637a0: "All Catalogs",
|
|
2762
|
-
s67269ab6dc51ec41:
|
|
2786
|
+
s67269ab6dc51ec41: x`Error while loading catalog ${0}`,
|
|
2763
2787
|
s0b88896b7338837d: "All Datasets",
|
|
2764
2788
|
s541d9cd11a5bc840: "Datasets from",
|
|
2765
2789
|
s01ceffa02fa6bd7f: "All Sectors",
|
|
2766
2790
|
s4aaac20ff7887391: "Catalogs available in",
|
|
2767
2791
|
sa89a60c3e1230cec: "Root Authority",
|
|
2768
|
-
se5784a16a6799dad:
|
|
2792
|
+
se5784a16a6799dad: x`Back to ${0}`,
|
|
2769
2793
|
s6665daa6d6147db0: "No data available, data source may be temporarily unavailable.",
|
|
2770
2794
|
sc16e00a7a8b2fde2: "Back",
|
|
2771
2795
|
s2c8189544e3ea679: "Retry",
|
|
2772
2796
|
seb1a452f2df70baf: "Create bundle",
|
|
2773
2797
|
sed5b6ae54e00125c: "Bundle name",
|
|
2774
2798
|
s11099da36cbc3173: "Bundle description",
|
|
2775
|
-
sac1b0231875ff056:
|
|
2799
|
+
sac1b0231875ff056: x`${0} selected fact${1}`,
|
|
2776
2800
|
s0d1be7a2c400c080: "more",
|
|
2777
|
-
s8272d3578b7c78d5:
|
|
2801
|
+
s8272d3578b7c78d5: x`Displaying ${0} of ${1} result${2}`,
|
|
2778
2802
|
sa40e7f4f2a43e2f7: "Show more results",
|
|
2779
2803
|
sacf246e0fa11730d: "Show all results",
|
|
2780
2804
|
s9094c0cde8fb5058: "No results found",
|
|
@@ -2784,20 +2808,20 @@ const Lr = {
|
|
|
2784
2808
|
s4979bd417e7c8052: "All facts in this bundle",
|
|
2785
2809
|
s57a40de45f324b96: "Bundle created on",
|
|
2786
2810
|
sd3682395cf86f913: "Bundle updated on"
|
|
2787
|
-
},
|
|
2811
|
+
}, Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2788
2812
|
__proto__: null,
|
|
2789
|
-
templates:
|
|
2790
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2813
|
+
templates: Tr
|
|
2814
|
+
}, Symbol.toStringTag, { value: "Module" })), Nr = "en", he = [
|
|
2791
2815
|
"en"
|
|
2792
|
-
],
|
|
2816
|
+
], Mr = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": Fr }), Br = new Map(
|
|
2793
2817
|
he.map((e) => [
|
|
2794
2818
|
e,
|
|
2795
|
-
|
|
2819
|
+
Mr[`../../generated/locales/${e}.ts`]
|
|
2796
2820
|
])
|
|
2797
|
-
), { getLocale: Zt, setLocale: Xt } =
|
|
2798
|
-
sourceLocale:
|
|
2821
|
+
), { getLocale: Zt, setLocale: Xt } = vr({
|
|
2822
|
+
sourceLocale: Nr,
|
|
2799
2823
|
targetLocales: he,
|
|
2800
|
-
loadLocale: async (e) =>
|
|
2824
|
+
loadLocale: async (e) => Br.get(e)
|
|
2801
2825
|
});
|
|
2802
2826
|
window.getLocale = window.getLocale ? window.getLocale.push(Zt) : [Zt];
|
|
2803
2827
|
window.setLocale = window.setLocale ? window.setLocale.push(Xt) : [Xt];
|
package/package.json
CHANGED
|
@@ -33,10 +33,10 @@ export class Ds4goFactBundleModal extends ComponentObjectHandler {
|
|
|
33
33
|
<div class="modal-box">
|
|
34
34
|
<div class="modal-content">
|
|
35
35
|
<tems-division type="h3"
|
|
36
|
-
><div>${String(this.object.name)}</div></tems-division
|
|
36
|
+
><div>${String(this.object.name || "")}</div></tems-division
|
|
37
37
|
>
|
|
38
38
|
<tems-division type="body-m"
|
|
39
|
-
><div>${String(this.object.description)}</div></tems-division
|
|
39
|
+
><div>${String(this.object.description || "")}</div></tems-division
|
|
40
40
|
>
|
|
41
41
|
<tems-division type="h4"
|
|
42
42
|
><div>${msg("All facts in this bundle")}</div></tems-division
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
filterObjectByValue,
|
|
3
3
|
formatDate,
|
|
4
4
|
OrbitComponent,
|
|
5
|
+
requestNavigation,
|
|
5
6
|
sort,
|
|
6
7
|
} from "@helpers";
|
|
7
8
|
import { msg, str } from "@lit/localize";
|
|
@@ -183,8 +184,8 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
183
184
|
],
|
|
184
185
|
"@type": ["ldp:Container", "ds4go:FactBundle"],
|
|
185
186
|
name: this.bundleName,
|
|
186
|
-
description: this.bundleDescription,
|
|
187
|
-
|
|
187
|
+
description: this.bundleDescription || "",
|
|
188
|
+
"ldp:contains": this.selectedFacts.map((fact: Resource) => ({"@id": fact["@id"]})),
|
|
188
189
|
};
|
|
189
190
|
|
|
190
191
|
const newFactBundleId = await window.sibStore.post(
|
|
@@ -205,6 +206,22 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
205
206
|
bubbles: true,
|
|
206
207
|
}),
|
|
207
208
|
);
|
|
209
|
+
|
|
210
|
+
this.bundleName = "";
|
|
211
|
+
this.bundleDescription = "";
|
|
212
|
+
this.selectedFacts = [];
|
|
213
|
+
|
|
214
|
+
const factbundleComponent: any = this.orbit?.getComponent("fact-bundle");
|
|
215
|
+
|
|
216
|
+
document.dispatchEvent(
|
|
217
|
+
new CustomEvent("save", {
|
|
218
|
+
detail: { resource: { "@id": factbundleComponent?.defaultDataSrc } },
|
|
219
|
+
bubbles: true,
|
|
220
|
+
}),
|
|
221
|
+
);
|
|
222
|
+
if(factbundleComponent) {
|
|
223
|
+
requestNavigation(factbundleComponent?.route, factbundleComponent?.defaultDataSrc);
|
|
224
|
+
}
|
|
208
225
|
}
|
|
209
226
|
|
|
210
227
|
_updateBundleName(e: Event) {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
formatDate,
|
|
3
|
+
OrbitComponent,
|
|
4
|
+
requestNavigation,
|
|
5
|
+
setupCacheInvalidation,
|
|
6
|
+
sort,
|
|
7
|
+
} from "@helpers";
|
|
2
8
|
import { msg } from "@lit/localize";
|
|
3
9
|
import { Task } from "@lit/task";
|
|
4
10
|
import type {
|
|
@@ -81,6 +87,10 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
async _afterAttach() {
|
|
90
|
+
setupCacheInvalidation(this, {
|
|
91
|
+
keywords: ["factbundles"],
|
|
92
|
+
});
|
|
93
|
+
|
|
84
94
|
this.menuComponent = document.querySelector(
|
|
85
95
|
`[uniq="${this.orbit?.getComponent("menu")?.uniq}"]`,
|
|
86
96
|
);
|
|
@@ -95,7 +105,7 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
95
105
|
_getResource = new Task(this, {
|
|
96
106
|
task: async ([dataSrc, objSrc]) => {
|
|
97
107
|
if (
|
|
98
|
-
|
|
108
|
+
!dataSrc ||
|
|
99
109
|
!this.orbit ||
|
|
100
110
|
(!this.noRouter &&
|
|
101
111
|
this.route &&
|
|
@@ -129,7 +139,13 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
129
139
|
this.objects = [];
|
|
130
140
|
}
|
|
131
141
|
|
|
132
|
-
|
|
142
|
+
if (objSrc) {
|
|
143
|
+
this.object = this.objects.find(
|
|
144
|
+
(obj: Resource) => obj["@id"] === objSrc,
|
|
145
|
+
);
|
|
146
|
+
} else {
|
|
147
|
+
this.dataSrc = dataSrc;
|
|
148
|
+
}
|
|
133
149
|
|
|
134
150
|
return sort(this.objects, "name", "asc");
|
|
135
151
|
},
|
|
@@ -225,9 +241,8 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
225
241
|
@clicked=${this._openModal}
|
|
226
242
|
@result-count=${this._resultCountUpdate}
|
|
227
243
|
></ds4go-fact-bundle-holder>
|
|
228
|
-
${
|
|
229
|
-
|
|
230
|
-
? html`<div
|
|
244
|
+
${this.object
|
|
245
|
+
? html`<div
|
|
231
246
|
class="modal"
|
|
232
247
|
@click=${this._closeModalFromBackground}
|
|
233
248
|
>
|
|
@@ -236,8 +251,7 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
236
251
|
@close=${this._closeModal}
|
|
237
252
|
></ds4go-fact-bundle-modal>
|
|
238
253
|
</div>`
|
|
239
|
-
|
|
240
|
-
}
|
|
254
|
+
: nothing}
|
|
241
255
|
</div>
|
|
242
256
|
</tems-viewport>`;
|
|
243
257
|
},
|