@startinblox/components-ds4go 2.2.2 → 2.2.3

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
@@ -249,8 +249,8 @@ let F = class extends HTMLElement {
249
249
  };
250
250
  F.elementStyles = [], F.shadowRootOptions = { mode: "open" }, F[K("elementProperties")] = /* @__PURE__ */ new Map(), F[K("finalized")] = /* @__PURE__ */ new Map(), we?.({ ReactiveElement: F }), (dt.reactiveElementVersions ??= []).push("2.1.2");
251
251
  const Pt = globalThis, Lt = (e) => e, nt = Pt.trustedTypes, Tt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Yt = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, te = "?" + x, Ae = `<${te}>`, L = document, G = () => L.createComment(""), J = (e) => e === null || typeof e != "object" && typeof e != "function", jt = Array.isArray, Ce = (e) => jt(e) || typeof e?.[Symbol.iterator] == "function", mt = `[
252
- \f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ft = /-->/g, Nt = />/g, O = RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
253
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, Bt = /"/g, ee = /^(?:script|style|textarea|title)$/i, xe = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), d = xe(1), H = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), qt = /* @__PURE__ */ new WeakMap(), D = L.createTreeWalker(L, 129);
252
+ \f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ft = /-->/g, Mt = />/g, O = RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
253
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Nt = /'/g, Bt = /"/g, ee = /^(?:script|style|textarea|title)$/i, xe = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), d = xe(1), H = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), qt = /* @__PURE__ */ new WeakMap(), D = L.createTreeWalker(L, 129);
254
254
  function re(e, t) {
255
255
  if (!jt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
256
256
  return Tt !== void 0 ? Tt.createHTML(t) : t;
@@ -261,7 +261,7 @@ const Se = (e, t) => {
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 = 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);
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 = Mt : 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 : Nt) : n === Bt || n === Nt ? n = O : n === Ft || n === Mt ? n = W : (n = O, s = void 0);
265
265
  const $ = n === O && e[a + 1].startsWith("/>") ? " " : "";
266
266
  o += n === W ? l + Ae : p >= 0 ? (i.push(u), l.slice(0, p) + Yt + l.slice(p) + x + $) : l + x + (p === -2 ? a : $);
267
267
  }
@@ -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, Ne = (e, t, r, i) => {
548
+ var Fe = Object.defineProperty, Me = (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
- Ne([
558
+ Me([
559
559
  y({ attribute: !1 })
560
560
  ], Rt.prototype, "objects");
561
- var Me = Object.defineProperty, j = (e, t, r, i) => {
561
+ var Ne = 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 && Me(t, r, s), s;
564
+ return s && Ne(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 && M(
603
+ i && N(
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 = N(t, ["@id"]) || "";
716
+ const s = M(t, ["@id"]) || "";
717
717
  return i.target = B(s), i;
718
718
  }
719
- function N(e, t) {
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 = N(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 = N(t, [r.fallback])), (s == null || s === "") && (s = r.defaultValue), 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 = N(t, r.source);
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 = N(t, r.source);
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 = N(s, a) : l = this.mapField(s, a, i), l !== void 0 && (o[n] = 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
- function We() {
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 = We(), t && !e.route && !r && (e.route = t)), e._subscriptions = /* @__PURE__ */ new Set(), !r) {
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
- }, Ke = (e, t, r) => {
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
- }, Ge = (e, t, r) => !t || !r ? e : e.filter((i) => {
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 Je(e) {
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 (Je(o)) {
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
- }, Ze = (e, t, r) => {
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
- }, Xe = (e, t, r) => {
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
- }, Qe = (e, t) => t ? e.filter((r) => {
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) => {
@@ -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
- }, M = (e, t = !1) => {
1485
+ }, N = (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
- }, Ye = "https://cdn.startinblox.com/owl/ds4go.jsonld#", tr = { "@id": "ds4go:link", "@type": "@id" }, er = { "@id": "ds4go:enclosure", "@type": "@id" }, rr = { "@id": "ds4go:url", "@type": "@id" }, Wt = {
1482
- ds4go: Ye,
1483
- link: tr,
1484
- enclosure: er,
1485
- url: rr
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 sr = (e, ...t) => ({
1501
+ const ir = (e, ...t) => ({
1489
1502
  strTag: !0,
1490
1503
  strings: e,
1491
1504
  values: t
1492
- }), S = sr, ir = (e) => typeof e != "string" && "strTag" in e, oe = (e, t, r) => {
1505
+ }), S = 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) => ir(e) ? oe(e.strings, e.values) : e);
1511
+ const ne = ((e) => or(e) ? oe(e.strings, e.values) : e);
1499
1512
  let h = ne, Kt = !1;
1500
- function or(e) {
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 nr {
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 ar = (e) => e.addController(new nr(e)), cr = ar;
1519
- const lr = () => (e, t) => (e.addInitializer(cr), e);
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 dr(e) {
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 hr = "", ur = "h", pr = "s";
1543
- function fr(e, t) {
1544
- return (t ? ur : pr) + dr(typeof e == "string" ? e : e.join(hr));
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 mr(e, t, r) {
1560
+ function gr(e, t, r) {
1548
1561
  if (e) {
1549
- const i = r?.id ?? gr(t), s = e[i];
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 gr(e) {
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 = fr(t, typeof e != "string" && !("strTag" in e)), Jt.set(t, r)), 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 yr = (e) => (or(((t, r) => mr(le, t, r))), at = ce = e.sourceLocale, ct = new Set(e.targetLocales), ct.add(e.sourceLocale), At = e.loadLocale, { getLocale: vr, setLocale: br }), vr = () => at, br = (e) => {
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 $r = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, Ut = (e, t, r, i) => {
1608
- for (var s = i > 1 ? void 0 : i ? _r(t, r) : t, o = e.length - 1, n; o >= 0; o--)
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 && $r(t, r, s), 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
- Ze(
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
- Ke(
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
- Ge(
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
- Qe(i, n.value)
1673
+ Ye(i, n.value)
1661
1674
  );
1662
1675
  break;
1663
1676
  case "exact":
1664
1677
  o.push(
1665
- Xe(
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 wr = ".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}}";
1741
- var Ar = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, de = (e, t, r, i) => {
1742
- for (var s = i > 1 ? void 0 : i ? Cr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
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, xr = Object.getOwnPropertyDescriptor, de = (e, t, r, i) => {
1755
+ for (var s = i > 1 ? void 0 : i ? xr(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 && Ar(t, r, s), s;
1757
+ return i && s && Cr(t, r, s), s;
1745
1758
  };
1746
1759
  let lt = class extends Ie {
1747
1760
  constructor() {
@@ -1810,16 +1823,16 @@ let lt = class extends Ie {
1810
1823
  }
1811
1824
  };
1812
1825
  lt.styles = Y`
