@sankhyalabs/ezui 1.1.89 → 1.1.92

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 (73) hide show
  1. package/dist/cjs/{AssetsUtils-caf95dab.js → AssetsUtils-4909c6de.js} +1 -1
  2. package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-button_11.cjs.entry.js +85 -51
  5. package/dist/cjs/ez-calendar.cjs.entry.js +11 -4
  6. package/dist/cjs/ez-collapsible-box_7.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-form.cjs.entry.js +2 -2
  10. package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
  14. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  15. package/dist/cjs/ezui.cjs.js +2 -2
  16. package/dist/cjs/{index-0bce1636.js → index-88286449.js} +358 -8
  17. package/dist/cjs/loader.cjs.js +2 -2
  18. package/dist/collection/collection-manifest.json +1 -1
  19. package/dist/collection/components/ez-calendar/ez-calendar.css +33 -29
  20. package/dist/collection/components/ez-calendar/ez-calendar.js +9 -2
  21. package/dist/collection/components/ez-form/store/form.slice.js +1 -1
  22. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +7 -5
  23. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +42 -1
  24. package/dist/collection/components/ez-grid/ez-grid.css +7 -2
  25. package/dist/collection/components/ez-grid/ez-grid.js +6 -3
  26. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +1 -1
  27. package/dist/collection/components/ez-list/ez-list.js +2 -1
  28. package/dist/collection/components/ez-tabselector/ez-tabselector.js +40 -46
  29. package/dist/custom-elements/index.js +96 -55
  30. package/dist/esm/{AssetsUtils-9b1d9c38.js → AssetsUtils-9b1329a3.js} +1 -1
  31. package/dist/esm/ez-action-chip.entry.js +1 -1
  32. package/dist/esm/ez-application.entry.js +1 -1
  33. package/dist/esm/ez-button_11.entry.js +85 -51
  34. package/dist/esm/ez-calendar.entry.js +11 -4
  35. package/dist/esm/ez-collapsible-box_7.entry.js +1 -1
  36. package/dist/esm/ez-combo-box.entry.js +1 -1
  37. package/dist/esm/ez-dialog.entry.js +1 -1
  38. package/dist/esm/ez-form.entry.js +2 -2
  39. package/dist/esm/ez-label-chip.entry.js +1 -1
  40. package/dist/esm/ez-popover.entry.js +1 -1
  41. package/dist/esm/ez-popup.entry.js +1 -1
  42. package/dist/esm/ez-time-input.entry.js +2 -2
  43. package/dist/esm/ez-toast.entry.js +1 -1
  44. package/dist/esm/ezui.js +2 -2
  45. package/dist/esm/{index-d80a8d1f.js → index-6b8bfbeb.js} +358 -8
  46. package/dist/esm/loader.js +2 -2
  47. package/dist/ezui/ezui.esm.js +1 -1
  48. package/dist/ezui/{p-4e08b842.entry.js → p-0094463f.entry.js} +1 -1
  49. package/dist/ezui/{p-091b27f2.entry.js → p-020f1285.entry.js} +1 -1
  50. package/dist/ezui/{p-27a35580.entry.js → p-038fd0cb.entry.js} +1 -1
  51. package/dist/ezui/{p-f87c7082.js → p-477bb703.js} +1 -1
  52. package/dist/ezui/{p-a52b3368.entry.js → p-502d7e0d.entry.js} +1 -1
  53. package/dist/ezui/{p-19d8a928.entry.js → p-542d3d29.entry.js} +1 -1
  54. package/dist/ezui/{p-826b6c4d.entry.js → p-552a0b2e.entry.js} +1 -1
  55. package/dist/ezui/{p-3e79877f.entry.js → p-60469339.entry.js} +1 -1
  56. package/dist/ezui/{p-eefc1f9d.entry.js → p-7e0281cd.entry.js} +1 -1
  57. package/dist/ezui/p-89a57641.js +1 -0
  58. package/dist/ezui/p-95fc543c.entry.js +1 -0
  59. package/dist/ezui/{p-b678dc80.entry.js → p-b217f40b.entry.js} +1 -1
  60. package/dist/ezui/{p-6206515e.entry.js → p-b8678ee6.entry.js} +1 -1
  61. package/dist/ezui/p-d22db59d.entry.js +1 -0
  62. package/dist/ezui/{p-93bb1854.entry.js → p-d4386e30.entry.js} +24 -24
  63. package/dist/types/components/ez-calendar/ez-calendar.d.ts +1 -0
  64. package/dist/types/components/ez-form/store/form.slice.d.ts +2 -1
  65. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +8 -0
  66. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
  67. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +13 -6
  68. package/dist/types/components.d.ts +5 -4
  69. package/package.json +2 -2
  70. package/dist/collection/utils/FloatingManager.js +0 -16
  71. package/dist/ezui/p-39218c31.entry.js +0 -1
  72. package/dist/ezui/p-535771b6.entry.js +0 -1
  73. package/dist/ezui/p-7c101b34.js +0 -1
