@carbon-labs/wc-global-header 0.11.0 → 0.13.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/{es/components/global-header/src/components/HeaderContext/__tests__/HeaderContext.test.d.ts → declarations.d.ts} +1 -1
- package/es/wc-global-header.css +8 -0
- package/es/wc-global-header.mjs +7184 -0
- package/package.json +10 -8
- package/es/_virtual/_commonjsHelpers.js +0 -6
- package/es/_virtual/_commonjsHelpers.js.map +0 -1
- package/es/_virtual/index.js +0 -8
- package/es/_virtual/index.js.map +0 -1
- package/es/_virtual/index2.js +0 -4
- package/es/_virtual/index2.js.map +0 -1
- package/es/components/global-header/global-header.d.ts +0 -19
- package/es/components/global-header/global-header.js +0 -27
- package/es/components/global-header/global-header.js.map +0 -1
- package/es/components/global-header/src/components/AuthContext/AuthContext.d.ts +0 -26
- package/es/components/global-header/src/components/AuthContext/AuthContext.js +0 -238
- package/es/components/global-header/src/components/AuthContext/AuthContext.js.map +0 -1
- package/es/components/global-header/src/components/AuthContext/AuthContext.types.d.ts +0 -17
- package/es/components/global-header/src/components/AuthContext/__stories__/AuthContext.stories.d.ts +0 -12
- package/es/components/global-header/src/components/AuthContext/__tests__/AuthContext.test.d.ts +0 -9
- package/es/components/global-header/src/components/AuthContext/_index.scss.js +0 -6
- package/es/components/global-header/src/components/AuthContext/_index.scss.js.map +0 -1
- package/es/components/global-header/src/components/CommonHeader/CommonHeader.d.ts +0 -36
- package/es/components/global-header/src/components/CommonHeader/CommonHeader.js +0 -247
- package/es/components/global-header/src/components/CommonHeader/CommonHeader.js.map +0 -1
- package/es/components/global-header/src/components/CommonHeader/WideSideNav.d.ts +0 -15
- package/es/components/global-header/src/components/CommonHeader/WideSideNav.js +0 -32
- package/es/components/global-header/src/components/CommonHeader/WideSideNav.js.map +0 -1
- package/es/components/global-header/src/components/CommonHeader/__stories__/CommonHeader.stories.d.ts +0 -20
- package/es/components/global-header/src/components/CommonHeader/__stories__/SideNav.stories.d.ts +0 -16
- package/es/components/global-header/src/components/CommonHeader/__tests__/CommonHeader.test.d.ts +0 -9
- package/es/components/global-header/src/components/CommonHeader/__tests__/WideSideNav.test.d.ts +0 -9
- package/es/components/global-header/src/components/CommonHeader/_index.scss.js +0 -6
- package/es/components/global-header/src/components/CommonHeader/_index.scss.js.map +0 -1
- package/es/components/global-header/src/components/HeaderContext/HeaderContext.d.ts +0 -43
- package/es/components/global-header/src/components/HeaderContext/HeaderContext.js +0 -311
- package/es/components/global-header/src/components/HeaderContext/HeaderContext.js.map +0 -1
- package/es/components/global-header/src/components/HeaderContext/HeaderContext.types.d.ts +0 -46
- package/es/components/global-header/src/components/HeaderContext/_index.scss.js +0 -6
- package/es/components/global-header/src/components/HeaderContext/_index.scss.js.map +0 -1
- package/es/components/global-header/src/components/HybridIpaasHeader/HybridIpaasHeader.d.ts +0 -42
- package/es/components/global-header/src/components/HybridIpaasHeader/HybridIpaasHeader.js +0 -238
- package/es/components/global-header/src/components/HybridIpaasHeader/HybridIpaasHeader.js.map +0 -1
- package/es/components/global-header/src/components/HybridIpaasHeader/__stories__/HybridIPaasHeader.stories.d.ts +0 -20
- package/es/components/global-header/src/components/HybridIpaasHeader/__tests__/HybridIpaasHeader.test.d.ts +0 -10
- package/es/components/global-header/src/components/LogoutHeader/LogoutHeader.d.ts +0 -17
- package/es/components/global-header/src/components/LogoutHeader/LogoutHeader.js +0 -58
- package/es/components/global-header/src/components/LogoutHeader/LogoutHeader.js.map +0 -1
- package/es/components/global-header/src/components/LogoutHeader/__stories__/LogoutHeader.stories.d.ts +0 -15
- package/es/components/global-header/src/components/LogoutHeader/__tests__/LogoutHeader.test.d.ts +0 -9
- package/es/components/global-header/src/components/LogoutHeader/_index.scss.js +0 -6
- package/es/components/global-header/src/components/LogoutHeader/_index.scss.js.map +0 -1
- package/es/components/global-header/src/components/LogoutTile/LogoutTile.d.ts +0 -24
- package/es/components/global-header/src/components/LogoutTile/LogoutTile.js +0 -72
- package/es/components/global-header/src/components/LogoutTile/LogoutTile.js.map +0 -1
- package/es/components/global-header/src/components/LogoutTile/__stories__/LogoutTile.stories.d.ts +0 -14
- package/es/components/global-header/src/components/LogoutTile/__tests__/LogoutTile.test.d.ts +0 -9
- package/es/components/global-header/src/components/LogoutTile/_index.scss.js +0 -6
- package/es/components/global-header/src/components/LogoutTile/_index.scss.js.map +0 -1
- package/es/components/global-header/src/components/ProfilePopover/ProfilePopover.d.ts +0 -22
- package/es/components/global-header/src/components/ProfilePopover/ProfilePopover.js +0 -100
- package/es/components/global-header/src/components/ProfilePopover/ProfilePopover.js.map +0 -1
- package/es/components/global-header/src/components/ProfilePopover/__tests__/ProfilePopover.test.d.ts +0 -9
- package/es/components/global-header/src/components/ProfilePopover/_index.scss.js +0 -6
- package/es/components/global-header/src/components/ProfilePopover/_index.scss.js.map +0 -1
- package/es/components/global-header/src/components/Search/Search.d.ts +0 -25
- package/es/components/global-header/src/components/Search/Search.js +0 -72
- package/es/components/global-header/src/components/Search/Search.js.map +0 -1
- package/es/components/global-header/src/components/Search/__tests__/Search.test.d.ts +0 -9
- package/es/components/global-header/src/components/Search/_index.scss.js +0 -6
- package/es/components/global-header/src/components/Search/_index.scss.js.map +0 -1
- package/es/components/global-header/src/components/SideNavItem/SideNavItem.d.ts +0 -31
- package/es/components/global-header/src/components/SideNavItem/SideNavItem.js +0 -214
- package/es/components/global-header/src/components/SideNavItem/SideNavItem.js.map +0 -1
- package/es/components/global-header/src/components/SideNavItem/SideNavItem.scss.js +0 -6
- package/es/components/global-header/src/components/SideNavItem/SideNavItem.scss.js.map +0 -1
- package/es/components/global-header/src/components/SideNavItem/__tests__/SideNavItem.test.d.ts +0 -9
- package/es/components/global-header/src/components/Switcher/Switcher.d.ts +0 -29
- package/es/components/global-header/src/components/Switcher/Switcher.js +0 -188
- package/es/components/global-header/src/components/Switcher/Switcher.js.map +0 -1
- package/es/components/global-header/src/components/Switcher/Switcher.types.d.ts +0 -11
- package/es/components/global-header/src/components/Switcher/__tests__/Switcher.test.d.ts +0 -9
- package/es/components/global-header/src/components/Switcher/_index.scss.js +0 -6
- package/es/components/global-header/src/components/Switcher/_index.scss.js.map +0 -1
- package/es/components/global-header/src/components/TrialContent/TrialContent.d.ts +0 -11
- package/es/components/global-header/src/components/TrialContent/TrialContent.js +0 -74
- package/es/components/global-header/src/components/TrialContent/TrialContent.js.map +0 -1
- package/es/components/global-header/src/components/TrialContent/TrialContent.types.d.ts +0 -12
- package/es/components/global-header/src/components/TrialContent/__stories__/TrialContent.stories.d.ts +0 -14
- package/es/components/global-header/src/components/TrialPopover/TrialPopover.d.ts +0 -23
- package/es/components/global-header/src/components/TrialPopover/TrialPopover.js +0 -79
- package/es/components/global-header/src/components/TrialPopover/TrialPopover.js.map +0 -1
- package/es/components/global-header/src/components/TrialPopover/__tests__/TrialPopover.test.d.ts +0 -9
- package/es/components/global-header/src/components/TrialPopover/_index.scss.js +0 -6
- package/es/components/global-header/src/components/TrialPopover/_index.scss.js.map +0 -1
- package/es/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.d.ts +0 -19
- package/es/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.js +0 -63
- package/es/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.js.map +0 -1
- package/es/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.stories.d.ts +0 -15
- package/es/components/global-header/src/components/UnauthenticatedContext/__tests__/UnauthenticatedContext.test.d.ts +0 -9
- package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.d.ts +0 -31
- package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.js +0 -104
- package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.js.map +0 -1
- package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.scss.js +0 -6
- package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.scss.js.map +0 -1
- package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.types.d.ts +0 -21
- package/es/components/global-header/src/components/UserProfileImage/__tests__/UserProfileImage.test.d.ts +0 -9
- package/es/components/global-header/src/components/_index.scss.js +0 -6
- package/es/components/global-header/src/components/_index.scss.js.map +0 -1
- package/es/components/global-header/src/constant.d.ts +0 -53
- package/es/components/global-header/src/constant.js +0 -66
- package/es/components/global-header/src/constant.js.map +0 -1
- package/es/components/global-header/src/global-header.template.d.ts +0 -16
- package/es/components/global-header/src/global-header.template.js +0 -20
- package/es/components/global-header/src/global-header.template.js.map +0 -1
- package/es/components/global-header/src/globals/__tests__/useScript.test.d.ts +0 -9
- package/es/components/global-header/src/globals/__tests__/utils.test.d.ts +0 -9
- package/es/components/global-header/src/globals/useScript.d.ts +0 -10
- package/es/components/global-header/src/globals/useScript.js +0 -47
- package/es/components/global-header/src/globals/useScript.js.map +0 -1
- package/es/components/global-header/src/globals/utils.d.ts +0 -22
- package/es/components/global-header/src/globals/utils.js +0 -89
- package/es/components/global-header/src/globals/utils.js.map +0 -1
- package/es/components/global-header/src/index.d.ts +0 -12
- package/es/components/global-header/src/index.scss.js +0 -6
- package/es/components/global-header/src/index.scss.js.map +0 -1
- package/es/components/global-header/src/types/Header.types.d.ts +0 -267
- package/es/components/global-header/src/types/Header.types.js +0 -22
- package/es/components/global-header/src/types/Header.types.js.map +0 -1
- package/es/index.d.ts +0 -9
- package/es/index.js +0 -6
- package/es/index.js.map +0 -1
- package/es/node_modules/classnames/index.js +0 -86
- package/es/node_modules/classnames/index.js.map +0 -1
- package/lib/_virtual/_commonjsHelpers.js +0 -8
- package/lib/_virtual/_commonjsHelpers.js.map +0 -1
- package/lib/_virtual/index.js +0 -12
- package/lib/_virtual/index.js.map +0 -1
- package/lib/_virtual/index2.js +0 -6
- package/lib/_virtual/index2.js.map +0 -1
- package/lib/components/global-header/global-header.d.ts +0 -19
- package/lib/components/global-header/global-header.js +0 -46
- package/lib/components/global-header/global-header.js.map +0 -1
- package/lib/components/global-header/src/components/AuthContext/AuthContext.d.ts +0 -26
- package/lib/components/global-header/src/components/AuthContext/AuthContext.js +0 -238
- package/lib/components/global-header/src/components/AuthContext/AuthContext.js.map +0 -1
- package/lib/components/global-header/src/components/AuthContext/AuthContext.types.d.ts +0 -17
- package/lib/components/global-header/src/components/AuthContext/__stories__/AuthContext.stories.d.ts +0 -12
- package/lib/components/global-header/src/components/AuthContext/__tests__/AuthContext.test.d.ts +0 -9
- package/lib/components/global-header/src/components/AuthContext/_index.scss.js +0 -10
- package/lib/components/global-header/src/components/AuthContext/_index.scss.js.map +0 -1
- package/lib/components/global-header/src/components/CommonHeader/CommonHeader.d.ts +0 -36
- package/lib/components/global-header/src/components/CommonHeader/CommonHeader.js +0 -247
- package/lib/components/global-header/src/components/CommonHeader/CommonHeader.js.map +0 -1
- package/lib/components/global-header/src/components/CommonHeader/WideSideNav.d.ts +0 -15
- package/lib/components/global-header/src/components/CommonHeader/WideSideNav.js +0 -32
- package/lib/components/global-header/src/components/CommonHeader/WideSideNav.js.map +0 -1
- package/lib/components/global-header/src/components/CommonHeader/__stories__/CommonHeader.stories.d.ts +0 -20
- package/lib/components/global-header/src/components/CommonHeader/__stories__/SideNav.stories.d.ts +0 -16
- package/lib/components/global-header/src/components/CommonHeader/__tests__/CommonHeader.test.d.ts +0 -9
- package/lib/components/global-header/src/components/CommonHeader/__tests__/WideSideNav.test.d.ts +0 -9
- package/lib/components/global-header/src/components/CommonHeader/_index.scss.js +0 -10
- package/lib/components/global-header/src/components/CommonHeader/_index.scss.js.map +0 -1
- package/lib/components/global-header/src/components/HeaderContext/HeaderContext.d.ts +0 -43
- package/lib/components/global-header/src/components/HeaderContext/HeaderContext.js +0 -311
- package/lib/components/global-header/src/components/HeaderContext/HeaderContext.js.map +0 -1
- package/lib/components/global-header/src/components/HeaderContext/HeaderContext.types.d.ts +0 -46
- package/lib/components/global-header/src/components/HeaderContext/__tests__/HeaderContext.test.d.ts +0 -9
- package/lib/components/global-header/src/components/HeaderContext/_index.scss.js +0 -10
- package/lib/components/global-header/src/components/HeaderContext/_index.scss.js.map +0 -1
- package/lib/components/global-header/src/components/HybridIpaasHeader/HybridIpaasHeader.d.ts +0 -42
- package/lib/components/global-header/src/components/HybridIpaasHeader/HybridIpaasHeader.js +0 -238
- package/lib/components/global-header/src/components/HybridIpaasHeader/HybridIpaasHeader.js.map +0 -1
- package/lib/components/global-header/src/components/HybridIpaasHeader/__stories__/HybridIPaasHeader.stories.d.ts +0 -20
- package/lib/components/global-header/src/components/HybridIpaasHeader/__tests__/HybridIpaasHeader.test.d.ts +0 -10
- package/lib/components/global-header/src/components/LogoutHeader/LogoutHeader.d.ts +0 -17
- package/lib/components/global-header/src/components/LogoutHeader/LogoutHeader.js +0 -58
- package/lib/components/global-header/src/components/LogoutHeader/LogoutHeader.js.map +0 -1
- package/lib/components/global-header/src/components/LogoutHeader/__stories__/LogoutHeader.stories.d.ts +0 -15
- package/lib/components/global-header/src/components/LogoutHeader/__tests__/LogoutHeader.test.d.ts +0 -9
- package/lib/components/global-header/src/components/LogoutHeader/_index.scss.js +0 -10
- package/lib/components/global-header/src/components/LogoutHeader/_index.scss.js.map +0 -1
- package/lib/components/global-header/src/components/LogoutTile/LogoutTile.d.ts +0 -24
- package/lib/components/global-header/src/components/LogoutTile/LogoutTile.js +0 -72
- package/lib/components/global-header/src/components/LogoutTile/LogoutTile.js.map +0 -1
- package/lib/components/global-header/src/components/LogoutTile/__stories__/LogoutTile.stories.d.ts +0 -14
- package/lib/components/global-header/src/components/LogoutTile/__tests__/LogoutTile.test.d.ts +0 -9
- package/lib/components/global-header/src/components/LogoutTile/_index.scss.js +0 -10
- package/lib/components/global-header/src/components/LogoutTile/_index.scss.js.map +0 -1
- package/lib/components/global-header/src/components/ProfilePopover/ProfilePopover.d.ts +0 -22
- package/lib/components/global-header/src/components/ProfilePopover/ProfilePopover.js +0 -100
- package/lib/components/global-header/src/components/ProfilePopover/ProfilePopover.js.map +0 -1
- package/lib/components/global-header/src/components/ProfilePopover/__tests__/ProfilePopover.test.d.ts +0 -9
- package/lib/components/global-header/src/components/ProfilePopover/_index.scss.js +0 -10
- package/lib/components/global-header/src/components/ProfilePopover/_index.scss.js.map +0 -1
- package/lib/components/global-header/src/components/Search/Search.d.ts +0 -25
- package/lib/components/global-header/src/components/Search/Search.js +0 -72
- package/lib/components/global-header/src/components/Search/Search.js.map +0 -1
- package/lib/components/global-header/src/components/Search/__tests__/Search.test.d.ts +0 -9
- package/lib/components/global-header/src/components/Search/_index.scss.js +0 -10
- package/lib/components/global-header/src/components/Search/_index.scss.js.map +0 -1
- package/lib/components/global-header/src/components/SideNavItem/SideNavItem.d.ts +0 -31
- package/lib/components/global-header/src/components/SideNavItem/SideNavItem.js +0 -214
- package/lib/components/global-header/src/components/SideNavItem/SideNavItem.js.map +0 -1
- package/lib/components/global-header/src/components/SideNavItem/SideNavItem.scss.js +0 -10
- package/lib/components/global-header/src/components/SideNavItem/SideNavItem.scss.js.map +0 -1
- package/lib/components/global-header/src/components/SideNavItem/__tests__/SideNavItem.test.d.ts +0 -9
- package/lib/components/global-header/src/components/Switcher/Switcher.d.ts +0 -29
- package/lib/components/global-header/src/components/Switcher/Switcher.js +0 -188
- package/lib/components/global-header/src/components/Switcher/Switcher.js.map +0 -1
- package/lib/components/global-header/src/components/Switcher/Switcher.types.d.ts +0 -11
- package/lib/components/global-header/src/components/Switcher/__tests__/Switcher.test.d.ts +0 -9
- package/lib/components/global-header/src/components/Switcher/_index.scss.js +0 -10
- package/lib/components/global-header/src/components/Switcher/_index.scss.js.map +0 -1
- package/lib/components/global-header/src/components/TrialContent/TrialContent.d.ts +0 -11
- package/lib/components/global-header/src/components/TrialContent/TrialContent.js +0 -76
- package/lib/components/global-header/src/components/TrialContent/TrialContent.js.map +0 -1
- package/lib/components/global-header/src/components/TrialContent/TrialContent.types.d.ts +0 -12
- package/lib/components/global-header/src/components/TrialContent/__stories__/TrialContent.stories.d.ts +0 -14
- package/lib/components/global-header/src/components/TrialPopover/TrialPopover.d.ts +0 -23
- package/lib/components/global-header/src/components/TrialPopover/TrialPopover.js +0 -79
- package/lib/components/global-header/src/components/TrialPopover/TrialPopover.js.map +0 -1
- package/lib/components/global-header/src/components/TrialPopover/__tests__/TrialPopover.test.d.ts +0 -9
- package/lib/components/global-header/src/components/TrialPopover/_index.scss.js +0 -10
- package/lib/components/global-header/src/components/TrialPopover/_index.scss.js.map +0 -1
- package/lib/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.d.ts +0 -19
- package/lib/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.js +0 -63
- package/lib/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.js.map +0 -1
- package/lib/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.stories.d.ts +0 -15
- package/lib/components/global-header/src/components/UnauthenticatedContext/__tests__/UnauthenticatedContext.test.d.ts +0 -9
- package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.d.ts +0 -31
- package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.js +0 -104
- package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.js.map +0 -1
- package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.scss.js +0 -10
- package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.scss.js.map +0 -1
- package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.types.d.ts +0 -21
- package/lib/components/global-header/src/components/UserProfileImage/__tests__/UserProfileImage.test.d.ts +0 -9
- package/lib/components/global-header/src/components/_index.scss.js +0 -10
- package/lib/components/global-header/src/components/_index.scss.js.map +0 -1
- package/lib/components/global-header/src/constant.d.ts +0 -53
- package/lib/components/global-header/src/constant.js +0 -82
- package/lib/components/global-header/src/constant.js.map +0 -1
- package/lib/components/global-header/src/global-header.template.d.ts +0 -16
- package/lib/components/global-header/src/global-header.template.js +0 -24
- package/lib/components/global-header/src/global-header.template.js.map +0 -1
- package/lib/components/global-header/src/globals/__tests__/useScript.test.d.ts +0 -9
- package/lib/components/global-header/src/globals/__tests__/utils.test.d.ts +0 -9
- package/lib/components/global-header/src/globals/useScript.d.ts +0 -10
- package/lib/components/global-header/src/globals/useScript.js +0 -51
- package/lib/components/global-header/src/globals/useScript.js.map +0 -1
- package/lib/components/global-header/src/globals/utils.d.ts +0 -22
- package/lib/components/global-header/src/globals/utils.js +0 -96
- package/lib/components/global-header/src/globals/utils.js.map +0 -1
- package/lib/components/global-header/src/index.d.ts +0 -12
- package/lib/components/global-header/src/index.scss.js +0 -10
- package/lib/components/global-header/src/index.scss.js.map +0 -1
- package/lib/components/global-header/src/types/Header.types.d.ts +0 -267
- package/lib/components/global-header/src/types/Header.types.js +0 -22
- package/lib/components/global-header/src/types/Header.types.js.map +0 -1
- package/lib/index.d.ts +0 -9
- package/lib/index.js +0 -27
- package/lib/index.js.map +0 -1
- package/lib/node_modules/classnames/index.js +0 -88
- package/lib/node_modules/classnames/index.js.map +0 -1
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var tslib = require('tslib');
|
|
4
|
-
var lit = require('lit');
|
|
5
|
-
var decorators_js = require('lit/decorators.js');
|
|
6
|
-
var index = require('../../../../../_virtual/index.js');
|
|
7
|
-
var constant = require('../../constant.js');
|
|
8
|
-
var _index = require('./_index.scss.js');
|
|
9
|
-
var utils = require('../../globals/utils.js');
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @license
|
|
13
|
-
*
|
|
14
|
-
* Copyright IBM Corp. 2025
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/
|
|
19
|
-
/* eslint jsdoc/require-jsdoc: 0 */
|
|
20
|
-
/**
|
|
21
|
-
* Environment switcher
|
|
22
|
-
*/
|
|
23
|
-
exports.Switcher = class Switcher extends lit.LitElement {
|
|
24
|
-
get selectedItem() {
|
|
25
|
-
var _a;
|
|
26
|
-
return (_a = this.items[this.initialSelectedIndex || 0]) !== null && _a !== void 0 ? _a : null;
|
|
27
|
-
}
|
|
28
|
-
constructor() {
|
|
29
|
-
super();
|
|
30
|
-
this.items = [];
|
|
31
|
-
this.iconsLeft = false;
|
|
32
|
-
this.disabled = false;
|
|
33
|
-
this.isTrialOpen = false;
|
|
34
|
-
this.initialSelectedIndex = 0;
|
|
35
|
-
this.onClick = (event, value, idx) => {
|
|
36
|
-
console.log(`default onClick called with: ${event}, ${value}, ${idx}`);
|
|
37
|
-
};
|
|
38
|
-
// emit an event (does nothing if analytics has not been configured)
|
|
39
|
-
this.clickEventAnalytics = (label) => {
|
|
40
|
-
utils.trackEvent('UI Interaction', {
|
|
41
|
-
action: 'clicked',
|
|
42
|
-
CTA: label,
|
|
43
|
-
elementId: 'common header - env switcher',
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
handleItemSelection(event, value, idx) {
|
|
48
|
-
var _a;
|
|
49
|
-
this.clickEventAnalytics(value.label);
|
|
50
|
-
if (this.onClick) {
|
|
51
|
-
this.onClick(event, value, idx); // Need to add event in this
|
|
52
|
-
}
|
|
53
|
-
if (!value.isLinkItem || !value.isHeading) {
|
|
54
|
-
if (this.items[idx] !== this.selectedItem) {
|
|
55
|
-
this.initialSelectedIndex = idx;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
//Switcher closes upon selecting an option
|
|
59
|
-
const headerMenu = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('cds-custom-header-menu');
|
|
60
|
-
headerMenu.expanded = false;
|
|
61
|
-
}
|
|
62
|
-
renderItem(item, idx) {
|
|
63
|
-
var _a, _b;
|
|
64
|
-
const isSelected = item.id
|
|
65
|
-
? item.id === ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.id)
|
|
66
|
-
: item.label === ((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.label);
|
|
67
|
-
const selectedClass = isSelected ? 'selected' : '';
|
|
68
|
-
return lit.html `
|
|
69
|
-
<div>
|
|
70
|
-
<div
|
|
71
|
-
class="${index.default({
|
|
72
|
-
[`${constant.AUTOMATION_HEADER_BASE_CLASS}__switcher-menu-item`]: true,
|
|
73
|
-
[selectedClass]: true,
|
|
74
|
-
})}"
|
|
75
|
-
@click="${(event) => {
|
|
76
|
-
if (this.disabled) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
this.handleItemSelection(event, item, idx);
|
|
80
|
-
}}"
|
|
81
|
-
title="${item.label}">
|
|
82
|
-
${this.iconsLeft
|
|
83
|
-
? lit.html `
|
|
84
|
-
<span
|
|
85
|
-
class="${constant.AUTOMATION_HEADER_BASE_CLASS}__switcher-menu-item-title-icons-left">
|
|
86
|
-
${!item.isLinkItem
|
|
87
|
-
? lit.html `
|
|
88
|
-
<div
|
|
89
|
-
class="${!isSelected
|
|
90
|
-
? `${constant.AUTOMATION_HEADER_BASE_CLASS}__switcher-menu-item-title-hidden-checkmark`
|
|
91
|
-
: ''}">
|
|
92
|
-
<div>
|
|
93
|
-
${utils.renderCarbonIcon(item.carbonIcon || 'Checkmark', 16)}
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
`
|
|
97
|
-
: ''}
|
|
98
|
-
${item.isLinkItem
|
|
99
|
-
? lit.html `<div>
|
|
100
|
-
${utils.renderCarbonIcon(item.carbonIcon || 'Checkmark', 16)}
|
|
101
|
-
</div>`
|
|
102
|
-
: ''}
|
|
103
|
-
<span>${item.label}</span>
|
|
104
|
-
${item.isLinkItem
|
|
105
|
-
? lit.html `<div>${utils.renderCarbonIcon('Launch', 16)}</div>`
|
|
106
|
-
: ''}
|
|
107
|
-
</span>
|
|
108
|
-
`
|
|
109
|
-
: lit.html `
|
|
110
|
-
<span
|
|
111
|
-
class="${constant.AUTOMATION_HEADER_BASE_CLASS}__switcher-menu-item-title">
|
|
112
|
-
<span>${item.label}</span>
|
|
113
|
-
${isSelected
|
|
114
|
-
? utils.renderCarbonIcon(item.carbonIcon || 'Checkmark', 16)
|
|
115
|
-
: ''}
|
|
116
|
-
</span>
|
|
117
|
-
`}
|
|
118
|
-
</div>
|
|
119
|
-
${item.isLastInList ? lit.html `<div class="switcher-divider"></div>` : ''}
|
|
120
|
-
</div>
|
|
121
|
-
`;
|
|
122
|
-
}
|
|
123
|
-
renderItems() {
|
|
124
|
-
return this.items.map((item, idx) => {
|
|
125
|
-
var _a;
|
|
126
|
-
if (item.isHeading) {
|
|
127
|
-
return lit.html `<div
|
|
128
|
-
class="${constant.AUTOMATION_HEADER_BASE_CLASS}__switcher-menu-group-title">
|
|
129
|
-
${item.label}
|
|
130
|
-
</div>`;
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
return lit.html `<cds-custom-header-menu-item href="${(_a = item === null || item === void 0 ? void 0 : item.href) !== null && _a !== void 0 ? _a : '#'}">
|
|
134
|
-
${this.renderItem(item, idx)}
|
|
135
|
-
</cds-custom-header-menu-item>`;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
render() {
|
|
140
|
-
var _a, _b, _c, _d, _e;
|
|
141
|
-
const labelMaxLength = 15;
|
|
142
|
-
const switcherLabel = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.label) &&
|
|
143
|
-
((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.label.length) < labelMaxLength
|
|
144
|
-
? (_c = this.selectedItem) === null || _c === void 0 ? void 0 : _c.label
|
|
145
|
-
: ((_d = this.selectedItem) === null || _d === void 0 ? void 0 : _d.label.slice(0, labelMaxLength)) + '...'; // need to manually reduce length of label to fit the max width
|
|
146
|
-
return lit.html `<div class="${constant.AUTOMATION_HEADER_BASE_CLASS}__switcher">
|
|
147
|
-
<cds-custom-header-menu
|
|
148
|
-
role="button"
|
|
149
|
-
tabindex="${this.isTrialOpen ? -1 : 0}"
|
|
150
|
-
.menuLabel=${switcherLabel}
|
|
151
|
-
.triggerContent=${switcherLabel}
|
|
152
|
-
title="${switcherLabel.length > labelMaxLength
|
|
153
|
-
? (_e = this.selectedItem) === null || _e === void 0 ? void 0 : _e.label
|
|
154
|
-
: null}"
|
|
155
|
-
class="${index.default({
|
|
156
|
-
[`${constant.AUTOMATION_HEADER_BASE_CLASS}__switcher-menu hybrid-ipaas`]: true,
|
|
157
|
-
[`${constant.AUTOMATION_HEADER_BASE_CLASS}__switcher-menu-disabled`]: this.disabled,
|
|
158
|
-
})}">
|
|
159
|
-
${this.renderItems()}
|
|
160
|
-
</cds-custom-header-menu>
|
|
161
|
-
</div>`;
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
exports.Switcher.styles = lit.css `
|
|
165
|
-
${lit.unsafeCSS(_index.default)}
|
|
166
|
-
`;
|
|
167
|
-
tslib.__decorate([
|
|
168
|
-
decorators_js.property({ type: Array })
|
|
169
|
-
], exports.Switcher.prototype, "items", void 0);
|
|
170
|
-
tslib.__decorate([
|
|
171
|
-
decorators_js.property({ type: Boolean })
|
|
172
|
-
], exports.Switcher.prototype, "iconsLeft", void 0);
|
|
173
|
-
tslib.__decorate([
|
|
174
|
-
decorators_js.property({ type: Boolean })
|
|
175
|
-
], exports.Switcher.prototype, "disabled", void 0);
|
|
176
|
-
tslib.__decorate([
|
|
177
|
-
decorators_js.property({ type: Boolean })
|
|
178
|
-
], exports.Switcher.prototype, "isTrialOpen", void 0);
|
|
179
|
-
tslib.__decorate([
|
|
180
|
-
decorators_js.property({ type: Number })
|
|
181
|
-
], exports.Switcher.prototype, "initialSelectedIndex", void 0);
|
|
182
|
-
tslib.__decorate([
|
|
183
|
-
decorators_js.property({ type: Function })
|
|
184
|
-
], exports.Switcher.prototype, "onClick", void 0);
|
|
185
|
-
exports.Switcher = tslib.__decorate([
|
|
186
|
-
decorators_js.customElement('apaas-switcher-component')
|
|
187
|
-
], exports.Switcher);
|
|
188
|
-
//# sourceMappingURL=Switcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Switcher.js","sources":["../../../../../../../components/global-header/src/components/Switcher/Switcher.ts"],"sourcesContent":[null],"names":["Switcher","LitElement","trackEvent","html","cx","AUTOMATION_HEADER_BASE_CLASS","renderCarbonIcon","css","unsafeCSS","styles","__decorate","property","customElement"],"mappings":";;;;;;;;;;AAAA;;;;;;;AAOG;AACH;AAcA;;AAEG;AAEUA,gBAAQ,GAAd,MAAM,QAAS,SAAQC,cAAU,CAAA;AAkBtC,IAAA,IAAI,YAAY,GAAA;;AACd,QAAA,OAAO,CAAA,EAAA,GAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,IAAI;IAC3D;AAEA,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAlBkB,IAAA,CAAA,KAAK,GAAe,EAAE;QACpB,IAAA,CAAA,SAAS,GAAG,KAAK;QACjB,IAAA,CAAA,QAAQ,GAAG,KAAK;QAChB,IAAA,CAAA,WAAW,GAAG,KAAK;QACpB,IAAA,CAAA,oBAAoB,GAAG,CAAC;QACtB,IAAA,CAAA,OAAO,GAAG,CACtC,KAAiB,EACjB,KAAe,EACf,GAAW,KACT;YACF,OAAO,CAAC,GAAG,CAAC,CAAA,6BAAA,EAAgC,KAAK,CAAA,EAAA,EAAK,KAAK,CAAA,EAAA,EAAK,GAAG,CAAA,CAAE,CAAC;AACxE,QAAA,CAAC;;AAWO,QAAA,IAAA,CAAA,mBAAmB,GAAG,CAAC,KAAa,KAAI;YAC9CC,gBAAU,CAAC,gBAAgB,EAAE;AAC3B,gBAAA,MAAM,EAAE,SAAS;AACjB,gBAAA,GAAG,EAAE,KAAK;AACV,gBAAA,SAAS,EAAE,8BAA8B;AAC1C,aAAA,CAAC;AACJ,QAAA,CAAC;IATD;AAWA,IAAA,mBAAmB,CAAC,KAAiB,EAAE,KAAe,EAAE,GAAW,EAAA;;AACjE,QAAA,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC;AACrC,QAAA,IAAI,IAAI,CAAC,OA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
* Copyright IBM Corp. 2025
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
import { SwitcherConfigs } from '../../types/Header.types';
|
|
10
|
-
export type { ItemLink } from '../../types/Header.types';
|
|
11
|
-
export type SwitcherProps = SwitcherConfigs;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var lit = require('lit');
|
|
6
|
-
|
|
7
|
-
var styles = lit.css([".automation-global-header__switcher{block-size:-moz-max-content;block-size:max-content;border:0!important;color:#a8a8a8;inline-size:-moz-max-content;inline-size:max-content;min-block-size:-moz-max-content;min-block-size:max-content}.automation-global-header__switcher-menu{block-size:47px;color:#a8a8a8;display:inline-block;list-style-type:none;min-inline-size:12rem!important}.automation-global-header__switcher-menu-item-title{align-items:flex-end;display:flex;justify-content:space-between}.automation-global-header__switcher-menu-item-title span{margin-inline-end:1.5rem;max-inline-size:224px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.automation-global-header__switcher-menu-item-title-hidden-checkmark{visibility:hidden}.automation-global-header__switcher-menu-item-title-icons-left{display:flex}.automation-global-header__switcher-menu-item-title-icons-left div{margin-inline-end:1rem}.automation-global-header__switcher-menu-item-title-icons-left span{margin-inline-end:1rem}.automation-global-header__switcher-menu-item-title-icons-left span,.automation-global-header__switcher-menu-item>span{max-inline-size:224px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.automation-global-header__switcher-menu-disabled{pointer-events:none}.automation-global-header__switcher-menu.hybrid-ipaas .cds--header__menu-item+.cds--header__menu-title[aria-expanded=false]{inline-size:100%!important;min-inline-size:15rem!important}.automation-global-header__switcher-menu-group-title{align-items:center;block-size:47px;color:#f4f4f4;display:flex;font-size:var(--cds-heading-compact-01-font-size,.875rem);font-weight:var(--cds-heading-compact-01-font-weight,600);justify-content:space-between;letter-spacing:var(--cds-heading-compact-01-letter-spacing,.16px);line-height:var(--cds-heading-compact-01-line-height,1.28572);margin-inline-start:1rem;pointer-events:none}cds-custom-header-menu::part(menu-body){inline-size:100%!important;max-block-size:calc(100vh - 47px);min-inline-size:15rem!important;overflow-x:hidden}cds-custom-header-menu::part(trigger){align-items:center!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;justify-content:space-between!important;max-inline-size:224px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}cds-custom-header-menu-item:nth-last-child(2){border-block-end:1px solid #393939}"]);
|
|
8
|
-
|
|
9
|
-
exports.default = styles;
|
|
10
|
-
//# sourceMappingURL=_index.scss.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_index.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*
|
|
4
|
-
* Copyright IBM Corp. 2025
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
import { TrialTooltipProps } from './TrialContent.types';
|
|
10
|
-
import '@carbon/web-components/es-custom/components/link/index.js';
|
|
11
|
-
export declare const TrialContent: ({ description, links, actionText, actionLink, }: TrialTooltipProps) => import("lit-html").TemplateResult<1>;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var lit = require('lit');
|
|
4
|
-
var constant = require('../../constant.js');
|
|
5
|
-
var utils = require('../../globals/utils.js');
|
|
6
|
-
require('@carbon/web-components/es-custom/components/link/index.js');
|
|
7
|
-
var Header_types = require('../../types/Header.types.js');
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @license
|
|
11
|
-
*
|
|
12
|
-
* Copyright IBM Corp. 2025
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
15
|
-
* LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/
|
|
17
|
-
/* eslint jsdoc/require-jsdoc: 0 */
|
|
18
|
-
const TrialContent = ({ description, links, actionText, actionLink, }) => {
|
|
19
|
-
return lit.html `
|
|
20
|
-
<div class="automation-header__tooltip">
|
|
21
|
-
<div class="${constant.AUTOMATION_HEADER_BASE_CLASS}__tooltip-caret"></div>
|
|
22
|
-
<div class="automation-header__tooltip-body">
|
|
23
|
-
${description
|
|
24
|
-
? lit.html `<p
|
|
25
|
-
tabindex="{0}"
|
|
26
|
-
role="tabpanel"
|
|
27
|
-
class="${constant.AUTOMATION_HEADER_BASE_CLASS}__tooltip-description"
|
|
28
|
-
aria-label="${description}">
|
|
29
|
-
${description}
|
|
30
|
-
</p>`
|
|
31
|
-
: lit.nothing}
|
|
32
|
-
<div class="${constant.AUTOMATION_HEADER_BASE_CLASS}__tooltip-links">
|
|
33
|
-
${links === null || links === void 0 ? void 0 : links.map((link) => lit.html `
|
|
34
|
-
<cds-custom-link
|
|
35
|
-
href="${link.href}"
|
|
36
|
-
class="${constant.AUTOMATION_HEADER_BASE_CLASS}__tooltip-link">
|
|
37
|
-
<span
|
|
38
|
-
>${link.label}
|
|
39
|
-
${getIconFromType(link.type)}</span
|
|
40
|
-
>
|
|
41
|
-
</cds-custom-link>
|
|
42
|
-
`)}
|
|
43
|
-
</div>
|
|
44
|
-
${actionText && actionLink
|
|
45
|
-
? lit.html `
|
|
46
|
-
<cds-custom-link
|
|
47
|
-
href=${actionLink}
|
|
48
|
-
class="${constant.AUTOMATION_HEADER_BASE_CLASS}__trial-button">
|
|
49
|
-
<div class="buttons">
|
|
50
|
-
${actionText}
|
|
51
|
-
<span class="button-icon"
|
|
52
|
-
>${utils.renderCarbonIcon('Email', 16)}</span
|
|
53
|
-
>
|
|
54
|
-
</div>
|
|
55
|
-
</cds-custom-link>
|
|
56
|
-
`
|
|
57
|
-
: lit.nothing}
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
`;
|
|
61
|
-
};
|
|
62
|
-
function getIconFromType(type) {
|
|
63
|
-
switch (type) {
|
|
64
|
-
case 'invite':
|
|
65
|
-
case Header_types.TrialLinkType['invite']:
|
|
66
|
-
return utils.renderCarbonIcon('Share', 16);
|
|
67
|
-
case 'requestQuote':
|
|
68
|
-
case Header_types.TrialLinkType['requestQuote']:
|
|
69
|
-
return utils.renderCarbonIcon('RequestQuote', 16);
|
|
70
|
-
default:
|
|
71
|
-
return utils.renderCarbonIcon('User', 16);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
exports.TrialContent = TrialContent;
|
|
76
|
-
//# sourceMappingURL=TrialContent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TrialContent.js","sources":["../../../../../../../components/global-header/src/components/TrialContent/TrialContent.ts"],"sourcesContent":[null],"names":["html","AUTOMATION_HEADER_BASE_CLASS","nothing","renderCarbonIcon","TrialLinkType"],"mappings":";;;;;;;;AAAA;;;;;;;AAOG;AACH;AASO,MAAM,YAAY,GAAG,CAAC,EAC3B,WAAW,EACX,KAAK,EACL,UAAU,EACV,UAAU,GACQ,KAAI;AACtB,IAAA,OAAOA,QAAI,CAAA;;oBAEOC,qCAA4B,CAAA;;UAEtC;UACED,QAAI,CAAA,CAAA;;;uBAGOC,qCAA4B,CAAA;4BACvB,WAAW,CAAA;gBACvB,WAAW;AACV,gBAAA;AACP,UAAEC,WAAO;sBACGD,qCAA4B,CAAA;AACtC,UAAA,EAAA,KAAK,KAAA,IAAA,IAAL,KAAK,KAAA,MAAA,GAAA,MAAA,GAAL,KAAK,CAAE,GAAG,CACV,CAAC,IAAI,KAAKD,QAAI,CAAA;;AAEF,sBAAA,EAAA,IAAI,CAAC,IAAI,CAAA;yBACRC,qCAA4B,CAAA;;AAEhC,mBAAA,EAAA,IAAI,CAAC,KAAK;AACX,kBAAA,EAAA,eAAe,CAAC,IAAI,CAAC,IAAyB,CAAC,CAAA;;;aAGtD,CACF;;AAED,QAAA,EAAA,UAAU,IAAI;UACZD,QAAI,CAAA;;uBAEO,UAAU;yBACRC,qCAA4B,CAAA;;oBAEjC,UAAU;;AAEP,qBAAA,EAAAE,sBAAgB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;;;;AAIvC,YAAA;AACH,UAAED,WAAO;;;GAGhB;AACH;AAEA,SAAS,eAAe,CAAC,IAA4B,EAAA;IACnD,QAAQ,IAAI;AACV,QAAA,KAAK,QAAQ;QACb,KAAKE,0BAAa,CAAC,QAAQ,CAAC;AAC1B,YAAA,OAAOD,sBAAgB,CAAC,OAAO,EAAE,EAAE,CAAC;AACtC,QAAA,KAAK,cAAc;QACnB,KAAKC,0BAAa,CAAC,cAAc,CAAC;AAChC,YAAA,OAAOD,sBAAgB,CAAC,cAAc,EAAE,EAAE,CAAC;AAC7C,QAAA;AACE,YAAA,OAAOA,sBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC;;AAEzC;;;;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*
|
|
4
|
-
* Copyright IBM Corp. 2025
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
import { TrialConfigs } from '../../types/Header.types';
|
|
10
|
-
export interface TrialTooltipProps extends TrialConfigs {
|
|
11
|
-
activeTrialPopover?: boolean;
|
|
12
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*
|
|
4
|
-
* Copyright IBM Corp. 2025
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
import type { Meta } from '@storybook/web-components-vite';
|
|
10
|
-
declare const meta: Meta;
|
|
11
|
-
export default meta;
|
|
12
|
-
export declare const Default: (args: any) => import("lit-html").TemplateResult<1>;
|
|
13
|
-
export declare const Warning: (args: any) => import("lit-html").TemplateResult<1>;
|
|
14
|
-
export declare const Expired: (args: any) => import("lit-html").TemplateResult<1>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*
|
|
4
|
-
* Copyright IBM Corp. 2025
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
import { LitElement } from 'lit';
|
|
10
|
-
import '@carbon/web-components/es-custom/components/popover/index.js';
|
|
11
|
-
import { TrialConfigs } from '../../types/Header.types';
|
|
12
|
-
/**
|
|
13
|
-
* Content to show when clicking the Trial entry in the header
|
|
14
|
-
*/
|
|
15
|
-
export declare class TrialPopover extends LitElement {
|
|
16
|
-
open: boolean;
|
|
17
|
-
trialConfig: TrialConfigs;
|
|
18
|
-
static styles: import("lit").CSSResult;
|
|
19
|
-
constructor();
|
|
20
|
-
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
21
|
-
handleOutsideClick(event: MouseEvent): void;
|
|
22
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
23
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var tslib = require('tslib');
|
|
4
|
-
var lit = require('lit');
|
|
5
|
-
var decorators_js = require('lit/decorators.js');
|
|
6
|
-
require('@carbon/web-components/es-custom/components/popover/index.js');
|
|
7
|
-
var TrialContent = require('../TrialContent/TrialContent.js');
|
|
8
|
-
var motion = require('@lit-labs/motion');
|
|
9
|
-
var _index = require('./_index.scss.js');
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @license
|
|
13
|
-
*
|
|
14
|
-
* Copyright IBM Corp. 2025
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/
|
|
19
|
-
/* eslint jsdoc/require-jsdoc: 0 */
|
|
20
|
-
/**
|
|
21
|
-
* Content to show when clicking the Trial entry in the header
|
|
22
|
-
*/
|
|
23
|
-
exports.TrialPopover = class TrialPopover extends lit.LitElement {
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
this.open = false;
|
|
27
|
-
this.trialConfig = {};
|
|
28
|
-
this.handleOutsideClick = this.handleOutsideClick.bind(this);
|
|
29
|
-
}
|
|
30
|
-
updated(changedProperties) {
|
|
31
|
-
if (changedProperties.has('open')) {
|
|
32
|
-
if (this.open) {
|
|
33
|
-
document.addEventListener('click', this.handleOutsideClick);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
document.removeEventListener('click', this.handleOutsideClick);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
handleOutsideClick(event) {
|
|
41
|
-
const path = event.composedPath();
|
|
42
|
-
if (!path.includes(this)) {
|
|
43
|
-
const toggleEvent = new CustomEvent('trial-toggle', {
|
|
44
|
-
bubbles: true,
|
|
45
|
-
composed: true,
|
|
46
|
-
}); // event to trigger the parent component to update the toggle value
|
|
47
|
-
this.dispatchEvent(toggleEvent);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
render() {
|
|
51
|
-
return lit.html `
|
|
52
|
-
<cds-custom-popover ?open="${this.open}" align="bottom-right">
|
|
53
|
-
<slot></slot>
|
|
54
|
-
<cds-custom-popover-content>
|
|
55
|
-
${this.open
|
|
56
|
-
? lit.html `<div
|
|
57
|
-
class="automation-header__tooltip"
|
|
58
|
-
${motion.animate({ in: motion.fadeIn, out: motion.fadeOut, stabilizeOut: true })}>
|
|
59
|
-
${TrialContent.TrialContent({ ...this.trialConfig })}
|
|
60
|
-
</div>`
|
|
61
|
-
: lit.nothing}
|
|
62
|
-
</cds-custom-popover-content>
|
|
63
|
-
</cds-custom-popover>
|
|
64
|
-
`;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
exports.TrialPopover.styles = lit.css `
|
|
68
|
-
${lit.unsafeCSS(_index.default)}
|
|
69
|
-
`;
|
|
70
|
-
tslib.__decorate([
|
|
71
|
-
decorators_js.property({ type: Boolean })
|
|
72
|
-
], exports.TrialPopover.prototype, "open", void 0);
|
|
73
|
-
tslib.__decorate([
|
|
74
|
-
decorators_js.property({ type: Object })
|
|
75
|
-
], exports.TrialPopover.prototype, "trialConfig", void 0);
|
|
76
|
-
exports.TrialPopover = tslib.__decorate([
|
|
77
|
-
decorators_js.customElement('apaas-trial-popover')
|
|
78
|
-
], exports.TrialPopover);
|
|
79
|
-
//# sourceMappingURL=TrialPopover.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TrialPopover.js","sources":["../../../../../../../components/global-header/src/components/TrialPopover/TrialPopover.ts"],"sourcesContent":[null],"names":["TrialPopover","LitElement","html","animate","fadeIn","fadeOut","TrialContent","nothing","css","unsafeCSS","styles","__decorate","property","customElement"],"mappings":";;;;;;;;;;AAAA;;;;;;;AAOG;AACH;AAYA;;AAEG;AAEUA,oBAAY,GAAlB,MAAM,YAAa,SAAQC,cAAU,CAAA;AAO1C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAPoB,IAAA,CAAA,IAAI,GAAG,KAAK;QACb,IAAA,CAAA,WAAW,GAAiB,EAAE;QAOxD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;IAC9D;AAEA,IAAA,OAAO,CAAC,iBAAyD,EAAA;AAC/D,QAAA,IAAI,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;AACjC,YAAA,IAAI,IAAI,CAAC,IAAI,EAAE;gBACb,QAAQ,C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AAE;AAAiC,CAAA,EAAAZ,oBAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAFhDA,oBAAY,GAAAW,gBAAA,CAAA;IADxBE,2BAAa,CAAC,qBAAqB;AACvB,CAAA,EAAAb,oBAAY,CAkDxB;;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var lit = require('lit');
|
|
6
|
-
|
|
7
|
-
var styles = lit.css([".automation-header__tooltip{color:#fff;inline-size:16rem;inset-block-start:0;inset-inline-end:0;position:absolute;transform:translateX(40px)}.automation-header__tooltip-body{background-color:#393939;border-radius:3px;box-shadow:0 5px 5px 0 rgba(0,0,0,.3);padding:1rem}.automation-header__tooltip-body :last-child{margin-block-end:0}.automation-global-header__tooltip-description{font-size:14px;line-height:1.25rem;margin-block-end:1rem}.automation-global-header__tooltip-links{margin-block-end:1rem}.automation-global-header__tooltip-links .automation-global-header__tooltip-link{color:#78a9ff;display:block;margin-block-end:.25rem;margin-inline-start:-1rem;padding:6px 15px}.automation-global-header__tooltip-links .automation-global-header__tooltip-link svg{fill:#78a9ff}.automation-global-header__tooltip-links .automation-global-header__tooltip-link:hover{background-color:transparent;text-decoration:underline}.automation-global-header__trial-button{display:inline-block}.automation-global-header__trial-button .buttons{background:#0f62fe;color:#fff;display:flex;padding:6px 15px}.automation-global-header__trial-button .button-icon{display:flex;margin-inline-start:20px}.automation-global-header__trial-button:hover{text-decoration:none}.automation-global-header--popover-content-container .ibm-automation-cds--popover span{display:none}.automation-global-header--popover-content-container .ibm-automation-cds--popover .ibm-automation-cds--popover-content{background-color:#393939;color:#fff;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);padding:.125rem .5rem}.automation-global-header--popover-content-container .ibm-automation-cds--popover .ibm-automation-cds--popover-caret{display:none}"]);
|
|
8
|
-
|
|
9
|
-
exports.default = styles;
|
|
10
|
-
//# sourceMappingURL=_index.scss.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_index.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*
|
|
4
|
-
* Copyright IBM Corp. 2025
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
import { LitElement } from 'lit';
|
|
10
|
-
import { NoAuthHeaderLinks } from '../../types/Header.types';
|
|
11
|
-
import '@carbon/web-components/es-custom/components/ui-shell/index.js';
|
|
12
|
-
/**
|
|
13
|
-
* Content to show when not logged in
|
|
14
|
-
*/
|
|
15
|
-
export declare class UnauthenticatedContext extends LitElement {
|
|
16
|
-
static styles: import("lit").CSSResult;
|
|
17
|
-
noAuthHeaderLinks: NoAuthHeaderLinks[];
|
|
18
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
19
|
-
}
|
package/lib/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var tslib = require('tslib');
|
|
4
|
-
var lit = require('lit');
|
|
5
|
-
var decorators_js = require('lit/decorators.js');
|
|
6
|
-
var utils = require('../../globals/utils.js');
|
|
7
|
-
require('@carbon/web-components/es-custom/components/ui-shell/index.js');
|
|
8
|
-
var index = require('../../../../../_virtual/index.js');
|
|
9
|
-
var constant = require('../../constant.js');
|
|
10
|
-
var _index = require('../_index.scss.js');
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @license
|
|
14
|
-
*
|
|
15
|
-
* Copyright IBM Corp. 2025
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/
|
|
20
|
-
/* eslint jsdoc/require-jsdoc: 0 */
|
|
21
|
-
/**
|
|
22
|
-
* Content to show when not logged in
|
|
23
|
-
*/
|
|
24
|
-
exports.UnauthenticatedContext = class UnauthenticatedContext extends lit.LitElement {
|
|
25
|
-
constructor() {
|
|
26
|
-
super(...arguments);
|
|
27
|
-
this.noAuthHeaderLinks = [
|
|
28
|
-
...constant.DEFAULT_NO_AUTH_HEADER_LINKS,
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
return lit.html ` <cds-custom-header-nav
|
|
33
|
-
aria-label="Navigation"
|
|
34
|
-
class="${index.default(constant.AUTOMATION_NAMESPACE_PREFIX, `${constant.HEADER_NAVIGATION_ACTION}__menu`)}">
|
|
35
|
-
${this.noAuthHeaderLinks &&
|
|
36
|
-
this.noAuthHeaderLinks.map((headerLink) => {
|
|
37
|
-
return lit.html `
|
|
38
|
-
<cds-custom-header-nav-item
|
|
39
|
-
aria-label="${headerLink === null || headerLink === void 0 ? void 0 : headerLink.arialLabel}"
|
|
40
|
-
href="${headerLink === null || headerLink === void 0 ? void 0 : headerLink.href}"
|
|
41
|
-
class="${`${constant.HEADER_NAVIGATION_ACTION}__menu-item`}">
|
|
42
|
-
${headerLink === null || headerLink === void 0 ? void 0 : headerLink.text}
|
|
43
|
-
${(headerLink === null || headerLink === void 0 ? void 0 : headerLink.carbonIcon)
|
|
44
|
-
? lit.html `<span
|
|
45
|
-
>${utils.renderCarbonIcon(headerLink.carbonIcon, 16)}</span
|
|
46
|
-
>`
|
|
47
|
-
: lit.nothing}
|
|
48
|
-
</cds-custom-header-nav-item>
|
|
49
|
-
`;
|
|
50
|
-
})}
|
|
51
|
-
</cds-custom-header-nav>`;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
exports.UnauthenticatedContext.styles = lit.css `
|
|
55
|
-
${lit.unsafeCSS(_index.default)}
|
|
56
|
-
`;
|
|
57
|
-
tslib.__decorate([
|
|
58
|
-
decorators_js.property({ type: Array })
|
|
59
|
-
], exports.UnauthenticatedContext.prototype, "noAuthHeaderLinks", void 0);
|
|
60
|
-
exports.UnauthenticatedContext = tslib.__decorate([
|
|
61
|
-
decorators_js.customElement('apaas-unauthenticated-context')
|
|
62
|
-
], exports.UnauthenticatedContext);
|
|
63
|
-
//# sourceMappingURL=UnauthenticatedContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UnauthenticatedContext.js","sources":["../../../../../../../components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.ts"],"sourcesContent":[null],"names":["UnauthenticatedContext","LitElement","DEFAULT_NO_AUTH_HEADER_LINKS","html","cx","AUTOMATION_NAMESPACE_PREFIX","HEADER_NAVIGATION_ACTION","renderCarbonIcon","nothing","css","unsafeCSS","styles","__decorate","property","customElement"],"mappings":";;;;;;;;;;;AAAA;;;;;;;AAOG;AACH;AAiBA;;AAEG;AAEUA,8BAAsB,GAA5B,MAAM,sBAAuB,SAAQC,cAAU,CAAA;AAA/C,IAAA,WAAA,GAAA;;AAIsB,QAAA,IAAA,CAAA,iBAAiB,GAAwB;AAClE,YAAA,GAAGC,qCAA4B;SAChC;IA2BH;IAzBE,MAAM,GAAA;AACJ,QAAA,OAAOC,QAAI,CAAA,CAAA;;AAEA,aAAA,EAAAC,aAAE,CACTC,oCAA2B,EAC3B,CAAA,EAAGC,iCAAwB,QAAQ,CACpC,CAAA;AACC,MAAA,EAAA,IAAI,CAAC,iBAAiB;YACxB,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,UAA6B,KAAI;AAC3D,gBAAA,OAAOH,QAAI,CAAA;;AAEO,wBAAA,EAAA,UAAU,KAAA,IAAA,IAAV,UAAU,KAAA,MAAA,GAAA,MAAA,GAAV,UAAU,CAAE,UAAU,CAAA;AAC5B,kBAAA,EAAA,UAAU,KAAA,IAAA,IAAV,UAAU,KAAA,MAAA,GAAA,MAAA,GAAV,UAAU,CAAE,IAAI,CAAA;AACf,mBAAA,EAAA,CAAA,EAAGG,iCAAwB,CAAA,WAAA,CAAa,CAAA;AAC/C,YAAA,EAAA,UAAU,KAAA,IAAA,IAAV,UAAU,KAAA,MAAA,GAAA,MAAA,GAAV,UAAU,CAAE,IAAI;AAChB,YAAA,EAAA,CAAA,UAAU,KAAA,IAAA,IAAV,UAAU,KAAA,MAAA,GAAA,MAAA,GAAV,UAAU,CAAE,UAAU;sBACpBH,QAAI,CAAA,CAAA;AACC,mBAAA,EAAAI,sBAAgB,CAAC,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;AAC9C,iBAAA;AACJ,sBAAEC,WAAO;;SAEd;AACH,YAAA,CAAC,CAAC;6BACqB;IAC3B;;AA/BOR,8BAAA,CAAA,MAAM,GAAGS,OAAG,CAAA;MACfC,aAAS,CAACC,cAAM,CAAC;AACpB,EAAA,CAFY;AAGcC,gBAAA,CAAA;AAA1B,IAAAC,sBAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE;AAEvB,CAAA,EAAAb,8BAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,MAAA,CAAA;AANSA,8BAAsB,GAAAY,gBAAA,CAAA;IADlCE,2BAAa,CAAC,+BAA+B;AACjC,CAAA,EAAAd,8BAAsB,CAiClC;;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*
|
|
4
|
-
* Copyright IBM Corp. 2025
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
10
|
-
import { UnauthenticatedContext } from './UnauthenticatedContext';
|
|
11
|
-
import '@carbon/web-components/es-custom/components/ui-shell/index.js';
|
|
12
|
-
declare const meta: Meta;
|
|
13
|
-
export default meta;
|
|
14
|
-
type Story = StoryObj<typeof UnauthenticatedContext>;
|
|
15
|
-
export declare const Basic: Story;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*
|
|
4
|
-
* Copyright IBM Corp. 2025
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
import { LitElement } from 'lit';
|
|
10
|
-
/**
|
|
11
|
-
* User image for the profile menu
|
|
12
|
-
*/
|
|
13
|
-
export declare class SideNavItem extends LitElement {
|
|
14
|
-
static styles: import("lit").CSSResult;
|
|
15
|
-
kind: string;
|
|
16
|
-
size: string;
|
|
17
|
-
image: string;
|
|
18
|
-
initials: string;
|
|
19
|
-
className: string;
|
|
20
|
-
backgroundColor: string;
|
|
21
|
-
icons: {
|
|
22
|
-
user: {
|
|
23
|
-
md: Element | import("lit-html").TemplateResult<1>;
|
|
24
|
-
lg: Element | import("lit-html").TemplateResult<1>;
|
|
25
|
-
xlg: Element | import("lit-html").TemplateResult<1>;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
formatInitials: () => string | undefined;
|
|
29
|
-
getFillItem: () => string | Element | import("lit-html").TemplateResult<1> | undefined;
|
|
30
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
31
|
-
}
|