@carbon-labs/wc-global-header 0.1.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.
Files changed (243) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +34 -0
  3. package/es/_virtual/_commonjsHelpers.js +6 -0
  4. package/es/_virtual/_commonjsHelpers.js.map +1 -0
  5. package/es/_virtual/index.js +8 -0
  6. package/es/_virtual/index.js.map +1 -0
  7. package/es/_virtual/index2.js +4 -0
  8. package/es/_virtual/index2.js.map +1 -0
  9. package/es/components/global-header/global-header.d.ts +15 -0
  10. package/es/components/global-header/global-header.js +23 -0
  11. package/es/components/global-header/global-header.js.map +1 -0
  12. package/es/components/global-header/src/components/AuthContext/AuthContext.d.ts +26 -0
  13. package/es/components/global-header/src/components/AuthContext/AuthContext.js +238 -0
  14. package/es/components/global-header/src/components/AuthContext/AuthContext.js.map +1 -0
  15. package/es/components/global-header/src/components/AuthContext/AuthContext.types.d.ts +17 -0
  16. package/es/components/global-header/src/components/AuthContext/__stories__/AuthContext.stories.d.ts +12 -0
  17. package/es/components/global-header/src/components/AuthContext/__tests__/AuthContext.test.d.ts +9 -0
  18. package/es/components/global-header/src/components/AuthContext/_index.scss.js +6 -0
  19. package/es/components/global-header/src/components/AuthContext/_index.scss.js.map +1 -0
  20. package/es/components/global-header/src/components/CommonHeader/CommonHeader.d.ts +36 -0
  21. package/es/components/global-header/src/components/CommonHeader/CommonHeader.js +245 -0
  22. package/es/components/global-header/src/components/CommonHeader/CommonHeader.js.map +1 -0
  23. package/es/components/global-header/src/components/CommonHeader/WideSideNav.d.ts +15 -0
  24. package/es/components/global-header/src/components/CommonHeader/WideSideNav.js +32 -0
  25. package/es/components/global-header/src/components/CommonHeader/WideSideNav.js.map +1 -0
  26. package/es/components/global-header/src/components/CommonHeader/__stories__/CommonHeader.stories.d.ts +20 -0
  27. package/es/components/global-header/src/components/CommonHeader/__stories__/SideNav.stories.d.ts +16 -0
  28. package/es/components/global-header/src/components/CommonHeader/__tests__/CommonHeader.test.d.ts +9 -0
  29. package/es/components/global-header/src/components/CommonHeader/__tests__/WideSideNav.test.d.ts +9 -0
  30. package/es/components/global-header/src/components/CommonHeader/_index.scss.js +6 -0
  31. package/es/components/global-header/src/components/CommonHeader/_index.scss.js.map +1 -0
  32. package/es/components/global-header/src/components/HeaderContext/HeaderContext.d.ts +43 -0
  33. package/es/components/global-header/src/components/HeaderContext/HeaderContext.js +311 -0
  34. package/es/components/global-header/src/components/HeaderContext/HeaderContext.js.map +1 -0
  35. package/es/components/global-header/src/components/HeaderContext/HeaderContext.types.d.ts +46 -0
  36. package/es/components/global-header/src/components/HeaderContext/__tests__/HeaderContext.test.d.ts +9 -0
  37. package/es/components/global-header/src/components/HeaderContext/_index.scss.js +6 -0
  38. package/es/components/global-header/src/components/HeaderContext/_index.scss.js.map +1 -0
  39. package/es/components/global-header/src/components/HybridIpaasHeader/HybridIpaasHeader.d.ts +41 -0
  40. package/es/components/global-header/src/components/HybridIpaasHeader/__stories__/HybridIPaasHeader.stories.d.ts +20 -0
  41. package/es/components/global-header/src/components/HybridIpaasHeader/__tests__/HybridIpaasHeader.test.d.ts +10 -0
  42. package/es/components/global-header/src/components/LogoutHeader/LogoutHeader.d.ts +17 -0
  43. package/es/components/global-header/src/components/LogoutHeader/__stories__/LogoutHeader.stories.d.ts +15 -0
  44. package/es/components/global-header/src/components/LogoutHeader/__tests__/LogoutHeader.test.d.ts +9 -0
  45. package/es/components/global-header/src/components/LogoutTile/LogoutTile.d.ts +24 -0
  46. package/es/components/global-header/src/components/LogoutTile/__stories__/LogoutTile.stories.d.ts +14 -0
  47. package/es/components/global-header/src/components/LogoutTile/__tests__/LogoutTile.test.d.ts +9 -0
  48. package/es/components/global-header/src/components/ProfilePopover/ProfilePopover.d.ts +22 -0
  49. package/es/components/global-header/src/components/ProfilePopover/ProfilePopover.js +100 -0
  50. package/es/components/global-header/src/components/ProfilePopover/ProfilePopover.js.map +1 -0
  51. package/es/components/global-header/src/components/ProfilePopover/__tests__/ProfilePopover.test.d.ts +9 -0
  52. package/es/components/global-header/src/components/ProfilePopover/_index.scss.js +6 -0
  53. package/es/components/global-header/src/components/ProfilePopover/_index.scss.js.map +1 -0
  54. package/es/components/global-header/src/components/Search/Search.d.ts +25 -0
  55. package/es/components/global-header/src/components/Search/Search.js +72 -0
  56. package/es/components/global-header/src/components/Search/Search.js.map +1 -0
  57. package/es/components/global-header/src/components/Search/__tests__/Search.test.d.ts +9 -0
  58. package/es/components/global-header/src/components/Search/_index.scss.js +6 -0
  59. package/es/components/global-header/src/components/Search/_index.scss.js.map +1 -0
  60. package/es/components/global-header/src/components/SideNavItem/SideNavItem.d.ts +31 -0
  61. package/es/components/global-header/src/components/SideNavItem/SideNavItem.js +214 -0
  62. package/es/components/global-header/src/components/SideNavItem/SideNavItem.js.map +1 -0
  63. package/es/components/global-header/src/components/SideNavItem/SideNavItem.scss.js +6 -0
  64. package/es/components/global-header/src/components/SideNavItem/SideNavItem.scss.js.map +1 -0
  65. package/es/components/global-header/src/components/SideNavItem/__tests__/SideNavItem.test.d.ts +9 -0
  66. package/es/components/global-header/src/components/Switcher/Switcher.d.ts +29 -0
  67. package/es/components/global-header/src/components/Switcher/Switcher.js +188 -0
  68. package/es/components/global-header/src/components/Switcher/Switcher.js.map +1 -0
  69. package/es/components/global-header/src/components/Switcher/Switcher.types.d.ts +11 -0
  70. package/es/components/global-header/src/components/Switcher/__tests__/Switcher.test.d.ts +9 -0
  71. package/es/components/global-header/src/components/Switcher/_index.scss.js +6 -0
  72. package/es/components/global-header/src/components/Switcher/_index.scss.js.map +1 -0
  73. package/es/components/global-header/src/components/TrialContent/TrialContent.d.ts +11 -0
  74. package/es/components/global-header/src/components/TrialContent/TrialContent.js +74 -0
  75. package/es/components/global-header/src/components/TrialContent/TrialContent.js.map +1 -0
  76. package/es/components/global-header/src/components/TrialContent/TrialContent.types.d.ts +12 -0
  77. package/es/components/global-header/src/components/TrialContent/__stories__/TrialContent.stories.d.ts +14 -0
  78. package/es/components/global-header/src/components/TrialPopover/TrialPopover.d.ts +23 -0
  79. package/es/components/global-header/src/components/TrialPopover/TrialPopover.js +79 -0
  80. package/es/components/global-header/src/components/TrialPopover/TrialPopover.js.map +1 -0
  81. package/es/components/global-header/src/components/TrialPopover/__tests__/TrialPopover.test.d.ts +9 -0
  82. package/es/components/global-header/src/components/TrialPopover/_index.scss.js +6 -0
  83. package/es/components/global-header/src/components/TrialPopover/_index.scss.js.map +1 -0
  84. package/es/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.d.ts +19 -0
  85. package/es/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.js +63 -0
  86. package/es/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.js.map +1 -0
  87. package/es/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.stories.d.ts +15 -0
  88. package/es/components/global-header/src/components/UnauthenticatedContext/__tests__/UnauthenticatedContext.test.d.ts +9 -0
  89. package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.d.ts +31 -0
  90. package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.js +104 -0
  91. package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.js.map +1 -0
  92. package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.scss.js +6 -0
  93. package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.scss.js.map +1 -0
  94. package/es/components/global-header/src/components/UserProfileImage/UserProfileImage.types.d.ts +21 -0
  95. package/es/components/global-header/src/components/UserProfileImage/__tests__/UserProfileImage.test.d.ts +9 -0
  96. package/es/components/global-header/src/components/_index.scss.js +6 -0
  97. package/es/components/global-header/src/components/_index.scss.js.map +1 -0
  98. package/es/components/global-header/src/constant.d.ts +53 -0
  99. package/es/components/global-header/src/constant.js +38 -0
  100. package/es/components/global-header/src/constant.js.map +1 -0
  101. package/es/components/global-header/src/global-header.scss.js +6 -0
  102. package/es/components/global-header/src/global-header.scss.js.map +1 -0
  103. package/es/components/global-header/src/global-header.template.d.ts +16 -0
  104. package/es/components/global-header/src/global-header.template.js +20 -0
  105. package/es/components/global-header/src/global-header.template.js.map +1 -0
  106. package/es/components/global-header/src/globals/__tests__/useScript.test.d.ts +9 -0
  107. package/es/components/global-header/src/globals/__tests__/utils.test.d.ts +9 -0
  108. package/es/components/global-header/src/globals/useScript.d.ts +10 -0
  109. package/es/components/global-header/src/globals/useScript.js +47 -0
  110. package/es/components/global-header/src/globals/useScript.js.map +1 -0
  111. package/es/components/global-header/src/globals/utils.d.ts +22 -0
  112. package/es/components/global-header/src/globals/utils.js +89 -0
  113. package/es/components/global-header/src/globals/utils.js.map +1 -0
  114. package/es/components/global-header/src/index.d.ts +12 -0
  115. package/es/components/global-header/src/types/Header.types.d.ts +267 -0
  116. package/es/components/global-header/src/types/Header.types.js +22 -0
  117. package/es/components/global-header/src/types/Header.types.js.map +1 -0
  118. package/es/index.d.ts +9 -0
  119. package/es/index.js +2 -0
  120. package/es/index.js.map +1 -0
  121. package/es/node_modules/classnames/index.js +86 -0
  122. package/es/node_modules/classnames/index.js.map +1 -0
  123. package/lib/_virtual/_commonjsHelpers.js +8 -0
  124. package/lib/_virtual/_commonjsHelpers.js.map +1 -0
  125. package/lib/_virtual/index.js +12 -0
  126. package/lib/_virtual/index.js.map +1 -0
  127. package/lib/_virtual/index2.js +6 -0
  128. package/lib/_virtual/index2.js.map +1 -0
  129. package/lib/components/global-header/global-header.d.ts +15 -0
  130. package/lib/components/global-header/global-header.js +25 -0
  131. package/lib/components/global-header/global-header.js.map +1 -0
  132. package/lib/components/global-header/src/components/AuthContext/AuthContext.d.ts +26 -0
  133. package/lib/components/global-header/src/components/AuthContext/AuthContext.js +238 -0
  134. package/lib/components/global-header/src/components/AuthContext/AuthContext.js.map +1 -0
  135. package/lib/components/global-header/src/components/AuthContext/AuthContext.types.d.ts +17 -0
  136. package/lib/components/global-header/src/components/AuthContext/__stories__/AuthContext.stories.d.ts +12 -0
  137. package/lib/components/global-header/src/components/AuthContext/__tests__/AuthContext.test.d.ts +9 -0
  138. package/lib/components/global-header/src/components/AuthContext/_index.scss.js +10 -0
  139. package/lib/components/global-header/src/components/AuthContext/_index.scss.js.map +1 -0
  140. package/lib/components/global-header/src/components/CommonHeader/CommonHeader.d.ts +36 -0
  141. package/lib/components/global-header/src/components/CommonHeader/CommonHeader.js +245 -0
  142. package/lib/components/global-header/src/components/CommonHeader/CommonHeader.js.map +1 -0
  143. package/lib/components/global-header/src/components/CommonHeader/WideSideNav.d.ts +15 -0
  144. package/lib/components/global-header/src/components/CommonHeader/WideSideNav.js +32 -0
  145. package/lib/components/global-header/src/components/CommonHeader/WideSideNav.js.map +1 -0
  146. package/lib/components/global-header/src/components/CommonHeader/__stories__/CommonHeader.stories.d.ts +20 -0
  147. package/lib/components/global-header/src/components/CommonHeader/__stories__/SideNav.stories.d.ts +16 -0
  148. package/lib/components/global-header/src/components/CommonHeader/__tests__/CommonHeader.test.d.ts +9 -0
  149. package/lib/components/global-header/src/components/CommonHeader/__tests__/WideSideNav.test.d.ts +9 -0
  150. package/lib/components/global-header/src/components/CommonHeader/_index.scss.js +10 -0
  151. package/lib/components/global-header/src/components/CommonHeader/_index.scss.js.map +1 -0
  152. package/lib/components/global-header/src/components/HeaderContext/HeaderContext.d.ts +43 -0
  153. package/lib/components/global-header/src/components/HeaderContext/HeaderContext.js +311 -0
  154. package/lib/components/global-header/src/components/HeaderContext/HeaderContext.js.map +1 -0
  155. package/lib/components/global-header/src/components/HeaderContext/HeaderContext.types.d.ts +46 -0
  156. package/lib/components/global-header/src/components/HeaderContext/__tests__/HeaderContext.test.d.ts +9 -0
  157. package/lib/components/global-header/src/components/HeaderContext/_index.scss.js +10 -0
  158. package/lib/components/global-header/src/components/HeaderContext/_index.scss.js.map +1 -0
  159. package/lib/components/global-header/src/components/HybridIpaasHeader/HybridIpaasHeader.d.ts +41 -0
  160. package/lib/components/global-header/src/components/HybridIpaasHeader/__stories__/HybridIPaasHeader.stories.d.ts +20 -0
  161. package/lib/components/global-header/src/components/HybridIpaasHeader/__tests__/HybridIpaasHeader.test.d.ts +10 -0
  162. package/lib/components/global-header/src/components/LogoutHeader/LogoutHeader.d.ts +17 -0
  163. package/lib/components/global-header/src/components/LogoutHeader/__stories__/LogoutHeader.stories.d.ts +15 -0
  164. package/lib/components/global-header/src/components/LogoutHeader/__tests__/LogoutHeader.test.d.ts +9 -0
  165. package/lib/components/global-header/src/components/LogoutTile/LogoutTile.d.ts +24 -0
  166. package/lib/components/global-header/src/components/LogoutTile/__stories__/LogoutTile.stories.d.ts +14 -0
  167. package/lib/components/global-header/src/components/LogoutTile/__tests__/LogoutTile.test.d.ts +9 -0
  168. package/lib/components/global-header/src/components/ProfilePopover/ProfilePopover.d.ts +22 -0
  169. package/lib/components/global-header/src/components/ProfilePopover/ProfilePopover.js +100 -0
  170. package/lib/components/global-header/src/components/ProfilePopover/ProfilePopover.js.map +1 -0
  171. package/lib/components/global-header/src/components/ProfilePopover/__tests__/ProfilePopover.test.d.ts +9 -0
  172. package/lib/components/global-header/src/components/ProfilePopover/_index.scss.js +10 -0
  173. package/lib/components/global-header/src/components/ProfilePopover/_index.scss.js.map +1 -0
  174. package/lib/components/global-header/src/components/Search/Search.d.ts +25 -0
  175. package/lib/components/global-header/src/components/Search/Search.js +72 -0
  176. package/lib/components/global-header/src/components/Search/Search.js.map +1 -0
  177. package/lib/components/global-header/src/components/Search/__tests__/Search.test.d.ts +9 -0
  178. package/lib/components/global-header/src/components/Search/_index.scss.js +10 -0
  179. package/lib/components/global-header/src/components/Search/_index.scss.js.map +1 -0
  180. package/lib/components/global-header/src/components/SideNavItem/SideNavItem.d.ts +31 -0
  181. package/lib/components/global-header/src/components/SideNavItem/SideNavItem.js +214 -0
  182. package/lib/components/global-header/src/components/SideNavItem/SideNavItem.js.map +1 -0
  183. package/lib/components/global-header/src/components/SideNavItem/SideNavItem.scss.js +10 -0
  184. package/lib/components/global-header/src/components/SideNavItem/SideNavItem.scss.js.map +1 -0
  185. package/lib/components/global-header/src/components/SideNavItem/__tests__/SideNavItem.test.d.ts +9 -0
  186. package/lib/components/global-header/src/components/Switcher/Switcher.d.ts +29 -0
  187. package/lib/components/global-header/src/components/Switcher/Switcher.js +188 -0
  188. package/lib/components/global-header/src/components/Switcher/Switcher.js.map +1 -0
  189. package/lib/components/global-header/src/components/Switcher/Switcher.types.d.ts +11 -0
  190. package/lib/components/global-header/src/components/Switcher/__tests__/Switcher.test.d.ts +9 -0
  191. package/lib/components/global-header/src/components/Switcher/_index.scss.js +10 -0
  192. package/lib/components/global-header/src/components/Switcher/_index.scss.js.map +1 -0
  193. package/lib/components/global-header/src/components/TrialContent/TrialContent.d.ts +11 -0
  194. package/lib/components/global-header/src/components/TrialContent/TrialContent.js +76 -0
  195. package/lib/components/global-header/src/components/TrialContent/TrialContent.js.map +1 -0
  196. package/lib/components/global-header/src/components/TrialContent/TrialContent.types.d.ts +12 -0
  197. package/lib/components/global-header/src/components/TrialContent/__stories__/TrialContent.stories.d.ts +14 -0
  198. package/lib/components/global-header/src/components/TrialPopover/TrialPopover.d.ts +23 -0
  199. package/lib/components/global-header/src/components/TrialPopover/TrialPopover.js +79 -0
  200. package/lib/components/global-header/src/components/TrialPopover/TrialPopover.js.map +1 -0
  201. package/lib/components/global-header/src/components/TrialPopover/__tests__/TrialPopover.test.d.ts +9 -0
  202. package/lib/components/global-header/src/components/TrialPopover/_index.scss.js +10 -0
  203. package/lib/components/global-header/src/components/TrialPopover/_index.scss.js.map +1 -0
  204. package/lib/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.d.ts +19 -0
  205. package/lib/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.js +63 -0
  206. package/lib/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.js.map +1 -0
  207. package/lib/components/global-header/src/components/UnauthenticatedContext/UnauthenticatedContext.stories.d.ts +15 -0
  208. package/lib/components/global-header/src/components/UnauthenticatedContext/__tests__/UnauthenticatedContext.test.d.ts +9 -0
  209. package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.d.ts +31 -0
  210. package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.js +104 -0
  211. package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.js.map +1 -0
  212. package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.scss.js +10 -0
  213. package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.scss.js.map +1 -0
  214. package/lib/components/global-header/src/components/UserProfileImage/UserProfileImage.types.d.ts +21 -0
  215. package/lib/components/global-header/src/components/UserProfileImage/__tests__/UserProfileImage.test.d.ts +9 -0
  216. package/lib/components/global-header/src/components/_index.scss.js +10 -0
  217. package/lib/components/global-header/src/components/_index.scss.js.map +1 -0
  218. package/lib/components/global-header/src/constant.d.ts +53 -0
  219. package/lib/components/global-header/src/constant.js +53 -0
  220. package/lib/components/global-header/src/constant.js.map +1 -0
  221. package/lib/components/global-header/src/global-header.scss.js +10 -0
  222. package/lib/components/global-header/src/global-header.scss.js.map +1 -0
  223. package/lib/components/global-header/src/global-header.template.d.ts +16 -0
  224. package/lib/components/global-header/src/global-header.template.js +24 -0
  225. package/lib/components/global-header/src/global-header.template.js.map +1 -0
  226. package/lib/components/global-header/src/globals/__tests__/useScript.test.d.ts +9 -0
  227. package/lib/components/global-header/src/globals/__tests__/utils.test.d.ts +9 -0
  228. package/lib/components/global-header/src/globals/useScript.d.ts +10 -0
  229. package/lib/components/global-header/src/globals/useScript.js +51 -0
  230. package/lib/components/global-header/src/globals/useScript.js.map +1 -0
  231. package/lib/components/global-header/src/globals/utils.d.ts +22 -0
  232. package/lib/components/global-header/src/globals/utils.js +96 -0
  233. package/lib/components/global-header/src/globals/utils.js.map +1 -0
  234. package/lib/components/global-header/src/index.d.ts +12 -0
  235. package/lib/components/global-header/src/types/Header.types.d.ts +267 -0
  236. package/lib/components/global-header/src/types/Header.types.js +22 -0
  237. package/lib/components/global-header/src/types/Header.types.js.map +1 -0
  238. package/lib/index.d.ts +9 -0
  239. package/lib/index.js +5 -0
  240. package/lib/index.js.map +1 -0
  241. package/lib/node_modules/classnames/index.js +88 -0
  242. package/lib/node_modules/classnames/index.js.map +1 -0
  243. package/package.json +42 -0