@@ -23,7 +23,11 @@ function _interopNamespace(e) {
23
23
  const NAMESPACE = 'ezui';
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 queuePending = false;
29
33
  const win = typeof window !== 'undefined' ? window : {};
@@ -164,6 +168,7 @@ const isComplexType = (o) => {
164
168
  const h = (nodeName, vnodeData, ...children) => {
165
169
  let child = null;
166
170
  let key = null;
171
+ let slotName = null;
167
172
  let simple = false;
168
173
  let lastSimple = false;
169
174
  let vNodeChildren = [];
@@ -195,6 +200,9 @@ const h = (nodeName, vnodeData, ...children) => {
195
200
  if (vnodeData.key) {
196
201
  key = vnodeData.key;
197
202
  }
203
+ if (vnodeData.name) {
204
+ slotName = vnodeData.name;
205
+ }
198
206
  {
199
207
  const classData = vnodeData.className || vnodeData.class;
200
208
  if (classData) {
@@ -219,6 +227,9 @@ const h = (nodeName, vnodeData, ...children) => {
219
227
  {
220
228
  vnode.$key$ = key;
221
229
  }
230
+ {
231
+ vnode.$name$ = slotName;
232
+ }
222
233
  return vnode;
223
234
  };
224
235
  const newVNode = (tag, text) => {
@@ -235,6 +246,9 @@ const newVNode = (tag, text) => {
235
246
  {
236
247
  vnode.$key$ = null;
237
248
  }
249
+ {
250
+ vnode.$name$ = null;
251
+ }
238
252
  return vnode;
239
253
  };
240
254
  const Host = {};
@@ -447,16 +461,39 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
447
461
  let i = 0;
448
462
  let elm;
449
463
  let childNode;
464
+ let oldVNode;
465
+ if (!useNativeShadowDom) {
466
+ // remember for later we need to check to relocate nodes
467
+ checkSlotRelocate = true;
468
+ if (newVNode.$tag$ === 'slot') {
469
+ if (scopeId) {
470
+ // scoped css needs to add its scoped id to the parent element
471
+ parentElm.classList.add(scopeId + '-s');
472
+ }
473
+ newVNode.$flags$ |= newVNode.$children$
474
+ ? // slot element has fallback content
475
+ 2 /* isSlotFallback */
476
+ : // slot element does not have fallback content
477
+ 1 /* isSlotReference */;
478
+ }
479
+ }
450
480
  if (newVNode.$text$ !== null) {
451
481
  // create text node
452
482
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
453
483
  }
484
+ else if (newVNode.$flags$ & 1 /* isSlotReference */) {
485
+ // create a slot reference node
486
+ elm = newVNode.$elm$ =
487
+ doc.createTextNode('');
488
+ }
454
489
  else {
455
490
  if (!isSvgMode) {
456
491
  isSvgMode = newVNode.$tag$ === 'svg';
457
492
  }
458
493
  // create element
459
- elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
494
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
495
+ ? 'slot-fb'
496
+ : newVNode.$tag$)
460
497
  );
461
498
  if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
462
499
  isSvgMode = false;
@@ -473,7 +510,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
473
510
  if (newVNode.$children$) {
474
511
  for (i = 0; i < newVNode.$children$.length; ++i) {
475
512
  // create the node
476
- childNode = createElm(oldParentVNode, newVNode, i);
513
+ childNode = createElm(oldParentVNode, newVNode, i, elm);
477
514
  // return node could have been null
478
515
  if (childNode) {
479
516
  // append our new node
@@ -492,20 +529,62 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
492
529
  }
493
530
  }
494
531
  }
532
+ {
533
+ elm['s-hn'] = hostTagName;
534
+ if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
535
+ // remember the content reference comment
536
+ elm['s-sr'] = true;
537
+ // remember the content reference comment
538
+ elm['s-cr'] = contentRef;
539
+ // remember the slot name, or empty string for default slot
540
+ elm['s-sn'] = newVNode.$name$ || '';
541
+ // check if we've got an old vnode for this slot
542
+ oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
543
+ if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
544
+ // we've got an old slot vnode and the wrapper is being replaced
545
+ // so let's move the old slot content back to it's original location
546
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
547
+ }
548
+ }
549
+ }
495
550
  return elm;
496
551
  };
552
+ const putBackInOriginalLocation = (parentElm, recursive) => {
553
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
554
+ const oldSlotChildNodes = parentElm.childNodes;
555
+ for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
556
+ const childNode = oldSlotChildNodes[i];
557
+ if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
558
+ // // this child node in the old element is from another component
559
+ // // remove this node from the old slot's parent
560
+ // childNode.remove();
561
+ // and relocate it back to it's original location
562
+ parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
563
+ // remove the old original location comment entirely
564
+ // later on the patch function will know what to do
565
+ // and move this to the correct spot in need be
566
+ childNode['s-ol'].remove();
567
+ childNode['s-ol'] = undefined;
568
+ checkSlotRelocate = true;
569
+ }
570
+ if (recursive) {
571
+ putBackInOriginalLocation(childNode, recursive);
572
+ }
573
+ }
574
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
575
+ };
497
576
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
498
- let containerElm = (parentElm);
577
+ let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
499
578
  let childNode;
500
579
  if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
501
580
  containerElm = containerElm.shadowRoot;
502
581
  }
