@microsoft/fast-element 2.8.1 → 2.8.2
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 +16 -1
- package/CHANGELOG.md +10 -2
- package/dist/dts/components/element-controller.d.ts +79 -4
- package/dist/dts/index.d.ts +1 -1
- package/dist/esm/components/element-controller.js +76 -10
- package/dist/esm/index.js +1 -1
- package/dist/fast-element.api.json +241 -91
- package/dist/fast-element.debug.js +77 -11
- package/dist/fast-element.debug.min.js +2 -2
- package/dist/fast-element.js +77 -11
- package/dist/fast-element.min.js +2 -2
- package/dist/fast-element.untrimmed.d.ts +83 -3
- package/docs/api-report.api.md +17 -15
- package/package.json +1 -1
|
@@ -4283,6 +4283,33 @@
|
|
|
4283
4283
|
"endIndex": 5
|
|
4284
4284
|
}
|
|
4285
4285
|
},
|
|
4286
|
+
{
|
|
4287
|
+
"kind": "Variable",
|
|
4288
|
+
"canonicalReference": "@microsoft/fast-element!deferHydrationAttribute:var",
|
|
4289
|
+
"docComment": "/**\n * The attribute used to defer hydration of an element.\n *\n * @public\n */\n",
|
|
4290
|
+
"excerptTokens": [
|
|
4291
|
+
{
|
|
4292
|
+
"kind": "Content",
|
|
4293
|
+
"text": "deferHydrationAttribute = "
|
|
4294
|
+
},
|
|
4295
|
+
{
|
|
4296
|
+
"kind": "Content",
|
|
4297
|
+
"text": "\"defer-hydration\""
|
|
4298
|
+
}
|
|
4299
|
+
],
|
|
4300
|
+
"fileUrlPath": "dist/dts/components/element-controller.d.ts",
|
|
4301
|
+
"initializerTokenRange": {
|
|
4302
|
+
"startIndex": 1,
|
|
4303
|
+
"endIndex": 2
|
|
4304
|
+
},
|
|
4305
|
+
"isReadonly": true,
|
|
4306
|
+
"releaseTag": "Public",
|
|
4307
|
+
"name": "deferHydrationAttribute",
|
|
4308
|
+
"variableTypeTokenRange": {
|
|
4309
|
+
"startIndex": 0,
|
|
4310
|
+
"endIndex": 0
|
|
4311
|
+
}
|
|
4312
|
+
},
|
|
4286
4313
|
{
|
|
4287
4314
|
"kind": "Interface",
|
|
4288
4315
|
"canonicalReference": "@microsoft/fast-element!Disposable:interface",
|
|
@@ -4855,7 +4882,7 @@
|
|
|
4855
4882
|
{
|
|
4856
4883
|
"kind": "Property",
|
|
4857
4884
|
"canonicalReference": "@microsoft/fast-element!ElementController#behaviors:member",
|
|
4858
|
-
"docComment": "",
|
|
4885
|
+
"docComment": "/**\n * The behaviors associated with the component.\n */\n",
|
|
4859
4886
|
"excerptTokens": [
|
|
4860
4887
|
{
|
|
4861
4888
|
"kind": "Content",
|
|
@@ -4899,7 +4926,7 @@
|
|
|
4899
4926
|
{
|
|
4900
4927
|
"kind": "Method",
|
|
4901
4928
|
"canonicalReference": "@microsoft/fast-element!ElementController#bindObservables:member(1)",
|
|
4902
|
-
"docComment": "",
|
|
4929
|
+
"docComment": "/**\n * Binds any observables that were set before upgrade.\n */\n",
|
|
4903
4930
|
"excerptTokens": [
|
|
4904
4931
|
{
|
|
4905
4932
|
"kind": "Content",
|
|
@@ -4961,7 +4988,7 @@
|
|
|
4961
4988
|
{
|
|
4962
4989
|
"kind": "Method",
|
|
4963
4990
|
"canonicalReference": "@microsoft/fast-element!ElementController#connectBehaviors:member(1)",
|
|
4964
|
-
"docComment": "",
|
|
4991
|
+
"docComment": "/**\n * Connects any existing behaviors on the associated element.\n */\n",
|
|
4965
4992
|
"excerptTokens": [
|
|
4966
4993
|
{
|
|
4967
4994
|
"kind": "Content",
|
|
@@ -5085,7 +5112,7 @@
|
|
|
5085
5112
|
{
|
|
5086
5113
|
"kind": "Method",
|
|
5087
5114
|
"canonicalReference": "@microsoft/fast-element!ElementController#disconnectBehaviors:member(1)",
|
|
5088
|
-
"docComment": "",
|
|
5115
|
+
"docComment": "/**\n * Disconnects any behaviors on the associated element.\n */\n",
|
|
5089
5116
|
"excerptTokens": [
|
|
5090
5117
|
{
|
|
5091
5118
|
"kind": "Content",
|
|
@@ -5273,6 +5300,36 @@
|
|
|
5273
5300
|
"isAbstract": false,
|
|
5274
5301
|
"name": "forCustomElement"
|
|
5275
5302
|
},
|
|
5303
|
+
{
|
|
5304
|
+
"kind": "Property",
|
|
5305
|
+
"canonicalReference": "@microsoft/fast-element!ElementController#hasExistingShadowRoot:member",
|
|
5306
|
+
"docComment": "/**\n * Indicates whether the element has an existing shadow root (e.g. from declarative shadow DOM).\n */\n",
|
|
5307
|
+
"excerptTokens": [
|
|
5308
|
+
{
|
|
5309
|
+
"kind": "Content",
|
|
5310
|
+
"text": "protected hasExistingShadowRoot: "
|
|
5311
|
+
},
|
|
5312
|
+
{
|
|
5313
|
+
"kind": "Content",
|
|
5314
|
+
"text": "boolean"
|
|
5315
|
+
},
|
|
5316
|
+
{
|
|
5317
|
+
"kind": "Content",
|
|
5318
|
+
"text": ";"
|
|
5319
|
+
}
|
|
5320
|
+
],
|
|
5321
|
+
"isReadonly": false,
|
|
5322
|
+
"isOptional": false,
|
|
5323
|
+
"releaseTag": "Public",
|
|
5324
|
+
"name": "hasExistingShadowRoot",
|
|
5325
|
+
"propertyTypeTokenRange": {
|
|
5326
|
+
"startIndex": 1,
|
|
5327
|
+
"endIndex": 2
|
|
5328
|
+
},
|
|
5329
|
+
"isStatic": false,
|
|
5330
|
+
"isProtected": true,
|
|
5331
|
+
"isAbstract": false
|
|
5332
|
+
},
|
|
5276
5333
|
{
|
|
5277
5334
|
"kind": "Property",
|
|
5278
5335
|
"canonicalReference": "@microsoft/fast-element!ElementController#isBound:member",
|
|
@@ -5380,7 +5437,7 @@
|
|
|
5380
5437
|
{
|
|
5381
5438
|
"kind": "Property",
|
|
5382
5439
|
"canonicalReference": "@microsoft/fast-element!ElementController#needsInitialization:member",
|
|
5383
|
-
"docComment": "",
|
|
5440
|
+
"docComment": "/**\n * Indicates whether the controller needs to perform initial rendering.\n */\n",
|
|
5384
5441
|
"excerptTokens": [
|
|
5385
5442
|
{
|
|
5386
5443
|
"kind": "Content",
|
|
@@ -5678,7 +5735,7 @@
|
|
|
5678
5735
|
{
|
|
5679
5736
|
"kind": "Method",
|
|
5680
5737
|
"canonicalReference": "@microsoft/fast-element!ElementController#renderTemplate:member(1)",
|
|
5681
|
-
"docComment": "",
|
|
5738
|
+
"docComment": "/**\n * Renders the provided template to the element.\n *\n * @remarks\n *\n * If `null` is provided, any existing view will be removed.\n *\n * @param template - The template to render.\n */\n",
|
|
5682
5739
|
"excerptTokens": [
|
|
5683
5740
|
{
|
|
5684
5741
|
"kind": "Content",
|
|
@@ -5780,7 +5837,7 @@
|
|
|
5780
5837
|
{
|
|
5781
5838
|
"kind": "Property",
|
|
5782
5839
|
"canonicalReference": "@microsoft/fast-element!ElementController#shadowOptions:member",
|
|
5783
|
-
"docComment": "",
|
|
5840
|
+
"docComment": "/**\n * The shadow root options for the component.\n */\n",
|
|
5784
5841
|
"excerptTokens": [
|
|
5785
5842
|
{
|
|
5786
5843
|
"kind": "Content",
|
|
@@ -5889,7 +5946,7 @@
|
|
|
5889
5946
|
{
|
|
5890
5947
|
"kind": "Property",
|
|
5891
5948
|
"canonicalReference": "@microsoft/fast-element!ElementController#stage:member",
|
|
5892
|
-
"docComment": "",
|
|
5949
|
+
"docComment": "/**\n * The current lifecycle stage of the controller.\n */\n",
|
|
5893
5950
|
"excerptTokens": [
|
|
5894
5951
|
{
|
|
5895
5952
|
"kind": "Content",
|
|
@@ -5898,7 +5955,7 @@
|
|
|
5898
5955
|
{
|
|
5899
5956
|
"kind": "Reference",
|
|
5900
5957
|
"text": "Stages",
|
|
5901
|
-
"canonicalReference": "@microsoft/fast-element
|
|
5958
|
+
"canonicalReference": "@microsoft/fast-element!Stages:enum"
|
|
5902
5959
|
},
|
|
5903
5960
|
{
|
|
5904
5961
|
"kind": "Content",
|
|
@@ -12424,7 +12481,7 @@
|
|
|
12424
12481
|
{
|
|
12425
12482
|
"kind": "Method",
|
|
12426
12483
|
"canonicalReference": "@microsoft/fast-element!HydratableElementController#connect:member(1)",
|
|
12427
|
-
"docComment": "",
|
|
12484
|
+
"docComment": "/**\n * Runs connected lifecycle behavior on the associated element.\n */\n",
|
|
12428
12485
|
"excerptTokens": [
|
|
12429
12486
|
{
|
|
12430
12487
|
"kind": "Content",
|
|
@@ -12455,7 +12512,7 @@
|
|
|
12455
12512
|
{
|
|
12456
12513
|
"kind": "Method",
|
|
12457
12514
|
"canonicalReference": "@microsoft/fast-element!HydratableElementController#disconnect:member(1)",
|
|
12458
|
-
"docComment": "",
|
|
12515
|
+
"docComment": "/**\n * Unregisters the hydration observer when the element is disconnected.\n */\n",
|
|
12459
12516
|
"excerptTokens": [
|
|
12460
12517
|
{
|
|
12461
12518
|
"kind": "Content",
|
|
@@ -12483,89 +12540,10 @@
|
|
|
12483
12540
|
"isAbstract": false,
|
|
12484
12541
|
"name": "disconnect"
|
|
12485
12542
|
},
|
|
12486
|
-
{
|
|
12487
|
-
"kind": "Method",
|
|
12488
|
-
"canonicalReference": "@microsoft/fast-element!HydratableElementController.forCustomElement:member(1)",
|
|
12489
|
-
"docComment": "",
|
|
12490
|
-
"excerptTokens": [
|
|
12491
|
-
{
|
|
12492
|
-
"kind": "Content",
|
|
12493
|
-
"text": "static forCustomElement(element: "
|
|
12494
|
-
},
|
|
12495
|
-
{
|
|
12496
|
-
"kind": "Reference",
|
|
12497
|
-
"text": "HTMLElement",
|
|
12498
|
-
"canonicalReference": "!HTMLElement:interface"
|
|
12499
|
-
},
|
|
12500
|
-
{
|
|
12501
|
-
"kind": "Content",
|
|
12502
|
-
"text": ", override?: "
|
|
12503
|
-
},
|
|
12504
|
-
{
|
|
12505
|
-
"kind": "Content",
|
|
12506
|
-
"text": "boolean"
|
|
12507
|
-
},
|
|
12508
|
-
{
|
|
12509
|
-
"kind": "Content",
|
|
12510
|
-
"text": "): "
|
|
12511
|
-
},
|
|
12512
|
-
{
|
|
12513
|
-
"kind": "Reference",
|
|
12514
|
-
"text": "ElementController",
|
|
12515
|
-
"canonicalReference": "@microsoft/fast-element!ElementController:class"
|
|
12516
|
-
},
|
|
12517
|
-
{
|
|
12518
|
-
"kind": "Content",
|
|
12519
|
-
"text": "<"
|
|
12520
|
-
},
|
|
12521
|
-
{
|
|
12522
|
-
"kind": "Reference",
|
|
12523
|
-
"text": "HTMLElement",
|
|
12524
|
-
"canonicalReference": "!HTMLElement:interface"
|
|
12525
|
-
},
|
|
12526
|
-
{
|
|
12527
|
-
"kind": "Content",
|
|
12528
|
-
"text": ">"
|
|
12529
|
-
},
|
|
12530
|
-
{
|
|
12531
|
-
"kind": "Content",
|
|
12532
|
-
"text": ";"
|
|
12533
|
-
}
|
|
12534
|
-
],
|
|
12535
|
-
"isStatic": true,
|
|
12536
|
-
"returnTypeTokenRange": {
|
|
12537
|
-
"startIndex": 5,
|
|
12538
|
-
"endIndex": 9
|
|
12539
|
-
},
|
|
12540
|
-
"releaseTag": "Beta",
|
|
12541
|
-
"isProtected": false,
|
|
12542
|
-
"overloadIndex": 1,
|
|
12543
|
-
"parameters": [
|
|
12544
|
-
{
|
|
12545
|
-
"parameterName": "element",
|
|
12546
|
-
"parameterTypeTokenRange": {
|
|
12547
|
-
"startIndex": 1,
|
|
12548
|
-
"endIndex": 2
|
|
12549
|
-
},
|
|
12550
|
-
"isOptional": false
|
|
12551
|
-
},
|
|
12552
|
-
{
|
|
12553
|
-
"parameterName": "override",
|
|
12554
|
-
"parameterTypeTokenRange": {
|
|
12555
|
-
"startIndex": 3,
|
|
12556
|
-
"endIndex": 4
|
|
12557
|
-
},
|
|
12558
|
-
"isOptional": true
|
|
12559
|
-
}
|
|
12560
|
-
],
|
|
12561
|
-
"isOptional": false,
|
|
12562
|
-
"isAbstract": false,
|
|
12563
|
-
"name": "forCustomElement"
|
|
12564
|
-
},
|
|
12565
12543
|
{
|
|
12566
12544
|
"kind": "Method",
|
|
12567
12545
|
"canonicalReference": "@microsoft/fast-element!HydratableElementController.install:member(1)",
|
|
12568
|
-
"docComment": "",
|
|
12546
|
+
"docComment": "/**\n * Sets the ElementController strategy to HydratableElementController.\n *\n * @remarks\n *\n * This method is typically called during application startup to enable hydration support for FAST elements.\n */\n",
|
|
12569
12547
|
"excerptTokens": [
|
|
12570
12548
|
{
|
|
12571
12549
|
"kind": "Content",
|
|
@@ -12653,6 +12631,50 @@
|
|
|
12653
12631
|
"isStatic": false,
|
|
12654
12632
|
"isProtected": true,
|
|
12655
12633
|
"isAbstract": false
|
|
12634
|
+
},
|
|
12635
|
+
{
|
|
12636
|
+
"kind": "Property",
|
|
12637
|
+
"canonicalReference": "@microsoft/fast-element!HydratableElementController#shadowOptions:member",
|
|
12638
|
+
"docComment": "/**\n * The shadow root options for the component.\n */\n",
|
|
12639
|
+
"excerptTokens": [
|
|
12640
|
+
{
|
|
12641
|
+
"kind": "Content",
|
|
12642
|
+
"text": "get shadowOptions(): "
|
|
12643
|
+
},
|
|
12644
|
+
{
|
|
12645
|
+
"kind": "Reference",
|
|
12646
|
+
"text": "ShadowRootOptions",
|
|
12647
|
+
"canonicalReference": "@microsoft/fast-element!ShadowRootOptions:interface"
|
|
12648
|
+
},
|
|
12649
|
+
{
|
|
12650
|
+
"kind": "Content",
|
|
12651
|
+
"text": " | undefined"
|
|
12652
|
+
},
|
|
12653
|
+
{
|
|
12654
|
+
"kind": "Content",
|
|
12655
|
+
"text": ";\n\nset shadowOptions(value: "
|
|
12656
|
+
},
|
|
12657
|
+
{
|
|
12658
|
+
"kind": "Reference",
|
|
12659
|
+
"text": "ShadowRootOptions",
|
|
12660
|
+
"canonicalReference": "@microsoft/fast-element!ShadowRootOptions:interface"
|
|
12661
|
+
},
|
|
12662
|
+
{
|
|
12663
|
+
"kind": "Content",
|
|
12664
|
+
"text": " | undefined);"
|
|
12665
|
+
}
|
|
12666
|
+
],
|
|
12667
|
+
"isReadonly": false,
|
|
12668
|
+
"isOptional": false,
|
|
12669
|
+
"releaseTag": "Beta",
|
|
12670
|
+
"name": "shadowOptions",
|
|
12671
|
+
"propertyTypeTokenRange": {
|
|
12672
|
+
"startIndex": 1,
|
|
12673
|
+
"endIndex": 3
|
|
12674
|
+
},
|
|
12675
|
+
"isStatic": false,
|
|
12676
|
+
"isProtected": false,
|
|
12677
|
+
"isAbstract": false
|
|
12656
12678
|
}
|
|
12657
12679
|
],
|
|
12658
12680
|
"extendsTokenRange": {
|
|
@@ -13627,6 +13649,33 @@
|
|
|
13627
13649
|
"endIndex": 3
|
|
13628
13650
|
}
|
|
13629
13651
|
},
|
|
13652
|
+
{
|
|
13653
|
+
"kind": "Variable",
|
|
13654
|
+
"canonicalReference": "@microsoft/fast-element!needsHydrationAttribute:var",
|
|
13655
|
+
"docComment": "/**\n * The attribute used to indicate that an element needs hydration.\n *\n * @public\n */\n",
|
|
13656
|
+
"excerptTokens": [
|
|
13657
|
+
{
|
|
13658
|
+
"kind": "Content",
|
|
13659
|
+
"text": "needsHydrationAttribute = "
|
|
13660
|
+
},
|
|
13661
|
+
{
|
|
13662
|
+
"kind": "Content",
|
|
13663
|
+
"text": "\"needs-hydration\""
|
|
13664
|
+
}
|
|
13665
|
+
],
|
|
13666
|
+
"fileUrlPath": "dist/dts/components/element-controller.d.ts",
|
|
13667
|
+
"initializerTokenRange": {
|
|
13668
|
+
"startIndex": 1,
|
|
13669
|
+
"endIndex": 2
|
|
13670
|
+
},
|
|
13671
|
+
"isReadonly": true,
|
|
13672
|
+
"releaseTag": "Public",
|
|
13673
|
+
"name": "needsHydrationAttribute",
|
|
13674
|
+
"variableTypeTokenRange": {
|
|
13675
|
+
"startIndex": 0,
|
|
13676
|
+
"endIndex": 0
|
|
13677
|
+
}
|
|
13678
|
+
},
|
|
13630
13679
|
{
|
|
13631
13680
|
"kind": "Interface",
|
|
13632
13681
|
"canonicalReference": "@microsoft/fast-element!NodeBehaviorOptions:interface",
|
|
@@ -19593,6 +19642,107 @@
|
|
|
19593
19642
|
"endIndex": 3
|
|
19594
19643
|
}
|
|
19595
19644
|
},
|
|
19645
|
+
{
|
|
19646
|
+
"kind": "Enum",
|
|
19647
|
+
"canonicalReference": "@microsoft/fast-element!Stages:enum",
|
|
19648
|
+
"docComment": "/**\n * The various lifecycle stages of an ElementController.\n *\n * @public\n */\n",
|
|
19649
|
+
"excerptTokens": [
|
|
19650
|
+
{
|
|
19651
|
+
"kind": "Content",
|
|
19652
|
+
"text": "export declare const enum Stages "
|
|
19653
|
+
}
|
|
19654
|
+
],
|
|
19655
|
+
"fileUrlPath": "dist/dts/components/element-controller.d.ts",
|
|
19656
|
+
"releaseTag": "Public",
|
|
19657
|
+
"name": "Stages",
|
|
19658
|
+
"preserveMemberOrder": false,
|
|
19659
|
+
"members": [
|
|
19660
|
+
{
|
|
19661
|
+
"kind": "EnumMember",
|
|
19662
|
+
"canonicalReference": "@microsoft/fast-element!Stages.connected:member",
|
|
19663
|
+
"docComment": "/**\n * The element is connected.\n */\n",
|
|
19664
|
+
"excerptTokens": [
|
|
19665
|
+
{
|
|
19666
|
+
"kind": "Content",
|
|
19667
|
+
"text": "connected = "
|
|
19668
|
+
},
|
|
19669
|
+
{
|
|
19670
|
+
"kind": "Content",
|
|
19671
|
+
"text": "1"
|
|
19672
|
+
}
|
|
19673
|
+
],
|
|
19674
|
+
"initializerTokenRange": {
|
|
19675
|
+
"startIndex": 1,
|
|
19676
|
+
"endIndex": 2
|
|
19677
|
+
},
|
|
19678
|
+
"releaseTag": "Public",
|
|
19679
|
+
"name": "connected"
|
|
19680
|
+
},
|
|
19681
|
+
{
|
|
19682
|
+
"kind": "EnumMember",
|
|
19683
|
+
"canonicalReference": "@microsoft/fast-element!Stages.connecting:member",
|
|
19684
|
+
"docComment": "/**\n * The element is in the process of connecting.\n */\n",
|
|
19685
|
+
"excerptTokens": [
|
|
19686
|
+
{
|
|
19687
|
+
"kind": "Content",
|
|
19688
|
+
"text": "connecting = "
|
|
19689
|
+
},
|
|
19690
|
+
{
|
|
19691
|
+
"kind": "Content",
|
|
19692
|
+
"text": "0"
|
|
19693
|
+
}
|
|
19694
|
+
],
|
|
19695
|
+
"initializerTokenRange": {
|
|
19696
|
+
"startIndex": 1,
|
|
19697
|
+
"endIndex": 2
|
|
19698
|
+
},
|
|
19699
|
+
"releaseTag": "Public",
|
|
19700
|
+
"name": "connecting"
|
|
19701
|
+
},
|
|
19702
|
+
{
|
|
19703
|
+
"kind": "EnumMember",
|
|
19704
|
+
"canonicalReference": "@microsoft/fast-element!Stages.disconnected:member",
|
|
19705
|
+
"docComment": "/**\n * The element is disconnected.\n */\n",
|
|
19706
|
+
"excerptTokens": [
|
|
19707
|
+
{
|
|
19708
|
+
"kind": "Content",
|
|
19709
|
+
"text": "disconnected = "
|
|
19710
|
+
},
|
|
19711
|
+
{
|
|
19712
|
+
"kind": "Content",
|
|
19713
|
+
"text": "3"
|
|
19714
|
+
}
|
|
19715
|
+
],
|
|
19716
|
+
"initializerTokenRange": {
|
|
19717
|
+
"startIndex": 1,
|
|
19718
|
+
"endIndex": 2
|
|
19719
|
+
},
|
|
19720
|
+
"releaseTag": "Public",
|
|
19721
|
+
"name": "disconnected"
|
|
19722
|
+
},
|
|
19723
|
+
{
|
|
19724
|
+
"kind": "EnumMember",
|
|
19725
|
+
"canonicalReference": "@microsoft/fast-element!Stages.disconnecting:member",
|
|
19726
|
+
"docComment": "/**\n * The element is in the process of disconnecting.\n */\n",
|
|
19727
|
+
"excerptTokens": [
|
|
19728
|
+
{
|
|
19729
|
+
"kind": "Content",
|
|
19730
|
+
"text": "disconnecting = "
|
|
19731
|
+
},
|
|
19732
|
+
{
|
|
19733
|
+
"kind": "Content",
|
|
19734
|
+
"text": "2"
|
|
19735
|
+
}
|
|
19736
|
+
],
|
|
19737
|
+
"initializerTokenRange": {
|
|
19738
|
+
"startIndex": 1,
|
|
19739
|
+
"endIndex": 2
|
|
19740
|
+
},
|
|
19741
|
+
"releaseTag": "Public",
|
|
19742
|
+
"name": "disconnecting"
|
|
19743
|
+
}
|
|
19744
|
+
]
|
|
19745
|
+
},
|
|
19596
19746
|
{
|
|
19597
19747
|
"kind": "Class",
|
|
19598
19748
|
"canonicalReference": "@microsoft/fast-element!StatelessAttachedAttributeDirective:class",
|
|
@@ -5497,10 +5497,25 @@ class ElementController extends PropertyChangeNotifier {
|
|
|
5497
5497
|
*/
|
|
5498
5498
|
constructor(element, definition) {
|
|
5499
5499
|
super(element);
|
|
5500
|
+
/**
|
|
5501
|
+
* A map of observable properties that were set on the element before upgrade.
|
|
5502
|
+
*/
|
|
5500
5503
|
this.boundObservables = null;
|
|
5504
|
+
/**
|
|
5505
|
+
* Indicates whether the controller needs to perform initial rendering.
|
|
5506
|
+
*/
|
|
5501
5507
|
this.needsInitialization = true;
|
|
5508
|
+
/**
|
|
5509
|
+
* Indicates whether the element has an existing shadow root (e.g. from declarative shadow DOM).
|
|
5510
|
+
*/
|
|
5502
5511
|
this.hasExistingShadowRoot = false;
|
|
5512
|
+
/**
|
|
5513
|
+
* The template used to render the component.
|
|
5514
|
+
*/
|
|
5503
5515
|
this._template = null;
|
|
5516
|
+
/**
|
|
5517
|
+
* The current lifecycle stage of the controller.
|
|
5518
|
+
*/
|
|
5504
5519
|
this.stage = 3 /* Stages.disconnected */;
|
|
5505
5520
|
/**
|
|
5506
5521
|
* A guard against connecting behaviors multiple times
|
|
@@ -5508,12 +5523,19 @@ class ElementController extends PropertyChangeNotifier {
|
|
|
5508
5523
|
* another behavior during it's connectedCallback
|
|
5509
5524
|
*/
|
|
5510
5525
|
this.guardBehaviorConnection = false;
|
|
5526
|
+
/**
|
|
5527
|
+
* The behaviors associated with the component.
|
|
5528
|
+
*/
|
|
5511
5529
|
this.behaviors = null;
|
|
5512
5530
|
/**
|
|
5513
5531
|
* Tracks whether behaviors are connected so that
|
|
5514
5532
|
* behaviors cant be connected multiple times
|
|
5515
5533
|
*/
|
|
5516
5534
|
this.behaviorsConnected = false;
|
|
5535
|
+
/**
|
|
5536
|
+
* The main set of styles used for the component, independent of any
|
|
5537
|
+
* dynamically added styles.
|
|
5538
|
+
*/
|
|
5517
5539
|
this._mainStyles = null;
|
|
5518
5540
|
/**
|
|
5519
5541
|
* This allows Observable.getNotifier(...) to return the Controller
|
|
@@ -5609,6 +5631,9 @@ class ElementController extends PropertyChangeNotifier {
|
|
|
5609
5631
|
this.renderTemplate(value);
|
|
5610
5632
|
}
|
|
5611
5633
|
}
|
|
5634
|
+
/**
|
|
5635
|
+
* The shadow root options for the component.
|
|
5636
|
+
*/
|
|
5612
5637
|
get shadowOptions() {
|
|
5613
5638
|
return this._shadowRootOptions;
|
|
5614
5639
|
}
|
|
@@ -5783,6 +5808,9 @@ class ElementController extends PropertyChangeNotifier {
|
|
|
5783
5808
|
this.stage = 1 /* Stages.connected */;
|
|
5784
5809
|
Observable.notify(this, isConnectedPropertyName);
|
|
5785
5810
|
}
|
|
5811
|
+
/**
|
|
5812
|
+
* Binds any observables that were set before upgrade.
|
|
5813
|
+
*/
|
|
5786
5814
|
bindObservables() {
|
|
5787
5815
|
if (this.boundObservables !== null) {
|
|
5788
5816
|
const element = this.source;
|
|
@@ -5795,6 +5823,9 @@ class ElementController extends PropertyChangeNotifier {
|
|
|
5795
5823
|
this.boundObservables = null;
|
|
5796
5824
|
}
|
|
5797
5825
|
}
|
|
5826
|
+
/**
|
|
5827
|
+
* Connects any existing behaviors on the associated element.
|
|
5828
|
+
*/
|
|
5798
5829
|
connectBehaviors() {
|
|
5799
5830
|
if (this.behaviorsConnected === false) {
|
|
5800
5831
|
const behaviors = this.behaviors;
|
|
@@ -5808,6 +5839,9 @@ class ElementController extends PropertyChangeNotifier {
|
|
|
5808
5839
|
this.behaviorsConnected = true;
|
|
5809
5840
|
}
|
|
5810
5841
|
}
|
|
5842
|
+
/**
|
|
5843
|
+
* Disconnects any behaviors on the associated element.
|
|
5844
|
+
*/
|
|
5811
5845
|
disconnectBehaviors() {
|
|
5812
5846
|
if (this.behaviorsConnected === true) {
|
|
5813
5847
|
const behaviors = this.behaviors;
|
|
@@ -5860,6 +5894,13 @@ class ElementController extends PropertyChangeNotifier {
|
|
|
5860
5894
|
}
|
|
5861
5895
|
return false;
|
|
5862
5896
|
}
|
|
5897
|
+
/**
|
|
5898
|
+
* Renders the provided template to the element.
|
|
5899
|
+
*
|
|
5900
|
+
* @param template - The template to render.
|
|
5901
|
+
* @remarks
|
|
5902
|
+
* If `null` is provided, any existing view will be removed.
|
|
5903
|
+
*/
|
|
5863
5904
|
renderTemplate(template) {
|
|
5864
5905
|
var _a;
|
|
5865
5906
|
// When getting the host to render to, we start by looking
|
|
@@ -6047,7 +6088,15 @@ if (ElementStyles.supportsAdoptedStyleSheets) {
|
|
|
6047
6088
|
else {
|
|
6048
6089
|
ElementStyles.setDefaultStrategy(StyleElementStrategy);
|
|
6049
6090
|
}
|
|
6091
|
+
/**
|
|
6092
|
+
* The attribute used to defer hydration of an element.
|
|
6093
|
+
* @public
|
|
6094
|
+
*/
|
|
6050
6095
|
const deferHydrationAttribute = "defer-hydration";
|
|
6096
|
+
/**
|
|
6097
|
+
* The attribute used to indicate that an element needs hydration.
|
|
6098
|
+
* @public
|
|
6099
|
+
*/
|
|
6051
6100
|
const needsHydrationAttribute = "needs-hydration";
|
|
6052
6101
|
/**
|
|
6053
6102
|
* An ElementController capable of hydrating FAST elements from
|
|
@@ -6056,6 +6105,20 @@ const needsHydrationAttribute = "needs-hydration";
|
|
|
6056
6105
|
* @beta
|
|
6057
6106
|
*/
|
|
6058
6107
|
class HydratableElementController extends ElementController {
|
|
6108
|
+
/**
|
|
6109
|
+
* {@inheritdoc ElementController.shadowOptions}
|
|
6110
|
+
*/
|
|
6111
|
+
get shadowOptions() {
|
|
6112
|
+
return super.shadowOptions;
|
|
6113
|
+
}
|
|
6114
|
+
set shadowOptions(value) {
|
|
6115
|
+
super.shadowOptions = value;
|
|
6116
|
+
if (this.hasExistingShadowRoot &&
|
|
6117
|
+
this.definition.templateOptions === TemplateOptions.deferAndHydrate) {
|
|
6118
|
+
this.source.toggleAttribute(deferHydrationAttribute, true);
|
|
6119
|
+
this.source.toggleAttribute(needsHydrationAttribute, true);
|
|
6120
|
+
}
|
|
6121
|
+
}
|
|
6059
6122
|
/**
|
|
6060
6123
|
* Adds the current element instance to the hydrating instances map
|
|
6061
6124
|
*/
|
|
@@ -6106,20 +6169,14 @@ class HydratableElementController extends ElementController {
|
|
|
6106
6169
|
ElementController.setStrategy(ElementController);
|
|
6107
6170
|
}
|
|
6108
6171
|
}
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
!definition.template) {
|
|
6113
|
-
element.toggleAttribute(deferHydrationAttribute, true);
|
|
6114
|
-
element.toggleAttribute(needsHydrationAttribute, true);
|
|
6115
|
-
}
|
|
6116
|
-
return super.forCustomElement(element, override);
|
|
6117
|
-
}
|
|
6172
|
+
/**
|
|
6173
|
+
* Runs connected lifecycle behavior on the associated element.
|
|
6174
|
+
*/
|
|
6118
6175
|
connect() {
|
|
6119
6176
|
var _a, _b, _c, _d, _e;
|
|
6120
6177
|
// Initialize needsHydration on first connect
|
|
6121
6178
|
this.needsHydration =
|
|
6122
|
-
(_a = this.needsHydration) !== null && _a !== void 0 ? _a : this.source.
|
|
6179
|
+
(_a = this.needsHydration) !== null && _a !== void 0 ? _a : this.source.hasAttribute(needsHydrationAttribute);
|
|
6123
6180
|
if (this.needsHydration) {
|
|
6124
6181
|
(_c = (_b = HydratableElementController.lifecycleCallbacks) === null || _b === void 0 ? void 0 : _b.elementWillHydrate) === null || _c === void 0 ? void 0 : _c.call(_b, this.definition.name);
|
|
6125
6182
|
}
|
|
@@ -6201,10 +6258,19 @@ class HydratableElementController extends ElementController {
|
|
|
6201
6258
|
HydratableElementController.idleCallbackId = requestIdleCallback(HydratableElementController.checkHydrationComplete, { timeout: 50 });
|
|
6202
6259
|
}
|
|
6203
6260
|
}
|
|
6261
|
+
/**
|
|
6262
|
+
* Unregisters the hydration observer when the element is disconnected.
|
|
6263
|
+
*/
|
|
6204
6264
|
disconnect() {
|
|
6205
6265
|
super.disconnect();
|
|
6206
6266
|
HydratableElementController.hydrationObserver.unobserve(this.source);
|
|
6207
6267
|
}
|
|
6268
|
+
/**
|
|
6269
|
+
* Sets the ElementController strategy to HydratableElementController.
|
|
6270
|
+
* @remarks
|
|
6271
|
+
* This method is typically called during application startup to enable
|
|
6272
|
+
* hydration support for FAST elements.
|
|
6273
|
+
*/
|
|
6208
6274
|
static install() {
|
|
6209
6275
|
ElementController.setStrategy(HydratableElementController);
|
|
6210
6276
|
}
|
|
@@ -6327,4 +6393,4 @@ function customElement(nameOrDef) {
|
|
|
6327
6393
|
|
|
6328
6394
|
DOM.setPolicy(DOMPolicy.create());
|
|
6329
6395
|
|
|
6330
|
-
export { ArrayObserver, AttributeConfiguration, AttributeDefinition, Binding, CSSBindingDirective, CSSDirective, ChildrenDirective, Compiler, DOM, DOMAspect, ElementController, ElementStyles, ExecutionContext, FAST, FASTElement, FASTElementDefinition, HTMLBindingDirective, HTMLDirective, HTMLView, HydratableElementController, HydrationBindingError, InlineTemplateDirective, Markup, NodeObservationDirective, Observable, Parser, PropertyChangeNotifier, RefDirective, RenderBehavior, RenderDirective, RepeatBehavior, RepeatDirective, SlottedDirective, Sort, SourceLifetime, Splice, SpliceStrategy, SpliceStrategySupport, StatelessAttachedAttributeDirective, SubscriberSet, TemplateOptions, Updates, ViewTemplate, attr, booleanConverter, children, css, cssDirective, customElement, elements, emptyArray, fastElementRegistry, html, htmlDirective, lengthOf, listener, normalizeBinding$1 as normalizeBinding, nullableBooleanConverter, nullableNumberConverter, observable, oneTime, oneWay, ref, render, repeat, slotted, sortedCount, volatile, when };
|
|
6396
|
+
export { ArrayObserver, AttributeConfiguration, AttributeDefinition, Binding, CSSBindingDirective, CSSDirective, ChildrenDirective, Compiler, DOM, DOMAspect, ElementController, ElementStyles, ExecutionContext, FAST, FASTElement, FASTElementDefinition, HTMLBindingDirective, HTMLDirective, HTMLView, HydratableElementController, HydrationBindingError, InlineTemplateDirective, Markup, NodeObservationDirective, Observable, Parser, PropertyChangeNotifier, RefDirective, RenderBehavior, RenderDirective, RepeatBehavior, RepeatDirective, SlottedDirective, Sort, SourceLifetime, Splice, SpliceStrategy, SpliceStrategySupport, StatelessAttachedAttributeDirective, SubscriberSet, TemplateOptions, Updates, ViewTemplate, attr, booleanConverter, children, css, cssDirective, customElement, deferHydrationAttribute, elements, emptyArray, fastElementRegistry, html, htmlDirective, lengthOf, listener, needsHydrationAttribute, normalizeBinding$1 as normalizeBinding, nullableBooleanConverter, nullableNumberConverter, observable, oneTime, oneWay, ref, render, repeat, slotted, sortedCount, volatile, when };
|