@genesislcap/foundation-utils 14.497.0 → 14.499.0
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/dist/custom-elements.json +304 -249
- package/dist/dts/feature-flags/featureFlags.d.ts +45 -0
- package/dist/dts/feature-flags/featureFlags.d.ts.map +1 -1
- package/dist/dts/mixins/lifecycle/lifecycle.d.ts +9 -0
- package/dist/dts/mixins/lifecycle/lifecycle.d.ts.map +1 -1
- package/dist/esm/feature-flags/featureFlags.js +78 -5
- package/dist/esm/mixins/lifecycle/lifecycle.js +20 -2
- package/dist/foundation-utils.api.json +110 -2
- package/dist/foundation-utils.d.ts +60 -0
- package/package.json +11 -11
|
@@ -452,6 +452,44 @@
|
|
|
452
452
|
}
|
|
453
453
|
]
|
|
454
454
|
},
|
|
455
|
+
{
|
|
456
|
+
"kind": "javascript-module",
|
|
457
|
+
"path": "src/encoding/index.ts",
|
|
458
|
+
"declarations": [],
|
|
459
|
+
"exports": [
|
|
460
|
+
{
|
|
461
|
+
"kind": "js",
|
|
462
|
+
"name": "*",
|
|
463
|
+
"declaration": {
|
|
464
|
+
"name": "*",
|
|
465
|
+
"package": "./base64"
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
]
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"kind": "javascript-module",
|
|
472
|
+
"path": "src/directives/index.ts",
|
|
473
|
+
"declarations": [],
|
|
474
|
+
"exports": [
|
|
475
|
+
{
|
|
476
|
+
"kind": "js",
|
|
477
|
+
"name": "*",
|
|
478
|
+
"declaration": {
|
|
479
|
+
"name": "*",
|
|
480
|
+
"package": "./sync"
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"kind": "js",
|
|
485
|
+
"name": "*",
|
|
486
|
+
"declaration": {
|
|
487
|
+
"name": "*",
|
|
488
|
+
"package": "./when-else"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
]
|
|
492
|
+
},
|
|
455
493
|
{
|
|
456
494
|
"kind": "javascript-module",
|
|
457
495
|
"path": "src/data/inMemoryDatabase.ts",
|
|
@@ -650,97 +688,6 @@
|
|
|
650
688
|
}
|
|
651
689
|
]
|
|
652
690
|
},
|
|
653
|
-
{
|
|
654
|
-
"kind": "javascript-module",
|
|
655
|
-
"path": "src/directives/index.ts",
|
|
656
|
-
"declarations": [],
|
|
657
|
-
"exports": [
|
|
658
|
-
{
|
|
659
|
-
"kind": "js",
|
|
660
|
-
"name": "*",
|
|
661
|
-
"declaration": {
|
|
662
|
-
"name": "*",
|
|
663
|
-
"package": "./sync"
|
|
664
|
-
}
|
|
665
|
-
},
|
|
666
|
-
{
|
|
667
|
-
"kind": "js",
|
|
668
|
-
"name": "*",
|
|
669
|
-
"declaration": {
|
|
670
|
-
"name": "*",
|
|
671
|
-
"package": "./when-else"
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
]
|
|
675
|
-
},
|
|
676
|
-
{
|
|
677
|
-
"kind": "javascript-module",
|
|
678
|
-
"path": "src/decorators/index.ts",
|
|
679
|
-
"declarations": [],
|
|
680
|
-
"exports": [
|
|
681
|
-
{
|
|
682
|
-
"kind": "js",
|
|
683
|
-
"name": "*",
|
|
684
|
-
"declaration": {
|
|
685
|
-
"name": "*",
|
|
686
|
-
"package": "./renderOnChange"
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
]
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
"kind": "javascript-module",
|
|
693
|
-
"path": "src/decorators/renderOnChange.ts",
|
|
694
|
-
"declarations": [
|
|
695
|
-
{
|
|
696
|
-
"kind": "function",
|
|
697
|
-
"name": "renderOnChange",
|
|
698
|
-
"parameters": [
|
|
699
|
-
{
|
|
700
|
-
"name": "target",
|
|
701
|
-
"type": {
|
|
702
|
-
"text": "FASTElement & { render(): void }"
|
|
703
|
-
},
|
|
704
|
-
"description": "The target to define the property change handler on."
|
|
705
|
-
},
|
|
706
|
-
{
|
|
707
|
-
"name": "name",
|
|
708
|
-
"type": {
|
|
709
|
-
"text": "string"
|
|
710
|
-
},
|
|
711
|
-
"description": "The property name."
|
|
712
|
-
}
|
|
713
|
-
],
|
|
714
|
-
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
|
715
|
-
"privacy": "public"
|
|
716
|
-
}
|
|
717
|
-
],
|
|
718
|
-
"exports": [
|
|
719
|
-
{
|
|
720
|
-
"kind": "js",
|
|
721
|
-
"name": "renderOnChange",
|
|
722
|
-
"declaration": {
|
|
723
|
-
"name": "renderOnChange",
|
|
724
|
-
"module": "src/decorators/renderOnChange.ts"
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
]
|
|
728
|
-
},
|
|
729
|
-
{
|
|
730
|
-
"kind": "javascript-module",
|
|
731
|
-
"path": "src/encoding/index.ts",
|
|
732
|
-
"declarations": [],
|
|
733
|
-
"exports": [
|
|
734
|
-
{
|
|
735
|
-
"kind": "js",
|
|
736
|
-
"name": "*",
|
|
737
|
-
"declaration": {
|
|
738
|
-
"name": "*",
|
|
739
|
-
"package": "./base64"
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
]
|
|
743
|
-
},
|
|
744
691
|
{
|
|
745
692
|
"kind": "javascript-module",
|
|
746
693
|
"path": "src/env/index.ts",
|
|
@@ -1216,6 +1163,59 @@
|
|
|
1216
1163
|
}
|
|
1217
1164
|
]
|
|
1218
1165
|
},
|
|
1166
|
+
{
|
|
1167
|
+
"kind": "javascript-module",
|
|
1168
|
+
"path": "src/decorators/index.ts",
|
|
1169
|
+
"declarations": [],
|
|
1170
|
+
"exports": [
|
|
1171
|
+
{
|
|
1172
|
+
"kind": "js",
|
|
1173
|
+
"name": "*",
|
|
1174
|
+
"declaration": {
|
|
1175
|
+
"name": "*",
|
|
1176
|
+
"package": "./renderOnChange"
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
]
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"kind": "javascript-module",
|
|
1183
|
+
"path": "src/decorators/renderOnChange.ts",
|
|
1184
|
+
"declarations": [
|
|
1185
|
+
{
|
|
1186
|
+
"kind": "function",
|
|
1187
|
+
"name": "renderOnChange",
|
|
1188
|
+
"parameters": [
|
|
1189
|
+
{
|
|
1190
|
+
"name": "target",
|
|
1191
|
+
"type": {
|
|
1192
|
+
"text": "FASTElement & { render(): void }"
|
|
1193
|
+
},
|
|
1194
|
+
"description": "The target to define the property change handler on."
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"name": "name",
|
|
1198
|
+
"type": {
|
|
1199
|
+
"text": "string"
|
|
1200
|
+
},
|
|
1201
|
+
"description": "The property name."
|
|
1202
|
+
}
|
|
1203
|
+
],
|
|
1204
|
+
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
|
1205
|
+
"privacy": "public"
|
|
1206
|
+
}
|
|
1207
|
+
],
|
|
1208
|
+
"exports": [
|
|
1209
|
+
{
|
|
1210
|
+
"kind": "js",
|
|
1211
|
+
"name": "renderOnChange",
|
|
1212
|
+
"declaration": {
|
|
1213
|
+
"name": "renderOnChange",
|
|
1214
|
+
"module": "src/decorators/renderOnChange.ts"
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
]
|
|
1218
|
+
},
|
|
1219
1219
|
{
|
|
1220
1220
|
"kind": "javascript-module",
|
|
1221
1221
|
"path": "src/error/errorMap.ts",
|
|
@@ -1434,7 +1434,46 @@
|
|
|
1434
1434
|
"text": "string"
|
|
1435
1435
|
}
|
|
1436
1436
|
}
|
|
1437
|
-
]
|
|
1437
|
+
],
|
|
1438
|
+
"description": "Returns true when `feature.<name>` is present in the current URL query string.",
|
|
1439
|
+
"privacy": "public"
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"kind": "function",
|
|
1443
|
+
"name": "getActivatedFeatures",
|
|
1444
|
+
"return": {
|
|
1445
|
+
"type": {
|
|
1446
|
+
"text": "string[]"
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
"description": "Returns the names of all feature flags currently present in the URL query string.",
|
|
1450
|
+
"privacy": "public"
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
"kind": "function",
|
|
1454
|
+
"name": "setActivatedFeatures",
|
|
1455
|
+
"return": {
|
|
1456
|
+
"type": {
|
|
1457
|
+
"text": "void"
|
|
1458
|
+
}
|
|
1459
|
+
},
|
|
1460
|
+
"parameters": [
|
|
1461
|
+
{
|
|
1462
|
+
"name": "features",
|
|
1463
|
+
"type": {
|
|
1464
|
+
"text": "string[]"
|
|
1465
|
+
}
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
"name": "options",
|
|
1469
|
+
"default": "{}",
|
|
1470
|
+
"type": {
|
|
1471
|
+
"text": "SetActivatedFeaturesOptions"
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
],
|
|
1475
|
+
"description": "Rewrites URL `feature.*` query params to match the given feature list (presence-only).\nRemoves any existing `feature.*` params, then adds each selected feature as `feature.<name>`.\nReloads by default so boot-time consumers (e.g. AI registration) pick up the change.",
|
|
1476
|
+
"privacy": "public"
|
|
1438
1477
|
}
|
|
1439
1478
|
],
|
|
1440
1479
|
"exports": [
|
|
@@ -1445,6 +1484,22 @@
|
|
|
1445
1484
|
"name": "isFeatureActivated",
|
|
1446
1485
|
"module": "src/feature-flags/featureFlags.ts"
|
|
1447
1486
|
}
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
"kind": "js",
|
|
1490
|
+
"name": "getActivatedFeatures",
|
|
1491
|
+
"declaration": {
|
|
1492
|
+
"name": "getActivatedFeatures",
|
|
1493
|
+
"module": "src/feature-flags/featureFlags.ts"
|
|
1494
|
+
}
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"kind": "js",
|
|
1498
|
+
"name": "setActivatedFeatures",
|
|
1499
|
+
"declaration": {
|
|
1500
|
+
"name": "setActivatedFeatures",
|
|
1501
|
+
"module": "src/feature-flags/featureFlags.ts"
|
|
1502
|
+
}
|
|
1448
1503
|
}
|
|
1449
1504
|
]
|
|
1450
1505
|
},
|
|
@@ -4825,168 +4880,14 @@
|
|
|
4825
4880
|
},
|
|
4826
4881
|
{
|
|
4827
4882
|
"kind": "javascript-module",
|
|
4828
|
-
"path": "src/
|
|
4829
|
-
"declarations": [],
|
|
4830
|
-
"exports": [
|
|
4831
|
-
{
|
|
4832
|
-
"kind": "js",
|
|
4833
|
-
"name": "*",
|
|
4834
|
-
"declaration": {
|
|
4835
|
-
"name": "*",
|
|
4836
|
-
"package": "./sync"
|
|
4837
|
-
}
|
|
4838
|
-
}
|
|
4839
|
-
]
|
|
4840
|
-
},
|
|
4841
|
-
{
|
|
4842
|
-
"kind": "javascript-module",
|
|
4843
|
-
"path": "src/directives/sync/sync.ts",
|
|
4883
|
+
"path": "src/encoding/base64/decode.ts",
|
|
4844
4884
|
"declarations": [
|
|
4845
|
-
{
|
|
4846
|
-
"kind": "variable",
|
|
4847
|
-
"name": "defaultEventMap",
|
|
4848
|
-
"type": {
|
|
4849
|
-
"text": "Map<string, EventName>"
|
|
4850
|
-
},
|
|
4851
|
-
"default": "new Map([\n ['FAST-TEXT-AREA', 'input'],\n ['FAST-TEXT-FIELD', 'input'],\n ['FOUNDATION-TEXT-AREA', 'input'],\n ['FOUNDATION-TEXT-FIELD', 'input'],\n ['INPUT', 'input'],\n ['ZERO-TEXT-FIELD', 'input'],\n])",
|
|
4852
|
-
"description": "A map that associates specific HTML element tags with their corresponding default event names.",
|
|
4853
|
-
"privacy": "public"
|
|
4854
|
-
},
|
|
4855
4885
|
{
|
|
4856
4886
|
"kind": "function",
|
|
4857
|
-
"name": "
|
|
4887
|
+
"name": "decodeFromBase64",
|
|
4858
4888
|
"return": {
|
|
4859
4889
|
"type": {
|
|
4860
|
-
"text": "
|
|
4861
|
-
}
|
|
4862
|
-
},
|
|
4863
|
-
"parameters": [
|
|
4864
|
-
{
|
|
4865
|
-
"name": "binding",
|
|
4866
|
-
"type": {
|
|
4867
|
-
"text": "Binding<TSource, TReturn>"
|
|
4868
|
-
}
|
|
4869
|
-
},
|
|
4870
|
-
{
|
|
4871
|
-
"name": "conversionType",
|
|
4872
|
-
"default": "'string'",
|
|
4873
|
-
"type": {
|
|
4874
|
-
"text": "ConversionType"
|
|
4875
|
-
}
|
|
4876
|
-
},
|
|
4877
|
-
{
|
|
4878
|
-
"name": "eventName",
|
|
4879
|
-
"default": "'default'",
|
|
4880
|
-
"type": {
|
|
4881
|
-
"text": "EventName"
|
|
4882
|
-
}
|
|
4883
|
-
},
|
|
4884
|
-
{
|
|
4885
|
-
"name": "keyAttr",
|
|
4886
|
-
"optional": true,
|
|
4887
|
-
"type": {
|
|
4888
|
-
"text": "string"
|
|
4889
|
-
}
|
|
4890
|
-
}
|
|
4891
|
-
],
|
|
4892
|
-
"description": "Creates a synchronization directive that binds a data source to an HTML element,",
|
|
4893
|
-
"privacy": "public"
|
|
4894
|
-
}
|
|
4895
|
-
],
|
|
4896
|
-
"exports": [
|
|
4897
|
-
{
|
|
4898
|
-
"kind": "js",
|
|
4899
|
-
"name": "defaultEventMap",
|
|
4900
|
-
"declaration": {
|
|
4901
|
-
"name": "defaultEventMap",
|
|
4902
|
-
"module": "src/directives/sync/sync.ts"
|
|
4903
|
-
}
|
|
4904
|
-
},
|
|
4905
|
-
{
|
|
4906
|
-
"kind": "js",
|
|
4907
|
-
"name": "sync",
|
|
4908
|
-
"declaration": {
|
|
4909
|
-
"name": "sync",
|
|
4910
|
-
"module": "src/directives/sync/sync.ts"
|
|
4911
|
-
}
|
|
4912
|
-
}
|
|
4913
|
-
]
|
|
4914
|
-
},
|
|
4915
|
-
{
|
|
4916
|
-
"kind": "javascript-module",
|
|
4917
|
-
"path": "src/directives/when-else/index.ts",
|
|
4918
|
-
"declarations": [],
|
|
4919
|
-
"exports": [
|
|
4920
|
-
{
|
|
4921
|
-
"kind": "js",
|
|
4922
|
-
"name": "*",
|
|
4923
|
-
"declaration": {
|
|
4924
|
-
"name": "*",
|
|
4925
|
-
"package": "./when-else"
|
|
4926
|
-
}
|
|
4927
|
-
}
|
|
4928
|
-
]
|
|
4929
|
-
},
|
|
4930
|
-
{
|
|
4931
|
-
"kind": "javascript-module",
|
|
4932
|
-
"path": "src/directives/when-else/when-else.ts",
|
|
4933
|
-
"declarations": [
|
|
4934
|
-
{
|
|
4935
|
-
"kind": "function",
|
|
4936
|
-
"name": "whenElse",
|
|
4937
|
-
"return": {
|
|
4938
|
-
"type": {
|
|
4939
|
-
"text": "CaptureType<TSource>"
|
|
4940
|
-
}
|
|
4941
|
-
},
|
|
4942
|
-
"parameters": [
|
|
4943
|
-
{
|
|
4944
|
-
"name": "binding",
|
|
4945
|
-
"type": {
|
|
4946
|
-
"text": "Binding<TSource, TReturn>"
|
|
4947
|
-
},
|
|
4948
|
-
"description": "The condition to test for rendering."
|
|
4949
|
-
},
|
|
4950
|
-
{
|
|
4951
|
-
"name": "trueTemplateOrTemplateBinding",
|
|
4952
|
-
"type": {
|
|
4953
|
-
"text": "WhenTemplate<TSource>"
|
|
4954
|
-
},
|
|
4955
|
-
"description": "The template or a binding that gets the template to render when the condition is true."
|
|
4956
|
-
},
|
|
4957
|
-
{
|
|
4958
|
-
"name": "falseTemplateOrTemplateBinding",
|
|
4959
|
-
"type": {
|
|
4960
|
-
"text": "WhenTemplate<TSource>"
|
|
4961
|
-
},
|
|
4962
|
-
"description": "The template or a binding that gets the template to render when the condition is false."
|
|
4963
|
-
}
|
|
4964
|
-
],
|
|
4965
|
-
"description": "Directive that allows supplying an \"else\" template to the traditional https://www.fast.design/docs/api/fast-element.when/#when-function directive",
|
|
4966
|
-
"privacy": "public"
|
|
4967
|
-
}
|
|
4968
|
-
],
|
|
4969
|
-
"exports": [
|
|
4970
|
-
{
|
|
4971
|
-
"kind": "js",
|
|
4972
|
-
"name": "whenElse",
|
|
4973
|
-
"declaration": {
|
|
4974
|
-
"name": "whenElse",
|
|
4975
|
-
"module": "src/directives/when-else/when-else.ts"
|
|
4976
|
-
}
|
|
4977
|
-
}
|
|
4978
|
-
]
|
|
4979
|
-
},
|
|
4980
|
-
{
|
|
4981
|
-
"kind": "javascript-module",
|
|
4982
|
-
"path": "src/encoding/base64/decode.ts",
|
|
4983
|
-
"declarations": [
|
|
4984
|
-
{
|
|
4985
|
-
"kind": "function",
|
|
4986
|
-
"name": "decodeFromBase64",
|
|
4987
|
-
"return": {
|
|
4988
|
-
"type": {
|
|
4989
|
-
"text": ""
|
|
4890
|
+
"text": ""
|
|
4990
4891
|
}
|
|
4991
4892
|
},
|
|
4992
4893
|
"parameters": [
|
|
@@ -5131,6 +5032,160 @@
|
|
|
5131
5032
|
}
|
|
5132
5033
|
]
|
|
5133
5034
|
},
|
|
5035
|
+
{
|
|
5036
|
+
"kind": "javascript-module",
|
|
5037
|
+
"path": "src/directives/sync/index.ts",
|
|
5038
|
+
"declarations": [],
|
|
5039
|
+
"exports": [
|
|
5040
|
+
{
|
|
5041
|
+
"kind": "js",
|
|
5042
|
+
"name": "*",
|
|
5043
|
+
"declaration": {
|
|
5044
|
+
"name": "*",
|
|
5045
|
+
"package": "./sync"
|
|
5046
|
+
}
|
|
5047
|
+
}
|
|
5048
|
+
]
|
|
5049
|
+
},
|
|
5050
|
+
{
|
|
5051
|
+
"kind": "javascript-module",
|
|
5052
|
+
"path": "src/directives/sync/sync.ts",
|
|
5053
|
+
"declarations": [
|
|
5054
|
+
{
|
|
5055
|
+
"kind": "variable",
|
|
5056
|
+
"name": "defaultEventMap",
|
|
5057
|
+
"type": {
|
|
5058
|
+
"text": "Map<string, EventName>"
|
|
5059
|
+
},
|
|
5060
|
+
"default": "new Map([\n ['FAST-TEXT-AREA', 'input'],\n ['FAST-TEXT-FIELD', 'input'],\n ['FOUNDATION-TEXT-AREA', 'input'],\n ['FOUNDATION-TEXT-FIELD', 'input'],\n ['INPUT', 'input'],\n ['ZERO-TEXT-FIELD', 'input'],\n])",
|
|
5061
|
+
"description": "A map that associates specific HTML element tags with their corresponding default event names.",
|
|
5062
|
+
"privacy": "public"
|
|
5063
|
+
},
|
|
5064
|
+
{
|
|
5065
|
+
"kind": "function",
|
|
5066
|
+
"name": "sync",
|
|
5067
|
+
"return": {
|
|
5068
|
+
"type": {
|
|
5069
|
+
"text": "CaptureType<TSource>"
|
|
5070
|
+
}
|
|
5071
|
+
},
|
|
5072
|
+
"parameters": [
|
|
5073
|
+
{
|
|
5074
|
+
"name": "binding",
|
|
5075
|
+
"type": {
|
|
5076
|
+
"text": "Binding<TSource, TReturn>"
|
|
5077
|
+
}
|
|
5078
|
+
},
|
|
5079
|
+
{
|
|
5080
|
+
"name": "conversionType",
|
|
5081
|
+
"default": "'string'",
|
|
5082
|
+
"type": {
|
|
5083
|
+
"text": "ConversionType"
|
|
5084
|
+
}
|
|
5085
|
+
},
|
|
5086
|
+
{
|
|
5087
|
+
"name": "eventName",
|
|
5088
|
+
"default": "'default'",
|
|
5089
|
+
"type": {
|
|
5090
|
+
"text": "EventName"
|
|
5091
|
+
}
|
|
5092
|
+
},
|
|
5093
|
+
{
|
|
5094
|
+
"name": "keyAttr",
|
|
5095
|
+
"optional": true,
|
|
5096
|
+
"type": {
|
|
5097
|
+
"text": "string"
|
|
5098
|
+
}
|
|
5099
|
+
}
|
|
5100
|
+
],
|
|
5101
|
+
"description": "Creates a synchronization directive that binds a data source to an HTML element,",
|
|
5102
|
+
"privacy": "public"
|
|
5103
|
+
}
|
|
5104
|
+
],
|
|
5105
|
+
"exports": [
|
|
5106
|
+
{
|
|
5107
|
+
"kind": "js",
|
|
5108
|
+
"name": "defaultEventMap",
|
|
5109
|
+
"declaration": {
|
|
5110
|
+
"name": "defaultEventMap",
|
|
5111
|
+
"module": "src/directives/sync/sync.ts"
|
|
5112
|
+
}
|
|
5113
|
+
},
|
|
5114
|
+
{
|
|
5115
|
+
"kind": "js",
|
|
5116
|
+
"name": "sync",
|
|
5117
|
+
"declaration": {
|
|
5118
|
+
"name": "sync",
|
|
5119
|
+
"module": "src/directives/sync/sync.ts"
|
|
5120
|
+
}
|
|
5121
|
+
}
|
|
5122
|
+
]
|
|
5123
|
+
},
|
|
5124
|
+
{
|
|
5125
|
+
"kind": "javascript-module",
|
|
5126
|
+
"path": "src/directives/when-else/index.ts",
|
|
5127
|
+
"declarations": [],
|
|
5128
|
+
"exports": [
|
|
5129
|
+
{
|
|
5130
|
+
"kind": "js",
|
|
5131
|
+
"name": "*",
|
|
5132
|
+
"declaration": {
|
|
5133
|
+
"name": "*",
|
|
5134
|
+
"package": "./when-else"
|
|
5135
|
+
}
|
|
5136
|
+
}
|
|
5137
|
+
]
|
|
5138
|
+
},
|
|
5139
|
+
{
|
|
5140
|
+
"kind": "javascript-module",
|
|
5141
|
+
"path": "src/directives/when-else/when-else.ts",
|
|
5142
|
+
"declarations": [
|
|
5143
|
+
{
|
|
5144
|
+
"kind": "function",
|
|
5145
|
+
"name": "whenElse",
|
|
5146
|
+
"return": {
|
|
5147
|
+
"type": {
|
|
5148
|
+
"text": "CaptureType<TSource>"
|
|
5149
|
+
}
|
|
5150
|
+
},
|
|
5151
|
+
"parameters": [
|
|
5152
|
+
{
|
|
5153
|
+
"name": "binding",
|
|
5154
|
+
"type": {
|
|
5155
|
+
"text": "Binding<TSource, TReturn>"
|
|
5156
|
+
},
|
|
5157
|
+
"description": "The condition to test for rendering."
|
|
5158
|
+
},
|
|
5159
|
+
{
|
|
5160
|
+
"name": "trueTemplateOrTemplateBinding",
|
|
5161
|
+
"type": {
|
|
5162
|
+
"text": "WhenTemplate<TSource>"
|
|
5163
|
+
},
|
|
5164
|
+
"description": "The template or a binding that gets the template to render when the condition is true."
|
|
5165
|
+
},
|
|
5166
|
+
{
|
|
5167
|
+
"name": "falseTemplateOrTemplateBinding",
|
|
5168
|
+
"type": {
|
|
5169
|
+
"text": "WhenTemplate<TSource>"
|
|
5170
|
+
},
|
|
5171
|
+
"description": "The template or a binding that gets the template to render when the condition is false."
|
|
5172
|
+
}
|
|
5173
|
+
],
|
|
5174
|
+
"description": "Directive that allows supplying an \"else\" template to the traditional https://www.fast.design/docs/api/fast-element.when/#when-function directive",
|
|
5175
|
+
"privacy": "public"
|
|
5176
|
+
}
|
|
5177
|
+
],
|
|
5178
|
+
"exports": [
|
|
5179
|
+
{
|
|
5180
|
+
"kind": "js",
|
|
5181
|
+
"name": "whenElse",
|
|
5182
|
+
"declaration": {
|
|
5183
|
+
"name": "whenElse",
|
|
5184
|
+
"module": "src/directives/when-else/when-else.ts"
|
|
5185
|
+
}
|
|
5186
|
+
}
|
|
5187
|
+
]
|
|
5188
|
+
},
|
|
5134
5189
|
{
|
|
5135
5190
|
"kind": "javascript-module",
|
|
5136
5191
|
"path": "src/mappers/dto/index.ts",
|
|
@@ -1,2 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for {@link setActivatedFeatures}.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export type SetActivatedFeaturesOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* When true (default), navigates to the updated URL so boot-time consumers re-evaluate.
|
|
8
|
+
* When false, updates the URL via `history.replaceState` without reloading.
|
|
9
|
+
*/
|
|
10
|
+
reload?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Returns true when `feature.<name>` is present in the given search string.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare const isFeatureActivatedInSearch: (search: string, feature: string) => boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Returns the names of all feature flags present in the given search string.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare const getActivatedFeaturesFromSearch: (search: string) => string[];
|
|
22
|
+
/**
|
|
23
|
+
* Returns a new URL with `feature.*` query params rewritten to match the given feature list.
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare const applyActivatedFeaturesToUrl: (url: URL, features: string[]) => URL;
|
|
27
|
+
/**
|
|
28
|
+
* Returns true when `feature.<name>` is present in the current URL query string.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
1
31
|
export declare const isFeatureActivated: (feature: string) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the names of all feature flags currently present in the URL query string.
|
|
34
|
+
* @example
|
|
35
|
+
* // URL: ?feature.ai&feature.forceHttp=true
|
|
36
|
+
* getActivatedFeatures(); // ['ai', 'forceHttp']
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export declare const getActivatedFeatures: () => string[];
|
|
40
|
+
/**
|
|
41
|
+
* Rewrites URL `feature.*` query params to match the given feature list (presence-only).
|
|
42
|
+
* Removes any existing `feature.*` params, then adds each selected feature as `feature.<name>`.
|
|
43
|
+
* Reloads by default so boot-time consumers (e.g. AI registration) pick up the change.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export declare const setActivatedFeatures: (features: string[], options?: SetActivatedFeaturesOptions) => void;
|
|
2
47
|
//# sourceMappingURL=featureFlags.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureFlags.d.ts","sourceRoot":"","sources":["../../../src/feature-flags/featureFlags.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"featureFlags.d.ts","sourceRoot":"","sources":["../../../src/feature-flags/featureFlags.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,GAAI,QAAQ,MAAM,EAAE,SAAS,MAAM,KAAG,OAe5E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,GAAI,QAAQ,MAAM,KAAG,MAAM,EAcrE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GAAI,KAAK,GAAG,EAAE,UAAU,MAAM,EAAE,KAAG,GAmB1E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,KAAG,OACQ,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,QAAO,MAAM,EACU,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,EAAE,EAClB,UAAS,2BAAgC,KACxC,IAUF,CAAC"}
|
|
@@ -70,6 +70,15 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
|
|
|
70
70
|
* @internal
|
|
71
71
|
**/
|
|
72
72
|
#_shouldForceLifecycle: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Set once a short grace period (`setTimeout`) has elapsed since a blocked ('reflow')
|
|
75
|
+
* disconnect. Some consumers run defensive cleanup after the block via schedulers that can
|
|
76
|
+
* outlast a microtask (e.g. FAST's `DOM.queueUpdate`), so a macrotask-scale grace period is
|
|
77
|
+
* needed - once it has passed, the paired reconnect must not stay blocked, or the consumer
|
|
78
|
+
* never re-initializes.
|
|
79
|
+
* @internal
|
|
80
|
+
**/
|
|
81
|
+
#_blockedDisconnectSurvivedGracePeriod: boolean;
|
|
73
82
|
/**
|
|
74
83
|
* @privateRemarks
|
|
75
84
|
* Rather than using the basic implementation of cloning we run a copy constructor (deepClone)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/mixins/lifecycle/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC,WAAW,GAAG,WAAW,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,yBAAyB,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,KAAK,SAAS,GAAG,yBAAyB,GAAG,oBAAoB,GAAG,YAAY,CAAC;AAEjF,KAAK,aAAa,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,CAAC;AAK5D;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,6BAA6B,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/mixins/lifecycle/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC,WAAW,GAAG,WAAW,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,yBAAyB,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,KAAK,SAAS,GAAG,yBAAyB,GAAG,oBAAoB,GAAG,YAAY,CAAC;AAEjF,KAAK,aAAa,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,CAAC;AAK5D;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,6BAA6B,EAAE,MAAM,CAAC;kBAwCtD,GAAG,EAAE;QAtC1B,iBAAiB;qBACJ,SAAS;QAEtB;;;YAGI;2BACe,MAAM;QACzB;;;YAGI;0BACc,OAAO;QACzB;;;;;;;YAOI;0BACc,MAAM,CAAC,OAAO;QAChC;;;;YAII;gCACoB,OAAO;QAC/B;;;;;;;YAOI;gDACoC,OAAO;QAM/C;;;;;WAKG;yBACuB,OAAO,GAAG,IAAI;QAUxC;;;;;;WAMG;qBACU,IAAI;QAMjB;;;WAGG;;QAmBH;;;;;WAKG;;wDAwB6C,aAAa,GAAG,OAAO;QAyCvE;;;;;;WAMG;qCAC0B,OAAO,GAAG,SAAS;6BA4B3B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAM1B,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,mBAAmB,eAAkC,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const FEATURE_PREFIX = 'feature.';
|
|
2
|
+
const isFeatureParamKey = (key) => key.toLowerCase().startsWith(FEATURE_PREFIX);
|
|
3
|
+
/**
|
|
4
|
+
* Returns true when `feature.<name>` is present in the given search string.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export const isFeatureActivatedInSearch = (search, feature) => {
|
|
8
|
+
if (!feature) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
const featureKey = `${FEATURE_PREFIX}${feature}`.toLowerCase();
|
|
12
|
+
const params = new URLSearchParams(search);
|
|
6
13
|
for (const [key] of params.entries()) {
|
|
7
14
|
if (key.toLowerCase() === featureKey) {
|
|
8
15
|
return true;
|
|
@@ -10,3 +17,69 @@ export const isFeatureActivated = (feature) => {
|
|
|
10
17
|
}
|
|
11
18
|
return false;
|
|
12
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Returns the names of all feature flags present in the given search string.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export const getActivatedFeaturesFromSearch = (search) => {
|
|
25
|
+
const params = new URLSearchParams(search);
|
|
26
|
+
const features = [];
|
|
27
|
+
for (const [key] of params.entries()) {
|
|
28
|
+
if (isFeatureParamKey(key)) {
|
|
29
|
+
const feature = key.slice(FEATURE_PREFIX.length);
|
|
30
|
+
if (feature) {
|
|
31
|
+
features.push(feature);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return features;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Returns a new URL with `feature.*` query params rewritten to match the given feature list.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export const applyActivatedFeaturesToUrl = (url, features) => {
|
|
42
|
+
const next = new URL(url.href);
|
|
43
|
+
const params = next.searchParams;
|
|
44
|
+
for (const key of [...params.keys()]) {
|
|
45
|
+
if (isFeatureParamKey(key)) {
|
|
46
|
+
params.delete(key);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
for (const feature of features) {
|
|
50
|
+
if (feature) {
|
|
51
|
+
// Use an explicit value so routers/normalizers that drop empty query values
|
|
52
|
+
// (e.g. some React Router redirect paths) still preserve the flag.
|
|
53
|
+
params.set(`${FEATURE_PREFIX}${feature}`, 'true');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return next;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Returns true when `feature.<name>` is present in the current URL query string.
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
export const isFeatureActivated = (feature) => isFeatureActivatedInSearch(window.location.search, feature);
|
|
63
|
+
/**
|
|
64
|
+
* Returns the names of all feature flags currently present in the URL query string.
|
|
65
|
+
* @example
|
|
66
|
+
* // URL: ?feature.ai&feature.forceHttp=true
|
|
67
|
+
* getActivatedFeatures(); // ['ai', 'forceHttp']
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
export const getActivatedFeatures = () => getActivatedFeaturesFromSearch(window.location.search);
|
|
71
|
+
/**
|
|
72
|
+
* Rewrites URL `feature.*` query params to match the given feature list (presence-only).
|
|
73
|
+
* Removes any existing `feature.*` params, then adds each selected feature as `feature.<name>`.
|
|
74
|
+
* Reloads by default so boot-time consumers (e.g. AI registration) pick up the change.
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
export const setActivatedFeatures = (features, options = {}) => {
|
|
78
|
+
const { reload = true } = options;
|
|
79
|
+
const url = applyActivatedFeaturesToUrl(new URL(window.location.href), features);
|
|
80
|
+
if (reload) {
|
|
81
|
+
window.location.assign(url.toString());
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
window.history.replaceState({}, '', url.toString());
|
|
85
|
+
};
|
|
@@ -11,7 +11,7 @@ const CLEANUP_TIMEOUT_MS = 10000;
|
|
|
11
11
|
* #_ syntax is used for a javascript private method/variable
|
|
12
12
|
* we can't use private/protected from typescript in an anonymous class like this
|
|
13
13
|
*/
|
|
14
|
-
export const LifecycleMixin = (Base) => { var _instances, __container, __latestTokenCode, __hasFirstLoaded, __cleanupTimeout, __shouldForceLifecycle, __blockLifecycleDueToTokenChange, __tryFindContainingLayout, _a; return _a = class extends Base {
|
|
14
|
+
export const LifecycleMixin = (Base) => { var _instances, __container, __latestTokenCode, __hasFirstLoaded, __cleanupTimeout, __shouldForceLifecycle, __blockedDisconnectSurvivedGracePeriod, __blockLifecycleDueToTokenChange, __tryFindContainingLayout, _a; return _a = class extends Base {
|
|
15
15
|
constructor(...args) {
|
|
16
16
|
super(args);
|
|
17
17
|
_instances.add(this);
|
|
@@ -42,6 +42,15 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
|
|
|
42
42
|
* @internal
|
|
43
43
|
**/
|
|
44
44
|
__shouldForceLifecycle.set(this, false);
|
|
45
|
+
/**
|
|
46
|
+
* Set once a short grace period (`setTimeout`) has elapsed since a blocked ('reflow')
|
|
47
|
+
* disconnect. Some consumers run defensive cleanup after the block via schedulers that can
|
|
48
|
+
* outlast a microtask (e.g. FAST's `DOM.queueUpdate`), so a macrotask-scale grace period is
|
|
49
|
+
* needed - once it has passed, the paired reconnect must not stay blocked, or the consumer
|
|
50
|
+
* never re-initializes.
|
|
51
|
+
* @internal
|
|
52
|
+
**/
|
|
53
|
+
__blockedDisconnectSurvivedGracePeriod.set(this, false);
|
|
45
54
|
}
|
|
46
55
|
/**
|
|
47
56
|
* @privateRemarks
|
|
@@ -127,6 +136,7 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
|
|
|
127
136
|
__hasFirstLoaded = new WeakMap(),
|
|
128
137
|
__cleanupTimeout = new WeakMap(),
|
|
129
138
|
__shouldForceLifecycle = new WeakMap(),
|
|
139
|
+
__blockedDisconnectSurvivedGracePeriod = new WeakMap(),
|
|
130
140
|
_instances = new WeakSet(),
|
|
131
141
|
__blockLifecycleDueToTokenChange = function __blockLifecycleDueToTokenChange(lifecycleType) {
|
|
132
142
|
var _b, _c;
|
|
@@ -146,6 +156,14 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
|
|
|
146
156
|
// 'reconnect' - otherwise unrelated layout changes while disconnected can block it forever.
|
|
147
157
|
__classPrivateFieldSet(this, __hasFirstLoaded, false, "f");
|
|
148
158
|
}
|
|
159
|
+
else {
|
|
160
|
+
// Blocked disconnect: track whether a grace period elapses before the paired reconnect
|
|
161
|
+
// arrives. See `#_blockedDisconnectSurvivedGracePeriod` for why this matters.
|
|
162
|
+
__classPrivateFieldSet(this, __blockedDisconnectSurvivedGracePeriod, false, "f");
|
|
163
|
+
setTimeout(() => {
|
|
164
|
+
__classPrivateFieldSet(this, __blockedDisconnectSurvivedGracePeriod, true, "f");
|
|
165
|
+
}, 0);
|
|
166
|
+
}
|
|
149
167
|
__classPrivateFieldSet(this, __cleanupTimeout, setTimeout(() => {
|
|
150
168
|
__classPrivateFieldSet(this, __shouldForceLifecycle, result, "f");
|
|
151
169
|
if (__classPrivateFieldGet(this, __shouldForceLifecycle, "f")) {
|
|
@@ -154,7 +172,7 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
|
|
|
154
172
|
}, CLEANUP_TIMEOUT_MS), "f");
|
|
155
173
|
}
|
|
156
174
|
else if (lifecycleType === 'reconnect') {
|
|
157
|
-
result = tokensDifferent;
|
|
175
|
+
result = tokensDifferent && !__classPrivateFieldGet(this, __blockedDisconnectSurvivedGracePeriod, "f");
|
|
158
176
|
__classPrivateFieldSet(this, __latestTokenCode, (_c = __classPrivateFieldGet(this, __container, "f").lifecycleUpdateToken) !== null && _c !== void 0 ? _c : '', "f");
|
|
159
177
|
clearTimeout(__classPrivateFieldGet(this, __cleanupTimeout, "f"));
|
|
160
178
|
}
|
|
@@ -5829,6 +5829,30 @@
|
|
|
5829
5829
|
}
|
|
5830
5830
|
]
|
|
5831
5831
|
},
|
|
5832
|
+
{
|
|
5833
|
+
"kind": "Function",
|
|
5834
|
+
"canonicalReference": "@genesislcap/foundation-utils!getActivatedFeatures:function(1)",
|
|
5835
|
+
"docComment": "/**\n * Returns the names of all feature flags currently present in the URL query string.\n *\n * @example\n *\n * // URL: ?feature.ai&feature.forceHttp=true getActivatedFeatures(); // ['ai', 'forceHttp']\n *\n * @public\n */\n",
|
|
5836
|
+
"excerptTokens": [
|
|
5837
|
+
{
|
|
5838
|
+
"kind": "Content",
|
|
5839
|
+
"text": "getActivatedFeatures: () => "
|
|
5840
|
+
},
|
|
5841
|
+
{
|
|
5842
|
+
"kind": "Content",
|
|
5843
|
+
"text": "string[]"
|
|
5844
|
+
}
|
|
5845
|
+
],
|
|
5846
|
+
"fileUrlPath": "src/feature-flags/featureFlags.ts",
|
|
5847
|
+
"returnTypeTokenRange": {
|
|
5848
|
+
"startIndex": 1,
|
|
5849
|
+
"endIndex": 2
|
|
5850
|
+
},
|
|
5851
|
+
"releaseTag": "Public",
|
|
5852
|
+
"overloadIndex": 1,
|
|
5853
|
+
"parameters": [],
|
|
5854
|
+
"name": "getActivatedFeatures"
|
|
5855
|
+
},
|
|
5832
5856
|
{
|
|
5833
5857
|
"kind": "Function",
|
|
5834
5858
|
"canonicalReference": "@genesislcap/foundation-utils!getAllElements:function(1)",
|
|
@@ -8246,7 +8270,7 @@
|
|
|
8246
8270
|
{
|
|
8247
8271
|
"kind": "Function",
|
|
8248
8272
|
"canonicalReference": "@genesislcap/foundation-utils!isFeatureActivated:function(1)",
|
|
8249
|
-
"docComment": "",
|
|
8273
|
+
"docComment": "/**\n * Returns true when `feature.<name>` is present in the current URL query string.\n *\n * @public\n */\n",
|
|
8250
8274
|
"excerptTokens": [
|
|
8251
8275
|
{
|
|
8252
8276
|
"kind": "Content",
|
|
@@ -9094,7 +9118,7 @@
|
|
|
9094
9118
|
},
|
|
9095
9119
|
{
|
|
9096
9120
|
"kind": "Content",
|
|
9097
|
-
"text": ";\n #_shouldForceLifecycle: boolean;\n cloneNode(deep?: boolean): "
|
|
9121
|
+
"text": ";\n #_shouldForceLifecycle: boolean;\n #_blockedDisconnectSurvivedGracePeriod: boolean;\n cloneNode(deep?: boolean): "
|
|
9098
9122
|
},
|
|
9099
9123
|
{
|
|
9100
9124
|
"kind": "Reference",
|
|
@@ -17879,6 +17903,90 @@
|
|
|
17879
17903
|
"endIndex": 4
|
|
17880
17904
|
}
|
|
17881
17905
|
},
|
|
17906
|
+
{
|
|
17907
|
+
"kind": "Function",
|
|
17908
|
+
"canonicalReference": "@genesislcap/foundation-utils!setActivatedFeatures:function(1)",
|
|
17909
|
+
"docComment": "/**\n * Rewrites URL `feature.*` query params to match the given feature list (presence-only). Removes any existing `feature.*` params, then adds each selected feature as `feature.<name>`. Reloads by default so boot-time consumers (e.g. AI registration) pick up the change.\n *\n * @public\n */\n",
|
|
17910
|
+
"excerptTokens": [
|
|
17911
|
+
{
|
|
17912
|
+
"kind": "Content",
|
|
17913
|
+
"text": "setActivatedFeatures: (features: "
|
|
17914
|
+
},
|
|
17915
|
+
{
|
|
17916
|
+
"kind": "Content",
|
|
17917
|
+
"text": "string[]"
|
|
17918
|
+
},
|
|
17919
|
+
{
|
|
17920
|
+
"kind": "Content",
|
|
17921
|
+
"text": ", options?: "
|
|
17922
|
+
},
|
|
17923
|
+
{
|
|
17924
|
+
"kind": "Reference",
|
|
17925
|
+
"text": "SetActivatedFeaturesOptions",
|
|
17926
|
+
"canonicalReference": "@genesislcap/foundation-utils!SetActivatedFeaturesOptions:type"
|
|
17927
|
+
},
|
|
17928
|
+
{
|
|
17929
|
+
"kind": "Content",
|
|
17930
|
+
"text": ") => "
|
|
17931
|
+
},
|
|
17932
|
+
{
|
|
17933
|
+
"kind": "Content",
|
|
17934
|
+
"text": "void"
|
|
17935
|
+
}
|
|
17936
|
+
],
|
|
17937
|
+
"fileUrlPath": "src/feature-flags/featureFlags.ts",
|
|
17938
|
+
"returnTypeTokenRange": {
|
|
17939
|
+
"startIndex": 5,
|
|
17940
|
+
"endIndex": 6
|
|
17941
|
+
},
|
|
17942
|
+
"releaseTag": "Public",
|
|
17943
|
+
"overloadIndex": 1,
|
|
17944
|
+
"parameters": [
|
|
17945
|
+
{
|
|
17946
|
+
"parameterName": "features",
|
|
17947
|
+
"parameterTypeTokenRange": {
|
|
17948
|
+
"startIndex": 1,
|
|
17949
|
+
"endIndex": 2
|
|
17950
|
+
},
|
|
17951
|
+
"isOptional": false
|
|
17952
|
+
},
|
|
17953
|
+
{
|
|
17954
|
+
"parameterName": "options",
|
|
17955
|
+
"parameterTypeTokenRange": {
|
|
17956
|
+
"startIndex": 3,
|
|
17957
|
+
"endIndex": 4
|
|
17958
|
+
},
|
|
17959
|
+
"isOptional": true
|
|
17960
|
+
}
|
|
17961
|
+
],
|
|
17962
|
+
"name": "setActivatedFeatures"
|
|
17963
|
+
},
|
|
17964
|
+
{
|
|
17965
|
+
"kind": "TypeAlias",
|
|
17966
|
+
"canonicalReference": "@genesislcap/foundation-utils!SetActivatedFeaturesOptions:type",
|
|
17967
|
+
"docComment": "/**\n * Options for {@link setActivatedFeatures}.\n *\n * @public\n */\n",
|
|
17968
|
+
"excerptTokens": [
|
|
17969
|
+
{
|
|
17970
|
+
"kind": "Content",
|
|
17971
|
+
"text": "export type SetActivatedFeaturesOptions = "
|
|
17972
|
+
},
|
|
17973
|
+
{
|
|
17974
|
+
"kind": "Content",
|
|
17975
|
+
"text": "{\n reload?: boolean;\n}"
|
|
17976
|
+
},
|
|
17977
|
+
{
|
|
17978
|
+
"kind": "Content",
|
|
17979
|
+
"text": ";"
|
|
17980
|
+
}
|
|
17981
|
+
],
|
|
17982
|
+
"fileUrlPath": "src/feature-flags/featureFlags.ts",
|
|
17983
|
+
"releaseTag": "Public",
|
|
17984
|
+
"name": "SetActivatedFeaturesOptions",
|
|
17985
|
+
"typeTokenRange": {
|
|
17986
|
+
"startIndex": 1,
|
|
17987
|
+
"endIndex": 2
|
|
17988
|
+
}
|
|
17989
|
+
},
|
|
17882
17990
|
{
|
|
17883
17991
|
"kind": "Variable",
|
|
17884
17992
|
"canonicalReference": "@genesislcap/foundation-utils!SHORTCUT_BLOCKED_DEFAULT_MESSAGE:var",
|
|
@@ -38,6 +38,12 @@ export declare const activeColorScheme: CSSDesignToken<string>;
|
|
|
38
38
|
*/
|
|
39
39
|
export declare let API_HOST: string;
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Returns a new URL with `feature.*` query params rewritten to match the given feature list.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export declare const applyActivatedFeaturesToUrl: (url: URL, features: string[]) => URL;
|
|
46
|
+
|
|
41
47
|
/**
|
|
42
48
|
* assureDesignSystem.
|
|
43
49
|
*
|
|
@@ -682,6 +688,21 @@ export declare namespace Genesis {
|
|
|
682
688
|
*/
|
|
683
689
|
export declare const GENESIS_SOCKET_URL: string;
|
|
684
690
|
|
|
691
|
+
/**
|
|
692
|
+
* Returns the names of all feature flags currently present in the URL query string.
|
|
693
|
+
* @example
|
|
694
|
+
* // URL: ?feature.ai&feature.forceHttp=true
|
|
695
|
+
* getActivatedFeatures(); // ['ai', 'forceHttp']
|
|
696
|
+
* @public
|
|
697
|
+
*/
|
|
698
|
+
export declare const getActivatedFeatures: () => string[];
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Returns the names of all feature flags present in the given search string.
|
|
702
|
+
* @internal
|
|
703
|
+
*/
|
|
704
|
+
export declare const getActivatedFeaturesFromSearch: (search: string) => string[];
|
|
705
|
+
|
|
685
706
|
/**
|
|
686
707
|
* Recursively gather all elements including those in shadow DOM
|
|
687
708
|
* @public
|
|
@@ -890,8 +911,18 @@ export declare const inSymphonyDesktop: () => boolean;
|
|
|
890
911
|
*/
|
|
891
912
|
export declare const isDev: () => boolean;
|
|
892
913
|
|
|
914
|
+
/**
|
|
915
|
+
* Returns true when `feature.<name>` is present in the current URL query string.
|
|
916
|
+
* @public
|
|
917
|
+
*/
|
|
893
918
|
export declare const isFeatureActivated: (feature: string) => boolean;
|
|
894
919
|
|
|
920
|
+
/**
|
|
921
|
+
* Returns true when `feature.<name>` is present in the given search string.
|
|
922
|
+
* @internal
|
|
923
|
+
*/
|
|
924
|
+
export declare const isFeatureActivatedInSearch: (search: string, feature: string) => boolean;
|
|
925
|
+
|
|
895
926
|
/**
|
|
896
927
|
* JSON replacer function.
|
|
897
928
|
* @param key - The object key.
|
|
@@ -1018,6 +1049,15 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
|
|
|
1018
1049
|
* @internal
|
|
1019
1050
|
**/
|
|
1020
1051
|
#_shouldForceLifecycle: boolean;
|
|
1052
|
+
/**
|
|
1053
|
+
* Set once a short grace period (`setTimeout`) has elapsed since a blocked ('reflow')
|
|
1054
|
+
* disconnect. Some consumers run defensive cleanup after the block via schedulers that can
|
|
1055
|
+
* outlast a microtask (e.g. FAST's `DOM.queueUpdate`), so a macrotask-scale grace period is
|
|
1056
|
+
* needed - once it has passed, the paired reconnect must not stay blocked, or the consumer
|
|
1057
|
+
* never re-initializes.
|
|
1058
|
+
* @internal
|
|
1059
|
+
**/
|
|
1060
|
+
#_blockedDisconnectSurvivedGracePeriod: boolean;
|
|
1021
1061
|
/**
|
|
1022
1062
|
* @privateRemarks
|
|
1023
1063
|
* Rather than using the basic implementation of cloning we run a copy constructor (deepClone)
|
|
@@ -2264,6 +2304,26 @@ export declare type ServerRowEntity = {
|
|
|
2264
2304
|
};
|
|
2265
2305
|
};
|
|
2266
2306
|
|
|
2307
|
+
/**
|
|
2308
|
+
* Rewrites URL `feature.*` query params to match the given feature list (presence-only).
|
|
2309
|
+
* Removes any existing `feature.*` params, then adds each selected feature as `feature.<name>`.
|
|
2310
|
+
* Reloads by default so boot-time consumers (e.g. AI registration) pick up the change.
|
|
2311
|
+
* @public
|
|
2312
|
+
*/
|
|
2313
|
+
export declare const setActivatedFeatures: (features: string[], options?: SetActivatedFeaturesOptions) => void;
|
|
2314
|
+
|
|
2315
|
+
/**
|
|
2316
|
+
* Options for {@link setActivatedFeatures}.
|
|
2317
|
+
* @public
|
|
2318
|
+
*/
|
|
2319
|
+
export declare type SetActivatedFeaturesOptions = {
|
|
2320
|
+
/**
|
|
2321
|
+
* When true (default), navigates to the updated URL so boot-time consumers re-evaluate.
|
|
2322
|
+
* When false, updates the URL via `history.replaceState` without reloading.
|
|
2323
|
+
*/
|
|
2324
|
+
reload?: boolean;
|
|
2325
|
+
};
|
|
2326
|
+
|
|
2267
2327
|
export declare const SHORTCUT_BLOCKED_DEFAULT_MESSAGE = "This shortcut is currently unavailable in this context.";
|
|
2268
2328
|
|
|
2269
2329
|
export declare const SHORTCUT_BLOCKED_DEFAULT_TITLE = "Shortcut blocked";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-utils",
|
|
3
3
|
"description": "Genesis Foundation Utils",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.499.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@genesislcap/foundation-testing": "14.
|
|
33
|
-
"@genesislcap/genx": "14.
|
|
34
|
-
"@genesislcap/rollup-builder": "14.
|
|
35
|
-
"@genesislcap/ts-builder": "14.
|
|
36
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
37
|
-
"@genesislcap/vite-builder": "14.
|
|
38
|
-
"@genesislcap/webpack-builder": "14.
|
|
32
|
+
"@genesislcap/foundation-testing": "14.499.0",
|
|
33
|
+
"@genesislcap/genx": "14.499.0",
|
|
34
|
+
"@genesislcap/rollup-builder": "14.499.0",
|
|
35
|
+
"@genesislcap/ts-builder": "14.499.0",
|
|
36
|
+
"@genesislcap/uvu-playwright-builder": "14.499.0",
|
|
37
|
+
"@genesislcap/vite-builder": "14.499.0",
|
|
38
|
+
"@genesislcap/webpack-builder": "14.499.0",
|
|
39
39
|
"@types/json-schema": "^7.0.11"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@genesislcap/expression-builder": "14.
|
|
43
|
-
"@genesislcap/foundation-logger": "14.
|
|
42
|
+
"@genesislcap/expression-builder": "14.499.0",
|
|
43
|
+
"@genesislcap/foundation-logger": "14.499.0",
|
|
44
44
|
"@microsoft/fast-components": "2.30.6",
|
|
45
45
|
"@microsoft/fast-element": "1.14.0",
|
|
46
46
|
"@microsoft/fast-foundation": "2.50.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"customElements": "dist/custom-elements.json",
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "49903bfdc57c5c5a7dd0d711d9717908df0b7ac7"
|
|
62
62
|
}
|