@microsoft/fast-html 1.0.0-alpha.16 → 1.0.0-alpha.18
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/dist/dts/components/element.d.ts +10 -10
- package/dist/dts/components/index.d.ts +1 -0
- package/dist/dts/components/observer-map.d.ts +143 -0
- package/dist/dts/components/observer-map.spec.d.ts +1 -0
- package/dist/dts/components/template.d.ts +11 -0
- package/dist/dts/components/utilities.d.ts +60 -1
- package/dist/dts/fixtures/observer-map/main.d.ts +1 -0
- package/dist/dts/fixtures/observer-map/observer-map.spec.d.ts +1 -0
- package/dist/dts/index.d.ts +1 -1
- package/dist/esm/components/element.js +24 -17
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/observer-map.js +551 -0
- package/dist/esm/components/observer-map.spec.js +613 -0
- package/dist/esm/components/template.js +103 -85
- package/dist/esm/components/utilities.js +301 -50
- package/dist/esm/components/utilities.spec.js +109 -1
- package/dist/esm/fixtures/attribute/main.js +3 -3
- package/dist/esm/fixtures/binding/main.js +5 -5
- package/dist/esm/fixtures/children/main.js +3 -3
- package/dist/esm/fixtures/dot-syntax/dot-syntax.spec.js +109 -2
- package/dist/esm/fixtures/dot-syntax/main.js +30 -4
- package/dist/esm/fixtures/event/main.js +6 -6
- package/dist/esm/fixtures/observer-map/main.js +304 -0
- package/dist/esm/fixtures/observer-map/observer-map.spec.js +174 -0
- package/dist/esm/fixtures/partial/main.js +3 -2
- package/dist/esm/fixtures/ref/main.js +3 -2
- package/dist/esm/fixtures/repeat/main.js +5 -5
- package/dist/esm/fixtures/slotted/main.js +3 -3
- package/dist/esm/fixtures/when/main.js +21 -21
- package/dist/esm/index.js +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/fast-html.api.json +247 -32
- package/dist/fast-html.d.ts +214 -6
- package/dist/fast-html.untrimmed.d.ts +214 -6
- package/package.json +5 -4
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { test, expect } from "@playwright/test";
|
|
3
|
+
test.describe("ObserverMap", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
4
|
+
test.beforeEach(({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
5
|
+
yield page.goto("/observer-map");
|
|
6
|
+
yield page.waitForSelector("observer-map-test-element");
|
|
7
|
+
}));
|
|
8
|
+
test("should render initial users with deeply nested properties", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
9
|
+
// Check that initial users are rendered
|
|
10
|
+
yield expect(page.locator(".user-card")).toHaveCount(2);
|
|
11
|
+
// Check deeply nested properties are displayed
|
|
12
|
+
yield expect(page.locator("text=Alice Johnson")).toHaveCount(3);
|
|
13
|
+
yield expect(page.locator("text=Bob Smith")).toHaveCount(2);
|
|
14
|
+
// Check nested location data
|
|
15
|
+
yield expect(page.locator("text=New York, USA")).toBeVisible();
|
|
16
|
+
yield expect(page.locator("text=London, UK")).toBeVisible();
|
|
17
|
+
// Check deeply nested preferences
|
|
18
|
+
yield expect(page.locator("text=Theme: dark")).toBeVisible();
|
|
19
|
+
yield expect(page.locator("text=Theme: light")).toBeVisible();
|
|
20
|
+
}));
|
|
21
|
+
test("should update deeply nested age property", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
+
// Initial age should be 28 for Alice
|
|
23
|
+
yield expect(page.locator("text=Age: 28 years old")).toBeVisible();
|
|
24
|
+
// Click the age increment button for Alice (user ID 1)
|
|
25
|
+
yield page.locator("button:has-text('Age +1')").first().click();
|
|
26
|
+
// Age should now be 29
|
|
27
|
+
yield expect(page.locator("text=Age: 29 years old")).toBeVisible();
|
|
28
|
+
yield expect(page.locator("text=Age: 28 years old")).not.toBeVisible();
|
|
29
|
+
}));
|
|
30
|
+
test("should toggle theme in deeply nested preferences", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
// Initial theme should be dark for Alice
|
|
32
|
+
yield expect(page.locator("text=Theme: dark").first()).toBeVisible();
|
|
33
|
+
// Click the toggle theme button for Alice
|
|
34
|
+
yield page.locator("button:has-text('Toggle Theme')").first().click();
|
|
35
|
+
// Theme should now be light
|
|
36
|
+
yield expect(page.locator("text=Theme: light").first()).toBeVisible();
|
|
37
|
+
}));
|
|
38
|
+
test("should update location", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
+
// Initial location should be New York, USA
|
|
40
|
+
yield expect(page.locator("text=New York, USA")).toBeVisible();
|
|
41
|
+
// Click the change location button for Alice
|
|
42
|
+
yield page.locator("button:has-text('Change Location')").first().click();
|
|
43
|
+
// Location should now be Tokyo, Japan
|
|
44
|
+
yield expect(page.locator("text=Tokyo, Japan")).toBeVisible();
|
|
45
|
+
yield expect(page.locator("text=New York, USA")).not.toBeVisible();
|
|
46
|
+
}));
|
|
47
|
+
test("should update notification settings", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
+
// Check initial notification settings for Alice
|
|
49
|
+
yield expect(page.locator("text=Email Notifications: true").first()).toBeVisible();
|
|
50
|
+
yield expect(page.locator("text=Push Notifications: false").first()).toBeVisible();
|
|
51
|
+
yield expect(page.locator("text=Notification Frequency: daily").first()).toBeVisible();
|
|
52
|
+
// Click update notifications button
|
|
53
|
+
yield page.locator("button:has-text('Update Notifications')").first().click();
|
|
54
|
+
// Settings should be toggled
|
|
55
|
+
yield expect(page.locator("text=Email Notifications: false").first()).toBeVisible();
|
|
56
|
+
yield expect(page.locator("text=Push Notifications: true").first()).toBeVisible();
|
|
57
|
+
yield expect(page.locator("text=Notification Frequency: weekly").first()).toBeVisible();
|
|
58
|
+
}));
|
|
59
|
+
test("should add and remove categories in deeply nested arrays", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
+
// Check initial categories for Alice (should include "tech")
|
|
61
|
+
yield expect(page.locator(".tag:has-text('tech')")).toHaveCount(2);
|
|
62
|
+
// Add sports category
|
|
63
|
+
yield page.locator("button:has-text('Add Category')").first().click();
|
|
64
|
+
yield expect(page.locator(".tag:has-text('sports')").first()).toBeVisible();
|
|
65
|
+
// Remove tech category
|
|
66
|
+
yield page.locator("button:has-text('Remove Tech Category')").first().click();
|
|
67
|
+
yield expect(page.locator(".tag:has-text('tech')")).toHaveCount(1);
|
|
68
|
+
}));
|
|
69
|
+
test("should increment post likes and update nested metadata", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
|
+
const aliceCard = page.locator(".user-card").first();
|
|
71
|
+
const firstPost = aliceCard.locator(".post-card").first();
|
|
72
|
+
// Check initial likes (should be 25)
|
|
73
|
+
yield expect(firstPost.locator("text=25 likes")).toBeVisible();
|
|
74
|
+
// Click like button
|
|
75
|
+
yield firstPost.locator("button:has-text('Like Post')").click();
|
|
76
|
+
// Likes should increment to 26
|
|
77
|
+
yield expect(firstPost.locator("text=26 likes")).toBeVisible();
|
|
78
|
+
// Views should also increment (random amount)
|
|
79
|
+
yield expect(firstPost.locator("text=views")).toBeVisible();
|
|
80
|
+
}));
|
|
81
|
+
test("should add new posts to users", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
82
|
+
const aliceCard = page.locator(".user-card").first();
|
|
83
|
+
// Initial post count should be 2
|
|
84
|
+
yield expect(aliceCard.locator(".post-card")).toHaveCount(2);
|
|
85
|
+
// Add new post
|
|
86
|
+
yield aliceCard.locator("button:has-text('Add New Post')").click();
|
|
87
|
+
// Should now have 3 posts
|
|
88
|
+
yield expect(aliceCard.locator(".post-card")).toHaveCount(3);
|
|
89
|
+
}));
|
|
90
|
+
test("should update the likes on a new post", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
91
|
+
const aliceCard = page.locator(".user-card").first();
|
|
92
|
+
// Add new post first
|
|
93
|
+
yield aliceCard.locator("button:has-text('Add New Post')").click();
|
|
94
|
+
// Should now have 3 posts
|
|
95
|
+
yield expect(aliceCard.locator(".post-card")).toHaveCount(3);
|
|
96
|
+
// Get the newly added post (should be the last one)
|
|
97
|
+
const newPost = aliceCard.locator(".post-card").nth(2);
|
|
98
|
+
// Check initial likes on the new post (should be 0)
|
|
99
|
+
yield expect(newPost.locator("text=0 likes")).toBeVisible();
|
|
100
|
+
// Click like button on the new post
|
|
101
|
+
yield newPost.locator("button:has-text('Like Post')").click();
|
|
102
|
+
// Likes should increment to 1
|
|
103
|
+
yield expect(newPost.locator("text=1 likes")).toBeVisible();
|
|
104
|
+
yield expect(newPost.locator("text=0 likes")).not.toBeVisible();
|
|
105
|
+
}));
|
|
106
|
+
test("should add and remove users from the array", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
107
|
+
// Initial user count should be 2
|
|
108
|
+
yield expect(page.locator(".user-card")).toHaveCount(2);
|
|
109
|
+
yield expect(page.locator("text=Total Users: 2")).toBeVisible();
|
|
110
|
+
// Add new user
|
|
111
|
+
yield page.locator("button:has-text('Add New User')").click();
|
|
112
|
+
// Should now have 3 users
|
|
113
|
+
yield expect(page.locator(".user-card")).toHaveCount(3);
|
|
114
|
+
yield expect(page.locator("text=Total Users: 3")).toBeVisible();
|
|
115
|
+
yield expect(page.locator("text=User 3")).toBeVisible();
|
|
116
|
+
// Remove a user (Alice - first remove button)
|
|
117
|
+
yield page.locator("button:has-text('Remove User')").first().click();
|
|
118
|
+
// Should be back to 2 users
|
|
119
|
+
yield expect(page.locator(".user-card")).toHaveCount(2);
|
|
120
|
+
yield expect(page.locator("text=Total Users: 2")).toBeVisible();
|
|
121
|
+
}));
|
|
122
|
+
test("should update global stats with nested metrics", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
123
|
+
// Check initial engagement stats
|
|
124
|
+
const initialDaily = yield page.locator(".stats .nested-info").nth(1).textContent();
|
|
125
|
+
// Update stats
|
|
126
|
+
yield page.locator(".stats .controls button").nth(0).click();
|
|
127
|
+
yield page.evaluate(() => {
|
|
128
|
+
return new Promise((resolve) => {
|
|
129
|
+
requestAnimationFrame(() => resolve(true));
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
// Stats should be updated (values should change)
|
|
133
|
+
const updatedDaily = yield page.locator(".stats .nested-info").nth(1).textContent();
|
|
134
|
+
expect(updatedDaily).not.toBe(initialDaily);
|
|
135
|
+
}));
|
|
136
|
+
test("should handle user selection with conditional rendering", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
137
|
+
// Initially, Alice (ID 1) should be selected
|
|
138
|
+
yield expect(page.locator("text=⭐ SELECTED").first()).toBeVisible();
|
|
139
|
+
// Select Bob (user ID 2)
|
|
140
|
+
yield page.locator(".user-card").nth(1).locator("button:has-text('Select User')").click();
|
|
141
|
+
// Bob should now show as selected
|
|
142
|
+
const bobCard = page.locator(".user-card").nth(1);
|
|
143
|
+
yield expect(bobCard.locator("text=⭐ SELECTED")).toBeVisible();
|
|
144
|
+
// Alice should no longer show as selected
|
|
145
|
+
const aliceCard = page.locator(".user-card").first();
|
|
146
|
+
yield expect(aliceCard.locator("text=⭐ SELECTED")).not.toBeVisible();
|
|
147
|
+
}));
|
|
148
|
+
test("should update when a nested property has been defined", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
149
|
+
const undefinedText = yield page.locator(".nested-define").textContent();
|
|
150
|
+
yield expect(undefinedText).toEqual("");
|
|
151
|
+
// Define the object
|
|
152
|
+
yield page.locator("button:has-text('Define internal object')").nth(0).click();
|
|
153
|
+
yield page.evaluate(() => {
|
|
154
|
+
return new Promise((resolve) => {
|
|
155
|
+
requestAnimationFrame(() => resolve(true));
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
const definedText = yield page.locator(".nested-define").textContent();
|
|
159
|
+
yield expect(definedText).toEqual("Hello world");
|
|
160
|
+
}));
|
|
161
|
+
test("should update when a nested property has been updated", ({ page }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
162
|
+
// Define the object
|
|
163
|
+
yield page.locator("button:has-text('Define internal object')").nth(0).click();
|
|
164
|
+
// Update the object
|
|
165
|
+
yield page.locator("button:has-text('Update internal object')").nth(0).click();
|
|
166
|
+
yield page.evaluate(() => {
|
|
167
|
+
return new Promise((resolve) => {
|
|
168
|
+
requestAnimationFrame(() => resolve(true));
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
const updatedText = yield page.locator(".nested-define").textContent();
|
|
172
|
+
yield expect(updatedText).toEqual("Hello pluto");
|
|
173
|
+
}));
|
|
174
|
+
}));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { FASTElement } from "@microsoft/fast-element";
|
|
1
2
|
import { RenderableFASTElement, TemplateElement } from "@microsoft/fast-html";
|
|
2
|
-
class TestElement extends
|
|
3
|
+
class TestElement extends FASTElement {
|
|
3
4
|
constructor() {
|
|
4
5
|
super(...arguments);
|
|
5
6
|
this.items = [
|
|
@@ -22,7 +23,7 @@ class TestElement extends RenderableFASTElement {
|
|
|
22
23
|
];
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
TestElement.defineAsync({
|
|
26
|
+
RenderableFASTElement(TestElement).defineAsync({
|
|
26
27
|
name: "test-element",
|
|
27
28
|
templateOptions: "defer-and-hydrate",
|
|
28
29
|
});
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { FASTElement } from "@microsoft/fast-element";
|
|
1
2
|
import { RenderableFASTElement, TemplateElement } from "@microsoft/fast-html";
|
|
2
|
-
class TestElement extends
|
|
3
|
+
class TestElement extends FASTElement {
|
|
3
4
|
constructor() {
|
|
4
5
|
super(...arguments);
|
|
5
6
|
this.video = null;
|
|
6
7
|
}
|
|
7
8
|
}
|
|
8
|
-
TestElement.defineAsync({
|
|
9
|
+
RenderableFASTElement(TestElement).defineAsync({
|
|
9
10
|
name: "test-element",
|
|
10
11
|
templateOptions: "defer-and-hydrate",
|
|
11
12
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { RenderableFASTElement, TemplateElement } from "@microsoft/fast-html";
|
|
3
|
-
import { observable } from "@microsoft/fast-element";
|
|
4
|
-
class TestElement extends
|
|
3
|
+
import { FASTElement, observable } from "@microsoft/fast-element";
|
|
4
|
+
class TestElement extends FASTElement {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
7
7
|
this.list = ["Foo", "Bar"];
|
|
@@ -12,11 +12,11 @@ __decorate([
|
|
|
12
12
|
observable,
|
|
13
13
|
__metadata("design:type", Array)
|
|
14
14
|
], TestElement.prototype, "list", void 0);
|
|
15
|
-
TestElement.defineAsync({
|
|
15
|
+
RenderableFASTElement(TestElement).defineAsync({
|
|
16
16
|
name: "test-element",
|
|
17
17
|
templateOptions: "defer-and-hydrate",
|
|
18
18
|
});
|
|
19
|
-
class TestElementInnerWhen extends
|
|
19
|
+
class TestElementInnerWhen extends FASTElement {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
22
|
this.list = [
|
|
@@ -35,7 +35,7 @@ __decorate([
|
|
|
35
35
|
observable,
|
|
36
36
|
__metadata("design:type", Array)
|
|
37
37
|
], TestElementInnerWhen.prototype, "list", void 0);
|
|
38
|
-
TestElementInnerWhen.defineAsync({
|
|
38
|
+
RenderableFASTElement(TestElementInnerWhen).defineAsync({
|
|
39
39
|
name: "test-element-inner-when",
|
|
40
40
|
templateOptions: "defer-and-hydrate",
|
|
41
41
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { RenderableFASTElement, TemplateElement } from "@microsoft/fast-html";
|
|
3
|
-
import { observable } from "@microsoft/fast-element";
|
|
4
|
-
class TestElement extends
|
|
3
|
+
import { FASTElement, observable } from "@microsoft/fast-element";
|
|
4
|
+
class TestElement extends FASTElement {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
7
7
|
this.slottedNodes = [];
|
|
@@ -24,7 +24,7 @@ __decorate([
|
|
|
24
24
|
observable,
|
|
25
25
|
__metadata("design:type", Array)
|
|
26
26
|
], TestElement.prototype, "slottedBarNodes", void 0);
|
|
27
|
-
TestElement.defineAsync({
|
|
27
|
+
RenderableFASTElement(TestElement).defineAsync({
|
|
28
28
|
name: "test-element",
|
|
29
29
|
templateOptions: "defer-and-hydrate",
|
|
30
30
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { RenderableFASTElement, TemplateElement } from "@microsoft/fast-html";
|
|
3
|
-
import { attr } from "@microsoft/fast-element";
|
|
4
|
-
class TestElement extends
|
|
3
|
+
import { attr, FASTElement } from "@microsoft/fast-element";
|
|
4
|
+
class TestElement extends FASTElement {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
7
7
|
this.show = false;
|
|
@@ -11,11 +11,11 @@ __decorate([
|
|
|
11
11
|
attr({ mode: "boolean" }),
|
|
12
12
|
__metadata("design:type", Boolean)
|
|
13
13
|
], TestElement.prototype, "show", void 0);
|
|
14
|
-
TestElement.defineAsync({
|
|
14
|
+
RenderableFASTElement(TestElement).defineAsync({
|
|
15
15
|
name: "test-element",
|
|
16
16
|
templateOptions: "defer-and-hydrate",
|
|
17
17
|
});
|
|
18
|
-
class TestElementNot extends
|
|
18
|
+
class TestElementNot extends FASTElement {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
21
|
this.hide = false;
|
|
@@ -25,11 +25,11 @@ __decorate([
|
|
|
25
25
|
attr({ mode: "boolean" }),
|
|
26
26
|
__metadata("design:type", Boolean)
|
|
27
27
|
], TestElementNot.prototype, "hide", void 0);
|
|
28
|
-
TestElementNot.defineAsync({
|
|
28
|
+
RenderableFASTElement(TestElementNot).defineAsync({
|
|
29
29
|
name: "test-element-not",
|
|
30
30
|
templateOptions: "defer-and-hydrate",
|
|
31
31
|
});
|
|
32
|
-
class TestElementEquals extends
|
|
32
|
+
class TestElementEquals extends FASTElement {
|
|
33
33
|
constructor() {
|
|
34
34
|
super(...arguments);
|
|
35
35
|
this.varA = 0;
|
|
@@ -39,11 +39,11 @@ __decorate([
|
|
|
39
39
|
attr({ attribute: "var-a" }),
|
|
40
40
|
__metadata("design:type", Number)
|
|
41
41
|
], TestElementEquals.prototype, "varA", void 0);
|
|
42
|
-
TestElementEquals.defineAsync({
|
|
42
|
+
RenderableFASTElement(TestElementEquals).defineAsync({
|
|
43
43
|
name: "test-element-equals",
|
|
44
44
|
templateOptions: "defer-and-hydrate",
|
|
45
45
|
});
|
|
46
|
-
class TestElementNotEquals extends
|
|
46
|
+
class TestElementNotEquals extends FASTElement {
|
|
47
47
|
constructor() {
|
|
48
48
|
super(...arguments);
|
|
49
49
|
this.varA = 0;
|
|
@@ -53,11 +53,11 @@ __decorate([
|
|
|
53
53
|
attr({ attribute: "var-a" }),
|
|
54
54
|
__metadata("design:type", Number)
|
|
55
55
|
], TestElementNotEquals.prototype, "varA", void 0);
|
|
56
|
-
TestElementNotEquals.defineAsync({
|
|
56
|
+
RenderableFASTElement(TestElementNotEquals).defineAsync({
|
|
57
57
|
name: "test-element-not-equals",
|
|
58
58
|
templateOptions: "defer-and-hydrate",
|
|
59
59
|
});
|
|
60
|
-
class TestElementGe extends
|
|
60
|
+
class TestElementGe extends FASTElement {
|
|
61
61
|
constructor() {
|
|
62
62
|
super(...arguments);
|
|
63
63
|
this.varA = 0;
|
|
@@ -67,11 +67,11 @@ __decorate([
|
|
|
67
67
|
attr({ attribute: "var-a" }),
|
|
68
68
|
__metadata("design:type", Number)
|
|
69
69
|
], TestElementGe.prototype, "varA", void 0);
|
|
70
|
-
TestElementGe.defineAsync({
|
|
70
|
+
RenderableFASTElement(TestElementGe).defineAsync({
|
|
71
71
|
name: "test-element-ge",
|
|
72
72
|
templateOptions: "defer-and-hydrate",
|
|
73
73
|
});
|
|
74
|
-
class TestElementGt extends
|
|
74
|
+
class TestElementGt extends FASTElement {
|
|
75
75
|
constructor() {
|
|
76
76
|
super(...arguments);
|
|
77
77
|
this.varA = 0;
|
|
@@ -81,11 +81,11 @@ __decorate([
|
|
|
81
81
|
attr({ attribute: "var-a" }),
|
|
82
82
|
__metadata("design:type", Number)
|
|
83
83
|
], TestElementGt.prototype, "varA", void 0);
|
|
84
|
-
TestElementGt.defineAsync({
|
|
84
|
+
RenderableFASTElement(TestElementGt).defineAsync({
|
|
85
85
|
name: "test-element-gt",
|
|
86
86
|
templateOptions: "defer-and-hydrate",
|
|
87
87
|
});
|
|
88
|
-
class TestElementLe extends
|
|
88
|
+
class TestElementLe extends FASTElement {
|
|
89
89
|
constructor() {
|
|
90
90
|
super(...arguments);
|
|
91
91
|
this.varA = 0;
|
|
@@ -95,11 +95,11 @@ __decorate([
|
|
|
95
95
|
attr({ attribute: "var-a" }),
|
|
96
96
|
__metadata("design:type", Number)
|
|
97
97
|
], TestElementLe.prototype, "varA", void 0);
|
|
98
|
-
TestElementLe.defineAsync({
|
|
98
|
+
RenderableFASTElement(TestElementLe).defineAsync({
|
|
99
99
|
name: "test-element-le",
|
|
100
100
|
templateOptions: "defer-and-hydrate",
|
|
101
101
|
});
|
|
102
|
-
class TestElementLt extends
|
|
102
|
+
class TestElementLt extends FASTElement {
|
|
103
103
|
constructor() {
|
|
104
104
|
super(...arguments);
|
|
105
105
|
this.varA = 0;
|
|
@@ -109,11 +109,11 @@ __decorate([
|
|
|
109
109
|
attr({ attribute: "var-a" }),
|
|
110
110
|
__metadata("design:type", Number)
|
|
111
111
|
], TestElementLt.prototype, "varA", void 0);
|
|
112
|
-
TestElementLt.defineAsync({
|
|
112
|
+
RenderableFASTElement(TestElementLt).defineAsync({
|
|
113
113
|
name: "test-element-lt",
|
|
114
114
|
templateOptions: "defer-and-hydrate",
|
|
115
115
|
});
|
|
116
|
-
class TestElementOr extends
|
|
116
|
+
class TestElementOr extends FASTElement {
|
|
117
117
|
constructor() {
|
|
118
118
|
super(...arguments);
|
|
119
119
|
this.thisVar = false;
|
|
@@ -128,11 +128,11 @@ __decorate([
|
|
|
128
128
|
attr({ attribute: "that-var", mode: "boolean" }),
|
|
129
129
|
__metadata("design:type", Boolean)
|
|
130
130
|
], TestElementOr.prototype, "thatVar", void 0);
|
|
131
|
-
TestElementOr.defineAsync({
|
|
131
|
+
RenderableFASTElement(TestElementOr).defineAsync({
|
|
132
132
|
name: "test-element-or",
|
|
133
133
|
templateOptions: "defer-and-hydrate",
|
|
134
134
|
});
|
|
135
|
-
class TestElementAnd extends
|
|
135
|
+
class TestElementAnd extends FASTElement {
|
|
136
136
|
constructor() {
|
|
137
137
|
super(...arguments);
|
|
138
138
|
this.thisVar = false;
|
|
@@ -147,7 +147,7 @@ __decorate([
|
|
|
147
147
|
attr({ attribute: "that-var", mode: "boolean" }),
|
|
148
148
|
__metadata("design:type", Boolean)
|
|
149
149
|
], TestElementAnd.prototype, "thatVar", void 0);
|
|
150
|
-
TestElementAnd.defineAsync({
|
|
150
|
+
RenderableFASTElement(TestElementAnd).defineAsync({
|
|
151
151
|
name: "test-element-and",
|
|
152
152
|
templateOptions: "defer-and-hydrate",
|
|
153
153
|
});
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FAST } from "@microsoft/fast-element";
|
|
2
2
|
import { debugMessages } from "./debug.js";
|
|
3
3
|
FAST.addMessages(debugMessages);
|
|
4
|
-
export { RenderableFASTElement, TemplateElement } from "./components/index.js";
|
|
4
|
+
export { RenderableFASTElement, TemplateElement, ObserverMap, } from "./components/index.js";
|