ednl-liftstatus-web-components 1.5.2 → 1.6.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.
Files changed (87) hide show
  1. package/dist/cjs/ednl-liftstatus-web-components.cjs.js +2 -2
  2. package/dist/cjs/global-9027a413.js +7 -0
  3. package/dist/cjs/{index-23750fdc.js → index-b5d10454.js} +358 -7
  4. package/dist/cjs/isEmpty-437e2887.js +72 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/ls-3d-scene.cjs.entry.js +3 -16
  7. package/dist/cjs/ls-counters.cjs.entry.js +1 -1
  8. package/dist/cjs/ls-data.cjs.entry.js +144 -74
  9. package/dist/cjs/ls-history.cjs.entry.js +1 -1
  10. package/dist/cjs/ls-indicator.cjs.entry.js +2 -2
  11. package/dist/cjs/ls-recent-stops.cjs.entry.js +16762 -0
  12. package/dist/cjs/ls-status-history.cjs.entry.js +1 -1
  13. package/dist/cjs/ls-status-item.cjs.entry.js +2 -2
  14. package/dist/cjs/ls-status.cjs.entry.js +1 -1
  15. package/dist/cjs/ls-swimlane.cjs.entry.js +1024 -3
  16. package/dist/cjs/{process-es6-36bf0e9c.js → process-es6-39ef8921.js} +4 -7
  17. package/dist/cjs/{store-7810e598.js → store-1909bcd3.js} +1 -1
  18. package/dist/cjs/transform-57fbd12b.js +6963 -0
  19. package/dist/cjs/values-e1bf1cf4.js +939 -0
  20. package/dist/collection/collection-manifest.json +1 -0
  21. package/dist/collection/components/ls-3d-scene/ls-3d-scene.js +0 -14
  22. package/dist/collection/components/ls-data/ls-data.js +138 -88
  23. package/dist/collection/components/ls-recent-stops/ls-recent-stops.css +102 -0
  24. package/dist/collection/components/ls-recent-stops/ls-recent-stops.js +361 -0
  25. package/dist/collection/components/ls-swimlane/assets/elevator-closing.png +0 -0
  26. package/dist/collection/components/ls-swimlane/assets/elevator-opening.png +0 -0
  27. package/dist/collection/components/ls-swimlane/assets/elevator.png +0 -0
  28. package/dist/collection/components/ls-swimlane/ls-swimlane.css +40 -0
  29. package/dist/collection/components/ls-swimlane/ls-swimlane.js +578 -4
  30. package/dist/collection/utils/translate.js +25 -0
  31. package/dist/custom-elements/index.d.ts +6 -0
  32. package/dist/custom-elements/index.js +26382 -781
  33. package/dist/ednl-liftstatus-web-components/assets/elevator-closing.png +0 -0
  34. package/dist/ednl-liftstatus-web-components/assets/elevator-opening.png +0 -0
  35. package/dist/ednl-liftstatus-web-components/assets/elevator.png +0 -0
  36. package/dist/ednl-liftstatus-web-components/ednl-liftstatus-web-components.esm.js +1 -1
  37. package/dist/ednl-liftstatus-web-components/p-08fe7342.entry.js +1 -0
  38. package/dist/ednl-liftstatus-web-components/p-229b62fa.entry.js +3 -0
  39. package/dist/ednl-liftstatus-web-components/p-251fca23.entry.js +1 -0
  40. package/dist/ednl-liftstatus-web-components/p-2d180048.js +1 -0
  41. package/dist/ednl-liftstatus-web-components/p-3eb7d9ca.js +1 -0
  42. package/dist/ednl-liftstatus-web-components/p-66ca7523.entry.js +1 -0
  43. package/dist/ednl-liftstatus-web-components/{p-6f1560a9.js → p-89992d8e.js} +1 -1
  44. package/dist/ednl-liftstatus-web-components/{p-be96ac1c.entry.js → p-89ad1f6c.entry.js} +1 -1
  45. package/dist/ednl-liftstatus-web-components/p-8f852ed5.entry.js +1 -0
  46. package/dist/ednl-liftstatus-web-components/{p-07497fce.entry.js → p-a0ef071b.entry.js} +1 -1
  47. package/dist/ednl-liftstatus-web-components/p-a7b39b3c.js +1 -0
  48. package/dist/ednl-liftstatus-web-components/p-ac4b9712.js +1 -0
  49. package/dist/ednl-liftstatus-web-components/{p-c9828bc4.entry.js → p-b8177bd9.entry.js} +1 -1
  50. package/dist/ednl-liftstatus-web-components/p-d090c3c5.js +1 -0
  51. package/dist/ednl-liftstatus-web-components/{p-66d161e2.entry.js → p-d56bddc2.entry.js} +1 -1
  52. package/dist/ednl-liftstatus-web-components/{p-8d1a85c5.entry.js → p-d691795e.entry.js} +1 -1
  53. package/dist/ednl-liftstatus-web-components/p-e369b114.js +1 -0
  54. package/dist/esm/ednl-liftstatus-web-components.js +2 -2
  55. package/dist/esm/global-e1c7e609.js +5 -0
  56. package/dist/esm/{index-558a910b.js → index-6306be70.js} +358 -7
  57. package/dist/esm/isEmpty-078ceec3.js +70 -0
  58. package/dist/esm/loader.js +2 -2
  59. package/dist/esm/ls-3d-scene.entry.js +3 -16
  60. package/dist/esm/ls-counters.entry.js +1 -1
  61. package/dist/esm/ls-data.entry.js +142 -72
  62. package/dist/esm/ls-history.entry.js +1 -1
  63. package/dist/esm/ls-indicator.entry.js +2 -2
  64. package/dist/esm/ls-recent-stops.entry.js +16758 -0
  65. package/dist/esm/ls-status-history.entry.js +1 -1
  66. package/dist/esm/ls-status-item.entry.js +2 -2
  67. package/dist/esm/ls-status.entry.js +1 -1
  68. package/dist/esm/ls-swimlane.entry.js +1024 -3
  69. package/dist/esm/{process-es6-cc264d03.js → process-es6-6fcfb3fc.js} +5 -7
  70. package/dist/esm/{store-2a431718.js → store-555131e7.js} +1 -1
  71. package/dist/esm/transform-787c3a23.js +6806 -0
  72. package/dist/esm/values-5e76f985.js +914 -0
  73. package/dist/types/components/ls-data/ls-data.d.ts +22 -11
  74. package/dist/types/components/ls-recent-stops/ls-recent-stops.d.ts +40 -0
  75. package/dist/types/components/ls-swimlane/ls-swimlane.d.ts +63 -0
  76. package/dist/types/components.d.ts +15 -10
  77. package/dist/types/utils/translate.d.ts +10 -0
  78. package/package.json +5 -1
  79. package/dist/collection/utils/utils.js +0 -3
  80. package/dist/ednl-liftstatus-web-components/p-06133f13.entry.js +0 -1
  81. package/dist/ednl-liftstatus-web-components/p-154beb99.js +0 -1
  82. package/dist/ednl-liftstatus-web-components/p-2e42390c.entry.js +0 -1
  83. package/dist/ednl-liftstatus-web-components/p-327f59f7.entry.js +0 -1
  84. package/dist/ednl-liftstatus-web-components/p-9a77dcb7.entry.js +0 -3
  85. package/dist/ednl-liftstatus-web-components/p-bf71b10e.js +0 -1
  86. package/dist/types/components/ls-3d-scene/types.d.ts +0 -9
  87. package/dist/types/utils/utils.d.ts +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-23750fdc.js');
