@carbon/ai-chat 0.4.0-rc.2 → 0.4.0-rc.4

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 (296) hide show
  1. package/dist/es/aiChatEntry.js +220 -14
  2. package/dist/es/chat.AppContainer.js +6491 -0
  3. package/dist/es/chat.AppState.js +40 -0
  4. package/dist/es/{chat/shared/components/BasePanelComponent.js → chat.BasePanelComponent.js} +3 -3
  5. package/dist/es/{chat/shared/components/panels/BodyAndFooterPanelComponent.js → chat.BodyAndFooterPanelComponent.js} +92 -9
  6. package/dist/es/chat.BodyWithFooterComponent.js +140 -0
  7. package/dist/es/{chat/shared/components/header/BotHeader.js → chat.BotHeader.js} +7 -9
  8. package/dist/es/{chat/shared/components/responseTypes/carousel/Carousel.js → chat.Carousel.js} +3 -3
  9. package/dist/es/chat.CatastrophicError.js +381 -0
  10. package/dist/es/chat.Chat.js +2009 -0
  11. package/dist/es/chat.Disclaimer.js +553 -0
  12. package/dist/es/chat.Header.js +1025 -0
  13. package/dist/es/{chat/shared/components/util/HideComponent.js → chat.HideComponent.js} +9 -2
  14. package/dist/es/{types/config/HomeScreenConfig.js → chat.HomeScreenConfig.js} +1 -1
  15. package/dist/es/{chat/shared/components/homeScreen/HomeScreen.js → chat.HomeScreenContainer.js} +159 -14
  16. package/dist/es/{chat/shared/components/homeScreen/HomeScreenHeader.js → chat.HomeScreenHeader.js} +3 -3
  17. package/dist/es/{chat/shared/services/haa/HumanAgentServiceImpl.js → chat.HumanAgentServiceImpl.js} +215 -17
  18. package/dist/es/{chat/shared/components/responseTypes/iframe/IFrameComponent.js → chat.IFrameComponent.js} +4 -8
  19. package/dist/es/chat.IFramePanel.js +151 -0
  20. package/dist/es/{chat/shared/components/input/Input.js → chat.Input.js} +214 -18
  21. package/dist/es/{types/config/ServiceDeskConfig.js → chat.LocalMessageItem.js} +17 -1
  22. package/dist/es/chat.MessageTypeComponent.js +3580 -0
  23. package/dist/es/{types/messaging/Messages.js → chat.Messages.js} +1 -1
  24. package/dist/es/chat.MountChildrenOnDelay.js +97 -0
  25. package/dist/es/{chat/shared/components/OverlayPanel.js → chat.PageObjectId.js} +70 -4
  26. package/dist/es/{chat/web-components/components/markdownText/src/markdownText.scss.js → chat.RichText.js} +347 -1
  27. package/dist/es/chat.TourContainer.js +524 -0
  28. package/dist/es/{chat/languages/en.json.js → chat.VideoComponent.js} +561 -1
  29. package/dist/es/chat.ViewSourcePanel.js +187 -0
  30. package/dist/es/{chat/shared/store/actions.js → chat.actions.js} +2 -2
  31. package/dist/es/{chat/shared/utils/browserUtils.js → chat.browserUtils.js} +1 -1
  32. package/dist/es/{types/utilities/carbonTypes.js → chat.carbonTypes.js} +2 -2
  33. package/dist/es/{chat/web-components/components/codeElement/src/codeElement.scss.js → chat.cds-aichat-code.js} +64 -1
  34. package/dist/es/{chat/shared/utils/constants.js → chat.constants.js} +4 -7
  35. package/dist/es/{types/events/eventBusTypes.js → chat.customElement.js} +32 -1
  36. package/dist/es/chat.dynamic-imports.js +192 -0
  37. package/dist/es/{chat/shared/utils/htmlUtils.js → chat.htmlUtils.js} +16 -2
  38. package/dist/es/{chat/shared/utils/messageUtils.js → chat.messageUtils.js} +54 -7
  39. package/dist/es/{chat/shared/utils/miscUtils.js → chat.miscUtils.js} +24 -5
  40. package/dist/es/chat.resolvablePromise.js +315 -0
  41. package/dist/es/{chat/shared/store/selectors.js → chat.selectors.js} +1 -1
  42. package/dist/es/{chat/shared/utils/lang/stringUtils.js → chat.stringUtils.js} +2 -2
  43. package/dist/es/{chat/shared/hooks/useCounter.js → chat.useCounter.js} +1 -1
  44. package/dist/es/{chat/shared/hooks/useOnMount.js → chat.useOnMount.js} +1 -1
  45. package/dist/es/{chat/shared/utils/domUtils.js → chat.usePrevious.js} +47 -1
  46. package/dist/es/{chat/shared/utils/lang/UUIDType.js → chat.uuid.js} +15 -3
  47. package/dist/es/web-components/cds-aichat-container/index.js +73 -4
  48. package/dist/es/web-components/cds-aichat-custom-element/index.js +1 -3
  49. package/dist/types/aiChatEntry.d.ts +4767 -0
  50. package/package.json +5 -4
  51. package/dist/es/chat/dynamic-imports/dynamic-imports.js +0 -96
  52. package/dist/es/chat/react/components/AppContainer.js +0 -197
  53. package/dist/es/chat/react/components/UserDefinedResponsePortalsContainer.js +0 -31
  54. package/dist/es/chat/react/components/WriteableElementsPortalsContainer.js +0 -28
  55. package/dist/es/chat/react/components/chainOfThought/ChainOfThought.js +0 -20
  56. package/dist/es/chat/react/components/chatHeader/ChatHeaderAvatar.js +0 -20
  57. package/dist/es/chat/react/components/chatHeader/ChatHeaderLink.js +0 -22
  58. package/dist/es/chat/react/components/chatHeader/ChatHeaderMenu.js +0 -27
  59. package/dist/es/chat/react/components/chatHeader/ChatHeaderMenuButton.js +0 -60
  60. package/dist/es/chat/react/components/chatHeader/ChatHeaderMenuItem.js +0 -24
  61. package/dist/es/chat/react/components/chatHeader/ChatHeaderMenuItemRadioGroup.js +0 -28
  62. package/dist/es/chat/react/components/chatHeader/ChatHeaderOverflowMenu.js +0 -69
  63. package/dist/es/chat/react/components/chatHeader/ChatHeaderTitle.js +0 -22
  64. package/dist/es/chat/react/components/feedback/FeedbackButtonsComponent.js +0 -20
  65. package/dist/es/chat/react/components/feedback/FeedbackComponent.js +0 -20
  66. package/dist/es/chat/react/components/inlineLoading/InlineLoadingComponent.js +0 -20
  67. package/dist/es/chat/react/components/markdownText/MarkdownText.js +0 -20
  68. package/dist/es/chat/react/components/stopStreamingButton/StopStreamingButton.js +0 -20
  69. package/dist/es/chat/react/components/table/Table.js +0 -20
  70. package/dist/es/chat/shared/Chat.js +0 -115
  71. package/dist/es/chat/shared/ChatInstanceImpl.js +0 -360
  72. package/dist/es/chat/shared/chatEntryFunctions.js +0 -46
  73. package/dist/es/chat/shared/components/Avatar.js +0 -286
  74. package/dist/es/chat/shared/components/BodyWithFooterComponent.js +0 -56
  75. package/dist/es/chat/shared/components/CatastrophicError.js +0 -77
  76. package/dist/es/chat/shared/components/Chat.js +0 -244
  77. package/dist/es/chat/shared/components/ChatBubbleDark.js +0 -124
  78. package/dist/es/chat/shared/components/ChatBubbleLight.js +0 -216
  79. package/dist/es/chat/shared/components/Disclaimer.js +0 -86
  80. package/dist/es/chat/shared/components/ErrorIcon.js +0 -20
  81. package/dist/es/chat/shared/components/ErrorMessageDark.js +0 -89
  82. package/dist/es/chat/shared/components/ErrorMessageLight.js +0 -135
  83. package/dist/es/chat/shared/components/HydrationPanel.js +0 -58
  84. package/dist/es/chat/shared/components/LatestWelcomeNodes.js +0 -26
  85. package/dist/es/chat/shared/components/ResponseStopped.js +0 -19
  86. package/dist/es/chat/shared/components/SkeletonPicker.js +0 -32
  87. package/dist/es/chat/shared/components/WriteableElement.js +0 -22
  88. package/dist/es/chat/shared/components/agent/AgentAvatar.js +0 -54
  89. package/dist/es/chat/shared/components/agent/AgentBanner.js +0 -109
  90. package/dist/es/chat/shared/components/agent/AgentBannerContainer.js +0 -28
  91. package/dist/es/chat/shared/components/agent/AvailabilityMessage.js +0 -49
  92. package/dist/es/chat/shared/components/aria/AriaAnnouncerComponent.js +0 -122
  93. package/dist/es/chat/shared/components/aria/AriaAnnouncerProvider.js +0 -48
  94. package/dist/es/chat/shared/components/aria/AriaLiveMessage.js +0 -22
  95. package/dist/es/chat/shared/components/header/AISlug.js +0 -22
  96. package/dist/es/chat/shared/components/header/Header.js +0 -460
  97. package/dist/es/chat/shared/components/header/SimpleHeader.js +0 -27
  98. package/dist/es/chat/shared/components/homeScreen/HomeScreenContainer.js +0 -68
  99. package/dist/es/chat/shared/components/launcher/Launcher.js +0 -88
  100. package/dist/es/chat/shared/components/launcher/LauncherComplex.js +0 -63
  101. package/dist/es/chat/shared/components/launcher/LauncherContainer.js +0 -73
  102. package/dist/es/chat/shared/components/launcher/LauncherDesktopContainer.js +0 -221
  103. package/dist/es/chat/shared/components/launcher/LauncherExtended.js +0 -244
  104. package/dist/es/chat/shared/components/launcher/LauncherMobileContainer.js +0 -175
  105. package/dist/es/chat/shared/components/launcher/launcherUtils.js +0 -16
  106. package/dist/es/chat/shared/components/modals/ConfirmModal.js +0 -67
  107. package/dist/es/chat/shared/components/modals/EndAgentChatModal.js +0 -46
  108. package/dist/es/chat/shared/components/modals/RequestScreenShareModal.js +0 -43
  109. package/dist/es/chat/shared/components/notifications/Notifications.js +0 -58
  110. package/dist/es/chat/shared/components/panels/CustomPanel.js +0 -136
  111. package/dist/es/chat/shared/components/responseTypes/agent/ConnectToAgent.js +0 -30
  112. package/dist/es/chat/shared/components/responseTypes/agent/RealConnectToAgent.js +0 -102
  113. package/dist/es/chat/shared/components/responseTypes/audio/AudioComponent.js +0 -26
  114. package/dist/es/chat/shared/components/responseTypes/buttonItem/BaseButtonItemComponent.js +0 -69
  115. package/dist/es/chat/shared/components/responseTypes/buttonItem/ButtonItemComponent.js +0 -48
  116. package/dist/es/chat/shared/components/responseTypes/buttonItem/ButtonItemCustomEventComponent.js +0 -42
  117. package/dist/es/chat/shared/components/responseTypes/buttonItem/ButtonItemPostBackComponent.js +0 -54
  118. package/dist/es/chat/shared/components/responseTypes/buttonItem/ButtonItemShowPanelComponent.js +0 -36
  119. package/dist/es/chat/shared/components/responseTypes/buttonItem/ButtonItemURLComponent.js +0 -42
  120. package/dist/es/chat/shared/components/responseTypes/card/CardItemComponent.js +0 -34
  121. package/dist/es/chat/shared/components/responseTypes/carousel/CarouselItemComponent.js +0 -39
  122. package/dist/es/chat/shared/components/responseTypes/conversationalSearch/ConversationalSearch.js +0 -92
  123. package/dist/es/chat/shared/components/responseTypes/conversationalSearch/ConversationalSearchText.js +0 -158
  124. package/dist/es/chat/shared/components/responseTypes/custom/UserDefinedResponse.js +0 -33
  125. package/dist/es/chat/shared/components/responseTypes/datePicker/DatePickerComponent.js +0 -176
  126. package/dist/es/chat/shared/components/responseTypes/error/InlineError.js +0 -32
  127. package/dist/es/chat/shared/components/responseTypes/grid/GridItemComponent.js +0 -109
  128. package/dist/es/chat/shared/components/responseTypes/iframe/IFrameMessage.js +0 -32
  129. package/dist/es/chat/shared/components/responseTypes/iframe/IFramePanel.js +0 -51
  130. package/dist/es/chat/shared/components/responseTypes/iframe/IFramePreviewCard.js +0 -64
  131. package/dist/es/chat/shared/components/responseTypes/iframe/InlineIFrame.js +0 -55
  132. package/dist/es/chat/shared/components/responseTypes/image/Image.js +0 -120
  133. package/dist/es/chat/shared/components/responseTypes/options/OptionComponent.js +0 -83
  134. package/dist/es/chat/shared/components/responseTypes/options/SelectComponent.js +0 -84
  135. package/dist/es/chat/shared/components/responseTypes/table/TableContainer.js +0 -96
  136. package/dist/es/chat/shared/components/responseTypes/text/TextArea.js +0 -68
  137. package/dist/es/chat/shared/components/responseTypes/tour/TourCard.js +0 -73
  138. package/dist/es/chat/shared/components/responseTypes/util/BodyMessageComponents.js +0 -65
  139. package/dist/es/chat/shared/components/responseTypes/util/ClickableImage.js +0 -36
  140. package/dist/es/chat/shared/components/responseTypes/util/Description.js +0 -21
  141. package/dist/es/chat/shared/components/responseTypes/util/FooterButtonComponents.js +0 -36
  142. package/dist/es/chat/shared/components/responseTypes/util/MediaPlayer.js +0 -157
  143. package/dist/es/chat/shared/components/responseTypes/util/Metablock.js +0 -27
  144. package/dist/es/chat/shared/components/responseTypes/util/RichText.js +0 -31
  145. package/dist/es/chat/shared/components/responseTypes/util/SearchResultBody.js +0 -53
  146. package/dist/es/chat/shared/components/responseTypes/util/StreamingRichText.js +0 -38
  147. package/dist/es/chat/shared/components/responseTypes/util/TextHolderTile.js +0 -35
  148. package/dist/es/chat/shared/components/responseTypes/util/citations/CitationCard.js +0 -65
  149. package/dist/es/chat/shared/components/responseTypes/util/citations/CitationCardContent.js +0 -62
  150. package/dist/es/chat/shared/components/responseTypes/util/citations/CitationClickableCard.js +0 -23
  151. package/dist/es/chat/shared/components/responseTypes/util/citations/ExpandToPanelCard.js +0 -50
  152. package/dist/es/chat/shared/components/responseTypes/util/citations/ViewSourcePanel.js +0 -57
  153. package/dist/es/chat/shared/components/responseTypes/video/VideoComponent.js +0 -23
  154. package/dist/es/chat/shared/components/tour/TourCloseMinimizeComponent.js +0 -44
  155. package/dist/es/chat/shared/components/tour/TourContainer.js +0 -212
  156. package/dist/es/chat/shared/components/tour/TourControlsComponent.js +0 -98
  157. package/dist/es/chat/shared/components/tour/TourStepContentComponent.js +0 -156
  158. package/dist/es/chat/shared/components/tour/TourStepSkeletonComponent.js +0 -20
  159. package/dist/es/chat/shared/components/util/AnnounceOnMountComponent.js +0 -42
  160. package/dist/es/chat/shared/components/util/IconHolder.js +0 -16
  161. package/dist/es/chat/shared/components/util/ImageWithFallback.js +0 -31
  162. package/dist/es/chat/shared/components/util/MaybeDangerouslySetInnerHTML.js +0 -42
  163. package/dist/es/chat/shared/components/util/MountChildrenOnDelay.js +0 -40
  164. package/dist/es/chat/shared/components/util/VisuallyHidden.js +0 -18
  165. package/dist/es/chat/shared/containers/App.js +0 -181
  166. package/dist/es/chat/shared/containers/MessageComponent.js +0 -465
  167. package/dist/es/chat/shared/containers/MessageTypeComponent.js +0 -496
  168. package/dist/es/chat/shared/containers/MessagesComponent.js +0 -469
  169. package/dist/es/chat/shared/containers/ModalPortal.js +0 -53
  170. package/dist/es/chat/shared/containers/main/MainWindow.js +0 -708
  171. package/dist/es/chat/shared/contexts/AriaAnnouncerContext.js +0 -12
  172. package/dist/es/chat/shared/contexts/HideComponentContext.js +0 -12
  173. package/dist/es/chat/shared/contexts/LanguagePackContext.js +0 -12
  174. package/dist/es/chat/shared/contexts/ModalPortalRootContext.js +0 -12
  175. package/dist/es/chat/shared/contexts/ServiceManagerContext.js +0 -12
  176. package/dist/es/chat/shared/contexts/WindowSizeContext.js +0 -12
  177. package/dist/es/chat/shared/environmentVariables.js +0 -13
  178. package/dist/es/chat/shared/events/ChatActionsImpl.js +0 -783
  179. package/dist/es/chat/shared/events/EventBus.js +0 -161
  180. package/dist/es/chat/shared/hocs/withAriaAnnouncer.js +0 -25
  181. package/dist/es/chat/shared/hocs/withServiceManager.js +0 -25
  182. package/dist/es/chat/shared/hooks/useAriaAnnouncer.js +0 -16
  183. package/dist/es/chat/shared/hooks/useCSSCustomProperties.js +0 -21
  184. package/dist/es/chat/shared/hooks/useCallbackOnChange.js +0 -24
  185. package/dist/es/chat/shared/hooks/useEffectDidUpdate.js +0 -21
  186. package/dist/es/chat/shared/hooks/useLanguagePack.js +0 -16
  187. package/dist/es/chat/shared/hooks/usePrevious.js +0 -18
  188. package/dist/es/chat/shared/hooks/useServiceManager.js +0 -16
  189. package/dist/es/chat/shared/hooks/useShouldSanitizeHTML.js +0 -15
  190. package/dist/es/chat/shared/hooks/useUUID.js +0 -22
  191. package/dist/es/chat/shared/hooks/useWindowSize.js +0 -16
  192. package/dist/es/chat/shared/loadServices.js +0 -72
  193. package/dist/es/chat/shared/schema/historyToMessages.js +0 -231
  194. package/dist/es/chat/shared/schema/inputItemToLocalItem.js +0 -30
  195. package/dist/es/chat/shared/schema/outputItemToLocalItem.js +0 -124
  196. package/dist/es/chat/shared/services/CustomPanelInstance.js +0 -26
  197. package/dist/es/chat/shared/services/CustomPanelManager.js +0 -23
  198. package/dist/es/chat/shared/services/HistoryService.js +0 -59
  199. package/dist/es/chat/shared/services/MessageService.js +0 -351
  200. package/dist/es/chat/shared/services/NamespaceService.js +0 -26
  201. package/dist/es/chat/shared/services/ServiceManager.js +0 -19
  202. package/dist/es/chat/shared/services/UserSessionStorageService.js +0 -89
  203. package/dist/es/chat/shared/services/haa/agentStatusMessage.js +0 -108
  204. package/dist/es/chat/shared/services/haa/humanAgentUtils.js +0 -114
  205. package/dist/es/chat/shared/services/mockStorage.js +0 -30
  206. package/dist/es/chat/shared/store/agentActions.js +0 -125
  207. package/dist/es/chat/shared/store/agentReducers.js +0 -215
  208. package/dist/es/chat/shared/store/doCreateStore.js +0 -142
  209. package/dist/es/chat/shared/store/reducerUtils.js +0 -320
  210. package/dist/es/chat/shared/store/reducers.js +0 -871
  211. package/dist/es/chat/shared/store/subscriptions.js +0 -55
  212. package/dist/es/chat/shared/store/tourReducerUtils.js +0 -51
  213. package/dist/es/chat/shared/utils/ListenerList.js +0 -26
  214. package/dist/es/chat/shared/utils/PageObjectId.js +0 -25
  215. package/dist/es/chat/shared/utils/animationUtils.js +0 -77
  216. package/dist/es/chat/shared/utils/colors.js +0 -71
  217. package/dist/es/chat/shared/utils/customizers.js +0 -16
  218. package/dist/es/chat/shared/utils/dateUtils.js +0 -38
  219. package/dist/es/chat/shared/utils/homeScreenUtils.js +0 -27
  220. package/dist/es/chat/shared/utils/intlUtils.js +0 -21
  221. package/dist/es/chat/shared/utils/lang/arrayUtils.js +0 -53
  222. package/dist/es/chat/shared/utils/lang/langUtils.js +0 -13
  223. package/dist/es/chat/shared/utils/lang/objectUtils.js +0 -19
  224. package/dist/es/chat/shared/utils/lang/promiseUtils.js +0 -25
  225. package/dist/es/chat/shared/utils/lang/uuid.js +0 -16
  226. package/dist/es/chat/shared/utils/languages.js +0 -156
  227. package/dist/es/chat/shared/utils/memoizerUtils.js +0 -38
  228. package/dist/es/chat/shared/utils/messageServiceUtils.js +0 -36
  229. package/dist/es/chat/shared/utils/resolvablePromise.js +0 -32
  230. package/dist/es/chat/shared/utils/styleUtils.js +0 -231
  231. package/dist/es/chat/shared/utils/timeUtils.js +0 -14
  232. package/dist/es/chat/shared/utils/viewStateUtils.js +0 -38
  233. package/dist/es/chat/web-components/components/chainOfThought/cds-aichat-chain-of-thought.js +0 -26
  234. package/dist/es/chat/web-components/components/chainOfThought/src/ChainOfThoughtElement.js +0 -130
  235. package/dist/es/chat/web-components/components/chainOfThought/src/chainOfThoughtElement.scss.js +0 -3
  236. package/dist/es/chat/web-components/components/chainOfThought/src/chainOfThoughtElement.template.js +0 -186
  237. package/dist/es/chat/web-components/components/chatHeader/chatHeaderAvatar/cds-aichat-chat-header-avatar.js +0 -26
  238. package/dist/es/chat/web-components/components/chatHeader/chatHeaderAvatar/src/chatHeaderAvatar.template.js +0 -32
  239. package/dist/es/chat/web-components/components/chatHeader/chatHeaderAvatar/src/chatHeaderAvatarElement.js +0 -52
  240. package/dist/es/chat/web-components/components/chatHeader/chatHeaderAvatar/src/chatHeaderAvatarElement.scss.js +0 -3
  241. package/dist/es/chat/web-components/components/chatHeader/chatHeaderLink/cds-aichat-chat-header-link.js +0 -44
  242. package/dist/es/chat/web-components/components/chatHeader/chatHeaderLink/src/chatHeaderLinkElement.template.js +0 -28
  243. package/dist/es/chat/web-components/components/chatHeader/chatHeaderTitle/cds-aichat-chat-header-title.js +0 -42
  244. package/dist/es/chat/web-components/components/chatHeader/chatHeaderTitle/src/chatHeaderTitle.scss.js +0 -3
  245. package/dist/es/chat/web-components/components/chatHeader/chatHeaderTitle/src/chatHeaderTitle.template.js +0 -20
  246. package/dist/es/chat/web-components/components/codeElement/cds-aichat-code.js +0 -66
  247. package/dist/es/chat/web-components/components/feedbackButtonsElement/cds-aichat-feedback-buttons.js +0 -26
  248. package/dist/es/chat/web-components/components/feedbackButtonsElement/src/FeedbackButtonsElement.js +0 -93
  249. package/dist/es/chat/web-components/components/feedbackButtonsElement/src/feedbackButtonsElement.scss.js +0 -3
  250. package/dist/es/chat/web-components/components/feedbackButtonsElement/src/feedbackButtonsElement.template.js +0 -84
  251. package/dist/es/chat/web-components/components/feedbackElement/cds-aichat-feedback.js +0 -30
  252. package/dist/es/chat/web-components/components/feedbackElement/src/FeedbackElement.js +0 -157
  253. package/dist/es/chat/web-components/components/feedbackElement/src/feedbackElement.scss.js +0 -3
  254. package/dist/es/chat/web-components/components/feedbackElement/src/feedbackElement.template.js +0 -95
  255. package/dist/es/chat/web-components/components/inlineLoadingElement/cds-aichat-inline-loading.js +0 -85
  256. package/dist/es/chat/web-components/components/inlineLoadingElement/src/styles.scss.js +0 -3
  257. package/dist/es/chat/web-components/components/markdownText/cds-aichat-markdown-text.js +0 -32
  258. package/dist/es/chat/web-components/components/markdownText/markdown/markdownToHTML.js +0 -28
  259. package/dist/es/chat/web-components/components/markdownText/markdown/utils/renderTokenTree.js +0 -191
  260. package/dist/es/chat/web-components/components/markdownText/markdown/workers/workerManager.js +0 -16
  261. package/dist/es/chat/web-components/components/markdownText/src/MarkdownElement.js +0 -70
  262. package/dist/es/chat/web-components/components/markdownText/src/markdownElement.template.js +0 -19
  263. package/dist/es/chat/web-components/components/roundedButton/cds-aichat-rounded-button.js +0 -29
  264. package/dist/es/chat/web-components/components/stopStreamingButton/cds-aichat-stop-streaming-button.js +0 -26
  265. package/dist/es/chat/web-components/components/stopStreamingButton/src/StopStreamingButtonElement.js +0 -49
  266. package/dist/es/chat/web-components/components/stopStreamingButton/src/stopStreamingButton.scss.js +0 -3
  267. package/dist/es/chat/web-components/components/stopStreamingButton/src/stopStreamingButton.template.js +0 -44
  268. package/dist/es/chat/web-components/components/table/cds-aichat-table.js +0 -229
  269. package/dist/es/chat/web-components/components/table/src/table.scss.js +0 -3
  270. package/dist/es/chat/web-components/components/table/src/table.template.js +0 -81
  271. package/dist/es/chat/web-components/components/table/src/tablePagination.template.js +0 -43
  272. package/dist/es/chat/web-components/components/table/src/tableSkeleton.template.js +0 -17
  273. package/dist/es/chat/web-components/components/tagListElement/cds-aichat-tag-list.js +0 -28
  274. package/dist/es/chat/web-components/components/tagListElement/src/TagListElement.js +0 -70
  275. package/dist/es/chat/web-components/components/tagListElement/src/tagListElement.scss.js +0 -3
  276. package/dist/es/chat/web-components/components/tagListElement/src/tagListElement.template.js +0 -40
  277. package/dist/es/chat/web-components/decorators/customElement.js +0 -33
  278. package/dist/es/chat/web-components/internal/cds-aichat-internal.js +0 -78
  279. package/dist/es/chat/web-components/settings.js +0 -13
  280. package/dist/es/node_modules/@carbon/colors/es/index.js +0 -11
  281. package/dist/es/react/ChatContainer.js +0 -162
  282. package/dist/es/react/ChatCustomElement.js +0 -58
  283. package/dist/es/types/config/ChatHeaderConfig.js +0 -18
  284. package/dist/es/types/config/CornersType.js +0 -16
  285. package/dist/es/types/config/LauncherConfig.js +0 -19
  286. package/dist/es/types/config/PublicConfig.js +0 -36
  287. package/dist/es/types/instance/ChatInstance.js +0 -31
  288. package/dist/es/types/instance/apiTypes.js +0 -33
  289. package/dist/es/types/messaging/LocalMessageItem.js +0 -18
  290. package/dist/es/types/state/AppState.js +0 -18
  291. package/dist/es/types/utilities/Animation.js +0 -31
  292. package/dist/es/types/utilities/HasAddRemoveClassName.js +0 -27
  293. /package/dist/es/{chat/shared/styles/export.carbon.scss.js → chat.export.carbon.js} +0 -0
  294. /package/dist/es/{chat/shared/styles/export.scss.js → chat.export.js} +0 -0
  295. /package/dist/es/{chat/web-components/components/markdownText/markdown/utils/markdown.js → chat.markdown.js} +0 -0
  296. /package/dist/es/{chat/web-components/components/markdownText/markdown/utils/tokenTree.js → chat.tokenTree.js} +0 -0
