j-templates 7.0.40 → 7.0.42
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/Node → Node}/vNode.js +2 -21
- package/package.json +3 -39
- package/LICENSE +0 -21
- package/README.md +0 -36
- package/lib/package.json +0 -13
- /package/{lib/DOM → DOM}/createAssignment.d.ts +0 -0
- /package/{lib/DOM → DOM}/createAssignment.js +0 -0
- /package/{lib/DOM → DOM}/createAttributeAssignment.d.ts +0 -0
- /package/{lib/DOM → DOM}/createAttributeAssignment.js +0 -0
- /package/{lib/DOM → DOM}/createEventAssignment.d.ts +0 -0
- /package/{lib/DOM → DOM}/createEventAssignment.js +0 -0
- /package/{lib/DOM → DOM}/createPropertyAssignment.d.ts +0 -0
- /package/{lib/DOM → DOM}/createPropertyAssignment.js +0 -0
- /package/{lib/DOM → DOM}/domNodeConfig.d.ts +0 -0
- /package/{lib/DOM → DOM}/domNodeConfig.js +0 -0
- /package/{lib/DOM → DOM}/elements.d.ts +0 -0
- /package/{lib/DOM → DOM}/elements.js +0 -0
- /package/{lib/DOM → DOM}/index.d.ts +0 -0
- /package/{lib/DOM → DOM}/index.js +0 -0
- /package/{lib/DOM → DOM}/svgElements.d.ts +0 -0
- /package/{lib/DOM → DOM}/svgElements.js +0 -0
- /package/{lib/DOM → DOM}/window.d.ts +0 -0
- /package/{lib/DOM → DOM}/window.js +0 -0
- /package/{lib/Node → Node}/component.d.ts +0 -0
- /package/{lib/Node → Node}/component.js +0 -0
- /package/{lib/Node → Node}/component.types.d.ts +0 -0
- /package/{lib/Node → Node}/component.types.js +0 -0
- /package/{lib/Node → Node}/nodeConfig.d.ts +0 -0
- /package/{lib/Node → Node}/nodeConfig.js +0 -0
- /package/{lib/Node → Node}/vNode.d.ts +0 -0
- /package/{lib/Node → Node}/vNode.types.d.ts +0 -0
- /package/{lib/Node → Node}/vNode.types.js +0 -0
- /package/{lib/Store → Store}/Diff/diffAsync.d.ts +0 -0
- /package/{lib/Store → Store}/Diff/diffAsync.js +0 -0
- /package/{lib/Store → Store}/Diff/diffSync.d.ts +0 -0
- /package/{lib/Store → Store}/Diff/diffSync.js +0 -0
- /package/{lib/Store → Store}/Diff/diffTree.d.ts +0 -0
- /package/{lib/Store → Store}/Diff/diffTree.js +0 -0
- /package/{lib/Store → Store}/Diff/diffWorker.d.ts +0 -0
- /package/{lib/Store → Store}/Diff/diffWorker.js +0 -0
- /package/{lib/Store → Store}/Diff/workerQueue.d.ts +0 -0
- /package/{lib/Store → Store}/Diff/workerQueue.js +0 -0
- /package/{lib/Store → Store}/Store/store.d.ts +0 -0
- /package/{lib/Store → Store}/Store/store.js +0 -0
- /package/{lib/Store → Store}/Store/storeAsync.d.ts +0 -0
- /package/{lib/Store → Store}/Store/storeAsync.js +0 -0
- /package/{lib/Store → Store}/Store/storeSync.d.ts +0 -0
- /package/{lib/Store → Store}/Store/storeSync.js +0 -0
- /package/{lib/Store → Store}/Tree/observableNode.d.ts +0 -0
- /package/{lib/Store → Store}/Tree/observableNode.js +0 -0
- /package/{lib/Store → Store}/Tree/observableScope.d.ts +0 -0
- /package/{lib/Store → Store}/Tree/observableScope.js +0 -0
- /package/{lib/Store → Store}/index.d.ts +0 -0
- /package/{lib/Store → Store}/index.js +0 -0
- /package/{lib/Utils → Utils}/animation.d.ts +0 -0
- /package/{lib/Utils → Utils}/animation.js +0 -0
- /package/{lib/Utils → Utils}/array.d.ts +0 -0
- /package/{lib/Utils → Utils}/array.js +0 -0
- /package/{lib/Utils → Utils}/asyncQueue.d.ts +0 -0
- /package/{lib/Utils → Utils}/asyncQueue.js +0 -0
- /package/{lib/Utils → Utils}/avlTree.d.ts +0 -0
- /package/{lib/Utils → Utils}/avlTree.js +0 -0
- /package/{lib/Utils → Utils}/decorators.d.ts +0 -0
- /package/{lib/Utils → Utils}/decorators.js +0 -0
- /package/{lib/Utils → Utils}/distinctArray.d.ts +0 -0
- /package/{lib/Utils → Utils}/distinctArray.js +0 -0
- /package/{lib/Utils → Utils}/emitter.d.ts +0 -0
- /package/{lib/Utils → Utils}/emitter.js +0 -0
- /package/{lib/Utils → Utils}/functions.d.ts +0 -0
- /package/{lib/Utils → Utils}/functions.js +0 -0
- /package/{lib/Utils → Utils}/index.d.ts +0 -0
- /package/{lib/Utils → Utils}/index.js +0 -0
- /package/{lib/Utils → Utils}/injector.d.ts +0 -0
- /package/{lib/Utils → Utils}/injector.js +0 -0
- /package/{lib/Utils → Utils}/json.d.ts +0 -0
- /package/{lib/Utils → Utils}/json.js +0 -0
- /package/{lib/Utils → Utils}/jsonType.d.ts +0 -0
- /package/{lib/Utils → Utils}/jsonType.js +0 -0
- /package/{lib/Utils → Utils}/list.d.ts +0 -0
- /package/{lib/Utils → Utils}/list.js +0 -0
- /package/{lib/Utils → Utils}/router.d.ts +0 -0
- /package/{lib/Utils → Utils}/router.js +0 -0
- /package/{lib/Utils → Utils}/thread.d.ts +0 -0
- /package/{lib/Utils → Utils}/thread.js +0 -0
- /package/{lib/Utils → Utils}/utils.types.d.ts +0 -0
- /package/{lib/Utils → Utils}/utils.types.js +0 -0
- /package/{lib/index.d.ts → index.d.ts} +0 -0
- /package/{lib/index.debug.d.ts → index.debug.d.ts} +0 -0
- /package/{lib/index.debug.js → index.debug.js} +0 -0
- /package/{lib/index.js → index.js} +0 -0
|
@@ -182,27 +182,6 @@ function WrapChildren(injector, children, data, nodeList) {
|
|
|
182
182
|
case 0:
|
|
183
183
|
DestroyNodeList(nodeList);
|
|
184
184
|
return [];
|
|
185
|
-
case 1: {
|
|
186
|
-
const data = nextData[0];
|
|
187
|
-
const node = nodeList.head;
|
|
188
|
-
DestroyNodeList(nodeList);
|
|
189
|
-
if (node && node.data.data === data) {
|
|
190
|
-
node.data.nodes = Store_1.ObservableScope.Value(node.data.scope);
|
|
191
|
-
list_1.List.AddNode(nodeList, node);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
const childrenScope = Store_1.ObservableScope.Create(function () {
|
|
195
|
-
const childNodes = injector_1.Injector.Scope(injector, children, data);
|
|
196
|
-
return CreateNodeArray(childNodes);
|
|
197
|
-
});
|
|
198
|
-
list_1.List.Add(nodeList, {
|
|
199
|
-
data,
|
|
200
|
-
nodes: Store_1.ObservableScope.Value(childrenScope),
|
|
201
|
-
scope: childrenScope
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
return nodeList.head.data.nodes;
|
|
205
|
-
}
|
|
206
185
|
default: {
|
|
207
186
|
const nodeListMap = list_1.List.ToListMap(nodeList, GetData);
|
|
208
187
|
const nextNodeList = list_1.List.Create();
|
|
@@ -217,6 +196,8 @@ function WrapChildren(injector, children, data, nodeList) {
|
|
|
217
196
|
vNode.DestroyAll(existingNode.data.nodes);
|
|
218
197
|
existingNode.data.nodes = Store_1.ObservableScope.Value(existingNode.data.scope);
|
|
219
198
|
}
|
|
199
|
+
else
|
|
200
|
+
Store_1.ObservableScope.Touch(existingNode.data.scope);
|
|
220
201
|
}
|
|
221
202
|
else {
|
|
222
203
|
nodeListMap.delete(data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "j-templates",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.42",
|
|
4
4
|
"description": "j-templates",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/TypesInCode/jTemplates",
|
|
@@ -8,42 +8,6 @@
|
|
|
8
8
|
"keywords": [
|
|
9
9
|
""
|
|
10
10
|
],
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
],
|
|
14
|
-
"main": "lib/index.js",
|
|
15
|
-
"typings": "lib/index.d.ts",
|
|
16
|
-
"scripts": {
|
|
17
|
-
"clean": "rimraf lib",
|
|
18
|
-
"build": "npm run buildquick && node ./tools/copy-package-json.js",
|
|
19
|
-
"buildquick": "npm run clean && echo Using TypeScript && tsc --version && tsc --pretty",
|
|
20
|
-
"builddocs": "typedoc --out docs src/index.ts src/DOM/index.ts src/Utils/index.ts src/Store/index.ts && touch docs/.nojekyll",
|
|
21
|
-
"test": "mocha --require ts-node/register --recursive test/**/*-spec.ts",
|
|
22
|
-
"testcoverage": "nyc mocha --require ts-node/register --required source-map-support/register --recursive test/**/*-spec.ts"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@types/chai": "3.4.30",
|
|
26
|
-
"@types/mocha": "2.2.29",
|
|
27
|
-
"@types/node": "^13.1.2",
|
|
28
|
-
"chai": "^3.5.0",
|
|
29
|
-
"fs-extra": "^8.1.0",
|
|
30
|
-
"jsdom": "^13.2.0",
|
|
31
|
-
"mocha": "^7.0.0",
|
|
32
|
-
"nyc": "^15.1.0",
|
|
33
|
-
"rimraf": "^2.5.4",
|
|
34
|
-
"ts-node": "^10.9.2",
|
|
35
|
-
"typedoc": "^0.26.10",
|
|
36
|
-
"typescript": "^5.5.3"
|
|
37
|
-
},
|
|
38
|
-
"engines": {
|
|
39
|
-
"node": ">=4.0.0"
|
|
40
|
-
},
|
|
41
|
-
"nyc": {
|
|
42
|
-
"extension": [
|
|
43
|
-
".ts"
|
|
44
|
-
],
|
|
45
|
-
"reporter": [
|
|
46
|
-
"html"
|
|
47
|
-
]
|
|
48
|
-
}
|
|
11
|
+
"main": "./index.js",
|
|
12
|
+
"typings": "./index.d.ts"
|
|
49
13
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017 TypesInCode
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# j-templates
|
|
2
|
-
Type-safe templating for the browser.
|
|
3
|
-
## Install
|
|
4
|
-
```
|
|
5
|
-
npm install --save-dev j-templates
|
|
6
|
-
```
|
|
7
|
-
|
|
8
|
-
Framework for building reactive browser applications:
|
|
9
|
-
* TypeScript only - no extra transpile or compile steps
|
|
10
|
-
* Bundler agnostic - bundle using your preferred library
|
|
11
|
-
* Low dependencies - hello world only requires this + a bundler to get started
|
|
12
|
-
|
|
13
|
-
## Hello World
|
|
14
|
-
```typescript
|
|
15
|
-
import { Component } from 'j-templates';
|
|
16
|
-
import { div } from 'j-templates/DOM';
|
|
17
|
-
|
|
18
|
-
class HelloWorld extends Component {
|
|
19
|
-
|
|
20
|
-
public Template() {
|
|
21
|
-
return div({}, () => "Hello world");
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
var helloWorld = Component.ToFunction("hello-world", HelloWorld);
|
|
27
|
-
Component.Attach(document.body, helloWorld({}));
|
|
28
|
-
```
|
|
29
|
-
### Resulting HTML
|
|
30
|
-
```html
|
|
31
|
-
<hello-world>
|
|
32
|
-
<div>Hello world</div>
|
|
33
|
-
</hello-world>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
[More Examples](https://typesincode.github.io/jTemplates/)
|
package/lib/package.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "j-templates",
|
|
3
|
-
"version": "7.0.40",
|
|
4
|
-
"description": "j-templates",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "https://github.com/TypesInCode/jTemplates",
|
|
7
|
-
"author": "Jay Landrum",
|
|
8
|
-
"keywords": [
|
|
9
|
-
""
|
|
10
|
-
],
|
|
11
|
-
"main": "./index.js",
|
|
12
|
-
"typings": "./index.d.ts"
|
|
13
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|