3
+ const index = require('./index-b5d10454.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["ls-3d-scene.cjs",[[1,"ls-3d-scene",{"sensor500":[32],"sensor515":[32],"sensor514":[32]}]]],["ls-status.cjs",[[1,"ls-status",{"sensorIds":[1,"sensor-ids"]}]]],["ls-counters.cjs",[[1,"ls-counters"]]],["ls-data.cjs",[[1,"ls-data",{"accessToken":[1,"access-token"],"installationId":[1,"installation-id"]}]]],["ls-history.cjs",[[1,"ls-history"]]],["ls-status-history.cjs",[[1,"ls-status-history"]]],["ls-swimlane.cjs",[[1,"ls-swimlane"]]],["ls-indicator.cjs",[[1,"ls-indicator",{"sensorId":[8,"sensor-id"],"dataLabel":[32],"sensorData":[32]}]]],["ls-status-item.cjs",[[1,"ls-status-item",{"sensorId":[2,"sensor-id"],"dataLabel":[32],"sensorData":[32],"timestamp":[32]}]]]], options);
18
+ return index.bootstrapLazy([["ls-3d-scene.cjs",[[1,"ls-3d-scene",{"sensor500":[32],"sensor515":[32],"sensor514":[32]}]]],["ls-status.cjs",[[1,"ls-status",{"sensorIds":[1,"sensor-ids"]}]]],["ls-counters.cjs",[[1,"ls-counters"]]],["ls-data.cjs",[[1,"ls-data",{"accessToken":[1,"access-token"]}]]],["ls-history.cjs",[[1,"ls-history"]]],["ls-recent-stops.cjs",[[4,"ls-recent-stops",{"chartLoading":[32]}]]],["ls-status-history.cjs",[[1,"ls-status-history"]]],["ls-swimlane.cjs",[[4,"ls-swimlane"]]],["ls-indicator.cjs",[[1,"ls-indicator",{"sensorId":[8,"sensor-id"],"dataLabel":[32],"sensorData":[32]}]]],["ls-status-item.cjs",[[1,"ls-status-item",{"sensorId":[2,"sensor-id"],"dataLabel":[32],"sensorData":[32],"timestamp":[32]}]]]], options);
19
19
  });
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ const global$1 = (typeof global !== "undefined" ? global :
4
+ typeof self !== "undefined" ? self :
5
+ typeof window !== "undefined" ? window : {});
6
+
7
+ exports.global = global$1;
@@ -23,7 +23,11 @@ function _interopNamespace(e) {
23
23
  const NAMESPACE = 'ednl-liftstatus-web-components';
24
24
 
25
25
  let scopeId;
26
+ let contentRef;
26
27
  let hostTagName;
28
+ let useNativeShadowDom = false;
29
+ let checkSlotFallbackVisibility = false;
30
+ let checkSlotRelocate = false;
27
31
  let isSvgMode = false;
28
32
  let renderingRef = null;
29
33
  let queuePending = false;
@@ -155,6 +159,7 @@ const isComplexType = (o) => {
155
159
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
156
160
  const h = (nodeName, vnodeData, ...children) => {
157
161
  let child = null;
162
+ let slotName = null;
158
163
  let simple = false;
159
164
  let lastSimple = false;
160
165
  let vNodeChildren = [];
@@ -182,6 +187,9 @@ const h = (nodeName, vnodeData, ...children) => {
182
187
  };
183
188
  walk(children);
184
189
  if (vnodeData) {
190
+ if (vnodeData.name) {
191
+ slotName = vnodeData.name;
192
+ }
185
193
  {
186
194
  const classData = vnodeData.className || vnodeData.class;
187
195
  if (classData) {
@@ -199,6 +207,9 @@ const h = (nodeName, vnodeData, ...children) => {
199
207
  if (vNodeChildren.length > 0) {
200
208
  vnode.$children$ = vNodeChildren;
201
209
  }
210
+ {
211
+ vnode.$name$ = slotName;
212
+ }
202
213
  return vnode;
203
214
  };
204
215
  const newVNode = (tag, text) => {
@@ -212,6 +223,9 @@ const newVNode = (tag, text) => {
212
223
  {
213
224
  vnode.$attrs$ = null;
214
225
  }
226
+ {
227
+ vnode.$name$ = null;
228
+ }
215
229
  return vnode;
216
230
  };
217
231
  const Host = {};
@@ -309,13 +323,36 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
309
323
  let i = 0;
310
324
  let elm;
311
325
  let childNode;
326
+ let oldVNode;
327
+ if (!useNativeShadowDom) {
328
+ // remember for later we need to check to relocate nodes
329
+ checkSlotRelocate = true;
330
+ if (newVNode.$tag$ === 'slot') {
331
+ if (scopeId) {
332
+ // scoped css needs to add its scoped id to the parent element
333
+ parentElm.classList.add(scopeId + '-s');
334
+ }
335
+ newVNode.$flags$ |= newVNode.$children$
336
+ ? // slot element has fallback content
337
+ 2 /* isSlotFallback */
338
+ : // slot element does not have fallback content
339
+ 1 /* isSlotReference */;
340
+ }
341
+ }
312
342
  if (newVNode.$text$ !== null) {
313
343
  // create text node
314
344
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
315
345
  }
346
+ else if (newVNode.$flags$ & 1 /* isSlotReference */) {
347
+ // create a slot reference node
348
+ elm = newVNode.$elm$ =
349
+ doc.createTextNode('');
350
+ }
316
351
  else {
317
352
  // create element
318
- elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
353
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
354
+ ? 'slot-fb'
355
+ : newVNode.$tag$));
319
356
  // add css classes, attrs, props, listeners, etc.
320
357
  {
321
358
  updateElement(null, newVNode, isSvgMode);
@@ -328,7 +365,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
328
365
  if (newVNode.$children$) {
329
366
  for (i = 0; i < newVNode.$children$.length; ++i) {
330
367
  // create the node
331
- childNode = createElm(oldParentVNode, newVNode, i);
368
+ childNode = createElm(oldParentVNode, newVNode, i, elm);
332
369
  // return node could have been null
333
370
  if (childNode) {
334
371
  // append our new node
@@ -337,20 +374,62 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
337
374
  }
338
375
  }
339
376
  }
377
+ {
378
+ elm['s-hn'] = hostTagName;
379
+ if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
380
+ // remember the content reference comment
381
+ elm['s-sr'] = true;
382
+ // remember the content reference comment
383
+ elm['s-cr'] = contentRef;
384
+ // remember the slot name, or empty string for default slot
385
+ elm['s-sn'] = newVNode.$name$ || '';
386
+ // check if we've got an old vnode for this slot
387
+ oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
388
+ if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
389
+ // we've got an old slot vnode and the wrapper is being replaced
390
+ // so let's move the old slot content back to it's original location
391
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
392
+ }
393
+ }
394
+ }
340
395
  return elm;
341
396
  };
397
+ const putBackInOriginalLocation = (parentElm, recursive) => {
398
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
399
+ const oldSlotChildNodes = parentElm.childNodes;
400
+ for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
401
+ const childNode = oldSlotChildNodes[i];
402
+ if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
403
+ // // this child node in the old element is from another component
404
+ // // remove this node from the old slot's parent
405
+ // childNode.remove();
406
+ // and relocate it back to it's original location
407
+ parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
408
+ // remove the old original location comment entirely
409
+ // later on the patch function will know what to do
410
+ // and move this to the correct spot in need be
411
+ childNode['s-ol'].remove();
412
+ childNode['s-ol'] = undefined;
413
+ checkSlotRelocate = true;
414
+ }
415
+ if (recursive) {
416
+ putBackInOriginalLocation(childNode, recursive);
417
+ }
418
+ }
419
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
420
+ };
342
421
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
343
- let containerElm = (parentElm);
422
+ let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
344
423
  let childNode;
345
424
  if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
346
425
  containerElm = containerElm.shadowRoot;
347
426
  }
348
427
  for (; startIdx <= endIdx; ++startIdx) {
349
428
  if (vnodes[startIdx]) {
350
- childNode = createElm(null, parentVNode, startIdx);
429
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
351
430
  if (childNode) {
352
431
  vnodes[startIdx].$elm$ = childNode;
353
- containerElm.insertBefore(childNode, before);
432
+ containerElm.insertBefore(childNode, referenceNode(before) );
354
433
  }
355
434
  }
356
435
  }
@@ -360,6 +439,20 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
360
439
  if ((vnode = vnodes[startIdx])) {
361
440
  elm = vnode.$elm$;
362
441
  callNodeRefs(vnode);
442
+ {
443
+ // we're removing this element
444
+ // so it's possible we need to show slot fallback content now
445
+ checkSlotFallbackVisibility = true;
446
+ if (elm['s-ol']) {
447
+ // remove the original location comment
448
+ elm['s-ol'].remove();
449
+ }
450
+ else {
451
+ // it's possible that child nodes of the node
452
+ // that's being removed are slot nodes
453
+ putBackInOriginalLocation(elm, true);
454
+ }
455
+ }
363
456
  // remove the vnode's element from the dom
364
457
  elm.remove();
365
458
  }
@@ -400,12 +493,20 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
400
493
  newEndVnode = newCh[--newEndIdx];
401
494
  }
