@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
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { AnimationItem } from 'lottie-web';
|
|
2
2
|
import { SulaLoaderSize } from './model/sula-loader.model';
|
|
3
3
|
export declare class SulaLoader {
|
|
4
|
-
el
|
|
4
|
+
el?: HTMLElement;
|
|
5
5
|
/**
|
|
6
6
|
* Tamanho predefinido (small, medium, large)
|
|
7
7
|
*/
|
|
8
8
|
size: SulaLoaderSize;
|
|
9
|
-
animationInstance: AnimationItem;
|
|
10
|
-
containerRef
|
|
9
|
+
animationInstance: AnimationItem | null;
|
|
10
|
+
containerRef?: HTMLDivElement;
|
|
11
|
+
connectedCallback(): void;
|
|
11
12
|
componentDidLoad(): void;
|
|
13
|
+
componentDidRender(): void;
|
|
12
14
|
disconnectedCallback(): void;
|
|
15
|
+
private destroyAnimation;
|
|
16
|
+
private tryInitLottie;
|
|
13
17
|
initLottie(): void;
|
|
14
18
|
getDimensions(): {
|
|
15
19
|
width: string;
|
|
@@ -21029,17 +21029,29 @@ const SulaLoader = class {
|
|
|
21029
21029
|
/**
|
|
21030
21030
|
* Tamanho predefinido (small, medium, large)
|
|
21031
21031
|
*/ this.size = SulaLoaderSize.Medium;
|
|
21032
|
+
this.animationInstance = null;
|
|
21033
|
+
}
|
|
21034
|
+
connectedCallback() {
|
|
21035
|
+
this.tryInitLottie();
|
|
21032
21036
|
}
|
|
21033
21037
|
componentDidLoad() {
|
|
21034
|
-
this.
|
|
21038
|
+
this.tryInitLottie();
|
|
21039
|
+
}
|
|
21040
|
+
componentDidRender() {
|
|
21041
|
+
this.tryInitLottie();
|
|
21035
21042
|
}
|
|
21036
21043
|
disconnectedCallback() {
|
|
21037
|
-
|
|
21038
|
-
|
|
21044
|
+
this.destroyAnimation();
|
|
21045
|
+
}
|
|
21046
|
+
destroyAnimation() {
|
|
21047
|
+
if (!this.animationInstance) {
|
|
21048
|
+
return;
|
|
21039
21049
|
}
|
|
21050
|
+
this.animationInstance.destroy();
|
|
21051
|
+
this.animationInstance = null;
|
|
21040
21052
|
}
|
|
21041
|
-
|
|
21042
|
-
if (!this.containerRef) return;
|
|
21053
|
+
tryInitLottie() {
|
|
21054
|
+
if (!this.containerRef || this.animationInstance) return;
|
|
21043
21055
|
try {
|
|
21044
21056
|
const e = loaderAnimation;
|
|
21045
21057
|
this.animationInstance = lottie.loadAnimation({
|
|
@@ -21054,6 +21066,9 @@ const SulaLoader = class {
|
|
|
21054
21066
|
console.error("Erro ao carregar animação Lottie:", e);
|
|
21055
21067
|
}
|
|
21056
21068
|
}
|
|
21069
|
+
initLottie() {
|
|
21070
|
+
this.tryInitLottie();
|
|
21071
|
+
}
|
|
21057
21072
|
getDimensions() {
|
|
21058
21073
|
const e = {
|
|
21059
21074
|
small: "24px",
|
|
@@ -21068,9 +21083,9 @@ const SulaLoader = class {
|
|
|
21068
21083
|
render() {
|
|
21069
21084
|
const {width: e, height: t} = this.getDimensions();
|
|
21070
21085
|
return h$1(Host, {
|
|
21071
|
-
key: "
|
|
21086
|
+
key: "4d73099f19f4e81ed2cd83ee1402e0f06f71f7ca"
|
|
21072
21087
|
}, h$1("div", {
|
|
21073
|
-
key: "
|
|
21088
|
+
key: "2593fe1c91bf4c7f167caa55fdc476d0a9d73841",
|
|
21074
21089
|
ref: e => this.containerRef = e,
|
|
21075
21090
|
style: {
|
|
21076
21091
|
width: e,
|
|
@@ -25097,4 +25112,4 @@ SulaTooltip.style = sulaTooltipCss;
|
|
|
25097
25112
|
|
|
25098
25113
|
export { SulaAvatar as sula_avatar, SulaBadge as sula_badge, SulaBreadcrumb as sula_breadcrumb, SulaButton as sula_button, SulaCheckbox as sula_checkbox, SulaChip as sula_chip, SulaDropdown as sula_dropdown, SulaIcon as sula_icon, SulaLoader as sula_loader, SulaMenuSelectList as sula_menu_select_list, SulaModal as sula_modal, SulaProgressBar as sula_progress_bar, SulaRadioButton as sula_radio_button, SulaSearchBar as sula_search_bar, SulaSegmentedControl as sula_segmented_control, SulaSwitch as sula_switch, SulaTable as sula_table, SulaTableBody as sula_table_body, SulaTableCell as sula_table_cell, SulaTableHeadCell as sula_table_head_cell, SulaTableHeader as sula_table_header, SulaTableRow as sula_table_row, SulaTag as sula_tag, SulaTextarea as sula_textarea, SulaTextfield as sula_textfield, SulaTiles as sula_tiles, SulaTimelineList as sula_timeline_list, SulaToggle as sula_toggle, SulaTooltip as sula_tooltip };
|
|
25099
25114
|
//# sourceMappingURL=sula-avatar.sula-badge.sula-breadcrumb.sula-button.sula-checkbox.sula-chip.sula-dropdown.sula-icon.sula-loader.sula-menu-select-list.sula-modal.sula-progress-bar.sula-radio-button.sula-search-bar.sula-segmented-control.sula-switch.sula-table.sula-table-body.sula-table-cell.sula-table-head-cell.sula-table-header.sula-table-row.sula-tag.sula-textarea.sula-textfield.sula-tiles.sula-timeline-list.sula-toggle.sula-tooltip.entry.esm.js.map
|
|
25100
|
-
//# sourceMappingURL=p-
|
|
25115
|
+
//# sourceMappingURL=p-342be8e3.entry.js.map
|