j-templates 5.0.45 → 5.0.47

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.
Files changed (91) hide show
  1. package/DOM/domNodeConfig.d.ts +2 -2
  2. package/DOM/domNodeConfig.js +82 -82
  3. package/DOM/elements.d.ts +24 -24
  4. package/DOM/elements.js +96 -96
  5. package/DOM/index.d.ts +3 -3
  6. package/DOM/index.js +19 -19
  7. package/DOM/svgElements.d.ts +4 -4
  8. package/DOM/svgElements.js +17 -17
  9. package/DOM/utils.d.ts +1 -1
  10. package/DOM/utils.js +47 -47
  11. package/DOM/window.d.ts +1 -1
  12. package/DOM/window.js +4 -4
  13. package/Node/boundNode.d.ts +4 -4
  14. package/Node/boundNode.js +99 -94
  15. package/Node/boundNode.types.d.ts +43 -43
  16. package/Node/boundNode.types.js +2 -2
  17. package/Node/component.d.ts +34 -34
  18. package/Node/component.js +80 -80
  19. package/Node/componentNode.d.ts +7 -7
  20. package/Node/componentNode.js +115 -115
  21. package/Node/componentNode.types.d.ts +35 -35
  22. package/Node/componentNode.types.js +2 -2
  23. package/Node/elementNode.d.ts +5 -5
  24. package/Node/elementNode.js +157 -158
  25. package/Node/elementNode.types.d.ts +34 -34
  26. package/Node/elementNode.types.js +2 -2
  27. package/Node/nodeConfig.d.ts +22 -22
  28. package/Node/nodeConfig.js +5 -5
  29. package/Node/nodeRef.d.ts +21 -21
  30. package/Node/nodeRef.js +157 -157
  31. package/Node/nodeRef.types.d.ts +21 -21
  32. package/Node/nodeRef.types.js +2 -2
  33. package/Store/Diff/diffAsync.d.ts +17 -17
  34. package/Store/Diff/diffAsync.js +36 -36
  35. package/Store/Diff/diffSync.d.ts +14 -14
  36. package/Store/Diff/diffSync.js +27 -27
  37. package/Store/Diff/diffTree.d.ts +24 -24
  38. package/Store/Diff/diffTree.js +232 -221
  39. package/Store/Diff/diffWorker.d.ts +3 -3
  40. package/Store/Diff/diffWorker.js +19 -19
  41. package/Store/Diff/workerQueue.d.ts +7 -7
  42. package/Store/Diff/workerQueue.js +35 -35
  43. package/Store/Store/store.d.ts +14 -14
  44. package/Store/Store/store.js +31 -31
  45. package/Store/Store/storeAsync.d.ts +20 -20
  46. package/Store/Store/storeAsync.js +49 -49
  47. package/Store/Store/storeAsyncWriter.d.ts +15 -15
  48. package/Store/Store/storeAsyncWriter.js +52 -52
  49. package/Store/Store/storeSync.d.ts +15 -15
  50. package/Store/Store/storeSync.js +33 -33
  51. package/Store/Store/storeSyncWriter.d.ts +12 -12
  52. package/Store/Store/storeSyncWriter.js +41 -41
  53. package/Store/Store/storeWriter.d.ts +9 -9
  54. package/Store/Store/storeWriter.js +30 -30
  55. package/Store/Tree/observableScope.d.ts +57 -56
  56. package/Store/Tree/observableScope.js +168 -164
  57. package/Store/Tree/observableTree.d.ts +34 -33
  58. package/Store/Tree/observableTree.js +232 -214
  59. package/Store/index.d.ts +4 -4
  60. package/Store/index.js +11 -11
  61. package/Utils/animation.d.ts +29 -29
  62. package/Utils/animation.js +108 -108
  63. package/Utils/asyncQueue.d.ts +8 -8
  64. package/Utils/asyncQueue.js +42 -42
  65. package/Utils/decorators.d.ts +37 -37
  66. package/Utils/decorators.js +310 -300
  67. package/Utils/emitter.d.ts +12 -12
  68. package/Utils/emitter.js +24 -24
  69. package/Utils/index.d.ts +2 -2
  70. package/Utils/index.js +18 -18
  71. package/Utils/injector.d.ts +13 -13
  72. package/Utils/injector.js +38 -38
  73. package/Utils/list.d.ts +23 -23
  74. package/Utils/list.js +120 -120
  75. package/Utils/router.d.ts +23 -23
  76. package/Utils/router.js +116 -116
  77. package/Utils/thread.d.ts +16 -16
  78. package/Utils/thread.js +108 -108
  79. package/Utils/utils.types.d.ts +3 -3
  80. package/Utils/utils.types.js +2 -2
  81. package/index.d.ts +2 -2
  82. package/index.debug.d.ts +1 -0
  83. package/index.debug.js +12 -0
  84. package/index.js +5 -5
  85. package/jTemplates.js +2676 -2629
  86. package/jTemplates.js.map +1 -1
  87. package/package.json +1 -1
  88. package/web.d.ts +1 -1
  89. package/web.export.d.ts +4 -4
  90. package/web.export.js +24 -24
  91. package/web.js +5 -5