402
495
  else if (isSameVnode(oldStartVnode, newEndVnode)) {
496
+ // Vnode moved right
497
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
498
+ putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
499
+ }
403
500
  patch(oldStartVnode, newEndVnode);
404
501
  parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
405
502
  oldStartVnode = oldCh[++oldStartIdx];
406
503
  newEndVnode = newCh[--newEndIdx];
407
504
  }
408
505
  else if (isSameVnode(oldEndVnode, newStartVnode)) {
506
+ // Vnode moved left
507
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
508
+ putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
509
+ }
409
510
  patch(oldEndVnode, newStartVnode);
410
511
  parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
411
512
  oldEndVnode = oldCh[--oldEndIdx];
@@ -414,12 +515,12 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
414
515
  else {
415
516
  {
416
517
  // new element
417
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
518
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
418
519
  newStartVnode = newCh[++newStartIdx];
419
520
  }
420
521
  if (node) {
421
522
  {
422
- oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
523
+ parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
423
524
  }
424
525
  }
425
526
  }
@@ -435,16 +536,28 @@ const isSameVnode = (vnode1, vnode2) => {
435
536
  // compare if two vnode to see if they're "technically" the same
436
537
  // need to have the same element tag, and same key to be the same
437
538
  if (vnode1.$tag$ === vnode2.$tag$) {
539
+ if (vnode1.$tag$ === 'slot') {
540
+ return vnode1.$name$ === vnode2.$name$;
541
+ }
438
542
  return true;
439
543
  }
440
544
  return false;
441
545
  };