1813
- ${St(wr)}
1826
+ ${St(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
- lr()
1833
+ dr()
1821
1834
  ], lt);
1822
- const xr = /* @__PURE__ */ Symbol();
1835
+ const Sr = /* @__PURE__ */ Symbol();
1823
1836
  class pt {
1824
1837
  get taskComplete() {
1825
1838
  return this.t || (this.i === 1 ? this.t = new Promise(((t, r) => {
@@ -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 ?? Sr, 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?.());
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();
@@ -1859,7 +1872,7 @@ class pt {
1859
1872
  o = !0, i = n;
1860
1873
  }
1861
1874
  if (this.p === s) {
1862
- if (r === xr) this.i = 0;
1875
+ if (r === Sr) this.i = 0;
1863
1876
  else {
1864
1877
  if (o === !1) {
1865
1878
  try {
@@ -1906,11 +1919,11 @@ class pt {
1906
1919
  }
1907
1920
  }
1908
1921
  }
1909
- const Sr = (e, t) => e === t || e.length === t.length && e.every(((r, i) => !ht(r, t[i])));
1910
- var Pr = Object.defineProperty, jr = Object.getOwnPropertyDescriptor, R = (e, t, r, i) => {
1911
- for (var s = i > 1 ? void 0 : i ? jr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
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 && Pr(t, r, s), s;
1926
+ return i && s && jr(t, r, s), s;
1914
1927
  };
1915
1928
  let _ = class extends v {
1916
1929
  constructor() {
@@ -2139,10 +2152,10 @@ R([
2139
2152
  _ = R([
2140
2153
  V("solid-dsif-explorer-poc")
2141
2154
  ], _);
2142
- var Er = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, ft = (e, t, r, i) => {
2143
- for (var s = i > 1 ? void 0 : i ? Rr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
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 && Er(t, r, s), s;
2158
+ return i && s && Rr(t, r, s), s;
2146
2159
  };
2147
2160
  let Q = class extends C {
2148
2161
  constructor() {
@@ -2264,11 +2277,11 @@ ft([
2264
2277
  Q = ft([
2265
2278
  V("solid-dsp-connector")
2266
2279
  ], Q);
2267
- const Ur = ".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%}";
2268
- var Or = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, U = (e, t, r, i) => {
2269
- for (var s = i > 1 ? void 0 : i ? kr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
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 && Or(t, r, s), s;
2284
+ return i && s && kr(t, r, s), s;
2272
2285
  };
2273
2286
  let w = class extends v {
2274
2287
  constructor() {
@@ -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
- facts: this.selectedFacts.map((i) => i.id)
2350
+ description: this.bundleDescription || "",
2351
+ "ldp:contains": this.selectedFacts.map((i) => ({ "@id": i["@id"] }))
2339
2352
  }, r = await window.sibStore.post(
2340
2353
  t,
2341
2354
  this.dataSrc
@@ -2512,7 +2525,7 @@ let w = class extends v {
2512
2525
  }
2513
2526
  };
2514
2527
  w.styles = [
2515
- St(Ur),
2528
+ St(Or),
2516
2529
  Y`
2517
2530
  [slot="content"] {
2518
2531
  height: 100%;
@@ -2586,14 +2599,14 @@ U([
2586
2599
  w = U([
2587
2600
  V("solid-fact-bundle-creation")
2588
2601
  ], w);
2589
- var Dr = Object.defineProperty, Ir = Object.getOwnPropertyDescriptor, et = (e, t, r, i) => {
2590
- for (var s = i > 1 ? void 0 : i ? Ir(t, r) : t, o = e.length - 1, n; o >= 0; o--)
2602
+ var Ir = Object.defineProperty, Lr = Object.getOwnPropertyDescriptor, et = (e, t, r, i) => {
2603
+ for (var s = i > 1 ? void 0 : i ? Lr(t, r) : t, o = e.length - 1, n; o >= 0; o--)
2591
2604
  (n = e[o]) && (s = (i ? n(t, r, s) : n(s)) || s);
2592
- return i && s && Dr(t, r, s), s;
2605
+ return i && s && Ir(t, r, s), s;
2593
2606
  };
2594
2607
  let T = class extends v {
2595
2608
  constructor() {
2596
- super(...arguments), this.header = "DS4GO Fact Bundling", this.search = [], this.resultCount = this.objects?.length || 0, this.cherryPickedProperties = [
2609
+ super(), this.header = "DS4GO Fact Bundling", this.search = [], this.resultCount = this.objects?.length || 0, this.cherryPickedProperties = [
2597
2610
  { key: "created_at", value: "created_at", cast: I },
2598
2611
  { key: "updated_at", value: "updated_at", cast: I },
2599
2612
  { key: "name", value: "name" },
@@ -2618,6 +2631,8 @@ let T = class extends v {
2618
2631
  this.caching,
2619
2632
  this.currentRoute
2620
2633
  ]
2634
+ }), We(this, {
2635
+ keywords: ["factbundles"]
2621
2636
  });
2622
2637
  }
2623
2638
  async _responseAdaptator(e) {
@@ -2661,28 +2676,28 @@ let T = class extends v {
2661
2676
  _openModal(e) {
2662
2677
  if (e.preventDefault(), this.route)
2663
2678
  if ("use-id" in (this.component.routeAttributes || {}))
2664
- M(this.route, e.detail["@id"]);
2679
+ N(this.route, e.detail["@id"]);
2665
2680
  else {
2666
2681
  const t = e.detail["@type"]?.at(-1) ?? e.detail["@type"];
2667
2682
  if (t) {
2668
2683
  const r = window.orbit?.components?.filter(
2669
2684
  (i) => i?.routeAttributes?.["rdf-type"] === t
2670
2685
  );
2671
- r?.[0]?.route && M(r[0]?.route, e.detail["@id"]);
2686
+ r?.[0]?.route && N(r[0]?.route, e.detail["@id"]);
2672
2687
  }
2673
2688
  }
2674
2689
  }
2675
2690
  _closeModal(e) {
2676
- e.preventDefault(), this.route && M(this.route, this.defaultDataSrc);
2691
+ e.preventDefault(), this.route && N(this.route, this.defaultDataSrc);
2677
2692
  }
2678
2693
  _closeModalFromBackground(e) {
2679
- e.preventDefault(), this.route && e.target?.classList.contains("modal") && M(this.route, this.defaultDataSrc);
2694
+ e.preventDefault(), this.route && e.target?.classList.contains("modal") && N(this.route, this.defaultDataSrc);
2680
2695
  }
2681
2696
  _resultCountUpdate(e) {
2682
2697
  this.resultCount = e.detail ?? 0;
2683
2698
  }
2684
2699
  _goToBundleCreation(e) {
2685
- e.preventDefault(), this.bundleCreationComponent?.route && M(this.bundleCreationComponent.route);
2700
+ e.preventDefault(), this.bundleCreationComponent?.route && N(this.bundleCreationComponent.route);
2686
2701
  }
2687
2702
  render() {
2688
2703
  return this.gatekeeper() || this._getResource.render({
@@ -2757,7 +2772,7 @@ et([
2757
2772
  T = et([
2758
2773
  V("solid-fact-bundle")
2759
2774
  ], T);
2760
- const Lr = {
2775
+ const Tr = {
2761
2776
  s20acf344316637a0: "All Catalogs",
2762
2777
  s67269ab6dc51ec41: S`Error while loading catalog ${0}`,
2763
2778
  s0b88896b7338837d: "All Datasets",
@@ -2784,20 +2799,20 @@ const Lr = {
2784
2799
  s4979bd417e7c8052: "All facts in this bundle",
2785
2800
  s57a40de45f324b96: "Bundle created on",
2786
2801
  sd3682395cf86f913: "Bundle updated on"
2787
- }, Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2802
+ }, Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2788
2803
  __proto__: null,
2789
- templates: Lr
2790
- }, Symbol.toStringTag, { value: "Module" })), Fr = "en", he = [
2804
+ templates: Tr
2805
+ }, Symbol.toStringTag, { value: "Module" })), Mr = "en", he = [
2791
2806
  "en"
2792
- ], Nr = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": Tr }), Mr = new Map(
2807
+ ], Nr = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": Fr }), Br = new Map(
2793
2808
  he.map((e) => [
2794
2809
  e,
2795
2810
  Nr[`../../generated/locales/${e}.ts`]
2796
2811
  ])
2797
- ), { getLocale: Zt, setLocale: Xt } = yr({
2798
- sourceLocale: Fr,
2812
+ ), { getLocale: Zt, setLocale: Xt } = vr({
2813
+ sourceLocale: Mr,
2799
2814
  targetLocales: he,
2800
- loadLocale: async (e) => Mr.get(e)
2815
+ loadLocale: async (e) => Br.get(e)
2801
2816
  });
2802
2817
  window.getLocale = window.getLocale ? window.getLocale.push(Zt) : [Zt];
2803
2818
  window.setLocale = window.setLocale ? window.setLocale.push(Xt) : [Xt];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startinblox/components-ds4go",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "Startin'blox DS4GO",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -183,8 +183,8 @@ export class SolidFactBundle extends OrbitComponent {
183
183
  ],
184
184
  "@type": ["ldp:Container", "ds4go:FactBundle"],
185
185
  name: this.bundleName,
186
- description: this.bundleDescription,
187
- facts: this.selectedFacts.map((fact: Resource) => fact.id),
186
+ description: this.bundleDescription || "",
187
+ "ldp:contains": this.selectedFacts.map((fact: Resource) => ({"@id": fact["@id"]})),
188
188
  };
189
189
 
190
190
  const newFactBundleId = await window.sibStore.post(
@@ -1,4 +1,4 @@
1
- import { formatDate, OrbitComponent, requestNavigation, sort } from "@helpers";
1
+ import { formatDate, OrbitComponent, requestNavigation, setupCacheInvalidation, sort } from "@helpers";
2
2
  import { msg } from "@lit/localize";
3
3
  import { Task } from "@lit/task";
4
4
  import type {
@@ -12,6 +12,13 @@ import { customElement, property, state } from "lit/decorators.js";
12
12
 
13
13
  @customElement("solid-fact-bundle")
14
14
  export class SolidFactBundle extends OrbitComponent {
15
+ constructor() {
16
+ super();
17
+ setupCacheInvalidation(this, {
18
+ keywords: ["factbundles"],
19
+ });
20
+ }
21
+
15
22
  static styles = css`
16
23
  .modal {
17
24
  position: fixed;