videomail-client 13.1.2 → 13.1.3
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/index.cjs +9 -3
- package/dist/esm/index.js +9 -3
- package/dist/esm/util/getValidity.d.ts +2 -0
- package/dist/umd/index.js +9 -3
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -10664,7 +10664,7 @@ var __webpack_exports__ = {};
|
|
|
10664
10664
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10665
10665
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10666
10666
|
var package_namespaceObject = {
|
|
10667
|
-
rE: "13.1.
|
|
10667
|
+
rE: "13.1.3"
|
|
10668
10668
|
};
|
|
10669
10669
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10670
10670
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -14338,6 +14338,11 @@ var __webpack_exports__ = {};
|
|
|
14338
14338
|
}
|
|
14339
14339
|
Despot_define_property(Despot_Despot, "EMITTER", createNanoEvents());
|
|
14340
14340
|
const Despot = Despot_Despot;
|
|
14341
|
+
function getValidity(element) {
|
|
14342
|
+
const validity = "validity" in element ? element.validity : void 0;
|
|
14343
|
+
return validity;
|
|
14344
|
+
}
|
|
14345
|
+
const util_getValidity = getValidity;
|
|
14341
14346
|
function hideElement(element) {
|
|
14342
14347
|
if (!element) return;
|
|
14343
14348
|
element.style.setProperty("display", "none", "important");
|
|
@@ -14616,7 +14621,7 @@ var __webpack_exports__ = {};
|
|
|
14616
14621
|
getInvalidElement() {
|
|
14617
14622
|
const elements = this.getRegisteredFormElements();
|
|
14618
14623
|
for (const element of elements){
|
|
14619
|
-
const validity =
|
|
14624
|
+
const validity = util_getValidity(element);
|
|
14620
14625
|
if (!(null == validity ? void 0 : validity.valid)) return element;
|
|
14621
14626
|
}
|
|
14622
14627
|
return null;
|
|
@@ -18697,12 +18702,13 @@ var __webpack_exports__ = {};
|
|
|
18697
18702
|
const invalidInput = this.form.getInvalidElement();
|
|
18698
18703
|
if (invalidInput) {
|
|
18699
18704
|
const name = invalidInput.getAttribute("name");
|
|
18705
|
+
const validity = util_getValidity(invalidInput);
|
|
18700
18706
|
valid = false;
|
|
18701
18707
|
if (name) {
|
|
18702
|
-
whyInvalid = `Input "${name}" seems wrong 🤔`;
|
|
18703
18708
|
invalidData = {
|
|
18704
18709
|
[name]: invalidInput.getAttribute("value")
|
|
18705
18710
|
};
|
|
18711
|
+
whyInvalid = (null == validity ? void 0 : validity.valueMissing) ? `Please fill out field "${name}" ⚠️` : `Input "${name}" seems wrong 🤔`;
|
|
18706
18712
|
}
|
|
18707
18713
|
} else if (!this.areVisualsHidden() && !visualsValid) {
|
|
18708
18714
|
if (this.buttonsAreReady() || this.isRecording() || this.isPaused() || this.isCountingDown()) {
|
package/dist/esm/index.js
CHANGED
|
@@ -3606,7 +3606,7 @@ const constants = {
|
|
|
3606
3606
|
}
|
|
3607
3607
|
};
|
|
3608
3608
|
var package_namespaceObject = {
|
|
3609
|
-
rE: "13.1.
|
|
3609
|
+
rE: "13.1.3"
|
|
3610
3610
|
};
|
|
3611
3611
|
function canPlayType_canPlayType(video, type) {
|
|
3612
3612
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
@@ -3981,6 +3981,11 @@ class Despot {
|
|
|
3981
3981
|
}
|
|
3982
3982
|
}
|
|
3983
3983
|
const util_Despot = Despot;
|
|
3984
|
+
function getValidity(element) {
|
|
3985
|
+
const validity = "validity" in element ? element.validity : void 0;
|
|
3986
|
+
return validity;
|
|
3987
|
+
}
|
|
3988
|
+
const util_getValidity = getValidity;
|
|
3984
3989
|
function hideElement(element) {
|
|
3985
3990
|
if (!element) return;
|
|
3986
3991
|
element.style.setProperty("display", "none", "important");
|
|
@@ -4238,7 +4243,7 @@ class Form extends util_Despot {
|
|
|
4238
4243
|
getInvalidElement() {
|
|
4239
4244
|
const elements = this.getRegisteredFormElements();
|
|
4240
4245
|
for (const element of elements){
|
|
4241
|
-
const validity =
|
|
4246
|
+
const validity = util_getValidity(element);
|
|
4242
4247
|
if (!validity?.valid) return element;
|
|
4243
4248
|
}
|
|
4244
4249
|
return null;
|
|
@@ -7961,12 +7966,13 @@ class Container extends util_Despot {
|
|
|
7961
7966
|
const invalidInput = this.form.getInvalidElement();
|
|
7962
7967
|
if (invalidInput) {
|
|
7963
7968
|
const name = invalidInput.getAttribute("name");
|
|
7969
|
+
const validity = util_getValidity(invalidInput);
|
|
7964
7970
|
valid = false;
|
|
7965
7971
|
if (name) {
|
|
7966
|
-
whyInvalid = `Input "${name}" seems wrong 🤔`;
|
|
7967
7972
|
invalidData = {
|
|
7968
7973
|
[name]: invalidInput.getAttribute("value")
|
|
7969
7974
|
};
|
|
7975
|
+
whyInvalid = validity?.valueMissing ? `Please fill out field "${name}" ⚠️` : `Input "${name}" seems wrong 🤔`;
|
|
7970
7976
|
}
|
|
7971
7977
|
} else if (!this.areVisualsHidden() && !visualsValid) {
|
|
7972
7978
|
if (this.buttonsAreReady() || this.isRecording() || this.isPaused() || this.isCountingDown()) {
|
package/dist/umd/index.js
CHANGED
|
@@ -10670,7 +10670,7 @@
|
|
|
10670
10670
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10671
10671
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10672
10672
|
var package_namespaceObject = {
|
|
10673
|
-
rE: "13.1.
|
|
10673
|
+
rE: "13.1.3"
|
|
10674
10674
|
};
|
|
10675
10675
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10676
10676
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -14316,6 +14316,11 @@
|
|
|
14316
14316
|
}
|
|
14317
14317
|
}
|
|
14318
14318
|
const util_Despot = Despot;
|
|
14319
|
+
function getValidity(element) {
|
|
14320
|
+
const validity = "validity" in element ? element.validity : void 0;
|
|
14321
|
+
return validity;
|
|
14322
|
+
}
|
|
14323
|
+
const util_getValidity = getValidity;
|
|
14319
14324
|
function hideElement(element) {
|
|
14320
14325
|
if (!element) return;
|
|
14321
14326
|
element.style.setProperty("display", "none", "important");
|
|
@@ -14573,7 +14578,7 @@
|
|
|
14573
14578
|
getInvalidElement() {
|
|
14574
14579
|
const elements = this.getRegisteredFormElements();
|
|
14575
14580
|
for (const element of elements){
|
|
14576
|
-
const validity =
|
|
14581
|
+
const validity = util_getValidity(element);
|
|
14577
14582
|
if (!validity?.valid) return element;
|
|
14578
14583
|
}
|
|
14579
14584
|
return null;
|
|
@@ -18376,12 +18381,13 @@
|
|
|
18376
18381
|
const invalidInput = this.form.getInvalidElement();
|
|
18377
18382
|
if (invalidInput) {
|
|
18378
18383
|
const name = invalidInput.getAttribute("name");
|
|
18384
|
+
const validity = util_getValidity(invalidInput);
|
|
18379
18385
|
valid = false;
|
|
18380
18386
|
if (name) {
|
|
18381
|
-
whyInvalid = `Input "${name}" seems wrong 🤔`;
|
|
18382
18387
|
invalidData = {
|
|
18383
18388
|
[name]: invalidInput.getAttribute("value")
|
|
18384
18389
|
};
|
|
18390
|
+
whyInvalid = validity?.valueMissing ? `Please fill out field "${name}" ⚠️` : `Input "${name}" seems wrong 🤔`;
|
|
18385
18391
|
}
|
|
18386
18392
|
} else if (!this.areVisualsHidden() && !visualsValid) {
|
|
18387
18393
|
if (this.buttonsAreReady() || this.isRecording() || this.isPaused() || this.isCountingDown()) {
|