503
582
  for (; startIdx <= endIdx; ++startIdx) {
504
583
  if (vnodes[startIdx]) {
505
- childNode = createElm(null, parentVNode, startIdx);
584
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
506
585
  if (childNode) {
507
586
  vnodes[startIdx].$elm$ = childNode;
508
- containerElm.insertBefore(childNode, before);
587
+ containerElm.insertBefore(childNode, referenceNode(before) );
509
588
  }
510
589
  }
511
590
  }
@@ -515,6 +594,20 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
515
594
  if ((vnode = vnodes[startIdx])) {
516
595
  elm = vnode.$elm$;
517
596
  callNodeRefs(vnode);
597
+ {
598
+ // we're removing this element
599
+ // so it's possible we need to show slot fallback content now
600
+ checkSlotFallbackVisibility = true;
601
+ if (elm['s-ol']) {
602
+ // remove the original location comment
603
+ elm['s-ol'].remove();
604
+ }
605
+ else {
606
+ // it's possible that child nodes of the node
607
+ // that's being removed are slot nodes
608
+ putBackInOriginalLocation(elm, true);
609
+ }
610
+ }
518
611
  // remove the vnode's element from the dom
519
612
  elm.remove();
520
613
  }
@@ -558,12 +651,20 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
558
651
  newEndVnode = newCh[--newEndIdx];
559
652
  }
560
653
  else if (isSameVnode(oldStartVnode, newEndVnode)) {
654
+ // Vnode moved right
655
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
656
+ putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
657
+ }
561
658
  patch(oldStartVnode, newEndVnode);
562
659
  parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
563
660
  oldStartVnode = oldCh[++oldStartIdx];
564
661
  newEndVnode = newCh[--newEndIdx];
565
662
  }
566
663
  else if (isSameVnode(oldEndVnode, newStartVnode)) {
664
+ // Vnode moved left
665
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
666
+ putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
667
+ }
567
668
  patch(oldEndVnode, newStartVnode);
568
669
  parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
569
670
  oldEndVnode = oldCh[--oldEndIdx];
@@ -583,7 +684,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
583
684
  if (idxInOld >= 0) {
584
685
  elmToMove = oldCh[idxInOld];
585
686
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
586
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
687
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
587
688
  }
588
689
  else {
589
690
  patch(elmToMove, newStartVnode);
@@ -594,12 +695,12 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
594
695
  }
595
696
  else {
596
697
  // new element
597
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
698
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
598
699
  newStartVnode = newCh[++newStartIdx];
599
700
  }
600
701
  if (node) {
601
702
  {
602
- oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
703
+ parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
603
704
  }
604
705
  }
605
706
  }
