@limetech/lime-crm-building-blocks 1.45.2 → 1.45.3

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 (81) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/{factory-99d50c47.js → factory-310afac1.js} +1 -1
  3. package/dist/cjs/{index-3d798cc6.js → index-dd1aef9e.js} +18 -385
  4. package/dist/cjs/lime-crm-building-blocks.cjs.js +2 -2
  5. package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-component-config.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-component-picker.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-empty-state_2.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-info-tile.cjs.entry.js +2 -2
  16. package/dist/cjs/limebb-kanban-column.cjs.entry.js +1 -1
  17. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-kanban.cjs.entry.js +1 -1
  19. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +2 -2
  20. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  21. package/dist/cjs/limebb-mention.cjs.entry.js +54 -39
  22. package/dist/cjs/limebb-navigation-button.cjs.entry.js +1 -1
  23. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  24. package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
  25. package/dist/cjs/loader.cjs.js +2 -2
  26. package/dist/collection/components/mention/mention.js +34 -69
  27. package/dist/collection/util/dom.js +24 -0
  28. package/dist/components/limebb-mention.js +57 -44
  29. package/dist/esm/{factory-d86de406.js → factory-babd3a98.js} +1 -1
  30. package/dist/esm/{index-3d509f04.js → index-a0338355.js} +18 -385
  31. package/dist/esm/lime-crm-building-blocks.js +2 -2
  32. package/dist/esm/limebb-browser.entry.js +1 -1
  33. package/dist/esm/limebb-component-config.entry.js +1 -1
  34. package/dist/esm/limebb-component-picker.entry.js +1 -1
  35. package/dist/esm/limebb-currency-picker.entry.js +1 -1
  36. package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
  37. package/dist/esm/limebb-date-picker.entry.js +1 -1
  38. package/dist/esm/limebb-date-range.entry.js +1 -1
  39. package/dist/esm/limebb-empty-state_2.entry.js +1 -1
  40. package/dist/esm/limebb-feed.entry.js +1 -1
  41. package/dist/esm/limebb-icon-picker.entry.js +1 -1
  42. package/dist/esm/limebb-info-tile.entry.js +2 -2
  43. package/dist/esm/limebb-kanban-column.entry.js +1 -1
  44. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  45. package/dist/esm/limebb-kanban.entry.js +1 -1
  46. package/dist/esm/limebb-limeobject-file-viewer.entry.js +2 -2
  47. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  48. package/dist/esm/limebb-mention.entry.js +54 -39
  49. package/dist/esm/limebb-navigation-button.entry.js +1 -1
  50. package/dist/esm/limebb-notification-item.entry.js +1 -1
  51. package/dist/esm/limebb-notification-list.entry.js +1 -1
  52. package/dist/esm/loader.js +2 -2
  53. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  54. package/dist/lime-crm-building-blocks/{p-e0359f0b.entry.js → p-06d2c469.entry.js} +1 -1
  55. package/dist/lime-crm-building-blocks/{p-20232ff1.entry.js → p-2e549d89.entry.js} +1 -1
  56. package/dist/lime-crm-building-blocks/{p-5fe78c5c.entry.js → p-32ab34e5.entry.js} +1 -1
  57. package/dist/lime-crm-building-blocks/{p-355b4bb3.entry.js → p-36704fd1.entry.js} +1 -1
  58. package/dist/lime-crm-building-blocks/{p-d81ac5fd.entry.js → p-65510660.entry.js} +1 -1
  59. package/dist/lime-crm-building-blocks/{p-060c1d81.entry.js → p-726d23b3.entry.js} +1 -1
  60. package/dist/lime-crm-building-blocks/{p-37535b64.entry.js → p-74dfea73.entry.js} +1 -1
  61. package/dist/lime-crm-building-blocks/{p-5a03e3f7.entry.js → p-7950735e.entry.js} +1 -1
  62. package/dist/lime-crm-building-blocks/{p-14bfc240.entry.js → p-88892691.entry.js} +1 -1
  63. package/dist/lime-crm-building-blocks/{p-8dd5ebe0.entry.js → p-8aafd8fb.entry.js} +1 -1
  64. package/dist/lime-crm-building-blocks/{p-63498a8e.js → p-8b377b1f.js} +1 -1
  65. package/dist/lime-crm-building-blocks/p-8e85017b.js +2 -0
  66. package/dist/lime-crm-building-blocks/{p-8afda34a.entry.js → p-934ab854.entry.js} +1 -1
  67. package/dist/lime-crm-building-blocks/{p-6550eb72.entry.js → p-a10cfc3c.entry.js} +1 -1
  68. package/dist/lime-crm-building-blocks/{p-c2782ed2.entry.js → p-a7397b07.entry.js} +1 -1
  69. package/dist/lime-crm-building-blocks/{p-5e9724a0.entry.js → p-bb373382.entry.js} +1 -1
  70. package/dist/lime-crm-building-blocks/{p-fbca34be.entry.js → p-c5120d17.entry.js} +1 -1
  71. package/dist/lime-crm-building-blocks/{p-8d8ba884.entry.js → p-d18fed0b.entry.js} +1 -1
  72. package/dist/lime-crm-building-blocks/{p-2e254ddc.entry.js → p-da4550d5.entry.js} +1 -1
  73. package/dist/lime-crm-building-blocks/p-fc818e0a.entry.js +1 -0
  74. package/dist/lime-crm-building-blocks/{p-e057e65c.entry.js → p-fd642a22.entry.js} +1 -1
  75. package/dist/lime-crm-building-blocks/{p-a77405bc.entry.js → p-ff514778.entry.js} +1 -1
  76. package/dist/types/components/mention/mention.d.ts +8 -18
  77. package/dist/types/components.d.ts +4 -12
  78. package/dist/types/util/dom.d.ts +9 -0
  79. package/package.json +4 -4
  80. package/dist/lime-crm-building-blocks/p-f6d90ef8.entry.js +0 -1
  81. package/dist/lime-crm-building-blocks/p-fe679fee.js +0 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.45.3](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.45.2...v1.45.3) (2024-10-24)
