Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 202881ef1a | |||
| 7de3d451ad | |||
| f0e0430016 | |||
| 873579fc97 | |||
| d321db363d | |||
| 73c1874e3f |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@design.estate/dees-catalog",
|
"name": "@design.estate/dees-catalog",
|
||||||
"version": "1.8.15",
|
"version": "1.8.19",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
|
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
|
||||||
"main": "dist_ts_web/index.js",
|
"main": "dist_ts_web/index.js",
|
||||||
|
|||||||
3
ts_web/elements/dees-form-submit.demo.ts
Normal file
3
ts_web/elements/dees-form-submit.demo.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import { html } from '@design.estate/dees-element';
|
||||||
|
|
||||||
|
export const demoFunc = () => html`<dees-form-submit>Submit Form</dees-form-submit>`;
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { demoFunc } from './dees-form-submit.demo.js';
|
||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
@@ -6,7 +7,7 @@ import {
|
|||||||
cssManager,
|
cssManager,
|
||||||
property,
|
property,
|
||||||
} from '@design.estate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
import { DeesForm } from './dees-form.js';
|
import type { DeesForm } from './dees-form.js';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@@ -16,7 +17,7 @@ declare global {
|
|||||||
|
|
||||||
@customElement('dees-form-submit')
|
@customElement('dees-form-submit')
|
||||||
export class DeesFormSubmit extends DeesElement {
|
export class DeesFormSubmit extends DeesElement {
|
||||||
public static demo = () => html`<dees-form-submit>Submit Form</dees-form-submit>`;
|
public static demo = demoFunc;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -57,13 +58,15 @@ export class DeesFormSubmit extends DeesElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const parentElement: DeesForm = this.parentElement as DeesForm;
|
const parentElement: DeesForm = this.parentElement as DeesForm;
|
||||||
|
if (parentElement && parentElement.gatherAndDispatch) {
|
||||||
parentElement.gatherAndDispatch();
|
parentElement.gatherAndDispatch();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async focus() {
|
public async focus() {
|
||||||
const domtools = await this.domtoolsPromise;
|
const domtools = await this.domtoolsPromise;
|
||||||
if (!this.disabled) {
|
if (!this.disabled) {
|
||||||
domtools.convenience.smartdelay.delayFor(0);
|
await domtools.convenience.smartdelay.delayFor(0);
|
||||||
this.submit();
|
this.submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user