@sula-tech/webcomponents 0.17.4 → 0.17.5
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/sula-avatar_29.cjs.entry.js +21 -6
- package/dist/cjs/sula-avatar_29.cjs.entry.js.map +1 -1
- package/dist/collection/components/sula-loader/sula-loader.js +21 -6
- package/dist/collection/components/sula-loader/sula-loader.js.map +1 -1
- package/dist/components/{p-DGCOlK4x.js → p-Ds1BVj4V.js} +3 -3
- package/dist/components/{p-DGCOlK4x.js.map → p-Ds1BVj4V.js.map} +1 -1
- package/dist/components/{p-fwcKhm5l.js → p-zE24jlFe.js} +23 -8
- package/dist/components/{p-fwcKhm5l.js.map → p-zE24jlFe.js.map} +1 -1
- package/dist/components/sula-button.js +1 -1
- package/dist/components/sula-loader.js +1 -1
- package/dist/components/sula-modal.js +2 -2
- package/dist/esm/sula-avatar_29.entry.js +21 -6
- package/dist/esm/sula-avatar_29.entry.js.map +1 -1
- package/dist/types/components/sula-loader/sula-loader.d.ts +7 -3
- package/dist/webcomponents/{p-f62433bd.entry.js → p-342be8e3.entry.js} +23 -8
- package/dist/webcomponents/p-342be8e3.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-f62433bd.entry.js.map +0 -1
|
@@ -27786,17 +27786,29 @@ const SulaLoader = class {
|
|
|
27786
27786
|
* Tamanho predefinido (small, medium, large)
|
|
27787
27787
|
*/
|
|
27788
27788
|
this.size = SulaLoaderSize.Medium;
|
|
27789
|
+
this.animationInstance = null;
|
|
27790
|
+
}
|
|
27791
|
+
connectedCallback() {
|
|
27792
|
+
this.tryInitLottie();
|
|
27789
27793
|
}
|
|
27790
27794
|
componentDidLoad() {
|
|
27791
|
-
this.
|
|
27795
|
+
this.tryInitLottie();
|
|
27796
|
+
}
|
|
27797
|
+
componentDidRender() {
|
|
27798
|
+
this.tryInitLottie();
|
|
27792
27799
|
}
|
|
27793
27800
|
disconnectedCallback() {
|
|
27794
|
-
|
|
27795
|
-
|
|
27801
|
+
this.destroyAnimation();
|
|
27802
|
+
}
|
|
27803
|
+
destroyAnimation() {
|
|
27804
|
+
if (!this.animationInstance) {
|
|
27805
|
+
return;
|
|
27796
27806
|
}
|
|
27807
|
+
this.animationInstance.destroy();
|
|
27808
|
+
this.animationInstance = null;
|
|
27797
27809
|
}
|
|
27798
|
-
|
|
27799
|
-
if (!this.containerRef)
|
|
27810
|
+
tryInitLottie() {
|
|
27811
|
+
if (!this.containerRef || this.animationInstance)
|
|
27800
27812
|
return;
|
|
27801
27813
|
try {
|
|
27802
27814
|
const animationData = loaderAnimation;
|
|
@@ -27813,6 +27825,9 @@ const SulaLoader = class {
|
|
|
27813
27825
|
console.error('Erro ao carregar animação Lottie:', error);
|
|
27814
27826
|
}
|
|
27815
27827
|
}
|
|
27828
|
+
initLottie() {
|
|
27829
|
+
this.tryInitLottie();
|
|
27830
|
+
}
|
|
27816
27831
|
getDimensions() {
|
|
27817
27832
|
const sizes = {
|
|
27818
27833
|
small: '24px',
|
|
@@ -27823,7 +27838,7 @@ const SulaLoader = class {
|
|
|
27823
27838
|
}
|
|
27824
27839
|
render() {
|
|
27825
27840
|
const { width, height } = this.getDimensions();
|
|
27826
|
-
return (index.h(index.Host, { key: '
|
|
27841
|
+
return (index.h(index.Host, { key: '4d73099f19f4e81ed2cd83ee1402e0f06f71f7ca' }, index.h("div", { key: '2593fe1c91bf4c7f167caa55fdc476d0a9d73841', ref: el => (this.containerRef = el), style: {
|
|
27827
27842
|
width: width,
|
|
27828
27843
|
height: height,
|
|
27829
27844
|
} })));
|