2
+
3
+ ### Bug Fixes
4
+
5
+
6
+ * **mention:** make it less buggy ([51f1e8b](https://github.com/Lundalogik/lime-crm-building-blocks/commit/51f1e8b72d9cc7d4f01520c11adadf85fbc476b5))
7
+
1
8
  ## [1.45.2](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.45.1...v1.45.2) (2024-10-18)
2
9
 
3
10
  ### Bug Fixes
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-3d798cc6.js');
3
+ const index = require('./index-dd1aef9e.js');
4
4
 
5
5
  function isFunction(value) {
6
6
  return typeof value === 'function';
@@ -31,11 +31,7 @@ const NAMESPACE = 'lime-crm-building-blocks';
31
31
  * Modified for Stencil's renderer and slot projection
32
32
  */
33
33
  let scopeId;
34
- let contentRef;
35
34
  let hostTagName;
36
- let useNativeShadowDom = false;
37
- let checkSlotFallbackVisibility = false;
38
- let checkSlotRelocate = false;
39
35
  let isSvgMode = false;
40
36
  let queuePending = false;
41
37
  const createTime = (fnName, tagName = '') => {
@@ -82,7 +78,6 @@ const isComplexType = (o) => {
82
78
  const h = (nodeName, vnodeData, ...children) => {
83
79
  let child = null;
84
80
  let key = null;
85
- let slotName = null;
86
81
  let simple = false;
87
82
  let lastSimple = false;
88
83
  const vNodeChildren = [];
@@ -114,9 +109,6 @@ const h = (nodeName, vnodeData, ...children) => {
114
109
  if (vnodeData.key) {
115
110
  key = vnodeData.key;
116
111
  }
117
- if (vnodeData.name) {
118
- slotName = vnodeData.name;
119
- }
120
112
  {
121
113
  const classData = vnodeData.className || vnodeData.class;
122
114
  if (classData) {
@@ -141,9 +133,6 @@ const h = (nodeName, vnodeData, ...children) => {
141
133
  {
142
134
  vnode.$key$ = key;
143
135
  }
144
- {
145
- vnode.$name$ = slotName;
146
- }
147
136
  return vnode;
148
137
  };
149
138
  const newVNode = (tag, text) => {
@@ -160,9 +149,6 @@ const newVNode = (tag, text) => {
160
149
  {
161
150
  vnode.$key$ = null;
162
151
  }
163
- {
164
- vnode.$name$ = null;
165
- }
166
152
  return vnode;
167
153
  };
168
154
  const Host = {};
@@ -528,36 +514,13 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
528
514
  let i = 0;
529
515
  let elm;
530
516
  let childNode;
531
- let oldVNode;
532
- if (!useNativeShadowDom) {
533
- // remember for later we need to check to relocate nodes
534
- checkSlotRelocate = true;
535
- if (newVNode.$tag$ === 'slot') {
536
- if (scopeId) {
537
- // scoped css needs to add its scoped id to the parent element
538
- parentElm.classList.add(scopeId + '-s');
539
- }
540
- newVNode.$flags$ |= newVNode.$children$
541
- ? // slot element has fallback content
542
- 2 /* VNODE_FLAGS.isSlotFallback */
543
- : // slot element does not have fallback content
544
- 1 /* VNODE_FLAGS.isSlotReference */;
545
- }
546
- }
547
517
  if (newVNode.$text$ !== null) {
548
518
  // create text node
549
519
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
550
520
  }
551
- else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
552
- // create a slot reference node
553
- elm = newVNode.$elm$ =
554
- doc.createTextNode('');
555
- }
556
521
  else {
557
522
  // create element
558
- elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
559
- ? 'slot-fb'
560
- : newVNode.$tag$));
523
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
561
524
  // add css classes, attrs, props, listeners, etc.
562
525
  {
563
526
  updateElement(null, newVNode, isSvgMode);
@@ -570,7 +533,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
570
533
  if (newVNode.$children$) {
571
534
  for (i = 0; i < newVNode.$children$.length; ++i) {
572
535
  // create the node
573
- childNode = createElm(oldParentVNode, newVNode, i, elm);
536
+ childNode = createElm(oldParentVNode, newVNode, i);
574
537
  // return node could have been null
575
538
  if (childNode) {
576
539
  // append our new node
@@ -579,62 +542,20 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
579
542
  }
580
543
  }
581
544
  }
582
- {
583
- elm['s-hn'] = hostTagName;
584
- if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
585
- // remember the content reference comment
586
- elm['s-sr'] = true;
587
- // remember the content reference comment
588
- elm['s-cr'] = contentRef;
589
- // remember the slot name, or empty string for default slot
590
- elm['s-sn'] = newVNode.$name$ || '';
591
- // check if we've got an old vnode for this slot
592
- oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
593
- if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
594
- // we've got an old slot vnode and the wrapper is being replaced
595
- // so let's move the old slot content back to it's original location
596
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
597
- }
598
- }
599
- }
600
545
  return elm;
601
546
  };
602
- const putBackInOriginalLocation = (parentElm, recursive) => {
603
- plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
604
- const oldSlotChildNodes = parentElm.childNodes;
605
- for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
606
- const childNode = oldSlotChildNodes[i];
607
- if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
608
- // // this child node in the old element is from another component
609
- // // remove this node from the old slot's parent
610
- // childNode.remove();
611
- // and relocate it back to it's original location
612
- parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
613
- // remove the old original location comment entirely
614
- // later on the patch function will know what to do
615
- // and move this to the correct spot in need be
616
- childNode['s-ol'].remove();
617
- childNode['s-ol'] = undefined;
618
- checkSlotRelocate = true;
619
- }
620
- if (recursive) {
621
- putBackInOriginalLocation(childNode, recursive);
622
- }
623
- }
624
- plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
625
- };
626
547
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
627
- let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
548
+ let containerElm = (parentElm);
628
549
  let childNode;
629
550
  if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
630
551
  containerElm = containerElm.shadowRoot;
631
552
  }
632
553
  for (; startIdx <= endIdx; ++startIdx) {
633
554
  if (vnodes[startIdx]) {
634
- childNode = createElm(null, parentVNode, startIdx, parentElm);
555
+ childNode = createElm(null, parentVNode, startIdx);
635
556
  if (childNode) {
636
557
  vnodes[startIdx].$elm$ = childNode;
637
- containerElm.insertBefore(childNode, referenceNode(before) );
558
+ containerElm.insertBefore(childNode, before);
638
559
  }
639
560
  }
640
561
  }
@@ -644,20 +565,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
644
565
  if ((vnode = vnodes[startIdx])) {
645
566
  elm = vnode.$elm$;
646
567
  callNodeRefs(vnode);
647
- {
648
- // we're removing this element
649
- // so it's possible we need to show slot fallback content now
650
- checkSlotFallbackVisibility = true;
651
- if (elm['s-ol']) {
652
- // remove the original location comment
653
- elm['s-ol'].remove();
654
- }
655
- else {
656
- // it's possible that child nodes of the node
657
- // that's being removed are slot nodes
658
- putBackInOriginalLocation(elm, true);
659
- }
660
- }
661
568
  // remove the vnode's element from the dom
662
569
  elm.remove();
663
570
  }
@@ -776,23 +683,6 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
776
683
  newEndVnode = newCh[--newEndIdx];
777
684
  }
778
685
  else if (isSameVnode(oldStartVnode, newEndVnode)) {
779
- // case: "Vnode moved right"
780
- //
781
- // We've found that the last node in our window on the new children is
782
- // the same VNode as the _first_ node in our window on the old children
783
- // we're dealing with now. Visually, this is the layout of these two
784
- // nodes:
785
- //
786
- // newCh: [..., newStartVnode , ... , newEndVnode , ...]
787
- // ^^^^^^^^^^^
788
- // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
789
- // ^^^^^^^^^^^^^
790
- //
791
- // In this situation we need to patch `newEndVnode` onto `oldStartVnode`
792
- // and move the DOM element for `oldStartVnode`.
793
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
794
- putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
795
- }
796
686
  patch(oldStartVnode, newEndVnode);
797
687
  // We need to move the element for `oldStartVnode` into a position which
798
688
  // will be appropriate for `newEndVnode`. For this we can use
@@ -816,24 +706,6 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
816
706
  newEndVnode = newCh[--newEndIdx];
817
707
  }
818
708
  else if (isSameVnode(oldEndVnode, newStartVnode)) {
819
- // case: "Vnode moved left"
820
- //
821
- // We've found that the first node in our window on the new children is
822
- // the same VNode as the _last_ node in our window on the old children.
823
- // Visually, this is the layout of these two nodes:
824
- //
825
- // newCh: [..., newStartVnode , ... , newEndVnode , ...]
826
- // ^^^^^^^^^^^^^
827
- // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
828
- // ^^^^^^^^^^^
829
- //
830
- // In this situation we need to patch `newStartVnode` onto `oldEndVnode`
831
- // (which will handle updating any changed attributes, reconciling their
832
- // children etc) but we also need to move the DOM node to which
833
- // `oldEndVnode` corresponds.
834
- if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
835
- putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
836
- }
837
709
  patch(oldEndVnode, newStartVnode);
838
710
  // We've already checked above if `oldStartVnode` and `newStartVnode` are
839
711
  // the same node, so since we're here we know that they are not. Thus we
@@ -868,7 +740,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
868
740
  elmToMove = oldCh[idxInOld];
869
741
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
870
742
  // the tag doesn't match so we'll need a new DOM element
871
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
743
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
872
744
  }