@@ -615,18 +716,30 @@ const isSameVnode = (vnode1, vnode2) => {
615
716
  // compare if two vnode to see if they're "technically" the same
616
717
  // need to have the same element tag, and same key to be the same
617
718
  if (vnode1.$tag$ === vnode2.$tag$) {
719
+ if (vnode1.$tag$ === 'slot') {
720
+ return vnode1.$name$ === vnode2.$name$;
721
+ }
618
722
  {
619
723
  return vnode1.$key$ === vnode2.$key$;
620
724
  }
621
725
  }
622
726
  return false;
623
727
  };
728
+ const referenceNode = (node) => {
729
+ // this node was relocated to a new location in the dom
730
+ // because of some other component's slot
731
+ // but we still have an html comment in place of where
732
+ // it's original location was according to it's original vdom
733
+ return (node && node['s-ol']) || node;
734
+ };
735
+ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
624
736
  const patch = (oldVNode, newVNode) => {
625
737
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
626
738
  const oldChildren = oldVNode.$children$;
627
739
  const newChildren = newVNode.$children$;
628
740
  const tag = newVNode.$tag$;
629
741
  const text = newVNode.$text$;
742
+ let defaultHolder;
630
743
  if (text === null) {
631
744
  {
632
745
  // test if we're rendering an svg element, or still rendering nodes inside of one
@@ -665,12 +778,147 @@ const patch = (oldVNode, newVNode) => {
665
778
  isSvgMode = false;
666
779
  }
667
780
  }
781
+ else if ((defaultHolder = elm['s-cr'])) {
782
+ // this element has slotted content
783
+ defaultHolder.parentNode.textContent = text;
784
+ }
668
785
  else if (oldVNode.$text$ !== text) {
669
786
  // update the text content for the text only vnode
670
787
  // and also only if the text is different than before
671
788
  elm.data = text;
672
789
  }
673
790
  };
791
+ const updateFallbackSlotVisibility = (elm) => {
792
+ // tslint:disable-next-line: prefer-const
793
+ let childNodes = elm.childNodes;
794
+ let childNode;
795
+ let i;
796
+ let ilen;
797
+ let j;
798
+ let slotNameAttr;
799
+ let nodeType;
800
+ for (i = 0, ilen = childNodes.length; i < ilen; i++) {
801
+ childNode = childNodes[i];
802
+ if (childNode.nodeType === 1 /* ElementNode */) {
803
+ if (childNode['s-sr']) {
804
+ // this is a slot fallback node
805
+ // get the slot name for this slot reference node
806
+ slotNameAttr = childNode['s-sn'];
807
+ // by default always show a fallback slot node
808
+ // then hide it if there are other slots in the light dom
809
+ childNode.hidden = false;
810
+ for (j = 0; j < ilen; j++) {
811
+ nodeType = childNodes[j].nodeType;
812
+ if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
813
+ // this sibling node is from a different component OR is a named fallback slot node
814
+ if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
815
+ childNode.hidden = true;
816
+ break;
817
+ }
818
+ }
819
+ else {
820
+ // this is a default fallback slot node
821
+ // any element or text node (with content)
822
+ // should hide the default fallback slot node
823
+ if (nodeType === 1 /* ElementNode */ ||
824
+ (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
825
+ childNode.hidden = true;
826
+ break;
827
+ }
828
+ }
829
+ }
830
+ }
831
+ // keep drilling down
832
+ updateFallbackSlotVisibility(childNode);
833
+ }
834
+ }
835
+ };
836
+ const relocateNodes = [];
837
+ const relocateSlotContent = (elm) => {
838
+ // tslint:disable-next-line: prefer-const
839
+ let childNode;
840
+ let node;
841
+ let hostContentNodes;
842
+ let slotNameAttr;
843
+ let relocateNodeData;
844
+ let j;
845
+ let i = 0;
846
+ let childNodes = elm.childNodes;
847
+ let ilen = childNodes.length;
848
+ for (; i < ilen; i++) {
849
+ childNode = childNodes[i];
850
+ if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
851
+ // first got the content reference comment node
852
+ // then we got it's parent, which is where all the host content is in now
853
+ hostContentNodes = node.parentNode.childNodes;
854
+ slotNameAttr = childNode['s-sn'];
855
+ for (j = hostContentNodes.length - 1; j >= 0; j--) {
856
+ node = hostContentNodes[j];
857
+ if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
858
+ // let's do some relocating to its new home
859
+ // but never relocate a content reference node
860
+ // that is suppose to always represent the original content location
861
+ if (isNodeLocatedInSlot(node, slotNameAttr)) {
862
+ // it's possible we've already decided to relocate this node
863
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
864
+ // made some changes to slots
865
+ // let's make sure we also double check
866
+ // fallbacks are correctly hidden or shown
867
+ checkSlotFallbackVisibility = true;
868
+ node['s-sn'] = node['s-sn'] || slotNameAttr;
869
+ if (relocateNodeData) {
870
+ // previously we never found a slot home for this node
871
+ // but turns out we did, so let's remember it now
872
+ relocateNodeData.$slotRefNode$ = childNode;
873
+ }
874
+ else {
875
+ // add to our list of nodes to relocate
876
+ relocateNodes.push({
877
+ $slotRefNode$: childNode,
878
+ $nodeToRelocate$: node,
879
+ });
880
+ }
881
+ if (node['s-sr']) {
882
+ relocateNodes.map((relocateNode) => {
883
+ if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
884
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
885
+ if (relocateNodeData && !relocateNode.$slotRefNode$) {
886
+ relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
887
+ }
888
+ }
889
+ });
890
+ }
891
+ }
892
+ else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
893
+ // so far this element does not have a slot home, not setting slotRefNode on purpose
894
+ // if we never find a home for this element then we'll need to hide it
895
+ relocateNodes.push({
896
+ $nodeToRelocate$: node,
897
+ });
898
+ }
899
+ }
900
+ }
901
+ }
902
+ if (childNode.nodeType === 1 /* ElementNode */) {
903
+ relocateSlotContent(childNode);
904
+ }
905
+ }
906
+ };
907
+ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
908
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
909
+ if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
910
+ return true;
911
+ }
912
+ if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
913
+ return true;
914
+ }
915
+ return false;
916
+ }
917
+ if (nodeToRelocate['s-sn'] === slotNameAttr) {
918
+ return true;
919
+ }
920
+ return slotNameAttr === '';
921
+ };
674
922
  const callNodeRefs = (vNode) => {
675
923
  {
676
924
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -694,8 +942,90 @@ const renderVdom = (hostRef, renderFnResults) => {
694
942
  {
695
943
  scopeId = hostElm['s-sc'];
696
944
  }
945
+ {
946
+ contentRef = hostElm['s-cr'];
947
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
948
+ // always reset
949
+ checkSlotFallbackVisibility = false;
950
+ }
697
951
  // synchronous patch
698
952
  patch(oldVNode, rootVnode);
953
+ {
954
+ // while we're moving nodes around existing nodes, temporarily disable
955
+ // the disconnectCallback from working
956
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
957
+ if (checkSlotRelocate) {
958
+ relocateSlotContent(rootVnode.$elm$);
959
+ let relocateData;
960
+ let nodeToRelocate;
961
+ let orgLocationNode;
962
+ let parentNodeRef;
963
+ let insertBeforeNode;
964
+ let refNode;
965
+ let i = 0;
966
+ for (; i < relocateNodes.length; i++) {
967
+ relocateData = relocateNodes[i];
968
+ nodeToRelocate = relocateData.$nodeToRelocate$;
969
+ if (!nodeToRelocate['s-ol']) {
970
+ // add a reference node marking this node's original location
971
+ // keep a reference to this node for later lookups
972
+ orgLocationNode =
973
+ doc.createTextNode('');
974
+ orgLocationNode['s-nr'] = nodeToRelocate;
975
+ nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
976
+ }
977
+ }
978
+ for (i = 0; i < relocateNodes.length; i++) {
979
+ relocateData = relocateNodes[i];
980
+ nodeToRelocate = relocateData.$nodeToRelocate$;
981
+ if (relocateData.$slotRefNode$) {
982
+ // by default we're just going to insert it directly
983
+ // after the slot reference node
984
+ parentNodeRef = relocateData.$slotRefNode$.parentNode;
985
+ insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
986
+ orgLocationNode = nodeToRelocate['s-ol'];
987
+ while ((orgLocationNode = orgLocationNode.previousSibling)) {
988
+ refNode = orgLocationNode['s-nr'];
989
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
990
+ refNode = refNode.nextSibling;
991
+ if (!refNode || !refNode['s-nr']) {
992
+ insertBeforeNode = refNode;
993
+ break;
994
+ }
995
+ }
996
+ }
997
+ if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
998
+ nodeToRelocate.nextSibling !== insertBeforeNode) {
999
+ // we've checked that it's worth while to relocate
1000
+ // since that the node to relocate
1001
+ // has a different next sibling or parent relocated
1002
+ if (nodeToRelocate !== insertBeforeNode) {
1003
+ if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1004
+ // probably a component in the index.html that doesn't have it's hostname set
1005
+ nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1006
+ }
1007
+ // add it back to the dom but in its new home
1008
+ parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1009
+ }
1010
+ }
1011
+ }
1012
+ else {
1013
+ // this node doesn't have a slot home to go to, so let's hide it
1014
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1015
+ nodeToRelocate.hidden = true;
1016
+ }
1017
+ }
1018
+ }
1019
+ }
1020
+ if (checkSlotFallbackVisibility) {
1021
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1022
+ }
1023
+ // done moving nodes around
1024
+ // allow the disconnect callback to work again
1025
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1026
+ // always reset
1027
+ relocateNodes.length = 0;
1028
+ }
699
1029
  };
