@microsoft/fast-element 2.0.0-beta.1 → 2.0.0-beta.11
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/CHANGELOG.json +348 -0
- package/CHANGELOG.md +114 -1
- package/dist/dts/components/attributes.d.ts +10 -0
- package/dist/dts/components/{controller.d.ts → element-controller.d.ts} +49 -25
- package/dist/dts/components/fast-definitions.d.ts +43 -9
- package/dist/dts/components/fast-element.d.ts +15 -21
- package/dist/dts/context.d.ts +157 -0
- package/dist/dts/di/di.d.ts +899 -0
- package/dist/dts/index.d.ts +2 -2
- package/dist/dts/interfaces.d.ts +45 -14
- package/dist/dts/metadata.d.ts +25 -0
- package/dist/dts/observation/arrays.d.ts +1 -1
- package/dist/dts/observation/observable.d.ts +101 -75
- package/dist/dts/pending-task.d.ts +20 -0
- package/dist/dts/platform.d.ts +7 -0
- package/dist/dts/polyfills.d.ts +1 -8
- package/dist/dts/state/exports.d.ts +3 -0
- package/dist/dts/state/reactive.d.ts +8 -0
- package/dist/dts/state/state.d.ts +141 -0
- package/dist/dts/state/visitor.d.ts +6 -0
- package/dist/dts/state/watch.d.ts +10 -0
- package/dist/dts/styles/css-directive.d.ts +2 -2
- package/dist/dts/styles/element-styles.d.ts +10 -17
- package/dist/dts/styles/host.d.ts +68 -0
- package/dist/dts/templating/binding-signal.d.ts +21 -0
- package/dist/dts/templating/binding-two-way.d.ts +39 -0
- package/dist/dts/templating/binding.d.ts +69 -294
- package/dist/dts/templating/children.d.ts +1 -1
- package/dist/dts/templating/compiler.d.ts +1 -2
- package/dist/dts/templating/html-directive.d.ts +93 -35
- package/dist/dts/templating/node-observation.d.ts +4 -5
- package/dist/dts/templating/ref.d.ts +5 -13
- package/dist/dts/templating/render.d.ts +272 -0
- package/dist/dts/templating/repeat.d.ts +20 -75
- package/dist/dts/templating/slotted.d.ts +1 -1
- package/dist/dts/templating/template.d.ts +12 -61
- package/dist/dts/templating/view.d.ts +77 -12
- package/dist/dts/templating/when.d.ts +3 -3
- package/dist/dts/testing/exports.d.ts +3 -0
- package/dist/dts/testing/fakes.d.ts +4 -0
- package/dist/dts/testing/fixture.d.ts +84 -0
- package/dist/dts/testing/timeout.d.ts +7 -0
- package/dist/{tsdoc-metadata.json → dts/tsdoc-metadata.json} +0 -0
- package/dist/dts/utilities.d.ts +0 -18
- package/dist/esm/components/attributes.js +13 -4
- package/dist/esm/components/{controller.js → element-controller.js} +188 -109
- package/dist/esm/components/fast-definitions.js +38 -28
- package/dist/esm/components/fast-element.js +31 -12
- package/dist/esm/context.js +163 -0
- package/dist/esm/debug.js +36 -4
- package/dist/esm/di/di.js +1435 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/interfaces.js +4 -0
- package/dist/esm/metadata.js +60 -0
- package/dist/esm/observation/arrays.js +304 -3
- package/dist/esm/observation/observable.js +81 -87
- package/dist/esm/pending-task.js +16 -0
- package/dist/esm/platform.js +26 -1
- package/dist/esm/polyfills.js +1 -55
- package/dist/esm/state/exports.js +3 -0
- package/dist/esm/state/reactive.js +34 -0
- package/dist/esm/state/state.js +148 -0
- package/dist/esm/state/visitor.js +28 -0
- package/dist/esm/state/watch.js +36 -0
- package/dist/esm/styles/css.js +4 -4
- package/dist/esm/styles/element-styles.js +14 -33
- package/dist/esm/{observation/behavior.js → styles/host.js} +0 -0
- package/dist/esm/templating/binding-signal.js +83 -0
- package/dist/esm/templating/binding-two-way.js +103 -0
- package/dist/esm/templating/binding.js +134 -414
- package/dist/esm/templating/compiler.js +30 -7
- package/dist/esm/templating/html-directive.js +100 -28
- package/dist/esm/templating/node-observation.js +9 -8
- package/dist/esm/templating/ref.js +4 -12
- package/dist/esm/templating/render.js +391 -0
- package/dist/esm/templating/repeat.js +96 -72
- package/dist/esm/templating/template.js +11 -29
- package/dist/esm/templating/view.js +107 -29
- package/dist/esm/templating/when.js +5 -4
- package/dist/esm/testing/exports.js +3 -0
- package/dist/esm/testing/fakes.js +76 -0
- package/dist/esm/testing/fixture.js +86 -0
- package/dist/esm/testing/timeout.js +24 -0
- package/dist/esm/utilities.js +0 -95
- package/dist/fast-element.api.json +9278 -10745
- package/dist/fast-element.d.ts +707 -813
- package/dist/fast-element.debug.js +1229 -944
- package/dist/fast-element.debug.min.js +1 -1
- package/dist/fast-element.js +1191 -938
- package/dist/fast-element.min.js +1 -1
- package/dist/fast-element.untrimmed.d.ts +716 -824
- package/docs/api-report.md +265 -319
- package/package.json +39 -14
- package/dist/dts/hooks.d.ts +0 -20
- package/dist/dts/observation/behavior.d.ts +0 -19
- package/dist/dts/observation/splice-strategies.d.ts +0 -13
- package/dist/esm/hooks.js +0 -32
- package/dist/esm/observation/splice-strategies.js +0 -400
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,354 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/fast-element",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"date": "Wed, 05 Oct 2022 23:26:01 GMT",
|
|
6
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.11",
|
|
7
|
+
"version": "2.0.0-beta.11",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "nicholasrice@users.noreply.github.com",
|
|
12
|
+
"package": "@microsoft/fast-element",
|
|
13
|
+
"commit": "21d1de94be2b9399ddc43a2b93c6483fa7304591",
|
|
14
|
+
"comment": "fix: removed a shadowRoot leak from ElementController"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 03 Oct 2022 23:44:38 GMT",
|
|
21
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.10",
|
|
22
|
+
"version": "2.0.0-beta.10",
|
|
23
|
+
"comments": {
|
|
24
|
+
"prerelease": [
|
|
25
|
+
{
|
|
26
|
+
"author": "roeisenb@microsoft.com",
|
|
27
|
+
"package": "@microsoft/fast-element",
|
|
28
|
+
"commit": "d29444567d824eb92f4e91e9e173319aef30cfb5",
|
|
29
|
+
"comment": "fix: observation kernel missing binding observer disconnect method"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "roeisenb@microsoft.com",
|
|
33
|
+
"package": "@microsoft/fast-element",
|
|
34
|
+
"commit": "9d620288eb30d963aa7ac08b4d771d79ea6eef7b",
|
|
35
|
+
"comment": "feat: less surprising class bindings w/ more flexibility for developers"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "roeisenb@microsoft.com",
|
|
39
|
+
"package": "@microsoft/fast-element",
|
|
40
|
+
"commit": "a378bfa01843a8a042f3ae37aad6c8fd14fdbcc6",
|
|
41
|
+
"comment": "fix: don't allow registering FASTElement itself as a web component"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"date": "Wed, 28 Sep 2022 20:45:51 GMT",
|
|
48
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.9",
|
|
49
|
+
"version": "2.0.0-beta.9",
|
|
50
|
+
"comments": {
|
|
51
|
+
"prerelease": [
|
|
52
|
+
{
|
|
53
|
+
"author": "roeisenb@microsoft.com",
|
|
54
|
+
"package": "@microsoft/fast-element",
|
|
55
|
+
"commit": "08fab33015853b7f820fdfdac2aecddfeb31843f",
|
|
56
|
+
"comment": "fix: ensure composed templates receive the existing execution context"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"date": "Tue, 27 Sep 2022 22:31:52 GMT",
|
|
63
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.8",
|
|
64
|
+
"version": "2.0.0-beta.8",
|
|
65
|
+
"comments": {
|
|
66
|
+
"prerelease": [
|
|
67
|
+
{
|
|
68
|
+
"author": "roeisenb@microsoft.com",
|
|
69
|
+
"package": "@microsoft/fast-element",
|
|
70
|
+
"commit": "8834c6732c727d39f92f72b197388453a9c17f9b",
|
|
71
|
+
"comment": "fix: correct view state when processing unbindables during rebind"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"author": "roeisenb@microsoft.com",
|
|
75
|
+
"package": "@microsoft/fast-element",
|
|
76
|
+
"commit": "d949a8873621f409f9d9f3453cdb40b593d14b67",
|
|
77
|
+
"comment": "fix: do not crash when null/undefined is provided literally in templates"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"date": "Fri, 23 Sep 2022 22:53:27 GMT",
|
|
84
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.7",
|
|
85
|
+
"version": "2.0.0-beta.7",
|
|
86
|
+
"comments": {
|
|
87
|
+
"prerelease": [
|
|
88
|
+
{
|
|
89
|
+
"author": "roeisenb@microsoft.com",
|
|
90
|
+
"package": "@microsoft/fast-element",
|
|
91
|
+
"commit": "1646b26450a08a77c8bd6302560fe12cc6989ae1",
|
|
92
|
+
"comment": "feat: improve parent typing and fix repeat context type bug"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"author": "roeisenb@microsoft.com",
|
|
96
|
+
"package": "@microsoft/fast-element",
|
|
97
|
+
"commit": "0d786392a38e1d83e56fb1e2112a3e571d193c11",
|
|
98
|
+
"comment": "feat: prepare fast-element for scoped element registries"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"author": "wendywendy@microsoft.com",
|
|
102
|
+
"package": "@microsoft/fast-element",
|
|
103
|
+
"commit": "a42ff75a9130a5ce13006c272c2e2bbbaffdbb41",
|
|
104
|
+
"comment": "persist totalAvailableViews to compare against removeIndex"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"author": "863023+radium-v@users.noreply.github.com",
|
|
108
|
+
"package": "@microsoft/fast-element",
|
|
109
|
+
"commit": "ec2b158dcf39c8b4152b22c3b65963046b473e17",
|
|
110
|
+
"comment": "make ElementsFilter type arguments optional"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"author": "roeisenb@microsoft.com",
|
|
114
|
+
"package": "@microsoft/fast-element",
|
|
115
|
+
"commit": "1039218eafa9a8dbea9da94e1c7803de48d1484c",
|
|
116
|
+
"comment": "fix(fast-element): attributes properly located in inheritance hierarchy"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"author": "nicholasrice@users.noreply.github.com",
|
|
120
|
+
"package": "@microsoft/fast-element",
|
|
121
|
+
"commit": "c1909e9899d517f9483b24043d49a8b193af3c26",
|
|
122
|
+
"comment": "Adds PendingTask community protocol"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"author": "roeisenb@microsoft.com",
|
|
126
|
+
"package": "@microsoft/fast-element",
|
|
127
|
+
"commit": "2edd63a8abe24c68cfc7c76d773c912c6f2d6543",
|
|
128
|
+
"comment": "feat: new behavior and context API design"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"author": "roeisenb@microsoft.com",
|
|
132
|
+
"package": "@microsoft/fast-element",
|
|
133
|
+
"commit": "eb62934b258334c7f92ab3a1112ea62b3901cdac",
|
|
134
|
+
"comment": "feat: implement getAsync code path for dependency injection"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"date": "Thu, 01 Sep 2022 21:53:34 GMT",
|
|
141
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.6",
|
|
142
|
+
"version": "2.0.0-beta.6",
|
|
143
|
+
"comments": {
|
|
144
|
+
"prerelease": [
|
|
145
|
+
{
|
|
146
|
+
"author": "roeisenb@microsoft.com",
|
|
147
|
+
"package": "@microsoft/fast-element",
|
|
148
|
+
"commit": "da9ebbe1b7471cd4e6f7b74f2f9bf02fcc54da4f",
|
|
149
|
+
"comment": "feat: add new state, ownedState, and computedState APIs"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"date": "Thu, 18 Aug 2022 20:46:10 GMT",
|
|
156
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.5",
|
|
157
|
+
"version": "2.0.0-beta.5",
|
|
158
|
+
"comments": {
|
|
159
|
+
"prerelease": [
|
|
160
|
+
{
|
|
161
|
+
"author": "nicholasrice@users.noreply.github.com",
|
|
162
|
+
"package": "@microsoft/fast-element",
|
|
163
|
+
"commit": "218cfc014f5c76464493725f83bd883e8b07defa",
|
|
164
|
+
"comment": "Fix ExpressionObserer bug where watcher was not reset if the binding threw"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"author": "prudepixie@users.noreply.github.com",
|
|
168
|
+
"package": "@microsoft/fast-element",
|
|
169
|
+
"commit": "fdd4514664691021a5673934c95acf31a8e73416",
|
|
170
|
+
"comment": "make insertbefore noop in view"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"author": "prudepixie@users.noreply.github.com",
|
|
174
|
+
"package": "@microsoft/fast-element",
|
|
175
|
+
"commit": "eb8d5a59f645b85567adadac41a3bfa66001f941",
|
|
176
|
+
"comment": "make sure default options for recycle gets set in different scenarios"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"author": "roeisenb@microsoft.com",
|
|
180
|
+
"package": "@microsoft/fast-element",
|
|
181
|
+
"commit": "ac3954c97acd3bd549a27829593855c431a24027",
|
|
182
|
+
"comment": "refactor: remove dependency of DI on FASTElement"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"author": "32497422+KingOfTac@users.noreply.github.com",
|
|
186
|
+
"package": "@microsoft/fast-element",
|
|
187
|
+
"commit": "29308db7920baaaac5b31b206d551669e165bc06",
|
|
188
|
+
"comment": "add subpath export for package.json to packages"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"author": "prudepixie@users.noreply.github.com",
|
|
192
|
+
"package": "@microsoft/fast-element",
|
|
193
|
+
"commit": "775d51602cba544347ec1e57fdb4fea248d1b1b5",
|
|
194
|
+
"comment": "change default array strategy to merge strategy, update repeat directive"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"author": "nicholasrice@users.noreply.github.com",
|
|
198
|
+
"package": "@microsoft/fast-element",
|
|
199
|
+
"commit": "aeac1198f427c33f789a2d869f58549ea5bfea57",
|
|
200
|
+
"comment": "assert FASTElement's type so that instanceof behavior is consistent with other class implementations"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"date": "Mon, 18 Jul 2022 21:10:01 GMT",
|
|
207
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.4",
|
|
208
|
+
"version": "2.0.0-beta.4",
|
|
209
|
+
"comments": {
|
|
210
|
+
"prerelease": [
|
|
211
|
+
{
|
|
212
|
+
"author": "roeisenb@microsoft.com",
|
|
213
|
+
"package": "@microsoft/fast-element",
|
|
214
|
+
"commit": "f9fb9c88902bd81233fb927a7357d4bca7634f29",
|
|
215
|
+
"comment": "feat: extract all error messages from context and DI"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"author": "roeisenb@microsoft.com",
|
|
219
|
+
"package": "@microsoft/fast-element",
|
|
220
|
+
"commit": "27dc848327b25328e428f67505684d2171b58711",
|
|
221
|
+
"comment": "feat: introduce new binding API"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"author": "roeisenb@microsoft.com",
|
|
225
|
+
"package": "@microsoft/fast-element",
|
|
226
|
+
"commit": "7f4d6b5587f6eff52e5b7f414e27543bb4d7772d",
|
|
227
|
+
"comment": "Enabled DOM Container fallback functions when a container cannot be located."
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"author": "roeisenb@microsoft.com",
|
|
231
|
+
"package": "@microsoft/fast-element",
|
|
232
|
+
"commit": "0f57d55822bbf97ab69f90efc0a0d100b27e10eb",
|
|
233
|
+
"comment": "feat: add render directive, renderWith decorator, and RenderInstruction"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"author": "prudepixie@users.noreply.github.com",
|
|
237
|
+
"package": "@microsoft/fast-element",
|
|
238
|
+
"commit": "94e6b0a0e7e1fd1167bd6453c3f7b27efdc91804",
|
|
239
|
+
"comment": "only store removed views if it can't be reused right away"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"author": "32497422+KingOfTac@users.noreply.github.com",
|
|
243
|
+
"package": "@microsoft/fast-element",
|
|
244
|
+
"commit": "11d5b4075118456b2e7c2a4f32a415eeea94ed7f",
|
|
245
|
+
"comment": "fix: enable createElementTemplate to have undefined attributes"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"author": "prudepixie@users.noreply.github.com",
|
|
249
|
+
"package": "@microsoft/fast-element",
|
|
250
|
+
"commit": "31296ea2be3981d25f5feb773b2895dbedfaf2c2",
|
|
251
|
+
"comment": "use index to track reusable views"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"author": "roeisenb@microsoft.com",
|
|
255
|
+
"package": "@microsoft/fast-element",
|
|
256
|
+
"commit": "4567188a47598b3d2589b05f039bea695f2b8875",
|
|
257
|
+
"comment": "feat: enable render, repeat, and when template helpers to handle static data in addition to the already supported dynamic bindings"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"author": "roeisenb@microsoft.com",
|
|
261
|
+
"package": "@microsoft/fast-element",
|
|
262
|
+
"commit": "f164aa75e62ed71c9386902051c021f1fdfba364",
|
|
263
|
+
"comment": "fix: FASTElementDefinition#isDefined should be true only after define"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"author": "roeisenb@microsoft.com",
|
|
267
|
+
"package": "@microsoft/fast-element",
|
|
268
|
+
"commit": "aacfde6d1f52a20af5511c5e792f730bd091d452",
|
|
269
|
+
"comment": "feat: move testing and dependency injection to fast-element"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"author": "roeisenb@microsoft.com",
|
|
273
|
+
"package": "@microsoft/fast-element",
|
|
274
|
+
"commit": "04c51a17dde6d03dc2e2a4de3666cbbec950d900",
|
|
275
|
+
"comment": "fix: warn when host bindings are accidentally applied on non CE views"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"author": "roeisenb@microsoft.com",
|
|
279
|
+
"package": "@microsoft/fast-element",
|
|
280
|
+
"commit": "b32eb1004960da95b74dba7f111ee859b6655896",
|
|
281
|
+
"comment": "feat: perf and safety improvements to fast element definition"
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"date": "Wed, 22 Jun 2022 20:17:50 GMT",
|
|
288
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.3",
|
|
289
|
+
"version": "2.0.0-beta.3",
|
|
290
|
+
"comments": {
|
|
291
|
+
"prerelease": [
|
|
292
|
+
{
|
|
293
|
+
"comment": "fix: correct aspect type for content that looks like an attribute",
|
|
294
|
+
"author": "nicholasrice@users.noreply.github.com",
|
|
295
|
+
"commit": "f28cdb9fdba9cb27904acfad7444de82d447f39e",
|
|
296
|
+
"package": "@microsoft/fast-element"
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"date": "Wed, 15 Jun 2022 17:41:10 GMT",
|
|
303
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.2",
|
|
304
|
+
"version": "2.0.0-beta.2",
|
|
305
|
+
"comments": {
|
|
306
|
+
"prerelease": [
|
|
307
|
+
{
|
|
308
|
+
"comment": "doc: add note to FASTElement.metadata API",
|
|
309
|
+
"author": "roeisenb@microsoft.com",
|
|
310
|
+
"commit": "359467f9ae67c46a33dfc28ce86dfd908072695d",
|
|
311
|
+
"package": "@microsoft/fast-element"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"comment": "when recycle is set to false while itemBinding stays the same, views should be recreated",
|
|
315
|
+
"author": "wendy.hsu@microsoft.com",
|
|
316
|
+
"commit": "9c92b9bb5bc9bf221b439c0a776b3621fdd9d9aa",
|
|
317
|
+
"package": "@microsoft/fast-element"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"comment": "feat: simplify execution context to align closer with v1",
|
|
321
|
+
"author": "roeisenb@microsoft.com",
|
|
322
|
+
"commit": "488d051999c43b93a0beef4db30a2bddd6bbdc64",
|
|
323
|
+
"package": "@microsoft/fast-element"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"comment": "feat: ergo improvements to context, array length, and metadata",
|
|
327
|
+
"author": "roeisenb@microsoft.com",
|
|
328
|
+
"commit": "12f5671e215ebd2b95c9cc83f856e233e01e9c4a",
|
|
329
|
+
"package": "@microsoft/fast-element"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"comment": "feat: move optional bindings out of rollup and list as exports",
|
|
333
|
+
"author": "roeisenb@microsoft.com",
|
|
334
|
+
"commit": "e86a638b9e84cbf36d950025889742944e68e512",
|
|
335
|
+
"package": "@microsoft/fast-element"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"comment": "fix: make SyntheticViewTemplate type a string so it is generally usable",
|
|
339
|
+
"author": "roeisenb@microsoft.com",
|
|
340
|
+
"commit": "de7f234ef871204fcac2b5df59433d919809341d",
|
|
341
|
+
"package": "@microsoft/fast-element"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"comment": "feat: implement W3C WC community context protocol and integrate with DI",
|
|
345
|
+
"author": "roeisenb@microsoft.com",
|
|
346
|
+
"commit": "c45297c0ca48b7e5f4343ba48e5183f2bccdb946",
|
|
347
|
+
"package": "@microsoft/fast-element"
|
|
348
|
+
}
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
},
|
|
4
352
|
{
|
|
5
353
|
"date": "Wed, 01 Jun 2022 17:53:14 GMT",
|
|
6
354
|
"tag": "@microsoft/fast-element_v2.0.0-beta.1",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,122 @@
|
|
|
1
1
|
# Change Log - @microsoft/fast-element
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed,
|
|
3
|
+
This log was last generated on Wed, 05 Oct 2022 23:26:01 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.0.0-beta.11
|
|
8
|
+
|
|
9
|
+
Wed, 05 Oct 2022 23:26:01 GMT
|
|
10
|
+
|
|
11
|
+
### Changes
|
|
12
|
+
|
|
13
|
+
- fix: removed a shadowRoot leak from ElementController (nicholasrice@users.noreply.github.com)
|
|
14
|
+
|
|
15
|
+
## 2.0.0-beta.10
|
|
16
|
+
|
|
17
|
+
Mon, 03 Oct 2022 23:44:38 GMT
|
|
18
|
+
|
|
19
|
+
### Changes
|
|
20
|
+
|
|
21
|
+
- fix: observation kernel missing binding observer disconnect method (roeisenb@microsoft.com)
|
|
22
|
+
- feat: less surprising class bindings w/ more flexibility for developers (roeisenb@microsoft.com)
|
|
23
|
+
- fix: don't allow registering FASTElement itself as a web component (roeisenb@microsoft.com)
|
|
24
|
+
|
|
25
|
+
## 2.0.0-beta.9
|
|
26
|
+
|
|
27
|
+
Wed, 28 Sep 2022 20:45:51 GMT
|
|
28
|
+
|
|
29
|
+
### Changes
|
|
30
|
+
|
|
31
|
+
- fix: ensure composed templates receive the existing execution context (roeisenb@microsoft.com)
|
|
32
|
+
|
|
33
|
+
## 2.0.0-beta.8
|
|
34
|
+
|
|
35
|
+
Tue, 27 Sep 2022 22:31:52 GMT
|
|
36
|
+
|
|
37
|
+
### Changes
|
|
38
|
+
|
|
39
|
+
- fix: correct view state when processing unbindables during rebind (roeisenb@microsoft.com)
|
|
40
|
+
- fix: do not crash when null/undefined is provided literally in templates (roeisenb@microsoft.com)
|
|
41
|
+
|
|
42
|
+
## 2.0.0-beta.7
|
|
43
|
+
|
|
44
|
+
Fri, 23 Sep 2022 22:53:27 GMT
|
|
45
|
+
|
|
46
|
+
### Changes
|
|
47
|
+
|
|
48
|
+
- feat: improve parent typing and fix repeat context type bug (roeisenb@microsoft.com)
|
|
49
|
+
- feat: prepare fast-element for scoped element registries (roeisenb@microsoft.com)
|
|
50
|
+
- persist totalAvailableViews to compare against removeIndex (wendywendy@microsoft.com)
|
|
51
|
+
- make ElementsFilter type arguments optional (863023+radium-v@users.noreply.github.com)
|
|
52
|
+
- fix(fast-element): attributes properly located in inheritance hierarchy (roeisenb@microsoft.com)
|
|
53
|
+
- Adds PendingTask community protocol (nicholasrice@users.noreply.github.com)
|
|
54
|
+
- feat: new behavior and context API design (roeisenb@microsoft.com)
|
|
55
|
+
- feat: implement getAsync code path for dependency injection (roeisenb@microsoft.com)
|
|
56
|
+
|
|
57
|
+
## 2.0.0-beta.6
|
|
58
|
+
|
|
59
|
+
Thu, 01 Sep 2022 21:53:34 GMT
|
|
60
|
+
|
|
61
|
+
### Changes
|
|
62
|
+
|
|
63
|
+
- feat: add new state, ownedState, and computedState APIs (roeisenb@microsoft.com)
|
|
64
|
+
|
|
65
|
+
## 2.0.0-beta.5
|
|
66
|
+
|
|
67
|
+
Thu, 18 Aug 2022 20:46:10 GMT
|
|
68
|
+
|
|
69
|
+
### Changes
|
|
70
|
+
|
|
71
|
+
- Fix ExpressionObserer bug where watcher was not reset if the binding threw (nicholasrice@users.noreply.github.com)
|
|
72
|
+
- make insertbefore noop in view (prudepixie@users.noreply.github.com)
|
|
73
|
+
- make sure default options for recycle gets set in different scenarios (prudepixie@users.noreply.github.com)
|
|
74
|
+
- refactor: remove dependency of DI on FASTElement (roeisenb@microsoft.com)
|
|
75
|
+
- add subpath export for package.json to packages (32497422+KingOfTac@users.noreply.github.com)
|
|
76
|
+
- change default array strategy to merge strategy, update repeat directive (prudepixie@users.noreply.github.com)
|
|
77
|
+
- assert FASTElement's type so that instanceof behavior is consistent with other class implementations (nicholasrice@users.noreply.github.com)
|
|
78
|
+
|
|
79
|
+
## 2.0.0-beta.4
|
|
80
|
+
|
|
81
|
+
Mon, 18 Jul 2022 21:10:01 GMT
|
|
82
|
+
|
|
83
|
+
### Changes
|
|
84
|
+
|
|
85
|
+
- feat: extract all error messages from context and DI (roeisenb@microsoft.com)
|
|
86
|
+
- feat: introduce new binding API (roeisenb@microsoft.com)
|
|
87
|
+
- Enabled DOM Container fallback functions when a container cannot be located. (roeisenb@microsoft.com)
|
|
88
|
+
- feat: add render directive, renderWith decorator, and RenderInstruction (roeisenb@microsoft.com)
|
|
89
|
+
- only store removed views if it can't be reused right away (prudepixie@users.noreply.github.com)
|
|
90
|
+
- fix: enable createElementTemplate to have undefined attributes (32497422+KingOfTac@users.noreply.github.com)
|
|
91
|
+
- use index to track reusable views (prudepixie@users.noreply.github.com)
|
|
92
|
+
- feat: enable render, repeat, and when template helpers to handle static data in addition to the already supported dynamic bindings (roeisenb@microsoft.com)
|
|
93
|
+
- fix: FASTElementDefinition#isDefined should be true only after define (roeisenb@microsoft.com)
|
|
94
|
+
- feat: move testing and dependency injection to fast-element (roeisenb@microsoft.com)
|
|
95
|
+
- fix: warn when host bindings are accidentally applied on non CE views (roeisenb@microsoft.com)
|
|
96
|
+
- feat: perf and safety improvements to fast element definition (roeisenb@microsoft.com)
|
|
97
|
+
|
|
98
|
+
## 2.0.0-beta.3
|
|
99
|
+
|
|
100
|
+
Wed, 22 Jun 2022 20:17:50 GMT
|
|
101
|
+
|
|
102
|
+
### Changes
|
|
103
|
+
|
|
104
|
+
- fix: correct aspect type for content that looks like an attribute (nicholasrice@users.noreply.github.com)
|
|
105
|
+
|
|
106
|
+
## 2.0.0-beta.2
|
|
107
|
+
|
|
108
|
+
Wed, 15 Jun 2022 17:41:10 GMT
|
|
109
|
+
|
|
110
|
+
### Changes
|
|
111
|
+
|
|
112
|
+
- doc: add note to FASTElement.metadata API (roeisenb@microsoft.com)
|
|
113
|
+
- when recycle is set to false while itemBinding stays the same, views should be recreated (wendy.hsu@microsoft.com)
|
|
114
|
+
- feat: simplify execution context to align closer with v1 (roeisenb@microsoft.com)
|
|
115
|
+
- feat: ergo improvements to context, array length, and metadata (roeisenb@microsoft.com)
|
|
116
|
+
- feat: move optional bindings out of rollup and list as exports (roeisenb@microsoft.com)
|
|
117
|
+
- fix: make SyntheticViewTemplate type a string so it is generally usable (roeisenb@microsoft.com)
|
|
118
|
+
- feat: implement W3C WC community context protocol and integrate with DI (roeisenb@microsoft.com)
|
|
119
|
+
|
|
7
120
|
## 2.0.0-beta.1
|
|
8
121
|
|
|
9
122
|
Wed, 01 Jun 2022 17:53:14 GMT
|
|
@@ -40,6 +40,16 @@ export declare type AttributeConfiguration = {
|
|
|
40
40
|
mode?: AttributeMode;
|
|
41
41
|
converter?: ValueConverter;
|
|
42
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* Metadata used to configure a custom attribute's behavior.
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export declare const AttributeConfiguration: Readonly<{
|
|
48
|
+
/**
|
|
49
|
+
* Locates all attribute configurations associated with a type.
|
|
50
|
+
*/
|
|
51
|
+
locate: (target: {}) => AttributeConfiguration[];
|
|
52
|
+
}>;
|
|
43
53
|
/**
|
|
44
54
|
* Metadata used to configure a custom attribute's behavior through a decorator.
|
|
45
55
|
* @public
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StyleStrategy, StyleTarget } from "../interfaces.js";
|
|
2
|
+
import type { HostBehavior, HostController } from "../styles/host.js";
|
|
2
3
|
import { PropertyChangeNotifier } from "../observation/notifier.js";
|
|
3
|
-
import type { ElementStyles } from "../styles/element-styles.js";
|
|
4
4
|
import type { ElementViewTemplate } from "../templating/template.js";
|
|
5
5
|
import type { ElementView } from "../templating/view.js";
|
|
6
|
+
import { ElementStyles } from "../styles/element-styles.js";
|
|
6
7
|
import { FASTElementDefinition } from "./fast-definitions.js";
|
|
7
8
|
/**
|
|
8
9
|
* Controls the lifecycle and rendering of a `FASTElement`.
|
|
9
10
|
* @public
|
|
10
11
|
*/
|
|
11
|
-
export declare class
|
|
12
|
+
export declare class ElementController<TElement extends HTMLElement = HTMLElement> extends PropertyChangeNotifier implements HostController<TElement> {
|
|
12
13
|
private boundObservables;
|
|
13
|
-
private behaviors;
|
|
14
14
|
private needsInitialization;
|
|
15
15
|
private hasExistingShadowRoot;
|
|
16
16
|
private _template;
|
|
17
|
-
private _styles;
|
|
18
17
|
private _isConnected;
|
|
18
|
+
private behaviors;
|
|
19
|
+
private _mainStyles;
|
|
19
20
|
/**
|
|
20
21
|
* This allows Observable.getNotifier(...) to return the Controller
|
|
21
22
|
* when the notifier for the Controller itself is being requested. The
|
|
@@ -28,7 +29,7 @@ export declare class Controller<TElement extends HTMLElement = HTMLElement> exte
|
|
|
28
29
|
/**
|
|
29
30
|
* The element being controlled by this controller.
|
|
30
31
|
*/
|
|
31
|
-
readonly
|
|
32
|
+
readonly source: TElement;
|
|
32
33
|
/**
|
|
33
34
|
* The element definition that instructs this controller
|
|
34
35
|
* in how to handle rendering and other platform integrations.
|
|
@@ -54,12 +55,11 @@ export declare class Controller<TElement extends HTMLElement = HTMLElement> exte
|
|
|
54
55
|
get template(): ElementViewTemplate<TElement> | null;
|
|
55
56
|
set template(value: ElementViewTemplate<TElement> | null);
|
|
56
57
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* This value can only be accurately read after connect but can be set at any time.
|
|
58
|
+
* The main set of styles used for the component, independent
|
|
59
|
+
* of any dynamically added styles.
|
|
60
60
|
*/
|
|
61
|
-
get
|
|
62
|
-
set
|
|
61
|
+
get mainStyles(): ElementStyles | null;
|
|
62
|
+
set mainStyles(value: ElementStyles | null);
|
|
63
63
|
/**
|
|
64
64
|
* Creates a Controller to control the specified element.
|
|
65
65
|
* @param element - The element to be controlled by this controller.
|
|
@@ -68,6 +68,17 @@ export declare class Controller<TElement extends HTMLElement = HTMLElement> exte
|
|
|
68
68
|
* @internal
|
|
69
69
|
*/
|
|
70
70
|
constructor(element: TElement, definition: FASTElementDefinition);
|
|
71
|
+
/**
|
|
72
|
+
* Adds the behavior to the component.
|
|
73
|
+
* @param behavior - The behavior to add.
|
|
74
|
+
*/
|
|
75
|
+
addBehavior(behavior: HostBehavior<TElement>): void;
|
|
76
|
+
/**
|
|
77
|
+
* Removes the behavior from the component.
|
|
78
|
+
* @param behavior - The behavior to remove.
|
|
79
|
+
* @param force - Forces removal even if this behavior was added more than once.
|
|
80
|
+
*/
|
|
81
|
+
removeBehavior(behavior: HostBehavior<TElement>, force?: boolean): void;
|
|
71
82
|
/**
|
|
72
83
|
* Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.
|
|
73
84
|
* @param styles - The styles to add.
|
|
@@ -78,25 +89,14 @@ export declare class Controller<TElement extends HTMLElement = HTMLElement> exte
|
|
|
78
89
|
* @param styles - the styles to remove.
|
|
79
90
|
*/
|
|
80
91
|
removeStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
|
|
81
|
-
/**
|
|
82
|
-
* Adds behaviors to this element.
|
|
83
|
-
* @param behaviors - The behaviors to add.
|
|
84
|
-
*/
|
|
85
|
-
addBehaviors(behaviors: ReadonlyArray<Behavior<TElement>>): void;
|
|
86
|
-
/**
|
|
87
|
-
* Removes behaviors from this element.
|
|
88
|
-
* @param behaviors - The behaviors to remove.
|
|
89
|
-
* @param force - Forces unbinding of behaviors.
|
|
90
|
-
*/
|
|
91
|
-
removeBehaviors(behaviors: ReadonlyArray<Behavior<TElement>>, force?: boolean): void;
|
|
92
92
|
/**
|
|
93
93
|
* Runs connected lifecycle behavior on the associated element.
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
connect(): void;
|
|
96
96
|
/**
|
|
97
97
|
* Runs disconnected lifecycle behavior on the associated element.
|
|
98
98
|
*/
|
|
99
|
-
|
|
99
|
+
disconnect(): void;
|
|
100
100
|
/**
|
|
101
101
|
* Runs the attribute changed callback for the associated element.
|
|
102
102
|
* @param name - The name of the attribute that changed.
|
|
@@ -123,5 +123,29 @@ export declare class Controller<TElement extends HTMLElement = HTMLElement> exte
|
|
|
123
123
|
* registered either through the use of the {@link customElement}
|
|
124
124
|
* decorator or a call to `FASTElement.define`.
|
|
125
125
|
*/
|
|
126
|
-
static forCustomElement(element: HTMLElement):
|
|
126
|
+
static forCustomElement(element: HTMLElement): ElementController;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* https://wicg.github.io/construct-stylesheets/
|
|
130
|
+
* https://developers.google.com/web/updates/2019/02/constructable-stylesheets
|
|
131
|
+
*
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
export declare class AdoptedStyleSheetsStrategy implements StyleStrategy {
|
|
135
|
+
private static styleSheetCache;
|
|
136
|
+
/** @internal */
|
|
137
|
+
readonly sheets: CSSStyleSheet[];
|
|
138
|
+
constructor(styles: (string | CSSStyleSheet)[]);
|
|
139
|
+
addStylesTo(target: StyleTarget): void;
|
|
140
|
+
removeStylesFrom(target: StyleTarget): void;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* @internal
|
|
144
|
+
*/
|
|
145
|
+
export declare class StyleElementStrategy implements StyleStrategy {
|
|
146
|
+
private readonly styles;
|
|
147
|
+
private readonly styleClass;
|
|
148
|
+
constructor(styles: string[]);
|
|
149
|
+
addStylesTo(target: StyleTarget): void;
|
|
150
|
+
removeStylesFrom(target: StyleTarget): void;
|
|
127
151
|
}
|