@joist/templating 4.2.4-next.16 → 4.2.4-next.17
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/package.json +1 -1
- package/src/lib/define.ts +1 -3
- package/src/lib/elements/for.element.test.ts +12 -7
- package/src/lib/elements/for.element.ts +66 -27
- package/src/lib/events.ts +1 -1
- package/target/lib/define.d.ts +1 -2
- package/target/lib/define.js +1 -2
- package/target/lib/define.js.map +1 -1
- package/target/lib/elements/for.element.d.ts +0 -4
- package/target/lib/elements/for.element.js +57 -45
- package/target/lib/elements/for.element.js.map +1 -1
- package/target/lib/elements/for.element.test.js +6 -3
- package/target/lib/elements/for.element.test.js.map +1 -1
- package/target/lib/events.d.ts +1 -1
package/package.json
CHANGED
package/src/lib/define.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { define } from "@joist/element/define.js";
|
|
2
2
|
|
|
3
3
|
import { JoistAsyncElement } from "./elements/async.element.js";
|
|
4
|
-
import {
|
|
4
|
+
import { JoistForElement } from "./elements/for.element.js";
|
|
5
5
|
import { JoistIfElement } from "./elements/if.element.js";
|
|
6
6
|
import { JoistBindElement } from "./elements/bind.element.js";
|
|
7
7
|
import { JoistValueElement } from "./elements/value.element.js";
|
|
@@ -11,7 +11,6 @@ declare global {
|
|
|
11
11
|
interface HTMLElementTagNameMap {
|
|
12
12
|
"j-async": JoistAsyncElement;
|
|
13
13
|
"j-for": JoistForElement;
|
|
14
|
-
"j-for-scope": JForScope;
|
|
15
14
|
"j-if": JoistIfElement;
|
|
16
15
|
"j-bind": JoistBindElement;
|
|
17
16
|
"j-val": JoistValueElement;
|
|
@@ -21,7 +20,6 @@ declare global {
|
|
|
21
20
|
|
|
22
21
|
define({ tagName: "j-async" }, JoistAsyncElement);
|
|
23
22
|
define({ tagName: "j-for" }, JoistForElement);
|
|
24
|
-
define({ tagName: "j-for-scope", dependsOn: ["j-for"] }, JForScope);
|
|
25
23
|
define({ tagName: "j-if" }, JoistIfElement);
|
|
26
24
|
define({ tagName: "j-bind" }, JoistBindElement);
|
|
27
25
|
define({ tagName: "j-val" }, JoistValueElement);
|
|
@@ -117,14 +117,17 @@ it("should provide index and position information", () => {
|
|
|
117
117
|
>
|
|
118
118
|
<j-for bind="items">
|
|
119
119
|
<template>
|
|
120
|
-
<
|
|
121
|
-
|
|
120
|
+
<div class="item">
|
|
121
|
+
<j-val bind="each.value"></j-val>
|
|
122
|
+
(index: <j-val bind="each.index"></j-val>, position:
|
|
123
|
+
<j-val bind="each.position"></j-val>)
|
|
124
|
+
</div>
|
|
122
125
|
</template>
|
|
123
126
|
</j-for>
|
|
124
127
|
</div>
|
|
125
128
|
`);
|
|
126
129
|
|
|
127
|
-
const items = element.querySelectorAll("
|
|
130
|
+
const items = element.querySelectorAll(".item");
|
|
128
131
|
assert.equal(items.length, 3);
|
|
129
132
|
assert.equal(
|
|
130
133
|
items[0].textContent?.trim().replaceAll("\n", "").replaceAll(" ", ""),
|
|
@@ -170,12 +173,14 @@ it("should provide index and position information", () => {
|
|
|
170
173
|
// const groups = element.querySelectorAll(".group");
|
|
171
174
|
// assert.equal(groups.length, 2);
|
|
172
175
|
|
|
176
|
+
// console.log(groups);
|
|
177
|
+
|
|
173
178
|
// const items = element.querySelectorAll(".child");
|
|
174
179
|
// assert.equal(items.length, 4);
|
|
175
|
-
// assert.equal(items[0].textContent?.trim(), "A");
|
|
176
|
-
// assert.equal(items[1].textContent?.trim(), "B");
|
|
177
|
-
// assert.equal(items[2].textContent?.trim(), "C");
|
|
178
|
-
// assert.equal(items[3].textContent?.trim(), "D");
|
|
180
|
+
// // assert.equal(items[0].textContent?.trim(), "A");
|
|
181
|
+
// // assert.equal(items[1].textContent?.trim(), "B");
|
|
182
|
+
// // assert.equal(items[2].textContent?.trim(), "C");
|
|
183
|
+
// // assert.equal(items[3].textContent?.trim(), "D");
|
|
179
184
|
// });
|
|
180
185
|
|
|
181
186
|
it("should maintain DOM order when items are reordered", () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { attr, element, query, css, html } from "@joist/element";
|
|
2
|
+
import { Change, Changes, effect, observe } from "@joist/observable";
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
-
import { JoistValueEvent } from "../events.js";
|
|
4
|
+
import { BindChange, JoistValueEvent } from "../events.js";
|
|
5
5
|
import { JExpression } from "../expression.js";
|
|
6
6
|
|
|
7
7
|
export interface EachCtx<T> {
|
|
@@ -10,20 +10,56 @@ export interface EachCtx<T> {
|
|
|
10
10
|
position: number | null;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
class JoistForScopeContainer<T = unknown> {
|
|
14
|
+
host: Element;
|
|
15
|
+
|
|
16
|
+
get key(): string | null {
|
|
17
|
+
return this.host.getAttribute("key");
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#callbacks: Array<(val: BindChange<EachCtx<T>>) => void> = [];
|
|
21
|
+
|
|
22
|
+
@observe()
|
|
19
23
|
accessor each: EachCtx<T> = {
|
|
20
24
|
value: null,
|
|
21
25
|
index: null,
|
|
22
26
|
position: null,
|
|
23
27
|
};
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
constructor(host: Element | null) {
|
|
30
|
+
if (host == null) {
|
|
31
|
+
throw new Error("JForScope required a host element");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
this.host = host;
|
|
35
|
+
|
|
36
|
+
this.host.addEventListener("joist::value", (e) => {
|
|
37
|
+
if (e.expression.bindTo === "each") {
|
|
38
|
+
e.stopPropagation();
|
|
39
|
+
|
|
40
|
+
this.#callbacks.push(e.update);
|
|
41
|
+
|
|
42
|
+
e.update({
|
|
43
|
+
oldValue: null,
|
|
44
|
+
newValue: this.each,
|
|
45
|
+
firstChange: true,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@effect()
|
|
52
|
+
onChange(changes: Changes<this>): void {
|
|
53
|
+
const change = changes.get("each") as Change<EachCtx<T>>;
|
|
54
|
+
|
|
55
|
+
for (let cb of this.#callbacks) {
|
|
56
|
+
cb({
|
|
57
|
+
oldValue: change.oldValue,
|
|
58
|
+
newValue: change.newValue,
|
|
59
|
+
firstChange: false,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
27
63
|
}
|
|
28
64
|
|
|
29
65
|
@element({
|
|
@@ -39,7 +75,7 @@ export class JoistForElement extends HTMLElement {
|
|
|
39
75
|
|
|
40
76
|
#template = query("template", this);
|
|
41
77
|
#items: Iterable<unknown> = [];
|
|
42
|
-
#scopes = new Map<
|
|
78
|
+
#scopes = new Map<string, JoistForScopeContainer>();
|
|
43
79
|
|
|
44
80
|
connectedCallback(): void {
|
|
45
81
|
const template = this.#template();
|
|
@@ -50,8 +86,8 @@ export class JoistForElement extends HTMLElement {
|
|
|
50
86
|
|
|
51
87
|
// collect all scopes from the template to be matched against later
|
|
52
88
|
let currentScope = template.nextElementSibling;
|
|
53
|
-
while (currentScope instanceof
|
|
54
|
-
this.#scopes.set(currentScope.key, currentScope);
|
|
89
|
+
while (currentScope instanceof JoistForScopeContainer) {
|
|
90
|
+
this.#scopes.set(String(currentScope.key), currentScope);
|
|
55
91
|
currentScope = currentScope.nextElementSibling;
|
|
56
92
|
}
|
|
57
93
|
|
|
@@ -95,13 +131,14 @@ export class JoistForElement extends HTMLElement {
|
|
|
95
131
|
key = value[keyProperty];
|
|
96
132
|
}
|
|
97
133
|
|
|
98
|
-
const
|
|
99
|
-
scope
|
|
100
|
-
|
|
134
|
+
const fragment = document.importNode(templateContent, true);
|
|
135
|
+
const scope = new JoistForScopeContainer(fragment.firstElementChild);
|
|
136
|
+
|
|
137
|
+
scope.host.setAttribute("key", String(key));
|
|
101
138
|
scope.each = { position: index + 1, index, value };
|
|
102
139
|
|
|
103
|
-
fragment.appendChild(scope);
|
|
104
|
-
this.#scopes.set(key, scope);
|
|
140
|
+
fragment.appendChild(scope.host);
|
|
141
|
+
this.#scopes.set(String(key), scope);
|
|
105
142
|
index++;
|
|
106
143
|
}
|
|
107
144
|
|
|
@@ -112,7 +149,7 @@ export class JoistForElement extends HTMLElement {
|
|
|
112
149
|
// to their correct positions based on the current iteration order
|
|
113
150
|
updateItems(): void {
|
|
114
151
|
const template = this.#template();
|
|
115
|
-
const leftoverScopes = new Map<unknown,
|
|
152
|
+
const leftoverScopes = new Map<unknown, JoistForScopeContainer>(this.#scopes);
|
|
116
153
|
const keyProperty = this.key;
|
|
117
154
|
|
|
118
155
|
let index = 0;
|
|
@@ -127,23 +164,25 @@ export class JoistForElement extends HTMLElement {
|
|
|
127
164
|
let scope = leftoverScopes.get(key);
|
|
128
165
|
|
|
129
166
|
if (!scope) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
167
|
+
const fragment = document.importNode(template.content, true);
|
|
168
|
+
|
|
169
|
+
scope = new JoistForScopeContainer(fragment.firstElementChild);
|
|
170
|
+
|
|
171
|
+
this.#scopes.set(String(key), scope);
|
|
133
172
|
} else {
|
|
134
173
|
leftoverScopes.delete(key); // Remove from map to track unused scopes
|
|
135
174
|
}
|
|
136
175
|
|
|
137
176
|
// Only update if values have changed
|
|
138
177
|
if (scope.key !== key || scope.each.value !== value) {
|
|
139
|
-
scope.key
|
|
178
|
+
scope.host.setAttribute("key", String(key));
|
|
140
179
|
scope.each = { position: index + 1, index, value };
|
|
141
180
|
}
|
|
142
181
|
|
|
143
182
|
const child = this.children[index + 1];
|
|
144
183
|
|
|
145
|
-
if (child !== scope) {
|
|
146
|
-
this.insertBefore(scope, child);
|
|
184
|
+
if (child !== scope.host) {
|
|
185
|
+
this.insertBefore(scope.host, child);
|
|
147
186
|
}
|
|
148
187
|
|
|
149
188
|
index++;
|
|
@@ -151,13 +190,13 @@ export class JoistForElement extends HTMLElement {
|
|
|
151
190
|
|
|
152
191
|
// Remove unused scopes
|
|
153
192
|
for (const scope of leftoverScopes.values()) {
|
|
154
|
-
scope.remove();
|
|
193
|
+
scope.host.remove();
|
|
155
194
|
}
|
|
156
195
|
}
|
|
157
196
|
|
|
158
197
|
disconnectedCallback(): void {
|
|
159
198
|
for (const scope of this.#scopes.values()) {
|
|
160
|
-
scope.remove();
|
|
199
|
+
scope.host.remove();
|
|
161
200
|
}
|
|
162
201
|
|
|
163
202
|
this.#scopes.clear();
|
package/src/lib/events.ts
CHANGED
package/target/lib/define.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JoistAsyncElement } from "./elements/async.element.js";
|
|
2
|
-
import {
|
|
2
|
+
import { JoistForElement } from "./elements/for.element.js";
|
|
3
3
|
import { JoistIfElement } from "./elements/if.element.js";
|
|
4
4
|
import { JoistBindElement } from "./elements/bind.element.js";
|
|
5
5
|
import { JoistValueElement } from "./elements/value.element.js";
|
|
@@ -8,7 +8,6 @@ declare global {
|
|
|
8
8
|
interface HTMLElementTagNameMap {
|
|
9
9
|
"j-async": JoistAsyncElement;
|
|
10
10
|
"j-for": JoistForElement;
|
|
11
|
-
"j-for-scope": JForScope;
|
|
12
11
|
"j-if": JoistIfElement;
|
|
13
12
|
"j-bind": JoistBindElement;
|
|
14
13
|
"j-val": JoistValueElement;
|
package/target/lib/define.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { define } from "@joist/element/define.js";
|
|
2
2
|
import { JoistAsyncElement } from "./elements/async.element.js";
|
|
3
|
-
import {
|
|
3
|
+
import { JoistForElement } from "./elements/for.element.js";
|
|
4
4
|
import { JoistIfElement } from "./elements/if.element.js";
|
|
5
5
|
import { JoistBindElement } from "./elements/bind.element.js";
|
|
6
6
|
import { JoistValueElement } from "./elements/value.element.js";
|
|
7
7
|
import { JoistScopeElement } from "./elements/scope.element.js";
|
|
8
8
|
define({ tagName: "j-async" }, JoistAsyncElement);
|
|
9
9
|
define({ tagName: "j-for" }, JoistForElement);
|
|
10
|
-
define({ tagName: "j-for-scope", dependsOn: ["j-for"] }, JForScope);
|
|
11
10
|
define({ tagName: "j-if" }, JoistIfElement);
|
|
12
11
|
define({ tagName: "j-bind" }, JoistBindElement);
|
|
13
12
|
define({ tagName: "j-val" }, JoistValueElement);
|
package/target/lib/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../src/lib/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../src/lib/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAahE,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,iBAAiB,CAAC,CAAC;AAClD,MAAM,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,eAAe,CAAC,CAAC;AAC9C,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,cAAc,CAAC,CAAC;AAC5C,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,gBAAgB,CAAC,CAAC;AAChD,MAAM,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;AAChD,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,iBAAiB,CAAC,CAAC"}
|
|
@@ -3,10 +3,6 @@ export interface EachCtx<T> {
|
|
|
3
3
|
index: number | null;
|
|
4
4
|
position: number | null;
|
|
5
5
|
}
|
|
6
|
-
export declare class JForScope<T = unknown> extends HTMLElement {
|
|
7
|
-
accessor each: EachCtx<T>;
|
|
8
|
-
accessor key: unknown;
|
|
9
|
-
}
|
|
10
6
|
export declare class JoistForElement extends HTMLElement {
|
|
11
7
|
#private;
|
|
12
8
|
accessor bind: string;
|
|
@@ -1,35 +1,28 @@
|
|
|
1
1
|
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
2
|
import { attr, element, query, css, html } from "@joist/element";
|
|
3
|
-
import {
|
|
3
|
+
import { effect, observe } from "@joist/observable";
|
|
4
4
|
import { JoistValueEvent } from "../events.js";
|
|
5
5
|
import { JExpression } from "../expression.js";
|
|
6
|
-
let
|
|
7
|
-
let
|
|
8
|
-
shadowDom: [css `:host{display:contents;}`, html `<slot></slot>`],
|
|
9
|
-
})];
|
|
10
|
-
let _classDescriptor;
|
|
11
|
-
let _classExtraInitializers = [];
|
|
12
|
-
let _classThis;
|
|
13
|
-
let _classSuper = HTMLElement;
|
|
6
|
+
let JoistForScopeContainer = (() => {
|
|
7
|
+
let _instanceExtraInitializers = [];
|
|
14
8
|
let _each_decorators;
|
|
15
9
|
let _each_initializers = [];
|
|
16
10
|
let _each_extraInitializers = [];
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
let _key_extraInitializers = [];
|
|
20
|
-
var JForScope = class extends _classSuper {
|
|
21
|
-
static { _classThis = this; }
|
|
11
|
+
let _onChange_decorators;
|
|
12
|
+
return class JoistForScopeContainer {
|
|
22
13
|
static {
|
|
23
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(
|
|
24
|
-
_each_decorators = [
|
|
25
|
-
|
|
14
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
15
|
+
_each_decorators = [observe()];
|
|
16
|
+
_onChange_decorators = [effect()];
|
|
26
17
|
__esDecorate(this, null, _each_decorators, { kind: "accessor", name: "each", static: false, private: false, access: { has: obj => "each" in obj, get: obj => obj.each, set: (obj, value) => { obj.each = value; } }, metadata: _metadata }, _each_initializers, _each_extraInitializers);
|
|
27
|
-
__esDecorate(this, null,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
__esDecorate(this, null, _onChange_decorators, { kind: "method", name: "onChange", static: false, private: false, access: { has: obj => "onChange" in obj, get: obj => obj.onChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
19
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
20
|
+
}
|
|
21
|
+
host = __runInitializers(this, _instanceExtraInitializers);
|
|
22
|
+
get key() {
|
|
23
|
+
return this.host.getAttribute("key");
|
|
32
24
|
}
|
|
25
|
+
#callbacks = [];
|
|
33
26
|
#each_accessor_storage = __runInitializers(this, _each_initializers, {
|
|
34
27
|
value: null,
|
|
35
28
|
index: null,
|
|
@@ -37,17 +30,36 @@ let JForScope = (() => {
|
|
|
37
30
|
});
|
|
38
31
|
get each() { return this.#each_accessor_storage; }
|
|
39
32
|
set each(value) { this.#each_accessor_storage = value; }
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
constructor(host) {
|
|
34
|
+
__runInitializers(this, _each_extraInitializers);
|
|
35
|
+
if (host == null) {
|
|
36
|
+
throw new Error("JForScope required a host element");
|
|
37
|
+
}
|
|
38
|
+
this.host = host;
|
|
39
|
+
this.host.addEventListener("joist::value", (e) => {
|
|
40
|
+
if (e.expression.bindTo === "each") {
|
|
41
|
+
e.stopPropagation();
|
|
42
|
+
this.#callbacks.push(e.update);
|
|
43
|
+
e.update({
|
|
44
|
+
oldValue: null,
|
|
45
|
+
newValue: this.each,
|
|
46
|
+
firstChange: true,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
onChange(changes) {
|
|
52
|
+
const change = changes.get("each");
|
|
53
|
+
for (let cb of this.#callbacks) {
|
|
54
|
+
cb({
|
|
55
|
+
oldValue: change.oldValue,
|
|
56
|
+
newValue: change.newValue,
|
|
57
|
+
firstChange: false,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
46
60
|
}
|
|
47
61
|
};
|
|
48
|
-
return JForScope = _classThis;
|
|
49
62
|
})();
|
|
50
|
-
export { JForScope };
|
|
51
63
|
let JoistForElement = (() => {
|
|
52
64
|
let _classDecorators = [element({
|
|
53
65
|
shadowDom: [css `:host{display:contents;}`, html `<slot></slot>`],
|
|
@@ -90,8 +102,8 @@ let JoistForElement = (() => {
|
|
|
90
102
|
throw new Error("The first Node in j-for needs to be a template");
|
|
91
103
|
}
|
|
92
104
|
let currentScope = template.nextElementSibling;
|
|
93
|
-
while (currentScope instanceof
|
|
94
|
-
this.#scopes.set(currentScope.key, currentScope);
|
|
105
|
+
while (currentScope instanceof JoistForScopeContainer) {
|
|
106
|
+
this.#scopes.set(String(currentScope.key), currentScope);
|
|
95
107
|
currentScope = currentScope.nextElementSibling;
|
|
96
108
|
}
|
|
97
109
|
const token = new JExpression(this.bind);
|
|
@@ -123,12 +135,12 @@ let JoistForElement = (() => {
|
|
|
123
135
|
if (keyProperty && hasProperty(value, keyProperty)) {
|
|
124
136
|
key = value[keyProperty];
|
|
125
137
|
}
|
|
126
|
-
const
|
|
127
|
-
scope
|
|
128
|
-
scope.key
|
|
138
|
+
const fragment = document.importNode(templateContent, true);
|
|
139
|
+
const scope = new JoistForScopeContainer(fragment.firstElementChild);
|
|
140
|
+
scope.host.setAttribute("key", String(key));
|
|
129
141
|
scope.each = { position: index + 1, index, value };
|
|
130
|
-
fragment.appendChild(scope);
|
|
131
|
-
this.#scopes.set(key, scope);
|
|
142
|
+
fragment.appendChild(scope.host);
|
|
143
|
+
this.#scopes.set(String(key), scope);
|
|
132
144
|
index++;
|
|
133
145
|
}
|
|
134
146
|
this.append(fragment);
|
|
@@ -145,30 +157,30 @@ let JoistForElement = (() => {
|
|
|
145
157
|
}
|
|
146
158
|
let scope = leftoverScopes.get(key);
|
|
147
159
|
if (!scope) {
|
|
148
|
-
|
|
149
|
-
scope
|
|
150
|
-
this.#scopes.set(key, scope);
|
|
160
|
+
const fragment = document.importNode(template.content, true);
|
|
161
|
+
scope = new JoistForScopeContainer(fragment.firstElementChild);
|
|
162
|
+
this.#scopes.set(String(key), scope);
|
|
151
163
|
}
|
|
152
164
|
else {
|
|
153
165
|
leftoverScopes.delete(key);
|
|
154
166
|
}
|
|
155
167
|
if (scope.key !== key || scope.each.value !== value) {
|
|
156
|
-
scope.key
|
|
168
|
+
scope.host.setAttribute("key", String(key));
|
|
157
169
|
scope.each = { position: index + 1, index, value };
|
|
158
170
|
}
|
|
159
171
|
const child = this.children[index + 1];
|
|
160
|
-
if (child !== scope) {
|
|
161
|
-
this.insertBefore(scope, child);
|
|
172
|
+
if (child !== scope.host) {
|
|
173
|
+
this.insertBefore(scope.host, child);
|
|
162
174
|
}
|
|
163
175
|
index++;
|
|
164
176
|
}
|
|
165
177
|
for (const scope of leftoverScopes.values()) {
|
|
166
|
-
scope.remove();
|
|
178
|
+
scope.host.remove();
|
|
167
179
|
}
|
|
168
180
|
}
|
|
169
181
|
disconnectedCallback() {
|
|
170
182
|
for (const scope of this.#scopes.values()) {
|
|
171
|
-
scope.remove();
|
|
183
|
+
scope.host.remove();
|
|
172
184
|
}
|
|
173
185
|
this.#scopes.clear();
|
|
174
186
|
this.#items = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"for.element.js","sourceRoot":"","sources":["../../../src/lib/elements/for.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EA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,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;QACH,CAAC;QAED,oBAAoB;YAClB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;gBAC1C,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;YAED,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACrB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACnB,CAAC;;;;SAvIU,eAAe;AA0I5B,SAAS,UAAU,CAAc,GAAQ;IACvC,OAAO,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC;AACnE,CAAC;AAED,SAAS,WAAW,CAAC,IAAa,EAAE,GAAW;IAC7C,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -101,13 +101,16 @@ it("should provide index and position information", () => {
|
|
|
101
101
|
>
|
|
102
102
|
<j-for bind="items">
|
|
103
103
|
<template>
|
|
104
|
-
<
|
|
105
|
-
|
|
104
|
+
<div class="item">
|
|
105
|
+
<j-val bind="each.value"></j-val>
|
|
106
|
+
(index: <j-val bind="each.index"></j-val>, position:
|
|
107
|
+
<j-val bind="each.position"></j-val>)
|
|
108
|
+
</div>
|
|
106
109
|
</template>
|
|
107
110
|
</j-for>
|
|
108
111
|
</div>
|
|
109
112
|
`);
|
|
110
|
-
const items = element.querySelectorAll("
|
|
113
|
+
const items = element.querySelectorAll(".item");
|
|
111
114
|
assert.equal(items.length, 3);
|
|
112
115
|
assert.equal(items[0].textContent?.trim().replaceAll("\n", "").replaceAll(" ", ""), "A(index:0,position:1)");
|
|
113
116
|
assert.equal(items[1].textContent?.trim().replaceAll("\n", "").replaceAll(" ", ""), "B(index:1,position:2)");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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