@descope/web-components-ui 1.0.190 → 1.0.191
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.js +21 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +21 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1000.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-upload-file/UploadFileClass.js +6 -0
- package/src/mixins/proxyInputMixin.js +15 -0
package/dist/cjs/index.cjs.js
CHANGED
@@ -2090,6 +2090,21 @@ const proxyInputMixin =
|
|
2090
2090
|
this.setAttribute('error-message', this.validationMessage);
|
2091
2091
|
}
|
2092
2092
|
|
2093
|
+
// We do not want to show the default validity report tooltip
|
2094
|
+
// So we are overriding the reportValidity fn to show the input's error message
|
2095
|
+
reportValidity = () => {
|
2096
|
+
if (!this.checkValidity()) {
|
2097
|
+
this.setAttribute('invalid', 'true');
|
2098
|
+
this.#handleErrorMessage();
|
2099
|
+
this.focus();
|
2100
|
+
}
|
2101
|
+
};
|
2102
|
+
|
2103
|
+
// we are keeping also the default reportValidity because there are some components that still using it
|
2104
|
+
defaultReportValidity() {
|
2105
|
+
return super.reportValidity();
|
2106
|
+
}
|
2107
|
+
|
2093
2108
|
init() {
|
2094
2109
|
super.init?.();
|
2095
2110
|
|
@@ -7026,6 +7041,12 @@ class RawUploadFile extends BaseInputClass {
|
|
7026
7041
|
};
|
7027
7042
|
}
|
7028
7043
|
|
7044
|
+
// this is a temp solution,
|
7045
|
+
// we should show the input error message like we have in all other inputs
|
7046
|
+
reportValidity() {
|
7047
|
+
this.defaultReportValidity();
|
7048
|
+
}
|
7049
|
+
|
7029
7050
|
getValidity() {
|
7030
7051
|
if (this.isRequired && !this.value) {
|
7031
7052
|
return { valueMissing: true };
|