@microsoft/fast-element 2.0.0-beta.1 → 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 +147 -0
- package/CHANGELOG.md +42 -1
- package/dist/dts/components/fast-definitions.d.ts +11 -8
- package/dist/dts/components/fast-element.d.ts +13 -3
- package/dist/dts/context.d.ts +157 -0
- package/dist/dts/di/di.d.ts +854 -0
- package/dist/dts/hooks.d.ts +2 -2
- package/dist/dts/interfaces.d.ts +39 -7
- package/dist/dts/metadata.d.ts +25 -0
- package/dist/dts/observation/arrays.d.ts +1 -1
- package/dist/dts/observation/behavior.d.ts +4 -4
- package/dist/dts/observation/observable.d.ts +59 -72
- package/dist/dts/styles/element-styles.d.ts +6 -0
- package/dist/dts/templating/binding-signal.d.ts +21 -0
- package/dist/dts/templating/binding-two-way.d.ts +31 -0
- package/dist/dts/templating/binding.d.ts +74 -201
- package/dist/dts/templating/compiler.d.ts +1 -2
- package/dist/dts/templating/html-directive.d.ts +31 -3
- package/dist/dts/templating/render.d.ts +277 -0
- package/dist/dts/templating/repeat.d.ts +13 -63
- package/dist/dts/templating/template.d.ts +11 -60
- package/dist/dts/templating/view.d.ts +9 -9
- 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/{tsdoc-metadata.json → dts/tsdoc-metadata.json} +0 -0
- package/dist/esm/components/fast-definitions.js +27 -27
- package/dist/esm/components/fast-element.js +20 -4
- package/dist/esm/context.js +163 -0
- package/dist/esm/debug.js +35 -4
- package/dist/esm/di/di.js +1349 -0
- package/dist/esm/metadata.js +60 -0
- package/dist/esm/observation/arrays.js +1 -1
- package/dist/esm/observation/observable.js +73 -21
- package/dist/esm/platform.js +1 -1
- package/dist/esm/styles/element-styles.js +14 -0
- package/dist/esm/templating/binding-signal.js +79 -0
- package/dist/esm/templating/binding-two-way.js +98 -0
- package/dist/esm/templating/binding.js +137 -313
- package/dist/esm/templating/compiler.js +30 -7
- package/dist/esm/templating/html-directive.js +16 -2
- package/dist/esm/templating/render.js +392 -0
- package/dist/esm/templating/repeat.js +60 -38
- package/dist/esm/templating/template.js +9 -26
- 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 +8509 -10358
- package/dist/fast-element.d.ts +315 -522
- package/dist/fast-element.debug.js +417 -438
- package/dist/fast-element.debug.min.js +1 -1
- package/dist/fast-element.js +382 -434
- package/dist/fast-element.min.js +1 -1
- package/dist/fast-element.untrimmed.d.ts +324 -529
- package/docs/api-report.md +124 -232
- package/package.json +32 -4
package/dist/fast-element.d.ts
CHANGED
|
@@ -115,8 +115,10 @@ export declare const Aspect: Readonly<{
|
|
|
115
115
|
*
|
|
116
116
|
* @param directive - The directive to assign the aspect to.
|
|
117
117
|
* @param value - The value to base the aspect determination on.
|
|
118
|
+
* @remarks
|
|
119
|
+
* If a falsy value is provided, then the content aspect will be assigned.
|
|
118
120
|
*/
|
|
119
|
-
readonly assign: (directive: Aspected, value
|
|
121
|
+
readonly assign: (directive: Aspected, value?: string) => void;
|
|
120
122
|
}>;
|
|
121
123
|
|
|
122
124
|
/**
|
|
@@ -145,7 +147,7 @@ export declare interface Aspected {
|
|
|
145
147
|
/**
|
|
146
148
|
* A binding if one is associated with the aspect.
|
|
147
149
|
*/
|
|
148
|
-
|
|
150
|
+
dataBinding?: Binding;
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
/**
|
|
@@ -250,151 +252,62 @@ export declare type AttributeMode = typeof reflectMode | typeof booleanMode | "f
|
|
|
250
252
|
* element's bind/unbind operations.
|
|
251
253
|
* @public
|
|
252
254
|
*/
|
|
253
|
-
export declare interface Behavior<TSource = any, TParent = any
|
|
255
|
+
export declare interface Behavior<TSource = any, TParent = any> {
|
|
254
256
|
/**
|
|
255
257
|
* Bind this behavior to the source.
|
|
256
258
|
* @param source - The source to bind to.
|
|
257
259
|
* @param context - The execution context that the binding is operating within.
|
|
258
260
|
*/
|
|
259
|
-
bind(source: TSource, context:
|
|
261
|
+
bind(source: TSource, context: ExecutionContext<TParent>): void;
|
|
260
262
|
/**
|
|
261
263
|
* Unbinds this behavior from the source.
|
|
262
264
|
* @param source - The source to unbind from.
|
|
263
265
|
*/
|
|
264
|
-
unbind(source: TSource, context:
|
|
266
|
+
unbind(source: TSource, context: ExecutionContext<TParent>): void;
|
|
265
267
|
}
|
|
266
268
|
|
|
267
269
|
/**
|
|
268
|
-
* Creates
|
|
269
|
-
* @param binding - The binding
|
|
270
|
-
* @param
|
|
271
|
-
* @returns A binding
|
|
272
|
-
* @public
|
|
273
|
-
*/
|
|
274
|
-
export declare function bind<T = any>(binding: Binding<T>, config?: BindingConfig | DefaultBindingOptions): CaptureType<T>;
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* The signature of an arrow function capable of being evaluated
|
|
278
|
-
* as part of a template binding update.
|
|
270
|
+
* Creates an standard binding.
|
|
271
|
+
* @param binding - The binding to refresh when changed.
|
|
272
|
+
* @param isVolatile - Indicates whether the binding is volatile or not.
|
|
273
|
+
* @returns A binding configuration.
|
|
279
274
|
* @public
|
|
280
275
|
*/
|
|
281
|
-
export declare
|
|
276
|
+
export declare function bind<T = any>(binding: Expression<T>, isVolatile?: boolean): Binding<T>;
|
|
282
277
|
|
|
283
278
|
/**
|
|
284
|
-
*
|
|
279
|
+
* Captures a binding expression along with related information and capabilities.
|
|
280
|
+
*
|
|
285
281
|
* @public
|
|
286
282
|
*/
|
|
287
|
-
export declare
|
|
283
|
+
export declare abstract class Binding<TSource = any, TReturn = any, TParent = any> {
|
|
288
284
|
/**
|
|
289
|
-
*
|
|
285
|
+
* Options associated with the binding.
|
|
290
286
|
*/
|
|
291
|
-
|
|
287
|
+
options?: any;
|
|
292
288
|
/**
|
|
293
|
-
*
|
|
289
|
+
* Whether or not the binding is volatile.
|
|
294
290
|
*/
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Describes the configuration for a binding expression.
|
|
300
|
-
* @public
|
|
301
|
-
*/
|
|
302
|
-
export declare const BindingConfig: Readonly<{
|
|
291
|
+
isVolatile?: boolean;
|
|
303
292
|
/**
|
|
304
|
-
*
|
|
305
|
-
* @param mode - The mode to use for the configuration.
|
|
306
|
-
* @param defaultOptions - The default options to use for the configuration.
|
|
307
|
-
* @returns A new binding configuration.
|
|
293
|
+
* Evaluates the binding expression.
|
|
308
294
|
*/
|
|
309
|
-
|
|
310
|
-
}>;
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Creates a new binding configuration based on the supplied options.
|
|
314
|
-
* @public
|
|
315
|
-
*/
|
|
316
|
-
export declare type BindingConfigResolver<T> = (options: T) => BindingConfig<T>;
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Describes how aspects of an HTML element will be affected by bindings.
|
|
320
|
-
* @public
|
|
321
|
-
*/
|
|
322
|
-
export declare type BindingMode = Record<Aspect, (directive: HTMLBindingDirective) => Pick<ViewBehaviorFactory, "createBehavior">>;
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Describes how aspects of an HTML element will be affected by bindings.
|
|
326
|
-
* @public
|
|
327
|
-
*/
|
|
328
|
-
export declare const BindingMode: Readonly<{
|
|
295
|
+
evaluate: Expression<TSource, TReturn, TParent>;
|
|
329
296
|
/**
|
|
330
|
-
* Creates
|
|
331
|
-
* @param
|
|
332
|
-
* @param
|
|
333
|
-
* @returns A new binding mode.
|
|
297
|
+
* Creates an observer capable of notifying a subscriber when the output of a binding changes.
|
|
298
|
+
* @param directive - The HTML Directive to create the observer for.
|
|
299
|
+
* @param subscriber - The subscriber to changes in the binding.
|
|
334
300
|
*/
|
|
335
|
-
|
|
336
|
-
}>;
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* Enables evaluation of and subscription to a binding.
|
|
340
|
-
* @public
|
|
341
|
-
*/
|
|
342
|
-
export declare interface BindingObserver<TSource = any, TReturn = any, TParent = any> extends Notifier, Disposable {
|
|
343
|
-
/**
|
|
344
|
-
* Begins observing the binding for the source and returns the current value.
|
|
345
|
-
* @param source - The source that the binding is based on.
|
|
346
|
-
* @param context - The execution context to execute the binding within.
|
|
347
|
-
* @returns The value of the binding.
|
|
348
|
-
*/
|
|
349
|
-
observe(source: TSource, context?: ExecutionContext<TParent>): TReturn;
|
|
350
|
-
/**
|
|
351
|
-
* Gets {@link ObservationRecord|ObservationRecords} that the {@link BindingObserver}
|
|
352
|
-
* is observing.
|
|
353
|
-
*/
|
|
354
|
-
records(): IterableIterator<ObservationRecord>;
|
|
355
|
-
/**
|
|
356
|
-
* Sets the update mode used by the observer.
|
|
357
|
-
* @param isAsync - Indicates whether updates should be asynchronous.
|
|
358
|
-
* @remarks
|
|
359
|
-
* By default, the update mode is asynchronous, since that provides the best
|
|
360
|
-
* performance for template rendering scenarios. Passing false to setMode will
|
|
361
|
-
* instead cause the observer to notify subscribers immediately when changes occur.
|
|
362
|
-
*/
|
|
363
|
-
setMode(isAsync: boolean): void;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* A {@link ValueConverter} that converts to and from `boolean` values.
|
|
368
|
-
* @remarks
|
|
369
|
-
* Used automatically when the `boolean` {@link AttributeMode} is selected.
|
|
370
|
-
* @public
|
|
371
|
-
*/
|
|
372
|
-
export declare const booleanConverter: ValueConverter;
|
|
373
|
-
|
|
374
|
-
declare const booleanMode = "boolean";
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Represents a callable type such as a function or an object with a "call" method.
|
|
378
|
-
* @public
|
|
379
|
-
*/
|
|
380
|
-
export declare type Callable = typeof Function.prototype.call | {
|
|
381
|
-
call(): void;
|
|
382
|
-
};
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* A marker interface used to capture types when interpolating Directive helpers
|
|
386
|
-
* into templates.
|
|
387
|
-
* @public
|
|
388
|
-
*/
|
|
389
|
-
export declare interface CaptureType<TSource> {
|
|
301
|
+
abstract createObserver(directive: HTMLDirective, subscriber: Subscriber): ExpressionObserver<TSource, TReturn, TParent>;
|
|
390
302
|
}
|
|
391
303
|
|
|
392
304
|
/**
|
|
393
305
|
* A binding behavior for bindings that change.
|
|
394
306
|
* @public
|
|
395
307
|
*/
|
|
396
|
-
export declare class
|
|
397
|
-
|
|
308
|
+
export declare class BindingBehavior implements ViewBehavior {
|
|
309
|
+
readonly directive: HTMLBindingDirective;
|
|
310
|
+
protected updateTarget: UpdateTarget;
|
|
398
311
|
private observerProperty;
|
|
399
312
|
/**
|
|
400
313
|
* Creates an instance of ChangeBinding.
|
|
@@ -402,12 +315,6 @@ export declare class ChangeBinding extends UpdateBinding {
|
|
|
402
315
|
* @param updateTarget - The function used to update the target with the latest value.
|
|
403
316
|
*/
|
|
404
317
|
constructor(directive: HTMLBindingDirective, updateTarget: UpdateTarget);
|
|
405
|
-
/**
|
|
406
|
-
* Returns the binding observer used to update the node.
|
|
407
|
-
* @param target - The target node.
|
|
408
|
-
* @returns A BindingObserver.
|
|
409
|
-
*/
|
|
410
|
-
protected getObserver(target: Node): BindingObserver;
|
|
411
318
|
/**
|
|
412
319
|
* Bind this behavior to the source.
|
|
413
320
|
* @param source - The source to bind to.
|
|
@@ -423,39 +330,43 @@ export declare class ChangeBinding extends UpdateBinding {
|
|
|
423
330
|
*/
|
|
424
331
|
unbind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
|
|
425
332
|
/* Excluded from this release type: handleChange */
|
|
333
|
+
/**
|
|
334
|
+
* Returns the binding observer used to update the node.
|
|
335
|
+
* @param target - The target node.
|
|
336
|
+
* @returns A BindingObserver.
|
|
337
|
+
*/
|
|
338
|
+
protected getObserver(target: Node): ExpressionObserver;
|
|
339
|
+
/**
|
|
340
|
+
* Creates a behavior.
|
|
341
|
+
* @param targets - The targets available for behaviors to be attached to.
|
|
342
|
+
*/
|
|
343
|
+
createBehavior(targets: ViewBehaviorTargets): ViewBehavior;
|
|
426
344
|
}
|
|
427
345
|
|
|
428
346
|
/**
|
|
429
|
-
*
|
|
430
|
-
* @param strings - The string fragments that are interpolated with the values.
|
|
431
|
-
* @param values - The values that are interpolated with the string fragments.
|
|
347
|
+
* A {@link ValueConverter} that converts to and from `boolean` values.
|
|
432
348
|
* @remarks
|
|
433
|
-
*
|
|
434
|
-
* other template instances, and Directive instances.
|
|
349
|
+
* Used automatically when the `boolean` {@link AttributeMode} is selected.
|
|
435
350
|
* @public
|
|
436
351
|
*/
|
|
437
|
-
export declare const
|
|
352
|
+
export declare const booleanConverter: ValueConverter;
|
|
353
|
+
|
|
354
|
+
declare const booleanMode = "boolean";
|
|
438
355
|
|
|
439
356
|
/**
|
|
440
|
-
*
|
|
357
|
+
* Represents a callable type such as a function or an object with a "call" method.
|
|
441
358
|
* @public
|
|
442
359
|
*/
|
|
443
|
-
export declare
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
* Creates a new execution context descent suitable for use in list rendering.
|
|
454
|
-
* @param item - The list item to serve as the source.
|
|
455
|
-
* @param index - The index of the item in the list.
|
|
456
|
-
* @param length - The length of the list.
|
|
457
|
-
*/
|
|
458
|
-
createItemContext(index: number, length: number): ItemContext<TParentSource>;
|
|
360
|
+
export declare type Callable = typeof Function.prototype.call | {
|
|
361
|
+
call(): void;
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* A marker interface used to capture types when interpolating Directive helpers
|
|
366
|
+
* into templates.
|
|
367
|
+
* @public
|
|
368
|
+
*/
|
|
369
|
+
export declare interface CaptureType<TSource> {
|
|
459
370
|
}
|
|
460
371
|
|
|
461
372
|
/**
|
|
@@ -508,18 +419,6 @@ export declare class ChildrenDirective extends NodeObservationDirective<Children
|
|
|
508
419
|
*/
|
|
509
420
|
export declare type ChildrenDirectiveOptions<T = any> = ChildListDirectiveOptions<T> | SubtreeDirectiveOptions<T>;
|
|
510
421
|
|
|
511
|
-
/**
|
|
512
|
-
* A template capable of rendering child views not specifically connected to custom elements.
|
|
513
|
-
* @public
|
|
514
|
-
*/
|
|
515
|
-
export declare interface ChildViewTemplate<TSource = any, TParent = any> {
|
|
516
|
-
type: "child";
|
|
517
|
-
/**
|
|
518
|
-
* Creates a SyntheticView instance based on this template definition.
|
|
519
|
-
*/
|
|
520
|
-
create(): SyntheticView<TSource, TParent, ChildContext<TParent>>;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
422
|
/**
|
|
524
423
|
* A function capable of compiling a template from the preprocessed form produced
|
|
525
424
|
* by the html template function into a result that can instantiate views.
|
|
@@ -559,7 +458,7 @@ export declare const Compiler: {
|
|
|
559
458
|
* it is recommended that you clone the original and pass the clone to this API.
|
|
560
459
|
* @public
|
|
561
460
|
*/
|
|
562
|
-
compile<TSource = any, TParent = any
|
|
461
|
+
compile<TSource = any, TParent = any>(html: string | HTMLTemplateElement, directives: Record<string, ViewBehaviorFactory>): HTMLTemplateCompilationResult<TSource, TParent>;
|
|
563
462
|
/**
|
|
564
463
|
* Sets the default compilation strategy that will be used by the ViewTemplate whenever
|
|
565
464
|
* it needs to compile a view preprocessed with the html template function.
|
|
@@ -581,6 +480,10 @@ export declare const Compiler: {
|
|
|
581
480
|
*/
|
|
582
481
|
export declare type ComposableStyles = string | ElementStyles | CSSStyleSheet;
|
|
583
482
|
|
|
483
|
+
declare function compose<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(this: TType, nameOrDef: string | PartialFASTElementDefinition): FASTElementDefinition<TType>;
|
|
484
|
+
|
|
485
|
+
declare function compose<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition): FASTElementDefinition<TType>;
|
|
486
|
+
|
|
584
487
|
/**
|
|
585
488
|
* Allows for the creation of Constructable mixin classes.
|
|
586
489
|
*
|
|
@@ -602,6 +505,58 @@ export declare type ConstructibleStyleStrategy = {
|
|
|
602
505
|
new (styles: (string | CSSStyleSheet)[]): StyleStrategy;
|
|
603
506
|
};
|
|
604
507
|
|
|
508
|
+
/**
|
|
509
|
+
* A special binding behavior that can bind node content.
|
|
510
|
+
* @public
|
|
511
|
+
*/
|
|
512
|
+
export declare class ContentBehavior extends BindingBehavior {
|
|
513
|
+
/**
|
|
514
|
+
* Unbinds this behavior from the source.
|
|
515
|
+
* @param source - The source to unbind from.
|
|
516
|
+
* @param context - The execution context that the binding is operating within.
|
|
517
|
+
* @param targets - The targets that behaviors in a view can attach to.
|
|
518
|
+
*/
|
|
519
|
+
unbind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* A simple template that can create ContentView instances.
|
|
524
|
+
* @public
|
|
525
|
+
*/
|
|
526
|
+
export declare interface ContentTemplate {
|
|
527
|
+
/**
|
|
528
|
+
* Creates a simple content view instance.
|
|
529
|
+
*/
|
|
530
|
+
create(): ContentView;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* A simple View that can be interpolated into HTML content.
|
|
535
|
+
* @public
|
|
536
|
+
*/
|
|
537
|
+
export declare interface ContentView {
|
|
538
|
+
/**
|
|
539
|
+
* Binds a view's behaviors to its binding source.
|
|
540
|
+
* @param source - The binding source for the view's binding behaviors.
|
|
541
|
+
* @param context - The execution context to run the view within.
|
|
542
|
+
*/
|
|
543
|
+
bind(source: any, context: ExecutionContext): void;
|
|
544
|
+
/**
|
|
545
|
+
* Unbinds a view's behaviors from its binding source and context.
|
|
546
|
+
*/
|
|
547
|
+
unbind(): void;
|
|
548
|
+
/**
|
|
549
|
+
* Inserts the view's DOM nodes before the referenced node.
|
|
550
|
+
* @param node - The node to insert the view's DOM before.
|
|
551
|
+
*/
|
|
552
|
+
insertBefore(node: Node): void;
|
|
553
|
+
/**
|
|
554
|
+
* Removes the view's DOM nodes.
|
|
555
|
+
* The nodes are not disposed and the view can later be re-inserted.
|
|
556
|
+
*/
|
|
557
|
+
remove(): void;
|
|
558
|
+
}
|
|
559
|
+
|
|
605
560
|
/**
|
|
606
561
|
* Controls the lifecycle and rendering of a `FASTElement`.
|
|
607
562
|
* @public
|
|
@@ -821,20 +776,9 @@ export declare function customElement(nameOrDef: string | PartialFASTElementDefi
|
|
|
821
776
|
*/
|
|
822
777
|
export declare type DecoratorAttributeConfiguration = Omit<AttributeConfiguration, "property">;
|
|
823
778
|
|
|
824
|
-
|
|
825
|
-
* The default binding options.
|
|
826
|
-
* @public
|
|
827
|
-
*/
|
|
828
|
-
export declare type DefaultBindingOptions = AddEventListenerOptions;
|
|
779
|
+
declare function define<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(this: TType, nameOrDef: string | PartialFASTElementDefinition): TType;
|
|
829
780
|
|
|
830
|
-
|
|
831
|
-
* The default twoWay binding options.
|
|
832
|
-
* @public
|
|
833
|
-
*/
|
|
834
|
-
export declare type DefaultTwoWayBindingOptions = DefaultBindingOptions & {
|
|
835
|
-
changeEvent?: string;
|
|
836
|
-
fromView?: (value: any) => any;
|
|
837
|
-
};
|
|
781
|
+
declare function define<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition): TType;
|
|
838
782
|
|
|
839
783
|
/**
|
|
840
784
|
* Provides a mechanism for releasing resources.
|
|
@@ -941,6 +885,12 @@ export declare class ElementStyles {
|
|
|
941
885
|
* @param Strategy - The strategy type to construct.
|
|
942
886
|
*/
|
|
943
887
|
static setDefaultStrategy(Strategy: ConstructibleStyleStrategy): void;
|
|
888
|
+
/**
|
|
889
|
+
* Normalizes a set of composable style options.
|
|
890
|
+
* @param styles - The style options to normalize.
|
|
891
|
+
* @returns A singular ElementStyles instance or undefined.
|
|
892
|
+
*/
|
|
893
|
+
static normalize(styles: ComposableStyles | ComposableStyles[] | undefined): ElementStyles | undefined;
|
|
944
894
|
/**
|
|
945
895
|
* Indicates whether the DOM supports the adoptedStyleSheets feature.
|
|
946
896
|
*/
|
|
@@ -951,7 +901,7 @@ export declare class ElementStyles {
|
|
|
951
901
|
* A View representing DOM nodes specifically for rendering the view of a custom element.
|
|
952
902
|
* @public
|
|
953
903
|
*/
|
|
954
|
-
export declare interface ElementView<TSource = any, TParent = any> extends View<TSource, TParent
|
|
904
|
+
export declare interface ElementView<TSource = any, TParent = any> extends View<TSource, TParent> {
|
|
955
905
|
/**
|
|
956
906
|
* Appends the view's DOM nodes to the referenced node.
|
|
957
907
|
* @param node - The parent node to append the view's DOM nodes to.
|
|
@@ -964,7 +914,6 @@ export declare interface ElementView<TSource = any, TParent = any> extends View<
|
|
|
964
914
|
* @public
|
|
965
915
|
*/
|
|
966
916
|
export declare interface ElementViewTemplate<TSource = any, TParent = any> {
|
|
967
|
-
type: "element";
|
|
968
917
|
/**
|
|
969
918
|
* Creates an ElementView instance based on this template definition.
|
|
970
919
|
* @param hostBindingTarget - The element that host behaviors will be bound to.
|
|
@@ -993,7 +942,7 @@ export declare const emptyArray: readonly never[];
|
|
|
993
942
|
* A binding behavior for handling events.
|
|
994
943
|
* @public
|
|
995
944
|
*/
|
|
996
|
-
export declare class
|
|
945
|
+
export declare class EventBehavior {
|
|
997
946
|
readonly directive: HTMLBindingDirective;
|
|
998
947
|
private contextProperty;
|
|
999
948
|
private sourceProperty;
|
|
@@ -1025,24 +974,136 @@ export declare class EventBinding {
|
|
|
1025
974
|
}
|
|
1026
975
|
|
|
1027
976
|
/**
|
|
1028
|
-
*
|
|
977
|
+
* Provides additional contextual information available to behaviors and expressions.
|
|
1029
978
|
* @public
|
|
1030
979
|
*/
|
|
1031
|
-
export declare
|
|
1032
|
-
|
|
980
|
+
export declare class ExecutionContext<TParentSource = any> {
|
|
981
|
+
/**
|
|
982
|
+
* The default execution context.
|
|
983
|
+
*/
|
|
984
|
+
static readonly default: ExecutionContext<any>;
|
|
985
|
+
/**
|
|
986
|
+
* The index of the current item within a repeat context.
|
|
987
|
+
*/
|
|
988
|
+
index: number;
|
|
989
|
+
/**
|
|
990
|
+
* The length of the current collection within a repeat context.
|
|
991
|
+
*/
|
|
992
|
+
length: number;
|
|
993
|
+
/**
|
|
994
|
+
* The parent data source within a nested context.
|
|
995
|
+
*/
|
|
996
|
+
readonly parent: TParentSource;
|
|
997
|
+
/**
|
|
998
|
+
* The parent execution context when in nested context scenarios.
|
|
999
|
+
*/
|
|
1000
|
+
readonly parentContext: ExecutionContext<TParentSource>;
|
|
1001
|
+
private constructor();
|
|
1002
|
+
/**
|
|
1003
|
+
* The current event within an event handler.
|
|
1004
|
+
*/
|
|
1005
|
+
get event(): Event;
|
|
1006
|
+
/**
|
|
1007
|
+
* Indicates whether the current item within a repeat context
|
|
1008
|
+
* has an even index.
|
|
1009
|
+
*/
|
|
1010
|
+
get isEven(): boolean;
|
|
1011
|
+
/**
|
|
1012
|
+
* Indicates whether the current item within a repeat context
|
|
1013
|
+
* has an odd index.
|
|
1014
|
+
*/
|
|
1015
|
+
get isOdd(): boolean;
|
|
1016
|
+
/**
|
|
1017
|
+
* Indicates whether the current item within a repeat context
|
|
1018
|
+
* is the first item in the collection.
|
|
1019
|
+
*/
|
|
1020
|
+
get isFirst(): boolean;
|
|
1021
|
+
/**
|
|
1022
|
+
* Indicates whether the current item within a repeat context
|
|
1023
|
+
* is somewhere in the middle of the collection.
|
|
1024
|
+
*/
|
|
1025
|
+
get isInMiddle(): boolean;
|
|
1026
|
+
/**
|
|
1027
|
+
* Indicates whether the current item within a repeat context
|
|
1028
|
+
* is the last item in the collection.
|
|
1029
|
+
*/
|
|
1030
|
+
get isLast(): boolean;
|
|
1031
|
+
/**
|
|
1032
|
+
* Returns the typed event detail of a custom event.
|
|
1033
|
+
*/
|
|
1034
|
+
eventDetail<TDetail>(): TDetail;
|
|
1035
|
+
/**
|
|
1036
|
+
* Returns the typed event target of the event.
|
|
1037
|
+
*/
|
|
1038
|
+
eventTarget<TTarget extends EventTarget>(): TTarget;
|
|
1039
|
+
/**
|
|
1040
|
+
* Updates the position/size on a context associated with a list item.
|
|
1041
|
+
* @param index - The new index of the item.
|
|
1042
|
+
* @param length - The new length of the list.
|
|
1043
|
+
*/
|
|
1044
|
+
updatePosition(index: number, length: number): void;
|
|
1045
|
+
/**
|
|
1046
|
+
* Creates a new execution context descendent from the current context.
|
|
1047
|
+
* @param source - The source for the context if different than the parent.
|
|
1048
|
+
* @returns A child execution context.
|
|
1049
|
+
*/
|
|
1050
|
+
createChildContext<TParentSource>(parentSource: TParentSource): ExecutionContext<TParentSource>;
|
|
1051
|
+
/**
|
|
1052
|
+
* Creates a new execution context descent suitable for use in list rendering.
|
|
1053
|
+
* @param item - The list item to serve as the source.
|
|
1054
|
+
* @param index - The index of the item in the list.
|
|
1055
|
+
* @param length - The length of the list.
|
|
1056
|
+
*/
|
|
1057
|
+
createItemContext(index: number, length: number): ExecutionContext<TParentSource>;
|
|
1033
1058
|
/* Excluded from this release type: setEvent */
|
|
1034
1059
|
/**
|
|
1035
1060
|
* Creates a new root execution context.
|
|
1036
1061
|
* @returns A new execution context.
|
|
1037
1062
|
*/
|
|
1038
|
-
create():
|
|
1039
|
-
}
|
|
1063
|
+
static create(): ExecutionContext;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* The signature of an arrow function capable of being evaluated
|
|
1068
|
+
* against source data and within an execution context.
|
|
1069
|
+
* @public
|
|
1070
|
+
*/
|
|
1071
|
+
export declare type Expression<TSource = any, TReturn = any, TParent = any> = (source: TSource, context: ExecutionContext<TParent>) => TReturn;
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* Enables evaluation of and subscription to a binding.
|
|
1075
|
+
* @public
|
|
1076
|
+
*/
|
|
1077
|
+
export declare interface ExpressionNotifier<TSource = any, TReturn = any, TParent = any> extends Notifier, ExpressionObserver<TSource, TReturn, TParent> {
|
|
1078
|
+
/**
|
|
1079
|
+
* Gets {@link ObservationRecord|ObservationRecords} that the {@link ExpressionNotifier}
|
|
1080
|
+
* is observing.
|
|
1081
|
+
*/
|
|
1082
|
+
records(): IterableIterator<ObservationRecord>;
|
|
1083
|
+
/**
|
|
1084
|
+
* Sets the update mode used by the observer.
|
|
1085
|
+
* @param isAsync - Indicates whether updates should be asynchronous.
|
|
1086
|
+
* @remarks
|
|
1087
|
+
* By default, the update mode is asynchronous, since that provides the best
|
|
1088
|
+
* performance for template rendering scenarios. Passing false to setMode will
|
|
1089
|
+
* instead cause the observer to notify subscribers immediately when changes occur.
|
|
1090
|
+
*/
|
|
1091
|
+
setMode(isAsync: boolean): void;
|
|
1092
|
+
}
|
|
1040
1093
|
|
|
1041
1094
|
/**
|
|
1042
|
-
*
|
|
1095
|
+
* Observes a binding for changes.
|
|
1096
|
+
*
|
|
1043
1097
|
* @public
|
|
1044
1098
|
*/
|
|
1045
|
-
export declare
|
|
1099
|
+
export declare interface ExpressionObserver<TSource = any, TReturn = any, TParent = any> extends Disposable {
|
|
1100
|
+
/**
|
|
1101
|
+
* Begins observing the binding.
|
|
1102
|
+
* @param source - The source to pass to the binding.
|
|
1103
|
+
* @param context - The context to pass to the binding.
|
|
1104
|
+
*/
|
|
1105
|
+
observe(source: TSource, context?: ExecutionContext<TParent>): TReturn;
|
|
1106
|
+
}
|
|
1046
1107
|
|
|
1047
1108
|
/* Excluded from this release type: FAST */
|
|
1048
1109
|
|
|
@@ -1112,7 +1173,12 @@ export declare const FASTElement: (new () => HTMLElement & FASTElement) & {
|
|
|
1112
1173
|
* @param nameOrDef - The name of the element to define or a definition object
|
|
1113
1174
|
* that describes the element to define.
|
|
1114
1175
|
*/
|
|
1115
|
-
define
|
|
1176
|
+
define: typeof define;
|
|
1177
|
+
/**
|
|
1178
|
+
* Defines metadata for a FASTElement which can be used to later define the element.
|
|
1179
|
+
* @public
|
|
1180
|
+
*/
|
|
1181
|
+
compose: typeof compose;
|
|
1116
1182
|
};
|
|
1117
1183
|
|
|
1118
1184
|
/**
|
|
@@ -1120,7 +1186,7 @@ export declare const FASTElement: (new () => HTMLElement & FASTElement) & {
|
|
|
1120
1186
|
* @public
|
|
1121
1187
|
*/
|
|
1122
1188
|
export declare class FASTElementDefinition<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>> {
|
|
1123
|
-
private
|
|
1189
|
+
private platformDefined;
|
|
1124
1190
|
/**
|
|
1125
1191
|
* The type this element definition describes.
|
|
1126
1192
|
*/
|
|
@@ -1161,18 +1227,21 @@ export declare class FASTElementDefinition<TType extends Constructable<HTMLEleme
|
|
|
1161
1227
|
* Options controlling how the custom element is defined with the platform.
|
|
1162
1228
|
*/
|
|
1163
1229
|
readonly elementOptions?: ElementDefinitionOptions;
|
|
1164
|
-
|
|
1165
|
-
* Creates an instance of FASTElementDefinition.
|
|
1166
|
-
* @param type - The type this definition is being created for.
|
|
1167
|
-
* @param nameOrConfig - The name of the element to define or a config object
|
|
1168
|
-
* that describes the element to define.
|
|
1169
|
-
*/
|
|
1170
|
-
constructor(type: TType, nameOrConfig?: PartialFASTElementDefinition | string);
|
|
1230
|
+
private constructor();
|
|
1171
1231
|
/**
|
|
1172
1232
|
* Defines a custom element based on this definition.
|
|
1173
1233
|
* @param registry - The element registry to define the element in.
|
|
1234
|
+
* @remarks
|
|
1235
|
+
* This operation is idempotent per registry.
|
|
1174
1236
|
*/
|
|
1175
1237
|
define(registry?: CustomElementRegistry): this;
|
|
1238
|
+
/**
|
|
1239
|
+
* Creates an instance of FASTElementDefinition.
|
|
1240
|
+
* @param type - The type this definition is being created for.
|
|
1241
|
+
* @param nameOrDef - The name of the element to define or a config object
|
|
1242
|
+
* that describes the element to define.
|
|
1243
|
+
*/
|
|
1244
|
+
static compose<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition): FASTElementDefinition<TType>;
|
|
1176
1245
|
/**
|
|
1177
1246
|
* Gets the element definition associated with the specified type.
|
|
1178
1247
|
* @param type - The custom element type to retrieve the definition for.
|
|
@@ -1196,16 +1265,14 @@ export declare class FASTElementDefinition<TType extends Constructable<HTMLEleme
|
|
|
1196
1265
|
* other template instances, and Directive instances.
|
|
1197
1266
|
* @public
|
|
1198
1267
|
*/
|
|
1199
|
-
export declare function html<TSource = any, TParent = any
|
|
1268
|
+
export declare function html<TSource = any, TParent = any>(strings: TemplateStringsArray, ...values: TemplateValue<TSource, TParent>[]): ViewTemplate<TSource, TParent>;
|
|
1200
1269
|
|
|
1201
1270
|
/**
|
|
1202
1271
|
* A directive that applies bindings.
|
|
1203
1272
|
* @public
|
|
1204
1273
|
*/
|
|
1205
1274
|
export declare class HTMLBindingDirective implements HTMLDirective, ViewBehaviorFactory, Aspected {
|
|
1206
|
-
|
|
1207
|
-
mode: BindingMode;
|
|
1208
|
-
options: any;
|
|
1275
|
+
dataBinding: Binding;
|
|
1209
1276
|
private factory;
|
|
1210
1277
|
/**
|
|
1211
1278
|
* The unique id of the factory.
|
|
@@ -1229,11 +1296,9 @@ export declare class HTMLBindingDirective implements HTMLDirective, ViewBehavior
|
|
|
1229
1296
|
aspectType: Aspect;
|
|
1230
1297
|
/**
|
|
1231
1298
|
* Creates an instance of HTMLBindingDirective.
|
|
1232
|
-
* @param
|
|
1233
|
-
* @param mode - The binding mode to use when applying the binding.
|
|
1234
|
-
* @param options - The options to configure the binding with.
|
|
1299
|
+
* @param dataBinding - The binding configuration to apply.
|
|
1235
1300
|
*/
|
|
1236
|
-
constructor(
|
|
1301
|
+
constructor(dataBinding: Binding);
|
|
1237
1302
|
/**
|
|
1238
1303
|
* Creates HTML to be used within a template.
|
|
1239
1304
|
* @param add - Can be used to add behavior factories to a template.
|
|
@@ -1303,19 +1368,19 @@ export declare interface HTMLDirectiveDefinition<TType extends Constructable<HTM
|
|
|
1303
1368
|
* The result of a template compilation operation.
|
|
1304
1369
|
* @public
|
|
1305
1370
|
*/
|
|
1306
|
-
export declare interface HTMLTemplateCompilationResult<TSource = any, TParent = any
|
|
1371
|
+
export declare interface HTMLTemplateCompilationResult<TSource = any, TParent = any> {
|
|
1307
1372
|
/**
|
|
1308
1373
|
* Creates a view instance.
|
|
1309
1374
|
* @param hostBindingTarget - The host binding target for the view.
|
|
1310
1375
|
*/
|
|
1311
|
-
createView(hostBindingTarget?: Element): HTMLView<TSource, TParent
|
|
1376
|
+
createView(hostBindingTarget?: Element): HTMLView<TSource, TParent>;
|
|
1312
1377
|
}
|
|
1313
1378
|
|
|
1314
1379
|
/**
|
|
1315
1380
|
* The standard View implementation, which also implements ElementView and SyntheticView.
|
|
1316
1381
|
* @public
|
|
1317
1382
|
*/
|
|
1318
|
-
export declare class HTMLView<TSource = any, TParent = any
|
|
1383
|
+
export declare class HTMLView<TSource = any, TParent = any> implements ElementView<TSource, TParent>, SyntheticView<TSource, TParent> {
|
|
1319
1384
|
private fragment;
|
|
1320
1385
|
private factories;
|
|
1321
1386
|
private targets;
|
|
@@ -1327,7 +1392,7 @@ export declare class HTMLView<TSource = any, TParent = any, TContext extends Exe
|
|
|
1327
1392
|
/**
|
|
1328
1393
|
* The execution context the view is running within.
|
|
1329
1394
|
*/
|
|
1330
|
-
context:
|
|
1395
|
+
context: ExecutionContext<TParent> | null;
|
|
1331
1396
|
/**
|
|
1332
1397
|
* The first DOM node in the range of nodes that make up the view.
|
|
1333
1398
|
*/
|
|
@@ -1367,7 +1432,7 @@ export declare class HTMLView<TSource = any, TParent = any, TContext extends Exe
|
|
|
1367
1432
|
* @param source - The binding source for the view's binding behaviors.
|
|
1368
1433
|
* @param context - The execution context to run the behaviors within.
|
|
1369
1434
|
*/
|
|
1370
|
-
bind(source: TSource, context:
|
|
1435
|
+
bind(source: TSource, context: ExecutionContext<TParent>): void;
|
|
1371
1436
|
/**
|
|
1372
1437
|
* Unbinds a view's behaviors from its binding source.
|
|
1373
1438
|
*/
|
|
@@ -1380,72 +1445,14 @@ export declare class HTMLView<TSource = any, TParent = any, TContext extends Exe
|
|
|
1380
1445
|
}
|
|
1381
1446
|
|
|
1382
1447
|
/**
|
|
1383
|
-
*
|
|
1384
|
-
* @param strings - The string fragments that are interpolated with the values.
|
|
1385
|
-
* @param values - The values that are interpolated with the string fragments.
|
|
1386
|
-
* @remarks
|
|
1387
|
-
* The html helper supports interpolation of strings, numbers, binding expressions,
|
|
1388
|
-
* other template instances, and Directive instances.
|
|
1389
|
-
* @public
|
|
1390
|
-
*/
|
|
1391
|
-
export declare const item: <TItem = any, TParent = any>(strings: TemplateStringsArray, ...values: TemplateValue<TItem, TParent, ItemContext<TParent>>[]) => ItemViewTemplate<TItem, TParent>;
|
|
1392
|
-
|
|
1393
|
-
/**
|
|
1394
|
-
* Provides additional contextual information when inside a repeat item template.s
|
|
1395
|
-
* @public
|
|
1396
|
-
*/
|
|
1397
|
-
export declare interface ItemContext<TParentSource = any> extends ChildContext<TParentSource> {
|
|
1398
|
-
/**
|
|
1399
|
-
* The index of the current item within a repeat context.
|
|
1400
|
-
*/
|
|
1401
|
-
readonly index: number;
|
|
1402
|
-
/**
|
|
1403
|
-
* The length of the current collection within a repeat context.
|
|
1404
|
-
*/
|
|
1405
|
-
readonly length: number;
|
|
1406
|
-
/**
|
|
1407
|
-
* Indicates whether the current item within a repeat context
|
|
1408
|
-
* has an even index.
|
|
1409
|
-
*/
|
|
1410
|
-
readonly isEven: boolean;
|
|
1411
|
-
/**
|
|
1412
|
-
* Indicates whether the current item within a repeat context
|
|
1413
|
-
* has an odd index.
|
|
1414
|
-
*/
|
|
1415
|
-
readonly isOdd: boolean;
|
|
1416
|
-
/**
|
|
1417
|
-
* Indicates whether the current item within a repeat context
|
|
1418
|
-
* is the first item in the collection.
|
|
1419
|
-
*/
|
|
1420
|
-
readonly isFirst: boolean;
|
|
1421
|
-
/**
|
|
1422
|
-
* Indicates whether the current item within a repeat context
|
|
1423
|
-
* is somewhere in the middle of the collection.
|
|
1424
|
-
*/
|
|
1425
|
-
readonly isInMiddle: boolean;
|
|
1426
|
-
/**
|
|
1427
|
-
* Indicates whether the current item within a repeat context
|
|
1428
|
-
* is the last item in the collection.
|
|
1429
|
-
*/
|
|
1430
|
-
readonly isLast: boolean;
|
|
1431
|
-
/**
|
|
1432
|
-
* Updates the position/size on a context associated with a list item.
|
|
1433
|
-
* @param index - The new index of the item.
|
|
1434
|
-
* @param length - The new length of the list.
|
|
1435
|
-
*/
|
|
1436
|
-
updatePosition(index: number, length: number): void;
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
/**
|
|
1440
|
-
* A template capable of rendering item views not specifically connected to custom elements.
|
|
1448
|
+
* Observes array lengths.
|
|
1441
1449
|
* @public
|
|
1442
1450
|
*/
|
|
1443
|
-
export declare interface
|
|
1444
|
-
type: "item";
|
|
1451
|
+
export declare interface LengthObserver extends Subscriber {
|
|
1445
1452
|
/**
|
|
1446
|
-
*
|
|
1453
|
+
* The length of the observed array.
|
|
1447
1454
|
*/
|
|
1448
|
-
|
|
1455
|
+
length: number;
|
|
1449
1456
|
}
|
|
1450
1457
|
|
|
1451
1458
|
/**
|
|
@@ -1454,19 +1461,16 @@ export declare interface ItemViewTemplate<TSource = any, TParent = any> {
|
|
|
1454
1461
|
* @returns The length of the array.
|
|
1455
1462
|
* @public
|
|
1456
1463
|
*/
|
|
1457
|
-
declare function
|
|
1458
|
-
export { length_2 as length }
|
|
1464
|
+
export declare function lengthOf<T>(array: readonly T[]): number;
|
|
1459
1465
|
|
|
1460
1466
|
/**
|
|
1461
|
-
*
|
|
1467
|
+
* Creates an event listener binding.
|
|
1468
|
+
* @param binding - The binding to invoke when the event is raised.
|
|
1469
|
+
* @param options - Event listener options.
|
|
1470
|
+
* @returns A binding configuration.
|
|
1462
1471
|
* @public
|
|
1463
1472
|
*/
|
|
1464
|
-
export declare
|
|
1465
|
-
/**
|
|
1466
|
-
* The length of the observed array.
|
|
1467
|
-
*/
|
|
1468
|
-
length: number;
|
|
1469
|
-
}
|
|
1473
|
+
export declare function listener<T = any>(binding: Expression<T>, options?: AddEventListenerOptions): Binding<T>;
|
|
1470
1474
|
|
|
1471
1475
|
/**
|
|
1472
1476
|
* Common APIs related to markup generation.
|
|
@@ -1579,6 +1583,14 @@ export declare abstract class NodeObservationDirective<T extends NodeBehaviorOpt
|
|
|
1579
1583
|
protected abstract getNodes(target: any): Node[];
|
|
1580
1584
|
}
|
|
1581
1585
|
|
|
1586
|
+
/**
|
|
1587
|
+
* Normalizes the input value into a binding.
|
|
1588
|
+
* @param value - The value to create the default binding for.
|
|
1589
|
+
* @returns A binding configuration for the provided value.
|
|
1590
|
+
* @public
|
|
1591
|
+
*/
|
|
1592
|
+
export declare function normalizeBinding<TSource = any, TReturn = any, TParent = any>(value: Expression<TSource, TReturn, TParent> | Binding<TSource, TReturn, TParent> | {}): Binding<TSource, TReturn, TParent>;
|
|
1593
|
+
|
|
1582
1594
|
/**
|
|
1583
1595
|
* Provides change notifications for an observed subject.
|
|
1584
1596
|
* @public
|
|
@@ -1665,19 +1677,19 @@ export declare const Observable: Readonly<{
|
|
|
1665
1677
|
*/
|
|
1666
1678
|
getAccessors: (target: {}) => Accessor[];
|
|
1667
1679
|
/**
|
|
1668
|
-
* Creates a {@link
|
|
1669
|
-
* provided {@link
|
|
1680
|
+
* Creates a {@link ExpressionNotifier} that can watch the
|
|
1681
|
+
* provided {@link Expression} for changes.
|
|
1670
1682
|
* @param binding - The binding to observe.
|
|
1671
1683
|
* @param initialSubscriber - An initial subscriber to changes in the binding value.
|
|
1672
1684
|
* @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.
|
|
1673
1685
|
*/
|
|
1674
|
-
binding<TSource = any, TReturn = any>(binding:
|
|
1686
|
+
binding<TSource = any, TReturn = any>(binding: Expression<TSource, TReturn, any>, initialSubscriber?: Subscriber, isVolatileBinding?: boolean): ExpressionNotifier<TSource, TReturn, any>;
|
|
1675
1687
|
/**
|
|
1676
1688
|
* Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated
|
|
1677
1689
|
* on every evaluation of the value.
|
|
1678
1690
|
* @param binding - The binding to inspect.
|
|
1679
1691
|
*/
|
|
1680
|
-
isVolatileBinding<TSource_1 = any, TReturn_1 = any>(binding:
|
|
1692
|
+
isVolatileBinding<TSource_1 = any, TReturn_1 = any>(binding: Expression<TSource_1, TReturn_1, any>): boolean;
|
|
1681
1693
|
}>;
|
|
1682
1694
|
|
|
1683
1695
|
/**
|
|
@@ -1704,30 +1716,12 @@ export declare interface ObservationRecord {
|
|
|
1704
1716
|
}
|
|
1705
1717
|
|
|
1706
1718
|
/**
|
|
1707
|
-
*
|
|
1708
|
-
* @
|
|
1709
|
-
|
|
1710
|
-
export declare const onChange: BindingConfig<AddEventListenerOptions> & BindingConfigResolver<AddEventListenerOptions>;
|
|
1711
|
-
|
|
1712
|
-
/**
|
|
1713
|
-
* The default onTime binding configuration.
|
|
1719
|
+
* Creates a one time binding
|
|
1720
|
+
* @param binding - The binding to refresh when signaled.
|
|
1721
|
+
* @returns A binding configuration.
|
|
1714
1722
|
* @public
|
|
1715
1723
|
*/
|
|
1716
|
-
export declare
|
|
1717
|
-
|
|
1718
|
-
/**
|
|
1719
|
-
* A binding behavior for one-time bindings.
|
|
1720
|
-
* @public
|
|
1721
|
-
*/
|
|
1722
|
-
export declare class OneTimeBinding extends UpdateBinding {
|
|
1723
|
-
/**
|
|
1724
|
-
* Bind this behavior to the source.
|
|
1725
|
-
* @param source - The source to bind to.
|
|
1726
|
-
* @param context - The execution context that the binding is operating within.
|
|
1727
|
-
* @param targets - The targets that behaviors in a view can attach to.
|
|
1728
|
-
*/
|
|
1729
|
-
bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
|
|
1730
|
-
}
|
|
1724
|
+
export declare function oneTime<T = any>(binding: Expression<T>): Binding<T>;
|
|
1731
1725
|
|
|
1732
1726
|
/**
|
|
1733
1727
|
* Common APIs related to content parsing.
|
|
@@ -1854,71 +1848,21 @@ declare const reflectMode = "reflect";
|
|
|
1854
1848
|
|
|
1855
1849
|
/**
|
|
1856
1850
|
* A directive that enables list rendering.
|
|
1857
|
-
* @param
|
|
1858
|
-
* @param
|
|
1851
|
+
* @param items - The array to render.
|
|
1852
|
+
* @param template - The template or a template binding used obtain a template
|
|
1859
1853
|
* to render for each item in the array.
|
|
1860
1854
|
* @param options - Options used to turn on special repeat features.
|
|
1861
1855
|
* @public
|
|
1862
1856
|
*/
|
|
1863
|
-
export declare function repeat<TSource = any, TArray extends ReadonlyArray<any> = ReadonlyArray<any>>(
|
|
1864
|
-
positioning: false;
|
|
1865
|
-
} | {
|
|
1866
|
-
recycle: true;
|
|
1867
|
-
} | {
|
|
1868
|
-
positioning: false;
|
|
1869
|
-
recycle: false;
|
|
1870
|
-
} | {
|
|
1871
|
-
positioning: false;
|
|
1872
|
-
recycle: true;
|
|
1873
|
-
}): CaptureType<TSource>;
|
|
1874
|
-
|
|
1875
|
-
/**
|
|
1876
|
-
* A directive that enables list rendering.
|
|
1877
|
-
* @param itemsBinding - The array to render.
|
|
1878
|
-
* @param templateOrTemplateBinding - The template or a template binding used obtain a template
|
|
1879
|
-
* to render for each item in the array.
|
|
1880
|
-
* @param options - Options used to turn on special repeat features.
|
|
1881
|
-
* @public
|
|
1882
|
-
*/
|
|
1883
|
-
export declare function repeat<TSource = any, TArray extends ReadonlyArray<any> = ReadonlyArray<any>>(itemsBinding: Binding<TSource, TArray, ExecutionContext<TSource>>, templateOrTemplateBinding: ChildViewTemplate | Binding<TSource, ChildViewTemplate, ChildContext>, options?: {
|
|
1884
|
-
positioning: false;
|
|
1885
|
-
} | {
|
|
1886
|
-
recycle: true;
|
|
1887
|
-
} | {
|
|
1888
|
-
positioning: false;
|
|
1889
|
-
recycle: false;
|
|
1890
|
-
} | {
|
|
1891
|
-
positioning: false;
|
|
1892
|
-
recycle: true;
|
|
1893
|
-
}): CaptureType<TSource>;
|
|
1894
|
-
|
|
1895
|
-
/**
|
|
1896
|
-
* A directive that enables list rendering.
|
|
1897
|
-
* @param itemsBinding - The array to render.
|
|
1898
|
-
* @param templateOrTemplateBinding - The template or a template binding used obtain a template
|
|
1899
|
-
* to render for each item in the array.
|
|
1900
|
-
* @param options - Options used to turn on special repeat features.
|
|
1901
|
-
* @public
|
|
1902
|
-
*/
|
|
1903
|
-
export declare function repeat<TSource = any, TArray extends ReadonlyArray<any> = ReadonlyArray<any>>(itemsBinding: Binding<TSource, TArray, ExecutionContext<TSource>>, templateOrTemplateBinding: ItemViewTemplate | Binding<TSource, ItemViewTemplate, ItemContext>, options: {
|
|
1904
|
-
positioning: true;
|
|
1905
|
-
} | {
|
|
1906
|
-
positioning: true;
|
|
1907
|
-
recycle: true;
|
|
1908
|
-
} | {
|
|
1909
|
-
positioning: true;
|
|
1910
|
-
recycle: false;
|
|
1911
|
-
}): CaptureType<TSource>;
|
|
1857
|
+
export declare function repeat<TSource = any, TArray extends ReadonlyArray<any> = ReadonlyArray<any>>(items: Expression<TSource, TArray, ExecutionContext<TSource>> | Binding<TSource, TArray> | ReadonlyArray<any>, template: Expression<TSource, ViewTemplate> | Binding<TSource, ViewTemplate> | ViewTemplate, options?: RepeatOptions): CaptureType<TSource>;
|
|
1912
1858
|
|
|
1913
1859
|
/**
|
|
1914
1860
|
* A behavior that renders a template for each item in an array.
|
|
1915
1861
|
* @public
|
|
1916
1862
|
*/
|
|
1917
1863
|
export declare class RepeatBehavior<TSource = any> implements Behavior, Subscriber {
|
|
1864
|
+
private directive;
|
|
1918
1865
|
private location;
|
|
1919
|
-
private itemsBinding;
|
|
1920
|
-
private templateBinding;
|
|
1921
|
-
private options;
|
|
1922
1866
|
private source;
|
|
1923
1867
|
private views;
|
|
1924
1868
|
private template;
|
|
@@ -1932,13 +1876,13 @@ export declare class RepeatBehavior<TSource = any> implements Behavior, Subscrib
|
|
|
1932
1876
|
/**
|
|
1933
1877
|
* Creates an instance of RepeatBehavior.
|
|
1934
1878
|
* @param location - The location in the DOM to render the repeat.
|
|
1935
|
-
* @param
|
|
1879
|
+
* @param dataBinding - The array to render.
|
|
1936
1880
|
* @param isItemsBindingVolatile - Indicates whether the items binding has volatile dependencies.
|
|
1937
1881
|
* @param templateBinding - The template to render for each item.
|
|
1938
1882
|
* @param isTemplateBindingVolatile - Indicates whether the template binding has volatile dependencies.
|
|
1939
1883
|
* @param options - Options used to turn on special repeat features.
|
|
1940
1884
|
*/
|
|
1941
|
-
constructor(
|
|
1885
|
+
constructor(directive: RepeatDirective, location: Node);
|
|
1942
1886
|
/**
|
|
1943
1887
|
* Bind this behavior to the source.
|
|
1944
1888
|
* @param source - The source to bind to.
|
|
@@ -1955,7 +1899,7 @@ export declare class RepeatBehavior<TSource = any> implements Behavior, Subscrib
|
|
|
1955
1899
|
* @param source - The source of the change.
|
|
1956
1900
|
* @param args - The details about what was changed.
|
|
1957
1901
|
*/
|
|
1958
|
-
handleChange(source: any, args: Splice[]): void;
|
|
1902
|
+
handleChange(source: any, args: Splice[] | ExpressionObserver): void;
|
|
1959
1903
|
private observeItems;
|
|
1960
1904
|
private updateViews;
|
|
1961
1905
|
private refreshAllViews;
|
|
@@ -1967,11 +1911,9 @@ export declare class RepeatBehavior<TSource = any> implements Behavior, Subscrib
|
|
|
1967
1911
|
* @public
|
|
1968
1912
|
*/
|
|
1969
1913
|
export declare class RepeatDirective<TSource = any> implements HTMLDirective, ViewBehaviorFactory {
|
|
1970
|
-
readonly
|
|
1914
|
+
readonly dataBinding: Binding<TSource>;
|
|
1971
1915
|
readonly templateBinding: Binding<TSource, SyntheticViewTemplate>;
|
|
1972
1916
|
readonly options: RepeatOptions;
|
|
1973
|
-
private isItemsBindingVolatile;
|
|
1974
|
-
private isTemplateBindingVolatile;
|
|
1975
1917
|
/**
|
|
1976
1918
|
* The unique id of the factory.
|
|
1977
1919
|
*/
|
|
@@ -1987,11 +1929,11 @@ export declare class RepeatDirective<TSource = any> implements HTMLDirective, Vi
|
|
|
1987
1929
|
createHTML(add: AddViewBehaviorFactory): string;
|
|
1988
1930
|
/**
|
|
1989
1931
|
* Creates an instance of RepeatDirective.
|
|
1990
|
-
* @param
|
|
1932
|
+
* @param dataBinding - The binding that provides the array to render.
|
|
1991
1933
|
* @param templateBinding - The template binding used to obtain a template to render for each item in the array.
|
|
1992
1934
|
* @param options - Options used to turn on special repeat features.
|
|
1993
1935
|
*/
|
|
1994
|
-
constructor(
|
|
1936
|
+
constructor(dataBinding: Binding<TSource>, templateBinding: Binding<TSource, SyntheticViewTemplate>, options: RepeatOptions);
|
|
1995
1937
|
/**
|
|
1996
1938
|
* Creates a behavior for the provided target node.
|
|
1997
1939
|
* @param target - The node instance to create the behavior for.
|
|
@@ -2014,68 +1956,6 @@ export declare interface RepeatOptions {
|
|
|
2014
1956
|
recycle?: boolean;
|
|
2015
1957
|
}
|
|
2016
1958
|
|
|
2017
|
-
/**
|
|
2018
|
-
* Provides additional contextual information available to behaviors and expressions.
|
|
2019
|
-
* @public
|
|
2020
|
-
*/
|
|
2021
|
-
export declare interface RootContext {
|
|
2022
|
-
/**
|
|
2023
|
-
* The current event within an event handler.
|
|
2024
|
-
*/
|
|
2025
|
-
readonly event: Event;
|
|
2026
|
-
/**
|
|
2027
|
-
* Returns the typed event detail of a custom event.
|
|
2028
|
-
*/
|
|
2029
|
-
eventDetail<TDetail = any>(): TDetail;
|
|
2030
|
-
/**
|
|
2031
|
-
* Returns the typed event target of the event.
|
|
2032
|
-
*/
|
|
2033
|
-
eventTarget<TTarget extends EventTarget = EventTarget>(): TTarget;
|
|
2034
|
-
/**
|
|
2035
|
-
* Creates a new execution context descendent from the current context.
|
|
2036
|
-
* @param source - The source for the context if different than the parent.
|
|
2037
|
-
* @returns A child execution context.
|
|
2038
|
-
*/
|
|
2039
|
-
createChildContext<TParentSource>(source: TParentSource): ChildContext<TParentSource>;
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
/**
|
|
2043
|
-
* Creates a signal binding configuration with the supplied options.
|
|
2044
|
-
* @param options - The signal name or a binding to use to retrieve the signal name.
|
|
2045
|
-
* @returns A binding configuration.
|
|
2046
|
-
* @public
|
|
2047
|
-
*/
|
|
2048
|
-
export declare const signal: <T = any>(options: string | Binding<T, any, ExecutionContext<any>>) => BindingConfig<string | Binding<T, any, ExecutionContext<any>>>;
|
|
2049
|
-
|
|
2050
|
-
/**
|
|
2051
|
-
* A binding behavior for signal bindings.
|
|
2052
|
-
* @public
|
|
2053
|
-
*/
|
|
2054
|
-
export declare class SignalBinding extends UpdateBinding {
|
|
2055
|
-
private handlerProperty;
|
|
2056
|
-
/**
|
|
2057
|
-
* Bind this behavior to the source.
|
|
2058
|
-
* @param source - The source to bind to.
|
|
2059
|
-
* @param context - The execution context that the binding is operating within.
|
|
2060
|
-
* @param targets - The targets that behaviors in a view can attach to.
|
|
2061
|
-
*/
|
|
2062
|
-
bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
|
|
2063
|
-
/**
|
|
2064
|
-
* Unbinds this behavior from the source.
|
|
2065
|
-
* @param source - The source to unbind from.
|
|
2066
|
-
* @param context - The execution context that the binding is operating within.
|
|
2067
|
-
* @param targets - The targets that behaviors in a view can attach to.
|
|
2068
|
-
*/
|
|
2069
|
-
unbind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
|
|
2070
|
-
private getSignal;
|
|
2071
|
-
/**
|
|
2072
|
-
* Sends the specified signal to signaled bindings.
|
|
2073
|
-
* @param signal - The signal to send.
|
|
2074
|
-
* @public
|
|
2075
|
-
*/
|
|
2076
|
-
static send(signal: string): void;
|
|
2077
|
-
}
|
|
2078
|
-
|
|
2079
1959
|
/**
|
|
2080
1960
|
* A directive that observes the `assignedNodes()` of a slot and updates a property
|
|
2081
1961
|
* whenever they change.
|
|
@@ -2435,7 +2315,7 @@ export declare interface SubtreeDirectiveOptions<T = any> extends NodeBehaviorOp
|
|
|
2435
2315
|
* A view representing a range of DOM nodes which can be added/removed ad hoc.
|
|
2436
2316
|
* @public
|
|
2437
2317
|
*/
|
|
2438
|
-
export declare interface SyntheticView<TSource = any, TParent = any
|
|
2318
|
+
export declare interface SyntheticView<TSource = any, TParent = any> extends View<TSource, TParent> {
|
|
2439
2319
|
/**
|
|
2440
2320
|
* The first DOM node in the range of nodes that make up the view.
|
|
2441
2321
|
*/
|
|
@@ -2460,19 +2340,18 @@ export declare interface SyntheticView<TSource = any, TParent = any, TContext ex
|
|
|
2460
2340
|
* A template capable of rendering views not specifically connected to custom elements.
|
|
2461
2341
|
* @public
|
|
2462
2342
|
*/
|
|
2463
|
-
export declare interface SyntheticViewTemplate<TSource = any, TParent = any
|
|
2464
|
-
type: "synthetic";
|
|
2343
|
+
export declare interface SyntheticViewTemplate<TSource = any, TParent = any> {
|
|
2465
2344
|
/**
|
|
2466
2345
|
* Creates a SyntheticView instance based on this template definition.
|
|
2467
2346
|
*/
|
|
2468
|
-
create(): SyntheticView<TSource, TParent
|
|
2347
|
+
create(): SyntheticView<TSource, TParent>;
|
|
2469
2348
|
}
|
|
2470
2349
|
|
|
2471
2350
|
/**
|
|
2472
2351
|
* Represents the types of values that can be interpolated into a template.
|
|
2473
2352
|
* @public
|
|
2474
2353
|
*/
|
|
2475
|
-
export declare type TemplateValue<TSource, TParent = any
|
|
2354
|
+
export declare type TemplateValue<TSource, TParent = any> = Expression<TSource, any, TParent> | Binding<TSource, any, TParent> | HTMLDirective | CaptureType<TSource>;
|
|
2476
2355
|
|
|
2477
2356
|
/**
|
|
2478
2357
|
* Enables working with trusted types.
|
|
@@ -2499,91 +2378,10 @@ export declare type TrustedTypesPolicy = {
|
|
|
2499
2378
|
createHTML(html: string): string;
|
|
2500
2379
|
};
|
|
2501
2380
|
|
|
2502
|
-
/**
|
|
2503
|
-
* The default twoWay binding configuration.
|
|
2504
|
-
* @public
|
|
2505
|
-
*/
|
|
2506
|
-
export declare const twoWay: BindingConfig<DefaultTwoWayBindingOptions> & BindingConfigResolver<DefaultTwoWayBindingOptions>;
|
|
2507
|
-
|
|
2508
|
-
/**
|
|
2509
|
-
* A binding behavior for bindings that update in two directions.
|
|
2510
|
-
* @public
|
|
2511
|
-
*/
|
|
2512
|
-
export declare class TwoWayBinding extends ChangeBinding {
|
|
2513
|
-
private changeEvent;
|
|
2514
|
-
/**
|
|
2515
|
-
* Bind this behavior to the source.
|
|
2516
|
-
* @param source - The source to bind to.
|
|
2517
|
-
* @param context - The execution context that the binding is operating within.
|
|
2518
|
-
* @param targets - The targets that behaviors in a view can attach to.
|
|
2519
|
-
*/
|
|
2520
|
-
bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
|
|
2521
|
-
/**
|
|
2522
|
-
* Unbinds this behavior from the source.
|
|
2523
|
-
* @param source - The source to unbind from.
|
|
2524
|
-
* @param context - The execution context that the binding is operating within.
|
|
2525
|
-
* @param targets - The targets that behaviors in a view can attach to.
|
|
2526
|
-
*/
|
|
2527
|
-
unbind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
|
|
2528
|
-
/* Excluded from this release type: handleEvent */
|
|
2529
|
-
/**
|
|
2530
|
-
* Configures two-way binding.
|
|
2531
|
-
* @param settings - The settings to use for the two-way binding system.
|
|
2532
|
-
*/
|
|
2533
|
-
static configure(settings: TwoWaySettings): void;
|
|
2534
|
-
}
|
|
2535
|
-
|
|
2536
|
-
/**
|
|
2537
|
-
* The settings required to enable two-way binding.
|
|
2538
|
-
* @public
|
|
2539
|
-
*/
|
|
2540
|
-
export declare interface TwoWaySettings {
|
|
2541
|
-
/**
|
|
2542
|
-
* Determines which event to listen to, to detect changes in the view.
|
|
2543
|
-
* @param directive - The directive to determine the change event for.
|
|
2544
|
-
* @param target - The target element to determine the change event for.
|
|
2545
|
-
*/
|
|
2546
|
-
determineChangeEvent(directive: HTMLBindingDirective, target: HTMLElement): string;
|
|
2547
|
-
}
|
|
2548
|
-
|
|
2549
2381
|
/* Excluded from this release type: TypeDefinition */
|
|
2550
2382
|
|
|
2551
2383
|
/* Excluded from this release type: TypeRegistry */
|
|
2552
2384
|
|
|
2553
|
-
/**
|
|
2554
|
-
* A base binding behavior for DOM updates.
|
|
2555
|
-
* @public
|
|
2556
|
-
*/
|
|
2557
|
-
export declare class UpdateBinding implements ViewBehavior {
|
|
2558
|
-
readonly directive: HTMLBindingDirective;
|
|
2559
|
-
protected updateTarget: UpdateTarget;
|
|
2560
|
-
/**
|
|
2561
|
-
* Creates an instance of UpdateBinding.
|
|
2562
|
-
* @param directive - The directive that has the configuration for this behavior.
|
|
2563
|
-
* @param updateTarget - The function used to update the target with the latest value.
|
|
2564
|
-
*/
|
|
2565
|
-
constructor(directive: HTMLBindingDirective, updateTarget: UpdateTarget);
|
|
2566
|
-
/**
|
|
2567
|
-
* Bind this behavior to the source.
|
|
2568
|
-
* @param source - The source to bind to.
|
|
2569
|
-
* @param context - The execution context that the binding is operating within.
|
|
2570
|
-
* @param targets - The targets that behaviors in a view can attach to.
|
|
2571
|
-
*/
|
|
2572
|
-
bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
|
|
2573
|
-
/**
|
|
2574
|
-
* Unbinds this behavior from the source.
|
|
2575
|
-
* @param source - The source to unbind from.
|
|
2576
|
-
* @param context - The execution context that the binding is operating within.
|
|
2577
|
-
* @param targets - The targets that behaviors in a view can attach to.
|
|
2578
|
-
*/
|
|
2579
|
-
unbind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
|
|
2580
|
-
/**
|
|
2581
|
-
* Creates a behavior.
|
|
2582
|
-
* @param targets - The targets available for behaviors to be attached to.
|
|
2583
|
-
*/
|
|
2584
|
-
createBehavior(targets: ViewBehaviorTargets): ViewBehavior;
|
|
2585
|
-
}
|
|
2586
|
-
|
|
2587
2385
|
/**
|
|
2588
2386
|
* A work queue used to synchronize writes to the DOM.
|
|
2589
2387
|
* @public
|
|
@@ -2670,11 +2468,11 @@ export declare interface ValueConverter {
|
|
|
2670
2468
|
* Represents a collection of DOM nodes which can be bound to a data source.
|
|
2671
2469
|
* @public
|
|
2672
2470
|
*/
|
|
2673
|
-
export declare interface View<TSource = any, TParent = any
|
|
2471
|
+
export declare interface View<TSource = any, TParent = any> extends Disposable {
|
|
2674
2472
|
/**
|
|
2675
2473
|
* The execution context the view is running within.
|
|
2676
2474
|
*/
|
|
2677
|
-
readonly context:
|
|
2475
|
+
readonly context: ExecutionContext<TParent> | null;
|
|
2678
2476
|
/**
|
|
2679
2477
|
* The data that the view is bound to.
|
|
2680
2478
|
*/
|
|
@@ -2684,7 +2482,7 @@ export declare interface View<TSource = any, TParent = any, TContext extends Exe
|
|
|
2684
2482
|
* @param source - The binding source for the view's binding behaviors.
|
|
2685
2483
|
* @param context - The execution context to run the view within.
|
|
2686
2484
|
*/
|
|
2687
|
-
bind(source: TSource, context:
|
|
2485
|
+
bind(source: TSource, context: ExecutionContext<TParent>): void;
|
|
2688
2486
|
/**
|
|
2689
2487
|
* Unbinds a view's behaviors from its binding source and context.
|
|
2690
2488
|
*/
|
|
@@ -2745,13 +2543,8 @@ export declare type ViewBehaviorTargets = {
|
|
|
2745
2543
|
* A template capable of creating HTMLView instances or rendering directly to DOM.
|
|
2746
2544
|
* @public
|
|
2747
2545
|
*/
|
|
2748
|
-
export declare class ViewTemplate<TSource = any, TParent = any
|
|
2546
|
+
export declare class ViewTemplate<TSource = any, TParent = any> implements ElementViewTemplate<TSource, TParent>, SyntheticViewTemplate<TSource, TParent> {
|
|
2749
2547
|
private result;
|
|
2750
|
-
/**
|
|
2751
|
-
* Used for TypeScript purposes only.
|
|
2752
|
-
* Do not use.
|
|
2753
|
-
*/
|
|
2754
|
-
type: any;
|
|
2755
2548
|
/**
|
|
2756
2549
|
* The html representing what this template will
|
|
2757
2550
|
* instantiate, including placeholders for directives.
|
|
@@ -2771,7 +2564,7 @@ export declare class ViewTemplate<TSource = any, TParent = any, TContext extends
|
|
|
2771
2564
|
* Creates an HTMLView instance based on this template definition.
|
|
2772
2565
|
* @param hostBindingTarget - The element that host behaviors will be bound to.
|
|
2773
2566
|
*/
|
|
2774
|
-
create(hostBindingTarget?: Element): HTMLView<TSource, TParent
|
|
2567
|
+
create(hostBindingTarget?: Element): HTMLView<TSource, TParent>;
|
|
2775
2568
|
/**
|
|
2776
2569
|
* Creates an HTMLView from this template, binds it to the source, and then appends it to the host.
|
|
2777
2570
|
* @param source - The data source to bind the template to.
|
|
@@ -2779,7 +2572,7 @@ export declare class ViewTemplate<TSource = any, TParent = any, TContext extends
|
|
|
2779
2572
|
* @param hostBindingTarget - An HTML element to target the host bindings at if different from the
|
|
2780
2573
|
* host that the template is being attached to.
|
|
2781
2574
|
*/
|
|
2782
|
-
render(source: TSource, host: Node, hostBindingTarget?: Element, context?:
|
|
2575
|
+
render(source: TSource, host: Node, hostBindingTarget?: Element, context?: ExecutionContext): HTMLView<TSource, TParent>;
|
|
2783
2576
|
}
|
|
2784
2577
|
|
|
2785
2578
|
/**
|
|
@@ -2793,11 +2586,11 @@ export declare function volatile(target: {}, name: string | Accessor, descriptor
|
|
|
2793
2586
|
|
|
2794
2587
|
/**
|
|
2795
2588
|
* A directive that enables basic conditional rendering in a template.
|
|
2796
|
-
* @param
|
|
2589
|
+
* @param condition - The condition to test for rendering.
|
|
2797
2590
|
* @param templateOrTemplateBinding - The template or a binding that gets
|
|
2798
2591
|
* the template to render when the condition is true.
|
|
2799
2592
|
* @public
|
|
2800
2593
|
*/
|
|
2801
|
-
export declare function when<TSource = any, TReturn = any>(
|
|
2594
|
+
export declare function when<TSource = any, TReturn = any>(condition: Expression<TSource, TReturn> | boolean, templateOrTemplateBinding: SyntheticViewTemplate | Expression<TSource, SyntheticViewTemplate>): CaptureType<TSource>;
|
|
2802
2595
|
|
|
2803
2596
|
export { }
|