j-templates 5.0.46 → 5.0.48
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/DOM/domNodeConfig.d.ts +2 -2
- package/DOM/domNodeConfig.js +91 -82
- package/DOM/elements.d.ts +24 -24
- package/DOM/elements.js +96 -96
- package/DOM/index.d.ts +3 -3
- package/DOM/index.js +19 -19
- package/DOM/svgElements.d.ts +4 -4
- package/DOM/svgElements.js +17 -17
- package/DOM/utils.d.ts +1 -1
- package/DOM/utils.js +47 -47
- package/DOM/window.d.ts +1 -1
- package/DOM/window.js +4 -4
- package/Node/boundNode.d.ts +4 -4
- package/Node/boundNode.js +99 -94
- package/Node/boundNode.types.d.ts +43 -43
- package/Node/boundNode.types.js +2 -2
- package/Node/component.d.ts +34 -34
- package/Node/component.js +80 -80
- package/Node/componentNode.d.ts +7 -7
- package/Node/componentNode.js +115 -115
- package/Node/componentNode.types.d.ts +35 -35
- package/Node/componentNode.types.js +2 -2
- package/Node/elementNode.d.ts +5 -5
- package/Node/elementNode.js +177 -158
- package/Node/elementNode.types.d.ts +39 -34
- package/Node/elementNode.types.js +2 -2
- package/Node/nodeConfig.d.ts +25 -22
- package/Node/nodeConfig.js +5 -5
- package/Node/nodeRef.d.ts +23 -21
- package/Node/nodeRef.js +182 -157
- package/Node/nodeRef.types.d.ts +21 -21
- package/Node/nodeRef.types.js +2 -2
- package/Store/Diff/diffAsync.d.ts +17 -17
- package/Store/Diff/diffAsync.js +36 -36
- package/Store/Diff/diffSync.d.ts +14 -14
- package/Store/Diff/diffSync.js +27 -27
- package/Store/Diff/diffTree.d.ts +24 -24
- package/Store/Diff/diffTree.js +232 -221
- package/Store/Diff/diffWorker.d.ts +3 -3
- package/Store/Diff/diffWorker.js +19 -19
- package/Store/Diff/workerQueue.d.ts +7 -7
- package/Store/Diff/workerQueue.js +35 -35
- package/Store/Store/store.d.ts +14 -14
- package/Store/Store/store.js +31 -31
- package/Store/Store/storeAsync.d.ts +20 -20
- package/Store/Store/storeAsync.js +49 -49
- package/Store/Store/storeAsyncWriter.d.ts +15 -15
- package/Store/Store/storeAsyncWriter.js +52 -52
- package/Store/Store/storeSync.d.ts +15 -15
- package/Store/Store/storeSync.js +33 -33
- package/Store/Store/storeSyncWriter.d.ts +12 -12
- package/Store/Store/storeSyncWriter.js +41 -41
- package/Store/Store/storeWriter.d.ts +9 -9
- package/Store/Store/storeWriter.js +30 -30
- package/Store/Tree/observableScope.d.ts +57 -56
- package/Store/Tree/observableScope.js +168 -164
- package/Store/Tree/observableTree.d.ts +34 -33
- package/Store/Tree/observableTree.js +233 -214
- package/Store/index.d.ts +4 -4
- package/Store/index.js +11 -11
- package/Utils/animation.d.ts +29 -29
- package/Utils/animation.js +108 -108
- package/Utils/asyncQueue.d.ts +8 -8
- package/Utils/asyncQueue.js +42 -42
- package/Utils/decorators.d.ts +37 -37
- package/Utils/decorators.js +310 -300
- package/Utils/emitter.d.ts +12 -12
- package/Utils/emitter.js +24 -24
- package/Utils/index.d.ts +2 -2
- package/Utils/index.js +18 -18
- package/Utils/injector.d.ts +13 -13
- package/Utils/injector.js +38 -38
- package/Utils/list.d.ts +26 -23
- package/Utils/list.js +158 -120
- package/Utils/router.d.ts +23 -23
- package/Utils/router.js +116 -116
- package/Utils/thread.d.ts +16 -16
- package/Utils/thread.js +108 -108
- package/Utils/utils.types.d.ts +3 -3
- package/Utils/utils.types.js +2 -2
- package/index.d.ts +2 -2
- package/index.js +5 -5
- package/jTemplates.js +2769 -2629
- package/jTemplates.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -1
- package/web.export.d.ts +4 -4
- package/web.export.js +24 -24
- package/web.js +5 -5
package/Node/nodeRef.js
CHANGED
|
@@ -1,157 +1,182 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NodeRef = exports.NodeRefType = void 0;
|
|
4
|
-
const nodeConfig_1 = require("./nodeConfig");
|
|
5
|
-
const injector_1 = require("../Utils/injector");
|
|
6
|
-
const boundNode_1 = require("./boundNode");
|
|
7
|
-
const elementNode_1 = require("./elementNode");
|
|
8
|
-
const componentNode_1 = require("./componentNode");
|
|
9
|
-
var NodeRefType;
|
|
10
|
-
(function (NodeRefType) {
|
|
11
|
-
NodeRefType[NodeRefType["NodeRef"] = 0] = "NodeRef";
|
|
12
|
-
NodeRefType[NodeRefType["BoundNode"] = 1] = "BoundNode";
|
|
13
|
-
NodeRefType[NodeRefType["ElementNode"] = 2] = "ElementNode";
|
|
14
|
-
NodeRefType[NodeRefType["ComponentNode"] = 3] = "ComponentNode";
|
|
15
|
-
})(NodeRefType
|
|
16
|
-
var NodeRef;
|
|
17
|
-
(function (NodeRef) {
|
|
18
|
-
function Wrap(node) {
|
|
19
|
-
var nodeRef = Create(null, null, NodeRefType.NodeRef);
|
|
20
|
-
nodeRef.node = node;
|
|
21
|
-
nodeRef.childNodes = new Set();
|
|
22
|
-
return nodeRef;
|
|
23
|
-
}
|
|
24
|
-
NodeRef.Wrap = Wrap;
|
|
25
|
-
function Create(nodeType, namespace, type) {
|
|
26
|
-
switch (type) {
|
|
27
|
-
case NodeRefType.NodeRef:
|
|
28
|
-
return {
|
|
29
|
-
node: null,
|
|
30
|
-
nodeType: nodeType,
|
|
31
|
-
nodeNamespace: namespace,
|
|
32
|
-
type: NodeRefType.NodeRef,
|
|
33
|
-
injector: injector_1.Injector.Current() || new injector_1.Injector(),
|
|
34
|
-
parent: null,
|
|
35
|
-
childNodes: null,
|
|
36
|
-
destroyed: false,
|
|
37
|
-
destroyables: []
|
|
38
|
-
};
|
|
39
|
-
case NodeRefType.BoundNode:
|
|
40
|
-
return {
|
|
41
|
-
node: null,
|
|
42
|
-
nodeType: nodeType,
|
|
43
|
-
nodeNamespace: namespace,
|
|
44
|
-
type: NodeRefType.BoundNode,
|
|
45
|
-
injector: injector_1.Injector.Current() || new injector_1.Injector(),
|
|
46
|
-
parent: null,
|
|
47
|
-
childNodes: null,
|
|
48
|
-
destroyed: false,
|
|
49
|
-
destroyables: [],
|
|
50
|
-
lastProperties: null,
|
|
51
|
-
lastEvents: null,
|
|
52
|
-
setProperties: false,
|
|
53
|
-
setAttributes: false,
|
|
54
|
-
setEvents: false
|
|
55
|
-
};
|
|
56
|
-
case NodeRefType.ElementNode:
|
|
57
|
-
return {
|
|
58
|
-
node: null,
|
|
59
|
-
nodeType: nodeType,
|
|
60
|
-
nodeNamespace: namespace,
|
|
61
|
-
type: NodeRefType.ElementNode,
|
|
62
|
-
injector: injector_1.Injector.Current() || new injector_1.Injector(),
|
|
63
|
-
parent: null,
|
|
64
|
-
childNodes: null,
|
|
65
|
-
destroyed: false,
|
|
66
|
-
destroyables: [],
|
|
67
|
-
lastProperties: null,
|
|
68
|
-
lastEvents: null,
|
|
69
|
-
setProperties: false,
|
|
70
|
-
setAttributes: false,
|
|
71
|
-
setEvents: false,
|
|
72
|
-
childrenFunc: null,
|
|
73
|
-
|
|
74
|
-
setData: false
|
|
75
|
-
};
|
|
76
|
-
case NodeRefType.ComponentNode:
|
|
77
|
-
return {
|
|
78
|
-
node: null,
|
|
79
|
-
nodeType: nodeType,
|
|
80
|
-
nodeNamespace: namespace,
|
|
81
|
-
type: NodeRefType.ComponentNode,
|
|
82
|
-
injector: injector_1.Injector.Current() || new injector_1.Injector(),
|
|
83
|
-
parent: null,
|
|
84
|
-
childNodes: null,
|
|
85
|
-
destroyed: false,
|
|
86
|
-
destroyables: [],
|
|
87
|
-
lastProperties: null,
|
|
88
|
-
lastEvents: null,
|
|
89
|
-
setProperties: false,
|
|
90
|
-
setAttributes: false,
|
|
91
|
-
setEvents: false,
|
|
92
|
-
component: null,
|
|
93
|
-
componentEvents: null
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
NodeRef.Create = Create;
|
|
98
|
-
function Init(nodeRef) {
|
|
99
|
-
if (nodeRef.node)
|
|
100
|
-
return;
|
|
101
|
-
nodeRef.node = nodeConfig_1.NodeConfig.createNode(nodeRef.nodeType, nodeRef.nodeNamespace);
|
|
102
|
-
nodeRef.childNodes = new Set();
|
|
103
|
-
switch (nodeRef.type) {
|
|
104
|
-
case NodeRefType.BoundNode:
|
|
105
|
-
boundNode_1.BoundNode.Init(nodeRef);
|
|
106
|
-
break;
|
|
107
|
-
case NodeRefType.ElementNode:
|
|
108
|
-
elementNode_1.ElementNode.Init(nodeRef);
|
|
109
|
-
break;
|
|
110
|
-
case NodeRefType.ComponentNode:
|
|
111
|
-
componentNode_1.ComponentNode.Init(nodeRef);
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
NodeRef.Init = Init;
|
|
116
|
-
function InitAll(nodeRefs) {
|
|
117
|
-
for (var x = 0; x < nodeRefs.length; x++)
|
|
118
|
-
Init(nodeRefs[x]);
|
|
119
|
-
}
|
|
120
|
-
NodeRef.InitAll = InitAll;
|
|
121
|
-
function AddChild(node, child) {
|
|
122
|
-
child.parent = node;
|
|
123
|
-
node.childNodes.add(child);
|
|
124
|
-
nodeConfig_1.NodeConfig.addChild(node.node, child.node);
|
|
125
|
-
}
|
|
126
|
-
NodeRef.AddChild = AddChild;
|
|
127
|
-
function AddChildAfter(node, currentChild, newChild) {
|
|
128
|
-
if (currentChild &&
|
|
129
|
-
throw "currentChild is not valid";
|
|
130
|
-
newChild.parent = node;
|
|
131
|
-
node.childNodes.add(newChild);
|
|
132
|
-
nodeConfig_1.NodeConfig.addChildAfter(node.node, currentChild && currentChild.node, newChild.node);
|
|
133
|
-
}
|
|
134
|
-
NodeRef.AddChildAfter = AddChildAfter;
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
nodeConfig_1.NodeConfig.
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeRef = exports.NodeRefType = void 0;
|
|
4
|
+
const nodeConfig_1 = require("./nodeConfig");
|
|
5
|
+
const injector_1 = require("../Utils/injector");
|
|
6
|
+
const boundNode_1 = require("./boundNode");
|
|
7
|
+
const elementNode_1 = require("./elementNode");
|
|
8
|
+
const componentNode_1 = require("./componentNode");
|
|
9
|
+
var NodeRefType;
|
|
10
|
+
(function (NodeRefType) {
|
|
11
|
+
NodeRefType[NodeRefType["NodeRef"] = 0] = "NodeRef";
|
|
12
|
+
NodeRefType[NodeRefType["BoundNode"] = 1] = "BoundNode";
|
|
13
|
+
NodeRefType[NodeRefType["ElementNode"] = 2] = "ElementNode";
|
|
14
|
+
NodeRefType[NodeRefType["ComponentNode"] = 3] = "ComponentNode";
|
|
15
|
+
})(NodeRefType || (exports.NodeRefType = NodeRefType = {}));
|
|
16
|
+
var NodeRef;
|
|
17
|
+
(function (NodeRef) {
|
|
18
|
+
function Wrap(node) {
|
|
19
|
+
var nodeRef = Create(null, null, NodeRefType.NodeRef);
|
|
20
|
+
nodeRef.node = node;
|
|
21
|
+
nodeRef.childNodes = new Set();
|
|
22
|
+
return nodeRef;
|
|
23
|
+
}
|
|
24
|
+
NodeRef.Wrap = Wrap;
|
|
25
|
+
function Create(nodeType, namespace, type) {
|
|
26
|
+
switch (type) {
|
|
27
|
+
case NodeRefType.NodeRef:
|
|
28
|
+
return {
|
|
29
|
+
node: null,
|
|
30
|
+
nodeType: nodeType,
|
|
31
|
+
nodeNamespace: namespace,
|
|
32
|
+
type: NodeRefType.NodeRef,
|
|
33
|
+
injector: injector_1.Injector.Current() || new injector_1.Injector(),
|
|
34
|
+
parent: null,
|
|
35
|
+
childNodes: null,
|
|
36
|
+
destroyed: false,
|
|
37
|
+
destroyables: []
|
|
38
|
+
};
|
|
39
|
+
case NodeRefType.BoundNode:
|
|
40
|
+
return {
|
|
41
|
+
node: null,
|
|
42
|
+
nodeType: nodeType,
|
|
43
|
+
nodeNamespace: namespace,
|
|
44
|
+
type: NodeRefType.BoundNode,
|
|
45
|
+
injector: injector_1.Injector.Current() || new injector_1.Injector(),
|
|
46
|
+
parent: null,
|
|
47
|
+
childNodes: null,
|
|
48
|
+
destroyed: false,
|
|
49
|
+
destroyables: [],
|
|
50
|
+
lastProperties: null,
|
|
51
|
+
lastEvents: null,
|
|
52
|
+
setProperties: false,
|
|
53
|
+
setAttributes: false,
|
|
54
|
+
setEvents: false
|
|
55
|
+
};
|
|
56
|
+
case NodeRefType.ElementNode:
|
|
57
|
+
return {
|
|
58
|
+
node: null,
|
|
59
|
+
nodeType: nodeType,
|
|
60
|
+
nodeNamespace: namespace,
|
|
61
|
+
type: NodeRefType.ElementNode,
|
|
62
|
+
injector: injector_1.Injector.Current() || new injector_1.Injector(),
|
|
63
|
+
parent: null,
|
|
64
|
+
childNodes: null,
|
|
65
|
+
destroyed: false,
|
|
66
|
+
destroyables: [],
|
|
67
|
+
lastProperties: null,
|
|
68
|
+
lastEvents: null,
|
|
69
|
+
setProperties: false,
|
|
70
|
+
setAttributes: false,
|
|
71
|
+
setEvents: false,
|
|
72
|
+
childrenFunc: null,
|
|
73
|
+
nodeList: null,
|
|
74
|
+
setData: false
|
|
75
|
+
};
|
|
76
|
+
case NodeRefType.ComponentNode:
|
|
77
|
+
return {
|
|
78
|
+
node: null,
|
|
79
|
+
nodeType: nodeType,
|
|
80
|
+
nodeNamespace: namespace,
|
|
81
|
+
type: NodeRefType.ComponentNode,
|
|
82
|
+
injector: injector_1.Injector.Current() || new injector_1.Injector(),
|
|
83
|
+
parent: null,
|
|
84
|
+
childNodes: null,
|
|
85
|
+
destroyed: false,
|
|
86
|
+
destroyables: [],
|
|
87
|
+
lastProperties: null,
|
|
88
|
+
lastEvents: null,
|
|
89
|
+
setProperties: false,
|
|
90
|
+
setAttributes: false,
|
|
91
|
+
setEvents: false,
|
|
92
|
+
component: null,
|
|
93
|
+
componentEvents: null
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
NodeRef.Create = Create;
|
|
98
|
+
function Init(nodeRef) {
|
|
99
|
+
if (nodeRef.node)
|
|
100
|
+
return;
|
|
101
|
+
nodeRef.node = nodeConfig_1.NodeConfig.createNode(nodeRef.nodeType, nodeRef.nodeNamespace);
|
|
102
|
+
nodeRef.childNodes = new Set();
|
|
103
|
+
switch (nodeRef.type) {
|
|
104
|
+
case NodeRefType.BoundNode:
|
|
105
|
+
boundNode_1.BoundNode.Init(nodeRef);
|
|
106
|
+
break;
|
|
107
|
+
case NodeRefType.ElementNode:
|
|
108
|
+
elementNode_1.ElementNode.Init(nodeRef);
|
|
109
|
+
break;
|
|
110
|
+
case NodeRefType.ComponentNode:
|
|
111
|
+
componentNode_1.ComponentNode.Init(nodeRef);
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
NodeRef.Init = Init;
|
|
116
|
+
function InitAll(nodeRefs) {
|
|
117
|
+
for (var x = 0; x < nodeRefs.length; x++)
|
|
118
|
+
Init(nodeRefs[x]);
|
|
119
|
+
}
|
|
120
|
+
NodeRef.InitAll = InitAll;
|
|
121
|
+
function AddChild(node, child) {
|
|
122
|
+
child.parent = node;
|
|
123
|
+
node.childNodes.add(child);
|
|
124
|
+
nodeConfig_1.NodeConfig.addChild(node.node, child.node);
|
|
125
|
+
}
|
|
126
|
+
NodeRef.AddChild = AddChild;
|
|
127
|
+
function AddChildAfter(node, currentChild, newChild) {
|
|
128
|
+
if (currentChild && currentChild.parent !== node)
|
|
129
|
+
throw "currentChild is not valid";
|
|
130
|
+
newChild.parent = node;
|
|
131
|
+
node.childNodes.add(newChild);
|
|
132
|
+
nodeConfig_1.NodeConfig.addChildAfter(node.node, currentChild && currentChild.node, newChild.node);
|
|
133
|
+
}
|
|
134
|
+
NodeRef.AddChildAfter = AddChildAfter;
|
|
135
|
+
function ReconcileChildren(node, nextChildren) {
|
|
136
|
+
const rootNode = node.node;
|
|
137
|
+
if (nextChildren.size === 0) {
|
|
138
|
+
nodeConfig_1.NodeConfig.replaceChildren(rootNode, []);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
let priorNode;
|
|
142
|
+
let curDataNode = nextChildren?.head;
|
|
143
|
+
while (curDataNode) {
|
|
144
|
+
for (let x = 0; x < curDataNode.data.nodes.length; x++) {
|
|
145
|
+
const actualNode = priorNode ? nodeConfig_1.NodeConfig.getNextSibling(priorNode) : nodeConfig_1.NodeConfig.getFirstChild(rootNode);
|
|
146
|
+
const expectedNode = curDataNode.data.nodes[x].node;
|
|
147
|
+
if (actualNode !== expectedNode) {
|
|
148
|
+
nodeConfig_1.NodeConfig.addChildBefore(rootNode, actualNode, expectedNode);
|
|
149
|
+
}
|
|
150
|
+
priorNode = expectedNode;
|
|
151
|
+
}
|
|
152
|
+
curDataNode = curDataNode.next;
|
|
153
|
+
}
|
|
154
|
+
let remainingSibling = priorNode && nodeConfig_1.NodeConfig.getNextSibling(priorNode);
|
|
155
|
+
while (remainingSibling) {
|
|
156
|
+
nodeConfig_1.NodeConfig.removeChild(rootNode, remainingSibling);
|
|
157
|
+
remainingSibling = nodeConfig_1.NodeConfig.getNextSibling(priorNode);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
NodeRef.ReconcileChildren = ReconcileChildren;
|
|
161
|
+
function DetachChild(node, child) {
|
|
162
|
+
if (node.childNodes.delete(child)) {
|
|
163
|
+
nodeConfig_1.NodeConfig.removeChild(node.node, child.node);
|
|
164
|
+
child.parent = null;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
NodeRef.DetachChild = DetachChild;
|
|
168
|
+
function Destroy(node) {
|
|
169
|
+
if (node.destroyed)
|
|
170
|
+
return;
|
|
171
|
+
node.destroyed = true;
|
|
172
|
+
node.childNodes?.forEach(Destroy);
|
|
173
|
+
for (let x = 0; x < node.destroyables.length; x++)
|
|
174
|
+
node.destroyables[x]?.Destroy();
|
|
175
|
+
}
|
|
176
|
+
NodeRef.Destroy = Destroy;
|
|
177
|
+
function DestroyAll(nodes) {
|
|
178
|
+
for (var x = 0; x < nodes.length; x++)
|
|
179
|
+
Destroy(nodes[x]);
|
|
180
|
+
}
|
|
181
|
+
NodeRef.DestroyAll = DestroyAll;
|
|
182
|
+
})(NodeRef || (exports.NodeRef = NodeRef = {}));
|
package/Node/nodeRef.types.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Injector } from "../Utils/injector";
|
|
2
|
-
import { IDestroyable } from "../Utils/utils.types";
|
|
3
|
-
import { IBoundNode } from "./boundNode.types";
|
|
4
|
-
import { IComponentNode } from "./componentNode.types";
|
|
5
|
-
import { IElementNode } from "./elementNode.types";
|
|
6
|
-
import { NodeRefType } from "./nodeRef";
|
|
7
|
-
export interface INodeRefBase {
|
|
8
|
-
type: NodeRefType;
|
|
9
|
-
node: any;
|
|
10
|
-
nodeType: any;
|
|
11
|
-
nodeNamespace: string;
|
|
12
|
-
injector: Injector;
|
|
13
|
-
parent: INodeRefBase;
|
|
14
|
-
childNodes: Set<INodeRefBase>;
|
|
15
|
-
destroyed: boolean;
|
|
16
|
-
destroyables: IDestroyable[];
|
|
17
|
-
}
|
|
18
|
-
export interface INodeRef extends INodeRefBase {
|
|
19
|
-
type: NodeRefType.NodeRef;
|
|
20
|
-
}
|
|
21
|
-
export type NodeRefTypes = INodeRef | IBoundNode | IElementNode<any> | IComponentNode<any, any, any>;
|
|
1
|
+
import { Injector } from "../Utils/injector";
|
|
2
|
+
import { IDestroyable } from "../Utils/utils.types";
|
|
3
|
+
import { IBoundNode } from "./boundNode.types";
|
|
4
|
+
import { IComponentNode } from "./componentNode.types";
|
|
5
|
+
import { IElementNode } from "./elementNode.types";
|
|
6
|
+
import { NodeRefType } from "./nodeRef";
|
|
7
|
+
export interface INodeRefBase {
|
|
8
|
+
type: NodeRefType;
|
|
9
|
+
node: any;
|
|
10
|
+
nodeType: any;
|
|
11
|
+
nodeNamespace: string;
|
|
12
|
+
injector: Injector;
|
|
13
|
+
parent: INodeRefBase;
|
|
14
|
+
childNodes: Set<INodeRefBase>;
|
|
15
|
+
destroyed: boolean;
|
|
16
|
+
destroyables: IDestroyable[];
|
|
17
|
+
}
|
|
18
|
+
export interface INodeRef extends INodeRefBase {
|
|
19
|
+
type: NodeRefType.NodeRef;
|
|
20
|
+
}
|
|
21
|
+
export type NodeRefTypes = INodeRef | IBoundNode | IElementNode<any> | IComponentNode<any, any, any>;
|
package/Node/nodeRef.types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { IDiffResponse } from "./diffTree";
|
|
2
|
-
export declare class DiffAsync {
|
|
3
|
-
private workerQueue;
|
|
4
|
-
constructor(keyFunc?: {
|
|
5
|
-
(val: any): string;
|
|
6
|
-
});
|
|
7
|
-
static GetKeyRef(key: string): string;
|
|
8
|
-
static ReadKeyRef(ref: string): string;
|
|
9
|
-
DiffPath(path: string, value: any): Promise<IDiffResponse>;
|
|
10
|
-
DiffBatch(data: Array<{
|
|
11
|
-
path: string;
|
|
12
|
-
value: any;
|
|
13
|
-
}>): Promise<IDiffResponse>;
|
|
14
|
-
UpdatePath(path: string, value: any): Promise<void>;
|
|
15
|
-
GetPath(path: string): Promise<any>;
|
|
16
|
-
Destroy(): void;
|
|
17
|
-
}
|
|
1
|
+
import { IDiffResponse } from "./diffTree";
|
|
2
|
+
export declare class DiffAsync {
|
|
3
|
+
private workerQueue;
|
|
4
|
+
constructor(keyFunc?: {
|
|
5
|
+
(val: any): string;
|
|
6
|
+
});
|
|
7
|
+
static GetKeyRef(key: string): string;
|
|
8
|
+
static ReadKeyRef(ref: string): string;
|
|
9
|
+
DiffPath(path: string, value: any): Promise<IDiffResponse>;
|
|
10
|
+
DiffBatch(data: Array<{
|
|
11
|
+
path: string;
|
|
12
|
+
value: any;
|
|
13
|
+
}>): Promise<IDiffResponse>;
|
|
14
|
+
UpdatePath(path: string, value: any): Promise<void>;
|
|
15
|
+
GetPath(path: string): Promise<any>;
|
|
16
|
+
Destroy(): void;
|
|
17
|
+
}
|
package/Store/Diff/diffAsync.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DiffAsync = void 0;
|
|
4
|
-
const diffTree_1 = require("./diffTree");
|
|
5
|
-
const workerQueue_1 = require("./workerQueue");
|
|
6
|
-
const diffWorker_1 = require("./diffWorker");
|
|
7
|
-
const diffCnstr = (0, diffTree_1.DiffTreeScope)();
|
|
8
|
-
class DiffAsync {
|
|
9
|
-
workerQueue;
|
|
10
|
-
constructor(keyFunc) {
|
|
11
|
-
this.workerQueue = new workerQueue_1.WorkerQueue(diffWorker_1.DiffWorker.Create());
|
|
12
|
-
this.workerQueue.Push({ method: "create", arguments: [keyFunc.toString()] });
|
|
13
|
-
}
|
|
14
|
-
static GetKeyRef(key) {
|
|
15
|
-
return diffCnstr.GetKeyRef(key);
|
|
16
|
-
}
|
|
17
|
-
static ReadKeyRef(ref) {
|
|
18
|
-
return diffCnstr.ReadKeyRef(ref);
|
|
19
|
-
}
|
|
20
|
-
async DiffPath(path, value) {
|
|
21
|
-
return await this.workerQueue.Push({ method: "diffpath", arguments: [path, value] });
|
|
22
|
-
}
|
|
23
|
-
async DiffBatch(data) {
|
|
24
|
-
return await this.workerQueue.Push({ method: "diffbatch", arguments: [data] });
|
|
25
|
-
}
|
|
26
|
-
async UpdatePath(path, value) {
|
|
27
|
-
await this.workerQueue.Push({ method: "updatepath", arguments: [path, value] });
|
|
28
|
-
}
|
|
29
|
-
async GetPath(path) {
|
|
30
|
-
return await this.workerQueue.Push({ method: "getpath", arguments: [path] });
|
|
31
|
-
}
|
|
32
|
-
Destroy() {
|
|
33
|
-
this.workerQueue.Destroy();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.DiffAsync = DiffAsync;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiffAsync = void 0;
|
|
4
|
+
const diffTree_1 = require("./diffTree");
|
|
5
|
+
const workerQueue_1 = require("./workerQueue");
|
|
6
|
+
const diffWorker_1 = require("./diffWorker");
|
|
7
|
+
const diffCnstr = (0, diffTree_1.DiffTreeScope)();
|
|
8
|
+
class DiffAsync {
|
|
9
|
+
workerQueue;
|
|
10
|
+
constructor(keyFunc) {
|
|
11
|
+
this.workerQueue = new workerQueue_1.WorkerQueue(diffWorker_1.DiffWorker.Create());
|
|
12
|
+
this.workerQueue.Push({ method: "create", arguments: [keyFunc.toString()] });
|
|
13
|
+
}
|
|
14
|
+
static GetKeyRef(key) {
|
|
15
|
+
return diffCnstr.GetKeyRef(key);
|
|
16
|
+
}
|
|
17
|
+
static ReadKeyRef(ref) {
|
|
18
|
+
return diffCnstr.ReadKeyRef(ref);
|
|
19
|
+
}
|
|
20
|
+
async DiffPath(path, value) {
|
|
21
|
+
return await this.workerQueue.Push({ method: "diffpath", arguments: [path, value] });
|
|
22
|
+
}
|
|
23
|
+
async DiffBatch(data) {
|
|
24
|
+
return await this.workerQueue.Push({ method: "diffbatch", arguments: [data] });
|
|
25
|
+
}
|
|
26
|
+
async UpdatePath(path, value) {
|
|
27
|
+
await this.workerQueue.Push({ method: "updatepath", arguments: [path, value] });
|
|
28
|
+
}
|
|
29
|
+
async GetPath(path) {
|
|
30
|
+
return await this.workerQueue.Push({ method: "getpath", arguments: [path] });
|
|
31
|
+
}
|
|
32
|
+
Destroy() {
|
|
33
|
+
this.workerQueue.Destroy();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.DiffAsync = DiffAsync;
|
package/Store/Diff/diffSync.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export declare class DiffSync {
|
|
2
|
-
private diffTree;
|
|
3
|
-
constructor(keyFunc?: {
|
|
4
|
-
(val: any): string;
|
|
5
|
-
});
|
|
6
|
-
static GetKeyRef(key: string): string;
|
|
7
|
-
static ReadKeyRef(ref: string): string;
|
|
8
|
-
DiffPath(path: string, value: any): import("./diffTree").IDiffResponse;
|
|
9
|
-
DiffBatch(data: Array<{
|
|
10
|
-
path: string;
|
|
11
|
-
value: any;
|
|
12
|
-
}>): import("./diffTree").IDiffResponse;
|
|
13
|
-
UpdatePath(path: string, value: any): void;
|
|
14
|
-
}
|
|
1
|
+
export declare class DiffSync {
|
|
2
|
+
private diffTree;
|
|
3
|
+
constructor(keyFunc?: {
|
|
4
|
+
(val: any): string;
|
|
5
|
+
});
|
|
6
|
+
static GetKeyRef(key: string): string;
|
|
7
|
+
static ReadKeyRef(ref: string): string;
|
|
8
|
+
DiffPath(path: string, value: any): import("./diffTree").IDiffResponse;
|
|
9
|
+
DiffBatch(data: Array<{
|
|
10
|
+
path: string;
|
|
11
|
+
value: any;
|
|
12
|
+
}>): import("./diffTree").IDiffResponse;
|
|
13
|
+
UpdatePath(path: string, value: any): void;
|
|
14
|
+
}
|
package/Store/Diff/diffSync.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DiffSync = void 0;
|
|
4
|
-
const diffTree_1 = require("./diffTree");
|
|
5
|
-
const diffCnstr = (0, diffTree_1.DiffTreeScope)();
|
|
6
|
-
class DiffSync {
|
|
7
|
-
diffTree;
|
|
8
|
-
constructor(keyFunc) {
|
|
9
|
-
this.diffTree = new diffCnstr(keyFunc);
|
|
10
|
-
}
|
|
11
|
-
static GetKeyRef(key) {
|
|
12
|
-
return diffCnstr.GetKeyRef(key);
|
|
13
|
-
}
|
|
14
|
-
static ReadKeyRef(ref) {
|
|
15
|
-
return diffCnstr.ReadKeyRef(ref);
|
|
16
|
-
}
|
|
17
|
-
DiffPath(path, value) {
|
|
18
|
-
return this.diffTree.DiffPath(path, value);
|
|
19
|
-
}
|
|
20
|
-
DiffBatch(data) {
|
|
21
|
-
return this.diffTree.DiffBatch(data);
|
|
22
|
-
}
|
|
23
|
-
UpdatePath(path, value) {
|
|
24
|
-
this.diffTree.UpdatePath(path, value);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.DiffSync = DiffSync;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiffSync = void 0;
|
|
4
|
+
const diffTree_1 = require("./diffTree");
|
|
5
|
+
const diffCnstr = (0, diffTree_1.DiffTreeScope)();
|
|
6
|
+
class DiffSync {
|
|
7
|
+
diffTree;
|
|
8
|
+
constructor(keyFunc) {
|
|
9
|
+
this.diffTree = new diffCnstr(keyFunc);
|
|
10
|
+
}
|
|
11
|
+
static GetKeyRef(key) {
|
|
12
|
+
return diffCnstr.GetKeyRef(key);
|
|
13
|
+
}
|
|
14
|
+
static ReadKeyRef(ref) {
|
|
15
|
+
return diffCnstr.ReadKeyRef(ref);
|
|
16
|
+
}
|
|
17
|
+
DiffPath(path, value) {
|
|
18
|
+
return this.diffTree.DiffPath(path, value);
|
|
19
|
+
}
|
|
20
|
+
DiffBatch(data) {
|
|
21
|
+
return this.diffTree.DiffBatch(data);
|
|
22
|
+
}
|
|
23
|
+
UpdatePath(path, value) {
|
|
24
|
+
this.diffTree.UpdatePath(path, value);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.DiffSync = DiffSync;
|
package/Store/Diff/diffTree.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export interface IDiffMethod {
|
|
2
|
-
method: "create" | "diffpath" | "diffbatch" | "updatepath" | "getpath";
|
|
3
|
-
arguments: Array<any>;
|
|
4
|
-
}
|
|
5
|
-
export type IDiffResponse = {
|
|
6
|
-
path: string;
|
|
7
|
-
value: any;
|
|
8
|
-
}[];
|
|
9
|
-
export interface IDiffTree {
|
|
10
|
-
DiffBatch(data: Array<{
|
|
11
|
-
path: string;
|
|
12
|
-
value: any;
|
|
13
|
-
}>): IDiffResponse;
|
|
14
|
-
DiffPath(path: string, value: any): IDiffResponse;
|
|
15
|
-
UpdatePath(path: string, value: any): void;
|
|
16
|
-
}
|
|
17
|
-
export interface IDiffTreeConstructor {
|
|
18
|
-
new (keyFunc?: {
|
|
19
|
-
(val: any): string;
|
|
20
|
-
}): IDiffTree;
|
|
21
|
-
GetKeyRef(key: string): string;
|
|
22
|
-
ReadKeyRef(ref: string): string;
|
|
23
|
-
}
|
|
24
|
-
export declare function DiffTreeScope(worker?: boolean): IDiffTreeConstructor;
|
|
1
|
+
export interface IDiffMethod {
|
|
2
|
+
method: "create" | "diffpath" | "diffbatch" | "updatepath" | "getpath";
|
|
3
|
+
arguments: Array<any>;
|
|
4
|
+
}
|
|
5
|
+
export type IDiffResponse = {
|
|
6
|
+
path: string;
|
|
7
|
+
value: any;
|
|
8
|
+
}[];
|
|
9
|
+
export interface IDiffTree {
|
|
10
|
+
DiffBatch(data: Array<{
|
|
11
|
+
path: string;
|
|
12
|
+
value: any;
|
|
13
|
+
}>): IDiffResponse;
|
|
14
|
+
DiffPath(path: string, value: any): IDiffResponse;
|
|
15
|
+
UpdatePath(path: string, value: any): void;
|
|
16
|
+
}
|
|
17
|
+
export interface IDiffTreeConstructor {
|
|
18
|
+
new (keyFunc?: {
|
|
19
|
+
(val: any): string;
|
|
20
|
+
}): IDiffTree;
|
|
21
|
+
GetKeyRef(key: string): string;
|
|
22
|
+
ReadKeyRef(ref: string): string;
|
|
23
|
+
}
|
|
24
|
+
export declare function DiffTreeScope(worker?: boolean): IDiffTreeConstructor;
|