dothtml 5.2.9 → 5.2.11
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/lib/arg-callback-obj.d.ts +29 -29
- package/lib/arg-callback-obj.js +63 -63
- package/lib/built-in-components/nav-link.d.ts +8 -8
- package/lib/built-in-components/nav-link.js +23 -23
- package/lib/built-in-components/router.d.ts +57 -57
- package/lib/built-in-components/router.js +281 -281
- package/lib/built-in-components/router.js.map +1 -1
- package/lib/component.d.ts +82 -82
- package/lib/component.js +328 -328
- package/lib/dot-util.d.ts +26 -26
- package/lib/dot-util.js +61 -61
- package/lib/dot.d.ts +5 -5
- package/lib/dot.js +1121 -1095
- package/lib/dot.js.map +1 -1
- package/lib/dothtml.d.ts +29 -28
- package/lib/dothtml.js +14 -37
- package/lib/dothtml.js.map +1 -1
- package/lib/err.d.ts +2 -2
- package/lib/err.js +25 -25
- package/lib/event-bus.d.ts +10 -10
- package/lib/event-bus.js +36 -36
- package/lib/i-dot.d.ts +689 -674
- package/lib/i-dot.js +2 -2
- package/lib/node-polyfill.d.ts +2 -2
- package/lib/node-polyfill.js +13 -13
- package/lib/observable-array.d.ts +49 -49
- package/lib/observable-array.js +273 -273
- package/lib/pages/home-page.d.ts +9 -0
- package/lib/pages/home-page.js +24 -0
- package/lib/pages/home-page.js.map +1 -0
- package/lib/styling/css-types.ts/css-angle.d.ts +7 -7
- package/lib/styling/css-types.ts/css-angle.js +21 -21
- package/lib/styling/css-types.ts/css-color.d.ts +9 -9
- package/lib/styling/css-types.ts/css-color.js +823 -823
- package/lib/styling/css-types.ts/css-complex.d.ts +7 -7
- package/lib/styling/css-types.ts/css-complex.js +22 -22
- package/lib/styling/css-types.ts/css-data-type.d.ts +5 -5
- package/lib/styling/css-types.ts/css-data-type.js +8 -8
- package/lib/styling/css-types.ts/css-filter.d.ts +22 -22
- package/lib/styling/css-types.ts/css-filter.js +120 -120
- package/lib/styling/css-types.ts/css-length.d.ts +7 -7
- package/lib/styling/css-types.ts/css-length.js +23 -23
- package/lib/styling/css-types.ts/css-number.d.ts +6 -6
- package/lib/styling/css-types.ts/css-number.js +16 -16
- package/lib/styling/css-types.ts/css-percentage.d.ts +5 -5
- package/lib/styling/css-types.ts/css-percentage.js +12 -12
- package/lib/styling/css-types.ts/css-transform.d.ts +38 -38
- package/lib/styling/css-types.ts/css-transform.js +182 -182
- package/lib/styling/css-types.ts/css-unknown.d.ts +6 -6
- package/lib/styling/css-types.ts/css-unknown.js +16 -16
- package/lib/styling/css-types.ts/css-url.d.ts +6 -6
- package/lib/styling/css-types.ts/css-url.js +44 -44
- package/lib/styling/i-dotcss.d.ts +1085 -1085
- package/lib/styling/i-dotcss.js +2 -2
- package/lib/styling/style-builder.d.ts +24 -24
- package/lib/styling/style-builder.js +814 -814
- package/lib/styling/unit-function-tables.d.ts +10 -10
- package/lib/styling/unit-function-tables.js +26 -26
- package/package.json +9 -8
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { IDotDocument } from "./i-dot";
|
|
2
|
-
export declare abstract class ArgCallback {
|
|
3
|
-
el: Element;
|
|
4
|
-
f: (content?: any, index?: number) => string;
|
|
5
|
-
constructor(element: Element, value: (content?: any, index?: number) => string);
|
|
6
|
-
abstract updateContent(dot: IDotDocument, propVal?: any): any;
|
|
7
|
-
}
|
|
8
|
-
export declare class AttrArgCallback extends ArgCallback {
|
|
9
|
-
attr: string;
|
|
10
|
-
constructor(element: Element, attributeName: string, value: (content?: any) => string);
|
|
11
|
-
updateContent(dot: any): void;
|
|
12
|
-
}
|
|
13
|
-
export declare class ContentArgCallback extends ArgCallback {
|
|
14
|
-
constructor(element: Element, content: () => string);
|
|
15
|
-
updateContent(dot: any, propVal: string): void;
|
|
16
|
-
}
|
|
17
|
-
export declare class ArrayArgCallback extends ArgCallback {
|
|
18
|
-
dotTarget: IDotDocument;
|
|
19
|
-
constructor(dotTarget: any, content: any);
|
|
20
|
-
updateContent(): void;
|
|
21
|
-
}
|
|
22
|
-
export declare class ConditionalArgCallback extends ArgCallback {
|
|
23
|
-
startNode: Node;
|
|
24
|
-
endNode: Node;
|
|
25
|
-
condition: () => boolean | boolean;
|
|
26
|
-
lastValue: boolean;
|
|
27
|
-
constructor(startNode: any, endNode: any, content: any, condition: any);
|
|
28
|
-
updateContent(dot: any): void;
|
|
29
|
-
}
|
|
1
|
+
import { IDotDocument } from "./i-dot";
|
|
2
|
+
export declare abstract class ArgCallback {
|
|
3
|
+
el: Element;
|
|
4
|
+
f: (content?: any, index?: number) => string;
|
|
5
|
+
constructor(element: Element, value: (content?: any, index?: number) => string);
|
|
6
|
+
abstract updateContent(dot: IDotDocument, propVal?: any): any;
|
|
7
|
+
}
|
|
8
|
+
export declare class AttrArgCallback extends ArgCallback {
|
|
9
|
+
attr: string;
|
|
10
|
+
constructor(element: Element, attributeName: string, value: (content?: any) => string);
|
|
11
|
+
updateContent(dot: any): void;
|
|
12
|
+
}
|
|
13
|
+
export declare class ContentArgCallback extends ArgCallback {
|
|
14
|
+
constructor(element: Element, content: () => string);
|
|
15
|
+
updateContent(dot: any, propVal: string): void;
|
|
16
|
+
}
|
|
17
|
+
export declare class ArrayArgCallback extends ArgCallback {
|
|
18
|
+
dotTarget: IDotDocument;
|
|
19
|
+
constructor(dotTarget: any, content: any);
|
|
20
|
+
updateContent(): void;
|
|
21
|
+
}
|
|
22
|
+
export declare class ConditionalArgCallback extends ArgCallback {
|
|
23
|
+
startNode: Node;
|
|
24
|
+
endNode: Node;
|
|
25
|
+
condition: () => boolean | boolean;
|
|
26
|
+
lastValue: boolean;
|
|
27
|
+
constructor(startNode: any, endNode: any, content: any, condition: any);
|
|
28
|
+
updateContent(dot: any): void;
|
|
29
|
+
}
|
package/lib/arg-callback-obj.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConditionalArgCallback = exports.ArrayArgCallback = exports.ContentArgCallback = exports.AttrArgCallback = exports.ArgCallback = void 0;
|
|
4
|
-
class ArgCallback {
|
|
5
|
-
constructor(element, value) {
|
|
6
|
-
this.el = element;
|
|
7
|
-
this.f = value;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.ArgCallback = ArgCallback;
|
|
11
|
-
class AttrArgCallback extends ArgCallback {
|
|
12
|
-
constructor(element, attributeName, value) {
|
|
13
|
-
super(element, value);
|
|
14
|
-
this.attr = attributeName;
|
|
15
|
-
}
|
|
16
|
-
updateContent(dot) {
|
|
17
|
-
this.el.setAttribute(this.attr, this.f());
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.AttrArgCallback = AttrArgCallback;
|
|
21
|
-
class ContentArgCallback extends ArgCallback {
|
|
22
|
-
constructor(element, content) {
|
|
23
|
-
super(element, content);
|
|
24
|
-
}
|
|
25
|
-
updateContent(dot, propVal) {
|
|
26
|
-
dot(this.el).empty().h(this.f(propVal));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.ContentArgCallback = ContentArgCallback;
|
|
30
|
-
class ArrayArgCallback extends ArgCallback {
|
|
31
|
-
constructor(dotTarget, content) {
|
|
32
|
-
super(null, content);
|
|
33
|
-
this.dotTarget = dotTarget;
|
|
34
|
-
}
|
|
35
|
-
updateContent() { }
|
|
36
|
-
}
|
|
37
|
-
exports.ArrayArgCallback = ArrayArgCallback;
|
|
38
|
-
class ConditionalArgCallback extends ArgCallback {
|
|
39
|
-
constructor(startNode, endNode, content, condition) {
|
|
40
|
-
super(null, content);
|
|
41
|
-
this.startNode = startNode;
|
|
42
|
-
this.endNode = endNode;
|
|
43
|
-
this.condition = condition;
|
|
44
|
-
this.lastValue = undefined; // This will be set by the calling code - after the object is added to __currentArgCallback.
|
|
45
|
-
}
|
|
46
|
-
updateContent(dot) {
|
|
47
|
-
if (this.lastValue != !!this.condition()) {
|
|
48
|
-
this.lastValue = !this.lastValue;
|
|
49
|
-
if (this.lastValue) {
|
|
50
|
-
dot._appendOrCreateDocument(this.f, this.endNode.parentNode, this.endNode);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
do {
|
|
54
|
-
var e = this.startNode.nextSibling;
|
|
55
|
-
if (e && e != this.endNode) {
|
|
56
|
-
e.parentNode.removeChild(e);
|
|
57
|
-
}
|
|
58
|
-
} while (this.startNode.nextSibling && this.startNode.nextSibling != this.endNode);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.ConditionalArgCallback = ConditionalArgCallback;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConditionalArgCallback = exports.ArrayArgCallback = exports.ContentArgCallback = exports.AttrArgCallback = exports.ArgCallback = void 0;
|
|
4
|
+
class ArgCallback {
|
|
5
|
+
constructor(element, value) {
|
|
6
|
+
this.el = element;
|
|
7
|
+
this.f = value;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.ArgCallback = ArgCallback;
|
|
11
|
+
class AttrArgCallback extends ArgCallback {
|
|
12
|
+
constructor(element, attributeName, value) {
|
|
13
|
+
super(element, value);
|
|
14
|
+
this.attr = attributeName;
|
|
15
|
+
}
|
|
16
|
+
updateContent(dot) {
|
|
17
|
+
this.el.setAttribute(this.attr, this.f());
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.AttrArgCallback = AttrArgCallback;
|
|
21
|
+
class ContentArgCallback extends ArgCallback {
|
|
22
|
+
constructor(element, content) {
|
|
23
|
+
super(element, content);
|
|
24
|
+
}
|
|
25
|
+
updateContent(dot, propVal) {
|
|
26
|
+
dot(this.el).empty().h(this.f(propVal));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ContentArgCallback = ContentArgCallback;
|
|
30
|
+
class ArrayArgCallback extends ArgCallback {
|
|
31
|
+
constructor(dotTarget, content) {
|
|
32
|
+
super(null, content);
|
|
33
|
+
this.dotTarget = dotTarget;
|
|
34
|
+
}
|
|
35
|
+
updateContent() { }
|
|
36
|
+
}
|
|
37
|
+
exports.ArrayArgCallback = ArrayArgCallback;
|
|
38
|
+
class ConditionalArgCallback extends ArgCallback {
|
|
39
|
+
constructor(startNode, endNode, content, condition) {
|
|
40
|
+
super(null, content);
|
|
41
|
+
this.startNode = startNode;
|
|
42
|
+
this.endNode = endNode;
|
|
43
|
+
this.condition = condition;
|
|
44
|
+
this.lastValue = undefined; // This will be set by the calling code - after the object is added to __currentArgCallback.
|
|
45
|
+
}
|
|
46
|
+
updateContent(dot) {
|
|
47
|
+
if (this.lastValue != !!this.condition()) {
|
|
48
|
+
this.lastValue = !this.lastValue;
|
|
49
|
+
if (this.lastValue) {
|
|
50
|
+
dot._appendOrCreateDocument(this.f, this.endNode.parentNode, this.endNode);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
do {
|
|
54
|
+
var e = this.startNode.nextSibling;
|
|
55
|
+
if (e && e != this.endNode) {
|
|
56
|
+
e.parentNode.removeChild(e);
|
|
57
|
+
}
|
|
58
|
+
} while (this.startNode.nextSibling && this.startNode.nextSibling != this.endNode);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.ConditionalArgCallback = ConditionalArgCallback;
|
|
64
64
|
//# sourceMappingURL=arg-callback-obj.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import Component from "../component";
|
|
2
|
-
import { DotContent } from "../i-dot";
|
|
3
|
-
export declare class NavLink extends Component {
|
|
4
|
-
content: DotContent;
|
|
5
|
-
hRef: string;
|
|
6
|
-
constructor(content: DotContent, href: string);
|
|
7
|
-
builder(): import("../i-dot").IDotA;
|
|
8
|
-
}
|
|
1
|
+
import Component from "../component";
|
|
2
|
+
import { DotContent } from "../i-dot";
|
|
3
|
+
export declare class NavLink extends Component {
|
|
4
|
+
content: DotContent;
|
|
5
|
+
hRef: string;
|
|
6
|
+
constructor(content: DotContent, href: string);
|
|
7
|
+
builder(): import("../i-dot").IDotA;
|
|
8
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NavLink = void 0;
|
|
7
|
-
const component_1 = __importDefault(require("../component"));
|
|
8
|
-
const dot_1 = __importDefault(require("../dot"));
|
|
9
|
-
// TODO: make text and links mutable by making them properties.
|
|
10
|
-
class NavLink extends component_1.default {
|
|
11
|
-
constructor(content, href) {
|
|
12
|
-
super();
|
|
13
|
-
this.content = content;
|
|
14
|
-
this.hRef = href;
|
|
15
|
-
}
|
|
16
|
-
builder() {
|
|
17
|
-
return dot_1.default.a(this.content).hRef(this.hRef).onClick(e => {
|
|
18
|
-
e.preventDefault();
|
|
19
|
-
dot_1.default.navigate(this.hRef);
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.NavLink = NavLink;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NavLink = void 0;
|
|
7
|
+
const component_1 = __importDefault(require("../component"));
|
|
8
|
+
const dot_1 = __importDefault(require("../dot"));
|
|
9
|
+
// TODO: make text and links mutable by making them properties.
|
|
10
|
+
class NavLink extends component_1.default {
|
|
11
|
+
constructor(content, href) {
|
|
12
|
+
super();
|
|
13
|
+
this.content = content;
|
|
14
|
+
this.hRef = href;
|
|
15
|
+
}
|
|
16
|
+
builder() {
|
|
17
|
+
return dot_1.default.a(this.content).hRef(this.hRef).onClick(e => {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
dot_1.default.navigate(this.hRef);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.NavLink = NavLink;
|
|
24
24
|
//# sourceMappingURL=nav-link.js.map
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import Component from "../component";
|
|
2
|
-
interface RouterParams {
|
|
3
|
-
autoNavigate: boolean;
|
|
4
|
-
onNavigateInit: Function;
|
|
5
|
-
onError: Function;
|
|
6
|
-
onResponse: Function;
|
|
7
|
-
onComplete: Function;
|
|
8
|
-
routes: Array<{
|
|
9
|
-
path: string;
|
|
10
|
-
}>;
|
|
11
|
-
}
|
|
12
|
-
export default class DotRouter extends Component {
|
|
13
|
-
static allRouters: {
|
|
14
|
-
[key: string]: DotRouter;
|
|
15
|
-
};
|
|
16
|
-
static routerId: number;
|
|
17
|
-
static mayRedirect: boolean;
|
|
18
|
-
static _get(url: any, success: any, fail: any): void;
|
|
19
|
-
static routerEventSet: boolean;
|
|
20
|
-
static setupPopupFunction(): void;
|
|
21
|
-
id: number;
|
|
22
|
-
outlet: Element;
|
|
23
|
-
navId: number;
|
|
24
|
-
currentRoute: string;
|
|
25
|
-
currentParams: RouterParams;
|
|
26
|
-
params: RouterParams;
|
|
27
|
-
routesAndSegments: Array<{
|
|
28
|
-
path: string;
|
|
29
|
-
segments: string[];
|
|
30
|
-
}>;
|
|
31
|
-
constructor(params: RouterParams);
|
|
32
|
-
/**
|
|
33
|
-
* TODO: convert to interface.
|
|
34
|
-
* @param {Object} params - Parameters.
|
|
35
|
-
* @param {Array.<{path: string, title: string, component: Object}>} params.routes - Array of routes.
|
|
36
|
-
* @param {boolean} params.autoNavigate - Router will automatically navigate when outlet is created.
|
|
37
|
-
* @param {Function} params.onNavigateInit - Occurs before any request is sent, and before the router outlet is emptied.
|
|
38
|
-
* @param {Function} params.onError - Occurs in the event of an HTTP error.
|
|
39
|
-
* @param {Function} params.onResponse - Occurs after a successful HTTP response, but before rendering.
|
|
40
|
-
* @param {Function} params.onComplete - Occurs after an uncancelled route completes without an error.
|
|
41
|
-
*/
|
|
42
|
-
builder(): import("../i-dot").IDotElementDocument<import("../i-dot").IDotGenericElement>;
|
|
43
|
-
registered(): void;
|
|
44
|
-
ready(): void;
|
|
45
|
-
deleting(): void;
|
|
46
|
-
navigate(path: string, noHistory?: boolean, force?: boolean): {
|
|
47
|
-
cancel: () => void;
|
|
48
|
-
element: Element;
|
|
49
|
-
httpResponse: any;
|
|
50
|
-
isNew: boolean;
|
|
51
|
-
params: any;
|
|
52
|
-
path: string;
|
|
53
|
-
title: any;
|
|
54
|
-
wasCancelled: boolean;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export {};
|
|
1
|
+
import Component from "../component";
|
|
2
|
+
interface RouterParams {
|
|
3
|
+
autoNavigate: boolean;
|
|
4
|
+
onNavigateInit: Function;
|
|
5
|
+
onError: Function;
|
|
6
|
+
onResponse: Function;
|
|
7
|
+
onComplete: Function;
|
|
8
|
+
routes: Array<{
|
|
9
|
+
path: string;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
export default class DotRouter extends Component {
|
|
13
|
+
static allRouters: {
|
|
14
|
+
[key: string]: DotRouter;
|
|
15
|
+
};
|
|
16
|
+
static routerId: number;
|
|
17
|
+
static mayRedirect: boolean;
|
|
18
|
+
static _get(url: any, success: any, fail: any): void;
|
|
19
|
+
static routerEventSet: boolean;
|
|
20
|
+
static setupPopupFunction(): void;
|
|
21
|
+
id: number;
|
|
22
|
+
outlet: Element;
|
|
23
|
+
navId: number;
|
|
24
|
+
currentRoute: string;
|
|
25
|
+
currentParams: RouterParams;
|
|
26
|
+
params: RouterParams;
|
|
27
|
+
routesAndSegments: Array<{
|
|
28
|
+
path: string;
|
|
29
|
+
segments: string[];
|
|
30
|
+
}>;
|
|
31
|
+
constructor(params: RouterParams);
|
|
32
|
+
/**
|
|
33
|
+
* TODO: convert to interface.
|
|
34
|
+
* @param {Object} params - Parameters.
|
|
35
|
+
* @param {Array.<{path: string, title: string, component: Object}>} params.routes - Array of routes.
|
|
36
|
+
* @param {boolean} params.autoNavigate - Router will automatically navigate when outlet is created.
|
|
37
|
+
* @param {Function} params.onNavigateInit - Occurs before any request is sent, and before the router outlet is emptied.
|
|
38
|
+
* @param {Function} params.onError - Occurs in the event of an HTTP error.
|
|
39
|
+
* @param {Function} params.onResponse - Occurs after a successful HTTP response, but before rendering.
|
|
40
|
+
* @param {Function} params.onComplete - Occurs after an uncancelled route completes without an error.
|
|
41
|
+
*/
|
|
42
|
+
builder(): import("../i-dot").IDotElementDocument<import("../i-dot").IDotGenericElement>;
|
|
43
|
+
registered(): void;
|
|
44
|
+
ready(): void;
|
|
45
|
+
deleting(): void;
|
|
46
|
+
navigate(path: string, noHistory?: boolean, force?: boolean): {
|
|
47
|
+
cancel: () => void;
|
|
48
|
+
element: Element;
|
|
49
|
+
httpResponse: any;
|
|
50
|
+
isNew: boolean;
|
|
51
|
+
params: any;
|
|
52
|
+
path: string;
|
|
53
|
+
title: any;
|
|
54
|
+
wasCancelled: boolean;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export {};
|