@startinblox/components-ds4go 2.2.3 → 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,23 +247,23 @@ 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$",
|
|
252
|
-
\f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ft = /-->/g,
|
|
253
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
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
|
+
\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, 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++) {
|
|
262
262
|
const l = e[a];
|
|
263
263
|
let u, f, p = -1, b = 0;
|
|
264
|
-
for (; b < l.length && (n.lastIndex = b, f = n.exec(l), f !== null); ) b = n.lastIndex, n === W ? f[1] === "!--" ? n = Ft : f[1] !== void 0 ? n =
|
|
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
|
}
|
|
@@ -545,7 +545,7 @@ function y(e) {
|
|
|
545
545
|
function m(e) {
|
|
546
546
|
return y({ ...e, state: !0, attribute: !1 });
|
|
547
547
|
}
|
|
548
|
-
var Fe = Object.defineProperty,
|
|
548
|
+
var Fe = Object.defineProperty, Ne = (e, t, r, i) => {
|
|
549
549
|
for (var s = void 0, o = e.length - 1, n; o >= 0; o--)
|
|
550
550
|
(n = e[o]) && (s = n(t, r, s) || s);
|
|
551
551
|
return s && Fe(t, r, s), s;
|
|
@@ -555,13 +555,13 @@ class Rt extends q {
|
|
|
555
555
|
super(...arguments), this.objects = [], this.hasType = (t, r = this.objects) => new Set(r.flatMap((s) => s["@type"])).has(t);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
|
|
558
|
+
Ne([
|
|
559
559
|
y({ attribute: !1 })
|
|
560
560
|
], Rt.prototype, "objects");
|
|
561
|
-
var
|
|
561
|
+
var Me = Object.defineProperty, j = (e, t, r, i) => {
|
|
562
562
|
for (var s = void 0, o = e.length - 1, n; o >= 0; o--)
|
|
563
563
|
(n = e[o]) && (s = n(t, r, s) || s);
|
|
564
|
-
return s &&
|
|
564
|
+
return s && Me(t, r, s), s;
|
|
565
565
|
};
|
|
566
566
|
class v extends Rt {
|
|
567
567
|
constructor({
|
|
@@ -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();
|
|
@@ -1474,7 +1474,7 @@ const bt = (e, t, r, i) => {
|
|
|
1474
1474
|
else
|
|
1475
1475
|
throw new TypeError(`Unsupported data type for key "${t}"`);
|
|
1476
1476
|
return r === "asc" ? a : -a;
|
|
1477
|
-
}),
|
|
1477
|
+
}), L = (e, t = {
|
|
1478
1478
|
day: "2-digit",
|
|
1479
1479
|
month: "2-digit",
|
|
1480
1480
|
year: "2-digit"
|
|
@@ -1482,7 +1482,7 @@ const bt = (e, t, r, i) => {
|
|
|
1482
1482
|
if (!e) return "";
|
|
1483
1483
|
const i = (typeof e == "string" ? new Date(e) : e).toLocaleString(void 0, t);
|
|
1484
1484
|
return typeof e == "string" && i === "Invalid Date" ? e : i;
|
|
1485
|
-
},
|
|
1485
|
+
}, D = (e, t = !1) => {
|
|
1486
1486
|
window.dispatchEvent(
|
|
1487
1487
|
new CustomEvent("requestNavigation", {
|
|
1488
1488
|
detail: {
|
|
@@ -1502,7 +1502,7 @@ const ir = (e, ...t) => ({
|
|
|
1502
1502
|
strTag: !0,
|
|
1503
1503
|
strings: e,
|
|
1504
1504
|
values: t
|
|
1505
|
-
}),
|
|
1505
|
+
}), x = ir, or = (e) => typeof e != "string" && "strTag" in e, oe = (e, t, r) => {
|
|
1506
1506
|
let i = e[0];
|
|
1507
1507
|
for (let s = 1; s < e.length; s++)
|
|
1508
1508
|
i += t[r ? r[s - 1] : s - 1], i += e[s];
|
|
@@ -1751,8 +1751,8 @@ X = Ut([
|
|
|
1751
1751
|
V("ds4go-fact-bundle-holder")
|
|
1752
1752
|
], X);
|
|
1753
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,
|
|
1755
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
1756
1756
|
(n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
1757
1757
|
return i && s && Cr(t, r, s), s;
|
|
1758
1758
|
};
|
|
@@ -1776,10 +1776,10 @@ let lt = class extends Ie {
|
|
|
1776
1776
|
<div class="modal-box">
|
|
1777
1777
|
<div class="modal-content">
|
|
1778
1778
|
<tems-division type="h3"
|
|
1779
|
-
><div>${String(this.object.name)}</div></tems-division
|
|
1779
|
+
><div>${String(this.object.name || "")}</div></tems-division
|
|
1780
1780
|
>
|
|
1781
1781
|
<tems-division type="body-m"
|
|
1782
|
-
><div>${String(this.object.description)}</div></tems-division
|
|
1782
|
+
><div>${String(this.object.description || "")}</div></tems-division
|
|
1783
1783
|
>
|
|
1784
1784
|
<tems-division type="h4"
|
|
1785
1785
|
><div>${h("All facts in this bundle")}</div></tems-division
|
|
@@ -1823,7 +1823,7 @@ let lt = class extends Ie {
|
|
|
1823
1823
|
}
|
|
1824
1824
|
};
|
|
1825
1825
|
lt.styles = Y`
|
|
1826
|
-
${
|
|
1826
|
+
${xt(Ar)}
|
|
1827
1827
|
`;
|
|
1828
1828
|
de([
|
|
1829
1829
|
y({ attribute: !1, type: Object })
|
|
@@ -1832,7 +1832,7 @@ lt = de([
|
|
|
1832
1832
|
V("ds4go-fact-bundle-modal"),
|
|
1833
1833
|
dr()
|
|
1834
1834
|
], lt);
|
|
1835
|
-
const
|
|
1835
|
+
const xr = /* @__PURE__ */ Symbol();
|
|
1836
1836
|
class pt {
|
|
1837
1837
|
get taskComplete() {
|
|
1838
1838
|
return this.t || (this.i === 1 ? this.t = new Promise(((t, r) => {
|
|
@@ -1872,7 +1872,7 @@ class pt {
|
|
|
1872
1872
|
o = !0, i = n;
|
|
1873
1873
|
}
|
|
1874
1874
|
if (this.p === s) {
|
|
1875
|
-
if (r ===
|
|
1875
|
+
if (r === xr) this.i = 0;
|
|
1876
1876
|
else {
|
|
1877
1877
|
if (o === !1) {
|
|
1878
1878
|
try {
|
|
@@ -2041,12 +2041,12 @@ let _ = class extends v {
|
|
|
2041
2041
|
<tems-header
|
|
2042
2042
|
slot="header"
|
|
2043
2043
|
heading=${this.catalogId ? e ? this.catalogId === "*" ? `${h("All Datasets")}` : `${h("Datasets from")}
|
|
2044
|
-
${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")}`}
|
|
2045
2045
|
>${(this.sectorId || this.catalogId) && !(this.catalogId === "*" && this.sectorId === "*") && !(this.sectorId === "*" && !this.catalogId) ? d`<div slot="cta">
|
|
2046
2046
|
<tems-button
|
|
2047
2047
|
type="primary"
|
|
2048
2048
|
label=${h(
|
|
2049
|
-
|
|
2049
|
+
x`Back to ${this.catalogId ? this.sectorId : "Root Authority"}`
|
|
2050
2050
|
)}
|
|
2051
2051
|
@click=${this._back}
|
|
2052
2052
|
></tems-button>
|
|
@@ -2072,7 +2072,7 @@ let _ = class extends v {
|
|
|
2072
2072
|
type=${"bill-image"}
|
|
2073
2073
|
.header=${t.catalogId || c}
|
|
2074
2074
|
.content=${t.description || c}
|
|
2075
|
-
date=${
|
|
2075
|
+
date=${L(t.lastUpdated) || c}
|
|
2076
2076
|
@click=${() => this._selectCatalog(t.catalogId)}
|
|
2077
2077
|
></tems-card-catalog>`
|
|
2078
2078
|
)}` : d`${e.map(
|
|
@@ -2082,7 +2082,7 @@ let _ = class extends v {
|
|
|
2082
2082
|
type=${"bill-image"}
|
|
2083
2083
|
.header=${t.id || c}
|
|
2084
2084
|
.content=${t.description || c}
|
|
2085
|
-
date=${
|
|
2085
|
+
date=${L(t.lastUpdated) || c}
|
|
2086
2086
|
@click=${() => this._selectSector(t.id)}
|
|
2087
2087
|
></tems-card-catalog>`
|
|
2088
2088
|
)}`}
|
|
@@ -2286,8 +2286,8 @@ var kr = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, U = (e, t,
|
|
|
2286
2286
|
let w = class extends v {
|
|
2287
2287
|
constructor() {
|
|
2288
2288
|
super(...arguments), this.header = "DS4GO Fact Bundling Creation", this.selectedFacts = [], this.bundleName = "", this.bundleDescription = "", this.filterFactText = "", this.spliceLength = 0, this.cherryPickedProperties = [
|
|
2289
|
-
{ key: "created_at", value: "created_at", cast:
|
|
2290
|
-
{ 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 },
|
|
2291
2291
|
{ key: "name", value: "name" },
|
|
2292
2292
|
{ key: "description", value: "description" },
|
|
2293
2293
|
{ key: "author", value: "author" },
|
|
@@ -2348,7 +2348,7 @@ let w = class extends v {
|
|
|
2348
2348
|
"@type": ["ldp:Container", "ds4go:FactBundle"],
|
|
2349
2349
|
name: this.bundleName,
|
|
2350
2350
|
description: this.bundleDescription || "",
|
|
2351
|
-
"ldp:contains": this.selectedFacts.map((
|
|
2351
|
+
"ldp:contains": this.selectedFacts.map((s) => ({ "@id": s["@id"] }))
|
|
2352
2352
|
}, r = await window.sibStore.post(
|
|
2353
2353
|
t,
|
|
2354
2354
|
this.dataSrc
|
|
@@ -2363,7 +2363,14 @@ let w = class extends v {
|
|
|
2363
2363
|
detail: { resource: { "@id": this.dataSrc } },
|
|
2364
2364
|
bubbles: !0
|
|
2365
2365
|
})
|
|
2366
|
-
);
|
|
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);
|
|
2367
2374
|
}
|
|
2368
2375
|
_updateBundleName(t) {
|
|
2369
2376
|
this.bundleName = t.detail.value;
|
|
@@ -2420,7 +2427,7 @@ let w = class extends v {
|
|
|
2420
2427
|
${i > 0 ? d`<tems-division type="h4">
|
|
2421
2428
|
<div>
|
|
2422
2429
|
${h(
|
|
2423
|
-
|
|
2430
|
+
x`${i} selected fact${i > 1 ? "s" : ""}`
|
|
2424
2431
|
)}
|
|
2425
2432
|
</div></tems-division
|
|
2426
2433
|
>
|
|
@@ -2498,7 +2505,7 @@ let w = class extends v {
|
|
|
2498
2505
|
>
|
|
2499
2506
|
<div>
|
|
2500
2507
|
${h(
|
|
2501
|
-
|
|
2508
|
+
x`Displaying ${r.length} of ${t.length} result${t.length > 1 ? "s" : ""}`
|
|
2502
2509
|
)}
|
|
2503
2510
|
</div>
|
|
2504
2511
|
<div class="flex flex-row gap-400">
|
|
@@ -2525,7 +2532,7 @@ let w = class extends v {
|
|
|
2525
2532
|
}
|
|
2526
2533
|
};
|
|
2527
2534
|
w.styles = [
|
|
2528
|
-
|
|
2535
|
+
xt(Or),
|
|
2529
2536
|
Y`
|
|
2530
2537
|
[slot="content"] {
|
|
2531
2538
|
height: 100%;
|
|
@@ -2604,16 +2611,16 @@ var Ir = Object.defineProperty, Lr = Object.getOwnPropertyDescriptor, et = (e, t
|
|
|
2604
2611
|
(n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
2605
2612
|
return i && s && Ir(t, r, s), s;
|
|
2606
2613
|
};
|
|
2607
|
-
let
|
|
2614
|
+
let F = class extends v {
|
|
2608
2615
|
constructor() {
|
|
2609
|
-
super(), this.header = "DS4GO Fact Bundling", this.search = [], this.resultCount = this.objects?.length || 0, this.cherryPickedProperties = [
|
|
2610
|
-
{ key: "created_at", value: "created_at", cast:
|
|
2611
|
-
{ key: "updated_at", value: "updated_at", cast:
|
|
2616
|
+
super(...arguments), this.header = "DS4GO Fact Bundling", this.search = [], this.resultCount = this.objects?.length || 0, this.cherryPickedProperties = [
|
|
2617
|
+
{ key: "created_at", value: "created_at", cast: L },
|
|
2618
|
+
{ key: "updated_at", value: "updated_at", cast: L },
|
|
2612
2619
|
{ key: "name", value: "name" },
|
|
2613
2620
|
{ key: "description", value: "description" }
|
|
2614
2621
|
], this._getResource = new pt(this, {
|
|
2615
2622
|
task: async ([e, t]) => {
|
|
2616
|
-
if (!(!e
|
|
2623
|
+
if (!(!e || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
|
|
2617
2624
|
if (this.menuComponent.ready || await new Promise((r) => {
|
|
2618
2625
|
this.menuComponent.addEventListener("user-ready", () => {
|
|
2619
2626
|
r(!0);
|
|
@@ -2622,7 +2629,9 @@ let T = class extends v {
|
|
|
2622
2629
|
if (!e) return;
|
|
2623
2630
|
this.objects = await this._getProxyValue(e), this.hasCachedDatas = !0;
|
|
2624
2631
|
}
|
|
2625
|
-
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");
|
|
2626
2635
|
}
|
|
2627
2636
|
},
|
|
2628
2637
|
args: () => [
|
|
@@ -2631,15 +2640,13 @@ let T = class extends v {
|
|
|
2631
2640
|
this.caching,
|
|
2632
2641
|
this.currentRoute
|
|
2633
2642
|
]
|
|
2634
|
-
}), We(this, {
|
|
2635
|
-
keywords: ["factbundles"]
|
|
2636
2643
|
});
|
|
2637
2644
|
}
|
|
2638
2645
|
async _responseAdaptator(e) {
|
|
2639
2646
|
return e?._originalResource?.hasType("ds4go:FactBundle") && (e.facts = await Promise.all(
|
|
2640
2647
|
(await e._originalResource["ldp:contains"]).map(
|
|
2641
2648
|
(t) => this._getProxyValue(t["@id"], !1, [
|
|
2642
|
-
{ key: "updated_at", value: "updated_at", cast:
|
|
2649
|
+
{ key: "updated_at", value: "updated_at", cast: L },
|
|
2643
2650
|
{ key: "name", value: "name" },
|
|
2644
2651
|
{ key: "description", value: "description" },
|
|
2645
2652
|
{
|
|
@@ -2664,7 +2671,9 @@ let T = class extends v {
|
|
|
2664
2671
|
)), Promise.resolve(e);
|
|
2665
2672
|
}
|
|
2666
2673
|
async _afterAttach() {
|
|
2667
|
-
return this
|
|
2674
|
+
return We(this, {
|
|
2675
|
+
keywords: ["factbundles"]
|
|
2676
|
+
}), this.menuComponent = document.querySelector(
|
|
2668
2677
|
`[uniq="${this.orbit?.getComponent("menu")?.uniq}"]`
|
|
2669
2678
|
), this.bundleCreationComponent = this.orbit?.getComponent(
|
|
2670
2679
|
"fact-bundle-creation"
|
|
@@ -2676,28 +2685,28 @@ let T = class extends v {
|
|
|
2676
2685
|
_openModal(e) {
|
|
2677
2686
|
if (e.preventDefault(), this.route)
|
|
2678
2687
|
if ("use-id" in (this.component.routeAttributes || {}))
|
|
2679
|
-
|
|
2688
|
+
D(this.route, e.detail["@id"]);
|
|
2680
2689
|
else {
|
|
2681
2690
|
const t = e.detail["@type"]?.at(-1) ?? e.detail["@type"];
|
|
2682
2691
|
if (t) {
|
|
2683
2692
|
const r = window.orbit?.components?.filter(
|
|
2684
2693
|
(i) => i?.routeAttributes?.["rdf-type"] === t
|
|
2685
2694
|
);
|
|
2686
|
-
r?.[0]?.route &&
|
|
2695
|
+
r?.[0]?.route && D(r[0]?.route, e.detail["@id"]);
|
|
2687
2696
|
}
|
|
2688
2697
|
}
|
|
2689
2698
|
}
|
|
2690
2699
|
_closeModal(e) {
|
|
2691
|
-
e.preventDefault(), this.route &&
|
|
2700
|
+
e.preventDefault(), this.route && D(this.route, this.defaultDataSrc);
|
|
2692
2701
|
}
|
|
2693
2702
|
_closeModalFromBackground(e) {
|
|
2694
|
-
e.preventDefault(), this.route && e.target?.classList.contains("modal") &&
|
|
2703
|
+
e.preventDefault(), this.route && e.target?.classList.contains("modal") && D(this.route, this.defaultDataSrc);
|
|
2695
2704
|
}
|
|
2696
2705
|
_resultCountUpdate(e) {
|
|
2697
2706
|
this.resultCount = e.detail ?? 0;
|
|
2698
2707
|
}
|
|
2699
2708
|
_goToBundleCreation(e) {
|
|
2700
|
-
e.preventDefault(), this.bundleCreationComponent?.route &&
|
|
2709
|
+
e.preventDefault(), this.bundleCreationComponent?.route && D(this.bundleCreationComponent.route);
|
|
2701
2710
|
}
|
|
2702
2711
|
render() {
|
|
2703
2712
|
return this.gatekeeper() || this._getResource.render({
|
|
@@ -2743,7 +2752,7 @@ let T = class extends v {
|
|
|
2743
2752
|
});
|
|
2744
2753
|
}
|
|
2745
2754
|
};
|
|
2746
|
-
|
|
2755
|
+
F.styles = Y`
|
|
2747
2756
|
.modal {
|
|
2748
2757
|
position: fixed;
|
|
2749
2758
|
top: 0;
|
|
@@ -2759,37 +2768,37 @@ T.styles = Y`
|
|
|
2759
2768
|
`;
|
|
2760
2769
|
et([
|
|
2761
2770
|
y({ attribute: "header", type: String })
|
|
2762
|
-
],
|
|
2771
|
+
], F.prototype, "header", 2);
|
|
2763
2772
|
et([
|
|
2764
2773
|
m()
|
|
2765
|
-
],
|
|
2774
|
+
], F.prototype, "search", 2);
|
|
2766
2775
|
et([
|
|
2767
2776
|
m()
|
|
2768
|
-
],
|
|
2777
|
+
], F.prototype, "resultCount", 2);
|
|
2769
2778
|
et([
|
|
2770
2779
|
m()
|
|
2771
|
-
],
|
|
2772
|
-
|
|
2780
|
+
], F.prototype, "bundleCreationComponent", 2);
|
|
2781
|
+
F = et([
|
|
2773
2782
|
V("solid-fact-bundle")
|
|
2774
|
-
],
|
|
2783
|
+
], F);
|
|
2775
2784
|
const Tr = {
|
|
2776
2785
|
s20acf344316637a0: "All Catalogs",
|
|
2777
|
-
s67269ab6dc51ec41:
|
|
2786
|
+
s67269ab6dc51ec41: x`Error while loading catalog ${0}`,
|
|
2778
2787
|
s0b88896b7338837d: "All Datasets",
|
|
2779
2788
|
s541d9cd11a5bc840: "Datasets from",
|
|
2780
2789
|
s01ceffa02fa6bd7f: "All Sectors",
|
|
2781
2790
|
s4aaac20ff7887391: "Catalogs available in",
|
|
2782
2791
|
sa89a60c3e1230cec: "Root Authority",
|
|
2783
|
-
se5784a16a6799dad:
|
|
2792
|
+
se5784a16a6799dad: x`Back to ${0}`,
|
|
2784
2793
|
s6665daa6d6147db0: "No data available, data source may be temporarily unavailable.",
|
|
2785
2794
|
sc16e00a7a8b2fde2: "Back",
|
|
2786
2795
|
s2c8189544e3ea679: "Retry",
|
|
2787
2796
|
seb1a452f2df70baf: "Create bundle",
|
|
2788
2797
|
sed5b6ae54e00125c: "Bundle name",
|
|
2789
2798
|
s11099da36cbc3173: "Bundle description",
|
|
2790
|
-
sac1b0231875ff056:
|
|
2799
|
+
sac1b0231875ff056: x`${0} selected fact${1}`,
|
|
2791
2800
|
s0d1be7a2c400c080: "more",
|
|
2792
|
-
s8272d3578b7c78d5:
|
|
2801
|
+
s8272d3578b7c78d5: x`Displaying ${0} of ${1} result${2}`,
|
|
2793
2802
|
sa40e7f4f2a43e2f7: "Show more results",
|
|
2794
2803
|
sacf246e0fa11730d: "Show all results",
|
|
2795
2804
|
s9094c0cde8fb5058: "No results found",
|
|
@@ -2802,15 +2811,15 @@ const Tr = {
|
|
|
2802
2811
|
}, Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2803
2812
|
__proto__: null,
|
|
2804
2813
|
templates: Tr
|
|
2805
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2814
|
+
}, Symbol.toStringTag, { value: "Module" })), Nr = "en", he = [
|
|
2806
2815
|
"en"
|
|
2807
|
-
],
|
|
2816
|
+
], Mr = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": Fr }), Br = new Map(
|
|
2808
2817
|
he.map((e) => [
|
|
2809
2818
|
e,
|
|
2810
|
-
|
|
2819
|
+
Mr[`../../generated/locales/${e}.ts`]
|
|
2811
2820
|
])
|
|
2812
2821
|
), { getLocale: Zt, setLocale: Xt } = vr({
|
|
2813
|
-
sourceLocale:
|
|
2822
|
+
sourceLocale: Nr,
|
|
2814
2823
|
targetLocales: he,
|
|
2815
2824
|
loadLocale: async (e) => Br.get(e)
|
|
2816
2825
|
});
|
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";
|
|
@@ -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 {
|
|
@@ -12,13 +18,6 @@ import { customElement, property, state } from "lit/decorators.js";
|
|
|
12
18
|
|
|
13
19
|
@customElement("solid-fact-bundle")
|
|
14
20
|
export class SolidFactBundle extends OrbitComponent {
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
setupCacheInvalidation(this, {
|
|
18
|
-
keywords: ["factbundles"],
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
21
|
static styles = css`
|
|
23
22
|
.modal {
|
|
24
23
|
position: fixed;
|
|
@@ -88,6 +87,10 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
88
87
|
}
|
|
89
88
|
|
|
90
89
|
async _afterAttach() {
|
|
90
|
+
setupCacheInvalidation(this, {
|
|
91
|
+
keywords: ["factbundles"],
|
|
92
|
+
});
|
|
93
|
+
|
|
91
94
|
this.menuComponent = document.querySelector(
|
|
92
95
|
`[uniq="${this.orbit?.getComponent("menu")?.uniq}"]`,
|
|
93
96
|
);
|
|
@@ -102,7 +105,7 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
102
105
|
_getResource = new Task(this, {
|
|
103
106
|
task: async ([dataSrc, objSrc]) => {
|
|
104
107
|
if (
|
|
105
|
-
|
|
108
|
+
!dataSrc ||
|
|
106
109
|
!this.orbit ||
|
|
107
110
|
(!this.noRouter &&
|
|
108
111
|
this.route &&
|
|
@@ -136,7 +139,13 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
136
139
|
this.objects = [];
|
|
137
140
|
}
|
|
138
141
|
|
|
139
|
-
|
|
142
|
+
if (objSrc) {
|
|
143
|
+
this.object = this.objects.find(
|
|
144
|
+
(obj: Resource) => obj["@id"] === objSrc,
|
|
145
|
+
);
|
|
146
|
+
} else {
|
|
147
|
+
this.dataSrc = dataSrc;
|
|
148
|
+
}
|
|
140
149
|
|
|
141
150
|
return sort(this.objects, "name", "asc");
|
|
142
151
|
},
|
|
@@ -232,9 +241,8 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
232
241
|
@clicked=${this._openModal}
|
|
233
242
|
@result-count=${this._resultCountUpdate}
|
|
234
243
|
></ds4go-fact-bundle-holder>
|
|
235
|
-
${
|
|
236
|
-
|
|
237
|
-
? html`<div
|
|
244
|
+
${this.object
|
|
245
|
+
? html`<div
|
|
238
246
|
class="modal"
|
|
239
247
|
@click=${this._closeModalFromBackground}
|
|
240
248
|
>
|
|
@@ -243,8 +251,7 @@ export class SolidFactBundle extends OrbitComponent {
|
|
|
243
251
|
@close=${this._closeModal}
|
|
244
252
|
></ds4go-fact-bundle-modal>
|
|
245
253
|
</div>`
|
|
246
|
-
|
|
247
|
-
}
|
|
254
|
+
: nothing}
|
|
248
255
|
</div>
|
|
249
256
|
</tems-viewport>`;
|
|
250
257
|
},
|