@microsoft/fast-element 2.0.0-beta.3 → 2.0.0-beta.4
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 +81 -0
- package/CHANGELOG.md +20 -1
- package/dist/dts/components/fast-definitions.d.ts +9 -8
- package/dist/dts/components/fast-element.d.ts +8 -4
- package/dist/dts/context.d.ts +1 -1
- package/dist/dts/di/di.d.ts +854 -0
- package/dist/dts/hooks.d.ts +2 -2
- package/dist/dts/interfaces.d.ts +38 -7
- package/dist/dts/observation/observable.d.ts +19 -13
- package/dist/dts/styles/element-styles.d.ts +6 -0
- package/dist/dts/templating/binding-signal.d.ts +10 -27
- package/dist/dts/templating/binding-two-way.d.ts +16 -41
- package/dist/dts/templating/binding.d.ts +79 -118
- package/dist/dts/templating/html-directive.d.ts +28 -2
- package/dist/dts/templating/render.d.ts +277 -0
- package/dist/dts/templating/repeat.d.ts +12 -16
- package/dist/dts/templating/template.d.ts +3 -3
- package/dist/dts/templating/when.d.ts +3 -3
- package/dist/dts/testing/exports.d.ts +2 -0
- package/dist/dts/testing/fixture.d.ts +90 -0
- package/dist/dts/testing/timeout.d.ts +7 -0
- package/dist/esm/components/fast-definitions.js +25 -27
- package/dist/esm/components/fast-element.js +16 -8
- package/dist/esm/context.js +5 -1
- package/dist/esm/debug.js +34 -4
- package/dist/esm/di/di.js +1349 -0
- package/dist/esm/observation/observable.js +4 -4
- package/dist/esm/platform.js +1 -1
- package/dist/esm/styles/element-styles.js +14 -0
- package/dist/esm/templating/binding-signal.js +56 -61
- package/dist/esm/templating/binding-two-way.js +51 -35
- package/dist/esm/templating/binding.js +137 -156
- package/dist/esm/templating/compiler.js +29 -7
- package/dist/esm/templating/html-directive.js +12 -1
- package/dist/esm/templating/render.js +392 -0
- package/dist/esm/templating/repeat.js +54 -40
- package/dist/esm/templating/template.js +8 -5
- package/dist/esm/templating/when.js +5 -4
- package/dist/esm/testing/exports.js +2 -0
- package/dist/esm/testing/fixture.js +88 -0
- package/dist/esm/testing/timeout.js +24 -0
- package/dist/fast-element.api.json +3257 -3151
- package/dist/fast-element.d.ts +210 -209
- package/dist/fast-element.debug.js +329 -248
- package/dist/fast-element.debug.min.js +1 -1
- package/dist/fast-element.js +295 -244
- package/dist/fast-element.min.js +1 -1
- package/dist/fast-element.untrimmed.d.ts +218 -214
- package/docs/api-report.md +83 -85
- package/package.json +13 -1
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,87 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/fast-element",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"date": "Mon, 18 Jul 2022 21:10:01 GMT",
|
|
6
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.4",
|
|
7
|
+
"version": "2.0.0-beta.4",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "roeisenb@microsoft.com",
|
|
12
|
+
"package": "@microsoft/fast-element",
|
|
13
|
+
"commit": "f9fb9c88902bd81233fb927a7357d4bca7634f29",
|
|
14
|
+
"comment": "feat: extract all error messages from context and DI"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "roeisenb@microsoft.com",
|
|
18
|
+
"package": "@microsoft/fast-element",
|
|
19
|
+
"commit": "27dc848327b25328e428f67505684d2171b58711",
|
|
20
|
+
"comment": "feat: introduce new binding API"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "roeisenb@microsoft.com",
|
|
24
|
+
"package": "@microsoft/fast-element",
|
|
25
|
+
"commit": "7f4d6b5587f6eff52e5b7f414e27543bb4d7772d",
|
|
26
|
+
"comment": "Enabled DOM Container fallback functions when a container cannot be located."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "roeisenb@microsoft.com",
|
|
30
|
+
"package": "@microsoft/fast-element",
|
|
31
|
+
"commit": "0f57d55822bbf97ab69f90efc0a0d100b27e10eb",
|
|
32
|
+
"comment": "feat: add render directive, renderWith decorator, and RenderInstruction"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "prudepixie@users.noreply.github.com",
|
|
36
|
+
"package": "@microsoft/fast-element",
|
|
37
|
+
"commit": "94e6b0a0e7e1fd1167bd6453c3f7b27efdc91804",
|
|
38
|
+
"comment": "only store removed views if it can't be reused right away"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "32497422+KingOfTac@users.noreply.github.com",
|
|
42
|
+
"package": "@microsoft/fast-element",
|
|
43
|
+
"commit": "11d5b4075118456b2e7c2a4f32a415eeea94ed7f",
|
|
44
|
+
"comment": "fix: enable createElementTemplate to have undefined attributes"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "prudepixie@users.noreply.github.com",
|
|
48
|
+
"package": "@microsoft/fast-element",
|
|
49
|
+
"commit": "31296ea2be3981d25f5feb773b2895dbedfaf2c2",
|
|
50
|
+
"comment": "use index to track reusable views"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "roeisenb@microsoft.com",
|
|
54
|
+
"package": "@microsoft/fast-element",
|
|
55
|
+
"commit": "4567188a47598b3d2589b05f039bea695f2b8875",
|
|
56
|
+
"comment": "feat: enable render, repeat, and when template helpers to handle static data in addition to the already supported dynamic bindings"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "roeisenb@microsoft.com",
|
|
60
|
+
"package": "@microsoft/fast-element",
|
|
61
|
+
"commit": "f164aa75e62ed71c9386902051c021f1fdfba364",
|
|
62
|
+
"comment": "fix: FASTElementDefinition#isDefined should be true only after define"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"author": "roeisenb@microsoft.com",
|
|
66
|
+
"package": "@microsoft/fast-element",
|
|
67
|
+
"commit": "aacfde6d1f52a20af5511c5e792f730bd091d452",
|
|
68
|
+
"comment": "feat: move testing and dependency injection to fast-element"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"author": "roeisenb@microsoft.com",
|
|
72
|
+
"package": "@microsoft/fast-element",
|
|
73
|
+
"commit": "04c51a17dde6d03dc2e2a4de3666cbbec950d900",
|
|
74
|
+
"comment": "fix: warn when host bindings are accidentally applied on non CE views"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"author": "roeisenb@microsoft.com",
|
|
78
|
+
"package": "@microsoft/fast-element",
|
|
79
|
+
"commit": "b32eb1004960da95b74dba7f111ee859b6655896",
|
|
80
|
+
"comment": "feat: perf and safety improvements to fast element definition"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
4
85
|
{
|
|
5
86
|
"date": "Wed, 22 Jun 2022 20:17:50 GMT",
|
|
6
87
|
"tag": "@microsoft/fast-element_v2.0.0-beta.3",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
# Change Log - @microsoft/fast-element
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 18 Jul 2022 21:10:01 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.0.0-beta.4
|
|
8
|
+
|
|
9
|
+
Mon, 18 Jul 2022 21:10:01 GMT
|
|
10
|
+
|
|
11
|
+
### Changes
|
|
12
|
+
|
|
13
|
+
- feat: extract all error messages from context and DI (roeisenb@microsoft.com)
|
|
14
|
+
- feat: introduce new binding API (roeisenb@microsoft.com)
|
|
15
|
+
- Enabled DOM Container fallback functions when a container cannot be located. (roeisenb@microsoft.com)
|
|
16
|
+
- feat: add render directive, renderWith decorator, and RenderInstruction (roeisenb@microsoft.com)
|
|
17
|
+
- only store removed views if it can't be reused right away (prudepixie@users.noreply.github.com)
|
|
18
|
+
- fix: enable createElementTemplate to have undefined attributes (32497422+KingOfTac@users.noreply.github.com)
|
|
19
|
+
- use index to track reusable views (prudepixie@users.noreply.github.com)
|
|
20
|
+
- feat: enable render, repeat, and when template helpers to handle static data in addition to the already supported dynamic bindings (roeisenb@microsoft.com)
|
|
21
|
+
- fix: FASTElementDefinition#isDefined should be true only after define (roeisenb@microsoft.com)
|
|
22
|
+
- feat: move testing and dependency injection to fast-element (roeisenb@microsoft.com)
|
|
23
|
+
- fix: warn when host bindings are accidentally applied on non CE views (roeisenb@microsoft.com)
|
|
24
|
+
- feat: perf and safety improvements to fast element definition (roeisenb@microsoft.com)
|
|
25
|
+
|
|
7
26
|
## 2.0.0-beta.3
|
|
8
27
|
|
|
9
28
|
Wed, 22 Jun 2022 20:17:50 GMT
|
|
@@ -37,7 +37,7 @@ export interface PartialFASTElementDefinition {
|
|
|
37
37
|
* @public
|
|
38
38
|
*/
|
|
39
39
|
export declare class FASTElementDefinition<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>> {
|
|
40
|
-
private
|
|
40
|
+
private platformDefined;
|
|
41
41
|
/**
|
|
42
42
|
* The type this element definition describes.
|
|
43
43
|
*/
|
|
@@ -78,13 +78,7 @@ export declare class FASTElementDefinition<TType extends Constructable<HTMLEleme
|
|
|
78
78
|
* Options controlling how the custom element is defined with the platform.
|
|
79
79
|
*/
|
|
80
80
|
readonly elementOptions?: ElementDefinitionOptions;
|
|
81
|
-
|
|
82
|
-
* Creates an instance of FASTElementDefinition.
|
|
83
|
-
* @param type - The type this definition is being created for.
|
|
84
|
-
* @param nameOrConfig - The name of the element to define or a config object
|
|
85
|
-
* that describes the element to define.
|
|
86
|
-
*/
|
|
87
|
-
constructor(type: TType, nameOrConfig?: PartialFASTElementDefinition | string);
|
|
81
|
+
private constructor();
|
|
88
82
|
/**
|
|
89
83
|
* Defines a custom element based on this definition.
|
|
90
84
|
* @param registry - The element registry to define the element in.
|
|
@@ -92,6 +86,13 @@ export declare class FASTElementDefinition<TType extends Constructable<HTMLEleme
|
|
|
92
86
|
* This operation is idempotent per registry.
|
|
93
87
|
*/
|
|
94
88
|
define(registry?: CustomElementRegistry): this;
|
|
89
|
+
/**
|
|
90
|
+
* Creates an instance of FASTElementDefinition.
|
|
91
|
+
* @param type - The type this definition is being created for.
|
|
92
|
+
* @param nameOrDef - The name of the element to define or a config object
|
|
93
|
+
* that describes the element to define.
|
|
94
|
+
*/
|
|
95
|
+
static compose<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition): FASTElementDefinition<TType>;
|
|
95
96
|
/**
|
|
96
97
|
* Gets the element definition associated with the specified type.
|
|
97
98
|
* @param type - The custom element type to retrieve the definition for.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Constructable } from "../interfaces.js";
|
|
2
2
|
import { Controller } from "./controller.js";
|
|
3
3
|
import { FASTElementDefinition, PartialFASTElementDefinition } from "./fast-definitions.js";
|
|
4
4
|
/**
|
|
@@ -45,6 +45,10 @@ export interface FASTElement extends HTMLElement {
|
|
|
45
45
|
*/
|
|
46
46
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
47
47
|
}
|
|
48
|
+
declare function compose<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(this: TType, nameOrDef: string | PartialFASTElementDefinition): FASTElementDefinition<TType>;
|
|
49
|
+
declare function compose<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition): FASTElementDefinition<TType>;
|
|
50
|
+
declare function define<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(this: TType, nameOrDef: string | PartialFASTElementDefinition): TType;
|
|
51
|
+
declare function define<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition): TType;
|
|
48
52
|
/**
|
|
49
53
|
* A minimal base class for FASTElements that also provides
|
|
50
54
|
* static helpers for working with FASTElements.
|
|
@@ -66,13 +70,12 @@ export declare const FASTElement: (new () => HTMLElement & FASTElement) & {
|
|
|
66
70
|
* @param nameOrDef - The name of the element to define or a definition object
|
|
67
71
|
* that describes the element to define.
|
|
68
72
|
*/
|
|
69
|
-
define
|
|
73
|
+
define: typeof define;
|
|
70
74
|
/**
|
|
71
75
|
* Defines metadata for a FASTElement which can be used to later define the element.
|
|
72
|
-
* IMPORTANT: This API will be renamed to "compose" in a future beta.
|
|
73
76
|
* @public
|
|
74
77
|
*/
|
|
75
|
-
|
|
78
|
+
compose: typeof compose;
|
|
76
79
|
};
|
|
77
80
|
/**
|
|
78
81
|
* Decorator: Defines a platform custom element based on `FASTElement`.
|
|
@@ -81,3 +84,4 @@ export declare const FASTElement: (new () => HTMLElement & FASTElement) & {
|
|
|
81
84
|
* @public
|
|
82
85
|
*/
|
|
83
86
|
export declare function customElement(nameOrDef: string | PartialFASTElementDefinition): (type: Constructable<HTMLElement>) => void;
|
|
87
|
+
export {};
|
package/dist/dts/context.d.ts
CHANGED