@swisspost/design-system-components 1.4.0 → 1.5.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 (146) hide show
  1. package/dist/cjs/check-one-of-4c2e8b2e.js +10 -0
  2. package/dist/cjs/check-one-of-4c2e8b2e.js.map +1 -0
  3. package/dist/cjs/{check-type-f24cf91d.js → check-type-508a21a5.js} +1 -7
  4. package/dist/cjs/check-type-508a21a5.js.map +1 -0
  5. package/dist/cjs/fade-8c6d4fa7.js +12 -0
  6. package/dist/cjs/fade-8c6d4fa7.js.map +1 -0
  7. package/dist/cjs/{index-50d7d035.js → index-12cc37c9.js} +107 -5
  8. package/dist/cjs/index-12cc37c9.js.map +1 -0
  9. package/dist/cjs/index-f8f6f146.js +28 -0
  10. package/dist/cjs/index-f8f6f146.js.map +1 -0
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/package-67091813.js +7 -0
  13. package/dist/cjs/package-67091813.js.map +1 -0
  14. package/dist/cjs/post-alert.cjs.entry.js +106 -0
  15. package/dist/cjs/post-alert.cjs.entry.js.map +1 -0
  16. package/dist/cjs/post-collapsible.cjs.entry.js +5 -4
  17. package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
  18. package/dist/cjs/post-components.cjs.js +2 -2
  19. package/dist/cjs/post-icon.cjs.entry.js +11 -20
  20. package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
  21. package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
  22. package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
  23. package/dist/cjs/post-tabs.cjs.entry.js +5 -10
  24. package/dist/cjs/post-tabs.cjs.entry.js.map +1 -1
  25. package/dist/cjs/post-tooltip.cjs.entry.js +5097 -0
  26. package/dist/cjs/post-tooltip.cjs.entry.js.map +1 -0
  27. package/dist/collection/collection-manifest.json +3 -1
  28. package/dist/collection/components/post-alert/alert-types.js +2 -0
  29. package/dist/collection/components/post-alert/alert-types.js.map +1 -0
  30. package/dist/collection/components/post-alert/post-alert.css +563 -0
  31. package/dist/collection/components/post-alert/post-alert.js +256 -0
  32. package/dist/collection/components/post-alert/post-alert.js.map +1 -0
  33. package/dist/collection/components/post-collapsible/post-collapsible.css +7 -0
  34. package/dist/collection/components/post-tooltip/post-tooltip.css +194 -0
  35. package/dist/collection/components/post-tooltip/post-tooltip.js +338 -0
  36. package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -0
  37. package/dist/collection/components/post-tooltip/types.js +2 -0
  38. package/dist/collection/components/post-tooltip/types.js.map +1 -0
  39. package/dist/collection/utils/property-checkers/check-one-of.js.map +1 -1
  40. package/dist/collection/utils/property-checkers/check-pattern.js +5 -0
  41. package/dist/collection/utils/property-checkers/check-pattern.js.map +1 -0
  42. package/dist/collection/utils/property-checkers/index.js +3 -0
  43. package/dist/collection/utils/property-checkers/index.js.map +1 -1
  44. package/dist/components/check-one-of.js +8 -0
  45. package/dist/components/check-one-of.js.map +1 -0
  46. package/dist/components/check-type.js +1 -6
  47. package/dist/components/check-type.js.map +1 -1
  48. package/dist/components/fade.js +9 -0
  49. package/dist/components/fade.js.map +1 -0
  50. package/dist/components/package.js +1 -1
  51. package/dist/components/post-alert.d.ts +11 -0
  52. package/dist/components/post-alert.js +136 -0
  53. package/dist/components/post-alert.js.map +1 -0
  54. package/dist/components/post-collapsible.js +2 -1
  55. package/dist/components/post-collapsible.js.map +1 -1
  56. package/dist/components/post-icon.js +1 -135
  57. package/dist/components/post-icon.js.map +1 -1
  58. package/dist/components/post-icon2.js +146 -0
  59. package/dist/components/post-icon2.js.map +1 -0
  60. package/dist/components/post-tabs.js +1 -6
  61. package/dist/components/post-tabs.js.map +1 -1
  62. package/dist/components/post-tooltip.d.ts +11 -0
  63. package/dist/components/post-tooltip.js +5118 -0
  64. package/dist/components/post-tooltip.js.map +1 -0
  65. package/dist/docs.json +313 -3
  66. package/dist/esm/check-one-of-ded5e15e.js +8 -0
  67. package/dist/esm/check-one-of-ded5e15e.js.map +1 -0
  68. package/dist/esm/{check-type-67411ed3.js → check-type-18ebb4e7.js} +2 -7
  69. package/dist/esm/check-type-18ebb4e7.js.map +1 -0
  70. package/dist/esm/fade-671f1489.js +9 -0
  71. package/dist/esm/fade-671f1489.js.map +1 -0
  72. package/dist/esm/{index-cc0e53f0.js → index-5611074b.js} +107 -5
  73. package/dist/esm/index-5611074b.js.map +1 -0
  74. package/dist/esm/index-7f723686.js +24 -0
  75. package/dist/esm/index-7f723686.js.map +1 -0
  76. package/dist/esm/loader.js +3 -3
  77. package/dist/esm/package-f5cb3167.js +5 -0
  78. package/dist/esm/package-f5cb3167.js.map +1 -0
  79. package/dist/esm/post-alert.entry.js +102 -0
  80. package/dist/esm/post-alert.entry.js.map +1 -0
  81. package/dist/esm/post-collapsible.entry.js +4 -3
  82. package/dist/esm/post-collapsible.entry.js.map +1 -1
  83. package/dist/esm/post-components.js +3 -3
  84. package/dist/esm/post-icon.entry.js +6 -15
  85. package/dist/esm/post-icon.entry.js.map +1 -1
  86. package/dist/esm/post-tab-header.entry.js +2 -2
  87. package/dist/esm/post-tab-panel.entry.js +2 -2
  88. package/dist/esm/post-tabs.entry.js +3 -8
  89. package/dist/esm/post-tabs.entry.js.map +1 -1
  90. package/dist/esm/post-tooltip.entry.js +5093 -0
  91. package/dist/esm/post-tooltip.entry.js.map +1 -0
  92. package/dist/post-components/p-12046db8.entry.js +2 -0
  93. package/dist/post-components/{p-6dad6a8a.entry.js.map → p-12046db8.entry.js.map} +1 -1
  94. package/dist/post-components/p-15fc087f.js +2 -0
  95. package/dist/post-components/p-15fc087f.js.map +1 -0
  96. package/dist/post-components/p-24b07f64.js +2 -0
  97. package/dist/post-components/{p-b95ec099.entry.js → p-29535fea.entry.js} +2 -2
  98. package/dist/post-components/p-296af738.entry.js +2 -0
  99. package/dist/post-components/p-296af738.entry.js.map +1 -0
  100. package/dist/post-components/p-2b6ab354.entry.js +9 -0
  101. package/dist/post-components/p-2b6ab354.entry.js.map +1 -0
  102. package/dist/post-components/p-75a7b352.js +2 -0
  103. package/dist/post-components/p-75a7b352.js.map +1 -0
  104. package/dist/post-components/p-a14ec7bb.entry.js +2 -0
  105. package/dist/post-components/p-a14ec7bb.entry.js.map +1 -0
  106. package/dist/post-components/p-bcc705f1.js +2 -0
  107. package/dist/post-components/p-bcc705f1.js.map +1 -0
  108. package/dist/post-components/{p-1388585d.entry.js → p-c7497ecb.entry.js} +2 -2
  109. package/dist/post-components/p-cc6e4eb8.entry.js +2 -0
  110. package/dist/post-components/p-cc6e4eb8.entry.js.map +1 -0
  111. package/dist/post-components/p-d94db268.js +3 -0
  112. package/dist/post-components/p-d94db268.js.map +1 -0
  113. package/dist/post-components/p-e5306504.js +2 -0
  114. package/dist/post-components/p-e5306504.js.map +1 -0
  115. package/dist/post-components/post-components.esm.js +1 -1
  116. package/dist/post-components/post-components.esm.js.map +1 -1
  117. package/dist/types/components/post-alert/alert-types.d.ts +2 -0
  118. package/dist/types/components/post-alert/post-alert.d.ts +49 -0
  119. package/dist/types/components/post-tooltip/post-tooltip.d.ts +66 -0
  120. package/dist/types/components/post-tooltip/types.d.ts +2 -0
  121. package/dist/types/components.d.ts +115 -0
  122. package/dist/types/utils/property-checkers/check-one-of.d.ts +1 -1
  123. package/dist/types/utils/property-checkers/check-pattern.d.ts +1 -0
  124. package/dist/types/utils/property-checkers/index.d.ts +3 -1
  125. package/package.json +12 -8
  126. package/dist/cjs/check-type-f24cf91d.js.map +0 -1
  127. package/dist/cjs/index-50d7d035.js.map +0 -1
  128. package/dist/cjs/package-e8a6597e.js +0 -7
  129. package/dist/cjs/package-e8a6597e.js.map +0 -1
  130. package/dist/esm/check-type-67411ed3.js.map +0 -1
  131. package/dist/esm/index-cc0e53f0.js.map +0 -1
  132. package/dist/esm/package-b514d0f6.js +0 -5
  133. package/dist/esm/package-b514d0f6.js.map +0 -1
  134. package/dist/post-components/p-58916755.js +0 -2
  135. package/dist/post-components/p-5b3445dc.entry.js +0 -2
  136. package/dist/post-components/p-5b3445dc.entry.js.map +0 -1
  137. package/dist/post-components/p-6341b9b4.js +0 -3
  138. package/dist/post-components/p-6341b9b4.js.map +0 -1
  139. package/dist/post-components/p-6dad6a8a.entry.js +0 -2
  140. package/dist/post-components/p-cc92afb7.entry.js +0 -2
  141. package/dist/post-components/p-cc92afb7.entry.js.map +0 -1
  142. package/dist/post-components/p-f549b3fc.js +0 -2
  143. package/dist/post-components/p-f549b3fc.js.map +0 -1
  144. /package/dist/post-components/{p-58916755.js.map → p-24b07f64.js.map} +0 -0
  145. /package/dist/post-components/{p-b95ec099.entry.js.map → p-29535fea.entry.js.map} +0 -0
  146. /package/dist/post-components/{p-1388585d.entry.js.map → p-c7497ecb.entry.js.map} +0 -0
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ function checkOneOf(value, possibleValues, error) {
4
+ if (!possibleValues.includes(value))
5
+ throw new Error(error);
6
+ }
7
+
8
+ exports.checkOneOf = checkOneOf;
9
+
10
+ //# sourceMappingURL=check-one-of-4c2e8b2e.js.map
@@ -0,0 +1 @@
1
+ {"file":"check-one-of-4c2e8b2e.js","mappings":";;SAAgB,UAAU,CAAI,KAAQ,EAAE,cAA4B,EAAE,KAAa;EACjF,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC;IAAE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;AAC9D;;;;","names":[],"sources":["./src/utils/property-checkers/check-one-of.ts"],"sourcesContent":["export function checkOneOf<T>(value: T, possibleValues: readonly T[], error: string) {\n if (!possibleValues.includes(value)) throw new Error(error);\n}\n"],"version":3}
@@ -1,10 +1,5 @@
1
1
  'use strict';
2
2
 
3
- function checkOneOf(value, possibleValues, error) {
4
- if (!possibleValues.includes(value))
5
- throw new Error(error);
6
- }
7
-
8
3
  function checkType(value, type, error) {
9
4
  const typeIsArray = type === 'array';
10
5
  const valueIsArray = Array.isArray(value);
@@ -18,7 +13,6 @@ function checkType(value, type, error) {
18
13
  }
19
14
  }
20
15
 
21
- exports.checkOneOf = checkOneOf;
22
16
  exports.checkType = checkType;
23
17
 
24
- //# sourceMappingURL=check-type-f24cf91d.js.map
18
+ //# sourceMappingURL=check-type-508a21a5.js.map
@@ -0,0 +1 @@
1
+ {"file":"check-type-508a21a5.js","mappings":";;SAQgB,SAAS,CAAC,KAAc,EAAE,IAAkB,EAAE,KAAa;EACzE,MAAM,WAAW,GAAG,IAAI,KAAK,OAAO,CAAC;EACrC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;EAE1C,IAAI,WAAW,IAAI,YAAY,EAAE;IAC/B,IAAI,YAAY,KAAK,WAAW;MAAE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;GAC1D;OAAM;IACL,IAAI,OAAO,KAAK,KAAK,IAAI;MAAE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;GACnD;AACH;;;;","names":[],"sources":["./src/utils/property-checkers/check-type.ts"],"sourcesContent":["export type PropertyType =\n | 'boolean'\n | 'number'\n | 'string'\n | 'array'\n | 'object'\n | 'function';\n\nexport function checkType(value: unknown, type: PropertyType, error: string) {\n const typeIsArray = type === 'array';\n const valueIsArray = Array.isArray(value);\n\n if (typeIsArray || valueIsArray) {\n if (valueIsArray !== typeIsArray) throw new Error(error);\n } else {\n if (typeof value !== type) throw new Error(error);\n }\n}\n"],"version":3}
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ const fadeDuration = 200;
4
+ const fadedOutKeyFrame = { opacity: '0' };
5
+ const fadedInKeyFrame = { opacity: '1' };
6
+ const fadeIn = (el) => el.animate([fadedOutKeyFrame, fadedInKeyFrame], { duration: fadeDuration });
7
+ const fadeOut = (el) => el.animate([fadedInKeyFrame, fadedOutKeyFrame], { duration: fadeDuration });
8
+
9
+ exports.fadeIn = fadeIn;
10
+ exports.fadeOut = fadeOut;
11
+
12
+ //# sourceMappingURL=fade-8c6d4fa7.js.map
@@ -0,0 +1 @@
1
+ {"file":"fade-8c6d4fa7.js","mappings":";;AAAA,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,MAAM,gBAAgB,GAAG,EAAC,OAAO,EAAE,GAAG,EAAC,CAAC;AACxC,MAAM,eAAe,GAAG,EAAC,OAAO,EAAE,GAAG,EAAC,CAAC;MAE1B,MAAM,GAAG,CAAC,EAAW,KAAgB,EAAE,CAAC,OAAO,CAC1D,CAAE,gBAAgB,EAAE,eAAe,CAAE,EACrC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAC1B;MAEW,OAAO,GAAG,CAAC,EAAW,KAAgB,EAAE,CAAC,OAAO,CAC3D,CAAE,eAAe,EAAE,gBAAgB,CAAE,EACrC,EAAE,QAAQ,EAAE,YAAY,EAAE;;;;;","names":[],"sources":["./src/animations/fade.ts"],"sourcesContent":["const fadeDuration = 200;\nconst fadedOutKeyFrame = {opacity: '0'};\nconst fadedInKeyFrame = {opacity: '1'};\n\nexport const fadeIn = (el: Element): Animation => el.animate(\n [ fadedOutKeyFrame, fadedInKeyFrame ],\n { duration: fadeDuration }\n);\n\nexport const fadeOut = (el: Element): Animation => el.animate(\n [ fadedInKeyFrame, fadedOutKeyFrame ],\n { duration: fadeDuration }\n);\n"],"version":3}
@@ -99,6 +99,7 @@ function queryNonceMetaTagContent(doc) {
99
99
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
100
100
  const h = (nodeName, vnodeData, ...children) => {
101
101
  let child = null;
102
+ let key = null;
102
103
  let simple = false;
103
104
  let lastSimple = false;
104
105
  const vNodeChildren = [];
@@ -126,6 +127,10 @@ const h = (nodeName, vnodeData, ...children) => {
126
127
  };
127
128
  walk(children);
128
129
  if (vnodeData) {
130
+ // normalize class / classname attributes
131
+ if (vnodeData.key) {
132
+ key = vnodeData.key;
133
+ }
129
134
  {
130
135
  const classData = vnodeData.className || vnodeData.class;
131
136
  if (classData) {
@@ -147,6 +152,9 @@ const h = (nodeName, vnodeData, ...children) => {
147
152
  if (vNodeChildren.length > 0) {
148
153
  vnode.$children$ = vNodeChildren;
149
154
  }
155
+ {
156
+ vnode.$key$ = key;
157
+ }
150
158
  return vnode;
151
159
  };
152
160
  /**
@@ -168,6 +176,9 @@ const newVNode = (tag, text) => {
168
176
  {
169
177
  vnode.$attrs$ = null;
170
178
  }
179
+ {
180
+ vnode.$key$ = null;
181
+ }
171
182
  return vnode;
172
183
  };
173
184
  const Host = {};
@@ -426,6 +437,14 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
426
437
  }
427
438
  }
428
439
  }
440
+ else if (memberName === 'key')
441
+ ;
442
+ else if (memberName === 'ref') {
443
+ // minifier will clean this up
444
+ if (newValue) {
445
+ newValue(elm);
446
+ }
447
+ }
429
448
  else if ((!isProp ) &&
430
449
  memberName[0] === 'o' &&
431
450
  memberName[1] === 'n') {
@@ -542,7 +561,11 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
542
561
  let i = 0;
543
562
  let elm;
544
563
  let childNode;
545
- {
564
+ if (newVNode.$text$ !== null) {
565
+ // create text node
566
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
567
+ }
568
+ else {
546
569
  if (!isSvgMode) {
547
570
  isSvgMode = newVNode.$tag$ === 'svg';
548
571
  }
@@ -632,6 +655,7 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
632
655
  const vnode = vnodes[index];
633
656
  if (vnode) {
634
657
  const elm = vnode.$elm$;
658
+ nullifyVNodeRefs(vnode);
635
659
  if (elm) {
636
660
  // remove the vnode's element from the dom
637
661
  elm.remove();
@@ -710,6 +734,8 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
710
734
  const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
711
735
  let oldStartIdx = 0;
712
736
  let newStartIdx = 0;
737
+ let idxInOld = 0;
738
+ let i = 0;
713
739
  let oldEndIdx = oldCh.length - 1;
714
740
  let oldStartVnode = oldCh[0];
715
741
  let oldEndVnode = oldCh[oldEndIdx];
@@ -717,6 +743,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
717
743
  let newStartVnode = newCh[0];
718
744
  let newEndVnode = newCh[newEndIdx];
719
745
  let node;
746
+ let elmToMove;
720
747
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
721
748
  if (oldStartVnode == null) {
722
749
  // VNode might have been moved left
@@ -783,7 +810,41 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
783
810
  newStartVnode = newCh[++newStartIdx];
784
811
  }
785
812
  else {
813
+ // Here we do some checks to match up old and new nodes based on the
814
+ // `$key$` attribute, which is set by putting a `key="my-key"` attribute
815
+ // in the JSX for a DOM element in the implementation of a Stencil
816
+ // component.
817
+ //
818
+ // First we check to see if there are any nodes in the array of old
819
+ // children which have the same key as the first node in the new
820
+ // children.
821
+ idxInOld = -1;
786
822
  {
823
+ for (i = oldStartIdx; i <= oldEndIdx; ++i) {
824
+ if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
825
+ idxInOld = i;
826
+ break;
827
+ }
828
+ }
829
+ }
830
+ if (idxInOld >= 0) {
831
+ // We found a node in the old children which matches up with the first
832
+ // node in the new children! So let's deal with that
833
+ elmToMove = oldCh[idxInOld];
834
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
835
+ // the tag doesn't match so we'll need a new DOM element
836
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
837
+ }
838
+ else {
839
+ patch(elmToMove, newStartVnode);
840
+ // invalidate the matching old node so that we won't try to update it
841
+ // again later on
842
+ oldCh[idxInOld] = undefined;
843
+ node = elmToMove.$elm$;
844
+ }
845
+ newStartVnode = newCh[++newStartIdx];
846
+ }
847
+ else {
787
848
  // We either didn't find an element in the old children that matches
788
849
  // the key of the first new child OR the build is not using `key`
789
850
  // attributes at all. In either case we need to create a new element
@@ -832,7 +893,10 @@ const isSameVnode = (leftVNode, rightVNode) => {
832
893
  // compare if two vnode to see if they're "technically" the same
833
894
  // need to have the same element tag, and same key to be the same
834
895
  if (leftVNode.$tag$ === rightVNode.$tag$) {
835
- return true;
896
+ // this will be set if components in the build have `key` attrs set on them
897
+ {
898
+ return leftVNode.$key$ === rightVNode.$key$;
899
+ }
836
900
  }
837
901
  return false;
838
902
  };
@@ -849,7 +913,8 @@ const patch = (oldVNode, newVNode) => {
849
913
  const oldChildren = oldVNode.$children$;
850
914
  const newChildren = newVNode.$children$;
851
915
  const tag = newVNode.$tag$;
852
- {
916
+ const text = newVNode.$text$;
917
+ if (text === null) {
853
918
  {
854
919
  // test if we're rendering an svg element, or still rendering nodes inside of one
855
920
  // only add this to the when the compiler sees we're using an svg somewhere
@@ -871,6 +936,11 @@ const patch = (oldVNode, newVNode) => {
871
936
  updateChildren(elm, oldChildren, newVNode, newChildren);
872
937
  }
873
938
  else if (newChildren !== null) {
939
+ // no old child vnodes, but there are new child vnodes to add
940
+ if (oldVNode.$text$ !== null) {
941
+ // the old vnode was text, so be sure to clear it out
942
+ elm.textContent = '';
943
+ }
874
944
  // add the new vnode children
875
945
  addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
876
946
  }
@@ -882,6 +952,24 @@ const patch = (oldVNode, newVNode) => {
882
952
  isSvgMode = false;
883
953
  }
884
954
  }
955
+ else if (oldVNode.$text$ !== text) {
956
+ // update the text content for the text only vnode
957
+ // and also only if the text is different than before
958
+ elm.data = text;
959
+ }
960
+ };
961
+ /**
962
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
963
+ * calling them with `null`. This signals that the DOM element corresponding to
964
+ * the VDom node has been removed from the DOM.
965
+ *
966
+ * @param vNode a virtual DOM node
967
+ */
968
+ const nullifyVNodeRefs = (vNode) => {
969
+ {
970
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
971
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
972
+ }
885
973
  };
886
974
  /**
887
975
  * The main entry point for Stencil's virtual DOM-based rendering engine
@@ -1332,6 +1420,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1332
1420
  hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1333
1421
  }
1334
1422
  endNewInstance();
1423
+ fireConnectedCallback(hostRef.$lazyInstance$);
1335
1424
  }
1336
1425
  if (Cstr.style) {
1337
1426
  // this component has styles but we haven't registered them yet
@@ -1360,6 +1449,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1360
1449
  schedule();
1361
1450
  }
1362
1451
  };
1452
+ const fireConnectedCallback = (instance) => {
1453
+ {
1454
+ safeCall(instance, 'connectedCallback');
1455
+ }
1456
+ };
1363
1457
  const connectedCallback = (elm) => {
1364
1458
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1365
1459
  const hostRef = getHostRef(elm);
@@ -1398,12 +1492,20 @@ const connectedCallback = (elm) => {
1398
1492
  initializeComponent(elm, hostRef, cmpMeta);
1399
1493
  }
1400
1494
  }
1495
+ else {
1496
+ // fire off connectedCallback() on component instance
1497
+ fireConnectedCallback(hostRef.$lazyInstance$);
1498
+ }
1401
1499
  endConnected();
1402
1500
  }
1403
1501
  };
1404
1502
  const disconnectedCallback = (elm) => {
1405
1503
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1406
- getHostRef(elm);
1504
+ const hostRef = getHostRef(elm);
1505
+ const instance = hostRef.$lazyInstance$ ;
1506
+ {
1507
+ safeCall(instance, 'disconnectedCallback');
1508
+ }
1407
1509
  }
1408
1510
  };
1409
1511
  const bootstrapLazy = (lazyBundles, options = {}) => {
@@ -1629,4 +1731,4 @@ exports.promiseResolve = promiseResolve;
1629
1731
  exports.registerInstance = registerInstance;
1630
1732
  exports.setNonce = setNonce;
1631
1733
 
1632
- //# sourceMappingURL=index-50d7d035.js.map
1734
+ //# sourceMappingURL=index-12cc37c9.js.map