@startinblox/core 0.19.0-beta.9 → 0.19.0

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.
@@ -0,0 +1,4 @@
1
+ const MarkerCluster = ".leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {\n -webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;\n -moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;\n -o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;\n transition: transform 0.3s ease-out, opacity 0.3s ease-in;\n}\n\n.leaflet-cluster-spider-leg {\n /* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */\n -webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;\n -moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;\n -o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;\n transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;\n}\n";
2
+ export {
3
+ MarkerCluster as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const MarkerCluster_Default = '.marker-cluster-small {\n background-color: rgba(181, 226, 140, 0.6);\n }\n.marker-cluster-small div {\n background-color: rgba(110, 204, 57, 0.6);\n }\n\n.marker-cluster-medium {\n background-color: rgba(241, 211, 87, 0.6);\n }\n.marker-cluster-medium div {\n background-color: rgba(240, 194, 12, 0.6);\n }\n\n.marker-cluster-large {\n background-color: rgba(253, 156, 115, 0.6);\n }\n.marker-cluster-large div {\n background-color: rgba(241, 128, 23, 0.6);\n }\n\n /* IE 6-8 fallback colors */\n.leaflet-oldie .marker-cluster-small {\n background-color: rgb(181, 226, 140);\n }\n.leaflet-oldie .marker-cluster-small div {\n background-color: rgb(110, 204, 57);\n }\n\n.leaflet-oldie .marker-cluster-medium {\n background-color: rgb(241, 211, 87);\n }\n.leaflet-oldie .marker-cluster-medium div {\n background-color: rgb(240, 194, 12);\n }\n\n.leaflet-oldie .marker-cluster-large {\n background-color: rgb(253, 156, 115);\n }\n.leaflet-oldie .marker-cluster-large div {\n background-color: rgb(241, 128, 23);\n}\n\n.marker-cluster {\n background-clip: padding-box;\n border-radius: 20px;\n }\n.marker-cluster div {\n width: 30px;\n height: 30px;\n margin-left: 5px;\n margin-top: 5px;\n\n text-align: center;\n border-radius: 15px;\n font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;\n }\n.marker-cluster span {\n line-height: 30px;\n }';
2
+ export {
3
+ MarkerCluster_Default as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const defaultTheme = "/*==== SOLID-MAP ====*/\n/* map custom marker */\n.sib-custom-marker {\n position: absolute;\n top: 40%;\n left: 50%;\n margin-left: 115px;\n border-radius: 50%;\n border: 8px solid #1c78c9;\n width: 8px;\n height: 8px;\n}\n.sib-custom-marker::after {\n position: absolute;\n content: '';\n width: 0px;\n height: 0px;\n bottom: -30px;\n left: -6px;\n border: 10px solid transparent;\n border-top-width: 17px;\n border-top-style: solid;\n border-top-color: inherit;\n}";
2
+ export {
3
+ defaultTheme as default
4
+ };
@@ -11,4 +11,3 @@ const en = {
11
11
  export {
12
12
  en as default
13
13
  };
14
- //# sourceMappingURL=en-e53105c5.js.map
@@ -11,4 +11,3 @@ const fr = {
11
11
  export {
12
12
  fr as default
13
13
  };
14
- //# sourceMappingURL=fr-a7fcdb64.js.map
@@ -1,3 +1,26 @@
1
+ var __accessCheck = (obj, member, msg) => {
2
+ if (!member.has(obj))
3
+ throw TypeError("Cannot " + msg);
4
+ };
5
+ var __privateGet = (obj, member, getter) => {
6
+ __accessCheck(obj, member, "read from private field");
7
+ return getter ? getter.call(obj) : member.get(obj);
8
+ };
9
+ var __privateAdd = (obj, member, value) => {
10
+ if (member.has(obj))
11
+ throw TypeError("Cannot add the same private member more than once");
12
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
13
+ };
14
+ var __privateSet = (obj, member, value, setter) => {
15
+ __accessCheck(obj, member, "write to private field");
16
+ setter ? setter.call(obj, value) : member.set(obj, value);
17
+ return value;
18
+ };
19
+ var __privateMethod = (obj, member, method) => {
20
+ __accessCheck(obj, member, "access private method");
21
+ return method;
22
+ };
23
+ var _values, _resolve, _createIterable, createIterable_fn, _next, next_fn, _nextPromise, nextPromise_fn;
1
24
  function isArray(value) {
2
25
  return !Array.isArray ? getTag(value) === "[object Array]" : Array.isArray(value);
3
26
  }
@@ -1345,6 +1368,29 @@ function importCSS(...stylesheets) {
1345
1368
  }
1346
1369
  return linksElements;
1347
1370
  }
1371
+ function importInlineCSS(id, importer) {
1372
+ id = `sib-inline-css-${id}`;
1373
+ let style = document.head.querySelector(`style#${id}`);
1374
+ if (style)
1375
+ return style;
1376
+ style = document.createElement("style");
1377
+ style.id = id;
1378
+ document.head.appendChild(style);
1379
+ (async () => {
1380
+ let textContent;
1381
+ if (typeof importer === "string")
1382
+ textContent = importer;
1383
+ else {
1384
+ const imported = await importer();
1385
+ if (typeof imported === "string")
1386
+ textContent = imported;
1387
+ else
1388
+ textContent = imported.default || "";
1389
+ }
1390
+ style.textContent = textContent;
1391
+ })();
1392
+ return style;
1393
+ }
1348
1394
  function importJS(...plugins) {
1349
1395
  return plugins.map((url) => {
1350
1396
  url = new URL(url, document.baseURI).href;
@@ -1491,8 +1537,11 @@ function transformArrayToContainer(resource) {
1491
1537
  if (!Array.isArray(predicateValue) && predicateValue["@id"]) {
1492
1538
  newValue[predicate] = transformArrayToContainer(resource[predicate]);
1493
1539
  }
1494
- if (Array.isArray(predicateValue)) {
1495
- newValue[predicate] = { "ldp:contains": [...predicateValue] };
1540
+ if (Array.isArray(predicateValue) && predicateValue["@id"]) {
1541
+ newValue[predicate] = {
1542
+ "@id": predicateValue["@id"],
1543
+ "ldp:contains": [...predicateValue]
1544
+ };
1496
1545
  newValue[predicate]["ldp:contains"].forEach((childPredicate, index) => {
1497
1546
  newValue[predicate]["ldp:contains"][index] = transformArrayToContainer(childPredicate);
1498
1547
  });
@@ -1500,15 +1549,90 @@ function transformArrayToContainer(resource) {
1500
1549
  }
1501
1550
  return newValue;
1502
1551
  }
1552
+ class AsyncIterableBuilder {
1553
+ constructor() {
1554
+ __privateAdd(this, _createIterable);
1555
+ __privateAdd(this, _next);
1556
+ __privateAdd(this, _nextPromise);
1557
+ __privateAdd(this, _values, []);
1558
+ __privateAdd(this, _resolve, void 0);
1559
+ __privateMethod(this, _nextPromise, nextPromise_fn).call(this);
1560
+ this.iterable = __privateMethod(this, _createIterable, createIterable_fn).call(this);
1561
+ this.next = __privateMethod(this, _next, next_fn).bind(this);
1562
+ }
1563
+ }
1564
+ _values = new WeakMap();
1565
+ _resolve = new WeakMap();
1566
+ _createIterable = new WeakSet();
1567
+ createIterable_fn = async function* () {
1568
+ for (let index = 0; ; index++) {
1569
+ const { value, done } = await __privateGet(this, _values)[index];
1570
+ delete __privateGet(this, _values)[index];
1571
+ yield value;
1572
+ if (done)
1573
+ return;
1574
+ }
1575
+ };
1576
+ _next = new WeakSet();
1577
+ next_fn = function(value, done = false) {
1578
+ __privateGet(this, _resolve).call(this, { value, done });
1579
+ __privateMethod(this, _nextPromise, nextPromise_fn).call(this);
1580
+ };
1581
+ _nextPromise = new WeakSet();
1582
+ nextPromise_fn = function() {
1583
+ __privateGet(this, _values).push(new Promise((resolve) => __privateSet(this, _resolve, resolve)));
1584
+ };
1585
+ const asyncQuerySelector = (selector, parent = document) => new Promise((resolve) => {
1586
+ const element = parent.querySelector(selector);
1587
+ if (element)
1588
+ return resolve(element);
1589
+ const observer = new MutationObserver(() => {
1590
+ const element2 = parent.querySelector(selector);
1591
+ if (!element2)
1592
+ return;
1593
+ observer.disconnect();
1594
+ return resolve(element2);
1595
+ });
1596
+ observer.observe(parent, {
1597
+ subtree: true,
1598
+ childList: true,
1599
+ attributes: true
1600
+ });
1601
+ });
1602
+ const asyncQuerySelectorAll = (selector, parent = document) => {
1603
+ const delivered = /* @__PURE__ */ new WeakSet();
1604
+ const { next, iterable } = new AsyncIterableBuilder();
1605
+ function checkNewElement() {
1606
+ for (const element of parent.querySelectorAll(selector)) {
1607
+ if (delivered.has(element))
1608
+ continue;
1609
+ delivered.add(element);
1610
+ next(element);
1611
+ }
1612
+ }
1613
+ checkNewElement();
1614
+ const observer = new MutationObserver(checkNewElement);
1615
+ observer.observe(parent, {
1616
+ subtree: true,
1617
+ childList: true,
1618
+ attributes: true
1619
+ });
1620
+ return iterable;
1621
+ };
1503
1622
  const helpers = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1504
1623
  __proto__: null,
1624
+ AsyncIterableBuilder,
1625
+ asyncQuerySelector,
1626
+ asyncQuerySelectorAll,
1505
1627
  compare,
1628
+ default: AsyncIterableBuilder,
1506
1629
  defineComponent,
1507
1630
  domIsReady,
1508
1631
  evalTemplateString,
1509
1632
  findClosingBracketMatchIndex,
1510
1633
  fuzzyCompare,
1511
1634
  importCSS,
1635
+ importInlineCSS,
1512
1636
  importJS,
1513
1637
  loadScript,
1514
1638
  parseFieldsString,
@@ -1518,20 +1642,23 @@ const helpers = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
1518
1642
  uniqID
1519
1643
  }, Symbol.toStringTag, { value: "Module" }));
1520
1644
  export {
1645
+ AsyncIterableBuilder as A,
1521
1646
  findClosingBracketMatchIndex as a,
1522
1647
  stringToDom as b,
1523
1648
  compare as c,
1524
1649
  defineComponent as d,
1525
1650
  evalTemplateString as e,
1526
1651
  fuzzyCompare as f,
1527
- importJS as g,
1652
+ importCSS as g,
1528
1653
  helpers as h,
1529
- importCSS as i,
1530
- domIsReady as j,
1654
+ importInlineCSS as i,
1655
+ importJS as j,
1656
+ domIsReady as k,
1531
1657
  loadScript as l,
1658
+ asyncQuerySelector as m,
1659
+ asyncQuerySelectorAll as n,
1532
1660
  parseFieldsString as p,
1533
1661
  setDeepProperty as s,
1534
1662
  transformArrayToContainer as t,
1535
1663
  uniqID as u
1536
1664
  };
1537
- //# sourceMappingURL=helpers-bf15809c.js.map
package/dist/helpers.js CHANGED
@@ -1,13 +1,18 @@
1
- import { c, d, j, e, a, f, i, g, l, p, s, b, t, u } from "./assets/helpers-bf15809c.js";
1
+ import { A, m, n, c, A as A2, d, k, e, a, f, g, i, j, l, p, s, b, t, u } from "./helpers-4tVqSOBU.js";
2
2
  export {
3
+ A as AsyncIterableBuilder,
4
+ m as asyncQuerySelector,
5
+ n as asyncQuerySelectorAll,
3
6
  c as compare,
7
+ A2 as default,
4
8
  d as defineComponent,
5
- j as domIsReady,
9
+ k as domIsReady,
6
10
  e as evalTemplateString,
7
11
  a as findClosingBracketMatchIndex,
8
12
  f as fuzzyCompare,
9
- i as importCSS,
10
- g as importJS,
13
+ g as importCSS,
14
+ i as importInlineCSS,
15
+ j as importJS,
11
16
  l as loadScript,
12
17
  p as parseFieldsString,
13
18
  s as setDeepProperty,
@@ -15,4 +20,3 @@ export {
15
20
  t as transformArrayToContainer,
16
21
  u as uniqID
17
22
  };
18
- //# sourceMappingURL=helpers.js.map