@vaadin/login 23.1.0-alpha1 → 23.1.0-alpha4
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/package.json +11 -11
- package/src/vaadin-login-form.d.ts +2 -2
- package/src/vaadin-login-form.js +2 -2
- package/src/vaadin-login-mixin.js +11 -11
- package/src/vaadin-login-overlay-wrapper.js +4 -4
- package/src/vaadin-login-overlay.d.ts +2 -2
- package/src/vaadin-login-overlay.js +12 -4
- package/theme/lumo/vaadin-login-form-styles.js +1 -1
- package/theme/lumo/vaadin-login-form-wrapper-styles.js +1 -1
- package/theme/lumo/vaadin-login-overlay-styles.js +2 -2
- package/theme/material/vaadin-login-form-styles.js +1 -1
- package/theme/material/vaadin-login-form-wrapper-styles.js +1 -1
- package/theme/material/vaadin-login-overlay-styles.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/login",
|
|
3
|
-
"version": "23.1.0-
|
|
3
|
+
"version": "23.1.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
37
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/button": "23.1.0-
|
|
39
|
-
"@vaadin/component-base": "23.1.0-
|
|
40
|
-
"@vaadin/password-field": "23.1.0-
|
|
41
|
-
"@vaadin/text-field": "23.1.0-
|
|
42
|
-
"@vaadin/vaadin-lumo-styles": "23.1.0-
|
|
43
|
-
"@vaadin/vaadin-material-styles": "23.1.0-
|
|
44
|
-
"@vaadin/vaadin-overlay": "23.1.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "23.1.0-
|
|
38
|
+
"@vaadin/button": "23.1.0-alpha4",
|
|
39
|
+
"@vaadin/component-base": "23.1.0-alpha4",
|
|
40
|
+
"@vaadin/password-field": "23.1.0-alpha4",
|
|
41
|
+
"@vaadin/text-field": "23.1.0-alpha4",
|
|
42
|
+
"@vaadin/vaadin-lumo-styles": "23.1.0-alpha4",
|
|
43
|
+
"@vaadin/vaadin-material-styles": "23.1.0-alpha4",
|
|
44
|
+
"@vaadin/vaadin-overlay": "23.1.0-alpha4",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "23.1.0-alpha4"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@esm-bundle/chai": "^4.3.4",
|
|
49
49
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
50
|
-
"sinon": "^
|
|
50
|
+
"sinon": "^13.0.2"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "aacdb7fe09811894751f0378ff7fb66071892c71"
|
|
53
53
|
}
|
|
@@ -60,13 +60,13 @@ declare class LoginForm extends ElementMixin(ThemableMixin(LoginMixin(HTMLElemen
|
|
|
60
60
|
addEventListener<K extends keyof LoginFormEventMap>(
|
|
61
61
|
type: K,
|
|
62
62
|
listener: (this: LoginForm, ev: LoginFormEventMap[K]) => void,
|
|
63
|
-
options?: boolean | AddEventListenerOptions
|
|
63
|
+
options?: boolean | AddEventListenerOptions,
|
|
64
64
|
): void;
|
|
65
65
|
|
|
66
66
|
removeEventListener<K extends keyof LoginFormEventMap>(
|
|
67
67
|
type: K,
|
|
68
68
|
listener: (this: LoginForm, ev: LoginFormEventMap[K]) => void,
|
|
69
|
-
options?: boolean | EventListenerOptions
|
|
69
|
+
options?: boolean | EventListenerOptions,
|
|
70
70
|
): void;
|
|
71
71
|
}
|
|
72
72
|
|
package/src/vaadin-login-form.js
CHANGED
|
@@ -149,8 +149,8 @@ class LoginForm extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)))
|
|
|
149
149
|
cancelable: true,
|
|
150
150
|
detail: {
|
|
151
151
|
username: this.$.vaadinLoginUsername.value,
|
|
152
|
-
password: this.$.vaadinLoginPassword.value
|
|
153
|
-
}
|
|
152
|
+
password: this.$.vaadinLoginPassword.value,
|
|
153
|
+
},
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
const firedEvent = this.dispatchEvent(new CustomEvent('login', loginEventDetails));
|
|
@@ -32,7 +32,7 @@ export const LoginMixin = (superClass) =>
|
|
|
32
32
|
action: {
|
|
33
33
|
type: String,
|
|
34
34
|
value: null,
|
|
35
|
-
notify: true
|
|
35
|
+
notify: true,
|
|
36
36
|
},
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -44,7 +44,7 @@ export const LoginMixin = (superClass) =>
|
|
|
44
44
|
disabled: {
|
|
45
45
|
type: Boolean,
|
|
46
46
|
value: false,
|
|
47
|
-
notify: true
|
|
47
|
+
notify: true,
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -56,7 +56,7 @@ export const LoginMixin = (superClass) =>
|
|
|
56
56
|
type: Boolean,
|
|
57
57
|
value: false,
|
|
58
58
|
reflectToAttribute: true,
|
|
59
|
-
notify: true
|
|
59
|
+
notify: true,
|
|
60
60
|
},
|
|
61
61
|
|
|
62
62
|
/**
|
|
@@ -67,7 +67,7 @@ export const LoginMixin = (superClass) =>
|
|
|
67
67
|
noForgotPassword: {
|
|
68
68
|
type: Boolean,
|
|
69
69
|
value: false,
|
|
70
|
-
notify: true
|
|
70
|
+
notify: true,
|
|
71
71
|
},
|
|
72
72
|
|
|
73
73
|
/**
|
|
@@ -77,7 +77,7 @@ export const LoginMixin = (superClass) =>
|
|
|
77
77
|
*/
|
|
78
78
|
noAutofocus: {
|
|
79
79
|
type: Boolean,
|
|
80
|
-
value: false
|
|
80
|
+
value: false,
|
|
81
81
|
},
|
|
82
82
|
|
|
83
83
|
/**
|
|
@@ -119,15 +119,15 @@ export const LoginMixin = (superClass) =>
|
|
|
119
119
|
username: 'Username',
|
|
120
120
|
password: 'Password',
|
|
121
121
|
submit: 'Log in',
|
|
122
|
-
forgotPassword: 'Forgot password'
|
|
122
|
+
forgotPassword: 'Forgot password',
|
|
123
123
|
},
|
|
124
124
|
errorMessage: {
|
|
125
125
|
title: 'Incorrect username or password',
|
|
126
|
-
message: 'Check that you have entered the correct username and password and try again.'
|
|
127
|
-
}
|
|
126
|
+
message: 'Check that you have entered the correct username and password and try again.',
|
|
127
|
+
},
|
|
128
128
|
};
|
|
129
129
|
},
|
|
130
|
-
notify: true
|
|
130
|
+
notify: true,
|
|
131
131
|
},
|
|
132
132
|
|
|
133
133
|
/**
|
|
@@ -136,8 +136,8 @@ export const LoginMixin = (superClass) =>
|
|
|
136
136
|
*/
|
|
137
137
|
_preventAutoEnable: {
|
|
138
138
|
type: Boolean,
|
|
139
|
-
value: false
|
|
140
|
-
}
|
|
139
|
+
value: false,
|
|
140
|
+
},
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
|
|
@@ -73,15 +73,15 @@ class LoginOverlayWrapper extends OverlayElement {
|
|
|
73
73
|
* Title of the application.
|
|
74
74
|
*/
|
|
75
75
|
title: {
|
|
76
|
-
type: String
|
|
76
|
+
type: String,
|
|
77
77
|
},
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Application description. Displayed under the title.
|
|
81
81
|
*/
|
|
82
82
|
description: {
|
|
83
|
-
type: String
|
|
84
|
-
}
|
|
83
|
+
type: String,
|
|
84
|
+
},
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -91,7 +91,7 @@ class LoginOverlayWrapper extends OverlayElement {
|
|
|
91
91
|
memoizedTemplate = super.template.cloneNode(true);
|
|
92
92
|
|
|
93
93
|
// Retrieve the elements from component's template
|
|
94
|
-
const thisTemplate = DomModule.import(this.is
|
|
94
|
+
const thisTemplate = DomModule.import(`${this.is}-template`, 'template');
|
|
95
95
|
const card = thisTemplate.content.querySelector('[part=card]');
|
|
96
96
|
const styles = thisTemplate.content.querySelector('style');
|
|
97
97
|
|
|
@@ -70,13 +70,13 @@ declare class LoginOverlay extends ElementMixin(ThemableMixin(LoginMixin(HTMLEle
|
|
|
70
70
|
addEventListener<K extends keyof LoginOverlayEventMap>(
|
|
71
71
|
type: K,
|
|
72
72
|
listener: (this: LoginOverlay, ev: LoginOverlayEventMap[K]) => void,
|
|
73
|
-
options?: boolean | AddEventListenerOptions
|
|
73
|
+
options?: boolean | AddEventListenerOptions,
|
|
74
74
|
): void;
|
|
75
75
|
|
|
76
76
|
removeEventListener<K extends keyof LoginOverlayEventMap>(
|
|
77
77
|
type: K,
|
|
78
78
|
listener: (this: LoginOverlay, ev: LoginOverlayEventMap[K]) => void,
|
|
79
|
-
options?: boolean | EventListenerOptions
|
|
79
|
+
options?: boolean | EventListenerOptions,
|
|
80
80
|
): void;
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -86,7 +86,7 @@ class LoginOverlay extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
86
86
|
description: {
|
|
87
87
|
type: String,
|
|
88
88
|
value: 'Application description',
|
|
89
|
-
notify: true
|
|
89
|
+
notify: true,
|
|
90
90
|
},
|
|
91
91
|
|
|
92
92
|
/**
|
|
@@ -96,7 +96,7 @@ class LoginOverlay extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
96
96
|
opened: {
|
|
97
97
|
type: Boolean,
|
|
98
98
|
value: false,
|
|
99
|
-
observer: '_onOpenedChange'
|
|
99
|
+
observer: '_onOpenedChange',
|
|
100
100
|
},
|
|
101
101
|
|
|
102
102
|
/**
|
|
@@ -105,8 +105,8 @@ class LoginOverlay extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
105
105
|
*/
|
|
106
106
|
title: {
|
|
107
107
|
type: String,
|
|
108
|
-
value: 'App name'
|
|
109
|
-
}
|
|
108
|
+
value: 'App name',
|
|
109
|
+
},
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -127,6 +127,11 @@ class LoginOverlay extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
127
127
|
|
|
128
128
|
this.$.vaadinLoginOverlayWrapper.addEventListener('vaadin-overlay-outside-click', this._preventClosingLogin);
|
|
129
129
|
this.$.vaadinLoginOverlayWrapper.addEventListener('vaadin-overlay-escape-press', this._preventClosingLogin);
|
|
130
|
+
|
|
131
|
+
// Restore opened state if overlay was open when disconnecting
|
|
132
|
+
if (this.__restoreOpened) {
|
|
133
|
+
this.$.vaadinLoginOverlayWrapper.opened = true;
|
|
134
|
+
}
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
/** @protected */
|
|
@@ -135,6 +140,9 @@ class LoginOverlay extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
135
140
|
|
|
136
141
|
this.$.vaadinLoginOverlayWrapper.removeEventListener('vaadin-overlay-outside-click', this._preventClosingLogin);
|
|
137
142
|
this.$.vaadinLoginOverlayWrapper.removeEventListener('vaadin-overlay-escape-press', this._preventClosingLogin);
|
|
143
|
+
|
|
144
|
+
// Close overlay and memorize opened state
|
|
145
|
+
this.__restoreOpened = this.$.vaadinLoginOverlayWrapper.opened;
|
|
138
146
|
this.$.vaadinLoginOverlayWrapper.opened = false;
|
|
139
147
|
}
|
|
140
148
|
|
|
@@ -173,7 +173,7 @@ const loginOverlayWrapper = css`
|
|
|
173
173
|
`;
|
|
174
174
|
|
|
175
175
|
registerStyles('vaadin-login-overlay-wrapper', [color, typography, loginOverlayWrapper], {
|
|
176
|
-
moduleId: 'vaadin-login-overlay-wrapper-lumo-styles'
|
|
176
|
+
moduleId: 'vaadin-login-overlay-wrapper-lumo-styles',
|
|
177
177
|
});
|
|
178
178
|
|
|
179
179
|
const loginFormWrapper = css`
|
|
@@ -196,5 +196,5 @@ const loginFormWrapper = css`
|
|
|
196
196
|
`;
|
|
197
197
|
|
|
198
198
|
registerStyles('vaadin-login-form-wrapper', [color, typography, loginFormWrapper], {
|
|
199
|
-
moduleId: 'lumo-login-overlay'
|
|
199
|
+
moduleId: 'lumo-login-overlay',
|
|
200
200
|
});
|
|
@@ -302,7 +302,7 @@ const loginOverlayWrapper = css`
|
|
|
302
302
|
`;
|
|
303
303
|
|
|
304
304
|
registerStyles('vaadin-login-overlay-wrapper', [overlay, typography, loginOverlayWrapper], {
|
|
305
|
-
moduleId: 'vaadin-login-overlay-wrapper-material-styles'
|
|
305
|
+
moduleId: 'vaadin-login-overlay-wrapper-material-styles',
|
|
306
306
|
});
|
|
307
307
|
|
|
308
308
|
const loginFormWrapper = css`
|