[REF] mail, *: reorganize JS files

Remove "fake" feature sub-folders that make files harder to find.

Note: If there are too many files in the main folder now, a new split
that actually makes sense can be done at a later time: this would not
just be code move, but removing coupling between said feature and the
rest of the code.

Apply consistent structure, where the top level folder is a feature (or
core), and sub-folders are subdivision of the feature depending on
context (closely related to assets bundles).

```
- core
    - common
    - public
    - web
- feature
    - common
    - public
    - web
```

The opportunity is taken to reorganize the top of the files and imports:
- Always use absolute path in imports to be able to find all usages of a
  file with a single search.
- Reorganize imports to group them by module, and to sort them
  alphabetically by path/feature.
- Always use single asterisk (*) for `odoo-module`: less characters yay!
  And double asterisk should be used for JSDoc comments, not for custom
  instructions.

Part of task-3265211

closes odoo/odoo#124168

Related: odoo/enterprise#42121
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
Sébastien Theys
2023-06-08 21:52:44 +02:00
parent 09583d1563
commit 9dba4e0d77
488 changed files with 1436 additions and 1340 deletions
@@ -1,6 +1,6 @@
/** @odoo-module */
import { ActivityListPopoverItem } from "@mail/web/activity/activity_list_popover_item";
import { ActivityListPopoverItem } from "@mail/core/web/activity_list_popover_item";
import { patch } from "@web/core/utils/patch";
patch(ActivityListPopoverItem.prototype, "calendar", {
@@ -1,6 +1,6 @@
/** @odoo-module */
import { ActivityMenu } from "@mail/web/activity/activity_menu";
import { ActivityMenu } from "@mail/core/web/activity_menu";
import { patch } from "@web/core/utils/patch";
import fieldUtils from "web.field_utils";
import { getLangTimeFormat } from "web.time";
@@ -1,6 +1,6 @@
/** @odoo-module */
import { Activity } from "@mail/web/activity/activity";
import { Activity } from "@mail/core/web/activity";
import { useService } from "@web/core/utils/hooks";
import { patch } from "@web/core/utils/patch";
@@ -1,6 +1,6 @@
/** @odoo-module */
import { ActivityService } from "@mail/web/activity/activity_service";
import { ActivityService } from "@mail/core/web/activity_service";
import { patch } from "@web/core/utils/patch";
patch(ActivityService.prototype, "calendar/activity_service", {
+1 -1
View File
@@ -1,6 +1,6 @@
/* @odoo-module */
import { ActivityMenu } from "@mail/web/activity/activity_menu";
import { ActivityMenu } from "@mail/core/web/activity_menu";
import { patch } from "@web/core/utils/patch";
patch(ActivityMenu.prototype, "crm", {
@@ -3,7 +3,7 @@
import { registry } from "@web/core/registry";
import { standardWidgetProps } from "@web/views/widgets/standard_widget_props";
import { useOpenChat } from "@mail/web/open_chat_hook";
import { useOpenChat } from "@mail/core/web/open_chat_hook";
const { Component } = owl;
@@ -8,7 +8,7 @@ import {
KanbanMany2ManyAvatarUser,
ListMany2ManyAvatarUser,
Many2ManyAvatarUser,
} from "@mail/web/fields/m2x_avatar_user";
} from "@mail/views/web/fields/m2x_avatar_user";
// This module defines variants of the Many2OneAvatarUser and Many2ManyAvatarUser
// field widgets, to support fields pointing to 'hr.employee'. It also defines the
@@ -1,6 +1,6 @@
/** @odoo-module */
import { Messaging } from "@mail/core/messaging_service";
import { Messaging } from "@mail/core/common/messaging_service";
import { patch } from "web.utils";
+2 -2
View File
@@ -1,10 +1,10 @@
/** @odoo-module */
import { _t } from "@web/core/l10n/translation";
import { ThreadService } from "@mail/core/thread_service";
import { ThreadService } from "@mail/core/common/thread_service";
import { patch } from "web.utils";
/** @type {import("@mail/core/thread_service").ThreadService} */
/** @type {import("@mail/core/common/thread_service").ThreadService} */
const threadServicePatch = {
async getChat(person) {
const { employeeId } = person;
@@ -7,7 +7,7 @@ import {
many2ManyTagsAvatarUserField,
kanbanMany2ManyTagsAvatarUserField,
listMany2ManyTagsAvatarUserField,
} from "@mail/web/fields/many2many_avatar_user_field/many2many_avatar_user_field";
} from "@mail/views/web/fields/many2many_avatar_user_field/many2many_avatar_user_field";
export class Many2ManyTagsAvatarEmployeeField extends Many2ManyTagsAvatarUserField {
get relation() {
@@ -6,7 +6,7 @@ import {
KanbanMany2OneAvatarUserField,
many2OneAvatarUserField,
kanbanMany2OneAvatarUserField,
} from "@mail/web/fields/many2one_avatar_user_field/many2one_avatar_user_field";
} from "@mail/views/web/fields/many2one_avatar_user_field/many2one_avatar_user_field";
export class Many2OneAvatarEmployeeField extends Many2OneAvatarUserField {
get relation() {
+1 -1
View File
@@ -7,7 +7,7 @@ import { FormController } from "@web/views/form/form_controller";
import { FormRenderer } from "@web/views/form/form_renderer";
import { useArchiveEmployee } from "@hr/views/archive_employee_hook";
import { useOpenChat } from "@mail/web/open_chat_hook";
import { useOpenChat } from "@mail/core/web/open_chat_hook";
export class EmployeeFormController extends FormController {
setup() {
+1 -1
View File
@@ -1,6 +1,6 @@
/** @odoo-module **/
import { helpers } from "@mail/web/open_chat_hook";
import { helpers } from "@mail/core/web/open_chat_hook";
import { patch } from "@web/core/utils/patch";
patch(helpers, "hr_m2x_avatar_employee", {
@@ -1,6 +1,6 @@
/* @odoo-module */
import { personaService, PersonaService } from "@mail/core/persona_service";
import { personaService, PersonaService } from "@mail/core/common/persona_service";
import { deserializeDateTime } from "@web/core/l10n/dates";
import { _t } from "@web/core/l10n/translation";
import { patch } from "@web/core/utils/patch";
@@ -1,6 +1,6 @@
/* @odoo-module */
import { Thread } from "@mail/core_ui/thread";
import { Thread } from "@mail/core/common/thread";
import { useService } from "@web/core/utils/hooks";
import { patch } from "@web/core/utils/patch";
+4 -12
View File
@@ -82,18 +82,10 @@ Help your customers with this chat, and analyse their feedback.
'im_livechat/static/tests/tours/**/*',
],
'im_livechat.assets_core': [
'mail/static/src/core/**/*',
'mail/static/src/core_ui/**/*',
'mail/static/src/utils/**/*',
'mail/static/src/emoji_picker/**/*',
('remove', 'mail/static/src/emoji_picker/emoji_data.js'),
'mail/static/src/attachments/**/*',
'mail/static/src/composer/**/*',
'mail/static/src/dropzone/**/*',
'mail/static/src/chat_window/**/*',
'mail/static/src/web/discuss_app/context_service.js',
'mail/static/src/discuss_app/im_status.*',
'mail/static/src/discuss_app/thread_icon.*',
'mail/static/src/core/common/**/*',
'mail/static/src/utils/common/**/*',
'mail/static/src/core/web/context_service.js',
('remove', 'mail/static/src/core/common/emoji_data.js'),
'im_livechat/static/src/embed/**/*',
'im_livechat/static/src/embed/livechat_data.js',
@@ -1,6 +1,7 @@
/** @odoo-module */
/* @odoo-module */
import { ChatWindow } from "@mail/core/common/chat_window";
import { ChatWindow } from "@mail/chat_window/chat_window";
import { patch } from "@web/core/utils/patch";
patch(ChatWindow.prototype, "im_livechat", {
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import { _t } from "@web/core/l10n/translation";
import { registry } from "@web/core/registry";
@@ -1,6 +1,7 @@
/** @odoo-module */
/* @odoo-module */
import { Composer } from "@mail/core/common/composer";
import { Composer } from "@mail/composer/composer";
import { patch } from "@web/core/utils/patch";
patch(Composer.prototype, "im_livechat", {
@@ -1,9 +1,10 @@
/* @odoo-module */
import { patch } from "@web/core/utils/patch";
import { SuggestionService } from "@mail/composer/suggestion_service";
import { cleanTerm } from "@mail/utils/format";
import { SuggestionService } from "@mail/core/common/suggestion_service";
import { cleanTerm } from "@mail/utils/common/format";
import { _t } from "@web/core/l10n/translation";
import { patch } from "@web/core/utils/patch";
patch(SuggestionService.prototype, "im_livechat", {
getSupportedDelimiters(thread) {
@@ -1,8 +1,9 @@
/** @odoo-module */
/* @odoo-module */
import { Messaging } from "@mail/core/common/messaging_service";
import { createLocalId } from "@mail/utils/common/misc";
import { patch } from "@web/core/utils/patch";
import { Messaging } from "@mail/core/messaging_service";
import { createLocalId } from "@mail/utils/misc";
patch(Messaging.prototype, "im_livechat", {
initMessagingCallback(data) {
@@ -1,6 +1,7 @@
/** @odoo-module */
/* @odoo-module */
import { Store } from "@mail/core/common/store_service";
import { Store } from "@mail/core/store_service";
import { _t } from "@web/core/l10n/translation";
import { patch } from "@web/core/utils/patch";
@@ -1,6 +1,7 @@
/** @odoo-module */
/* @odoo-module */
import { Thread } from "@mail/core/common/thread_model";
import { Thread } from "@mail/core/thread_model";
import { patch } from "@web/core/utils/patch";
patch(Thread.prototype, "im_livechat", {
@@ -50,7 +51,7 @@ patch(Thread.prototype, "im_livechat", {
/**
*
* @param {import("@mail/core/persona_model").Persona} persona
* @param {import("@mail/core/common/persona_model").Persona} persona
*/
getMemberName(persona) {
if (this.type !== "livechat") {
@@ -1,8 +1,9 @@
/** @odoo-module */
/* @odoo-module */
import { ThreadService } from "@mail/core/common/thread_service";
import { removeFromArray } from "@mail/utils/common/arrays";
import { assignDefined, createLocalId } from "@mail/utils/common/misc";
import { ThreadService } from "@mail/core/thread_service";
import { removeFromArray } from "@mail/utils/arrays";
import { assignDefined, createLocalId } from "@mail/utils/misc";
import { patch } from "@web/core/utils/patch";
patch(ThreadService.prototype, "im_livechat", {
@@ -22,7 +23,7 @@ patch(ThreadService.prototype, "im_livechat", {
},
/**
* @override
* @param {import("@mail/core/thread_model").Thread} thread
* @param {import("@mail/core/common/thread_model").Thread} thread
* @param {boolean} pushState
*/
setDiscussThread(thread, pushState) {
@@ -1,6 +1,7 @@
/** @odoo-module */
/* @odoo-module */
import { Sidebar } from "@mail/core/web/sidebar";
import { Sidebar } from "@mail/web/discuss_app/sidebar";
import { patch } from "@web/core/utils/patch";
patch(Sidebar.prototype, "im_livechat", {
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import { serverUrl } from "@im_livechat/embed/livechat_data";
@@ -1,12 +1,15 @@
/** @odoo-module */
/* @odoo-module */
import { SESSION_STATE } from "@im_livechat/embed/core/livechat_service";
import { FeedbackPanel } from "@im_livechat/embed/feedback_panel/feedback_panel";
import { ChatWindow } from "@mail/core/common/chat_window";
import { ChatWindow } from "@mail/chat_window/chat_window";
import { FeedbackPanel } from "../feedback_panel/feedback_panel";
import { patch } from "@web/core/utils/patch";
import { useService } from "@web/core/utils/hooks";
import { SESSION_STATE } from "../core/livechat_service";
import { useState } from "@odoo/owl";
import { useService } from "@web/core/utils/hooks";
import { patch } from "@web/core/utils/patch";
Object.assign(ChatWindow.components, { FeedbackPanel });
patch(ChatWindow.prototype, "im_livechat", {
@@ -1,13 +1,13 @@
/* @odoo-module */
import { assignDefined } from "@mail/utils/misc";
import { assignDefined } from "@mail/utils/common/misc";
/**
* @typedef IChatbot
* @property {string} chatbot_name
* @property {number} chatbot_operator_partner_id
* @property {number} chatbot_script_id
* @property {import("./chatbot_step_model").IChatbotStep[]} chatbot_welcome_steps
* @property {import("@im_livechat/embed/chatbot/chatbot_step_model").IChatbotStep[]} chatbot_welcome_steps
* @property {number} [welcome_step_index]
*/
@@ -20,7 +20,7 @@ export class Chatbot {
welcomeStepIndex = 0;
/** @type {number} */
scriptId;
/** @type {import("./chatbot_step_model").IChatbotStep[]} */
/** @type {import("@im_livechat/embed/chatbot/chatbot_step_model").IChatbotStep[]} */
welcomeSteps = [];
/**
@@ -1,15 +1,15 @@
/* @odoo-module */
import { ChatbotStep } from "@im_livechat/embed/chatbot/chatbot_step_model";
import { Chatbot } from "@im_livechat/embed/chatbot/chatbot_model";
import { ChatbotStep } from "@im_livechat/embed/chatbot/chatbot_step_model";
import { SESSION_STATE } from "@im_livechat/embed/core/livechat_service";
import { EventBus, markup, reactive } from "@odoo/owl";
import { _t } from "@web/core/l10n/translation";
import { browser } from "@web/core/browser/browser";
import { debounce } from "@web/core/utils/timing";
import { _t } from "@web/core/l10n/translation";
import { registry } from "@web/core/registry";
import { debounce } from "@web/core/utils/timing";
const MESSAGE_DELAY = 1500;
// Time between two messages coming from the bot.
@@ -38,8 +38,8 @@ export class ChatBotService {
* @param {import("@web/env").OdooEnv} env
* @param {{
* "im_livechat.livechat": import("@im_livechat/embed/core/livechat_service").LivechatService,
* "mail.message": import("@mail/core/message_service").MessageService,
* "mail.store": import("@mail/core/store_service").Store,
* "mail.message": import("@mail/core/common/message_service").MessageService,
* "mail.store": import("@mail/core/common/store_service").Store,
* rpc: typeof import("@web/core/network/rpc_service").rpcService.start,
* }} services
*/
@@ -219,7 +219,7 @@ export class ChatBotService {
/**
* Process the user answer and trigger the next step.
*
* @param {import("@mail/core/message_model").Message} message
* @param {import("@mail/core/common/message_model").Message} message
*/
async _processUserAnswer(message) {
if (
@@ -269,7 +269,7 @@ export class ChatBotService {
}
/**
* @param {import("@mail/core/thread_model").Thread} thread
* @param {import("@mail/core/common/thread_model").Thread} thread
*/
isChatbotThread(thread) {
return thread?.operator.id === this.chatbot?.partnerId;
@@ -1,6 +1,6 @@
/* @odoo-module */
import { assignDefined } from "@mail/utils/misc";
import { assignDefined } from "@mail/utils/common/misc";
/**
* @typedef StepAnswer
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import { browser } from "@web/core/browser/browser";
import { registry } from "@web/core/registry";
@@ -11,8 +11,8 @@ export class AutopopupService {
* @param {{
* "im_livechat.chatbot": import("@im_livechat/embed/chatbot/chatbot_service").ChatBotService,
* "im_livechat.livechat": import("@im_livechat/embed/core/livechat_service").LivechatService,
* "mail.thread": import("@mail/core/thread_service").ThreadService,
* "mail.store": import("@mail/core/store_service").Store,
* "mail.thread": import("@mail/core/common/thread_service").ThreadService,
* "mail.store": import("@mail/core/common/store_service").Store,
* cookie: typeof import("@web/core/browser/cookie_service").cookieService.start,
* ui: typeof import("@web/core/ui/ui_service").uiService.start,
* }} services
@@ -1,9 +1,11 @@
/** @odoo-module */
/* @odoo-module */
import { Composer } from "@mail/composer/composer";
import { patch } from "@web/core/utils/patch";
import { options } from "@im_livechat/embed/livechat_data";
import { Composer } from "@mail/core/common/composer";
import { _t } from "@web/core/l10n/translation";
import { patch } from "@web/core/utils/patch";
patch(Composer.prototype, "im_livechat", {
get placeholder() {
@@ -1,12 +1,13 @@
/** @odoo-module */
/* @odoo-module */
import { ChatWindowService } from "@mail/core/common/chat_window_service";
import { Composer } from "@mail/core/common/composer";
import { Message as MessageModel } from "@mail/core/common/message_model";
import { Store } from "@mail/core/common/store_service";
import { Thread } from "@mail/core/common/thread_model";
import { ThreadService } from "@mail/core/common/thread_service";
import { ChatWindowService } from "@mail/chat_window/chat_window_service";
import { Composer } from "@mail/composer/composer";
import { Message as MessageModel } from "@mail/core/message_model";
import { Thread } from "@mail/core/thread_model";
import { patch } from "@web/core/utils/patch";
import { ThreadService } from "@mail/core/thread_service";
import { Store } from "@mail/core/store_service";
patch(ChatWindowService.prototype, "im_livechat/disabled", {
notifyState() {
@@ -2,11 +2,11 @@
import { reactive } from "@odoo/owl";
import { registry } from "@web/core/registry";
import { _t } from "@web/core/l10n/translation";
import { session } from "@web/session";
import { sprintf } from "@web/core/utils/strings";
import { registry } from "@web/core/registry";
import { Deferred } from "@web/core/utils/concurrency";
import { sprintf } from "@web/core/utils/strings";
import { session } from "@web/session";
/**
* @typedef LivechatRule
@@ -57,8 +57,8 @@ export class LivechatService {
* cookie: typeof import("@web/core/browser/cookie_service").cookieService.start,
* bus_service: typeof import("@bus/services/bus_service").busService.start,
* rpc: typeof import("@web/core/network/rpc_service").rpcService.start,
* "mail.message": import("@mail/core/message_service").MessageService,
* "mail.store": import("@mail/core/store_service").Store
* "mail.message": import("@mail/core/common/message_service").MessageService,
* "mail.store": import("@mail/core/common/store_service").Store
* }} services
*/
setup(env, services) {
@@ -213,7 +213,7 @@ export class LivechatService {
}
/**
* @returns {import("@mail/core/thread_model").Thread|undefined}
* @returns {import("@mail/core/common/thread_model").Thread|undefined}
*/
get thread() {
return Object.values(this.store.threads).find(({ type }) => type === "livechat");
@@ -1,6 +1,8 @@
/** @odoo-module */
/* @odoo-module */
import { Message } from "@mail/core/common/message_model";
import { patch } from "@web/core/utils/patch";
import { Message } from "@mail/core/message_model";
import { session } from "@web/session";
patch(Message.prototype, "im_livechat", {
@@ -1,9 +1,11 @@
/** @odoo-module */
/* @odoo-module */
import { MessageService } from "@mail/core/message_service";
import { patch } from "@web/core/utils/patch";
import { ChatbotStep } from "@im_livechat/embed/chatbot/chatbot_step_model";
import { MessageService } from "@mail/core/common/message_service";
import { patch } from "@web/core/utils/patch";
patch(MessageService.prototype, "im_livechat", {
insert(data) {
const message = this._super(data);
@@ -1,6 +1,7 @@
/** @odoo-module */
/* @odoo-module */
import { Messaging } from "@mail/core/common/messaging_service";
import { Messaging } from "@mail/core/messaging_service";
import { patch } from "@web/core/utils/patch";
import { session } from "@web/session";
@@ -1,8 +1,9 @@
/** @odoo-module */
/* @odoo-module */
import { Thread } from "@mail/core/common/thread_model";
import { session } from "@web/session";
import { Thread } from "@mail/core/thread_model";
import { patch } from "@web/core/utils/patch";
import { session } from "@web/session";
patch(Thread.prototype, "im_livechat", {
chatbotScriptId: null,
@@ -1,10 +1,13 @@
/* @odoo-module */
import { SESSION_STATE } from "@im_livechat/embed/core/livechat_service";
import { ThreadService, threadService } from "@mail/core/thread_service";
import { prettifyMessageContent } from "@mail/utils/format";
import { createLocalId, onChange } from "@mail/utils/misc";
import { ThreadService, threadService } from "@mail/core/common/thread_service";
import { prettifyMessageContent } from "@mail/utils/common/format";
import { createLocalId, onChange } from "@mail/utils/common/misc";
import { markup } from "@odoo/owl";
import { _t } from "@web/core/l10n/translation";
import { patch } from "@web/core/utils/patch";
import { session } from "@web/session";
@@ -24,7 +27,7 @@ patch(ThreadService.prototype, "im_livechat", {
* @param {{
* "im_livechat.chatbot": import("@im_livechat/embed/chatbot/chatbot_service").ChatBotService,
* "im_livechat.livechat": import("@im_livechat/embed/core/livechat_service").LivechatService,
* "mail.chat_window": import("@mail/chat_window/chat_window_service").ChatWindowService,
* "mail.chat_window": import("@mail/core/common/chat_window_service").ChatWindowService,
* notification: typeof import("@web/core/notifications/notification_service").notificationService.start,
* }} services
*/
@@ -54,7 +57,7 @@ patch(ThreadService.prototype, "im_livechat", {
},
/**
* @returns {Promise<import("@mail/core/message_model").Message}
* @returns {Promise<import("@mail/core/common/message_model").Message}
*/
async post(thread, body, params) {
const _super = this._super;
@@ -181,7 +184,7 @@ patch(ThreadService.prototype, "im_livechat", {
/**
* @param {Object} param0
* @param {boolean} param0.persisted
* @returns {Promise<import("@mail/core/thread_model").Thread?>}
* @returns {Promise<import("@mail/core/common/thread_model").Thread?>}
*/
async getLivechatThread({ persisted = false } = {}) {
const session = await this.livechatService.getSession({ persisted });
@@ -1,10 +1,13 @@
/** @odoo-module */
/* @odoo-module */
import { SESSION_STATE } from "@im_livechat/embed/core/livechat_service";
import { useStore } from "@mail/core/common/messaging_hook";
import { useStore } from "@mail/core/messaging_hook";
import { Component, useState } from "@odoo/owl";
import { useService } from "@web/core/utils/hooks";
import { debounce } from "@web/core/utils/timing";
import { SESSION_STATE } from "@im_livechat/embed/core/livechat_service";
export class LivechatButton extends Component {
static template = "im_livechat.LivechatButton";
@@ -1,6 +1,7 @@
/** @odoo-module */
/* @odoo-module */
import { Message } from "@mail/core/common/message";
import { Message } from "@mail/core_ui/message";
import { patch } from "@web/core/utils/patch";
import { session } from "@web/session";
@@ -1,7 +1,9 @@
/* @odoo-module */
import { Thread } from "@mail/core_ui/thread";
import { Thread } from "@mail/core/common/thread";
import { useState } from "@odoo/owl";
import { useService } from "@web/core/utils/hooks";
import { patch } from "@web/core/utils/patch";
import { session } from "@web/session";
+7 -4
View File
@@ -1,16 +1,19 @@
/* @odoo-module */
import { serverUrl } from "@im_livechat/embed/livechat_data";
import { makeShadow, makeRoot } from "@im_livechat/embed/boot_helpers";
import { LivechatButton } from "@im_livechat/embed/core_ui/livechat_button";
import { ChatWindowContainer } from "@mail/chat_window/chat_window_container";
import { makeShadow, makeRoot } from "@im_livechat/embed/boot_helpers";
import { serverUrl } from "@im_livechat/embed/livechat_data";
import { ChatWindowContainer } from "@mail/core/common/chat_window_container";
import { mount, whenReady } from "@odoo/owl";
import { templates } from "@web/core/assets";
import { browser } from "@web/core/browser/browser";
import { MainComponentsContainer } from "@web/core/main_components_container";
import { jsonrpc } from "@web/core/network/rpc_service";
import { registry } from "@web/core/registry";
import { makeEnv, startServices } from "@web/env";
import { templates } from "@web/core/assets";
import { session } from "@web/session";
(async function boot() {
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import { busParametersService } from "@bus/bus_parameters_service";
@@ -1,10 +1,10 @@
/** @odoo-module */
/* @odoo-module */
import { loader } from "@mail/emoji_picker/emoji_picker";
import { loader } from "@mail/core/common/emoji_picker";
import { loadBundle } from "@web/core/assets";
import { patch } from "@web/core/utils/patch";
import { memoize } from "@web/core/utils/functions";
import { patch } from "@web/core/utils/patch";
import { session } from "@web/session";
patch(loader, "im_livechat/emoji_loader", {
@@ -1,15 +1,17 @@
/** @odoo-module */
/* @odoo-module */
import { RATING } from "@im_livechat/embed/core/livechat_service";
import { TranscriptSender } from "@im_livechat/embed/feedback_panel/transcript_sender";
import { Component, useState } from "@odoo/owl";
import { session } from "@web/session";
import { TranscriptSender } from "./transcript_sender";
import { RATING } from "../core/livechat_service";
/**
* @typedef {Object} Props
* @property {Function} [onClickClose]
* @property {Function} [sendFeedback]
* @property {import("@mail/core/thread_model").Thread}
* @property {import("@mail/core/common/thread_model").Thread}
* @extends {Component<Props, Env>}
*/
export class FeedbackPanel extends Component {
@@ -1,12 +1,14 @@
/** @odoo-module */
/* @odoo-module */
import { isValidEmail } from "@im_livechat/embed/core/misc";
import { Component, useState } from "@odoo/owl";
import { useService } from "@web/core/utils/hooks";
import { isValidEmail } from "../core/misc";
/**
* @typedef {Object} Props
* @property {import("@mail/core/thread_model").Thread}
* @property {import("@mail/core/common/thread_model").Thread}
* @extends {Component<Props, Env>}
*/
export class TranscriptSender extends Component {
@@ -1,9 +1,11 @@
/** @odoo-module */
/* @odoo-module */
import { makeRoot, makeShadow } from "@im_livechat/embed/boot_helpers";
import { LivechatRoot } from "@im_livechat/embed/frontend/livechat_root";
import { serverUrl, isAvailable } from "@im_livechat/embed/livechat_data";
import { App } from "@odoo/owl";
import { templates } from "@web/core/assets";
import { registry } from "@web/core/registry";
import { session } from "@web/session";
@@ -1,7 +1,9 @@
/** @odoo-module */
/* @odoo-module */
import { LivechatButton } from "@im_livechat/embed/core_ui/livechat_button";
import { ChatWindowContainer } from "@mail/chat_window/chat_window_container";
import { ChatWindowContainer } from "@mail/core/common/chat_window_container";
import { Component, xml } from "@odoo/owl";
export class LivechatRoot extends Component {
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import { session } from "@web/session";
@@ -1,4 +1,4 @@
/** @odoo-module **/
/* @odoo-module */
import { assets } from "@web/core/assets";
@@ -1,4 +1,4 @@
/** @odoo-module **/
/* @odoo-module */
import { registry } from "@web/core/registry";
import { standardWidgetProps } from "@web/views/widgets/standard_widget_props";
@@ -1,4 +1,4 @@
/** @odoo-module **/
/* @odoo-module */
import { registry } from "@web/core/registry";
import {
@@ -1,6 +1,5 @@
/** @odoo-module */
/* @odoo-module */
import { ListRenderer } from "@web/views/list/list_renderer";
import { registry } from "@web/core/registry";
import { patch } from "@web/core/utils/patch";
import {
@@ -9,6 +8,7 @@ import {
X2ManyFieldDialog,
} from "@web/views/fields/relational_utils";
import { X2ManyField, x2ManyField } from "@web/views/fields/x2many/x2many_field";
import { ListRenderer } from "@web/views/list/list_renderer";
const fieldRegistry = registry.category("fields");
@@ -1,6 +1,7 @@
/** @odoo-module */
/* @odoo-module */
import { MessagingMenu } from "@mail/core/web/messaging_menu";
import { MessagingMenu } from "@mail/web/messaging_menu/messaging_menu";
import { _t } from "@web/core/l10n/translation";
import { patch } from "@web/core/utils/patch";
@@ -1,7 +1,8 @@
/** @odoo-module **/
/* @odoo-module */
import { Message } from "@mail/core/common/message";
import { patch } from "@web/core/utils/patch";
import { Message } from "@mail/core_ui/message";
patch(Message.prototype, "im_livechat/web", {
get hasAuthorClickable() {
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import { click, start, startServer } from "@mail/../tests/helpers/test_utils";
@@ -1,13 +1,15 @@
/** @odoo-module */
/* @odoo-module */
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
import {
afterNextRender,
insertText,
click,
dragenterFiles,
insertText,
start,
} from "@mail/../tests/helpers/test_utils";
import { editInput, nextTick, triggerHotkey } from "@web/../tests/helpers/utils";
QUnit.module("composer (patch)");
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import {
afterNextRender,
@@ -1,4 +1,4 @@
/** @odoo-module **/
/* @odoo-module */
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
@@ -1,9 +1,12 @@
/** @odoo-module **/
/* @odoo-module */
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
import { RATING, RATING_TO_EMOJI } from "@im_livechat/embed/core/livechat_service";
import { start, loadDefaultConfig } from "@im_livechat/../tests/embed/helper/test_utils";
import { loadDefaultConfig, start } from "@im_livechat/../tests/embed/helper/test_utils";
import { afterNextRender, click, insertText } from "@mail/../tests/helpers/test_utils";
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
import { triggerHotkey } from "@web/../tests/helpers/utils";
QUnit.module("feedback panel");
@@ -3,11 +3,11 @@
import { getPyEnv } from "@bus/../tests/helpers/mock_python_environment";
import { chatBotService } from "@im_livechat/embed/chatbot/chatbot_service";
import { livechatService } from "@im_livechat/embed/core/livechat_service";
import { autoPopupService } from "@im_livechat/embed/core/autopopup_service";
import { livechatService } from "@im_livechat/embed/core/livechat_service";
import { LivechatButton } from "@im_livechat/embed/core_ui/livechat_button";
import { ChatWindowContainer } from "@mail/chat_window/chat_window_container";
import { ChatWindowContainer } from "@mail/core/common/chat_window_container";
import { setupManager } from "@mail/../tests/helpers/webclient_setup";
import { App, onMounted } from "@odoo/owl";
@@ -15,10 +15,10 @@ import { App, onMounted } from "@odoo/owl";
import { registry } from "@web/core/registry";
import { patch } from "@web/core/utils/patch";
import { session } from "@web/session";
import { fakeCookieService } from "@web/../tests/helpers/mock_services";
import { createWebClient } from "@web/../tests/webclient/helpers";
import { registerCleanup } from "@web/../tests/helpers/cleanup";
import { fakeCookieService } from "@web/../tests/helpers/mock_services";
import { patchWithCleanup, makeDeferred } from "@web/../tests/helpers/utils";
import { createWebClient } from "@web/../tests/webclient/helpers";
// =============================================================================
// HELPERS
@@ -1,8 +1,11 @@
/** @odoo-module */
/* @odoo-module */
import { start, loadDefaultConfig } from "@im_livechat/../tests/embed/helper/test_utils";
import { afterNextRender, click, insertText } from "@mail/../tests/helpers/test_utils";
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
import { loadDefaultConfig, start } from "@im_livechat/../tests/embed/helper/test_utils";
import { afterNextRender, click, insertText } from "@mail/../tests/helpers/test_utils";
import { triggerHotkey } from "@web/../tests/helpers/utils";
QUnit.test("open/close temporary channel", async (assert) => {
@@ -1,11 +1,11 @@
/** @odoo-module **/
/* @odoo-module */
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
import { loadDefaultConfig, start, setCookie } from "@im_livechat/../tests/embed/helper/test_utils";
import { loadDefaultConfig, setCookie, start } from "@im_livechat/../tests/embed/helper/test_utils";
import { click } from "@mail/../tests/helpers/test_utils";
import { Command } from "@mail/../tests/helpers/command";
import { click } from "@mail/../tests/helpers/test_utils";
QUnit.module("livechat service");
@@ -1,10 +1,11 @@
/* @odoo-module */
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
import { loadDefaultConfig, start, setCookie } from "@im_livechat/../tests/embed/helper/test_utils";
import { afterNextRender, insertText } from "@mail/../tests/helpers/test_utils";
import { loadDefaultConfig, setCookie, start } from "@im_livechat/../tests/embed/helper/test_utils";
import { Command } from "@mail/../tests/helpers/command";
import { afterNextRender, insertText } from "@mail/../tests/helpers/test_utils";
import { triggerHotkey } from "@web/../tests/helpers/utils";
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import {
addModelNamesToFetch,
@@ -1,8 +1,11 @@
/** @odoo-module **/
/* @odoo-module */
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
import { start, loadDefaultConfig } from "@im_livechat/../tests/embed/helper/test_utils";
import { loadDefaultConfig, start } from "@im_livechat/../tests/embed/helper/test_utils";
import { afterNextRender, click, insertText } from "@mail/../tests/helpers/test_utils";
import { triggerHotkey } from "@web/../tests/helpers/utils";
QUnit.module("transcript sender");
@@ -1,8 +1,8 @@
/** @odoo-module **/
/* @odoo-module */
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
import { setCookie, start, loadDefaultConfig } from "@im_livechat/../tests/embed/helper/test_utils";
import { loadDefaultConfig, setCookie, start } from "@im_livechat/../tests/embed/helper/test_utils";
import { Command } from "@mail/../tests/helpers/command";
import { afterNextRender, waitUntil } from "@mail/../tests/helpers/test_utils";
@@ -1,4 +1,4 @@
/** @odoo-module **/
/* @odoo-module */
import { patch } from "@web/core/utils/patch";
import { MockServer } from "@web/../tests/helpers/mock_server";
@@ -1,4 +1,4 @@
/** @odoo-module **/
/* @odoo-module */
import "@mail/../tests/helpers/mock_server/models/discuss_channel"; // ensure mail overrides are applied first
@@ -1,4 +1,4 @@
/** @odoo-module **/
/* @odoo-module */
import "@mail/../tests/helpers/mock_server/models/discuss_channel_member"; // ensure mail overrides are applied first
@@ -1,4 +1,4 @@
/** @odoo-module **/
/* @odoo-module */
import { patch } from "@web/core/utils/patch";
import { MockServer } from "@web/../tests/helpers/mock_server";
@@ -1,4 +1,4 @@
/** @odoo-module **/
/* @odoo-module */
import "@mail/../tests/helpers/mock_server/models/res_partner"; // ensure mail overrides are applied first
@@ -1,4 +1,4 @@
/** @odoo-module **/
/* @odoo-module */
import {
addModelNamesToFetch,
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import { click, start, startServer } from "@mail/../tests/helpers/test_utils";
@@ -1,8 +1,10 @@
/** @odoo-module */
/* @odoo-module */
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
import { makeFakePresenceService } from "@bus/../tests/helpers/mock_services";
import { start } from "@mail/../tests/helpers/test_utils";
import { makeFakeNotificationService } from "@web/../tests/helpers/mock_services";
import { nextTick } from "@web/../tests/helpers/utils";
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import { patchUiSize, SIZES } from "@mail/../tests/helpers/patch_ui_size";
import { click, start, startServer } from "@mail/../tests/helpers/test_utils";
@@ -1,10 +1,10 @@
/** @odoo-module */
import { nextTick } from "@web/../tests/helpers/utils";
import { makeFakeNotificationService } from "@web/../tests/helpers/mock_services";
/* @odoo-module */
import { afterNextRender, click, start, startServer } from "@mail/../tests/helpers/test_utils";
import { makeFakeNotificationService } from "@web/../tests/helpers/mock_services";
import { nextTick } from "@web/../tests/helpers/utils";
QUnit.module("discuss sidebar (patch)");
QUnit.test("Unknown visitor", async (assert) => {
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import { afterNextRender, start, startServer } from "@mail/../tests/helpers/test_utils";
@@ -1,4 +1,4 @@
/** @odoo-module */
/* @odoo-module */
import { registry } from "@web/core/registry";
@@ -1,6 +1,7 @@
/** @odoo-module */
/* @odoo-module */
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";
const commonSteps = [
+20 -17
View File
@@ -125,15 +125,19 @@ For more specific needs, you may also assign custom-defined actions
'mail/static/src/scss/variables/derived_variables.scss',
'mail/static/src/scss/*.scss',
'mail/static/lib/**/*',
'mail/static/src/**/*',
('remove', 'mail/static/src/worklets/**/*'),
('remove', 'mail/static/src/**/public/**/*'),
'mail/static/src/js/**/*',
'mail/static/src/core/common/**/*',
'mail/static/src/core/web/**/*',
'mail/static/src/**/common/**/*',
'mail/static/src/**/web/**/*',
('remove', 'mail/static/src/**/*.dark.scss'),
('remove', 'mail/static/src/emoji_picker/emoji_data.js'),
('remove', 'mail/static/src/core/common/emoji_data.js'),
# discuss (loaded last to fix dependencies)
('remove', 'mail/static/src/discuss/**/*'),
'mail/static/src/discuss/**/*',
('remove', 'mail/static/src/discuss/**/public/**/*'),
'mail/static/src/discuss/core/common/**/*',
'mail/static/src/discuss/core/web/**/*',
'mail/static/src/discuss/**/common/**/*',
'mail/static/src/discuss/**/web/**/*',
('remove', 'mail/static/src/discuss/**/*.dark.scss'),
],
"web.dark_mode_assets_backend": [
@@ -156,7 +160,7 @@ For more specific needs, you may also assign custom-defined actions
('remove', 'mail/static/tests/helpers/**/*'),
],
'mail.assets_emoji': [
'mail/static/src/emoji_picker/emoji_data.js',
'mail/static/src/core/common/emoji_data.js',
],
'mail.assets_public': [
('include', 'web._assets_helpers'),
@@ -180,19 +184,18 @@ For more specific needs, you may also assign custom-defined actions
'web/static/src/legacy/legacy_load_views.js',
'web/static/src/legacy/utils.js',
'mail/static/src/**/*',
('remove', 'mail/static/src/js/**/*'),
('remove', 'mail/static/src/scss/**/*'),
('remove', 'mail/static/src/xml/**/*'),
('remove', 'mail/static/src/worklets/**/*'),
('remove', 'mail/static/src/views/**/*'),
('remove', 'mail/static/src/**/web/**/*'),
('remove', 'mail/static/src/emoji_picker/emoji_data.js'),
'mail/static/src/core/common/**/*',
'mail/static/src/core/public/**/*',
'mail/static/src/**/common/**/*',
'mail/static/src/**/public/**/*',
('remove', 'mail/static/src/core/common/emoji_data.js'),
('remove', 'mail/static/src/**/*.dark.scss'),
# discuss (loaded last to fix dependencies)
('remove', 'mail/static/src/discuss/**/*'),
'mail/static/src/discuss/**/*',
('remove', 'mail/static/src/discuss/**/web/**/*'),
'mail/static/src/discuss/core/common/**/*',
# 'mail/static/src/discuss/core/public/**/*',
'mail/static/src/discuss/**/common/**/*',
'mail/static/src/discuss/**/public/**/*',
('remove', 'mail/static/src/discuss/**/*.dark.scss'),
]
},
@@ -3,16 +3,15 @@
import { Component } from "@odoo/owl";
import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog";
import { useFileViewer } from "@web/core/file_viewer/file_viewer_hook";
import { _t } from "@web/core/l10n/translation";
import { useService } from "@web/core/utils/hooks";
import { sprintf } from "@web/core/utils/strings";
import { useFileViewer } from "@web/core/file_viewer/file_viewer_hook";
import { _t } from "@web/core/l10n/translation";
import { url } from "@web/core/utils/urls";
/**
* @typedef {Object} Props
* @property {import("@mail/core/attachment_model").Attachment[]} attachments
* @property {import("@mail/core/common/attachment_model").Attachment[]} attachments
* @property {function} unlinkAttachment
* @property {number} imagesHeight
* @extends {Component<Props, Env>}
@@ -29,21 +28,21 @@ export class AttachmentList extends Component {
}
/**
* @return {import("@mail/attachments/attachment_model").Attachment[]}
* @return {import("@mail/core/common/attachment_model").Attachment[]}
*/
get nonImagesAttachments() {
return this.props.attachments.filter((attachment) => !attachment.isImage);
}
/**
* @return {import("@mail/attachments/attachment_model").Attachment[]}
* @return {import("@mail/core/common/attachment_model").Attachment[]}
*/
get imagesAttachments() {
return this.props.attachments.filter((attachment) => attachment.isImage);
}
/**
* @param {import("@mail/attachments/attachment_model").Attachment} attachment
* @param {import("@mail/core/common/attachment_model").Attachment} attachment
*/
getImageUrl(attachment) {
if (attachment.uploading && attachment.tmpUrl) {
@@ -57,14 +56,14 @@ export class AttachmentList extends Component {
}
/**
* @param {import("@mail/attachments/attachment_model").Attachment} attachment
* @param {import("@mail/core/common/attachment_model").Attachment} attachment
*/
canDownload(attachment) {
return !attachment.uploading && !this.env.inComposer;
}
/**
* @param {import("@mail/attachments/attachment_model").Attachment} attachment
* @param {import("@mail/core/common/attachment_model").Attachment} attachment
*/
onClickDownload(attachment) {
const downloadLink = document.createElement("a");
@@ -77,7 +76,7 @@ export class AttachmentList extends Component {
}
/**
* @param {import("@mail/attachments/attachment_model").Attachment} attachment
* @param {import("@mail/core/common/attachment_model").Attachment} attachment
*/
onClickUnlink(attachment) {
if (this.env.inComposer) {
@@ -91,7 +90,7 @@ export class AttachmentList extends Component {
}
/**
* @param {import("@mail/attachments/attachment_model").Attachment} attachment
* @param {import("@mail/core/common/attachment_model").Attachment} attachment
*/
onConfirmUnlink(attachment) {
this.props.unlinkAttachment(attachment);
@@ -1,10 +1,11 @@
/* @odoo-module */
import { assignDefined } from "@mail/utils/misc";
import { assignDefined } from "@mail/utils/common/misc";
import { url } from "@web/core/utils/urls";
export class Attachment {
/** @type {import("@mail/core/store_service").Store} */
/** @type {import("@mail/core/common/store_service").Store} */
_store;
accessToken;
checksum;
@@ -21,10 +22,10 @@ export class Attachment {
url;
/** @type {boolean} */
uploading;
/** @type {import("@mail/core/message_model").Message} */
/** @type {import("@mail/core/common/message_model").Message} */
message;
/** @type {import("@mail/core/thread_model").Thread} */
/** @type {import("@mail/core/common/thread_model").Thread} */
get originThread() {
return this._store.threads[this.originThreadLocalId];
}
@@ -90,7 +91,7 @@ export class Attachment {
get defaultSource() {
const route = url(this.urlRoute, this.urlQueryParams);
const encodedRoute = encodeURIComponent(route)
const encodedRoute = encodeURIComponent(route);
if (this.isPdf) {
return `/web/static/lib/pdfjs/web/viewer.html?file=${encodedRoute}#pagemode=none`;
}
@@ -1,14 +1,15 @@
/** @odoo-module */
/* @odoo-module */
import { Attachment } from "@mail/core/common/attachment_model";
import { removeFromArrayWithPredicate } from "@mail/utils/common/arrays";
import { assignDefined, createLocalId } from "@mail/utils/common/misc";
import { Attachment } from "./attachment_model";
import { assignDefined, createLocalId } from "../utils/misc";
import { registry } from "@web/core/registry";
import { removeFromArrayWithPredicate } from "../utils/arrays";
export class AttachmentService {
constructor(env, services) {
this.env = env;
/** @type {import("@mail/core/store_service").Store} */
/** @type {import("@mail/core/common/store_service").Store} */
this.store = services["mail.store"];
this.rpc = services["rpc"];
}
@@ -1,10 +1,11 @@
/* @odoo-module */
import { useState } from "@odoo/owl";
import { _t } from "@web/core/l10n/translation";
import { Deferred } from "@web/core/utils/concurrency";
import { useBus, useService } from "@web/core/utils/hooks";
import { createLocalId } from "@mail/utils/misc";
import { _t } from "@web/core/l10n/translation";
import { createLocalId } from "@mail/utils/common/misc";
function dataUrlToBlob(data, type) {
const binData = window.atob(data);
@@ -16,19 +17,19 @@ function dataUrlToBlob(data, type) {
let nextId = -1;
/**
* @param {import("@mail/core/thread_model").Thread} thread
* @param {import("@mail/core/common/thread_model").Thread} thread
* @param {Object} [param1={}]
* @param {import("@mail/composer/composer_model").Composer} [param1.composer]
* @param {import("@mail/core/common/composer_model").Composer} [param1.composer]
* @param {function} [param1.onFileUploaded]
*/
export function useAttachmentUploader(thread, { composer, onFileUploaded } = {}) {
const { bus, upload } = useService("file_upload");
const notificationService = useService("notification");
/** @type {import("@mail/core/store_service").Store} */
/** @type {import("@mail/core/common/store_service").Store} */
const store = useService("mail.store");
/** @type {import("@mail/core/thread_service").ThreadService} */
/** @type {import("@mail/core/common/thread_service").ThreadService} */
const threadService = useService("mail.thread");
/** @type {import("@mail/attachments/attachment_service").AttachmentService} */
/** @type {import("@mail/core/common/attachment_service").AttachmentService} */
const attachmentService = useService("mail.attachment");
const abortByAttachmentId = new Map();
const deferredByAttachmentId = new Map();
@@ -17,11 +17,11 @@ export class AttachmentView extends Component {
static props = ["threadId", "threadModel"];
setup() {
/** @type {import("@mail/core/thread_service").ThreadService} */
/** @type {import("@mail/core/common/thread_service").ThreadService} */
this.threadService = useService("mail.thread");
this.iframeViewerPdfRef = useRef("iframeViewerPdf");
this.state = useState({
/** @type {import("@mail/core/thread_model").Thread} */
/** @type {import("@mail/core/common/thread_model").Thread} */
thread: undefined,
});
useEffect(() => {
@@ -1,7 +1,9 @@
/* @odoo-module */
import { onExternalClick } from "@mail/utils/hooks";
import { onExternalClick } from "@mail/utils/common/hooks";
import { Component, useRef, useState, onWillUpdateProps } from "@odoo/owl";
import { useAutoresize } from "@web/core/utils/autoresize";
export class AutoresizeInput extends Component {
@@ -1,6 +1,6 @@
/* @odoo-module */
import { createLocalId } from "../utils/misc";
import { createLocalId } from "@mail/utils/common/misc";
/**
* @class ChannelMember
@@ -15,7 +15,7 @@ export class ChannelMember {
personaLocalId;
rtcSessionId;
threadId;
/** @type {import("@mail/core/store_service").Store} */
/** @type {import("@mail/core/common/store_service").Store} */
_store;
get persona() {
@@ -1,8 +1,9 @@
/** @odoo-module */
/* @odoo-module */
import { ChannelMember } from "@mail/core/common/channel_member_model";
import { removeFromArray } from "@mail/utils/common/arrays";
import { registry } from "@web/core/registry";
import { removeFromArray } from "../utils/arrays";
import { ChannelMember } from "./channel_member_model";
export class ChannelMemberService {
constructor(env, { "mail.store": store, "mail.persona": personaService }) {
@@ -1,14 +1,16 @@
/* @odoo-module */
import { useStore } from "../core/messaging_hook";
import { TagsList } from "@web/core/tags_list/tags_list";
import { NavigableList } from "../composer/navigable_list";
import { useService } from "@web/core/utils/hooks";
import { getActiveHotkey } from "@web/core/hotkeys/hotkey_service";
import { useStore } from "@mail/core/common/messaging_hook";
import { NavigableList } from "@mail/core/common/navigable_list";
import { cleanTerm } from "@mail/utils/common/format";
import { createLocalId, isEventHandled, markEventHandled } from "@mail/utils/common/misc";
import { Component, onMounted, useRef, useState } from "@odoo/owl";
import { cleanTerm } from "@mail/utils/format";
import { createLocalId, isEventHandled, markEventHandled } from "@mail/utils/misc";
import { getActiveHotkey } from "@web/core/hotkeys/hotkey_service";
import { _t } from "@web/core/l10n/translation";
import { TagsList } from "@web/core/tags_list/tags_list";
import { useService } from "@web/core/utils/hooks";
export class ChannelSelector extends Component {
static components = { TagsList, NavigableList };
@@ -20,7 +22,7 @@ export class ChannelSelector extends Component {
this.store = useStore();
this.threadService = useState(useService("mail.thread"));
this.personaService = useService("mail.persona");
/** @type {import("@mail/composer/suggestion_service").SuggestionService} */
/** @type {import("@mail/core/common/suggestion_service").SuggestionService} */
this.suggestionService = useService("mail.suggestion");
this.orm = useService("orm");
this.state = useState({

Some files were not shown because too many files have changed in this diff Show More