@descope/flow-components 3.20.2 → 3.20.4
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/fm/114.js +1 -1
- package/dist/fm/114.js.map +1 -1
- package/dist/fm/222.js +1 -1
- package/dist/fm/222.js.map +1 -1
- package/dist/fm/467.js +1 -1
- package/dist/fm/467.js.map +1 -1
- package/dist/fm/985.js +1 -1
- package/dist/fm/985.js.map +1 -1
- package/dist/fm/__federation_expose_componentClasses.js +1 -1
- package/dist/fm/__federation_expose_componentClasses.js.map +1 -1
- package/dist/fm/__federation_expose_components.js +1 -1
- package/dist/fm/__federation_expose_theme.js +1 -1
- package/dist/fm/__federation_expose_theme.js.map +1 -1
- package/dist/fm/flowComponents.js +1 -1
- package/dist/fm/flowComponents.js.map +1 -1
- package/dist/fm/main.js +1 -1
- package/dist/fm/main.js.map +1 -1
- package/dist/fm/mf-manifest.json +1 -1
- package/dist/fm/mf-stats.json +1 -1
- package/dist/index.cjs.js +57 -2
- package/package.json +6 -5
package/dist/fm/mf-manifest.json
CHANGED
package/dist/fm/mf-stats.json
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -99122,25 +99122,80 @@ function requireIndex_cjs () {
|
|
|
99122
99122
|
vars: vars$E
|
|
99123
99123
|
});
|
|
99124
99124
|
|
|
99125
|
+
// Kept in its own module (with no imports) so it can be unit tested without
|
|
99126
|
+
// pulling in the whole component / vaadin dependency chain.
|
|
99127
|
+
|
|
99128
|
+
const asciiPattern = "^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$";
|
|
99129
|
+
|
|
99130
|
+
const unicodePattern =
|
|
99131
|
+
"^[\\p{L}\\p{M}\\p{N}._%+'\\-]+@[\\p{L}\\p{M}\\p{N}.\\-]+\\.[\\p{L}\\p{M}][\\p{L}\\p{M}\\p{N}\\-]+$";
|
|
99132
|
+
|
|
99125
99133
|
const componentName$P = getComponentName$1('email-field');
|
|
99126
99134
|
|
|
99127
|
-
const defaultPattern = "^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$";
|
|
99128
99135
|
const defaultAutocomplete = 'username';
|
|
99136
|
+
const defaultInputMode = 'email';
|
|
99129
99137
|
|
|
99130
99138
|
const customMixin$8 = (superclass) =>
|
|
99131
99139
|
class EmailFieldMixinClass extends superclass {
|
|
99140
|
+
// On by default - `accept-unicode="false"` restores the pre-unicode field:
|
|
99141
|
+
// native `type="email"` validation and the ASCII pattern.
|
|
99142
|
+
//
|
|
99143
|
+
// Read once, in `init`. Changing the attribute afterwards has no effect; it
|
|
99144
|
+
// is static configuration, which is how every consumer sets it.
|
|
99145
|
+
get acceptsUnicode() {
|
|
99146
|
+
return this.getAttribute('accept-unicode') !== 'false';
|
|
99147
|
+
}
|
|
99148
|
+
|
|
99132
99149
|
init() {
|
|
99133
99150
|
super.init?.();
|
|
99134
99151
|
|
|
99135
99152
|
// we need to set the pattern on the base element because vaadin-email-field is overriding it
|
|
99136
|
-
this.baseElement.setAttribute('pattern',
|
|
99153
|
+
this.baseElement.setAttribute('pattern', asciiPattern);
|
|
99137
99154
|
|
|
99138
99155
|
if (!this.getAttribute('autocomplete')) {
|
|
99139
99156
|
this.setAttribute('autocomplete', defaultAutocomplete);
|
|
99140
99157
|
}
|
|
99141
99158
|
|
|
99142
99159
|
this.createExternalInput();
|
|
99160
|
+
|
|
99161
|
+
[this.inputElement, this.externalInput].filter(Boolean).forEach((input) => {
|
|
99162
|
+
input.addEventListener('change', this.stripSurroundingWhitespace);
|
|
99163
|
+
});
|
|
99164
|
+
|
|
99165
|
+
if (this.acceptsUnicode) {
|
|
99166
|
+
this.enableUnicode();
|
|
99167
|
+
}
|
|
99143
99168
|
}
|
|
99169
|
+
|
|
99170
|
+
enableUnicode() {
|
|
99171
|
+
this.baseElement.setAttribute('pattern', unicodePattern);
|
|
99172
|
+
|
|
99173
|
+
// native `type="email"` validation is ASCII only and sets typeMismatch
|
|
99174
|
+
// before `pattern` is consulted, so `text` is what lets the pattern decide.
|
|
99175
|
+
// Through vaadin's `_setType` because `type` is a readOnly property bound
|
|
99176
|
+
// to the inner input - assigning `input.type` is re-applied over.
|
|
99177
|
+
this.baseElement._setType('text');
|
|
99178
|
+
|
|
99179
|
+
if (this.externalInput) {
|
|
99180
|
+
this.externalInput.type = 'text';
|
|
99181
|
+
}
|
|
99182
|
+
|
|
99183
|
+
// `type="text"` loses the email keyboard on mobile
|
|
99184
|
+
if (!this.getAttribute('inputmode')) {
|
|
99185
|
+
this.setAttribute('inputmode', defaultInputMode);
|
|
99186
|
+
}
|
|
99187
|
+
|
|
99188
|
+
this.externalInput?.setAttribute('inputmode', defaultInputMode);
|
|
99189
|
+
}
|
|
99190
|
+
|
|
99191
|
+
stripSurroundingWhitespace = (e) => {
|
|
99192
|
+
const trimmed = e.target.value.trim();
|
|
99193
|
+
if (trimmed === e.target.value) return;
|
|
99194
|
+
this.value = trimmed;
|
|
99195
|
+
|
|
99196
|
+
// validity is cached and was computed against the untrimmed value
|
|
99197
|
+
this.inputElement.dispatchEvent(new Event('input', { bubbles: true, composed: true }));
|
|
99198
|
+
};
|
|
99144
99199
|
};
|
|
99145
99200
|
|
|
99146
99201
|
const EmailFieldClass = compose$1(
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/flow-components",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/descope/
|
|
10
|
+
"url": "git+https://github.com/descope/web-components-ui.git",
|
|
11
|
+
"directory": "packages/flow-components"
|
|
11
12
|
},
|
|
12
13
|
"author": "Descope",
|
|
13
14
|
"license": "UNLICENSED",
|
|
14
15
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/descope/
|
|
16
|
+
"url": "https://github.com/descope/web-components-ui/issues"
|
|
16
17
|
},
|
|
17
|
-
"homepage": "https://github.com/descope/
|
|
18
|
+
"homepage": "https://github.com/descope/web-components-ui#readme",
|
|
18
19
|
"files": [
|
|
19
20
|
"dist"
|
|
20
21
|
],
|
|
@@ -97,7 +98,7 @@
|
|
|
97
98
|
"webpack-subresource-integrity": "5.2.0-rc.1"
|
|
98
99
|
},
|
|
99
100
|
"dependencies": {
|
|
100
|
-
"@descope/web-components-ui": "3.20.
|
|
101
|
+
"@descope/web-components-ui": "3.20.4"
|
|
101
102
|
},
|
|
102
103
|
"peerDependencies": {
|
|
103
104
|
"react": ">= 18"
|