@swisspost/design-system-components 1.3.10 → 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.
- package/dist/cjs/check-non-empty-35b4d0b5.js +14 -0
- package/dist/cjs/check-non-empty-35b4d0b5.js.map +1 -0
- package/dist/cjs/check-one-of-4c2e8b2e.js +10 -0
- package/dist/cjs/check-one-of-4c2e8b2e.js.map +1 -0
- package/dist/cjs/{package-f6bb523d.js → check-type-508a21a5.js} +1 -10
- package/dist/cjs/check-type-508a21a5.js.map +1 -0
- package/dist/cjs/fade-8c6d4fa7.js +12 -0
- package/dist/cjs/fade-8c6d4fa7.js.map +1 -0
- package/dist/cjs/{index-272283b3.js → index-12cc37c9.js} +121 -5
- package/dist/{post-components/p-0096c140.js.map → cjs/index-12cc37c9.js.map} +1 -1
- package/dist/cjs/index-f8f6f146.js +28 -0
- package/dist/cjs/index-f8f6f146.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/package-67091813.js +7 -0
- package/dist/cjs/package-67091813.js.map +1 -0
- package/dist/cjs/post-alert.cjs.entry.js +106 -0
- package/dist/cjs/post-alert.cjs.entry.js.map +1 -0
- package/dist/cjs/post-collapsible.cjs.entry.js +6 -4
- package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-icon.cjs.entry.js +14 -29
- package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +35 -0
- package/dist/cjs/post-tab-header.cjs.entry.js.map +1 -0
- package/dist/cjs/post-tab-panel.cjs.entry.js +29 -0
- package/dist/cjs/post-tab-panel.cjs.entry.js.map +1 -0
- package/dist/cjs/post-tabs.cjs.entry.js +136 -0
- package/dist/cjs/post-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/post-tooltip.cjs.entry.js +5097 -0
- package/dist/cjs/post-tooltip.cjs.entry.js.map +1 -0
- package/dist/collection/animations/fade.js +6 -0
- package/dist/collection/animations/fade.js.map +1 -0
- package/dist/collection/animations/index.js +2 -0
- package/dist/collection/animations/index.js.map +1 -0
- package/dist/collection/collection-manifest.json +6 -1
- package/dist/collection/components/post-alert/alert-types.js +2 -0
- package/dist/collection/components/post-alert/alert-types.js.map +1 -0
- package/dist/collection/components/post-alert/post-alert.css +563 -0
- package/dist/collection/components/post-alert/post-alert.js +256 -0
- package/dist/collection/components/post-alert/post-alert.js.map +1 -0
- package/dist/collection/components/post-collapsible/post-collapsible.css +7 -0
- package/dist/collection/components/post-tab-header/post-tab-header.css +337 -0
- package/dist/collection/components/post-tab-header/post-tab-header.js +68 -0
- package/dist/collection/components/post-tab-header/post-tab-header.js.map +1 -0
- package/dist/collection/components/post-tab-panel/post-tab-panel.css +3 -0
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +55 -0
- package/dist/collection/components/post-tab-panel/post-tab-panel.js.map +1 -0
- package/dist/collection/components/post-tabs/post-tabs.css +148 -0
- package/dist/collection/components/post-tabs/post-tabs.js +208 -0
- package/dist/collection/components/post-tabs/post-tabs.js.map +1 -0
- package/dist/collection/components/post-tooltip/post-tooltip.css +194 -0
- package/dist/collection/components/post-tooltip/post-tooltip.js +338 -0
- package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -0
- package/dist/collection/components/post-tooltip/types.js +2 -0
- package/dist/collection/components/post-tooltip/types.js.map +1 -0
- package/dist/collection/utils/property-checkers/check-one-of.js.map +1 -1
- package/dist/collection/utils/property-checkers/check-pattern.js +5 -0
- package/dist/collection/utils/property-checkers/check-pattern.js.map +1 -0
- package/dist/collection/utils/property-checkers/index.js +3 -0
- package/dist/collection/utils/property-checkers/index.js.map +1 -1
- package/dist/components/check-non-empty.js +11 -0
- package/dist/components/check-non-empty.js.map +1 -0
- package/dist/components/check-one-of.js +8 -0
- package/dist/components/check-one-of.js.map +1 -0
- package/dist/{esm/package-bcf00737.js → components/check-type.js} +2 -9
- package/dist/components/check-type.js.map +1 -0
- package/dist/components/fade.js +9 -0
- package/dist/components/fade.js.map +1 -0
- package/dist/components/package.js +2 -20
- package/dist/components/package.js.map +1 -1
- package/dist/components/post-alert.d.ts +11 -0
- package/dist/components/post-alert.js +136 -0
- package/dist/components/post-alert.js.map +1 -0
- package/dist/components/post-collapsible.js +3 -1
- package/dist/components/post-collapsible.js.map +1 -1
- package/dist/components/post-icon.js +1 -141
- package/dist/components/post-icon.js.map +1 -1
- package/dist/components/post-icon2.js +146 -0
- package/dist/components/post-icon2.js.map +1 -0
- package/dist/components/post-tab-header.d.ts +11 -0
- package/dist/components/post-tab-header.js +52 -0
- package/dist/components/post-tab-header.js.map +1 -0
- package/dist/components/post-tab-panel.d.ts +11 -0
- package/dist/components/post-tab-panel.js +46 -0
- package/dist/components/post-tab-panel.js.map +1 -0
- package/dist/components/post-tabs.d.ts +11 -0
- package/dist/components/post-tabs.js +153 -0
- package/dist/components/post-tabs.js.map +1 -0
- package/dist/components/post-tooltip.d.ts +11 -0
- package/dist/components/post-tooltip.js +5118 -0
- package/dist/components/post-tooltip.js.map +1 -0
- package/dist/docs.json +441 -1
- package/dist/esm/check-non-empty-554bdf88.js +11 -0
- package/dist/esm/check-non-empty-554bdf88.js.map +1 -0
- package/dist/esm/check-one-of-ded5e15e.js +8 -0
- package/dist/esm/check-one-of-ded5e15e.js.map +1 -0
- package/dist/esm/check-type-18ebb4e7.js +16 -0
- package/dist/esm/check-type-18ebb4e7.js.map +1 -0
- package/dist/esm/fade-671f1489.js +9 -0
- package/dist/esm/fade-671f1489.js.map +1 -0
- package/dist/esm/{index-60a84798.js → index-5611074b.js} +121 -6
- package/dist/esm/index-5611074b.js.map +1 -0
- package/dist/esm/index-7f723686.js +24 -0
- package/dist/esm/index-7f723686.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-f5cb3167.js +5 -0
- package/dist/esm/package-f5cb3167.js.map +1 -0
- package/dist/esm/post-alert.entry.js +102 -0
- package/dist/esm/post-alert.entry.js.map +1 -0
- package/dist/esm/post-collapsible.entry.js +4 -2
- package/dist/esm/post-collapsible.entry.js.map +1 -1
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-icon.entry.js +6 -21
- package/dist/esm/post-icon.entry.js.map +1 -1
- package/dist/esm/post-tab-header.entry.js +31 -0
- package/dist/esm/post-tab-header.entry.js.map +1 -0
- package/dist/esm/post-tab-panel.entry.js +25 -0
- package/dist/esm/post-tab-panel.entry.js.map +1 -0
- package/dist/esm/post-tabs.entry.js +132 -0
- package/dist/esm/post-tabs.entry.js.map +1 -0
- package/dist/esm/post-tooltip.entry.js +5093 -0
- package/dist/esm/post-tooltip.entry.js.map +1 -0
- package/dist/post-components/p-12046db8.entry.js +2 -0
- package/dist/post-components/{p-99ccf0cf.entry.js.map → p-12046db8.entry.js.map} +1 -1
- package/dist/post-components/p-15fc087f.js +2 -0
- package/dist/post-components/p-15fc087f.js.map +1 -0
- package/dist/post-components/p-24b07f64.js +2 -0
- package/dist/post-components/p-24b07f64.js.map +1 -0
- package/dist/post-components/p-29535fea.entry.js +2 -0
- package/dist/post-components/p-29535fea.entry.js.map +1 -0
- package/dist/post-components/p-296af738.entry.js +2 -0
- package/dist/post-components/p-296af738.entry.js.map +1 -0
- package/dist/post-components/p-2b6ab354.entry.js +9 -0
- package/dist/post-components/p-2b6ab354.entry.js.map +1 -0
- package/dist/post-components/p-75a7b352.js +2 -0
- package/dist/post-components/p-75a7b352.js.map +1 -0
- package/dist/post-components/p-a14ec7bb.entry.js +2 -0
- package/dist/post-components/p-a14ec7bb.entry.js.map +1 -0
- package/dist/post-components/p-bcc705f1.js +2 -0
- package/dist/post-components/p-bcc705f1.js.map +1 -0
- package/dist/post-components/p-c7497ecb.entry.js +2 -0
- package/dist/post-components/p-c7497ecb.entry.js.map +1 -0
- package/dist/post-components/p-c8efe0ae.js +2 -0
- package/dist/post-components/p-c8efe0ae.js.map +1 -0
- package/dist/post-components/p-cc6e4eb8.entry.js +2 -0
- package/dist/post-components/p-cc6e4eb8.entry.js.map +1 -0
- package/dist/post-components/p-d94db268.js +3 -0
- package/dist/post-components/p-d94db268.js.map +1 -0
- package/dist/post-components/p-e5306504.js +2 -0
- package/dist/post-components/p-e5306504.js.map +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/post-components/post-components.esm.js.map +1 -1
- package/dist/types/animations/fade.d.ts +2 -0
- package/dist/types/animations/index.d.ts +1 -0
- package/dist/types/components/post-alert/alert-types.d.ts +2 -0
- package/dist/types/components/post-alert/post-alert.d.ts +49 -0
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +11 -0
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +10 -0
- package/dist/types/components/post-tabs/post-tabs.d.ts +34 -0
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +66 -0
- package/dist/types/components/post-tooltip/types.d.ts +2 -0
- package/dist/types/components.d.ts +190 -0
- package/dist/types/utils/property-checkers/check-one-of.d.ts +1 -1
- package/dist/types/utils/property-checkers/check-pattern.d.ts +1 -0
- package/dist/types/utils/property-checkers/index.d.ts +3 -1
- package/package.json +13 -9
- package/dist/cjs/index-272283b3.js.map +0 -1
- package/dist/cjs/package-f6bb523d.js.map +0 -1
- package/dist/esm/index-60a84798.js.map +0 -1
- package/dist/esm/package-bcf00737.js.map +0 -1
- package/dist/post-components/p-0096c140.js +0 -3
- package/dist/post-components/p-4a3ff4c0.js +0 -2
- package/dist/post-components/p-4a3ff4c0.js.map +0 -1
- package/dist/post-components/p-99ccf0cf.entry.js +0 -2
- package/dist/post-components/p-cafa0281.entry.js +0 -2
- package/dist/post-components/p-cafa0281.entry.js.map +0 -1
|
@@ -77,6 +77,7 @@ function queryNonceMetaTagContent(doc) {
|
|
|
77
77
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
78
78
|
const h = (nodeName, vnodeData, ...children) => {
|
|
79
79
|
let child = null;
|
|
80
|
+
let key = null;
|
|
80
81
|
let simple = false;
|
|
81
82
|
let lastSimple = false;
|
|
82
83
|
const vNodeChildren = [];
|
|
@@ -104,6 +105,10 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
104
105
|
};
|
|
105
106
|
walk(children);
|
|
106
107
|
if (vnodeData) {
|
|
108
|
+
// normalize class / classname attributes
|
|
109
|
+
if (vnodeData.key) {
|
|
110
|
+
key = vnodeData.key;
|
|
111
|
+
}
|
|
107
112
|
{
|
|
108
113
|
const classData = vnodeData.className || vnodeData.class;
|
|
109
114
|
if (classData) {
|
|
@@ -125,6 +130,9 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
125
130
|
if (vNodeChildren.length > 0) {
|
|
126
131
|
vnode.$children$ = vNodeChildren;
|
|
127
132
|
}
|
|
133
|
+
{
|
|
134
|
+
vnode.$key$ = key;
|
|
135
|
+
}
|
|
128
136
|
return vnode;
|
|
129
137
|
};
|
|
130
138
|
/**
|
|
@@ -146,6 +154,9 @@ const newVNode = (tag, text) => {
|
|
|
146
154
|
{
|
|
147
155
|
vnode.$attrs$ = null;
|
|
148
156
|
}
|
|
157
|
+
{
|
|
158
|
+
vnode.$key$ = null;
|
|
159
|
+
}
|
|
149
160
|
return vnode;
|
|
150
161
|
};
|
|
151
162
|
const Host = {};
|
|
@@ -257,6 +268,19 @@ const parsePropertyValue = (propValue, propType) => {
|
|
|
257
268
|
return propValue;
|
|
258
269
|
};
|
|
259
270
|
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
271
|
+
const createEvent = (ref, name, flags) => {
|
|
272
|
+
const elm = getElement(ref);
|
|
273
|
+
return {
|
|
274
|
+
emit: (detail) => {
|
|
275
|
+
return emitEvent(elm, name, {
|
|
276
|
+
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
277
|
+
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
278
|
+
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
279
|
+
detail,
|
|
280
|
+
});
|
|
281
|
+
},
|
|
282
|
+
};
|
|
283
|
+
};
|
|
260
284
|
/**
|
|
261
285
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
262
286
|
* @param elm the target of the Event
|
|
@@ -391,6 +415,14 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
391
415
|
}
|
|
392
416
|
}
|
|
393
417
|
}
|
|
418
|
+
else if (memberName === 'key')
|
|
419
|
+
;
|
|
420
|
+
else if (memberName === 'ref') {
|
|
421
|
+
// minifier will clean this up
|
|
422
|
+
if (newValue) {
|
|
423
|
+
newValue(elm);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
394
426
|
else if ((!isProp ) &&
|
|
395
427
|
memberName[0] === 'o' &&
|
|
396
428
|
memberName[1] === 'n') {
|
|
@@ -507,7 +539,11 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
507
539
|
let i = 0;
|
|
508
540
|
let elm;
|
|
509
541
|
let childNode;
|
|
510
|
-
{
|
|
542
|
+
if (newVNode.$text$ !== null) {
|
|
543
|
+
// create text node
|
|
544
|
+
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
511
547
|
if (!isSvgMode) {
|
|
512
548
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
513
549
|
}
|
|
@@ -597,6 +633,7 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
597
633
|
const vnode = vnodes[index];
|
|
598
634
|
if (vnode) {
|
|
599
635
|
const elm = vnode.$elm$;
|
|
636
|
+
nullifyVNodeRefs(vnode);
|
|
600
637
|
if (elm) {
|
|
601
638
|
// remove the vnode's element from the dom
|
|
602
639
|
elm.remove();
|
|
@@ -675,6 +712,8 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
675
712
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
676
713
|
let oldStartIdx = 0;
|
|
677
714
|
let newStartIdx = 0;
|
|
715
|
+
let idxInOld = 0;
|
|
716
|
+
let i = 0;
|
|
678
717
|
let oldEndIdx = oldCh.length - 1;
|
|
679
718
|
let oldStartVnode = oldCh[0];
|
|
680
719
|
let oldEndVnode = oldCh[oldEndIdx];
|
|
@@ -682,6 +721,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
682
721
|
let newStartVnode = newCh[0];
|
|
683
722
|
let newEndVnode = newCh[newEndIdx];
|
|
684
723
|
let node;
|
|
724
|
+
let elmToMove;
|
|
685
725
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
686
726
|
if (oldStartVnode == null) {
|
|
687
727
|
// VNode might have been moved left
|
|
@@ -748,7 +788,41 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
748
788
|
newStartVnode = newCh[++newStartIdx];
|
|
749
789
|
}
|
|
750
790
|
else {
|
|
791
|
+
// Here we do some checks to match up old and new nodes based on the
|
|
792
|
+
// `$key$` attribute, which is set by putting a `key="my-key"` attribute
|
|
793
|
+
// in the JSX for a DOM element in the implementation of a Stencil
|
|
794
|
+
// component.
|
|
795
|
+
//
|
|
796
|
+
// First we check to see if there are any nodes in the array of old
|
|
797
|
+
// children which have the same key as the first node in the new
|
|
798
|
+
// children.
|
|
799
|
+
idxInOld = -1;
|
|
751
800
|
{
|
|
801
|
+
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
802
|
+
if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
|
|
803
|
+
idxInOld = i;
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
if (idxInOld >= 0) {
|
|
809
|
+
// We found a node in the old children which matches up with the first
|
|
810
|
+
// node in the new children! So let's deal with that
|
|
811
|
+
elmToMove = oldCh[idxInOld];
|
|
812
|
+
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
813
|
+
// the tag doesn't match so we'll need a new DOM element
|
|
814
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
815
|
+
}
|
|
816
|
+
else {
|
|
817
|
+
patch(elmToMove, newStartVnode);
|
|
818
|
+
// invalidate the matching old node so that we won't try to update it
|
|
819
|
+
// again later on
|
|
820
|
+
oldCh[idxInOld] = undefined;
|
|
821
|
+
node = elmToMove.$elm$;
|
|
822
|
+
}
|
|
823
|
+
newStartVnode = newCh[++newStartIdx];
|
|
824
|
+
}
|
|
825
|
+
else {
|
|
752
826
|
// We either didn't find an element in the old children that matches
|
|
753
827
|
// the key of the first new child OR the build is not using `key`
|
|
754
828
|
// attributes at all. In either case we need to create a new element
|
|
@@ -797,7 +871,10 @@ const isSameVnode = (leftVNode, rightVNode) => {
|
|
|
797
871
|
// compare if two vnode to see if they're "technically" the same
|
|
798
872
|
// need to have the same element tag, and same key to be the same
|
|
799
873
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
800
|
-
|
|
874
|
+
// this will be set if components in the build have `key` attrs set on them
|
|
875
|
+
{
|
|
876
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
877
|
+
}
|
|
801
878
|
}
|
|
802
879
|
return false;
|
|
803
880
|
};
|
|
@@ -814,7 +891,8 @@ const patch = (oldVNode, newVNode) => {
|
|
|
814
891
|
const oldChildren = oldVNode.$children$;
|
|
815
892
|
const newChildren = newVNode.$children$;
|
|
816
893
|
const tag = newVNode.$tag$;
|
|
817
|
-
|
|
894
|
+
const text = newVNode.$text$;
|
|
895
|
+
if (text === null) {
|
|
818
896
|
{
|
|
819
897
|
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
820
898
|
// only add this to the when the compiler sees we're using an svg somewhere
|
|
@@ -836,6 +914,11 @@ const patch = (oldVNode, newVNode) => {
|
|
|
836
914
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
837
915
|
}
|
|
838
916
|
else if (newChildren !== null) {
|
|
917
|
+
// no old child vnodes, but there are new child vnodes to add
|
|
918
|
+
if (oldVNode.$text$ !== null) {
|
|
919
|
+
// the old vnode was text, so be sure to clear it out
|
|
920
|
+
elm.textContent = '';
|
|
921
|
+
}
|
|
839
922
|
// add the new vnode children
|
|
840
923
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
841
924
|
}
|
|
@@ -847,6 +930,24 @@ const patch = (oldVNode, newVNode) => {
|
|
|
847
930
|
isSvgMode = false;
|
|
848
931
|
}
|
|
849
932
|
}
|
|
933
|
+
else if (oldVNode.$text$ !== text) {
|
|
934
|
+
// update the text content for the text only vnode
|
|
935
|
+
// and also only if the text is different than before
|
|
936
|
+
elm.data = text;
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
/**
|
|
940
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
|
941
|
+
* calling them with `null`. This signals that the DOM element corresponding to
|
|
942
|
+
* the VDom node has been removed from the DOM.
|
|
943
|
+
*
|
|
944
|
+
* @param vNode a virtual DOM node
|
|
945
|
+
*/
|
|
946
|
+
const nullifyVNodeRefs = (vNode) => {
|
|
947
|
+
{
|
|
948
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
949
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
950
|
+
}
|
|
850
951
|
};
|
|
851
952
|
/**
|
|
852
953
|
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
@@ -1297,6 +1398,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1297
1398
|
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1298
1399
|
}
|
|
1299
1400
|
endNewInstance();
|
|
1401
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1300
1402
|
}
|
|
1301
1403
|
if (Cstr.style) {
|
|
1302
1404
|
// this component has styles but we haven't registered them yet
|
|
@@ -1325,6 +1427,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1325
1427
|
schedule();
|
|
1326
1428
|
}
|
|
1327
1429
|
};
|
|
1430
|
+
const fireConnectedCallback = (instance) => {
|
|
1431
|
+
{
|
|
1432
|
+
safeCall(instance, 'connectedCallback');
|
|
1433
|
+
}
|
|
1434
|
+
};
|
|
1328
1435
|
const connectedCallback = (elm) => {
|
|
1329
1436
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1330
1437
|
const hostRef = getHostRef(elm);
|
|
@@ -1363,12 +1470,20 @@ const connectedCallback = (elm) => {
|
|
|
1363
1470
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1364
1471
|
}
|
|
1365
1472
|
}
|
|
1473
|
+
else {
|
|
1474
|
+
// fire off connectedCallback() on component instance
|
|
1475
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1476
|
+
}
|
|
1366
1477
|
endConnected();
|
|
1367
1478
|
}
|
|
1368
1479
|
};
|
|
1369
1480
|
const disconnectedCallback = (elm) => {
|
|
1370
1481
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1371
|
-
getHostRef(elm);
|
|
1482
|
+
const hostRef = getHostRef(elm);
|
|
1483
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1484
|
+
{
|
|
1485
|
+
safeCall(instance, 'disconnectedCallback');
|
|
1486
|
+
}
|
|
1372
1487
|
}
|
|
1373
1488
|
};
|
|
1374
1489
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
@@ -1585,6 +1700,6 @@ const flush = () => {
|
|
|
1585
1700
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1586
1701
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1587
1702
|
|
|
1588
|
-
export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1703
|
+
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1589
1704
|
|
|
1590
|
-
//# sourceMappingURL=index-
|
|
1705
|
+
//# sourceMappingURL=index-5611074b.js.map
|