From 42f6621afb4e8a4ba5b6c121ca54bf46ac345fab Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 2 Oct 2024 13:06:30 +0530 Subject: [PATCH] =?UTF-8?q?feat:=20Vite=20+=20vue=203=20=F0=9F=92=9A=20=20?= =?UTF-8?q?(#10047)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://github.com/chatwoot/chatwoot/issues/8436 Fixes https://github.com/chatwoot/chatwoot/issues/9767 Fixes https://github.com/chatwoot/chatwoot/issues/10156 Fixes https://github.com/chatwoot/chatwoot/issues/6031 Fixes https://github.com/chatwoot/chatwoot/issues/5696 Fixes https://github.com/chatwoot/chatwoot/issues/9250 Fixes https://github.com/chatwoot/chatwoot/issues/9762 --------- Co-authored-by: Pranav Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> --- .eslintrc.js | 22 +- .github/workflows/run_foss_spec.yml | 11 +- .gitignore | 16 +- .husky/pre-commit | 16 +- .storybook/main.js | 56 - .storybook/preview.js | 46 - Gemfile | 4 +- Gemfile.lock | 33 +- Procfile.dev | 2 +- Procfile.test | 2 +- README.md | 7 +- app/assets/config/manifest.js | 1 - app/assets/javascripts/dashboardChart.js | 55 - .../administrate/utilities/_variables.scss | 3 - app/controllers/dashboard_controller.rb | 2 +- app/javascript/dashboard/App.vue | 43 +- .../dashboard/assets/images/auth/auth--bg.svg | 91 + .../assets/images/auth/bottom-right.svg | 3 + .../dashboard/assets/images/auth/top-left.svg | 3 + .../dashboard/assets/scss/_animations.scss | 20 +- .../dashboard/assets/scss/_date-picker.scss | 2 +- .../dashboard/assets/scss/_formulate.scss | 2 +- .../dashboard/assets/scss/_layout.scss | 5 +- .../dashboard/assets/scss/_mixins.scss | 4 +- .../dashboard/assets/scss/_variables.scss | 3 - .../dashboard/assets/scss/_woot.scss | 9 +- .../assets/scss/plugins/_multiselect.scss | 1 + .../dashboard/assets/scss/storybook.scss | 39 - .../Accordion/AccordionItem.stories.js | 30 - .../components/Accordion/AccordionItem.vue | 54 +- .../dashboard/components/ChannelSelector.vue | 1 - .../dashboard/components/ChatList.vue | 1644 +- .../dashboard/components/ChatListHeader.vue | 8 +- app/javascript/dashboard/components/Code.vue | 48 +- .../dashboard/components/ConversationItem.vue | 5 +- .../dashboard/components/CustomAttribute.vue | 7 +- .../components/CustomSnoozeModal.vue | 4 +- .../components/IntersectionObserver.vue | 48 +- app/javascript/dashboard/components/Modal.vue | 134 +- .../components/NetworkNotification.vue | 4 +- .../dashboard/components/SidemenuIcon.vue | 3 +- .../components/SnackbarContainer.vue | 7 +- .../components/app/PaymentPendingBanner.vue | 2 +- .../app/PendingEmailVerificationBanner.vue | 2 +- .../components/app/UpgradeBanner.vue | 2 +- .../dashboard/components/buttons/Button.vue | 11 +- .../components/buttons/FormSubmitButton.vue | 6 - .../components/buttons/ResolveAction.vue | 2 +- app/javascript/dashboard/components/index.js | 37 +- .../components/layout/AvailabilityStatus.vue | 27 +- .../dashboard/components/layout/Sidebar.vue | 22 +- .../sidebarComponents/AddAccountModal.vue | 16 +- .../layout/sidebarComponents/Primary.vue | 3 +- .../layout/sidebarComponents/Secondary.vue | 4 - .../SecondaryChildNavItem.vue | 9 +- .../sidebarComponents/SecondaryNavItem.vue | 8 +- .../specs/AgentDetails.spec.js | 1 - .../layout/specs/AvailabilityStatus.spec.js | 6 +- .../dashboard/components/table/BaseCell.vue | 24 + .../dashboard/components/table/Pagination.vue | 117 + .../dashboard/components/table/SortButton.vue | 18 + .../dashboard/components/table/Table.vue | 65 + .../dashboard/components/ui/Banner.vue | 4 +- .../dashboard/components/ui/ContextMenu.vue | 73 +- .../components/ui/DateRangePicker.vue | 2 +- .../components/ui/DateTimePicker.vue | 2 +- .../components/ui/Dropdown/DropdownButton.vue | 1 - .../components/ui/Dropdown/DropdownList.vue | 14 +- .../ui/Dropdown/DropdownListItemButton.vue | 4 - .../components/ui/Dropdown/DropdownSearch.vue | 7 +- .../dashboard/components/ui/Label.vue | 2 +- .../dashboard/components/ui/Switch.vue | 11 +- .../dashboard/components/ui/Tabs/Tabs.js | 91 - .../dashboard/components/ui/Tabs/Tabs.vue | 89 + .../dashboard/components/ui/Tabs/TabsItem.vue | 75 +- .../dashboard/components/ui/TimeAgo.vue | 2 +- .../dashboard/components/ui/WootButton.vue | 6 - .../ui/stories/AnnouncementPopup.stories.js | 46 - .../components/ui/stories/Button.stories.js | 50 - .../ui/stories/DateRangePicker.stories.js | 38 - .../ui/stories/DateTimePicker.stories.js | 38 - .../components/ui/stories/Label.stories.js | 64 - .../components/ui/stories/TimeAgo.stories.js | 30 - .../components/widgets/AIAssistanceButton.vue | 5 +- .../widgets/AIAssistanceCTAButton.vue | 2 +- .../widgets/AutomationActionInput.vue | 16 +- .../AutomationActionTeamMessageInput.vue | 2 +- .../widgets/AutomationFileInput.vue | 2 +- .../components/widgets/ChatTypeTabs.vue | 3 +- .../components/widgets/ColorPicker.vue | 16 +- .../components/widgets/FilterInput/Index.vue | 46 +- .../widgets/InboxDropdownItem.stories.js | 37 - .../components/widgets/InboxName.vue | 4 +- .../widgets/LabelSelector.stories.js | 67 - .../components/widgets/LabelSelector.vue | 2 +- .../widgets/SettingIntroBanner.stories.js | 30 - .../dashboard/components/widgets/ShowMore.vue | 2 +- .../components/widgets/Thumbnail.stories.js | 61 - .../components/widgets/UserAvatarWithName.vue | 31 +- .../widgets/WootWriter/AudioRecorder.vue | 353 +- .../components/widgets/WootWriter/Editor.vue | 1237 +- .../widgets/WootWriter/FullEditor.vue | 76 +- .../widgets/WootWriter/ReplyBottomPanel.vue | 15 +- .../widgets/WootWriter/ReplyTopPanel.vue | 5 +- .../WootWriter/keyboardEmojiSelector.vue | 4 +- .../WootWriter/utils/mp3ConversionUtils.js | 124 +- .../components/widgets/chart/BarChart.js | 66 - .../widgets/chart/HorizontalBarChart.js | 62 - .../widgets/conversation/CannedResponse.vue | 2 +- .../ConversationAdvancedFilter.vue | 24 +- .../conversation/ConversationBasicFilter.vue | 23 +- .../widgets/conversation/ConversationBox.vue | 5 +- .../widgets/conversation/ConversationCard.vue | 12 +- .../conversation/EmailTranscriptModal.vue | 2 +- .../conversation/EmptyState/EmptyState.vue | 4 +- .../EmptyState/EmptyStateMessage.vue | 4 +- .../widgets/conversation/FilterItem.vue | 6 +- .../widgets/conversation/Message.vue | 17 +- .../widgets/conversation/MessagesView.vue | 17 +- .../widgets/conversation/MoreActions.vue | 13 +- .../conversation/OnboardingFeatureCard.vue | 6 +- .../widgets/conversation/OnboardingView.vue | 4 +- .../widgets/conversation/ReplyBox.vue | 60 +- .../widgets/conversation/ReplyEmailHead.vue | 6 +- .../widgets/conversation/TagAgents.vue | 4 +- .../widgets/conversation/VariableList.vue | 2 +- .../WhatsappTemplates/TemplateParser.vue | 2 + .../widgets/conversation/bubble/File.vue | 2 +- .../widgets/conversation/bubble/ReplyTo.vue | 3 +- .../conversation/components/SLACardLabel.vue | 2 +- .../conversation/contextMenu/Index.vue | 15 +- .../conversation/contextMenu/menuItem.vue | 6 +- .../conversation/LabelSuggestion.vue | 3 +- .../conversationBulkActions/Index.vue | 13 +- .../conversationBulkActions/UpdateActions.vue | 2 +- .../conversationCardComponents/CardLabels.vue | 129 +- .../conversation/linear/CreateIssue.vue | 2 +- .../conversation/linear/CreateOrLinkIssue.vue | 5 +- .../widgets/conversation/linear/LinkIssue.vue | 4 +- .../linear/SearchableDropdown.vue | 6 +- .../widgets/conversation/linear/index.vue | 6 +- .../conversation/specs/MoreActions.spec.js | 4 +- .../stories/ContactBubble.stories.js | 28 - .../stories/LocationBubble.stories.js | 34 - .../stories/ReplyEmailHead.stories.js | 27 - .../widgets/forms/AvatarUploader.vue | 2 +- .../components/widgets/forms/Input.vue | 15 +- .../widgets/modal/ConfirmDeleteModal.vue | 4 +- .../modal/WootKeyShortcutModal.stories.js | 17 - .../widgets/modal/WootKeyShortcutModal.vue | 2 +- .../widgets/stories/ThumbnailGroup.stories.js | 69 - .../composables/chatlist/useBulkActions.js | 148 + .../chatlist/useChatListKeyboardEvents.js | 59 + .../spec/useAppearanceHotKeys.spec.js | 4 +- .../spec/useBulkActionsHotKeys.spec.js | 4 +- .../spec/useConversationHotKeys.spec.js | 8 +- .../spec/useGoToCommandHotKeys.spec.js | 8 +- .../commands/spec/useInboxHotKeys.spec.js | 8 +- .../commands/useAppearanceHotKeys.js | 2 +- .../commands/useBulkActionsHotKeys.js | 2 +- .../commands/useConversationHotKeys.js | 4 +- .../commands/useGoToCommandHotKeys.js | 4 +- .../composables/commands/useInboxHotKeys.js | 4 +- app/javascript/dashboard/composables/index.js | 14 +- app/javascript/dashboard/composables/route.js | 30 - .../dashboard/composables/spec/index.spec.js | 11 +- .../dashboard/composables/spec/useAI.spec.js | 4 +- app/javascript/dashboard/composables/store.js | 10 +- app/javascript/dashboard/composables/useAI.js | 5 +- .../dashboard/composables/useAutomation.js | 24 +- .../dashboard/composables/useI18n.js | 32 - app/javascript/dashboard/constants/globals.js | 7 +- .../helper/AnalyticsHelper/plugin.js | 11 - .../DashboardAudioNotificationHelper.js | 59 +- .../dashboard/helper/ReconnectService.js | 8 +- .../dashboard/helper/actionCable.js | 4 +- .../dashboard/helper/directives/resize.js | 41 - .../dashboard/helper/editorHelper.js | 3 +- .../dashboard/i18n/locale/am/report.json | 44 - .../i18n/locale/en/attributesMgmt.json | 12 +- .../dashboard/i18n/locale/en/auditLogs.json | 6 +- .../dashboard/i18n/locale/en/automation.json | 12 +- .../dashboard/i18n/locale/en/cannedMgmt.json | 10 +- .../dashboard/i18n/locale/en/customRole.json | 7 +- .../dashboard/i18n/locale/en/helpCenter.json | 28 +- .../dashboard/i18n/locale/en/inboxMgmt.json | 32 +- .../dashboard/i18n/locale/en/index.js | 10 +- .../i18n/locale/en/integrations.json | 13 +- .../dashboard/i18n/locale/en/labelsMgmt.json | 10 +- .../dashboard/i18n/locale/en/login.json | 2 +- .../dashboard/i18n/locale/en/macros.json | 12 +- .../dashboard/i18n/locale/en/report.json | 34 +- .../dashboard/i18n/locale/en/settings.json | 6 +- .../i18n/locale/en/teamsSettings.json | 61 +- .../modules/contact/ContactMergeModal.vue | 4 +- .../contact/components/AddCustomAttribute.vue | 4 +- .../contact/components/ContactIntro.vue | 2 +- .../contact/components/MergeContact.vue | 10 +- .../stories/AddCustomAttribute.stories.js | 32 - .../stories/ContactAttribute.stories.js | 43 - .../contact/stories/ContactFields.stories.js | 43 - .../contact/stories/ContactIntro.stories.js | 43 - .../contact/stories/MergeContact.stories.js | 32 - .../components/MessageContextMenu.vue | 23 +- .../modules/notes/stories/AddNote.stories.js | 19 - .../notes/stories/ContactNote.stories.js | 52 - .../modules/notes/stories/NoteList.stories.js | 45 - .../search/components/SearchHeader.vue | 2 +- .../modules/search/components/SearchTabs.vue | 3 +- .../modules/search/components/SearchView.vue | 6 +- .../dashboard/modules/search/search.routes.js | 1 - .../search/stories/MessageContent.stories.js | 28 - .../SearchResultContactItem.stories.js | 53 - .../SearchResultConversationItem.stories.js | 50 - .../components/WidgetFooter.vue | 2 +- .../widget-preview/stories/Widget.stories.js | 29 - .../dashboard/routes/dashboard/Dashboard.vue | 29 +- .../commands/CmdBarConversationSnooze.vue | 2 +- .../routes/dashboard/commands/commandbar.vue | 7 +- .../components/AddReminder.stories.js | 41 - .../contacts/components/ContactInfoPanel.vue | 129 +- .../components/ContactsAdvancedFilters.vue | 3 +- .../contacts/components/ContactsTable.vue | 450 +- .../components/ContactsTable/CountryCell.vue | 36 + .../components/ContactsTable/EmailCell.vue | 22 + .../components/ContactsTable/NameCell.vue | 52 + .../components/ContactsTable/ProfilesCell.vue | 33 + .../components/ContactsTable/TelCell.vue | 40 + .../contacts/components/ContactsView.vue | 9 +- .../contacts/components/ImportContacts.vue | 7 +- .../components/ReminderItem.stories.js | 52 - .../components/SectionHeader.stories.js | 22 - .../components/TimelineCard.stories.js | 45 - .../contacts/pages/ContactManageView.vue | 3 +- .../conversation/ContactConversations.vue | 5 +- .../dashboard/conversation/ContactPanel.vue | 422 +- .../conversation/ConversationAction.vue | 9 +- .../conversation/ConversationInfo.vue | 1 + .../conversation/ConversationParticipant.vue | 2 +- .../conversation/ConversationView.vue | 3 +- .../conversation/Macros/MacroItem.vue | 3 +- .../conversation/contact/ContactForm.vue | 12 +- .../conversation/contact/ContactInfo.vue | 13 +- .../conversation/contact/ConversationForm.vue | 61 +- .../customAttributes/CustomAttributes.vue | 4 +- .../conversation/labels/LabelBox.vue | 2 +- .../dashboard/customviews/AddCustomViews.vue | 5 +- .../customviews/DeleteCustomViews.vue | 4 +- .../routes/dashboard/dashboard.routes.js | 2 +- .../helpcenter/components/AddLocale.vue | 6 +- .../helpcenter/components/ArticleEditor.vue | 77 +- .../helpcenter/components/ArticleTable.vue | 36 +- .../components/Header/ArticleHeader.vue | 2 +- .../components/Header/EditArticleHeader.vue | 5 +- .../components/HelpCenterLayout.vue | 16 +- .../helpcenter/components/PortalListItem.vue | 5 +- .../components/PortalSettingsBasicForm.vue | 8 +- .../PortalSettingsCustomizationForm.vue | 6 +- .../helpcenter/components/Sidebar/Sidebar.vue | 6 +- .../helpcenter/components/UpgradePage.vue | 2 +- .../components/stories/AddCategory.stories.js | 30 - .../stories/ArticleEditor.stories.js | 34 - .../stories/ArticleHeader.stories.js | 44 - .../components/stories/ArticleItem.stories.js | 63 - .../ArticleSearchArticleView.stories.js | 33 - .../stories/ArticleSearchHeader.stories.js | 31 - .../ArticleSearchResultItem.stories.js | 56 - .../stories/ArticleTable.stories.js | 72 - .../stories/EditArticleHeader.stories.js | 39 - .../stories/PortalListItem.stories.js | 145 - .../stories/PortalPopover.stories.js | 154 - .../stories/PortalSwitch.stories.js | 58 - .../components/stories/Sidebar.stories.js | 134 - .../pages/articles/ArticleSettings.vue | 5 +- .../helpcenter/pages/articles/EditArticle.vue | 8 +- .../helpcenter/pages/articles/NewArticle.vue | 4 +- .../pages/categories/AddCategory.vue | 14 +- .../pages/categories/CategoryListItem.vue | 2 +- .../pages/categories/EditCategory.vue | 9 +- .../pages/categories/ListAllCategories.vue | 11 +- .../pages/categories/NameEmojiInput.vue | 8 +- .../helpcenter/pages/portals/EditPortal.vue | 3 +- .../pages/portals/EditPortalBasic.vue | 8 +- .../pages/portals/EditPortalCustomization.vue | 8 +- .../pages/portals/EditPortalLocales.vue | 13 +- .../helpcenter/pages/portals/NewPortal.vue | 25 +- .../pages/portals/PortalCustomization.vue | 11 +- .../pages/portals/PortalDetails.vue | 6 +- .../pages/portals/PortalSettingsFinish.vue | 4 +- .../routes/dashboard/inbox/InboxList.vue | 8 +- .../routes/dashboard/inbox/InboxView.vue | 6 +- .../dashboard/inbox/components/InboxCard.vue | 6 +- .../inbox/components/InboxContextMenu.vue | 11 +- .../inbox/components/InboxItemHeader.vue | 9 +- .../inbox/components/InboxListHeader.vue | 4 +- .../inbox/components/InboxOptionMenu.vue | 2 +- .../dashboard/inbox/components/MenuItem.vue | 7 - .../components/NotificationPanel.vue | 6 +- .../components/NotificationTable.vue | 2 +- .../components/NotificationsView.vue | 5 +- .../dashboard/settings/SettingsLayout.vue | 2 +- .../dashboard/settings/SettingsWrapper.vue | 10 +- .../routes/dashboard/settings/Wrapper.vue | 76 +- .../agentBots/components/AgentBotRow.vue | 2 +- .../agentBots/components/CSMLBotEditor.vue | 2 +- .../dashboard/settings/agents/AddAgent.vue | 6 +- .../dashboard/settings/agents/EditAgent.vue | 24 +- .../dashboard/settings/agents/Index.vue | 2 +- .../dashboard/settings/agents/agent.routes.js | 9 +- .../settings/attributes/CustomAttribute.vue | 15 +- .../settings/attributes/EditAttribute.vue | 12 +- .../dashboard/settings/attributes/Index.vue | 5 +- .../settings/attributes/attributes.routes.js | 4 +- .../dashboard/settings/auditlogs/Index.vue | 14 +- .../settings/auditlogs/audit.routes.js | 4 +- .../settings/automation/AutomationRuleRow.vue | 2 +- .../dashboard/settings/automation/Index.vue | 13 +- .../settings/automation/automation.routes.js | 4 +- .../dashboard/settings/billing/Index.vue | 4 +- .../billing/components/BillingItem.vue | 2 +- .../settings/campaigns/AddCampaign.vue | 6 +- .../settings/campaigns/CampaignCard.vue | 84 +- .../settings/campaigns/campaigns.routes.js | 4 +- .../dashboard/settings/canned/AddCanned.vue | 5 +- .../dashboard/settings/canned/EditCanned.vue | 2 +- .../dashboard/settings/canned/Index.vue | 27 +- .../settings/canned/canned.routes.js | 4 +- .../settings/components/BasePaywallModal.vue | 6 +- .../dashboard/settings/customRoles/Index.vue | 13 +- .../customRoles/component/CustomRoleModal.vue | 37 +- .../component/CustomRolePaywall.vue | 17 +- .../component/CustomRoleTableBody.vue | 2 +- ...{channel-factory.js => ChannelFactory.vue} | 30 +- .../dashboard/settings/inbox/ChannelList.vue | 2 +- .../dashboard/settings/inbox/ImapSettings.vue | 2 +- .../settings/inbox/InboxChannels.vue | 20 +- .../routes/dashboard/settings/inbox/Index.vue | 2 +- .../inbox/PreChatForm/PreChatFields.vue | 102 +- .../dashboard/settings/inbox/Settings.vue | 19 +- .../dashboard/settings/inbox/SmtpSettings.vue | 4 +- .../settings/inbox/WidgetBuilder.vue | 12 +- .../inbox/channels/360DialogWhatsapp.vue | 6 +- .../dashboard/settings/inbox/channels/Api.vue | 4 +- .../settings/inbox/channels/BandwidthSms.vue | 12 +- .../settings/inbox/channels/CloudWhatsapp.vue | 10 +- .../settings/inbox/channels/Email.vue | 2 +- .../settings/inbox/channels/Facebook.vue | 6 +- .../settings/inbox/channels/Line.vue | 8 +- .../settings/inbox/channels/Telegram.vue | 2 +- .../settings/inbox/channels/Twilio.vue | 12 +- .../settings/inbox/channels/Website.vue | 10 +- .../emailChannels/ForwardToOption.vue | 4 +- .../inbox/channels/emailChannels/Google.vue | 4 +- .../channels/emailChannels/Microsoft.vue | 4 +- .../inbox/channels/google/Reauthorize.vue | 4 +- .../inbox/channels/microsoft/Reauthorize.vue | 4 +- .../settings/inbox/components/BusinessDay.vue | 100 +- .../settings/inbox/components/ChannelName.vue | 2 +- .../components/InboxReconnectionRequired.vue | 2 +- .../settings/inbox/facebook/Reauthorize.vue | 6 +- .../dashboard/settings/inbox/inbox.routes.js | 10 +- .../inbox/settingsPage/CollaboratorsPage.vue | 6 +- .../inbox/settingsPage/ConfigurationPage.vue | 2 +- .../DashboardApps/DashboardAppModal.vue | 4 +- .../DashboardApps/DashboardAppsRow.vue | 2 +- .../integrations/DashboardApps/Index.vue | 12 +- .../settings/integrations/IntegrationItem.vue | 2 +- .../settings/integrations/NewHook.vue | 68 +- .../settings/integrations/Webhooks/Index.vue | 12 +- .../integrations/Webhooks/WebhookForm.vue | 2 +- .../integrations/Webhooks/WebhookRow.vue | 2 +- .../dashboard/settings/labels/AddLabel.vue | 4 +- .../dashboard/settings/labels/EditLabel.vue | 4 +- .../dashboard/settings/labels/Index.vue | 26 +- .../settings/labels/labels.routes.js | 4 +- .../dashboard/settings/macros/Index.vue | 13 +- .../dashboard/settings/macros/MacroEditor.vue | 4 +- .../dashboard/settings/macros/MacroForm.vue | 7 +- .../dashboard/settings/macros/MacroNode.vue | 20 +- .../dashboard/settings/macros/MacroNodes.vue | 47 +- .../settings/macros/MacroProperties.vue | 4 +- .../settings/macros/MacrosTableRow.vue | 2 +- .../settings/profile/AccessToken.vue | 2 +- .../dashboard/settings/profile/HotKeyCard.vue | 5 +- .../dashboard/settings/profile/Wrapper.vue | 10 +- .../dashboard/settings/reports/BotReports.vue | 4 +- .../settings/reports/CsatResponses.vue | 8 +- .../dashboard/settings/reports/Index.vue | 4 +- .../settings/reports/LiveReports.vue | 25 +- .../settings/reports/ReportContainer.vue | 10 +- .../reports/components/ConversationCell.vue | 27 + .../reports/components/CsatMetrics.vue | 38 +- .../settings/reports/components/CsatTable.vue | 326 +- .../reports/components/Filters/Agents.vue | 2 +- .../reports/components/Filters/Labels.vue | 6 +- .../reports/components/Filters/Ratings.vue | 2 +- .../reports/components/Filters/Teams.vue | 2 +- .../Filters/v3/ActiveFilterChip.vue | 2 +- .../components/Filters/v3/AddFilterChip.vue | 2 +- .../settings/reports/components/Heatmap.vue | 2 +- .../reports/components/ReportFilters.vue | 33 +- .../components/ReportMetricCard.stories.js | 43 - .../reports/components/WootReports.vue | 39 +- .../reports/components/overview/AgentCell.vue | 40 + .../components/overview/AgentTable.vue | 255 +- .../components/overview/MetricCard.vue | 49 +- .../components/specs/ReportMetricCard.spec.js | 4 +- .../dashboard/settings/reports/constants.js | 101 +- .../settings/reports/reports.routes.js | 4 +- .../dashboard/settings/settings.routes.js | 7 +- .../routes/dashboard/settings/sla/AddSLA.vue | 2 +- .../routes/dashboard/settings/sla/Index.vue | 6 +- .../routes/dashboard/settings/sla/SlaForm.vue | 4 +- .../dashboard/settings/sla/SlaTimeInput.vue | 8 +- .../settings/sla/components/SLAHeader.vue | 4 +- .../settings/sla/components/SLAListItem.vue | 2 +- .../sla/components/SLAPaywallEnterprise.vue | 4 +- .../dashboard/settings/sla/sla.routes.js | 4 +- .../dashboard/settings/teams/Create/Index.vue | 17 +- .../dashboard/settings/teams/Edit/Index.vue | 21 +- .../routes/dashboard/settings/teams/Index.vue | 2 +- .../dashboard/settings/teams/TeamForm.vue | 102 +- .../dashboard/settings/teams/teams.routes.js | 4 +- app/javascript/dashboard/routes/index.js | 12 +- app/javascript/dashboard/store/index.js | 6 +- .../dashboard/store/modules/agentBots.js | 6 +- .../dashboard/store/modules/auth.js | 13 +- .../store/modules/contactConversations.js | 14 +- .../dashboard/store/modules/contactLabels.js | 7 +- .../dashboard/store/modules/contactNotes.js | 6 +- .../store/modules/contacts/mutations.js | 31 +- .../store/modules/conversationLabels.js | 8 +- .../store/modules/conversationMetadata.js | 3 +- .../store/modules/conversationPage.js | 18 +- .../store/modules/conversationStats.js | 7 +- .../store/modules/conversationTypingStatus.js | 11 +- .../store/modules/conversationWatchers.js | 6 +- .../store/modules/conversations/actions.js | 5 +- .../store/modules/conversations/index.js | 41 +- .../dashboard/store/modules/draftMessages.js | 10 +- .../modules/helpCenterArticles/mutations.js | 31 +- .../modules/helpCenterCategories/mutations.js | 26 +- .../modules/helpCenterPortals/mutations.js | 53 +- .../store/modules/inboxAssignableAgents.js | 7 +- .../dashboard/store/modules/integrations.js | 26 +- .../store/modules/notifications/mutations.js | 59 +- .../dashboard/store/modules/teamMembers.js | 6 +- .../store/modules/teams/mutations.js | 29 +- .../store/modules/userNotificationSettings.js | 3 +- app/javascript/entrypoints/dashboard.js | 119 + app/javascript/entrypoints/portal.js | 9 + app/javascript/{packs => entrypoints}/sdk.js | 0 .../{packs => entrypoints}/superadmin.js | 0 .../superadmin_pages.js | 24 +- app/javascript/entrypoints/survey.js | 18 + .../{packs => entrypoints}/v3app.js | 56 +- app/javascript/entrypoints/widget.js | 60 + app/javascript/packs/application.js | 114 - app/javascript/packs/portal.js | 16 - app/javascript/packs/survey.js | 26 - app/javascript/packs/widget.js | 64 - .../portal/components/PublicArticleSearch.vue | 26 +- .../portal/components/PublicSearchInput.vue | 59 +- .../portal/components/TableOfContents.vue | 2 +- app/javascript/portal/portalHelpers.js | 34 +- .../shared/assets/fonts/Inter-Bold.woff | Bin 49980 -> 0 bytes .../shared/assets/fonts/Inter-Bold.woff2 | Bin 36252 -> 0 bytes .../shared/assets/fonts/Inter-Italic.woff | Bin 56292 -> 0 bytes .../shared/assets/fonts/Inter-Italic.woff2 | Bin 40724 -> 0 bytes .../shared/assets/fonts/Inter-Light.woff | Bin 48208 -> 0 bytes .../shared/assets/fonts/Inter-Light.woff2 | Bin 34996 -> 0 bytes .../shared/assets/fonts/Inter-Medium.woff | Bin 48292 -> 0 bytes .../shared/assets/fonts/Inter-Medium.woff2 | Bin 35264 -> 0 bytes .../shared/assets/fonts/Inter-Regular.woff | Bin 47540 -> 0 bytes .../shared/assets/fonts/Inter-Regular.woff2 | Bin 34832 -> 0 bytes .../shared/assets/fonts/Inter-SemiBold.woff | Bin 48488 -> 0 bytes .../shared/assets/fonts/Inter-SemiBold.woff2 | Bin 35552 -> 0 bytes .../shared/assets/fonts/Inter-Thin.woff | Bin 45540 -> 0 bytes .../shared/assets/fonts/Inter-Thin.woff2 | Bin 33192 -> 0 bytes .../assets/fonts/Inter/Inter-Black.woff2 | Bin 0 -> 108748 bytes .../fonts/Inter/Inter-BlackItalic.woff2 | Bin 0 -> 115364 bytes .../assets/fonts/Inter/Inter-Bold.woff2 | Bin 0 -> 111040 bytes .../assets/fonts/Inter/Inter-BoldItalic.woff2 | Bin 0 -> 118392 bytes .../assets/fonts/Inter/Inter-ExtraBold.woff2 | Bin 0 -> 111360 bytes .../fonts/Inter/Inter-ExtraBoldItalic.woff2 | Bin 0 -> 118604 bytes .../assets/fonts/Inter/Inter-ExtraLight.woff2 | Bin 0 -> 110176 bytes .../fonts/Inter/Inter-ExtraLightItalic.woff2 | Bin 0 -> 116296 bytes .../assets/fonts/Inter/Inter-Italic.woff2 | Bin 0 -> 114576 bytes .../assets/fonts/Inter/Inter-Light.woff2 | Bin 0 -> 109992 bytes .../fonts/Inter/Inter-LightItalic.woff2 | Bin 0 -> 116516 bytes .../assets/fonts/Inter/Inter-Medium.woff2 | Bin 0 -> 111380 bytes .../fonts/Inter/Inter-MediumItalic.woff2 | Bin 0 -> 118392 bytes .../assets/fonts/Inter/Inter-Regular.woff2 | Bin 0 -> 108488 bytes .../assets/fonts/Inter/Inter-SemiBold.woff2 | Bin 0 -> 111588 bytes .../fonts/Inter/Inter-SemiBoldItalic.woff2 | Bin 0 -> 118216 bytes .../assets/fonts/Inter/Inter-Thin.woff2 | Bin 0 -> 106620 bytes .../assets/fonts/Inter/Inter-ThinItalic.woff2 | Bin 0 -> 113384 bytes .../fonts/InterDisplay/inter-display.scss | 18 +- .../PlusJakartaSans-Bold.woff2 | Bin 42556 -> 0 bytes .../PlusJakartaSans-ExtraBold.woff2 | Bin 41844 -> 0 bytes .../PlusJakartaSans-ExtraLight.woff2 | Bin 41232 -> 0 bytes .../PlusJakartaSans-Italic.woff2 | Bin 43708 -> 0 bytes .../PlusJakartaSans-Light.woff2 | Bin 41888 -> 0 bytes .../PlusJakartaSans-Medium.woff2 | Bin 42528 -> 0 bytes .../PlusJakartaSans-Regular.woff2 | Bin 41576 -> 0 bytes .../PlusJakartaSans-SemiBold.woff2 | Bin 42356 -> 0 bytes app/javascript/shared/assets/fonts/inter.scss | 21 +- .../shared/assets/fonts/plus-jakarta.scss | 63 - .../shared/assets/fonts/widget_fonts.scss | 6 +- .../shared/assets/stylesheets/ionicons.scss | 24 - app/javascript/shared/components/Branding.vue | 2 +- app/javascript/shared/components/Button.vue | 12 +- .../shared/components/CardButton.vue | 3 +- app/javascript/shared/components/ChatCard.vue | 4 +- app/javascript/shared/components/ChatForm.vue | 2 +- .../shared/components/ChatOption.vue | 4 +- .../shared/components/ChatOptions.vue | 9 +- .../CustomerSatisfaction.stories.js | 19 - .../components/CustomerSatisfaction.vue | 5 +- .../shared/components/DateSeparator.vue | 2 +- .../shared/components/ResizableTextArea.vue | 16 +- app/javascript/shared/components/Spinner.vue | 2 +- app/javascript/shared/components/TextArea.vue | 16 +- .../shared/components/charts/BarChart.vue | 77 + .../shared/components/emoji/EmojiInput.vue | 6 +- .../ui/MultiselectDropdown.stories.js | 65 - .../components/ui/MultiselectDropdown.vue | 240 +- .../ui/MultiselectDropdownItems.stories.js | 67 - .../ui/MultiselectDropdownItems.vue | 2 +- .../ui/dropdown/AddLabel.stories.js | 19 - .../ui/label/LabelDropdown.stories.js | 58 - .../components/ui/label/LabelDropdown.vue | 2 +- .../ui/label/LabelDropdownItem.stories.js | 39 - .../components/ui/label/LabelDropdownItem.vue | 4 +- .../composables/specs/useCampaign.spec.js | 4 +- .../composables/specs/useFilter.spec.js | 4 +- .../shared/composables/useCampaign.js | 2 +- .../shared/composables/useFilter.js | 2 +- .../shared/helpers/MessageFormatter.js | 4 +- .../shared/helpers/vuex/mutationHelpers.js | 14 +- .../mixins/keyboardEventListenerMixins.js | 2 +- .../views/dashboard/Index.vue | 72 + app/javascript/survey/App.vue | 4 +- app/javascript/survey/components/Feedback.vue | 9 +- app/javascript/survey/store/index.js | 7 +- app/javascript/survey/views/Response.vue | 6 +- app/javascript/v3/App.vue | 28 +- .../v3/components/Button/SubmitButton.vue | 10 +- app/javascript/v3/components/Form/Button.vue | 10 - app/javascript/v3/components/Form/Input.vue | 110 +- .../v3/components/GoogleOauth/Button.vue | 2 +- .../v3/components/SnackBar/Container.vue | 7 +- app/javascript/v3/store/index.js | 6 +- .../v3/views/auth/password/Edit.vue | 6 +- .../v3/views/auth/reset/password/Index.vue | 20 +- app/javascript/v3/views/auth/signup/Index.vue | 2 +- .../auth/signup/components/Signup/Form.vue | 60 +- .../signup/components/Testimonials/Index.vue | 14 +- app/javascript/v3/views/index.js | 4 +- app/javascript/v3/views/login/Index.vue | 44 +- app/javascript/widget/App.vue | 2 +- .../widget/components/AgentMessage.vue | 4 +- .../widget/components/AgentMessageBubble.vue | 2 +- .../widget/components/AgentTypingBubble.vue | 8 +- .../widget/components/ArticleCategoryCard.vue | 2 +- .../widget/components/ArticleList.vue | 4 +- .../widget/components/ArticleListItem.vue | 2 +- app/javascript/widget/components/Banner.vue | 5 +- .../widget/components/ChatAttachment.vue | 7 +- .../widget/components/ChatFooter.vue | 9 +- .../widget/components/ChatInputWrap.vue | 11 +- .../widget/components/ChatMessage.vue | 2 +- .../widget/components/ChatSendButton.vue | 5 - .../widget/components/ConversationWrap.vue | 5 +- .../widget/components/FileBubble.vue | 3 +- .../widget/components/Form/Input.stories.js | 50 - .../widget/components/Form/PhoneInput.vue | 454 +- .../components/Form/TextArea.stories.js | 51 - .../widget/components/HeaderActions.vue | 3 +- .../widget/components/ImageBubble.vue | 12 +- .../widget/components/MessageReplyButton.vue | 1 - .../widget/components/PreChat/Form.vue | 108 +- .../widget/components/ReplyToChip.vue | 2 +- .../widget/components/UnreadMessage.vue | 14 +- .../widget/components/UnreadMessageList.vue | 6 +- .../widget/components/UserAvatar.vue | 6 +- .../widget/components/UserMessage.vue | 4 +- .../widget/components/UserMessageBubble.vue | 2 +- .../components/dropdown/DropdownMenu.vue | 4 +- .../components/dropdown/DropdownMenuItem.vue | 4 +- .../components/layouts/ViewWithHeader.vue | 6 +- .../components/stories/ArticleHero.stories.js | 30 - .../widget/components/template/Article.vue | 2 +- .../widget/components/template/EmailInput.vue | 4 +- .../components/template/IntegrationCard.vue | 2 +- .../widget/helpers/urlParamsHelper.js | 1 + app/javascript/widget/helpers/utils.js | 6 +- app/javascript/widget/i18n/locale/en.json | 18 +- .../widget/mixins/nextAvailabilityTime.js | 10 +- app/javascript/widget/router.js | 9 +- app/javascript/widget/store/index.js | 7 +- app/javascript/widget/store/modules/agent.js | 7 +- .../widget/store/modules/articles.js | 7 +- .../widget/store/modules/campaign.js | 11 +- .../store/modules/conversation/actions.js | 3 +- .../store/modules/conversation/mutations.js | 37 +- app/javascript/widget/views/Campaigns.vue | 3 +- app/javascript/widget/views/PreChatForm.vue | 5 +- app/models/macro.rb | 2 +- .../installation/onboarding/index.html.erb | 4 +- app/views/layouts/portal.html.erb | 5 +- .../layouts/super_admin/application.html.erb | 4 +- app/views/layouts/vueapp.html.erb | 6 +- .../public/api/v1/portals/_hero.html.erb | 2 +- .../application/_navigation.html.erb | 3 +- .../super_admin/dashboard/index.html.erb | 68 +- .../super_admin/devise/sessions/new.html.erb | 4 +- app/views/survey/responses/show.html.erb | 4 +- app/views/widgets/show.html.erb | 6 +- babel.config.js | 41 - bin/bundle | 110 +- bin/vite | 27 + bin/webpack | 19 - bin/webpack-dev-server | 19 - .../initializers/content_security_policy.rb | 10 +- config/initializers/cypress_on_rails.rb | 9 - config/vite.json | 16 + config/webpack/development.js | 5 - config/webpack/environment.js | 71 - config/webpack/loaders/vue.js | 6 - config/webpack/production.js | 5 - config/webpack/resolve.js | 20 - config/webpack/test.js | 5 - config/webpacker.yml | 119 - lib/tasks/{yarn.rake => build.rake} | 8 +- package.json | 163 +- pnpm-lock.yaml | 8786 +++++++ postcss.config.js | 1 - public/assets/images/auth/google.svg | 1 - public/assets/images/chatwoot_bot.png | Bin 0 -> 2165 bytes public/assets/images/typing.gif | Bin 0 -> 19296 bytes spec/cypress.config.js | 10 - .../app_commands/activerecord_fixtures.rb | 22 - spec/cypress/app_commands/clean.rb | 10 - spec/cypress/app_commands/eval.rb | 1 - spec/cypress/app_commands/factory_bot.rb | 12 - spec/cypress/app_commands/load_seed.rb | 1 - spec/cypress/app_commands/log_fail.rb | 23 - .../cypress/app_commands/scenarios/default.rb | 1 - spec/cypress/cypress_helper.rb | 33 - .../admin_dashboard_authentication.cy.js | 17 - .../admin_dashboard_create_label.cy.js | 28 - spec/cypress/support/commands.js | 25 - spec/cypress/support/e2e.js | 21 - spec/cypress/support/on-rails.js | 54 - stories/Sections/Button.stories.mdx | 185 - stories/Sections/Introduction.stories.mdx | 19 - stories/Sections/Layout.stories.mdx | 23 - tailwind.config.js | 8 + vite.config.ts | 89 +- yarn.lock | 20858 ---------------- 661 files changed, 15939 insertions(+), 31194 deletions(-) delete mode 100644 .storybook/main.js delete mode 100644 .storybook/preview.js delete mode 100644 app/assets/javascripts/dashboardChart.js create mode 100644 app/javascript/dashboard/assets/images/auth/auth--bg.svg create mode 100644 app/javascript/dashboard/assets/images/auth/bottom-right.svg create mode 100644 app/javascript/dashboard/assets/images/auth/top-left.svg delete mode 100644 app/javascript/dashboard/assets/scss/storybook.scss delete mode 100644 app/javascript/dashboard/components/Accordion/AccordionItem.stories.js create mode 100644 app/javascript/dashboard/components/table/BaseCell.vue create mode 100644 app/javascript/dashboard/components/table/Pagination.vue create mode 100644 app/javascript/dashboard/components/table/SortButton.vue create mode 100644 app/javascript/dashboard/components/table/Table.vue delete mode 100644 app/javascript/dashboard/components/ui/Tabs/Tabs.js create mode 100644 app/javascript/dashboard/components/ui/Tabs/Tabs.vue delete mode 100644 app/javascript/dashboard/components/ui/stories/AnnouncementPopup.stories.js delete mode 100644 app/javascript/dashboard/components/ui/stories/Button.stories.js delete mode 100644 app/javascript/dashboard/components/ui/stories/DateRangePicker.stories.js delete mode 100644 app/javascript/dashboard/components/ui/stories/DateTimePicker.stories.js delete mode 100644 app/javascript/dashboard/components/ui/stories/Label.stories.js delete mode 100644 app/javascript/dashboard/components/ui/stories/TimeAgo.stories.js delete mode 100644 app/javascript/dashboard/components/widgets/InboxDropdownItem.stories.js delete mode 100644 app/javascript/dashboard/components/widgets/LabelSelector.stories.js delete mode 100644 app/javascript/dashboard/components/widgets/SettingIntroBanner.stories.js delete mode 100644 app/javascript/dashboard/components/widgets/Thumbnail.stories.js delete mode 100644 app/javascript/dashboard/components/widgets/chart/BarChart.js delete mode 100644 app/javascript/dashboard/components/widgets/chart/HorizontalBarChart.js delete mode 100644 app/javascript/dashboard/components/widgets/conversation/stories/ContactBubble.stories.js delete mode 100644 app/javascript/dashboard/components/widgets/conversation/stories/LocationBubble.stories.js delete mode 100644 app/javascript/dashboard/components/widgets/conversation/stories/ReplyEmailHead.stories.js delete mode 100644 app/javascript/dashboard/components/widgets/modal/WootKeyShortcutModal.stories.js delete mode 100644 app/javascript/dashboard/components/widgets/stories/ThumbnailGroup.stories.js create mode 100644 app/javascript/dashboard/composables/chatlist/useBulkActions.js create mode 100644 app/javascript/dashboard/composables/chatlist/useChatListKeyboardEvents.js delete mode 100644 app/javascript/dashboard/composables/route.js delete mode 100644 app/javascript/dashboard/composables/useI18n.js delete mode 100644 app/javascript/dashboard/helper/AnalyticsHelper/plugin.js delete mode 100644 app/javascript/dashboard/helper/directives/resize.js delete mode 100644 app/javascript/dashboard/modules/contact/stories/AddCustomAttribute.stories.js delete mode 100644 app/javascript/dashboard/modules/contact/stories/ContactAttribute.stories.js delete mode 100644 app/javascript/dashboard/modules/contact/stories/ContactFields.stories.js delete mode 100644 app/javascript/dashboard/modules/contact/stories/ContactIntro.stories.js delete mode 100644 app/javascript/dashboard/modules/contact/stories/MergeContact.stories.js delete mode 100644 app/javascript/dashboard/modules/notes/stories/AddNote.stories.js delete mode 100644 app/javascript/dashboard/modules/notes/stories/ContactNote.stories.js delete mode 100644 app/javascript/dashboard/modules/notes/stories/NoteList.stories.js delete mode 100644 app/javascript/dashboard/modules/search/stories/MessageContent.stories.js delete mode 100644 app/javascript/dashboard/modules/search/stories/SearchResultContactItem.stories.js delete mode 100644 app/javascript/dashboard/modules/search/stories/SearchResultConversationItem.stories.js delete mode 100644 app/javascript/dashboard/modules/widget-preview/stories/Widget.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/AddReminder.stories.js create mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/CountryCell.vue create mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/EmailCell.vue create mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/NameCell.vue create mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/ProfilesCell.vue create mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/ContactsTable/TelCell.vue delete mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/ReminderItem.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/SectionHeader.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/TimelineCard.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/AddCategory.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleEditor.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleHeader.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleItem.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleSearchArticleView.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleSearchHeader.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleSearchResultItem.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleTable.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/EditArticleHeader.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/PortalListItem.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/PortalPopover.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/PortalSwitch.stories.js delete mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/Sidebar.stories.js rename app/javascript/dashboard/routes/dashboard/settings/inbox/{channel-factory.js => ChannelFactory.vue} (63%) create mode 100644 app/javascript/dashboard/routes/dashboard/settings/reports/components/ConversationCell.vue delete mode 100644 app/javascript/dashboard/routes/dashboard/settings/reports/components/ReportMetricCard.stories.js create mode 100644 app/javascript/dashboard/routes/dashboard/settings/reports/components/overview/AgentCell.vue create mode 100644 app/javascript/entrypoints/dashboard.js create mode 100644 app/javascript/entrypoints/portal.js rename app/javascript/{packs => entrypoints}/sdk.js (100%) rename app/javascript/{packs => entrypoints}/superadmin.js (100%) rename app/javascript/{packs => entrypoints}/superadmin_pages.js (51%) create mode 100644 app/javascript/entrypoints/survey.js rename app/javascript/{packs => entrypoints}/v3app.js (52%) create mode 100644 app/javascript/entrypoints/widget.js delete mode 100644 app/javascript/packs/application.js delete mode 100644 app/javascript/packs/portal.js delete mode 100644 app/javascript/packs/survey.js delete mode 100644 app/javascript/packs/widget.js delete mode 100644 app/javascript/shared/assets/fonts/Inter-Bold.woff delete mode 100644 app/javascript/shared/assets/fonts/Inter-Bold.woff2 delete mode 100644 app/javascript/shared/assets/fonts/Inter-Italic.woff delete mode 100644 app/javascript/shared/assets/fonts/Inter-Italic.woff2 delete mode 100644 app/javascript/shared/assets/fonts/Inter-Light.woff delete mode 100644 app/javascript/shared/assets/fonts/Inter-Light.woff2 delete mode 100644 app/javascript/shared/assets/fonts/Inter-Medium.woff delete mode 100644 app/javascript/shared/assets/fonts/Inter-Medium.woff2 delete mode 100644 app/javascript/shared/assets/fonts/Inter-Regular.woff delete mode 100644 app/javascript/shared/assets/fonts/Inter-Regular.woff2 delete mode 100644 app/javascript/shared/assets/fonts/Inter-SemiBold.woff delete mode 100644 app/javascript/shared/assets/fonts/Inter-SemiBold.woff2 delete mode 100644 app/javascript/shared/assets/fonts/Inter-Thin.woff delete mode 100644 app/javascript/shared/assets/fonts/Inter-Thin.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-Black.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-BlackItalic.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-Bold.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-BoldItalic.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-ExtraBold.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-ExtraBoldItalic.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-ExtraLight.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-ExtraLightItalic.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-Italic.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-Light.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-LightItalic.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-Medium.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-MediumItalic.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-Regular.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-SemiBold.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-SemiBoldItalic.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-Thin.woff2 create mode 100644 app/javascript/shared/assets/fonts/Inter/Inter-ThinItalic.woff2 delete mode 100644 app/javascript/shared/assets/fonts/PlusJakartaSans/PlusJakartaSans-Bold.woff2 delete mode 100644 app/javascript/shared/assets/fonts/PlusJakartaSans/PlusJakartaSans-ExtraBold.woff2 delete mode 100644 app/javascript/shared/assets/fonts/PlusJakartaSans/PlusJakartaSans-ExtraLight.woff2 delete mode 100644 app/javascript/shared/assets/fonts/PlusJakartaSans/PlusJakartaSans-Italic.woff2 delete mode 100644 app/javascript/shared/assets/fonts/PlusJakartaSans/PlusJakartaSans-Light.woff2 delete mode 100644 app/javascript/shared/assets/fonts/PlusJakartaSans/PlusJakartaSans-Medium.woff2 delete mode 100644 app/javascript/shared/assets/fonts/PlusJakartaSans/PlusJakartaSans-Regular.woff2 delete mode 100644 app/javascript/shared/assets/fonts/PlusJakartaSans/PlusJakartaSans-SemiBold.woff2 delete mode 100644 app/javascript/shared/assets/fonts/plus-jakarta.scss delete mode 100644 app/javascript/shared/assets/stylesheets/ionicons.scss delete mode 100644 app/javascript/shared/components/CustomerSatisfaction.stories.js create mode 100644 app/javascript/shared/components/charts/BarChart.vue delete mode 100644 app/javascript/shared/components/ui/MultiselectDropdown.stories.js delete mode 100644 app/javascript/shared/components/ui/MultiselectDropdownItems.stories.js delete mode 100644 app/javascript/shared/components/ui/dropdown/AddLabel.stories.js delete mode 100644 app/javascript/shared/components/ui/label/LabelDropdown.stories.js delete mode 100644 app/javascript/shared/components/ui/label/LabelDropdownItem.stories.js create mode 100644 app/javascript/superadmin_pages/views/dashboard/Index.vue delete mode 100644 app/javascript/widget/components/Form/Input.stories.js delete mode 100644 app/javascript/widget/components/Form/TextArea.stories.js delete mode 100644 app/javascript/widget/components/stories/ArticleHero.stories.js delete mode 100644 babel.config.js create mode 100755 bin/vite delete mode 100755 bin/webpack delete mode 100755 bin/webpack-dev-server delete mode 100644 config/initializers/cypress_on_rails.rb create mode 100644 config/vite.json delete mode 100644 config/webpack/development.js delete mode 100644 config/webpack/environment.js delete mode 100644 config/webpack/loaders/vue.js delete mode 100644 config/webpack/production.js delete mode 100644 config/webpack/resolve.js delete mode 100644 config/webpack/test.js delete mode 100644 config/webpacker.yml rename lib/tasks/{yarn.rake => build.rake} (54%) create mode 100644 pnpm-lock.yaml delete mode 100644 public/assets/images/auth/google.svg create mode 100644 public/assets/images/chatwoot_bot.png create mode 100644 public/assets/images/typing.gif delete mode 100644 spec/cypress.config.js delete mode 100644 spec/cypress/app_commands/activerecord_fixtures.rb delete mode 100644 spec/cypress/app_commands/clean.rb delete mode 100644 spec/cypress/app_commands/eval.rb delete mode 100644 spec/cypress/app_commands/factory_bot.rb delete mode 100644 spec/cypress/app_commands/load_seed.rb delete mode 100644 spec/cypress/app_commands/log_fail.rb delete mode 100644 spec/cypress/app_commands/scenarios/default.rb delete mode 100644 spec/cypress/cypress_helper.rb delete mode 100644 spec/cypress/e2e/happy_paths/admin_dashboard_authentication.cy.js delete mode 100644 spec/cypress/e2e/happy_paths/admin_dashboard_create_label.cy.js delete mode 100644 spec/cypress/support/commands.js delete mode 100644 spec/cypress/support/e2e.js delete mode 100644 spec/cypress/support/on-rails.js delete mode 100644 stories/Sections/Button.stories.mdx delete mode 100644 stories/Sections/Introduction.stories.mdx delete mode 100644 stories/Sections/Layout.stories.mdx delete mode 100644 yarn.lock diff --git a/.eslintrc.js b/.eslintrc.js index f3d050ab3..3c191b7b7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,17 +1,6 @@ module.exports = { - extends: [ - 'airbnb-base/legacy', - 'prettier', - 'plugin:vue/recommended', - 'plugin:storybook/recommended', - 'plugin:cypress/recommended', - ], - parserOptions: { - parser: '@babel/eslint-parser', - ecmaVersion: 2020, - sourceType: 'module', - }, - plugins: ['html', 'prettier', 'babel'], + extends: ['airbnb-base/legacy', 'prettier', 'plugin:vue/recommended'], + plugins: ['html', 'prettier'], rules: { 'prettier/prettier': ['error'], camelcase: 'off', @@ -210,13 +199,6 @@ module.exports = { 'import/extensions': ['off'], 'no-console': 'error', }, - settings: { - 'import/resolver': { - webpack: { - config: 'config/webpack/resolve.js', - }, - }, - }, env: { browser: true, node: true, diff --git a/.github/workflows/run_foss_spec.yml b/.github/workflows/run_foss_spec.yml index b0b2372ae..9382ccbf6 100644 --- a/.github/workflows/run_foss_spec.yml +++ b/.github/workflows/run_foss_spec.yml @@ -42,7 +42,9 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 with: + version: 9 ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} @@ -53,10 +55,10 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20 - cache: yarn + cache: 'pnpm' - - name: yarn - run: yarn install + - name: Install pnpm dependencies + run: pnpm i - name: Strip enterprise code run: | @@ -69,9 +71,6 @@ jobs: - name: Seed database run: bundle exec rake db:schema:load - - name: yarn check-files - run: yarn install --check-files - # Run rails tests - name: Run backend tests run: | diff --git a/.gitignore b/.gitignore index 028a97f09..5eb883db0 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,16 @@ master.key public/uploads public/packs* +public/assets/administrate* +public/assets/action*.js +public/assets/activestorage*.js +public/assets/trix* +public/assets/belongs_to*.js +public/assets/manifest*.js +public/assets/manifest*.js +public/assets/*.js.gz +public/assets/secretField* +public/assets/.sprockets-manifest-*.json # VIM files *.swp @@ -75,4 +85,8 @@ yalc.lock yarn-debug.log* .yarn-integrity -/storybook-static \ No newline at end of file +# Vite Ruby +/public/vite* +# Vite uses dotenv and suggests to ignore local-only env files. See +# https://vitejs.dev/guide/env-and-mode.html#env-files +*.local diff --git a/.husky/pre-commit b/.husky/pre-commit index adda426ad..2525dde4e 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,11 +1,11 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" +# #!/bin/sh +# . "$(dirname "$0")/_/husky.sh" -# lint js and vue files -npx --no-install lint-staged +# # lint js and vue files +# npx --no-install lint-staged -# lint only staged ruby files -git diff --name-only --cached | xargs ls -1 2>/dev/null | grep '\.rb$' | xargs bundle exec rubocop --force-exclusion -a +# # lint only staged ruby files +# git diff --name-only --cached | xargs ls -1 2>/dev/null | grep '\.rb$' | xargs bundle exec rubocop --force-exclusion -a -# stage rubocop changes to files -git diff --name-only --cached | xargs git add +# # stage rubocop changes to files +# git diff --name-only --cached | xargs git add diff --git a/.storybook/main.js b/.storybook/main.js deleted file mode 100644 index cb32634c2..000000000 --- a/.storybook/main.js +++ /dev/null @@ -1,56 +0,0 @@ -const path = require('path'); -const resolve = require('../config/webpack/resolve'); - -// Chatwoot's webpack.config.js -process.env.NODE_ENV = 'development'; -const custom = require('../config/webpack/environment'); - -module.exports = { - stories: [ - '../stories/**/*.stories.mdx', - '../app/javascript/**/*.stories.@(js|jsx|ts|tsx)', - ], - addons: [ - { - name: '@storybook/addon-docs', - options: { - vueDocgenOptions: { - alias: { - '@': path.resolve(__dirname, '../'), - }, - }, - }, - }, - '@storybook/addon-links', - '@storybook/addon-essentials', - { - /** - * Fix Storybook issue with PostCSS@8 - * @see https://github.com/storybookjs/storybook/issues/12668#issuecomment-773958085 - */ - name: '@storybook/addon-postcss', - options: { - postcssLoaderOptions: { - implementation: require('postcss'), - }, - }, - }, - ], - webpackFinal: config => { - const newConfig = { - ...config, - resolve: { - ...config.resolve, - modules: custom.resolvedModules.map(i => i.value), - }, - }; - - newConfig.module.rules.push({ - test: /\.scss$/, - use: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'], - include: path.resolve(__dirname, '../app/javascript'), - }); - - return newConfig; - }, -}; diff --git a/.storybook/preview.js b/.storybook/preview.js deleted file mode 100644 index 7c046d51a..000000000 --- a/.storybook/preview.js +++ /dev/null @@ -1,46 +0,0 @@ -import { addDecorator } from '@storybook/vue'; -import Vue from 'vue'; -import Vuex from 'vuex'; -import VueI18n from 'vue-i18n'; -import Multiselect from 'vue-multiselect'; -import VueDOMPurifyHTML from 'vue-dompurify-html'; -import FluentIcon from 'shared/components/FluentIcon/DashboardIcon'; - -import WootUiKit from '../app/javascript/dashboard/components'; -import i18n from '../app/javascript/dashboard/i18n'; -import { domPurifyConfig } from 'shared/helpers/HTMLSanitizer'; - -import '../app/javascript/dashboard/assets/scss/storybook.scss'; - -Vue.use(VueI18n); -Vue.use(WootUiKit); -Vue.use(Vuex); -Vue.use(VueDOMPurifyHTML, domPurifyConfig); - -Vue.component('multiselect', Multiselect); -Vue.component('fluent-icon', FluentIcon); - -const store = new Vuex.Store({}); -const i18nConfig = new VueI18n({ - locale: 'en', - messages: i18n, -}); - -addDecorator(() => ({ - template: '', - i18n: i18nConfig, - store, - beforeCreate: function () { - this.$root._i18n = this.$i18n; - }, -})); - -export const parameters = { - actions: { argTypesRegex: '^on[A-Z].*' }, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/, - }, - }, -}; diff --git a/Gemfile b/Gemfile index ec57da193..2e1e3ec14 100644 --- a/Gemfile +++ b/Gemfile @@ -64,7 +64,7 @@ gem 'activerecord-import' gem 'dotenv-rails', '>= 3.0.0' gem 'foreman' gem 'puma' -gem 'webpacker' +gem 'vite_rails' # metrics on heroku gem 'barnes' @@ -204,8 +204,6 @@ group :development do end group :test do - # Cypress in rails. - gem 'cypress-on-rails' # fast cleaning of database gem 'database_cleaner' # mock http calls diff --git a/Gemfile.lock b/Gemfile.lock index 75fbd2e4f..f54a20aaa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -178,8 +178,6 @@ GEM csv (3.3.0) csv-safe (3.3.1) csv (~> 3.0) - cypress-on-rails (1.16.0) - rack database_cleaner (2.0.2) database_cleaner-active_record (>= 2, < 3) database_cleaner-active_record (2.1.0) @@ -222,6 +220,7 @@ GEM railties (>= 6.1) down (5.4.0) addressable (~> 2.8) + dry-cli (1.1.0) ecma-re-validator (0.4.0) regexp_parser (~> 2.2) elastic-apm (4.6.2) @@ -496,14 +495,14 @@ GEM newrelic_rpm (9.6.0) base64 nio4r (2.7.3) - nokogiri (1.16.6) + nokogiri (1.16.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.6-arm64-darwin) + nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.6-x86_64-darwin) + nokogiri (1.16.7-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.6-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) oauth (1.1.0) oauth-tty (~> 1.0, >= 1.0.1) @@ -557,7 +556,7 @@ GEM pundit (2.3.0) activesupport (>= 3.0.0) raabro (1.4.0) - racc (1.8.0) + racc (1.8.1) rack (2.2.9) rack-attack (6.7.0) rack (>= 1.0, < 4) @@ -570,7 +569,7 @@ GEM rack-protection (3.2.0) base64 (>= 0.1.0) rack (~> 2.2, >= 2.2.4) - rack-proxy (0.7.6) + rack-proxy (0.7.7) rack rack-test (2.1.0) rack (>= 1.3) @@ -709,7 +708,6 @@ GEM activerecord (>= 4) activesupport (>= 4) selectize-rails (0.12.6) - semantic_range (3.0.0) sentry-rails (5.19.0) railties (>= 5.0) sentry-ruby (~> 5.19.0) @@ -800,6 +798,13 @@ GEM activemodel (>= 3.2) mail (~> 2.5) version_gem (1.1.4) + vite_rails (3.0.17) + railties (>= 5.1, < 8) + vite_ruby (~> 3.0, >= 3.2.2) + vite_ruby (3.8.0) + dry-cli (>= 0.7, < 2) + rack-proxy (~> 0.6, >= 0.6.1) + zeitwerk (~> 2.2) warden (1.2.9) rack (>= 2.0.9) web-console (4.2.1) @@ -814,11 +819,6 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webpacker (5.4.4) - activesupport (>= 5.2) - rack-proxy (>= 0.6.1) - railties (>= 5.2) - semantic_range (>= 2.3.0) webrick (1.8.2) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) @@ -827,7 +827,7 @@ GEM working_hours (1.4.1) activesupport (>= 3.2) tzinfo - zeitwerk (2.6.16) + zeitwerk (2.6.17) PLATFORMS arm64-darwin-20 @@ -862,7 +862,6 @@ DEPENDENCIES climate_control commonmarker csv-safe - cypress-on-rails database_cleaner ddtrace debug (~> 1.8) @@ -960,10 +959,10 @@ DEPENDENCIES tzinfo-data uglifier valid_email2 + vite_rails web-console (>= 4.2.1) web-push (>= 3.0.1) webmock - webpacker wisper (= 2.0.0) working_hours diff --git a/Procfile.dev b/Procfile.dev index 73c2af7e8..651b84edd 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,4 +1,4 @@ backend: bin/rails s -p 3000 -frontend: export NODE_OPTIONS=--openssl-legacy-provider && bin/webpack-dev-server # https://github.com/mperham/sidekiq/issues/3090#issuecomment-389748695 worker: dotenv bundle exec sidekiq -C config/sidekiq.yml +vite: bin/vite dev diff --git a/Procfile.test b/Procfile.test index 1770cdbc6..f7ac060ba 100644 --- a/Procfile.test +++ b/Procfile.test @@ -1,3 +1,3 @@ backend: RAILS_ENV=test bin/rails s -p 5050 -frontend: export NODE_OPTIONS=--openssl-legacy-provider && bin/webpack-dev-server +vite: bin/vite dev worker: RAILS_ENV=test dotenv bundle exec sidekiq -C config/sidekiq.yml diff --git a/README.md b/README.md index 152660fb7..3cddf3fb3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ +## 🚨 Note: This branch is unstable. For the stable branch's source code, please use version 3.x + + Chat dashboard dark mode Chat dashboard ___ -# Chatwoot +# Chatwoot Customer engagement suite, an open-source alternative to Intercom, Zendesk, Salesforce Service Cloud etc.

@@ -98,7 +101,7 @@ Chatwoot now supports 1-Click deployment to DigitalOcean as a kubernetes app. ### Other deployment options -For other supported options, checkout our [deployment page](https://chatwoot.com/deploy). +For other supported options, checkout our [deployment page](https://chatwoot.com/deploy). ## Security diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 2cc9549bc..00c9417ba 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -2,5 +2,4 @@ //= link administrate/application.css //= link administrate/application.js //= link administrate-field-active_storage/application.css -//= link dashboardChart.js //= link secretField.js diff --git a/app/assets/javascripts/dashboardChart.js b/app/assets/javascripts/dashboardChart.js deleted file mode 100644 index 46f278b80..000000000 --- a/app/assets/javascripts/dashboardChart.js +++ /dev/null @@ -1,55 +0,0 @@ -// eslint-disable-next-line -function prepareData(data) { - var labels = []; - var dataSet = []; - data.forEach(item => { - labels.push(item[0]); - dataSet.push(item[1]); - }); - return { labels, dataSet }; -} - -function getChartOptions() { - var fontFamily = - 'PlusJakarta,-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; - return { - responsive: true, - legend: { labels: { fontFamily } }, - scales: { - xAxes: [ - { - barPercentage: 1.26, - ticks: { fontFamily }, - gridLines: { display: false }, - }, - ], - yAxes: [ - { - ticks: { fontFamily }, - gridLines: { display: false }, - }, - ], - }, - }; -} - -// eslint-disable-next-line -function drawSuperAdminDashboard(data) { - var ctx = document.getElementById('dashboard-chart').getContext('2d'); - var chartData = prepareData(data); - // eslint-disable-next-line - new Chart(ctx, { - type: 'bar', - data: { - labels: chartData.labels, - datasets: [ - { - label: 'Conversations', - data: chartData.dataSet, - backgroundColor: '#1f93ff', - }, - ], - }, - options: getChartOptions(), - }); -} diff --git a/app/assets/stylesheets/administrate/utilities/_variables.scss b/app/assets/stylesheets/administrate/utilities/_variables.scss index 3a1129c41..9123667e2 100644 --- a/app/assets/stylesheets/administrate/utilities/_variables.scss +++ b/app/assets/stylesheets/administrate/utilities/_variables.scss @@ -86,8 +86,5 @@ $swift-ease-out-duration: .4s !default; $swift-ease-out-timing-function: cubic-bezier(.25, .8, .25, 1) !default; $swift-ease-out: all $swift-ease-out-duration $swift-ease-out-timing-function !default; -// Ionicons -$ionicons-font-path: '~ionicons/fonts'; - // Transitions $transition-ease-in: all 0.250s ease-in; diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 332f1528f..6ddaab73b 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -72,7 +72,7 @@ class DashboardController < ActionController::Base @application_pack = if request.path.include?('/auth') || request.path.include?('/login') 'v3app' else - 'application' + 'dashboard' end end diff --git a/app/javascript/dashboard/App.vue b/app/javascript/dashboard/App.vue index da169d61f..977f8565c 100644 --- a/app/javascript/dashboard/App.vue +++ b/app/javascript/dashboard/App.vue @@ -1,6 +1,5 @@ @@ -34,7 +36,7 @@ export default {