700
1030
  const getElement = (ref) => (getHostRef(ref).$hostElement$ );
701
1031
  const createEvent = (ref, name, flags) => {
@@ -1157,6 +1487,15 @@ const connectedCallback = (elm) => {
1157
1487
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1158
1488
  // first time this component has connected
1159
1489
  hostRef.$flags$ |= 1 /* hasConnected */;
1490
+ {
1491
+ // initUpdate
1492
+ // if the slot polyfill is required we'll need to put some nodes
1493
+ // in here to act as original content anchors as we move nodes around
1494
+ // host element has been connected to the DOM
1495
+ if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
1496
+ setContentReference(elm);
1497
+ }
1498
+ }
1160
1499
  {
1161
1500
  // find the first ancestor component (if there is one) and register
1162
1501
  // this component as one of the actively loading child components for its ancestor
@@ -1190,6 +1529,17 @@ const connectedCallback = (elm) => {
1190
1529
  endConnected();
1191
1530
  }
1192
1531
  };
1532
+ const setContentReference = (elm) => {
1533
+ // only required when we're NOT using native shadow dom (slot)
1534
+ // or this browser doesn't support native shadow dom
1535
+ // and this host element was NOT created with SSR
1536
+ // let's pick out the inner content for slot projection
1537
+ // create a node to represent where the original
1538
+ // content was first placed, which is useful later on
1539
+ const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1540
+ contentRefElm['s-cn'] = true;
1541
+ elm.insertBefore(contentRefElm, elm.firstChild);
1542
+ };
1193
1543
  const disconnectedCallback = (elm) => {
1194
1544
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1195
1545
  getHostRef(elm);
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0bce1636.js');
5
+ const index = require('./index-88286449.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.13.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([["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-button_11.cjs",[[0,"test-du"],[2,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}],[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}],[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}],[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}],[1,"select-box",{"selectedOption":[1,"selected-option"]}],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-tabselector",{"selectedIndex":[1537,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"_preSelection":[32],"_visibleOptions":[32]}]]],["ez-collapsible-box_7.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}],[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"]}],[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64]}]]]], options);
17
+ return index.bootstrapLazy([["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-button_11.cjs",[[0,"test-du"],[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}],[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}],[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}],[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}],[1,"select-box",{"selectedOption":[1,"selected-option"]}],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"_preSelection":[32],"_visibleOptions":[32]}]]],["ez-collapsible-box_7.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}],[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"]}],[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "entries": [
3
3
  "./components/ez-combo-box/ez-combo-box.js",
4
+ "./components/ez-tabselector/ez-tabselector.js",
4
5
  "./components/ez-form/ez-form.js",
5
6
  "./components/ez-list/ez-list.js",
6
7
  "./components/ez-upload/ez-upload.js",
@@ -23,7 +24,6 @@
23
24
  "./components/ez-popover/ez-popover.js",
24
25
  "./components/ez-popup/ez-popup.js",
25
26
  "./components/ez-search/ez-search.js",
26
- "./components/ez-tabselector/ez-tabselector.js",
27
27
  "./components/ez-text-area/ez-text-area.js",
28
28
  "./components/ez-text-input/ez-text-input.js",
29
29
  "./components/ez-time-input/ez-time-input.js",