546
+ const referenceNode = (node) => {
547
+ // this node was relocated to a new location in the dom
548
+ // because of some other component's slot
549
+ // but we still have an html comment in place of where
550
+ // it's original location was according to it's original vdom
551
+ return (node && node['s-ol']) || node;
552
+ };
553
+ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
442
554
  const patch = (oldVNode, newVNode) => {
443
555
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
444
556
  const oldChildren = oldVNode.$children$;
445
557
  const newChildren = newVNode.$children$;
446
558
  const tag = newVNode.$tag$;
447
559
  const text = newVNode.$text$;
560
+ let defaultHolder;
448
561
  if (text === null) {
449
562
  // element node
450
563
  {
@@ -475,12 +588,147 @@ const patch = (oldVNode, newVNode) => {
475
588
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
476
589
  }
477
590
  }
591
+ else if ((defaultHolder = elm['s-cr'])) {
592
+ // this element has slotted content
593
+ defaultHolder.parentNode.textContent = text;
594
+ }
478
595
  else if (oldVNode.$text$ !== text) {
479
596
  // update the text content for the text only vnode
480
597
  // and also only if the text is different than before
481
598
  elm.data = text;
482
599
  }
483
600
  };
601
+ const updateFallbackSlotVisibility = (elm) => {
602
+ // tslint:disable-next-line: prefer-const
603
+ let childNodes = elm.childNodes;
604
+ let childNode;
605
+ let i;
606
+ let ilen;
607
+ let j;
608
+ let slotNameAttr;
609
+ let nodeType;
610
+ for (i = 0, ilen = childNodes.length; i < ilen; i++) {
611
+ childNode = childNodes[i];
612
+ if (childNode.nodeType === 1 /* ElementNode */) {
613
+ if (childNode['s-sr']) {
614
+ // this is a slot fallback node
615
+ // get the slot name for this slot reference node
616
+ slotNameAttr = childNode['s-sn'];
617
+ // by default always show a fallback slot node
618
+ // then hide it if there are other slots in the light dom
619
+ childNode.hidden = false;
620
+ for (j = 0; j < ilen; j++) {
621
+ nodeType = childNodes[j].nodeType;
622
+ if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
623
+ // this sibling node is from a different component OR is a named fallback slot node
624
+ if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
625
+ childNode.hidden = true;
626
+ break;
627
+ }
628
+ }
629
+ else {
630
+ // this is a default fallback slot node
631
+ // any element or text node (with content)
632
+ // should hide the default fallback slot node
633
+ if (nodeType === 1 /* ElementNode */ ||
634
+ (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
635
+ childNode.hidden = true;
636
+ break;
637
+ }
638
+ }
639
+ }
640
+ }
641
+ // keep drilling down
642
+ updateFallbackSlotVisibility(childNode);
643
+ }
644
+ }
645
+ };
646
+ const relocateNodes = [];
647
+ const relocateSlotContent = (elm) => {
648
+ // tslint:disable-next-line: prefer-const
649
+ let childNode;
650
+ let node;
651
+ let hostContentNodes;
652
+ let slotNameAttr;
653
+ let relocateNodeData;
654
+ let j;
655
+ let i = 0;
656
+ let childNodes = elm.childNodes;
657
+ let ilen = childNodes.length;
658
+ for (; i < ilen; i++) {
659
+ childNode = childNodes[i];
660
+ if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
661
+ // first got the content reference comment node
662
+ // then we got it's parent, which is where all the host content is in now
663
+ hostContentNodes = node.parentNode.childNodes;
664
+ slotNameAttr = childNode['s-sn'];
665
+ for (j = hostContentNodes.length - 1; j >= 0; j--) {
666
+ node = hostContentNodes[j];
667
+ if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
668
+ // let's do some relocating to its new home
669
+ // but never relocate a content reference node
670
+ // that is suppose to always represent the original content location
671
+ if (isNodeLocatedInSlot(node, slotNameAttr)) {
672
+ // it's possible we've already decided to relocate this node
673
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
674
+ // made some changes to slots
675
+ // let's make sure we also double check
676
+ // fallbacks are correctly hidden or shown
677
+ checkSlotFallbackVisibility = true;
678
+ node['s-sn'] = node['s-sn'] || slotNameAttr;
679
+ if (relocateNodeData) {
680
+ // previously we never found a slot home for this node
681
+ // but turns out we did, so let's remember it now
682
+ relocateNodeData.$slotRefNode$ = childNode;
683
+ }
684
+ else {
685
+ // add to our list of nodes to relocate
686
+ relocateNodes.push({
687
+ $slotRefNode$: childNode,
688
+ $nodeToRelocate$: node,
689
+ });
690
+ }
691
+ if (node['s-sr']) {
692
+ relocateNodes.map((relocateNode) => {
693
+ if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
694
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
695
+ if (relocateNodeData && !relocateNode.$slotRefNode$) {
696
+ relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
697
+ }
698
+ }
699
+ });
700
+ }
701
+ }
702
+ else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
703
+ // so far this element does not have a slot home, not setting slotRefNode on purpose
704
+ // if we never find a home for this element then we'll need to hide it
705
+ relocateNodes.push({
706
+ $nodeToRelocate$: node,
707
+ });
708
+ }
709
+ }
710
+ }
711
+ }
712
+ if (childNode.nodeType === 1 /* ElementNode */) {
713
+ relocateSlotContent(childNode);
714
+ }
715
+ }
716
+ };
717
+ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
718
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
719
+ if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
720
+ return true;
721
+ }
722
+ if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
723
+ return true;
724
+ }
725
+ return false;
726
+ }
727
+ if (nodeToRelocate['s-sn'] === slotNameAttr) {
728
+ return true;
729
+ }
730
+ return slotNameAttr === '';
731
+ };
484
732
  const callNodeRefs = (vNode) => {
485
733
  {
486
734
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -489,6 +737,7 @@ const callNodeRefs = (vNode) => {
489
737
  };
490
738
  const renderVdom = (hostRef, renderFnResults) => {
491
739
  const hostElm = hostRef.$hostElement$;
740
+ const cmpMeta = hostRef.$cmpMeta$;
492
741
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
493
742
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
494
743
  hostTagName = hostElm.tagName;
@@ -499,8 +748,90 @@ const renderVdom = (hostRef, renderFnResults) => {
499
748
  {
500
749
  scopeId = hostElm['s-sc'];
501
750
  }
751
+ {
752
+ contentRef = hostElm['s-cr'];
753
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
754
+ // always reset
755
+ checkSlotFallbackVisibility = false;
756
+ }
502
757
  // synchronous patch
503
758
  patch(oldVNode, rootVnode);
759
+ {
760
+ // while we're moving nodes around existing nodes, temporarily disable
761
+ // the disconnectCallback from working
762
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
763
+ if (checkSlotRelocate) {
764
+ relocateSlotContent(rootVnode.$elm$);
765
+ let relocateData;
766
+ let nodeToRelocate;
767
+ let orgLocationNode;
768
+ let parentNodeRef;
769
+ let insertBeforeNode;
770
+ let refNode;
771
+ let i = 0;
772
+ for (; i < relocateNodes.length; i++) {
773
+ relocateData = relocateNodes[i];
774
+ nodeToRelocate = relocateData.$nodeToRelocate$;
775
+ if (!nodeToRelocate['s-ol']) {
776
+ // add a reference node marking this node's original location
777
+ // keep a reference to this node for later lookups
778
+ orgLocationNode =
779
+ doc.createTextNode('');
780
+ orgLocationNode['s-nr'] = nodeToRelocate;
781
+ nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
782
+ }
783
+ }
784
+ for (i = 0; i < relocateNodes.length; i++) {
785
+ relocateData = relocateNodes[i];
786
+ nodeToRelocate = relocateData.$nodeToRelocate$;
787
+ if (relocateData.$slotRefNode$) {
788
+ // by default we're just going to insert it directly
789
+ // after the slot reference node
790
+ parentNodeRef = relocateData.$slotRefNode$.parentNode;
791
+ insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
792
+ orgLocationNode = nodeToRelocate['s-ol'];
793
+ while ((orgLocationNode = orgLocationNode.previousSibling)) {
794
+ refNode = orgLocationNode['s-nr'];
795
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
796
+ refNode = refNode.nextSibling;
797
+ if (!refNode || !refNode['s-nr']) {
798
+ insertBeforeNode = refNode;
799
+ break;
800
+ }
801
+ }
802
+ }
803
+ if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
804
+ nodeToRelocate.nextSibling !== insertBeforeNode) {
805
+ // we've checked that it's worth while to relocate
806
+ // since that the node to relocate
807
+ // has a different next sibling or parent relocated
808
+ if (nodeToRelocate !== insertBeforeNode) {
809
+ if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
810
+ // probably a component in the index.html that doesn't have it's hostname set
811
+ nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
812
+ }
813
+ // add it back to the dom but in its new home
814
+ parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
815
+ }
816
+ }
817
+ }
818
+ else {
819
+ // this node doesn't have a slot home to go to, so let's hide it
820
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
821
+ nodeToRelocate.hidden = true;
822
+ }
823
+ }
824
+ }
825
+ }
826
+ if (checkSlotFallbackVisibility) {
827
+ updateFallbackSlotVisibility(rootVnode.$elm$);
828
+ }
829
+ // done moving nodes around
830
+ // allow the disconnect callback to work again
831
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
832
+ // always reset
833
+ relocateNodes.length = 0;
834
+ }
504
835
  };
