@messenger-box/tailwind-ui-inbox 10.0.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/jest.config.js +9 -0
- package/lib/cdm-locales/en/translations.json +31 -0
- package/lib/cdm-locales/es/translations.json +31 -0
- package/lib/components/AIAgent/AIAgent.d.ts +32 -0
- package/lib/components/AIAgent/AIAgent.d.ts.map +1 -0
- package/lib/components/AIAgent/AIAgent.js +1135 -0
- package/lib/components/AIAgent/AIAgent.js.map +1 -0
- package/lib/components/AIAgent/InputComponent.d.ts +84 -0
- package/lib/components/AIAgent/InputComponent.d.ts.map +1 -0
- package/lib/components/AIAgent/InputComponent.js +417 -0
- package/lib/components/AIAgent/InputComponent.js.map +1 -0
- package/lib/components/AIAgent/index.d.ts +2 -0
- package/lib/components/AIAgent/index.d.ts.map +1 -0
- package/lib/components/InboxMessage/CommonMessage.d.ts +8 -0
- package/lib/components/InboxMessage/CommonMessage.d.ts.map +1 -0
- package/lib/components/InboxMessage/CommonMessage.js +35 -0
- package/lib/components/InboxMessage/CommonMessage.js.map +1 -0
- package/lib/components/InboxMessage/ConversationItem.d.ts +14 -0
- package/lib/components/InboxMessage/ConversationItem.d.ts.map +1 -0
- package/lib/components/InboxMessage/ConversationItem.js +200 -0
- package/lib/components/InboxMessage/ConversationItem.js.map +1 -0
- package/lib/components/InboxMessage/InputComponent.d.ts +20 -0
- package/lib/components/InboxMessage/InputComponent.d.ts.map +1 -0
- package/lib/components/InboxMessage/InputComponent.js +148 -0
- package/lib/components/InboxMessage/InputComponent.js.map +1 -0
- package/lib/components/InboxMessage/LeftSidebar.d.ts +20 -0
- package/lib/components/InboxMessage/LeftSidebar.d.ts.map +1 -0
- package/lib/components/InboxMessage/LeftSidebar.js +102 -0
- package/lib/components/InboxMessage/LeftSidebar.js.map +1 -0
- package/lib/components/InboxMessage/MessageInput.d.ts +9 -0
- package/lib/components/InboxMessage/MessageInput.d.ts.map +1 -0
- package/lib/components/InboxMessage/MessageInput.js +154 -0
- package/lib/components/InboxMessage/MessageInput.js.map +1 -0
- package/lib/components/InboxMessage/MessageInputComponent.d.ts +9 -0
- package/lib/components/InboxMessage/MessageInputComponent.d.ts.map +1 -0
- package/lib/components/InboxMessage/Messages.d.ts +17 -0
- package/lib/components/InboxMessage/Messages.d.ts.map +1 -0
- package/lib/components/InboxMessage/Messages.js +99 -0
- package/lib/components/InboxMessage/Messages.js.map +1 -0
- package/lib/components/InboxMessage/MessagesBuilderUi.d.ts +17 -0
- package/lib/components/InboxMessage/MessagesBuilderUi.d.ts.map +1 -0
- package/lib/components/InboxMessage/Popover.d.ts +3 -0
- package/lib/components/InboxMessage/Popover.d.ts.map +1 -0
- package/lib/components/InboxMessage/Popover.js +31 -0
- package/lib/components/InboxMessage/Popover.js.map +1 -0
- package/lib/components/InboxMessage/RightSidebar.d.ts +9 -0
- package/lib/components/InboxMessage/RightSidebar.d.ts.map +1 -0
- package/lib/components/InboxMessage/RightSidebar.js +9 -0
- package/lib/components/InboxMessage/RightSidebar.js.map +1 -0
- package/lib/components/InboxMessage/RightSidebarAi.d.ts +37 -0
- package/lib/components/InboxMessage/RightSidebarAi.d.ts.map +1 -0
- package/lib/components/InboxMessage/RightSidebarAi.js +9 -0
- package/lib/components/InboxMessage/RightSidebarAi.js.map +1 -0
- package/lib/components/InboxMessage/ServiceConversationItem.d.ts +12 -0
- package/lib/components/InboxMessage/ServiceConversationItem.d.ts.map +1 -0
- package/lib/components/InboxMessage/ServiceConversationItem.js +185 -0
- package/lib/components/InboxMessage/ServiceConversationItem.js.map +1 -0
- package/lib/components/InboxMessage/ServiceInboxItem.d.ts +12 -0
- package/lib/components/InboxMessage/ServiceInboxItem.d.ts.map +1 -0
- package/lib/components/InboxMessage/ServiceInboxItem.js +182 -0
- package/lib/components/InboxMessage/ServiceInboxItem.js.map +1 -0
- package/lib/components/InboxMessage/StreamingMessageBubble.d.ts +18 -0
- package/lib/components/InboxMessage/StreamingMessageBubble.d.ts.map +1 -0
- package/lib/components/InboxMessage/SubscriptionHandler.d.ts +19 -0
- package/lib/components/InboxMessage/SubscriptionHandler.d.ts.map +1 -0
- package/lib/components/InboxMessage/SubscriptionHandler.js +41 -0
- package/lib/components/InboxMessage/SubscriptionHandler.js.map +1 -0
- package/lib/components/InboxMessage/TypingIndicator.d.ts +11 -0
- package/lib/components/InboxMessage/TypingIndicator.d.ts.map +1 -0
- package/lib/components/InboxMessage/UploadImageButton.d.ts +7 -0
- package/lib/components/InboxMessage/UploadImageButton.d.ts.map +1 -0
- package/lib/components/InboxMessage/UploadImageButton.js +30 -0
- package/lib/components/InboxMessage/UploadImageButton.js.map +1 -0
- package/lib/components/InboxMessage/UserModalContent.d.ts +3 -0
- package/lib/components/InboxMessage/UserModalContent.d.ts.map +1 -0
- package/lib/components/InboxMessage/UserModalContent.js +60 -0
- package/lib/components/InboxMessage/UserModalContent.js.map +1 -0
- package/lib/components/InboxMessage/index.d.ts +19 -0
- package/lib/components/InboxMessage/index.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/CommonMessage.d.ts +11 -0
- package/lib/components/InboxMessage/message-widgets/CommonMessage.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/CommonMessage.js +44 -0
- package/lib/components/InboxMessage/message-widgets/CommonMessage.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/ErrorFixCard.d.ts +10 -0
- package/lib/components/InboxMessage/message-widgets/ErrorFixCard.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/ErrorFixCard.js +194 -0
- package/lib/components/InboxMessage/message-widgets/ErrorFixCard.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/MessageCard.d.ts +8 -0
- package/lib/components/InboxMessage/message-widgets/MessageCard.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.d.ts +12 -0
- package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.js +37 -0
- package/lib/components/InboxMessage/message-widgets/MessageSliceRenderer.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.d.ts +42 -0
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.js +1339 -0
- package/lib/components/InboxMessage/message-widgets/ModernMessageGroup.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/PlainMessage.d.ts +8 -0
- package/lib/components/InboxMessage/message-widgets/PlainMessage.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/PlainMessage.js +14 -0
- package/lib/components/InboxMessage/message-widgets/PlainMessage.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/PropertyMessageWidget.d.ts +9 -0
- package/lib/components/InboxMessage/message-widgets/PropertyMessageWidget.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.d.ts +14 -0
- package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.d.ts.map +1 -0
- package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.js +333 -0
- package/lib/components/InboxMessage/message-widgets/SlackLikeMessageGroup.js.map +1 -0
- package/lib/components/InboxMessage/message-widgets/index.d.ts +4 -0
- package/lib/components/InboxMessage/message-widgets/index.d.ts.map +1 -0
- package/lib/components/ModelConfigPanel.d.ts +74 -0
- package/lib/components/ModelConfigPanel.d.ts.map +1 -0
- package/lib/components/ModelConfigPanel.js +1152 -0
- package/lib/components/ModelConfigPanel.js.map +1 -0
- package/lib/components/filler-components/RightSiderBar.d.ts +3 -0
- package/lib/components/filler-components/RightSiderBar.d.ts.map +1 -0
- package/lib/components/filler-components/RightSiderBar.js +532 -0
- package/lib/components/filler-components/RightSiderBar.js.map +1 -0
- package/lib/components/inbox/FilesList.d.ts +20 -0
- package/lib/components/inbox/FilesList.d.ts.map +1 -0
- package/lib/components/inbox/FilesList.js +68 -0
- package/lib/components/inbox/FilesList.js.map +1 -0
- package/lib/components/inbox/MessageItem.d.ts +17 -0
- package/lib/components/inbox/MessageItem.d.ts.map +1 -0
- package/lib/components/inbox/MessageItem.js +50 -0
- package/lib/components/inbox/MessageItem.js.map +1 -0
- package/lib/components/inbox/ThreadItem.d.ts +11 -0
- package/lib/components/inbox/ThreadItem.d.ts.map +1 -0
- package/lib/components/inbox/ThreadItem.js +147 -0
- package/lib/components/inbox/ThreadItem.js.map +1 -0
- package/lib/components/inbox/index.d.ts +4 -0
- package/lib/components/inbox/index.d.ts.map +1 -0
- package/lib/components/index.d.ts +10 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/live-code-editor/hybrid-live-editor.d.ts +20 -0
- package/lib/components/live-code-editor/hybrid-live-editor.d.ts.map +1 -0
- package/lib/components/live-code-editor/index.d.ts +4 -0
- package/lib/components/live-code-editor/index.d.ts.map +1 -0
- package/lib/components/live-code-editor/live-code-editor.d.ts +14 -0
- package/lib/components/live-code-editor/live-code-editor.d.ts.map +1 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.d.ts +81 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.d.ts.map +1 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.js +77 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.js.map +1 -0
- package/lib/components/messages-container-ui/PlanModeView.d.ts +82 -0
- package/lib/components/messages-container-ui/PlanModeView.d.ts.map +1 -0
- package/lib/components/messages-container-ui/PlanModeView.js +267 -0
- package/lib/components/messages-container-ui/PlanModeView.js.map +1 -0
- package/lib/components/messages-container-ui/index.d.ts +6 -0
- package/lib/components/messages-container-ui/index.d.ts.map +1 -0
- package/lib/components/messages-container-ui/types.d.ts +38 -0
- package/lib/components/messages-container-ui/types.d.ts.map +1 -0
- package/lib/components/slot-fill/chat-message-filler.d.ts +4 -0
- package/lib/components/slot-fill/chat-message-filler.d.ts.map +1 -0
- package/lib/components/slot-fill/chat-message-filler.js +5 -0
- package/lib/components/slot-fill/chat-message-filler.js.map +1 -0
- package/lib/components/slot-fill/chat-message-slot.d.ts +11 -0
- package/lib/components/slot-fill/chat-message-slot.d.ts.map +1 -0
- package/lib/components/slot-fill/chat-message-slot.js +6 -0
- package/lib/components/slot-fill/chat-message-slot.js.map +1 -0
- package/lib/components/slot-fill/index.d.ts +4 -0
- package/lib/components/slot-fill/index.d.ts.map +1 -0
- package/lib/components/slot-fill/right-sidebar-filler.d.ts +4 -0
- package/lib/components/slot-fill/right-sidebar-filler.d.ts.map +1 -0
- package/lib/components/slot-fill/right-sidebar-filler.js +13 -0
- package/lib/components/slot-fill/right-sidebar-filler.js.map +1 -0
- package/lib/components/ui/button.d.ts +9 -0
- package/lib/components/ui/button.d.ts.map +1 -0
- package/lib/compute.d.ts +8 -0
- package/lib/compute.d.ts.map +1 -0
- package/lib/compute.js +264 -0
- package/lib/compute.js.map +1 -0
- package/lib/config/env-config.d.ts +20 -0
- package/lib/config/env-config.d.ts.map +1 -0
- package/lib/config/env-config.js +55 -0
- package/lib/config/env-config.js.map +1 -0
- package/lib/config/index.d.ts +2 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/constants/breakpoints.d.ts +8 -0
- package/lib/constants/breakpoints.d.ts.map +1 -0
- package/lib/constants/index.d.ts +3 -0
- package/lib/constants/index.d.ts.map +1 -0
- package/lib/container/AiInbox.d.ts +15 -0
- package/lib/container/AiInbox.d.ts.map +1 -0
- package/lib/container/AiInboxWithLoader.d.ts +36 -0
- package/lib/container/AiInboxWithLoader.d.ts.map +1 -0
- package/lib/container/AiLandingInput.d.ts +27 -0
- package/lib/container/AiLandingInput.d.ts.map +1 -0
- package/lib/container/AiLandingInput.js +149 -0
- package/lib/container/AiLandingInput.js.map +1 -0
- package/lib/container/Inbox.d.ts +15 -0
- package/lib/container/Inbox.d.ts.map +1 -0
- package/lib/container/Inbox.js +964 -0
- package/lib/container/Inbox.js.map +1 -0
- package/lib/container/InboxAiMessagesLoader.d.ts +45 -0
- package/lib/container/InboxAiMessagesLoader.d.ts.map +1 -0
- package/lib/container/InboxAiMessagesLoader.js +80 -0
- package/lib/container/InboxAiMessagesLoader.js.map +1 -0
- package/lib/container/InboxContainer.d.ts +41 -0
- package/lib/container/InboxContainer.d.ts.map +1 -0
- package/lib/container/InboxContainer.js +27 -0
- package/lib/container/InboxContainer.js.map +1 -0
- package/lib/container/InboxTemplate1.d.ts +15 -0
- package/lib/container/InboxTemplate1.d.ts.map +1 -0
- package/lib/container/InboxTemplate1WithLoader.d.ts +36 -0
- package/lib/container/InboxTemplate1WithLoader.d.ts.map +1 -0
- package/lib/container/InboxTemplate2.d.ts +15 -0
- package/lib/container/InboxTemplate2.d.ts.map +1 -0
- package/lib/container/InboxWithAiLoader.d.ts +47 -0
- package/lib/container/InboxWithAiLoader.d.ts.map +1 -0
- package/lib/container/InboxWithAiLoader.js +118 -0
- package/lib/container/InboxWithAiLoader.js.map +1 -0
- package/lib/container/InboxWithLoader.d.ts +36 -0
- package/lib/container/InboxWithLoader.d.ts.map +1 -0
- package/lib/container/InboxWithLoader.js +277 -0
- package/lib/container/InboxWithLoader.js.map +1 -0
- package/lib/container/ServiceInbox.d.ts +9 -0
- package/lib/container/ServiceInbox.d.ts.map +1 -0
- package/lib/container/ServiceInbox.js +141 -0
- package/lib/container/ServiceInbox.js.map +1 -0
- package/lib/container/TestInboxWithAiLoader.d.ts +7 -0
- package/lib/container/TestInboxWithAiLoader.d.ts.map +1 -0
- package/lib/container/TestInboxWithAiLoader.js +135 -0
- package/lib/container/TestInboxWithAiLoader.js.map +1 -0
- package/lib/container/ThreadMessages.d.ts +13 -0
- package/lib/container/ThreadMessages.d.ts.map +1 -0
- package/lib/container/ThreadMessages.js +320 -0
- package/lib/container/ThreadMessages.js.map +1 -0
- package/lib/container/ThreadMessagesInbox.d.ts +14 -0
- package/lib/container/ThreadMessagesInbox.d.ts.map +1 -0
- package/lib/container/ThreadMessagesInbox.js +347 -0
- package/lib/container/ThreadMessagesInbox.js.map +1 -0
- package/lib/container/Threads.d.ts +8 -0
- package/lib/container/Threads.d.ts.map +1 -0
- package/lib/container/Threads.js +231 -0
- package/lib/container/Threads.js.map +1 -0
- package/lib/container/ThreadsInbox.d.ts +21 -0
- package/lib/container/ThreadsInbox.d.ts.map +1 -0
- package/lib/container/ThreadsInbox.js +243 -0
- package/lib/container/ThreadsInbox.js.map +1 -0
- package/lib/container/apply-footer-styles.d.ts +2 -0
- package/lib/container/apply-footer-styles.d.ts.map +1 -0
- package/lib/container/apply-footer-styles.js +16 -0
- package/lib/container/apply-footer-styles.js.map +1 -0
- package/lib/container/index.d.ts +13 -0
- package/lib/container/index.d.ts.map +1 -0
- package/lib/enums/index.d.ts +2 -0
- package/lib/enums/index.d.ts.map +1 -0
- package/lib/enums/messenger-slot-fill-name-enum.d.ts +11 -0
- package/lib/enums/messenger-slot-fill-name-enum.d.ts.map +1 -0
- package/lib/enums/messenger-slot-fill-name-enum.js +11 -0
- package/lib/enums/messenger-slot-fill-name-enum.js.map +1 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/usePersistentModelConfig.d.ts +33 -0
- package/lib/hooks/usePersistentModelConfig.d.ts.map +1 -0
- package/lib/hooks/usePersistentModelConfig.js +123 -0
- package/lib/hooks/usePersistentModelConfig.js.map +1 -0
- package/lib/hooks/useStreamAssembler.d.ts +8 -0
- package/lib/hooks/useStreamAssembler.d.ts.map +1 -0
- package/lib/hooks/useTemplates.d.ts +14 -0
- package/lib/hooks/useTemplates.d.ts.map +1 -0
- package/lib/hooks/useTemplates.js +59 -0
- package/lib/hooks/useTemplates.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -0
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/interfaces/index.d.ts.map +1 -0
- package/lib/interfaces/message-widgets.interface.d.ts +21 -0
- package/lib/interfaces/message-widgets.interface.d.ts.map +1 -0
- package/lib/machines/aiAgentMachine.d.ts +3 -0
- package/lib/machines/aiAgentMachine.d.ts.map +1 -0
- package/lib/machines/aiAgentMachine.js +1083 -0
- package/lib/machines/aiAgentMachine.js.map +1 -0
- package/lib/machines/aiAgentMachine.simple.d.ts +3 -0
- package/lib/machines/aiAgentMachine.simple.d.ts.map +1 -0
- package/lib/machines/aiAgentMachine.simple.js +108 -0
- package/lib/machines/aiAgentMachine.simple.js.map +1 -0
- package/lib/machines/index.d.ts +3 -0
- package/lib/machines/index.d.ts.map +1 -0
- package/lib/machines/types.d.ts +77 -0
- package/lib/machines/types.d.ts.map +1 -0
- package/lib/module.d.ts +7 -0
- package/lib/module.d.ts.map +1 -0
- package/lib/module.js +26 -0
- package/lib/module.js.map +1 -0
- package/lib/routes.json +251 -0
- package/lib/styles/responsive.css +76 -0
- package/lib/templates/InboxWithAi.d.ts +44 -0
- package/lib/templates/InboxWithAi.d.ts.map +1 -0
- package/lib/templates/InboxWithAi.js +651 -0
- package/lib/templates/InboxWithAi.js.map +1 -0
- package/lib/templates/InboxWithAi.tsx +844 -0
- package/lib/templates/index.d.ts +2 -0
- package/lib/templates/index.d.ts.map +1 -0
- package/lib/templates/index.ts +1 -0
- package/lib/types/templates.d.ts +35 -0
- package/lib/types/templates.d.ts.map +1 -0
- package/lib/utils/utils.d.ts +2 -0
- package/lib/utils/utils.d.ts.map +1 -0
- package/lib/xstate/index.d.ts +3 -0
- package/lib/xstate/index.d.ts.map +1 -0
- package/lib/xstate/rightSidebar.machine.d.ts +4 -0
- package/lib/xstate/rightSidebar.machine.d.ts.map +1 -0
- package/lib/xstate/rightSidebar.types.d.ts +57 -0
- package/lib/xstate/rightSidebar.types.d.ts.map +1 -0
- package/package.json +69 -0
- package/rollup.config.mjs +47 -0
- package/src/cdm-locales/en/translations.json +31 -0
- package/src/cdm-locales/es/translations.json +31 -0
- package/src/components/AIAgent/AIAgent.tsx +1468 -0
- package/src/components/AIAgent/AIAgent.tsx.bk +1365 -0
- package/src/components/AIAgent/InputComponent.tsx +608 -0
- package/src/components/AIAgent/README.md +174 -0
- package/src/components/AIAgent/index.ts +1 -0
- package/src/components/InboxMessage/CommonMessage.tsx +40 -0
- package/src/components/InboxMessage/ConversationItem.tsx +255 -0
- package/src/components/InboxMessage/InputComponent.tsx +198 -0
- package/src/components/InboxMessage/LeftSidebar.tsx +140 -0
- package/src/components/InboxMessage/MessageInput.tsx +209 -0
- package/src/components/InboxMessage/MessageInputComponent.tsx +245 -0
- package/src/components/InboxMessage/Messages.tsx +137 -0
- package/src/components/InboxMessage/MessagesBuilderUi.tsx +205 -0
- package/src/components/InboxMessage/Popover.tsx +42 -0
- package/src/components/InboxMessage/RightSidebar.tsx +22 -0
- package/src/components/InboxMessage/RightSidebarAi.tsx +47 -0
- package/src/components/InboxMessage/ServiceConversationItem.tsx +234 -0
- package/src/components/InboxMessage/ServiceInboxItem.tsx +223 -0
- package/src/components/InboxMessage/StreamingMessageBubble.tsx +270 -0
- package/src/components/InboxMessage/SubscriptionHandler.tsx +55 -0
- package/src/components/InboxMessage/TypingIndicator.tsx +38 -0
- package/src/components/InboxMessage/UploadImageButton.tsx +46 -0
- package/src/components/InboxMessage/UserModalContent.tsx +60 -0
- package/src/components/InboxMessage/index.ts +18 -0
- package/src/components/InboxMessage/message-widgets/CommonMessage.tsx +69 -0
- package/src/components/InboxMessage/message-widgets/ErrorFixCard.tsx +239 -0
- package/src/components/InboxMessage/message-widgets/MessageCard.tsx +127 -0
- package/src/components/InboxMessage/message-widgets/MessageSliceRenderer.tsx +40 -0
- package/src/components/InboxMessage/message-widgets/ModernMessageGroup.tsx +1733 -0
- package/src/components/InboxMessage/message-widgets/PlainMessage.tsx +18 -0
- package/src/components/InboxMessage/message-widgets/PropertyMessageWidget.tsx +29 -0
- package/src/components/InboxMessage/message-widgets/SlackLikeMessageGroup.tsx +492 -0
- package/src/components/InboxMessage/message-widgets/index.ts +8 -0
- package/src/components/ModelConfigPanel.tsx +1357 -0
- package/src/components/filler-components/RightSiderBar.tsx +572 -0
- package/src/components/inbox/FilesList.tsx +89 -0
- package/src/components/inbox/MessageItem.tsx +50 -0
- package/src/components/inbox/ThreadItem.tsx +295 -0
- package/src/components/inbox/index.ts +3 -0
- package/src/components/index.ts +29 -0
- package/src/components/live-code-editor/hybrid-live-editor.tsx +105 -0
- package/src/components/live-code-editor/index.ts +3 -0
- package/src/components/live-code-editor/live-code-editor.tsx +257 -0
- package/src/components/messages-container-ui/MessagesContainerUI.tsx +151 -0
- package/src/components/messages-container-ui/PlanModeView.tsx +426 -0
- package/src/components/messages-container-ui/README.md +91 -0
- package/src/components/messages-container-ui/index.ts +5 -0
- package/src/components/messages-container-ui/types.ts +40 -0
- package/src/components/slot-fill/chat-message-filler.tsx +18 -0
- package/src/components/slot-fill/chat-message-slot.tsx +18 -0
- package/src/components/slot-fill/index.ts +3 -0
- package/src/components/slot-fill/right-sidebar-filler.tsx +48 -0
- package/src/components/ui/button.tsx +32 -0
- package/src/compute.ts +271 -0
- package/src/config/env-config.ts +24 -0
- package/src/config/index.ts +1 -0
- package/src/constants/breakpoints.ts +7 -0
- package/src/constants/index.ts +5 -0
- package/src/container/AiInbox.tsx +1879 -0
- package/src/container/AiInboxWithLoader.tsx +356 -0
- package/src/container/AiLandingInput.tsx +200 -0
- package/src/container/Inbox.tsx +1095 -0
- package/src/container/InboxAiMessagesLoader.tsx +129 -0
- package/src/container/InboxContainer.tsx +61 -0
- package/src/container/InboxTemplate1.tsx +1553 -0
- package/src/container/InboxTemplate1WithLoader.tsx +338 -0
- package/src/container/InboxTemplate2.tsx +1617 -0
- package/src/container/InboxWithAiLoader.tsx +177 -0
- package/src/container/InboxWithLoader.tsx +341 -0
- package/src/container/ServiceInbox.tsx +188 -0
- package/src/container/TestInboxWithAiLoader.tsx +147 -0
- package/src/container/ThreadMessages.tsx +378 -0
- package/src/container/ThreadMessagesInbox.tsx +457 -0
- package/src/container/Threads.tsx +270 -0
- package/src/container/ThreadsInbox.tsx +351 -0
- package/src/container/apply-footer-styles.ts +17 -0
- package/src/container/index.ts +31 -0
- package/src/enums/index.ts +1 -0
- package/src/enums/messenger-slot-fill-name-enum.ts +10 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/usePersistentModelConfig.ts +166 -0
- package/src/hooks/useStreamAssembler.ts +7 -0
- package/src/hooks/useTemplates.ts +75 -0
- package/src/index.ts +49 -0
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/message-widgets.interface.ts +21 -0
- package/src/machines/aiAgentMachine.simple.ts +89 -0
- package/src/machines/aiAgentMachine.ts +1296 -0
- package/src/machines/aiAgentMachine.ts.bk +1296 -0
- package/src/machines/index.ts +2 -0
- package/src/machines/types.ts +59 -0
- package/src/module.tsx +32 -0
- package/src/styles/responsive.css +76 -0
- package/src/templates/InboxWithAi.tsx +844 -0
- package/src/templates/index.ts +1 -0
- package/src/types/templates.ts +35 -0
- package/src/utils/utils.ts +3 -0
- package/src/xstate/index.ts +2 -0
- package/src/xstate/rightSidebar.machine.ts +304 -0
- package/src/xstate/rightSidebar.types.ts +58 -0
- package/tsconfig.json +14 -0
- package/webpack.config.js +92 -0
package/lib/compute.js
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { ContributionSchemaId, ConfigCollectionName, ConfigFragmentName } from 'common';
|
|
3
|
+
import { IMenuPosition } from '@common-stack/client-react';
|
|
4
|
+
import { getFilteredRoutes } from '@adminide-stack/core';
|
|
5
|
+
const messengerPageStore = [{
|
|
6
|
+
exact: false,
|
|
7
|
+
icon: 'AiOutlineInbox',
|
|
8
|
+
key: 'inbox',
|
|
9
|
+
tab: 'Chat App',
|
|
10
|
+
position: IMenuPosition.Middle,
|
|
11
|
+
// authority: [PreDefineAccountPermissions.secureUser],
|
|
12
|
+
name: 'Inbox',
|
|
13
|
+
path: '//inbox/:id?/:postId?'
|
|
14
|
+
// path: '/o/:orgName/inbox',
|
|
15
|
+
,
|
|
16
|
+
componentPath: "@messenger-box/tailwind-ui-inbox/lib/container/InboxWithLoader.js",
|
|
17
|
+
hasComponent: true,
|
|
18
|
+
queryParamsGenerator: true,
|
|
19
|
+
queries: {
|
|
20
|
+
GetChannelsByUserDocument: "{}",
|
|
21
|
+
MessagesDocument: "{}",
|
|
22
|
+
ViewChannelDetailDocument: "{}"
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
exact: false,
|
|
26
|
+
icon: 'AiOutlineInbox',
|
|
27
|
+
key: 'inbox',
|
|
28
|
+
tab: 'Chat App',
|
|
29
|
+
position: IMenuPosition.Middle,
|
|
30
|
+
//authority: [PreDefineAccountPermissions.secureUser],
|
|
31
|
+
name: 'Inbox',
|
|
32
|
+
path: '/o/:orgName/inbox',
|
|
33
|
+
componentPath: "@messenger-box/tailwind-ui-inbox/lib/container/InboxWithLoader.js",
|
|
34
|
+
hasComponent: true,
|
|
35
|
+
queryParamsGenerator: true,
|
|
36
|
+
queries: {
|
|
37
|
+
GetChannelsByUserDocument: "{}",
|
|
38
|
+
MessagesDocument: "{}",
|
|
39
|
+
ViewChannelDetailDocument: "{}"
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
exact: false,
|
|
43
|
+
icon: 'AiOutlineInbox',
|
|
44
|
+
key: 'direct-message',
|
|
45
|
+
tab: 'DM',
|
|
46
|
+
position: IMenuPosition.Middle,
|
|
47
|
+
// authority: [PreDefineAccountPermissions.secureUser],
|
|
48
|
+
name: 'DirectMessage',
|
|
49
|
+
path: '//o/:orgName/direct-message/:id?/:postId?'
|
|
50
|
+
// path: '/o/:orgName/inbox',
|
|
51
|
+
,
|
|
52
|
+
componentPath: "@messenger-box/tailwind-ui-inbox/lib/container/InboxWithLoader.js",
|
|
53
|
+
hasComponent: true,
|
|
54
|
+
queryParamsGenerator: true,
|
|
55
|
+
queries: {
|
|
56
|
+
GetChannelsByUserDocument: "{}",
|
|
57
|
+
MessagesDocument: "{}",
|
|
58
|
+
ViewChannelDetailDocument: "{}"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
// {
|
|
62
|
+
// exact: false,
|
|
63
|
+
// icon: 'AiOutlineInbox',
|
|
64
|
+
// key: 'ai-messenger',
|
|
65
|
+
// component: () => import('./container/AiInboxWithLoader'),
|
|
66
|
+
// tab: 'DM',
|
|
67
|
+
// position: IMenuPosition.Middle,
|
|
68
|
+
// // authority: [PreDefineAccountPermissions.secureUser],
|
|
69
|
+
// name: 'AiMessenger',
|
|
70
|
+
// path: '//o/:orgName/ai-messenger/:id?/:postId?',
|
|
71
|
+
// // path: '/o/:orgName/inbox',
|
|
72
|
+
// },
|
|
73
|
+
{
|
|
74
|
+
exact: false,
|
|
75
|
+
icon: 'AiOutlineInbox',
|
|
76
|
+
key: 'ai-messenger'
|
|
77
|
+
///component: () => import('./container/InboxWithAiLoader'),
|
|
78
|
+
,
|
|
79
|
+
|
|
80
|
+
tab: 'Ai Messenger',
|
|
81
|
+
position: IMenuPosition.Middle,
|
|
82
|
+
name: 'AiMessenger',
|
|
83
|
+
path: '/ai-messenger',
|
|
84
|
+
extraPermissions: ['*'],
|
|
85
|
+
configurations: ['*'],
|
|
86
|
+
extraParams: {
|
|
87
|
+
resourceParams: [{
|
|
88
|
+
fragment: ConfigFragmentName.Settings,
|
|
89
|
+
organization: '$context?.configurationBySchemaId?.configuration?.account?.default?.organization',
|
|
90
|
+
resourceType: ConfigCollectionName.Applications,
|
|
91
|
+
resourceId: 'appId:660e8400-e29b-41d4-a716-446655440001',
|
|
92
|
+
options: {
|
|
93
|
+
schemaId: ContributionSchemaId.Configuration,
|
|
94
|
+
includeMarketplace: true,
|
|
95
|
+
configKey: '',
|
|
96
|
+
target: 4 /* ConfigurationTarget.ORGANIZATION */
|
|
97
|
+
}
|
|
98
|
+
}, {
|
|
99
|
+
fragment: ConfigFragmentName.UiSettings,
|
|
100
|
+
path: ConfigCollectionName.Applications,
|
|
101
|
+
resourceType: ConfigCollectionName.Applications,
|
|
102
|
+
resourceId: 'appId:660e8400-e29b-41d4-a716-446655440001',
|
|
103
|
+
organization: '$context?.configurationBySchemaId?.configuration?.account?.default?.organization',
|
|
104
|
+
options: {
|
|
105
|
+
includeMarketplace: true,
|
|
106
|
+
schemaId: ContributionSchemaId.UiLayout,
|
|
107
|
+
configKey: '',
|
|
108
|
+
target: 4 /* ConfigurationTarget.ORGANIZATION */
|
|
109
|
+
}
|
|
110
|
+
}]
|
|
111
|
+
},
|
|
112
|
+
componentPath: "@messenger-box/tailwind-ui-inbox/lib/container/TestInboxWithAiLoader.js",
|
|
113
|
+
hasComponent: true
|
|
114
|
+
}, {
|
|
115
|
+
exact: false,
|
|
116
|
+
icon: 'AiOutlineInbox',
|
|
117
|
+
key: 'ai-messenger-with-org-name',
|
|
118
|
+
// component: () => import('./container/InboxWithAiLoader'),
|
|
119
|
+
tab: 'Ai Messenger',
|
|
120
|
+
position: IMenuPosition.Middle,
|
|
121
|
+
name: 'AiMessengerWithOrgName',
|
|
122
|
+
path: '//o/:orgName/ai-messenger',
|
|
123
|
+
extraPermissions: ['*'],
|
|
124
|
+
configurations: ['*'],
|
|
125
|
+
extraParams: {
|
|
126
|
+
resourceParams: [{
|
|
127
|
+
fragment: ConfigFragmentName.Settings,
|
|
128
|
+
organization: '$context?.configurationBySchemaId?.configuration?.account?.default?.organization',
|
|
129
|
+
resourceType: ConfigCollectionName.Applications,
|
|
130
|
+
resourceId: 'appId:660e8400-e29b-41d4-a716-446655440001',
|
|
131
|
+
options: {
|
|
132
|
+
schemaId: ContributionSchemaId.Configuration,
|
|
133
|
+
includeMarketplace: true,
|
|
134
|
+
configKey: '',
|
|
135
|
+
target: 4 /* ConfigurationTarget.ORGANIZATION */
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
fragment: ConfigFragmentName.UiSettings,
|
|
139
|
+
path: ConfigCollectionName.Applications,
|
|
140
|
+
resourceType: ConfigCollectionName.Applications,
|
|
141
|
+
resourceId: 'appId:660e8400-e29b-41d4-a716-446655440001',
|
|
142
|
+
organization: '$context?.configurationBySchemaId?.configuration?.account?.default?.organization',
|
|
143
|
+
options: {
|
|
144
|
+
includeMarketplace: true,
|
|
145
|
+
schemaId: ContributionSchemaId.UiLayout,
|
|
146
|
+
configKey: '',
|
|
147
|
+
target: 4 /* ConfigurationTarget.ORGANIZATION */
|
|
148
|
+
}
|
|
149
|
+
}]
|
|
150
|
+
},
|
|
151
|
+
componentPath: "@messenger-box/tailwind-ui-inbox/lib/container/TestInboxWithAiLoader.js",
|
|
152
|
+
hasComponent: true
|
|
153
|
+
}, {
|
|
154
|
+
exact: false,
|
|
155
|
+
icon: 'AiOutlineInbox',
|
|
156
|
+
key: 'ai-messenger-app-with-channel-id',
|
|
157
|
+
tab: 'Ai Messenger',
|
|
158
|
+
position: IMenuPosition.Middle,
|
|
159
|
+
name: 'AiMessengerAppWithChannelId',
|
|
160
|
+
path: '/ai-messenger/app/:id',
|
|
161
|
+
extraPermissions: ['*'],
|
|
162
|
+
configurations: ['*'],
|
|
163
|
+
extraParams: {
|
|
164
|
+
resourceParams: [{
|
|
165
|
+
fragment: ConfigFragmentName.Settings,
|
|
166
|
+
organization: '$context?.configurationBySchemaId?.configuration?.account?.default?.organization',
|
|
167
|
+
resourceType: ConfigCollectionName.Applications,
|
|
168
|
+
resourceId: 'appId:660e8400-e29b-41d4-a716-446655440001',
|
|
169
|
+
options: {
|
|
170
|
+
schemaId: ContributionSchemaId.Configuration,
|
|
171
|
+
includeMarketplace: true,
|
|
172
|
+
configKey: '',
|
|
173
|
+
target: 4 /* ConfigurationTarget.ORGANIZATION */
|
|
174
|
+
}
|
|
175
|
+
}, {
|
|
176
|
+
fragment: ConfigFragmentName.UiSettings,
|
|
177
|
+
path: ConfigCollectionName.Applications,
|
|
178
|
+
resourceType: ConfigCollectionName.Applications,
|
|
179
|
+
resourceId: 'appId:660e8400-e29b-41d4-a716-446655440001',
|
|
180
|
+
organization: '$context?.configurationBySchemaId?.configuration?.account?.default?.organization',
|
|
181
|
+
options: {
|
|
182
|
+
includeMarketplace: true,
|
|
183
|
+
schemaId: ContributionSchemaId.UiLayout,
|
|
184
|
+
configKey: '',
|
|
185
|
+
target: 4 /* ConfigurationTarget.ORGANIZATION */
|
|
186
|
+
}
|
|
187
|
+
}]
|
|
188
|
+
},
|
|
189
|
+
componentPath: "@messenger-box/tailwind-ui-inbox/lib/container/InboxAiMessagesLoader.js",
|
|
190
|
+
hasComponent: true
|
|
191
|
+
}, {
|
|
192
|
+
exact: false,
|
|
193
|
+
icon: 'AiOutlineInbox',
|
|
194
|
+
key: 'ai-messenger-app-with-org-and-channel-id',
|
|
195
|
+
tab: 'Ai Messenger',
|
|
196
|
+
position: IMenuPosition.Middle,
|
|
197
|
+
name: 'AiMessengerAppWithOrgAndChannelId',
|
|
198
|
+
path: '//o/:orgName/ai-messenger/app/:id',
|
|
199
|
+
extraPermissions: ['*'],
|
|
200
|
+
configurations: ['*'],
|
|
201
|
+
extraParams: {
|
|
202
|
+
resourceParams: [{
|
|
203
|
+
fragment: ConfigFragmentName.Settings,
|
|
204
|
+
organization: '$context?.configurationBySchemaId?.configuration?.account?.default?.organization',
|
|
205
|
+
resourceType: ConfigCollectionName.Applications,
|
|
206
|
+
resourceId: 'appId:660e8400-e29b-41d4-a716-446655440001',
|
|
207
|
+
options: {
|
|
208
|
+
schemaId: ContributionSchemaId.Configuration,
|
|
209
|
+
includeMarketplace: true,
|
|
210
|
+
configKey: '',
|
|
211
|
+
target: 4 /* ConfigurationTarget.ORGANIZATION */
|
|
212
|
+
}
|
|
213
|
+
}, {
|
|
214
|
+
fragment: ConfigFragmentName.UiSettings,
|
|
215
|
+
path: ConfigCollectionName.Applications,
|
|
216
|
+
resourceType: ConfigCollectionName.Applications,
|
|
217
|
+
resourceId: 'appId:660e8400-e29b-41d4-a716-446655440001',
|
|
218
|
+
organization: '$context?.configurationBySchemaId?.configuration?.account?.default?.organization',
|
|
219
|
+
options: {
|
|
220
|
+
includeMarketplace: true,
|
|
221
|
+
schemaId: ContributionSchemaId.UiLayout,
|
|
222
|
+
configKey: '',
|
|
223
|
+
target: 4 /* ConfigurationTarget.ORGANIZATION */
|
|
224
|
+
}
|
|
225
|
+
}]
|
|
226
|
+
},
|
|
227
|
+
componentPath: "@messenger-box/tailwind-ui-inbox/lib/container/InboxAiMessagesLoader.js",
|
|
228
|
+
hasComponent: true
|
|
229
|
+
}
|
|
230
|
+
// {
|
|
231
|
+
// exact: false,
|
|
232
|
+
// icon: 'AiOutlineInbox',
|
|
233
|
+
// key: 'ai-messenger-with-channel-id',
|
|
234
|
+
// component: () => import('./templates/InboxWithAi'),
|
|
235
|
+
// tab: 'Ai Messenger',
|
|
236
|
+
// position: IMenuPosition.Middle,
|
|
237
|
+
// name: 'AiMessengerWithChannelId',
|
|
238
|
+
// path: '//o?/:orgName?/ai-messenger/:id',
|
|
239
|
+
// },
|
|
240
|
+
// {
|
|
241
|
+
// exact: false,
|
|
242
|
+
// icon: 'AiOutlineInbox',
|
|
243
|
+
// key: 'messenger-ai',
|
|
244
|
+
// component: () => import('./container/InboxAiLoader'),
|
|
245
|
+
// tab: 'Ai Messenger',
|
|
246
|
+
// position: IMenuPosition.Middle,
|
|
247
|
+
// name: 'MessengerAi',
|
|
248
|
+
// path: '/messenger-ai',
|
|
249
|
+
// },
|
|
250
|
+
// {
|
|
251
|
+
// exact: false,
|
|
252
|
+
// icon: 'AiOutlineInbox',
|
|
253
|
+
// key: 'ai-messenger-with-preview',
|
|
254
|
+
// component: () => import('./container/InboxWithAiLoader'),
|
|
255
|
+
// tab: 'Ai Messenger',
|
|
256
|
+
// position: IMenuPosition.Middle,
|
|
257
|
+
// name: 'AiMessengerWithPreview',
|
|
258
|
+
// path: '//o?/:orgName?/ai-messenger/app/:id/preview',
|
|
259
|
+
// },
|
|
260
|
+
];
|
|
261
|
+
// get only selected Routes to work
|
|
262
|
+
const selectedRoutes = ['inbox', 'direct-message', 'ai-messenger', 'ai-messenger-with-org-name', 'ai-messenger-app-with-channel-id', 'ai-messenger-app-with-org-and-channel-id', 'ai-messenger-with-preview'];
|
|
263
|
+
const filteredRoutes = getFilteredRoutes(messengerPageStore, selectedRoutes);
|
|
264
|
+
export { filteredRoutes, messengerPageStore }; //# sourceMappingURL=compute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute.js","sources":["../src/compute.ts"],"sourcesContent":[null],"names":[],"mappings":"uNAQO,MAAM,kBAAkB,GAA4C,CAAA;AACvE,EAAA,KAAA,EAAA,KAAA;AACI,EAAA,IAAA,EAAA,gBAAY;AACZ,EAAA,GAAA,EAAA,OAAM;AACN,EAAA,SAAG,EAAE,MAAA,OAAO,gCAAA,CAAA;AACZ,EAAA,GAAA,EAAA,UAAS;AACT,EAAA,QAAA,eAAe,CAAA,MAAA;;QAEf,OAAA;AACA,EAAA,IAAA,EAAA;AACA;;AAEH,EAAA,KAAA,EAAA,KAAA;AACD,EAAA,IAAA,EAAA,gBAAA;AACI,EAAA,GAAA,EAAA;AACA,EAAA,SAAA,QAAM,OAAA,gCAAgB,CAAA;AACtB,EAAA,GAAA,EAAA,UAAK;AACL,EAAA,QAAA,EAAA,aAAiB,CAAA,MAAO;AACxB;QACA,OAAA;QACA;AACA,CAAA,EAAA;AACA,EAAA,KAAA,EAAA,KAAM;AACT,EAAA,IAAA,EAAA,gBAAA;AACD,EAAA,GAAA,EAAA,gBAAA;AACI,EAAA,SAAA,EAAK,MAAE,OAAK,gCAAA,CAAA;AACZ,EAAA,GAAA,EAAA,IAAA;AACA,EAAA,QAAA,eAAK,CAAA,MAAgB;AACrB;AACA,EAAA,IAAA,EAAA,eAAS;QACT;;AAEA,CAAA;AACA;;AAEH;;;;;;;;;;;OAWD,EAAA,KAAA;MACA,EAAA,gBAAK;AACL,EAAA,GAAA,EAAA,cAAA;AACI;AACA,EAAA,SAAA,QAAM,OAAA,sCAAgB,CAAA;AACtB,EAAA,GAAA,EAAA,cAAK;UACL,EAAA,aAAA,CA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EA;AACA;AACH;AACJ;AACJ;AACJ;AACJ;;;;;;;;;;;;;;;MAiBD,cAAA,GAAA,CAAA,OAAA,EAAA,gBAAA,EAAA,cAA4D,EAAA,4BAAA,EAAA,kCAAA,EAAA,0CAAA,EAAA,2BAAA,CAAA;AAC5D,MAAA,cAAA,GAAA,iBAA2B,CAAA,kBAAA,EAAA,cAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const config: Readonly<{
|
|
2
|
+
CLIENT_URL: string;
|
|
3
|
+
WEB_INBOX_MESSEGE_PATH: string;
|
|
4
|
+
WEB_THREAD_MESSEGE_PATH: string;
|
|
5
|
+
MESSAGES_PER_PAGE: number;
|
|
6
|
+
MESSENGER_BOX_FORM_EXTENSION_ID: string;
|
|
7
|
+
MESSENGER_BOX_FORM_EXTENSION_FORM_ID: string;
|
|
8
|
+
MESSENGER_BOX_FORM_EXTENSION_FUNCTION_ID: string;
|
|
9
|
+
MESSENGER_BOX_FORM_EXTENSION_STEP_NAME: string;
|
|
10
|
+
FILES_PER_MESSAGE: number;
|
|
11
|
+
VITE_OPENAI_API_KEY: string;
|
|
12
|
+
VITE_ANTHROPIC_API_KEY: string;
|
|
13
|
+
ANTHROPIC_API_KEY: string;
|
|
14
|
+
NEWS_API_KEY: string;
|
|
15
|
+
OPENAI_API_KEY: string;
|
|
16
|
+
AI_MESSENGER_PATH: string;
|
|
17
|
+
LAYOUT_SETTINGS: unknown;
|
|
18
|
+
APP_NAME: string;
|
|
19
|
+
} & import("envalid").CleanedEnvAccessors>;
|
|
20
|
+
//# sourceMappingURL=env-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-config.d.ts","sourceRoot":"","sources":["../../src/config/env-config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;0CAkBjB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import {cleanEnv,str,json,num}from'envalid';import {getEnvironment}from'@common-stack/core';const env = getEnvironment();
|
|
2
|
+
const config = cleanEnv(env, {
|
|
3
|
+
CLIENT_URL: str({
|
|
4
|
+
default: 'http://localhost:3011'
|
|
5
|
+
}),
|
|
6
|
+
WEB_INBOX_MESSEGE_PATH: str({
|
|
7
|
+
default: 'inbox'
|
|
8
|
+
}),
|
|
9
|
+
WEB_THREAD_MESSEGE_PATH: str({
|
|
10
|
+
default: 'thread'
|
|
11
|
+
}),
|
|
12
|
+
MESSAGES_PER_PAGE: num({
|
|
13
|
+
devDefault: 10,
|
|
14
|
+
default: 10
|
|
15
|
+
}),
|
|
16
|
+
MESSENGER_BOX_FORM_EXTENSION_ID: str({
|
|
17
|
+
default: ''
|
|
18
|
+
}),
|
|
19
|
+
MESSENGER_BOX_FORM_EXTENSION_FORM_ID: str({
|
|
20
|
+
default: ''
|
|
21
|
+
}),
|
|
22
|
+
MESSENGER_BOX_FORM_EXTENSION_FUNCTION_ID: str({
|
|
23
|
+
default: ''
|
|
24
|
+
}),
|
|
25
|
+
MESSENGER_BOX_FORM_EXTENSION_STEP_NAME: str({
|
|
26
|
+
default: ''
|
|
27
|
+
}),
|
|
28
|
+
FILES_PER_MESSAGE: num({
|
|
29
|
+
default: 10
|
|
30
|
+
}),
|
|
31
|
+
VITE_OPENAI_API_KEY: str({
|
|
32
|
+
default: ''
|
|
33
|
+
}),
|
|
34
|
+
VITE_ANTHROPIC_API_KEY: str({
|
|
35
|
+
default: ''
|
|
36
|
+
}),
|
|
37
|
+
ANTHROPIC_API_KEY: str({
|
|
38
|
+
default: ''
|
|
39
|
+
}),
|
|
40
|
+
NEWS_API_KEY: str({
|
|
41
|
+
default: ''
|
|
42
|
+
}),
|
|
43
|
+
OPENAI_API_KEY: str({
|
|
44
|
+
default: ''
|
|
45
|
+
}),
|
|
46
|
+
AI_MESSENGER_PATH: str({
|
|
47
|
+
default: '/ai-messenger/app'
|
|
48
|
+
}),
|
|
49
|
+
LAYOUT_SETTINGS: json({
|
|
50
|
+
default: {}
|
|
51
|
+
}),
|
|
52
|
+
APP_NAME: str({
|
|
53
|
+
default: 'Messenger Box'
|
|
54
|
+
})
|
|
55
|
+
});export{config};//# sourceMappingURL=env-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-config.js","sources":["../../src/config/env-config.ts"],"sourcesContent":[null],"names":[],"mappings":"4FAGA,MAAM,GAAG,GAAG,cAAc,EAAE;AAErB,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE;YAChC,EAAU;IACV,OAAA,EAAA;IACA;AACA,EAAA,sBAAmB,EAAG,GAAG,CAAA;IACzB,OAAA,EAAA;IACA;yBACA,EAAA,GAAA,CAAA;IACA,OAAA,EAAA;IACA;mBACA,EAAA,GAAmB,CAAE;IACrB,UAAA,EAAA,EAAA;IACA,OAAA,EAAA;IACA;iCAC6B,EAAE,IAAI;IACnC,OAAA,EAAA;IACA;sCACyB,EAAA,GAAA,CAAe;AAC3C,IAAE,OAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../src/constants/breakpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,sEAAsE,CAAC;AAI3F,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface InboxProps {
|
|
3
|
+
channelFilters?: Record<string, unknown>;
|
|
4
|
+
channelRole?: string;
|
|
5
|
+
supportServices?: boolean;
|
|
6
|
+
pathPrefix?: string;
|
|
7
|
+
data?: any;
|
|
8
|
+
orgName?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.MemoExoticComponent<{
|
|
11
|
+
(props: InboxProps): React.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
}>;
|
|
14
|
+
export default _default;
|
|
15
|
+
//# sourceMappingURL=AiInbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiInbox.d.ts","sourceRoot":"","sources":["../../src/container/AiInbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyE,MAAM,OAAO,CAAC;AAmC9F,MAAM,WAAW,UAAU;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;;YAiHqB,UAAU;;;AA2rDhC,wBAAiC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RoomType } from 'common';
|
|
3
|
+
export declare const queryParamsGenerator: (params: {
|
|
4
|
+
role?: string;
|
|
5
|
+
criteria?: Record<string, any>;
|
|
6
|
+
supportServices?: boolean;
|
|
7
|
+
orgName?: string;
|
|
8
|
+
}) => {
|
|
9
|
+
variable1: {
|
|
10
|
+
role: string;
|
|
11
|
+
criteria: {
|
|
12
|
+
orgName: string;
|
|
13
|
+
};
|
|
14
|
+
supportServices: boolean;
|
|
15
|
+
supportServiceCriteria: {
|
|
16
|
+
type: RoomType;
|
|
17
|
+
};
|
|
18
|
+
orderBy: {
|
|
19
|
+
lastPostAt: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
interface InboxWithLoaderProps {
|
|
24
|
+
channelFilters?: Record<string, any>;
|
|
25
|
+
channelRole?: string;
|
|
26
|
+
supportServices?: boolean;
|
|
27
|
+
pathPrefix?: string;
|
|
28
|
+
orgName?: string;
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}
|
|
31
|
+
declare const _default: React.MemoExoticComponent<{
|
|
32
|
+
(props: InboxWithLoaderProps): React.JSX.Element;
|
|
33
|
+
displayName: string;
|
|
34
|
+
}>;
|
|
35
|
+
export default _default;
|
|
36
|
+
//# sourceMappingURL=AiInboxWithLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiInboxWithLoader.d.ts","sourceRoot":"","sources":["../../src/container/AiInboxWithLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAUlC,eAAO,MAAM,oBAAoB,GAAI,QAAQ;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;;;;;;;;;;;;;;CAiBC,CAAC;AAyIH,UAAU,oBAAoB;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;;YAE+B,oBAAoB;;;AAyKpD,wBAA2C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type AiLandingInputProps = {
|
|
3
|
+
isShowMeta?: boolean;
|
|
4
|
+
showModeSelector?: boolean;
|
|
5
|
+
showStopButton?: boolean;
|
|
6
|
+
onStop?: () => void;
|
|
7
|
+
leftItemsOverrides?: any;
|
|
8
|
+
rightItemsOverrides?: any;
|
|
9
|
+
inputToolBarProps?: any;
|
|
10
|
+
projectId?: string;
|
|
11
|
+
suggestedTemplate?: any;
|
|
12
|
+
onSelectTemplate?: (template: any) => void;
|
|
13
|
+
templateSelectedLabel?: string | null;
|
|
14
|
+
templateModalItems?: any[];
|
|
15
|
+
showTemplateModal?: boolean;
|
|
16
|
+
onOpenTemplateModal?: () => void;
|
|
17
|
+
onCloseTemplateModal?: () => void;
|
|
18
|
+
onSelectTemplateById?: (id: string) => void;
|
|
19
|
+
onClearTemplate?: () => void;
|
|
20
|
+
onAcceptSuggestedTemplate?: () => void;
|
|
21
|
+
isAnalyzingQuery?: boolean;
|
|
22
|
+
onQueryChange?: (query: string) => void;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
};
|
|
25
|
+
declare const _default: React.NamedExoticComponent<AiLandingInputProps>;
|
|
26
|
+
export default _default;
|
|
27
|
+
//# sourceMappingURL=AiLandingInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiLandingInput.d.ts","sourceRoot":"","sources":["../../src/container/AiLandingInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAevC,KAAK,mBAAmB,GAAG;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,kBAAkB,CAAC,EAAE,GAAG,CAAC;IACzB,mBAAmB,CAAC,EAAE,GAAG,CAAC;IAC1B,iBAAiB,CAAC,EAAE,GAAG,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,GAAG,CAAC;IACxB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3C,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,kBAAkB,CAAC,EAAE,GAAG,EAAE,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,oBAAoB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,yBAAyB,CAAC,EAAE,MAAM,IAAI,CAAC;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAC;;AAkKF,wBAA0C"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import React__default,{useMemo}from'react';import {useParams,useNavigate}from'@remix-run/react';import {AiAgentMessageRole,PostTypeEnum,RoomType}from'common';import {InputComponent}from'../components/AIAgent/InputComponent.js';import {objectId}from'@messenger-box/core';import {useCreateChannelWorkflowJobMutation,useAddChannelMutation,useSendMessagesMutation}from'common/graphql';import {config}from'../config/env-config.js';import {usePersistentModelConfig}from'../hooks/usePersistentModelConfig.js';const TailwindOverlaySpinner = React__default.memo(() => React__default.createElement("div", {
|
|
2
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30"
|
|
3
|
+
}, React__default.createElement("div", {
|
|
4
|
+
className: "animate-spin rounded-full h-10 w-10 border-2 border-white border-t-transparent"
|
|
5
|
+
})));
|
|
6
|
+
const AiLandingInput = ({
|
|
7
|
+
isShowMeta = false,
|
|
8
|
+
showModeSelector = false,
|
|
9
|
+
showStopButton = false,
|
|
10
|
+
onStop = () => {},
|
|
11
|
+
inputToolBarProps,
|
|
12
|
+
...props
|
|
13
|
+
}) => {
|
|
14
|
+
const {
|
|
15
|
+
orgName
|
|
16
|
+
} = useParams();
|
|
17
|
+
const [createChannelWorkflowJob] = useCreateChannelWorkflowJobMutation();
|
|
18
|
+
const [addChannel] = useAddChannelMutation();
|
|
19
|
+
const [sendMessage] = useSendMessagesMutation();
|
|
20
|
+
const navigate = useNavigate();
|
|
21
|
+
const [isCreatingChannel, setIsCreatingChannel] = React__default.useState(false);
|
|
22
|
+
const {
|
|
23
|
+
modelConfig,
|
|
24
|
+
updateModelConfig,
|
|
25
|
+
getValidatedConfig,
|
|
26
|
+
hasApiKey
|
|
27
|
+
} = usePersistentModelConfig();
|
|
28
|
+
const projectId = useMemo(() => {
|
|
29
|
+
return props?.projectId;
|
|
30
|
+
}, [props?.projectId]);
|
|
31
|
+
// const [showModelConfig, setShowModelConfig] = React.useState(!hasApiKey);
|
|
32
|
+
return React__default.createElement("div", {
|
|
33
|
+
className: "flex items-center justify-center min-h-screen bg-white shadow-lg"
|
|
34
|
+
}, React__default.createElement("div", {
|
|
35
|
+
className: "w-full max-w-2xl mx-4"
|
|
36
|
+
}, React__default.createElement("div", {
|
|
37
|
+
className: "bg-white rounded-lg shadow-lg p-6 w-full max-w-4xl overflow-hidden rounded-[28px] border border-gray-200 bg-card "
|
|
38
|
+
}, React__default.createElement("div", {
|
|
39
|
+
className: "text-center mb-6"
|
|
40
|
+
}, React__default.createElement("h3", {
|
|
41
|
+
className: "text-xl font-semibold text-gray-700 mb-2"
|
|
42
|
+
}, `${config?.LAYOUT_SETTINGS?.title ?? 'What would you like to build?'}`), React__default.createElement("p", {
|
|
43
|
+
className: "text-gray-500"
|
|
44
|
+
}, "Describe your idea and I'll help you create it step by step.")), React__default.createElement("div", {
|
|
45
|
+
className: "mb-0"
|
|
46
|
+
}, React__default.createElement("div", {
|
|
47
|
+
className: ` ${!hasApiKey ? 'p-3 bg-white rounded-lg border' : ''}`
|
|
48
|
+
}, !hasApiKey && React__default.createElement(React__default.Fragment, null, React__default.createElement("p", {
|
|
49
|
+
className: "text-xs text-gray-600 mb-3"
|
|
50
|
+
}, "Choose your AI model, template, and provide your API key before creating your project."), React__default.createElement("div", {
|
|
51
|
+
className: "mt-2 text-xs text-amber-600"
|
|
52
|
+
}, "\u26A0\uFE0F Please provide an API key to create a projects from settings")))), React__default.createElement(InputComponent, {
|
|
53
|
+
inputToolBarParentClass: "shadow-none",
|
|
54
|
+
// textareaClassName="border-none focus:border-none active:border-none focus:outline-none focus:ring-0"
|
|
55
|
+
// toolBarParentClassName="border-t border-gray-200 focus:border-t-gray-400"
|
|
56
|
+
handleSend: async (message, files) => {
|
|
57
|
+
const validated = getValidatedConfig();
|
|
58
|
+
if (!validated && !hasApiKey && !modelConfig?.extensionId && !modelConfig?.formId) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
console.log('Message sent without channel:', message, files);
|
|
62
|
+
setIsCreatingChannel(true);
|
|
63
|
+
const id = projectId || objectId();
|
|
64
|
+
// const postId = objectId();
|
|
65
|
+
const channelId = objectId();
|
|
66
|
+
// Do not include extensionId inside modelConfig when sending additionalProperties
|
|
67
|
+
const {
|
|
68
|
+
extensionId: _omitExtensionId,
|
|
69
|
+
formId: _omitFormId,
|
|
70
|
+
functionId: _omitFunctionId,
|
|
71
|
+
stepName: _omitStepName,
|
|
72
|
+
...modelConfigWithoutExtensionId
|
|
73
|
+
} = modelConfig || {};
|
|
74
|
+
createChannelWorkflowJob({
|
|
75
|
+
variables: {
|
|
76
|
+
createChannelInput: {
|
|
77
|
+
channelId,
|
|
78
|
+
title: 'AI Assistant',
|
|
79
|
+
description: 'AI Assistant',
|
|
80
|
+
displayName: 'AI Assistant',
|
|
81
|
+
topic: 'AI Assistant',
|
|
82
|
+
projectId: id,
|
|
83
|
+
type: RoomType.Aiassistant,
|
|
84
|
+
postData: {
|
|
85
|
+
// postId: postId,
|
|
86
|
+
type: PostTypeEnum.Aiassistant,
|
|
87
|
+
content: message,
|
|
88
|
+
props: {
|
|
89
|
+
// generateAiCode: true,
|
|
90
|
+
template: modelConfig?.template || 'vite-react',
|
|
91
|
+
projectId: id,
|
|
92
|
+
role: AiAgentMessageRole.User,
|
|
93
|
+
fragment: {}
|
|
94
|
+
// sendNotificationWithProjectId: true,
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
additionalProperties: {
|
|
98
|
+
modelConfig: modelConfigWithoutExtensionId
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
extensionInput: {
|
|
102
|
+
extensionId: modelConfig?.extensionId || config?.MESSENGER_BOX_FORM_EXTENSION_ID,
|
|
103
|
+
stepName: modelConfig?.stepName || config?.MESSENGER_BOX_FORM_EXTENSION_STEP_NAME || 'extractCodeFromExtension',
|
|
104
|
+
formId: modelConfig?.formId || config?.MESSENGER_BOX_FORM_EXTENSION_FORM_ID || 'form-builder-proxy',
|
|
105
|
+
functionId: modelConfig?.functionId || config?.MESSENGER_BOX_FORM_EXTENSION_FUNCTION_ID || 'create-channel-function',
|
|
106
|
+
metadata: modelConfig?.metadata || {},
|
|
107
|
+
source: 'final-submission'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
onCompleted: data => {
|
|
111
|
+
console.log('Channel created:', data);
|
|
112
|
+
if (!data.createChannelWorkflowJob) {
|
|
113
|
+
setIsCreatingChannel(false);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const basePath = orgName ? config.AI_MESSENGER_PATH.replace(':orgName', orgName) : config.AI_MESSENGER_PATH;
|
|
117
|
+
const targetPath = basePath.includes(':id') ? basePath.replace(':id', channelId) : `${basePath.replace(/\/+$/, '')}/${channelId}`;
|
|
118
|
+
navigate(targetPath, {
|
|
119
|
+
replace: true
|
|
120
|
+
});
|
|
121
|
+
setIsCreatingChannel(false);
|
|
122
|
+
},
|
|
123
|
+
onError: error => {
|
|
124
|
+
console.error('Error creating channel:', error);
|
|
125
|
+
setIsCreatingChannel(false);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
placeholder: "Type your message here...",
|
|
130
|
+
modelConfig: modelConfig,
|
|
131
|
+
onModelConfigChange: updateModelConfig,
|
|
132
|
+
isShowMeta: isShowMeta,
|
|
133
|
+
showModeSelector: showModeSelector,
|
|
134
|
+
showStopButton: showStopButton,
|
|
135
|
+
onStop: onStop,
|
|
136
|
+
inputToolBarProps: inputToolBarProps,
|
|
137
|
+
...props,
|
|
138
|
+
leftItemsOverrides: {
|
|
139
|
+
template: {
|
|
140
|
+
enabled: true
|
|
141
|
+
},
|
|
142
|
+
search: {
|
|
143
|
+
enabled: true
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}))), isCreatingChannel && React__default.createElement(TailwindOverlaySpinner, null));
|
|
147
|
+
};
|
|
148
|
+
AiLandingInput.displayName = 'AiLandingInput';
|
|
149
|
+
var AiLandingInput$1 = React__default.memo(AiLandingInput);export{AiLandingInput$1 as default};//# sourceMappingURL=AiLandingInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiLandingInput.js","sources":["../../src/container/AiLandingInput.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"sfASA,MAAM,sBAAsB,GAAGA,cAAK,CAAC,IAAI,CAAC,MAAMA,cAC5C,CAAA,aAAA,CAAA,KAAA,EAAA;AACI,EAAA,SAAA,EAAA;AA4BR,CAAA,EAAAA,cAAM,CAAA,aAAc,CAAkC,KAClD,EAAA;AAOA,EAAA,WAAQ;AACR,CAAA,CAAA,CAAA,CAAA;AACA,MAAA,cAAO,GAAW,CAAA;AAClB,EAAA,UAAO,GAAA,KAAA;AACP,EAAA,gBAAc,GAAG,KAAA;AACjB,EAAA,cAAO,GAAA,KAAA;AACP,EAAA,MAAA,GAAM,MAAE,C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,QAAA,EAAA,WAAqB,EAAA,QAAA,IAAA,MAAC,EAAA,sCAE7B,IAAA,0BAAA;AACN,YAAE,MAAA,EAAA,WAAA,EAAA,MAAA,IAAA,MAAA,EAAA,oCAAA,IAAA,oBAAA;AAEF,YAAA,UAAe,EAAA,WAAc,EAAA,UAAiB,IAAA,MAAA,EAAA,wCAAA,IAAA,yBAAA;AAE9C,YAAA,QAAoB,EAAC,WAAK,EAAA,QAAgB,IAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface InboxProps {
|
|
3
|
+
channelFilters?: Record<string, unknown>;
|
|
4
|
+
channelRole?: string;
|
|
5
|
+
supportServices?: boolean;
|
|
6
|
+
pathPrefix?: string;
|
|
7
|
+
data?: any;
|
|
8
|
+
orgName?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.MemoExoticComponent<{
|
|
11
|
+
(props: InboxProps): React.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
}>;
|
|
14
|
+
export default _default;
|
|
15
|
+
//# sourceMappingURL=Inbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Inbox.d.ts","sourceRoot":"","sources":["../../src/container/Inbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyE,MAAM,OAAO,CAAC;AAiC9F,MAAM,WAAW,UAAU;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;;YAiHqB,UAAU;;;AA66BhC,wBAAiC"}
|