@descope/flow-components 3.26.5 → 3.27.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/fm/222.js +1 -1
- package/dist/fm/222.js.map +1 -1
- package/dist/fm/734.js +1 -1
- package/dist/fm/734.js.map +1 -1
- package/dist/fm/761.js +1 -1
- package/dist/fm/761.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 +50 -0
- package/package.json +2 -2
package/dist/fm/mf-manifest.json
CHANGED
package/dist/fm/mf-stats.json
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -90177,6 +90177,10 @@ function requireIndex_cjs () {
|
|
|
90177
90177
|
center: { [vars$V.textAlign]: 'center' },
|
|
90178
90178
|
},
|
|
90179
90179
|
|
|
90180
|
+
displayVariant: {
|
|
90181
|
+
buttons: { [vars$V.hostMinWidth]: '100px' },
|
|
90182
|
+
},
|
|
90183
|
+
|
|
90180
90184
|
_fullWidth: {
|
|
90181
90185
|
[vars$V.hostWidth]: '100%',
|
|
90182
90186
|
},
|
|
@@ -98226,6 +98230,20 @@ function requireIndex_cjs () {
|
|
|
98226
98230
|
const unicodePattern =
|
|
98227
98231
|
"^[\\p{L}\\p{M}\\p{N}._%+'\\-]+@(?:[\\p{L}\\p{M}\\p{N}](?:[\\p{L}\\p{M}\\p{N}\\-]*[\\p{L}\\p{M}\\p{N}])?\\.)+[\\p{L}\\p{M}][\\p{L}\\p{M}\\p{N}\\-]+$";
|
|
98228
98232
|
|
|
98233
|
+
// The autocomplete grammar is ordered (section-*, shipping/billing, field name, webauthn) and on/off can't be
|
|
98234
|
+
// combined with a field name, so `email` takes the field name's place, before webauthn
|
|
98235
|
+
const emailVerificationAutocomplete = (autocomplete) => {
|
|
98236
|
+
const tokens = (autocomplete || '')
|
|
98237
|
+
.split(/\s+/)
|
|
98238
|
+
.filter(
|
|
98239
|
+
(token) => token && !['username', 'email', 'on', 'off'].includes(token),
|
|
98240
|
+
);
|
|
98241
|
+
const webauthn = tokens.indexOf('webauthn');
|
|
98242
|
+
tokens.splice(webauthn === -1 ? tokens.length : webauthn, 0, 'email');
|
|
98243
|
+
|
|
98244
|
+
return tokens.join(' ');
|
|
98245
|
+
};
|
|
98246
|
+
|
|
98229
98247
|
const componentName$U = getComponentName('email-field');
|
|
98230
98248
|
|
|
98231
98249
|
const defaultAutocomplete = 'username';
|
|
@@ -98274,6 +98292,38 @@ function requireIndex_cjs () {
|
|
|
98274
98292
|
if (!this.validatesFormat) {
|
|
98275
98293
|
this.disableFormatValidation();
|
|
98276
98294
|
}
|
|
98295
|
+
|
|
98296
|
+
if (this.emailVerification) {
|
|
98297
|
+
this.enableEmailVerification();
|
|
98298
|
+
}
|
|
98299
|
+
}
|
|
98300
|
+
|
|
98301
|
+
// Read once, in `init`: descope-wc renders the screen html once
|
|
98302
|
+
get emailVerification() {
|
|
98303
|
+
return this.getAttribute('email-verification') === 'true';
|
|
98304
|
+
}
|
|
98305
|
+
|
|
98306
|
+
// Browser email verification needs the native input to be an email field (autocomplete `email`).
|
|
98307
|
+
// The host keeps its own autocomplete: descope-wc finds the passkey autofill field by an exact
|
|
98308
|
+
// `[autocomplete="webauthn"]` match on it, so changing the host would break passkeys
|
|
98309
|
+
enableEmailVerification() {
|
|
98310
|
+
const { baseElement } = this;
|
|
98311
|
+
const delegate = baseElement._delegateAttribute.bind(baseElement);
|
|
98312
|
+
// vaadin writes the native autocomplete only through here, so it writes ours
|
|
98313
|
+
baseElement._delegateAttribute = (name, value) =>
|
|
98314
|
+
delegate(
|
|
98315
|
+
name,
|
|
98316
|
+
name === 'autocomplete'
|
|
98317
|
+
? emailVerificationAutocomplete(value)
|
|
98318
|
+
: value,
|
|
98319
|
+
);
|
|
98320
|
+
baseElement._delegateAttribute('autocomplete', baseElement.autocomplete);
|
|
98321
|
+
|
|
98322
|
+
// the external input copies the host autocomplete once, when it is created
|
|
98323
|
+
this.externalInput?.setAttribute(
|
|
98324
|
+
'autocomplete',
|
|
98325
|
+
emailVerificationAutocomplete(this.getAttribute('autocomplete')),
|
|
98326
|
+
);
|
|
98277
98327
|
}
|
|
98278
98328
|
|
|
98279
98329
|
enableUnicode() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/flow-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.27.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"webpack-subresource-integrity": "5.2.0-rc.1"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@descope/web-components-ui": "3.
|
|
101
|
+
"@descope/web-components-ui": "3.27.1"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"react": ">= 18"
|