505
836
  /**
506
837
  * Helper function to create & dispatch a custom Event on a provided target
@@ -890,6 +1221,15 @@ const connectedCallback = (elm) => {
890
1221
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
891
1222
  // first time this component has connected
892
1223
  hostRef.$flags$ |= 1 /* hasConnected */;
1224
+ {
1225
+ // initUpdate
1226
+ // if the slot polyfill is required we'll need to put some nodes
1227
+ // in here to act as original content anchors as we move nodes around
1228
+ // host element has been connected to the DOM
1229
+ if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
1230
+ setContentReference(elm);
1231
+ }
1232
+ }
893
1233
  {
894
1234
  // find the first ancestor component (if there is one) and register
895
1235
  // this component as one of the actively loading child components for its ancestor
@@ -923,6 +1263,17 @@ const connectedCallback = (elm) => {
923
1263
  endConnected();
924
1264
  }
925
1265
  };
1266
+ const setContentReference = (elm) => {
1267
+ // only required when we're NOT using native shadow dom (slot)
1268
+ // or this browser doesn't support native shadow dom
1269
+ // and this host element was NOT created with SSR
1270
+ // let's pick out the inner content for slot projection
1271
+ // create a node to represent where the original
1272
+ // content was first placed, which is useful later on
1273
+ const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1274
+ contentRefElm['s-cn'] = true;
1275
+ elm.insertBefore(contentRefElm, elm.firstChild);
1276
+ };
926
1277
  const disconnectedCallback = (elm) => {
927
1278
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
928
1279
  const hostRef = getHostRef(elm);
@@ -0,0 +1,72 @@
1
+ 'use strict';
2
+
3
+ const values = require('./values-e1bf1cf4.js');
4
+
5
+ /** `Object#toString` result references. */
6
+ var mapTag = '[object Map]',
7
+ setTag = '[object Set]';
8
+
9
+ /** Used for built-in method references. */
10
+ var objectProto = Object.prototype;
11
+
12
+ /** Used to check objects for own properties. */
13
+ var hasOwnProperty = objectProto.hasOwnProperty;
14
+
15
+ /**
16
+ * Checks if `value` is an empty object, collection, map, or set.
17
+ *
18
+ * Objects are considered empty if they have no own enumerable string keyed
19
+ * properties.
20
+ *
21
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
22
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
23
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
24
+ *
25
+ * @static
26
+ * @memberOf _
27
+ * @since 0.1.0
28
+ * @category Lang
29
+ * @param {*} value The value to check.
30
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
31
+ * @example
32
+ *
33
+ * _.isEmpty(null);
34
+ * // => true
35
+ *
36
+ * _.isEmpty(true);
37
+ * // => true
38
+ *
39
+ * _.isEmpty(1);
40
+ * // => true
41
+ *
42
+ * _.isEmpty([1, 2, 3]);
43
+ * // => false
44
+ *
45
+ * _.isEmpty({ 'a': 1 });
46
+ * // => false
47
+ */
48
+ function isEmpty(value) {
49
+ if (value == null) {
50
+ return true;
51
+ }
52
+ if (values.isArrayLike(value) &&
53
+ (values.isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
54
+ values.isBuffer(value) || values.isTypedArray(value) || values.isArguments(value))) {
55
+ return !value.length;
56
+ }
57
+ var tag = values.getTag(value);
58
+ if (tag == mapTag || tag == setTag) {
59
+ return !value.size;
60
+ }
61
+ if (values.isPrototype(value)) {
62
+ return !values.baseKeys(value).length;
63
+ }
64
+ for (var key in value) {
65
+ if (hasOwnProperty.call(value, key)) {
66
+ return false;
67
+ }
68
+ }
69
+ return true;
70
+ }
71
+
72
+ exports.isEmpty = isEmpty;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-23750fdc.js');
5
+ const index = require('./index-b5d10454.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["ls-3d-scene.cjs",[[1,"ls-3d-scene",{"sensor500":[32],"sensor515":[32],"sensor514":[32]}]]],["ls-status.cjs",[[1,"ls-status",{"sensorIds":[1,"sensor-ids"]}]]],["ls-counters.cjs",[[1,"ls-counters"]]],["ls-data.cjs",[[1,"ls-data",{"accessToken":[1,"access-token"],"installationId":[1,"installation-id"]}]]],["ls-history.cjs",[[1,"ls-history"]]],["ls-status-history.cjs",[[1,"ls-status-history"]]],["ls-swimlane.cjs",[[1,"ls-swimlane"]]],["ls-indicator.cjs",[[1,"ls-indicator",{"sensorId":[8,"sensor-id"],"dataLabel":[32],"sensorData":[32]}]]],["ls-status-item.cjs",[[1,"ls-status-item",{"sensorId":[2,"sensor-id"],"dataLabel":[32],"sensorData":[32],"timestamp":[32]}]]]], options);
17
+ return index.bootstrapLazy([["ls-3d-scene.cjs",[[1,"ls-3d-scene",{"sensor500":[32],"sensor515":[32],"sensor514":[32]}]]],["ls-status.cjs",[[1,"ls-status",{"sensorIds":[1,"sensor-ids"]}]]],["ls-counters.cjs",[[1,"ls-counters"]]],["ls-data.cjs",[[1,"ls-data",{"accessToken":[1,"access-token"]}]]],["ls-history.cjs",[[1,"ls-history"]]],["ls-recent-stops.cjs",[[4,"ls-recent-stops",{"chartLoading":[32]}]]],["ls-status-history.cjs",[[1,"ls-status-history"]]],["ls-swimlane.cjs",[[4,"ls-swimlane"]]],["ls-indicator.cjs",[[1,"ls-indicator",{"sensorId":[8,"sensor-id"],"dataLabel":[32],"sensorData":[32]}]]],["ls-status-item.cjs",[[1,"ls-status-item",{"sensorId":[2,"sensor-id"],"dataLabel":[32],"sensorData":[32],"timestamp":[32]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -2,9 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-23750fdc.js');
5
+ const index = require('./index-b5d10454.js');
6
6
  const pubsub = require('./pubsub-5a5af33e.js');
7
- const processEs6 = require('./process-es6-36bf0e9c.js');
7
+ const processEs6 = require('./process-es6-39ef8921.js');
8
+ require('./global-9027a413.js');
8
9
 
9
10
  // threejs.org/license
10
11
  const REVISION = '124';
@@ -50647,20 +50648,6 @@ let Ls3dScene = class {
50647
50648
  // Last passed
50648
50649
  case "514":
50649
50650
  this.sensor514 = sensorData[sensorId];
50650
- break;
50651
- // TODO: Ask about usage of these sensors
50652
- // // 504: Safety strip (floor)
50653
- // case "504":
50654
- // break;
50655
- // // 505: Safety strip (door)
50656
- // case "505":
50657
- // break;
50658
- // // 506: Temperature safety
50659
- // case "506":
50660
- // break;
50661
- // // 513: Generic error
50662
- // case "513":
50663
- // break;
50664
50651
  }
50665
50652
  }
50666
50653
  };