@@ -1,83 +0,0 @@
1
- import { unstable__ChatButton } from "@carbon/react";
2
-
3
- import React, { Component } from "react";
4
-
5
- import { createMessageRequestForChoice, getOptionType } from "../../../utils/messageUtils.js";
6
-
7
- import Metablock from "../util/Metablock.js";
8
-
9
- import SelectComponent from "./SelectComponent.js";
10
-
11
- import { MessageSendSource } from "../../../../../types/events/eventBusTypes.js";
12
-
13
- import { ButtonSizeEnum, ButtonKindEnum } from "../../../../../types/utilities/carbonTypes.js";
14
-
15
- /*
16
- * Copyright IBM Corp. 2025
17
- *
18
- * This source code is licensed under the Apache-2.0 license found in the
19
- * LICENSE file in the root directory of this source tree.
20
- *
21
- * @license
22
- */ class OptionComponent extends Component {
23
- constructor() {
24
- super(...arguments);
25
- this.onOptionSelected = (selectedOption, type) => {
26
- const {localMessage: localMessage, serviceManager: serviceManager, originalMessage: originalMessage} = this.props;
27
- const {id: responseID} = originalMessage;
28
- const messageRequest = createMessageRequestForChoice(selectedOption, responseID);
29
- const localMessageID = localMessage.ui_state.id;
30
- const source = type === "button" ? MessageSendSource.OPTION_BUTTON : MessageSendSource.OPTION_DROP_DOWN;
31
- serviceManager.actions.sendWithCatch(messageRequest, source, {
32
- setValueSelectedForMessageID: localMessageID
33
- });
34
- this.props.requestInputFocus();
35
- };
36
- this.onButtonClick = (event, item) => {
37
- this.onOptionSelected(item, "button");
38
- };
39
- this.onSelectChange = data => {
40
- this.onOptionSelected(data.selectedItem, "dropdown");
41
- };
42
- }
43
- render() {
44
- const {localMessage: localMessage, languagePack: languagePack, disableUserInputs: disableUserInputs, serviceManager: serviceManager, shouldRemoveHTMLBeforeMarkdownConversion: shouldRemoveHTMLBeforeMarkdownConversion} = this.props;
45
- const {options: options, title: title, description: description, preference: preference} = localMessage.item;
46
- const {optionSelected: optionSelected} = localMessage.ui_state;
47
- const type = getOptionType(preference, options.length);
48
- return type === "button" ? React.createElement(React.Fragment, null, React.createElement(Metablock, {
49
- title: title,
50
- description: description,
51
- shouldRemoveHTMLBeforeMarkdownConversion: shouldRemoveHTMLBeforeMarkdownConversion
52
- }), React.createElement("div", {
53
- className: "WAC__button-holder"
54
- }, React.createElement("ul", null, options.map((item, index) => {
55
- const isSelected = optionSelected ? item.value.input.text === optionSelected.input.text : false;
56
- return React.createElement("li", {
57
- key: item.label
58
- }, React.createElement(unstable__ChatButton, {
59
- kind: ButtonKindEnum.TERTIARY,
60
- isQuickAction: true,
61
- size: ButtonSizeEnum.SMALL,
62
- className: `WAC__button-${index}`,
63
- disabled: disableUserInputs,
64
- isSelected: isSelected,
65
- onClick: event => {
66
- this.onButtonClick(event, item);
67
- }
68
- }, item.label));
69
- })))) : React.createElement(SelectComponent, {
70
- serviceManager: serviceManager,
71
- languagePack: languagePack,
72
- title: title,
73
- description: description,
74
- options: options,
75
- disableUserInputs: disableUserInputs,
76
- onChange: this.onSelectChange,
77
- value: optionSelected,
78
- shouldRemoveHTMLBeforeMarkdownConversion: shouldRemoveHTMLBeforeMarkdownConversion
79
- });
80
- }
81
- }
82
-
83
- export { OptionComponent };
@@ -1,84 +0,0 @@
1
- import { Layer, Dropdown } from "@carbon/react";
2
-
3
- import cx from "classnames";
4
-
5
- import React, { useState, useRef } from "react";
6
-
7
- import { useCounter } from "../../../hooks/useCounter.js";
8
-
9
- import { doScrollElementIntoView } from "../../../utils/domUtils.js";
10
-
11
- import Metablock from "../util/Metablock.js";
12
-
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
- * @license
20
- */ function createProxyEnvironment(shadowRoot) {
21
- const properties = {
22
- document: shadowRoot.ownerDocument,
23
- addEventListener: shadowRoot.ownerDocument.addEventListener.bind(shadowRoot),
24
- removeEventListener: shadowRoot.ownerDocument.removeEventListener.bind(shadowRoot),
25
- Node: Node
26
- };
27
- return new Proxy(shadowRoot, {
28
- get: (_, prop) => properties[prop]
29
- });
30
- }
31
-
32
- function SelectComponent(props) {
33
- const {title: title, description: description, options: options, onChange: onChange, languagePack: languagePack, disableUserInputs: disableUserInputs, serviceManager: serviceManager, shouldRemoveHTMLBeforeMarkdownConversion: shouldRemoveHTMLBeforeMarkdownConversion} = props;
34
- const [isBeingOpened, setIsBeingOpened] = useState(false);
35
- const rootRef = useRef();
36
- const counter = useCounter();
37
- const id = `${counter}${serviceManager.namespace.suffix}`;
38
- const environment = rootRef.current?.getRootNode ? createProxyEnvironment(rootRef.current.getRootNode()) : undefined;
39
- function findOptionForValue() {
40
- const {value: value, options: options} = props;
41
- const selectedItem = options.find(item => item.value === value);
42
- return selectedItem;
43
- }
44
- function onIsOpenChange(changes) {
45
- if (changes.isOpen && rootRef.current) {
46
- setTimeout(() => {
47
- if (rootRef?.current) {
48
- setIsBeingOpened(true);
49
- doScrollElementIntoView(rootRef.current, true);
50
- setIsBeingOpened(false);
51
- }
52
- }, 70 * 2);
53
- }
54
- }
55
- return React.createElement("div", {
56
- ref: rootRef
57
- }, React.createElement(Metablock, {
58
- title: title,
59
- description: description,
60
- id: `WAC__selectUUID_${id}-label`,
61
- shouldRemoveHTMLBeforeMarkdownConversion: shouldRemoveHTMLBeforeMarkdownConversion
62
- }), React.createElement("div", {
63
- className: cx("WAC__selectHolder", {
64
- WAC__customSelectTemporaryPadding: isBeingOpened
65
- })
66
- }, React.createElement(Layer, null, React.createElement(Dropdown, {
67
- id: `WAC__selectUUID_${id}`,
68
- items: options,
69
- label: languagePack.options_select,
70
- titleText: languagePack.options_select,
71
- hideLabel: true,
72
- "aria-label": disableUserInputs ? languagePack.options_ariaOptionsDisabled : title,
73
- disabled: disableUserInputs,
74
- onChange: onChange,
75
- selectedItem: findOptionForValue(),
76
- downshiftProps: {
77
- environment: environment,
78
- onIsOpenChange: onIsOpenChange,
79
- id: `WACSelectComponent__Downshift-${id}`
80
- }
81
- }))));
82
- }
83
-
84
- export { SelectComponent as default };
@@ -1,96 +0,0 @@
1
- import { Theme } from "@carbon/react";
2
-
3
- import React, { useRef, useState, useLayoutEffect, useMemo, Suspense } from "react";
4
-
5
- import { useIntl } from "react-intl";
6
-
7
- import { useSelector } from "react-redux";
8
-
9
- import { Table } from "../../../../react/components/table/Table.js";
10
-
11
- import { useLanguagePack } from "../../../hooks/useLanguagePack.js";
12
-
13
- import { LIGHT_THEMES } from "../../../utils/constants.js";
14
-
15
- import { consoleError } from "../../../utils/miscUtils.js";
16
-
17
- import { InlineError } from "../error/InlineError.js";
18
-
19
- /*
20
- * Copyright IBM Corp. 2025
21
- *
22
- * This source code is licensed under the Apache-2.0 license found in the
23
- * LICENSE file in the root directory of this source tree.
24
- *
25
- * @license
26
- */ function TableContainer(props) {
27
- const {tableItem: tableItem} = props;
28
- const {title: title, description: description, headers: headers, rows: rows} = tableItem;
29
- const carbonTheme = useSelector(state => state.theme.carbonTheme);
30
- const chatHeight = useSelector(state => state.chatHeight);
31
- const locale = useSelector(state => state.locale);
32
- const languagePack = useLanguagePack();
33
- const intl = useIntl();
34
- const tableContainerRef = useRef(null);
35
- const [tableContainerWidth, setTableContainerWidth] = useState();
36
- function onResize() {
37
- setTableContainerWidth(tableContainerRef.current?.clientWidth);
38
- }
39
- useLayoutEffect(() => {
40
- const tableResizeObserver = new ResizeObserver(onResize);
41
- tableResizeObserver.observe(tableContainerRef.current);
42
- });
43
- const isValidTable = useMemo(() => {
44
- const columnCount = headers.length;
45
- const isValid = !rows.some(row => row.cells.length !== columnCount);
46
- if (!isValid) {
47
- consoleError(`Number of cells in the table header does not match the number of cells in one or more of the table rows. In order to render a table there needs to be the same number of columns in the table header and all of the table rows.`);
48
- }
49
- return isValid;
50
- }, [ rows, headers ]);
51
- function getTablePaginationSupplementalText({count: count}) {
52
- return intl.formatMessage({
53
- id: "table_paginationSupplementalText"
54
- }, {
55
- pagesCount: count
56
- });
57
- }
58
- function getTablePaginationStatusText({start: start, end: end, count: count}) {
59
- return intl.formatMessage({
60
- id: "table_paginationStatus"
61
- }, {
62
- start: start,
63
- end: end,
64
- count: count
65
- });
66
- }
67
- if (isValidTable) {
68
- return React.createElement(Theme, {
69
- theme: LIGHT_THEMES.includes(carbonTheme) ? "white" : "g90"
70
- }, React.createElement("div", {
71
- className: "WACTableContainer",
72
- ref: tableContainerRef
73
- }, React.createElement(Suspense, {
74
- fallback: null
75
- }, React.createElement(Table, {
76
- tableTitle: title,
77
- tableDescription: description,
78
- headers: headers,
79
- rows: rows,
80
- containerWidth: tableContainerWidth,
81
- chatHeight: chatHeight,
82
- filterPlaceholderText: languagePack.table_filterPlaceholder,
83
- previousPageText: languagePack.table_previousPage,
84
- nextPageText: languagePack.table_nextPage,
85
- itemsPerPageText: languagePack.table_itemsPerPage,
86
- getPaginationSupplementalText: getTablePaginationSupplementalText,
87
- getPaginationStatusText: getTablePaginationStatusText,
88
- locale: locale
89
- }))));
90
- }
91
- return React.createElement(InlineError, null);
92
- }
93
-
94
- const TableContainerExport = React.memo(TableContainer);
95
-
96
- export { TableContainerExport as default };
@@ -1,68 +0,0 @@
1
- import cx from "classnames";
2
-
3
- import React, { PureComponent } from "react";
4
-
5
- import { doFocusRef } from "../../../utils/domUtils.js";
6
-
7
- /*
8
- * Copyright IBM Corp. 2025
9
- *
10
- * This source code is licensed under the Apache-2.0 license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- *
13
- * @license
14
- */ class TextArea extends PureComponent {
15
- constructor() {
16
- super(...arguments);
17
- this.textAreaRef = React.createRef();
18
- }
19
- getHTMLElement() {
20
- return this.textAreaRef.current;
21
- }
22
- takeFocus() {
23
- doFocusRef(this.textAreaRef, false, true);
24
- }
25
- doBlur() {
26
- this.textAreaRef.current.blur();
27
- }
28
- render() {
29
- const {isRequired: isRequired, name: name, id: id, onFocus: onFocus, onBlur: onBlur, onClick: onClick, onChange: onChange, onKeyDown: onKeyDown, rows: rows, value: value, autoSize: autoSize, maxLength: maxLength, disabled: disabled, placeholder: placeholder, ariaLabel: ariaLabel, testId: testId, onSelect: onSelect} = this.props;
30
- return React.createElement("div", {
31
- className: cx("WAC__TextArea", {
32
- "WAC__TextArea--autoSize": autoSize,
33
- "WAC__TextArea--disabled": disabled
34
- })
35
- }, React.createElement("textarea", {
36
- ref: this.textAreaRef,
37
- "aria-label": ariaLabel,
38
- "aria-required": isRequired,
39
- className: "WAC__TextArea-textarea",
40
- disabled: disabled,
41
- id: id || testId,
42
- maxLength: maxLength,
43
- name: name,
44
- onFocus: onFocus,
45
- onBlur: onBlur,
46
- onClick: onClick,
47
- onChange: onChange,
48
- onKeyDown: onKeyDown,
49
- onSelect: onSelect,
50
- placeholder: placeholder,
51
- rows: rows,
52
- value: value || "",
53
- "data-gramm": "false",
54
- "data-gramm_editor": "false",
55
- "data-enable-grammarly": "false",
56
- "data-testid": testId
57
- }), autoSize && React.createElement("div", {
58
- className: "WAC__TextArea-sizer"
59
- }, value || placeholder || " "));
60
- }
61
- }
62
-
63
- TextArea.defaultProps = {
64
- isRequired: false,
65
- maxLength: 1e4
66
- };
67
-
68
- export { TextArea as default };
@@ -1,73 +0,0 @@
1
- import ArrowRight from "@carbon/icons-react/es/ArrowRight.js";
2
-
3
- import Restart from "@carbon/icons-react/es/Restart.js";
4
-
5
- import { Tile, Button } from "@carbon/react";
6
-
7
- import React from "react";
8
-
9
- import { useSelector } from "react-redux";
10
-
11
- import { useLanguagePack } from "../../../hooks/useLanguagePack.js";
12
-
13
- import "../../../../../types/state/AppState.js";
14
-
15
- import { TourStartReason, MainWindowCloseReason } from "../../../../../types/events/eventBusTypes.js";
16
-
17
- import { ViewType } from "../../../../../types/instance/apiTypes.js";
18
-
19
- /*
20
- * Copyright IBM Corp. 2025
21
- *
22
- * This source code is licensed under the Apache-2.0 license found in the
23
- * LICENSE file in the root directory of this source tree.
24
- *
25
- * @license
26
- */ function TourCard({message: message, serviceManager: serviceManager}) {
27
- const {tour_resumeButton: tour_resumeButton, tour_restartButton: tour_restartButton, tour_startButton: tour_startButton} = useLanguagePack();
28
- const {activeTourID: activeTourID} = useSelector(state => state.persistedToBrowserStorage.chatState.persistedTourState);
29
- const isCurrentTour = message.fullMessageID === activeTourID;
30
- const tourTitle = message.item.user_defined?.card_title || "Guided journey";
31
- const tourDescription = message.item.user_defined?.card_description || "Follow along as the assistant guides you to where you want to be.";
32
- async function onResumeClick() {
33
- await serviceManager.actions.changeView(ViewType.TOUR, {
34
- mainWindowCloseReason: MainWindowCloseReason.TOUR_CARD_RESUMED_TOUR
35
- });
36
- }
37
- async function onRestartClick() {
38
- const newViewState = await serviceManager.actions.changeView(ViewType.TOUR, {
39
- mainWindowCloseReason: MainWindowCloseReason.TOUR_CARD_RESTARTED_TOUR
40
- });
41
- if (newViewState.tour) {
42
- serviceManager.actions.changeStepInTour({
43
- newStepIndex: 0
44
- });
45
- }
46
- }
47
- return React.createElement(Tile, {
48
- className: "WACTourCard"
49
- }, React.createElement("div", {
50
- className: "WACTourCard__Title"
51
- }, tourTitle), React.createElement("div", {
52
- className: "WACTourCard__Description"
53
- }, tourDescription), isCurrentTour && React.createElement("div", null, React.createElement(Button, {
54
- className: "WACTourCard__ResumeButton",
55
- renderIcon: ArrowRight,
56
- onClick: onResumeClick
57
- }, tour_resumeButton), React.createElement(Button, {
58
- className: "WACTourCard__RestartButton",
59
- kind: "ghost",
60
- renderIcon: Restart,
61
- onClick: onRestartClick
62
- }, tour_restartButton)), !isCurrentTour && React.createElement(Button, {
63
- className: "WACTourCard__StartButton",
64
- renderIcon: ArrowRight,
65
- onClick: () => serviceManager.actions.startTour(message, TourStartReason.START_TOUR_CLICKED, {
66
- mainWindowCloseReason: MainWindowCloseReason.TOUR_CARD_STARTED_TOUR
67
- })
68
- }, tour_startButton));
69
- }
70
-
71
- const TourCardExport = React.memo(TourCard);
72
-
73
- export { TourCardExport as TourCard };
@@ -1,65 +0,0 @@
1
- import cx from "classnames";
2
-
3
- import React from "react";
4
-
5
- import { useSelector } from "react-redux";
6
-
7
- import { MessageTypeComponent } from "../../../containers/MessageTypeComponent.js";
8
-
9
- import { MessageResponseTypes } from "../../../../../types/messaging/Messages.js";
10
-
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
- * @license
18
- */ function BodyMessageComponents(props) {
19
- const {bodyLocalMessageItemIDs: bodyLocalMessageItemIDs} = props.message.ui_state;
20
- const allMessageItemsByID = useSelector(state => state.allMessageItemsByID);
21
- const messageComponents = bodyLocalMessageItemIDs?.map((nestedMessageID, index) => {
22
- const nestedLocalMessage = allMessageItemsByID[nestedMessageID];
23
- const isFullWidthMessage = isFullWidthResponseType(nestedLocalMessage.item.response_type);
24
- const nextLocalMessageID = bodyLocalMessageItemIDs[index + 1];
25
- const nextLocalMessage = allMessageItemsByID[nextLocalMessageID];
26
- const isNextMessageFullWidth = isFullWidthResponseType(nextLocalMessage?.item.response_type);
27
- const isLastElement = index === bodyLocalMessageItemIDs.length - 1;
28
- const withShortBottomPadding = !isLastElement && !isFullWidthMessage && !isNextMessageFullWidth;
29
- return React.createElement("div", {
30
- key: nestedMessageID,
31
- className: cx("WACBodyMessageComponents__MessageWrapper", {
32
- "WACBodyMessageComponents__MessageWrapper--fullWidth": isFullWidthMessage,
33
- "WACBodyMessageComponents__MessageWrapper--shortBottomPadding": withShortBottomPadding
34
- })
35
- }, React.createElement(MessageTypeComponent, {
36
- ...props,
37
- message: nestedLocalMessage,
38
- isNestedMessageItem: true
39
- }));
40
- });
41
- if (!messageComponents?.length) {
42
- return null;
43
- }
44
- return React.createElement("div", {
45
- className: "WACBodyMessageComponents"
46
- }, messageComponents);
47
- }
48
-
49
- function isFullWidthResponseType(responseType) {
50
- switch (responseType) {
51
- case MessageResponseTypes.IMAGE:
52
- case MessageResponseTypes.IFRAME:
53
- case MessageResponseTypes.VIDEO:
54
- case MessageResponseTypes.AUDIO:
55
- case MessageResponseTypes.USER_DEFINED:
56
- return true;
57
-
58
- default:
59
- return false;
60
- }
61
- }
62
-
63
- const BodyMessageTypeComponentsExport = React.memo(BodyMessageComponents);
64
-
65
- export { BodyMessageTypeComponentsExport as BodyMessageComponents };
@@ -1,36 +0,0 @@
1
- import React from "react";
2
-
3
- import VisuallyHidden from "../../util/VisuallyHidden.js";
4
-
5
- import { Image as ImageExport } from "../image/Image.js";
6
-
7
- /*
8
- * Copyright IBM Corp. 2025
9
- *
10
- * This source code is licensed under the Apache-2.0 license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- *
13
- * @license
14
- */ function ClickableImage({buttonAltText: buttonAltText, isLink: isLink, target: target, disabled: disabled, onClick: onClick, ...imageProps}) {
15
- if (isLink) {
16
- return React.createElement("a", {
17
- className: "WACClickableImage",
18
- href: imageProps.displayURL,
19
- rel: "noopener noreferrer",
20
- target: target,
21
- onClick: onClick
22
- }, React.createElement(ImageExport, {
23
- ...imageProps
24
- }), buttonAltText && React.createElement(VisuallyHidden, null, buttonAltText));
25
- }
26
- return React.createElement("button", {
27
- className: "WACClickableImage",
28
- type: "button",
29
- onClick: onClick,
30
- disabled: disabled
31
- }, React.createElement(ImageExport, {
32
- ...imageProps
33
- }), buttonAltText && React.createElement(VisuallyHidden, null, buttonAltText));
34
- }
35
-
36
- export { ClickableImage };
@@ -1,21 +0,0 @@
1
- import React from "react";
2
-
3
- import { RichText as RichTextExport } from "./RichText.js";
4
-
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
- * @license
12
- */ function Description({className: className, text: text, shouldRemoveHTMLBeforeMarkdownConversion: shouldRemoveHTMLBeforeMarkdownConversion = false}) {
13
- return React.createElement("div", {
14
- className: `WAC__description ${className}`
15
- }, React.createElement(RichTextExport, {
16
- text: text,
17
- shouldRemoveHTMLBeforeMarkdownConversion: shouldRemoveHTMLBeforeMarkdownConversion
18
- }));
19
- }
20
-
21
- export { Description as default };
@@ -1,36 +0,0 @@
1
- import cx from "classnames";
2
-
3
- import React from "react";
4
-
5
- import { useSelector } from "react-redux";
6
-
7
- import { MessageTypeComponent } from "../../../containers/MessageTypeComponent.js";
8
-
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
- * @license
16
- */ function FooterButtonComponents(props) {
17
- const allMessageItemsByID = useSelector(state => state.allMessageItemsByID);
18
- const buttonComponents = props.message.ui_state.footerLocalMessageItemIDs?.map(nestedMessageID => {
19
- const nestedLocalMessage = allMessageItemsByID[nestedMessageID];
20
- return React.createElement(MessageTypeComponent, {
21
- key: nestedMessageID,
22
- ...props,
23
- message: nestedLocalMessage,
24
- isNestedMessageItem: true
25
- });
26
- });
27
- const totalButtons = buttonComponents?.length ?? 0;
28
- const isColumnList = totalButtons > 2;
29
- return totalButtons ? React.createElement("div", {
30
- className: cx("WACFooterButtonComponents", {
31
- "WACFooterButtonComponents--column": isColumnList
32
- })
33
- }, buttonComponents) : null;
34
- }
35
-
36
- export { FooterButtonComponents };