fix(core): update
This commit is contained in:
parent
621262fde7
commit
9d952afebb
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '1.0.174',
|
version: '1.0.175',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ export class DeesFormSubmit extends DeesElement {
|
|||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public disabled = false;
|
public disabled = false;
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ export class DeesForm extends DeesElement {
|
|||||||
|
|
||||||
public name: string = 'myform';
|
public name: string = 'myform';
|
||||||
public changeSubject = new domtools.rxjs.Subject();
|
public changeSubject = new domtools.rxjs.Subject();
|
||||||
|
public readyDeferred = domtools.plugins.smartpromise.defer();
|
||||||
|
|
||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
@ -70,6 +71,7 @@ export class DeesForm extends DeesElement {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
await this.addBehaviours();
|
await this.addBehaviours();
|
||||||
|
this.readyDeferred.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
public getFormElements(): Array<TFormInputElement> {
|
public getFormElements(): Array<TFormInputElement> {
|
||||||
|
@ -11,8 +11,6 @@ import {
|
|||||||
state,
|
state,
|
||||||
} from '@design.estate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@design.estate/dees-domtools';
|
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
'dees-simple-login': DeesSimpleLogin;
|
'dees-simple-login': DeesSimpleLogin;
|
||||||
@ -34,6 +32,7 @@ export class DeesSimpleLogin extends DeesElement {
|
|||||||
css`
|
css`
|
||||||
:host {
|
:host {
|
||||||
color: ${cssManager.bdTheme('#333', '#fff')};
|
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
.loginContainer {
|
.loginContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -62,13 +61,26 @@ export class DeesSimpleLogin extends DeesElement {
|
|||||||
<div class="login">
|
<div class="login">
|
||||||
<dees-form>
|
<dees-form>
|
||||||
<div class="header">Login to ${this.title}</div>
|
<div class="header">Login to ${this.title}</div>
|
||||||
<dees-input-text label="username"></dees-input-text>
|
<dees-input-text label="username" required></dees-input-text>
|
||||||
<dees-input-text label="password" isPasswordBool></dees-input-text>
|
<dees-input-text label="password" isPasswordBool required></dees-input-text>
|
||||||
<dees-form-submit>login</dees-form-submit>
|
<dees-form-submit disabled>login</dees-form-submit>
|
||||||
</dees-form>
|
</dees-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async firstUpdated(_changedProperties): Promise<void> {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
super.firstUpdated(_changedProperties);
|
||||||
|
const form = this.shadowRoot.querySelector('dees-form');
|
||||||
|
await form.readyDeferred.promise;
|
||||||
|
const username = this.shadowRoot.querySelector('dees-input-text[label="username"]');
|
||||||
|
const password = this.shadowRoot.querySelector('dees-input-text[label="password"]');
|
||||||
|
const submit = this.shadowRoot.querySelector('dees-form-submit');
|
||||||
|
form.addEventListener('formData', (event: CustomEvent) => {
|
||||||
|
this.dispatchEvent(new CustomEvent('login', { detail: event.detail }));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user