@genesislcap/foundation-header 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 +416 -2
- package/dist/dts/components/rapid-components.d.ts.map +1 -1
- package/dist/dts/components/zero-components.d.ts.map +1 -1
- package/dist/dts/config/templates.d.ts +1 -0
- package/dist/dts/config/templates.d.ts.map +1 -1
- package/dist/dts/main/feature-flags-nav.d.ts +19 -0
- package/dist/dts/main/feature-flags-nav.d.ts.map +1 -0
- package/dist/dts/main/main.d.ts +95 -1
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/react.d.ts +3 -0
- package/dist/dts/tags/tags.d.ts +4 -0
- package/dist/dts/tags/tags.d.ts.map +1 -1
- package/dist/dts/templates/rapid.template.d.ts.map +1 -1
- package/dist/esm/components/rapid-components.js +2 -2
- package/dist/esm/components/zero-components.js +2 -2
- package/dist/esm/config/templates.js +2 -0
- package/dist/esm/main/feature-flags-nav.js +5 -0
- package/dist/esm/main/main.js +107 -2
- package/dist/esm/main/main.styles.js +40 -0
- package/dist/esm/main/main.template.js +41 -1
- package/dist/esm/tags/tags.js +4 -0
- package/dist/esm/templates/rapid.template.js +41 -0
- package/dist/foundation-header.api.json +270 -2
- package/dist/foundation-header.d.ts +98 -1
- package/dist/react.cjs +18 -3
- package/dist/react.mjs +18 -3
- package/package.json +22 -22
|
@@ -326,6 +326,67 @@
|
|
|
326
326
|
"endIndex": 6
|
|
327
327
|
}
|
|
328
328
|
},
|
|
329
|
+
{
|
|
330
|
+
"kind": "TypeAlias",
|
|
331
|
+
"canonicalReference": "@genesislcap/foundation-header!FeatureFlagDefinition:type",
|
|
332
|
+
"docComment": "/**\n * A single feature flag option shown in the header multi-select.\n *\n * @public\n */\n",
|
|
333
|
+
"excerptTokens": [
|
|
334
|
+
{
|
|
335
|
+
"kind": "Content",
|
|
336
|
+
"text": "export type FeatureFlagDefinition = "
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"kind": "Content",
|
|
340
|
+
"text": "{\n name: string;\n label: string;\n}"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"kind": "Content",
|
|
344
|
+
"text": ";"
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"fileUrlPath": "src/main/main.ts",
|
|
348
|
+
"releaseTag": "Public",
|
|
349
|
+
"name": "FeatureFlagDefinition",
|
|
350
|
+
"typeTokenRange": {
|
|
351
|
+
"startIndex": 1,
|
|
352
|
+
"endIndex": 2
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"kind": "TypeAlias",
|
|
357
|
+
"canonicalReference": "@genesislcap/foundation-header!FeatureFlagOptions:type",
|
|
358
|
+
"docComment": "/**\n * Options for the feature flags selector\n *\n * @public\n */\n",
|
|
359
|
+
"excerptTokens": [
|
|
360
|
+
{
|
|
361
|
+
"kind": "Content",
|
|
362
|
+
"text": "export type FeatureFlagOptions = "
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"kind": "Content",
|
|
366
|
+
"text": "{\n availableFlags: "
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"kind": "Reference",
|
|
370
|
+
"text": "FeatureFlagDefinition",
|
|
371
|
+
"canonicalReference": "@genesislcap/foundation-header!FeatureFlagDefinition:type"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"kind": "Content",
|
|
375
|
+
"text": "[];\n}"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"kind": "Content",
|
|
379
|
+
"text": ";"
|
|
380
|
+
}
|
|
381
|
+
],
|
|
382
|
+
"fileUrlPath": "src/main/main.ts",
|
|
383
|
+
"releaseTag": "Public",
|
|
384
|
+
"name": "FeatureFlagOptions",
|
|
385
|
+
"typeTokenRange": {
|
|
386
|
+
"startIndex": 1,
|
|
387
|
+
"endIndex": 4
|
|
388
|
+
}
|
|
389
|
+
},
|
|
329
390
|
{
|
|
330
391
|
"kind": "Class",
|
|
331
392
|
"canonicalReference": "@genesislcap/foundation-header!FoundationHeader:class",
|
|
@@ -580,7 +641,7 @@
|
|
|
580
641
|
},
|
|
581
642
|
{
|
|
582
643
|
"kind": "Content",
|
|
583
|
-
"text": "{\n 'luminance-icon-clicked': void;\n 'logout-clicked': void;\n 'misc-icon-clicked': void;\n 'notification-icon-clicked': void;\n 'language-changed': void;\n 'nav-button-clicked': "
|
|
644
|
+
"text": "{\n 'luminance-icon-clicked': void;\n 'logout-clicked': void;\n 'misc-icon-clicked': void;\n 'notification-icon-clicked': void;\n 'language-changed': void;\n 'feature-flags-changed': string[];\n 'nav-button-clicked': "
|
|
584
645
|
},
|
|
585
646
|
{
|
|
586
647
|
"kind": "Reference",
|
|
@@ -607,7 +668,7 @@
|
|
|
607
668
|
{
|
|
608
669
|
"kind": "Class",
|
|
609
670
|
"canonicalReference": "@genesislcap/foundation-header!Navigation:class",
|
|
610
|
-
"docComment": "/**\n * Navigation micro-frontend includes navigation bar and flyout menu\n *\n * @remarks\n *\n * `foundation-header` micro-frontend can be added to the project to include a navigation bar and flyout menu. There are multiple ways that the behaviour of the component can be configured - the icon shown on the navigation bar and flyout menu (this shows the Genesis logo by default). - navigation links at the left-hand side of the navigation bar. - the control buttons on the right-hand side of the navigation bar can be shown or hidden, and their behaviour controlled via event listeners - The contents of the flyout menu.\n *\n * @param logo - src - Option attribute which sets the source of the image in the navigation bar and flyout menu. The Genesis logo will be shown if this attribute is not provided.\n *\n * @param logo - alt-text -Descriptive logo text.\n *\n * @param show - luminance-toggle-button - Boolean attribute which controls whether the navigation bar will display the luminance toggle icon.\n *\n * @param show - misc-toggle-button - Boolean attribute which controls whether the navigation bar will display the miscellaneous behaviour icon.\n *\n * @param notification - icon-clicked - Boolean attribute which controls whether the navigation bar will display the show notification icon.\n *\n * @param show - connection-indicator - Boolean attribute which controls whether the navigation bar will display the connection indicator.\n *\n * @param show - environment-indicator - Boolean attribute which controls whether the navigation bar will display the environment indicator.\n *\n * @param show - language-selector - Boolean attribute which controls whether the navigation bar will display the language selector.\n *\n * @param hide - side-bar - Boolean attribute which controls whether the navigation bar will display the side bar.\n *\n * @param show - account-menu - Boolean attribute which controls whether the navigation bar will display the account menu.\n *\n * @param logout - button-position - String attribute which controls the position of the logout button in the header.\n *\n * @param userName - String which defines the username to be displayed in the navigation bar.\n *\n * @param routeButtons - Array of objects which define the route buttons to be displayed in the navigation bar.\n *\n * @param routeNavItems - Array of {@link @genesislcap/foundation-ui#FoundationRouteNavItem | FoundationRouteNavItems} which define the route buttons to be displayed in the navigation bar.\n *\n * @param languageOptions - Object which defines the language options to be displayed in the language selector.\n *\n * @param inactivity - timeout-minutes - Number attribute which sets the inactivity timeout in minutes (default: 30).\n *\n * @param inactivity - warning-minutes - Number attribute which sets the inactivity warning time in minutes before timeout (default: 5).\n *\n * @param enable - inactivity-monitoring - Boolean attribute which controls whether to enable inactivity monitoring (default: true).\n *\n * @fires\n *\n * luminance-icon-clicked - Dispatched when the user clicks on the luminance toggle icon in the navigation bar.\n *\n * @fires\n *\n * misc-icon-clicked - Dispatched when the user clicks on the miscellaneous behaviour icon in the navigation bar.\n *\n * @fires\n *\n * notification-icon-clicked - Dispatched when the user clicks on the notification icon in the navigation bar.\n *\n * @fires\n *\n * language-changed - Dispatched when the user changes the language in the language selector.\n *\n * @fires\n *\n * logout-clicked - Dispatched when the user clicks logout button.\n *\n * @fires\n *\n * nav-button-clicked - Dispatched when the user clicks a navigation button. detail: `NavButtonClickDetail`\n *\n * @public\n */\n",
|
|
671
|
+
"docComment": "/**\n * Navigation micro-frontend includes navigation bar and flyout menu\n *\n * @remarks\n *\n * `foundation-header` micro-frontend can be added to the project to include a navigation bar and flyout menu. There are multiple ways that the behaviour of the component can be configured - the icon shown on the navigation bar and flyout menu (this shows the Genesis logo by default). - navigation links at the left-hand side of the navigation bar. - the control buttons on the right-hand side of the navigation bar can be shown or hidden, and their behaviour controlled via event listeners - The contents of the flyout menu.\n *\n * @param logo - src - Option attribute which sets the source of the image in the navigation bar and flyout menu. The Genesis logo will be shown if this attribute is not provided.\n *\n * @param logo - alt-text -Descriptive logo text.\n *\n * @param show - luminance-toggle-button - Boolean attribute which controls whether the navigation bar will display the luminance toggle icon.\n *\n * @param show - misc-toggle-button - Boolean attribute which controls whether the navigation bar will display the miscellaneous behaviour icon.\n *\n * @param notification - icon-clicked - Boolean attribute which controls whether the navigation bar will display the show notification icon.\n *\n * @param show - connection-indicator - Boolean attribute which controls whether the navigation bar will display the connection indicator.\n *\n * @param show - environment-indicator - Boolean attribute which controls whether the navigation bar will display the environment indicator.\n *\n * @param show - language-selector - Boolean attribute which controls whether the navigation bar will display the language selector.\n *\n * @param show - feature-flags-selector - Optional. Force-show the Feature Flags button; normally unnecessary because the button appears automatically when `featureFlagOptions.availableFlags` is non-empty.\n *\n * @param hide - side-bar - Boolean attribute which controls whether the navigation bar will display the side bar.\n *\n * @param show - account-menu - Boolean attribute which controls whether the navigation bar will display the account menu.\n *\n * @param logout - button-position - String attribute which controls the position of the logout button in the header.\n *\n * @param userName - String which defines the username to be displayed in the navigation bar.\n *\n * @param routeButtons - Array of objects which define the route buttons to be displayed in the navigation bar.\n *\n * @param routeNavItems - Array of {@link @genesislcap/foundation-ui#FoundationRouteNavItem | FoundationRouteNavItems} which define the route buttons to be displayed in the navigation bar.\n *\n * @param languageOptions - Object which defines the language options to be displayed in the language selector.\n *\n * @param featureFlagOptions - Object which defines the feature flag options. When `availableFlags` is non-empty, the Feature Flags button is shown automatically.\n *\n * @param inactivity - timeout-minutes - Number attribute which sets the inactivity timeout in minutes (default: 30).\n *\n * @param inactivity - warning-minutes - Number attribute which sets the inactivity warning time in minutes before timeout (default: 5).\n *\n * @param enable - inactivity-monitoring - Boolean attribute which controls whether to enable inactivity monitoring (default: true).\n *\n * @fires\n *\n * luminance-icon-clicked - Dispatched when the user clicks on the luminance toggle icon in the navigation bar.\n *\n * @fires\n *\n * misc-icon-clicked - Dispatched when the user clicks on the miscellaneous behaviour icon in the navigation bar.\n *\n * @fires\n *\n * notification-icon-clicked - Dispatched when the user clicks on the notification icon in the navigation bar.\n *\n * @fires\n *\n * language-changed - Dispatched when the user changes the language in the language selector.\n *\n * @fires\n *\n * feature-flags-changed - Dispatched when the user changes the selected feature flags. detail: `string[]`\n *\n * @fires\n *\n * logout-clicked - Dispatched when the user clicks logout button.\n *\n * @fires\n *\n * nav-button-clicked - Dispatched when the user clicks a navigation button. detail: `NavButtonClickDetail`\n *\n * @public\n */\n",
|
|
611
672
|
"excerptTokens": [
|
|
612
673
|
{
|
|
613
674
|
"kind": "Content",
|
|
@@ -660,6 +721,59 @@
|
|
|
660
721
|
"isProtected": false,
|
|
661
722
|
"isAbstract": false
|
|
662
723
|
},
|
|
724
|
+
{
|
|
725
|
+
"kind": "Method",
|
|
726
|
+
"canonicalReference": "@genesislcap/foundation-header!Navigation#changeFeatureFlags:member(1)",
|
|
727
|
+
"docComment": "/**\n * Changes the active URL feature flags and reloads the page.\n *\n * @remarks\n *\n * Activated when the user changes the selection in the feature flags multi-select. Writes presence-only `feature.<name>` query params via {@link @genesislcap/foundation-utils#setActivatedFeatures}.\n */\n",
|
|
728
|
+
"excerptTokens": [
|
|
729
|
+
{
|
|
730
|
+
"kind": "Content",
|
|
731
|
+
"text": "changeFeatureFlags(e: "
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"kind": "Reference",
|
|
735
|
+
"text": "CustomEvent",
|
|
736
|
+
"canonicalReference": "!CustomEvent:interface"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"kind": "Content",
|
|
740
|
+
"text": "<string[]>"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"kind": "Content",
|
|
744
|
+
"text": "): "
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"kind": "Content",
|
|
748
|
+
"text": "void"
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"kind": "Content",
|
|
752
|
+
"text": ";"
|
|
753
|
+
}
|
|
754
|
+
],
|
|
755
|
+
"isStatic": false,
|
|
756
|
+
"returnTypeTokenRange": {
|
|
757
|
+
"startIndex": 4,
|
|
758
|
+
"endIndex": 5
|
|
759
|
+
},
|
|
760
|
+
"releaseTag": "Public",
|
|
761
|
+
"isProtected": false,
|
|
762
|
+
"overloadIndex": 1,
|
|
763
|
+
"parameters": [
|
|
764
|
+
{
|
|
765
|
+
"parameterName": "e",
|
|
766
|
+
"parameterTypeTokenRange": {
|
|
767
|
+
"startIndex": 1,
|
|
768
|
+
"endIndex": 3
|
|
769
|
+
},
|
|
770
|
+
"isOptional": false
|
|
771
|
+
}
|
|
772
|
+
],
|
|
773
|
+
"isOptional": false,
|
|
774
|
+
"isAbstract": false,
|
|
775
|
+
"name": "changeFeatureFlags"
|
|
776
|
+
},
|
|
663
777
|
{
|
|
664
778
|
"kind": "Method",
|
|
665
779
|
"canonicalReference": "@genesislcap/foundation-header!Navigation#changeLanguage:member(1)",
|
|
@@ -868,6 +982,99 @@
|
|
|
868
982
|
"isProtected": false,
|
|
869
983
|
"isAbstract": false
|
|
870
984
|
},
|
|
985
|
+
{
|
|
986
|
+
"kind": "Property",
|
|
987
|
+
"canonicalReference": "@genesislcap/foundation-header!Navigation#featureFlagOptions:member",
|
|
988
|
+
"docComment": "/**\n * Feature flags available in the header selector.\n *\n * @remarks\n *\n * When `availableFlags` is non-empty, the Feature Flags button is shown automatically. Selected flags are synced to URL `feature.*` query params and the page reloads so boot-time consumers re-evaluate.\n */\n",
|
|
989
|
+
"excerptTokens": [
|
|
990
|
+
{
|
|
991
|
+
"kind": "Content",
|
|
992
|
+
"text": "featureFlagOptions: "
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"kind": "Reference",
|
|
996
|
+
"text": "FeatureFlagOptions",
|
|
997
|
+
"canonicalReference": "@genesislcap/foundation-header!FeatureFlagOptions:type"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"kind": "Content",
|
|
1001
|
+
"text": ";"
|
|
1002
|
+
}
|
|
1003
|
+
],
|
|
1004
|
+
"isReadonly": false,
|
|
1005
|
+
"isOptional": false,
|
|
1006
|
+
"releaseTag": "Public",
|
|
1007
|
+
"name": "featureFlagOptions",
|
|
1008
|
+
"propertyTypeTokenRange": {
|
|
1009
|
+
"startIndex": 1,
|
|
1010
|
+
"endIndex": 2
|
|
1011
|
+
},
|
|
1012
|
+
"isStatic": false,
|
|
1013
|
+
"isProtected": false,
|
|
1014
|
+
"isAbstract": false
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"kind": "Method",
|
|
1018
|
+
"canonicalReference": "@genesislcap/foundation-header!Navigation#getFeatureFlagMultiselectOptions:member(1)",
|
|
1019
|
+
"docComment": "/**\n * Multiselect options derived from {@link Navigation.featureFlagOptions}.\n */\n",
|
|
1020
|
+
"excerptTokens": [
|
|
1021
|
+
{
|
|
1022
|
+
"kind": "Content",
|
|
1023
|
+
"text": "getFeatureFlagMultiselectOptions(): "
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"kind": "Content",
|
|
1027
|
+
"text": "{\n value: string;\n label: string;\n }[]"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"kind": "Content",
|
|
1031
|
+
"text": ";"
|
|
1032
|
+
}
|
|
1033
|
+
],
|
|
1034
|
+
"isStatic": false,
|
|
1035
|
+
"returnTypeTokenRange": {
|
|
1036
|
+
"startIndex": 1,
|
|
1037
|
+
"endIndex": 2
|
|
1038
|
+
},
|
|
1039
|
+
"releaseTag": "Public",
|
|
1040
|
+
"isProtected": false,
|
|
1041
|
+
"overloadIndex": 1,
|
|
1042
|
+
"parameters": [],
|
|
1043
|
+
"isOptional": false,
|
|
1044
|
+
"isAbstract": false,
|
|
1045
|
+
"name": "getFeatureFlagMultiselectOptions"
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
"kind": "Method",
|
|
1049
|
+
"canonicalReference": "@genesislcap/foundation-header!Navigation#getSelectedFeatureFlagValues:member(1)",
|
|
1050
|
+
"docComment": "/**\n * Currently selected feature flag names based on URL `feature.*` params. Multiselect expects selected option *values* (strings), not full option objects.\n */\n",
|
|
1051
|
+
"excerptTokens": [
|
|
1052
|
+
{
|
|
1053
|
+
"kind": "Content",
|
|
1054
|
+
"text": "getSelectedFeatureFlagValues(): "
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
"kind": "Content",
|
|
1058
|
+
"text": "string[]"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"kind": "Content",
|
|
1062
|
+
"text": ";"
|
|
1063
|
+
}
|
|
1064
|
+
],
|
|
1065
|
+
"isStatic": false,
|
|
1066
|
+
"returnTypeTokenRange": {
|
|
1067
|
+
"startIndex": 1,
|
|
1068
|
+
"endIndex": 2
|
|
1069
|
+
},
|
|
1070
|
+
"releaseTag": "Public",
|
|
1071
|
+
"isProtected": false,
|
|
1072
|
+
"overloadIndex": 1,
|
|
1073
|
+
"parameters": [],
|
|
1074
|
+
"isOptional": false,
|
|
1075
|
+
"isAbstract": false,
|
|
1076
|
+
"name": "getSelectedFeatureFlagValues"
|
|
1077
|
+
},
|
|
871
1078
|
{
|
|
872
1079
|
"kind": "Method",
|
|
873
1080
|
"canonicalReference": "@genesislcap/foundation-header!Navigation#handleNavButtonClick:member(1)",
|
|
@@ -1841,6 +2048,36 @@
|
|
|
1841
2048
|
"isProtected": false,
|
|
1842
2049
|
"isAbstract": false
|
|
1843
2050
|
},
|
|
2051
|
+
{
|
|
2052
|
+
"kind": "Property",
|
|
2053
|
+
"canonicalReference": "@genesislcap/foundation-header!Navigation#showFeatureFlagsSelector:member",
|
|
2054
|
+
"docComment": "/**\n * Optional boolean attribute to force-show the Feature Flags button. Control via `show-feature-flags-selector`\n *\n * @remarks\n *\n * Usually unnecessary: the button is shown automatically when {@link Navigation.featureFlagOptions} has a non-empty `availableFlags` list.\n */\n",
|
|
2055
|
+
"excerptTokens": [
|
|
2056
|
+
{
|
|
2057
|
+
"kind": "Content",
|
|
2058
|
+
"text": "showFeatureFlagsSelector: "
|
|
2059
|
+
},
|
|
2060
|
+
{
|
|
2061
|
+
"kind": "Content",
|
|
2062
|
+
"text": "boolean"
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
"kind": "Content",
|
|
2066
|
+
"text": ";"
|
|
2067
|
+
}
|
|
2068
|
+
],
|
|
2069
|
+
"isReadonly": false,
|
|
2070
|
+
"isOptional": false,
|
|
2071
|
+
"releaseTag": "Public",
|
|
2072
|
+
"name": "showFeatureFlagsSelector",
|
|
2073
|
+
"propertyTypeTokenRange": {
|
|
2074
|
+
"startIndex": 1,
|
|
2075
|
+
"endIndex": 2
|
|
2076
|
+
},
|
|
2077
|
+
"isStatic": false,
|
|
2078
|
+
"isProtected": false,
|
|
2079
|
+
"isAbstract": false
|
|
2080
|
+
},
|
|
1844
2081
|
{
|
|
1845
2082
|
"kind": "Property",
|
|
1846
2083
|
"canonicalReference": "@genesislcap/foundation-header!Navigation#showLanguageSelector:member",
|
|
@@ -1961,6 +2198,37 @@
|
|
|
1961
2198
|
"isProtected": false,
|
|
1962
2199
|
"isAbstract": false
|
|
1963
2200
|
},
|
|
2201
|
+
{
|
|
2202
|
+
"kind": "Method",
|
|
2203
|
+
"canonicalReference": "@genesislcap/foundation-header!Navigation#toggleFeatureFlagsPanel:member(1)",
|
|
2204
|
+
"docComment": "/**\n * Toggles the feature flags panel open/closed.\n */\n",
|
|
2205
|
+
"excerptTokens": [
|
|
2206
|
+
{
|
|
2207
|
+
"kind": "Content",
|
|
2208
|
+
"text": "toggleFeatureFlagsPanel(): "
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
"kind": "Content",
|
|
2212
|
+
"text": "void"
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
"kind": "Content",
|
|
2216
|
+
"text": ";"
|
|
2217
|
+
}
|
|
2218
|
+
],
|
|
2219
|
+
"isStatic": false,
|
|
2220
|
+
"returnTypeTokenRange": {
|
|
2221
|
+
"startIndex": 1,
|
|
2222
|
+
"endIndex": 2
|
|
2223
|
+
},
|
|
2224
|
+
"releaseTag": "Public",
|
|
2225
|
+
"isProtected": false,
|
|
2226
|
+
"overloadIndex": 1,
|
|
2227
|
+
"parameters": [],
|
|
2228
|
+
"isOptional": false,
|
|
2229
|
+
"isAbstract": false,
|
|
2230
|
+
"name": "toggleFeatureFlagsPanel"
|
|
2231
|
+
},
|
|
1964
2232
|
{
|
|
1965
2233
|
"kind": "Method",
|
|
1966
2234
|
"canonicalReference": "@genesislcap/foundation-header!Navigation#toLocalisedText:member(1)",
|
|
@@ -170,6 +170,25 @@ export declare const dynamicTemplate: ViewTemplate<Navigation>;
|
|
|
170
170
|
*/
|
|
171
171
|
export declare type ElementTargetId = HeaderTargetId | NavTargetId | SideNavTargetId;
|
|
172
172
|
|
|
173
|
+
/**
|
|
174
|
+
* A single feature flag option shown in the header multi-select.
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
export declare type FeatureFlagDefinition = {
|
|
178
|
+
/** Feature flag name used in the URL as `feature.<name>`. */
|
|
179
|
+
name: string;
|
|
180
|
+
/** Display label for the multi-select option. */
|
|
181
|
+
label: string;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Options for the feature flags selector
|
|
186
|
+
* @public
|
|
187
|
+
*/
|
|
188
|
+
export declare type FeatureFlagOptions = {
|
|
189
|
+
availableFlags: FeatureFlagDefinition[];
|
|
190
|
+
};
|
|
191
|
+
|
|
173
192
|
/**
|
|
174
193
|
* FoundationHeader.
|
|
175
194
|
*
|
|
@@ -311,6 +330,7 @@ export declare type NavEventDetailMap = {
|
|
|
311
330
|
'misc-icon-clicked': void;
|
|
312
331
|
'notification-icon-clicked': void;
|
|
313
332
|
'language-changed': void;
|
|
333
|
+
'feature-flags-changed': string[];
|
|
314
334
|
'nav-button-clicked': NavButtonClickDetail;
|
|
315
335
|
};
|
|
316
336
|
|
|
@@ -334,6 +354,7 @@ export declare type NavEventDetailMap = {
|
|
|
334
354
|
* @param show-connection-indicator - Boolean attribute which controls whether the navigation bar will display the connection indicator.
|
|
335
355
|
* @param show-environment-indicator - Boolean attribute which controls whether the navigation bar will display the environment indicator.
|
|
336
356
|
* @param show-language-selector - Boolean attribute which controls whether the navigation bar will display the language selector.
|
|
357
|
+
* @param show-feature-flags-selector - Optional. Force-show the Feature Flags button; normally unnecessary because the button appears automatically when `featureFlagOptions.availableFlags` is non-empty.
|
|
337
358
|
* @param hide-side-bar - Boolean attribute which controls whether the navigation bar will display the side bar.
|
|
338
359
|
* @param show-account-menu - Boolean attribute which controls whether the navigation bar will display the account menu.
|
|
339
360
|
* @param logout-button-position - String attribute which controls the position of the logout button in the header.
|
|
@@ -342,6 +363,7 @@ export declare type NavEventDetailMap = {
|
|
|
342
363
|
* @param routeButtons - Array of objects which define the route buttons to be displayed in the navigation bar.
|
|
343
364
|
* @param routeNavItems - Array of {@link @genesislcap/foundation-ui#FoundationRouteNavItem | FoundationRouteNavItems} which define the route buttons to be displayed in the navigation bar.
|
|
344
365
|
* @param languageOptions - Object which defines the language options to be displayed in the language selector.
|
|
366
|
+
* @param featureFlagOptions - Object which defines the feature flag options. When `availableFlags` is non-empty, the Feature Flags button is shown automatically.
|
|
345
367
|
* @param inactivity-timeout-minutes - Number attribute which sets the inactivity timeout in minutes (default: 30).
|
|
346
368
|
* @param inactivity-warning-minutes - Number attribute which sets the inactivity warning time in minutes before timeout (default: 5).
|
|
347
369
|
* @param enable-inactivity-monitoring - Boolean attribute which controls whether to enable inactivity monitoring (default: true).
|
|
@@ -352,6 +374,7 @@ export declare type NavEventDetailMap = {
|
|
|
352
374
|
* @fires misc-icon-clicked - Dispatched when the user clicks on the miscellaneous behaviour icon in the navigation bar.
|
|
353
375
|
* @fires notification-icon-clicked - Dispatched when the user clicks on the notification icon in the navigation bar.
|
|
354
376
|
* @fires language-changed - Dispatched when the user changes the language in the language selector.
|
|
377
|
+
* @fires feature-flags-changed - Dispatched when the user changes the selected feature flags. detail: `string[]`
|
|
355
378
|
* @fires logout-clicked - Dispatched when the user clicks logout button.
|
|
356
379
|
* @fires nav-button-clicked - Dispatched when the user clicks a navigation button. detail: `NavButtonClickDetail`
|
|
357
380
|
*
|
|
@@ -416,6 +439,10 @@ export declare class Navigation extends Navigation_base {
|
|
|
416
439
|
* Called when the component is connected to the DOM
|
|
417
440
|
*/
|
|
418
441
|
connectedCallback(): Promise<void>;
|
|
442
|
+
/**
|
|
443
|
+
* @internal
|
|
444
|
+
*/
|
|
445
|
+
readyChanged(_previous: boolean, next: boolean): void;
|
|
419
446
|
setLuminance(): void;
|
|
420
447
|
/**
|
|
421
448
|
* Initialize the inactivity manager
|
|
@@ -514,6 +541,49 @@ export declare class Navigation extends Navigation_base {
|
|
|
514
541
|
* Object which defines the language options to be displayed in the language selector
|
|
515
542
|
*/
|
|
516
543
|
languageOptions: LanguageOptions;
|
|
544
|
+
/**
|
|
545
|
+
* Optional boolean attribute to force-show the Feature Flags button.
|
|
546
|
+
* Control via `show-feature-flags-selector`
|
|
547
|
+
*
|
|
548
|
+
* @remarks
|
|
549
|
+
*
|
|
550
|
+
* Usually unnecessary: the button is shown automatically when
|
|
551
|
+
* {@link Navigation.featureFlagOptions} has a non-empty `availableFlags` list.
|
|
552
|
+
*/
|
|
553
|
+
showFeatureFlagsSelector: boolean;
|
|
554
|
+
/**
|
|
555
|
+
* Feature flags available in the header selector.
|
|
556
|
+
*
|
|
557
|
+
* @remarks
|
|
558
|
+
*
|
|
559
|
+
* When `availableFlags` is non-empty, the Feature Flags button is shown automatically.
|
|
560
|
+
* Selected flags are synced to URL `feature.*` query params and the page reloads so
|
|
561
|
+
* boot-time consumers re-evaluate.
|
|
562
|
+
*/
|
|
563
|
+
featureFlagOptions: FeatureFlagOptions;
|
|
564
|
+
/**
|
|
565
|
+
* Whether the feature flags panel is open.
|
|
566
|
+
* @internal
|
|
567
|
+
*/
|
|
568
|
+
featureFlagsPanelOpen: boolean;
|
|
569
|
+
/**
|
|
570
|
+
* @internal
|
|
571
|
+
*/
|
|
572
|
+
featureFlagOptionsChanged(): void;
|
|
573
|
+
/**
|
|
574
|
+
* @internal
|
|
575
|
+
*/
|
|
576
|
+
showFeatureFlagsSelectorChanged(): void;
|
|
577
|
+
/**
|
|
578
|
+
* Re-run `[hidden]` bindings on the feature flags nav control.
|
|
579
|
+
*
|
|
580
|
+
* @remarks
|
|
581
|
+
* FAST `when(false)` does not reliably re-open when `featureFlagOptions` is assigned after
|
|
582
|
+
* connect (common with React props). The nav markup stays mounted; visibility uses `[hidden]`.
|
|
583
|
+
*
|
|
584
|
+
* @internal
|
|
585
|
+
*/
|
|
586
|
+
private notifyFeatureFlagsNavVisibility;
|
|
517
587
|
/**
|
|
518
588
|
* Boolean attribute which controls whether to include the sideNav component
|
|
519
589
|
* Control via`hide-side-bar`
|
|
@@ -719,6 +789,32 @@ export declare class Navigation extends Navigation_base {
|
|
|
719
789
|
* @experimental
|
|
720
790
|
*/
|
|
721
791
|
changeLanguage(e: CustomEvent): void;
|
|
792
|
+
/**
|
|
793
|
+
* Toggles the feature flags panel open/closed.
|
|
794
|
+
*/
|
|
795
|
+
toggleFeatureFlagsPanel(): void;
|
|
796
|
+
/**
|
|
797
|
+
* Changes the active URL feature flags and reloads the page.
|
|
798
|
+
*
|
|
799
|
+
* @remarks
|
|
800
|
+
*
|
|
801
|
+
* Activated when the user changes the selection in the feature flags multi-select.
|
|
802
|
+
* Writes presence-only `feature.<name>` query params via
|
|
803
|
+
* {@link @genesislcap/foundation-utils#setActivatedFeatures}.
|
|
804
|
+
*/
|
|
805
|
+
changeFeatureFlags(e: CustomEvent<string[]>): void;
|
|
806
|
+
/**
|
|
807
|
+
* Multiselect options derived from {@link Navigation.featureFlagOptions}.
|
|
808
|
+
*/
|
|
809
|
+
getFeatureFlagMultiselectOptions(): {
|
|
810
|
+
value: string;
|
|
811
|
+
label: string;
|
|
812
|
+
}[];
|
|
813
|
+
/**
|
|
814
|
+
* Currently selected feature flag names based on URL `feature.*` params.
|
|
815
|
+
* Multiselect expects selected option *values* (strings), not full option objects.
|
|
816
|
+
*/
|
|
817
|
+
getSelectedFeatureFlagValues(): string[];
|
|
722
818
|
/**
|
|
723
819
|
* To localised text
|
|
724
820
|
* @remarks
|
|
@@ -749,7 +845,7 @@ export declare class Navigation extends Navigation_base {
|
|
|
749
845
|
}
|
|
750
846
|
|
|
751
847
|
declare const Navigation_base: abstract new (...args: any[]) => {
|
|
752
|
-
$emit<K extends "luminance-icon-clicked" | "logout-clicked" | "misc-icon-clicked" | "notification-icon-clicked" | "language-changed" | "nav-button-clicked">(...args: NavEventDetailMap[K] extends void ? [type: K, options?: EmitOptions] : [type: K, detail: NavEventDetailMap[K], options?: EmitOptions]): EmitReturn;
|
|
848
|
+
$emit<K extends "luminance-icon-clicked" | "logout-clicked" | "misc-icon-clicked" | "notification-icon-clicked" | "language-changed" | "feature-flags-changed" | "nav-button-clicked">(...args: NavEventDetailMap[K] extends void ? [type: K, options?: EmitOptions] : [type: K, detail: NavEventDetailMap[K], options?: EmitOptions]): EmitReturn;
|
|
753
849
|
accessKey: string;
|
|
754
850
|
readonly accessKeyLabel: string;
|
|
755
851
|
autocapitalize: string;
|
|
@@ -1214,6 +1310,7 @@ declare type TemplateComponents = {
|
|
|
1214
1310
|
environmentIndicator: TemplateElementDependency;
|
|
1215
1311
|
select: TemplateElementDependency;
|
|
1216
1312
|
option: TemplateElementDependency;
|
|
1313
|
+
multiselect: TemplateElementDependency;
|
|
1217
1314
|
flyout: TemplateElementDependency;
|
|
1218
1315
|
provider: TemplateElementDependency;
|
|
1219
1316
|
};
|
package/dist/react.cjs
CHANGED
|
@@ -24,7 +24,7 @@ const ControlPanel = React.forwardRef(function ControlPanel(props, ref) {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
const Navigation = React.forwardRef(function Navigation(props, ref) {
|
|
27
|
-
const { onLuminanceIconClicked, onMiscIconClicked, onNotificationIconClicked, onLanguageChanged, onLogoutClicked, onNavButtonClicked, children, ...rest } = props;
|
|
27
|
+
const { onLuminanceIconClicked, onMiscIconClicked, onNotificationIconClicked, onLanguageChanged, onFeatureFlagsChanged, onLogoutClicked, onNavButtonClicked, children, ...rest } = props;
|
|
28
28
|
const _innerRef = React.useRef(null);
|
|
29
29
|
const _onLuminanceIconClickedRef = React.useRef(onLuminanceIconClicked);
|
|
30
30
|
_onLuminanceIconClickedRef.current = onLuminanceIconClicked;
|
|
@@ -34,6 +34,8 @@ const Navigation = React.forwardRef(function Navigation(props, ref) {
|
|
|
34
34
|
_onNotificationIconClickedRef.current = onNotificationIconClicked;
|
|
35
35
|
const _onLanguageChangedRef = React.useRef(onLanguageChanged);
|
|
36
36
|
_onLanguageChangedRef.current = onLanguageChanged;
|
|
37
|
+
const _onFeatureFlagsChangedRef = React.useRef(onFeatureFlagsChanged);
|
|
38
|
+
_onFeatureFlagsChangedRef.current = onFeatureFlagsChanged;
|
|
37
39
|
const _onLogoutClickedRef = React.useRef(onLogoutClicked);
|
|
38
40
|
_onLogoutClickedRef.current = onLogoutClicked;
|
|
39
41
|
const _onNavButtonClickedRef = React.useRef(onNavButtonClicked);
|
|
@@ -49,6 +51,8 @@ const Navigation = React.forwardRef(function Navigation(props, ref) {
|
|
|
49
51
|
el.addEventListener('notification-icon-clicked', _onNotificationIconClickedFn);
|
|
50
52
|
const _onLanguageChangedFn = (e) => _onLanguageChangedRef.current?.(e);
|
|
51
53
|
el.addEventListener('language-changed', _onLanguageChangedFn);
|
|
54
|
+
const _onFeatureFlagsChangedFn = (e) => _onFeatureFlagsChangedRef.current?.(e);
|
|
55
|
+
el.addEventListener('feature-flags-changed', _onFeatureFlagsChangedFn);
|
|
52
56
|
const _onLogoutClickedFn = (e) => _onLogoutClickedRef.current?.(e);
|
|
53
57
|
el.addEventListener('logout-clicked', _onLogoutClickedFn);
|
|
54
58
|
const _onNavButtonClickedFn = (e) => _onNavButtonClickedRef.current?.(e);
|
|
@@ -58,6 +62,7 @@ const Navigation = React.forwardRef(function Navigation(props, ref) {
|
|
|
58
62
|
el.removeEventListener('misc-icon-clicked', _onMiscIconClickedFn);
|
|
59
63
|
el.removeEventListener('notification-icon-clicked', _onNotificationIconClickedFn);
|
|
60
64
|
el.removeEventListener('language-changed', _onLanguageChangedFn);
|
|
65
|
+
el.removeEventListener('feature-flags-changed', _onFeatureFlagsChangedFn);
|
|
61
66
|
el.removeEventListener('logout-clicked', _onLogoutClickedFn);
|
|
62
67
|
el.removeEventListener('nav-button-clicked', _onNavButtonClickedFn);
|
|
63
68
|
};
|
|
@@ -66,7 +71,7 @@ const Navigation = React.forwardRef(function Navigation(props, ref) {
|
|
|
66
71
|
});
|
|
67
72
|
|
|
68
73
|
const ZeroHeader = React.forwardRef(function ZeroHeader(props, ref) {
|
|
69
|
-
const { onLuminanceIconClicked, onMiscIconClicked, onNotificationIconClicked, onLanguageChanged, onLogoutClicked, onNavButtonClicked, children, ...rest } = props;
|
|
74
|
+
const { onLuminanceIconClicked, onMiscIconClicked, onNotificationIconClicked, onLanguageChanged, onFeatureFlagsChanged, onLogoutClicked, onNavButtonClicked, children, ...rest } = props;
|
|
70
75
|
const _innerRef = React.useRef(null);
|
|
71
76
|
const _onLuminanceIconClickedRef = React.useRef(onLuminanceIconClicked);
|
|
72
77
|
_onLuminanceIconClickedRef.current = onLuminanceIconClicked;
|
|
@@ -76,6 +81,8 @@ const ZeroHeader = React.forwardRef(function ZeroHeader(props, ref) {
|
|
|
76
81
|
_onNotificationIconClickedRef.current = onNotificationIconClicked;
|
|
77
82
|
const _onLanguageChangedRef = React.useRef(onLanguageChanged);
|
|
78
83
|
_onLanguageChangedRef.current = onLanguageChanged;
|
|
84
|
+
const _onFeatureFlagsChangedRef = React.useRef(onFeatureFlagsChanged);
|
|
85
|
+
_onFeatureFlagsChangedRef.current = onFeatureFlagsChanged;
|
|
79
86
|
const _onLogoutClickedRef = React.useRef(onLogoutClicked);
|
|
80
87
|
_onLogoutClickedRef.current = onLogoutClicked;
|
|
81
88
|
const _onNavButtonClickedRef = React.useRef(onNavButtonClicked);
|
|
@@ -91,6 +98,8 @@ const ZeroHeader = React.forwardRef(function ZeroHeader(props, ref) {
|
|
|
91
98
|
el.addEventListener('notification-icon-clicked', _onNotificationIconClickedFn);
|
|
92
99
|
const _onLanguageChangedFn = (e) => _onLanguageChangedRef.current?.(e);
|
|
93
100
|
el.addEventListener('language-changed', _onLanguageChangedFn);
|
|
101
|
+
const _onFeatureFlagsChangedFn = (e) => _onFeatureFlagsChangedRef.current?.(e);
|
|
102
|
+
el.addEventListener('feature-flags-changed', _onFeatureFlagsChangedFn);
|
|
94
103
|
const _onLogoutClickedFn = (e) => _onLogoutClickedRef.current?.(e);
|
|
95
104
|
el.addEventListener('logout-clicked', _onLogoutClickedFn);
|
|
96
105
|
const _onNavButtonClickedFn = (e) => _onNavButtonClickedRef.current?.(e);
|
|
@@ -100,6 +109,7 @@ const ZeroHeader = React.forwardRef(function ZeroHeader(props, ref) {
|
|
|
100
109
|
el.removeEventListener('misc-icon-clicked', _onMiscIconClickedFn);
|
|
101
110
|
el.removeEventListener('notification-icon-clicked', _onNotificationIconClickedFn);
|
|
102
111
|
el.removeEventListener('language-changed', _onLanguageChangedFn);
|
|
112
|
+
el.removeEventListener('feature-flags-changed', _onFeatureFlagsChangedFn);
|
|
103
113
|
el.removeEventListener('logout-clicked', _onLogoutClickedFn);
|
|
104
114
|
el.removeEventListener('nav-button-clicked', _onNavButtonClickedFn);
|
|
105
115
|
};
|
|
@@ -108,7 +118,7 @@ const ZeroHeader = React.forwardRef(function ZeroHeader(props, ref) {
|
|
|
108
118
|
});
|
|
109
119
|
|
|
110
120
|
const RapidHeader = React.forwardRef(function RapidHeader(props, ref) {
|
|
111
|
-
const { onLuminanceIconClicked, onMiscIconClicked, onNotificationIconClicked, onLanguageChanged, onLogoutClicked, onNavButtonClicked, children, ...rest } = props;
|
|
121
|
+
const { onLuminanceIconClicked, onMiscIconClicked, onNotificationIconClicked, onLanguageChanged, onFeatureFlagsChanged, onLogoutClicked, onNavButtonClicked, children, ...rest } = props;
|
|
112
122
|
const _innerRef = React.useRef(null);
|
|
113
123
|
const _onLuminanceIconClickedRef = React.useRef(onLuminanceIconClicked);
|
|
114
124
|
_onLuminanceIconClickedRef.current = onLuminanceIconClicked;
|
|
@@ -118,6 +128,8 @@ const RapidHeader = React.forwardRef(function RapidHeader(props, ref) {
|
|
|
118
128
|
_onNotificationIconClickedRef.current = onNotificationIconClicked;
|
|
119
129
|
const _onLanguageChangedRef = React.useRef(onLanguageChanged);
|
|
120
130
|
_onLanguageChangedRef.current = onLanguageChanged;
|
|
131
|
+
const _onFeatureFlagsChangedRef = React.useRef(onFeatureFlagsChanged);
|
|
132
|
+
_onFeatureFlagsChangedRef.current = onFeatureFlagsChanged;
|
|
121
133
|
const _onLogoutClickedRef = React.useRef(onLogoutClicked);
|
|
122
134
|
_onLogoutClickedRef.current = onLogoutClicked;
|
|
123
135
|
const _onNavButtonClickedRef = React.useRef(onNavButtonClicked);
|
|
@@ -133,6 +145,8 @@ const RapidHeader = React.forwardRef(function RapidHeader(props, ref) {
|
|
|
133
145
|
el.addEventListener('notification-icon-clicked', _onNotificationIconClickedFn);
|
|
134
146
|
const _onLanguageChangedFn = (e) => _onLanguageChangedRef.current?.(e);
|
|
135
147
|
el.addEventListener('language-changed', _onLanguageChangedFn);
|
|
148
|
+
const _onFeatureFlagsChangedFn = (e) => _onFeatureFlagsChangedRef.current?.(e);
|
|
149
|
+
el.addEventListener('feature-flags-changed', _onFeatureFlagsChangedFn);
|
|
136
150
|
const _onLogoutClickedFn = (e) => _onLogoutClickedRef.current?.(e);
|
|
137
151
|
el.addEventListener('logout-clicked', _onLogoutClickedFn);
|
|
138
152
|
const _onNavButtonClickedFn = (e) => _onNavButtonClickedRef.current?.(e);
|
|
@@ -142,6 +156,7 @@ const RapidHeader = React.forwardRef(function RapidHeader(props, ref) {
|
|
|
142
156
|
el.removeEventListener('misc-icon-clicked', _onMiscIconClickedFn);
|
|
143
157
|
el.removeEventListener('notification-icon-clicked', _onNotificationIconClickedFn);
|
|
144
158
|
el.removeEventListener('language-changed', _onLanguageChangedFn);
|
|
159
|
+
el.removeEventListener('feature-flags-changed', _onFeatureFlagsChangedFn);
|
|
145
160
|
el.removeEventListener('logout-clicked', _onLogoutClickedFn);
|
|
146
161
|
el.removeEventListener('nav-button-clicked', _onNavButtonClickedFn);
|
|
147
162
|
};
|