@carbon/ai-chat 0.4.0-rc.2 → 0.4.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/aiChatEntry.js +220 -14
- package/dist/es/chat.AppContainer.js +6491 -0
- package/dist/es/chat.AppState.js +40 -0
- package/dist/es/{chat/shared/components/BasePanelComponent.js → chat.BasePanelComponent.js} +3 -3
- package/dist/es/{chat/shared/components/panels/BodyAndFooterPanelComponent.js → chat.BodyAndFooterPanelComponent.js} +92 -9
- package/dist/es/chat.BodyWithFooterComponent.js +140 -0
- package/dist/es/{chat/shared/components/header/BotHeader.js → chat.BotHeader.js} +7 -9
- package/dist/es/{chat/shared/components/responseTypes/carousel/Carousel.js → chat.Carousel.js} +3 -3
- package/dist/es/chat.CatastrophicError.js +381 -0
- package/dist/es/chat.Chat.js +2009 -0
- package/dist/es/chat.Disclaimer.js +553 -0
- package/dist/es/chat.Header.js +1025 -0
- package/dist/es/{chat/shared/components/util/HideComponent.js → chat.HideComponent.js} +9 -2
- package/dist/es/{types/config/HomeScreenConfig.js → chat.HomeScreenConfig.js} +1 -1
- package/dist/es/{chat/shared/components/homeScreen/HomeScreen.js → chat.HomeScreenContainer.js} +159 -14
- package/dist/es/{chat/shared/components/homeScreen/HomeScreenHeader.js → chat.HomeScreenHeader.js} +3 -3
- package/dist/es/{chat/shared/services/haa/HumanAgentServiceImpl.js → chat.HumanAgentServiceImpl.js} +215 -17
- package/dist/es/{chat/shared/components/responseTypes/iframe/IFrameComponent.js → chat.IFrameComponent.js} +4 -8
- package/dist/es/chat.IFramePanel.js +151 -0
- package/dist/es/{chat/shared/components/input/Input.js → chat.Input.js} +214 -18
- package/dist/es/{types/config/ServiceDeskConfig.js → chat.LocalMessageItem.js} +17 -1
- package/dist/es/chat.MessageTypeComponent.js +3580 -0
- package/dist/es/{types/messaging/Messages.js → chat.Messages.js} +1 -1
- package/dist/es/chat.MountChildrenOnDelay.js +97 -0
- package/dist/es/{chat/shared/components/OverlayPanel.js → chat.PageObjectId.js} +70 -4
- package/dist/es/{chat/web-components/components/markdownText/src/markdownText.scss.js → chat.RichText.js} +347 -1
- package/dist/es/chat.TourContainer.js +524 -0
- package/dist/es/{chat/languages/en.json.js → chat.VideoComponent.js} +561 -1
- package/dist/es/chat.ViewSourcePanel.js +187 -0
- package/dist/es/{chat/shared/store/actions.js → chat.actions.js} +2 -2
- package/dist/es/{chat/shared/utils/browserUtils.js → chat.browserUtils.js} +1 -1
- package/dist/es/{types/utilities/carbonTypes.js → chat.carbonTypes.js} +2 -2
- package/dist/es/{chat/web-components/components/codeElement/src/codeElement.scss.js → chat.cds-aichat-code.js} +64 -1
- package/dist/es/{chat/shared/utils/constants.js → chat.constants.js} +4 -7
- package/dist/es/{types/events/eventBusTypes.js → chat.customElement.js} +32 -1
- package/dist/es/chat.dynamic-imports.js +192 -0
- package/dist/es/{chat/shared/utils/htmlUtils.js → chat.htmlUtils.js} +16 -2
- package/dist/es/{chat/shared/utils/messageUtils.js → chat.messageUtils.js} +54 -7
- package/dist/es/{chat/shared/utils/miscUtils.js → chat.miscUtils.js} +24 -5
- package/dist/es/chat.resolvablePromise.js +315 -0
- package/dist/es/{chat/shared/store/selectors.js → chat.selectors.js} +1 -1
- package/dist/es/{chat/shared/utils/lang/stringUtils.js → chat.stringUtils.js} +2 -2
- package/dist/es/{chat/shared/hooks/useCounter.js → chat.useCounter.js} +1 -1
- package/dist/es/{chat/shared/hooks/useOnMount.js → chat.useOnMount.js} +1 -1
- package/dist/es/{chat/shared/utils/domUtils.js → chat.usePrevious.js} +47 -1
- package/dist/es/{chat/shared/utils/lang/UUIDType.js → chat.uuid.js} +15 -3
- package/dist/es/web-components/cds-aichat-container/index.js +73 -4
- package/dist/es/web-components/cds-aichat-custom-element/index.js +1 -3
- package/package.json +2 -2
- package/dist/es/chat/dynamic-imports/dynamic-imports.js +0 -96
- package/dist/es/chat/react/components/AppContainer.js +0 -197
- package/dist/es/chat/react/components/UserDefinedResponsePortalsContainer.js +0 -31
- package/dist/es/chat/react/components/WriteableElementsPortalsContainer.js +0 -28
- package/dist/es/chat/react/components/chainOfThought/ChainOfThought.js +0 -20
- package/dist/es/chat/react/components/chatHeader/ChatHeaderAvatar.js +0 -20
- package/dist/es/chat/react/components/chatHeader/ChatHeaderLink.js +0 -22
- package/dist/es/chat/react/components/chatHeader/ChatHeaderMenu.js +0 -27
- package/dist/es/chat/react/components/chatHeader/ChatHeaderMenuButton.js +0 -60
- package/dist/es/chat/react/components/chatHeader/ChatHeaderMenuItem.js +0 -24
- package/dist/es/chat/react/components/chatHeader/ChatHeaderMenuItemRadioGroup.js +0 -28
- package/dist/es/chat/react/components/chatHeader/ChatHeaderOverflowMenu.js +0 -69
- package/dist/es/chat/react/components/chatHeader/ChatHeaderTitle.js +0 -22
- package/dist/es/chat/react/components/feedback/FeedbackButtonsComponent.js +0 -20
- package/dist/es/chat/react/components/feedback/FeedbackComponent.js +0 -20
- package/dist/es/chat/react/components/inlineLoading/InlineLoadingComponent.js +0 -20
- package/dist/es/chat/react/components/markdownText/MarkdownText.js +0 -20
- package/dist/es/chat/react/components/stopStreamingButton/StopStreamingButton.js +0 -20
- package/dist/es/chat/react/components/table/Table.js +0 -20
- package/dist/es/chat/shared/Chat.js +0 -115
- package/dist/es/chat/shared/ChatInstanceImpl.js +0 -360
- package/dist/es/chat/shared/chatEntryFunctions.js +0 -46
- package/dist/es/chat/shared/components/Avatar.js +0 -286
- package/dist/es/chat/shared/components/BodyWithFooterComponent.js +0 -56
- package/dist/es/chat/shared/components/CatastrophicError.js +0 -77
- package/dist/es/chat/shared/components/Chat.js +0 -244
- package/dist/es/chat/shared/components/ChatBubbleDark.js +0 -124
- package/dist/es/chat/shared/components/ChatBubbleLight.js +0 -216
- package/dist/es/chat/shared/components/Disclaimer.js +0 -86
- package/dist/es/chat/shared/components/ErrorIcon.js +0 -20
- package/dist/es/chat/shared/components/ErrorMessageDark.js +0 -89
- package/dist/es/chat/shared/components/ErrorMessageLight.js +0 -135
- package/dist/es/chat/shared/components/HydrationPanel.js +0 -58
- package/dist/es/chat/shared/components/LatestWelcomeNodes.js +0 -26
- package/dist/es/chat/shared/components/ResponseStopped.js +0 -19
- package/dist/es/chat/shared/components/SkeletonPicker.js +0 -32
- package/dist/es/chat/shared/components/WriteableElement.js +0 -22
- package/dist/es/chat/shared/components/agent/AgentAvatar.js +0 -54
- package/dist/es/chat/shared/components/agent/AgentBanner.js +0 -109
- package/dist/es/chat/shared/components/agent/AgentBannerContainer.js +0 -28
- package/dist/es/chat/shared/components/agent/AvailabilityMessage.js +0 -49
- package/dist/es/chat/shared/components/aria/AriaAnnouncerComponent.js +0 -122
- package/dist/es/chat/shared/components/aria/AriaAnnouncerProvider.js +0 -48
- package/dist/es/chat/shared/components/aria/AriaLiveMessage.js +0 -22
- package/dist/es/chat/shared/components/header/AISlug.js +0 -22
- package/dist/es/chat/shared/components/header/Header.js +0 -460
- package/dist/es/chat/shared/components/header/SimpleHeader.js +0 -27
- package/dist/es/chat/shared/components/homeScreen/HomeScreenContainer.js +0 -68
- package/dist/es/chat/shared/components/launcher/Launcher.js +0 -88
- package/dist/es/chat/shared/components/launcher/LauncherComplex.js +0 -63
- package/dist/es/chat/shared/components/launcher/LauncherContainer.js +0 -73
- package/dist/es/chat/shared/components/launcher/LauncherDesktopContainer.js +0 -221
- package/dist/es/chat/shared/components/launcher/LauncherExtended.js +0 -244
- package/dist/es/chat/shared/components/launcher/LauncherMobileContainer.js +0 -175
- package/dist/es/chat/shared/components/launcher/launcherUtils.js +0 -16
- package/dist/es/chat/shared/components/modals/ConfirmModal.js +0 -67
- package/dist/es/chat/shared/components/modals/EndAgentChatModal.js +0 -46
- package/dist/es/chat/shared/components/modals/RequestScreenShareModal.js +0 -43
- package/dist/es/chat/shared/components/notifications/Notifications.js +0 -58
- package/dist/es/chat/shared/components/panels/CustomPanel.js +0 -136
- package/dist/es/chat/shared/components/responseTypes/agent/ConnectToAgent.js +0 -30
- package/dist/es/chat/shared/components/responseTypes/agent/RealConnectToAgent.js +0 -102
- package/dist/es/chat/shared/components/responseTypes/audio/AudioComponent.js +0 -26
- package/dist/es/chat/shared/components/responseTypes/buttonItem/BaseButtonItemComponent.js +0 -69
- package/dist/es/chat/shared/components/responseTypes/buttonItem/ButtonItemComponent.js +0 -48
- package/dist/es/chat/shared/components/responseTypes/buttonItem/ButtonItemCustomEventComponent.js +0 -42
- package/dist/es/chat/shared/components/responseTypes/buttonItem/ButtonItemPostBackComponent.js +0 -54
- package/dist/es/chat/shared/components/responseTypes/buttonItem/ButtonItemShowPanelComponent.js +0 -36
- package/dist/es/chat/shared/components/responseTypes/buttonItem/ButtonItemURLComponent.js +0 -42
- package/dist/es/chat/shared/components/responseTypes/card/CardItemComponent.js +0 -34
- package/dist/es/chat/shared/components/responseTypes/carousel/CarouselItemComponent.js +0 -39
- package/dist/es/chat/shared/components/responseTypes/conversationalSearch/ConversationalSearch.js +0 -92
- package/dist/es/chat/shared/components/responseTypes/conversationalSearch/ConversationalSearchText.js +0 -158
- package/dist/es/chat/shared/components/responseTypes/custom/UserDefinedResponse.js +0 -33
- package/dist/es/chat/shared/components/responseTypes/datePicker/DatePickerComponent.js +0 -176
- package/dist/es/chat/shared/components/responseTypes/error/InlineError.js +0 -32
- package/dist/es/chat/shared/components/responseTypes/grid/GridItemComponent.js +0 -109
- package/dist/es/chat/shared/components/responseTypes/iframe/IFrameMessage.js +0 -32
- package/dist/es/chat/shared/components/responseTypes/iframe/IFramePanel.js +0 -51
- package/dist/es/chat/shared/components/responseTypes/iframe/IFramePreviewCard.js +0 -64
- package/dist/es/chat/shared/components/responseTypes/iframe/InlineIFrame.js +0 -55
- package/dist/es/chat/shared/components/responseTypes/image/Image.js +0 -120
- package/dist/es/chat/shared/components/responseTypes/options/OptionComponent.js +0 -83
- package/dist/es/chat/shared/components/responseTypes/options/SelectComponent.js +0 -84
- package/dist/es/chat/shared/components/responseTypes/table/TableContainer.js +0 -96
- package/dist/es/chat/shared/components/responseTypes/text/TextArea.js +0 -68
- package/dist/es/chat/shared/components/responseTypes/tour/TourCard.js +0 -73
- package/dist/es/chat/shared/components/responseTypes/util/BodyMessageComponents.js +0 -65
- package/dist/es/chat/shared/components/responseTypes/util/ClickableImage.js +0 -36
- package/dist/es/chat/shared/components/responseTypes/util/Description.js +0 -21
- package/dist/es/chat/shared/components/responseTypes/util/FooterButtonComponents.js +0 -36
- package/dist/es/chat/shared/components/responseTypes/util/MediaPlayer.js +0 -157
- package/dist/es/chat/shared/components/responseTypes/util/Metablock.js +0 -27
- package/dist/es/chat/shared/components/responseTypes/util/RichText.js +0 -31
- package/dist/es/chat/shared/components/responseTypes/util/SearchResultBody.js +0 -53
- package/dist/es/chat/shared/components/responseTypes/util/StreamingRichText.js +0 -38
- package/dist/es/chat/shared/components/responseTypes/util/TextHolderTile.js +0 -35
- package/dist/es/chat/shared/components/responseTypes/util/citations/CitationCard.js +0 -65
- package/dist/es/chat/shared/components/responseTypes/util/citations/CitationCardContent.js +0 -62
- package/dist/es/chat/shared/components/responseTypes/util/citations/CitationClickableCard.js +0 -23
- package/dist/es/chat/shared/components/responseTypes/util/citations/ExpandToPanelCard.js +0 -50
- package/dist/es/chat/shared/components/responseTypes/util/citations/ViewSourcePanel.js +0 -57
- package/dist/es/chat/shared/components/responseTypes/video/VideoComponent.js +0 -23
- package/dist/es/chat/shared/components/tour/TourCloseMinimizeComponent.js +0 -44
- package/dist/es/chat/shared/components/tour/TourContainer.js +0 -212
- package/dist/es/chat/shared/components/tour/TourControlsComponent.js +0 -98
- package/dist/es/chat/shared/components/tour/TourStepContentComponent.js +0 -156
- package/dist/es/chat/shared/components/tour/TourStepSkeletonComponent.js +0 -20
- package/dist/es/chat/shared/components/util/AnnounceOnMountComponent.js +0 -42
- package/dist/es/chat/shared/components/util/IconHolder.js +0 -16
- package/dist/es/chat/shared/components/util/ImageWithFallback.js +0 -31
- package/dist/es/chat/shared/components/util/MaybeDangerouslySetInnerHTML.js +0 -42
- package/dist/es/chat/shared/components/util/MountChildrenOnDelay.js +0 -40
- package/dist/es/chat/shared/components/util/VisuallyHidden.js +0 -18
- package/dist/es/chat/shared/containers/App.js +0 -181
- package/dist/es/chat/shared/containers/MessageComponent.js +0 -465
- package/dist/es/chat/shared/containers/MessageTypeComponent.js +0 -496
- package/dist/es/chat/shared/containers/MessagesComponent.js +0 -469
- package/dist/es/chat/shared/containers/ModalPortal.js +0 -53
- package/dist/es/chat/shared/containers/main/MainWindow.js +0 -708
- package/dist/es/chat/shared/contexts/AriaAnnouncerContext.js +0 -12
- package/dist/es/chat/shared/contexts/HideComponentContext.js +0 -12
- package/dist/es/chat/shared/contexts/LanguagePackContext.js +0 -12
- package/dist/es/chat/shared/contexts/ModalPortalRootContext.js +0 -12
- package/dist/es/chat/shared/contexts/ServiceManagerContext.js +0 -12
- package/dist/es/chat/shared/contexts/WindowSizeContext.js +0 -12
- package/dist/es/chat/shared/environmentVariables.js +0 -13
- package/dist/es/chat/shared/events/ChatActionsImpl.js +0 -783
- package/dist/es/chat/shared/events/EventBus.js +0 -161
- package/dist/es/chat/shared/hocs/withAriaAnnouncer.js +0 -25
- package/dist/es/chat/shared/hocs/withServiceManager.js +0 -25
- package/dist/es/chat/shared/hooks/useAriaAnnouncer.js +0 -16
- package/dist/es/chat/shared/hooks/useCSSCustomProperties.js +0 -21
- package/dist/es/chat/shared/hooks/useCallbackOnChange.js +0 -24
- package/dist/es/chat/shared/hooks/useEffectDidUpdate.js +0 -21
- package/dist/es/chat/shared/hooks/useLanguagePack.js +0 -16
- package/dist/es/chat/shared/hooks/usePrevious.js +0 -18
- package/dist/es/chat/shared/hooks/useServiceManager.js +0 -16
- package/dist/es/chat/shared/hooks/useShouldSanitizeHTML.js +0 -15
- package/dist/es/chat/shared/hooks/useUUID.js +0 -22
- package/dist/es/chat/shared/hooks/useWindowSize.js +0 -16
- package/dist/es/chat/shared/loadServices.js +0 -72
- package/dist/es/chat/shared/schema/historyToMessages.js +0 -231
- package/dist/es/chat/shared/schema/inputItemToLocalItem.js +0 -30
- package/dist/es/chat/shared/schema/outputItemToLocalItem.js +0 -124
- package/dist/es/chat/shared/services/CustomPanelInstance.js +0 -26
- package/dist/es/chat/shared/services/CustomPanelManager.js +0 -23
- package/dist/es/chat/shared/services/HistoryService.js +0 -59
- package/dist/es/chat/shared/services/MessageService.js +0 -351
- package/dist/es/chat/shared/services/NamespaceService.js +0 -26
- package/dist/es/chat/shared/services/ServiceManager.js +0 -19
- package/dist/es/chat/shared/services/UserSessionStorageService.js +0 -89
- package/dist/es/chat/shared/services/haa/agentStatusMessage.js +0 -108
- package/dist/es/chat/shared/services/haa/humanAgentUtils.js +0 -114
- package/dist/es/chat/shared/services/mockStorage.js +0 -30
- package/dist/es/chat/shared/store/agentActions.js +0 -125
- package/dist/es/chat/shared/store/agentReducers.js +0 -215
- package/dist/es/chat/shared/store/doCreateStore.js +0 -142
- package/dist/es/chat/shared/store/reducerUtils.js +0 -320
- package/dist/es/chat/shared/store/reducers.js +0 -871
- package/dist/es/chat/shared/store/subscriptions.js +0 -55
- package/dist/es/chat/shared/store/tourReducerUtils.js +0 -51
- package/dist/es/chat/shared/utils/ListenerList.js +0 -26
- package/dist/es/chat/shared/utils/PageObjectId.js +0 -25
- package/dist/es/chat/shared/utils/animationUtils.js +0 -77
- package/dist/es/chat/shared/utils/colors.js +0 -71
- package/dist/es/chat/shared/utils/customizers.js +0 -16
- package/dist/es/chat/shared/utils/dateUtils.js +0 -38
- package/dist/es/chat/shared/utils/homeScreenUtils.js +0 -27
- package/dist/es/chat/shared/utils/intlUtils.js +0 -21
- package/dist/es/chat/shared/utils/lang/arrayUtils.js +0 -53
- package/dist/es/chat/shared/utils/lang/langUtils.js +0 -13
- package/dist/es/chat/shared/utils/lang/objectUtils.js +0 -19
- package/dist/es/chat/shared/utils/lang/promiseUtils.js +0 -25
- package/dist/es/chat/shared/utils/lang/uuid.js +0 -16
- package/dist/es/chat/shared/utils/languages.js +0 -156
- package/dist/es/chat/shared/utils/memoizerUtils.js +0 -38
- package/dist/es/chat/shared/utils/messageServiceUtils.js +0 -36
- package/dist/es/chat/shared/utils/resolvablePromise.js +0 -32
- package/dist/es/chat/shared/utils/styleUtils.js +0 -231
- package/dist/es/chat/shared/utils/timeUtils.js +0 -14
- package/dist/es/chat/shared/utils/viewStateUtils.js +0 -38
- package/dist/es/chat/web-components/components/chainOfThought/cds-aichat-chain-of-thought.js +0 -26
- package/dist/es/chat/web-components/components/chainOfThought/src/ChainOfThoughtElement.js +0 -130
- package/dist/es/chat/web-components/components/chainOfThought/src/chainOfThoughtElement.scss.js +0 -3
- package/dist/es/chat/web-components/components/chainOfThought/src/chainOfThoughtElement.template.js +0 -186
- package/dist/es/chat/web-components/components/chatHeader/chatHeaderAvatar/cds-aichat-chat-header-avatar.js +0 -26
- package/dist/es/chat/web-components/components/chatHeader/chatHeaderAvatar/src/chatHeaderAvatar.template.js +0 -32
- package/dist/es/chat/web-components/components/chatHeader/chatHeaderAvatar/src/chatHeaderAvatarElement.js +0 -52
- package/dist/es/chat/web-components/components/chatHeader/chatHeaderAvatar/src/chatHeaderAvatarElement.scss.js +0 -3
- package/dist/es/chat/web-components/components/chatHeader/chatHeaderLink/cds-aichat-chat-header-link.js +0 -44
- package/dist/es/chat/web-components/components/chatHeader/chatHeaderLink/src/chatHeaderLinkElement.template.js +0 -28
- package/dist/es/chat/web-components/components/chatHeader/chatHeaderTitle/cds-aichat-chat-header-title.js +0 -42
- package/dist/es/chat/web-components/components/chatHeader/chatHeaderTitle/src/chatHeaderTitle.scss.js +0 -3
- package/dist/es/chat/web-components/components/chatHeader/chatHeaderTitle/src/chatHeaderTitle.template.js +0 -20
- package/dist/es/chat/web-components/components/codeElement/cds-aichat-code.js +0 -66
- package/dist/es/chat/web-components/components/feedbackButtonsElement/cds-aichat-feedback-buttons.js +0 -26
- package/dist/es/chat/web-components/components/feedbackButtonsElement/src/FeedbackButtonsElement.js +0 -93
- package/dist/es/chat/web-components/components/feedbackButtonsElement/src/feedbackButtonsElement.scss.js +0 -3
- package/dist/es/chat/web-components/components/feedbackButtonsElement/src/feedbackButtonsElement.template.js +0 -84
- package/dist/es/chat/web-components/components/feedbackElement/cds-aichat-feedback.js +0 -30
- package/dist/es/chat/web-components/components/feedbackElement/src/FeedbackElement.js +0 -157
- package/dist/es/chat/web-components/components/feedbackElement/src/feedbackElement.scss.js +0 -3
- package/dist/es/chat/web-components/components/feedbackElement/src/feedbackElement.template.js +0 -95
- package/dist/es/chat/web-components/components/inlineLoadingElement/cds-aichat-inline-loading.js +0 -85
- package/dist/es/chat/web-components/components/inlineLoadingElement/src/styles.scss.js +0 -3
- package/dist/es/chat/web-components/components/markdownText/cds-aichat-markdown-text.js +0 -32
- package/dist/es/chat/web-components/components/markdownText/markdown/markdownToHTML.js +0 -28
- package/dist/es/chat/web-components/components/markdownText/markdown/utils/renderTokenTree.js +0 -191
- package/dist/es/chat/web-components/components/markdownText/markdown/workers/workerManager.js +0 -16
- package/dist/es/chat/web-components/components/markdownText/src/MarkdownElement.js +0 -70
- package/dist/es/chat/web-components/components/markdownText/src/markdownElement.template.js +0 -19
- package/dist/es/chat/web-components/components/roundedButton/cds-aichat-rounded-button.js +0 -29
- package/dist/es/chat/web-components/components/stopStreamingButton/cds-aichat-stop-streaming-button.js +0 -26
- package/dist/es/chat/web-components/components/stopStreamingButton/src/StopStreamingButtonElement.js +0 -49
- package/dist/es/chat/web-components/components/stopStreamingButton/src/stopStreamingButton.scss.js +0 -3
- package/dist/es/chat/web-components/components/stopStreamingButton/src/stopStreamingButton.template.js +0 -44
- package/dist/es/chat/web-components/components/table/cds-aichat-table.js +0 -229
- package/dist/es/chat/web-components/components/table/src/table.scss.js +0 -3
- package/dist/es/chat/web-components/components/table/src/table.template.js +0 -81
- package/dist/es/chat/web-components/components/table/src/tablePagination.template.js +0 -43
- package/dist/es/chat/web-components/components/table/src/tableSkeleton.template.js +0 -17
- package/dist/es/chat/web-components/components/tagListElement/cds-aichat-tag-list.js +0 -28
- package/dist/es/chat/web-components/components/tagListElement/src/TagListElement.js +0 -70
- package/dist/es/chat/web-components/components/tagListElement/src/tagListElement.scss.js +0 -3
- package/dist/es/chat/web-components/components/tagListElement/src/tagListElement.template.js +0 -40
- package/dist/es/chat/web-components/decorators/customElement.js +0 -33
- package/dist/es/chat/web-components/internal/cds-aichat-internal.js +0 -78
- package/dist/es/chat/web-components/settings.js +0 -13
- package/dist/es/node_modules/@carbon/colors/es/index.js +0 -11
- package/dist/es/react/ChatContainer.js +0 -162
- package/dist/es/react/ChatCustomElement.js +0 -58
- package/dist/es/types/config/ChatHeaderConfig.js +0 -18
- package/dist/es/types/config/CornersType.js +0 -16
- package/dist/es/types/config/LauncherConfig.js +0 -19
- package/dist/es/types/config/PublicConfig.js +0 -36
- package/dist/es/types/instance/ChatInstance.js +0 -31
- package/dist/es/types/instance/apiTypes.js +0 -33
- package/dist/es/types/messaging/LocalMessageItem.js +0 -18
- package/dist/es/types/state/AppState.js +0 -18
- package/dist/es/types/utilities/Animation.js +0 -31
- package/dist/es/types/utilities/HasAddRemoveClassName.js +0 -27
- /package/dist/es/{chat/shared/styles/export.carbon.scss.js → chat.export.carbon.js} +0 -0
- /package/dist/es/{chat/shared/styles/export.scss.js → chat.export.js} +0 -0
- /package/dist/es/{chat/web-components/components/markdownText/markdown/utils/markdown.js → chat.markdown.js} +0 -0
- /package/dist/es/{chat/web-components/components/markdownText/markdown/utils/tokenTree.js → chat.tokenTree.js} +0 -0
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import cloneDeep from "lodash-es/cloneDeep.js";
|
|
2
|
-
|
|
3
|
-
import { asyncForEach, asArray } from "../utils/lang/arrayUtils.js";
|
|
4
|
-
|
|
5
|
-
import { debugStackTrace, consoleError, consoleLog, consoleWarn, isEnableDebugLog, debugLog } from "../utils/miscUtils.js";
|
|
6
|
-
|
|
7
|
-
import { resolvablePromise } from "../utils/resolvablePromise.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
|
-
*/ const HANDLER_NOT_FUNCTION = "The event handler is not a function.";
|
|
17
|
-
|
|
18
|
-
class EventBus {
|
|
19
|
-
constructor() {
|
|
20
|
-
this.handlersByType = new Map;
|
|
21
|
-
this.eventsTypesRunning = new Set;
|
|
22
|
-
this.eventsRunningCount = 0;
|
|
23
|
-
}
|
|
24
|
-
async fire(busEvent, instance) {
|
|
25
|
-
logEvent("Before fire", busEvent);
|
|
26
|
-
const {type: type} = busEvent;
|
|
27
|
-
if (!type) {
|
|
28
|
-
throw new Error(`Attempted to fire an event with no type! ${JSON.stringify(busEvent)}`);
|
|
29
|
-
}
|
|
30
|
-
function wrappedHandler(handler) {
|
|
31
|
-
const result = handler(busEvent, instance);
|
|
32
|
-
if (result && !(result instanceof Promise)) {
|
|
33
|
-
consoleWarn(`An event handler for event ${type} returned a non-promise. This might be a mistake.`, result);
|
|
34
|
-
}
|
|
35
|
-
return result;
|
|
36
|
-
}
|
|
37
|
-
if (this.eventsTypesRunning.has(type)) {
|
|
38
|
-
throw new Error(`An event of type ${type} is already running. Please make sure that you have resolved the Promises for any earlier events that were fired.`);
|
|
39
|
-
}
|
|
40
|
-
try {
|
|
41
|
-
this.eventsRunningCount++;
|
|
42
|
-
try {
|
|
43
|
-
this.eventsTypesRunning.add(type);
|
|
44
|
-
const handlersForType = this.handlersByType.get(type);
|
|
45
|
-
if (handlersForType && handlersForType.length) {
|
|
46
|
-
const handlersCopy = handlersForType.slice();
|
|
47
|
-
await asyncForEach(handlersCopy, wrappedHandler);
|
|
48
|
-
}
|
|
49
|
-
} finally {
|
|
50
|
-
this.eventsTypesRunning.delete(type);
|
|
51
|
-
}
|
|
52
|
-
} finally {
|
|
53
|
-
this.eventsRunningCount--;
|
|
54
|
-
if (this.waitForEmptyPromise && this.eventsRunningCount === 0) {
|
|
55
|
-
this.waitForEmptyPromise.doResolve();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
logEvent("After fire", busEvent);
|
|
59
|
-
}
|
|
60
|
-
fireSync(busEvent, instance) {
|
|
61
|
-
logEvent("Before fire", busEvent);
|
|
62
|
-
const {type: type} = busEvent;
|
|
63
|
-
const handlersForType = this.handlersByType.get(type);
|
|
64
|
-
if (handlersForType && handlersForType.length) {
|
|
65
|
-
const handlersCopy = handlersForType.slice();
|
|
66
|
-
handlersCopy.forEach(handler => handler(busEvent, instance));
|
|
67
|
-
}
|
|
68
|
-
logEvent("After fire", busEvent);
|
|
69
|
-
}
|
|
70
|
-
async waitForEmpty() {
|
|
71
|
-
if (this.eventsRunningCount === 0) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if (!this.waitForEmptyPromise) {
|
|
75
|
-
this.waitForEmptyPromise = resolvablePromise();
|
|
76
|
-
}
|
|
77
|
-
await this.waitForEmptyPromise;
|
|
78
|
-
this.waitForEmptyPromise = null;
|
|
79
|
-
}
|
|
80
|
-
on(handlers) {
|
|
81
|
-
const data = asArray(handlers);
|
|
82
|
-
data.forEach(({type: type, handler: handler}) => {
|
|
83
|
-
if (!type) {
|
|
84
|
-
throw new Error(`Attempted to listen to an event with no type: "${type}"!`);
|
|
85
|
-
}
|
|
86
|
-
if (typeof handler === "function") {
|
|
87
|
-
if (!this.handlersByType.has(type)) {
|
|
88
|
-
this.handlersByType.set(type, []);
|
|
89
|
-
}
|
|
90
|
-
const handlersForType = this.handlersByType.get(type);
|
|
91
|
-
debugStackTrace(`[EventBus] Adding ${type} event handler`, handler);
|
|
92
|
-
handlersForType.push(handler);
|
|
93
|
-
} else {
|
|
94
|
-
consoleError(HANDLER_NOT_FUNCTION, handler);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
return this;
|
|
98
|
-
}
|
|
99
|
-
off(handlers) {
|
|
100
|
-
const data = asArray(handlers);
|
|
101
|
-
data.forEach(({type: type, handler: handler}) => {
|
|
102
|
-
const handlersForType = this.handlersByType.get(type);
|
|
103
|
-
if (handlersForType) {
|
|
104
|
-
if (handler) {
|
|
105
|
-
const index = handlersForType.indexOf(handler);
|
|
106
|
-
if (index !== -1) {
|
|
107
|
-
const removed = handlersForType.splice(index, 1);
|
|
108
|
-
debugStackTrace(`[EventBus] Removing ${type} event handlers`, removed);
|
|
109
|
-
}
|
|
110
|
-
} else {
|
|
111
|
-
debugStackTrace(`[EventBus] Removing all ${type} event handlers`);
|
|
112
|
-
this.handlersByType.set(type, []);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
return this;
|
|
117
|
-
}
|
|
118
|
-
once(handlers) {
|
|
119
|
-
const data = asArray(handlers);
|
|
120
|
-
data.forEach(({type: type, handler: handler}) => {
|
|
121
|
-
if (typeof handler === "function") {
|
|
122
|
-
const onceHandler = (event, instance) => {
|
|
123
|
-
this.off({
|
|
124
|
-
type: type,
|
|
125
|
-
handler: onceHandler
|
|
126
|
-
});
|
|
127
|
-
return handler(event, instance);
|
|
128
|
-
};
|
|
129
|
-
this.on({
|
|
130
|
-
type: type,
|
|
131
|
-
handler: onceHandler
|
|
132
|
-
});
|
|
133
|
-
} else {
|
|
134
|
-
consoleError(HANDLER_NOT_FUNCTION, handler);
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
return this;
|
|
138
|
-
}
|
|
139
|
-
logListeners() {
|
|
140
|
-
this.handlersByType.forEach((listeners, type) => {
|
|
141
|
-
console.group(`Event ${type} (${listeners.length})`);
|
|
142
|
-
listeners.forEach(listener => {
|
|
143
|
-
consoleLog("Listener", listener);
|
|
144
|
-
});
|
|
145
|
-
console.groupEnd();
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
clear() {
|
|
149
|
-
this.handlersByType.clear();
|
|
150
|
-
return this;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function logEvent(message, busEvent) {
|
|
155
|
-
if (isEnableDebugLog()) {
|
|
156
|
-
const eventCopy = cloneDeep(busEvent);
|
|
157
|
-
debugLog(`[EventBus] ${message}`, eventCopy);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export { EventBus };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from "react";
|
|
2
|
-
|
|
3
|
-
import { AriaAnnouncerContext } from "../contexts/AriaAnnouncerContext.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 withAriaAnnouncer(Component) {
|
|
13
|
-
const Wrapped = React.forwardRef((props, ref) => {
|
|
14
|
-
const ariaAnnouncer = useContext(AriaAnnouncerContext);
|
|
15
|
-
return React.createElement(Component, {
|
|
16
|
-
...props,
|
|
17
|
-
ref: ref,
|
|
18
|
-
ariaAnnouncer: ariaAnnouncer
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
Wrapped.displayName = `withAriaAnnouncer(${Component.displayName || Component.name || "Component"})`;
|
|
22
|
-
return Wrapped;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { withAriaAnnouncer };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from "react";
|
|
2
|
-
|
|
3
|
-
import { ServiceManagerContext } from "../contexts/ServiceManagerContext.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 withServiceManager(Component) {
|
|
13
|
-
const Wrapped = React.forwardRef((props, ref) => {
|
|
14
|
-
const serviceManager = useContext(ServiceManagerContext);
|
|
15
|
-
return React.createElement(Component, {
|
|
16
|
-
...props,
|
|
17
|
-
ref: ref,
|
|
18
|
-
serviceManager: serviceManager
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
Wrapped.displayName = `withServiceManager(${Component.displayName || Component.name || "Component"})`;
|
|
22
|
-
return Wrapped;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { ServiceManagerContext, withServiceManager };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useContext } from "react";
|
|
2
|
-
|
|
3
|
-
import { AriaAnnouncerContext } from "../contexts/AriaAnnouncerContext.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 useAriaAnnouncer() {
|
|
13
|
-
return useContext(AriaAnnouncerContext);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { useAriaAnnouncer };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
|
|
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
|
-
* @license
|
|
10
|
-
*/ const useDynamicCSSProperties = styles => useMemo(() => {
|
|
11
|
-
const customProperties = {};
|
|
12
|
-
Object.entries(styles).forEach(([key, value]) => {
|
|
13
|
-
if (value !== undefined && value !== null) {
|
|
14
|
-
const kebabKey = key.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`);
|
|
15
|
-
customProperties[`--${kebabKey}`] = value;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
return customProperties;
|
|
19
|
-
}, [ styles ]);
|
|
20
|
-
|
|
21
|
-
export { useDynamicCSSProperties };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import debounce from "lodash-es/debounce.js";
|
|
2
|
-
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
|
|
5
|
-
import { usePrevious } from "./usePrevious.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 useCallbackOnChange(value, callback) {
|
|
15
|
-
const doDebounced = useMemo(() => callback && debounce(callback, 100, {
|
|
16
|
-
maxWait: 100,
|
|
17
|
-
leading: true
|
|
18
|
-
}), [ callback ]);
|
|
19
|
-
if (usePrevious(value) !== value && callback) {
|
|
20
|
-
setTimeout(doDebounced);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { useCallbackOnChange };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from "react";
|
|
2
|
-
|
|
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
|
-
* @license
|
|
10
|
-
*/ function useEffectDidUpdate(effect, deps) {
|
|
11
|
-
const hasRunRef = useRef(false);
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
if (hasRunRef.current) {
|
|
14
|
-
return effect();
|
|
15
|
-
}
|
|
16
|
-
hasRunRef.current = true;
|
|
17
|
-
return undefined;
|
|
18
|
-
}, deps);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { useEffectDidUpdate };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useContext } from "react";
|
|
2
|
-
|
|
3
|
-
import { LanguagePackContext } from "../contexts/LanguagePackContext.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 useLanguagePack() {
|
|
13
|
-
return useContext(LanguagePackContext);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { useLanguagePack };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from "react";
|
|
2
|
-
|
|
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
|
-
* @license
|
|
10
|
-
*/ function usePrevious(value) {
|
|
11
|
-
const ref = useRef();
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
ref.current = value;
|
|
14
|
-
});
|
|
15
|
-
return ref.current;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { usePrevious };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useContext } from "react";
|
|
2
|
-
|
|
3
|
-
import { ServiceManagerContext } from "../contexts/ServiceManagerContext.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 useServiceManager() {
|
|
13
|
-
return useContext(ServiceManagerContext);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { useServiceManager };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useSelector } from "react-redux";
|
|
2
|
-
|
|
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
|
-
* @license
|
|
10
|
-
*/ function useShouldSanitizeHTML() {
|
|
11
|
-
const config = useSelector(state => state.config.public);
|
|
12
|
-
return Boolean(config.shouldSanitizeHTML);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { useShouldSanitizeHTML };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useRef } from "react";
|
|
2
|
-
|
|
3
|
-
import { uuid } from "../utils/lang/uuid.js";
|
|
4
|
-
|
|
5
|
-
import { UUIDType } from "../utils/lang/UUIDType.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 useUUID() {
|
|
15
|
-
const ref = useRef();
|
|
16
|
-
if (ref.current === undefined) {
|
|
17
|
-
ref.current = uuid(UUIDType.COMPONENT);
|
|
18
|
-
}
|
|
19
|
-
return ref.current;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { useUUID };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useContext } from "react";
|
|
2
|
-
|
|
3
|
-
import { WindowSizeContext } from "../contexts/WindowSizeContext.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 useWindowSize() {
|
|
13
|
-
return useContext(WindowSizeContext);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { useWindowSize };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { ChatActionsImpl } from "./events/ChatActionsImpl.js";
|
|
2
|
-
|
|
3
|
-
import { EventBus } from "./events/EventBus.js";
|
|
4
|
-
|
|
5
|
-
import { createCustomPanelManager } from "./services/CustomPanelManager.js";
|
|
6
|
-
|
|
7
|
-
import { HistoryService } from "./services/HistoryService.js";
|
|
8
|
-
|
|
9
|
-
import MessageService from "./services/MessageService.js";
|
|
10
|
-
|
|
11
|
-
import { NamespaceService } from "./services/NamespaceService.js";
|
|
12
|
-
|
|
13
|
-
import { ServiceManager } from "./services/ServiceManager.js";
|
|
14
|
-
|
|
15
|
-
import { UserSessionStorageService } from "./services/UserSessionStorageService.js";
|
|
16
|
-
|
|
17
|
-
import { doCreateStore } from "./store/doCreateStore.js";
|
|
18
|
-
|
|
19
|
-
import { copyToSessionStorage, createHandleWindowTitle } from "./store/subscriptions.js";
|
|
20
|
-
|
|
21
|
-
import "./utils/constants.js";
|
|
22
|
-
|
|
23
|
-
import { setEnableDebugLog, setEnableDebugStackTracesLog } from "./utils/miscUtils.js";
|
|
24
|
-
|
|
25
|
-
import { setIntl } from "./utils/intlUtils.js";
|
|
26
|
-
|
|
27
|
-
import { WriteableElementName } from "../../types/instance/ChatInstance.js";
|
|
28
|
-
|
|
29
|
-
/*
|
|
30
|
-
* Copyright IBM Corp. 2025
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*
|
|
35
|
-
* @license
|
|
36
|
-
*/ async function createServiceManager(appConfig, additionalChatParameters) {
|
|
37
|
-
const publicConfig = appConfig.public;
|
|
38
|
-
const serviceManager = new ServiceManager;
|
|
39
|
-
serviceManager.additionalChatParameters = additionalChatParameters;
|
|
40
|
-
serviceManager.namespace = new NamespaceService(publicConfig.namespace);
|
|
41
|
-
serviceManager.userSessionStorageService = new UserSessionStorageService(serviceManager);
|
|
42
|
-
serviceManager.actions = new ChatActionsImpl(serviceManager);
|
|
43
|
-
serviceManager.eventBus = new EventBus;
|
|
44
|
-
serviceManager.store = doCreateStore(appConfig, serviceManager);
|
|
45
|
-
serviceManager.historyService = new HistoryService(serviceManager);
|
|
46
|
-
serviceManager.messageService = new MessageService(serviceManager, publicConfig);
|
|
47
|
-
serviceManager.store.subscribe(copyToSessionStorage(serviceManager));
|
|
48
|
-
if (!publicConfig.disableWindowTitleChanges) {
|
|
49
|
-
serviceManager.store.subscribe(createHandleWindowTitle(serviceManager));
|
|
50
|
-
}
|
|
51
|
-
serviceManager.customPanelManager = createCustomPanelManager(serviceManager);
|
|
52
|
-
setIntl(serviceManager, serviceManager.store.getState().locale, serviceManager.store.getState().languagePack);
|
|
53
|
-
serviceManager.writeableElements = {
|
|
54
|
-
[WriteableElementName.AI_TOOLTIP_AFTER_DESCRIPTION_ELEMENT]: document.createElement("div"),
|
|
55
|
-
[WriteableElementName.WELCOME_NODE_BEFORE_ELEMENT]: document.createElement("div"),
|
|
56
|
-
[WriteableElementName.HEADER_BOTTOM_ELEMENT]: document.createElement("div"),
|
|
57
|
-
[WriteableElementName.BEFORE_INPUT_ELEMENT]: document.createElement("div"),
|
|
58
|
-
[WriteableElementName.HOME_SCREEN_HEADER_BOTTOM_ELEMENT]: document.createElement("div"),
|
|
59
|
-
[WriteableElementName.HOME_SCREEN_AFTER_STARTERS_ELEMENT]: document.createElement("div"),
|
|
60
|
-
[WriteableElementName.HOME_SCREEN_BEFORE_INPUT_ELEMENT]: document.createElement("div"),
|
|
61
|
-
[WriteableElementName.CUSTOM_PANEL_ELEMENT]: document.createElement("div")
|
|
62
|
-
};
|
|
63
|
-
if (publicConfig.debug) {
|
|
64
|
-
setEnableDebugLog(true);
|
|
65
|
-
}
|
|
66
|
-
if (publicConfig.debugStackTraces) {
|
|
67
|
-
setEnableDebugStackTracesLog(true);
|
|
68
|
-
}
|
|
69
|
-
return serviceManager;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export { createServiceManager };
|