@microsoft/fast-element 1.8.0 → 1.10.1
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/.eslintrc.json +30 -0
- package/CHANGELOG.json +133 -1
- package/CHANGELOG.md +26 -2
- package/dist/dts/components/attributes.d.ts +1 -1
- package/dist/dts/components/controller.d.ts +6 -6
- package/dist/dts/components/fast-definitions.d.ts +3 -3
- package/dist/dts/components/fast-element.d.ts +2 -2
- package/dist/dts/dom.d.ts +2 -2
- package/dist/dts/index.d.ts +26 -26
- package/dist/dts/observation/behavior.d.ts +1 -1
- package/dist/dts/observation/observable.d.ts +1 -1
- package/dist/dts/styles/css-directive.d.ts +2 -2
- package/dist/dts/styles/css.d.ts +2 -2
- package/dist/dts/styles/element-styles.d.ts +1 -1
- package/dist/dts/templating/binding.d.ts +3 -3
- package/dist/dts/templating/children.d.ts +2 -2
- package/dist/dts/templating/compiler.d.ts +1 -1
- package/dist/dts/templating/html-directive.d.ts +1 -1
- package/dist/dts/templating/node-observation.d.ts +1 -1
- package/dist/dts/templating/ref.d.ts +2 -2
- package/dist/dts/templating/repeat.d.ts +6 -6
- package/dist/dts/templating/slotted.d.ts +2 -2
- package/dist/dts/templating/template.d.ts +3 -3
- package/dist/dts/templating/view.d.ts +2 -2
- package/dist/dts/templating/when.d.ts +2 -2
- package/dist/esm/components/attributes.js +2 -2
- package/dist/esm/components/controller.js +4 -4
- package/dist/esm/components/fast-definitions.js +4 -4
- package/dist/esm/components/fast-element.js +2 -2
- package/dist/esm/dom.js +1 -1
- package/dist/esm/index.js +24 -23
- package/dist/esm/interfaces.js +1 -0
- package/dist/esm/observation/array-change-records.js +1 -1
- package/dist/esm/observation/array-observer.js +4 -4
- package/dist/esm/observation/behavior.js +1 -0
- package/dist/esm/observation/notifier.js +2 -1
- package/dist/esm/observation/observable.js +4 -3
- package/dist/esm/styles/css.js +2 -2
- package/dist/esm/styles/element-styles.js +1 -3
- package/dist/esm/templating/binding.js +3 -3
- package/dist/esm/templating/children.js +2 -2
- package/dist/esm/templating/compiler.js +3 -2
- package/dist/esm/templating/html-directive.js +1 -1
- package/dist/esm/templating/node-observation.js +2 -2
- package/dist/esm/templating/ref.js +1 -1
- package/dist/esm/templating/repeat.js +6 -6
- package/dist/esm/templating/slotted.js +2 -2
- package/dist/esm/templating/template.js +6 -6
- package/dist/fast-element.api.json +633 -173
- package/dist/fast-element.d.ts +0 -1
- package/dist/fast-element.js +3 -3
- package/dist/fast-element.min.js +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/docs/guide/declaring-templates.md +1 -1
- package/docs/guide/next-steps.md +2 -4
- package/docs/guide/observables-and-state.md +10 -8
- package/docs/guide/using-directives.md +2 -2
- package/karma.conf.cjs +152 -0
- package/package.json +14 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DOM } from "../dom";
|
|
1
|
+
import { DOM } from "../dom.js";
|
|
2
2
|
/**
|
|
3
3
|
* Represents styles that can be applied to a custom element.
|
|
4
4
|
* @public
|
|
@@ -6,8 +6,6 @@ import { DOM } from "../dom";
|
|
|
6
6
|
export class ElementStyles {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.targets = new WeakSet();
|
|
9
|
-
/** @internal */
|
|
10
|
-
this.behaviors = null;
|
|
11
9
|
}
|
|
12
10
|
/** @internal */
|
|
13
11
|
addStylesTo(target) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DOM } from "../dom";
|
|
2
|
-
import { ExecutionContext, Observable, } from "../observation/observable";
|
|
3
|
-
import { TargetedHTMLDirective } from "./html-directive";
|
|
1
|
+
import { DOM } from "../dom.js";
|
|
2
|
+
import { ExecutionContext, Observable, } from "../observation/observable.js";
|
|
3
|
+
import { TargetedHTMLDirective } from "./html-directive.js";
|
|
4
4
|
function normalBind(source, context) {
|
|
5
5
|
this.source = source;
|
|
6
6
|
this.context = context;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AttachedBehaviorHTMLDirective } from "./html-directive";
|
|
2
|
-
import { NodeObservationBehavior } from "./node-observation";
|
|
1
|
+
import { AttachedBehaviorHTMLDirective } from "./html-directive.js";
|
|
2
|
+
import { NodeObservationBehavior } from "./node-observation.js";
|
|
3
3
|
/**
|
|
4
4
|
* The runtime behavior for child node observation.
|
|
5
5
|
* @public
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _interpolationEnd, _interpolationStart, DOM } from "../dom";
|
|
2
|
-
import { HTMLBindingDirective } from "./binding";
|
|
1
|
+
import { _interpolationEnd, _interpolationStart, DOM } from "../dom.js";
|
|
2
|
+
import { HTMLBindingDirective } from "./binding.js";
|
|
3
3
|
let sharedContext = null;
|
|
4
4
|
class CompilationContext {
|
|
5
5
|
addFactory(factory) {
|
|
@@ -15,6 +15,7 @@ class CompilationContext {
|
|
|
15
15
|
this.targetIndex = -1;
|
|
16
16
|
}
|
|
17
17
|
release() {
|
|
18
|
+
/* eslint-disable-next-line @typescript-eslint/no-this-alias */
|
|
18
19
|
sharedContext = this;
|
|
19
20
|
}
|
|
20
21
|
static borrow(directives) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Observable } from "../observation/observable";
|
|
2
|
-
import { emptyArray } from "../platform";
|
|
1
|
+
import { Observable } from "../observation/observable.js";
|
|
2
|
+
import { emptyArray } from "../platform.js";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a function that can be used to filter a Node array, selecting only elements.
|
|
5
5
|
* @param selector - An optional selector to restrict the filter to.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DOM } from "../dom";
|
|
2
|
-
import { Observable, } from "../observation/observable";
|
|
3
|
-
import { enableArrayObservation } from "../observation/array-observer";
|
|
4
|
-
import { emptyArray } from "../platform";
|
|
5
|
-
import { HTMLDirective } from "./html-directive";
|
|
6
|
-
import { HTMLView } from "./view";
|
|
1
|
+
import { DOM } from "../dom.js";
|
|
2
|
+
import { Observable, } from "../observation/observable.js";
|
|
3
|
+
import { enableArrayObservation } from "../observation/array-observer.js";
|
|
4
|
+
import { emptyArray } from "../platform.js";
|
|
5
|
+
import { HTMLDirective } from "./html-directive.js";
|
|
6
|
+
import { HTMLView } from "./view.js";
|
|
7
7
|
const defaultRepeatOptions = Object.freeze({
|
|
8
8
|
positioning: false,
|
|
9
9
|
recycle: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AttachedBehaviorHTMLDirective } from "./html-directive";
|
|
2
|
-
import { NodeObservationBehavior } from "./node-observation";
|
|
1
|
+
import { AttachedBehaviorHTMLDirective } from "./html-directive.js";
|
|
2
|
+
import { NodeObservationBehavior } from "./node-observation.js";
|
|
3
3
|
/**
|
|
4
4
|
* The runtime behavior for slotted node observation.
|
|
5
5
|
* @public
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DOM } from "../dom";
|
|
2
|
-
import { defaultExecutionContext } from "../observation/observable";
|
|
3
|
-
import { compileTemplate } from "./compiler";
|
|
4
|
-
import { HTMLView } from "./view";
|
|
5
|
-
import { HTMLDirective, TargetedHTMLDirective, } from "./html-directive";
|
|
6
|
-
import { HTMLBindingDirective } from "./binding";
|
|
1
|
+
import { DOM } from "../dom.js";
|
|
2
|
+
import { defaultExecutionContext } from "../observation/observable.js";
|
|
3
|
+
import { compileTemplate } from "./compiler.js";
|
|
4
|
+
import { HTMLView } from "./view.js";
|
|
5
|
+
import { HTMLDirective, TargetedHTMLDirective, } from "./html-directive.js";
|
|
6
|
+
import { HTMLBindingDirective } from "./binding.js";
|
|
7
7
|
/**
|
|
8
8
|
* A template capable of creating HTMLView instances or rendering directly to DOM.
|
|
9
9
|
* @public
|