873
745
  else {
874
746
  patch(elmToMove, newStartVnode);
@@ -884,13 +756,13 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
884
756
  // the key of the first new child OR the build is not using `key`
885
757
  // attributes at all. In either case we need to create a new element
886
758
  // for the new node.
887
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
759
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
888
760
  newStartVnode = newCh[++newStartIdx];
889
761
  }
890
762
  if (node) {
891
763
  // if we created a new node then handle inserting it to the DOM
892
764
  {
893
- parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
765
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
894
766
  }
895
767
  }
896
768
  }
@@ -927,9 +799,6 @@ const isSameVnode = (leftVNode, rightVNode) => {
927
799
  // compare if two vnode to see if they're "technically" the same
928
800
  // need to have the same element tag, and same key to be the same
929
801
  if (leftVNode.$tag$ === rightVNode.$tag$) {
930
- if (leftVNode.$tag$ === 'slot') {
931
- return leftVNode.$name$ === rightVNode.$name$;
932
- }
933
802
  // this will be set if components in the build have `key` attrs set on them
934
803
  {
935
804
  return leftVNode.$key$ === rightVNode.$key$;
@@ -937,14 +806,6 @@ const isSameVnode = (leftVNode, rightVNode) => {
937
806
  }
938
807
  return false;
939
808
  };
940
- const referenceNode = (node) => {
941
- // this node was relocated to a new location in the dom
942
- // because of some other component's slot
943
- // but we still have an html comment in place of where
944
- // it's original location was according to it's original vdom
945
- return (node && node['s-ol']) || node;
946
- };
947
- const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
948
809
  /**
949
810
  * Handle reconciling an outdated VNode with a new one which corresponds to
950
811
  * it. This function handles flushing updates to the DOM and reconciling the
@@ -959,7 +820,6 @@ const patch = (oldVNode, newVNode) => {
959
820
  const newChildren = newVNode.$children$;
960
821
  const tag = newVNode.$tag$;
961
822
  const text = newVNode.$text$;
962
- let defaultHolder;
963
823
  if (text === null) {
964
824
  {
965
825
  if (tag === 'slot')
@@ -990,147 +850,12 @@ const patch = (oldVNode, newVNode) => {
990
850
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
991
851
  }
992
852
  }
993
- else if ((defaultHolder = elm['s-cr'])) {
994
- // this element has slotted content
995
- defaultHolder.parentNode.textContent = text;
996
- }
997
853
  else if (oldVNode.$text$ !== text) {
998
854
  // update the text content for the text only vnode
999
855
  // and also only if the text is different than before
1000
856
  elm.data = text;
1001
857
  }
1002
858
  };
1003
- const updateFallbackSlotVisibility = (elm) => {
1004
- // tslint:disable-next-line: prefer-const
1005
- const childNodes = elm.childNodes;
1006
- let childNode;
1007
- let i;
1008
- let ilen;
1009
- let j;
1010
- let slotNameAttr;
1011
- let nodeType;
1012
- for (i = 0, ilen = childNodes.length; i < ilen; i++) {
1013
- childNode = childNodes[i];
1014
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1015
- if (childNode['s-sr']) {
1016
- // this is a slot fallback node
1017
- // get the slot name for this slot reference node
1018
- slotNameAttr = childNode['s-sn'];
1019
- // by default always show a fallback slot node
1020
- // then hide it if there are other slots in the light dom
1021
- childNode.hidden = false;
1022
- for (j = 0; j < ilen; j++) {
1023
- nodeType = childNodes[j].nodeType;
1024
- if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
1025
- // this sibling node is from a different component OR is a named fallback slot node
1026
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
1027
- childNode.hidden = true;
1028
- break;
1029
- }
1030
- }
1031
- else {
1032
- // this is a default fallback slot node
1033
- // any element or text node (with content)
1034
- // should hide the default fallback slot node
1035
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1036
- (nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
1037
- childNode.hidden = true;
1038
- break;
1039
- }
1040
- }
1041
- }
1042
- }
1043
- // keep drilling down
1044
- updateFallbackSlotVisibility(childNode);
1045
- }
1046
- }
1047
- };
1048
- const relocateNodes = [];
1049
- const relocateSlotContent = (elm) => {
1050
- // tslint:disable-next-line: prefer-const
1051
- let childNode;
1052
- let node;
1053
- let hostContentNodes;
1054
- let slotNameAttr;
1055
- let relocateNodeData;
1056
- let j;
1057
- let i = 0;
1058
- const childNodes = elm.childNodes;
1059
- const ilen = childNodes.length;
1060
- for (; i < ilen; i++) {
1061
- childNode = childNodes[i];
1062
- if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
1063
- // first got the content reference comment node
1064
- // then we got it's parent, which is where all the host content is in now
1065
- hostContentNodes = node.parentNode.childNodes;
1066
- slotNameAttr = childNode['s-sn'];
1067
- for (j = hostContentNodes.length - 1; j >= 0; j--) {
1068
- node = hostContentNodes[j];
1069
- if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
1070
- // let's do some relocating to its new home
1071
- // but never relocate a content reference node
1072
- // that is suppose to always represent the original content location
1073
- if (isNodeLocatedInSlot(node, slotNameAttr)) {
1074
- // it's possible we've already decided to relocate this node
1075
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1076
- // made some changes to slots
1077
- // let's make sure we also double check
1078
- // fallbacks are correctly hidden or shown
1079
- checkSlotFallbackVisibility = true;
1080
- node['s-sn'] = node['s-sn'] || slotNameAttr;
1081
- if (relocateNodeData) {
1082
- // previously we never found a slot home for this node
1083
- // but turns out we did, so let's remember it now
1084
- relocateNodeData.$slotRefNode$ = childNode;
1085
- }
1086
- else {
1087
- // add to our list of nodes to relocate
1088
- relocateNodes.push({
1089
- $slotRefNode$: childNode,
1090
- $nodeToRelocate$: node,
1091
- });
1092
- }
1093
- if (node['s-sr']) {
1094
- relocateNodes.map((relocateNode) => {
1095
- if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
1096
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1097
- if (relocateNodeData && !relocateNode.$slotRefNode$) {
1098
- relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
1099
- }
1100
- }
1101
- });
1102
- }
1103
- }
1104
- else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1105
- // so far this element does not have a slot home, not setting slotRefNode on purpose
1106
- // if we never find a home for this element then we'll need to hide it
1107
- relocateNodes.push({
1108
- $nodeToRelocate$: node,
1109
- });
1110
- }
1111
- }
1112
- }
1113
- }
1114
- if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1115
- relocateSlotContent(childNode);
1116
- }
1117
- }
1118
- };
1119
- const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1120
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1121
- if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
1122
- return true;
1123
- }
1124
- if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
1125
- return true;
1126
- }
1127
- return false;
1128
- }
1129
- if (nodeToRelocate['s-sn'] === slotNameAttr) {
1130
- return true;
1131
- }
1132
- return slotNameAttr === '';
1133
- };
1134
859
  const callNodeRefs = (vNode) => {
1135
860
  {
1136
861
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -1154,90 +879,8 @@ const renderVdom = (hostRef, renderFnResults) => {
1154
879
  {
1155
880
  scopeId = hostElm['s-sc'];
1156
881
  }
1157
- {
1158
- contentRef = hostElm['s-cr'];
1159
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1160
- // always reset
1161
- checkSlotFallbackVisibility = false;
1162
- }
1163
882
  // synchronous patch
1164
883
  patch(oldVNode, rootVnode);
1165
- {
1166
- // while we're moving nodes around existing nodes, temporarily disable
1167
- // the disconnectCallback from working
1168
- plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1169
- if (checkSlotRelocate) {
1170
- relocateSlotContent(rootVnode.$elm$);
1171
- let relocateData;
1172
- let nodeToRelocate;
1173
- let orgLocationNode;
1174
- let parentNodeRef;
1175
- let insertBeforeNode;
1176
- let refNode;
1177
- let i = 0;
1178
- for (; i < relocateNodes.length; i++) {
1179
- relocateData = relocateNodes[i];
1180
- nodeToRelocate = relocateData.$nodeToRelocate$;
1181
- if (!nodeToRelocate['s-ol']) {
1182
- // add a reference node marking this node's original location
1183
- // keep a reference to this node for later lookups
1184
- orgLocationNode =
1185
- doc.createTextNode('');
1186
- orgLocationNode['s-nr'] = nodeToRelocate;
1187
- nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1188
- }
1189
- }
1190
- for (i = 0; i < relocateNodes.length; i++) {
1191
- relocateData = relocateNodes[i];
1192
- nodeToRelocate = relocateData.$nodeToRelocate$;
1193
- if (relocateData.$slotRefNode$) {
1194
- // by default we're just going to insert it directly
1195
- // after the slot reference node
1196
- parentNodeRef = relocateData.$slotRefNode$.parentNode;
1197
- insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
1198
- orgLocationNode = nodeToRelocate['s-ol'];
1199
- while ((orgLocationNode = orgLocationNode.previousSibling)) {
1200
- refNode = orgLocationNode['s-nr'];
1201
- if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1202
- refNode = refNode.nextSibling;
1203
- if (!refNode || !refNode['s-nr']) {
1204
- insertBeforeNode = refNode;
1205
- break;
1206
- }
1207
- }
1208
- }
1209
- if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
1210
- nodeToRelocate.nextSibling !== insertBeforeNode) {
1211
- // we've checked that it's worth while to relocate
1212
- // since that the node to relocate
1213
- // has a different next sibling or parent relocated
1214
- if (nodeToRelocate !== insertBeforeNode) {
1215
- if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1216
- // probably a component in the index.html that doesn't have it's hostname set
1217
- nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1218
- }
1219
- // add it back to the dom but in its new home
1220
- parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1221
- }
1222
- }
1223
- }
1224
- else {
1225
- // this node doesn't have a slot home to go to, so let's hide it
1226
- if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1227
- nodeToRelocate.hidden = true;
1228
- }
1229
- }
1230
- }
1231
- }
1232
- if (checkSlotFallbackVisibility) {
1233
- updateFallbackSlotVisibility(rootVnode.$elm$);
1234
- }
1235
- // done moving nodes around
1236
- // allow the disconnect callback to work again
1237
- plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1238
- // always reset
1239
- relocateNodes.length = 0;
1240
- }
1241
884
  };
1242
885
  const attachToAncestor = (hostRef, ancestorComponent) => {
1243
886
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
@@ -1600,6 +1243,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1600
1243
  hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1601
1244
  }
1602
1245
  endNewInstance();
1246
+ fireConnectedCallback(hostRef.$lazyInstance$);
1603
1247
  }
1604
1248
  if (Cstr.style) {
1605
1249
  // this component has styles but we haven't registered them yet
@@ -1628,6 +1272,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1628
1272
  schedule();
1629
1273
  }
1630
1274
  };
1275
+ const fireConnectedCallback = (instance) => {
1276
+ {
1277
+ safeCall(instance, 'connectedCallback');
1278
+ }
1279
+ };
1631
1280
  const connectedCallback = (elm) => {
1632
1281
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1633
1282
  const hostRef = getHostRef(elm);
@@ -1636,15 +1285,6 @@ const connectedCallback = (elm) => {
1636
1285
  if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1637
1286
  // first time this component has connected
1638
1287
  hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1639
- {
1640
- // initUpdate
1641
- // if the slot polyfill is required we'll need to put some nodes
1642
- // in here to act as original content anchors as we move nodes around
1643
- // host element has been connected to the DOM
1644
- if ((cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
1645
- setContentReference(elm);
1646
- }
1647
- }
1648
1288
  {
1649
1289
  // find the first ancestor component (if there is one) and register
1650
1290
  // this component as one of the actively loading child components for its ancestor
@@ -1675,20 +1315,13 @@ const connectedCallback = (elm) => {
1675
1315
  initializeComponent(elm, hostRef, cmpMeta);
1676
1316
  }
1677
1317
  }
1318
+ else {
1319
+ // fire off connectedCallback() on component instance
1320
+ fireConnectedCallback(hostRef.$lazyInstance$);
1321
+ }
1678
1322
  endConnected();
1679
1323
  }
1680
1324
  };
1681
- const setContentReference = (elm) => {
1682
- // only required when we're NOT using native shadow dom (slot)
1683
- // or this browser doesn't support native shadow dom
1684
- // and this host element was NOT created with SSR
1685
- // let's pick out the inner content for slot projection
1686
- // create a node to represent where the original
1687
- // content was first placed, which is useful later on
1688
- const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1689
- contentRefElm['s-cn'] = true;
1690
- elm.insertBefore(contentRefElm, elm.firstChild);
1691
- };
1692
1325
  const disconnectedCallback = (elm) => {
1693
1326
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1694
1327
  const hostRef = getHostRef(elm);
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-3d798cc6.js');
3
+ const index = require('./index-dd1aef9e.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["limebb-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"items":[16],"paginationSize":[2,"pagination-size"],"groupBy":[513,"group-by"],"groups":[16]}]]],["limebb-date-range.cjs",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["limebb-notification-list.cjs",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config.cjs",[[1,"limebb-component-config",{"platform":[16],"context":[16],"value":[16],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"formInfo":[16],"type":[1],"nameField":[1,"name-field"],"configComponent":[32],"configViewType":[32]}]]],["limebb-component-picker.cjs",[[1,"limebb-component-picker",{"platform":[16],"context":[16],"type":[1],"tags":[16],"value":[1],"copyLabel":[1,"copy-label"],"hideCopyButton":[4,"hide-copy-button"],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[16]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile.cjs",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[1,"filter-id"],"disabled":[4],"icon":[1],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"filters":[32],"value":[32],"loading":[32],"error":[32]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-locale-picker.cjs",[[1,"limebb-locale-picker",{"platform":[16],"context":[16],"value":[1],"required":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"readonly":[4],"multipleChoice":[4,"multiple-choice"],"allLanguages":[32]}]]],["limebb-mention.cjs",[[4,"limebb-mention",{"platform":[16],"limetype":[1],"objectid":[2],"mentionedObject":[32],"loading":[32],"platformFromDocument":[32]}]]],["limebb-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-kanban-column.cjs",[[1,"limebb-kanban-column",{"platform":[16],"context":[16],"columnHeading":[1,"column-heading"],"items":[16],"loading":[4],"paginationSize":[2,"pagination-size"],"displayedItemCount":[32]}]]],["limebb-date-picker.cjs",[[1,"limebb-date-picker",{"platform":[16],"context":[16],"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[1],"type":[513]}]]],["limebb-notification-item.cjs",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-empty-state_2.cjs",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}],[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]]], options);
18
+ return index.bootstrapLazy([["limebb-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"items":[16],"paginationSize":[2,"pagination-size"],"groupBy":[513,"group-by"],"groups":[16]}]]],["limebb-date-range.cjs",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["limebb-notification-list.cjs",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config.cjs",[[1,"limebb-component-config",{"platform":[16],"context":[16],"value":[16],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"formInfo":[16],"type":[1],"nameField":[1,"name-field"],"configComponent":[32],"configViewType":[32]}]]],["limebb-component-picker.cjs",[[1,"limebb-component-picker",{"platform":[16],"context":[16],"type":[1],"tags":[16],"value":[1],"copyLabel":[1,"copy-label"],"hideCopyButton":[4,"hide-copy-button"],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[16]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile.cjs",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[1,"filter-id"],"disabled":[4],"icon":[1],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"filters":[32],"value":[32],"loading":[32],"error":[32]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-locale-picker.cjs",[[1,"limebb-locale-picker",{"platform":[16],"context":[16],"value":[1],"required":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"readonly":[4],"multipleChoice":[4,"multiple-choice"],"allLanguages":[32]}]]],["limebb-mention.cjs",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["limebb-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-kanban-column.cjs",[[1,"limebb-kanban-column",{"platform":[16],"context":[16],"columnHeading":[1,"column-heading"],"items":[16],"loading":[4],"paginationSize":[2,"pagination-size"],"displayedItemCount":[32]}]]],["limebb-date-picker.cjs",[[1,"limebb-date-picker",{"platform":[16],"context":[16],"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[1],"type":[513]}]]],["limebb-notification-item.cjs",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-empty-state_2.cjs",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}],[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]]], options);
19
19
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-3d798cc6.js');
5
+ const index = require('./index-dd1aef9e.js');
6
6
  const types = require('./types-c7646c23.js');
7
7
  const negate = require('./negate-14a67e26.js');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-3d798cc6.js');
5
+ const index = require('./index-dd1aef9e.js');
6
6
  const types = require('./types-c7646c23.js');
7
7
  const get = require('./get-80a3d1aa.js');
8
8
  require('./_Map-ea5de08f.js');