@descope/web-components-ui 1.0.353 → 1.0.355

Sign up to get free protection for your applications and to get access to all the features.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Descope <help@descope.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1992,6 +1992,7 @@ const errorAttributes = {
1992
1992
  patternMismatch: 'data-errormessage-pattern-mismatch',
1993
1993
  tooShort: 'data-errormessage-pattern-mismatch-too-short',
1994
1994
  tooLong: 'data-errormessage-pattern-mismatch-too-long',
1995
+ typeMismatch: 'data-errormessage-type-mismatch',
1995
1996
  };
1996
1997
 
1997
1998
  const validationTargetSymbol = Symbol('validationTarget');
@@ -2050,6 +2051,11 @@ const inputValidationMixin = (superclass) =>
2050
2051
  return `At most ${this.getAttribute('max-items-selection')} items are allowed.`;
2051
2052
  }
2052
2053
 
2054
+ // eslint-disable-next-line class-methods-use-this
2055
+ get defaultErrorMsgTypeMismatch() {
2056
+ return `Please match the requested type.`;
2057
+ }
2058
+
2053
2059
  getErrorMessage(flags) {
2054
2060
  const {
2055
2061
  valueMissing,
@@ -2073,6 +2079,10 @@ const inputValidationMixin = (superclass) =>
2073
2079
  this.getAttribute(errorAttributes.patternMismatch) ||
2074
2080
  this.defaultErrorMsgPatternMismatch
2075
2081
  );
2082
+ case typeMismatch:
2083
+ return (
2084
+ this.getAttribute(errorAttributes.typeMismatch) || this.defaultErrorMsgTypeMismatch
2085
+ );
2076
2086
  case tooShort:
2077
2087
  return this.getAttribute(errorAttributes.tooShort) || this.defaultErrorMsgTooShort;
2078
2088
  case tooLong: