cotomy 0.1.0 → 0.1.2
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/api.d.ts +3 -3
- package/dist/form.d.ts +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/page.d.ts +2 -2
- package/dist/view.d.ts +25 -25
- package/package.json +4 -2
package/dist/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CotomyElement } from "./view";
|
|
2
2
|
export declare class CotomyResponseJsonParseException extends Error {
|
|
3
3
|
constructor(message?: string);
|
|
4
4
|
}
|
|
@@ -26,10 +26,10 @@ export declare class CotomyViewRenderer {
|
|
|
26
26
|
private _currency;
|
|
27
27
|
private _renderers;
|
|
28
28
|
private _builded;
|
|
29
|
-
constructor(element:
|
|
29
|
+
constructor(element: CotomyElement);
|
|
30
30
|
protected get locale(): string;
|
|
31
31
|
protected get currency(): string;
|
|
32
|
-
renderer(type: string, callback: (element:
|
|
32
|
+
renderer(type: string, callback: (element: CotomyElement, value: any) => void): this;
|
|
33
33
|
get builded(): boolean;
|
|
34
34
|
build(): this;
|
|
35
35
|
applyAsync(respose: CotomyRestApiResponse): Promise<this>;
|
package/dist/form.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CotomyRestApi, CotomyRestApiResponse, CotomyViewRenderer } from "./api";
|
|
2
|
-
import {
|
|
2
|
+
import { CotomyElement } from "./view";
|
|
3
3
|
export declare class CotomyActionEvent extends Event {
|
|
4
4
|
action: string;
|
|
5
5
|
constructor(action: string);
|
|
6
6
|
}
|
|
7
|
-
export declare abstract class CotomyFormBase extends
|
|
7
|
+
export declare abstract class CotomyFormBase extends CotomyElement {
|
|
8
8
|
constructor(element: HTMLFormElement | string, css?: string | null);
|
|
9
9
|
get formId(): string;
|
|
10
10
|
method(): string;
|
|
@@ -31,7 +31,7 @@ export declare class CotomyApiForm extends CotomyFormBase {
|
|
|
31
31
|
actionUri(): string;
|
|
32
32
|
get identifier(): string | undefined;
|
|
33
33
|
protected setIncrementedId(response: CotomyRestApiResponse): void;
|
|
34
|
-
get identifierInputs():
|
|
34
|
+
get identifierInputs(): CotomyElement[];
|
|
35
35
|
get identifierString(): string;
|
|
36
36
|
get autoIncrement(): boolean;
|
|
37
37
|
method(): string;
|
|
@@ -43,7 +43,7 @@ export declare class CotomyApiForm extends CotomyFormBase {
|
|
|
43
43
|
export declare class CotomyFillApiForm extends CotomyApiForm {
|
|
44
44
|
private _fillers;
|
|
45
45
|
constructor(element: HTMLFormElement | string, css?: string | null);
|
|
46
|
-
filler(type: string, callback: (input:
|
|
46
|
+
filler(type: string, callback: (input: CotomyElement, value: any) => void): this;
|
|
47
47
|
build(): this;
|
|
48
48
|
protected submitToApiAsync(formData: globalThis.FormData): Promise<CotomyRestApiResponse>;
|
|
49
49
|
reload(): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { CotomyInvalidFormDataBodyException, CotomyResponseJsonParseException, CotomyRestApi, CotomyRestApiResponse, CotomyViewRenderer } from "./api";
|
|
2
2
|
export type { CotomyActionEvent, CotomyApiForm, CotomyFillApiForm, CotomyFormBase, CotomyQueryForm } from "./form";
|
|
3
3
|
export type { CotomyPageController, CotomyUrl } from "./page";
|
|
4
|
-
export type {
|
|
4
|
+
export type { CotomyElement, CotomyMetaElement, CotomyWindow } from "./view";
|
package/dist/page.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CotomyFormBase } from "./form";
|
|
2
|
-
import {
|
|
2
|
+
import { CotomyElement } from "./view";
|
|
3
3
|
export declare class CotomyUrl {
|
|
4
4
|
static location(): CotomyUrl;
|
|
5
5
|
private _url;
|
|
@@ -19,6 +19,6 @@ export declare class CotomyPageController {
|
|
|
19
19
|
static set<T extends CotomyPageController = CotomyPageController>(type: new () => T): T;
|
|
20
20
|
protected setForm<T extends CotomyFormBase = CotomyFormBase>(form: T): T;
|
|
21
21
|
protected initializeAsync(): Promise<void>;
|
|
22
|
-
get body():
|
|
22
|
+
get body(): CotomyElement;
|
|
23
23
|
protected get uri(): CotomyUrl;
|
|
24
24
|
}
|
package/dist/view.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare class
|
|
1
|
+
export declare class CotomyElement {
|
|
2
2
|
protected static createHTMLElement(html: string): HTMLElement;
|
|
3
|
-
static create<T extends
|
|
4
|
-
static first<T extends
|
|
5
|
-
static find<T extends
|
|
6
|
-
static byId<T extends
|
|
3
|
+
static create<T extends CotomyElement = CotomyElement>(html: string, type?: typeof CotomyElement): T;
|
|
4
|
+
static first<T extends CotomyElement = CotomyElement>(selector: string, type?: typeof CotomyElement): T;
|
|
5
|
+
static find<T extends CotomyElement = CotomyElement>(selector: string, type?: typeof CotomyElement): T[];
|
|
6
|
+
static byId<T extends CotomyElement = CotomyElement>(id: string, type?: typeof CotomyElement): T;
|
|
7
7
|
static contains(selector: string): boolean;
|
|
8
|
-
static empty<T extends
|
|
8
|
+
static empty<T extends CotomyElement = CotomyElement>(type?: typeof CotomyElement): T;
|
|
9
9
|
private _element;
|
|
10
10
|
private _parentElement;
|
|
11
11
|
private _removed;
|
|
@@ -38,7 +38,7 @@ export declare class CotomyElementWrap {
|
|
|
38
38
|
get enabled(): boolean;
|
|
39
39
|
set enabled(value: boolean);
|
|
40
40
|
remove(): void;
|
|
41
|
-
clone():
|
|
41
|
+
clone(): CotomyElement;
|
|
42
42
|
clean(): void;
|
|
43
43
|
get width(): number;
|
|
44
44
|
set width(width: number);
|
|
@@ -109,21 +109,21 @@ export declare class CotomyElementWrap {
|
|
|
109
109
|
removeElementStyle(name: string): this;
|
|
110
110
|
get computedStyle(): CSSStyleDeclaration;
|
|
111
111
|
style(name: string): string;
|
|
112
|
-
get parent():
|
|
113
|
-
get parents():
|
|
112
|
+
get parent(): CotomyElement;
|
|
113
|
+
get parents(): CotomyElement[];
|
|
114
114
|
hasChildren(selector?: string): boolean;
|
|
115
|
-
children<T extends
|
|
116
|
-
firstChild<T extends
|
|
117
|
-
lastChild<T extends
|
|
118
|
-
closest<T extends
|
|
119
|
-
find<T extends
|
|
120
|
-
first<T extends
|
|
121
|
-
prepend(prepend:
|
|
122
|
-
append(target:
|
|
123
|
-
appends(targets:
|
|
124
|
-
appendTo(target:
|
|
125
|
-
appendBefore(append:
|
|
126
|
-
appendAfter(append:
|
|
115
|
+
children<T extends CotomyElement = CotomyElement>(selector?: string, type?: typeof CotomyElement): T[];
|
|
116
|
+
firstChild<T extends CotomyElement = CotomyElement>(selector?: string, type?: typeof CotomyElement): T;
|
|
117
|
+
lastChild<T extends CotomyElement = CotomyElement>(selector?: string, type?: typeof CotomyElement): T;
|
|
118
|
+
closest<T extends CotomyElement = CotomyElement>(selector: string, type?: typeof CotomyElement): T;
|
|
119
|
+
find<T extends CotomyElement = CotomyElement>(selector: string, type?: typeof CotomyElement): T[];
|
|
120
|
+
first<T extends CotomyElement = CotomyElement>(selector?: string, type?: typeof CotomyElement): T;
|
|
121
|
+
prepend(prepend: CotomyElement): this;
|
|
122
|
+
append(target: CotomyElement): this;
|
|
123
|
+
appends(targets: CotomyElement[]): this;
|
|
124
|
+
appendTo(target: CotomyElement): this;
|
|
125
|
+
appendBefore(append: CotomyElement): this;
|
|
126
|
+
appendAfter(append: CotomyElement): this;
|
|
127
127
|
trigger(event: string, e?: Event | null): this;
|
|
128
128
|
on(event: string, handle: (e: Event) => void | Promise<void>): this;
|
|
129
129
|
once(event: string, handle: (e: Event) => void | Promise<void>): this;
|
|
@@ -163,7 +163,7 @@ export declare class CotomyElementWrap {
|
|
|
163
163
|
scroll(handle?: ((e: Event) => void | Promise<void>) | null): this;
|
|
164
164
|
changelayout(handle?: ((e: Event) => void | Promise<void>) | null): this;
|
|
165
165
|
}
|
|
166
|
-
export declare class CotomyMetaElement extends
|
|
166
|
+
export declare class CotomyMetaElement extends CotomyElement {
|
|
167
167
|
static get(name: string): CotomyMetaElement;
|
|
168
168
|
get content(): string;
|
|
169
169
|
}
|
|
@@ -174,9 +174,9 @@ export declare class CotomyWindow {
|
|
|
174
174
|
private _mutationObserver;
|
|
175
175
|
initialize(): void;
|
|
176
176
|
get initialized(): boolean;
|
|
177
|
-
get body():
|
|
178
|
-
append(e:
|
|
179
|
-
moveNext(focused:
|
|
177
|
+
get body(): CotomyElement;
|
|
178
|
+
append(e: CotomyElement): void;
|
|
179
|
+
moveNext(focused: CotomyElement, shift?: boolean): void;
|
|
180
180
|
trigger(event: string): void;
|
|
181
181
|
load(handle: (e: Event) => void | Promise<void>): void;
|
|
182
182
|
ready(handle: ((e: Event) => void | Promise<void>)): void;
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cotomy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
|
-
"files": [
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
7
9
|
"scripts": {
|
|
8
10
|
"build": "webpack --mode=production",
|
|
9
11
|
"dev": "webpack --watch",
|