@startinblox/components-ds4go 2.1.0 → 2.1.1

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,7 +249,7 @@ let R = class extends HTMLElement {
249
249
  R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[L("elementProperties")] = /* @__PURE__ */ new Map(), R[L("finalized")] = /* @__PURE__ */ new Map(), ct?.({ ReactiveElement: R }), (te.reactiveElementVersions ??= []).push("2.1.2");
250
250
  const ye = globalThis, Ce = (t) => t, Z = ye.trustedTypes, Ee = Z ? Z.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, qe = "$lit$", w = `lit$${Math.random().toFixed(9).slice(2)}$`, ze = "?" + w, dt = `<${ze}>`, P = document, F = () => P.createComment(""), B = (t) => t === null || typeof t != "object" && typeof t != "function", ve = Array.isArray, ht = (t) => ve(t) || typeof t?.[Symbol.iterator] == "function", oe = `[
251
251
  \f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pe = /-->/g, je = />/g, S = RegExp(`>|${oe}(?:([^\\s"'>=/]+)(${oe}*=${oe}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Re = /'/g, Oe = /"/g, Ie = /^(?:script|style|textarea|title)$/i, ut = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), p = ut(1), T = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), ke = /* @__PURE__ */ new WeakMap(), E = P.createTreeWalker(P, 129);
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Re = /'/g, Oe = /"/g, Ie = /^(?:script|style|textarea|title)$/i, ut = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), p = ut(1), k = /* @__PURE__ */ Symbol.for("lit-noChange"), c = /* @__PURE__ */ Symbol.for("lit-nothing"), Te = /* @__PURE__ */ new WeakMap(), E = P.createTreeWalker(P, 129);
253
253
  function Ve(t, e) {
254
254
  if (!ve(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
255
  return Ee !== void 0 ? Ee.createHTML(e) : e;
@@ -259,8 +259,8 @@ const ft = (t, e) => {
259
259
  let i, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = M;
260
260
  for (let a = 0; a < s; a++) {
261
261
  const l = t[a];
262
- let d, u, h = -1, $ = 0;
263
- for (; $ < l.length && (n.lastIndex = $, u = n.exec(l), u !== null); ) $ = n.lastIndex, n === M ? u[1] === "!--" ? n = Pe : u[1] !== void 0 ? n = je : u[2] !== void 0 ? (Ie.test(u[2]) && (i = RegExp("</" + u[2], "g")), n = S) : u[3] !== void 0 && (n = S) : n === S ? u[0] === ">" ? (n = i ?? M, h = -1) : u[1] === void 0 ? h = -2 : (h = n.lastIndex - u[2].length, d = u[1], n = u[3] === void 0 ? S : u[3] === '"' ? Oe : Re) : n === Oe || n === Re ? n = S : n === Pe || n === je ? n = M : (n = S, i = void 0);
262
+ let d, f, h = -1, $ = 0;
263
+ for (; $ < l.length && (n.lastIndex = $, f = n.exec(l), f !== null); ) $ = n.lastIndex, n === M ? f[1] === "!--" ? n = Pe : f[1] !== void 0 ? n = je : f[2] !== void 0 ? (Ie.test(f[2]) && (i = RegExp("</" + f[2], "g")), n = S) : f[3] !== void 0 && (n = S) : n === S ? f[0] === ">" ? (n = i ?? M, h = -1) : f[1] === void 0 ? h = -2 : (h = n.lastIndex - f[2].length, d = f[1], n = f[3] === void 0 ? S : f[3] === '"' ? Oe : Re) : n === Oe || n === Re ? n = S : n === Pe || n === je ? n = M : (n = S, i = void 0);
264
264
  const _ = n === S && t[a + 1].startsWith("/>") ? " " : "";
265
265
  o += n === M ? l + dt : h >= 0 ? (r.push(d), l.slice(0, h) + qe + l.slice(h) + w + _) : l + w + (h === -2 ? a : _);
266
266
  }
@@ -271,7 +271,7 @@ class H {
271
271
  let i;
272
272
  this.parts = [];
273
273
  let o = 0, n = 0;
274
- const a = e.length - 1, l = this.parts, [d, u] = ft(e, s);
274
+ const a = e.length - 1, l = this.parts, [d, f] = ft(e, s);
275
275
  if (this.el = H.createElement(d, r), E.currentNode = this.el.content, s === 2 || s === 3) {
276
276
  const h = this.el.content.firstChild;
277
277
  h.replaceWith(...h.childNodes);
@@ -279,7 +279,7 @@ class H {
279
279
  for (; (i = E.nextNode()) !== null && l.length < a; ) {
280
280
  if (i.nodeType === 1) {
281
281
  if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(qe)) {
282
- const $ = u[n++], _ = i.getAttribute(h).split(w), V = /([.?@])?(.*)/.exec($);
282
+ const $ = f[n++], _ = i.getAttribute(h).split(w), V = /([.?@])?(.*)/.exec($);
283
283
  l.push({ type: 1, index: o, name: V[2], strings: _, ctor: V[1] === "." ? mt : V[1] === "?" ? gt : V[1] === "@" ? yt : ie }), i.removeAttribute(h);
284
284
  } else h.startsWith(w) && (l.push({ type: 6, index: o }), i.removeAttribute(h));
285
285
  if (Ie.test(i.tagName)) {
@@ -304,7 +304,7 @@ class H {
304
304
  }
305
305
  }
306
306
  function D(t, e, s = t, r) {
307
- if (e === T) return e;
307
+ if (e === k) return e;
308
308
  let i = r !== void 0 ? s._$Co?.[r] : s._$Cl;
309
309
  const o = B(e) ? void 0 : e._$litDirective$;
310
310
  return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(t), i._$AT(t, s, r)), r !== void 0 ? (s._$Co ??= [])[r] = i : s._$Cl = i), i !== void 0 && (e = D(t, i._$AS(t, e.values), i, r)), e;
@@ -356,7 +356,7 @@ class z {
356
356
  return this._$AB;
357
357
  }
358
358
  _$AI(e, s = this) {
359
- e = D(this, e, s), B(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== T && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ht(e) ? this.k(e) : this._(e);
359
+ e = D(this, e, s), B(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== k && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ht(e) ? this.k(e) : this._(e);
360
360
  }
361
361
  O(e) {
362
362
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -376,8 +376,8 @@ class z {
376
376
  }
377
377
  }
378
378
  _$AC(e) {
379
- let s = ke.get(e.strings);
380
- return s === void 0 && ke.set(e.strings, s = new H(e)), s;
379
+ let s = Te.get(e.strings);
380
+ return s === void 0 && Te.set(e.strings, s = new H(e)), s;
381
381
  }
382
382
  k(e) {
383
383
  ve(this._$AH) || (this._$AH = [], this._$AR());
@@ -409,11 +409,11 @@ class ie {
409
409
  _$AI(e, s = this, r, i) {
410
410
  const o = this.strings;
411
411
  let n = !1;
412
- if (o === void 0) e = D(this, e, s, 0), n = !B(e) || e !== this._$AH && e !== T, n && (this._$AH = e);
412
+ if (o === void 0) e = D(this, e, s, 0), n = !B(e) || e !== this._$AH && e !== k, n && (this._$AH = e);
413
413
  else {
414
414
  const a = e;
415
415
  let l, d;
416
- for (e = o[0], l = 0; l < o.length - 1; l++) d = D(this, a[r + l], s, l), d === T && (d = this._$AH[l]), n ||= !B(d) || d !== this._$AH[l], d === c ? e = c : e !== c && (e += (d ?? "") + o[l + 1]), this._$AH[l] = d;
416
+ for (e = o[0], l = 0; l < o.length - 1; l++) d = D(this, a[r + l], s, l), d === k && (d = this._$AH[l]), n ||= !B(d) || d !== this._$AH[l], d === c ? e = c : e !== c && (e += (d ?? "") + o[l + 1]), this._$AH[l] = d;
417
417
  }
418
418
  n && !i && this.j(e);
419
419
  }
@@ -442,7 +442,7 @@ class yt extends ie {
442
442
  super(e, s, r, i, o), this.type = 5;
443
443
  }
444
444
  _$AI(e, s = this) {
445
- if ((e = D(this, e, s, 0) ?? c) === T) return;
445
+ if ((e = D(this, e, s, 0) ?? c) === k) return;
446
446
  const r = this._$AH, i = e === c && r !== c || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== c && (r === c || i);
447
447
  i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
448
448
  }
@@ -473,7 +473,7 @@ const bt = (t, e, s) => {
473
473
  return i._$AI(t), i;
474
474
  };
475
475
  const $e = globalThis;
476
- let k = class extends R {
476
+ let T = class extends R {
477
477
  constructor() {
478
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
479
479
  }
@@ -492,14 +492,14 @@ let k = class extends R {
492
492
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
493
493
  }
494
494
  render() {
495
- return T;
495
+ return k;
496
496
  }
497
497
  };
498
- k._$litElement$ = !0, k.finalized = !0, $e.litElementHydrateSupport?.({ LitElement: k });
498
+ T._$litElement$ = !0, T.finalized = !0, $e.litElementHydrateSupport?.({ LitElement: T });
499
499
  const _t = $e.litElementPolyfillSupport;
500
- _t?.({ LitElement: k });
500
+ _t?.({ LitElement: T });
501
501
  ($e.litElementVersions ??= []).push("4.2.2");
502
- class wt extends k {
502
+ class wt extends T {
503
503
  constructor() {
504
504
  super(...arguments), this.object = {
505
505
  "@id": ""
@@ -549,7 +549,7 @@ var St = Object.defineProperty, Ct = (t, e, s, r) => {
549
549
  (n = t[o]) && (i = n(e, s, i) || i);
550
550
  return i && St(e, s, i), i;
551
551
  };
552
- class be extends k {
552
+ class be extends T {
553
553
  constructor() {
554
554
  super(...arguments), this.objects = [], this.hasType = (e, s = this.objects) => new Set(s.flatMap((i) => i["@type"])).has(e);
555
555
  }
@@ -738,7 +738,7 @@ const jt = ({
738
738
  document.removeEventListener(r[0], r[1]);
739
739
  }, t._subscribe();
740
740
  };
741
- function Te(t) {
741
+ function ke(t) {
742
742
  return !Number.isNaN(new Date(t).getTime());
743
743
  }
744
744
  const le = (t, e, s) => {
@@ -751,14 +751,14 @@ const le = (t, e, s) => {
751
751
  i = i[o];
752
752
  else
753
753
  return !1;
754
- if (Te(i)) {
754
+ if (ke(i)) {
755
755
  if (new Date(i) > s)
756
756
  return !0;
757
757
  } else
758
758
  return !1;
759
759
  return Array.isArray(t) ? t.some(
760
760
  (o) => le(o, e, s)
761
- ) : typeof t == "object" ? Object.entries(t).some(([o, n]) => o === e && Te(n) ? !1 : le(n, e, s)) : !1;
761
+ ) : typeof t == "object" ? Object.entries(t).some(([o, n]) => o === e && ke(n) ? !1 : le(n, e, s)) : !1;
762
762
  }, Rt = (t, e, s) => {
763
763
  if (!e || !s || typeof s != "string")
764
764
  return t;
@@ -779,7 +779,7 @@ const le = (t, e, s) => {
779
779
  (a) => typeof a == "object" && a !== null && "@id" in a && a["@id"] === s
780
780
  ) : !1 : !1;
781
781
  });
782
- function kt(t) {
782
+ function Tt(t) {
783
783
  return typeof t != "string" && typeof t != "number" && !(t instanceof Date) ? !1 : !Number.isNaN(new Date(t).getTime());
784
784
  }
785
785
  const ce = (t, e, s, r) => {
@@ -795,7 +795,7 @@ const ce = (t, e, s, r) => {
795
795
  if (typeof o == "number") {
796
796
  if (typeof s == "number" && typeof r == "number" && s <= o && o <= r)
797
797
  return !0;
798
- } else if (kt(o)) {
798
+ } else if (Tt(o)) {
799
799
  const n = new Date(o);
800
800
  if (s instanceof Date && r instanceof Date && s <= n && n <= r)
801
801
  return !0;
@@ -806,7 +806,7 @@ const ce = (t, e, s, r) => {
806
806
  ) : typeof t == "object" ? Object.entries(t).some(
807
807
  ([n, a]) => ce(a, e, s, r)
808
808
  ) : !1;
809
- }, Tt = (t, e, s) => {
809
+ }, kt = (t, e, s) => {
810
810
  if (!e || !s || typeof s != "string")
811
811
  return t;
812
812
  const [r, i] = s.split("/").map(Number);
@@ -852,9 +852,9 @@ const ce = (t, e, s, r) => {
852
852
  const r = s.toLowerCase(), o = t.map((n) => {
853
853
  let a = n;
854
854
  const l = e.split(".");
855
- for (const u of l)
856
- if (a && typeof a == "object" && u in a)
857
- a = a[u];
855
+ for (const f of l)
856
+ if (a && typeof a == "object" && f in a)
857
+ a = a[f];
858
858
  else {
859
859
  a = null;
860
860
  break;
@@ -906,7 +906,7 @@ const ce = (t, e, s, r) => {
906
906
  for (let r = 0; r < e.length && (s && e[r] in s); r++)
907
907
  s = s[e[r]];
908
908
  return s;
909
- }, U = (t, e, s = "asc") => t.sort((r, i) => {
909
+ }, N = (t, e, s = "asc") => t.sort((r, i) => {
910
910
  let o = r, n = i;
911
911
  Array.isArray(e) ? (o = De(r, e), n = De(i, e)) : (o = r[e], n = i[e]);
912
912
  let a = 0;
@@ -919,7 +919,7 @@ const ce = (t, e, s, r) => {
919
919
  else
920
920
  throw new TypeError(`Unsupported data type for key "${e}"`);
921
921
  return s === "asc" ? a : -a;
922
- }), N = (t, e = {
922
+ }), U = (t, e = {
923
923
  day: "2-digit",
924
924
  month: "2-digit",
925
925
  year: "2-digit"
@@ -936,10 +936,10 @@ const ce = (t, e, s, r) => {
936
936
  }
937
937
  })
938
938
  );
939
- }, Lt = "https://cdn.startinblox.com/owl/ds4go.jsonld#", Ut = { "@id": "ds4go:link", "@type": "@id" }, Nt = { "@id": "ds4go:enclosure", "@type": "@id" }, Ft = { "@id": "ds4go:url", "@type": "@id" }, Me = {
939
+ }, Lt = "https://cdn.startinblox.com/owl/ds4go.jsonld#", Nt = { "@id": "ds4go:link", "@type": "@id" }, Ut = { "@id": "ds4go:enclosure", "@type": "@id" }, Ft = { "@id": "ds4go:url", "@type": "@id" }, Me = {
940
940
  ds4go: Lt,
941
- link: Ut,
942
- enclosure: Nt,
941
+ link: Nt,
942
+ enclosure: Ut,
943
943
  url: Ft
944
944
  };
945
945
  const ue = "lit-localize-status";
@@ -954,11 +954,11 @@ const Bt = (t, ...e) => ({
954
954
  return r;
955
955
  };
956
956
  const Ge = ((t) => Ht(t) ? Ke(t.strings, t.values) : t);
957
- let f = Ge, Le = !1;
957
+ let u = Ge, Le = !1;
958
958
  function qt(t) {
959
959
  if (Le)
960
960
  throw new Error("lit-localize can only be configured once");
961
- f = t, Le = !0;
961
+ u = t, Le = !0;
962
962
  }
963
963
  class zt {
964
964
  constructor(e) {
@@ -1001,7 +1001,7 @@ const Gt = "", Zt = "h", Jt = "s";
1001
1001
  function Xt(t, e) {
1002
1002
  return (e ? Zt : Jt) + Kt(typeof t == "string" ? t : t.join(Gt));
1003
1003
  }
1004
- const Ue = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new Map();
1004
+ const Ne = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new Map();
1005
1005
  function Qt(t, e, s) {
1006
1006
  if (t) {
1007
1007
  const r = s?.id ?? Yt(e), i = t[r];
@@ -1017,8 +1017,8 @@ function Qt(t, e, s) {
1017
1017
  i.values
1018
1018
  );
1019
1019
  {
1020
- let o = Ue.get(i);
1021
- return o === void 0 && (o = i.values, Ue.set(i, o)), {
1020
+ let o = Ne.get(i);
1021
+ return o === void 0 && (o = i.values, Ne.set(i, o)), {
1022
1022
  ...i,
1023
1023
  values: o.map((n) => e.values[n])
1024
1024
  };
@@ -1029,8 +1029,8 @@ function Qt(t, e, s) {
1029
1029
  }
1030
1030
  function Yt(t) {
1031
1031
  const e = typeof t == "string" ? t : t.strings;
1032
- let s = Ne.get(e);
1033
- return s === void 0 && (s = Xt(e, typeof t != "string" && !("strTag" in t)), Ne.set(e, s)), s;
1032
+ let s = Ue.get(e);
1033
+ return s === void 0 && (s = Xt(e, typeof t != "string" && !("strTag" in t)), Ue.set(e, s)), s;
1034
1034
  }
1035
1035
  function ne(t) {
1036
1036
  window.dispatchEvent(new CustomEvent(ue, { detail: t }));
@@ -1088,7 +1088,7 @@ let q = class extends be {
1088
1088
  switch (n.type) {
1089
1089
  case "interval":
1090
1090
  o.push(
1091
- Tt(
1091
+ kt(
1092
1092
  r,
1093
1093
  n.name,
1094
1094
  n.value
@@ -1151,7 +1151,7 @@ let q = class extends be {
1151
1151
  ${this._displayObjects.map((t) => {
1152
1152
  const e = [
1153
1153
  {
1154
- name: `${t.facts.length} ${t.facts.length > 1 ? f("facts") : f("fact")}`,
1154
+ name: `${t.facts.length} ${t.facts.length > 1 ? u("facts") : u("fact")}`,
1155
1155
  type: "information"
1156
1156
  }
1157
1157
  ];
@@ -1227,7 +1227,7 @@ let Y = class extends wt {
1227
1227
  ><div>${String(this.object.description)}</div></tems-division
1228
1228
  >
1229
1229
  <tems-division type="h4"
1230
- ><div>${f("All facts in this bundle")}</div></tems-division
1230
+ ><div>${u("All facts in this bundle")}</div></tems-division
1231
1231
  >
1232
1232
  <div class="card-grid card-grid-vertical">
1233
1233
  ${this.object.facts.map((t) => {
@@ -1238,7 +1238,7 @@ let Y = class extends wt {
1238
1238
  if (e.length > 3) {
1239
1239
  const s = e.length - 3;
1240
1240
  e.splice(3, s), e.push({
1241
- name: `+${s} ${f("more")}`,
1241
+ name: `+${s} ${u("more")}`,
1242
1242
  type: "information"
1243
1243
  });
1244
1244
  }
@@ -1254,10 +1254,10 @@ let Y = class extends wt {
1254
1254
  <tems-division type="body-sm"
1255
1255
  ><div>
1256
1256
  <div>
1257
- ${f("Bundle created on")} ${String(this.object.created_at)}
1257
+ ${u("Bundle created on")} ${String(this.object.created_at)}
1258
1258
  </div>
1259
1259
  <div>
1260
- ${f("Bundle updated on")} ${String(this.object.updated_at)}
1260
+ ${u("Bundle updated on")} ${String(this.object.updated_at)}
1261
1261
  </div>
1262
1262
  </div></tems-division
1263
1263
  >
@@ -1373,8 +1373,8 @@ var hs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, A = (t, e,
1373
1373
  let y = class extends v {
1374
1374
  constructor() {
1375
1375
  super(...arguments), this.header = "DS4GO Fact Bundling Creation", this.selectedFacts = [], this.bundleName = "", this.bundleDescription = "", this.filterFactText = "", this.spliceLength = 0, this.cherryPickedProperties = [
1376
- { key: "created_at", value: "created_at", cast: N },
1377
- { key: "updated_at", value: "updated_at", cast: N },
1376
+ { key: "created_at", value: "created_at", cast: U },
1377
+ { key: "updated_at", value: "updated_at", cast: U },
1378
1378
  { key: "name", value: "name" },
1379
1379
  { key: "description", value: "description" },
1380
1380
  { key: "author", value: "author" },
@@ -1382,7 +1382,7 @@ let y = class extends v {
1382
1382
  key: "categories",
1383
1383
  value: "categories",
1384
1384
  expand: !0,
1385
- cast: (e) => U(e, "name")
1385
+ cast: (e) => N(e, "name")
1386
1386
  }
1387
1387
  ], this._getResource = new Ye(this, {
1388
1388
  task: async ([e, s, r]) => {
@@ -1391,7 +1391,7 @@ let y = class extends v {
1391
1391
  if (!e) return;
1392
1392
  this.facts = await this._getProxyValue(e), this.hasCachedDatas = !0;
1393
1393
  }
1394
- return this.oldDataSrc !== e && (this.oldDataSrc = e), Array.isArray(this.facts) || (this.facts = []), s ? U(
1394
+ return this.oldDataSrc !== e && (this.oldDataSrc = e), Array.isArray(this.facts) || (this.facts = []), s ? N(
1395
1395
  We(
1396
1396
  this.facts.filter(
1397
1397
  (i) => !r.includes(i)
@@ -1400,7 +1400,7 @@ let y = class extends v {
1400
1400
  ),
1401
1401
  "name",
1402
1402
  "asc"
1403
- ) : (r.length === 0 && (this.spliceLength = Math.floor((window.innerWidth - 800) / 354) * Math.floor((window.innerHeight - 255) / 500)), U(
1403
+ ) : (r.length === 0 && (this.spliceLength = Math.floor((window.innerWidth - 800) / 354) * Math.floor((window.innerHeight - 255) / 500)), N(
1404
1404
  this.facts.filter(
1405
1405
  (i) => !this.selectedFacts.includes(i)
1406
1406
  ),
@@ -1477,7 +1477,7 @@ let y = class extends v {
1477
1477
  <tems-button
1478
1478
  type="primary"
1479
1479
  disabled=${!i || c}
1480
- label=${f("Create bundle")}
1480
+ label=${u("Create bundle")}
1481
1481
  @click=${this._createFactBundle}
1482
1482
  ></tems-button>
1483
1483
  </div>
@@ -1488,8 +1488,8 @@ let y = class extends v {
1488
1488
  <div>
1489
1489
  <tems-input
1490
1490
  type="text"
1491
- label=${f("Bundle name")}
1492
- placeholder=${f("Bundle name")}
1491
+ label=${u("Bundle name")}
1492
+ placeholder=${u("Bundle name")}
1493
1493
  required=""
1494
1494
  .value=${this.bundleName}
1495
1495
  @change=${this._updateBundleName}
@@ -1498,15 +1498,15 @@ let y = class extends v {
1498
1498
  <div>
1499
1499
  <tems-textarea
1500
1500
  rows="4"
1501
- label=${f("Bundle description")}
1502
- placeholder=${f("Bundle description")}
1501
+ label=${u("Bundle description")}
1502
+ placeholder=${u("Bundle description")}
1503
1503
  .value=${this.bundleDescription}
1504
1504
  @change=${this._updateBundleDescription}
1505
1505
  ></tems-textarea>
1506
1506
  </div>
1507
1507
  ${r > 0 ? p`<tems-division type="h4">
1508
1508
  <div>
1509
- ${f(
1509
+ ${u(
1510
1510
  J`${r} selected fact${r > 1 ? "s" : ""}`
1511
1511
  )}
1512
1512
  </div></tems-division
@@ -1520,7 +1520,7 @@ let y = class extends v {
1520
1520
  if (n.length > 3) {
1521
1521
  const a = n.length - 3;
1522
1522
  n.splice(3, a), n.push({
1523
- name: `+${a} ${f("more")}`,
1523
+ name: `+${a} ${u("more")}`,
1524
1524
  type: "information"
1525
1525
  });
1526
1526
  }
@@ -1537,7 +1537,7 @@ let y = class extends v {
1537
1537
  })}
1538
1538
  </div>` : c}
1539
1539
  </div>
1540
- ̂${s.length > 0 ? p`<div>
1540
+ ${s.length > 0 || this.filterFactText ? p`<div>
1541
1541
  <div>
1542
1542
  <tems-search-bar
1543
1543
  .displayFilters=${!1}
@@ -1552,52 +1552,57 @@ let y = class extends v {
1552
1552
  @search=${this._searchFacts}
1553
1553
  ></tems-search-bar>
1554
1554
  </div>
1555
- <div class="card-grid card-grid-vertical">
1556
- ${s.map((o) => {
1557
- const n = o.categories.map((a) => ({
1558
- name: a.name,
1559
- type: "information"
1560
- }));
1555
+ ${s.length > 0 ? p` <div class="card-grid card-grid-vertical">
1556
+ ${s.map((o) => {
1557
+ const n = o.categories.map(
1558
+ (a) => ({
1559
+ name: a.name,
1560
+ type: "information"
1561
+ })
1562
+ );
1561
1563
  if (n.length > 3) {
1562
1564
  const a = n.length - 3;
1563
1565
  n.splice(3, a), n.push({
1564
- name: `+${a} ${f("more")}`,
1566
+ name: `+${a} ${u("more")}`,
1565
1567
  type: "information"
1566
1568
  });
1567
1569
  }
1568
1570
  return p`<tems-card-catalog
1569
- .object=${c}
1570
- .tags=${n}
1571
- .header=${o.name || c}
1572
- .content=${o.description || c}
1573
- date=${o.updated_at || c}
1574
- @click=${this._toggleFactSelection.bind(this, o)}
1575
- ></tems-card-catalog>`;
1571
+ .object=${c}
1572
+ .tags=${n}
1573
+ .header=${o.name || c}
1574
+ .content=${o.description || c}
1575
+ date=${o.updated_at || c}
1576
+ @click=${this._toggleFactSelection.bind(
1577
+ this,
1578
+ o
1579
+ )}
1580
+ ></tems-card-catalog>`;
1576
1581
  })}
1577
- </div>
1578
- ${s.length < e.length ? p`<div
1579
- class="flex flex-row justify-content-space-between align-items-flex-end"
1580
- >
1581
- <div>
1582
- ${f(
1582
+ </div>
1583
+ ${s.length < e.length ? p`<div
1584
+ class="flex flex-row justify-content-space-between align-items-flex-end"
1585
+ >
1586
+ <div>
1587
+ ${u(
1583
1588
  J`Displaying ${s.length} of ${e.length} result${e.length > 1 ? "s" : ""}`
1584
1589
  )}
1585
- </div>
1586
- <div class="flex flex-row gap-400">
1587
- <tems-button
1588
- @click=${this._showMoreResults}
1589
- type="primary"
1590
- size="sm"
1591
- label=${f("Show more results")}
1592
- ></tems-button>
1593
- <tems-button
1594
- @click=${this._showAllResults}
1595
- type="primary"
1596
- size="sm"
1597
- label=${f("Show all results")}
1598
- ></tems-button>
1599
- </div>
1600
- </div>` : c}
1590
+ </div>
1591
+ <div class="flex flex-row gap-400">
1592
+ <tems-button
1593
+ @click=${this._showMoreResults}
1594
+ type="primary"
1595
+ size="sm"
1596
+ label=${u("Show more results")}
1597
+ ></tems-button>
1598
+ <tems-button
1599
+ @click=${this._showAllResults}
1600
+ type="primary"
1601
+ size="sm"
1602
+ label=${u("Show all results")}
1603
+ ></tems-button>
1604
+ </div>
1605
+ </div>` : c}` : p`${u("No results found")} ${this.filterFactText ? `for "${this.filterFactText}".` : ""}`}
1601
1606
  </div>` : c}
1602
1607
  </section>
1603
1608
  </div>
@@ -1689,8 +1694,8 @@ var fs = Object.defineProperty, ps = Object.getOwnPropertyDescriptor, I = (t, e,
1689
1694
  let j = class extends v {
1690
1695
  constructor() {
1691
1696
  super(...arguments), this.header = "DS4GO Fact Bundling", this.search = [], this.resultCount = this.objects?.length || 0, this.cherryPickedProperties = [
1692
- { key: "created_at", value: "created_at", cast: N },
1693
- { key: "updated_at", value: "updated_at", cast: N },
1697
+ { key: "created_at", value: "created_at", cast: U },
1698
+ { key: "updated_at", value: "updated_at", cast: U },
1694
1699
  { key: "name", value: "name" },
1695
1700
  { key: "description", value: "description" }
1696
1701
  ], this._getResource = new Ye(this, {
@@ -1704,7 +1709,7 @@ let j = class extends v {
1704
1709
  if (!t) return;
1705
1710
  this.objects = await this._getProxyValue(t), this.hasCachedDatas = !0;
1706
1711
  }
1707
- return this.oldDataSrc !== t && (this.oldDataSrc = t), Array.isArray(this.objects) || (this.objects = []), this.object = this.objects.find((s) => s["@id"] === e), U(this.objects, "name", "asc");
1712
+ return this.oldDataSrc !== t && (this.oldDataSrc = t), Array.isArray(this.objects) || (this.objects = []), this.object = this.objects.find((s) => s["@id"] === e), N(this.objects, "name", "asc");
1708
1713
  }
1709
1714
  },
1710
1715
  args: () => [
@@ -1719,14 +1724,14 @@ let j = class extends v {
1719
1724
  return t?._originalResource?.hasType("ds4go:FactBundle") && (t.facts = await Promise.all(
1720
1725
  (await t._originalResource["ldp:contains"]).map(
1721
1726
  (e) => this._getProxyValue(e["@id"], !1, [
1722
- { key: "updated_at", value: "updated_at", cast: N },
1727
+ { key: "updated_at", value: "updated_at", cast: U },
1723
1728
  { key: "name", value: "name" },
1724
1729
  { key: "description", value: "description" },
1725
1730
  {
1726
1731
  key: "categories",
1727
1732
  value: "categories",
1728
1733
  expand: !0,
1729
- cast: (s) => U(s, "name")
1734
+ cast: (s) => N(s, "name")
1730
1735
  },
1731
1736
  { key: "author", value: "author" },
1732
1737
  { key: "link", value: "link" },
@@ -1789,7 +1794,7 @@ let j = class extends v {
1789
1794
  <tems-button
1790
1795
  type="primary"
1791
1796
  disabled=${!this.bundleCreationComponent?.route || c}
1792
- label=${f("Create a bundle")}
1797
+ label=${u("Create a bundle")}
1793
1798
  @click=${this._goToBundleCreation}
1794
1799
  ></tems-button>
1795
1800
  </div>
@@ -1861,6 +1866,7 @@ const ms = {
1861
1866
  s8272d3578b7c78d5: J`Displaying ${0} of ${1} result${2}`,
1862
1867
  sa40e7f4f2a43e2f7: "Show more results",
1863
1868
  sacf246e0fa11730d: "Show all results",
1869
+ s9094c0cde8fb5058: "No results found",
1864
1870
  sf5509a9f253b9836: "Create a bundle",
1865
1871
  sefa717c1620c4ae4: "facts",
1866
1872
  sef234a791696afff: "fact",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startinblox/components-ds4go",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Startin'blox DS4GO",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -312,7 +312,7 @@ export class SolidFactBundle extends OrbitComponent {
312
312
  </div>`
313
313
  : nothing}
314
314
  </div>
315
- ̂${splicedDatas.length > 0
315
+ ${splicedDatas.length > 0 || this.filterFactText
316
316
  ? html`<div>
317
317
  <div>
318
318
  <tems-search-bar
@@ -328,56 +328,65 @@ export class SolidFactBundle extends OrbitComponent {
328
328
  @search=${this._searchFacts}
329
329
  ></tems-search-bar>
330
330
  </div>
331
- <div class="card-grid card-grid-vertical">
332
- ${splicedDatas.map((fact: Resource) => {
333
- const tags = fact.categories.map((c: Resource) => ({
334
- name: c.name,
335
- type: "information",
336
- }));
337
- if (tags.length > 3) {
338
- const overflowTags = tags.length - 3;
339
- tags.splice(3, overflowTags);
340
- tags.push({
341
- name: `+${overflowTags} ${msg("more")}`,
342
- type: "information",
343
- });
344
- }
345
-
346
- return html`<tems-card-catalog
347
- .object=${import.meta.env.DEV ? fact : nothing}
348
- .tags=${tags}
349
- .header=${fact.name || nothing}
350
- .content=${fact.description || nothing}
351
- date=${fact.updated_at || nothing}
352
- @click=${this._toggleFactSelection.bind(this, fact)}
353
- ></tems-card-catalog>`;
354
- })}
355
- </div>
356
- ${splicedDatas.length < datas.length
357
- ? html`<div
358
- class="flex flex-row justify-content-space-between align-items-flex-end"
359
- >
360
- <div>
361
- ${msg(
362
- str`Displaying ${splicedDatas.length} of ${datas.length} result${datas.length > 1 ? "s" : ""}`,
363
- )}
364
- </div>
365
- <div class="flex flex-row gap-400">
366
- <tems-button
367
- @click=${this._showMoreResults}
368
- type="primary"
369
- size="sm"
370
- label=${msg("Show more results")}
371
- ></tems-button>
372
- <tems-button
373
- @click=${this._showAllResults}
374
- type="primary"
375
- size="sm"
376
- label=${msg("Show all results")}
377
- ></tems-button>
331
+ ${splicedDatas.length > 0
332
+ ? html` <div class="card-grid card-grid-vertical">
333
+ ${splicedDatas.map((fact: Resource) => {
334
+ const tags = fact.categories.map(
335
+ (c: Resource) => ({
336
+ name: c.name,
337
+ type: "information",
338
+ }),
339
+ );
340
+ if (tags.length > 3) {
341
+ const overflowTags = tags.length - 3;
342
+ tags.splice(3, overflowTags);
343
+ tags.push({
344
+ name: `+${overflowTags} ${msg("more")}`,
345
+ type: "information",
346
+ });
347
+ }
348
+
349
+ return html`<tems-card-catalog
350
+ .object=${import.meta.env.DEV
351
+ ? fact
352
+ : nothing}
353
+ .tags=${tags}
354
+ .header=${fact.name || nothing}
355
+ .content=${fact.description || nothing}
356
+ date=${fact.updated_at || nothing}
357
+ @click=${this._toggleFactSelection.bind(
358
+ this,
359
+ fact,
360
+ )}
361
+ ></tems-card-catalog>`;
362
+ })}
378
363
  </div>
379
- </div>`
380
- : nothing}
364
+ ${splicedDatas.length < datas.length
365
+ ? html`<div
366
+ class="flex flex-row justify-content-space-between align-items-flex-end"
367
+ >
368
+ <div>
369
+ ${msg(
370
+ str`Displaying ${splicedDatas.length} of ${datas.length} result${datas.length > 1 ? "s" : ""}`,
371
+ )}
372
+ </div>
373
+ <div class="flex flex-row gap-400">
374
+ <tems-button
375
+ @click=${this._showMoreResults}
376
+ type="primary"
377
+ size="sm"
378
+ label=${msg("Show more results")}
379
+ ></tems-button>
380
+ <tems-button
381
+ @click=${this._showAllResults}
382
+ type="primary"
383
+ size="sm"
384
+ label=${msg("Show all results")}
385
+ ></tems-button>
386
+ </div>
387
+ </div>`
388
+ : nothing}`
389
+ : html`${msg("No results found")} ${this.filterFactText ? `for "${this.filterFactText}".` : ""}`}
381
390
  </div>`
382
391
  : nothing}
383
392
  </section>