@vaadin/vaadin-login
Advanced tools
Comparing version 20.0.0-beta1 to 21.0.0-alpha0.29f1db3de
{ | ||
"name": "@vaadin/vaadin-login", | ||
"version": "20.0.0-beta1", | ||
"version": "21.0.0-alpha0.29f1db3de", | ||
"description": "vaadin-login", | ||
@@ -29,14 +29,13 @@ "main": "vaadin-login-overlay.js", | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/vaadin-button": "^20.0.0-beta1", | ||
"@vaadin/vaadin-element-mixin": "^20.0.0-beta1", | ||
"@vaadin/vaadin-lumo-styles": "^20.0.0-beta1", | ||
"@vaadin/vaadin-material-styles": "^20.0.0-beta1", | ||
"@vaadin/vaadin-overlay": "^20.0.0-beta1", | ||
"@vaadin/vaadin-text-field": "^20.0.0-beta1", | ||
"@vaadin/vaadin-themable-mixin": "^20.0.0-beta1" | ||
"@vaadin/vaadin-button": "^21.0.0-alpha0.29f1db3de", | ||
"@vaadin/vaadin-element-mixin": "^21.0.0-alpha0.29f1db3de", | ||
"@vaadin/vaadin-lumo-styles": "^21.0.0-alpha0.29f1db3de", | ||
"@vaadin/vaadin-material-styles": "^21.0.0-alpha0.29f1db3de", | ||
"@vaadin/vaadin-overlay": "^21.0.0-alpha0.29f1db3de", | ||
"@vaadin/vaadin-text-field": "^21.0.0-alpha0.29f1db3de", | ||
"@vaadin/vaadin-themable-mixin": "^21.0.0-alpha0.29f1db3de" | ||
}, | ||
"devDependencies": { | ||
"@esm-bundle/chai": "^4.1.5", | ||
"@open-wc/testing-helpers": "^1.8.12", | ||
"@polymer/iron-test-helpers": "^3.0.0", | ||
"@vaadin/testing-helpers": "^0.2.1", | ||
"sinon": "^9.2.1" | ||
@@ -47,3 +46,3 @@ }, | ||
}, | ||
"gitHead": "a8bc4c410600c8039e8e3f5fa4c763fdb328e10d" | ||
"gitHead": "70e741f8e450dbea6f50de314514f4a15b2072b9" | ||
} |
@@ -37,3 +37,3 @@ import { ElementMixin } from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js'; | ||
* | ||
* See [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki) | ||
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation. | ||
* | ||
@@ -40,0 +40,0 @@ * @fires {CustomEvent} forgot-password - Fired when user clicks on the "Forgot password" button. |
@@ -43,3 +43,3 @@ /** | ||
* | ||
* See [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki) | ||
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation. | ||
* | ||
@@ -74,2 +74,3 @@ * @fires {CustomEvent} forgot-password - Fired when user clicks on the "Forgot password" button. | ||
<form part="vaadin-login-native-form" method="POST" action$="[[action]]" slot="form"> | ||
<input id="csrf" type="hidden" /> | ||
<vaadin-text-field | ||
@@ -112,3 +113,3 @@ name="username" | ||
static get version() { | ||
return '20.0.0-beta1'; | ||
return '21.0.0-alpha0'; | ||
} | ||
@@ -120,2 +121,5 @@ | ||
this._handleInputKeydown = this._handleInputKeydown.bind(this); | ||
if (!this.noAutofocus) { | ||
this.$.vaadinLoginUsername.focus(); | ||
} | ||
} | ||
@@ -162,2 +166,8 @@ | ||
if (this.action && firedEvent) { | ||
const csrfMetaName = document.querySelector('meta[name=_csrf_parameter]'); | ||
const csrfMetaValue = document.querySelector('meta[name=_csrf]'); | ||
if (csrfMetaName && csrfMetaValue) { | ||
this.$.csrf.name = csrfMetaName.content; | ||
this.$.csrf.value = csrfMetaValue.content; | ||
} | ||
this.querySelector('[part="vaadin-login-native-form"]').submit(); | ||
@@ -164,0 +174,0 @@ } |
@@ -35,2 +35,8 @@ import { LoginI18n } from './interfaces'; | ||
/** | ||
* If set, the user name field does not automatically receive focus when the component is attached to the document. | ||
* @attr {boolean} no-autofocus | ||
*/ | ||
noAutofocus: boolean; | ||
/** | ||
* The object used to localize this component. | ||
@@ -37,0 +43,0 @@ * For changing the default localization, change the entire |
@@ -74,2 +74,12 @@ /** | ||
/** | ||
* If set, the user name field automatically receives focus when the component is attached to the document. | ||
* @type {boolean} | ||
* @attr {boolean} no-autofocus | ||
*/ | ||
noAutofocus: { | ||
type: Boolean, | ||
value: false | ||
}, | ||
/** | ||
* The object used to localize this component. | ||
@@ -76,0 +86,0 @@ * For changing the default localization, change the entire |
@@ -31,3 +31,3 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
* | ||
* See [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki) | ||
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation. | ||
* | ||
@@ -34,0 +34,0 @@ * See [`<vaadin-login-form>`](#/elements/vaadin-login-form) |
@@ -36,3 +36,3 @@ /** | ||
* | ||
* See [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki) | ||
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation. | ||
* | ||
@@ -68,2 +68,3 @@ * See [`<vaadin-login-form>`](#/elements/vaadin-login-form) | ||
error="{{error}}" | ||
no-autofocus="[[noAutofocus]]" | ||
no-forgot-password="{{noForgotPassword}}" | ||
@@ -70,0 +71,0 @@ i18n="{{i18n}}" |
export * from './src/vaadin-login-overlay.js'; | ||
export * from './src/interfaces'; | ||
// TODO: remove from Vaadin 21 | ||
export * from './src/vaadin-login-overlay-legacy-events'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67917
3
1584
28
+ Added@lit-labs/ssr-dom-shim@1.2.1(transitive)
+ Added@lit/reactive-element@1.6.3(transitive)
+ Added@types/trusted-types@2.0.7(transitive)
+ Added@vaadin/vaadin-button@21.0.5(transitive)
+ Added@vaadin/vaadin-control-state-mixin@21.0.5(transitive)
+ Added@vaadin/vaadin-element-mixin@21.0.5(transitive)
+ Added@vaadin/vaadin-icon@21.0.5(transitive)
+ Added@vaadin/vaadin-lumo-styles@21.0.5(transitive)
+ Added@vaadin/vaadin-material-styles@21.0.5(transitive)
+ Added@vaadin/vaadin-overlay@21.0.5(transitive)
+ Added@vaadin/vaadin-text-field@21.0.5(transitive)
+ Added@vaadin/vaadin-themable-mixin@21.0.5(transitive)
+ Addedlit@2.8.0(transitive)
+ Addedlit-element@3.3.3(transitive)
+ Addedlit-html@2.8.0(transitive)
- Removed@vaadin/vaadin-button@20.0.5(transitive)
- Removed@vaadin/vaadin-control-state-mixin@20.0.5(transitive)
- Removed@vaadin/vaadin-element-mixin@20.0.5(transitive)
- Removed@vaadin/vaadin-lumo-styles@20.0.5(transitive)
- Removed@vaadin/vaadin-material-styles@20.0.5(transitive)
- Removed@vaadin/vaadin-overlay@20.0.5(transitive)
- Removed@vaadin/vaadin-text-field@20.0.5(transitive)
- Removed@vaadin/vaadin-themable-mixin@20.0.5(transitive)
- Removedlit-element@2.5.1(transitive)
- Removedlit-html@1.4.1(transitive)
Updated@vaadin/vaadin-element-mixin@^21.0.0-alpha0.29f1db3de
Updated@vaadin/vaadin-material-styles@^21.0.0-alpha0.29f1db3de
Updated@vaadin/vaadin-themable-mixin@^21.0.0-alpha0.29f1db3de