@startinblox/core 2.0.0-beta.7 → 2.0.0-beta.8

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.
@@ -230,6 +230,7 @@ function transformArrayToContainer(resource) {
230
230
  newValue[predicate] = {
231
231
  "@id": predicateValue["@id"],
232
232
  "ldp:contains": [...predicateValue]
233
+ // ???? why only ldp:contains?
233
234
  };
234
235
  newValue[predicate]["ldp:contains"].forEach(
235
236
  (childPredicate, index) => {
@@ -240,6 +241,12 @@ function transformArrayToContainer(resource) {
240
241
  }
241
242
  return newValue;
242
243
  }
244
+ function doesResourceContainList(resource) {
245
+ const predicates = ["ldp:contains", "dcat:dataset"];
246
+ return predicates.some(
247
+ (predicate) => typeof resource === "object" ? predicate in resource : typeof resource === "string" && resource.includes(predicate)
248
+ );
249
+ }
243
250
  class AsyncIterableBuilder {
244
251
  constructor() {
245
252
  __privateAdd(this, _AsyncIterableBuilder_instances);
@@ -316,6 +323,7 @@ const helpers = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
316
323
  compare,
317
324
  default: AsyncIterableBuilder,
318
325
  defineComponent,
326
+ doesResourceContainList,
319
327
  domIsReady,
320
328
  evalTemplateString,
321
329
  findClosingBracketMatchIndex,
@@ -333,22 +341,23 @@ const helpers = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
333
341
  }, Symbol.toStringTag, { value: "Module" }));
334
342
  export {
335
343
  AsyncIterableBuilder as A,
336
- fuzzyCompare as a,
337
- asyncQuerySelector as b,
344
+ doesResourceContainList as a,
345
+ fuzzyCompare as b,
338
346
  compare as c,
339
347
  defineComponent as d,
340
348
  evalTemplateString as e,
341
349
  findClosingBracketMatchIndex as f,
342
350
  generalComparator as g,
343
- importCSS as h,
351
+ asyncQuerySelector as h,
344
352
  importInlineCSS as i,
345
- helpers as j,
346
- stringToDom as k,
347
- importJS as l,
348
- loadScript as m,
349
- domIsReady as n,
350
- asyncQuerySelectorAll as o,
353
+ importCSS as j,
354
+ helpers as k,
355
+ stringToDom as l,
356
+ importJS as m,
357
+ loadScript as n,
358
+ domIsReady as o,
351
359
  parseFieldsString as p,
360
+ asyncQuerySelectorAll as q,
352
361
  setDeepProperty as s,
353
362
  transformArrayToContainer as t,
354
363
  uniqID as u
package/dist/helpers.js CHANGED
@@ -1,23 +1,24 @@
1
- import { A, b, o, c, A as A2, d, n, e, f, a, g, h, i, l, m, p, s, k, t, u } from "./helpers-Ae979zFb.js";
1
+ import { A, h, q, c, A as A2, d, a, o, e, f, b, g, j, i, m, n, p, s, l, t, u } from "./helpers-DH22C8s9.js";
2
2
  export {
3
3
  A as AsyncIterableBuilder,
4
- b as asyncQuerySelector,
5
- o as asyncQuerySelectorAll,
4
+ h as asyncQuerySelector,
5
+ q as asyncQuerySelectorAll,
6
6
  c as compare,
7
7
  A2 as default,
8
8
  d as defineComponent,
9
- n as domIsReady,
9
+ a as doesResourceContainList,
10
+ o as domIsReady,
10
11
  e as evalTemplateString,
11
12
  f as findClosingBracketMatchIndex,
12
- a as fuzzyCompare,
13
+ b as fuzzyCompare,
13
14
  g as generalComparator,
14
- h as importCSS,
15
+ j as importCSS,
15
16
  i as importInlineCSS,
16
- l as importJS,
17
- m as loadScript,
17
+ m as importJS,
18
+ n as loadScript,
18
19
  p as parseFieldsString,
19
20
  s as setDeepProperty,
20
- k as stringToDom,
21
+ l as stringToDom,
21
22
  t as transformArrayToContainer,
22
23
  u as uniqID
23
24
  };