@@ -0,0 +1,10 @@
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 { HeaderProps } from '../types/Header.types';
10
+ export default function useScript(props: HeaderProps): string;
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var utils = require('./utils.js');
6
+
7
+ /**
8
+ * @license
9
+ *
10
+ * Copyright IBM Corp. 2025
11
+ *
12
+ * This source code is licensed under the Apache-2.0 license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */
15
+ /* eslint jsdoc/require-jsdoc: 0 */
16
+ function useScript(props) {
17
+ var _a, _b, _c;
18
+ const assistMeUrl = utils.getAssistMeUrl((_a = props === null || props === void 0 ? void 0 : props.environment) !== null && _a !== void 0 ? _a : '');
19
+ const isAssistMeEnabled = (_b = props === null || props === void 0 ? void 0 : props.assistMeConfigs) === null || _b === void 0 ? void 0 : _b.productId;
20
+ let status = isAssistMeEnabled ? 'loading' : 'idle';
21
+ if (!isAssistMeEnabled) {
22
+ return 'idle';
23
+ }
24
+ let script = document === null || document === void 0 ? void 0 : document.querySelector(`script[src="${assistMeUrl}"]`);
25
+ if (!script) {
26
+ script = document.createElement('script');
27
+ script.src = assistMeUrl;
28
+ script.defer = true;
29
+ script.async = true;
30
+ script.crossOrigin = 'anonymous';
31
+ script.setAttribute('data-status', 'loading');
32
+ (_c = document === null || document === void 0 ? void 0 : document.body) === null || _c === void 0 ? void 0 : _c.appendChild(script);
33
+ const setAttributeFromEvent = (event) => {
34
+ script === null || script === void 0 ? void 0 : script.setAttribute('data-status', event.type === 'load' ? 'ready' : 'error');
35
+ document.dispatchEvent(new CustomEvent('assist-me-script-status', {
36
+ detail: { message: event.type },
37
+ bubbles: true,
38
+ composed: true,
39
+ }));
40
+ };
41
+ script.addEventListener('load', setAttributeFromEvent);
42
+ script.addEventListener('error', setAttributeFromEvent);
43
+ }
44
+ else {
45
+ status = script.getAttribute('data-status');
46
+ }
47
+ return status;
48
+ }
49
+
50
+ exports.default = useScript;
51
+ //# sourceMappingURL=useScript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScript.js","sources":["../../../../../../components/global-header/src/globals/useScript.ts"],"sourcesContent":[null],"names":["getAssistMeUrl"],"mappings":";;;;;;AAAA;;;;;;;AAOG;AACH;AAKc,SAAU,SAAS,CAAC,KAAkB,EAAA;;AAClD,IAAA,MAAM,WAAW,GAAGA,oBAAc,CAAC,MAAA,KAAK,KAAA,IAAA,IAAL,KAAK,KAAA,MAAA,GAAA,MAAA,GAAL,KAAK,CAAE,WAAW,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,EAAE,CAAC;AAC5D,IAAA,MAAM,iBAAiB,GAAG,CAAA,EAAA,GAAA,KAAK,KAAA,IAAA,IAAL,KAAK,KAAA,MAAA,GAAA,MAAA,GAAL,KAAK,CAAE,eAAe,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,SAAS;IAE3D,IAAI,MAAM,GAAG,iBAAiB,GAAG,SAAS,GAAG,MAAM;IACnD,IAAI,CAAC,iBAAiB,EAAE;AACtB,QAAA,OAAO,MAAM;IACf;AAEA,IAAA,IAAI,MAAM,GAAG,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,aAAa,CAClC,CAAA,YAAA,EAAe,WAAW,CAAA,EAAA,CAAI,CACV;IAEtB,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;AACzC,QAAA,MAAM,CAAC,GAAG,GAAG,WAAW;AACxB,QAAA,MAAM,CAAC,KAAK,GAAG,IAAI;AACnB,QAAA,MAAM,CAAC,KAAK,GAAG,IAAI;AACnB,QAAA,MAAM,CAAC,WAAW,GAAG,WAAW;AAChC,QAAA,MAAM,CAAC,YAAY,CAAC,aAAa,EAAE,SAAS,CAAC;AAE7C,QAAA,CAAA,EAAA,GAAA,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,IAAI,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,WAAW,CAAC,MAAM,CAAC;AAEnC,QAAA,MAAM,qBAAqB,GAAG,CAAC,KAAuB,KAAI;YACxD,MAAM,KAAA,IAAA,IAAN,MAAM,KAAA,MAAA,GAAA,MAAA,GAAN,MAAM,CAAE,YAAY,CAClB,aAAa,EACb,KAAK,CAAC,IAAI,KAAK,MAAM,GAAG,OAAO,GAAG,OAAO,CAC1C;AAED,YAAA,QAAQ,CAAC,aAAa,CACpB,IAAI,WAAW,CAAC,yBAAyB,EAAE;AACzC,gBAAA,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE;AAC/B,gBAAA,OAAO,EAAE,IAAI;AACb,gBAAA,QAAQ,EAAE,IAAI;AACf,aAAA,CAAC,CACH;AACH,QAAA,CAAC;AAED,QAAA,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,CAAC;AACtD,QAAA,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACzD;SAAO;AACL,QAAA,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,aAAa,CAAW;IACvD;AACA,IAAA,OAAO,MAAM;AACf;;;;"}
@@ -0,0 +1,22 @@
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 { EventProps } from '../types/Header.types';
10
+ export declare const ASSIST_ME_SCRIPT_DEV = "https://ibmassistme-dev.zll1vg8lrcq.us-south.codeengine.appdomain.cloud/resources/assist-me/controller.js";
11
+ export declare const ASSIST_ME_SCRIPT_PROD = "https://www.ibm.com/resources/assist-me/controller.js";
12
+ /**
13
+ *
14
+ * @param {string} iconType string value for the carbon icon
15
+ * @param {number} size number to indicate the size of the icon
16
+ * @param {string} slot string name of the slot that the icon will be displayed in
17
+ * @returns an svg of the icon if it is found in CarbonIcons
18
+ */
19
+ export declare const renderCarbonIcon: (iconType: string, size: number, slot?: string) => Element | import("lit-html").TemplateResult<1>;
20
+ export declare const isValidObject: (obj: unknown) => obj is Record<string, unknown>;
21
+ export declare function getAssistMeUrl(environment: string): "https://ibmassistme-dev.zll1vg8lrcq.us-south.codeengine.appdomain.cloud/resources/assist-me/controller.js" | "https://www.ibm.com/resources/assist-me/controller.js";
22
+ export declare const trackEvent: (eventName: string, props: EventProps) => void;
@@ -0,0 +1,96 @@
1
+ 'use strict';
2
+
3
+ var lit = require('lit');
4
+ var es = require('@carbon/icons/es');
5
+ var iconHelpers = require('@carbon/icon-helpers');
6
+
7
+ /**
8
+ * @license
9
+ *
10
+ * Copyright IBM Corp. 2025
11
+ *
12
+ * This source code is licensed under the Apache-2.0 license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */
15
+ /* eslint jsdoc/require-jsdoc: 0 */
16
+ const ASSIST_ME_SCRIPT_DEV = 'https://ibmassistme-dev.zll1vg8lrcq.us-south.codeengine.appdomain.cloud/resources/assist-me/controller.js';
17
+ const ASSIST_ME_SCRIPT_PROD = 'https://www.ibm.com/resources/assist-me/controller.js';
18
+ /**
19
+ *
20
+ * @param {string} iconType string value for the carbon icon
21
+ * @param {number} size number to indicate the size of the icon
22
+ * @param {string} slot string name of the slot that the icon will be displayed in
23
+ * @returns an svg of the icon if it is found in CarbonIcons
24
+ */
25
+ const renderCarbonIcon = (iconType, size, slot) => {
26
+ const iconWithSize = `${iconType}${size}`;
27
+ // console.log('iconWithSize', iconWithSize)
28
+ const CarbonIcons = {
29
+ AiLaunch20: es.AiLaunch20,
30
+ AppConnectivity20: es.AppConnectivity20,
31
+ ArrowRight16: es.ArrowRight16,
32
+ Checkmark16: es.Checkmark16,
33
+ Document16: es.Document16,
34
+ Email16: es.Email16,
35
+ Help20: es.Help20,
36
+ Home16: es.Home16,
37
+ IbmCloudKeyProtect16: es.IbmCloudKeyProtect16,
38
+ Launch16: es.Launch16,
39
+ Login16: es.Login16,
40
+ Logout16: es.Logout16,
41
+ Notification20: es.Notification20,
42
+ RequestQuote16: es.RequestQuote16,
43
+ Settings16: es.Settings16,
44
+ Share16: es.Share16,
45
+ User16: es.User16,
46
+ User20: es.User20,
47
+ User24: es.User24,
48
+ User32: es.User32,
49
+ UserFollow16: es.UserFollow16,
50
+ };
51
+ const iconsRecord = CarbonIcons;
52
+ const LocalIcon = iconsRecord[iconWithSize];
53
+ // Check if the icon exists
54
+ if (!LocalIcon) {
55
+ console.error(`Icon "${iconWithSize}" not found in CarbonIcons.`);
56
+ return lit.html `<div class="icon-container">Icon not found</div>`;
57
+ }
58
+ // Generate the SVG element with updated attributes
59
+ const svgElement = iconHelpers.toSVG({
60
+ ...LocalIcon,
61
+ attrs: { ...iconHelpers.getAttributes(LocalIcon.attrs), slot },
62
+ });
63
+ // Serialize the SVG element to a string
64
+ // const svgString: string = new XMLSerializer().serializeToString(svgElement);
65
+ return svgElement;
66
+ };
67
+ const isValidObject = (obj) => {
68
+ return (obj !== null &&
69
+ typeof obj === 'object' &&
70
+ !Array.isArray(obj) &&
71
+ Object.keys(obj).length > 0);
72
+ };
73
+ function getAssistMeUrl(environment) {
74
+ switch (environment) {
75
+ case 'production':
76
+ return ASSIST_ME_SCRIPT_PROD;
77
+ default:
78
+ return ASSIST_ME_SCRIPT_DEV;
79
+ }
80
+ }
81
+ const trackEvent = (eventName, props) => {
82
+ const analytics =
83
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
84
+ window === null || window === void 0 ? void 0 : window.bluemixAnalytics;
85
+ if (analytics) {
86
+ analytics.trackEvent(eventName, props);
87
+ }
88
+ };
89
+
90
+ exports.ASSIST_ME_SCRIPT_DEV = ASSIST_ME_SCRIPT_DEV;
91
+ exports.ASSIST_ME_SCRIPT_PROD = ASSIST_ME_SCRIPT_PROD;
92
+ exports.getAssistMeUrl = getAssistMeUrl;
93
+ exports.isValidObject = isValidObject;
94
+ exports.renderCarbonIcon = renderCarbonIcon;
95
+ exports.trackEvent = trackEvent;
96
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../components/global-header/src/globals/utils.ts"],"sourcesContent":[null],"names":["AiLaunch20","AppConnectivity20","ArrowRight16","Checkmark16","Document16","Email16","Help20","Home16","IbmCloudKeyProtect16","Launch16","Login16","Logout16","Notification20","RequestQuote16","Settings16","Share16","User16","User20","User24","User32","UserFollow16","html","toSVG","getAttributes"],"mappings":";;;;;;AAAA;;;;;;;AAOG;AACH;AA8BO,MAAM,oBAAoB,GAC/B;AACK,MAAM,qBAAqB,GAChC;AAEF;;;;;;AAMG;AACI,MAAM,gBAAgB,GAAG,CAC9B,QAAgB,EAChB,IAAY,EACZ,IAAa,KACX;AACF,IAAA,MAAM,YAAY,GAAG,CAAA,EAAG,QAAQ,CAAA,EAAG,IAAI,EAAE;;AAGzC,IAAA,MAAM,WAAW,GAAG;oBAClBA,aAAU;2BACVC,oBAAiB;sBACjBC,eAAY;qBACZC,cAAW;oBACXC,aAAU;iBACVC,UAAO;gBACPC,SAAM;gBACNC,SAAM;8BACNC,uBAAoB;kBACpBC,WAAQ;iBACRC,UAAO;kBACPC,WAAQ;wBACRC,iBAAc;wBACdC,iBAAc;oBACdC,aAAU;iBACVC,UAAO;gBACPC,SAAM;gBACNC,SAAM;gBACNC,SAAM;gBACNC,SAAM;sBACNC,eAAY;KACb;IAED,MAAM,WAAW,GAAG,WAGnB;AACD,IAAA,MAAM,SAAS,GAAG,WAAW,CAAC,YAAY,CAAC;;IAG3C,IAAI,CAAC,SAAS,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,SAAS,YAAY,CAAA,2BAAA,CAA6B,CAAC;QACjE,OAAOC,QAAI,CAAA,CAAA,gDAAA,CAAkD;IAC/D;;IAGA,MAAM,UAAU,GAAYC,iBAAK,CAAC;AAChC,QAAA,GAAG,SAAS;QACZ,KAAK,EAAE,EAAE,GAAGC,yBAAa,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE;AACnD,KAAA,CAAC;;;AAIF,IAAA,OAAO,UAAU;AACnB;AAEO,MAAM,aAAa,GAAG,CAAC,GAAY,KAAoC;IAC5E,QACE,GAAG,KAAK,IAAI;QACZ,OAAO,GAAG,KAAK,QAAQ;AACvB,QAAA,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC;AAE/B;AAEM,SAAU,cAAc,CAAC,WAAmB,EAAA;IAChD,QAAQ,WAAW;AACjB,QAAA,KAAK,YAAY;AACf,YAAA,OAAO,qBAAqB;AAC9B,QAAA;AACE,YAAA,OAAO,oBAAoB;;AAEjC;MAEa,UAAU,GAAG,CAAC,SAAiB,EAAE,KAAiB,KAAI;AACjE,IAAA,MAAM,SAAS;;AAEZ,IAAA,MAAc,aAAd,MAAM,KAAA,MAAA,GAAA,MAAA,GAAN,MAAM,CAAU,gBAAgB;IACnC,IAAI,SAAS,EAAE;AACb,QAAA,SAAS,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC;IACxC;AACF;;;;;;;;;"}
@@ -0,0 +1,12 @@
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
+ export { CommonHeader } from './components/CommonHeader/CommonHeader';
10
+ export { HybridIpaasHeader } from './components/HybridIpaasHeader/HybridIpaasHeader';
11
+ export { LogoutHeader } from './components/LogoutHeader/LogoutHeader';
12
+ export { LogoutTile } from './components/LogoutTile/LogoutTile';
@@ -0,0 +1,267 @@
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
+ export declare enum TrialLinkType {
10
+ 'invite' = 0,
11
+ 'contact' = 1,
12
+ 'requestQuote' = 2
13
+ }
14
+ export declare enum TrialBannerType {
15
+ 'info' = 0,
16
+ 'warning' = 1
17
+ }
18
+ export interface Brand {
19
+ company?: string;
20
+ product?: string;
21
+ href?: string;
22
+ }
23
+ export type Profile = {
24
+ email: string;
25
+ imageUrl?: string;
26
+ displayName: string;
27
+ };
28
+ export type HelperLinks = {
29
+ link?: string;
30
+ label: string;
31
+ target?: string;
32
+ onclick?: (e: Event) => void;
33
+ };
34
+ export interface MainSectionItem {
35
+ label: string;
36
+ text: string;
37
+ }
38
+ export interface AssistMeConfigs {
39
+ productId?: string;
40
+ scriptUrl?: string;
41
+ topSpacing?: string;
42
+ productRelease?: string;
43
+ zIndex?: string | number;
44
+ }
45
+ export interface ChatBotConfigs {
46
+ onClick: () => void;
47
+ }
48
+ export interface SearchConfigs {
49
+ placeholder?: string;
50
+ callback: (value: string) => void;
51
+ submitCallback?: (value: string) => void;
52
+ }
53
+ export interface Link {
54
+ url: string;
55
+ text: string;
56
+ }
57
+ export interface Data {
58
+ id?: string | number;
59
+ type?: 'error' | 'warning' | 'success' | 'informational';
60
+ timestamp?: Date;
61
+ title?: string;
62
+ description?: string;
63
+ link?: Link;
64
+ unread?: boolean;
65
+ onNotificationClick?: () => void;
66
+ }
67
+ export interface NotificationConfigs {
68
+ onClick: () => void;
69
+ }
70
+ export interface TrialLink {
71
+ label: string;
72
+ href: string;
73
+ type: TrialLinkType;
74
+ }
75
+ export interface TrialConfigs {
76
+ warning?: boolean;
77
+ trialLabel?: string;
78
+ trialCount?: number;
79
+ links?: TrialLink[];
80
+ actionText?: string;
81
+ actionLink?: string;
82
+ description?: string;
83
+ }
84
+ export interface ItemLink {
85
+ label: string;
86
+ href: string;
87
+ id: string;
88
+ text: string;
89
+ isActive?: boolean;
90
+ carbonIcon: string;
91
+ isLinkItem?: boolean;
92
+ isLastInList?: boolean;
93
+ isHeading?: boolean;
94
+ }
95
+ export interface SwitcherConfigs {
96
+ label?: string;
97
+ disabled?: boolean;
98
+ items?: readonly ItemLink[];
99
+ floatLeft?: boolean;
100
+ onClick?: (event: MouseEvent, value: ItemLink, idx: number) => void;
101
+ initialSelectedIndex?: number;
102
+ iconsLeft?: boolean;
103
+ }
104
+ export type NoAuthHeaderLinks = {
105
+ text: string;
106
+ href: string;
107
+ arialLabel: string;
108
+ carbonIcon?: string;
109
+ };
110
+ export type ProfileFooterLinks = {
111
+ text: string;
112
+ href?: string;
113
+ arialLabel: string;
114
+ carbonIcon?: string;
115
+ newTab?: boolean;
116
+ newTabIcon?: boolean;
117
+ onClickHandler?: () => void;
118
+ };
119
+ export type GlobalActionConfig = {
120
+ label: string;
121
+ carbonIcon: string;
122
+ onClick?: () => void;
123
+ };
124
+ export interface ManagementConsole {
125
+ href: string;
126
+ text: string;
127
+ newTab?: boolean;
128
+ newTabIcon?: boolean;
129
+ }
130
+ export interface UserManagement {
131
+ href: string;
132
+ text: string;
133
+ icon: string;
134
+ }
135
+ export interface SideNavMenuItems {
136
+ isActive: boolean;
137
+ href: string;
138
+ label: string;
139
+ iconName?: string;
140
+ productIcon?: string;
141
+ onClick?: (e: Event) => void;
142
+ appOrder?: number;
143
+ newTab?: boolean;
144
+ newTabIcon?: boolean;
145
+ }
146
+ export interface SideNavLink {
147
+ href: string;
148
+ label: string;
149
+ isActive?: boolean;
150
+ iconName?: string;
151
+ productIcon?: string;
152
+ isSideNavMenuItems?: boolean;
153
+ sideNavMenuItems: SideNavMenuItems[];
154
+ menuOpen?: boolean;
155
+ onClick?: (e: Event) => void;
156
+ handleNavItemClick?: (e: Event) => void;
157
+ isOnClickAvailable?: boolean;
158
+ appOrder?: number;
159
+ }
160
+ export interface SideNav {
161
+ buttonLabel: string;
162
+ sidebarLabel: string;
163
+ isCollapsible?: boolean;
164
+ isRail: boolean;
165
+ onClick?: (e: Event) => void;
166
+ links: SideNavLink[];
167
+ groups?: GroupLinks[];
168
+ isChildOfHeader: boolean;
169
+ autoCollapseOnLeave?: boolean;
170
+ buttonCloseLabel?: string;
171
+ }
172
+ export interface GroupLinks {
173
+ links: SideNavLink[];
174
+ }
175
+ export interface SideNavPropsV2 {
176
+ theme?: 'white' | 'g10' | 'g90' | 'g100';
177
+ buttonLabel: string;
178
+ sidebarLabel: string;
179
+ isCollapsible?: boolean;
180
+ isRail: boolean;
181
+ onClick?: (e: Event) => void;
182
+ links: SideNavLink[];
183
+ isChildOfHeader: boolean;
184
+ autoCollapseOnLeave?: boolean;
185
+ buttonCloseLabel?: string;
186
+ isExpandable: boolean;
187
+ sideNav: {
188
+ isRail: boolean;
189
+ isPersistent: boolean;
190
+ isChildOfHeader: boolean;
191
+ };
192
+ }
193
+ export type CommonAnalyticsProperties = {
194
+ accountId?: string;
195
+ instanceId?: string;
196
+ subscriptionId?: string;
197
+ productId?: string;
198
+ tenantId?: string;
199
+ accountPlan?: string;
200
+ productPlan?: string;
201
+ productTitle?: string;
202
+ accountIdType?: string;
203
+ accountLevel?: string;
204
+ platformTitle?: string;
205
+ hyperscalerFormat?: string;
206
+ enterpriseAccount?: string;
207
+ sabaSubscriptionId?: string;
208
+ hyperscalerChannel?: string;
209
+ hyperscalerProvider?: string;
210
+ productPlanName?: string;
211
+ productPlanType?: string;
212
+ productCode?: string;
213
+ productCodeType?: string;
214
+ operationalId?: string;
215
+ UT30?: string;
216
+ };
217
+ export type AnalyticsConfig = {
218
+ fullStory?: boolean;
219
+ segment_key?: string;
220
+ optimizely?: boolean;
221
+ coremetrics?: boolean;
222
+ autoPageView?: boolean;
223
+ autoFormEvents?: boolean;
224
+ autoPageEventSpa?: boolean;
225
+ analyticsScriptURL?: string;
226
+ googleAddServices?: boolean;
227
+ commonProperties?: CommonAnalyticsProperties;
228
+ };
229
+ export interface HeaderProps {
230
+ brand?: Brand;
231
+ capabilityName?: {
232
+ label: string;
233
+ };
234
+ profile?: Profile;
235
+ sideNav?: SideNav;
236
+ arialLabel?: string;
237
+ sideNavPropsV2?: SideNavPropsV2;
238
+ enableLogs?: boolean;
239
+ trialConfigs?: TrialConfigs;
240
+ environment?: string;
241
+ userManagement?: UserManagement;
242
+ managementConsole?: ManagementConsole;
243
+ analyticsConfig?: AnalyticsConfig;
244
+ assistMeConfigs?: AssistMeConfigs;
245
+ mainSectionItems?: MainSectionItem[];
246
+ noAuthHeaderLinks?: NoAuthHeaderLinks[];
247
+ profileFooterLinks?: ProfileFooterLinks[];
248
+ footerSectionItems?: ProfileFooterLinks[];
249
+ helperLinks?: HelperLinks[];
250
+ switcherConfigs?: SwitcherConfigs[];
251
+ isHybridIpaas?: boolean;
252
+ notificationConfigs?: NotificationConfigs;
253
+ chatBotConfigs?: ChatBotConfigs;
254
+ searchConfigs?: SearchConfigs;
255
+ globalActionConfigs?: GlobalActionConfig[];
256
+ }
257
+ export interface NavigationItem {
258
+ href: string;
259
+ text: string;
260
+ isActive?: boolean;
261
+ }
262
+ export interface EventProps {
263
+ action: string;
264
+ CTA: string;
265
+ elementId: string;
266
+ platformTitle?: string;
267
+ }
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @license
5
+ *
6
+ * Copyright IBM Corp. 2025
7
+ *
8
+ * This source code is licensed under the Apache-2.0 license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */
11
+ exports.TrialLinkType = void 0;
12
+ (function (TrialLinkType) {
13
+ TrialLinkType[TrialLinkType["invite"] = 0] = "invite";
14
+ TrialLinkType[TrialLinkType["contact"] = 1] = "contact";
15
+ TrialLinkType[TrialLinkType["requestQuote"] = 2] = "requestQuote";
16
+ })(exports.TrialLinkType || (exports.TrialLinkType = {}));
17
+ exports.TrialBannerType = void 0;
18
+ (function (TrialBannerType) {
19
+ TrialBannerType[TrialBannerType["info"] = 0] = "info";
20
+ TrialBannerType[TrialBannerType["warning"] = 1] = "warning";
21
+ })(exports.TrialBannerType || (exports.TrialBannerType = {}));
22
+ //# sourceMappingURL=Header.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.types.js","sources":["../../../../../../components/global-header/src/types/Header.types.ts"],"sourcesContent":[null],"names":["TrialLinkType","TrialBannerType"],"mappings":";;AAAA;;;;;;;AAOG;AAESA;AAAZ,CAAA,UAAY,aAAa,EAAA;AACvB,IAAA,aAAA,CAAA,aAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAQ;AACR,IAAA,aAAA,CAAA,aAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAS;AACT,IAAA,aAAA,CAAA,aAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAc;AAChB,CAAC,EAJWA,qBAAa,KAAbA,qBAAa,GAAA,EAAA,CAAA,CAAA;AAMbC;AAAZ,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,eAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAM;AACN,IAAA,eAAA,CAAA,eAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAS;AACX,CAAC,EAHWA,uBAAe,KAAfA,uBAAe,GAAA,EAAA,CAAA,CAAA;;"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,9 @@
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 './components/global-header/global-header.js';
package/lib/index.js ADDED
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ require('./components/global-header/global-header.js');
4
+
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,88 @@
1
+ 'use strict';
2
+
3
+ var index = require('../../_virtual/index2.js');
4
+
5
+ /*!
6
+ Copyright (c) 2018 Jed Watson.
7
+ Licensed under the MIT License (MIT), see
8
+ http://jedwatson.github.io/classnames
9
+ */
10
+
11
+ var hasRequiredClassnames;
12
+
13
+ function requireClassnames () {
14
+ if (hasRequiredClassnames) return index.__module.exports;
15
+ hasRequiredClassnames = 1;
16
+ (function (module) {
17
+ /* global define */
18
+
19
+ (function () {
20
+
21
+ var hasOwn = {}.hasOwnProperty;
22
+
23
+ function classNames () {
24
+ var classes = '';
25
+
26
+ for (var i = 0; i < arguments.length; i++) {
27
+ var arg = arguments[i];
28
+ if (arg) {
29
+ classes = appendClass(classes, parseValue(arg));
30
+ }
31
+ }
32
+
33
+ return classes;
34
+ }
35
+
36
+ function parseValue (arg) {
37
+ if (typeof arg === 'string' || typeof arg === 'number') {
38
+ return arg;
39
+ }
40
+
41
+ if (typeof arg !== 'object') {
42
+ return '';
43
+ }
44
+
45
+ if (Array.isArray(arg)) {
46
+ return classNames.apply(null, arg);
47
+ }
48
+
49
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
50
+ return arg.toString();
51
+ }
52
+
53
+ var classes = '';
54
+
55
+ for (var key in arg) {
56
+ if (hasOwn.call(arg, key) && arg[key]) {
57
+ classes = appendClass(classes, key);
58
+ }
59
+ }
60
+
61
+ return classes;
62
+ }
63
+
64
+ function appendClass (value, newClass) {
65
+ if (!newClass) {
66
+ return value;
67
+ }
68
+
69
+ if (value) {
70
+ return value + ' ' + newClass;
71
+ }
72
+
73
+ return value + newClass;
74
+ }
75
+
76
+ if (module.exports) {
77
+ classNames.default = classNames;
78
+ module.exports = classNames;
79
+ } else {
80
+ window.classNames = classNames;
81
+ }
82
+ }());
83
+ } (index.__module));
84
+ return index.__module.exports;
85
+ }
86
+
87
+ exports.__require = requireClassnames;
88
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/classnames/index.js"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKA;;AAEA,EAAA,CAAC,YAAY;;AAGb,GAAC,IAAI,MAAM,GAAG,EAAE,CAAC,cAAc;;GAE9B,SAAS,UAAU,IAAI;IACtB,IAAI,OAAO,GAAG,EAAE;;AAElB,IAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC7C,KAAG,IAAI,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC;KACtB,IAAI,GAAG,EAAE;MACR,OAAO,GAAG,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AACnD,KAAA;AACA,IAAA;;AAEA,IAAE,OAAO,OAAO;AAChB,GAAA;;AAEA,GAAC,SAAS,UAAU,EAAE,GAAG,EAAE;IACzB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC1D,KAAG,OAAO,GAAG;AACb,IAAA;;AAEA,IAAE,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC/B,KAAG,OAAO,EAAE;AACZ,IAAA;;AAEA,IAAE,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;KACvB,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC;AACrC,IAAA;;IAEE,IAAI,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,SAAS,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;AACxG,KAAG,OAAO,GAAG,CAAC,QAAQ,EAAE;AACxB,IAAA;;IAEE,IAAI,OAAO,GAAG,EAAE;;AAElB,IAAE,KAAK,IAAI,GAAG,IAAI,GAAG,EAAE;AACvB,KAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE;AAC1C,MAAI,OAAO,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC;AACvC,KAAA;AACA,IAAA;;AAEA,IAAE,OAAO,OAAO;AAChB,GAAA;;AAEA,GAAC,SAAS,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACtC,IAAI,CAAC,QAAQ,EAAE;AACjB,KAAG,OAAO,KAAK;AACf,IAAA;AACA;IACE,IAAI,KAAK,EAAE;AACb,KAAG,OAAO,KAAK,GAAG,GAAG,GAAG,QAAQ;AAChC,IAAA;AACA;IACE,OAAO,KAAK,GAAG,QAAQ;AACzB,GAAA;;GAEC,IAAqC,MAAM,CAAC,OAAO,EAAE;AACtD,IAAE,UAAU,CAAC,OAAO,GAAG,UAAU;AACjC,IAAE,iBAAiB,UAAU;AAC7B,GAAA,CAAE,MAKM;AACR,IAAE,MAAM,CAAC,UAAU,GAAG,UAAU;AAChC,GAAA;AACA,EAAA,CAAC,EAAE,EAAA;;;;;;;","x_google_ignoreList":[0]}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@carbon-labs/wc-global-header",
3
+ "version": "0.1.0",
4
+ "author": "Your Name <your@email.com>",
5
+ "publishConfig": {
6
+ "access": "public",
7
+ "provenance": true
8
+ },
9
+ "description": "Carbon Labs - global-header component",
10
+ "license": "Apache-2.0",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/carbon-design-system/carbon-labs",
14
+ "directory": "packages/global-header"
15
+ },
16
+ "exports": {
17
+ ".": {
18
+ "default": "./src/index.js"
19
+ },
20
+ "./es/*": "./es/*",
21
+ "./lib/*": "./lib/*"
22
+ },
23
+ "files": [
24
+ "es/",
25
+ "lib/"
26
+ ],
27
+ "types": "./src/index.d.ts",
28
+ "customElements": "custom-elements.json",
29
+ "scripts": {
30
+ "build": "node ../../../tasks/build.js",
31
+ "build:dist": "rm -rf dist && rollup --config ../../../tasks/build-dist.js",
32
+ "build:dist:canary": "rm -rf dist && rollup --config ../../../tasks/build-dist.js --configCanary",
33
+ "clean": "rimraf es lib"
34
+ },
35
+ "dependencies": {
36
+ "@babel/runtime": "^7.23.2",
37
+ "@carbon-labs/utilities": "0.14.0",
38
+ "@carbon/web-components": "2.36.0",
39
+ "@lit-labs/motion": "^1.0.9"
40
+ },
41
+ "gitHead": "e110d8b46337dc89d5eb8ab574d11ac970035fcd"
42
+ }