@voxie/contacts.js 1.0.0 → 1.0.1
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/contacts.js +15 -11
- package/package.json +1 -1
package/dist/contacts.js
CHANGED
|
@@ -2971,12 +2971,8 @@ class ud {
|
|
|
2971
2971
|
}
|
|
2972
2972
|
});
|
|
2973
2973
|
});
|
|
2974
|
-
c(this, "toggle", () =>
|
|
2975
|
-
|
|
2976
|
-
});
|
|
2977
|
-
c(this, "toggleTerms", () => {
|
|
2978
|
-
this.termsVisible ? this.closeTerms() : this.openTerms(), this.termsVisible = !this.termsVisible;
|
|
2979
|
-
});
|
|
2974
|
+
c(this, "toggle", () => this.closed ? this.open() : this.close());
|
|
2975
|
+
c(this, "toggleTerms", () => this.termsVisible ? this.closeTerms() : this.openTerms());
|
|
2980
2976
|
c(this, "setClasses", (n, ...e) => n && n.setAttribute("class", e.join(" ")));
|
|
2981
2977
|
c(this, "close", () => {
|
|
2982
2978
|
this.setClasses(
|
|
@@ -2995,7 +2991,7 @@ class ud {
|
|
|
2995
2991
|
this.elements.xmark,
|
|
2996
2992
|
this.classes.xmark.base,
|
|
2997
2993
|
this.classes.xmark.closed
|
|
2998
|
-
);
|
|
2994
|
+
), this.closed = !0;
|
|
2999
2995
|
});
|
|
3000
2996
|
c(this, "open", () => {
|
|
3001
2997
|
this.setClasses(
|
|
@@ -3014,14 +3010,14 @@ class ud {
|
|
|
3014
3010
|
this.elements.xmark,
|
|
3015
3011
|
this.classes.xmark.base,
|
|
3016
3012
|
this.classes.xmark.open
|
|
3017
|
-
);
|
|
3013
|
+
), this.closed = !1;
|
|
3018
3014
|
});
|
|
3019
3015
|
c(this, "openTerms", () => {
|
|
3020
3016
|
this.setClasses(
|
|
3021
3017
|
document.getElementById("vx-terms-arrow"),
|
|
3022
3018
|
"transition vx-mt-0.5",
|
|
3023
3019
|
"vx-rotate-180"
|
|
3024
|
-
), this.setClasses(document.getElementById("vx-terms-content"), "vx-mt-3", "");
|
|
3020
|
+
), this.setClasses(document.getElementById("vx-terms-content"), "vx-mt-3", ""), this.termsVisible = !0;
|
|
3025
3021
|
});
|
|
3026
3022
|
c(this, "closeTerms", () => {
|
|
3027
3023
|
this.setClasses(
|
|
@@ -3032,7 +3028,7 @@ class ud {
|
|
|
3032
3028
|
document.getElementById("vx-terms-content"),
|
|
3033
3029
|
"vx-mt-3",
|
|
3034
3030
|
"vx-hidden"
|
|
3035
|
-
);
|
|
3031
|
+
), this.termsVisible = !1;
|
|
3036
3032
|
});
|
|
3037
3033
|
c(this, "html", () => `<div id='vx-pop-up' style='visibility: hidden'>
|
|
3038
3034
|
<script src='https://kit.fontawesome.com/06f511676f.js' crossorigin='anonymous'><\/script>
|
|
@@ -3190,7 +3186,15 @@ class ud {
|
|
|
3190
3186
|
}
|
|
3191
3187
|
`);
|
|
3192
3188
|
var i;
|
|
3193
|
-
this.captureFn = n,
|
|
3189
|
+
if (this.captureFn = n, e)
|
|
3190
|
+
this.name = e;
|
|
3191
|
+
else
|
|
3192
|
+
throw new Error("name required for pop-up");
|
|
3193
|
+
if (r)
|
|
3194
|
+
this.terms = r;
|
|
3195
|
+
else
|
|
3196
|
+
throw new Error("terms required for pop-up");
|
|
3197
|
+
this.elements = {
|
|
3194
3198
|
container: null,
|
|
3195
3199
|
toggle: null,
|
|
3196
3200
|
terms: null,
|
package/package.json
CHANGED