package/Utils/emitter.js CHANGED
@@ -1,24 +1,24 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Emitter = void 0;
4
- var Emitter;
5
- (function (Emitter) {
6
- function Create() {
7
- return new Set();
8
- }
9
- Emitter.Create = Create;
10
- function On(emitter, callback) {
11
- emitter.add(callback);
12
- }
13
- Emitter.On = On;
14
- function Emit(emitter, ...args) {
15
- emitter.forEach(function (cb) {
16
- cb(...args);
17
- });
18
- }
19
- Emitter.Emit = Emit;
20
- function Remove(emitter, callback) {
21
- emitter.delete(callback);
22
- }
23
- Emitter.Remove = Remove;
24
- })(Emitter = exports.Emitter || (exports.Emitter = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Emitter = void 0;
4
+ var Emitter;
5
+ (function (Emitter) {
6
+ function Create() {
7
+ return new Set();
8
+ }
9
+ Emitter.Create = Create;
10
+ function On(emitter, callback) {
11
+ emitter.add(callback);
12
+ }
13
+ Emitter.On = On;
14
+ function Emit(emitter, ...args) {
15
+ emitter.forEach(function (cb) {
16
+ cb(...args);
17
+ });
18
+ }
19
+ Emitter.Emit = Emit;
20
+ function Remove(emitter, callback) {
21
+ emitter.delete(callback);
22
+ }
23
+ Emitter.Remove = Remove;
24
+ })(Emitter || (exports.Emitter = Emitter = {}));
package/Utils/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./decorators";
2
- export * from "./animation";
1
+ export * from "./decorators";
2
+ export * from "./animation";
package/Utils/index.js CHANGED
@@ -1,18 +1,18 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./decorators"), exports);
18
- __exportStar(require("./animation"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./decorators"), exports);
18
+ __exportStar(require("./animation"), exports);
@@ -1,13 +1,13 @@
1
- export declare class Injector {
2
- private parent;
3
- private typeMap;
4
- constructor();
5
- Get<T>(type: any): T;
6
- Set<T>(type: any, instance: T): void;
7
- }
8
- export declare namespace Injector {
9
- function Current(): Injector;
10
- function Scope<R = void, P extends any[] = []>(injector: Injector, action: {
11
- (...args: P): R;
12
- }, ...args: P): R;
13
- }
1
+ export declare class Injector {
2
+ private parent;
3
+ private typeMap;
4
+ constructor();
5
+ Get<T>(type: any): T;
6
+ Set<T>(type: any, instance: T): void;
7
+ }
8
+ export declare namespace Injector {
9
+ function Current(): Injector;
10
+ function Scope<R = void, P extends any[] = []>(injector: Injector, action: {
11
+ (...args: P): R;
12
+ }, ...args: P): R;
13
+ }
package/Utils/injector.js CHANGED
@@ -1,38 +1,38 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Injector = void 0;
4
- class Injector {
5
- parent;
6
- typeMap;
7
- constructor() {
8
- this.parent = Injector.Current();
9
- this.typeMap = new Map();
10
- }
11
- Get(type) {
12
- if (this.typeMap.size === 0)
13
- return this.parent && this.parent.Get(type);
14
- var ret = this.typeMap.get(type);
15
- if (!ret)
16
- ret = this.parent && this.parent.Get(type);
17
- return ret;
18
- }
19
- Set(type, instance) {
20
- this.typeMap.set(type, instance);
21
- }
22
- }
23
- exports.Injector = Injector;
24
- (function (Injector) {
25
- var scope = null;
26
- function Current() {
27
- return scope;
28
- }
29
- Injector.Current = Current;
30
- function Scope(injector, action, ...args) {
31
- var parent = Current();
32
- scope = injector;
33
- const ret = action(...args);
34
- scope = parent;
35
- return ret;
36
- }
37
- Injector.Scope = Scope;
38
- })(Injector = exports.Injector || (exports.Injector = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Injector = void 0;
4
+ class Injector {
5
+ parent;
6
+ typeMap;
7
+ constructor() {
8
+ this.parent = Injector.Current();
9
+ this.typeMap = new Map();
10
+ }
11
+ Get(type) {
12
+ if (this.typeMap.size === 0)
13
+ return this.parent && this.parent.Get(type);
14
+ var ret = this.typeMap.get(type);
15
+ if (!ret)
16
+ ret = this.parent && this.parent.Get(type);
17
+ return ret;
18
+ }
19
+ Set(type, instance) {
20
+ this.typeMap.set(type, instance);
21
+ }
22
+ }
23
+ exports.Injector = Injector;
24
+ (function (Injector) {
25
+ var scope = null;
26
+ function Current() {
27
+ return scope;
28
+ }
29
+ Injector.Current = Current;
30
+ function Scope(injector, action, ...args) {
31
+ var parent = Current();
32
+ scope = injector;
33
+ const ret = action(...args);
34
+ scope = parent;
35
+ return ret;
36
+ }
37
+ Injector.Scope = Scope;
38
+ })(Injector || (exports.Injector = Injector = {}));
package/Utils/list.d.ts CHANGED
@@ -1,23 +1,23 @@
1
- export interface INode<T> {
2
- previous: INode<T>;
3
- next: INode<T>;
4
- data: T;
5
- }
6
- export interface IList<T> {
7
- head: INode<T>;
8
- tail: INode<T>;
9
- size: number;
10
- }
11
- export declare namespace List {
12
- function Create<T>(): IList<T>;
13
- function Clear<T>(list: IList<T>): void;
14
- function Push<T>(list: IList<T>, data: T): INode<T>;
15
- function Pop<T>(list: IList<T>): T;
16
- function Add<T>(list: IList<T>, data: T): INode<T>;
17
- function AddBefore<T>(list: IList<T>, node: INode<T>, data: T): INode<T>;
18
- function AddAfter<T>(list: IList<T>, node: INode<T>, data: T): INode<T>;
19
- function Remove<T>(list: IList<T>): T;
20
- function ForEach<T>(list: IList<T>, callback: {
21
- (value: T): void;
22
- }): void;
23
- }
1
+ export interface INode<T> {
2
+ previous: INode<T>;
3
+ next: INode<T>;
4
+ data: T;
5
+ }
6
+ export interface IList<T> {
7
+ head: INode<T>;
8
+ tail: INode<T>;
9
+ size: number;
10
+ }
11
+ export declare namespace List {
12
+ function Create<T>(): IList<T>;
13
+ function Clear<T>(list: IList<T>): void;
14
+ function Push<T>(list: IList<T>, data: T): INode<T>;
15
+ function Pop<T>(list: IList<T>): T;
16
+ function Add<T>(list: IList<T>, data: T): INode<T>;
17
+ function AddBefore<T>(list: IList<T>, node: INode<T>, data: T): INode<T>;
18
+ function AddAfter<T>(list: IList<T>, node: INode<T>, data: T): INode<T>;
19
+ function Remove<T>(list: IList<T>): T;
20
+ function ForEach<T>(list: IList<T>, callback: {
21
+ (value: T): void;
22
+ }): void;
23
+ }
package/Utils/list.js CHANGED
@@ -1,120 +1,120 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.List = void 0;
4
- var List;
5
- (function (List) {
6
- function Create() {
7
- return {
8
- head: null,
9
- tail: null,
10
- size: 0
11
- };
12
- }
13
- List.Create = Create;
14
- function Clear(list) {
15
- list.head = null;
16
- list.tail = null;
17
- list.size = 0;
18
- }
19
- List.Clear = Clear;
20
- function Push(list, data) {
21
- var node = { previous: null, next: null, data: data };
22
- if (list.size === 0) {
23
- list.head = node;
24
- list.tail = node;
25
- list.size = 1;
26
- }
27
- else {
28
- node.next = list.head;
29
- list.head.previous = node;
30
- list.head = node;
31
- list.size++;
32
- }
33
- return node;
34
- }
35
- List.Push = Push;
36
- function Pop(list) {
37
- if (list.size === 0)
38
- return null;
39
- var node = list.head;
40
- list.head = node.next;
41
- if (list.head)
42
- list.head.previous = null;
43
- list.size--;
44
- if (list.size === 0)
45
- list.tail = null;
46
- return node.data;
47
- }
48
- List.Pop = Pop;
49
- function Add(list, data) {
50
- var node = { previous: null, next: null, data: data };
51
- if (list.size === 0) {
52
- list.head = node;
53
- list.tail = node;
54
- list.size = 1;
55
- }
56
- else {
57
- node.previous = list.tail;
58
- list.tail.next = node;
59
- list.tail = node;
60
- list.size++;
61
- }
62
- return node;
63
- }
64
- List.Add = Add;
65
- function AddBefore(list, node, data) {
66
- if (!node)
67
- return List.Add(list, data);
68
- var newNode = { previous: null, next: null, data: data };
69
- var prevNode = node.previous;
70
- newNode.next = node;
71
- node.previous = newNode;
72
- if (list.head === node)
73
- list.head = newNode;
74
- if (prevNode) {
75
- prevNode.next = newNode;
76
- newNode.previous = prevNode;
77
- }
78
- list.size++;
79
- return newNode;
80
- }
81
- List.AddBefore = AddBefore;
82
- function AddAfter(list, node, data) {
83
- if (!node)
84
- return List.Push(list, data);
85
- var newNode = { previous: null, next: null, data: data };
86
- var nextNode = node.next;
87
- node.next = newNode;
88
- newNode.previous = node;
89
- if (list.tail === node)
90
- list.tail = newNode;
91
- if (nextNode) {
92
- nextNode.previous = newNode;
93
- newNode.next = nextNode;
94
- }
95
- list.size++;
96
- return newNode;
97
- }
98
- List.AddAfter = AddAfter;
99
- function Remove(list) {
100
- if (list.size === 0)
101
- return null;
102
- var node = list.tail;
103
- list.tail = node.previous;
104
- if (list.tail)
105
- list.tail.next = null;
106
- list.size--;
107
- if (list.size === 0)
108
- list.head = null;
109
- return node.data;
110
- }
111
- List.Remove = Remove;
112
- function ForEach(list, callback) {
113
- var node = list.head;
114
- while (node) {
115
- callback(node.data);
116
- node = node.next;
117
- }
118
- }
119
- List.ForEach = ForEach;
120
- })(List = exports.List || (exports.List = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.List = void 0;
4
+ var List;
5
+ (function (List) {
6
+ function Create() {
7
+ return {
8
+ head: null,
9
+ tail: null,
10
+ size: 0
11
+ };
12
+ }
13
+ List.Create = Create;
14
+ function Clear(list) {
15
+ list.head = null;
16
+ list.tail = null;
17
+ list.size = 0;
18
+ }
19
+ List.Clear = Clear;
20
+ function Push(list, data) {
21
+ var node = { previous: null, next: null, data: data };
22
+ if (list.size === 0) {
23
+ list.head = node;
24
+ list.tail = node;
25
+ list.size = 1;
26
+ }
27
+ else {
28
+ node.next = list.head;
29
+ list.head.previous = node;
30
+ list.head = node;
31
+ list.size++;
32
+ }
33
+ return node;
34
+ }
35
+ List.Push = Push;
36
+ function Pop(list) {
37
+ if (list.size === 0)
38
+ return null;
39
+ var node = list.head;
40
+ list.head = node.next;
41
+ if (list.head)
42
+ list.head.previous = null;
43
+ list.size--;
44
+ if (list.size === 0)
45
+ list.tail = null;
46
+ return node.data;
47
+ }
48
+ List.Pop = Pop;
49
+ function Add(list, data) {
50
+ var node = { previous: null, next: null, data: data };
51
+ if (list.size === 0) {
52
+ list.head = node;
53
+ list.tail = node;
54
+ list.size = 1;
55
+ }
56
+ else {
57
+ node.previous = list.tail;
58
+ list.tail.next = node;
59
+ list.tail = node;
60
+ list.size++;
61
+ }
62
+ return node;
63
+ }
64
+ List.Add = Add;
65
+ function AddBefore(list, node, data) {
66
+ if (!node)
67
+ return List.Add(list, data);
68
+ var newNode = { previous: null, next: null, data: data };
69
+ var prevNode = node.previous;
70
+ newNode.next = node;
71
+ node.previous = newNode;
72
+ if (list.head === node)
73
+ list.head = newNode;
74
+ if (prevNode) {
75
+ prevNode.next = newNode;
76
+ newNode.previous = prevNode;
77
+ }
78
+ list.size++;
79
+ return newNode;
80
+ }
81
+ List.AddBefore = AddBefore;
82
+ function AddAfter(list, node, data) {
83
+ if (!node)
84
+ return List.Push(list, data);
85
+ var newNode = { previous: null, next: null, data: data };
86
+ var nextNode = node.next;
87
+ node.next = newNode;
88
+ newNode.previous = node;
89
+ if (list.tail === node)
90
+ list.tail = newNode;
91
+ if (nextNode) {
92
+ nextNode.previous = newNode;
93
+ newNode.next = nextNode;
94
+ }
95
+ list.size++;
96
+ return newNode;
97
+ }
98
+ List.AddAfter = AddAfter;
99
+ function Remove(list) {
100
+ if (list.size === 0)
101
+ return null;
102
+ var node = list.tail;
103
+ list.tail = node.previous;
104
+ if (list.tail)
105
+ list.tail.next = null;
106
+ list.size--;
107
+ if (list.size === 0)
108
+ list.head = null;
109
+ return node.data;
110
+ }
111
+ List.Remove = Remove;
112
+ function ForEach(list, callback) {
113
+ var node = list.head;
114
+ while (node) {
115
+ callback(node.data);
116
+ node = node.next;
117
+ }
118
+ }
119
+ List.ForEach = ForEach;
120
+ })(List || (exports.List = List = {}));
package/Utils/router.d.ts CHANGED
@@ -1,23 +1,23 @@
1
- import { Store } from "../Store";
2
- export declare abstract class Router<T extends {}> {
3
- private store;
4
- private routeScope;
5
- private initPromise;
6
- protected get State(): T;
7
- protected get ReplaceHistory(): boolean;
8
- get Init(): Promise<void>;
9
- constructor(store: Store<T>);
10
- protected abstract CreateRoutePart(): string;
11
- abstract GetRoutePart(route: string): string;
12
- abstract Read(routePart: string): Promise<void>;
13
- Route(): string;
14
- JSON(): any;
15
- SetState(state: Partial<T>): Promise<void>;
16
- Destroy(): void;
17
- }
18
- export declare namespace Router {
19
- function PushRoute(): void;
20
- function ReplaceRoute(): void;
21
- function Destroy(router: Router<any>): void;
22
- function Register(router: Router<any>): Promise<void>;
23
- }
1
+ import { Store } from "../Store";
2
+ export declare abstract class Router<T extends {}> {
3
+ private store;
4
+ private routeScope;
5
+ private initPromise;
6
+ protected get State(): T;
7
+ protected get ReplaceHistory(): boolean;
8
+ get Init(): Promise<void>;
9
+ constructor(store: Store<T>);
10
+ protected abstract CreateRoutePart(): string;
11
+ abstract GetRoutePart(route: string): string;
12
+ abstract Read(routePart: string): Promise<void>;
13
+ Route(): string;
14
+ JSON(): any;
15
+ SetState(state: Partial<T>): Promise<void>;
16
+ Destroy(): void;
17
+ }
18
+ export declare namespace Router {
19
+ function PushRoute(): void;
20
+ function ReplaceRoute(): void;
21
+ function Destroy(router: Router<any>): void;
22
+ function Register(router: Router<any>): Promise<void>;
23
+ }