@everymatrix/cashier-page 1.72.1 → 1.73.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/components/{CashierConfirmModal-4RYp7Eiq.js → CashierConfirmModal-BCk4hvRj.js} +3 -3
- package/components/{CashierConfirmModal-untxGhsx.js → CashierConfirmModal-DXlKhIue.js} +3 -3
- package/components/{CashierError-Zu3Whx-d.js → CashierError-BydkW7s_.js} +2 -2
- package/components/{CashierError-DfpdiheS.cjs → CashierError-Dpt_Z7yL.cjs} +1 -1
- package/components/{CashierError-yts9rF-i.js → CashierError-Dz_HsnJl.js} +2 -2
- package/components/{CashierHeader-BX6LLGb8.js → CashierHeader-86wrgmgP.js} +2 -2
- package/components/{CashierHeader-B9cdsOYh.cjs → CashierHeader-BXKYku0i.cjs} +1 -1
- package/components/{CashierHeader-C9V5_NVw.js → CashierHeader-DtS_U-De.js} +2 -2
- package/components/CashierIframeRedirect-BARMuRTc.cjs +1 -0
- package/components/CashierIframeRedirect-CmqcfGcT.js +429 -0
- package/components/CashierIframeRedirect-Xzpx4Rjk.js +429 -0
- package/components/CashierMethodDetails-Cf6KUGlj.cjs +99 -0
- package/components/{CashierMethodDetails-BC_DBHGl.js → CashierMethodDetails-DaUlJ18Q.js} +3452 -2899
- package/components/{CashierMethodDetails-ziDw_Jnc.js → CashierMethodDetails-oVkmdGDk.js} +3543 -2990
- package/components/CashierMethodsList-BKtn4kYZ.js +859 -0
- package/components/CashierMethodsList-BmNbGD7c.cjs +1 -0
- package/components/{CashierMethodsList-BSyNYqdF.js → CashierMethodsList-bnXzA9E8.js} +397 -402
- package/components/CashierModal-B4b12-Am.js +229 -0
- package/components/CashierModal-C-yyjQ8m.cjs +1 -0
- package/components/CashierModal-DCgiaC4V.js +229 -0
- package/components/{CashierNotifications-dn6rnyK_.js → CashierNotifications-BZCaBrRm.js} +1 -1
- package/components/{CashierNotifications-C48iLynX.js → CashierNotifications-CWqwdi55.js} +1 -1
- package/components/{CashierPage-eEYSJ1Ow.js → CashierPage-BhUYgsyn.js} +628 -475
- package/components/CashierPage-K6Sfcy3_.cjs +1 -0
- package/components/{CashierPage-TiCjNJq3.js → CashierPage-qGww6KeO.js} +629 -476
- package/components/CashierReceiptPage-B5GxOKJ9.cjs +1 -0
- package/components/CashierReceiptPage-BePAYhQV.js +1451 -0
- package/components/CashierReceiptPage-Hvc3tNuq.js +1453 -0
- package/components/CashierSessionExpirationModal-BCKPn-ln.cjs +2 -0
- package/components/CashierSessionExpirationModal-C24hf-_h.js +1205 -0
- package/components/CashierSessionExpirationModal-DfMX7unr.js +1205 -0
- package/components/CashierSpinner-BdeNFm1c.js +79 -0
- package/components/CashierSpinner-COjPdCUV.js +79 -0
- package/components/CashierSpinner-CpkB8Zoj.cjs +1 -0
- package/components/CashierTransactionHistory-BgDq7hN9.js +614 -0
- package/components/CashierTransactionHistory-BtkomNSc.js +614 -0
- package/components/CashierTransactionHistory-siYwxijY.cjs +1 -0
- package/components/{CashierVerifications-7iTWQJHM.js → CashierVerifications-7QimQj7T.js} +324 -277
- package/components/CashierVerifications-CjEiYZ7G.cjs +1 -0
- package/components/{CashierVerifications-DMXkMmMm.js → CashierVerifications-tYl7M23B.js} +332 -285
- package/components/{CashierVideoModal-CVDvqrcy.js → CashierVideoModal-CM_ySf75.js} +91 -94
- package/components/CashierVideoModal-CZSRGjh-.cjs +1 -0
- package/components/{CashierVideoModal-DHNu0BQz.js → CashierVideoModal-D4tXmX3D.js} +91 -94
- package/es2015/cashier-page.cjs +1 -1
- package/es2015/cashier-page.js +1 -1
- package/esnext/cashier-page.js +1 -1
- package/package.json +1 -1
- package/stencil/app-globals-0f993ce5-BD-Q0C8R.cjs +1 -0
- package/stencil/app-globals-0f993ce5-Cgk0KVAu.js +7 -0
- package/stencil/index-b2193545-B8kMF2bI.cjs +1 -0
- package/stencil/index-b2193545-BoSqyMpB.js +519 -0
- package/stencil/index-b2193545-D4dOaNlR.js +503 -0
- package/stencil/{ui-image-C7s6Uvn5.js → ui-image-BWJXFWH1.js} +1 -1
- package/stencil/{ui-image-BaHsVAxH.cjs → ui-image-ByEXiBzx.cjs} +1 -1
- package/stencil/{ui-image-CHeV8e9p.js → ui-image-DIEeZy5u.js} +1 -1
- package/stencil/ui-skeleton-4-zrLsIW.js +11 -0
- package/stencil/ui-skeleton-9boHSjtG.js +29 -0
- package/stencil/ui-skeleton-_yJvAdAL.cjs +1 -0
- package/stencil/ui-skeleton-ae35c6f2-8tYGV8SR.js +155 -0
- package/stencil/ui-skeleton-ae35c6f2-CKgUXOQC.cjs +55 -0
- package/stencil/ui-skeleton-ae35c6f2-IN_dPA5_.js +155 -0
- package/components/CashierIframeRedirect-3Ttb1Wdk.js +0 -378
- package/components/CashierIframeRedirect-BIMJNSib.js +0 -378
- package/components/CashierIframeRedirect-NF0DKl7A.cjs +0 -1
- package/components/CashierMethodDetails-BprYcCjn.cjs +0 -84
- package/components/CashierMethodsList-B_95Nh79.js +0 -864
- package/components/CashierMethodsList-DYPLv5X8.cjs +0 -1
- package/components/CashierModal-BrwIBn9a.js +0 -232
- package/components/CashierModal-BuM2Yq-y.cjs +0 -1
- package/components/CashierModal-ZfKvGxFq.js +0 -232
- package/components/CashierPage-CLnWIWI0.cjs +0 -1
- package/components/CashierReceiptPage-B_Pn8b0K.cjs +0 -1
- package/components/CashierReceiptPage-CCt-NEa3.js +0 -1174
- package/components/CashierReceiptPage-XKvPw6Kc.js +0 -1172
- package/components/CashierSessionExpirationModal-BTK1_Bln.js +0 -1208
- package/components/CashierSessionExpirationModal-CH6Jq1b5.js +0 -1208
- package/components/CashierSessionExpirationModal-NsD2ZKK4.cjs +0 -2
- package/components/CashierSpinner-BAfTKICK.js +0 -71
- package/components/CashierSpinner-BhmndmKG.cjs +0 -1
- package/components/CashierSpinner-y6HodxHT.js +0 -71
- package/components/CashierTransactionHistory-CAZZIa-n.js +0 -569
- package/components/CashierTransactionHistory-CSbp2Y4-.js +0 -569
- package/components/CashierTransactionHistory-DeOc9EpW.cjs +0 -1
- package/components/CashierVerifications-CWGsoL5R.cjs +0 -1
- package/components/CashierVideoModal-BZg_b6bd.cjs +0 -1
- package/stencil/app-globals-0f993ce5-D-kw1sls.js +0 -5
- package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +0 -1
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { r, h as t, H as n } from "./index-b2193545-D4dOaNlR.js";
|
|
2
|
+
const s = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", a = s, l = class {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
r(this, e), this.stylingValue = {
|
|
5
|
+
width: this.handleStylingProps(this.width),
|
|
6
|
+
height: this.handleStylingProps(this.height),
|
|
7
|
+
borderRadius: this.handleStylingProps(this.borderRadius),
|
|
8
|
+
marginBottom: this.handleStylingProps(this.marginBottom),
|
|
9
|
+
marginTop: this.handleStylingProps(this.marginTop),
|
|
10
|
+
marginLeft: this.handleStylingProps(this.marginLeft),
|
|
11
|
+
marginRight: this.handleStylingProps(this.marginRight),
|
|
12
|
+
size: this.handleStylingProps(this.size)
|
|
13
|
+
}, this.structure = void 0, this.width = "unset", this.height = "unset", this.borderRadius = "unset", this.marginBottom = "unset", this.marginTop = "unset", this.marginLeft = "unset", this.marginRight = "unset", this.animation = !0, this.rows = 0, this.size = "100%";
|
|
14
|
+
}
|
|
15
|
+
handleStructureChange(e, i) {
|
|
16
|
+
i !== e && this.handleStructure(e);
|
|
17
|
+
}
|
|
18
|
+
handleStylingProps(e) {
|
|
19
|
+
switch (typeof e) {
|
|
20
|
+
case "number":
|
|
21
|
+
return e === 0 ? 0 : `${e}px`;
|
|
22
|
+
case "undefined":
|
|
23
|
+
return "unset";
|
|
24
|
+
case "string":
|
|
25
|
+
return ["auto", "unset", "none", "inherit", "initial"].includes(e) || e.endsWith("px") || e.endsWith("%") ? e : "unset";
|
|
26
|
+
default:
|
|
27
|
+
return "unset";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
handleStructure(e) {
|
|
31
|
+
switch (e) {
|
|
32
|
+
case "logo":
|
|
33
|
+
return this.renderLogo();
|
|
34
|
+
case "image":
|
|
35
|
+
return this.renderImage();
|
|
36
|
+
case "title":
|
|
37
|
+
return this.renderTitle();
|
|
38
|
+
case "text":
|
|
39
|
+
return this.renderText();
|
|
40
|
+
case "rectangle":
|
|
41
|
+
return this.renderRectangle();
|
|
42
|
+
case "circle":
|
|
43
|
+
return this.renderCircle();
|
|
44
|
+
default:
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
renderLogo() {
|
|
49
|
+
return t("div", { class: "SkeletonContainer" }, t("div", { class: "Logo " + (this.animation ? "Skeleton" : "") }));
|
|
50
|
+
}
|
|
51
|
+
renderImage() {
|
|
52
|
+
return t("div", { class: "Image " + (this.animation ? "Skeleton" : "") });
|
|
53
|
+
}
|
|
54
|
+
renderTitle() {
|
|
55
|
+
return t("div", { class: "SkeletonContainer" }, t("div", { class: "Title " + (this.animation ? "Skeleton" : "") }));
|
|
56
|
+
}
|
|
57
|
+
renderText() {
|
|
58
|
+
return t("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((e, i) => t("div", { key: i, class: "Text " + (this.animation ? "Skeleton" : "") })));
|
|
59
|
+
}
|
|
60
|
+
renderRectangle() {
|
|
61
|
+
return t("div", { class: "SkeletonContainer" }, t("div", { class: "Rectangle " + (this.animation ? "Skeleton" : "") }));
|
|
62
|
+
}
|
|
63
|
+
renderCircle() {
|
|
64
|
+
return t("div", { class: "SkeletonContainer" }, t("div", { class: "Circle " + (this.animation ? "Skeleton" : "") }));
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
let e = "";
|
|
68
|
+
switch (this.structure) {
|
|
69
|
+
case "logo":
|
|
70
|
+
e = `
|
|
71
|
+
:host {
|
|
72
|
+
--emw-skeleton-logo-width: ${this.stylingValue.width};
|
|
73
|
+
--emw-skeleton-logo-height: ${this.stylingValue.height};
|
|
74
|
+
--emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
|
|
75
|
+
--emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
|
|
76
|
+
--emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
|
|
77
|
+
--emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
|
|
78
|
+
--emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
break;
|
|
82
|
+
case "image":
|
|
83
|
+
e = `
|
|
84
|
+
:host {
|
|
85
|
+
--emw-skeleton-image-width: ${this.stylingValue.width};
|
|
86
|
+
--emw-skeleton-image-height: ${this.stylingValue.height};
|
|
87
|
+
--emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
|
|
88
|
+
--emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
|
|
89
|
+
--emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
|
|
90
|
+
--emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
|
|
91
|
+
--emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
break;
|
|
95
|
+
case "title":
|
|
96
|
+
e = `
|
|
97
|
+
:host {
|
|
98
|
+
--emw-skeleton-title-width: ${this.stylingValue.width};
|
|
99
|
+
--emw-skeleton-title-height: ${this.stylingValue.height};
|
|
100
|
+
--emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
|
|
101
|
+
--emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
|
|
102
|
+
--emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
|
|
103
|
+
--emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
|
|
104
|
+
--emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
break;
|
|
108
|
+
case "text":
|
|
109
|
+
e = `
|
|
110
|
+
:host {
|
|
111
|
+
--emw-skeleton-text-width: ${this.stylingValue.width};
|
|
112
|
+
--emw-skeleton-text-height: ${this.stylingValue.height};
|
|
113
|
+
--emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
|
|
114
|
+
--emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
|
|
115
|
+
--emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
|
|
116
|
+
--emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
|
|
117
|
+
--emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
break;
|
|
121
|
+
case "rectangle":
|
|
122
|
+
e = `
|
|
123
|
+
:host {
|
|
124
|
+
--emw-skeleton-rectangle-width: ${this.stylingValue.width};
|
|
125
|
+
--emw-skeleton-rectangle-height: ${this.stylingValue.height};
|
|
126
|
+
--emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
|
|
127
|
+
--emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
|
|
128
|
+
--emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
|
|
129
|
+
--emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
|
|
130
|
+
--emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
|
|
131
|
+
}
|
|
132
|
+
`;
|
|
133
|
+
break;
|
|
134
|
+
case "circle":
|
|
135
|
+
e = `
|
|
136
|
+
:host {
|
|
137
|
+
--emw-skeleton-circle-size: ${this.stylingValue.size};
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
break;
|
|
141
|
+
default:
|
|
142
|
+
e = "";
|
|
143
|
+
}
|
|
144
|
+
return t(n, { key: "e6b885bfd985ce7663d990756fe9101e25eb97f0" }, t("style", { key: "06ae24c7bb74f4dacfc12ae58085333f9dc89da5" }, e), this.handleStructure(this.structure));
|
|
145
|
+
}
|
|
146
|
+
static get watchers() {
|
|
147
|
+
return {
|
|
148
|
+
structure: ["handleStructureChange"]
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
l.style = a;
|
|
153
|
+
export {
|
|
154
|
+
l as U
|
|
155
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";const t=require("./index-b2193545-B8kMF2bI.cjs"),r=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}",s=r,n=class{constructor(e){t.registerInstance(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,i){i!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return e===0?0:`${e}px`;case"undefined":return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset";default:return"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return t.h("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return t.h("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map((e,i)=>t.h("div",{key:i,class:"Text "+(this.animation?"Skeleton":"")})))}renderRectangle(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`
|
|
2
|
+
:host {
|
|
3
|
+
--emw-skeleton-logo-width: ${this.stylingValue.width};
|
|
4
|
+
--emw-skeleton-logo-height: ${this.stylingValue.height};
|
|
5
|
+
--emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
|
|
6
|
+
--emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
|
|
7
|
+
--emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
|
|
8
|
+
--emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
|
|
9
|
+
--emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
|
|
10
|
+
}
|
|
11
|
+
`;break;case"image":e=`
|
|
12
|
+
:host {
|
|
13
|
+
--emw-skeleton-image-width: ${this.stylingValue.width};
|
|
14
|
+
--emw-skeleton-image-height: ${this.stylingValue.height};
|
|
15
|
+
--emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
|
|
16
|
+
--emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
|
|
17
|
+
--emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
|
|
18
|
+
--emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
|
|
19
|
+
--emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
|
|
20
|
+
}
|
|
21
|
+
`;break;case"title":e=`
|
|
22
|
+
:host {
|
|
23
|
+
--emw-skeleton-title-width: ${this.stylingValue.width};
|
|
24
|
+
--emw-skeleton-title-height: ${this.stylingValue.height};
|
|
25
|
+
--emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
|
|
26
|
+
--emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
|
|
27
|
+
--emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
|
|
28
|
+
--emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
|
|
29
|
+
--emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
|
|
30
|
+
}
|
|
31
|
+
`;break;case"text":e=`
|
|
32
|
+
:host {
|
|
33
|
+
--emw-skeleton-text-width: ${this.stylingValue.width};
|
|
34
|
+
--emw-skeleton-text-height: ${this.stylingValue.height};
|
|
35
|
+
--emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
|
|
36
|
+
--emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
|
|
37
|
+
--emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
|
|
38
|
+
--emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
|
|
39
|
+
--emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
|
|
40
|
+
}
|
|
41
|
+
`;break;case"rectangle":e=`
|
|
42
|
+
:host {
|
|
43
|
+
--emw-skeleton-rectangle-width: ${this.stylingValue.width};
|
|
44
|
+
--emw-skeleton-rectangle-height: ${this.stylingValue.height};
|
|
45
|
+
--emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
|
|
46
|
+
--emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
|
|
47
|
+
--emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
|
|
48
|
+
--emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
|
|
49
|
+
--emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
|
|
50
|
+
}
|
|
51
|
+
`;break;case"circle":e=`
|
|
52
|
+
:host {
|
|
53
|
+
--emw-skeleton-circle-size: ${this.stylingValue.size};
|
|
54
|
+
}
|
|
55
|
+
`;break;default:e=""}return t.h(t.Host,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},t.h("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};n.style=s;exports.UiSkeleton=n;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { r, h as t, H as n } from "./index-b2193545-BoSqyMpB.js";
|
|
2
|
+
const s = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", a = s, l = class {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
r(this, e), this.stylingValue = {
|
|
5
|
+
width: this.handleStylingProps(this.width),
|
|
6
|
+
height: this.handleStylingProps(this.height),
|
|
7
|
+
borderRadius: this.handleStylingProps(this.borderRadius),
|
|
8
|
+
marginBottom: this.handleStylingProps(this.marginBottom),
|
|
9
|
+
marginTop: this.handleStylingProps(this.marginTop),
|
|
10
|
+
marginLeft: this.handleStylingProps(this.marginLeft),
|
|
11
|
+
marginRight: this.handleStylingProps(this.marginRight),
|
|
12
|
+
size: this.handleStylingProps(this.size)
|
|
13
|
+
}, this.structure = void 0, this.width = "unset", this.height = "unset", this.borderRadius = "unset", this.marginBottom = "unset", this.marginTop = "unset", this.marginLeft = "unset", this.marginRight = "unset", this.animation = !0, this.rows = 0, this.size = "100%";
|
|
14
|
+
}
|
|
15
|
+
handleStructureChange(e, i) {
|
|
16
|
+
i !== e && this.handleStructure(e);
|
|
17
|
+
}
|
|
18
|
+
handleStylingProps(e) {
|
|
19
|
+
switch (typeof e) {
|
|
20
|
+
case "number":
|
|
21
|
+
return e === 0 ? 0 : `${e}px`;
|
|
22
|
+
case "undefined":
|
|
23
|
+
return "unset";
|
|
24
|
+
case "string":
|
|
25
|
+
return ["auto", "unset", "none", "inherit", "initial"].includes(e) || e.endsWith("px") || e.endsWith("%") ? e : "unset";
|
|
26
|
+
default:
|
|
27
|
+
return "unset";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
handleStructure(e) {
|
|
31
|
+
switch (e) {
|
|
32
|
+
case "logo":
|
|
33
|
+
return this.renderLogo();
|
|
34
|
+
case "image":
|
|
35
|
+
return this.renderImage();
|
|
36
|
+
case "title":
|
|
37
|
+
return this.renderTitle();
|
|
38
|
+
case "text":
|
|
39
|
+
return this.renderText();
|
|
40
|
+
case "rectangle":
|
|
41
|
+
return this.renderRectangle();
|
|
42
|
+
case "circle":
|
|
43
|
+
return this.renderCircle();
|
|
44
|
+
default:
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
renderLogo() {
|
|
49
|
+
return t("div", { class: "SkeletonContainer" }, t("div", { class: "Logo " + (this.animation ? "Skeleton" : "") }));
|
|
50
|
+
}
|
|
51
|
+
renderImage() {
|
|
52
|
+
return t("div", { class: "Image " + (this.animation ? "Skeleton" : "") });
|
|
53
|
+
}
|
|
54
|
+
renderTitle() {
|
|
55
|
+
return t("div", { class: "SkeletonContainer" }, t("div", { class: "Title " + (this.animation ? "Skeleton" : "") }));
|
|
56
|
+
}
|
|
57
|
+
renderText() {
|
|
58
|
+
return t("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((e, i) => t("div", { key: i, class: "Text " + (this.animation ? "Skeleton" : "") })));
|
|
59
|
+
}
|
|
60
|
+
renderRectangle() {
|
|
61
|
+
return t("div", { class: "SkeletonContainer" }, t("div", { class: "Rectangle " + (this.animation ? "Skeleton" : "") }));
|
|
62
|
+
}
|
|
63
|
+
renderCircle() {
|
|
64
|
+
return t("div", { class: "SkeletonContainer" }, t("div", { class: "Circle " + (this.animation ? "Skeleton" : "") }));
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
let e = "";
|
|
68
|
+
switch (this.structure) {
|
|
69
|
+
case "logo":
|
|
70
|
+
e = `
|
|
71
|
+
:host {
|
|
72
|
+
--emw-skeleton-logo-width: ${this.stylingValue.width};
|
|
73
|
+
--emw-skeleton-logo-height: ${this.stylingValue.height};
|
|
74
|
+
--emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
|
|
75
|
+
--emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
|
|
76
|
+
--emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
|
|
77
|
+
--emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
|
|
78
|
+
--emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
break;
|
|
82
|
+
case "image":
|
|
83
|
+
e = `
|
|
84
|
+
:host {
|
|
85
|
+
--emw-skeleton-image-width: ${this.stylingValue.width};
|
|
86
|
+
--emw-skeleton-image-height: ${this.stylingValue.height};
|
|
87
|
+
--emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
|
|
88
|
+
--emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
|
|
89
|
+
--emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
|
|
90
|
+
--emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
|
|
91
|
+
--emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
break;
|
|
95
|
+
case "title":
|
|
96
|
+
e = `
|
|
97
|
+
:host {
|
|
98
|
+
--emw-skeleton-title-width: ${this.stylingValue.width};
|
|
99
|
+
--emw-skeleton-title-height: ${this.stylingValue.height};
|
|
100
|
+
--emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
|
|
101
|
+
--emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
|
|
102
|
+
--emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
|
|
103
|
+
--emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
|
|
104
|
+
--emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
break;
|
|
108
|
+
case "text":
|
|
109
|
+
e = `
|
|
110
|
+
:host {
|
|
111
|
+
--emw-skeleton-text-width: ${this.stylingValue.width};
|
|
112
|
+
--emw-skeleton-text-height: ${this.stylingValue.height};
|
|
113
|
+
--emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
|
|
114
|
+
--emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
|
|
115
|
+
--emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
|
|
116
|
+
--emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
|
|
117
|
+
--emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
break;
|
|
121
|
+
case "rectangle":
|
|
122
|
+
e = `
|
|
123
|
+
:host {
|
|
124
|
+
--emw-skeleton-rectangle-width: ${this.stylingValue.width};
|
|
125
|
+
--emw-skeleton-rectangle-height: ${this.stylingValue.height};
|
|
126
|
+
--emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
|
|
127
|
+
--emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
|
|
128
|
+
--emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
|
|
129
|
+
--emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
|
|
130
|
+
--emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
|
|
131
|
+
}
|
|
132
|
+
`;
|
|
133
|
+
break;
|
|
134
|
+
case "circle":
|
|
135
|
+
e = `
|
|
136
|
+
:host {
|
|
137
|
+
--emw-skeleton-circle-size: ${this.stylingValue.size};
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
break;
|
|
141
|
+
default:
|
|
142
|
+
e = "";
|
|
143
|
+
}
|
|
144
|
+
return t(n, { key: "e6b885bfd985ce7663d990756fe9101e25eb97f0" }, t("style", { key: "06ae24c7bb74f4dacfc12ae58085333f9dc89da5" }, e), this.handleStructure(this.structure));
|
|
145
|
+
}
|
|
146
|
+
static get watchers() {
|
|
147
|
+
return {
|
|
148
|
+
structure: ["handleStructureChange"]
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
l.style = a;
|
|
153
|
+
export {
|
|
154
|
+
l as U
|
|
155
|
+
};
|